/home/awneajlw/public_html/qureshibrothers.codesvista.com/assets/index-mxCxC6MH.js
function yT(e,a){for(var r=0;r<a.length;r++){const n=a[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Or(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sh={exports:{}},Eo={};/**
* @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 d2;function vT(){if(d2)return Eo;d2=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(n,i,o){var c=null;if(o!==void 0&&(c=""+o),i.key!==void 0&&(c=""+i.key),"key"in i){o={};for(var m in i)m!=="key"&&(o[m]=i[m])}else o=i;return i=o.ref,{$$typeof:e,type:n,key:c,ref:i!==void 0?i:null,props:o}}return Eo.Fragment=a,Eo.jsx=r,Eo.jsxs=r,Eo}var u2;function jT(){return u2||(u2=1,Sh.exports=vT()),Sh.exports}var t=jT(),Ah={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 m2;function NT(){if(m2)return Me;m2=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),j=Symbol.iterator;function v(P){return P===null||typeof P!="object"?null:(P=j&&P[j]||P["@@iterator"],typeof P=="function"?P:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,S={};function g(P,H,ee){this.props=P,this.context=H,this.refs=S,this.updater=ee||w}g.prototype.isReactComponent={},g.prototype.setState=function(P,H){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,H,"setState")},g.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function C(){}C.prototype=g.prototype;function k(P,H,ee){this.props=P,this.context=H,this.refs=S,this.updater=ee||w}var O=k.prototype=new C;O.constructor=k,A(O,g.prototype),O.isPureReactComponent=!0;var D=Array.isArray;function B(){}var L={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function R(P,H,ee){var pe=ee.ref;return{$$typeof:e,type:P,key:H,ref:pe!==void 0?pe:null,props:ee}}function z(P,H){return R(P.type,H,P.props)}function $(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function Z(P){var H={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ee){return H[ee]})}var fe=/\/+/g;function se(P,H){return typeof P=="object"&&P!==null&&P.key!=null?Z(""+P.key):H.toString(36)}function ie(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(B,B):(P.status="pending",P.then(function(H){P.status==="pending"&&(P.status="fulfilled",P.value=H)},function(H){P.status==="pending"&&(P.status="rejected",P.reason=H)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function V(P,H,ee,pe,ve){var ue=typeof P;(ue==="undefined"||ue==="boolean")&&(P=null);var he=!1;if(P===null)he=!0;else switch(ue){case"bigint":case"string":case"number":he=!0;break;case"object":switch(P.$$typeof){case e:case a:he=!0;break;case p:return he=P._init,V(he(P._payload),H,ee,pe,ve)}}if(he)return ve=ve(P),he=pe===""?"."+se(P,0):pe,D(ve)?(ee="",he!=null&&(ee=he.replace(fe,"$&/")+"/"),V(ve,H,ee,"",function(xe){return xe})):ve!=null&&($(ve)&&(ve=z(ve,ee+(ve.key==null||P&&P.key===ve.key?"":(""+ve.key).replace(fe,"$&/")+"/")+he)),H.push(ve)),1;he=0;var te=pe===""?".":pe+":";if(D(P))for(var G=0;G<P.length;G++)pe=P[G],ue=te+se(pe,G),he+=V(pe,H,ee,ue,ve);else if(G=v(P),typeof G=="function")for(P=G.call(P),G=0;!(pe=P.next()).done;)pe=pe.value,ue=te+se(pe,G++),he+=V(pe,H,ee,ue,ve);else if(ue==="object"){if(typeof P.then=="function")return V(ie(P),H,ee,pe,ve);throw H=String(P),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return he}function K(P,H,ee){if(P==null)return P;var pe=[],ve=0;return V(P,pe,"","",function(ue){return H.call(ee,ue,ve++)}),pe}function ce(P){if(P._status===-1){var H=P._result;H=H(),H.then(function(ee){(P._status===0||P._status===-1)&&(P._status=1,P._result=ee)},function(ee){(P._status===0||P._status===-1)&&(P._status=2,P._result=ee)}),P._status===-1&&(P._status=0,P._result=H)}if(P._status===1)return P._result.default;throw P._result}var U=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},I={map:K,forEach:function(P,H,ee){K(P,function(){H.apply(this,arguments)},ee)},count:function(P){var H=0;return K(P,function(){H++}),H},toArray:function(P){return K(P,function(H){return H})||[]},only:function(P){if(!$(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Me.Activity=x,Me.Children=I,Me.Component=g,Me.Fragment=r,Me.Profiler=i,Me.PureComponent=k,Me.StrictMode=n,Me.Suspense=u,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Me.__COMPILER_RUNTIME={__proto__:null,c:function(P){return L.H.useMemoCache(P)}},Me.cache=function(P){return function(){return P.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(P,H,ee){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var pe=A({},P.props),ve=P.key;if(H!=null)for(ue in H.key!==void 0&&(ve=""+H.key),H)!T.call(H,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&H.ref===void 0||(pe[ue]=H[ue]);var ue=arguments.length-2;if(ue===1)pe.children=ee;else if(1<ue){for(var he=Array(ue),te=0;te<ue;te++)he[te]=arguments[te+2];pe.children=he}return R(P.type,ve,pe)},Me.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:o,_context:P},P},Me.createElement=function(P,H,ee){var pe,ve={},ue=null;if(H!=null)for(pe in H.key!==void 0&&(ue=""+H.key),H)T.call(H,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(ve[pe]=H[pe]);var he=arguments.length-2;if(he===1)ve.children=ee;else if(1<he){for(var te=Array(he),G=0;G<he;G++)te[G]=arguments[G+2];ve.children=te}if(P&&P.defaultProps)for(pe in he=P.defaultProps,he)ve[pe]===void 0&&(ve[pe]=he[pe]);return R(P,ue,ve)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(P){return{$$typeof:m,render:P}},Me.isValidElement=$,Me.lazy=function(P){return{$$typeof:p,_payload:{_status:-1,_result:P},_init:ce}},Me.memo=function(P,H){return{$$typeof:h,type:P,compare:H===void 0?null:H}},Me.startTransition=function(P){var H=L.T,ee={};L.T=ee;try{var pe=P(),ve=L.S;ve!==null&&ve(ee,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(B,U)}catch(ue){U(ue)}finally{H!==null&&ee.types!==null&&(H.types=ee.types),L.T=H}},Me.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Me.use=function(P){return L.H.use(P)},Me.useActionState=function(P,H,ee){return L.H.useActionState(P,H,ee)},Me.useCallback=function(P,H){return L.H.useCallback(P,H)},Me.useContext=function(P){return L.H.useContext(P)},Me.useDebugValue=function(){},Me.useDeferredValue=function(P,H){return L.H.useDeferredValue(P,H)},Me.useEffect=function(P,H){return L.H.useEffect(P,H)},Me.useEffectEvent=function(P){return L.H.useEffectEvent(P)},Me.useId=function(){return L.H.useId()},Me.useImperativeHandle=function(P,H,ee){return L.H.useImperativeHandle(P,H,ee)},Me.useInsertionEffect=function(P,H){return L.H.useInsertionEffect(P,H)},Me.useLayoutEffect=function(P,H){return L.H.useLayoutEffect(P,H)},Me.useMemo=function(P,H){return L.H.useMemo(P,H)},Me.useOptimistic=function(P,H){return L.H.useOptimistic(P,H)},Me.useReducer=function(P,H,ee){return L.H.useReducer(P,H,ee)},Me.useRef=function(P){return L.H.useRef(P)},Me.useState=function(P){return L.H.useState(P)},Me.useSyncExternalStore=function(P,H,ee){return L.H.useSyncExternalStore(P,H,ee)},Me.useTransition=function(){return L.H.useTransition()},Me.version="19.2.0",Me}var f2;function hi(){return f2||(f2=1,Ah.exports=NT()),Ah.exports}var b=hi();const pr=Or(b),wT=yT({__proto__:null,default:pr},[b]);var Ch={exports:{}},Oo={},kh={exports:{}},Eh={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var p2;function ST(){return p2||(p2=1,(function(e){function a(V,K){var ce=V.length;V.push(K);e:for(;0<ce;){var U=ce-1>>>1,I=V[U];if(0<i(I,K))V[U]=K,V[ce]=I,ce=U;else break e}}function r(V){return V.length===0?null:V[0]}function n(V){if(V.length===0)return null;var K=V[0],ce=V.pop();if(ce!==K){V[0]=ce;e:for(var U=0,I=V.length,P=I>>>1;U<P;){var H=2*(U+1)-1,ee=V[H],pe=H+1,ve=V[pe];if(0>i(ee,ce))pe<I&&0>i(ve,ee)?(V[U]=ve,V[pe]=ce,U=pe):(V[U]=ee,V[H]=ce,U=H);else if(pe<I&&0>i(ve,ce))V[U]=ve,V[pe]=ce,U=pe;else break e}}return K}function i(V,K){var ce=V.sortIndex-K.sortIndex;return ce!==0?ce:V.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,m=c.now();e.unstable_now=function(){return c.now()-m}}var u=[],h=[],p=1,x=null,j=3,v=!1,w=!1,A=!1,S=!1,g=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function O(V){for(var K=r(h);K!==null;){if(K.callback===null)n(h);else if(K.startTime<=V)n(h),K.sortIndex=K.expirationTime,a(u,K);else break;K=r(h)}}function D(V){if(A=!1,O(V),!w)if(r(u)!==null)w=!0,B||(B=!0,Z());else{var K=r(h);K!==null&&ie(D,K.startTime-V)}}var B=!1,L=-1,T=5,R=-1;function z(){return S?!0:!(e.unstable_now()-R<T)}function $(){if(S=!1,B){var V=e.unstable_now();R=V;var K=!0;try{e:{w=!1,A&&(A=!1,C(L),L=-1),v=!0;var ce=j;try{t:{for(O(V),x=r(u);x!==null&&!(x.expirationTime>V&&z());){var U=x.callback;if(typeof U=="function"){x.callback=null,j=x.priorityLevel;var I=U(x.expirationTime<=V);if(V=e.unstable_now(),typeof I=="function"){x.callback=I,O(V),K=!0;break t}x===r(u)&&n(u),O(V)}else n(u);x=r(u)}if(x!==null)K=!0;else{var P=r(h);P!==null&&ie(D,P.startTime-V),K=!1}}break e}finally{x=null,j=ce,v=!1}K=void 0}}finally{K?Z():B=!1}}}var Z;if(typeof k=="function")Z=function(){k($)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,se=fe.port2;fe.port1.onmessage=$,Z=function(){se.postMessage(null)}}else Z=function(){g($,0)};function ie(V,K){L=g(function(){V(e.unstable_now())},K)}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(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_next=function(V){switch(j){case 1:case 2:case 3:var K=3;break;default:K=j}var ce=j;j=K;try{return V()}finally{j=ce}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(V,K){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var ce=j;j=V;try{return K()}finally{j=ce}},e.unstable_scheduleCallback=function(V,K,ce){var U=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?U+ce:U):ce=U,V){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=ce+I,V={id:p++,callback:K,priorityLevel:V,startTime:ce,expirationTime:I,sortIndex:-1},ce>U?(V.sortIndex=ce,a(h,V),r(u)===null&&V===r(h)&&(A?(C(L),L=-1):A=!0,ie(D,ce-U))):(V.sortIndex=I,a(u,V),w||v||(w=!0,B||(B=!0,Z()))),V},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(V){var K=j;return function(){var ce=j;j=K;try{return V.apply(this,arguments)}finally{j=ce}}}})(Eh)),Eh}var h2;function AT(){return h2||(h2=1,kh.exports=ST()),kh.exports}var Oh={exports:{}},ca={};/**
* @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 x2;function CT(){if(x2)return ca;x2=1;var e=hi();function a(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(u,h,p){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:x==null?null:""+x,children:u,containerInfo:h,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return ca.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,ca.createPortal=function(u,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(a(299));return o(u,h,null,p)},ca.flushSync=function(u){var h=c.T,p=n.p;try{if(c.T=null,n.p=2,u)return u()}finally{c.T=h,n.p=p,n.d.f()}},ca.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,n.d.C(u,h))},ca.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},ca.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var p=h.as,x=m(p,h.crossOrigin),j=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?n.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:j,fetchPriority:v}):p==="script"&&n.d.X(u,{crossOrigin:x,integrity:j,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},ca.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=m(h.as,h.crossOrigin);n.d.M(u,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&n.d.M(u)},ca.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,x=m(p,h.crossOrigin);n.d.L(u,p,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},ca.preloadModule=function(u,h){if(typeof u=="string")if(h){var p=m(h.as,h.crossOrigin);n.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else n.d.m(u)},ca.requestFormReset=function(u){n.d.r(u)},ca.unstable_batchedUpdates=function(u,h){return u(h)},ca.useFormState=function(u,h,p){return c.H.useFormState(u,h,p)},ca.useFormStatus=function(){return c.H.useHostTransitionStatus()},ca.version="19.2.0",ca}var g2;function d3(){if(g2)return Oh.exports;g2=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),Oh.exports=CT(),Oh.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 b2;function kT(){if(b2)return Oo;b2=1;var e=AT(),a=hi(),r=d3();function n(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function c(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function m(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(o(s)!==s)throw Error(n(188))}function h(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(n(188));return l!==s?null:s}for(var d=s,f=l;;){var y=d.return;if(y===null)break;var N=y.alternate;if(N===null){if(f=y.return,f!==null){d=f;continue}break}if(y.child===N.child){for(N=y.child;N;){if(N===d)return u(y),s;if(N===f)return u(y),l;N=N.sibling}throw Error(n(188))}if(d.return!==f.return)d=y,f=N;else{for(var E=!1,M=y.child;M;){if(M===d){E=!0,d=y,f=N;break}if(M===f){E=!0,f=y,d=N;break}M=M.sibling}if(!E){for(M=N.child;M;){if(M===d){E=!0,d=N,f=y;break}if(M===f){E=!0,f=N,d=y;break}M=M.sibling}if(!E)throw Error(n(189))}}if(d.alternate!==f)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?s:l}function p(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=p(s),l!==null)return l;s=s.sibling}return null}var x=Object.assign,j=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),k=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function Z(s){return s===null||typeof s!="object"?null:(s=$&&s[$]||s["@@iterator"],typeof s=="function"?s:null)}var fe=Symbol.for("react.client.reference");function se(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===fe?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case A:return"Fragment";case g:return"Profiler";case S:return"StrictMode";case D:return"Suspense";case B:return"SuspenseList";case R:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case w:return"Portal";case k:return s.displayName||"Context";case C:return(s._context.displayName||"Context")+".Consumer";case O:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case L:return l=s.displayName||null,l!==null?l:se(s.type)||"Memo";case T:l=s._payload,s=s._init;try{return se(s(l))}catch{}}return null}var ie=Array.isArray,V=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},U=[],I=-1;function P(s){return{current:s}}function H(s){0>I||(s.current=U[I],U[I]=null,I--)}function ee(s,l){I++,U[I]=s.current,s.current=l}var pe=P(null),ve=P(null),ue=P(null),he=P(null);function te(s,l){switch(ee(ue,l),ee(ve,s),ee(pe,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?PN(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=PN(l),s=_N(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}H(pe),ee(pe,s)}function G(){H(pe),H(ve),H(ue)}function xe(s){s.memoizedState!==null&&ee(he,s);var l=pe.current,d=_N(l,s.type);l!==d&&(ee(ve,s),ee(pe,d))}function Ne(s){ve.current===s&&(H(pe),H(ve)),he.current===s&&(H(he),So._currentValue=ce)}var ne,_e;function je(s){if(ne===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);ne=l&&l[1]||"",_e=-1<d.stack.indexOf(`
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ne+s+_e}var Ee=!1;function Ce(s,l){if(!s||Ee)return"";Ee=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(l){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(re){var Q=re}Reflect.construct(s,[],me)}else{try{me.call()}catch(re){Q=re}s.call(me.prototype)}}else{try{throw Error()}catch(re){Q=re}(me=s())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(re){if(re&&Q&&typeof re.stack=="string")return[re.stack,Q.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var N=f.DetermineComponentFrameRoot(),E=N[0],M=N[1];if(E&&M){var q=E.split(`
`),X=M.split(`
`);for(y=f=0;f<q.length&&!q[f].includes("DetermineComponentFrameRoot");)f++;for(;y<X.length&&!X[y].includes("DetermineComponentFrameRoot");)y++;if(f===q.length||y===X.length)for(f=q.length-1,y=X.length-1;1<=f&&0<=y&&q[f]!==X[y];)y--;for(;1<=f&&0<=y;f--,y--)if(q[f]!==X[y]){if(f!==1||y!==1)do if(f--,y--,0>y||q[f]!==X[y]){var oe=`
`+q[f].replace(" at new "," at ");return s.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",s.displayName)),oe}while(1<=f&&0<=y);break}}}finally{Ee=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?je(d):""}function Ke(s,l){switch(s.tag){case 26:case 27:case 5:return je(s.type);case 16:return je("Lazy");case 13:return s.child!==l&&l!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return Ce(s.type,!1);case 11:return Ce(s.type.render,!1);case 1:return Ce(s.type,!0);case 31:return je("Activity");default:return""}}function dt(s){try{var l="",d=null;do l+=Ke(s,d),d=s,s=s.return;while(s);return l}catch(f){return`
Error generating stack: `+f.message+`
`+f.stack}}var Qt=Object.prototype.hasOwnProperty,Xa=e.unstable_scheduleCallback,Ti=e.unstable_cancelCallback,cf=e.unstable_shouldYield,df=e.unstable_requestPaint,ye=e.unstable_now,Pe=e.unstable_getCurrentPriorityLevel,jt=e.unstable_ImmediatePriority,At=e.unstable_UserBlockingPriority,$t=e.unstable_NormalPriority,Ss=e.unstable_LowPriority,Kr=e.unstable_IdlePriority,Ri=e.log,Pi=e.unstable_setDisableYieldValue,Gr=null,Ut=null;function Za(s){if(typeof Ri=="function"&&Pi(s),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(Gr,s)}catch{}}var ea=Math.clz32?Math.clz32:uf,_i=Math.log,Mi=Math.LN2;function uf(s){return s>>>=0,s===0?32:31-(_i(s)/Mi|0)|0}var Dc=256,Tc=262144,Rc=4194304;function As(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Pc(s,l,d){var f=s.pendingLanes;if(f===0)return 0;var y=0,N=s.suspendedLanes,E=s.pingedLanes;s=s.warmLanes;var M=f&134217727;return M!==0?(f=M&~N,f!==0?y=As(f):(E&=M,E!==0?y=As(E):d||(d=M&~s,d!==0&&(y=As(d))))):(M=f&~N,M!==0?y=As(M):E!==0?y=As(E):d||(d=f&~s,d!==0&&(y=As(d)))),y===0?0:l!==0&&l!==y&&(l&N)===0&&(N=y&-y,d=l&-l,N>=d||N===32&&(d&4194048)!==0)?l:y}function zi(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function l6(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 py(){var s=Rc;return Rc<<=1,(Rc&62914560)===0&&(Rc=4194304),s}function mf(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function Li(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function i6(s,l,d,f,y,N){var E=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var M=s.entanglements,q=s.expirationTimes,X=s.hiddenUpdates;for(d=E&~d;0<d;){var oe=31-ea(d),me=1<<oe;M[oe]=0,q[oe]=-1;var Q=X[oe];if(Q!==null)for(X[oe]=null,oe=0;oe<Q.length;oe++){var re=Q[oe];re!==null&&(re.lane&=-536870913)}d&=~me}f!==0&&hy(s,f,0),N!==0&&y===0&&s.tag!==0&&(s.suspendedLanes|=N&~(E&~l))}function hy(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var f=31-ea(l);s.entangledLanes|=l,s.entanglements[f]=s.entanglements[f]|1073741824|d&261930}function xy(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var f=31-ea(d),y=1<<f;y&l|s[f]&l&&(s[f]|=l),d&=~y}}function gy(s,l){var d=l&-l;return d=(d&42)!==0?1:ff(d),(d&(s.suspendedLanes|l))!==0?0:d}function ff(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function pf(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function by(){var s=K.p;return s!==0?s:(s=window.event,s===void 0?32:r2(s.type))}function yy(s,l){var d=K.p;try{return K.p=s,l()}finally{K.p=d}}var In=Math.random().toString(36).slice(2),ta="__reactFiber$"+In,Sa="__reactProps$"+In,pl="__reactContainer$"+In,hf="__reactEvents$"+In,o6="__reactListeners$"+In,c6="__reactHandles$"+In,vy="__reactResources$"+In,Bi="__reactMarker$"+In;function xf(s){delete s[ta],delete s[Sa],delete s[hf],delete s[o6],delete s[c6]}function hl(s){var l=s[ta];if(l)return l;for(var d=s.parentNode;d;){if(l=d[pl]||d[ta]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=$N(s);s!==null;){if(d=s[ta])return d;s=$N(s)}return l}s=d,d=s.parentNode}return null}function xl(s){if(s=s[ta]||s[pl]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function Ii(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function gl(s){var l=s[vy];return l||(l=s[vy]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function qt(s){s[Bi]=!0}var jy=new Set,Ny={};function Cs(s,l){bl(s,l),bl(s+"Capture",l)}function bl(s,l){for(Ny[s]=l,s=0;s<l.length;s++)jy.add(l[s])}var d6=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]*$"),wy={},Sy={};function u6(s){return Qt.call(Sy,s)?!0:Qt.call(wy,s)?!1:d6.test(s)?Sy[s]=!0:(wy[s]=!0,!1)}function _c(s,l,d){if(u6(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var f=l.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function Mc(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function Jr(s,l,d,f){if(f===null)s.removeAttribute(d);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+f)}}function Qa(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Ay(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function m6(s,l,d){var f=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var y=f.get,N=f.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return y.call(this)},set:function(E){d=""+E,N.call(this,E)}}),Object.defineProperty(s,l,{enumerable:f.enumerable}),{getValue:function(){return d},setValue:function(E){d=""+E},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function gf(s){if(!s._valueTracker){var l=Ay(s)?"checked":"value";s._valueTracker=m6(s,l,""+s[l])}}function Cy(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),f="";return s&&(f=Ay(s)?s.checked?"true":"false":s.value),s=f,s!==d?(l.setValue(s),!0):!1}function zc(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var f6=/[\n"\\]/g;function er(s){return s.replace(f6,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function bf(s,l,d,f,y,N,E,M){s.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?s.type=E:s.removeAttribute("type"),l!=null?E==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Qa(l)):s.value!==""+Qa(l)&&(s.value=""+Qa(l)):E!=="submit"&&E!=="reset"||s.removeAttribute("value"),l!=null?yf(s,E,Qa(l)):d!=null?yf(s,E,Qa(d)):f!=null&&s.removeAttribute("value"),y==null&&N!=null&&(s.defaultChecked=!!N),y!=null&&(s.checked=y&&typeof y!="function"&&typeof y!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?s.name=""+Qa(M):s.removeAttribute("name")}function ky(s,l,d,f,y,N,E,M){if(N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(s.type=N),l!=null||d!=null){if(!(N!=="submit"&&N!=="reset"||l!=null)){gf(s);return}d=d!=null?""+Qa(d):"",l=l!=null?""+Qa(l):d,M||l===s.value||(s.value=l),s.defaultValue=l}f=f??y,f=typeof f!="function"&&typeof f!="symbol"&&!!f,s.checked=M?s.checked:!!f,s.defaultChecked=!!f,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(s.name=E),gf(s)}function yf(s,l,d){l==="number"&&zc(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function yl(s,l,d,f){if(s=s.options,l){l={};for(var y=0;y<d.length;y++)l["$"+d[y]]=!0;for(d=0;d<s.length;d++)y=l.hasOwnProperty("$"+s[d].value),s[d].selected!==y&&(s[d].selected=y),y&&f&&(s[d].defaultSelected=!0)}else{for(d=""+Qa(d),l=null,y=0;y<s.length;y++){if(s[y].value===d){s[y].selected=!0,f&&(s[y].defaultSelected=!0);return}l!==null||s[y].disabled||(l=s[y])}l!==null&&(l.selected=!0)}}function Ey(s,l,d){if(l!=null&&(l=""+Qa(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+Qa(d):""}function Oy(s,l,d,f){if(l==null){if(f!=null){if(d!=null)throw Error(n(92));if(ie(f)){if(1<f.length)throw Error(n(93));f=f[0]}d=f}d==null&&(d=""),l=d}d=Qa(l),s.defaultValue=d,f=s.textContent,f===d&&f!==""&&f!==null&&(s.value=f),gf(s)}function vl(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var p6=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 Dy(s,l,d){var f=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?f?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":f?s.setProperty(l,d):typeof d!="number"||d===0||p6.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function Ty(s,l,d){if(l!=null&&typeof l!="object")throw Error(n(62));if(s=s.style,d!=null){for(var f in d)!d.hasOwnProperty(f)||l!=null&&l.hasOwnProperty(f)||(f.indexOf("--")===0?s.setProperty(f,""):f==="float"?s.cssFloat="":s[f]="");for(var y in l)f=l[y],l.hasOwnProperty(y)&&d[y]!==f&&Dy(s,y,f)}else for(var N in l)l.hasOwnProperty(N)&&Dy(s,N,l[N])}function vf(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var h6=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"]]),x6=/^[\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 Lc(s){return x6.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Wr(){}var jf=null;function Nf(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var jl=null,Nl=null;function Ry(s){var l=xl(s);if(l&&(s=l.stateNode)){var d=s[Sa]||null;e:switch(s=l.stateNode,l.type){case"input":if(bf(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+er(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var f=d[l];if(f!==s&&f.form===s.form){var y=f[Sa]||null;if(!y)throw Error(n(90));bf(f,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(l=0;l<d.length;l++)f=d[l],f.form===s.form&&Cy(f)}break e;case"textarea":Ey(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&yl(s,!!d.multiple,l,!1)}}}var wf=!1;function Py(s,l,d){if(wf)return s(l,d);wf=!0;try{var f=s(l);return f}finally{if(wf=!1,(jl!==null||Nl!==null)&&(Sd(),jl&&(l=jl,s=Nl,Nl=jl=null,Ry(l),s)))for(l=0;l<s.length;l++)Ry(s[l])}}function Fi(s,l){var d=s.stateNode;if(d===null)return null;var f=d[Sa]||null;if(f===null)return null;d=f[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(s=s.type,f=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!f;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(n(231,l,typeof d));return d}var Xr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sf=!1;if(Xr)try{var $i={};Object.defineProperty($i,"passive",{get:function(){Sf=!0}}),window.addEventListener("test",$i,$i),window.removeEventListener("test",$i,$i)}catch{Sf=!1}var Fn=null,Af=null,Bc=null;function _y(){if(Bc)return Bc;var s,l=Af,d=l.length,f,y="value"in Fn?Fn.value:Fn.textContent,N=y.length;for(s=0;s<d&&l[s]===y[s];s++);var E=d-s;for(f=1;f<=E&&l[d-f]===y[N-f];f++);return Bc=y.slice(s,1<f?1-f:void 0)}function Ic(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function Fc(){return!0}function My(){return!1}function Aa(s){function l(d,f,y,N,E){this._reactName=d,this._targetInst=y,this.type=f,this.nativeEvent=N,this.target=E,this.currentTarget=null;for(var M in s)s.hasOwnProperty(M)&&(d=s[M],this[M]=d?d(N):N[M]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?Fc:My,this.isPropagationStopped=My,this}return x(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Fc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Fc)},persist:function(){},isPersistent:Fc}),l}var ks={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$c=Aa(ks),Ui=x({},ks,{view:0,detail:0}),g6=Aa(Ui),Cf,kf,qi,Uc=x({},Ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Of,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==qi&&(qi&&s.type==="mousemove"?(Cf=s.screenX-qi.screenX,kf=s.screenY-qi.screenY):kf=Cf=0,qi=s),Cf)},movementY:function(s){return"movementY"in s?s.movementY:kf}}),zy=Aa(Uc),b6=x({},Uc,{dataTransfer:0}),y6=Aa(b6),v6=x({},Ui,{relatedTarget:0}),Ef=Aa(v6),j6=x({},ks,{animationName:0,elapsedTime:0,pseudoElement:0}),N6=Aa(j6),w6=x({},ks,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),S6=Aa(w6),A6=x({},ks,{data:0}),Ly=Aa(A6),C6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},k6={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"},E6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O6(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=E6[s])?!!l[s]:!1}function Of(){return O6}var D6=x({},Ui,{key:function(s){if(s.key){var l=C6[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=Ic(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?k6[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Of,charCode:function(s){return s.type==="keypress"?Ic(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Ic(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),T6=Aa(D6),R6=x({},Uc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),By=Aa(R6),P6=x({},Ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Of}),_6=Aa(P6),M6=x({},ks,{propertyName:0,elapsedTime:0,pseudoElement:0}),z6=Aa(M6),L6=x({},Uc,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),B6=Aa(L6),I6=x({},ks,{newState:0,oldState:0}),F6=Aa(I6),$6=[9,13,27,32],Df=Xr&&"CompositionEvent"in window,Hi=null;Xr&&"documentMode"in document&&(Hi=document.documentMode);var U6=Xr&&"TextEvent"in window&&!Hi,Iy=Xr&&(!Df||Hi&&8<Hi&&11>=Hi),Fy=" ",$y=!1;function Uy(s,l){switch(s){case"keyup":return $6.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qy(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var wl=!1;function q6(s,l){switch(s){case"compositionend":return qy(l);case"keypress":return l.which!==32?null:($y=!0,Fy);case"textInput":return s=l.data,s===Fy&&$y?null:s;default:return null}}function H6(s,l){if(wl)return s==="compositionend"||!Df&&Uy(s,l)?(s=_y(),Bc=Af=Fn=null,wl=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Iy&&l.locale!=="ko"?null:l.data;default:return null}}var V6={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 Hy(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!V6[s.type]:l==="textarea"}function Vy(s,l,d,f){jl?Nl?Nl.push(f):Nl=[f]:jl=f,l=Td(l,"onChange"),0<l.length&&(d=new $c("onChange","change",null,d,f),s.push({event:d,listeners:l}))}var Vi=null,Yi=null;function Y6(s){kN(s,0)}function qc(s){var l=Ii(s);if(Cy(l))return s}function Yy(s,l){if(s==="change")return l}var Ky=!1;if(Xr){var Tf;if(Xr){var Rf="oninput"in document;if(!Rf){var Gy=document.createElement("div");Gy.setAttribute("oninput","return;"),Rf=typeof Gy.oninput=="function"}Tf=Rf}else Tf=!1;Ky=Tf&&(!document.documentMode||9<document.documentMode)}function Jy(){Vi&&(Vi.detachEvent("onpropertychange",Wy),Yi=Vi=null)}function Wy(s){if(s.propertyName==="value"&&qc(Yi)){var l=[];Vy(l,Yi,s,Nf(s)),Py(Y6,l)}}function K6(s,l,d){s==="focusin"?(Jy(),Vi=l,Yi=d,Vi.attachEvent("onpropertychange",Wy)):s==="focusout"&&Jy()}function G6(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return qc(Yi)}function J6(s,l){if(s==="click")return qc(l)}function W6(s,l){if(s==="input"||s==="change")return qc(l)}function X6(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var La=typeof Object.is=="function"?Object.is:X6;function Ki(s,l){if(La(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),f=Object.keys(l);if(d.length!==f.length)return!1;for(f=0;f<d.length;f++){var y=d[f];if(!Qt.call(l,y)||!La(s[y],l[y]))return!1}return!0}function Xy(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Zy(s,l){var d=Xy(s);s=0;for(var f;d;){if(d.nodeType===3){if(f=s+d.textContent.length,s<=l&&f>=l)return{node:d,offset:l-s};s=f}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Xy(d)}}function Qy(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?Qy(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function ev(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=zc(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=zc(s.document)}return l}function Pf(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var Z6=Xr&&"documentMode"in document&&11>=document.documentMode,Sl=null,_f=null,Gi=null,Mf=!1;function tv(s,l,d){var f=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Mf||Sl==null||Sl!==zc(f)||(f=Sl,"selectionStart"in f&&Pf(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Gi&&Ki(Gi,f)||(Gi=f,f=Td(_f,"onSelect"),0<f.length&&(l=new $c("onSelect","select",null,l,d),s.push({event:l,listeners:f}),l.target=Sl)))}function Es(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var Al={animationend:Es("Animation","AnimationEnd"),animationiteration:Es("Animation","AnimationIteration"),animationstart:Es("Animation","AnimationStart"),transitionrun:Es("Transition","TransitionRun"),transitionstart:Es("Transition","TransitionStart"),transitioncancel:Es("Transition","TransitionCancel"),transitionend:Es("Transition","TransitionEnd")},zf={},av={};Xr&&(av=document.createElement("div").style,"AnimationEvent"in window||(delete Al.animationend.animation,delete Al.animationiteration.animation,delete Al.animationstart.animation),"TransitionEvent"in window||delete Al.transitionend.transition);function Os(s){if(zf[s])return zf[s];if(!Al[s])return s;var l=Al[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in av)return zf[s]=l[d];return s}var rv=Os("animationend"),nv=Os("animationiteration"),sv=Os("animationstart"),Q6=Os("transitionrun"),eD=Os("transitionstart"),tD=Os("transitioncancel"),lv=Os("transitionend"),iv=new Map,Lf="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(" ");Lf.push("scrollEnd");function Nr(s,l){iv.set(s,l),Cs(l,[s])}var Hc=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},tr=[],Cl=0,Bf=0;function Vc(){for(var s=Cl,l=Bf=Cl=0;l<s;){var d=tr[l];tr[l++]=null;var f=tr[l];tr[l++]=null;var y=tr[l];tr[l++]=null;var N=tr[l];if(tr[l++]=null,f!==null&&y!==null){var E=f.pending;E===null?y.next=y:(y.next=E.next,E.next=y),f.pending=y}N!==0&&ov(d,y,N)}}function Yc(s,l,d,f){tr[Cl++]=s,tr[Cl++]=l,tr[Cl++]=d,tr[Cl++]=f,Bf|=f,s.lanes|=f,s=s.alternate,s!==null&&(s.lanes|=f)}function If(s,l,d,f){return Yc(s,l,d,f),Kc(s)}function Ds(s,l){return Yc(s,null,null,l),Kc(s)}function ov(s,l,d){s.lanes|=d;var f=s.alternate;f!==null&&(f.lanes|=d);for(var y=!1,N=s.return;N!==null;)N.childLanes|=d,f=N.alternate,f!==null&&(f.childLanes|=d),N.tag===22&&(s=N.stateNode,s===null||s._visibility&1||(y=!0)),s=N,N=N.return;return s.tag===3?(N=s.stateNode,y&&l!==null&&(y=31-ea(d),s=N.hiddenUpdates,f=s[y],f===null?s[y]=[l]:f.push(l),l.lane=d|536870912),N):null}function Kc(s){if(50<go)throw go=0,Gp=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var kl={};function aD(s,l,d,f){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ba(s,l,d,f){return new aD(s,l,d,f)}function Ff(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Zr(s,l){var d=s.alternate;return d===null?(d=Ba(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function cv(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function Gc(s,l,d,f,y,N){var E=0;if(f=s,typeof s=="function")Ff(s)&&(E=1);else if(typeof s=="string")E=iT(s,d,pe.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case R:return s=Ba(31,d,l,y),s.elementType=R,s.lanes=N,s;case A:return Ts(d.children,y,N,l);case S:E=8,y|=24;break;case g:return s=Ba(12,d,l,y|2),s.elementType=g,s.lanes=N,s;case D:return s=Ba(13,d,l,y),s.elementType=D,s.lanes=N,s;case B:return s=Ba(19,d,l,y),s.elementType=B,s.lanes=N,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case k:E=10;break e;case C:E=9;break e;case O:E=11;break e;case L:E=14;break e;case T:E=16,f=null;break e}E=29,d=Error(n(130,s===null?"null":typeof s,"")),f=null}return l=Ba(E,d,l,y),l.elementType=s,l.type=f,l.lanes=N,l}function Ts(s,l,d,f){return s=Ba(7,s,f,l),s.lanes=d,s}function $f(s,l,d){return s=Ba(6,s,null,l),s.lanes=d,s}function dv(s){var l=Ba(18,null,null,0);return l.stateNode=s,l}function Uf(s,l,d){return l=Ba(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var uv=new WeakMap;function ar(s,l){if(typeof s=="object"&&s!==null){var d=uv.get(s);return d!==void 0?d:(l={value:s,source:l,stack:dt(l)},uv.set(s,l),l)}return{value:s,source:l,stack:dt(l)}}var El=[],Ol=0,Jc=null,Ji=0,rr=[],nr=0,$n=null,_r=1,Mr="";function Qr(s,l){El[Ol++]=Ji,El[Ol++]=Jc,Jc=s,Ji=l}function mv(s,l,d){rr[nr++]=_r,rr[nr++]=Mr,rr[nr++]=$n,$n=s;var f=_r;s=Mr;var y=32-ea(f)-1;f&=~(1<<y),d+=1;var N=32-ea(l)+y;if(30<N){var E=y-y%5;N=(f&(1<<E)-1).toString(32),f>>=E,y-=E,_r=1<<32-ea(l)+y|d<<y|f,Mr=N+s}else _r=1<<N|d<<y|f,Mr=s}function qf(s){s.return!==null&&(Qr(s,1),mv(s,1,0))}function Hf(s){for(;s===Jc;)Jc=El[--Ol],El[Ol]=null,Ji=El[--Ol],El[Ol]=null;for(;s===$n;)$n=rr[--nr],rr[nr]=null,Mr=rr[--nr],rr[nr]=null,_r=rr[--nr],rr[nr]=null}function fv(s,l){rr[nr++]=_r,rr[nr++]=Mr,rr[nr++]=$n,_r=l.id,Mr=l.overflow,$n=s}var aa=null,ft=null,He=!1,Un=null,sr=!1,Vf=Error(n(519));function qn(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wi(ar(l,s)),Vf}function pv(s){var l=s.stateNode,d=s.type,f=s.memoizedProps;switch(l[ta]=s,l[Sa]=f,d){case"dialog":$e("cancel",l),$e("close",l);break;case"iframe":case"object":case"embed":$e("load",l);break;case"video":case"audio":for(d=0;d<yo.length;d++)$e(yo[d],l);break;case"source":$e("error",l);break;case"img":case"image":case"link":$e("error",l),$e("load",l);break;case"details":$e("toggle",l);break;case"input":$e("invalid",l),ky(l,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":$e("invalid",l);break;case"textarea":$e("invalid",l),Oy(l,f.value,f.defaultValue,f.children)}d=f.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||f.suppressHydrationWarning===!0||TN(l.textContent,d)?(f.popover!=null&&($e("beforetoggle",l),$e("toggle",l)),f.onScroll!=null&&$e("scroll",l),f.onScrollEnd!=null&&$e("scrollend",l),f.onClick!=null&&(l.onclick=Wr),l=!0):l=!1,l||qn(s,!0)}function hv(s){for(aa=s.return;aa;)switch(aa.tag){case 5:case 31:case 13:sr=!1;return;case 27:case 3:sr=!0;return;default:aa=aa.return}}function Dl(s){if(s!==aa)return!1;if(!He)return hv(s),He=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||ch(s.type,s.memoizedProps)),d=!d),d&&ft&&qn(s),hv(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));ft=FN(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));ft=FN(s)}else l===27?(l=ft,rs(s.type)?(s=ph,ph=null,ft=s):ft=l):ft=aa?ir(s.stateNode.nextSibling):null;return!0}function Rs(){ft=aa=null,He=!1}function Yf(){var s=Un;return s!==null&&(Oa===null?Oa=s:Oa.push.apply(Oa,s),Un=null),s}function Wi(s){Un===null?Un=[s]:Un.push(s)}var Kf=P(null),Ps=null,en=null;function Hn(s,l,d){ee(Kf,l._currentValue),l._currentValue=d}function tn(s){s._currentValue=Kf.current,H(Kf)}function Gf(s,l,d){for(;s!==null;){var f=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,f!==null&&(f.childLanes|=l)):f!==null&&(f.childLanes&l)!==l&&(f.childLanes|=l),s===d)break;s=s.return}}function Jf(s,l,d,f){var y=s.child;for(y!==null&&(y.return=s);y!==null;){var N=y.dependencies;if(N!==null){var E=y.child;N=N.firstContext;e:for(;N!==null;){var M=N;N=y;for(var q=0;q<l.length;q++)if(M.context===l[q]){N.lanes|=d,M=N.alternate,M!==null&&(M.lanes|=d),Gf(N.return,d,s),f||(E=null);break e}N=M.next}}else if(y.tag===18){if(E=y.return,E===null)throw Error(n(341));E.lanes|=d,N=E.alternate,N!==null&&(N.lanes|=d),Gf(E,d,s),E=null}else E=y.child;if(E!==null)E.return=y;else for(E=y;E!==null;){if(E===s){E=null;break}if(y=E.sibling,y!==null){y.return=E.return,E=y;break}E=E.return}y=E}}function Tl(s,l,d,f){s=null;for(var y=l,N=!1;y!==null;){if(!N){if((y.flags&524288)!==0)N=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var E=y.alternate;if(E===null)throw Error(n(387));if(E=E.memoizedProps,E!==null){var M=y.type;La(y.pendingProps.value,E.value)||(s!==null?s.push(M):s=[M])}}else if(y===he.current){if(E=y.alternate,E===null)throw Error(n(387));E.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(s!==null?s.push(So):s=[So])}y=y.return}s!==null&&Jf(l,s,d,f),l.flags|=262144}function Wc(s){for(s=s.firstContext;s!==null;){if(!La(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function _s(s){Ps=s,en=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function ra(s){return xv(Ps,s)}function Xc(s,l){return Ps===null&&_s(s),xv(s,l)}function xv(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},en===null){if(s===null)throw Error(n(308));en=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else en=en.next=l;return d}var rD=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,f){s.push(f)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},nD=e.unstable_scheduleCallback,sD=e.unstable_NormalPriority,Ot={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wf(){return{controller:new rD,data:new Map,refCount:0}}function Xi(s){s.refCount--,s.refCount===0&&nD(sD,function(){s.controller.abort()})}var Zi=null,Xf=0,Rl=0,Pl=null;function lD(s,l){if(Zi===null){var d=Zi=[];Xf=0,Rl=eh(),Pl={status:"pending",value:void 0,then:function(f){d.push(f)}}}return Xf++,l.then(gv,gv),l}function gv(){if(--Xf===0&&Zi!==null){Pl!==null&&(Pl.status="fulfilled");var s=Zi;Zi=null,Rl=0,Pl=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function iD(s,l){var d=[],f={status:"pending",value:null,reason:null,then:function(y){d.push(y)}};return s.then(function(){f.status="fulfilled",f.value=l;for(var y=0;y<d.length;y++)(0,d[y])(l)},function(y){for(f.status="rejected",f.reason=y,y=0;y<d.length;y++)(0,d[y])(void 0)}),f}var bv=V.S;V.S=function(s,l){tN=ye(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&lD(s,l),bv!==null&&bv(s,l)};var Ms=P(null);function Zf(){var s=Ms.current;return s!==null?s:it.pooledCache}function Zc(s,l){l===null?ee(Ms,Ms.current):ee(Ms,l.pool)}function yv(){var s=Zf();return s===null?null:{parent:Ot._currentValue,pool:s}}var _l=Error(n(460)),Qf=Error(n(474)),Qc=Error(n(542)),ed={then:function(){}};function vv(s){return s=s.status,s==="fulfilled"||s==="rejected"}function jv(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(Wr,Wr),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,wv(s),s;default:if(typeof l.status=="string")l.then(Wr,Wr);else{if(s=it,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=l,s.status="pending",s.then(function(f){if(l.status==="pending"){var y=l;y.status="fulfilled",y.value=f}},function(f){if(l.status==="pending"){var y=l;y.status="rejected",y.reason=f}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,wv(s),s}throw Ls=l,_l}}function zs(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ls=d,_l):d}}var Ls=null;function Nv(){if(Ls===null)throw Error(n(459));var s=Ls;return Ls=null,s}function wv(s){if(s===_l||s===Qc)throw Error(n(483))}var Ml=null,Qi=0;function td(s){var l=Qi;return Qi+=1,Ml===null&&(Ml=[]),jv(Ml,s,l)}function eo(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function ad(s,l){throw l.$$typeof===j?Error(n(525)):(s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function Sv(s){function l(J,Y){if(s){var W=J.deletions;W===null?(J.deletions=[Y],J.flags|=16):W.push(Y)}}function d(J,Y){if(!s)return null;for(;Y!==null;)l(J,Y),Y=Y.sibling;return null}function f(J){for(var Y=new Map;J!==null;)J.key!==null?Y.set(J.key,J):Y.set(J.index,J),J=J.sibling;return Y}function y(J,Y){return J=Zr(J,Y),J.index=0,J.sibling=null,J}function N(J,Y,W){return J.index=W,s?(W=J.alternate,W!==null?(W=W.index,W<Y?(J.flags|=67108866,Y):W):(J.flags|=67108866,Y)):(J.flags|=1048576,Y)}function E(J){return s&&J.alternate===null&&(J.flags|=67108866),J}function M(J,Y,W,de){return Y===null||Y.tag!==6?(Y=$f(W,J.mode,de),Y.return=J,Y):(Y=y(Y,W),Y.return=J,Y)}function q(J,Y,W,de){var Oe=W.type;return Oe===A?oe(J,Y,W.props.children,de,W.key):Y!==null&&(Y.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===T&&zs(Oe)===Y.type)?(Y=y(Y,W.props),eo(Y,W),Y.return=J,Y):(Y=Gc(W.type,W.key,W.props,null,J.mode,de),eo(Y,W),Y.return=J,Y)}function X(J,Y,W,de){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==W.containerInfo||Y.stateNode.implementation!==W.implementation?(Y=Uf(W,J.mode,de),Y.return=J,Y):(Y=y(Y,W.children||[]),Y.return=J,Y)}function oe(J,Y,W,de,Oe){return Y===null||Y.tag!==7?(Y=Ts(W,J.mode,de,Oe),Y.return=J,Y):(Y=y(Y,W),Y.return=J,Y)}function me(J,Y,W){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=$f(""+Y,J.mode,W),Y.return=J,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:return W=Gc(Y.type,Y.key,Y.props,null,J.mode,W),eo(W,Y),W.return=J,W;case w:return Y=Uf(Y,J.mode,W),Y.return=J,Y;case T:return Y=zs(Y),me(J,Y,W)}if(ie(Y)||Z(Y))return Y=Ts(Y,J.mode,W,null),Y.return=J,Y;if(typeof Y.then=="function")return me(J,td(Y),W);if(Y.$$typeof===k)return me(J,Xc(J,Y),W);ad(J,Y)}return null}function Q(J,Y,W,de){var Oe=Y!==null?Y.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Oe!==null?null:M(J,Y,""+W,de);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case v:return W.key===Oe?q(J,Y,W,de):null;case w:return W.key===Oe?X(J,Y,W,de):null;case T:return W=zs(W),Q(J,Y,W,de)}if(ie(W)||Z(W))return Oe!==null?null:oe(J,Y,W,de,null);if(typeof W.then=="function")return Q(J,Y,td(W),de);if(W.$$typeof===k)return Q(J,Y,Xc(J,W),de);ad(J,W)}return null}function re(J,Y,W,de,Oe){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return J=J.get(W)||null,M(Y,J,""+de,Oe);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case v:return J=J.get(de.key===null?W:de.key)||null,q(Y,J,de,Oe);case w:return J=J.get(de.key===null?W:de.key)||null,X(Y,J,de,Oe);case T:return de=zs(de),re(J,Y,W,de,Oe)}if(ie(de)||Z(de))return J=J.get(W)||null,oe(Y,J,de,Oe,null);if(typeof de.then=="function")return re(J,Y,W,td(de),Oe);if(de.$$typeof===k)return re(J,Y,W,Xc(Y,de),Oe);ad(Y,de)}return null}function Ae(J,Y,W,de){for(var Oe=null,Ge=null,ke=Y,Ie=Y=0,qe=null;ke!==null&&Ie<W.length;Ie++){ke.index>Ie?(qe=ke,ke=null):qe=ke.sibling;var Je=Q(J,ke,W[Ie],de);if(Je===null){ke===null&&(ke=qe);break}s&&ke&&Je.alternate===null&&l(J,ke),Y=N(Je,Y,Ie),Ge===null?Oe=Je:Ge.sibling=Je,Ge=Je,ke=qe}if(Ie===W.length)return d(J,ke),He&&Qr(J,Ie),Oe;if(ke===null){for(;Ie<W.length;Ie++)ke=me(J,W[Ie],de),ke!==null&&(Y=N(ke,Y,Ie),Ge===null?Oe=ke:Ge.sibling=ke,Ge=ke);return He&&Qr(J,Ie),Oe}for(ke=f(ke);Ie<W.length;Ie++)qe=re(ke,J,Ie,W[Ie],de),qe!==null&&(s&&qe.alternate!==null&&ke.delete(qe.key===null?Ie:qe.key),Y=N(qe,Y,Ie),Ge===null?Oe=qe:Ge.sibling=qe,Ge=qe);return s&&ke.forEach(function(os){return l(J,os)}),He&&Qr(J,Ie),Oe}function Re(J,Y,W,de){if(W==null)throw Error(n(151));for(var Oe=null,Ge=null,ke=Y,Ie=Y=0,qe=null,Je=W.next();ke!==null&&!Je.done;Ie++,Je=W.next()){ke.index>Ie?(qe=ke,ke=null):qe=ke.sibling;var os=Q(J,ke,Je.value,de);if(os===null){ke===null&&(ke=qe);break}s&&ke&&os.alternate===null&&l(J,ke),Y=N(os,Y,Ie),Ge===null?Oe=os:Ge.sibling=os,Ge=os,ke=qe}if(Je.done)return d(J,ke),He&&Qr(J,Ie),Oe;if(ke===null){for(;!Je.done;Ie++,Je=W.next())Je=me(J,Je.value,de),Je!==null&&(Y=N(Je,Y,Ie),Ge===null?Oe=Je:Ge.sibling=Je,Ge=Je);return He&&Qr(J,Ie),Oe}for(ke=f(ke);!Je.done;Ie++,Je=W.next())Je=re(ke,J,Ie,Je.value,de),Je!==null&&(s&&Je.alternate!==null&&ke.delete(Je.key===null?Ie:Je.key),Y=N(Je,Y,Ie),Ge===null?Oe=Je:Ge.sibling=Je,Ge=Je);return s&&ke.forEach(function(bT){return l(J,bT)}),He&&Qr(J,Ie),Oe}function st(J,Y,W,de){if(typeof W=="object"&&W!==null&&W.type===A&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case v:e:{for(var Oe=W.key;Y!==null;){if(Y.key===Oe){if(Oe=W.type,Oe===A){if(Y.tag===7){d(J,Y.sibling),de=y(Y,W.props.children),de.return=J,J=de;break e}}else if(Y.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===T&&zs(Oe)===Y.type){d(J,Y.sibling),de=y(Y,W.props),eo(de,W),de.return=J,J=de;break e}d(J,Y);break}else l(J,Y);Y=Y.sibling}W.type===A?(de=Ts(W.props.children,J.mode,de,W.key),de.return=J,J=de):(de=Gc(W.type,W.key,W.props,null,J.mode,de),eo(de,W),de.return=J,J=de)}return E(J);case w:e:{for(Oe=W.key;Y!==null;){if(Y.key===Oe)if(Y.tag===4&&Y.stateNode.containerInfo===W.containerInfo&&Y.stateNode.implementation===W.implementation){d(J,Y.sibling),de=y(Y,W.children||[]),de.return=J,J=de;break e}else{d(J,Y);break}else l(J,Y);Y=Y.sibling}de=Uf(W,J.mode,de),de.return=J,J=de}return E(J);case T:return W=zs(W),st(J,Y,W,de)}if(ie(W))return Ae(J,Y,W,de);if(Z(W)){if(Oe=Z(W),typeof Oe!="function")throw Error(n(150));return W=Oe.call(W),Re(J,Y,W,de)}if(typeof W.then=="function")return st(J,Y,td(W),de);if(W.$$typeof===k)return st(J,Y,Xc(J,W),de);ad(J,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,Y!==null&&Y.tag===6?(d(J,Y.sibling),de=y(Y,W),de.return=J,J=de):(d(J,Y),de=$f(W,J.mode,de),de.return=J,J=de),E(J)):d(J,Y)}return function(J,Y,W,de){try{Qi=0;var Oe=st(J,Y,W,de);return Ml=null,Oe}catch(ke){if(ke===_l||ke===Qc)throw ke;var Ge=Ba(29,ke,null,J.mode);return Ge.lanes=de,Ge.return=J,Ge}finally{}}}var Bs=Sv(!0),Av=Sv(!1),Vn=!1;function ep(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tp(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Yn(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Kn(s,l,d){var f=s.updateQueue;if(f===null)return null;if(f=f.shared,(Ze&2)!==0){var y=f.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),f.pending=l,l=Kc(s),ov(s,null,d),l}return Yc(s,f,l,d),Kc(s)}function to(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var f=l.lanes;f&=s.pendingLanes,d|=f,l.lanes=d,xy(s,d)}}function ap(s,l){var d=s.updateQueue,f=s.alternate;if(f!==null&&(f=f.updateQueue,d===f)){var y=null,N=null;if(d=d.firstBaseUpdate,d!==null){do{var E={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};N===null?y=N=E:N=N.next=E,d=d.next}while(d!==null);N===null?y=N=l:N=N.next=l}else y=N=l;d={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:N,shared:f.shared,callbacks:f.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var rp=!1;function ao(){if(rp){var s=Pl;if(s!==null)throw s}}function ro(s,l,d,f){rp=!1;var y=s.updateQueue;Vn=!1;var N=y.firstBaseUpdate,E=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var q=M,X=q.next;q.next=null,E===null?N=X:E.next=X,E=q;var oe=s.alternate;oe!==null&&(oe=oe.updateQueue,M=oe.lastBaseUpdate,M!==E&&(M===null?oe.firstBaseUpdate=X:M.next=X,oe.lastBaseUpdate=q))}if(N!==null){var me=y.baseState;E=0,oe=X=q=null,M=N;do{var Q=M.lane&-536870913,re=Q!==M.lane;if(re?(Ue&Q)===Q:(f&Q)===Q){Q!==0&&Q===Rl&&(rp=!0),oe!==null&&(oe=oe.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Ae=s,Re=M;Q=l;var st=d;switch(Re.tag){case 1:if(Ae=Re.payload,typeof Ae=="function"){me=Ae.call(st,me,Q);break e}me=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Re.payload,Q=typeof Ae=="function"?Ae.call(st,me,Q):Ae,Q==null)break e;me=x({},me,Q);break e;case 2:Vn=!0}}Q=M.callback,Q!==null&&(s.flags|=64,re&&(s.flags|=8192),re=y.callbacks,re===null?y.callbacks=[Q]:re.push(Q))}else re={lane:Q,tag:M.tag,payload:M.payload,callback:M.callback,next:null},oe===null?(X=oe=re,q=me):oe=oe.next=re,E|=Q;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;re=M,M=re.next,re.next=null,y.lastBaseUpdate=re,y.shared.pending=null}}while(!0);oe===null&&(q=me),y.baseState=q,y.firstBaseUpdate=X,y.lastBaseUpdate=oe,N===null&&(y.shared.lanes=0),Zn|=E,s.lanes=E,s.memoizedState=me}}function Cv(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function kv(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)Cv(d[s],l)}var zl=P(null),rd=P(0);function Ev(s,l){s=un,ee(rd,s),ee(zl,l),un=s|l.baseLanes}function np(){ee(rd,un),ee(zl,zl.current)}function sp(){un=rd.current,H(zl),H(rd)}var Ia=P(null),lr=null;function Gn(s){var l=s.alternate;ee(Ct,Ct.current&1),ee(Ia,s),lr===null&&(l===null||zl.current!==null||l.memoizedState!==null)&&(lr=s)}function lp(s){ee(Ct,Ct.current),ee(Ia,s),lr===null&&(lr=s)}function Ov(s){s.tag===22?(ee(Ct,Ct.current),ee(Ia,s),lr===null&&(lr=s)):Jn()}function Jn(){ee(Ct,Ct.current),ee(Ia,Ia.current)}function Fa(s){H(Ia),lr===s&&(lr=null),H(Ct)}var Ct=P(0);function nd(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||mh(d)||fh(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var an=0,Le=null,rt=null,Dt=null,sd=!1,Ll=!1,Is=!1,ld=0,no=0,Bl=null,oD=0;function wt(){throw Error(n(321))}function ip(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!La(s[d],l[d]))return!1;return!0}function op(s,l,d,f,y,N){return an=N,Le=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,V.H=s===null||s.memoizedState===null?mj:wp,Is=!1,N=d(f,y),Is=!1,Ll&&(N=Tv(l,d,f,y)),Dv(s),N}function Dv(s){V.H=io;var l=rt!==null&&rt.next!==null;if(an=0,Dt=rt=Le=null,sd=!1,no=0,Bl=null,l)throw Error(n(300));s===null||Tt||(s=s.dependencies,s!==null&&Wc(s)&&(Tt=!0))}function Tv(s,l,d,f){Le=s;var y=0;do{if(Ll&&(Bl=null),no=0,Ll=!1,25<=y)throw Error(n(301));if(y+=1,Dt=rt=null,s.updateQueue!=null){var N=s.updateQueue;N.lastEffect=null,N.events=null,N.stores=null,N.memoCache!=null&&(N.memoCache.index=0)}V.H=fj,N=l(d,f)}while(Ll);return N}function cD(){var s=V.H,l=s.useState()[0];return l=typeof l.then=="function"?so(l):l,s=s.useState()[0],(rt!==null?rt.memoizedState:null)!==s&&(Le.flags|=1024),l}function cp(){var s=ld!==0;return ld=0,s}function dp(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function up(s){if(sd){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}sd=!1}an=0,Dt=rt=Le=null,Ll=!1,no=ld=0,Bl=null}function ha(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?Le.memoizedState=Dt=s:Dt=Dt.next=s,Dt}function kt(){if(rt===null){var s=Le.alternate;s=s!==null?s.memoizedState:null}else s=rt.next;var l=Dt===null?Le.memoizedState:Dt.next;if(l!==null)Dt=l,rt=s;else{if(s===null)throw Le.alternate===null?Error(n(467)):Error(n(310));rt=s,s={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Dt===null?Le.memoizedState=Dt=s:Dt=Dt.next=s}return Dt}function id(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function so(s){var l=no;return no+=1,Bl===null&&(Bl=[]),s=jv(Bl,s,l),l=Le,(Dt===null?l.memoizedState:Dt.next)===null&&(l=l.alternate,V.H=l===null||l.memoizedState===null?mj:wp),s}function od(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return so(s);if(s.$$typeof===k)return ra(s)}throw Error(n(438,String(s)))}function mp(s){var l=null,d=Le.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var f=Le.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(l={data:f.data.map(function(y){return y.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=id(),Le.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),f=0;f<s;f++)d[f]=z;return l.index++,d}function rn(s,l){return typeof l=="function"?l(s):l}function cd(s){var l=kt();return fp(l,rt,s)}function fp(s,l,d){var f=s.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=d;var y=s.baseQueue,N=f.pending;if(N!==null){if(y!==null){var E=y.next;y.next=N.next,N.next=E}l.baseQueue=y=N,f.pending=null}if(N=s.baseState,y===null)s.memoizedState=N;else{l=y.next;var M=E=null,q=null,X=l,oe=!1;do{var me=X.lane&-536870913;if(me!==X.lane?(Ue&me)===me:(an&me)===me){var Q=X.revertLane;if(Q===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),me===Rl&&(oe=!0);else if((an&Q)===Q){X=X.next,Q===Rl&&(oe=!0);continue}else me={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},q===null?(M=q=me,E=N):q=q.next=me,Le.lanes|=Q,Zn|=Q;me=X.action,Is&&d(N,me),N=X.hasEagerState?X.eagerState:d(N,me)}else Q={lane:me,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},q===null?(M=q=Q,E=N):q=q.next=Q,Le.lanes|=me,Zn|=me;X=X.next}while(X!==null&&X!==l);if(q===null?E=N:q.next=M,!La(N,s.memoizedState)&&(Tt=!0,oe&&(d=Pl,d!==null)))throw d;s.memoizedState=N,s.baseState=E,s.baseQueue=q,f.lastRenderedState=N}return y===null&&(f.lanes=0),[s.memoizedState,f.dispatch]}function pp(s){var l=kt(),d=l.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=s;var f=d.dispatch,y=d.pending,N=l.memoizedState;if(y!==null){d.pending=null;var E=y=y.next;do N=s(N,E.action),E=E.next;while(E!==y);La(N,l.memoizedState)||(Tt=!0),l.memoizedState=N,l.baseQueue===null&&(l.baseState=N),d.lastRenderedState=N}return[N,f]}function Rv(s,l,d){var f=Le,y=kt(),N=He;if(N){if(d===void 0)throw Error(n(407));d=d()}else d=l();var E=!La((rt||y).memoizedState,d);if(E&&(y.memoizedState=d,Tt=!0),y=y.queue,gp(Mv.bind(null,f,y,s),[s]),y.getSnapshot!==l||E||Dt!==null&&Dt.memoizedState.tag&1){if(f.flags|=2048,Il(9,{destroy:void 0},_v.bind(null,f,y,d,l),null),it===null)throw Error(n(349));N||(an&127)!==0||Pv(f,l,d)}return d}function Pv(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=Le.updateQueue,l===null?(l=id(),Le.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function _v(s,l,d,f){l.value=d,l.getSnapshot=f,zv(l)&&Lv(s)}function Mv(s,l,d){return d(function(){zv(l)&&Lv(s)})}function zv(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!La(s,d)}catch{return!0}}function Lv(s){var l=Ds(s,2);l!==null&&Da(l,s,2)}function hp(s){var l=ha();if(typeof s=="function"){var d=s;if(s=d(),Is){Za(!0);try{d()}finally{Za(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:s},l}function Bv(s,l,d,f){return s.baseState=d,fp(s,rt,typeof f=="function"?f:rn)}function dD(s,l,d,f,y){if(md(s))throw Error(n(485));if(s=l.action,s!==null){var N={payload:y,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){N.listeners.push(E)}};V.T!==null?d(!0):N.isTransition=!1,f(N),d=l.pending,d===null?(N.next=l.pending=N,Iv(l,N)):(N.next=d.next,l.pending=d.next=N)}}function Iv(s,l){var d=l.action,f=l.payload,y=s.state;if(l.isTransition){var N=V.T,E={};V.T=E;try{var M=d(y,f),q=V.S;q!==null&&q(E,M),Fv(s,l,M)}catch(X){xp(s,l,X)}finally{N!==null&&E.types!==null&&(N.types=E.types),V.T=N}}else try{N=d(y,f),Fv(s,l,N)}catch(X){xp(s,l,X)}}function Fv(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(f){$v(s,l,f)},function(f){return xp(s,l,f)}):$v(s,l,d)}function $v(s,l,d){l.status="fulfilled",l.value=d,Uv(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,Iv(s,d)))}function xp(s,l,d){var f=s.pending;if(s.pending=null,f!==null){f=f.next;do l.status="rejected",l.reason=d,Uv(l),l=l.next;while(l!==f)}s.action=null}function Uv(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function qv(s,l){return l}function Hv(s,l){if(He){var d=it.formState;if(d!==null){e:{var f=Le;if(He){if(ft){t:{for(var y=ft,N=sr;y.nodeType!==8;){if(!N){y=null;break t}if(y=ir(y.nextSibling),y===null){y=null;break t}}N=y.data,y=N==="F!"||N==="F"?y:null}if(y){ft=ir(y.nextSibling),f=y.data==="F!";break e}}qn(f)}f=!1}f&&(l=d[0])}}return d=ha(),d.memoizedState=d.baseState=l,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qv,lastRenderedState:l},d.queue=f,d=cj.bind(null,Le,f),f.dispatch=d,f=hp(!1),N=Np.bind(null,Le,!1,f.queue),f=ha(),y={state:l,dispatch:null,action:s,pending:null},f.queue=y,d=dD.bind(null,Le,y,N,d),y.dispatch=d,f.memoizedState=s,[l,d,!1]}function Vv(s){var l=kt();return Yv(l,rt,s)}function Yv(s,l,d){if(l=fp(s,l,qv)[0],s=cd(rn)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var f=so(l)}catch(E){throw E===_l?Qc:E}else f=l;l=kt();var y=l.queue,N=y.dispatch;return d!==l.memoizedState&&(Le.flags|=2048,Il(9,{destroy:void 0},uD.bind(null,y,d),null)),[f,N,s]}function uD(s,l){s.action=l}function Kv(s){var l=kt(),d=rt;if(d!==null)return Yv(l,d,s);kt(),l=l.memoizedState,d=kt();var f=d.queue.dispatch;return d.memoizedState=s,[l,f,!1]}function Il(s,l,d,f){return s={tag:s,create:d,deps:f,inst:l,next:null},l=Le.updateQueue,l===null&&(l=id(),Le.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(f=d.next,d.next=s,s.next=f,l.lastEffect=s),s}function Gv(){return kt().memoizedState}function dd(s,l,d,f){var y=ha();Le.flags|=s,y.memoizedState=Il(1|l,{destroy:void 0},d,f===void 0?null:f)}function ud(s,l,d,f){var y=kt();f=f===void 0?null:f;var N=y.memoizedState.inst;rt!==null&&f!==null&&ip(f,rt.memoizedState.deps)?y.memoizedState=Il(l,N,d,f):(Le.flags|=s,y.memoizedState=Il(1|l,N,d,f))}function Jv(s,l){dd(8390656,8,s,l)}function gp(s,l){ud(2048,8,s,l)}function mD(s){Le.flags|=4;var l=Le.updateQueue;if(l===null)l=id(),Le.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function Wv(s){var l=kt().memoizedState;return mD({ref:l,nextImpl:s}),function(){if((Ze&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function Xv(s,l){return ud(4,2,s,l)}function Zv(s,l){return ud(4,4,s,l)}function Qv(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function ej(s,l,d){d=d!=null?d.concat([s]):null,ud(4,4,Qv.bind(null,l,s),d)}function bp(){}function tj(s,l){var d=kt();l=l===void 0?null:l;var f=d.memoizedState;return l!==null&&ip(l,f[1])?f[0]:(d.memoizedState=[s,l],s)}function aj(s,l){var d=kt();l=l===void 0?null:l;var f=d.memoizedState;if(l!==null&&ip(l,f[1]))return f[0];if(f=s(),Is){Za(!0);try{s()}finally{Za(!1)}}return d.memoizedState=[f,l],f}function yp(s,l,d){return d===void 0||(an&1073741824)!==0&&(Ue&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=rN(),Le.lanes|=s,Zn|=s,d)}function rj(s,l,d,f){return La(d,l)?d:zl.current!==null?(s=yp(s,d,f),La(s,l)||(Tt=!0),s):(an&42)===0||(an&1073741824)!==0&&(Ue&261930)===0?(Tt=!0,s.memoizedState=d):(s=rN(),Le.lanes|=s,Zn|=s,l)}function nj(s,l,d,f,y){var N=K.p;K.p=N!==0&&8>N?N:8;var E=V.T,M={};V.T=M,Np(s,!1,l,d);try{var q=y(),X=V.S;if(X!==null&&X(M,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var oe=iD(q,f);lo(s,l,oe,qa(s))}else lo(s,l,f,qa(s))}catch(me){lo(s,l,{then:function(){},status:"rejected",reason:me},qa())}finally{K.p=N,E!==null&&M.types!==null&&(E.types=M.types),V.T=E}}function fD(){}function vp(s,l,d,f){if(s.tag!==5)throw Error(n(476));var y=sj(s).queue;nj(s,y,l,ce,d===null?fD:function(){return lj(s),d(f)})}function sj(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:ce},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function lj(s){var l=sj(s);l.next===null&&(l=s.alternate.memoizedState),lo(s,l.next.queue,{},qa())}function jp(){return ra(So)}function ij(){return kt().memoizedState}function oj(){return kt().memoizedState}function pD(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=qa();s=Yn(d);var f=Kn(l,s,d);f!==null&&(Da(f,l,d),to(f,l,d)),l={cache:Wf()},s.payload=l;return}l=l.return}}function hD(s,l,d){var f=qa();d={lane:f,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},md(s)?dj(l,d):(d=If(s,l,d,f),d!==null&&(Da(d,s,f),uj(d,l,f)))}function cj(s,l,d){var f=qa();lo(s,l,d,f)}function lo(s,l,d,f){var y={lane:f,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(md(s))dj(l,y);else{var N=s.alternate;if(s.lanes===0&&(N===null||N.lanes===0)&&(N=l.lastRenderedReducer,N!==null))try{var E=l.lastRenderedState,M=N(E,d);if(y.hasEagerState=!0,y.eagerState=M,La(M,E))return Yc(s,l,y,0),it===null&&Vc(),!1}catch{}finally{}if(d=If(s,l,y,f),d!==null)return Da(d,s,f),uj(d,l,f),!0}return!1}function Np(s,l,d,f){if(f={lane:2,revertLane:eh(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},md(s)){if(l)throw Error(n(479))}else l=If(s,d,f,2),l!==null&&Da(l,s,2)}function md(s){var l=s.alternate;return s===Le||l!==null&&l===Le}function dj(s,l){Ll=sd=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function uj(s,l,d){if((d&4194048)!==0){var f=l.lanes;f&=s.pendingLanes,d|=f,l.lanes=d,xy(s,d)}}var io={readContext:ra,use:od,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};io.useEffectEvent=wt;var mj={readContext:ra,use:od,useCallback:function(s,l){return ha().memoizedState=[s,l===void 0?null:l],s},useContext:ra,useEffect:Jv,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,dd(4194308,4,Qv.bind(null,l,s),d)},useLayoutEffect:function(s,l){return dd(4194308,4,s,l)},useInsertionEffect:function(s,l){dd(4,2,s,l)},useMemo:function(s,l){var d=ha();l=l===void 0?null:l;var f=s();if(Is){Za(!0);try{s()}finally{Za(!1)}}return d.memoizedState=[f,l],f},useReducer:function(s,l,d){var f=ha();if(d!==void 0){var y=d(l);if(Is){Za(!0);try{d(l)}finally{Za(!1)}}}else y=l;return f.memoizedState=f.baseState=y,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:y},f.queue=s,s=s.dispatch=hD.bind(null,Le,s),[f.memoizedState,s]},useRef:function(s){var l=ha();return s={current:s},l.memoizedState=s},useState:function(s){s=hp(s);var l=s.queue,d=cj.bind(null,Le,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:bp,useDeferredValue:function(s,l){var d=ha();return yp(d,s,l)},useTransition:function(){var s=hp(!1);return s=nj.bind(null,Le,s.queue,!0,!1),ha().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var f=Le,y=ha();if(He){if(d===void 0)throw Error(n(407));d=d()}else{if(d=l(),it===null)throw Error(n(349));(Ue&127)!==0||Pv(f,l,d)}y.memoizedState=d;var N={value:d,getSnapshot:l};return y.queue=N,Jv(Mv.bind(null,f,N,s),[s]),f.flags|=2048,Il(9,{destroy:void 0},_v.bind(null,f,N,d,l),null),d},useId:function(){var s=ha(),l=it.identifierPrefix;if(He){var d=Mr,f=_r;d=(f&~(1<<32-ea(f)-1)).toString(32)+d,l="_"+l+"R_"+d,d=ld++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=oD++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:jp,useFormState:Hv,useActionState:Hv,useOptimistic:function(s){var l=ha();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=Np.bind(null,Le,!0,d),d.dispatch=l,[s,l]},useMemoCache:mp,useCacheRefresh:function(){return ha().memoizedState=pD.bind(null,Le)},useEffectEvent:function(s){var l=ha(),d={impl:s};return l.memoizedState=d,function(){if((Ze&2)!==0)throw Error(n(440));return d.impl.apply(void 0,arguments)}}},wp={readContext:ra,use:od,useCallback:tj,useContext:ra,useEffect:gp,useImperativeHandle:ej,useInsertionEffect:Xv,useLayoutEffect:Zv,useMemo:aj,useReducer:cd,useRef:Gv,useState:function(){return cd(rn)},useDebugValue:bp,useDeferredValue:function(s,l){var d=kt();return rj(d,rt.memoizedState,s,l)},useTransition:function(){var s=cd(rn)[0],l=kt().memoizedState;return[typeof s=="boolean"?s:so(s),l]},useSyncExternalStore:Rv,useId:ij,useHostTransitionStatus:jp,useFormState:Vv,useActionState:Vv,useOptimistic:function(s,l){var d=kt();return Bv(d,rt,s,l)},useMemoCache:mp,useCacheRefresh:oj};wp.useEffectEvent=Wv;var fj={readContext:ra,use:od,useCallback:tj,useContext:ra,useEffect:gp,useImperativeHandle:ej,useInsertionEffect:Xv,useLayoutEffect:Zv,useMemo:aj,useReducer:pp,useRef:Gv,useState:function(){return pp(rn)},useDebugValue:bp,useDeferredValue:function(s,l){var d=kt();return rt===null?yp(d,s,l):rj(d,rt.memoizedState,s,l)},useTransition:function(){var s=pp(rn)[0],l=kt().memoizedState;return[typeof s=="boolean"?s:so(s),l]},useSyncExternalStore:Rv,useId:ij,useHostTransitionStatus:jp,useFormState:Kv,useActionState:Kv,useOptimistic:function(s,l){var d=kt();return rt!==null?Bv(d,rt,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:mp,useCacheRefresh:oj};fj.useEffectEvent=Wv;function Sp(s,l,d,f){l=s.memoizedState,d=d(f,l),d=d==null?l:x({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var Ap={enqueueSetState:function(s,l,d){s=s._reactInternals;var f=qa(),y=Yn(f);y.payload=l,d!=null&&(y.callback=d),l=Kn(s,y,f),l!==null&&(Da(l,s,f),to(l,s,f))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var f=qa(),y=Yn(f);y.tag=1,y.payload=l,d!=null&&(y.callback=d),l=Kn(s,y,f),l!==null&&(Da(l,s,f),to(l,s,f))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=qa(),f=Yn(d);f.tag=2,l!=null&&(f.callback=l),l=Kn(s,f,d),l!==null&&(Da(l,s,d),to(l,s,d))}};function pj(s,l,d,f,y,N,E){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(f,N,E):l.prototype&&l.prototype.isPureReactComponent?!Ki(d,f)||!Ki(y,N):!0}function hj(s,l,d,f){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,f),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,f),l.state!==s&&Ap.enqueueReplaceState(l,l.state,null)}function Fs(s,l){var d=l;if("ref"in l){d={};for(var f in l)f!=="ref"&&(d[f]=l[f])}if(s=s.defaultProps){d===l&&(d=x({},d));for(var y in s)d[y]===void 0&&(d[y]=s[y])}return d}function xj(s){Hc(s)}function gj(s){console.error(s)}function bj(s){Hc(s)}function fd(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(f){setTimeout(function(){throw f})}}function yj(s,l,d){try{var f=s.onCaughtError;f(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Cp(s,l,d){return d=Yn(d),d.tag=3,d.payload={element:null},d.callback=function(){fd(s,l)},d}function vj(s){return s=Yn(s),s.tag=3,s}function jj(s,l,d,f){var y=d.type.getDerivedStateFromError;if(typeof y=="function"){var N=f.value;s.payload=function(){return y(N)},s.callback=function(){yj(l,d,f)}}var E=d.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(s.callback=function(){yj(l,d,f),typeof y!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var M=f.stack;this.componentDidCatch(f.value,{componentStack:M!==null?M:""})})}function xD(s,l,d,f,y){if(d.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(l=d.alternate,l!==null&&Tl(l,d,y,!0),d=Ia.current,d!==null){switch(d.tag){case 31:case 13:return lr===null?Ad():d.alternate===null&&St===0&&(St=3),d.flags&=-257,d.flags|=65536,d.lanes=y,f===ed?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([f]):l.add(f),Xp(s,f,y)),!1;case 22:return d.flags|=65536,f===ed?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([f])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([f]):d.add(f)),Xp(s,f,y)),!1}throw Error(n(435,d.tag))}return Xp(s,f,y),Ad(),!1}if(He)return l=Ia.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=y,f!==Vf&&(s=Error(n(422),{cause:f}),Wi(ar(s,d)))):(f!==Vf&&(l=Error(n(423),{cause:f}),Wi(ar(l,d))),s=s.current.alternate,s.flags|=65536,y&=-y,s.lanes|=y,f=ar(f,d),y=Cp(s.stateNode,f,y),ap(s,y),St!==4&&(St=2)),!1;var N=Error(n(520),{cause:f});if(N=ar(N,d),xo===null?xo=[N]:xo.push(N),St!==4&&(St=2),l===null)return!0;f=ar(f,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=y&-y,d.lanes|=s,s=Cp(d.stateNode,f,s),ap(d,s),!1;case 1:if(l=d.type,N=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Qn===null||!Qn.has(N))))return d.flags|=65536,y&=-y,d.lanes|=y,y=vj(y),jj(y,s,d,f),ap(d,y),!1}d=d.return}while(d!==null);return!1}var kp=Error(n(461)),Tt=!1;function na(s,l,d,f){l.child=s===null?Av(l,null,d,f):Bs(l,s.child,d,f)}function Nj(s,l,d,f,y){d=d.render;var N=l.ref;if("ref"in f){var E={};for(var M in f)M!=="ref"&&(E[M]=f[M])}else E=f;return _s(l),f=op(s,l,d,E,N,y),M=cp(),s!==null&&!Tt?(dp(s,l,y),nn(s,l,y)):(He&&M&&qf(l),l.flags|=1,na(s,l,f,y),l.child)}function wj(s,l,d,f,y){if(s===null){var N=d.type;return typeof N=="function"&&!Ff(N)&&N.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=N,Sj(s,l,N,f,y)):(s=Gc(d.type,null,f,l,l.mode,y),s.ref=l.ref,s.return=l,l.child=s)}if(N=s.child,!Mp(s,y)){var E=N.memoizedProps;if(d=d.compare,d=d!==null?d:Ki,d(E,f)&&s.ref===l.ref)return nn(s,l,y)}return l.flags|=1,s=Zr(N,f),s.ref=l.ref,s.return=l,l.child=s}function Sj(s,l,d,f,y){if(s!==null){var N=s.memoizedProps;if(Ki(N,f)&&s.ref===l.ref)if(Tt=!1,l.pendingProps=f=N,Mp(s,y))(s.flags&131072)!==0&&(Tt=!0);else return l.lanes=s.lanes,nn(s,l,y)}return Ep(s,l,d,f,y)}function Aj(s,l,d,f){var y=f.children,N=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((l.flags&128)!==0){if(N=N!==null?N.baseLanes|d:d,s!==null){for(f=l.child=s.child,y=0;f!==null;)y=y|f.lanes|f.childLanes,f=f.sibling;f=y&~N}else f=0,l.child=null;return Cj(s,l,N,d,f)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&Zc(l,N!==null?N.cachePool:null),N!==null?Ev(l,N):np(),Ov(l);else return f=l.lanes=536870912,Cj(s,l,N!==null?N.baseLanes|d:d,d,f)}else N!==null?(Zc(l,N.cachePool),Ev(l,N),Jn(),l.memoizedState=null):(s!==null&&Zc(l,null),np(),Jn());return na(s,l,y,d),l.child}function oo(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Cj(s,l,d,f,y){var N=Zf();return N=N===null?null:{parent:Ot._currentValue,pool:N},l.memoizedState={baseLanes:d,cachePool:N},s!==null&&Zc(l,null),np(),Ov(l),s!==null&&Tl(s,l,f,!0),l.childLanes=y,null}function pd(s,l){return l=xd({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function kj(s,l,d){return Bs(l,s.child,null,d),s=pd(l,l.pendingProps),s.flags|=2,Fa(l),l.memoizedState=null,s}function gD(s,l,d){var f=l.pendingProps,y=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(He){if(f.mode==="hidden")return s=pd(l,f),l.lanes=536870912,oo(null,s);if(lp(l),(s=ft)?(s=IN(s,sr),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:$n!==null?{id:_r,overflow:Mr}:null,retryLane:536870912,hydrationErrors:null},d=dv(s),d.return=l,l.child=d,aa=l,ft=null)):s=null,s===null)throw qn(l);return l.lanes=536870912,null}return pd(l,f)}var N=s.memoizedState;if(N!==null){var E=N.dehydrated;if(lp(l),y)if(l.flags&256)l.flags&=-257,l=kj(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(Tt||Tl(s,l,d,!1),y=(d&s.childLanes)!==0,Tt||y){if(f=it,f!==null&&(E=gy(f,d),E!==0&&E!==N.retryLane))throw N.retryLane=E,Ds(s,E),Da(f,s,E),kp;Ad(),l=kj(s,l,d)}else s=N.treeContext,ft=ir(E.nextSibling),aa=l,He=!0,Un=null,sr=!1,s!==null&&fv(l,s),l=pd(l,f),l.flags|=4096;return l}return s=Zr(s.child,{mode:f.mode,children:f.children}),s.ref=l.ref,l.child=s,s.return=l,s}function hd(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(n(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function Ep(s,l,d,f,y){return _s(l),d=op(s,l,d,f,void 0,y),f=cp(),s!==null&&!Tt?(dp(s,l,y),nn(s,l,y)):(He&&f&&qf(l),l.flags|=1,na(s,l,d,y),l.child)}function Ej(s,l,d,f,y,N){return _s(l),l.updateQueue=null,d=Tv(l,f,d,y),Dv(s),f=cp(),s!==null&&!Tt?(dp(s,l,N),nn(s,l,N)):(He&&f&&qf(l),l.flags|=1,na(s,l,d,N),l.child)}function Oj(s,l,d,f,y){if(_s(l),l.stateNode===null){var N=kl,E=d.contextType;typeof E=="object"&&E!==null&&(N=ra(E)),N=new d(f,N),l.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,N.updater=Ap,l.stateNode=N,N._reactInternals=l,N=l.stateNode,N.props=f,N.state=l.memoizedState,N.refs={},ep(l),E=d.contextType,N.context=typeof E=="object"&&E!==null?ra(E):kl,N.state=l.memoizedState,E=d.getDerivedStateFromProps,typeof E=="function"&&(Sp(l,d,E,f),N.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(E=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),E!==N.state&&Ap.enqueueReplaceState(N,N.state,null),ro(l,f,N,y),ao(),N.state=l.memoizedState),typeof N.componentDidMount=="function"&&(l.flags|=4194308),f=!0}else if(s===null){N=l.stateNode;var M=l.memoizedProps,q=Fs(d,M);N.props=q;var X=N.context,oe=d.contextType;E=kl,typeof oe=="object"&&oe!==null&&(E=ra(oe));var me=d.getDerivedStateFromProps;oe=typeof me=="function"||typeof N.getSnapshotBeforeUpdate=="function",M=l.pendingProps!==M,oe||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(M||X!==E)&&hj(l,N,f,E),Vn=!1;var Q=l.memoizedState;N.state=Q,ro(l,f,N,y),ao(),X=l.memoizedState,M||Q!==X||Vn?(typeof me=="function"&&(Sp(l,d,me,f),X=l.memoizedState),(q=Vn||pj(l,d,q,f,Q,X,E))?(oe||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(l.flags|=4194308)):(typeof N.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=f,l.memoizedState=X),N.props=f,N.state=X,N.context=E,f=q):(typeof N.componentDidMount=="function"&&(l.flags|=4194308),f=!1)}else{N=l.stateNode,tp(s,l),E=l.memoizedProps,oe=Fs(d,E),N.props=oe,me=l.pendingProps,Q=N.context,X=d.contextType,q=kl,typeof X=="object"&&X!==null&&(q=ra(X)),M=d.getDerivedStateFromProps,(X=typeof M=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(E!==me||Q!==q)&&hj(l,N,f,q),Vn=!1,Q=l.memoizedState,N.state=Q,ro(l,f,N,y),ao();var re=l.memoizedState;E!==me||Q!==re||Vn||s!==null&&s.dependencies!==null&&Wc(s.dependencies)?(typeof M=="function"&&(Sp(l,d,M,f),re=l.memoizedState),(oe=Vn||pj(l,d,oe,f,Q,re,q)||s!==null&&s.dependencies!==null&&Wc(s.dependencies))?(X||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(f,re,q),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(f,re,q)),typeof N.componentDidUpdate=="function"&&(l.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof N.componentDidUpdate!="function"||E===s.memoizedProps&&Q===s.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||E===s.memoizedProps&&Q===s.memoizedState||(l.flags|=1024),l.memoizedProps=f,l.memoizedState=re),N.props=f,N.state=re,N.context=q,f=oe):(typeof N.componentDidUpdate!="function"||E===s.memoizedProps&&Q===s.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||E===s.memoizedProps&&Q===s.memoizedState||(l.flags|=1024),f=!1)}return N=f,hd(s,l),f=(l.flags&128)!==0,N||f?(N=l.stateNode,d=f&&typeof d.getDerivedStateFromError!="function"?null:N.render(),l.flags|=1,s!==null&&f?(l.child=Bs(l,s.child,null,y),l.child=Bs(l,null,d,y)):na(s,l,d,y),l.memoizedState=N.state,s=l.child):s=nn(s,l,y),s}function Dj(s,l,d,f){return Rs(),l.flags|=256,na(s,l,d,f),l.child}var Op={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dp(s){return{baseLanes:s,cachePool:yv()}}function Tp(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=Ua),s}function Tj(s,l,d){var f=l.pendingProps,y=!1,N=(l.flags&128)!==0,E;if((E=N)||(E=s!==null&&s.memoizedState===null?!1:(Ct.current&2)!==0),E&&(y=!0,l.flags&=-129),E=(l.flags&32)!==0,l.flags&=-33,s===null){if(He){if(y?Gn(l):Jn(),(s=ft)?(s=IN(s,sr),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:$n!==null?{id:_r,overflow:Mr}:null,retryLane:536870912,hydrationErrors:null},d=dv(s),d.return=l,l.child=d,aa=l,ft=null)):s=null,s===null)throw qn(l);return fh(s)?l.lanes=32:l.lanes=536870912,null}var M=f.children;return f=f.fallback,y?(Jn(),y=l.mode,M=xd({mode:"hidden",children:M},y),f=Ts(f,y,d,null),M.return=l,f.return=l,M.sibling=f,l.child=M,f=l.child,f.memoizedState=Dp(d),f.childLanes=Tp(s,E,d),l.memoizedState=Op,oo(null,f)):(Gn(l),Rp(l,M))}var q=s.memoizedState;if(q!==null&&(M=q.dehydrated,M!==null)){if(N)l.flags&256?(Gn(l),l.flags&=-257,l=Pp(s,l,d)):l.memoizedState!==null?(Jn(),l.child=s.child,l.flags|=128,l=null):(Jn(),M=f.fallback,y=l.mode,f=xd({mode:"visible",children:f.children},y),M=Ts(M,y,d,null),M.flags|=2,f.return=l,M.return=l,f.sibling=M,l.child=f,Bs(l,s.child,null,d),f=l.child,f.memoizedState=Dp(d),f.childLanes=Tp(s,E,d),l.memoizedState=Op,l=oo(null,f));else if(Gn(l),fh(M)){if(E=M.nextSibling&&M.nextSibling.dataset,E)var X=E.dgst;E=X,f=Error(n(419)),f.stack="",f.digest=E,Wi({value:f,source:null,stack:null}),l=Pp(s,l,d)}else if(Tt||Tl(s,l,d,!1),E=(d&s.childLanes)!==0,Tt||E){if(E=it,E!==null&&(f=gy(E,d),f!==0&&f!==q.retryLane))throw q.retryLane=f,Ds(s,f),Da(E,s,f),kp;mh(M)||Ad(),l=Pp(s,l,d)}else mh(M)?(l.flags|=192,l.child=s.child,l=null):(s=q.treeContext,ft=ir(M.nextSibling),aa=l,He=!0,Un=null,sr=!1,s!==null&&fv(l,s),l=Rp(l,f.children),l.flags|=4096);return l}return y?(Jn(),M=f.fallback,y=l.mode,q=s.child,X=q.sibling,f=Zr(q,{mode:"hidden",children:f.children}),f.subtreeFlags=q.subtreeFlags&65011712,X!==null?M=Zr(X,M):(M=Ts(M,y,d,null),M.flags|=2),M.return=l,f.return=l,f.sibling=M,l.child=f,oo(null,f),f=l.child,M=s.child.memoizedState,M===null?M=Dp(d):(y=M.cachePool,y!==null?(q=Ot._currentValue,y=y.parent!==q?{parent:q,pool:q}:y):y=yv(),M={baseLanes:M.baseLanes|d,cachePool:y}),f.memoizedState=M,f.childLanes=Tp(s,E,d),l.memoizedState=Op,oo(s.child,f)):(Gn(l),d=s.child,s=d.sibling,d=Zr(d,{mode:"visible",children:f.children}),d.return=l,d.sibling=null,s!==null&&(E=l.deletions,E===null?(l.deletions=[s],l.flags|=16):E.push(s)),l.child=d,l.memoizedState=null,d)}function Rp(s,l){return l=xd({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function xd(s,l){return s=Ba(22,s,null,l),s.lanes=0,s}function Pp(s,l,d){return Bs(l,s.child,null,d),s=Rp(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function Rj(s,l,d){s.lanes|=l;var f=s.alternate;f!==null&&(f.lanes|=l),Gf(s.return,l,d)}function _p(s,l,d,f,y,N){var E=s.memoizedState;E===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:f,tail:d,tailMode:y,treeForkCount:N}:(E.isBackwards=l,E.rendering=null,E.renderingStartTime=0,E.last=f,E.tail=d,E.tailMode=y,E.treeForkCount=N)}function Pj(s,l,d){var f=l.pendingProps,y=f.revealOrder,N=f.tail;f=f.children;var E=Ct.current,M=(E&2)!==0;if(M?(E=E&1|2,l.flags|=128):E&=1,ee(Ct,E),na(s,l,f,d),f=He?Ji:0,!M&&s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Rj(s,d,l);else if(s.tag===19)Rj(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(y){case"forwards":for(d=l.child,y=null;d!==null;)s=d.alternate,s!==null&&nd(s)===null&&(y=d),d=d.sibling;d=y,d===null?(y=l.child,l.child=null):(y=d.sibling,d.sibling=null),_p(l,!1,y,d,N,f);break;case"backwards":case"unstable_legacy-backwards":for(d=null,y=l.child,l.child=null;y!==null;){if(s=y.alternate,s!==null&&nd(s)===null){l.child=y;break}s=y.sibling,y.sibling=d,d=y,y=s}_p(l,!0,d,null,N,f);break;case"together":_p(l,!1,null,null,void 0,f);break;default:l.memoizedState=null}return l.child}function nn(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),Zn|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(Tl(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,d=Zr(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=Zr(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function Mp(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&Wc(s)))}function bD(s,l,d){switch(l.tag){case 3:te(l,l.stateNode.containerInfo),Hn(l,Ot,s.memoizedState.cache),Rs();break;case 27:case 5:xe(l);break;case 4:te(l,l.stateNode.containerInfo);break;case 10:Hn(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,lp(l),null;break;case 13:var f=l.memoizedState;if(f!==null)return f.dehydrated!==null?(Gn(l),l.flags|=128,null):(d&l.child.childLanes)!==0?Tj(s,l,d):(Gn(l),s=nn(s,l,d),s!==null?s.sibling:null);Gn(l);break;case 19:var y=(s.flags&128)!==0;if(f=(d&l.childLanes)!==0,f||(Tl(s,l,d,!1),f=(d&l.childLanes)!==0),y){if(f)return Pj(s,l,d);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ee(Ct,Ct.current),f)break;return null;case 22:return l.lanes=0,Aj(s,l,d,l.pendingProps);case 24:Hn(l,Ot,s.memoizedState.cache)}return nn(s,l,d)}function _j(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)Tt=!0;else{if(!Mp(s,d)&&(l.flags&128)===0)return Tt=!1,bD(s,l,d);Tt=(s.flags&131072)!==0}else Tt=!1,He&&(l.flags&1048576)!==0&&mv(l,Ji,l.index);switch(l.lanes=0,l.tag){case 16:e:{var f=l.pendingProps;if(s=zs(l.elementType),l.type=s,typeof s=="function")Ff(s)?(f=Fs(s,f),l.tag=1,l=Oj(null,l,s,f,d)):(l.tag=0,l=Ep(null,l,s,f,d));else{if(s!=null){var y=s.$$typeof;if(y===O){l.tag=11,l=Nj(null,l,s,f,d);break e}else if(y===L){l.tag=14,l=wj(null,l,s,f,d);break e}}throw l=se(s)||s,Error(n(306,l,""))}}return l;case 0:return Ep(s,l,l.type,l.pendingProps,d);case 1:return f=l.type,y=Fs(f,l.pendingProps),Oj(s,l,f,y,d);case 3:e:{if(te(l,l.stateNode.containerInfo),s===null)throw Error(n(387));f=l.pendingProps;var N=l.memoizedState;y=N.element,tp(s,l),ro(l,f,null,d);var E=l.memoizedState;if(f=E.cache,Hn(l,Ot,f),f!==N.cache&&Jf(l,[Ot],d,!0),ao(),f=E.element,N.isDehydrated)if(N={element:f,isDehydrated:!1,cache:E.cache},l.updateQueue.baseState=N,l.memoizedState=N,l.flags&256){l=Dj(s,l,f,d);break e}else if(f!==y){y=ar(Error(n(424)),l),Wi(y),l=Dj(s,l,f,d);break e}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(ft=ir(s.firstChild),aa=l,He=!0,Un=null,sr=!0,d=Av(l,null,f,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Rs(),f===y){l=nn(s,l,d);break e}na(s,l,f,d)}l=l.child}return l;case 26:return hd(s,l),s===null?(d=VN(l.type,null,l.pendingProps,null))?l.memoizedState=d:He||(d=l.type,s=l.pendingProps,f=Rd(ue.current).createElement(d),f[ta]=l,f[Sa]=s,sa(f,d,s),qt(f),l.stateNode=f):l.memoizedState=VN(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return xe(l),s===null&&He&&(f=l.stateNode=UN(l.type,l.pendingProps,ue.current),aa=l,sr=!0,y=ft,rs(l.type)?(ph=y,ft=ir(f.firstChild)):ft=y),na(s,l,l.pendingProps.children,d),hd(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&He&&((y=f=ft)&&(f=GD(f,l.type,l.pendingProps,sr),f!==null?(l.stateNode=f,aa=l,ft=ir(f.firstChild),sr=!1,y=!0):y=!1),y||qn(l)),xe(l),y=l.type,N=l.pendingProps,E=s!==null?s.memoizedProps:null,f=N.children,ch(y,N)?f=null:E!==null&&ch(y,E)&&(l.flags|=32),l.memoizedState!==null&&(y=op(s,l,cD,null,null,d),So._currentValue=y),hd(s,l),na(s,l,f,d),l.child;case 6:return s===null&&He&&((s=d=ft)&&(d=JD(d,l.pendingProps,sr),d!==null?(l.stateNode=d,aa=l,ft=null,s=!0):s=!1),s||qn(l)),null;case 13:return Tj(s,l,d);case 4:return te(l,l.stateNode.containerInfo),f=l.pendingProps,s===null?l.child=Bs(l,null,f,d):na(s,l,f,d),l.child;case 11:return Nj(s,l,l.type,l.pendingProps,d);case 7:return na(s,l,l.pendingProps,d),l.child;case 8:return na(s,l,l.pendingProps.children,d),l.child;case 12:return na(s,l,l.pendingProps.children,d),l.child;case 10:return f=l.pendingProps,Hn(l,l.type,f.value),na(s,l,f.children,d),l.child;case 9:return y=l.type._context,f=l.pendingProps.children,_s(l),y=ra(y),f=f(y),l.flags|=1,na(s,l,f,d),l.child;case 14:return wj(s,l,l.type,l.pendingProps,d);case 15:return Sj(s,l,l.type,l.pendingProps,d);case 19:return Pj(s,l,d);case 31:return gD(s,l,d);case 22:return Aj(s,l,d,l.pendingProps);case 24:return _s(l),f=ra(Ot),s===null?(y=Zf(),y===null&&(y=it,N=Wf(),y.pooledCache=N,N.refCount++,N!==null&&(y.pooledCacheLanes|=d),y=N),l.memoizedState={parent:f,cache:y},ep(l),Hn(l,Ot,y)):((s.lanes&d)!==0&&(tp(s,l),ro(l,null,null,d),ao()),y=s.memoizedState,N=l.memoizedState,y.parent!==f?(y={parent:f,cache:f},l.memoizedState=y,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=y),Hn(l,Ot,f)):(f=N.cache,Hn(l,Ot,f),f!==y.cache&&Jf(l,[Ot],d,!0))),na(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(n(156,l.tag))}function sn(s){s.flags|=4}function zp(s,l,d,f,y){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(y&335544128)===y)if(s.stateNode.complete)s.flags|=8192;else if(iN())s.flags|=8192;else throw Ls=ed,Qf}else s.flags&=-16777217}function Mj(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!WN(l))if(iN())s.flags|=8192;else throw Ls=ed,Qf}function gd(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?py():536870912,s.lanes|=l,ql|=l)}function co(s,l){if(!He)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var f=null;d!==null;)d.alternate!==null&&(f=d),d=d.sibling;f===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:f.sibling=null}}function pt(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,f=0;if(l)for(var y=s.child;y!==null;)d|=y.lanes|y.childLanes,f|=y.subtreeFlags&65011712,f|=y.flags&65011712,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)d|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=f,s.childLanes=d,l}function yD(s,l,d){var f=l.pendingProps;switch(Hf(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(l),null;case 1:return pt(l),null;case 3:return d=l.stateNode,f=null,s!==null&&(f=s.memoizedState.cache),l.memoizedState.cache!==f&&(l.flags|=2048),tn(Ot),G(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Dl(l)?sn(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Yf())),pt(l),null;case 26:var y=l.type,N=l.memoizedState;return s===null?(sn(l),N!==null?(pt(l),Mj(l,N)):(pt(l),zp(l,y,null,f,d))):N?N!==s.memoizedState?(sn(l),pt(l),Mj(l,N)):(pt(l),l.flags&=-16777217):(s=s.memoizedProps,s!==f&&sn(l),pt(l),zp(l,y,s,f,d)),null;case 27:if(Ne(l),d=ue.current,y=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==f&&sn(l);else{if(!f){if(l.stateNode===null)throw Error(n(166));return pt(l),null}s=pe.current,Dl(l)?pv(l):(s=UN(y,f,d),l.stateNode=s,sn(l))}return pt(l),null;case 5:if(Ne(l),y=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==f&&sn(l);else{if(!f){if(l.stateNode===null)throw Error(n(166));return pt(l),null}if(N=pe.current,Dl(l))pv(l);else{var E=Rd(ue.current);switch(N){case 1:N=E.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:N=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":N=E.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":N=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":N=E.createElement("div"),N.innerHTML="<script><\/script>",N=N.removeChild(N.firstChild);break;case"select":N=typeof f.is=="string"?E.createElement("select",{is:f.is}):E.createElement("select"),f.multiple?N.multiple=!0:f.size&&(N.size=f.size);break;default:N=typeof f.is=="string"?E.createElement(y,{is:f.is}):E.createElement(y)}}N[ta]=l,N[Sa]=f;e:for(E=l.child;E!==null;){if(E.tag===5||E.tag===6)N.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===l)break e;for(;E.sibling===null;){if(E.return===null||E.return===l)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}l.stateNode=N;e:switch(sa(N,y,f),y){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&sn(l)}}return pt(l),zp(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==f&&sn(l);else{if(typeof f!="string"&&l.stateNode===null)throw Error(n(166));if(s=ue.current,Dl(l)){if(s=l.stateNode,d=l.memoizedProps,f=null,y=aa,y!==null)switch(y.tag){case 27:case 5:f=y.memoizedProps}s[ta]=l,s=!!(s.nodeValue===d||f!==null&&f.suppressHydrationWarning===!0||TN(s.nodeValue,d)),s||qn(l,!0)}else s=Rd(s).createTextNode(f),s[ta]=l,l.stateNode=s}return pt(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(f=Dl(l),d!==null){if(s===null){if(!f)throw Error(n(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[ta]=l}else Rs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;pt(l),s=!1}else d=Yf(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(Fa(l),l):(Fa(l),null);if((l.flags&128)!==0)throw Error(n(558))}return pt(l),null;case 13:if(f=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(y=Dl(l),f!==null&&f.dehydrated!==null){if(s===null){if(!y)throw Error(n(318));if(y=l.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[ta]=l}else Rs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;pt(l),y=!1}else y=Yf(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=y),y=!0;if(!y)return l.flags&256?(Fa(l),l):(Fa(l),null)}return Fa(l),(l.flags&128)!==0?(l.lanes=d,l):(d=f!==null,s=s!==null&&s.memoizedState!==null,d&&(f=l.child,y=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(y=f.alternate.memoizedState.cachePool.pool),N=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(N=f.memoizedState.cachePool.pool),N!==y&&(f.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),gd(l,l.updateQueue),pt(l),null);case 4:return G(),s===null&&nh(l.stateNode.containerInfo),pt(l),null;case 10:return tn(l.type),pt(l),null;case 19:if(H(Ct),f=l.memoizedState,f===null)return pt(l),null;if(y=(l.flags&128)!==0,N=f.rendering,N===null)if(y)co(f,!1);else{if(St!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(N=nd(s),N!==null){for(l.flags|=128,co(f,!1),s=N.updateQueue,l.updateQueue=s,gd(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)cv(d,s),d=d.sibling;return ee(Ct,Ct.current&1|2),He&&Qr(l,f.treeForkCount),l.child}s=s.sibling}f.tail!==null&&ye()>Nd&&(l.flags|=128,y=!0,co(f,!1),l.lanes=4194304)}else{if(!y)if(s=nd(N),s!==null){if(l.flags|=128,y=!0,s=s.updateQueue,l.updateQueue=s,gd(l,s),co(f,!0),f.tail===null&&f.tailMode==="hidden"&&!N.alternate&&!He)return pt(l),null}else 2*ye()-f.renderingStartTime>Nd&&d!==536870912&&(l.flags|=128,y=!0,co(f,!1),l.lanes=4194304);f.isBackwards?(N.sibling=l.child,l.child=N):(s=f.last,s!==null?s.sibling=N:l.child=N,f.last=N)}return f.tail!==null?(s=f.tail,f.rendering=s,f.tail=s.sibling,f.renderingStartTime=ye(),s.sibling=null,d=Ct.current,ee(Ct,y?d&1|2:d&1),He&&Qr(l,f.treeForkCount),s):(pt(l),null);case 22:case 23:return Fa(l),sp(),f=l.memoizedState!==null,s!==null?s.memoizedState!==null!==f&&(l.flags|=8192):f&&(l.flags|=8192),f?(d&536870912)!==0&&(l.flags&128)===0&&(pt(l),l.subtreeFlags&6&&(l.flags|=8192)):pt(l),d=l.updateQueue,d!==null&&gd(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==d&&(l.flags|=2048),s!==null&&H(Ms),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),tn(Ot),pt(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function vD(s,l){switch(Hf(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return tn(Ot),G(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Ne(l),null;case 31:if(l.memoizedState!==null){if(Fa(l),l.alternate===null)throw Error(n(340));Rs()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Fa(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Rs()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return H(Ct),null;case 4:return G(),null;case 10:return tn(l.type),null;case 22:case 23:return Fa(l),sp(),s!==null&&H(Ms),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return tn(Ot),null;case 25:return null;default:return null}}function zj(s,l){switch(Hf(l),l.tag){case 3:tn(Ot),G();break;case 26:case 27:case 5:Ne(l);break;case 4:G();break;case 31:l.memoizedState!==null&&Fa(l);break;case 13:Fa(l);break;case 19:H(Ct);break;case 10:tn(l.type);break;case 22:case 23:Fa(l),sp(),s!==null&&H(Ms);break;case 24:tn(Ot)}}function uo(s,l){try{var d=l.updateQueue,f=d!==null?d.lastEffect:null;if(f!==null){var y=f.next;d=y;do{if((d.tag&s)===s){f=void 0;var N=d.create,E=d.inst;f=N(),E.destroy=f}d=d.next}while(d!==y)}}catch(M){et(l,l.return,M)}}function Wn(s,l,d){try{var f=l.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var N=y.next;f=N;do{if((f.tag&s)===s){var E=f.inst,M=E.destroy;if(M!==void 0){E.destroy=void 0,y=l;var q=d,X=M;try{X()}catch(oe){et(y,q,oe)}}}f=f.next}while(f!==N)}}catch(oe){et(l,l.return,oe)}}function Lj(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{kv(l,d)}catch(f){et(s,s.return,f)}}}function Bj(s,l,d){d.props=Fs(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(f){et(s,l,f)}}function mo(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var f=s.stateNode;break;case 30:f=s.stateNode;break;default:f=s.stateNode}typeof d=="function"?s.refCleanup=d(f):d.current=f}}catch(y){et(s,l,y)}}function zr(s,l){var d=s.ref,f=s.refCleanup;if(d!==null)if(typeof f=="function")try{f()}catch(y){et(s,l,y)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(y){et(s,l,y)}else d.current=null}function Ij(s){var l=s.type,d=s.memoizedProps,f=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&f.focus();break e;case"img":d.src?f.src=d.src:d.srcSet&&(f.srcset=d.srcSet)}}catch(y){et(s,s.return,y)}}function Lp(s,l,d){try{var f=s.stateNode;UD(f,s.type,d,l),f[Sa]=l}catch(y){et(s,s.return,y)}}function Fj(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&rs(s.type)||s.tag===4}function Bp(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Fj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&rs(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Ip(s,l,d){var f=s.tag;if(f===5||f===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Wr));else if(f!==4&&(f===27&&rs(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(Ip(s,l,d),s=s.sibling;s!==null;)Ip(s,l,d),s=s.sibling}function bd(s,l,d){var f=s.tag;if(f===5||f===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(f!==4&&(f===27&&rs(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(bd(s,l,d),s=s.sibling;s!==null;)bd(s,l,d),s=s.sibling}function $j(s){var l=s.stateNode,d=s.memoizedProps;try{for(var f=s.type,y=l.attributes;y.length;)l.removeAttributeNode(y[0]);sa(l,f,d),l[ta]=s,l[Sa]=d}catch(N){et(s,s.return,N)}}var ln=!1,Rt=!1,Fp=!1,Uj=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function jD(s,l){if(s=s.containerInfo,ih=Id,s=ev(s),Pf(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var f=d.getSelection&&d.getSelection();if(f&&f.rangeCount!==0){d=f.anchorNode;var y=f.anchorOffset,N=f.focusNode;f=f.focusOffset;try{d.nodeType,N.nodeType}catch{d=null;break e}var E=0,M=-1,q=-1,X=0,oe=0,me=s,Q=null;t:for(;;){for(var re;me!==d||y!==0&&me.nodeType!==3||(M=E+y),me!==N||f!==0&&me.nodeType!==3||(q=E+f),me.nodeType===3&&(E+=me.nodeValue.length),(re=me.firstChild)!==null;)Q=me,me=re;for(;;){if(me===s)break t;if(Q===d&&++X===y&&(M=E),Q===N&&++oe===f&&(q=E),(re=me.nextSibling)!==null)break;me=Q,Q=me.parentNode}me=re}d=M===-1||q===-1?null:{start:M,end:q}}else d=null}d=d||{start:0,end:0}}else d=null;for(oh={focusedElem:s,selectionRange:d},Id=!1,Ht=l;Ht!==null;)if(l=Ht,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Ht=s;else for(;Ht!==null;){switch(l=Ht,N=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)y=s[d],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&N!==null){s=void 0,d=l,y=N.memoizedProps,N=N.memoizedState,f=d.stateNode;try{var Ae=Fs(d.type,y);s=f.getSnapshotBeforeUpdate(Ae,N),f.__reactInternalSnapshotBeforeUpdate=s}catch(Re){et(d,d.return,Re)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)uh(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":uh(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=l.sibling,s!==null){s.return=l.return,Ht=s;break}Ht=l.return}}function qj(s,l,d){var f=d.flags;switch(d.tag){case 0:case 11:case 15:cn(s,d),f&4&&uo(5,d);break;case 1:if(cn(s,d),f&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(E){et(d,d.return,E)}else{var y=Fs(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(y,l,s.__reactInternalSnapshotBeforeUpdate)}catch(E){et(d,d.return,E)}}f&64&&Lj(d),f&512&&mo(d,d.return);break;case 3:if(cn(s,d),f&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{kv(s,l)}catch(E){et(d,d.return,E)}}break;case 27:l===null&&f&4&&$j(d);case 26:case 5:cn(s,d),l===null&&f&4&&Ij(d),f&512&&mo(d,d.return);break;case 12:cn(s,d);break;case 31:cn(s,d),f&4&&Yj(s,d);break;case 13:cn(s,d),f&4&&Kj(s,d),f&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=DD.bind(null,d),WD(s,d))));break;case 22:if(f=d.memoizedState!==null||ln,!f){l=l!==null&&l.memoizedState!==null||Rt,y=ln;var N=Rt;ln=f,(Rt=l)&&!N?dn(s,d,(d.subtreeFlags&8772)!==0):cn(s,d),ln=y,Rt=N}break;case 30:break;default:cn(s,d)}}function Hj(s){var l=s.alternate;l!==null&&(s.alternate=null,Hj(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&xf(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var bt=null,Ca=!1;function on(s,l,d){for(d=d.child;d!==null;)Vj(s,l,d),d=d.sibling}function Vj(s,l,d){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(Gr,d)}catch{}switch(d.tag){case 26:Rt||zr(d,l),on(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Rt||zr(d,l);var f=bt,y=Ca;rs(d.type)&&(bt=d.stateNode,Ca=!1),on(s,l,d),jo(d.stateNode),bt=f,Ca=y;break;case 5:Rt||zr(d,l);case 6:if(f=bt,y=Ca,bt=null,on(s,l,d),bt=f,Ca=y,bt!==null)if(Ca)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(d.stateNode)}catch(N){et(d,l,N)}else try{bt.removeChild(d.stateNode)}catch(N){et(d,l,N)}break;case 18:bt!==null&&(Ca?(s=bt,LN(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),Xl(s)):LN(bt,d.stateNode));break;case 4:f=bt,y=Ca,bt=d.stateNode.containerInfo,Ca=!0,on(s,l,d),bt=f,Ca=y;break;case 0:case 11:case 14:case 15:Wn(2,d,l),Rt||Wn(4,d,l),on(s,l,d);break;case 1:Rt||(zr(d,l),f=d.stateNode,typeof f.componentWillUnmount=="function"&&Bj(d,l,f)),on(s,l,d);break;case 21:on(s,l,d);break;case 22:Rt=(f=Rt)||d.memoizedState!==null,on(s,l,d),Rt=f;break;default:on(s,l,d)}}function Yj(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Xl(s)}catch(d){et(l,l.return,d)}}}function Kj(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Xl(s)}catch(d){et(l,l.return,d)}}function ND(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new Uj),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new Uj),l;default:throw Error(n(435,s.tag))}}function yd(s,l){var d=ND(s);l.forEach(function(f){if(!d.has(f)){d.add(f);var y=TD.bind(null,s,f);f.then(y,y)}})}function ka(s,l){var d=l.deletions;if(d!==null)for(var f=0;f<d.length;f++){var y=d[f],N=s,E=l,M=E;e:for(;M!==null;){switch(M.tag){case 27:if(rs(M.type)){bt=M.stateNode,Ca=!1;break e}break;case 5:bt=M.stateNode,Ca=!1;break e;case 3:case 4:bt=M.stateNode.containerInfo,Ca=!0;break e}M=M.return}if(bt===null)throw Error(n(160));Vj(N,E,y),bt=null,Ca=!1,N=y.alternate,N!==null&&(N.return=null),y.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)Gj(l,s),l=l.sibling}var wr=null;function Gj(s,l){var d=s.alternate,f=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:ka(l,s),Ea(s),f&4&&(Wn(3,s,s.return),uo(3,s),Wn(5,s,s.return));break;case 1:ka(l,s),Ea(s),f&512&&(Rt||d===null||zr(d,d.return)),f&64&&ln&&(s=s.updateQueue,s!==null&&(f=s.callbacks,f!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?f:d.concat(f))));break;case 26:var y=wr;if(ka(l,s),Ea(s),f&512&&(Rt||d===null||zr(d,d.return)),f&4){var N=d!==null?d.memoizedState:null;if(f=s.memoizedState,d===null)if(f===null)if(s.stateNode===null){e:{f=s.type,d=s.memoizedProps,y=y.ownerDocument||y;t:switch(f){case"title":N=y.getElementsByTagName("title")[0],(!N||N[Bi]||N[ta]||N.namespaceURI==="http://www.w3.org/2000/svg"||N.hasAttribute("itemprop"))&&(N=y.createElement(f),y.head.insertBefore(N,y.querySelector("head > title"))),sa(N,f,d),N[ta]=s,qt(N),f=N;break e;case"link":var E=GN("link","href",y).get(f+(d.href||""));if(E){for(var M=0;M<E.length;M++)if(N=E[M],N.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&N.getAttribute("rel")===(d.rel==null?null:d.rel)&&N.getAttribute("title")===(d.title==null?null:d.title)&&N.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){E.splice(M,1);break t}}N=y.createElement(f),sa(N,f,d),y.head.appendChild(N);break;case"meta":if(E=GN("meta","content",y).get(f+(d.content||""))){for(M=0;M<E.length;M++)if(N=E[M],N.getAttribute("content")===(d.content==null?null:""+d.content)&&N.getAttribute("name")===(d.name==null?null:d.name)&&N.getAttribute("property")===(d.property==null?null:d.property)&&N.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&N.getAttribute("charset")===(d.charSet==null?null:d.charSet)){E.splice(M,1);break t}}N=y.createElement(f),sa(N,f,d),y.head.appendChild(N);break;default:throw Error(n(468,f))}N[ta]=s,qt(N),f=N}s.stateNode=f}else JN(y,s.type,s.stateNode);else s.stateNode=KN(y,f,s.memoizedProps);else N!==f?(N===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):N.count--,f===null?JN(y,s.type,s.stateNode):KN(y,f,s.memoizedProps)):f===null&&s.stateNode!==null&&Lp(s,s.memoizedProps,d.memoizedProps)}break;case 27:ka(l,s),Ea(s),f&512&&(Rt||d===null||zr(d,d.return)),d!==null&&f&4&&Lp(s,s.memoizedProps,d.memoizedProps);break;case 5:if(ka(l,s),Ea(s),f&512&&(Rt||d===null||zr(d,d.return)),s.flags&32){y=s.stateNode;try{vl(y,"")}catch(Ae){et(s,s.return,Ae)}}f&4&&s.stateNode!=null&&(y=s.memoizedProps,Lp(s,y,d!==null?d.memoizedProps:y)),f&1024&&(Fp=!0);break;case 6:if(ka(l,s),Ea(s),f&4){if(s.stateNode===null)throw Error(n(162));f=s.memoizedProps,d=s.stateNode;try{d.nodeValue=f}catch(Ae){et(s,s.return,Ae)}}break;case 3:if(Md=null,y=wr,wr=Pd(l.containerInfo),ka(l,s),wr=y,Ea(s),f&4&&d!==null&&d.memoizedState.isDehydrated)try{Xl(l.containerInfo)}catch(Ae){et(s,s.return,Ae)}Fp&&(Fp=!1,Jj(s));break;case 4:f=wr,wr=Pd(s.stateNode.containerInfo),ka(l,s),Ea(s),wr=f;break;case 12:ka(l,s),Ea(s);break;case 31:ka(l,s),Ea(s),f&4&&(f=s.updateQueue,f!==null&&(s.updateQueue=null,yd(s,f)));break;case 13:ka(l,s),Ea(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(jd=ye()),f&4&&(f=s.updateQueue,f!==null&&(s.updateQueue=null,yd(s,f)));break;case 22:y=s.memoizedState!==null;var q=d!==null&&d.memoizedState!==null,X=ln,oe=Rt;if(ln=X||y,Rt=oe||q,ka(l,s),Rt=oe,ln=X,Ea(s),f&8192)e:for(l=s.stateNode,l._visibility=y?l._visibility&-2:l._visibility|1,y&&(d===null||q||ln||Rt||$s(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){q=d=l;try{if(N=q.stateNode,y)E=N.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{M=q.stateNode;var me=q.memoizedProps.style,Q=me!=null&&me.hasOwnProperty("display")?me.display:null;M.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(Ae){et(q,q.return,Ae)}}}else if(l.tag===6){if(d===null){q=l;try{q.stateNode.nodeValue=y?"":q.memoizedProps}catch(Ae){et(q,q.return,Ae)}}}else if(l.tag===18){if(d===null){q=l;try{var re=q.stateNode;y?BN(re,!0):BN(q.stateNode,!1)}catch(Ae){et(q,q.return,Ae)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}f&4&&(f=s.updateQueue,f!==null&&(d=f.retryQueue,d!==null&&(f.retryQueue=null,yd(s,d))));break;case 19:ka(l,s),Ea(s),f&4&&(f=s.updateQueue,f!==null&&(s.updateQueue=null,yd(s,f)));break;case 30:break;case 21:break;default:ka(l,s),Ea(s)}}function Ea(s){var l=s.flags;if(l&2){try{for(var d,f=s.return;f!==null;){if(Fj(f)){d=f;break}f=f.return}if(d==null)throw Error(n(160));switch(d.tag){case 27:var y=d.stateNode,N=Bp(s);bd(s,N,y);break;case 5:var E=d.stateNode;d.flags&32&&(vl(E,""),d.flags&=-33);var M=Bp(s);bd(s,M,E);break;case 3:case 4:var q=d.stateNode.containerInfo,X=Bp(s);Ip(s,X,q);break;default:throw Error(n(161))}}catch(oe){et(s,s.return,oe)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function Jj(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;Jj(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function cn(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)qj(s,l.alternate,l),l=l.sibling}function $s(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:Wn(4,l,l.return),$s(l);break;case 1:zr(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&Bj(l,l.return,d),$s(l);break;case 27:jo(l.stateNode);case 26:case 5:zr(l,l.return),$s(l);break;case 22:l.memoizedState===null&&$s(l);break;case 30:$s(l);break;default:$s(l)}s=s.sibling}}function dn(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var f=l.alternate,y=s,N=l,E=N.flags;switch(N.tag){case 0:case 11:case 15:dn(y,N,d),uo(4,N);break;case 1:if(dn(y,N,d),f=N,y=f.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(X){et(f,f.return,X)}if(f=N,y=f.updateQueue,y!==null){var M=f.stateNode;try{var q=y.shared.hiddenCallbacks;if(q!==null)for(y.shared.hiddenCallbacks=null,y=0;y<q.length;y++)Cv(q[y],M)}catch(X){et(f,f.return,X)}}d&&E&64&&Lj(N),mo(N,N.return);break;case 27:$j(N);case 26:case 5:dn(y,N,d),d&&f===null&&E&4&&Ij(N),mo(N,N.return);break;case 12:dn(y,N,d);break;case 31:dn(y,N,d),d&&E&4&&Yj(y,N);break;case 13:dn(y,N,d),d&&E&4&&Kj(y,N);break;case 22:N.memoizedState===null&&dn(y,N,d),mo(N,N.return);break;case 30:break;default:dn(y,N,d)}l=l.sibling}}function $p(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&Xi(d))}function Up(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Xi(s))}function Sr(s,l,d,f){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Wj(s,l,d,f),l=l.sibling}function Wj(s,l,d,f){var y=l.flags;switch(l.tag){case 0:case 11:case 15:Sr(s,l,d,f),y&2048&&uo(9,l);break;case 1:Sr(s,l,d,f);break;case 3:Sr(s,l,d,f),y&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Xi(s)));break;case 12:if(y&2048){Sr(s,l,d,f),s=l.stateNode;try{var N=l.memoizedProps,E=N.id,M=N.onPostCommit;typeof M=="function"&&M(E,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(q){et(l,l.return,q)}}else Sr(s,l,d,f);break;case 31:Sr(s,l,d,f);break;case 13:Sr(s,l,d,f);break;case 23:break;case 22:N=l.stateNode,E=l.alternate,l.memoizedState!==null?N._visibility&2?Sr(s,l,d,f):fo(s,l):N._visibility&2?Sr(s,l,d,f):(N._visibility|=2,Fl(s,l,d,f,(l.subtreeFlags&10256)!==0||!1)),y&2048&&$p(E,l);break;case 24:Sr(s,l,d,f),y&2048&&Up(l.alternate,l);break;default:Sr(s,l,d,f)}}function Fl(s,l,d,f,y){for(y=y&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var N=s,E=l,M=d,q=f,X=E.flags;switch(E.tag){case 0:case 11:case 15:Fl(N,E,M,q,y),uo(8,E);break;case 23:break;case 22:var oe=E.stateNode;E.memoizedState!==null?oe._visibility&2?Fl(N,E,M,q,y):fo(N,E):(oe._visibility|=2,Fl(N,E,M,q,y)),y&&X&2048&&$p(E.alternate,E);break;case 24:Fl(N,E,M,q,y),y&&X&2048&&Up(E.alternate,E);break;default:Fl(N,E,M,q,y)}l=l.sibling}}function fo(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,f=l,y=f.flags;switch(f.tag){case 22:fo(d,f),y&2048&&$p(f.alternate,f);break;case 24:fo(d,f),y&2048&&Up(f.alternate,f);break;default:fo(d,f)}l=l.sibling}}var po=8192;function $l(s,l,d){if(s.subtreeFlags&po)for(s=s.child;s!==null;)Xj(s,l,d),s=s.sibling}function Xj(s,l,d){switch(s.tag){case 26:$l(s,l,d),s.flags&po&&s.memoizedState!==null&&oT(d,wr,s.memoizedState,s.memoizedProps);break;case 5:$l(s,l,d);break;case 3:case 4:var f=wr;wr=Pd(s.stateNode.containerInfo),$l(s,l,d),wr=f;break;case 22:s.memoizedState===null&&(f=s.alternate,f!==null&&f.memoizedState!==null?(f=po,po=16777216,$l(s,l,d),po=f):$l(s,l,d));break;default:$l(s,l,d)}}function Zj(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function ho(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var f=l[d];Ht=f,eN(f,s)}Zj(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Qj(s),s=s.sibling}function Qj(s){switch(s.tag){case 0:case 11:case 15:ho(s),s.flags&2048&&Wn(9,s,s.return);break;case 3:ho(s);break;case 12:ho(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,vd(s)):ho(s);break;default:ho(s)}}function vd(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var f=l[d];Ht=f,eN(f,s)}Zj(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:Wn(8,l,l.return),vd(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,vd(l));break;default:vd(l)}s=s.sibling}}function eN(s,l){for(;Ht!==null;){var d=Ht;switch(d.tag){case 0:case 11:case 15:Wn(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var f=d.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Xi(d.memoizedState.cache)}if(f=d.child,f!==null)f.return=d,Ht=f;else e:for(d=s;Ht!==null;){f=Ht;var y=f.sibling,N=f.return;if(Hj(f),f===d){Ht=null;break e}if(y!==null){y.return=N,Ht=y;break e}Ht=N}}}var wD={getCacheForType:function(s){var l=ra(Ot),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return ra(Ot).controller.signal}},SD=typeof WeakMap=="function"?WeakMap:Map,Ze=0,it=null,Fe=null,Ue=0,Qe=0,$a=null,Xn=!1,Ul=!1,qp=!1,un=0,St=0,Zn=0,Us=0,Hp=0,Ua=0,ql=0,xo=null,Oa=null,Vp=!1,jd=0,tN=0,Nd=1/0,wd=null,Qn=null,_t=0,es=null,Hl=null,mn=0,Yp=0,Kp=null,aN=null,go=0,Gp=null;function qa(){return(Ze&2)!==0&&Ue!==0?Ue&-Ue:V.T!==null?eh():by()}function rN(){if(Ua===0)if((Ue&536870912)===0||He){var s=Tc;Tc<<=1,(Tc&3932160)===0&&(Tc=262144),Ua=s}else Ua=536870912;return s=Ia.current,s!==null&&(s.flags|=32),Ua}function Da(s,l,d){(s===it&&(Qe===2||Qe===9)||s.cancelPendingCommit!==null)&&(Vl(s,0),ts(s,Ue,Ua,!1)),Li(s,d),((Ze&2)===0||s!==it)&&(s===it&&((Ze&2)===0&&(Us|=d),St===4&&ts(s,Ue,Ua,!1)),Lr(s))}function nN(s,l,d){if((Ze&6)!==0)throw Error(n(327));var f=!d&&(l&127)===0&&(l&s.expiredLanes)===0||zi(s,l),y=f?kD(s,l):Wp(s,l,!0),N=f;do{if(y===0){Ul&&!f&&ts(s,l,0,!1);break}else{if(d=s.current.alternate,N&&!AD(d)){y=Wp(s,l,!1),N=!1;continue}if(y===2){if(N=l,s.errorRecoveryDisabledLanes&N)var E=0;else E=s.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){l=E;e:{var M=s;y=xo;var q=M.current.memoizedState.isDehydrated;if(q&&(Vl(M,E).flags|=256),E=Wp(M,E,!1),E!==2){if(qp&&!q){M.errorRecoveryDisabledLanes|=N,Us|=N,y=4;break e}N=Oa,Oa=y,N!==null&&(Oa===null?Oa=N:Oa.push.apply(Oa,N))}y=E}if(N=!1,y!==2)continue}}if(y===1){Vl(s,0),ts(s,l,0,!0);break}e:{switch(f=s,N=y,N){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:ts(f,l,Ua,!Xn);break e;case 2:Oa=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(y=jd+300-ye(),10<y)){if(ts(f,l,Ua,!Xn),Pc(f,0,!0)!==0)break e;mn=l,f.timeoutHandle=MN(sN.bind(null,f,d,Oa,wd,Vp,l,Ua,Us,ql,Xn,N,"Throttled",-0,0),y);break e}sN(f,d,Oa,wd,Vp,l,Ua,Us,ql,Xn,N,null,-0,0)}}break}while(!0);Lr(s)}function sN(s,l,d,f,y,N,E,M,q,X,oe,me,Q,re){if(s.timeoutHandle=-1,me=l.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wr},Xj(l,N,me);var Ae=(N&62914560)===N?jd-ye():(N&4194048)===N?tN-ye():0;if(Ae=cT(me,Ae),Ae!==null){mn=N,s.cancelPendingCommit=Ae(fN.bind(null,s,l,N,d,f,y,E,M,q,oe,me,null,Q,re)),ts(s,N,E,!X);return}}fN(s,l,N,d,f,y,E,M,q)}function AD(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var f=0;f<d.length;f++){var y=d[f],N=y.getSnapshot;y=y.value;try{if(!La(N(),y))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ts(s,l,d,f){l&=~Hp,l&=~Us,s.suspendedLanes|=l,s.pingedLanes&=~l,f&&(s.warmLanes|=l),f=s.expirationTimes;for(var y=l;0<y;){var N=31-ea(y),E=1<<N;f[N]=-1,y&=~E}d!==0&&hy(s,d,l)}function Sd(){return(Ze&6)===0?(bo(0),!1):!0}function Jp(){if(Fe!==null){if(Qe===0)var s=Fe.return;else s=Fe,en=Ps=null,up(s),Ml=null,Qi=0,s=Fe;for(;s!==null;)zj(s.alternate,s),s=s.return;Fe=null}}function Vl(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,VD(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),mn=0,Jp(),it=s,Fe=d=Zr(s.current,null),Ue=l,Qe=0,$a=null,Xn=!1,Ul=zi(s,l),qp=!1,ql=Ua=Hp=Us=Zn=St=0,Oa=xo=null,Vp=!1,(l&8)!==0&&(l|=l&32);var f=s.entangledLanes;if(f!==0)for(s=s.entanglements,f&=l;0<f;){var y=31-ea(f),N=1<<y;l|=s[y],f&=~N}return un=l,Vc(),d}function lN(s,l){Le=null,V.H=io,l===_l||l===Qc?(l=Nv(),Qe=3):l===Qf?(l=Nv(),Qe=4):Qe=l===kp?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,$a=l,Fe===null&&(St=1,fd(s,ar(l,s.current)))}function iN(){var s=Ia.current;return s===null?!0:(Ue&4194048)===Ue?lr===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?s===lr:!1}function oN(){var s=V.H;return V.H=io,s===null?io:s}function cN(){var s=V.A;return V.A=wD,s}function Ad(){St=4,Xn||(Ue&4194048)!==Ue&&Ia.current!==null||(Ul=!0),(Zn&134217727)===0&&(Us&134217727)===0||it===null||ts(it,Ue,Ua,!1)}function Wp(s,l,d){var f=Ze;Ze|=2;var y=oN(),N=cN();(it!==s||Ue!==l)&&(wd=null,Vl(s,l)),l=!1;var E=St;e:do try{if(Qe!==0&&Fe!==null){var M=Fe,q=$a;switch(Qe){case 8:Jp(),E=6;break e;case 3:case 2:case 9:case 6:Ia.current===null&&(l=!0);var X=Qe;if(Qe=0,$a=null,Yl(s,M,q,X),d&&Ul){E=0;break e}break;default:X=Qe,Qe=0,$a=null,Yl(s,M,q,X)}}CD(),E=St;break}catch(oe){lN(s,oe)}while(!0);return l&&s.shellSuspendCounter++,en=Ps=null,Ze=f,V.H=y,V.A=N,Fe===null&&(it=null,Ue=0,Vc()),E}function CD(){for(;Fe!==null;)dN(Fe)}function kD(s,l){var d=Ze;Ze|=2;var f=oN(),y=cN();it!==s||Ue!==l?(wd=null,Nd=ye()+500,Vl(s,l)):Ul=zi(s,l);e:do try{if(Qe!==0&&Fe!==null){l=Fe;var N=$a;t:switch(Qe){case 1:Qe=0,$a=null,Yl(s,l,N,1);break;case 2:case 9:if(vv(N)){Qe=0,$a=null,uN(l);break}l=function(){Qe!==2&&Qe!==9||it!==s||(Qe=7),Lr(s)},N.then(l,l);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:vv(N)?(Qe=0,$a=null,uN(l)):(Qe=0,$a=null,Yl(s,l,N,7));break;case 5:var E=null;switch(Fe.tag){case 26:E=Fe.memoizedState;case 5:case 27:var M=Fe;if(E?WN(E):M.stateNode.complete){Qe=0,$a=null;var q=M.sibling;if(q!==null)Fe=q;else{var X=M.return;X!==null?(Fe=X,Cd(X)):Fe=null}break t}}Qe=0,$a=null,Yl(s,l,N,5);break;case 6:Qe=0,$a=null,Yl(s,l,N,6);break;case 8:Jp(),St=6;break e;default:throw Error(n(462))}}ED();break}catch(oe){lN(s,oe)}while(!0);return en=Ps=null,V.H=f,V.A=y,Ze=d,Fe!==null?0:(it=null,Ue=0,Vc(),St)}function ED(){for(;Fe!==null&&!cf();)dN(Fe)}function dN(s){var l=_j(s.alternate,s,un);s.memoizedProps=s.pendingProps,l===null?Cd(s):Fe=l}function uN(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=Ej(d,l,l.pendingProps,l.type,void 0,Ue);break;case 11:l=Ej(d,l,l.pendingProps,l.type.render,l.ref,Ue);break;case 5:up(l);default:zj(d,l),l=Fe=cv(l,un),l=_j(d,l,un)}s.memoizedProps=s.pendingProps,l===null?Cd(s):Fe=l}function Yl(s,l,d,f){en=Ps=null,up(l),Ml=null,Qi=0;var y=l.return;try{if(xD(s,y,l,d,Ue)){St=1,fd(s,ar(d,s.current)),Fe=null;return}}catch(N){if(y!==null)throw Fe=y,N;St=1,fd(s,ar(d,s.current)),Fe=null;return}l.flags&32768?(He||f===1?s=!0:Ul||(Ue&536870912)!==0?s=!1:(Xn=s=!0,(f===2||f===9||f===3||f===6)&&(f=Ia.current,f!==null&&f.tag===13&&(f.flags|=16384))),mN(l,s)):Cd(l)}function Cd(s){var l=s;do{if((l.flags&32768)!==0){mN(l,Xn);return}s=l.return;var d=yD(l.alternate,l,un);if(d!==null){Fe=d;return}if(l=l.sibling,l!==null){Fe=l;return}Fe=l=s}while(l!==null);St===0&&(St=5)}function mN(s,l){do{var d=vD(s.alternate,s);if(d!==null){d.flags&=32767,Fe=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){Fe=s;return}Fe=s=d}while(s!==null);St=6,Fe=null}function fN(s,l,d,f,y,N,E,M,q){s.cancelPendingCommit=null;do kd();while(_t!==0);if((Ze&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(N=l.lanes|l.childLanes,N|=Bf,i6(s,d,N,E,M,q),s===it&&(Fe=it=null,Ue=0),Hl=l,es=s,mn=d,Yp=N,Kp=y,aN=f,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,RD($t,function(){return bN(),null})):(s.callbackNode=null,s.callbackPriority=0),f=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||f){f=V.T,V.T=null,y=K.p,K.p=2,E=Ze,Ze|=4;try{jD(s,l,d)}finally{Ze=E,K.p=y,V.T=f}}_t=1,pN(),hN(),xN()}}function pN(){if(_t===1){_t=0;var s=es,l=Hl,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=V.T,V.T=null;var f=K.p;K.p=2;var y=Ze;Ze|=4;try{Gj(l,s);var N=oh,E=ev(s.containerInfo),M=N.focusedElem,q=N.selectionRange;if(E!==M&&M&&M.ownerDocument&&Qy(M.ownerDocument.documentElement,M)){if(q!==null&&Pf(M)){var X=q.start,oe=q.end;if(oe===void 0&&(oe=X),"selectionStart"in M)M.selectionStart=X,M.selectionEnd=Math.min(oe,M.value.length);else{var me=M.ownerDocument||document,Q=me&&me.defaultView||window;if(Q.getSelection){var re=Q.getSelection(),Ae=M.textContent.length,Re=Math.min(q.start,Ae),st=q.end===void 0?Re:Math.min(q.end,Ae);!re.extend&&Re>st&&(E=st,st=Re,Re=E);var J=Zy(M,Re),Y=Zy(M,st);if(J&&Y&&(re.rangeCount!==1||re.anchorNode!==J.node||re.anchorOffset!==J.offset||re.focusNode!==Y.node||re.focusOffset!==Y.offset)){var W=me.createRange();W.setStart(J.node,J.offset),re.removeAllRanges(),Re>st?(re.addRange(W),re.extend(Y.node,Y.offset)):(W.setEnd(Y.node,Y.offset),re.addRange(W))}}}}for(me=[],re=M;re=re.parentNode;)re.nodeType===1&&me.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<me.length;M++){var de=me[M];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}Id=!!ih,oh=ih=null}finally{Ze=y,K.p=f,V.T=d}}s.current=l,_t=2}}function hN(){if(_t===2){_t=0;var s=es,l=Hl,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=V.T,V.T=null;var f=K.p;K.p=2;var y=Ze;Ze|=4;try{qj(s,l.alternate,l)}finally{Ze=y,K.p=f,V.T=d}}_t=3}}function xN(){if(_t===4||_t===3){_t=0,df();var s=es,l=Hl,d=mn,f=aN;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?_t=5:(_t=0,Hl=es=null,gN(s,s.pendingLanes));var y=s.pendingLanes;if(y===0&&(Qn=null),pf(d),l=l.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(Gr,l,void 0,(l.current.flags&128)===128)}catch{}if(f!==null){l=V.T,y=K.p,K.p=2,V.T=null;try{for(var N=s.onRecoverableError,E=0;E<f.length;E++){var M=f[E];N(M.value,{componentStack:M.stack})}}finally{V.T=l,K.p=y}}(mn&3)!==0&&kd(),Lr(s),y=s.pendingLanes,(d&261930)!==0&&(y&42)!==0?s===Gp?go++:(go=0,Gp=s):go=0,bo(0)}}function gN(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Xi(l)))}function kd(){return pN(),hN(),xN(),bN()}function bN(){if(_t!==5)return!1;var s=es,l=Yp;Yp=0;var d=pf(mn),f=V.T,y=K.p;try{K.p=32>d?32:d,V.T=null,d=Kp,Kp=null;var N=es,E=mn;if(_t=0,Hl=es=null,mn=0,(Ze&6)!==0)throw Error(n(331));var M=Ze;if(Ze|=4,Qj(N.current),Wj(N,N.current,E,d),Ze=M,bo(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(Gr,N)}catch{}return!0}finally{K.p=y,V.T=f,gN(s,l)}}function yN(s,l,d){l=ar(d,l),l=Cp(s.stateNode,l,2),s=Kn(s,l,2),s!==null&&(Li(s,2),Lr(s))}function et(s,l,d){if(s.tag===3)yN(s,s,d);else for(;l!==null;){if(l.tag===3){yN(l,s,d);break}else if(l.tag===1){var f=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Qn===null||!Qn.has(f))){s=ar(d,s),d=vj(2),f=Kn(l,d,2),f!==null&&(jj(d,f,l,s),Li(f,2),Lr(f));break}}l=l.return}}function Xp(s,l,d){var f=s.pingCache;if(f===null){f=s.pingCache=new SD;var y=new Set;f.set(l,y)}else y=f.get(l),y===void 0&&(y=new Set,f.set(l,y));y.has(d)||(qp=!0,y.add(d),s=OD.bind(null,s,l,d),l.then(s,s))}function OD(s,l,d){var f=s.pingCache;f!==null&&f.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,it===s&&(Ue&d)===d&&(St===4||St===3&&(Ue&62914560)===Ue&&300>ye()-jd?(Ze&2)===0&&Vl(s,0):Hp|=d,ql===Ue&&(ql=0)),Lr(s)}function vN(s,l){l===0&&(l=py()),s=Ds(s,l),s!==null&&(Li(s,l),Lr(s))}function DD(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),vN(s,d)}function TD(s,l){var d=0;switch(s.tag){case 31:case 13:var f=s.stateNode,y=s.memoizedState;y!==null&&(d=y.retryLane);break;case 19:f=s.stateNode;break;case 22:f=s.stateNode._retryCache;break;default:throw Error(n(314))}f!==null&&f.delete(l),vN(s,d)}function RD(s,l){return Xa(s,l)}var Ed=null,Kl=null,Zp=!1,Od=!1,Qp=!1,as=0;function Lr(s){s!==Kl&&s.next===null&&(Kl===null?Ed=Kl=s:Kl=Kl.next=s),Od=!0,Zp||(Zp=!0,_D())}function bo(s,l){if(!Qp&&Od){Qp=!0;do for(var d=!1,f=Ed;f!==null;){if(s!==0){var y=f.pendingLanes;if(y===0)var N=0;else{var E=f.suspendedLanes,M=f.pingedLanes;N=(1<<31-ea(42|s)+1)-1,N&=y&~(E&~M),N=N&201326741?N&201326741|1:N?N|2:0}N!==0&&(d=!0,SN(f,N))}else N=Ue,N=Pc(f,f===it?N:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(N&3)===0||zi(f,N)||(d=!0,SN(f,N));f=f.next}while(d);Qp=!1}}function PD(){jN()}function jN(){Od=Zp=!1;var s=0;as!==0&&HD()&&(s=as);for(var l=ye(),d=null,f=Ed;f!==null;){var y=f.next,N=NN(f,l);N===0?(f.next=null,d===null?Ed=y:d.next=y,y===null&&(Kl=d)):(d=f,(s!==0||(N&3)!==0)&&(Od=!0)),f=y}_t!==0&&_t!==5||bo(s),as!==0&&(as=0)}function NN(s,l){for(var d=s.suspendedLanes,f=s.pingedLanes,y=s.expirationTimes,N=s.pendingLanes&-62914561;0<N;){var E=31-ea(N),M=1<<E,q=y[E];q===-1?((M&d)===0||(M&f)!==0)&&(y[E]=l6(M,l)):q<=l&&(s.expiredLanes|=M),N&=~M}if(l=it,d=Ue,d=Pc(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),f=s.callbackNode,d===0||s===l&&(Qe===2||Qe===9)||s.cancelPendingCommit!==null)return f!==null&&f!==null&&Ti(f),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||zi(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(f!==null&&Ti(f),pf(d)){case 2:case 8:d=At;break;case 32:d=$t;break;case 268435456:d=Kr;break;default:d=$t}return f=wN.bind(null,s),d=Xa(d,f),s.callbackPriority=l,s.callbackNode=d,l}return f!==null&&f!==null&&Ti(f),s.callbackPriority=2,s.callbackNode=null,2}function wN(s,l){if(_t!==0&&_t!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(kd()&&s.callbackNode!==d)return null;var f=Ue;return f=Pc(s,s===it?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),f===0?null:(nN(s,f,l),NN(s,ye()),s.callbackNode!=null&&s.callbackNode===d?wN.bind(null,s):null)}function SN(s,l){if(kd())return null;nN(s,l,!0)}function _D(){YD(function(){(Ze&6)!==0?Xa(jt,PD):jN()})}function eh(){if(as===0){var s=Rl;s===0&&(s=Dc,Dc<<=1,(Dc&261888)===0&&(Dc=256)),as=s}return as}function AN(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Lc(""+s)}function CN(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function MD(s,l,d,f,y){if(l==="submit"&&d&&d.stateNode===y){var N=AN((y[Sa]||null).action),E=f.submitter;E&&(l=(l=E[Sa]||null)?AN(l.formAction):E.getAttribute("formAction"),l!==null&&(N=l,E=null));var M=new $c("action","action",null,f,y);s.push({event:M,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(as!==0){var q=E?CN(y,E):new FormData(y);vp(d,{pending:!0,data:q,method:y.method,action:N},null,q)}}else typeof N=="function"&&(M.preventDefault(),q=E?CN(y,E):new FormData(y),vp(d,{pending:!0,data:q,method:y.method,action:N},N,q))},currentTarget:y}]})}}for(var th=0;th<Lf.length;th++){var ah=Lf[th],zD=ah.toLowerCase(),LD=ah[0].toUpperCase()+ah.slice(1);Nr(zD,"on"+LD)}Nr(rv,"onAnimationEnd"),Nr(nv,"onAnimationIteration"),Nr(sv,"onAnimationStart"),Nr("dblclick","onDoubleClick"),Nr("focusin","onFocus"),Nr("focusout","onBlur"),Nr(Q6,"onTransitionRun"),Nr(eD,"onTransitionStart"),Nr(tD,"onTransitionCancel"),Nr(lv,"onTransitionEnd"),bl("onMouseEnter",["mouseout","mouseover"]),bl("onMouseLeave",["mouseout","mouseover"]),bl("onPointerEnter",["pointerout","pointerover"]),bl("onPointerLeave",["pointerout","pointerover"]),Cs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Cs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Cs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Cs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Cs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Cs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yo="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(" "),BD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yo));function kN(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var f=s[d],y=f.event;f=f.listeners;e:{var N=void 0;if(l)for(var E=f.length-1;0<=E;E--){var M=f[E],q=M.instance,X=M.currentTarget;if(M=M.listener,q!==N&&y.isPropagationStopped())break e;N=M,y.currentTarget=X;try{N(y)}catch(oe){Hc(oe)}y.currentTarget=null,N=q}else for(E=0;E<f.length;E++){if(M=f[E],q=M.instance,X=M.currentTarget,M=M.listener,q!==N&&y.isPropagationStopped())break e;N=M,y.currentTarget=X;try{N(y)}catch(oe){Hc(oe)}y.currentTarget=null,N=q}}}}function $e(s,l){var d=l[hf];d===void 0&&(d=l[hf]=new Set);var f=s+"__bubble";d.has(f)||(EN(l,s,2,!1),d.add(f))}function rh(s,l,d){var f=0;l&&(f|=4),EN(d,s,f,l)}var Dd="_reactListening"+Math.random().toString(36).slice(2);function nh(s){if(!s[Dd]){s[Dd]=!0,jy.forEach(function(d){d!=="selectionchange"&&(BD.has(d)||rh(d,!1,s),rh(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Dd]||(l[Dd]=!0,rh("selectionchange",!1,l))}}function EN(s,l,d,f){switch(r2(l)){case 2:var y=mT;break;case 8:y=fT;break;default:y=yh}d=y.bind(null,l,d,s),y=void 0,!Sf||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),f?y!==void 0?s.addEventListener(l,d,{capture:!0,passive:y}):s.addEventListener(l,d,!0):y!==void 0?s.addEventListener(l,d,{passive:y}):s.addEventListener(l,d,!1)}function sh(s,l,d,f,y){var N=f;if((l&1)===0&&(l&2)===0&&f!==null)e:for(;;){if(f===null)return;var E=f.tag;if(E===3||E===4){var M=f.stateNode.containerInfo;if(M===y)break;if(E===4)for(E=f.return;E!==null;){var q=E.tag;if((q===3||q===4)&&E.stateNode.containerInfo===y)return;E=E.return}for(;M!==null;){if(E=hl(M),E===null)return;if(q=E.tag,q===5||q===6||q===26||q===27){f=N=E;continue e}M=M.parentNode}}f=f.return}Py(function(){var X=N,oe=Nf(d),me=[];e:{var Q=iv.get(s);if(Q!==void 0){var re=$c,Ae=s;switch(s){case"keypress":if(Ic(d)===0)break e;case"keydown":case"keyup":re=T6;break;case"focusin":Ae="focus",re=Ef;break;case"focusout":Ae="blur",re=Ef;break;case"beforeblur":case"afterblur":re=Ef;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=zy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=y6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=_6;break;case rv:case nv:case sv:re=N6;break;case lv:re=z6;break;case"scroll":case"scrollend":re=g6;break;case"wheel":re=B6;break;case"copy":case"cut":case"paste":re=S6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=By;break;case"toggle":case"beforetoggle":re=F6}var Re=(l&4)!==0,st=!Re&&(s==="scroll"||s==="scrollend"),J=Re?Q!==null?Q+"Capture":null:Q;Re=[];for(var Y=X,W;Y!==null;){var de=Y;if(W=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||W===null||J===null||(de=Fi(Y,J),de!=null&&Re.push(vo(Y,de,W))),st)break;Y=Y.return}0<Re.length&&(Q=new re(Q,Ae,null,d,oe),me.push({event:Q,listeners:Re}))}}if((l&7)===0){e:{if(Q=s==="mouseover"||s==="pointerover",re=s==="mouseout"||s==="pointerout",Q&&d!==jf&&(Ae=d.relatedTarget||d.fromElement)&&(hl(Ae)||Ae[pl]))break e;if((re||Q)&&(Q=oe.window===oe?oe:(Q=oe.ownerDocument)?Q.defaultView||Q.parentWindow:window,re?(Ae=d.relatedTarget||d.toElement,re=X,Ae=Ae?hl(Ae):null,Ae!==null&&(st=o(Ae),Re=Ae.tag,Ae!==st||Re!==5&&Re!==27&&Re!==6)&&(Ae=null)):(re=null,Ae=X),re!==Ae)){if(Re=zy,de="onMouseLeave",J="onMouseEnter",Y="mouse",(s==="pointerout"||s==="pointerover")&&(Re=By,de="onPointerLeave",J="onPointerEnter",Y="pointer"),st=re==null?Q:Ii(re),W=Ae==null?Q:Ii(Ae),Q=new Re(de,Y+"leave",re,d,oe),Q.target=st,Q.relatedTarget=W,de=null,hl(oe)===X&&(Re=new Re(J,Y+"enter",Ae,d,oe),Re.target=W,Re.relatedTarget=st,de=Re),st=de,re&&Ae)t:{for(Re=ID,J=re,Y=Ae,W=0,de=J;de;de=Re(de))W++;de=0;for(var Oe=Y;Oe;Oe=Re(Oe))de++;for(;0<W-de;)J=Re(J),W--;for(;0<de-W;)Y=Re(Y),de--;for(;W--;){if(J===Y||Y!==null&&J===Y.alternate){Re=J;break t}J=Re(J),Y=Re(Y)}Re=null}else Re=null;re!==null&&ON(me,Q,re,Re,!1),Ae!==null&&st!==null&&ON(me,st,Ae,Re,!0)}}e:{if(Q=X?Ii(X):window,re=Q.nodeName&&Q.nodeName.toLowerCase(),re==="select"||re==="input"&&Q.type==="file")var Ge=Yy;else if(Hy(Q))if(Ky)Ge=W6;else{Ge=G6;var ke=K6}else re=Q.nodeName,!re||re.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?X&&vf(X.elementType)&&(Ge=Yy):Ge=J6;if(Ge&&(Ge=Ge(s,X))){Vy(me,Ge,d,oe);break e}ke&&ke(s,Q,X),s==="focusout"&&X&&Q.type==="number"&&X.memoizedProps.value!=null&&yf(Q,"number",Q.value)}switch(ke=X?Ii(X):window,s){case"focusin":(Hy(ke)||ke.contentEditable==="true")&&(Sl=ke,_f=X,Gi=null);break;case"focusout":Gi=_f=Sl=null;break;case"mousedown":Mf=!0;break;case"contextmenu":case"mouseup":case"dragend":Mf=!1,tv(me,d,oe);break;case"selectionchange":if(Z6)break;case"keydown":case"keyup":tv(me,d,oe)}var Ie;if(Df)e:{switch(s){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else wl?Uy(s,d)&&(qe="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(qe="onCompositionStart");qe&&(Iy&&d.locale!=="ko"&&(wl||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&wl&&(Ie=_y()):(Fn=oe,Af="value"in Fn?Fn.value:Fn.textContent,wl=!0)),ke=Td(X,qe),0<ke.length&&(qe=new Ly(qe,s,null,d,oe),me.push({event:qe,listeners:ke}),Ie?qe.data=Ie:(Ie=qy(d),Ie!==null&&(qe.data=Ie)))),(Ie=U6?q6(s,d):H6(s,d))&&(qe=Td(X,"onBeforeInput"),0<qe.length&&(ke=new Ly("onBeforeInput","beforeinput",null,d,oe),me.push({event:ke,listeners:qe}),ke.data=Ie)),MD(me,s,X,d,oe)}kN(me,l)})}function vo(s,l,d){return{instance:s,listener:l,currentTarget:d}}function Td(s,l){for(var d=l+"Capture",f=[];s!==null;){var y=s,N=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||N===null||(y=Fi(s,d),y!=null&&f.unshift(vo(s,y,N)),y=Fi(s,l),y!=null&&f.push(vo(s,y,N))),s.tag===3)return f;s=s.return}return[]}function ID(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function ON(s,l,d,f,y){for(var N=l._reactName,E=[];d!==null&&d!==f;){var M=d,q=M.alternate,X=M.stateNode;if(M=M.tag,q!==null&&q===f)break;M!==5&&M!==26&&M!==27||X===null||(q=X,y?(X=Fi(d,N),X!=null&&E.unshift(vo(d,X,q))):y||(X=Fi(d,N),X!=null&&E.push(vo(d,X,q)))),d=d.return}E.length!==0&&s.push({event:l,listeners:E})}var FD=/\r\n?/g,$D=/\u0000|\uFFFD/g;function DN(s){return(typeof s=="string"?s:""+s).replace(FD,`
`).replace($D,"")}function TN(s,l){return l=DN(l),DN(s)===l}function nt(s,l,d,f,y,N){switch(d){case"children":typeof f=="string"?l==="body"||l==="textarea"&&f===""||vl(s,f):(typeof f=="number"||typeof f=="bigint")&&l!=="body"&&vl(s,""+f);break;case"className":Mc(s,"class",f);break;case"tabIndex":Mc(s,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":Mc(s,d,f);break;case"style":Ty(s,f,N);break;case"data":if(l!=="object"){Mc(s,"data",f);break}case"src":case"href":if(f===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){s.removeAttribute(d);break}f=Lc(""+f),s.setAttribute(d,f);break;case"action":case"formAction":if(typeof f=="function"){s.setAttribute(d,"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 N=="function"&&(d==="formAction"?(l!=="input"&&nt(s,l,"name",y.name,y,null),nt(s,l,"formEncType",y.formEncType,y,null),nt(s,l,"formMethod",y.formMethod,y,null),nt(s,l,"formTarget",y.formTarget,y,null)):(nt(s,l,"encType",y.encType,y,null),nt(s,l,"method",y.method,y,null),nt(s,l,"target",y.target,y,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){s.removeAttribute(d);break}f=Lc(""+f),s.setAttribute(d,f);break;case"onClick":f!=null&&(s.onclick=Wr);break;case"onScroll":f!=null&&$e("scroll",s);break;case"onScrollEnd":f!=null&&$e("scrollend",s);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(n(61));if(d=f.__html,d!=null){if(y.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"multiple":s.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":s.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){s.removeAttribute("xlink:href");break}d=Lc(""+f),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?s.setAttribute(d,""+f):s.removeAttribute(d);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":f&&typeof f!="function"&&typeof f!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":f===!0?s.setAttribute(d,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?s.setAttribute(d,f):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?s.setAttribute(d,f):s.removeAttribute(d);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?s.removeAttribute(d):s.setAttribute(d,f);break;case"popover":$e("beforetoggle",s),$e("toggle",s),_c(s,"popover",f);break;case"xlinkActuate":Jr(s,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Jr(s,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Jr(s,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Jr(s,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Jr(s,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Jr(s,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Jr(s,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Jr(s,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Jr(s,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":_c(s,"is",f);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=h6.get(d)||d,_c(s,d,f))}}function lh(s,l,d,f,y,N){switch(d){case"style":Ty(s,f,N);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(n(61));if(d=f.__html,d!=null){if(y.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"children":typeof f=="string"?vl(s,f):(typeof f=="number"||typeof f=="bigint")&&vl(s,""+f);break;case"onScroll":f!=null&&$e("scroll",s);break;case"onScrollEnd":f!=null&&$e("scrollend",s);break;case"onClick":f!=null&&(s.onclick=Wr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ny.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(y=d.endsWith("Capture"),l=d.slice(2,y?d.length-7:void 0),N=s[Sa]||null,N=N!=null?N[d]:null,typeof N=="function"&&s.removeEventListener(l,N,y),typeof f=="function")){typeof N!="function"&&N!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,f,y);break e}d in s?s[d]=f:f===!0?s.setAttribute(d,""):_c(s,d,f)}}}function sa(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",s),$e("load",s);var f=!1,y=!1,N;for(N in d)if(d.hasOwnProperty(N)){var E=d[N];if(E!=null)switch(N){case"src":f=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:nt(s,l,N,E,d,null)}}y&&nt(s,l,"srcSet",d.srcSet,d,null),f&&nt(s,l,"src",d.src,d,null);return;case"input":$e("invalid",s);var M=N=E=y=null,q=null,X=null;for(f in d)if(d.hasOwnProperty(f)){var oe=d[f];if(oe!=null)switch(f){case"name":y=oe;break;case"type":E=oe;break;case"checked":q=oe;break;case"defaultChecked":X=oe;break;case"value":N=oe;break;case"defaultValue":M=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(n(137,l));break;default:nt(s,l,f,oe,d,null)}}ky(s,N,M,q,X,E,y,!1);return;case"select":$e("invalid",s),f=E=N=null;for(y in d)if(d.hasOwnProperty(y)&&(M=d[y],M!=null))switch(y){case"value":N=M;break;case"defaultValue":E=M;break;case"multiple":f=M;default:nt(s,l,y,M,d,null)}l=N,d=E,s.multiple=!!f,l!=null?yl(s,!!f,l,!1):d!=null&&yl(s,!!f,d,!0);return;case"textarea":$e("invalid",s),N=y=f=null;for(E in d)if(d.hasOwnProperty(E)&&(M=d[E],M!=null))switch(E){case"value":f=M;break;case"defaultValue":y=M;break;case"children":N=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(n(91));break;default:nt(s,l,E,M,d,null)}Oy(s,f,y,N);return;case"option":for(q in d)if(d.hasOwnProperty(q)&&(f=d[q],f!=null))switch(q){case"selected":s.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:nt(s,l,q,f,d,null)}return;case"dialog":$e("beforetoggle",s),$e("toggle",s),$e("cancel",s),$e("close",s);break;case"iframe":case"object":$e("load",s);break;case"video":case"audio":for(f=0;f<yo.length;f++)$e(yo[f],s);break;case"image":$e("error",s),$e("load",s);break;case"details":$e("toggle",s);break;case"embed":case"source":case"link":$e("error",s),$e("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in d)if(d.hasOwnProperty(X)&&(f=d[X],f!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:nt(s,l,X,f,d,null)}return;default:if(vf(l)){for(oe in d)d.hasOwnProperty(oe)&&(f=d[oe],f!==void 0&&lh(s,l,oe,f,d,void 0));return}}for(M in d)d.hasOwnProperty(M)&&(f=d[M],f!=null&&nt(s,l,M,f,d,null))}function UD(s,l,d,f){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,N=null,E=null,M=null,q=null,X=null,oe=null;for(re in d){var me=d[re];if(d.hasOwnProperty(re)&&me!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":q=me;default:f.hasOwnProperty(re)||nt(s,l,re,null,f,me)}}for(var Q in f){var re=f[Q];if(me=d[Q],f.hasOwnProperty(Q)&&(re!=null||me!=null))switch(Q){case"type":N=re;break;case"name":y=re;break;case"checked":X=re;break;case"defaultChecked":oe=re;break;case"value":E=re;break;case"defaultValue":M=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(n(137,l));break;default:re!==me&&nt(s,l,Q,re,f,me)}}bf(s,E,M,q,X,oe,N,y);return;case"select":re=E=M=Q=null;for(N in d)if(q=d[N],d.hasOwnProperty(N)&&q!=null)switch(N){case"value":break;case"multiple":re=q;default:f.hasOwnProperty(N)||nt(s,l,N,null,f,q)}for(y in f)if(N=f[y],q=d[y],f.hasOwnProperty(y)&&(N!=null||q!=null))switch(y){case"value":Q=N;break;case"defaultValue":M=N;break;case"multiple":E=N;default:N!==q&&nt(s,l,y,N,f,q)}l=M,d=E,f=re,Q!=null?yl(s,!!d,Q,!1):!!f!=!!d&&(l!=null?yl(s,!!d,l,!0):yl(s,!!d,d?[]:"",!1));return;case"textarea":re=Q=null;for(M in d)if(y=d[M],d.hasOwnProperty(M)&&y!=null&&!f.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:nt(s,l,M,null,f,y)}for(E in f)if(y=f[E],N=d[E],f.hasOwnProperty(E)&&(y!=null||N!=null))switch(E){case"value":Q=y;break;case"defaultValue":re=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(n(91));break;default:y!==N&&nt(s,l,E,y,f,N)}Ey(s,Q,re);return;case"option":for(var Ae in d)if(Q=d[Ae],d.hasOwnProperty(Ae)&&Q!=null&&!f.hasOwnProperty(Ae))switch(Ae){case"selected":s.selected=!1;break;default:nt(s,l,Ae,null,f,Q)}for(q in f)if(Q=f[q],re=d[q],f.hasOwnProperty(q)&&Q!==re&&(Q!=null||re!=null))switch(q){case"selected":s.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:nt(s,l,q,Q,f,re)}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 Re in d)Q=d[Re],d.hasOwnProperty(Re)&&Q!=null&&!f.hasOwnProperty(Re)&&nt(s,l,Re,null,f,Q);for(X in f)if(Q=f[X],re=d[X],f.hasOwnProperty(X)&&Q!==re&&(Q!=null||re!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(n(137,l));break;default:nt(s,l,X,Q,f,re)}return;default:if(vf(l)){for(var st in d)Q=d[st],d.hasOwnProperty(st)&&Q!==void 0&&!f.hasOwnProperty(st)&&lh(s,l,st,void 0,f,Q);for(oe in f)Q=f[oe],re=d[oe],!f.hasOwnProperty(oe)||Q===re||Q===void 0&&re===void 0||lh(s,l,oe,Q,f,re);return}}for(var J in d)Q=d[J],d.hasOwnProperty(J)&&Q!=null&&!f.hasOwnProperty(J)&&nt(s,l,J,null,f,Q);for(me in f)Q=f[me],re=d[me],!f.hasOwnProperty(me)||Q===re||Q==null&&re==null||nt(s,l,me,Q,f,re)}function RN(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qD(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),f=0;f<d.length;f++){var y=d[f],N=y.transferSize,E=y.initiatorType,M=y.duration;if(N&&M&&RN(E)){for(E=0,M=y.responseEnd,f+=1;f<d.length;f++){var q=d[f],X=q.startTime;if(X>M)break;var oe=q.transferSize,me=q.initiatorType;oe&&RN(me)&&(q=q.responseEnd,E+=oe*(q<M?1:(M-X)/(q-X)))}if(--f,l+=8*(N+E)/(y.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var ih=null,oh=null;function Rd(s){return s.nodeType===9?s:s.ownerDocument}function PN(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _N(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function ch(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var dh=null;function HD(){var s=window.event;return s&&s.type==="popstate"?s===dh?!1:(dh=s,!0):(dh=null,!1)}var MN=typeof setTimeout=="function"?setTimeout:void 0,VD=typeof clearTimeout=="function"?clearTimeout:void 0,zN=typeof Promise=="function"?Promise:void 0,YD=typeof queueMicrotask=="function"?queueMicrotask:typeof zN<"u"?function(s){return zN.resolve(null).then(s).catch(KD)}:MN;function KD(s){setTimeout(function(){throw s})}function rs(s){return s==="head"}function LN(s,l){var d=l,f=0;do{var y=d.nextSibling;if(s.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"||d==="/&"){if(f===0){s.removeChild(y),Xl(l);return}f--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")f++;else if(d==="html")jo(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,jo(d);for(var N=d.firstChild;N;){var E=N.nextSibling,M=N.nodeName;N[Bi]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&N.rel.toLowerCase()==="stylesheet"||d.removeChild(N),N=E}}else d==="body"&&jo(s.ownerDocument.body);d=y}while(d);Xl(l)}function BN(s,l){var d=s;s=0;do{var f=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),f&&f.nodeType===8)if(d=f.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=f}while(d)}function uh(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":uh(d),xf(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function GD(s,l,d,f){for(;s.nodeType===1;){var y=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!f&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(f){if(!s[Bi])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(N=s.getAttribute("rel"),N==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(N!==y.rel||s.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||s.getAttribute("title")!==(y.title==null?null:y.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(N=s.getAttribute("src"),(N!==(y.src==null?null:y.src)||s.getAttribute("type")!==(y.type==null?null:y.type)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&N&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var N=y.name==null?null:""+y.name;if(y.type==="hidden"&&s.getAttribute("name")===N)return s}else return s;if(s=ir(s.nextSibling),s===null)break}return null}function JD(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=ir(s.nextSibling),s===null))return null;return s}function IN(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=ir(s.nextSibling),s===null))return null;return s}function mh(s){return s.data==="$?"||s.data==="$~"}function fh(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function WD(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var f=function(){l(),d.removeEventListener("DOMContentLoaded",f)};d.addEventListener("DOMContentLoaded",f),s._reactRetry=f}}function ir(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var ph=null;function FN(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return ir(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function $N(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return s;l--}else d!=="/$"&&d!=="/&"||l++}s=s.previousSibling}return null}function UN(s,l,d){switch(l=Rd(d),s){case"html":if(s=l.documentElement,!s)throw Error(n(452));return s;case"head":if(s=l.head,!s)throw Error(n(453));return s;case"body":if(s=l.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function jo(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);xf(s)}var or=new Map,qN=new Set;function Pd(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var fn=K.d;K.d={f:XD,r:ZD,D:QD,C:eT,L:tT,m:aT,X:nT,S:rT,M:sT};function XD(){var s=fn.f(),l=Sd();return s||l}function ZD(s){var l=xl(s);l!==null&&l.tag===5&&l.type==="form"?lj(l):fn.r(s)}var Gl=typeof document>"u"?null:document;function HN(s,l,d){var f=Gl;if(f&&typeof l=="string"&&l){var y=er(l);y='link[rel="'+s+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),qN.has(y)||(qN.add(y),s={rel:s,crossOrigin:d,href:l},f.querySelector(y)===null&&(l=f.createElement("link"),sa(l,"link",s),qt(l),f.head.appendChild(l)))}}function QD(s){fn.D(s),HN("dns-prefetch",s,null)}function eT(s,l){fn.C(s,l),HN("preconnect",s,l)}function tT(s,l,d){fn.L(s,l,d);var f=Gl;if(f&&s&&l){var y='link[rel="preload"][as="'+er(l)+'"]';l==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+er(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+er(d.imageSizes)+'"]')):y+='[href="'+er(s)+'"]';var N=y;switch(l){case"style":N=Jl(s);break;case"script":N=Wl(s)}or.has(N)||(s=x({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),or.set(N,s),f.querySelector(y)!==null||l==="style"&&f.querySelector(No(N))||l==="script"&&f.querySelector(wo(N))||(l=f.createElement("link"),sa(l,"link",s),qt(l),f.head.appendChild(l)))}}function aT(s,l){fn.m(s,l);var d=Gl;if(d&&s){var f=l&&typeof l.as=="string"?l.as:"script",y='link[rel="modulepreload"][as="'+er(f)+'"][href="'+er(s)+'"]',N=y;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":N=Wl(s)}if(!or.has(N)&&(s=x({rel:"modulepreload",href:s},l),or.set(N,s),d.querySelector(y)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(wo(N)))return}f=d.createElement("link"),sa(f,"link",s),qt(f),d.head.appendChild(f)}}}function rT(s,l,d){fn.S(s,l,d);var f=Gl;if(f&&s){var y=gl(f).hoistableStyles,N=Jl(s);l=l||"default";var E=y.get(N);if(!E){var M={loading:0,preload:null};if(E=f.querySelector(No(N)))M.loading=5;else{s=x({rel:"stylesheet",href:s,"data-precedence":l},d),(d=or.get(N))&&hh(s,d);var q=E=f.createElement("link");qt(q),sa(q,"link",s),q._p=new Promise(function(X,oe){q.onload=X,q.onerror=oe}),q.addEventListener("load",function(){M.loading|=1}),q.addEventListener("error",function(){M.loading|=2}),M.loading|=4,_d(E,l,f)}E={type:"stylesheet",instance:E,count:1,state:M},y.set(N,E)}}}function nT(s,l){fn.X(s,l);var d=Gl;if(d&&s){var f=gl(d).hoistableScripts,y=Wl(s),N=f.get(y);N||(N=d.querySelector(wo(y)),N||(s=x({src:s,async:!0},l),(l=or.get(y))&&xh(s,l),N=d.createElement("script"),qt(N),sa(N,"link",s),d.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},f.set(y,N))}}function sT(s,l){fn.M(s,l);var d=Gl;if(d&&s){var f=gl(d).hoistableScripts,y=Wl(s),N=f.get(y);N||(N=d.querySelector(wo(y)),N||(s=x({src:s,async:!0,type:"module"},l),(l=or.get(y))&&xh(s,l),N=d.createElement("script"),qt(N),sa(N,"link",s),d.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},f.set(y,N))}}function VN(s,l,d,f){var y=(y=ue.current)?Pd(y):null;if(!y)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Jl(d.href),d=gl(y).hoistableStyles,f=d.get(l),f||(f={type:"style",instance:null,count:0,state:null},d.set(l,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=Jl(d.href);var N=gl(y).hoistableStyles,E=N.get(s);if(E||(y=y.ownerDocument||y,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},N.set(s,E),(N=y.querySelector(No(s)))&&!N._p&&(E.instance=N,E.state.loading=5),or.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},or.set(s,d),N||lT(y,s,d,E.state))),l&&f===null)throw Error(n(528,""));return E}if(l&&f!==null)throw Error(n(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Wl(d),d=gl(y).hoistableScripts,f=d.get(l),f||(f={type:"script",instance:null,count:0,state:null},d.set(l,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function Jl(s){return'href="'+er(s)+'"'}function No(s){return'link[rel="stylesheet"]['+s+"]"}function YN(s){return x({},s,{"data-precedence":s.precedence,precedence:null})}function lT(s,l,d,f){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?f.loading=1:(l=s.createElement("link"),f.preload=l,l.addEventListener("load",function(){return f.loading|=1}),l.addEventListener("error",function(){return f.loading|=2}),sa(l,"link",d),qt(l),s.head.appendChild(l))}function Wl(s){return'[src="'+er(s)+'"]'}function wo(s){return"script[async]"+s}function KN(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var f=s.querySelector('style[data-href~="'+er(d.href)+'"]');if(f)return l.instance=f,qt(f),f;var y=x({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return f=(s.ownerDocument||s).createElement("style"),qt(f),sa(f,"style",y),_d(f,d.precedence,s),l.instance=f;case"stylesheet":y=Jl(d.href);var N=s.querySelector(No(y));if(N)return l.state.loading|=4,l.instance=N,qt(N),N;f=YN(d),(y=or.get(y))&&hh(f,y),N=(s.ownerDocument||s).createElement("link"),qt(N);var E=N;return E._p=new Promise(function(M,q){E.onload=M,E.onerror=q}),sa(N,"link",f),l.state.loading|=4,_d(N,d.precedence,s),l.instance=N;case"script":return N=Wl(d.src),(y=s.querySelector(wo(N)))?(l.instance=y,qt(y),y):(f=d,(y=or.get(N))&&(f=x({},d),xh(f,y)),s=s.ownerDocument||s,y=s.createElement("script"),qt(y),sa(y,"link",f),s.head.appendChild(y),l.instance=y);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(f=l.instance,l.state.loading|=4,_d(f,d.precedence,s));return l.instance}function _d(s,l,d){for(var f=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=f.length?f[f.length-1]:null,N=y,E=0;E<f.length;E++){var M=f[E];if(M.dataset.precedence===l)N=M;else if(N!==y)break}N?N.parentNode.insertBefore(s,N.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function hh(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function xh(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Md=null;function GN(s,l,d){if(Md===null){var f=new Map,y=Md=new Map;y.set(d,f)}else y=Md,f=y.get(d),f||(f=new Map,y.set(d,f));if(f.has(s))return f;for(f.set(s,null),d=d.getElementsByTagName(s),y=0;y<d.length;y++){var N=d[y];if(!(N[Bi]||N[ta]||s==="link"&&N.getAttribute("rel")==="stylesheet")&&N.namespaceURI!=="http://www.w3.org/2000/svg"){var E=N.getAttribute(l)||"";E=s+E;var M=f.get(E);M?M.push(N):f.set(E,[N])}}return f}function JN(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function iT(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function WN(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function oT(s,l,d,f){if(d.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var y=Jl(f.href),N=l.querySelector(No(y));if(N){l=N._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=zd.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=N,qt(N);return}N=l.ownerDocument||l,f=YN(f),(y=or.get(y))&&hh(f,y),N=N.createElement("link"),qt(N);var E=N;E._p=new Promise(function(M,q){E.onload=M,E.onerror=q}),sa(N,"link",f),d.instance=N}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=zd.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var gh=0;function cT(s,l){return s.stylesheets&&s.count===0&&Bd(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var f=setTimeout(function(){if(s.stylesheets&&Bd(s,s.stylesheets),s.unsuspend){var N=s.unsuspend;s.unsuspend=null,N()}},6e4+l);0<s.imgBytes&&gh===0&&(gh=62500*qD());var y=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Bd(s,s.stylesheets),s.unsuspend)){var N=s.unsuspend;s.unsuspend=null,N()}},(s.imgBytes>gh?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(f),clearTimeout(y)}}:null}function zd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Ld=null;function Bd(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Ld=new Map,l.forEach(dT,s),Ld=null,zd.call(s))}function dT(s,l){if(!(l.state.loading&4)){var d=Ld.get(s);if(d)var f=d.get(null);else{d=new Map,Ld.set(s,d);for(var y=s.querySelectorAll("link[data-precedence],style[data-precedence]"),N=0;N<y.length;N++){var E=y[N];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(d.set(E.dataset.precedence,E),f=E)}f&&d.set(null,f)}y=l.instance,E=y.getAttribute("data-precedence"),N=d.get(E)||f,N===f&&d.set(null,y),d.set(E,y),this.count++,f=zd.bind(this),y.addEventListener("load",f),y.addEventListener("error",f),N?N.parentNode.insertBefore(y,N.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(y,s.firstChild)),l.state.loading|=4}}var So={$$typeof:k,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function uT(s,l,d,f,y,N,E,M,q){this.tag=1,this.containerInfo=s,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=mf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mf(0),this.hiddenUpdates=mf(null),this.identifierPrefix=f,this.onUncaughtError=y,this.onCaughtError=N,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function XN(s,l,d,f,y,N,E,M,q,X,oe,me){return s=new uT(s,l,d,E,q,X,oe,me,M),l=1,N===!0&&(l|=24),N=Ba(3,null,null,l),s.current=N,N.stateNode=s,l=Wf(),l.refCount++,s.pooledCache=l,l.refCount++,N.memoizedState={element:f,isDehydrated:d,cache:l},ep(N),s}function ZN(s){return s?(s=kl,s):kl}function QN(s,l,d,f,y,N){y=ZN(y),f.context===null?f.context=y:f.pendingContext=y,f=Yn(l),f.payload={element:d},N=N===void 0?null:N,N!==null&&(f.callback=N),d=Kn(s,f,l),d!==null&&(Da(d,s,l),to(d,s,l))}function e2(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function bh(s,l){e2(s,l),(s=s.alternate)&&e2(s,l)}function t2(s){if(s.tag===13||s.tag===31){var l=Ds(s,67108864);l!==null&&Da(l,s,67108864),bh(s,67108864)}}function a2(s){if(s.tag===13||s.tag===31){var l=qa();l=ff(l);var d=Ds(s,l);d!==null&&Da(d,s,l),bh(s,l)}}var Id=!0;function mT(s,l,d,f){var y=V.T;V.T=null;var N=K.p;try{K.p=2,yh(s,l,d,f)}finally{K.p=N,V.T=y}}function fT(s,l,d,f){var y=V.T;V.T=null;var N=K.p;try{K.p=8,yh(s,l,d,f)}finally{K.p=N,V.T=y}}function yh(s,l,d,f){if(Id){var y=vh(f);if(y===null)sh(s,l,f,Fd,d),n2(s,f);else if(hT(y,s,l,d,f))f.stopPropagation();else if(n2(s,f),l&4&&-1<pT.indexOf(s)){for(;y!==null;){var N=xl(y);if(N!==null)switch(N.tag){case 3:if(N=N.stateNode,N.current.memoizedState.isDehydrated){var E=As(N.pendingLanes);if(E!==0){var M=N;for(M.pendingLanes|=2,M.entangledLanes|=2;E;){var q=1<<31-ea(E);M.entanglements[1]|=q,E&=~q}Lr(N),(Ze&6)===0&&(Nd=ye()+500,bo(0))}}break;case 31:case 13:M=Ds(N,2),M!==null&&Da(M,N,2),Sd(),bh(N,2)}if(N=vh(f),N===null&&sh(s,l,f,Fd,d),N===y)break;y=N}y!==null&&f.stopPropagation()}else sh(s,l,f,null,d)}}function vh(s){return s=Nf(s),jh(s)}var Fd=null;function jh(s){if(Fd=null,s=hl(s),s!==null){var l=o(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=c(l),s!==null)return s;s=null}else if(d===31){if(s=m(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return Fd=s,null}function r2(s){switch(s){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(Pe()){case jt:return 2;case At:return 8;case $t:case Ss:return 32;case Kr:return 268435456;default:return 32}default:return 32}}var Nh=!1,ns=null,ss=null,ls=null,Ao=new Map,Co=new Map,is=[],pT="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 n2(s,l){switch(s){case"focusin":case"focusout":ns=null;break;case"dragenter":case"dragleave":ss=null;break;case"mouseover":case"mouseout":ls=null;break;case"pointerover":case"pointerout":Ao.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Co.delete(l.pointerId)}}function ko(s,l,d,f,y,N){return s===null||s.nativeEvent!==N?(s={blockedOn:l,domEventName:d,eventSystemFlags:f,nativeEvent:N,targetContainers:[y]},l!==null&&(l=xl(l),l!==null&&t2(l)),s):(s.eventSystemFlags|=f,l=s.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),s)}function hT(s,l,d,f,y){switch(l){case"focusin":return ns=ko(ns,s,l,d,f,y),!0;case"dragenter":return ss=ko(ss,s,l,d,f,y),!0;case"mouseover":return ls=ko(ls,s,l,d,f,y),!0;case"pointerover":var N=y.pointerId;return Ao.set(N,ko(Ao.get(N)||null,s,l,d,f,y)),!0;case"gotpointercapture":return N=y.pointerId,Co.set(N,ko(Co.get(N)||null,s,l,d,f,y)),!0}return!1}function s2(s){var l=hl(s.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=c(d),l!==null){s.blockedOn=l,yy(s.priority,function(){a2(d)});return}}else if(l===31){if(l=m(d),l!==null){s.blockedOn=l,yy(s.priority,function(){a2(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function $d(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=vh(s.nativeEvent);if(d===null){d=s.nativeEvent;var f=new d.constructor(d.type,d);jf=f,d.target.dispatchEvent(f),jf=null}else return l=xl(d),l!==null&&t2(l),s.blockedOn=d,!1;l.shift()}return!0}function l2(s,l,d){$d(s)&&d.delete(l)}function xT(){Nh=!1,ns!==null&&$d(ns)&&(ns=null),ss!==null&&$d(ss)&&(ss=null),ls!==null&&$d(ls)&&(ls=null),Ao.forEach(l2),Co.forEach(l2)}function Ud(s,l){s.blockedOn===l&&(s.blockedOn=null,Nh||(Nh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,xT)))}var qd=null;function i2(s){qd!==s&&(qd=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qd===s&&(qd=null);for(var l=0;l<s.length;l+=3){var d=s[l],f=s[l+1],y=s[l+2];if(typeof f!="function"){if(jh(f||d)===null)continue;break}var N=xl(d);N!==null&&(s.splice(l,3),l-=3,vp(N,{pending:!0,data:y,method:d.method,action:f},f,y))}}))}function Xl(s){function l(q){return Ud(q,s)}ns!==null&&Ud(ns,s),ss!==null&&Ud(ss,s),ls!==null&&Ud(ls,s),Ao.forEach(l),Co.forEach(l);for(var d=0;d<is.length;d++){var f=is[d];f.blockedOn===s&&(f.blockedOn=null)}for(;0<is.length&&(d=is[0],d.blockedOn===null);)s2(d),d.blockedOn===null&&is.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(f=0;f<d.length;f+=3){var y=d[f],N=d[f+1],E=y[Sa]||null;if(typeof N=="function")E||i2(d);else if(E){var M=null;if(N&&N.hasAttribute("formAction")){if(y=N,E=N[Sa]||null)M=E.formAction;else if(jh(y)!==null)continue}else M=E.action;typeof M=="function"?d[f+1]=M:(d.splice(f,3),f-=3),i2(d)}}}function o2(){function s(N){N.canIntercept&&N.info==="react-transition"&&N.intercept({handler:function(){return new Promise(function(E){return y=E})},focusReset:"manual",scroll:"manual"})}function l(){y!==null&&(y(),y=null),f||setTimeout(d,20)}function d(){if(!f&&!navigation.transition){var N=navigation.currentEntry;N&&N.url!=null&&navigation.navigate(N.url,{state:N.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,y=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){f=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),y!==null&&(y(),y=null)}}}function wh(s){this._internalRoot=s}Hd.prototype.render=wh.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var d=l.current,f=qa();QN(d,f,s,l,null,null)},Hd.prototype.unmount=wh.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;QN(s.current,2,null,s,null,null),Sd(),l[pl]=null}};function Hd(s){this._internalRoot=s}Hd.prototype.unstable_scheduleHydration=function(s){if(s){var l=by();s={blockedOn:null,target:s,priority:l};for(var d=0;d<is.length&&l!==0&&l<is[d].priority;d++);is.splice(d,0,s),d===0&&s2(s)}};var c2=a.version;if(c2!=="19.2.0")throw Error(n(527,c2,"19.2.0"));K.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=h(l),s=s!==null?p(s):null,s=s===null?null:s.stateNode,s};var gT={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vd.isDisabled&&Vd.supportsFiber)try{Gr=Vd.inject(gT),Ut=Vd}catch{}}return Oo.createRoot=function(s,l){if(!i(s))throw Error(n(299));var d=!1,f="",y=xj,N=gj,E=bj;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(N=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError)),l=XN(s,1,!1,null,null,d,f,null,y,N,E,o2),s[pl]=l.current,nh(s),new wh(l)},Oo.hydrateRoot=function(s,l,d){if(!i(s))throw Error(n(299));var f=!1,y="",N=xj,E=gj,M=bj,q=null;return d!=null&&(d.unstable_strictMode===!0&&(f=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(N=d.onUncaughtError),d.onCaughtError!==void 0&&(E=d.onCaughtError),d.onRecoverableError!==void 0&&(M=d.onRecoverableError),d.formState!==void 0&&(q=d.formState)),l=XN(s,1,!0,l,d??null,f,y,q,N,E,M,o2),l.context=ZN(null),d=l.current,f=qa(),f=ff(f),y=Yn(f),y.callback=null,Kn(d,y,f),d=f,l.current.lanes=d,Li(l,d),Lr(l),s[pl]=l.current,nh(s),new Hd(l)},Oo.version="19.2.0",Oo}var y2;function ET(){if(y2)return Ch.exports;y2=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),Ch.exports=kT(),Ch.exports}var OT=ET(),Dh={exports:{}},Th={};/**
* @license React
* use-sync-external-store-with-selector.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 v2;function DT(){if(v2)return Th;v2=1;var e=hi();function a(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:a,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,c=e.useMemo,m=e.useDebugValue;return Th.useSyncExternalStoreWithSelector=function(u,h,p,x,j){var v=i(null);if(v.current===null){var w={hasValue:!1,value:null};v.current=w}else w=v.current;v=c(function(){function S(D){if(!g){if(g=!0,C=D,D=x(D),j!==void 0&&w.hasValue){var B=w.value;if(j(B,D))return k=B}return k=D}if(B=k,r(C,D))return B;var L=x(D);return j!==void 0&&j(B,L)?(C=D,B):(C=D,k=L)}var g=!1,C,k,O=p===void 0?null:p;return[function(){return S(h())},O===null?void 0:function(){return S(O())}]},[h,p,x,j]);var A=n(u,v[0],v[1]);return o(function(){w.hasValue=!0,w.value=A},[A]),m(A),A},Th}var j2;function TT(){return j2||(j2=1,Dh.exports=DT()),Dh.exports}var RT=TT();function PT(e){e()}function _T(){let e=null,a=null;return{clear(){e=null,a=null},notify(){PT(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=a={callback:r,next:null,prev:a};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:a=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var N2={notify(){},get:()=>[]};function MT(e,a){let r,n=N2,i=0,o=!1;function c(A){p();const S=n.subscribe(A);let g=!1;return()=>{g||(g=!0,S(),x())}}function m(){n.notify()}function u(){w.onStateChange&&w.onStateChange()}function h(){return o}function p(){i++,r||(r=e.subscribe(u),n=_T())}function x(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=N2)}function j(){o||(o=!0,p())}function v(){o&&(o=!1,x())}const w={addNestedSub:c,notifyNestedSubs:m,handleChangeWrapper:u,isSubscribed:h,trySubscribe:j,tryUnsubscribe:v,getListeners:()=>n};return w}var zT=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",LT=zT(),BT=()=>typeof navigator<"u"&&navigator.product==="ReactNative",IT=BT(),FT=()=>LT||IT?b.useLayoutEffect:b.useEffect,$T=FT(),UT=Symbol.for("react-redux-context"),qT=typeof globalThis<"u"?globalThis:{};function HT(){if(!b.createContext)return{};const e=qT[UT]??=new Map;let a=e.get(b.createContext);return a||(a=b.createContext(null),e.set(b.createContext,a)),a}var ps=HT();function VT(e){const{children:a,context:r,serverState:n,store:i}=e,o=b.useMemo(()=>{const u=MT(i);return{store:i,subscription:u,getServerState:n?()=>n:void 0}},[i,n]),c=b.useMemo(()=>i.getState(),[i]);$T(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),c!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,c]);const m=r||ps;return b.createElement(m.Provider,{value:o},a)}var u3=VT;function Sb(e=ps){return function(){return b.useContext(e)}}var m3=Sb();function f3(e=ps){const a=e===ps?m3:Sb(e),r=()=>{const{store:n}=a();return n};return Object.assign(r,{withTypes:()=>r}),r}var YT=f3();function KT(e=ps){const a=e===ps?YT:f3(e),r=()=>a().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var bs=KT(),GT=(e,a)=>e===a;function JT(e=ps){const a=e===ps?m3:Sb(e),r=(n,i={})=>{const{equalityFn:o=GT}=typeof i=="function"?{equalityFn:i}:i,c=a(),{store:m,subscription:u,getServerState:h}=c;b.useRef(!0);const p=b.useCallback({[n.name](j){return n(j)}}[n.name],[n]),x=RT.useSyncExternalStoreWithSelector(u.addNestedSub,m.getState,h||m.getState,p,o);return b.useDebugValue(x),x};return Object.assign(r,{withTypes:()=>r}),r}var br=JT();function la(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var WT=typeof Symbol=="function"&&Symbol.observable||"@@observable",w2=WT,Rh=()=>Math.random().toString(36).substring(7).split("").join("."),XT={INIT:`@@redux/INIT${Rh()}`,REPLACE:`@@redux/REPLACE${Rh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Rh()}`},Cu=XT;function Ab(e){if(typeof e!="object"||e===null)return!1;let a=e;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(e)===a||Object.getPrototypeOf(e)===null}function p3(e,a,r){if(typeof e!="function")throw new Error(la(2));if(typeof a=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(la(0));if(typeof a=="function"&&typeof r>"u"&&(r=a,a=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(la(1));return r(p3)(e,a)}let n=e,i=a,o=new Map,c=o,m=0,u=!1;function h(){c===o&&(c=new Map,o.forEach((S,g)=>{c.set(g,S)}))}function p(){if(u)throw new Error(la(3));return i}function x(S){if(typeof S!="function")throw new Error(la(4));if(u)throw new Error(la(5));let g=!0;h();const C=m++;return c.set(C,S),function(){if(g){if(u)throw new Error(la(6));g=!1,h(),c.delete(C),o=null}}}function j(S){if(!Ab(S))throw new Error(la(7));if(typeof S.type>"u")throw new Error(la(8));if(typeof S.type!="string")throw new Error(la(17));if(u)throw new Error(la(9));try{u=!0,i=n(i,S)}finally{u=!1}return(o=c).forEach(C=>{C()}),S}function v(S){if(typeof S!="function")throw new Error(la(10));n=S,j({type:Cu.REPLACE})}function w(){const S=x;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(la(11));function C(){const O=g;O.next&&O.next(p())}return C(),{unsubscribe:S(C)}},[w2](){return this}}}return j({type:Cu.INIT}),{dispatch:j,subscribe:x,getState:p,replaceReducer:v,[w2]:w}}function ZT(e){Object.keys(e).forEach(a=>{const r=e[a];if(typeof r(void 0,{type:Cu.INIT})>"u")throw new Error(la(12));if(typeof r(void 0,{type:Cu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(la(13))})}function h3(e){const a=Object.keys(e),r={};for(let o=0;o<a.length;o++){const c=a[o];typeof e[c]=="function"&&(r[c]=e[c])}const n=Object.keys(r);let i;try{ZT(r)}catch(o){i=o}return function(c={},m){if(i)throw i;let u=!1;const h={};for(let p=0;p<n.length;p++){const x=n[p],j=r[x],v=c[x],w=j(v,m);if(typeof w>"u")throw m&&m.type,new Error(la(14));h[x]=w,u=u||w!==v}return u=u||n.length!==Object.keys(c).length,u?h:c}}function ku(...e){return e.length===0?a=>a:e.length===1?e[0]:e.reduce((a,r)=>(...n)=>a(r(...n)))}function QT(...e){return a=>(r,n)=>{const i=a(r,n);let o=()=>{throw new Error(la(15))};const c={getState:i.getState,dispatch:(u,...h)=>o(u,...h)},m=e.map(u=>u(c));return o=ku(...m)(i.dispatch),{...i,dispatch:o}}}function x3(e){return Ab(e)&&"type"in e&&typeof e.type=="string"}var g3=Symbol.for("immer-nothing"),S2=Symbol.for("immer-draftable"),Ja=Symbol.for("immer-state");function Ar(e,...a){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jo=Object.getPrototypeOf;function rl(e){return!!e&&!!e[Ja]}function Nn(e){return e?b3(e)||Array.isArray(e)||!!e[S2]||!!e.constructor?.[S2]||oc(e)||jm(e):!1}var e5=Object.prototype.constructor.toString(),A2=new WeakMap;function b3(e){if(!e||typeof e!="object")return!1;const a=Object.getPrototypeOf(e);if(a===null||a===Object.prototype)return!0;const r=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=A2.get(r);return n===void 0&&(n=Function.toString.call(r),A2.set(r,n)),n===e5}function Eu(e,a,r=!0){vm(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{a(i,e[i],e)}):e.forEach((n,i)=>a(i,n,e))}function vm(e){const a=e[Ja];return a?a.type_:Array.isArray(e)?1:oc(e)?2:jm(e)?3:0}function jg(e,a){return vm(e)===2?e.has(a):Object.prototype.hasOwnProperty.call(e,a)}function y3(e,a,r){const n=vm(e);n===2?e.set(a,r):n===3?e.add(r):e[a]=r}function t5(e,a){return e===a?e!==0||1/e===1/a:e!==e&&a!==a}function oc(e){return e instanceof Map}function jm(e){return e instanceof Set}function qs(e){return e.copy_||e.base_}function Ng(e,a){if(oc(e))return new Map(e);if(jm(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=b3(e);if(a===!0||a==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Ja];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const c=i[o],m=n[c];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[c]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[c]})}return Object.create(Jo(e),n)}else{const n=Jo(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Cb(e,a=!1){return Nm(e)||rl(e)||!Nn(e)||(vm(e)>1&&Object.defineProperties(e,{set:Yd,add:Yd,clear:Yd,delete:Yd}),Object.freeze(e),a&&Object.values(e).forEach(r=>Cb(r,!0))),e}function a5(){Ar(2)}var Yd={value:a5};function Nm(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var r5={};function nl(e){const a=r5[e];return a||Ar(0,e),a}var Wo;function v3(){return Wo}function n5(e,a){return{drafts_:[],parent_:e,immer_:a,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function C2(e,a){a&&(nl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=a)}function wg(e){Sg(e),e.drafts_.forEach(s5),e.drafts_=null}function Sg(e){e===Wo&&(Wo=e.parent_)}function k2(e){return Wo=n5(Wo,e)}function s5(e){const a=e[Ja];a.type_===0||a.type_===1?a.revoke_():a.revoked_=!0}function E2(e,a){a.unfinalizedDrafts_=a.drafts_.length;const r=a.drafts_[0];return e!==void 0&&e!==r?(r[Ja].modified_&&(wg(a),Ar(4)),Nn(e)&&(e=Ou(a,e),a.parent_||Du(a,e)),a.patches_&&nl("Patches").generateReplacementPatches_(r[Ja].base_,e,a.patches_,a.inversePatches_)):e=Ou(a,r,[]),wg(a),a.patches_&&a.patchListener_(a.patches_,a.inversePatches_),e!==g3?e:void 0}function Ou(e,a,r){if(Nm(a))return a;const n=e.immer_.shouldUseStrictIteration(),i=a[Ja];if(!i)return Eu(a,(o,c)=>O2(e,i,a,o,c,r),n),a;if(i.scope_!==e)return a;if(!i.modified_)return Du(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let c=o,m=!1;i.type_===3&&(c=new Set(o),o.clear(),m=!0),Eu(c,(u,h)=>O2(e,i,o,u,h,r,m),n),Du(e,o,!1),r&&e.patches_&&nl("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function O2(e,a,r,n,i,o,c){if(i==null||typeof i!="object"&&!c)return;const m=Nm(i);if(!(m&&!c)){if(rl(i)){const u=o&&a&&a.type_!==3&&!jg(a.assigned_,n)?o.concat(n):void 0,h=Ou(e,i,u);if(y3(r,n,h),rl(h))e.canAutoFreeze_=!1;else return}else c&&r.add(i);if(Nn(i)&&!m){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||a&&a.base_&&a.base_[n]===i&&m)return;Ou(e,i),(!a||!a.scope_.parent_)&&typeof n!="symbol"&&(oc(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Du(e,i)}}}function Du(e,a,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Cb(a,r)}function l5(e,a){const r=Array.isArray(e),n={type_:r?1:0,scope_:a?a.scope_:v3(),modified_:!1,finalized_:!1,assigned_:{},parent_:a,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=kb;r&&(i=[n],o=Xo);const{revoke:c,proxy:m}=Proxy.revocable(i,o);return n.draft_=m,n.revoke_=c,m}var kb={get(e,a){if(a===Ja)return e;const r=qs(e);if(!jg(r,a))return i5(e,r,a);const n=r[a];return e.finalized_||!Nn(n)?n:n===Ph(e.base_,a)?(_h(e),e.copy_[a]=Cg(n,e)):n},has(e,a){return a in qs(e)},ownKeys(e){return Reflect.ownKeys(qs(e))},set(e,a,r){const n=j3(qs(e),a);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Ph(qs(e),a),o=i?.[Ja];if(o&&o.base_===r)return e.copy_[a]=r,e.assigned_[a]=!1,!0;if(t5(r,i)&&(r!==void 0||jg(e.base_,a)))return!0;_h(e),Ag(e)}return e.copy_[a]===r&&(r!==void 0||a in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[a])||(e.copy_[a]=r,e.assigned_[a]=!0),!0},deleteProperty(e,a){return Ph(e.base_,a)!==void 0||a in e.base_?(e.assigned_[a]=!1,_h(e),Ag(e)):delete e.assigned_[a],e.copy_&&delete e.copy_[a],!0},getOwnPropertyDescriptor(e,a){const r=qs(e),n=Reflect.getOwnPropertyDescriptor(r,a);return n&&{writable:!0,configurable:e.type_!==1||a!=="length",enumerable:n.enumerable,value:r[a]}},defineProperty(){Ar(11)},getPrototypeOf(e){return Jo(e.base_)},setPrototypeOf(){Ar(12)}},Xo={};Eu(kb,(e,a)=>{Xo[e]=function(){return arguments[0]=arguments[0][0],a.apply(this,arguments)}});Xo.deleteProperty=function(e,a){return Xo.set.call(this,e,a,void 0)};Xo.set=function(e,a,r){return kb.set.call(this,e[0],a,r,e[0])};function Ph(e,a){const r=e[Ja];return(r?qs(r):e)[a]}function i5(e,a,r){const n=j3(a,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function j3(e,a){if(!(a in e))return;let r=Jo(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,a);if(n)return n;r=Jo(r)}}function Ag(e){e.modified_||(e.modified_=!0,e.parent_&&Ag(e.parent_))}function _h(e){e.copy_||(e.copy_=Ng(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var o5=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(a,r,n)=>{if(typeof a=="function"&&typeof r!="function"){const o=r;r=a;const c=this;return function(u=o,...h){return c.produce(u,p=>r.call(this,p,...h))}}typeof r!="function"&&Ar(6),n!==void 0&&typeof n!="function"&&Ar(7);let i;if(Nn(a)){const o=k2(this),c=Cg(a,void 0);let m=!0;try{i=r(c),m=!1}finally{m?wg(o):Sg(o)}return C2(o,n),E2(i,o)}else if(!a||typeof a!="object"){if(i=r(a),i===void 0&&(i=a),i===g3&&(i=void 0),this.autoFreeze_&&Cb(i,!0),n){const o=[],c=[];nl("Patches").generateReplacementPatches_(a,i,o,c),n(o,c)}return i}else Ar(1,a)},this.produceWithPatches=(a,r)=>{if(typeof a=="function")return(c,...m)=>this.produceWithPatches(c,u=>a(u,...m));let n,i;return[this.produce(a,r,(c,m)=>{n=c,i=m}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Nn(e)||Ar(8),rl(e)&&(e=yn(e));const a=k2(this),r=Cg(e,void 0);return r[Ja].isManual_=!0,Sg(a),r}finishDraft(e,a){const r=e&&e[Ja];(!r||!r.isManual_)&&Ar(9);const{scope_:n}=r;return C2(n,a),E2(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,a){let r;for(r=a.length-1;r>=0;r--){const i=a[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(a=a.slice(r+1));const n=nl("Patches").applyPatches_;return rl(e)?n(e,a):this.produce(e,i=>n(i,a))}};function Cg(e,a){const r=oc(e)?nl("MapSet").proxyMap_(e,a):jm(e)?nl("MapSet").proxySet_(e,a):l5(e,a);return(a?a.scope_:v3()).drafts_.push(r),r}function yn(e){return rl(e)||Ar(10,e),N3(e)}function N3(e){if(!Nn(e)||Nm(e))return e;const a=e[Ja];let r,n=!0;if(a){if(!a.modified_)return a.base_;a.finalized_=!0,r=Ng(e,a.scope_.immer_.useStrictShallowCopy_),n=a.scope_.immer_.shouldUseStrictIteration()}else r=Ng(e,!0);return Eu(r,(i,o)=>{y3(r,i,N3(o))},n),a&&(a.finalized_=!1),r}var c5=new o5,w3=c5.produce;function d5(e,a=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(a)}function u5(e,a=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(a)}function m5(e,a="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${a}[${r}]`)}}var D2=e=>Array.isArray(e)?e:[e];function f5(e){const a=Array.isArray(e[0])?e[0]:e;return m5(a,"createSelector expects all input-selectors to be functions, but received the following types: "),a}function p5(e,a){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,a));return r}var h5=class{constructor(e){this.value=e}deref(){return this.value}},x5=typeof WeakRef<"u"?WeakRef:h5,g5=0,T2=1;function Kd(){return{s:g5,v:void 0,o:null,p:null}}function S3(e,a={}){let r=Kd();const{resultEqualityCheck:n}=a;let i,o=0;function c(){let m=r;const{length:u}=arguments;for(let x=0,j=u;x<j;x++){const v=arguments[x];if(typeof v=="function"||typeof v=="object"&&v!==null){let w=m.o;w===null&&(m.o=w=new WeakMap);const A=w.get(v);A===void 0?(m=Kd(),w.set(v,m)):m=A}else{let w=m.p;w===null&&(m.p=w=new Map);const A=w.get(v);A===void 0?(m=Kd(),w.set(v,m)):m=A}}const h=m;let p;if(m.s===T2)p=m.v;else if(p=e.apply(null,arguments),o++,n){const x=i?.deref?.()??i;x!=null&&n(x,p)&&(p=x,o!==0&&o--),i=typeof p=="object"&&p!==null||typeof p=="function"?new x5(p):p}return h.s=T2,h.v=p,p}return c.clearCache=()=>{r=Kd(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}function b5(e,...a){const r=typeof e=="function"?{memoize:e,memoizeOptions:a}:e,n=(...i)=>{let o=0,c=0,m,u={},h=i.pop();typeof h=="object"&&(u=h,h=i.pop()),d5(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...u},{memoize:x,memoizeOptions:j=[],argsMemoize:v=S3,argsMemoizeOptions:w=[]}=p,A=D2(j),S=D2(w),g=f5(i),C=x(function(){return o++,h.apply(null,arguments)},...A),k=v(function(){c++;const D=p5(g,arguments);return m=C.apply(null,D),m},...S);return Object.assign(k,{resultFunc:h,memoizedResultFunc:C,dependencies:g,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>m,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:x,argsMemoize:v})};return Object.assign(n,{withTypes:()=>n}),n}var le=b5(S3),y5=Object.assign((e,a=le)=>{u5(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(o=>e[o]);return a(n,(...o)=>o.reduce((c,m,u)=>(c[r[u]]=m,c),{}))},{withTypes:()=>y5});function A3(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var v5=A3(),j5=A3,N5=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ku:ku.apply(null,arguments)},w5=e=>e&&typeof e.match=="function";function ja(e,a){function r(...n){if(a){let i=a(...n);if(!i)throw new Error(Ga(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>x3(n)&&n.type===e,r}var C3=class $o extends Array{constructor(...a){super(...a),Object.setPrototypeOf(this,$o.prototype)}static get[Symbol.species](){return $o}concat(...a){return super.concat.apply(this,a)}prepend(...a){return a.length===1&&Array.isArray(a[0])?new $o(...a[0].concat(this)):new $o(...a.concat(this))}};function R2(e){return Nn(e)?w3(e,()=>{}):e}function Gd(e,a,r){return e.has(a)?e.get(a):e.set(a,r(a)).get(a)}function S5(e){return typeof e=="boolean"}var A5=()=>function(a){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=a??{};let c=new C3;return r&&(S5(r)?c.push(v5):c.push(j5(r.extraArgument))),c},k3="RTK_autoBatch",xa=()=>e=>({payload:e,meta:{[k3]:!0}}),P2=e=>a=>{setTimeout(a,e)},E3=(e={type:"raf"})=>a=>(...r)=>{const n=a(...r);let i=!0,o=!1,c=!1;const m=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:P2(10):e.type==="callback"?e.queueNotification:P2(e.timeout),h=()=>{c=!1,o&&(o=!1,m.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const x=()=>i&&p(),j=n.subscribe(x);return m.add(p),()=>{j(),m.delete(p)}},dispatch(p){try{return i=!p?.meta?.[k3],o=!i,o&&(c||(c=!0,u(h))),n.dispatch(p)}finally{i=!0}}})},C5=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new C3(e);return n&&i.push(E3(typeof n=="object"?n:void 0)),i};function O3(e){const a=A5(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:c=void 0,enhancers:m=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(Ab(r))u=h3(r);else throw new Error(Ga(1));let h;typeof n=="function"?h=n(a):h=a();let p=ku;i&&(p=N5({trace:!1,...typeof i=="object"&&i}));const x=QT(...h),j=C5(x);let v=typeof m=="function"?m(j):j();const w=p(...v);return p3(u,c,w)}function D3(e){const a={},r=[];let n;const i={addCase(o,c){const m=typeof o=="string"?o:o.type;if(!m)throw new Error(Ga(28));if(m in a)throw new Error(Ga(29));return a[m]=c,i},addAsyncThunk(o,c){return c.pending&&(a[o.pending.type]=c.pending),c.rejected&&(a[o.rejected.type]=c.rejected),c.fulfilled&&(a[o.fulfilled.type]=c.fulfilled),c.settled&&r.push({matcher:o.settled,reducer:c.settled}),i},addMatcher(o,c){return r.push({matcher:o,reducer:c}),i},addDefaultCase(o){return n=o,i}};return e(i),[a,r,n]}function k5(e){return typeof e=="function"}function E5(e,a){let[r,n,i]=D3(a),o;if(k5(e))o=()=>R2(e());else{const m=R2(e);o=()=>m}function c(m=o(),u){let h=[r[u.type],...n.filter(({matcher:p})=>p(u)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[i]),h.reduce((p,x)=>{if(x)if(rl(p)){const v=x(p,u);return v===void 0?p:v}else{if(Nn(p))return w3(p,j=>x(j,u));{const j=x(p,u);if(j===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return j}}return p},m)}return c.getInitialState=o,c}var O5=(e,a)=>w5(e)?e.match(a):e(a);function D5(...e){return a=>e.some(r=>O5(r,a))}var T5="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",T3=(e=21)=>{let a="",r=e;for(;r--;)a+=T5[Math.random()*64|0];return a},R5=["name","message","stack","code"],Mh=class{constructor(e,a){this.payload=e,this.meta=a}_type},_2=class{constructor(e,a){this.payload=e,this.meta=a}_type},P5=e=>{if(typeof e=="object"&&e!==null){const a={};for(const r of R5)typeof e[r]=="string"&&(a[r]=e[r]);return a}return{message:String(e)}},M2="External signal was aborted",ys=(()=>{function e(a,r,n){const i=ja(a+"/fulfilled",(u,h,p,x)=>({payload:u,meta:{...x||{},arg:p,requestId:h,requestStatus:"fulfilled"}})),o=ja(a+"/pending",(u,h,p)=>({payload:void 0,meta:{...p||{},arg:h,requestId:u,requestStatus:"pending"}})),c=ja(a+"/rejected",(u,h,p,x,j)=>({payload:x,error:(n&&n.serializeError||P5)(u||"Rejected"),meta:{...j||{},arg:p,requestId:h,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function m(u,{signal:h}={}){return(p,x,j)=>{const v=n?.idGenerator?n.idGenerator(u):T3(),w=new AbortController;let A,S;function g(k){S=k,w.abort()}h&&(h.aborted?g(M2):h.addEventListener("abort",()=>g(M2),{once:!0}));const C=(async function(){let k;try{let D=n?.condition?.(u,{getState:x,extra:j});if(M5(D)&&(D=await D),D===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const B=new Promise((L,T)=>{A=()=>{T({name:"AbortError",message:S||"Aborted"})},w.signal.addEventListener("abort",A)});p(o(v,u,n?.getPendingMeta?.({requestId:v,arg:u},{getState:x,extra:j}))),k=await Promise.race([B,Promise.resolve(r(u,{dispatch:p,getState:x,extra:j,requestId:v,signal:w.signal,abort:g,rejectWithValue:(L,T)=>new Mh(L,T),fulfillWithValue:(L,T)=>new _2(L,T)})).then(L=>{if(L instanceof Mh)throw L;return L instanceof _2?i(L.payload,v,u,L.meta):i(L,v,u)})])}catch(D){k=D instanceof Mh?c(null,v,u,D.payload,D.meta):c(D,v,u)}finally{A&&w.signal.removeEventListener("abort",A)}return n&&!n.dispatchConditionRejection&&c.match(k)&&k.meta.condition||p(k),k})();return Object.assign(C,{abort:g,requestId:v,arg:u,unwrap(){return C.then(_5)}})}}return Object.assign(m,{pending:o,rejected:c,fulfilled:i,settled:D5(c,i),typePrefix:a})}return e.withTypes=()=>e,e})();function _5(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function M5(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var z5=Symbol.for("rtk-slice-createasyncthunk");function L5(e,a){return`${e}/${a}`}function B5({creators:e}={}){const a=e?.asyncThunk?.[z5];return function(n){const{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Ga(11));const c=(typeof n.reducers=="function"?n.reducers(F5()):n.reducers)||{},m=Object.keys(c),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(k,O){const D=typeof k=="string"?k:k.type;if(!D)throw new Error(Ga(12));if(D in u.sliceCaseReducersByType)throw new Error(Ga(13));return u.sliceCaseReducersByType[D]=O,h},addMatcher(k,O){return u.sliceMatchers.push({matcher:k,reducer:O}),h},exposeAction(k,O){return u.actionCreators[k]=O,h},exposeCaseReducer(k,O){return u.sliceCaseReducersByName[k]=O,h}};m.forEach(k=>{const O=c[k],D={reducerName:k,type:L5(i,k),createNotation:typeof n.reducers=="function"};U5(O)?H5(D,O,h,a):$5(D,O,h)});function p(){const[k={},O=[],D=void 0]=typeof n.extraReducers=="function"?D3(n.extraReducers):[n.extraReducers],B={...k,...u.sliceCaseReducersByType};return E5(n.initialState,L=>{for(let T in B)L.addCase(T,B[T]);for(let T of u.sliceMatchers)L.addMatcher(T.matcher,T.reducer);for(let T of O)L.addMatcher(T.matcher,T.reducer);D&&L.addDefaultCase(D)})}const x=k=>k,j=new Map,v=new WeakMap;let w;function A(k,O){return w||(w=p()),w(k,O)}function S(){return w||(w=p()),w.getInitialState()}function g(k,O=!1){function D(L){let T=L[k];return typeof T>"u"&&O&&(T=Gd(v,D,S)),T}function B(L=x){const T=Gd(j,O,()=>new WeakMap);return Gd(T,L,()=>{const R={};for(const[z,$]of Object.entries(n.selectors??{}))R[z]=I5($,L,()=>Gd(v,L,S),O);return R})}return{reducerPath:k,getSelectors:B,get selectors(){return B(D)},selectSlice:D}}const C={name:i,reducer:A,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...g(o),injectInto(k,{reducerPath:O,...D}={}){const B=O??o;return k.inject({reducerPath:B,reducer:A},D),{...C,...g(B,!0)}}};return C}}function I5(e,a,r,n){function i(o,...c){let m=a(o);return typeof m>"u"&&n&&(m=r()),e(m,...c)}return i.unwrapped=e,i}var za=B5();function F5(){function e(a,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:a,...r}}return e.withTypes=()=>e,{reducer(a){return Object.assign({[a.name](...r){return a(...r)}}[a.name],{_reducerDefinitionType:"reducer"})},preparedReducer(a,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:a,reducer:r}},asyncThunk:e}}function $5({type:e,reducerName:a,createNotation:r},n,i){let o,c;if("reducer"in n){if(r&&!q5(n))throw new Error(Ga(17));o=n.reducer,c=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(a,o).exposeAction(a,c?ja(e,c):ja(e))}function U5(e){return e._reducerDefinitionType==="asyncThunk"}function q5(e){return e._reducerDefinitionType==="reducerWithPrepare"}function H5({type:e,reducerName:a},r,n,i){if(!i)throw new Error(Ga(18));const{payloadCreator:o,fulfilled:c,pending:m,rejected:u,settled:h,options:p}=r,x=i(e,o,p);n.exposeAction(a,x),c&&n.addCase(x.fulfilled,c),m&&n.addCase(x.pending,m),u&&n.addCase(x.rejected,u),h&&n.addMatcher(x.settled,h),n.exposeCaseReducer(a,{fulfilled:c||Jd,pending:m||Jd,rejected:u||Jd,settled:h||Jd})}function Jd(){}var V5="task",R3="listener",P3="completed",Eb="cancelled",Y5=`task-${Eb}`,K5=`task-${P3}`,kg=`${R3}-${Eb}`,G5=`${R3}-${P3}`,wm=class{constructor(e){this.code=e,this.message=`${V5} ${Eb} (reason: ${e})`}name="TaskAbortError";message},Ob=(e,a)=>{if(typeof e!="function")throw new TypeError(Ga(32))},Tu=()=>{},_3=(e,a=Tu)=>(e.catch(a),e),M3=(e,a)=>(e.addEventListener("abort",a,{once:!0}),()=>e.removeEventListener("abort",a)),Xs=(e,a)=>{const r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:a,configurable:!0,writable:!0}),e.abort(a))},Zs=e=>{if(e.aborted){const{reason:a}=e;throw new wm(a)}};function z3(e,a){let r=Tu;return new Promise((n,i)=>{const o=()=>i(new wm(e.reason));if(e.aborted){o();return}r=M3(e,o),a.finally(()=>r()).then(n,i)}).finally(()=>{r=Tu})}var J5=async(e,a)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof wm?"cancelled":"rejected",error:r}}finally{a?.()}},Ru=e=>a=>_3(z3(e,a).then(r=>(Zs(e),r))),L3=e=>{const a=Ru(e);return r=>a(new Promise(n=>setTimeout(n,r)))},{assign:ti}=Object,z2={},Sm="listenerMiddleware",W5=(e,a)=>{const r=n=>M3(e,()=>Xs(n,e.reason));return(n,i)=>{Ob(n);const o=new AbortController;r(o);const c=J5(async()=>{Zs(e),Zs(o.signal);const m=await n({pause:Ru(o.signal),delay:L3(o.signal),signal:o.signal});return Zs(o.signal),m},()=>Xs(o,K5));return i?.autoJoin&&a.push(c.catch(Tu)),{result:Ru(e)(c),cancel(){Xs(o,Y5)}}}},X5=(e,a)=>{const r=async(n,i)=>{Zs(a);let o=()=>{};const m=[new Promise((u,h)=>{let p=e({predicate:n,effect:(x,j)=>{j.unsubscribe(),u([x,j.getState(),j.getOriginalState()])}});o=()=>{p(),h()}})];i!=null&&m.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await z3(a,Promise.race(m));return Zs(a),u}finally{o()}};return(n,i)=>_3(r(n,i))},B3=e=>{let{type:a,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(a)i=ja(a).match;else if(r)a=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Ga(21));return Ob(o),{predicate:i,type:a,effect:o}},I3=ti(e=>{const{type:a,predicate:r,effect:n}=B3(e);return{id:T3(),effect:n,type:a,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Ga(22))}}},{withTypes:()=>I3}),L2=(e,a)=>{const{type:r,effect:n,predicate:i}=B3(a);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},Eg=e=>{e.pending.forEach(a=>{Xs(a,kg)})},Z5=(e,a)=>()=>{for(const r of a.keys())Eg(r);e.clear()},B2=(e,a,r)=>{try{e(a,r)}catch(n){setTimeout(()=>{throw n},0)}},F3=ti(ja(`${Sm}/add`),{withTypes:()=>F3}),Q5=ja(`${Sm}/removeAll`),$3=ti(ja(`${Sm}/remove`),{withTypes:()=>$3}),eR=(...e)=>{console.error(`${Sm}/error`,...e)},cc=(e={})=>{const a=new Map,r=new Map,n=v=>{const w=r.get(v)??0;r.set(v,w+1)},i=v=>{const w=r.get(v)??1;w===1?r.delete(v):r.set(v,w-1)},{extra:o,onError:c=eR}=e;Ob(c);const m=v=>(v.unsubscribe=()=>a.delete(v.id),a.set(v.id,v),w=>{v.unsubscribe(),w?.cancelActive&&Eg(v)}),u=v=>{const w=L2(a,v)??I3(v);return m(w)};ti(u,{withTypes:()=>u});const h=v=>{const w=L2(a,v);return w&&(w.unsubscribe(),v.cancelActive&&Eg(w)),!!w};ti(h,{withTypes:()=>h});const p=async(v,w,A,S)=>{const g=new AbortController,C=X5(u,g.signal),k=[];try{v.pending.add(g),n(v),await Promise.resolve(v.effect(w,ti({},A,{getOriginalState:S,condition:(O,D)=>C(O,D).then(Boolean),take:C,delay:L3(g.signal),pause:Ru(g.signal),extra:o,signal:g.signal,fork:W5(g.signal,k),unsubscribe:v.unsubscribe,subscribe:()=>{a.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((O,D,B)=>{O!==g&&(Xs(O,kg),B.delete(O))})},cancel:()=>{Xs(g,kg),v.pending.delete(g)},throwIfCancelled:()=>{Zs(g.signal)}})))}catch(O){O instanceof wm||B2(c,O,{raisedBy:"effect"})}finally{await Promise.all(k),Xs(g,G5),i(v),v.pending.delete(g)}},x=Z5(a,r);return{middleware:v=>w=>A=>{if(!x3(A))return w(A);if(F3.match(A))return u(A.payload);if(Q5.match(A)){x();return}if($3.match(A))return h(A.payload);let S=v.getState();const g=()=>{if(S===z2)throw new Error(Ga(23));return S};let C;try{if(C=w(A),a.size>0){const k=v.getState(),O=Array.from(a.values());for(const D of O){let B=!1;try{B=D.predicate(A,k,S)}catch(L){B=!1,B2(c,L,{raisedBy:"predicate"})}B&&p(D,A,v,g)}}}finally{S=z2}return C},startListening:u,stopListening:h,clearListeners:x}};function Ga(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function U3(e,a){return function(){return e.apply(a,arguments)}}const{toString:tR}=Object.prototype,{getPrototypeOf:Db}=Object,{iterator:Am,toStringTag:q3}=Symbol,Cm=(e=>a=>{const r=tR.call(a);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Dr=e=>(e=e.toLowerCase(),a=>Cm(a)===e),km=e=>a=>typeof a===e,{isArray:xi}=Array,ri=km("undefined");function dc(e){return e!==null&&!ri(e)&&e.constructor!==null&&!ri(e.constructor)&&_a(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const H3=Dr("ArrayBuffer");function aR(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&H3(e.buffer),a}const rR=km("string"),_a=km("function"),V3=km("number"),uc=e=>e!==null&&typeof e=="object",nR=e=>e===!0||e===!1,hu=e=>{if(Cm(e)!=="object")return!1;const a=Db(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(q3 in e)&&!(Am in e)},sR=e=>{if(!uc(e)||dc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},lR=Dr("Date"),iR=Dr("File"),oR=Dr("Blob"),cR=Dr("FileList"),dR=e=>uc(e)&&_a(e.pipe),uR=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||_a(e.append)&&((a=Cm(e))==="formdata"||a==="object"&&_a(e.toString)&&e.toString()==="[object FormData]"))},mR=Dr("URLSearchParams"),[fR,pR,hR,xR]=["ReadableStream","Request","Response","Headers"].map(Dr),gR=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function mc(e,a,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),xi(e))for(n=0,i=e.length;n<i;n++)a.call(null,e[n],n,e);else{if(dc(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),c=o.length;let m;for(n=0;n<c;n++)m=o[n],a.call(null,e[m],m,e)}}function Y3(e,a){if(dc(e))return null;a=a.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],a===i.toLowerCase())return i;return null}const Ks=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,K3=e=>!ri(e)&&e!==Ks;function Og(){const{caseless:e,skipUndefined:a}=K3(this)&&this||{},r={},n=(i,o)=>{const c=e&&Y3(r,o)||o;hu(r[c])&&hu(i)?r[c]=Og(r[c],i):hu(i)?r[c]=Og({},i):xi(i)?r[c]=i.slice():(!a||!ri(i))&&(r[c]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&mc(arguments[i],n);return r}const bR=(e,a,r,{allOwnKeys:n}={})=>(mc(a,(i,o)=>{r&&_a(i)?e[o]=U3(i,r):e[o]=i},{allOwnKeys:n}),e),yR=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vR=(e,a,r,n)=>{e.prototype=Object.create(a.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),r&&Object.assign(e.prototype,r)},jR=(e,a,r,n)=>{let i,o,c;const m={};if(a=a||{},e==null)return a;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)c=i[o],(!n||n(c,e,a))&&!m[c]&&(a[c]=e[c],m[c]=!0);e=r!==!1&&Db(e)}while(e&&(!r||r(e,a))&&e!==Object.prototype);return a},NR=(e,a,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=a.length;const n=e.indexOf(a,r);return n!==-1&&n===r},wR=e=>{if(!e)return null;if(xi(e))return e;let a=e.length;if(!V3(a))return null;const r=new Array(a);for(;a-- >0;)r[a]=e[a];return r},SR=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&Db(Uint8Array)),AR=(e,a)=>{const n=(e&&e[Am]).call(e);let i;for(;(i=n.next())&&!i.done;){const o=i.value;a.call(e,o[0],o[1])}},CR=(e,a)=>{let r;const n=[];for(;(r=e.exec(a))!==null;)n.push(r);return n},kR=Dr("HTMLFormElement"),ER=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),I2=(({hasOwnProperty:e})=>(a,r)=>e.call(a,r))(Object.prototype),OR=Dr("RegExp"),G3=(e,a)=>{const r=Object.getOwnPropertyDescriptors(e),n={};mc(r,(i,o)=>{let c;(c=a(i,o,e))!==!1&&(n[o]=c||i)}),Object.defineProperties(e,n)},DR=e=>{G3(e,(a,r)=>{if(_a(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(_a(n)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},TR=(e,a)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return xi(e)?n(e):n(String(e).split(a)),r},RR=()=>{},PR=(e,a)=>e!=null&&Number.isFinite(e=+e)?e:a;function _R(e){return!!(e&&_a(e.append)&&e[q3]==="FormData"&&e[Am])}const MR=e=>{const a=new Array(10),r=(n,i)=>{if(uc(n)){if(a.indexOf(n)>=0)return;if(dc(n))return n;if(!("toJSON"in n)){a[i]=n;const o=xi(n)?[]:{};return mc(n,(c,m)=>{const u=r(c,i+1);!ri(u)&&(o[m]=u)}),a[i]=void 0,o}}return n};return r(e,0)},zR=Dr("AsyncFunction"),LR=e=>e&&(uc(e)||_a(e))&&_a(e.then)&&_a(e.catch),J3=((e,a)=>e?setImmediate:a?((r,n)=>(Ks.addEventListener("message",({source:i,data:o})=>{i===Ks&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Ks.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",_a(Ks.postMessage)),BR=typeof queueMicrotask<"u"?queueMicrotask.bind(Ks):typeof process<"u"&&process.nextTick||J3,IR=e=>e!=null&&_a(e[Am]),ae={isArray:xi,isArrayBuffer:H3,isBuffer:dc,isFormData:uR,isArrayBufferView:aR,isString:rR,isNumber:V3,isBoolean:nR,isObject:uc,isPlainObject:hu,isEmptyObject:sR,isReadableStream:fR,isRequest:pR,isResponse:hR,isHeaders:xR,isUndefined:ri,isDate:lR,isFile:iR,isBlob:oR,isRegExp:OR,isFunction:_a,isStream:dR,isURLSearchParams:mR,isTypedArray:SR,isFileList:cR,forEach:mc,merge:Og,extend:bR,trim:gR,stripBOM:yR,inherits:vR,toFlatObject:jR,kindOf:Cm,kindOfTest:Dr,endsWith:NR,toArray:wR,forEachEntry:AR,matchAll:CR,isHTMLForm:kR,hasOwnProperty:I2,hasOwnProp:I2,reduceDescriptors:G3,freezeMethods:DR,toObjectSet:TR,toCamelCase:ER,noop:RR,toFiniteNumber:PR,findKey:Y3,global:Ks,isContextDefined:K3,isSpecCompliantForm:_R,toJSONObject:MR,isAsyncFn:zR,isThenable:LR,setImmediate:J3,asap:BR,isIterable:IR};function Be(e,a,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ae.inherits(Be,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.status}}});const W3=Be.prototype,X3={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{X3[e]={value:e}});Object.defineProperties(Be,X3);Object.defineProperty(W3,"isAxiosError",{value:!0});Be.from=(e,a,r,n,i,o)=>{const c=Object.create(W3);ae.toFlatObject(e,c,function(p){return p!==Error.prototype},h=>h!=="isAxiosError");const m=e&&e.message?e.message:"Error",u=a==null&&e?e.code:a;return Be.call(c,m,u,r,n,i),e&&c.cause==null&&Object.defineProperty(c,"cause",{value:e,configurable:!0}),c.name=e&&e.name||"Error",o&&Object.assign(c,o),c};const FR=null;function Dg(e){return ae.isPlainObject(e)||ae.isArray(e)}function Z3(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function F2(e,a,r){return e?e.concat(a).map(function(i,o){return i=Z3(i),!r&&o?"["+i+"]":i}).join(r?".":""):a}function $R(e){return ae.isArray(e)&&!e.some(Dg)}const UR=ae.toFlatObject(ae,{},null,function(a){return/^is[A-Z]/.test(a)});function Em(e,a,r){if(!ae.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,r=ae.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,S){return!ae.isUndefined(S[A])});const n=r.metaTokens,i=r.visitor||p,o=r.dots,c=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(a);if(!ae.isFunction(i))throw new TypeError("visitor must be a function");function h(w){if(w===null)return"";if(ae.isDate(w))return w.toISOString();if(ae.isBoolean(w))return w.toString();if(!u&&ae.isBlob(w))throw new Be("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(w)||ae.isTypedArray(w)?u&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function p(w,A,S){let g=w;if(w&&!S&&typeof w=="object"){if(ae.endsWith(A,"{}"))A=n?A:A.slice(0,-2),w=JSON.stringify(w);else if(ae.isArray(w)&&$R(w)||(ae.isFileList(w)||ae.endsWith(A,"[]"))&&(g=ae.toArray(w)))return A=Z3(A),g.forEach(function(k,O){!(ae.isUndefined(k)||k===null)&&a.append(c===!0?F2([A],O,o):c===null?A:A+"[]",h(k))}),!1}return Dg(w)?!0:(a.append(F2(S,A,o),h(w)),!1)}const x=[],j=Object.assign(UR,{defaultVisitor:p,convertValue:h,isVisitable:Dg});function v(w,A){if(!ae.isUndefined(w)){if(x.indexOf(w)!==-1)throw Error("Circular reference detected in "+A.join("."));x.push(w),ae.forEach(w,function(g,C){(!(ae.isUndefined(g)||g===null)&&i.call(a,g,ae.isString(C)?C.trim():C,A,j))===!0&&v(g,A?A.concat(C):[C])}),x.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return v(e),a}function $2(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return a[n]})}function Tb(e,a){this._pairs=[],e&&Em(e,this,a)}const Q3=Tb.prototype;Q3.append=function(a,r){this._pairs.push([a,r])};Q3.toString=function(a){const r=a?function(n){return a.call(this,n,$2)}:$2;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function qR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function eC(e,a,r){if(!a)return e;const n=r&&r.encode||qR;ae.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(i?o=i(a,r):o=ae.isURLSearchParams(a)?a.toString():new Tb(a,r).toString(n),o){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class U2{constructor(){this.handlers=[]}use(a,r,n){return this.handlers.push({fulfilled:a,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){ae.forEach(this.handlers,function(n){n!==null&&a(n)})}}const tC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},HR=typeof URLSearchParams<"u"?URLSearchParams:Tb,VR=typeof FormData<"u"?FormData:null,YR=typeof Blob<"u"?Blob:null,KR={isBrowser:!0,classes:{URLSearchParams:HR,FormData:VR,Blob:YR},protocols:["http","https","file","blob","url","data"]},Rb=typeof window<"u"&&typeof document<"u",Tg=typeof navigator=="object"&&navigator||void 0,GR=Rb&&(!Tg||["ReactNative","NativeScript","NS"].indexOf(Tg.product)<0),JR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",WR=Rb&&window.location.href||"http://localhost",XR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rb,hasStandardBrowserEnv:GR,hasStandardBrowserWebWorkerEnv:JR,navigator:Tg,origin:WR},Symbol.toStringTag,{value:"Module"})),ma={...XR,...KR};function ZR(e,a){return Em(e,new ma.classes.URLSearchParams,{visitor:function(r,n,i,o){return ma.isNode&&ae.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...a})}function QR(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function eP(e){const a={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],a[o]=e[o];return a}function aC(e){function a(r,n,i,o){let c=r[o++];if(c==="__proto__")return!0;const m=Number.isFinite(+c),u=o>=r.length;return c=!c&&ae.isArray(i)?i.length:c,u?(ae.hasOwnProp(i,c)?i[c]=[i[c],n]:i[c]=n,!m):((!i[c]||!ae.isObject(i[c]))&&(i[c]=[]),a(r,n,i[c],o)&&ae.isArray(i[c])&&(i[c]=eP(i[c])),!m)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};return ae.forEachEntry(e,(n,i)=>{a(QR(n),i,r,0)}),r}return null}function tP(e,a,r){if(ae.isString(e))try{return(a||JSON.parse)(e),ae.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const fc={transitional:tC,adapter:["xhr","http","fetch"],transformRequest:[function(a,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=ae.isObject(a);if(o&&ae.isHTMLForm(a)&&(a=new FormData(a)),ae.isFormData(a))return i?JSON.stringify(aC(a)):a;if(ae.isArrayBuffer(a)||ae.isBuffer(a)||ae.isStream(a)||ae.isFile(a)||ae.isBlob(a)||ae.isReadableStream(a))return a;if(ae.isArrayBufferView(a))return a.buffer;if(ae.isURLSearchParams(a))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let m;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ZR(a,this.formSerializer).toString();if((m=ae.isFileList(a))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Em(m?{"files[]":a}:a,u&&new u,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),tP(a)):a}],transformResponse:[function(a){const r=this.transitional||fc.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(ae.isResponse(a)||ae.isReadableStream(a))return a;if(a&&ae.isString(a)&&(n&&!this.responseType||i)){const c=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(a,this.parseReviver)}catch(m){if(c)throw m.name==="SyntaxError"?Be.from(m,Be.ERR_BAD_RESPONSE,this,null,this.response):m}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ma.classes.FormData,Blob:ma.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ae.forEach(["delete","get","head","post","put","patch"],e=>{fc.headers[e]={}});const aP=ae.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"]),rP=e=>{const a={};let r,n,i;return e&&e.split(`
`).forEach(function(c){i=c.indexOf(":"),r=c.substring(0,i).trim().toLowerCase(),n=c.substring(i+1).trim(),!(!r||a[r]&&aP[r])&&(r==="set-cookie"?a[r]?a[r].push(n):a[r]=[n]:a[r]=a[r]?a[r]+", "+n:n)}),a},q2=Symbol("internals");function Do(e){return e&&String(e).trim().toLowerCase()}function xu(e){return e===!1||e==null?e:ae.isArray(e)?e.map(xu):String(e)}function nP(e){const a=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)a[n[1]]=n[2];return a}const sP=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zh(e,a,r,n,i){if(ae.isFunction(n))return n.call(this,a,r);if(i&&(a=r),!!ae.isString(a)){if(ae.isString(n))return a.indexOf(n)!==-1;if(ae.isRegExp(n))return n.test(a)}}function lP(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,r,n)=>r.toUpperCase()+n)}function iP(e,a){const r=ae.toCamelCase(" "+a);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,o,c){return this[n].call(this,a,i,o,c)},configurable:!0})})}let Ma=class{constructor(a){a&&this.set(a)}set(a,r,n){const i=this;function o(m,u,h){const p=Do(u);if(!p)throw new Error("header name must be a non-empty string");const x=ae.findKey(i,p);(!x||i[x]===void 0||h===!0||h===void 0&&i[x]!==!1)&&(i[x||u]=xu(m))}const c=(m,u)=>ae.forEach(m,(h,p)=>o(h,p,u));if(ae.isPlainObject(a)||a instanceof this.constructor)c(a,r);else if(ae.isString(a)&&(a=a.trim())&&!sP(a))c(rP(a),r);else if(ae.isObject(a)&&ae.isIterable(a)){let m={},u,h;for(const p of a){if(!ae.isArray(p))throw TypeError("Object iterator must return a key-value pair");m[h=p[0]]=(u=m[h])?ae.isArray(u)?[...u,p[1]]:[u,p[1]]:p[1]}c(m,r)}else a!=null&&o(r,a,n);return this}get(a,r){if(a=Do(a),a){const n=ae.findKey(this,a);if(n){const i=this[n];if(!r)return i;if(r===!0)return nP(i);if(ae.isFunction(r))return r.call(this,i,n);if(ae.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,r){if(a=Do(a),a){const n=ae.findKey(this,a);return!!(n&&this[n]!==void 0&&(!r||zh(this,this[n],n,r)))}return!1}delete(a,r){const n=this;let i=!1;function o(c){if(c=Do(c),c){const m=ae.findKey(n,c);m&&(!r||zh(n,n[m],m,r))&&(delete n[m],i=!0)}}return ae.isArray(a)?a.forEach(o):o(a),i}clear(a){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!a||zh(this,this[o],o,a,!0))&&(delete this[o],i=!0)}return i}normalize(a){const r=this,n={};return ae.forEach(this,(i,o)=>{const c=ae.findKey(n,o);if(c){r[c]=xu(i),delete r[o];return}const m=a?lP(o):String(o).trim();m!==o&&delete r[o],r[m]=xu(i),n[m]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const r=Object.create(null);return ae.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=a&&ae.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,r])=>a+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...r){const n=new this(a);return r.forEach(i=>n.set(i)),n}static accessor(a){const n=(this[q2]=this[q2]={accessors:{}}).accessors,i=this.prototype;function o(c){const m=Do(c);n[m]||(iP(i,c),n[m]=!0)}return ae.isArray(a)?a.forEach(o):o(a),this}};Ma.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(Ma.prototype,({value:e},a)=>{let r=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(n){this[r]=n}}});ae.freezeMethods(Ma);function Lh(e,a){const r=this||fc,n=a||r,i=Ma.from(n.headers);let o=n.data;return ae.forEach(e,function(m){o=m.call(r,o,i.normalize(),a?a.status:void 0)}),i.normalize(),o}function rC(e){return!!(e&&e.__CANCEL__)}function gi(e,a,r){Be.call(this,e??"canceled",Be.ERR_CANCELED,a,r),this.name="CanceledError"}ae.inherits(gi,Be,{__CANCEL__:!0});function nC(e,a,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):a(new Be("Request failed with status code "+r.status,[Be.ERR_BAD_REQUEST,Be.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function oP(e){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return a&&a[1]||""}function cP(e,a){e=e||10;const r=new Array(e),n=new Array(e);let i=0,o=0,c;return a=a!==void 0?a:1e3,function(u){const h=Date.now(),p=n[o];c||(c=h),r[i]=u,n[i]=h;let x=o,j=0;for(;x!==i;)j+=r[x++],x=x%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),h-c<a)return;const v=p&&h-p;return v?Math.round(j*1e3/v):void 0}}function dP(e,a){let r=0,n=1e3/a,i,o;const c=(h,p=Date.now())=>{r=p,i=null,o&&(clearTimeout(o),o=null),e(...h)};return[(...h)=>{const p=Date.now(),x=p-r;x>=n?c(h,p):(i=h,o||(o=setTimeout(()=>{o=null,c(i)},n-x)))},()=>i&&c(i)]}const Pu=(e,a,r=3)=>{let n=0;const i=cP(50,250);return dP(o=>{const c=o.loaded,m=o.lengthComputable?o.total:void 0,u=c-n,h=i(u),p=c<=m;n=c;const x={loaded:c,total:m,progress:m?c/m:void 0,bytes:u,rate:h||void 0,estimated:h&&m&&p?(m-c)/h:void 0,event:o,lengthComputable:m!=null,[a?"download":"upload"]:!0};e(x)},r)},H2=(e,a)=>{const r=e!=null;return[n=>a[0]({lengthComputable:r,total:e,loaded:n}),a[1]]},V2=e=>(...a)=>ae.asap(()=>e(...a)),uP=ma.hasStandardBrowserEnv?((e,a)=>r=>(r=new URL(r,ma.origin),e.protocol===r.protocol&&e.host===r.host&&(a||e.port===r.port)))(new URL(ma.origin),ma.navigator&&/(msie|trident)/i.test(ma.navigator.userAgent)):()=>!0,mP=ma.hasStandardBrowserEnv?{write(e,a,r,n,i,o,c){if(typeof document>"u")return;const m=[`${e}=${encodeURIComponent(a)}`];ae.isNumber(r)&&m.push(`expires=${new Date(r).toUTCString()}`),ae.isString(n)&&m.push(`path=${n}`),ae.isString(i)&&m.push(`domain=${i}`),o===!0&&m.push("secure"),ae.isString(c)&&m.push(`SameSite=${c}`),document.cookie=m.join("; ")},read(e){if(typeof document>"u")return null;const a=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return a?decodeURIComponent(a[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function fP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pP(e,a){return a?e.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):e}function sC(e,a,r){let n=!fP(a);return e&&(n||r==!1)?pP(e,a):a}const Y2=e=>e instanceof Ma?{...e}:e;function sl(e,a){a=a||{};const r={};function n(h,p,x,j){return ae.isPlainObject(h)&&ae.isPlainObject(p)?ae.merge.call({caseless:j},h,p):ae.isPlainObject(p)?ae.merge({},p):ae.isArray(p)?p.slice():p}function i(h,p,x,j){if(ae.isUndefined(p)){if(!ae.isUndefined(h))return n(void 0,h,x,j)}else return n(h,p,x,j)}function o(h,p){if(!ae.isUndefined(p))return n(void 0,p)}function c(h,p){if(ae.isUndefined(p)){if(!ae.isUndefined(h))return n(void 0,h)}else return n(void 0,p)}function m(h,p,x){if(x in a)return n(h,p);if(x in e)return n(void 0,h)}const u={url:o,method:o,data:o,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:m,headers:(h,p,x)=>i(Y2(h),Y2(p),x,!0)};return ae.forEach(Object.keys({...e,...a}),function(p){const x=u[p]||i,j=x(e[p],a[p],p);ae.isUndefined(j)&&x!==m||(r[p]=j)}),r}const lC=e=>{const a=sl({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:c,auth:m}=a;if(a.headers=c=Ma.from(c),a.url=eC(sC(a.baseURL,a.url,a.allowAbsoluteUrls),e.params,e.paramsSerializer),m&&c.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):""))),ae.isFormData(r)){if(ma.hasStandardBrowserEnv||ma.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(ae.isFunction(r.getHeaders)){const u=r.getHeaders(),h=["content-type","content-length"];Object.entries(u).forEach(([p,x])=>{h.includes(p.toLowerCase())&&c.set(p,x)})}}if(ma.hasStandardBrowserEnv&&(n&&ae.isFunction(n)&&(n=n(a)),n||n!==!1&&uP(a.url))){const u=i&&o&&mP.read(o);u&&c.set(i,u)}return a},hP=typeof XMLHttpRequest<"u",xP=hP&&function(e){return new Promise(function(r,n){const i=lC(e);let o=i.data;const c=Ma.from(i.headers).normalize();let{responseType:m,onUploadProgress:u,onDownloadProgress:h}=i,p,x,j,v,w;function A(){v&&v(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let S=new XMLHttpRequest;S.open(i.method.toUpperCase(),i.url,!0),S.timeout=i.timeout;function g(){if(!S)return;const k=Ma.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),D={data:!m||m==="text"||m==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:k,config:e,request:S};nC(function(L){r(L),A()},function(L){n(L),A()},D),S=null}"onloadend"in S?S.onloadend=g:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(g)},S.onabort=function(){S&&(n(new Be("Request aborted",Be.ECONNABORTED,e,S)),S=null)},S.onerror=function(O){const D=O&&O.message?O.message:"Network Error",B=new Be(D,Be.ERR_NETWORK,e,S);B.event=O||null,n(B),S=null},S.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const D=i.transitional||tC;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),n(new Be(O,D.clarifyTimeoutError?Be.ETIMEDOUT:Be.ECONNABORTED,e,S)),S=null},o===void 0&&c.setContentType(null),"setRequestHeader"in S&&ae.forEach(c.toJSON(),function(O,D){S.setRequestHeader(D,O)}),ae.isUndefined(i.withCredentials)||(S.withCredentials=!!i.withCredentials),m&&m!=="json"&&(S.responseType=i.responseType),h&&([j,w]=Pu(h,!0),S.addEventListener("progress",j)),u&&S.upload&&([x,v]=Pu(u),S.upload.addEventListener("progress",x),S.upload.addEventListener("loadend",v)),(i.cancelToken||i.signal)&&(p=k=>{S&&(n(!k||k.type?new gi(null,e,S):k),S.abort(),S=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const C=oP(i.url);if(C&&ma.protocols.indexOf(C)===-1){n(new Be("Unsupported protocol "+C+":",Be.ERR_BAD_REQUEST,e));return}S.send(o||null)})},gP=(e,a)=>{const{length:r}=e=e?e.filter(Boolean):[];if(a||r){let n=new AbortController,i;const o=function(h){if(!i){i=!0,m();const p=h instanceof Error?h:this.reason;n.abort(p instanceof Be?p:new gi(p instanceof Error?p.message:p))}};let c=a&&setTimeout(()=>{c=null,o(new Be(`timeout ${a} of ms exceeded`,Be.ETIMEDOUT))},a);const m=()=>{e&&(c&&clearTimeout(c),c=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(o):h.removeEventListener("abort",o)}),e=null)};e.forEach(h=>h.addEventListener("abort",o));const{signal:u}=n;return u.unsubscribe=()=>ae.asap(m),u}},bP=function*(e,a){let r=e.byteLength;if(r<a){yield e;return}let n=0,i;for(;n<r;)i=n+a,yield e.slice(n,i),n=i},yP=async function*(e,a){for await(const r of vP(e))yield*bP(r,a)},vP=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const a=e.getReader();try{for(;;){const{done:r,value:n}=await a.read();if(r)break;yield n}}finally{await a.cancel()}},K2=(e,a,r,n)=>{const i=yP(e,a);let o=0,c,m=u=>{c||(c=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:h,value:p}=await i.next();if(h){m(),u.close();return}let x=p.byteLength;if(r){let j=o+=x;r(j)}u.enqueue(new Uint8Array(p))}catch(h){throw m(h),h}},cancel(u){return m(u),i.return()}},{highWaterMark:2})},G2=64*1024,{isFunction:Wd}=ae,jP=(({Request:e,Response:a})=>({Request:e,Response:a}))(ae.global),{ReadableStream:J2,TextEncoder:W2}=ae.global,X2=(e,...a)=>{try{return!!e(...a)}catch{return!1}},NP=e=>{e=ae.merge.call({skipUndefined:!0},jP,e);const{fetch:a,Request:r,Response:n}=e,i=a?Wd(a):typeof fetch=="function",o=Wd(r),c=Wd(n);if(!i)return!1;const m=i&&Wd(J2),u=i&&(typeof W2=="function"?(w=>A=>w.encode(A))(new W2):async w=>new Uint8Array(await new r(w).arrayBuffer())),h=o&&m&&X2(()=>{let w=!1;const A=new r(ma.origin,{body:new J2,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!A}),p=c&&m&&X2(()=>ae.isReadableStream(new n("").body)),x={stream:p&&(w=>w.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!x[w]&&(x[w]=(A,S)=>{let g=A&&A[w];if(g)return g.call(A);throw new Be(`Response type '${w}' is not supported`,Be.ERR_NOT_SUPPORT,S)})});const j=async w=>{if(w==null)return 0;if(ae.isBlob(w))return w.size;if(ae.isSpecCompliantForm(w))return(await new r(ma.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(ae.isArrayBufferView(w)||ae.isArrayBuffer(w))return w.byteLength;if(ae.isURLSearchParams(w)&&(w=w+""),ae.isString(w))return(await u(w)).byteLength},v=async(w,A)=>{const S=ae.toFiniteNumber(w.getContentLength());return S??j(A)};return async w=>{let{url:A,method:S,data:g,signal:C,cancelToken:k,timeout:O,onDownloadProgress:D,onUploadProgress:B,responseType:L,headers:T,withCredentials:R="same-origin",fetchOptions:z}=lC(w),$=a||fetch;L=L?(L+"").toLowerCase():"text";let Z=gP([C,k&&k.toAbortSignal()],O),fe=null;const se=Z&&Z.unsubscribe&&(()=>{Z.unsubscribe()});let ie;try{if(B&&h&&S!=="get"&&S!=="head"&&(ie=await v(T,g))!==0){let P=new r(A,{method:"POST",body:g,duplex:"half"}),H;if(ae.isFormData(g)&&(H=P.headers.get("content-type"))&&T.setContentType(H),P.body){const[ee,pe]=H2(ie,Pu(V2(B)));g=K2(P.body,G2,ee,pe)}}ae.isString(R)||(R=R?"include":"omit");const V=o&&"credentials"in r.prototype,K={...z,signal:Z,method:S.toUpperCase(),headers:T.normalize().toJSON(),body:g,duplex:"half",credentials:V?R:void 0};fe=o&&new r(A,K);let ce=await(o?$(fe,z):$(A,K));const U=p&&(L==="stream"||L==="response");if(p&&(D||U&&se)){const P={};["status","statusText","headers"].forEach(ve=>{P[ve]=ce[ve]});const H=ae.toFiniteNumber(ce.headers.get("content-length")),[ee,pe]=D&&H2(H,Pu(V2(D),!0))||[];ce=new n(K2(ce.body,G2,ee,()=>{pe&&pe(),se&&se()}),P)}L=L||"text";let I=await x[ae.findKey(x,L)||"text"](ce,w);return!U&&se&&se(),await new Promise((P,H)=>{nC(P,H,{data:I,headers:Ma.from(ce.headers),status:ce.status,statusText:ce.statusText,config:w,request:fe})})}catch(V){throw se&&se(),V&&V.name==="TypeError"&&/Load failed|fetch/i.test(V.message)?Object.assign(new Be("Network Error",Be.ERR_NETWORK,w,fe),{cause:V.cause||V}):Be.from(V,V&&V.code,w,fe)}}},wP=new Map,iC=e=>{let a=e&&e.env||{};const{fetch:r,Request:n,Response:i}=a,o=[n,i,r];let c=o.length,m=c,u,h,p=wP;for(;m--;)u=o[m],h=p.get(u),h===void 0&&p.set(u,h=m?new Map:NP(a)),p=h;return h};iC();const Pb={http:FR,xhr:xP,fetch:{get:iC}};ae.forEach(Pb,(e,a)=>{if(e){try{Object.defineProperty(e,"name",{value:a})}catch{}Object.defineProperty(e,"adapterName",{value:a})}});const Z2=e=>`- ${e}`,SP=e=>ae.isFunction(e)||e===null||e===!1;function AP(e,a){e=ae.isArray(e)?e:[e];const{length:r}=e;let n,i;const o={};for(let c=0;c<r;c++){n=e[c];let m;if(i=n,!SP(n)&&(i=Pb[(m=String(n)).toLowerCase()],i===void 0))throw new Be(`Unknown adapter '${m}'`);if(i&&(ae.isFunction(i)||(i=i.get(a))))break;o[m||"#"+c]=i}if(!i){const c=Object.entries(o).map(([u,h])=>`adapter ${u} `+(h===!1?"is not supported by the environment":"is not available in the build"));let m=r?c.length>1?`since :
`+c.map(Z2).join(`
`):" "+Z2(c[0]):"as no adapter specified";throw new Be("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return i}const oC={getAdapter:AP,adapters:Pb};function Bh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gi(null,e)}function Q2(e){return Bh(e),e.headers=Ma.from(e.headers),e.data=Lh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),oC.getAdapter(e.adapter||fc.adapter,e)(e).then(function(n){return Bh(e),n.data=Lh.call(e,e.transformResponse,n),n.headers=Ma.from(n.headers),n},function(n){return rC(n)||(Bh(e),n&&n.response&&(n.response.data=Lh.call(e,e.transformResponse,n.response),n.response.headers=Ma.from(n.response.headers))),Promise.reject(n)})}const cC="1.13.1",Om={};["object","boolean","number","function","string","symbol"].forEach((e,a)=>{Om[e]=function(n){return typeof n===e||"a"+(a<1?"n ":" ")+e}});const ew={};Om.transitional=function(a,r,n){function i(o,c){return"[Axios v"+cC+"] Transitional option '"+o+"'"+c+(n?". "+n:"")}return(o,c,m)=>{if(a===!1)throw new Be(i(c," has been removed"+(r?" in "+r:"")),Be.ERR_DEPRECATED);return r&&!ew[c]&&(ew[c]=!0,console.warn(i(c," has been deprecated since v"+r+" and will be removed in the near future"))),a?a(o,c,m):!0}};Om.spelling=function(a){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${a}`),!0)};function CP(e,a,r){if(typeof e!="object")throw new Be("options must be an object",Be.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],c=a[o];if(c){const m=e[o],u=m===void 0||c(m,o,e);if(u!==!0)throw new Be("option "+o+" must be "+u,Be.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Be("Unknown option "+o,Be.ERR_BAD_OPTION)}}const gu={assertOptions:CP,validators:Om},Br=gu.validators;let Qs=class{constructor(a){this.defaults=a||{},this.interceptors={request:new U2,response:new U2}}async request(a,r){try{return await this._request(a,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+o):n.stack=o}catch{}}throw n}}_request(a,r){typeof a=="string"?(r=r||{},r.url=a):r=a||{},r=sl(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&gu.assertOptions(n,{silentJSONParsing:Br.transitional(Br.boolean),forcedJSONParsing:Br.transitional(Br.boolean),clarifyTimeoutError:Br.transitional(Br.boolean)},!1),i!=null&&(ae.isFunction(i)?r.paramsSerializer={serialize:i}:gu.assertOptions(i,{encode:Br.function,serialize:Br.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),gu.assertOptions(r,{baseUrl:Br.spelling("baseURL"),withXsrfToken:Br.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=o&&ae.merge(o.common,o[r.method]);o&&ae.forEach(["delete","get","head","post","put","patch","common"],w=>{delete o[w]}),r.headers=Ma.concat(c,o);const m=[];let u=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(r)===!1||(u=u&&A.synchronous,m.unshift(A.fulfilled,A.rejected))});const h=[];this.interceptors.response.forEach(function(A){h.push(A.fulfilled,A.rejected)});let p,x=0,j;if(!u){const w=[Q2.bind(this),void 0];for(w.unshift(...m),w.push(...h),j=w.length,p=Promise.resolve(r);x<j;)p=p.then(w[x++],w[x++]);return p}j=m.length;let v=r;for(;x<j;){const w=m[x++],A=m[x++];try{v=w(v)}catch(S){A.call(this,S);break}}try{p=Q2.call(this,v)}catch(w){return Promise.reject(w)}for(x=0,j=h.length;x<j;)p=p.then(h[x++],h[x++]);return p}getUri(a){a=sl(this.defaults,a);const r=sC(a.baseURL,a.url,a.allowAbsoluteUrls);return eC(r,a.params,a.paramsSerializer)}};ae.forEach(["delete","get","head","options"],function(a){Qs.prototype[a]=function(r,n){return this.request(sl(n||{},{method:a,url:r,data:(n||{}).data}))}});ae.forEach(["post","put","patch"],function(a){function r(n){return function(o,c,m){return this.request(sl(m||{},{method:a,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:c}))}}Qs.prototype[a]=r(),Qs.prototype[a+"Form"]=r(!0)});let kP=class dC{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const c=new Promise(m=>{n.subscribe(m),o=m}).then(i);return c.cancel=function(){n.unsubscribe(o)},c},a(function(o,c,m){n.reason||(n.reason=new gi(o,c,m),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const r=this._listeners.indexOf(a);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const a=new AbortController,r=n=>{a.abort(n)};return this.subscribe(r),a.signal.unsubscribe=()=>this.unsubscribe(r),a.signal}static source(){let a;return{token:new dC(function(i){a=i}),cancel:a}}};function EP(e){return function(r){return e.apply(null,r)}}function OP(e){return ae.isObject(e)&&e.isAxiosError===!0}const Rg={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(Rg).forEach(([e,a])=>{Rg[a]=e});function uC(e){const a=new Qs(e),r=U3(Qs.prototype.request,a);return ae.extend(r,Qs.prototype,a,{allOwnKeys:!0}),ae.extend(r,a,null,{allOwnKeys:!0}),r.create=function(i){return uC(sl(e,i))},r}const F=uC(fc);F.Axios=Qs;F.CanceledError=gi;F.CancelToken=kP;F.isCancel=rC;F.VERSION=cC;F.toFormData=Em;F.AxiosError=Be;F.Cancel=F.CanceledError;F.all=function(a){return Promise.all(a)};F.spread=EP;F.isAxiosError=OP;F.mergeConfig=sl;F.AxiosHeaders=Ma;F.formToJSON=e=>aC(ae.isHTMLForm(e)?new FormData(e):e);F.getAdapter=oC.getAdapter;F.HttpStatusCode=Rg;F.default=F;const{Axios:_X,AxiosError:MX,CanceledError:zX,isCancel:LX,CancelToken:BX,VERSION:IX,all:FX,Cancel:$X,isAxiosError:UX,spread:qX,toFormData:HX,AxiosHeaders:VX,HttpStatusCode:YX,formToJSON:KX,getAdapter:GX,mergeConfig:JX}=F,ya="http://213.199.41.219:3001/api/users";F.interceptors.request.use(e=>{const a=localStorage.getItem("token");return console.log("Request config:",{url:e.url,token:a,method:e.method,headers:e.headers}),a&&(e.headers.Authorization=`Bearer ${a}`),e},e=>Promise.reject(e));F.interceptors.response.use(e=>(console.log("Response received:",{url:e.config.url,status:e.status,data:e.data}),e),e=>(console.log("Response error:",{url:e.config?.url,status:e.response?.status,data:e.response?.data}),e.response?.status===401&&localStorage.removeItem("token"),Promise.reject(e)));const DP=async(e,a)=>await F.post(`${ya}/login`,{email:e,password:a}),TP=async(e,a,r)=>await F.post(`${ya}/register`,{username:e,email:a,password:r}),RP=async e=>{const a=localStorage.getItem("registerEmail");return await F.post(`${ya}/verify-otp`,{email:a,otp:e})},PP=async()=>{const e=localStorage.getItem("registerEmail");return await F.post(`${ya}/resend-otp`,{email:e})},_P=async e=>await F.post(`${ya}/forgot-password`,{email:e}),MP=async(e,a,r)=>await F.post(`${ya}/reset-password`,{email:e,otp:a,newPassword:r}),zP=async()=>await F.get(`${ya}/me`),LP=async e=>{if(console.log("Preparing upload with file:",e),!e)throw console.log("No file provided for upload"),new Error("No file provided");const a=new FormData;a.append("profilePicture",e),console.log("FormData contents before send:");for(let i of a.entries())console.log("Entry:",i[0],i[1]);const r={headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}},n=await F.post(`${ya}/upload-profile-picture`,a,r);return console.log("Upload response:",n.data),n},BP=async(e,a,r)=>await F.post(`${ya}/create-admin`,{username:e,email:a,password:r}),IP=async(e,a)=>await F.put(`${ya}/users/${e}/permissions`,{permittedPages:a}),Ih=async()=>await F.get(`${ya}/`),qo=ys("user/login",async({email:e,password:a},{rejectWithValue:r})=>{try{const n=await DP(e,a);return localStorage.setItem("token",n.data.token),n.data}catch(n){return r(n.response?.data?.message||"Login failed")}}),Ho=ys("user/register",async({username:e,email:a,password:r},{rejectWithValue:n})=>{try{const i=await TP(e,a,r);return localStorage.setItem("registerEmail",a),i.data}catch(i){return n(i.response?.data?.message||"Signup failed")}}),Vo=ys("user/verifyOtp",async(e,{rejectWithValue:a})=>{try{const r=await RP(e);return localStorage.setItem("token",r.data.token),localStorage.removeItem("registerEmail"),r.data}catch(r){return a(r.response?.data?.message||"OTP verification failed")}}),bu=ys("user/resendOtp",async(e,{rejectWithValue:a})=>{try{return(await PP()).data}catch(r){return a(r.response?.data?.message||"Failed to resend OTP")}}),Yo=ys("user/forgotPassword",async(e,{rejectWithValue:a})=>{try{return(await _P(e)).data}catch(r){return a(r.response?.data?.message||"Failed to send OTP")}}),Ko=ys("user/resetPassword",async({email:e,otp:a,newPassword:r},{rejectWithValue:n})=>{try{return(await MP(e,a,r)).data}catch(i){return n(i.response?.data?.message||"Password reset failed")}}),el=ys("user/getAuthUser",async(e,{rejectWithValue:a})=>{try{return(await zP()).data}catch(r){return localStorage.removeItem("token"),a(r.response?.data?.message||"Authentication check failed")}}),yu=ys("user/uploadProfilePicture",async(e,{rejectWithValue:a})=>{console.log("Starting uploadProfilePicture with file:",e);try{const r=await LP(e);return console.log("Upload successful, response:",r.data),r.data}catch(r){return console.log("Upload failed:",r.response?.data?.message||r.message),a(r.response?.data?.message||"Profile picture upload failed")}}),mC=za({name:"user",initialState:{user:null,isAuthenticated:!1,loading:!1,error:null,success:null},reducers:{logout:e=>{e.user=null,e.isAuthenticated=!1,e.error=null,e.success="Logged out successfully!",localStorage.removeItem("token"),localStorage.removeItem("registerEmail")},clearMessages:e=>{e.error=null,e.success=null}},extraReducers:e=>{e.addCase(qo.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(qo.fulfilled,(a,r)=>{a.loading=!1,a.isAuthenticated=!0,a.user=r.payload.user,a.success="Login successful!"}).addCase(qo.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(Ho.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(Ho.fulfilled,(a,r)=>{a.loading=!1,a.success="Registration successful! Please verify OTP sent to your email."}).addCase(Ho.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(Vo.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(Vo.fulfilled,(a,r)=>{a.loading=!1,a.isAuthenticated=!0,a.user=r.payload.user,a.success="OTP verified successfully!"}).addCase(Vo.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(bu.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(bu.fulfilled,a=>{a.loading=!1,a.success="OTP resent successfully to your email."}).addCase(bu.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(Yo.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(Yo.fulfilled,(a,r)=>{a.loading=!1,a.success="Password reset OTP sent to your email."}).addCase(Yo.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(Ko.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(Ko.fulfilled,(a,r)=>{a.loading=!1,a.success="Password reset successfully! Please login."}).addCase(Ko.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(el.pending,a=>{a.loading=!0,a.error=null}).addCase(el.fulfilled,(a,r)=>{a.loading=!1,a.isAuthenticated=!0,a.user=r.payload.user}).addCase(el.rejected,(a,r)=>{a.loading=!1,a.isAuthenticated=!1,a.user=null,a.error=r.payload}).addCase(yu.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(yu.fulfilled,(a,r)=>{a.loading=!1,a.user=r.payload.user,a.success=r.payload.message}).addCase(yu.rejected,(a,r)=>{a.loading=!1,a.error=r.payload})}}),{logout:FP,clearMessages:hs}=mC.actions,$P=mC.reducer,UP=O3({reducer:{user:$P}});/**
* react-router v7.9.5
*
* 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 tw="popstate";function qP(e={}){function a(n,i){let{pathname:o,search:c,hash:m}=n.location;return Pg("",{pathname:o,search:c,hash:m},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Zo(i)}return VP(a,r,null,e)}function vt(e,a){if(e===!1||e===null||typeof e>"u")throw new Error(a)}function kr(e,a){if(!e){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function HP(){return Math.random().toString(36).substring(2,10)}function aw(e,a){return{usr:e.state,key:e.key,idx:a}}function Pg(e,a,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof a=="string"?bi(a):a,state:r,key:a&&a.key||n||HP()}}function Zo({pathname:e="/",search:a="",hash:r=""}){return a&&a!=="?"&&(e+=a.charAt(0)==="?"?a:"?"+a),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function bi(e){let a={};if(e){let r=e.indexOf("#");r>=0&&(a.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(a.search=e.substring(n),e=e.substring(0,n)),e&&(a.pathname=e)}return a}function VP(e,a,r,n={}){let{window:i=document.defaultView,v5Compat:o=!1}=n,c=i.history,m="POP",u=null,h=p();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function p(){return(c.state||{idx:null}).idx}function x(){m="POP";let S=p(),g=S==null?null:S-h;h=S,u&&u({action:m,location:A.location,delta:g})}function j(S,g){m="PUSH";let C=Pg(A.location,S,g);h=p()+1;let k=aw(C,h),O=A.createHref(C);try{c.pushState(k,"",O)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;i.location.assign(O)}o&&u&&u({action:m,location:A.location,delta:1})}function v(S,g){m="REPLACE";let C=Pg(A.location,S,g);h=p();let k=aw(C,h),O=A.createHref(C);c.replaceState(k,"",O),o&&u&&u({action:m,location:A.location,delta:0})}function w(S){return YP(S)}let A={get action(){return m},get location(){return e(i,c)},listen(S){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(tw,x),u=S,()=>{i.removeEventListener(tw,x),u=null}},createHref(S){return a(i,S)},createURL:w,encodeLocation(S){let g=w(S);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:j,replace:v,go(S){return c.go(S)}};return A}function YP(e,a=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),vt(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Zo(e);return n=n.replace(/ $/,"%20"),!a&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function fC(e,a,r="/"){return KP(e,a,r,!1)}function KP(e,a,r,n){let i=typeof a=="string"?bi(a):a,o=wn(i.pathname||"/",r);if(o==null)return null;let c=pC(e);GP(c);let m=null;for(let u=0;m==null&&u<c.length;++u){let h=s_(o);m=r_(c[u],h,n)}return m}function pC(e,a=[],r=[],n="",i=!1){let o=(c,m,u=i,h)=>{let p={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:m,route:c};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&u)return;vt(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let x=vn([n,p.relativePath]),j=r.concat(p);c.children&&c.children.length>0&&(vt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),pC(c.children,a,j,x,u)),!(c.path==null&&!c.index)&&a.push({path:x,score:t_(x,c.index),routesMeta:j})};return e.forEach((c,m)=>{if(c.path===""||!c.path?.includes("?"))o(c,m);else for(let u of hC(c.path))o(c,m,!0,u)}),a}function hC(e){let a=e.split("/");if(a.length===0)return[];let[r,...n]=a,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let c=hC(n.join("/")),m=[];return m.push(...c.map(u=>u===""?o:[o,u].join("/"))),i&&m.push(...c),m.map(u=>e.startsWith("/")&&u===""?"/":u)}function GP(e){e.sort((a,r)=>a.score!==r.score?r.score-a.score:a_(a.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var JP=/^:[\w-]+$/,WP=3,XP=2,ZP=1,QP=10,e_=-2,rw=e=>e==="*";function t_(e,a){let r=e.split("/"),n=r.length;return r.some(rw)&&(n+=e_),a&&(n+=XP),r.filter(i=>!rw(i)).reduce((i,o)=>i+(JP.test(o)?WP:o===""?ZP:QP),n)}function a_(e,a){return e.length===a.length&&e.slice(0,-1).every((n,i)=>n===a[i])?e[e.length-1]-a[a.length-1]:0}function r_(e,a,r=!1){let{routesMeta:n}=e,i={},o="/",c=[];for(let m=0;m<n.length;++m){let u=n[m],h=m===n.length-1,p=o==="/"?a:a.slice(o.length)||"/",x=_u({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},p),j=u.route;if(!x&&h&&r&&!n[n.length-1].route.index&&(x=_u({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},p)),!x)return null;Object.assign(i,x.params),c.push({params:i,pathname:vn([o,x.pathname]),pathnameBase:c_(vn([o,x.pathnameBase])),route:j}),x.pathnameBase!=="/"&&(o=vn([o,x.pathnameBase]))}return c}function _u(e,a){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=n_(e.path,e.caseSensitive,e.end),i=a.match(r);if(!i)return null;let o=i[0],c=o.replace(/(.)\/+$/,"$1"),m=i.slice(1);return{params:n.reduce((h,{paramName:p,isOptional:x},j)=>{if(p==="*"){let w=m[j]||"";c=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const v=m[j];return x&&!v?h[p]=void 0:h[p]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:e}}function n_(e,a=!1,r=!0){kr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,m,u)=>(n.push({paramName:m,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,a?void 0:"i"),n]}function s_(e){try{return e.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return kr(!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 (${a}).`),e}}function wn(e,a){if(a==="/")return e;if(!e.toLowerCase().startsWith(a.toLowerCase()))return null;let r=a.endsWith("/")?a.length-1:a.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function l_(e,a="/"){let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?bi(e):e;return{pathname:r?r.startsWith("/")?r:i_(r,a):a,search:d_(n),hash:u_(i)}}function i_(e,a){let r=a.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Fh(e,a,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${a}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function o_(e){return e.filter((a,r)=>r===0||a.route.path&&a.route.path.length>0)}function _b(e){let a=o_(e);return a.map((r,n)=>n===a.length-1?r.pathname:r.pathnameBase)}function Mb(e,a,r,n=!1){let i;typeof e=="string"?i=bi(e):(i={...e},vt(!i.pathname||!i.pathname.includes("?"),Fh("?","pathname","search",i)),vt(!i.pathname||!i.pathname.includes("#"),Fh("#","pathname","hash",i)),vt(!i.search||!i.search.includes("#"),Fh("#","search","hash",i)));let o=e===""||i.pathname==="",c=o?"/":i.pathname,m;if(c==null)m=r;else{let x=a.length-1;if(!n&&c.startsWith("..")){let j=c.split("/");for(;j[0]==="..";)j.shift(),x-=1;i.pathname=j.join("/")}m=x>=0?a[x]:"/"}let u=l_(i,m),h=c&&c!=="/"&&c.endsWith("/"),p=(o||c===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(h||p)&&(u.pathname+="/"),u}var vn=e=>e.join("/").replace(/\/\/+/g,"/"),c_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),d_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,u_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function m_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xC=["POST","PUT","PATCH","DELETE"];new Set(xC);var f_=["GET",...xC];new Set(f_);var yi=b.createContext(null);yi.displayName="DataRouter";var Dm=b.createContext(null);Dm.displayName="DataRouterState";b.createContext(!1);var gC=b.createContext({isTransitioning:!1});gC.displayName="ViewTransition";var p_=b.createContext(new Map);p_.displayName="Fetchers";var h_=b.createContext(null);h_.displayName="Await";var Tr=b.createContext(null);Tr.displayName="Navigation";var pc=b.createContext(null);pc.displayName="Location";var Yr=b.createContext({outlet:null,matches:[],isDataRoute:!1});Yr.displayName="Route";var zb=b.createContext(null);zb.displayName="RouteError";function x_(e,{relative:a}={}){vt(vi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=b.useContext(Tr),{hash:i,pathname:o,search:c}=hc(e,{relative:a}),m=o;return r!=="/"&&(m=o==="/"?r:vn([r,o])),n.createHref({pathname:m,search:c,hash:i})}function vi(){return b.useContext(pc)!=null}function yr(){return vt(vi(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(pc).location}var bC="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function yC(e){b.useContext(Tr).static||b.useLayoutEffect(e)}function Dn(){let{isDataRoute:e}=b.useContext(Yr);return e?O_():g_()}function g_(){vt(vi(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(yi),{basename:a,navigator:r}=b.useContext(Tr),{matches:n}=b.useContext(Yr),{pathname:i}=yr(),o=JSON.stringify(_b(n)),c=b.useRef(!1);return yC(()=>{c.current=!0}),b.useCallback((u,h={})=>{if(kr(c.current,bC),!c.current)return;if(typeof u=="number"){r.go(u);return}let p=Mb(u,JSON.parse(o),i,h.relative==="path");e==null&&a!=="/"&&(p.pathname=p.pathname==="/"?a:vn([a,p.pathname])),(h.replace?r.replace:r.push)(p,h.state,h)},[a,r,o,i,e])}b.createContext(null);function hc(e,{relative:a}={}){let{matches:r}=b.useContext(Yr),{pathname:n}=yr(),i=JSON.stringify(_b(r));return b.useMemo(()=>Mb(e,JSON.parse(i),n,a==="path"),[e,i,n,a])}function b_(e,a){return vC(e,a)}function vC(e,a,r,n,i){vt(vi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=b.useContext(Tr),{matches:c}=b.useContext(Yr),m=c[c.length-1],u=m?m.params:{},h=m?m.pathname:"/",p=m?m.pathnameBase:"/",x=m&&m.route;{let C=x&&x.path||"";jC(h,!x||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${C}">) 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="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let j=yr(),v;if(a){let C=typeof a=="string"?bi(a):a;vt(p==="/"||C.pathname?.startsWith(p),`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 "${p}" but pathname "${C.pathname}" was given in the \`location\` prop.`),v=C}else v=j;let w=v.pathname||"/",A=w;if(p!=="/"){let C=p.replace(/^\//,"").split("/");A="/"+w.replace(/^\//,"").split("/").slice(C.length).join("/")}let S=fC(e,{pathname:A});kr(x||S!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),kr(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=w_(S&&S.map(C=>Object.assign({},C,{params:Object.assign({},u,C.params),pathname:vn([p,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?p:vn([p,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),c,r,n,i);return a&&g?b.createElement(pc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},g):g}function y_(){let e=E_(),a=m_(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:o},"ErrorBoundary")," or"," ",b.createElement("code",{style:o},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},a),r?b.createElement("pre",{style:i},r):null,c)}var v_=b.createElement(y_,null),j_=class extends b.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,a){return a.location!==e.location||a.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:a.error,location:a.location,revalidation:e.revalidation||a.revalidation}}componentDidCatch(e,a){this.props.unstable_onError?this.props.unstable_onError(e,a):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?b.createElement(Yr.Provider,{value:this.props.routeContext},b.createElement(zb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function N_({routeContext:e,match:a,children:r}){let n=b.useContext(yi);return n&&n.static&&n.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=a.route.id),b.createElement(Yr.Provider,{value:e},r)}function w_(e,a=[],r=null,n=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(a.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,c=r?.errors;if(c!=null){let h=o.findIndex(p=>p.route.id&&c?.[p.route.id]!==void 0);vt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let m=!1,u=-1;if(r)for(let h=0;h<o.length;h++){let p=o[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(u=h),p.route.id){let{loaderData:x,errors:j}=r,v=p.route.loader&&!x.hasOwnProperty(p.route.id)&&(!j||j[p.route.id]===void 0);if(p.route.lazy||v){m=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((h,p,x)=>{let j,v=!1,w=null,A=null;r&&(j=c&&p.route.id?c[p.route.id]:void 0,w=p.route.errorElement||v_,m&&(u<0&&x===0?(jC("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,A=null):u===x&&(v=!0,A=p.route.hydrateFallbackElement||null)));let S=a.concat(o.slice(0,x+1)),g=()=>{let C;return j?C=w:v?C=A:p.route.Component?C=b.createElement(p.route.Component,null):p.route.element?C=p.route.element:C=h,b.createElement(N_,{match:p,routeContext:{outlet:h,matches:S,isDataRoute:r!=null},children:C})};return r&&(p.route.ErrorBoundary||p.route.errorElement||x===0)?b.createElement(j_,{location:r.location,revalidation:r.revalidation,component:w,error:j,children:g(),routeContext:{outlet:null,matches:S,isDataRoute:!0},unstable_onError:n}):g()},null)}function Lb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function S_(e){let a=b.useContext(yi);return vt(a,Lb(e)),a}function A_(e){let a=b.useContext(Dm);return vt(a,Lb(e)),a}function C_(e){let a=b.useContext(Yr);return vt(a,Lb(e)),a}function Bb(e){let a=C_(e),r=a.matches[a.matches.length-1];return vt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function k_(){return Bb("useRouteId")}function E_(){let e=b.useContext(zb),a=A_("useRouteError"),r=Bb("useRouteError");return e!==void 0?e:a.errors?.[r]}function O_(){let{router:e}=S_("useNavigate"),a=Bb("useNavigate"),r=b.useRef(!1);return yC(()=>{r.current=!0}),b.useCallback(async(i,o={})=>{kr(r.current,bC),r.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:a,...o}))},[e,a])}var nw={};function jC(e,a,r){!a&&!nw[e]&&(nw[e]=!0,kr(!1,r))}b.memo(D_);function D_({routes:e,future:a,state:r,unstable_onError:n}){return vC(e,void 0,r,n,a)}function $h({to:e,replace:a,state:r,relative:n}){vt(vi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=b.useContext(Tr);kr(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=b.useContext(Yr),{pathname:c}=yr(),m=Dn(),u=Mb(e,_b(o),c,n==="path"),h=JSON.stringify(u);return b.useEffect(()=>{m(JSON.parse(h),{replace:a,state:r,relative:n})},[m,h,n,a,r]),null}function ge(e){vt(!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 T_({basename:e="/",children:a=null,location:r,navigationType:n="POP",navigator:i,static:o=!1}){vt(!vi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),m=b.useMemo(()=>({basename:c,navigator:i,static:o,future:{}}),[c,i,o]);typeof r=="string"&&(r=bi(r));let{pathname:u="/",search:h="",hash:p="",state:x=null,key:j="default"}=r,v=b.useMemo(()=>{let w=wn(u,c);return w==null?null:{location:{pathname:w,search:h,hash:p,state:x,key:j},navigationType:n}},[c,u,h,p,x,j,n]);return kr(v!=null,`<Router basename="${c}"> is not able to match the URL "${u}${h}${p}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:b.createElement(Tr.Provider,{value:m},b.createElement(pc.Provider,{children:a,value:v}))}function R_({children:e,location:a}){return b_(_g(e),a)}function _g(e,a=[]){let r=[];return b.Children.forEach(e,(n,i)=>{if(!b.isValidElement(n))return;let o=[...a,i];if(n.type===b.Fragment){r.push.apply(r,_g(n.props.children,o));return}vt(n.type===ge,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),vt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let c={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(c.children=_g(n.props.children,o)),r.push(c)}),r}var vu="get",ju="application/x-www-form-urlencoded";function Tm(e){return e!=null&&typeof e.tagName=="string"}function P_(e){return Tm(e)&&e.tagName.toLowerCase()==="button"}function __(e){return Tm(e)&&e.tagName.toLowerCase()==="form"}function M_(e){return Tm(e)&&e.tagName.toLowerCase()==="input"}function z_(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function L_(e,a){return e.button===0&&(!a||a==="_self")&&!z_(e)}var Xd=null;function B_(){if(Xd===null)try{new FormData(document.createElement("form"),0),Xd=!1}catch{Xd=!0}return Xd}var I_=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Uh(e){return e!=null&&!I_.has(e)?(kr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ju}"`),null):e}function F_(e,a){let r,n,i,o,c;if(__(e)){let m=e.getAttribute("action");n=m?wn(m,a):null,r=e.getAttribute("method")||vu,i=Uh(e.getAttribute("enctype"))||ju,o=new FormData(e)}else if(P_(e)||M_(e)&&(e.type==="submit"||e.type==="image")){let m=e.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||m.getAttribute("action");if(n=u?wn(u,a):null,r=e.getAttribute("formmethod")||m.getAttribute("method")||vu,i=Uh(e.getAttribute("formenctype"))||Uh(m.getAttribute("enctype"))||ju,o=new FormData(m,e),!B_()){let{name:h,type:p,value:x}=e;if(p==="image"){let j=h?`${h}.`:"";o.append(`${j}x`,"0"),o.append(`${j}y`,"0")}else h&&o.append(h,x)}}else{if(Tm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=vu,n=null,i=ju,c=e}return o&&i==="text/plain"&&(c=o,o=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ib(e,a){if(e===!1||e===null||typeof e>"u")throw new Error(a)}function $_(e,a,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:a&&wn(n.pathname,a)==="/"?n.pathname=`${a.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function U_(e,a){if(e.id in a)return a[e.id];try{let r=await import(e.module);return a[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function q_(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 H_(e,a,r){let n=await Promise.all(e.map(async i=>{let o=a.routes[i.route.id];if(o){let c=await U_(o,r);return c.links?c.links():[]}return[]}));return G_(n.flat(1).filter(q_).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function sw(e,a,r,n,i,o){let c=(u,h)=>r[h]?u.route.id!==r[h].route.id:!0,m=(u,h)=>r[h].pathname!==u.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==u.params["*"];return o==="assets"?a.filter((u,h)=>c(u,h)||m(u,h)):o==="data"?a.filter((u,h)=>{let p=n.routes[u.route.id];if(!p||!p.hasLoader)return!1;if(c(u,h)||m(u,h))return!0;if(u.route.shouldRevalidate){let x=u.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function V_(e,a,{includeHydrateFallback:r}={}){return Y_(e.map(n=>{let i=a.routes[n.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function Y_(e){return[...new Set(e)]}function K_(e){let a={},r=Object.keys(e).sort();for(let n of r)a[n]=e[n];return a}function G_(e,a){let r=new Set;return new Set(a),e.reduce((n,i)=>{let o=JSON.stringify(K_(i));return r.has(o)||(r.add(o),n.push({key:o,link:i})),n},[])}function NC(){let e=b.useContext(yi);return Ib(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function J_(){let e=b.useContext(Dm);return Ib(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Fb=b.createContext(void 0);Fb.displayName="FrameworkContext";function wC(){let e=b.useContext(Fb);return Ib(e,"You must render this element inside a <HydratedRouter> element"),e}function W_(e,a){let r=b.useContext(Fb),[n,i]=b.useState(!1),[o,c]=b.useState(!1),{onFocus:m,onBlur:u,onMouseEnter:h,onMouseLeave:p,onTouchStart:x}=a,j=b.useRef(null);b.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let A=g=>{g.forEach(C=>{c(C.isIntersecting)})},S=new IntersectionObserver(A,{threshold:.5});return j.current&&S.observe(j.current),()=>{S.disconnect()}}},[e]),b.useEffect(()=>{if(n){let A=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(A)}}},[n]);let v=()=>{i(!0)},w=()=>{i(!1),c(!1)};return r?e!=="intent"?[o,j,{}]:[o,j,{onFocus:To(m,v),onBlur:To(u,w),onMouseEnter:To(h,v),onMouseLeave:To(p,w),onTouchStart:To(x,v)}]:[!1,j,{}]}function To(e,a){return r=>{e&&e(r),r.defaultPrevented||a(r)}}function X_({page:e,...a}){let{router:r}=NC(),n=b.useMemo(()=>fC(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?b.createElement(Q_,{page:e,matches:n,...a}):null}function Z_(e){let{manifest:a,routeModules:r}=wC(),[n,i]=b.useState([]);return b.useEffect(()=>{let o=!1;return H_(e,a,r).then(c=>{o||i(c)}),()=>{o=!0}},[e,a,r]),n}function Q_({page:e,matches:a,...r}){let n=yr(),{manifest:i,routeModules:o}=wC(),{basename:c}=NC(),{loaderData:m,matches:u}=J_(),h=b.useMemo(()=>sw(e,a,u,i,n,"data"),[e,a,u,i,n]),p=b.useMemo(()=>sw(e,a,u,i,n,"assets"),[e,a,u,i,n]),x=b.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let w=new Set,A=!1;if(a.forEach(g=>{let C=i.routes[g.route.id];!C||!C.hasLoader||(!h.some(k=>k.route.id===g.route.id)&&g.route.id in m&&o[g.route.id]?.shouldRevalidate||C.hasClientLoader?A=!0:w.add(g.route.id))}),w.size===0)return[];let S=$_(e,c,"data");return A&&w.size>0&&S.searchParams.set("_routes",a.filter(g=>w.has(g.route.id)).map(g=>g.route.id).join(",")),[S.pathname+S.search]},[c,m,n,i,h,a,e,o]),j=b.useMemo(()=>V_(p,i),[p,i]),v=Z_(p);return b.createElement(b.Fragment,null,x.map(w=>b.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),j.map(w=>b.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),v.map(({key:w,link:A})=>b.createElement("link",{key:w,nonce:r.nonce,...A})))}function e7(...e){return a=>{e.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a)})}}var SC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{SC&&(window.__reactRouterVersion="7.9.5")}catch{}function t7({basename:e,children:a,window:r}){let n=b.useRef();n.current==null&&(n.current=qP({window:r,v5Compat:!0}));let i=n.current,[o,c]=b.useState({action:i.action,location:i.location}),m=b.useCallback(u=>{b.startTransition(()=>c(u))},[c]);return b.useLayoutEffect(()=>i.listen(m),[i,m]),b.createElement(T_,{basename:e,children:a,location:o.location,navigationType:o.action,navigator:i})}var AC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fr=b.forwardRef(function({onClick:a,discover:r="render",prefetch:n="none",relative:i,reloadDocument:o,replace:c,state:m,target:u,to:h,preventScrollReset:p,viewTransition:x,...j},v){let{basename:w}=b.useContext(Tr),A=typeof h=="string"&&AC.test(h),S,g=!1;if(typeof h=="string"&&A&&(S=h,SC))try{let R=new URL(window.location.href),z=h.startsWith("//")?new URL(R.protocol+h):new URL(h),$=wn(z.pathname,w);z.origin===R.origin&&$!=null?h=$+z.search+z.hash:g=!0}catch{kr(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=x_(h,{relative:i}),[k,O,D]=W_(n,j),B=n7(h,{replace:c,state:m,target:u,preventScrollReset:p,relative:i,viewTransition:x});function L(R){a&&a(R),R.defaultPrevented||B(R)}let T=b.createElement("a",{...j,...D,href:S||C,onClick:g||o?a:L,ref:e7(v,O),target:u,"data-discover":!A&&r==="render"?"true":void 0});return k&&!A?b.createElement(b.Fragment,null,T,b.createElement(X_,{page:C})):T});Fr.displayName="Link";var Vt=b.forwardRef(function({"aria-current":a="page",caseSensitive:r=!1,className:n="",end:i=!1,style:o,to:c,viewTransition:m,children:u,...h},p){let x=hc(c,{relative:h.relative}),j=yr(),v=b.useContext(Dm),{navigator:w,basename:A}=b.useContext(Tr),S=v!=null&&c7(x)&&m===!0,g=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,C=j.pathname,k=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(C=C.toLowerCase(),k=k?k.toLowerCase():null,g=g.toLowerCase()),k&&A&&(k=wn(k,A)||k);const O=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let D=C===g||!i&&C.startsWith(g)&&C.charAt(O)==="/",B=k!=null&&(k===g||!i&&k.startsWith(g)&&k.charAt(g.length)==="/"),L={isActive:D,isPending:B,isTransitioning:S},T=D?a:void 0,R;typeof n=="function"?R=n(L):R=[n,D?"active":null,B?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let z=typeof o=="function"?o(L):o;return b.createElement(Fr,{...h,"aria-current":T,className:R,ref:p,style:z,to:c,viewTransition:m},typeof u=="function"?u(L):u)});Vt.displayName="NavLink";var a7=b.forwardRef(({discover:e="render",fetcherKey:a,navigate:r,reloadDocument:n,replace:i,state:o,method:c=vu,action:m,onSubmit:u,relative:h,preventScrollReset:p,viewTransition:x,...j},v)=>{let w=i7(),A=o7(m,{relative:h}),S=c.toLowerCase()==="get"?"get":"post",g=typeof m=="string"&&AC.test(m),C=k=>{if(u&&u(k),k.defaultPrevented)return;k.preventDefault();let O=k.nativeEvent.submitter,D=O?.getAttribute("formmethod")||c;w(O||k.currentTarget,{fetcherKey:a,method:D,navigate:r,replace:i,state:o,relative:h,preventScrollReset:p,viewTransition:x})};return b.createElement("form",{ref:v,method:S,action:A,onSubmit:n?u:C,...j,"data-discover":!g&&e==="render"?"true":void 0})});a7.displayName="Form";function r7(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function CC(e){let a=b.useContext(yi);return vt(a,r7(e)),a}function n7(e,{target:a,replace:r,state:n,preventScrollReset:i,relative:o,viewTransition:c}={}){let m=Dn(),u=yr(),h=hc(e,{relative:o});return b.useCallback(p=>{if(L_(p,a)){p.preventDefault();let x=r!==void 0?r:Zo(u)===Zo(h);m(e,{replace:x,state:n,preventScrollReset:i,relative:o,viewTransition:c})}},[u,m,h,r,n,a,e,i,o,c])}var s7=0,l7=()=>`__${String(++s7)}__`;function i7(){let{router:e}=CC("useSubmit"),{basename:a}=b.useContext(Tr),r=k_();return b.useCallback(async(n,i={})=>{let{action:o,method:c,encType:m,formData:u,body:h}=F_(n,a);if(i.navigate===!1){let p=i.fetcherKey||l7();await e.fetch(p,r,i.action||o,{preventScrollReset:i.preventScrollReset,formData:u,body:h,formMethod:i.method||c,formEncType:i.encType||m,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:u,body:h,formMethod:i.method||c,formEncType:i.encType||m,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,a,r])}function o7(e,{relative:a}={}){let{basename:r}=b.useContext(Tr),n=b.useContext(Yr);vt(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),o={...hc(e||".",{relative:a})},c=yr();if(e==null){o.search=c.search;let m=new URLSearchParams(o.search),u=m.getAll("index");if(u.some(p=>p==="")){m.delete("index"),u.filter(x=>x).forEach(x=>m.append("index",x));let p=m.toString();o.search=p?`?${p}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:vn([r,o.pathname])),Zo(o)}function c7(e,{relative:a}={}){let r=b.useContext(gC);vt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=CC("useViewTransitionState"),i=hc(e,{relative:a});if(!r.isTransitioning)return!1;let o=wn(r.currentLocation.pathname,n)||r.currentLocation.pathname,c=wn(r.nextLocation.pathname,n)||r.nextLocation.pathname;return _u(i.pathname,c)!=null||_u(i.pathname,o)!=null}var d7=d3();let u7={data:""},m7=e=>{if(typeof window=="object"){let a=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return a.nonce=window.__nonce__,a.parentNode||(e||document.head).appendChild(a),a.firstChild}return e||u7},f7=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,p7=/\/\*[^]*?\*\/| +/g,lw=/\n+/g,us=(e,a)=>{let r="",n="",i="";for(let o in e){let c=e[o];o[0]=="@"?o[1]=="i"?r=o+" "+c+";":n+=o[1]=="f"?us(c,o):o+"{"+us(c,o[1]=="k"?"":a)+"}":typeof c=="object"?n+=us(c,a?a.replace(/([^,])+/g,m=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,m):m?m+" "+u:u)):o):c!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=us.p?us.p(o,c):o+":"+c+";")}return r+(a&&i?a+"{"+i+"}":i)+n},pn={},kC=e=>{if(typeof e=="object"){let a="";for(let r in e)a+=r+kC(e[r]);return a}return e},h7=(e,a,r,n,i)=>{let o=kC(e),c=pn[o]||(pn[o]=(u=>{let h=0,p=11;for(;h<u.length;)p=101*p+u.charCodeAt(h++)>>>0;return"go"+p})(o));if(!pn[c]){let u=o!==e?e:(h=>{let p,x,j=[{}];for(;p=f7.exec(h.replace(p7,""));)p[4]?j.shift():p[3]?(x=p[3].replace(lw," ").trim(),j.unshift(j[0][x]=j[0][x]||{})):j[0][p[1]]=p[2].replace(lw," ").trim();return j[0]})(e);pn[c]=us(i?{["@keyframes "+c]:u}:u,r?"":"."+c)}let m=r&&pn.g?pn.g:null;return r&&(pn.g=pn[c]),((u,h,p,x)=>{x?h.data=h.data.replace(x,u):h.data.indexOf(u)===-1&&(h.data=p?u+h.data:h.data+u)})(pn[c],a,n,m),c},x7=(e,a,r)=>e.reduce((n,i,o)=>{let c=a[o];if(c&&c.call){let m=c(r),u=m&&m.props&&m.props.className||/^go/.test(m)&&m;c=u?"."+u:m&&typeof m=="object"?m.props?"":us(m,""):m===!1?"":m}return n+i+(c??"")},"");function Rm(e){let a=this||{},r=e.call?e(a.p):e;return h7(r.unshift?r.raw?x7(r,[].slice.call(arguments,1),a.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(a.p):i),{}):r,m7(a.target),a.g,a.o,a.k)}let EC,Mg,zg;Rm.bind({g:1});let Sn=Rm.bind({k:1});function g7(e,a,r,n){us.p=a,EC=e,Mg=r,zg=n}function vs(e,a){let r=this||{};return function(){let n=arguments;function i(o,c){let m=Object.assign({},o),u=m.className||i.className;r.p=Object.assign({theme:Mg&&Mg()},m),r.o=/ *go\d+/.test(u),m.className=Rm.apply(r,n)+(u?" "+u:"");let h=e;return e[0]&&(h=m.as||e,delete m.as),zg&&h[0]&&zg(m),EC(h,m)}return i}}var b7=e=>typeof e=="function",Mu=(e,a)=>b7(e)?e(a):e,y7=(()=>{let e=0;return()=>(++e).toString()})(),OC=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let a=matchMedia("(prefers-reduced-motion: reduce)");e=!a||a.matches}return e}})(),v7=20,$b="default",DC=(e,a)=>{let{toastLimit:r}=e.settings;switch(a.type){case 0:return{...e,toasts:[a.toast,...e.toasts].slice(0,r)};case 1:return{...e,toasts:e.toasts.map(c=>c.id===a.toast.id?{...c,...a.toast}:c)};case 2:let{toast:n}=a;return DC(e,{type:e.toasts.find(c=>c.id===n.id)?1:0,toast:n});case 3:let{toastId:i}=a;return{...e,toasts:e.toasts.map(c=>c.id===i||i===void 0?{...c,dismissed:!0,visible:!1}:c)};case 4:return a.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(c=>c.id!==a.toastId)};case 5:return{...e,pausedAt:a.time};case 6:let o=a.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+o}))}}},Nu=[],TC={toasts:[],pausedAt:void 0,settings:{toastLimit:v7}},$r={},RC=(e,a=$b)=>{$r[a]=DC($r[a]||TC,e),Nu.forEach(([r,n])=>{r===a&&n($r[a])})},PC=e=>Object.keys($r).forEach(a=>RC(e,a)),j7=e=>Object.keys($r).find(a=>$r[a].toasts.some(r=>r.id===e)),Pm=(e=$b)=>a=>{RC(a,e)},N7={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},w7=(e={},a=$b)=>{let[r,n]=b.useState($r[a]||TC),i=b.useRef($r[a]);b.useEffect(()=>(i.current!==$r[a]&&n($r[a]),Nu.push([a,n]),()=>{let c=Nu.findIndex(([m])=>m===a);c>-1&&Nu.splice(c,1)}),[a]);let o=r.toasts.map(c=>{var m,u,h;return{...e,...e[c.type],...c,removeDelay:c.removeDelay||((m=e[c.type])==null?void 0:m.removeDelay)||e?.removeDelay,duration:c.duration||((u=e[c.type])==null?void 0:u.duration)||e?.duration||N7[c.type],style:{...e.style,...(h=e[c.type])==null?void 0:h.style,...c.style}}});return{...r,toasts:o}},S7=(e,a="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:a,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:r?.id||y7()}),xc=e=>(a,r)=>{let n=S7(a,e,r);return Pm(n.toasterId||j7(n.id))({type:2,toast:n}),n.id},_=(e,a)=>xc("blank")(e,a);_.error=xc("error");_.success=xc("success");_.loading=xc("loading");_.custom=xc("custom");_.dismiss=(e,a)=>{let r={type:3,toastId:e};a?Pm(a)(r):PC(r)};_.dismissAll=e=>_.dismiss(void 0,e);_.remove=(e,a)=>{let r={type:4,toastId:e};a?Pm(a)(r):PC(r)};_.removeAll=e=>_.remove(void 0,e);_.promise=(e,a,r)=>{let n=_.loading(a.loading,{...r,...r?.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let o=a.success?Mu(a.success,i):void 0;return o?_.success(o,{id:n,...r,...r?.success}):_.dismiss(n),i}).catch(i=>{let o=a.error?Mu(a.error,i):void 0;o?_.error(o,{id:n,...r,...r?.error}):_.dismiss(n)}),e};var A7=1e3,C7=(e,a="default")=>{let{toasts:r,pausedAt:n}=w7(e,a),i=b.useRef(new Map).current,o=b.useCallback((x,j=A7)=>{if(i.has(x))return;let v=setTimeout(()=>{i.delete(x),c({type:4,toastId:x})},j);i.set(x,v)},[]);b.useEffect(()=>{if(n)return;let x=Date.now(),j=r.map(v=>{if(v.duration===1/0)return;let w=(v.duration||0)+v.pauseDuration-(x-v.createdAt);if(w<0){v.visible&&_.dismiss(v.id);return}return setTimeout(()=>_.dismiss(v.id,a),w)});return()=>{j.forEach(v=>v&&clearTimeout(v))}},[r,n,a]);let c=b.useCallback(Pm(a),[a]),m=b.useCallback(()=>{c({type:5,time:Date.now()})},[c]),u=b.useCallback((x,j)=>{c({type:1,toast:{id:x,height:j}})},[c]),h=b.useCallback(()=>{n&&c({type:6,time:Date.now()})},[n,c]),p=b.useCallback((x,j)=>{let{reverseOrder:v=!1,gutter:w=8,defaultPosition:A}=j||{},S=r.filter(k=>(k.position||A)===(x.position||A)&&k.height),g=S.findIndex(k=>k.id===x.id),C=S.filter((k,O)=>O<g&&k.visible).length;return S.filter(k=>k.visible).slice(...v?[C+1]:[0,C]).reduce((k,O)=>k+(O.height||0)+w,0)},[r]);return b.useEffect(()=>{r.forEach(x=>{if(x.dismissed)o(x.id,x.removeDelay);else{let j=i.get(x.id);j&&(clearTimeout(j),i.delete(x.id))}})},[r,o]),{toasts:r,handlers:{updateHeight:u,startPause:m,endPause:h,calculateOffset:p}}},k7=Sn`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,E7=Sn`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,O7=Sn`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,D7=vs("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${k7} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${E7} 0.15s ease-out forwards;
animation-delay: 150ms;
position: absolute;
border-radius: 3px;
opacity: 0;
background: ${e=>e.secondary||"#fff"};
bottom: 9px;
left: 4px;
height: 2px;
width: 12px;
}
&:before {
animation: ${O7} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,T7=Sn`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,R7=vs("div")`
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: ${e=>e.secondary||"#e0e0e0"};
border-right-color: ${e=>e.primary||"#616161"};
animation: ${T7} 1s linear infinite;
`,P7=Sn`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,_7=Sn`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,M7=vs("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${P7} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${_7} 0.2s ease-out forwards;
opacity: 0;
animation-delay: 200ms;
position: absolute;
border-right: 2px solid;
border-bottom: 2px solid;
border-color: ${e=>e.secondary||"#fff"};
bottom: 6px;
left: 6px;
height: 10px;
width: 6px;
}
`,z7=vs("div")`
position: absolute;
`,L7=vs("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,B7=Sn`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,I7=vs("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${B7} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,F7=({toast:e})=>{let{icon:a,type:r,iconTheme:n}=e;return a!==void 0?typeof a=="string"?b.createElement(I7,null,a):a:r==="blank"?null:b.createElement(L7,null,b.createElement(R7,{...n}),r!=="loading"&&b.createElement(z7,null,r==="error"?b.createElement(D7,{...n}):b.createElement(M7,{...n})))},$7=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,U7=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,q7="0%{opacity:0;} 100%{opacity:1;}",H7="0%{opacity:1;} 100%{opacity:0;}",V7=vs("div")`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`,Y7=vs("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,K7=(e,a)=>{let r=e.includes("top")?1:-1,[n,i]=OC()?[q7,H7]:[$7(r),U7(r)];return{animation:a?`${Sn(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Sn(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},G7=b.memo(({toast:e,position:a,style:r,children:n})=>{let i=e.height?K7(e.position||a||"top-center",e.visible):{opacity:0},o=b.createElement(F7,{toast:e}),c=b.createElement(Y7,{...e.ariaProps},Mu(e.message,e));return b.createElement(V7,{className:e.className,style:{...i,...r,...e.style}},typeof n=="function"?n({icon:o,message:c}):b.createElement(b.Fragment,null,o,c))});g7(b.createElement);var J7=({id:e,className:a,style:r,onHeightUpdate:n,children:i})=>{let o=b.useCallback(c=>{if(c){let m=()=>{let u=c.getBoundingClientRect().height;n(e,u)};m(),new MutationObserver(m).observe(c,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return b.createElement("div",{ref:o,className:a,style:r},i)},W7=(e,a)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:OC()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${a*(r?1:-1)}px)`,...n,...i}},X7=Rm`
z-index: 9999;
> * {
pointer-events: auto;
}
`,Zd=16,Z7=({reverseOrder:e,position:a="top-center",toastOptions:r,gutter:n,children:i,toasterId:o,containerStyle:c,containerClassName:m})=>{let{toasts:u,handlers:h}=C7(r,o);return b.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:Zd,left:Zd,right:Zd,bottom:Zd,pointerEvents:"none",...c},className:m,onMouseEnter:h.startPause,onMouseLeave:h.endPause},u.map(p=>{let x=p.position||a,j=h.calculateOffset(p,{reverseOrder:e,gutter:n,defaultPosition:a}),v=W7(x,j);return b.createElement(J7,{id:p.id,key:p.id,onHeightUpdate:h.updateHeight,className:p.visible?X7:"",style:v},p.type==="custom"?Mu(p.message,p):i?i(p):b.createElement(G7,{toast:p,position:x}))}))},We=_,_C={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},iw=pr.createContext&&pr.createContext(_C),Q7=["attr","size","title"];function eM(e,a){if(e==null)return{};var r=tM(e,a),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(a.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tM(e,a){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(a.indexOf(n)>=0)continue;r[n]=e[n]}return r}function zu(){return zu=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zu.apply(this,arguments)}function ow(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lu(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?ow(Object(r),!0).forEach(function(n){aM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ow(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aM(e,a,r){return a=rM(a),a in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function rM(e){var a=nM(e,"string");return typeof a=="symbol"?a:a+""}function nM(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function MC(e){return e&&e.map((a,r)=>pr.createElement(a.tag,Lu({key:r},a.attr),MC(a.child)))}function Ye(e){return a=>pr.createElement(sM,zu({attr:Lu({},e.attr)},a),MC(e.child))}function sM(e){var a=r=>{var{attr:n,size:i,title:o}=e,c=eM(e,Q7),m=i||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),pr.createElement("svg",zu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,c,{className:u,style:Lu(Lu({color:e.color||r.color},r.style),e.style),height:m,width:m,xmlns:"http://www.w3.org/2000/svg"}),o&&pr.createElement("title",null,o),e.children)};return iw!==void 0?pr.createElement(iw.Consumer,null,r=>a(r)):a(_C)}function lM(e){return Ye({attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.715 17.301c-.017-.018-1.717-1.854-1.73-6.32-.009-2.607-1.69-4.824-4.019-5.641l.034-.34c0-1.103-.896-2-2-2s-2 .897-2 2l.034.338c-2.336.816-4.019 3.036-4.019 5.646 0 4.462-1.711 6.296-1.721 6.306-.287.286-.374.716-.22 1.091s.521.619.926.619h3.143c.447 1.72 1.999 3 3.857 3s3.41-1.28 3.857-3h3.143c.4 0 .758-.243.915-.61s.076-.799-.2-1.089zm-7.715-10.301c2.189 0 3.978 1.789 3.984 3.987.002.728.046 1.396.118 2.013h-8.2c.071-.617.113-1.286.113-2.016.001-2.196 1.788-3.984 3.985-3.984zm0 13c-.737 0-1.375-.405-1.722-1h3.443c-.346.595-.984 1-1.721 1zm-5.186-3c.352-.736.705-1.731.938-3h8.502c.234 1.269.588 2.264.938 3h-10.378z"},child:[]}]})(e)}function iM(e){return Ye({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z"},child:[]}]})(e)}function cw(e){return Ye({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.5 11.5a.5.5 0 0 1-1 0V7.707L6.354 8.854a.5.5 0 1 1-.708-.708l2-2a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 7.707z"},child:[]},{tag:"path",attr:{d:"M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2M9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z"},child:[]}]})(e)}function oM(e){return Ye({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M2.5 8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1"},child:[]},{tag:"path",attr:{d:"M5 1a2 2 0 0 0-2 2v2H2a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h1v1a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-1h1a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-1V3a2 2 0 0 0-2-2zM4 3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2H4zm1 5a2 2 0 0 0-2 2v1H2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v-1a2 2 0 0 0-2-2zm7 2v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1"},child:[]}]})(e)}const cM="/components_logo.png",dM=()=>{const e=yr(),a=Dn(),r=bs(),{user:n,isAuthenticated:i,loading:o,error:c,success:m}=br(U=>U.user),[u,h]=b.useState(!1),[p,x]=b.useState(null),[j,v]=b.useState(null),w=b.useRef(null),A=b.useRef(null),S=b.useRef([]),g=b.useRef(null),[C,k]=b.useState(0),[O,D]=b.useState(!1),[B,L]=b.useState([]),[T,R]=b.useState(!1),z=async()=>{try{const U=localStorage.getItem("token"),I=await fetch("/api/expenses/requests",{headers:{Authorization:`Bearer ${U}`}}).then(ve=>ve.json()).catch(()=>({requests:[]})),P=await fetch("/api/expenses/",{headers:{Authorization:`Bearer ${U}`}}).then(ve=>ve.json()).catch(()=>({expenses:[]})),H=(I.requests||[]).length,ee=Date.now()-1440*60*1e3,pe=(P.expenses||[]).filter(ve=>new Date(ve.createdAt||ve.date).getTime()>=ee&&ve.createdBy?.role==="admin").length;k(H+pe)}catch(U){console.error("notif fetch failed",U)}};b.useEffect(()=>{z();const U=setInterval(z,3e4);return()=>clearInterval(U)},[]);const $=async()=>{R(!0);try{const U=localStorage.getItem("token"),I=await F.get("/api/expenses/requests",{headers:{Authorization:`Bearer ${U}`}}).catch(()=>({data:{requests:[]}})),P=await F.get("/api/expenses/",{headers:{Authorization:`Bearer ${U}`}}).catch(()=>({data:{expenses:[]}})),H=(I.data?.requests||[]).map(ue=>({id:ue._id,kind:"request",requestType:ue.requestType,requestedBy:ue.requestedBy,payload:ue.payload,createdAt:ue.createdAt,expenseId:ue.expenseId})),ee=Date.now()-1440*60*1e3,pe=(P.data?.expenses||[]).filter(ue=>new Date(ue.createdAt||ue.date).getTime()>=ee&&ue.createdBy?.role==="admin").map(ue=>({id:ue._id,kind:"added",expenseName:ue.expenseName,amount:ue.amount,createdBy:ue.createdBy,createdAt:ue.createdAt||ue.date})),ve=[...H,...pe].sort((ue,he)=>new Date(he.createdAt)-new Date(ue.createdAt));L(ve)}catch(U){console.error("load notifications failed",U),We.error("Failed to load notifications")}finally{R(!1)}},Z=async()=>{const U=!O;D(U),U&&await $()},fe=async(U,I)=>{try{const P=localStorage.getItem("token"),H=await F.post(`/api/expenses/requests/${U}/handle`,{action:I},{headers:{Authorization:`Bearer ${P}`}});We.success(H.data?.message||"Done"),z(),await $()}catch(P){console.error("handle request failed",P),We.error(P.response?.data?.message||"Failed")}};b.useEffect(()=>{console.log("API_URL:",ya),console.log("User state:",n),console.log("Token:",localStorage.getItem("token")),n?.profilePicture&&console.log("Profile picture URL:",`${ya}${n.profilePicture}`),i&&!n&&r(el())},[r,i,n]),b.useEffect(()=>{if(m&&w.current!==m){We.dismiss(),(S.current||[]).forEach(P=>clearTimeout(P)),S.current=[],w.current=null,w.current=m;const U=We.success(m,{duration:1e3});g.current=U,r(hs());const I=setTimeout(()=>{try{U&&We.dismiss(U)}catch{}w.current===m&&(w.current=null),g.current===U&&(g.current=null)},1200);S.current.push(I)}},[m,r]),b.useEffect(()=>{if(c&&A.current!==c){We.dismiss(),(S.current||[]).forEach(P=>clearTimeout(P)),S.current=[],A.current=null,A.current=c;const U=We.error(c,{duration:1e3});g.current=U,r(hs());const I=setTimeout(()=>{try{U&&We.dismiss(U)}catch{}A.current===c&&(A.current=null),g.current===U&&(g.current=null)},1200);S.current.push(I)}},[c,r]),b.useEffect(()=>()=>{(S.current||[]).forEach(U=>clearTimeout(U)),S.current=[]},[]);const se=()=>{r(FP()),a("/login")},ie=U=>{const I=U.target.files[0];if(console.log("Selected file in handleFileChange:",I),I){if(!["image/jpeg","image/png"].includes(I.type)){console.log("Invalid file type. Please use JPEG or PNG."),v(null),x(null);return}if(I.size>5*1024*1024){console.log("File size exceeds 5MB limit."),v(null),x(null);return}v(I);const P=new FileReader;P.onloadend=()=>{x(P.result)},P.readAsDataURL(I)}else console.log("No file selected"),x(null),v(null)},V=()=>{console.log("Upload triggered with selectedFile:",j),j?(console.log("File details:",{name:j.name,type:j.type,size:j.size}),r(yu(j)).then(U=>{console.log("Dispatch result:",U),U.meta.requestStatus==="fulfilled"&&(r(el()),h(!1),x(null),v(null))})):console.log("No file to upload")},K=()=>{h(!1),x(null),v(null)},ce=U=>{const I="https://via.placeholder.com/150?text=Profile";if(!U)return I;try{return`${new URL(U).toString()}?t=${Date.now()}`}catch{try{const H=new URL(ya).origin,ee=U.startsWith("/")?U:`/${U}`;return`${H}${ee}?t=${Date.now()}`}catch{return`${ya}${U}?t=${Date.now()}`}}};return t.jsxs("div",{className:"w-full bg-gradient-to-r from-white to-green-700 px-6 py-3 flex justify-between items-center shadow-md",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsx("img",{src:cM,alt:"Logo",className:"w-14 h-14"}),t.jsxs("div",{children:[t.jsx("h1",{className:"text-3xl font-semibold text-black",children:e.pathname==="/candidates-cv"?"Candidates CV":e.pathname==="/candidate"?"Candidate":e.pathname==="/allied-form"?"Allied Form":e.pathname==="/visa-form"?"Visa Form":e.pathname==="/undertaking-letter"?"Undertaking Letter":e.pathname==="/expense"?"Expense":e.pathname==="/deposit-slip"?"Deposit Slip":e.pathname==="/nbpchallan"?"NBP CHALLAN":e.pathname==="/contract-letter"?"Contract Letter":"Dashboard"}),t.jsx("p",{className:"text-sm text-black font-semibold",children:"Welcome back! Here's what's happening with your visa processes."})]})]}),t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs(Fr,{to:"/candidates-cv",className:"flex items-center gap-2 bg-white text-sm px-3 py-1.5 rounded-md border border-gray-300 shadow hover:shadow-md cursor-pointer",children:[t.jsx(cw,{className:"text-gray-600 font-bold"}),"UPLOAD CV"]}),t.jsxs("label",{className:"flex items-center gap-2 bg-white text-sm px-3 py-1.5 rounded-md border border-gray-300 shadow hover:shadow-md cursor-pointer",children:[t.jsx(cw,{className:"text-gray-600 font-bold"}),"Report",t.jsx("input",{type:"file",className:"hidden",onChange:U=>ie(U)})]}),t.jsxs("div",{className:"relative bg-white rounded-full px-3 py-3",children:[t.jsxs("div",{onClick:Z,className:"cursor-pointer",children:[t.jsx(lM,{className:"text-black text-2xl"}),C>0&&t.jsx("span",{className:"absolute -top-2 -right-2 bg-red-600 text-white text-xs w-5 h-5 flex items-center justify-center rounded-full",children:C})]}),O&&t.jsxs("div",{className:"absolute right-0 mt-12 w-96 bg-white rounded shadow-lg border border-gray-300 z-50 p-3",children:[t.jsxs("div",{className:"flex justify-between items-center mb-2",children:[t.jsx("div",{className:"font-medium",children:"Notifications"}),t.jsxs("div",{className:"text-xs text-gray-500",children:[B.length," items"]})]}),T?t.jsx("div",{className:"text-center text-sm text-gray-500",children:"Loading..."}):B.length===0?t.jsx("div",{className:"text-sm text-gray-500",children:"No notifications"}):t.jsx("ul",{className:"space-y-2 max-h-64 overflow-auto",children:B.map(U=>t.jsxs("li",{className:"p-2 border rounded flex justify-between items-start",children:[t.jsx("div",{className:"text-sm",children:U.kind==="request"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"font-medium",children:[U.requestType.toUpperCase()," request"]}),t.jsxs("div",{className:"text-xs text-gray-600",children:["From: ",U.requestedBy?.username||"Unknown"]}),t.jsxs("div",{className:"text-xs text-gray-700",children:["Payload: ",JSON.stringify(U.payload||{})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"font-medium",children:"New Expense added"}),t.jsxs("div",{className:"text-xs text-gray-600",children:[U.expenseName," —"," ",Number(U.amount).toLocaleString()]}),t.jsxs("div",{className:"text-xs text-gray-600",children:["By: ",U.createdBy?.username]})]})}),t.jsx("div",{className:"flex flex-col gap-2",children:U.kind==="request"?t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>fe(U.id,"approve"),className:"px-2 py-1 bg-green-600 text-white rounded text-xs",children:"Approve"}),t.jsx("button",{onClick:()=>fe(U.id,"reject"),className:"px-2 py-1 bg-red-600 text-white rounded text-xs",children:"Reject"})]}):t.jsx("button",{onClick:()=>{a("/expense"),D(!1)},className:"px-2 py-1 bg-blue-600 text-white rounded text-xs",children:"View"})})]},U.id))})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("label",{className:"cursor-pointer",onClick:()=>h(!0),children:t.jsx("img",{src:i&&n?.profilePicture?ce(n.profilePicture):"https://via.placeholder.com/150?text=Profile",alt:"User",className:"w-12 h-12 rounded-full object-cover"})}),t.jsxs("div",{className:"text-left",children:[t.jsx("p",{className:"text-base font-medium text-white",children:i&&n?n.username:"Guest"}),t.jsx("p",{className:"text-xs text-white",children:i&&n?n.role:"N/A"})]})]}),i&&n?.role==="superadmin"&&t.jsx("div",{children:t.jsx(Fr,{to:"/super-admin",className:"ml-4 bg-white text-black px-3 py-1 rounded-md",children:"Super Admin"})}),i&&t.jsx("button",{onClick:se,className:"bg-red-600 text-white text-sm px-3 py-1.5 rounded-md hover:bg-red-700 transition duration-200",children:"Logout"})]}),u&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg w-96",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Upload Profile Picture"}),t.jsx("input",{type:"file",accept:"image/jpeg,image/png",className:"mb-4 w-full",onChange:ie}),p&&t.jsx("div",{className:"mb-4",children:t.jsx("img",{src:p,alt:"Preview",className:"w-32 h-32 object-cover rounded-full mx-auto"})}),t.jsxs("div",{className:"flex justify-end space-x-2",children:[t.jsx("button",{onClick:K,className:"bg-gray-300 text-black px-4 py-2 rounded-md hover:bg-gray-400",children:"Cancel"}),t.jsx("button",{onClick:V,disabled:!j,className:`px-4 py-2 rounded-md ${j?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:"Upload"})]})]})}),o&&t.jsx("div",{className:"text-white text-sm",children:"Uploading..."}),c&&t.jsx("div",{className:"text-red-500 text-sm",children:c}),m&&t.jsx("div",{className:"text-green-500 text-sm",children:m})]})};function uM(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.03 2.59a1.501 1.501 0 0 1 1.94 0l7.5 6.363a1.5 1.5 0 0 1 .53 1.144V19.5a1.5 1.5 0 0 1-1.5 1.5h-5.75a.75.75 0 0 1-.75-.75V14h-2v6.25a.75.75 0 0 1-.75.75H4.5A1.5 1.5 0 0 1 3 19.5v-9.403c0-.44.194-.859.53-1.144ZM12 3.734l-7.5 6.363V19.5h5v-6.25a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v6.25h5v-9.403Z"},child:[]}]})(e)}function dw(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.187 3.588a2.75 2.75 0 0 0-3.889 0L5.575 13.31a4.5 4.5 0 0 0 6.364 6.364l8.662-8.662a.75.75 0 0 1 1.061 1.06L13 20.735a6 6 0 0 1-8.485-8.485l9.723-9.723a4.247 4.247 0 0 1 4.124-1.139 4.247 4.247 0 0 1 3.025 3.025 4.247 4.247 0 0 1-1.139 4.124l-9.193 9.193a2.64 2.64 0 0 1-1.858.779 2.626 2.626 0 0 1-1.854-.779c-.196-.196-.338-.47-.43-.726a2.822 2.822 0 0 1-.168-.946c0-.7.284-1.373.775-1.864l8.132-8.131a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734l-8.131 8.132a1.148 1.148 0 0 0-.336.803c.003.204.053.405.146.587.01.018.018.028.02.032.22.215.501.332.786.332.29 0 .58-.121.798-.34l9.192-9.192a2.75 2.75 0 0 0 0-3.89Z"},child:[]}]})(e)}function mM(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function fM(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"m9 15 2 2 4-4"},child:[]}]})(e)}function pM(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z"},child:[]},{tag:"path",attr:{d:"M22 10v6"},child:[]},{tag:"path",attr:{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5"},child:[]}]})(e)}function hM(e){return Ye({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-102.1-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31L216 408z"},child:[]}]})(e)}function xM(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z"},child:[]}]})(e)}function qh(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(e)}function xt(e){return Ye({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"},child:[]}]})(e)}function Kt(e){return Ye({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(e)}function zC(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function Ve(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function mt(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 192V77.25c0-8.49-3.37-16.62-9.37-22.63L393.37 9.37c-6-6-14.14-9.37-22.63-9.37H96C78.33 0 64 14.33 64 32v160c-35.35 0-64 28.65-64 64v112c0 8.84 7.16 16 16 16h48v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h48c8.84 0 16-7.16 16-16V256c0-35.35-28.65-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.84 7.16 16 16 16h48v96zm48 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"},child:[]}]})(e)}function Tn(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"},child:[]}]})(e)}function pa(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function Rn(e){return Ye({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(e)}function Jt(e){return Ye({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 64H192C85.961 64 0 149.961 0 256s85.961 192 192 192h192c106.039 0 192-85.961 192-192S490.039 64 384 64zM64 256c0-70.741 57.249-128 128-128 70.741 0 128 57.249 128 128 0 70.741-57.249 128-128 128-70.741 0-128-57.249-128-128zm320 128h-48.905c65.217-72.858 65.236-183.12 0-256H384c70.741 0 128 57.249 128 128 0 70.74-57.249 128-128 128z"},child:[]}]})(e)}function Wt(e){return Ye({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 64H192C86 64 0 150 0 256s86 192 192 192h192c106 0 192-86 192-192S490 64 384 64zm0 320c-70.8 0-128-57.3-128-128 0-70.8 57.3-128 128-128 70.8 0 128 57.3 128 128 0 70.8-57.3 128-128 128z"},child:[]}]})(e)}function ze(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"},child:[]}]})(e)}function LC(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function gM(e){return Ye({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M204,168a52.06,52.06,0,0,1-52,52H140v12a12,12,0,0,1-24,0V220H104a52.06,52.06,0,0,1-52-52,12,12,0,0,1,24,0,28,28,0,0,0,28,28h48a28,28,0,0,0,0-56H112a52,52,0,0,1,0-104h4V24a12,12,0,0,1,24,0V36h4a52.06,52.06,0,0,1,52,52,12,12,0,0,1-24,0,28,28,0,0,0-28-28H112a28,28,0,0,0,0,56h40A52.06,52.06,0,0,1,204,168Z"},child:[]}]})(e)}function bM(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z"},child:[]}]})(e)}function BC(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}const Rr=()=>{const e=yr(),a="flex items-center gap-3 px-5 py-3 rounded-md cursor-pointer transition-all select-none",{user:r}=br(o=>o.user),n=o=>r?r.role==="superadmin"?!0:Array.isArray(r.permittedPages)?r.permittedPages.map(m=>(m||"").toLowerCase()).includes((o||"").toLowerCase()):!1:!1,i=o=>e.pathname===o;return t.jsxs("div",{className:"w-full min-h-screen bg-white p-4",children:[n("/dashboard")&&t.jsxs(Fr,{to:"/dashboard",className:`${a} ${i("/")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(uM,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Dashboard"})]}),n("/candidate")&&t.jsxs(Fr,{to:"/candidate",className:`${a} mt-2 ${i("/Candidate")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(mM,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Candidates"})]}),n("/visa-form")&&t.jsxs(Fr,{to:"/visa-form",className:`${a} mt-2 ${i("/visa-form")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(fM,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Visa Form"})]}),n("/nbpchallan")&&t.jsxs(Fr,{to:"/nbpchallan",className:`${a} mt-2 ${i("/nbpchallan")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(pM,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"NBP CHALLAN"})]}),n("/candidates-cv")&&t.jsxs(Fr,{to:"/candidates-cv",className:`${a} mt-2 ${i("/candidates-cv")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(hM,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Candidates CV"})]}),n("/expense")&&t.jsxs(Fr,{to:"/expense",className:`${a} mt-2 ${i("/expense")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(gM,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Expenses"})]})]})},yM="/dashboard_bg1.jpeg",vM="/dashboard_bg2.jpeg",jM="/dashboard_visa.png",NM="/dashboard_protector.png",wM="/dashboard_Active.png",SM="/dashboard_NAVTTC.png",Hh="/dashboard_profile.jpeg",AM=()=>{const e=[{title:"Total Candidates",value:256,percent:"+12% from last month",buttonLabel:"UPLOAD CV",bgImage:yM,accept:".pdf,.doc,.docx"},{title:"Monthly Expense",value:"256,300",percent:"+12% from last month",buttonLabel:"ADD EXPENSE",bgImage:vM,accept:".xlsx,.csv"},{title:"Completed Visas",value:256,percent:"+12% from last month",image:jM},{title:"Pending Protector",value:256,percent:"+12% from last month",image:NM},{title:"Active Cases",value:256,percent:"+12% from last month",image:wM},{title:"NAVTTC Tests",value:256,percent:"+12% from last month",image:SM}],a=[{name:"Ahmed Khan",code:"CN000001",detail:"Visa approved for Saudi Arabia",time:"2 hours ago",status:"Pending",avatar:null},{name:"Fatima Ali",code:"CN000002",detail:"NAVTTC test scheduled for Electrician",time:"4 hours ago",status:"Approved",avatar:Hh},{name:"Ahmed Khan",code:"CN000003",detail:"Visa approved for Saudi Arabia",time:"2 hours ago",status:"Pending",avatar:Hh},{name:"Fatima Ali",code:"CN000004",detail:"NAVTTC test scheduled for Electrician",time:"4 hours ago",status:"REJECTED",avatar:Hh}],r=(n,i)=>{const o=n.target.files[0];o&&console.log(`${i} file selected:`,o.name)};return t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[25%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"flex-1 p-6",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:"Summary"}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:e.slice(0,2).map((n,i)=>t.jsx("div",{className:"relative h-44 text-white rounded-xl overflow-hidden shadow-md",style:{backgroundImage:`url(${n.bgImage})`,backgroundSize:"cover",backgroundPosition:"center"},children:t.jsxs("div",{className:"absolute inset-0 bg-black bg-opacity-40 p-4 flex flex-col justify-between",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-semibold",children:n.title}),t.jsx("p",{className:"text-3xl font-bold mt-2",children:n.value}),t.jsxs("p",{className:"text-sm flex items-center mt-1",children:[t.jsx(xM,{className:"mr-1 text-green-400"}),n.percent]})]}),t.jsxs("label",{className:"self-start mt-2 bg-white text-black text-sm font-medium px-3 py-1 rounded-full cursor-pointer flex items-center",children:[t.jsx(Ve,{className:"inline mr-1"}),n.buttonLabel,t.jsx("input",{type:"file",accept:n.accept,className:"hidden",onChange:o=>r(o,n.buttonLabel)})]})]})},i))}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:e.slice(2).map((n,i)=>t.jsxs("div",{className:"bg-white p-4 rounded-xl shadow-md flex justify-between items-center",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-md font-semibold text-gray-700",children:n.title}),t.jsx("p",{className:"text-2xl font-bold text-black mt-1",children:n.value}),t.jsx("p",{className:"text-green-500 text-sm mt-1",children:n.percent})]}),n.image&&t.jsx("img",{src:n.image,alt:"icon",className:"h-12 w-12 object-contain"})]},i))}),t.jsxs("div",{className:"bg-white shadow-lg rounded-xl p-6 mt-10",children:[t.jsx("h3",{className:"text-lg font-semibold text-green-600 mb-4",children:"Total Candidates"}),["CV Collection","Medical Process","NAVTTC Tests","E-Number Issued","Embassy Submission","Visa Approved","Protector Completed"].map((n,i)=>t.jsxs("div",{className:"mb-4",children:[t.jsxs("div",{className:"flex justify-between items-center mb-1",children:[t.jsx("span",{className:"text-sm text-gray-700",children:n}),t.jsx("span",{className:"text-sm text-gray-700",children:"245/245"})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:"bg-green-600 h-2 rounded-full",style:{width:`${90-i*10}%`}})})]},i))]}),t.jsxs("div",{className:"mt-10 bg-gradient-to-b from-green-200 to-green-100 p-4 rounded-xl shadow-md",children:[t.jsx("h3",{className:"text-md font-semibold text-green-600 mb-4",children:"Recent Cases"}),t.jsx("div",{className:"grid gap-4",children:a.map((n,i)=>t.jsxs("div",{className:"bg-white rounded-full p-4 shadow flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[n.avatar?t.jsx("img",{src:n.avatar,className:"w-12 h-12 rounded-full object-cover",alt:"user"}):t.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-300"}),t.jsxs("div",{children:[t.jsxs("p",{className:"font-medium text-sm text-gray-800",children:[n.name," ",t.jsxs("span",{className:"text-xs text-gray-500 ml-2",children:["Code: ",n.code]})]}),t.jsx("p",{className:"text-sm text-gray-600",children:n.detail}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:n.time})]})]}),t.jsx("button",{className:`px-3 py-1 text-xs font-semibold rounded-full ${n.status==="Pending"?"bg-orange-100 text-orange-500":n.status==="Approved"?"bg-green-100 text-green-600":"bg-red-100 text-red-500"}`,children:n.status})]},i))})]}),t.jsxs("div",{className:"bg-green-100 p-6 rounded-xl mt-8 shadow-md",children:[t.jsx("h3",{className:"text-md font-semibold text-green-800 mb-4",children:"Monthly Expenses"}),t.jsxs("p",{className:"text-3xl font-bold text-black mb-6",children:["PKR 2,450,000 ",t.jsx("span",{className:"text-yellow-500",children:"🟡"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm text-gray-700",children:[t.jsx("div",{children:"Visa Fees"}),t.jsx("div",{className:"text-right",children:"PKR 890,000"}),t.jsx("div",{children:"Medical Fees"}),t.jsx("div",{className:"text-right",children:"PKR 456,000"}),t.jsx("div",{children:"Transport Fees"}),t.jsx("div",{className:"text-right",children:"PKR 234,000"}),t.jsx("div",{children:"Electric Bill"}),t.jsx("div",{className:"text-right",children:"PKR 234,000"})]}),t.jsx("hr",{className:"my-4 border-gray-300"}),t.jsxs("div",{className:"flex justify-between font-semibold text-black",children:[t.jsx("span",{children:"Total"}),t.jsx("span",{children:"PKR 2,450,000"})]}),t.jsxs("div",{className:"flex gap-4 mt-6",children:[t.jsx("button",{className:"flex-1 text-green-700 font-medium py-2 rounded-lg bg-white hover:bg-green-50 transition",children:"Print Report"}),t.jsx("button",{className:"flex-1 bg-green-600 text-white font-medium py-2 rounded-lg hover:bg-green-700 transition",children:"View Full Report"})]})]})]})]})},uw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},mw="/candidate_img1.png",fw=e=>e==="Medical Pending"||e==="Collect VISA"?"text-green-600":e==="VISA pending"?"text-orange-500":e==="Failed Medical Test"?"text-red-600":"text-gray-600",pw=(e,a)=>[...new Set(e.map(r=>r[a]))],CM=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(""),[c,m]=b.useState("all"),[u,h]=b.useState("all"),[p,x]=b.useState(""),[j,v]=b.useState(""),[w,A]=b.useState(!1),[S,g]=b.useState(null),[C,k]=b.useState(!1);b.useEffect(()=>{(async()=>{try{const $=await fetch(`${typeof import.meta<"u","http://213.199.41.219:3001"}/api/candidates/`);if(!$.ok)throw new Error("Failed to fetch candidates");const Z=await $.json(),fe=D?.current?.state?.newCandidate;if(fe){const se=Z.some(ie=>ie._id===fe._id);a(se?Z:[fe,...Z])}else a(Z)}catch(z){console.error(z)}finally{n(!1)}})()},[]);const D={current:yr()},B=e.filter(R=>{const z=i.toLowerCase(),$=R.name||"",Z=R.profession||"";if(!($.toLowerCase().includes(z)||Z.toLowerCase().includes(z))||c!=="all"&&Z!==c||u!=="all"&&R.status!==u)return!1;const se=R.receiveDate?new Date(R.receiveDate):null,ie=p?new Date(p):null,V=j?new Date(j):null;return!(ie&&se&&se<ie||V&&se&&se>V)}),L=()=>{m("all"),h("all"),x(""),v("")},T=async R=>{try{const $=await fetch(`${typeof import.meta<"u","http://213.199.41.219:3001"}/api/candidates/${R._id}`);if(!$.ok)throw new Error("Failed to fetch candidate details");const Z=await $.json();g(Z),k(!0)}catch(z){console.error(z),alert("Failed to load candidate details")}};return t.jsxs("div",{children:[t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%]",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"w-[80%] p-6 space-y-6 bg-gray-50 relative",children:[t.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4 bg-green-100 p-4 rounded-lg mb-4",children:[t.jsx("input",{type:"text",placeholder:"Search by Candidate name or Profession",className:"flex-1 px-4 py-2 border border-gray-300 rounded-md outline-none",value:i,onChange:R=>o(R.target.value)}),t.jsxs("div",{className:"flex gap-2 relative",children:[t.jsxs("button",{className:"bg-green-600 text-white px-8 py-2 rounded-md flex items-center gap-2 hover:bg-green-700",onClick:()=>A(!w),children:[t.jsx(zC,{})," Filter"]}),t.jsxs("button",{className:"bg-green-600 text-white px-8 py-2 rounded-md flex items-center gap-2 hover:bg-green-700",children:[t.jsx(mt,{})," Print"]}),w&&t.jsxs("div",{className:"absolute top-full right-0 mt-12 w-72 bg-white rounded shadow-lg border border-gray-300 z-20 p-4",children:[t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Profession"}),t.jsxs("select",{className:"w-full border border-gray-300 rounded px-2 py-1",value:c,onChange:R=>m(R.target.value),children:[t.jsx("option",{value:"all",children:"All"}),pw(e,"profession").map(R=>t.jsx("option",{value:R,children:R},R))]})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Status"}),t.jsxs("select",{className:"w-full border border-gray-300 rounded px-2 py-1",value:u,onChange:R=>h(R.target.value),children:[t.jsx("option",{value:"all",children:"All"}),pw(e,"status").map(R=>t.jsx("option",{value:R,children:R},R))]})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Date From"}),t.jsx("input",{type:"date",className:"w-full border border-gray-300 rounded px-2 py-1",value:p,onChange:R=>x(R.target.value)})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Date To"}),t.jsx("input",{type:"date",className:"w-full border border-gray-300 rounded px-2 py-1",value:j,onChange:R=>v(R.target.value)})]}),t.jsxs("div",{className:"flex justify-between mt-4",children:[t.jsx("button",{className:"px-4 py-2 bg-gray-300 rounded",onClick:()=>{L(),A(!1)},children:"Reset"}),t.jsx("button",{className:"px-4 py-2 bg-green-600 text-white rounded",onClick:()=>A(!1),children:"Apply"})]})]})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full border border-gray-300 bg-white rounded-md text-sm",children:[t.jsx("thead",{className:"bg-gray-100 text-gray-700",children:t.jsxs("tr",{children:[t.jsx("th",{className:"p-3 border",children:"NO#"}),t.jsx("th",{className:"p-3 border",children:"Candidates"}),t.jsx("th",{className:"p-3 border",children:"Profession"}),t.jsx("th",{className:"p-3 border",children:"Source"}),t.jsx("th",{className:"p-3 border",children:"Status"}),t.jsx("th",{className:"p-3 border",children:"Received Date"}),t.jsx("th",{className:"p-3 border",children:"Actions"})]})}),t.jsx("tbody",{children:r?t.jsx("tr",{children:t.jsx("td",{colSpan:7,className:"text-center p-4 text-gray-500",children:"Loading candidates..."})}):B.length>0?B.map((R,z)=>t.jsxs("tr",{className:"text-center hover:bg-gray-50",children:[t.jsx("td",{className:"p-2 border",children:String(z+1).padStart(2,"0")}),t.jsxs("td",{className:"p-2 border flex items-center gap-2",children:[t.jsx("img",{src:R.profilePicture||mw,alt:"profile",className:"w-8 h-8 rounded-full"}),t.jsxs("div",{className:"text-left",children:[t.jsx("p",{className:"font-medium",children:R.name}),t.jsx("p",{className:"text-xs text-gray-500",children:R.city})]})]}),t.jsxs("td",{className:"p-2 border",children:[t.jsx("p",{className:"font-medium",children:R.profession}),t.jsx("p",{className:"text-xs text-gray-500",children:R.qualification})]}),t.jsx("td",{className:"p-2 border",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(bM,{className:"text-xl text-gray-700"}),t.jsx("span",{children:"Email"})]})}),t.jsx("td",{className:`p-2 border font-medium ${fw(R.status)}`,children:R.status}),t.jsx("td",{className:"p-2 border",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(iM,{className:"text-sm"}),t.jsx("span",{children:R.receiveDate?new Date(R.receiveDate).toLocaleDateString():"N/A"})]})}),t.jsx("td",{className:"p-2 border",children:t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("button",{onClick:()=>T(R),className:"bg-green-600 text-white px-2 py-1 rounded hover:bg-green-700",children:t.jsx(Kt,{})}),t.jsx("button",{className:"bg-green-600 text-white px-2 py-1 rounded hover:bg-green-700",children:t.jsx(mt,{})})]})})]},R._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:7,className:"text-center p-4 text-gray-500",children:"No candidates found."})})})]})})]})]}),C&&S&&t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:t.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:t.jsxs("div",{className:"p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-800",children:"Candidate Details"}),t.jsx("button",{onClick:()=>k(!1),className:"text-gray-500 hover:text-gray-700 text-2xl",children:"×"})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("img",{src:S.profilePicture||mw,alt:"Profile",className:"w-32 h-32 rounded-full object-cover border-4 border-green-200"}),t.jsx("h3",{className:"text-xl font-semibold mt-4",children:S.name}),t.jsx("p",{className:"text-gray-600",children:S.profession})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-700",children:"Personal Information"}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Name"}),t.jsx("p",{className:"text-sm",children:S.name||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Father Name"}),t.jsx("p",{className:"text-sm",children:S.fatherName||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Gender"}),t.jsx("p",{className:"text-sm",children:S.gender||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Age"}),t.jsx("p",{className:"text-sm",children:S.age||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"CNIC"}),t.jsx("p",{className:"text-sm",children:S.cnic||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Passport"}),t.jsx("p",{className:"text-sm",children:S.passport||"N/A"})]})]})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-700",children:"Contact Information"}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Address"}),t.jsx("p",{className:"text-sm",children:S.address||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"City"}),t.jsx("p",{className:"text-sm",children:S.city||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"State"}),t.jsx("p",{className:"text-sm",children:S.state||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Country"}),t.jsx("p",{className:"text-sm",children:S.country||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Contact"}),t.jsx("p",{className:"text-sm",children:S.contact||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Marital Status"}),t.jsx("p",{className:"text-sm",children:S.maritalStatus||"N/A"})]})]})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-700",children:"Professional Information"}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Profession"}),t.jsx("p",{className:"text-sm",children:S.profession||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Qualification"}),t.jsx("p",{className:"text-sm",children:S.qualification||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Salary"}),t.jsx("p",{className:"text-sm",children:S.salary||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Status"}),t.jsx("p",{className:`text-sm font-medium ${fw(S.status)}`,children:S.status||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Receive Date"}),t.jsx("p",{className:"text-sm",children:S.receiveDate?new Date(S.receiveDate).toLocaleDateString():"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Place of Birth"}),t.jsx("p",{className:"text-sm",children:S.placeOfBirth||"N/A"})]})]})]})]}),S.documents&&S.documents.length>0&&t.jsxs("div",{className:"mt-8",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-700 mb-4",children:"Documents"}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:S.documents.map((R,z)=>t.jsxs("div",{className:"border rounded-lg p-4 bg-gray-50",children:[t.jsx("h5",{className:"font-medium text-gray-800 mb-2",children:R.title}),t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs ${R.done?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:R.done?"Done":"Pending"}),t.jsx("span",{className:`px-2 py-1 rounded text-xs ${R.passed?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"}`,children:R.passed?"Passed":"Not Passed"})]}),t.jsx("button",{onClick:()=>window.open(R.url,"_blank"),className:"bg-green-600 text-white px-3 py-1 rounded text-sm hover:bg-green-700",children:"View Document"})]},z))})]}),t.jsx("div",{className:"flex justify-end mt-6",children:t.jsx("button",{onClick:()=>k(!1),className:"bg-gray-500 text-white px-6 py-2 rounded hover:bg-gray-600",children:"Close"})})]})})})]})},Vh="/depositslip_nbp_logo.png",kM=()=>t.jsx("div",{children:t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"flex-1 p-4 bg-white text-xs font-sans",children:[t.jsxs("div",{className:"max-w-5xl mx-auto border-black",children:[t.jsxs("div",{className:"flex justify-between items-start p-2",children:[t.jsx("div",{children:t.jsx("img",{src:Vh,alt:"NBP Logo",className:"w-24"})}),t.jsxs("div",{className:"text-center flex-1 -ml-20",children:[t.jsx("h1",{className:"text-base font-bold",children:"SPECIALIZED DEPOSIT SLIP"}),t.jsx("p",{className:"text-[10px]",children:"On behalf of Bureau of Emigration & Overseas Employment"}),t.jsx("p",{className:"text-[11px] font-bold mt-1",children:"EMIGRANT THROUGH OVERSEAS EMPLOYMENT PROMOTER"}),t.jsx("p",{className:"text-[11px] font-bold",children:"FOR SHORT TERM EMPLOYEMENT / INSURANCE EXEMPT"})]}),t.jsxs("div",{className:"text-center text-[10px] space-y-1",children:[t.jsx("p",{className:"font-semibold",children:"Bank copy"}),t.jsx("div",{className:"border-b border-black inline-block w-24"}),t.jsx("p",{children:"Deposit slip no."}),t.jsx("input",{type:"text",className:"ml-3 text-center placeholder-black border-b border-black inline-block w-28 bg-transparent focus:outline-none",placeholder:"12345"})]})]}),t.jsx("div",{className:"mt-4 border border-black divide-x divide-black text-[11px] bg-gray-300",children:t.jsxs("div",{className:"grid grid-cols-4",children:[t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Collecting Branch Name"}),t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Branch Code"}),t.jsxs("div",{className:"p-1 col-span-2 bg-gray-300 flex items-center",children:[t.jsx("span",{className:"font-bold text-black mr-2",children:"Date:"}),t.jsx("div",{className:"flex",children:Array.from({length:8}).map((e,a)=>t.jsx("input",{maxLength:1,className:"border border-black w-6 h-6 text-center bg-white -ml-[1px]"},a))})]})]})}),t.jsxs("div",{className:" border-black border-t-0 bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-2 border-black",children:[t.jsx("div",{className:"bg-white p-1 font-semibold text-[11px]",children:"Emigrant Information"}),t.jsx("div",{className:"bg-white p-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border-l border-t border-black",children:[t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-2 p-1 text-[11px] font-semibold",children:"Emigrant Name:"}),t.jsx("input",{type:"text",value:"MUHAMMAD FAROOQ",className:"col-span-4 p-1 font-bold text-[11px] border-black bg-gray-300 border-r"})]}),t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-1 p-1 text-[11px]",children:"CNIC"}),t.jsx("input",{type:"text",className:"col-span-5 p-1 border-l border-r border-black"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] gap-2 border border-black",children:[t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center border-r border-black",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Mobile):"}),t.jsx("input",{type:"text",placeholder:"0301-1234567",className:"p-1 font-bold text-black bg-gray-300 w-full "})]}),t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Residence):"}),t.jsx("input",{type:"text",placeholder:"051-1234567",className:"p-1 text-black font-bold bg-gray-300 w-full"})]})]})]}),t.jsxs("div",{className:"text-[11px] ",children:[t.jsxs("div",{className:"bg-white p-1 border-black",children:["Particular of Payments _"," ",t.jsx("span",{className:"font-semibold",children:"CREDIT TO BE MADE THROUGH TRANSACTION CODE “ZBOEOP”"})]}),t.jsxs("div",{className:"grid grid-cols-2 bg-gray-300",children:[t.jsx("div",{className:"flex items-center justify-center text-center border border-black",children:t.jsxs("div",{children:[t.jsx("p",{children:"Payments made on behalf of"}),t.jsxs("p",{className:"font-bold text-[12px] leading-snug",children:["Director General ",t.jsx("br",{})," Bureau of Emigration & Overseas Employment"]})]})}),t.jsxs("div",{className:"grid grid-cols-2 border=l",children:[t.jsx("div",{className:"border-b border-r border-t border-black p-1",children:"OPF Welfare Fund"}),t.jsx("div",{className:"border-b border-black border-r border-t p-1 text-right font-bold",children:"2000"}),t.jsx("div",{className:"border-b border-r border-black p-1",children:"State Life Insurance Premium"}),t.jsx("div",{className:"border-b border-black border-r p-1 text-right font-bold",children:"2500"}),t.jsx("div",{className:"border-r border-black p-1",children:"OEC Emigration Promotion FEE"}),t.jsx("div",{className:"p-1 text-right font-bold border-r border-black",children:"200"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] border-black border-t-0",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2 border-r",children:"Amount in Words:"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"bg-gray-300 p-2 flex justify-between items-center font-bold border-l border-t border-r border-black",children:[t.jsx("span",{children:"Total:"}),t.jsx("span",{children:"4700"})]})]})]}),t.jsxs("div",{className:"text-[11px] border-black border-t-0 bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-3 text-center font-bold border-b border-black",children:[t.jsx("div",{className:"p-1 border-r border-black border-l border-t",children:"Received By"}),t.jsx("div",{className:"p-1 border-r border-black border-t",children:"Authorized By"}),t.jsx("div",{className:"p-1 border-r border-black border-t",children:"Depositor’s Signature"})]}),t.jsxs("div",{className:"grid grid-cols-3 text-left border-b border-black",children:[t.jsx("div",{className:"p-2 border-r border-black border-l",children:t.jsx("p",{className:"mt-16 text-center",children:"Cashier’s Stamp & Signature"})}),t.jsx("div",{className:"p-2 border-r border-black",children:t.jsx("p",{className:"mt-16 text-center",children:"Authorized Officer’s Signature"})}),t.jsxs("div",{className:"p-2 border-black border-r",children:[t.jsxs("p",{className:"mb-2",children:["Name:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{className:"mb-2",children:["Contact Number:",t.jsx("input",{type:"tel",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{children:["Signature:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]})]})]})]}),t.jsxs("div",{className:"flex justify-between text-[10px] border-b border-black px-8 pb-2 mt-1 font-semibold",children:[t.jsx("p",{children:"Note: for branch use only"}),t.jsx("p",{children:"- Only cash is acceptable"}),t.jsx("p",{children:"- Separate slip for every individual"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:"flex-1 p-4 bg-white text-xs font-sans",children:t.jsxs("div",{className:"max-w-5xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-start p-2",children:[t.jsx("div",{children:t.jsx("img",{src:Vh,alt:"NBP Logo",className:"w-24"})}),t.jsxs("div",{className:"text-center flex-1 -ml-20",children:[t.jsx("h1",{className:"text-base font-bold",children:"SPECIALIZED DEPOSIT SLIP"}),t.jsx("p",{className:"text-[10px]",children:"On behalf of Bureau of Emigration & Overseas Employment"}),t.jsx("p",{className:"text-[11px] font-bold mt-1",children:"EMIGRANT THROUGH OVERSEAS EMPLOYMENT PROMOTER"}),t.jsx("p",{className:"text-[11px] font-bold",children:"FOR SHORT TERM EMPLOYEMENT / INSURANCE EXEMPT"})]}),t.jsxs("div",{className:"text-center text-[10px] space-y-1",children:[t.jsx("p",{className:"font-semibold",children:"Deposite copy"}),t.jsx("div",{className:"border-b border-black inline-block w-24"}),t.jsx("p",{className:"font-semibold",children:"Deposit slip no."}),t.jsx("input",{type:"text",className:"ml-3 text-center font-semibold placeholder-gray-800 border-b border-black inline-block w-24 bg-transparent focus:outline-none",placeholder:"12345"})]})]}),t.jsx("div",{className:"mt-4 border border-black divide-x divide-black text-[11px] bg-gray-300",children:t.jsxs("div",{className:"grid grid-cols-4",children:[t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Collecting Branch Name"}),t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Branch Code"}),t.jsxs("div",{className:"p-1 col-span-2 bg-gray-300 flex items-center",children:[t.jsx("span",{className:"font-bold text-black mr-2",children:"Date:"}),t.jsx("div",{className:"flex",children:Array.from({length:8}).map((e,a)=>t.jsx("input",{maxLength:1,className:"border border-black w-6 h-6 text-center bg-white -ml-[1px]"},a))})]})]})}),t.jsxs("div",{className:" bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-2 border-black",children:[t.jsx("div",{className:"bg-white p-1 font-semibold text-[11px]",children:"Emigrant Information"}),t.jsx("div",{className:"bg-white p-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border border-black",children:[t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-2 p-1 text-[11px] font-semibold",children:"Emigrant Name:"}),t.jsx("input",{type:"text",value:"MUHAMMAD FAROOQ",className:"col-span-4 p-1 font-bold text-[11px] bg-gray-300 border-black"})]}),t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-1 p-1 text-[11px]",children:"CNIC"}),t.jsx("input",{type:"text",className:"col-span-5 p-1 border-l border-black"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] gap-2 border-b border-black border-l border-r",children:[t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Mobile):"}),t.jsx("input",{type:"text",placeholder:"0301-1234567",className:"p-1 font-bold text-black bg-gray-300 w-full"})]}),t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Residence):"}),t.jsx("input",{type:"text",placeholder:"051-1234567",className:"p-1 text-black font-bold bg-gray-300 w-full"})]})]})]}),t.jsxs("div",{className:" mt-4 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-1 border-b border-black",children:["Particular of Payments _"," ",t.jsx("span",{className:"font-semibold",children:"CREDIT TO BE MADE THROUGH TRANSACTION CODE “ZBOEOP”"})]}),t.jsxs("div",{className:"grid grid-cols-2 bg-gray-300",children:[t.jsx("div",{className:"flex items-center justify-center text-center p-2 border-r border-black",children:t.jsxs("div",{children:[t.jsx("p",{children:"Payments made on behalf of"}),t.jsxs("p",{className:"font-bold text-[12px] leading-snug",children:["Director General ",t.jsx("br",{})," Bureau of Emigration & Overseas Employment"]})]})}),t.jsxs("div",{className:"grid grid-cols-2 border-r border-black",children:[t.jsx("div",{className:"border-b border-r border-black p-1",children:"OPF Welfare Fund"}),t.jsx("div",{className:"border-b border-black p-1 text-right font-bold",children:"2000"}),t.jsx("div",{className:"border-b border-r border-black p-1",children:"State Life Insurance Premium"}),t.jsx("div",{className:"border-b border-black p-1 text-right font-bold",children:"2500"}),t.jsx("div",{className:"border-r border-black p-1",children:"OEC Emigration Promotion FEE"}),t.jsx("div",{className:"p-1 text-right font-bold",children:"200"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] border-t-0",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2",children:"Amount in Words:"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"bg-gray-300 p-2 flex justify-between items-center font-bold border-l border-t border-r border-black",children:[t.jsx("span",{children:"Total:"}),t.jsx("span",{children:"4700"})]})]})]}),t.jsxs("div",{className:"text-[11px] border-black border-t-0 bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-3 text-center font-bold border-b border-black",children:[t.jsx("div",{className:"p-1 border-r border-t border-black border-l",children:"Received By"}),t.jsx("div",{className:"p-1 border-r border-t border-black",children:"Authorized By"}),t.jsx("div",{className:"p-1 border-r border-t border-black",children:"Depositor’s Signature"})]}),t.jsxs("div",{className:"grid grid-cols-3 text-left border-b border-black",children:[t.jsx("div",{className:"p-2 border-r border-black border-l",children:t.jsx("p",{className:"mt-16 text-center",children:"Cashier’s Stamp & Signature"})}),t.jsx("div",{className:"p-2 border-r border-black",children:t.jsx("p",{className:"mt-16 text-center",children:"Authorized Officer’s Signature"})}),t.jsxs("div",{className:"p-2 border-black border-r",children:[t.jsxs("p",{className:"mb-2",children:["Name:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{className:"mb-2",children:["Contact Number:",t.jsx("input",{type:"tel",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{children:["Signature:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]})]})]})]}),t.jsxs("div",{className:"flex justify-between text-[10px] mt-1 font-semibold",children:[t.jsx("p",{children:"Note: for branch use only"}),t.jsx("p",{children:"- Only cash is acceptable"}),t.jsx("p",{children:"- Separate slip for every individual"})]})]})}),t.jsx("div",{children:t.jsx("div",{className:"flex-1 p-4 bg-white text-xs font-sans",children:t.jsxs("div",{className:"max-w-5xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-start p-2",children:[t.jsx("div",{children:t.jsx("img",{src:Vh,alt:"NBP Logo",className:"w-24"})}),t.jsxs("div",{className:"text-center flex-1 -ml-20",children:[t.jsx("h1",{className:"text-base font-bold",children:"SPECIALIZED DEPOSIT SLIP"}),t.jsx("p",{className:"text-[10px]",children:"On behalf of Bureau of Emigration & Overseas Employment"}),t.jsx("p",{className:"text-[11px] font-bold mt-1",children:"EMIGRANT THROUGH OVERSEAS EMPLOYMENT PROMOTER"}),t.jsx("p",{className:"text-[11px] font-bold",children:"FOR SHORT TERM EMPLOYEMENT / INSURANCE EXEMPT"})]}),t.jsxs("div",{className:"text-center text-[10px] space-y-1",children:[t.jsx("p",{className:"font-semibold",children:"Deposite copy"}),t.jsx("div",{className:"border-b border-black inline-block w-24"}),t.jsx("p",{className:"font-semibold",children:"Deposit slip no."}),t.jsx("input",{type:"text",className:"ml-3 text-center font-semibold placeholder-gray-800 border-b border-black inline-block w-24 bg-transparent focus:outline-none",placeholder:"12345"})]})]}),t.jsx("div",{className:"mt-4 border border-black divide-x divide-black text-[11px] bg-gray-300",children:t.jsxs("div",{className:"grid grid-cols-4",children:[t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Collecting Branch Name"}),t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Branch Code"}),t.jsxs("div",{className:"p-1 col-span-2 bg-gray-300 flex items-center",children:[t.jsx("span",{className:"font-bold text-black mr-2",children:"Date:"}),t.jsx("div",{className:"flex",children:Array.from({length:8}).map((e,a)=>t.jsx("input",{maxLength:1,className:"border border-black w-6 h-6 text-center bg-white -ml-[1px]"},a))})]})]})}),t.jsxs("div",{className:" bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-2 border-black",children:[t.jsx("div",{className:"bg-white p-1 font-semibold text-[11px]",children:"Emigrant Information"}),t.jsx("div",{className:"bg-white p-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border border-black",children:[t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-2 p-1 text-[11px] font-semibold",children:"Emigrant Name:"}),t.jsx("input",{type:"text",value:"MUHAMMAD FAROOQ",className:"col-span-4 p-1 font-bold text-[11px] bg-gray-300 border-black"})]}),t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-1 p-1 text-[11px]",children:"CNIC"}),t.jsx("input",{type:"text",className:"col-span-5 p-1 border-l border-black"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] gap-2 border-b border-black border-l border-r",children:[t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Mobile):"}),t.jsx("input",{type:"text",placeholder:"0301-1234567",className:"p-1 font-bold text-black bg-gray-300 w-full"})]}),t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Residence):"}),t.jsx("input",{type:"text",placeholder:"051-1234567",className:"p-1 text-black font-bold bg-gray-300 w-full"})]})]})]}),t.jsxs("div",{className:" mt-4 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-1 border-b border-black",children:["Particular of Payments _"," ",t.jsx("span",{className:"font-semibold",children:"CREDIT TO BE MADE THROUGH TRANSACTION CODE “ZBOEOP”"})]}),t.jsxs("div",{className:"grid grid-cols-2 bg-gray-300",children:[t.jsx("div",{className:"flex items-center justify-center text-center p-2 border-r border-black",children:t.jsxs("div",{children:[t.jsx("p",{children:"Payments made on behalf of"}),t.jsxs("p",{className:"font-bold text-[12px] leading-snug",children:["Director General ",t.jsx("br",{})," Bureau of Emigration & Overseas Employment"]})]})}),t.jsxs("div",{className:"grid grid-cols-2 border-r border-black",children:[t.jsx("div",{className:"border-b border-r border-black p-1",children:"OPF Welfare Fund"}),t.jsx("div",{className:"border-b border-black p-1 text-right font-bold",children:"2000"}),t.jsx("div",{className:"border-b border-r border-black p-1",children:"State Life Insurance Premium"}),t.jsx("div",{className:"border-b border-black p-1 text-right font-bold",children:"2500"}),t.jsx("div",{className:"border-r border-black p-1",children:"OEC Emigration Promotion FEE"}),t.jsx("div",{className:"p-1 text-right font-bold",children:"200"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] border-t-0",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2",children:"Amount in Words:"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"bg-gray-300 p-2 flex justify-between items-center font-bold border-l border-t border-r border-black",children:[t.jsx("span",{children:"Total:"}),t.jsx("span",{children:"4700"})]})]})]}),t.jsxs("div",{className:"text-[11px] border-black border-t-0 bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-3 text-center font-bold border-b border-black",children:[t.jsx("div",{className:"p-1 border-r border-t border-black border-l",children:"Received By"}),t.jsx("div",{className:"p-1 border-r border-t border-black",children:"Authorized By"}),t.jsx("div",{className:"p-1 border-r border-t border-black",children:"Depositor’s Signature"})]}),t.jsxs("div",{className:"grid grid-cols-3 text-left border-b border-black",children:[t.jsx("div",{className:"p-2 border-r border-black border-l",children:t.jsx("p",{className:"mt-16 text-center",children:"Cashier’s Stamp & Signature"})}),t.jsx("div",{className:"p-2 border-r border-black",children:t.jsx("p",{className:"mt-16 text-center",children:"Authorized Officer’s Signature"})}),t.jsxs("div",{className:"p-2 border-black border-r",children:[t.jsxs("p",{className:"mb-2",children:["Name:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{className:"mb-2",children:["Contact Number:",t.jsx("input",{type:"tel",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{children:["Signature:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]})]})]})]}),t.jsxs("div",{className:"flex justify-between text-[10px] mt-1 font-semibold",children:[t.jsx("p",{children:"Note: for branch use only"}),t.jsx("p",{children:"- Only cash is acceptable"}),t.jsx("p",{children:"- Separate slip for every individual"})]})]})})})]})]})]})});function EM(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z"},child:[]}]})(e)}function IC(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 277.333H277.333V416h-42.666V277.333H96v-42.666h138.667V96h42.666v138.667H416v42.666z"},child:[]}]})(e)}const OM={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Ro="/candidatescv_profile.png",DM=()=>{const[e,a]=b.useState({}),[r,n]=b.useState({show:!1,message:"",type:"info"}),i=(ue,he="info",te=2500)=>{n({show:!0,message:ue,type:he}),setTimeout(()=>n({show:!1,message:"",type:he}),te)},o=ue=>{const{name:he,value:te}=ue.target;a(G=>({...G,[he]:te}))},[c,m]=b.useState(null),[u,h]=b.useState(Ro),p=b.useRef(),[x,j]=b.useState(!1),[v,w]=b.useState([]),A=ue=>{const he=ue.target.files&&ue.target.files[0];if(he){m(he),w([{name:he.name,type:he.type}]),j(!0);try{const te=URL.createObjectURL(he);h(te)}catch{h(Ro)}}},S=["Waqala Papers","Company’s Agreement","Driving Lic.","Degree’s copies","Agency’s Undertaking","Agency’s valid License copy","Police character certificate","FIR & Newspaper","Degree’s copies (2)"],[g,C]=b.useState(()=>S.map(()=>null)),k=b.useRef(S.map(()=>pr.createRef())),[O,D]=b.useState(()=>S.map(()=>!1)),[B,L]=b.useState(()=>S.map(()=>!1)),T=["Medical Test","NAVTTC Test","POLICE CHARACTER CERTIFICATE."],[R,z]=b.useState(()=>T.map(()=>({done:!1,passed:!1}))),[$,Z]=b.useState(()=>T.map(()=>null)),fe=b.useRef(T.map(()=>pr.createRef())),se=(ue,he)=>{z(te=>{const G=[...te];return G[ue]={...G[ue],[he]:!G[ue][he]},G})},ie=ue=>{const he=k.current[ue];he&&he.current&&he.current.click()},V=ue=>{const he=fe.current[ue];he&&he.current&&he.current.click()},K=(ue,he)=>{const te=he.target.files&&he.target.files[0];te&&(C(G=>{const xe=[...G];return xe[ue]=te,xe}),w([{name:te.name,type:te.type}]),j(!0))},ce=(ue,he)=>{const te=he.target.files&&he.target.files[0];te&&(Z(G=>{const xe=[...G];return xe[ue]=te,xe}),w([{name:te.name,type:te.type}]),j(!0))},U=Dn(),I=ue=>{C(he=>{const te=[...he];return te[ue]=null,te}),D(he=>{const te=[...he];return te[ue]=!1,te}),L(he=>{const te=[...he];return te[ue]=!1,te})},P=ue=>{if(!ue){i("No file attached","error");return}const he=URL.createObjectURL(ue);window.open(he,"_blank")},H=()=>{window.print()},ee=async ue=>{if(ue&&ue.preventDefault&&ue.preventDefault(),!(c||g.some(Boolean))){i("No files selected to upload","error");return}const te=e.cnic||"";if(!/^[0-9]{13}$/.test(te)){i("CNIC must be exactly 13 digits (Pakistan format)","error");return}const G=new FormData;c&&G.append("profilePicture",c);const xe=[];$.forEach((ne,_e)=>{ne&&xe.push({title:`${T[_e]}-${ne.name}`,file:ne,done:R[_e]?.done||!1,passed:R[_e]?.passed||!1})}),g.forEach((ne,_e)=>{ne&&xe.push({title:`${S[_e]}-${ne.name}`,file:ne,done:O[_e]||!1,passed:B[_e]||!1})});const Ne=xe.map(ne=>({title:ne.title,done:ne.done,passed:ne.passed}));xe.forEach(ne=>G.append("documents",ne.file,ne.title)),G.append("documentsMeta",JSON.stringify(Ne)),Object.entries(e).forEach(([ne,_e])=>{G.append(ne,_e)}),R.forEach((ne,_e)=>{G.append(`step${_e}_done`,ne.done),G.append(`step${_e}_passed`,ne.passed)});try{const ne=localStorage.getItem("token"),je=await fetch((typeof import.meta<"u","http://213.199.41.219:3001")+"/api/candidates/",{method:"POST",headers:ne?{Authorization:`Bearer ${ne}`}:{},body:G});if(!je.ok){const Ce=await je.json().catch(()=>({message:je.statusText}));throw new Error(Ce.message||"Upload failed")}const Ee=await je.json();i("Candidate saved successfully","success"),a({}),C(S.map(()=>null)),m(null),h(Ro),console.log("created candidate",Ee.candidate),Ee&&Ee.candidate&&U("/candidate",{state:{newCandidate:Ee.candidate}})}catch(ne){console.error(ne),i("Upload failed: "+(ne.message||ne),"error")}},pe=({show:ue,message:he,type:te})=>{if(!ue)return null;let G="bg-gray-800";return te==="error"&&(G="bg-red-600"),te==="success"&&(G="bg-green-600"),t.jsx("div",{className:`fixed top-6 right-6 z-[100] px-4 py-2 rounded text-white shadow-lg ${G} animate-fade-in`,style:{minWidth:180,maxWidth:320},children:he})},ve=({open:ue,files:he,onClose:te})=>ue?t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 min-w-[260px] max-w-[90vw]",children:[t.jsx("h3",{className:"text-lg font-bold mb-4",children:"File Uploaded"}),t.jsx("ul",{className:"mb-4",children:he.map((G,xe)=>t.jsx("li",{className:"text-sm text-gray-800 truncate max-w-xs",title:G.name,children:t.jsx("span",{className:"font-medium",children:G.name})},xe))}),t.jsx("button",{onClick:te,className:"px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700",children:"Close"})]})}):null;return t.jsxs("div",{children:[t.jsx(pe,{show:r.show,message:r.message,type:r.type}),t.jsx(ve,{open:x,files:v,onClose:()=>j(!1)}),t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%]",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"w-[80%] p-6 space-y-6",children:[t.jsxs("div",{className:"w-full",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx(EM,{className:"text-3xl text-black cursor-pointer mr-4"}),t.jsx("div",{className:"flex-1",children:t.jsx("div",{className:"w-full bg-gray-300 h-3 rounded-full relative",children:t.jsx("div",{className:"bg-green-600 h-3 rounded-full",style:{width:"30%"}})})})]}),t.jsx("p",{className:"text-center text-sm font-medium text-gray-700 mt-1",children:"Progress Completed 30%"})]}),t.jsxs("form",{onSubmit:ee,className:"flex items-start justify-between",children:[t.jsxs("div",{className:"w-[50%] space-y-4",children:[t.jsx("h2",{className:"text-xl font-bold text-black mb-4",children:"Candidate Details"}),[{label:"Name",name:"name",type:"text"},{label:"Father Name",name:"fatherName",type:"text"},{label:"Profession",name:"profession",type:"text"},{label:"Qualification",name:"qualification",type:"text"},{label:"Place of Birth",name:"placeOfBirth",type:"text"},{label:"CNIC No.",name:"cnic",type:"text"},{label:"Passport No.",name:"passport",type:"text"},{label:"Address",name:"address",type:"text"},{label:"City",name:"city",type:"text"},{label:"State",name:"state",type:"text"},{label:"Country",name:"country",type:"text"},{label:"Contact No. (Residence)",name:"contact",type:"text"},{label:"Marital Status",name:"maritalStatus",type:"text"},{label:"Salary",name:"salary",type:"text"}].map(ue=>t.jsxs("div",{children:[t.jsxs("label",{className:"block mb-1",children:[ue.label,":"]}),t.jsx("input",{name:ue.name,value:e[ue.name]||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",type:ue.type})]},ue.name)),t.jsxs("div",{className:"flex space-x-4",children:[t.jsxs("div",{className:"w-1/2",children:[t.jsx("label",{children:"Gender:"}),t.jsxs("select",{name:"gender",value:e.gender||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",children:[t.jsx("option",{value:"",children:"Select"}),t.jsx("option",{children:"Male"}),t.jsx("option",{children:"Female"}),t.jsx("option",{children:"Other"})]})]}),t.jsxs("div",{className:"w-1/2",children:[t.jsx("label",{children:"Age:"}),t.jsx("input",{name:"age",value:e.age||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",type:"number"})]})]}),t.jsxs("div",{className:"flex space-x-4",children:[t.jsxs("div",{className:"w-1/2",children:[t.jsx("label",{children:"PP Issue Date:"}),t.jsx("input",{name:"ppIssue",value:e.ppIssue||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",type:"date"})]}),t.jsxs("div",{className:"w-1/2",children:[t.jsx("label",{children:"PP Expiry Date:"}),t.jsx("input",{name:"ppExpiry",value:e.ppExpiry||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",type:"date"})]})]})]}),t.jsxs("div",{className:"w-[35%] flex flex-col items-center space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-700",children:"CV # 01"}),t.jsx("input",{ref:p,type:"file",accept:"image/*",className:"hidden",onChange:A}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("img",{src:u,alt:"Candidate",className:"w-40 h-40 object-fill rounded-md border-2 border-blue-300 shadow-md mb-2"}),t.jsxs("div",{className:"flex gap-2 items-center",children:[t.jsx("button",{type:"button",onClick:()=>p.current&&p.current.click(),className:"px-3 py-1 bg-green-600 text-white rounded",children:"Attach"}),t.jsx("button",{type:"button",onClick:()=>c?P(c):alert("No profile picture attached"),className:"px-3 py-1 bg-green-600 text-white rounded",children:"View"}),t.jsx("button",{type:"button",onClick:()=>{m(null),h(Ro)},className:"px-3 py-1 bg-red-500 text-white rounded",children:"Remove"})]})]}),t.jsx("p",{className:"text-base font-medium text-black",children:"CV Approved By"}),t.jsx("h4",{className:"bg-green-200 px-10 text-center py-1 rounded text-black font-bold",children:"Voco Hotel"}),t.jsxs("button",{type:"button",onClick:H,className:"flex items-center space-x-2 bg-green-600 text-white px-4 py-2 rounded",children:[t.jsx(oM,{}),t.jsx("span",{children:"Print"})]}),t.jsxs("div",{className:"space-y-4 w-full",children:[T.map((ue,he)=>t.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[t.jsx("span",{className:"w-1/3",children:ue}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-xs",children:"Done"}),t.jsxs("label",{className:"inline-flex items-center cursor-pointer relative",children:[t.jsx("input",{type:"checkbox",className:"sr-only peer",checked:R[he]?.done||!1,onChange:()=>se(he,"done")}),t.jsx("div",{className:"w-12 h-6 bg-gray-300 peer-checked:bg-green-500 rounded-full transition duration-300"}),t.jsx("div",{className:"absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition-transform duration-300 peer-checked:translate-x-6"})]})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-xs",children:"Passed"}),t.jsxs("label",{className:"inline-flex items-center cursor-pointer relative",children:[t.jsx("input",{type:"checkbox",className:"sr-only peer",checked:R[he]?.passed||!1,onChange:()=>se(he,"passed")}),t.jsx("div",{className:"w-12 h-6 bg-gray-300 peer-checked:bg-green-500 rounded-full transition duration-300"}),t.jsx("div",{className:"absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition-transform duration-300 peer-checked:translate-x-6"})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{type:"button",onClick:()=>V(he),className:"text-white px-3 py-2 bg-green-600 rounded-md",children:t.jsx(dw,{size:18})}),t.jsx("button",{type:"button",onClick:()=>P($[he]),className:"text-white px-3 py-2 bg-green-600 rounded-md",children:t.jsx(Kt,{size:16})}),t.jsx("input",{ref:fe.current[he],type:"file",className:"hidden",onChange:te=>ce(he,te)})]})]},he)),t.jsxs("div",{className:"flex justify-between space-x-4",children:[t.jsxs("div",{className:"w-1/2",children:[t.jsx("h5",{className:"font-semibold",children:"Status"}),t.jsxs("select",{name:"status",value:e.status||"",onChange:o,className:"w-full bg-green-200 text-black p-2 rounded",children:[t.jsx("option",{value:"Applied",children:"Applied"}),t.jsx("option",{value:"Approved",children:"Approved"}),t.jsx("option",{value:"Rejected",children:"Rejected"})]})]}),t.jsxs("div",{className:"w-1/2",children:[t.jsx("h5",{className:"font-semibold",children:"Receive Date"}),t.jsx("input",{name:"receiveDate",value:e.receiveDate||"",onChange:o,type:"date",className:"w-full p-2 bg-green-200 text-black rounded"})]})]}),S.map((ue,he)=>t.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-md",children:[t.jsx("h5",{className:"text-sm font-semibold text-gray-700",children:ue}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{type:"button",onClick:()=>ie(he),className:"text-white px-3 py-2 bg-green-600 rounded-md",children:t.jsx(dw,{size:18})}),t.jsx("button",{type:"button",onClick:()=>P(g[he]),className:"text-white px-3 py-2 bg-green-600 rounded-md",children:t.jsx(Kt,{size:16})}),t.jsx("button",{type:"button",onClick:()=>I(he),className:"text-white px-3 py-2 bg-red-500 rounded-md",children:"Remove"}),t.jsx("input",{ref:k.current[he],type:"file",className:"hidden",onChange:te=>K(he,te)})]})]},he)),t.jsxs("div",{className:"flex justify-center mt-4 gap-4",children:[t.jsx("button",{type:"submit",className:"flex items-center space-x-2 bg-blue-600 text-white px-6 py-2 rounded",children:"Save / Upload"}),t.jsx("button",{type:"button",onClick:()=>{a({}),C(S.map(()=>null)),m(null),h(Ro)},className:"flex items-center space-x-2 bg-gray-400 text-black px-6 py-2 rounded",children:"Reset"})]})]})]})]})]})]})]})},TM=()=>t.jsxs("div",{className:"flex min-h-screen bg-gray-100",children:[t.jsx("div",{className:"w-[25%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsx("div",{className:"flex-1 p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto p-8 bg-white text-black font-sans border border-gray-300",children:[t.jsx("div",{className:"flex justify-start mb-4",children:t.jsxs("p",{className:"font-bold",children:["DATE: ",t.jsx("span",{className:"font-bold",children:"10/06/2025"})]})}),t.jsx("h1",{className:"text-center font-bold underline mb-6",children:"CONTRACT LETTER"}),[{label:"FIRST PARTY",placeholder:" ة جᣎ ᡫ للخدمات الᘘحᗫᖁة ᣃكة الشخص الواحد"},{label:"VISA No.",placeholder:"1304977335"},{label:"VISA ID",placeholder:"7001769202"}].map((e,a)=>t.jsxs("div",{className:"mb-3 flex items-center",children:[t.jsx("label",{className:"w-56",children:e.label}),t.jsx("input",{type:"text",placeholder:e.placeholder,className:"flex-1 border-none bg-transparent pl-10 text-black focus:outline-none placeholder-black"})]},a)),t.jsx("hr",{className:"border-black my-6"}),[{label:"SECOND PARTY NAME",placeholder:"WAJAHAT MALIK S/O MUNIR AHMED MALIK"},{label:"PASSPORT No",placeholder:"GW0767311"},{label:"TRADE",placeholder:"عامل تنظيف ع"},{label:"SALARY",placeholder:"1700 SR"}].map((e,a)=>t.jsxs("div",{className:"mb-3 flex items-center",children:[t.jsx("label",{className:"w-56",children:e.label}),t.jsx("input",{type:"text",placeholder:e.placeholder,className:"flex-1 border-none bg-transparent pl-10 font-bold text-black focus:outline-none placeholder-black"})]},a)),t.jsx("hr",{className:"border-black my-4"}),t.jsx("h2",{className:"font-bold mb-4 underline",children:"TERMS & CONDITIONS"}),t.jsxs("ol",{className:"list-decimal pl-6 space-y-4 text-justify",children:[t.jsx("li",{children:"CONTRACT IS FOR ONE YEAR. RECRUITED PERSONNEL WILL BE ON A PROBATION PERIOD OF 90 DAYS. CONFIRMATION WILL BE GRANTED UPON SUCCESSFUL COMPLETION OF THIS PERIOD."}),t.jsx("li",{children:"WORKING HOURS WILL BE 08 HOURS PER DAY AND 48 HOURS PER WEEK."}),t.jsx("li",{children:"FOOD WILL BE PROVIDED BY THE COMPANY."}),t.jsx("li",{children:"FREE ACCOMMODATION AND TRANSPORTATION WILL BE PROVIDED BY THE COMPANY."}),t.jsx("li",{children:"A FREE ROUND-TRIP TICKET WILL BE PROVIDED UPON COMPLETION OF ONE YEAR OF SERVICE."}),t.jsx("li",{children:"MEDICAL SERVICES WILL BE AVAILABLE FOR THE EMPLOYEE ONLY, AS PER PRIVATE SECTOR STANDARDS IN KSA."}),t.jsx("li",{children:"ALL OTHER BENEFITS WILL BE PROVIDED ACCORDING TO SAUDI LABOR LAW."})]}),t.jsx("p",{className:"mt-6 ml-6",children:"THANKING YOU"}),t.jsxs("div",{className:"flex justify-between mt-12",children:[t.jsxs("div",{className:"ml-12",children:[t.jsx("p",{className:"font-bold",children:"PROMOTER:"}),t.jsx("p",{className:"mt-4 font-bold",children:"QURESHI BROTHERS OEP"}),t.jsx("p",{className:"font-bold",children:"0696/RWP"})]}),t.jsxs("div",{className:"mr-12",children:[t.jsx("p",{className:"font-bold",children:"SECOND PARTY SIGN & THUMB"}),t.jsx("p",{className:"mt-4 font-bold",children:"WAJAHAT MALIK"}),t.jsx("div",{className:"border-t border-black w-48 mt-8"})]})]})]})})]}),RM=()=>t.jsxs("div",{className:"flex min-h-screen bg-white",children:[t.jsx("div",{className:"w-[25%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsx("div",{className:"flex-1 flex justify-center p-6",children:t.jsxs("div",{className:"w-[750px] min-h-[1250px] mx-auto p-10 bg-white text-black text-base leading-relaxed space-y-4 shadow-md",children:[t.jsxs("div",{className:"flex justify-between mb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-bold",children:"THE ROYAL CONSULATE"}),t.jsx("p",{className:"font-bold",children:"Kingdom of Saudi Arabia"}),t.jsx("p",{className:"font-bold",children:"ISLAMABAD"})]}),t.jsx("div",{className:"text-right",children:t.jsxs("label",{className:"font-semibold",children:["DATE:"," ",t.jsx("input",{type:"date",defaultValue:"2025-06-10",className:"outline-none"})]})})]}),t.jsxs("p",{className:"font-bold",children:["SUBJECT: ",t.jsx("span",{className:"font-bold underline",children:"UNDERTAKING"})]}),t.jsx("p",{children:"Dear Sir,"}),t.jsxs("p",{children:["We do hereby undertake"," ",t.jsx("input",{type:"text",placeholder:"WAJAHAT MALIK",className:"outline-none w-[135px] inline-block placeholder-black font-bold text-black"})," ","S/O"," ",t.jsx("input",{type:"text",placeholder:"MUNIR AHMED MALIK",className:"outline-none w-[180px] inline-block placeholder-black font-bold text-black"})," ","Passport No."," ",t.jsx("input",{type:"text",placeholder:"GW0767311",className:"outline-none w-[90px] inline-block placeholder-black font-bold text-blac"})," ","is proceeding to Saudi Arabia on visa No."," ",t.jsx("input",{type:"text",placeholder:"1304977335",className:"foutline-none w-[90px] inline-block placeholder-black font-bold text-blac"})," ","under sponsor ID"," ",t.jsx("input",{type:"text",placeholder:"7001769202",className:"outline-none w-[95px] inline-block placeholder-black font-bold text-black"}),". This candidate has no valid Saudi visa, if he is deported back from the Kingdom of Saudi Arabia, we should be held responsible for that."]}),t.jsx("p",{children:"IF there is any minor mistake in E- number “profession” due to Arabic-English Conversion by system, kindly issue visa as per profession mentioned on visa form. Both agency and candidate are absolutely agreed upon that."}),t.jsx("p",{className:"font-bold",children:": I Know and Agree All the Terms & Conditions in the Agreement."}),t.jsxs("table",{className:"w-full text-left border border-black",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-black",children:[t.jsx("th",{className:"p-2 border-r border-black",children:"Sr No."}),t.jsx("th",{className:"p-2 border-r border-black",children:"NAME"}),t.jsx("th",{className:"p-2 border-r border-black",children:"PASSPORT NUMBER"}),t.jsx("th",{className:"p-2",children:"E-NUMBER"})]})}),t.jsx("tbody",{children:t.jsxs("tr",{children:[t.jsx("td",{className:"p-2 border-r border-black font-bold",children:"01"}),t.jsx("td",{className:"p-2 border-r border-black font-bold",children:t.jsx("input",{type:"text",placeholder:"WAJAHAT MALIK",className:"outline-none inline-block placeholder-black font-bold text-black"})}),t.jsx("td",{className:"p-2 border-r border-black font-bold",children:t.jsx("input",{type:"text",placeholder:"GW0767311",className:"font-bold placeholder-black text-black outline-none w-[110px] inline-block"})}),t.jsx("td",{className:"p-2 font-bold",children:t.jsx("input",{type:"text",placeholder:"E794009519",className:"font-bold placeholder-black text-black outline-none w-[120px] inline-block"})})]})})]}),t.jsxs("div",{className:"flex justify-between mt-10",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"font-bold",children:"TANWEER AHMED"}),t.jsx("p",{className:"font-bold",children:"QURESHI BROTHERS OEP"}),t.jsx("p",{className:"font-bold",children:"0696/RWP"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("input",{type:"text",placeholder:"WAJAHAT MALIK",className:"font-bold text-black outline-none w-[135px] inline-block text-center placeholder-black"}),t.jsx("div",{className:"mt-8 border-t border-black w-40 mx-auto"})]})]})]})})]}),PM=()=>t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%] bg-white border-r border-gray-300",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"w-[80%] overflow-x-auto",children:[t.jsxs("div",{className:"font-[times] p-6 max-w-4xl mx-auto border-b border-black text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("label",{className:"font-bold",children:"FORM NO."}),t.jsx("input",{type:"text",placeholder:"32-A",className:"outline-none border-none placeholder-black text-black"})]}),t.jsx("p",{children:"Challan of Cash paid into:"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"font-bold uppercase",children:"TREASURY/SUB-TREASURY"}),t.jsx("p",{className:"font-bold uppercase",children:"NATIONAL BANK OF PAKISTAN"}),t.jsx("p",{className:"font-bold uppercase",children:"STATE BANK OF PAKISTAN"})]})]}),t.jsx("div",{className:"mt-4 border border-black",children:t.jsxs("div",{className:"grid grid-cols-[25%_20%_15%_40%] divide-x divide-black",children:[t.jsxs("div",{className:"flex flex-col text-left border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"BY WHOM TENDER"}),t.jsxs("div",{className:"flex flex-col justify-start p-1 overflow-hidden text-sm leading-tight transform -rotate-90 break-words min-h-[200px]",children:[t.jsx("p",{className:"font-bold text-center",children:"Emigrant Name:"}),t.jsx("input",{type:"text",placeholder:"MR. IMTIAZ KHAN",className:"border-none outline-none placeholder-black mt-2 ml-3 text-black bg-transparent font-bold"}),t.jsxs("div",{className:"flex items-center gap-1 mt-1 ml-3",children:[t.jsx("p",{className:"font-bold",children:"P.PNo."}),t.jsx("input",{type:"text",placeholder:"Error",className:"border-none outline-none placeholder-black text-black bg-transparent"})]}),t.jsx("p",{className:"mt-2 font-bold ml-2 ",children:"MergeField was not found in header record of data source."}),t.jsx("p",{className:"font-semibold mt-2 ml-2 text-left",children:"Mr.QURESHI BROTHERS OEP LICENCE #:"}),t.jsx("input",{type:"text",placeholder:"",className:"border-none outline-none placeholder-black text-black bg-transparent"})]})]}),t.jsxs("div",{className:"flex flex-col text-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"TO BE FILLED BY REMITTER"}),t.jsxs("div",{className:"flex flex-1 min-h-24",children:[t.jsx("div",{className:"w-[65%] flex items-center justify-center text-center border-r border-black p-1 overflow-hidden",children:t.jsx("p",{className:"transform -rotate-90 break-words",children:"Director General, Bureau of Emigration and Overseas Employment"})}),t.jsx("div",{className:"w-[35%] flex items-center justify-center text-center p-1 overflow-hidden",children:t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:underline transform -rotate-90 break-words border-none outline-none bg-transparent"})})]})]}),t.jsxs("div",{className:"flex flex-col text-left justify-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"AMOUNT"}),t.jsxs("div",{className:"flex flex-col justify-center items-center overflow-hidden leading-tight transform -rotate-90 h-full w-full",children:[t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent text-center w-full"}),t.jsxs("div",{className:"flex items-center gap-2 w-full",children:[t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"text-lg font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent w-auto"}),t.jsx("div",{className:"border-b border-black flex-1"})]})]})]}),t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center px-2",children:"TO BE FILLED BY THE DEPARTMENT OFFICER OF THE TREASURY"}),t.jsxs("div",{className:"grid grid-cols-[55%_45%] flex-1 min-h-[200px]",children:[t.jsxs("div",{className:"flex flex-col justify-start p-1 mt-6 pl-3 transform -rotate-90 overflow-hidden text-xs leading-tight break-words",children:[t.jsx("p",{children:"Manpower Management"}),t.jsx("input",{type:"text",placeholder:"Coa 0139109-029-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"0000191",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee"}),t.jsx("input",{type:"text",placeholder:"Miscellaneous C02906-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"code 130",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee from Pakistan"}),t.jsx("p",{children:"working abroad"})]}),t.jsx("div",{className:"pl-2 border-l border-black flex items-start p-2 overflow-hidden text-xs",children:t.jsx("p",{className:"break-words",children:"Date Correct Received and Grant Receipt Signature and Full Designation of the Officer ordering the money to be paid in."})})]})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"p-2 font-bold border-l border-t border-r border-b border-black",children:[t.jsxs("span",{children:["Total Rs. ",t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]}),t.jsxs("p",{children:["in word Rs. ",t.jsx("input",{type:"text",placeholder:"(Five Hundred Rupees Only)",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]})]})]}),t.jsxs("div",{className:"mt-4 text-sm",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Signature:"}),t.jsx("span",{className:"border-b border-black w-48 inline-block"})]}),t.jsx("p",{className:"text-right w-[320px]",children:"To be used only in case of remittances to Bank through in Officer of Government. Treasury/Officer/Agent/Manager."})]}),t.jsxs("div",{className:"flex items-center mt-2",children:[t.jsx("span",{className:"mr-2",children:"Received Payment:-"}),t.jsx("span",{className:"border-b border-black w-48 inline-block mr-4"}),t.jsx("span",{className:"mr-2",children:"Date:"}),t.jsx("span",{className:"border-b border-black w-32 inline-block"})]})]})]}),t.jsxs("div",{className:"font-[times] p-6 max-w-4xl mx-auto border-b border-black text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("label",{className:"font-bold",children:"FORM NO."}),t.jsx("input",{type:"text",placeholder:"32-A",className:"outline-none border-none placeholder-black text-black"})]}),t.jsx("p",{children:"Challan of Cash paid into:"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"font-bold uppercase",children:"TREASURY/SUB-TREASURY"}),t.jsx("p",{className:"font-bold uppercase",children:"NATIONAL BANK OF PAKISTAN"}),t.jsx("p",{className:"font-bold uppercase",children:"STATE BANK OF PAKISTAN"})]})]}),t.jsx("div",{className:"mt-4 border border-black",children:t.jsxs("div",{className:"grid grid-cols-[25%_20%_15%_40%] divide-x divide-black",children:[t.jsxs("div",{className:"flex flex-col text-left border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"BY WHOM TENDER"}),t.jsxs("div",{className:"flex flex-col justify-start p-1 overflow-hidden text-sm leading-tight transform -rotate-90 break-words min-h-[200px]",children:[t.jsx("p",{className:"font-bold text-center",children:"Emigrant Name:"}),t.jsx("input",{type:"text",placeholder:"MR. IMTIAZ KHAN",className:"border-none outline-none placeholder-black mt-2 ml-3 text-black bg-transparent font-bold"}),t.jsxs("div",{className:"flex items-center gap-1 mt-1 ml-3",children:[t.jsx("p",{className:"font-bold",children:"P.PNo."}),t.jsx("input",{type:"text",placeholder:"Error",className:"border-none outline-none placeholder-black text-black bg-transparent"})]}),t.jsx("p",{className:"mt-2 font-bold ml-2 ",children:"MergeField was not found in header record of data source."}),t.jsx("p",{className:"font-semibold mt-2 ml-2 text-left",children:"Mr.QURESHI BROTHERS OEP LICENCE #:"}),t.jsx("input",{type:"text",placeholder:"",className:"border-none outline-none placeholder-black text-black bg-transparent"})]})]}),t.jsxs("div",{className:"flex flex-col text-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"TO BE FILLED BY REMITTER"}),t.jsxs("div",{className:"flex flex-1 min-h-24",children:[t.jsx("div",{className:"w-[65%] flex items-center justify-center text-center border-r border-black p-1 overflow-hidden",children:t.jsx("p",{className:"transform -rotate-90 break-words",children:"Director General, Bureau of Emigration and Overseas Employment"})}),t.jsx("div",{className:"w-[35%] flex items-center justify-center text-center p-1 overflow-hidden",children:t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:underline transform -rotate-90 break-words border-none outline-none bg-transparent"})})]})]}),t.jsxs("div",{className:"flex flex-col text-left justify-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"AMOUNT"}),t.jsxs("div",{className:"flex flex-col justify-center items-center overflow-hidden leading-tight transform -rotate-90 h-full w-full",children:[t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent text-center w-full"}),t.jsxs("div",{className:"flex items-center gap-2 w-full",children:[t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"text-lg font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent w-auto"}),t.jsx("div",{className:"border-b border-black flex-1"})]})]})]}),t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center px-2",children:"TO BE FILLED BY THE DEPARTMENT OFFICER OF THE TREASURY"}),t.jsxs("div",{className:"grid grid-cols-[55%_45%] flex-1 min-h-[200px]",children:[t.jsxs("div",{className:"flex flex-col justify-start p-1 mt-6 pl-3 transform -rotate-90 overflow-hidden text-xs leading-tight break-words",children:[t.jsx("p",{children:"Manpower Management"}),t.jsx("input",{type:"text",placeholder:"Coa 0139109-029-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"0000191",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee"}),t.jsx("input",{type:"text",placeholder:"Miscellaneous C02906-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"code 130",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee from Pakistan"}),t.jsx("p",{children:"working abroad"})]}),t.jsx("div",{className:"pl-2 border-l border-black flex items-start p-2 overflow-hidden text-xs",children:t.jsx("p",{className:"break-words",children:"Date Correct Received and Grant Receipt Signature and Full Designation of the Officer ordering the money to be paid in."})})]})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"p-2 font-bold border-l border-t border-r border-b border-black",children:[t.jsxs("span",{children:["Total Rs. ",t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]}),t.jsxs("p",{children:["in word Rs. ",t.jsx("input",{type:"text",placeholder:"(Five Hundred Rupees Only)",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]})]})]}),t.jsxs("div",{className:"mt-4 text-sm",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Signature:"}),t.jsx("span",{className:"border-b border-black w-48 inline-block"})]}),t.jsx("p",{className:"text-right w-[320px]",children:"To be used only in case of remittances to Bank through in Officer of Government. Treasury/Officer/Agent/Manager."})]}),t.jsxs("div",{className:"flex items-center mt-2",children:[t.jsx("span",{className:"mr-2",children:"Received Payment:-"}),t.jsx("span",{className:"border-b border-black w-48 inline-block mr-4"}),t.jsx("span",{className:"mr-2",children:"Date:"}),t.jsx("span",{className:"border-b border-black w-32 inline-block"})]})]})]}),t.jsxs("div",{className:"font-[times] p-6 max-w-4xl mx-auto text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("label",{className:"font-bold",children:"FORM NO."}),t.jsx("input",{type:"text",placeholder:"32-A",className:"outline-none border-none placeholder-black text-black"})]}),t.jsx("p",{children:"Challan of Cash paid into:"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"font-bold uppercase",children:"TREASURY/SUB-TREASURY"}),t.jsx("p",{className:"font-bold uppercase",children:"NATIONAL BANK OF PAKISTAN"}),t.jsx("p",{className:"font-bold uppercase",children:"STATE BANK OF PAKISTAN"})]})]}),t.jsx("div",{className:"mt-4 border border-black",children:t.jsxs("div",{className:"grid grid-cols-[25%_20%_15%_40%] divide-x divide-black",children:[t.jsxs("div",{className:"flex flex-col text-left border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"BY WHOM TENDER"}),t.jsxs("div",{className:"flex flex-col justify-start p-1 overflow-hidden text-sm leading-tight transform -rotate-90 break-words min-h-[200px]",children:[t.jsx("p",{className:"font-bold text-center",children:"Emigrant Name:"}),t.jsx("input",{type:"text",placeholder:"MR. IMTIAZ KHAN",className:"border-none outline-none placeholder-black mt-2 ml-3 text-black bg-transparent font-bold"}),t.jsxs("div",{className:"flex items-center gap-1 mt-1 ml-3",children:[t.jsx("p",{className:"font-bold",children:"P.PNo."}),t.jsx("input",{type:"text",placeholder:"Error",className:"border-none outline-none placeholder-black text-black bg-transparent"})]}),t.jsx("p",{className:"mt-2 font-bold ml-2 ",children:"MergeField was not found in header record of data source."}),t.jsx("p",{className:"font-semibold mt-2 ml-2 text-left",children:"Mr.QURESHI BROTHERS OEP LICENCE #:"}),t.jsx("input",{type:"text",placeholder:"",className:"border-none outline-none placeholder-black text-black bg-transparent"})]})]}),t.jsxs("div",{className:"flex flex-col text-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"TO BE FILLED BY REMITTER"}),t.jsxs("div",{className:"flex flex-1 min-h-24",children:[t.jsx("div",{className:"w-[65%] flex items-center justify-center text-center border-r border-black p-1 overflow-hidden",children:t.jsx("p",{className:"transform -rotate-90 break-words",children:"Director General, Bureau of Emigration and Overseas Employment"})}),t.jsx("div",{className:"w-[35%] flex items-center justify-center text-center p-1 overflow-hidden",children:t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:underline transform -rotate-90 break-words border-none outline-none bg-transparent"})})]})]}),t.jsxs("div",{className:"flex flex-col text-left justify-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"AMOUNT"}),t.jsxs("div",{className:"flex flex-col justify-center items-center overflow-hidden leading-tight transform -rotate-90 h-full w-full",children:[t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent text-center w-full"}),t.jsxs("div",{className:"flex items-center gap-2 w-full",children:[t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"text-lg font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent w-auto"}),t.jsx("div",{className:"border-b border-black flex-1"})]})]})]}),t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center px-2",children:"TO BE FILLED BY THE DEPARTMENT OFFICER OF THE TREASURY"}),t.jsxs("div",{className:"grid grid-cols-[55%_45%] flex-1 min-h-[200px]",children:[t.jsxs("div",{className:"flex flex-col justify-start p-1 mt-6 pl-3 transform -rotate-90 overflow-hidden text-xs leading-tight break-words",children:[t.jsx("p",{children:"Manpower Management"}),t.jsx("input",{type:"text",placeholder:"Coa 0139109-029-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"0000191",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee"}),t.jsx("input",{type:"text",placeholder:"Miscellaneous C02906-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"code 130",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee from Pakistan"}),t.jsx("p",{children:"working abroad"})]}),t.jsx("div",{className:"pl-2 border-l border-black flex items-start p-2 overflow-hidden text-xs",children:t.jsx("p",{className:"break-words",children:"Date Correct Received and Grant Receipt Signature and Full Designation of the Officer ordering the money to be paid in."})})]})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"p-2 font-bold border-l border-t border-r border-b border-black",children:[t.jsxs("span",{children:["Total Rs. ",t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]}),t.jsxs("p",{children:["in word Rs. ",t.jsx("input",{type:"text",placeholder:"(Five Hundred Rupees Only)",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]})]})]}),t.jsxs("div",{className:"mt-4 text-sm",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Signature:"}),t.jsx("span",{className:"border-b border-black w-48 inline-block"})]}),t.jsx("p",{className:"text-right w-[320px]",children:"To be used only in case of remittances to Bank through in Officer of Government. Treasury/Officer/Agent/Manager."})]}),t.jsxs("div",{className:"flex items-center mt-2",children:[t.jsx("span",{className:"mr-2",children:"Received Payment:-"}),t.jsx("span",{className:"border-b border-black w-48 inline-block mr-4"}),t.jsx("span",{className:"mr-2",children:"Date:"}),t.jsx("span",{className:"border-b border-black w-32 inline-block"})]})]})]})]})]}),_M="/visaform_logo.png",MM=()=>t.jsxs("div",{className:"flex min-h-screen bg-gray-50",children:[t.jsx("div",{className:"hidden md:block w-[25%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"flex-1 bg-white p-4 md:p-6 overflow-auto",children:[t.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between pb-2",children:[t.jsxs("div",{className:"w-40 h-40 border border-green-500 flex flex-col items-center justify-center text-xs text-gray-500 md:mb-0 leading-snug text-center relative",children:[t.jsx("p",{className:"text-sm text-gray-600 mb-1",children:"صورة"}),t.jsx("p",{children:"Paste Photo Here"}),t.jsx("button",{className:"absolute -bottom-3 right-0 text-white px-2 py-1 bg-green-600 rounded-md",children:t.jsx(Kt,{size:14})})]}),t.jsx("div",{className:"flex justify-center",children:t.jsx("img",{src:_M,alt:"Saudi Logo",className:"w-40 h-40 object-contain"})}),t.jsxs("div",{className:"text-center md:text-right md:mt-0 md:mr-12",children:[t.jsx("p",{className:"text-green-500 border-b border-green-500 py-2 mb-4",children:"سفارة المملكة العربية السعودية"}),t.jsx("h3",{className:"text-green-500 text-sm md:text-base",children:"EMBASSY OF SAUDI ARABIA"}),t.jsx("p",{className:"text-green-500 text-xs md:text-sm",children:"CONSULAR SECTION"})]})]}),t.jsxs("div",{className:"border border-green-700 text-xs md:text-sm",children:[t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsx("div",{className:"w-[20%] font-semibold p-2",children:"FULL NAME"}),t.jsx("p",{className:"flex items-center justify-center flex-grow px-6 py-1",children:t.jsx("input",{type:"text",placeholder:"WAJAHAT MALIK S/O MUNIR AHMED MALIK",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[20%] p-2 text-right pr-4",children:":الاسم الكامل"})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex py-2 border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-[20%] font-semibold px-2",children:"DATEOFBIRTH:"}),t.jsx("div",{className:"flex-grow px-4",children:t.jsx("input",{type:"text",placeholder:"05-06-1990 (45) YEARS",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[20%] text-right pr-4",children:":تاريخ الولادة"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-[20%] font-semibold px-2",children:"PLACEOFBIRTH:"}),t.jsx("div",{className:"flex-grow px-4",children:t.jsx("input",{type:"text",placeholder:"RAWALPINDI, PAK",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[20%] text-right pr-4",children:":محل الولادة"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-[20%] font-semibold p-2",children:"PREVIOUSNATIONALITY:"}),t.jsx("div",{className:"flex items-center justify-center flex-grow px-4 py-1",children:t.jsx("input",{type:"text",placeholder:"PAKISTAN",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[25%] p-2 text-right pr-4 whitespace-nowrap",dir:"rtl",children:"الجنسية السابقة:"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-[20%] font-semibold p-2",children:"PRESENTNATIONALITY:"}),t.jsx("div",{className:"flex items-center justify-center flex-grow px-4 py-1",children:t.jsx("input",{type:"text",placeholder:"PAKISTAN",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[25%] p-2 text-right pr-4 whitespace-nowrap",dir:"rtl",children:"الجنسية الحالية:"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"grid grid-cols-4 border-r border-green-700 text-center",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 font-semibold flex flex-col justify-center",children:[t.jsx("span",{className:"text-sm"}),t.jsx("span",{children:"GENDER"})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex flex-col justify-center",children:[t.jsx("span",{className:"text-sm",children:"أنثى"}),t.jsx("span",{children:"FEMALE"})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex flex-col justify-center",children:[t.jsx("span",{className:"text-sm",children:"ذكر"}),t.jsx("span",{children:"MALE"})]}),t.jsx("div",{className:"p-2 flex flex-col justify-center",children:t.jsx("span",{className:"text-sm",children:":جنس"})})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"MARITALSTATUS"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",placeholder:"MARRIED",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsxs("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:["الحالة الاجتماعية:"," "]})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"SECT:"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",placeholder:"SUNNI",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"المذهب:"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"RELIGION"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",placeholder:"ISLAM",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"الديانة:"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"QUALIFICATION:"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-center w-full"})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"الموهل العلمي:"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"PROFESSION"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",defaultValue:"عامل تصنيع",className:"bg-transparent outline-none text-center w-full"})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"المهنة:"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700 items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"HOME ADDRESS & PHONE:"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("textarea",{placeholder:`House No. P/138, Street No. 1, MHALLAH IMAMBARHA, Rawalpindi
0300-1234567`,className:"bg-transparent outline-none text-center w-full resize-none placeholder-black",rows:2})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"عنوان المنزل ورقم التلفون:"})]}),t.jsxs("div",{className:"flex border-b border-green-700 items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"BUSINESS ADDRESS & PHONE:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("textarea",{placeholder:"",className:"bg-transparent outline-none text-center w-full resize-none placeholder-black",rows:2})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"عنوان محل العمل ورقم التلفون:"})]}),t.jsx("div",{className:"border-b border-green-700 p-2",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"whitespace-nowrap mr-2",children:"Purpose of Travel:"}),t.jsx("div",{className:"grid grid-cols-7 gap-0 flex-1",children:[{en:"WORK",ar:"عمل"},{en:"TRANSIT",ar:"ترانمرور"},{en:"VISIT",ar:"زيارة"},{en:"UMRAH",ar:"عمرة"},{en:"RESIDENCE",ar:"إقامة"},{en:"HAJJ",ar:"حج"},{en:"DIPLOMACY",ar:"دبلوماسية"}].map((e,a)=>t.jsxs("div",{className:"border border-green-700 p-2 flex flex-col justify-center text-center",children:[t.jsx("span",{className:"text-xs",children:e.ar}),t.jsx("span",{children:e.en})]},a))}),t.jsx("span",{className:"whitespace-nowrap ml-2",children:":غرض السفر"})]})}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"DATE OF ISSUE:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"12/09/2022",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"تاريخ الإصدار:"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"PASSPORT NO:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"GW123456789",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"رقم جوازالسفر:"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"DATE OF EXPIRY:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"24/05/2028",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsxs("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:["تاريخ الإنتھاء:"," "]})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"PLACE OF ISSUE:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"PAKISTAN",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"محل الإصدار:"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"DATE OF ARRIVAL:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsxs("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:["تاريخ الوصول:"," "]})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"DATE OF DEPARTURE:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"تاريخ المغادرة:"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700 items-center",children:[t.jsx("div",{className:"w-2/3 font-semibold p-2",children:"DURATION OF STAY IN THE KINGDOM:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"2 YEARS",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"مدة الإقامة بالمملكة:"})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-6 border-b border-green-700 text-right",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":تاريخ"}),t.jsx("div",{className:"font-semibold",children:"DATE"})]})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsx("button",{className:"text-white px-2 py-1 bg-green-600 rounded-md",children:t.jsx(Kt,{size:14})})]}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":ايصال رقم"}),t.jsx("div",{className:"font-semibold",children:"SLIP NO"})]})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":بیشيك رقم"}),t.jsx("div",{className:"font-semibold",children:"CHEQUE NO"})]})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":نقدا"}),t.jsx("div",{className:"font-semibold",children:"CASH"})]})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":مجاملة"}),t.jsx("div",{className:"font-semibold",children:"FREE"})]})]}),t.jsx("div",{className:"border-green-700 p-2 flex items-center justify-between",children:t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":طريق الدفع"}),t.jsx("div",{className:"font-semibold",children:"MODE OF PAYMENT"})]})})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("div",{className:"flex flex-col items-start",children:t.jsx("span",{className:"font-semibold",children:"RELATIONSHIP:"})}),t.jsx("input",{type:"text",className:"bg-transparent outline-none w-40 text-center",placeholder:""}),t.jsx("div",{className:"flex flex-col items-end",children:t.jsx("span",{className:"text-sm",children:":صلة"})})]}),t.jsx("div",{className:"p-2 text-right",children:t.jsx("div",{className:"text-sm",children:":اسم المحرم"})})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"font-semibold",children:"DESTINATION:"}),t.jsx("input",{type:"text",placeholder:"AL RIYADH, KYC",className:"bg-transparent outline-none placeholder-black px-1 py-[2px] text-sm"})]}),t.jsx("div",{className:"flex flex-col items-end",children:t.jsx("span",{className:"text-sm",children:":جهة الوصول"})})]}),t.jsxs("div",{className:"p-2 flex justify-between items-center",children:[t.jsx("div",{className:"font-semibold",children:"CARRIER'S NAME:"}),t.jsx("div",{className:"flex flex-col items-end",children:t.jsx("span",{className:"text-sm",children:":اسم الشركة الناقلة"})})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsx("div",{className:"border-r border-green-700 p-2 flex items-center justify-start",children:t.jsx("span",{className:"font-semibold",children:"DEPENDENTS TRAVELING IN THE SAME PASSPORT"})}),t.jsx("div",{className:"p-2 flex items-center justify-start",children:t.jsx("span",{className:"text-sm",children:"إيضاحات تخص أفراد العائلة (المضافين) علي نفس جوازالسفر"})})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 border-b border-green-700",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"RELATIONSHIP"}),t.jsx("span",{className:"text-sm",children:"نوع الصلة"})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"DATE OF BIRTH"}),t.jsx("span",{className:"text-sm",children:"تاريخ الولادة"})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"SEX"}),t.jsx("span",{className:"text-sm",children:"الجنس"})]}),t.jsxs("div",{className:"p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"FULL NAME"}),t.jsx("span",{className:"text-sm",children:"الاسم الكامل"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 border-b border-green-700",children:[t.jsx("div",{className:"border-r border-green-700 ",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none px-1 ",placeholder:""})}),t.jsx("div",{className:"border-r border-green-700 ",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none px-2 ",placeholder:""})}),t.jsx("div",{className:"border-r border-green-700 ",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none px-2 ",placeholder:""})}),t.jsx("div",{className:"p-3",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none px-2",placeholder:""})})]}),t.jsxs("div",{className:"border-b border-green-700 p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"Name and Address of Company/Individual in the Kingdom"}),t.jsx("span",{className:"text-right font-semibold",children:"شركة جنى للخدمات البحرية شركة الشخص الواحد"})]}),t.jsx("div",{className:"p-3 border-b border-green-700",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none ",placeholder:""})}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsx("div",{className:"w-2/3 p-2",children:t.jsx("span",{className:"text-sm font-medium",children:"The undersigned hereby clarify that all the information I have provided are correct. I'll abide by the laws of the Kingdom during the period of my residence in it."})}),t.jsx("div",{className:"w-1/3 p-2 text-sm font-medium text-right",children:"ناالموقع ادناه اقربان كل المعلومات اللتي دونتها صحيصة وساكون ملتزمابقوانين المملكة اثناء فترة وجودي بها"})]}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsxs("div",{className:"w-1/3 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none px-2 py-1 w-24"}),t.jsx("button",{className:"text-white px-2 py-1 bg-green-600 rounded-md",children:t.jsx(Kt,{size:14})})]}),t.jsxs("div",{className:"flex flex-col text-right text-sm",children:[t.jsx("div",{children:":التاريخ"}),t.jsx("div",{className:"font-medium",children:"Date:"})]})]}),t.jsxs("div",{className:"w-1/3 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none px-2 py-1 w-24"}),t.jsxs("div",{className:"flex flex-col text-right text-sm",children:[t.jsx("div",{children:":التوقيع"}),t.jsx("div",{className:"font-medium",children:"Signature:"})]})]}),t.jsxs("div",{className:"w-1/3 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"Wajahat Malik",className:"bg-transparent outline-none placeholder-black px-2 py-1 w-40 text-right"}),t.jsxs("div",{className:"flex flex-col text-right text-sm",children:[t.jsx("div",{children:":الإسم"}),t.jsx("div",{className:"font-medium",children:"Name:"})]})]})]}),t.jsx("div",{className:"bg-gray-400 border-b border-green-700 p-2",children:t.jsxs("div",{className:"flex flex-col items-center",children:["للإستعمال الرسمي فقط",t.jsx("div",{className:"text-sm"}),t.jsx("div",{className:"text-sm font-medium",children:"For Office Use Only"})]})}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsxs("div",{className:"w-1/2 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("div",{className:"text-sm font-medium",children:"Date"}),t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none px-2 py-1 w-40 mx-2"}),t.jsx("div",{className:"text-sm",children:":تاريخه"})]}),t.jsxs("div",{className:"w-1/2 p-2 flex items-center justify-between",children:[t.jsx("div",{className:"text-sm font-medium",children:"Authorization"}),t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none px-2 py-1 w-40 mx-2"}),t.jsx("div",{className:"text-sm",children:":رقم الامر المعتمد عليه في اعطاء التاشيرة"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsx("div",{className:"w-1/6 border-r border-green-700 p-2 flex flex-col items-start",children:t.jsx("div",{className:"text-sm font-medium",children:"Visit/Work For"})}),t.jsx("div",{className:"w-4/6 border-r border-green-700 p-2 flex items-center",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none px-2 py-1",placeholder:""})}),t.jsx("div",{className:"w-1/6 p-2 flex flex-col items-start",children:t.jsx("div",{className:"text-sm",children:":لزيارة - العمل لدي"})})]}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsxs("div",{className:"w-1/2 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Date:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":وتاريخ"})]}),t.jsxs("div",{className:"w-1/2 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Visa Number:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":شرله برقم"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsxs("div",{className:"w-1/3 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Fee Collected:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":المبلغ المحصل"})]}),t.jsxs("div",{className:"w-1/3 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Type:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":نوعها"})]}),t.jsxs("div",{className:"w-1/3 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Duration:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":مدتها"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700 h-20",children:[t.jsxs("div",{className:"w-1/2 border-r border-green-700 flex flex-col items-center justify-center",children:[t.jsx("span",{className:"text-sm",children:"رئيس القسم القنصلي"}),t.jsx("span",{className:"text-sm font-medium",children:"Head of Consular Section"})]}),t.jsxs("div",{className:"w-1/2 flex flex-col items-center justify-center",children:[t.jsx("span",{className:"text-sm",children:"مدقق البيانات"}),t.jsx("span",{className:"text-sm font-medium",children:"Checked By"})]})]})]})]})]}),zM="/alliedform_banklogo.png",LM=()=>t.jsx("div",{children:t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%] border-r border-gray-300",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"w-[80%] p-8 m-2 text-sm border border-black",children:[t.jsxs("div",{className:"flex justify-between items-center border-black pb-4 mb-6",children:[t.jsx("img",{src:zM,alt:"logo",className:"w-24 h-20 object-contain"}),t.jsxs("div",{className:"text-center flex-1 -ml-24",children:[t.jsx("h2",{className:"text-lg font-bold uppercase",children:"Request for Issuance of Form-7"}),t.jsx("p",{className:"text-xs",children:"(Under Emigration Rules-1979)"})]}),t.jsx("div",{className:"text-right",children:t.jsxs("p",{children:["Date:"," ",t.jsx("input",{type:"text",className:"border-b border-black px-4 bg-transparent outline-none w-28",placeholder:"1-1-2025"})]})})]}),t.jsx("p",{className:"mb-6 ml-16 font-[times]",children:"I/We request for issuance of form-7 (under Emigration Rules 1979) as per appended details:"}),t.jsxs("div",{className:"mb-6 font-[times]",children:[t.jsx("div",{className:"px-3 py-1 font-bold",children:"A. Depositor Details"}),t.jsxs("div",{className:"grid grid-cols-2 gap-0 border border-black",children:[t.jsxs("div",{className:"grid grid-cols-2 border-b border-r border-black",children:[t.jsx("p",{className:"border-r border-black text-center px-2 py-1",children:"Name"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 py-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border-b border-black",children:[t.jsx("p",{className:"border-r border-black text-center px-2 py-1",children:"S/O"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 py-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border-r border-black",children:[t.jsx("p",{className:"border-r border-black text-center px-2 py-1",children:"Contact Number"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 py-1"})]}),t.jsxs("div",{className:"grid grid-cols-2",children:[t.jsx("p",{className:"border-r border-black text-center px-2 py-1",children:"ID Number*"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 py-1"})]})]})]}),t.jsx("div",{className:"px-3 py-1 font-normal font-[times]",children:"B. Intending Emigrant(s) Details (List attached for more than one Intending Emigrant)"}),t.jsxs("div",{className:"grid grid-cols-4 border border-black mb-6 font-[times]",children:[t.jsx("p",{className:"border-r border-b border-black flex items-center justify-center px-2 py-1",children:"Name"}),t.jsx("input",{type:"text",className:"border-r border-b border-black bg-transparent outline-none px-2 py-1"}),t.jsx("p",{className:"border-r border-b border-black flex items-center justify-center px-2 py-1",children:"S/O"}),t.jsx("input",{type:"text",className:"border-b border-black bg-transparent outline-none px-2 py-1"}),t.jsx("p",{className:"border-r border-b border-black flex items-center justify-center px-2 py-1",children:"Contact Number"}),t.jsx("input",{type:"text",className:"border-r border-b border-black bg-transparent outline-none px-2 py-1"}),t.jsx("p",{className:"border-r border-b border-black flex items-center justify-center px-2 py-1",children:"ID Number*"}),t.jsx("input",{type:"text",className:"border-b border-black bg-transparent outline-none px-2 py-1"}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1"}),t.jsx("input",{type:"text",className:"col-span-3 bg-transparent outline-none px-2 py-1 w-full",style:{borderBottom:"1px solid black"}}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1 row-span-2",children:"Address"}),t.jsx("input",{type:"text",className:"border-r border-black bg-transparent outline-none px-2 py-1 row-span-2"}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1",children:"Passport Number"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none px-2 py-1"})]}),t.jsxs("div",{className:"mb-6 grid-row-3 font-[times]",children:[t.jsx("div",{className:"px-3 grid grid-cols-2 py-1 font-semibold",children:"B. Overseas Employment Promoter (O.E.P) Details"}),t.jsx("div",{className:"font-[times] p-1",children:t.jsxs("div",{className:"grid border border-black",children:[t.jsxs("div",{className:"grid grid-cols-2",children:[t.jsx("p",{className:"border-r border-black text-left px-2 font-normal flex items-center h-[28px] leading-none",children:"Name"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 h-[28px] leading-none"})]}),t.jsxs("div",{className:"grid grid-cols-4 border-t border-black",children:[t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1"}),t.jsx("input",{type:"text",className:"col-span-3 bg-transparent outline-none px-2 w-full border-b border-black flex items-center py-1"}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1 row-span-2",children:"Address"}),t.jsx("input",{type:"text",className:"border-r border-black bg-transparent outline-none px-2 row-span-2 flex items-center py-1"}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1",children:"O.E.P License Number"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none px-2 flex items-center py-1"})]})]})})]}),t.jsxs("div",{className:"mb-6 font-[times]",children:[t.jsx("div",{className:" px-3 py-1 font-semibold ",children:"D. Deposit Details"}),t.jsxs("div",{className:"p-3 px-10 space-y-4 font-[times]",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 border border-black"}),t.jsx("span",{className:"w-20 font-bold",children:"Account #"}),t.jsxs("div",{className:"flex items-center gap-1",children:[[...Array(4)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`acc-${a}`)),t.jsx("div",{className:"w-3 h-6 flex items-center justify-center",children:"-"}),[...Array(4)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`acc-${a+4}`)),t.jsx("div",{className:"w-3 h-6 flex items-center justify-center",children:"-"}),[...Array(4)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`acc-${a+8}`)),t.jsx("div",{className:"w-3 h-6 flex items-center justify-center",children:"-"}),[...Array(4)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`acc-${a+12}`))]}),t.jsx("span",{className:"w-20 ml-8 font-bold",children:"Cheque #"}),t.jsxs("div",{className:"flex items-center gap-1",children:[[...Array(5)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`cheque-${a}`)),t.jsx("div",{className:"w-3 h-6 flex items-center justify-center",children:"-"}),[...Array(3)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`cheque-${a+5}`))]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 border border-black"}),t.jsx("label",{className:"select-none font-bold",children:"Cash"})]}),t.jsxs("div",{className:"flex items-center gap-4 pt-4",children:[t.jsx("p",{className:"font-bold font-sans",children:"Amount in Figures"}),t.jsx("p",{className:"text-base font-sans",children:"6000/-"})]}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("p",{className:"font-bold font-sans",children:"Amount in Words"}),t.jsx("p",{className:"text-base font-sans",children:"SIX THOUSAND ONLY"})]})]}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-sans mt-4",children:"I/We Understand that this deposit is governed by Emigration Rules-1979 and refund against form-7 shall only be made to the depositor."}),t.jsx("p",{className:"text-sm font-sans mt-4",children:"All Claims against any Form-7 will only be processed after endorsement by the concerned Protector of Emigrants, Bureau of Emigration & Overseas Employment. (BE&OE), Ministry of Overseas Pakistanis & Human Resource Development, Government of Pakistan."})]}),t.jsxs("div",{className:"mt-12 font-sans",children:[t.jsxs("div",{className:"text-sm mb-8 px-20",children:[t.jsx("p",{className:"border-t border-black w-48 text-center",children:"(Signature of the Depositors)"}),t.jsx("p",{children:"* Cop(ies) of CNIC/SNIC/NICOP is mandatory"})]}),t.jsxs("div",{className:" pt-2",children:[t.jsx("p",{className:"font-bold text-center border p-1 border-black",children:"FOR BANK USE ONLY"}),t.jsx("div",{className:"grid grid-cols-1 mt-6 font-sans",children:t.jsxs("div",{className:"px-20",children:[t.jsx("p",{children:"Form-7 Issued from Serial No. _________________________ to serial No. _________________________"}),t.jsx("p",{className:"mt-3",children:"Total Form Issued _________________________"})]})})]})]})]}),t.jsxs("div",{className:"flex justify-center space-x-60 pr-8 mt-6 font-sans",children:[t.jsx("div",{className:"text-center",children:t.jsx("p",{className:" font-bold w-40",children:"Authorized Signatures"})}),t.jsx("div",{className:"text-center",children:t.jsx("p",{className:"font-bold w-40",children:"Authorized Signatures"})})]})]})]})});function FC(e){var a,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(a=0;a<i;a++)e[a]&&(r=FC(e[a]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function gt(){for(var e,a,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(a=FC(e))&&(n&&(n+=" "),n+=a);return n}var BM=["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"];function Ub(e){if(typeof e!="string")return!1;var a=BM;return a.includes(e)}var IM=["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"];function $C(e){if(typeof e!="string")return!1;var a=IM;return a.includes(e)}function UC(e){return typeof e=="string"&&e.startsWith("data-")}function An(e){var a=Object.entries(e).filter(r=>{var[n]=r;return $C(n)||UC(n)});return Object.fromEntries(a)}function qb(e){if(e==null)return null;if(b.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var a=e.props;return An(a)}return typeof e=="object"&&!Array.isArray(e)?An(e):null}function hr(e){var a=Object.entries(e).filter(r=>{var[n]=r;return $C(n)||UC(n)||Ub(n)});return Object.fromEntries(a)}var FM=["children","width","height","viewBox","className","style","title","desc"];function Lg(){return Lg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lg.apply(null,arguments)}function $M(e,a){if(e==null)return{};var r,n,i=UM(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function UM(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var qC=b.forwardRef((e,a)=>{var{children:r,width:n,height:i,viewBox:o,className:c,style:m,title:u,desc:h}=e,p=$M(e,FM),x=o||{width:n,height:i,x:0,y:0},j=gt("recharts-surface",c);return b.createElement("svg",Lg({},hr(p),{className:j,width:n,height:i,style:m,viewBox:"".concat(x.x," ").concat(x.y," ").concat(x.width," ").concat(x.height),ref:a}),b.createElement("title",null,u),b.createElement("desc",null,h),r)}),qM=["children","className"];function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bg.apply(null,arguments)}function HM(e,a){if(e==null)return{};var r,n,i=VM(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function VM(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var xs=b.forwardRef((e,a)=>{var{children:r,className:n}=e,i=HM(e,qM),o=gt("recharts-layer",n);return b.createElement("g",Bg({className:o},hr(i),{ref:a}),r)}),YM=b.createContext(null);function ut(e){return function(){return e}}const HC=Math.cos,Bu=Math.sin,Pr=Math.sqrt,Iu=Math.PI,_m=2*Iu,Ig=Math.PI,Fg=2*Ig,Hs=1e-6,KM=Fg-Hs;function VC(e){this._+=e[0];for(let a=1,r=e.length;a<r;++a)this._+=arguments[a]+e[a]}function GM(e){let a=Math.floor(e);if(!(a>=0))throw new Error(`invalid digits: ${e}`);if(a>15)return VC;const r=10**a;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class JM{constructor(a){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=a==null?VC:GM(a)}moveTo(a,r){this._append`M${this._x0=this._x1=+a},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(a,r){this._append`L${this._x1=+a},${this._y1=+r}`}quadraticCurveTo(a,r,n,i){this._append`Q${+a},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(a,r,n,i,o,c){this._append`C${+a},${+r},${+n},${+i},${this._x1=+o},${this._y1=+c}`}arcTo(a,r,n,i,o){if(a=+a,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,m=this._y1,u=n-a,h=i-r,p=c-a,x=m-r,j=p*p+x*x;if(this._x1===null)this._append`M${this._x1=a},${this._y1=r}`;else if(j>Hs)if(!(Math.abs(x*u-h*p)>Hs)||!o)this._append`L${this._x1=a},${this._y1=r}`;else{let v=n-c,w=i-m,A=u*u+h*h,S=v*v+w*w,g=Math.sqrt(A),C=Math.sqrt(j),k=o*Math.tan((Ig-Math.acos((A+j-S)/(2*g*C)))/2),O=k/C,D=k/g;Math.abs(O-1)>Hs&&this._append`L${a+O*p},${r+O*x}`,this._append`A${o},${o},0,0,${+(x*v>p*w)},${this._x1=a+D*u},${this._y1=r+D*h}`}}arc(a,r,n,i,o,c){if(a=+a,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let m=n*Math.cos(i),u=n*Math.sin(i),h=a+m,p=r+u,x=1^c,j=c?i-o:o-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Hs||Math.abs(this._y1-p)>Hs)&&this._append`L${h},${p}`,n&&(j<0&&(j=j%Fg+Fg),j>KM?this._append`A${n},${n},0,1,${x},${a-m},${r-u}A${n},${n},0,1,${x},${this._x1=h},${this._y1=p}`:j>Hs&&this._append`A${n},${n},0,${+(j>=Ig)},${x},${this._x1=a+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(a,r,n,i){this._append`M${this._x0=this._x1=+a},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Hb(e){let a=3;return e.digits=function(r){if(!arguments.length)return a;if(r==null)a=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);a=n}return e},()=>new JM(a)}function Vb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function YC(e){this._context=e}YC.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,a){switch(e=+e,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,a):this._context.moveTo(e,a);break;case 1:this._point=2;default:this._context.lineTo(e,a);break}}};function Mm(e){return new YC(e)}function KC(e){return e[0]}function GC(e){return e[1]}function JC(e,a){var r=ut(!0),n=null,i=Mm,o=null,c=Hb(m);e=typeof e=="function"?e:e===void 0?KC:ut(e),a=typeof a=="function"?a:a===void 0?GC:ut(a);function m(u){var h,p=(u=Vb(u)).length,x,j=!1,v;for(n==null&&(o=i(v=c())),h=0;h<=p;++h)!(h<p&&r(x=u[h],h,u))===j&&((j=!j)?o.lineStart():o.lineEnd()),j&&o.point(+e(x,h,u),+a(x,h,u));if(v)return o=null,v+""||null}return m.x=function(u){return arguments.length?(e=typeof u=="function"?u:ut(+u),m):e},m.y=function(u){return arguments.length?(a=typeof u=="function"?u:ut(+u),m):a},m.defined=function(u){return arguments.length?(r=typeof u=="function"?u:ut(!!u),m):r},m.curve=function(u){return arguments.length?(i=u,n!=null&&(o=i(n)),m):i},m.context=function(u){return arguments.length?(u==null?n=o=null:o=i(n=u),m):n},m}function Qd(e,a,r){var n=null,i=ut(!0),o=null,c=Mm,m=null,u=Hb(h);e=typeof e=="function"?e:e===void 0?KC:ut(+e),a=typeof a=="function"?a:ut(a===void 0?0:+a),r=typeof r=="function"?r:r===void 0?GC:ut(+r);function h(x){var j,v,w,A=(x=Vb(x)).length,S,g=!1,C,k=new Array(A),O=new Array(A);for(o==null&&(m=c(C=u())),j=0;j<=A;++j){if(!(j<A&&i(S=x[j],j,x))===g)if(g=!g)v=j,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),w=j-1;w>=v;--w)m.point(k[w],O[w]);m.lineEnd(),m.areaEnd()}g&&(k[j]=+e(S,j,x),O[j]=+a(S,j,x),m.point(n?+n(S,j,x):k[j],r?+r(S,j,x):O[j]))}if(C)return m=null,C+""||null}function p(){return JC().defined(i).curve(c).context(o)}return h.x=function(x){return arguments.length?(e=typeof x=="function"?x:ut(+x),n=null,h):e},h.x0=function(x){return arguments.length?(e=typeof x=="function"?x:ut(+x),h):e},h.x1=function(x){return arguments.length?(n=x==null?null:typeof x=="function"?x:ut(+x),h):n},h.y=function(x){return arguments.length?(a=typeof x=="function"?x:ut(+x),r=null,h):a},h.y0=function(x){return arguments.length?(a=typeof x=="function"?x:ut(+x),h):a},h.y1=function(x){return arguments.length?(r=x==null?null:typeof x=="function"?x:ut(+x),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(a)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(a)},h.defined=function(x){return arguments.length?(i=typeof x=="function"?x:ut(!!x),h):i},h.curve=function(x){return arguments.length?(c=x,o!=null&&(m=c(o)),h):c},h.context=function(x){return arguments.length?(x==null?o=m=null:m=c(o=x),h):o},h}class WC{constructor(a,r){this._context=a,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(a,r){switch(a=+a,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(a,r):this._context.moveTo(a,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+a)/2,this._y0,this._x0,r,a,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,a,this._y0,a,r);break}}this._x0=a,this._y0=r}}function WM(e){return new WC(e,!0)}function XM(e){return new WC(e,!1)}const Yb={draw(e,a){const r=Pr(a/Iu);e.moveTo(r,0),e.arc(0,0,r,0,_m)}},ZM={draw(e,a){const r=Pr(a/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},XC=Pr(1/3),QM=XC*2,e8={draw(e,a){const r=Pr(a/QM),n=r*XC;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},t8={draw(e,a){const r=Pr(a),n=-r/2;e.rect(n,n,r,r)}},a8=.8908130915292852,ZC=Bu(Iu/10)/Bu(7*Iu/10),r8=Bu(_m/10)*ZC,n8=-HC(_m/10)*ZC,s8={draw(e,a){const r=Pr(a*a8),n=r8*r,i=n8*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const c=_m*o/5,m=HC(c),u=Bu(c);e.lineTo(u*r,-m*r),e.lineTo(m*n-u*i,u*n+m*i)}e.closePath()}},Yh=Pr(3),l8={draw(e,a){const r=-Pr(a/(Yh*3));e.moveTo(0,r*2),e.lineTo(-Yh*r,-r),e.lineTo(Yh*r,-r),e.closePath()}},cr=-.5,dr=Pr(3)/2,$g=1/Pr(12),i8=($g/2+1)*3,o8={draw(e,a){const r=Pr(a/i8),n=r/2,i=r*$g,o=n,c=r*$g+r,m=-o,u=c;e.moveTo(n,i),e.lineTo(o,c),e.lineTo(m,u),e.lineTo(cr*n-dr*i,dr*n+cr*i),e.lineTo(cr*o-dr*c,dr*o+cr*c),e.lineTo(cr*m-dr*u,dr*m+cr*u),e.lineTo(cr*n+dr*i,cr*i-dr*n),e.lineTo(cr*o+dr*c,cr*c-dr*o),e.lineTo(cr*m+dr*u,cr*u-dr*m),e.closePath()}};function c8(e,a){let r=null,n=Hb(i);e=typeof e=="function"?e:ut(e||Yb),a=typeof a=="function"?a:ut(a===void 0?64:+a);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+a.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ut(o),i):e},i.size=function(o){return arguments.length?(a=typeof o=="function"?o:ut(+o),i):a},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function Fu(){}function $u(e,a,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+a)/6,(e._y0+4*e._y1+r)/6)}function QC(e){this._context=e}QC.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:$u(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,a){switch(e=+e,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,a):this._context.moveTo(e,a);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:$u(this,e,a);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=a}};function d8(e){return new QC(e)}function e4(e){this._context=e}e4.prototype={areaStart:Fu,areaEnd:Fu,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,a){switch(e=+e,a=+a,this._point){case 0:this._point=1,this._x2=e,this._y2=a;break;case 1:this._point=2,this._x3=e,this._y3=a;break;case 2:this._point=3,this._x4=e,this._y4=a,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+a)/6);break;default:$u(this,e,a);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=a}};function u8(e){return new e4(e)}function t4(e){this._context=e}t4.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,a){switch(e=+e,a=+a,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+a)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:$u(this,e,a);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=a}};function m8(e){return new t4(e)}function a4(e){this._context=e}a4.prototype={areaStart:Fu,areaEnd:Fu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,a){e=+e,a=+a,this._point?this._context.lineTo(e,a):(this._point=1,this._context.moveTo(e,a))}};function f8(e){return new a4(e)}function hw(e){return e<0?-1:1}function xw(e,a,r){var n=e._x1-e._x0,i=a-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),c=(r-e._y1)/(i||n<0&&-0),m=(o*i+c*n)/(n+i);return(hw(o)+hw(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(m))||0}function gw(e,a){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-a)/2:a}function Kh(e,a,r){var n=e._x0,i=e._y0,o=e._x1,c=e._y1,m=(o-n)/3;e._context.bezierCurveTo(n+m,i+m*a,o-m,c-m*r,o,c)}function Uu(e){this._context=e}Uu.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:Kh(this,this._t0,gw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,a){var r=NaN;if(e=+e,a=+a,!(e===this._x1&&a===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,a):this._context.moveTo(e,a);break;case 1:this._point=2;break;case 2:this._point=3,Kh(this,gw(this,r=xw(this,e,a)),r);break;default:Kh(this,this._t0,r=xw(this,e,a));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=a,this._t0=r}}};function r4(e){this._context=new n4(e)}(r4.prototype=Object.create(Uu.prototype)).point=function(e,a){Uu.prototype.point.call(this,a,e)};function n4(e){this._context=e}n4.prototype={moveTo:function(e,a){this._context.moveTo(a,e)},closePath:function(){this._context.closePath()},lineTo:function(e,a){this._context.lineTo(a,e)},bezierCurveTo:function(e,a,r,n,i,o){this._context.bezierCurveTo(a,e,n,r,o,i)}};function p8(e){return new Uu(e)}function h8(e){return new r4(e)}function s4(e){this._context=e}s4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,a=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],a[0]):this._context.moveTo(e[0],a[0]),r===2)this._context.lineTo(e[1],a[1]);else for(var n=bw(e),i=bw(a),o=0,c=1;c<r;++o,++c)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[c],a[c]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,a){this._x.push(+e),this._y.push(+a)}};function bw(e){var a,r=e.length-1,n,i=new Array(r),o=new Array(r),c=new Array(r);for(i[0]=0,o[0]=2,c[0]=e[0]+2*e[1],a=1;a<r-1;++a)i[a]=1,o[a]=4,c[a]=4*e[a]+2*e[a+1];for(i[r-1]=2,o[r-1]=7,c[r-1]=8*e[r-1]+e[r],a=1;a<r;++a)n=i[a]/o[a-1],o[a]-=n,c[a]-=n*c[a-1];for(i[r-1]=c[r-1]/o[r-1],a=r-2;a>=0;--a)i[a]=(c[a]-i[a+1])/o[a];for(o[r-1]=(e[r]+i[r-1])/2,a=0;a<r-1;++a)o[a]=2*e[a+1]-i[a+1];return[i,o]}function x8(e){return new s4(e)}function zm(e,a){this._context=e,this._t=a}zm.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,a){switch(e=+e,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,a):this._context.moveTo(e,a);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,a),this._context.lineTo(e,a);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,a)}break}}this._x=e,this._y=a}};function g8(e){return new zm(e,.5)}function b8(e){return new zm(e,0)}function y8(e){return new zm(e,1)}function ni(e,a){if((c=e.length)>1)for(var r=1,n,i,o=e[a[0]],c,m=o.length;r<c;++r)for(i=o,o=e[a[r]],n=0;n<m;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Ug(e){for(var a=e.length,r=new Array(a);--a>=0;)r[a]=a;return r}function v8(e,a){return e[a]}function j8(e){const a=[];return a.key=e,a}function N8(){var e=ut([]),a=Ug,r=ni,n=v8;function i(o){var c=Array.from(e.apply(this,arguments),j8),m,u=c.length,h=-1,p;for(const x of o)for(m=0,++h;m<u;++m)(c[m][h]=[0,+n(x,c[m].key,h,o)]).data=x;for(m=0,p=Vb(a(c));m<u;++m)c[p[m]].index=m;return r(c,p),c}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ut(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:ut(+o),i):n},i.order=function(o){return arguments.length?(a=o==null?Ug:typeof o=="function"?o:ut(Array.from(o)),i):a},i.offset=function(o){return arguments.length?(r=o??ni,i):r},i}function w8(e,a){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,c;i<o;++i){for(c=r=0;r<n;++r)c+=e[r][i][1]||0;if(c)for(r=0;r<n;++r)e[r][i][1]/=c}ni(e,a)}}function S8(e,a){if((i=e.length)>0){for(var r=0,n=e[a[0]],i,o=n.length;r<o;++r){for(var c=0,m=0;c<i;++c)m+=e[c][r][1]||0;n[r][1]+=n[r][0]=-m/2}ni(e,a)}}function A8(e,a){if(!(!((c=e.length)>0)||!((o=(i=e[a[0]]).length)>0))){for(var r=0,n=1,i,o,c;n<o;++n){for(var m=0,u=0,h=0;m<c;++m){for(var p=e[a[m]],x=p[n][1]||0,j=p[n-1][1]||0,v=(x-j)/2,w=0;w<m;++w){var A=e[a[w]],S=A[n][1]||0,g=A[n-1][1]||0;v+=S-g}u+=x,h+=v*x}i[n-1][1]+=i[n-1][0]=r,u&&(r-=h/u)}i[n-1][1]+=i[n-1][0]=r,ni(e,a)}}var Gh={},Jh={},yw;function C8(){return yw||(yw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r==="__proto__"}e.isUnsafeProperty=a})(Jh)),Jh}var Wh={},vw;function l4(){return vw||(vw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=a})(Wh)),Wh}var Xh={},jw;function Kb(){return jw||(jw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=a})(Xh)),Xh}var Zh={},Qh={},Nw;function k8(){return Nw||(Nw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(a).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=a})(Qh)),Qh}var ww;function Gb(){return ww||(ww=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=k8(),r=Kb();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=a.toString(i);const o=[],c=i.length;if(c===0)return o;let m=0,u="",h="",p=!1;for(i.charCodeAt(0)===46&&(o.push(""),m++);m<c;){const x=i[m];h?x==="\\"&&m+1<c?(m++,u+=i[m]):x===h?h="":u+=x:p?x==='"'||x==="'"?h=x:x==="]"?(p=!1,o.push(u),u=""):u+=x:x==="["?(p=!0,u&&(o.push(u),u="")):x==="."?u&&(o.push(u),u=""):u+=x,m++}return u&&o.push(u),o}e.toPath=n})(Zh)),Zh}var Sw;function Jb(){return Sw||(Sw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=C8(),r=l4(),n=Kb(),i=Gb();function o(m,u,h){if(m==null)return h;switch(typeof u){case"string":{if(a.isUnsafeProperty(u))return h;const p=m[u];return p===void 0?r.isDeepKey(u)?o(m,i.toPath(u),h):h:p}case"number":case"symbol":{typeof u=="number"&&(u=n.toKey(u));const p=m[u];return p===void 0?h:p}default:{if(Array.isArray(u))return c(m,u,h);if(Object.is(u?.valueOf(),-0)?u="-0":u=String(u),a.isUnsafeProperty(u))return h;const p=m[u];return p===void 0?h:p}}}function c(m,u,h){if(u.length===0)return h;let p=m;for(let x=0;x<u.length;x++){if(p==null||a.isUnsafeProperty(u[x]))return h;p=p[u[x]]}return p===void 0?h:p}e.get=o})(Gh)),Gh}var ex,Aw;function E8(){return Aw||(Aw=1,ex=Jb().get),ex}var O8=E8();const si=Or(O8);var Ra=e=>e===0?0:e>0?1:-1,xr=e=>typeof e=="number"&&e!=+e,Cn=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,De=e=>(typeof e=="number"||e instanceof Number)&&!xr(e),Hr=e=>De(e)||typeof e=="string",D8=0,Qo=e=>{var a=++D8;return"".concat(e||"").concat(a)},Er=function(a,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!De(a)&&typeof a!="string")return n;var o;if(Cn(a)){if(r==null)return n;var c=a.indexOf("%");o=r*parseFloat(a.slice(0,c))/100}else o=+a;return xr(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},i4=e=>{if(!Array.isArray(e))return!1;for(var a=e.length,r={},n=0;n<a;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1};function ga(e,a,r){return De(e)&&De(a)?e+r*(a-e):a}function T8(e,a,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof a=="function"?a(n):si(n,a))===r)}var Gt=e=>e===null||typeof e>"u",gc=e=>Gt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),R8=["type","size","sizeType"];function qg(){return qg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qg.apply(null,arguments)}function Cw(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kw(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?Cw(Object(r),!0).forEach(function(n){P8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P8(e,a,r){return(a=_8(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function _8(e){var a=M8(e,"string");return typeof a=="symbol"?a:a+""}function M8(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function z8(e,a){if(e==null)return{};var r,n,i=L8(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function L8(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var o4={symbolCircle:Yb,symbolCross:ZM,symbolDiamond:e8,symbolSquare:t8,symbolStar:s8,symbolTriangle:l8,symbolWye:o8},B8=Math.PI/180,I8=e=>{var a="symbol".concat(gc(e));return o4[a]||Yb},F8=(e,a,r)=>{if(a==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*B8;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},$8=(e,a)=>{o4["symbol".concat(gc(e))]=a},c4=e=>{var{type:a="circle",size:r=64,sizeType:n="area"}=e,i=z8(e,R8),o=kw(kw({},i),{},{type:a,size:r,sizeType:n}),c="circle";typeof a=="string"&&(c=a);var m=()=>{var j=I8(c),v=c8().type(j).size(F8(r,n,c)),w=v();if(w!==null)return w},{className:u,cx:h,cy:p}=o,x=hr(o);return h===+h&&p===+p&&r===+r?b.createElement("path",qg({},x,{className:gt("recharts-symbols",u),transform:"translate(".concat(h,", ").concat(p,")"),d:m()})):null};c4.registerSymbol=$8;var U8=(e,a)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(b.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Ub(i)&&(n[i]=(o=>r[i](r,o)))}),n},q8=(e,a,r)=>n=>(e(a,r,n),null),Wb=(e,a,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];Ub(i)&&typeof o=="function"&&(n||(n={}),n[i]=q8(o,a,r))}),n},tx={},ax={},Ew;function H8(){return Ew||(Ew=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r,n){const i=new Map;for(let o=0;o<r.length;o++){const c=r[o],m=n(c);i.has(m)||i.set(m,c)}return Array.from(i.values())}e.uniqBy=a})(ax)),ax}var rx={},Ow;function d4(){return Ow||(Ow=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r}e.identity=a})(rx)),rx}var nx={},sx={},lx={},Dw;function V8(){return Dw||(Dw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=a})(lx)),lx}var Tw;function Xb(){return Tw||(Tw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=V8();function r(n){return n!=null&&typeof n!="function"&&a.isLength(n.length)}e.isArrayLike=r})(sx)),sx}var ix={},Rw;function Y8(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return typeof r=="object"&&r!==null}e.isObjectLike=a})(ix)),ix}var Pw;function K8(){return Pw||(Pw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=Xb(),r=Y8();function n(i){return r.isObjectLike(i)&&a.isArrayLike(i)}e.isArrayLikeObject=n})(nx)),nx}var ox={},cx={},_w;function G8(){return _w||(_w=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=Jb();function r(n){return function(i){return a.get(i,n)}}e.property=r})(cx)),cx}var dx={},ux={},mx={},fx={},Mw;function u4(){return Mw||(Mw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=a})(fx)),fx}var px={},zw;function m4(){return zw||(zw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=a})(px)),px}var hx={},Lw;function f4(){return Lw||(Lw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=a})(hx)),hx}var Bw;function J8(){return Bw||(Bw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=u4(),r=m4(),n=f4();function i(p,x,j){return typeof j!="function"?i(p,x,()=>{}):o(p,x,function v(w,A,S,g,C,k){const O=j(w,A,S,g,C,k);return O!==void 0?!!O:o(w,A,v,k)},new Map)}function o(p,x,j,v){if(x===p)return!0;switch(typeof x){case"object":return c(p,x,j,v);case"function":return Object.keys(x).length>0?o(p,{...x},j,v):n.eq(p,x);default:return a.isObject(p)?typeof x=="string"?x==="":!0:n.eq(p,x)}}function c(p,x,j,v){if(x==null)return!0;if(Array.isArray(x))return u(p,x,j,v);if(x instanceof Map)return m(p,x,j,v);if(x instanceof Set)return h(p,x,j,v);const w=Object.keys(x);if(p==null)return w.length===0;if(w.length===0)return!0;if(v?.has(x))return v.get(x)===p;v?.set(x,p);try{for(let A=0;A<w.length;A++){const S=w[A];if(!r.isPrimitive(p)&&!(S in p)||x[S]===void 0&&p[S]!==void 0||x[S]===null&&p[S]!==null||!j(p[S],x[S],S,p,x,v))return!1}return!0}finally{v?.delete(x)}}function m(p,x,j,v){if(x.size===0)return!0;if(!(p instanceof Map))return!1;for(const[w,A]of x.entries()){const S=p.get(w);if(j(S,A,w,p,x,v)===!1)return!1}return!0}function u(p,x,j,v){if(x.length===0)return!0;if(!Array.isArray(p))return!1;const w=new Set;for(let A=0;A<x.length;A++){const S=x[A];let g=!1;for(let C=0;C<p.length;C++){if(w.has(C))continue;const k=p[C];let O=!1;if(j(k,S,A,p,x,v)&&(O=!0),O){w.add(C),g=!0;break}}if(!g)return!1}return!0}function h(p,x,j,v){return x.size===0?!0:p instanceof Set?u([...p],[...x],j,v):!1}e.isMatchWith=i,e.isSetMatch=h})(mx)),mx}var Iw;function p4(){return Iw||(Iw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=J8();function r(n,i){return a.isMatchWith(n,i,()=>{})}e.isMatch=r})(ux)),ux}var xx={},gx={},bx={},Fw;function W8(){return Fw||(Fw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=a})(bx)),bx}var yx={},$w;function h4(){return $w||($w=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=a})(yx)),yx}var vx={},Uw;function x4(){return Uw||(Uw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",o="[object Arguments]",c="[object Symbol]",m="[object Date]",u="[object Map]",h="[object Set]",p="[object Array]",x="[object Function]",j="[object ArrayBuffer]",v="[object Object]",w="[object Error]",A="[object DataView]",S="[object Uint8Array]",g="[object Uint8ClampedArray]",C="[object Uint16Array]",k="[object Uint32Array]",O="[object BigUint64Array]",D="[object Int8Array]",B="[object Int16Array]",L="[object Int32Array]",T="[object BigInt64Array]",R="[object Float32Array]",z="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=j,e.arrayTag=p,e.bigInt64ArrayTag=T,e.bigUint64ArrayTag=O,e.booleanTag=i,e.dataViewTag=A,e.dateTag=m,e.errorTag=w,e.float32ArrayTag=R,e.float64ArrayTag=z,e.functionTag=x,e.int16ArrayTag=B,e.int32ArrayTag=L,e.int8ArrayTag=D,e.mapTag=u,e.numberTag=n,e.objectTag=v,e.regexpTag=a,e.setTag=h,e.stringTag=r,e.symbolTag=c,e.uint16ArrayTag=C,e.uint32ArrayTag=k,e.uint8ArrayTag=S,e.uint8ClampedArrayTag=g})(vx)),vx}var jx={},qw;function X8(){return qw||(qw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=a})(jx)),jx}var Hw;function g4(){return Hw||(Hw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=W8(),r=h4(),n=x4(),i=m4(),o=X8();function c(p,x){return m(p,void 0,p,new Map,x)}function m(p,x,j,v=new Map,w=void 0){const A=w?.(p,x,j,v);if(A!==void 0)return A;if(i.isPrimitive(p))return p;if(v.has(p))return v.get(p);if(Array.isArray(p)){const S=new Array(p.length);v.set(p,S);for(let g=0;g<p.length;g++)S[g]=m(p[g],g,j,v,w);return Object.hasOwn(p,"index")&&(S.index=p.index),Object.hasOwn(p,"input")&&(S.input=p.input),S}if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp){const S=new RegExp(p.source,p.flags);return S.lastIndex=p.lastIndex,S}if(p instanceof Map){const S=new Map;v.set(p,S);for(const[g,C]of p)S.set(g,m(C,g,j,v,w));return S}if(p instanceof Set){const S=new Set;v.set(p,S);for(const g of p)S.add(m(g,void 0,j,v,w));return S}if(typeof Buffer<"u"&&Buffer.isBuffer(p))return p.subarray();if(o.isTypedArray(p)){const S=new(Object.getPrototypeOf(p)).constructor(p.length);v.set(p,S);for(let g=0;g<p.length;g++)S[g]=m(p[g],g,j,v,w);return S}if(p instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&p instanceof SharedArrayBuffer)return p.slice(0);if(p instanceof DataView){const S=new DataView(p.buffer.slice(0),p.byteOffset,p.byteLength);return v.set(p,S),u(S,p,j,v,w),S}if(typeof File<"u"&&p instanceof File){const S=new File([p],p.name,{type:p.type});return v.set(p,S),u(S,p,j,v,w),S}if(typeof Blob<"u"&&p instanceof Blob){const S=new Blob([p],{type:p.type});return v.set(p,S),u(S,p,j,v,w),S}if(p instanceof Error){const S=new p.constructor;return v.set(p,S),S.message=p.message,S.name=p.name,S.stack=p.stack,S.cause=p.cause,u(S,p,j,v,w),S}if(p instanceof Boolean){const S=new Boolean(p.valueOf());return v.set(p,S),u(S,p,j,v,w),S}if(p instanceof Number){const S=new Number(p.valueOf());return v.set(p,S),u(S,p,j,v,w),S}if(p instanceof String){const S=new String(p.valueOf());return v.set(p,S),u(S,p,j,v,w),S}if(typeof p=="object"&&h(p)){const S=Object.create(Object.getPrototypeOf(p));return v.set(p,S),u(S,p,j,v,w),S}return p}function u(p,x,j=p,v,w){const A=[...Object.keys(x),...a.getSymbols(x)];for(let S=0;S<A.length;S++){const g=A[S],C=Object.getOwnPropertyDescriptor(p,g);(C==null||C.writable)&&(p[g]=m(x[g],g,j,v,w))}}function h(p){switch(r.getTag(p)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=c,e.cloneDeepWithImpl=m,e.copyProperties=u})(gx)),gx}var Vw;function Z8(){return Vw||(Vw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=g4();function r(n){return a.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(xx)),xx}var Yw;function Q8(){return Yw||(Yw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=p4(),r=Z8();function n(i){return i=r.cloneDeep(i),o=>a.isMatch(o,i)}e.matches=n})(dx)),dx}var Nx={},wx={},Sx={},Kw;function ez(){return Kw||(Kw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=g4(),r=x4();function n(i,o){return a.cloneDeepWith(i,(c,m,u,h)=>{const p=o?.(c,m,u,h);if(p!==void 0)return p;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const x=new i.constructor(i?.valueOf());return a.copyProperties(x,i),x}case r.argumentsTag:{const x={};return a.copyProperties(x,i),x.length=i.length,x[Symbol.iterator]=i[Symbol.iterator],x}default:return}})}e.cloneDeepWith=n})(Sx)),Sx}var Gw;function tz(){return Gw||(Gw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=ez();function r(n){return a.cloneDeepWith(n)}e.cloneDeep=r})(wx)),wx}var Ax={},Cx={},Jw;function b4(){return Jw||(Jw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return a.test(n)}}e.isIndex=r})(Cx)),Cx}var kx={},Ww;function az(){return Ww||(Ww=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=h4();function r(n){return n!==null&&typeof n=="object"&&a.getTag(n)==="[object Arguments]"}e.isArguments=r})(kx)),kx}var Xw;function rz(){return Xw||(Xw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=l4(),r=b4(),n=az(),i=Gb();function o(c,m){let u;if(Array.isArray(m)?u=m:typeof m=="string"&&a.isDeepKey(m)&&c?.[m]==null?u=i.toPath(m):u=[m],u.length===0)return!1;let h=c;for(let p=0;p<u.length;p++){const x=u[p];if((h==null||!Object.hasOwn(h,x))&&!((Array.isArray(h)||n.isArguments(h))&&r.isIndex(x)&&x<h.length))return!1;h=h[x]}return!0}e.has=o})(Ax)),Ax}var Zw;function nz(){return Zw||(Zw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=p4(),r=Kb(),n=tz(),i=Jb(),o=rz();function c(m,u){switch(typeof m){case"object":{Object.is(m?.valueOf(),-0)&&(m="-0");break}case"number":{m=r.toKey(m);break}}return u=n.cloneDeep(u),function(h){const p=i.get(h,m);return p===void 0?o.has(h,m):u===void 0?p===void 0:a.isMatch(p,u)}}e.matchesProperty=c})(Nx)),Nx}var Qw;function sz(){return Qw||(Qw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=d4(),r=G8(),n=Q8(),i=nz();function o(c){if(c==null)return a.identity;switch(typeof c){case"function":return c;case"object":return Array.isArray(c)&&c.length===2?i.matchesProperty(c[0],c[1]):n.matches(c);case"string":case"symbol":case"number":return r.property(c)}}e.iteratee=o})(ox)),ox}var e1;function lz(){return e1||(e1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=H8(),r=d4(),n=K8(),i=sz();function o(c,m=r.identity){return n.isArrayLikeObject(c)?a.uniqBy(Array.from(c),i.iteratee(m)):[]}e.uniqBy=o})(tx)),tx}var Ex,t1;function iz(){return t1||(t1=1,Ex=lz().uniqBy),Ex}var oz=iz();const a1=Or(oz);function cz(e,a,r){return a===!0?a1(e,r):typeof a=="function"?a1(e,a):e}var Ox={exports:{}},Dx={},Tx={exports:{}},Rx={};/**
* @license React
* use-sync-external-store-shim.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 r1;function dz(){if(r1)return Rx;r1=1;var e=hi();function a(x,j){return x===j&&(x!==0||1/x===1/j)||x!==x&&j!==j}var r=typeof Object.is=="function"?Object.is:a,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function m(x,j){var v=j(),w=n({inst:{value:v,getSnapshot:j}}),A=w[0].inst,S=w[1];return o(function(){A.value=v,A.getSnapshot=j,u(A)&&S({inst:A})},[x,v,j]),i(function(){return u(A)&&S({inst:A}),x(function(){u(A)&&S({inst:A})})},[x]),c(v),v}function u(x){var j=x.getSnapshot;x=x.value;try{var v=j();return!r(x,v)}catch{return!0}}function h(x,j){return j()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:m;return Rx.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Rx}var n1;function uz(){return n1||(n1=1,Tx.exports=dz()),Tx.exports}/**
* @license React
* use-sync-external-store-shim/with-selector.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 s1;function mz(){if(s1)return Dx;s1=1;var e=hi(),a=uz();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,i=a.useSyncExternalStore,o=e.useRef,c=e.useEffect,m=e.useMemo,u=e.useDebugValue;return Dx.useSyncExternalStoreWithSelector=function(h,p,x,j,v){var w=o(null);if(w.current===null){var A={hasValue:!1,value:null};w.current=A}else A=w.current;w=m(function(){function g(B){if(!C){if(C=!0,k=B,B=j(B),v!==void 0&&A.hasValue){var L=A.value;if(v(L,B))return O=L}return O=B}if(L=O,n(k,B))return L;var T=j(B);return v!==void 0&&v(L,T)?(k=B,L):(k=B,O=T)}var C=!1,k,O,D=x===void 0?null:x;return[function(){return g(p())},D===null?void 0:function(){return g(D())}]},[p,x,j,v]);var S=i(h,w[0],w[1]);return c(function(){A.hasValue=!0,A.value=S},[S]),u(S),S},Dx}var l1;function fz(){return l1||(l1=1,Ox.exports=mz()),Ox.exports}var pz=fz(),Zb=b.createContext(null),hz=e=>e,zt=()=>{var e=b.useContext(Zb);return e?e.store.dispatch:hz},wu=()=>{},xz=()=>wu,gz=(e,a)=>e===a;function Te(e){var a=b.useContext(Zb);return pz.useSyncExternalStoreWithSelector(a?a.subscription.addNestedSub:xz,a?a.store.getState:wu,a?a.store.getState:wu,a?e:wu,gz)}var Px={},_x={},Mx={},i1;function bz(){return i1||(i1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,o)=>{if(n!==i){const c=a(n),m=a(i);if(c===m&&c===0){if(n<i)return o==="desc"?1:-1;if(n>i)return o==="desc"?-1:1}return o==="desc"?m-c:c-m}return 0};e.compareValues=r})(Mx)),Mx}var zx={},Lx={},o1;function y4(){return o1||(o1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=a})(Lx)),Lx}var c1;function yz(){return c1||(c1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=y4(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,c){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||a.isSymbol(o)?!0:typeof o=="string"&&(n.test(o)||!r.test(o))||c!=null&&Object.hasOwn(c,o)}e.isKey=i})(zx)),zx}var d1;function vz(){return d1||(d1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=bz(),r=yz(),n=Gb();function i(o,c,m,u){if(o==null)return[];m=u?void 0:m,Array.isArray(o)||(o=Object.values(o)),Array.isArray(c)||(c=c==null?[null]:[c]),c.length===0&&(c=[null]),Array.isArray(m)||(m=m==null?[]:[m]),m=m.map(v=>String(v));const h=(v,w)=>{let A=v;for(let S=0;S<w.length&&A!=null;++S)A=A[w[S]];return A},p=(v,w)=>w==null||v==null?w:typeof v=="object"&&"key"in v?Object.hasOwn(w,v.key)?w[v.key]:h(w,v.path):typeof v=="function"?v(w):Array.isArray(v)?h(w,v):typeof w=="object"?w[v]:w,x=c.map(v=>(Array.isArray(v)&&v.length===1&&(v=v[0]),v==null||typeof v=="function"||Array.isArray(v)||r.isKey(v)?v:{key:v,path:n.toPath(v)}));return o.map(v=>({original:v,criteria:x.map(w=>p(w,v))})).slice().sort((v,w)=>{for(let A=0;A<x.length;A++){const S=a.compareValues(v.criteria[A],w.criteria[A],m[A]);if(S!==0)return S}return 0}).map(v=>v.original)}e.orderBy=i})(_x)),_x}var Bx={},u1;function jz(){return u1||(u1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r,n=1){const i=[],o=Math.floor(n),c=(m,u)=>{for(let h=0;h<m.length;h++){const p=m[h];Array.isArray(p)&&u<o?c(p,u+1):i.push(p)}};return c(r,0),i}e.flatten=a})(Bx)),Bx}var Ix={},m1;function v4(){return m1||(m1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=b4(),r=Xb(),n=u4(),i=f4();function o(c,m,u){return n.isObject(u)&&(typeof m=="number"&&r.isArrayLike(u)&&a.isIndex(m)&&m<u.length||typeof m=="string"&&m in u)?i.eq(u[m],c):!1}e.isIterateeCall=o})(Ix)),Ix}var f1;function Nz(){return f1||(f1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=vz(),r=jz(),n=v4();function i(o,...c){const m=c.length;return m>1&&n.isIterateeCall(o,c[0],c[1])?c=[]:m>2&&n.isIterateeCall(c[0],c[1],c[2])&&(c=[c[0]]),a.orderBy(o,r.flatten(c),["asc"])}e.sortBy=i})(Px)),Px}var Fx,p1;function wz(){return p1||(p1=1,Fx=Nz().sortBy),Fx}var Sz=wz();const Lm=Or(Sz);var j4=e=>e.legend.settings,Az=e=>e.legend.size,Cz=e=>e.legend.payload;le([Cz,j4],(e,a)=>{var{itemSorter:r}=a,n=e.flat(1);return r?Lm(n,r):n});var eu=1;function kz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[a,r]=b.useState({height:0,left:0,top:0,width:0}),n=b.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),c={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(c.height-a.height)>eu||Math.abs(c.left-a.left)>eu||Math.abs(c.top-a.top)>eu||Math.abs(c.width-a.width)>eu)&&r({height:c.height,left:c.left,top:c.top,width:c.width})}},[a.width,a.height,a.top,a.left,...e]);return[a,n]}var Ez={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},N4=za({name:"chartLayout",initialState:Ez,reducers:{setLayout(e,a){e.layoutType=a.payload},setChartSize(e,a){e.width=a.payload.width,e.height=a.payload.height},setMargin(e,a){var r,n,i,o;e.margin.top=(r=a.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=a.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=a.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=a.payload.left)!==null&&o!==void 0?o:0},setScale(e,a){e.scale=a.payload}}}),{setMargin:Oz,setLayout:Dz,setChartSize:Tz,setScale:Rz}=N4.actions,Pz=N4.reducer;function h1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function x1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?h1(Object(r),!0).forEach(function(n){_z(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _z(e,a,r){return(a=Mz(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function Mz(e){var a=zz(e,"string");return typeof a=="symbol"?a:a+""}function zz(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var qu=Math.PI/180,Lz=e=>e*180/Math.PI,oa=(e,a,r,n)=>({x:e+Math.cos(-qu*n)*r,y:a+Math.sin(-qu*n)*r}),Bz=function(a,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(a-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Iz=(e,a)=>{var{x:r,y:n}=e,{x:i,y:o}=a;return Math.sqrt((r-i)**2+(n-o)**2)},Fz=(e,a)=>{var{x:r,y:n}=e,{cx:i,cy:o}=a,c=Iz({x:r,y:n},{x:i,y:o});if(c<=0)return{radius:c,angle:0};var m=(r-i)/c,u=Math.acos(m);return n>o&&(u=2*Math.PI-u),{radius:c,angle:Lz(u),angleInRadian:u}},$z=e=>{var{startAngle:a,endAngle:r}=e,n=Math.floor(a/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:a-o*360,endAngle:r-o*360}},Uz=(e,a)=>{var{startAngle:r,endAngle:n}=a,i=Math.floor(r/360),o=Math.floor(n/360),c=Math.min(i,o);return e+c*360},qz=(e,a)=>{var{x:r,y:n}=e,{radius:i,angle:o}=Fz({x:r,y:n},a),{innerRadius:c,outerRadius:m}=a;if(i<c||i>m||i===0)return null;var{startAngle:u,endAngle:h}=$z(a),p=o,x;if(u<=h){for(;p>h;)p-=360;for(;p<u;)p+=360;x=p>=u&&p<=h}else{for(;p>u;)p-=360;for(;p<h;)p+=360;x=p>=h&&p<=u}return x?x1(x1({},a),{},{radius:i,angle:Uz(p,a)}):null};function w4(e,a,r){return Array.isArray(e)&&e&&a+r!==0?e.slice(a,r+1):e}function g1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mr(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?g1(Object(r),!0).forEach(function(n){Hz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hz(e,a,r){return(a=Vz(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function Vz(e){var a=Yz(e,"string");return typeof a=="symbol"?a:a+""}function Yz(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Na(e,a,r){return Gt(e)||Gt(a)?r:Hr(a)?si(e,a,r):typeof a=="function"?a(e):r}var Kz=(e,a,r,n,i)=>{var o,c=-1,m=(o=a?.length)!==null&&o!==void 0?o:0;if(m<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var u=0;u<m;u++){var h=u>0?r[u-1].coordinate:r[m-1].coordinate,p=r[u].coordinate,x=u>=m-1?r[0].coordinate:r[u+1].coordinate,j=void 0;if(Ra(p-h)!==Ra(x-p)){var v=[];if(Ra(x-p)===Ra(i[1]-i[0])){j=x;var w=p+i[1]-i[0];v[0]=Math.min(w,(w+h)/2),v[1]=Math.max(w,(w+h)/2)}else{j=h;var A=x+i[1]-i[0];v[0]=Math.min(p,(A+p)/2),v[1]=Math.max(p,(A+p)/2)}var S=[Math.min(p,(j+p)/2),Math.max(p,(j+p)/2)];if(e>S[0]&&e<=S[1]||e>=v[0]&&e<=v[1]){({index:c}=r[u]);break}}else{var g=Math.min(h,x),C=Math.max(h,x);if(e>(g+p)/2&&e<=(C+p)/2){({index:c}=r[u]);break}}}else if(a){for(var k=0;k<m;k++)if(k===0&&e<=(a[k].coordinate+a[k+1].coordinate)/2||k>0&&k<m-1&&e>(a[k].coordinate+a[k-1].coordinate)/2&&e<=(a[k].coordinate+a[k+1].coordinate)/2||k===m-1&&e>(a[k].coordinate+a[k-1].coordinate)/2){({index:c}=a[k]);break}}return c},Gz=(e,a,r)=>{if(a&&r){var{width:n,height:i}=r,{align:o,verticalAlign:c,layout:m}=a;if((m==="vertical"||m==="horizontal"&&c==="middle")&&o!=="center"&&De(e[o]))return mr(mr({},e),{},{[o]:e[o]+(n||0)});if((m==="horizontal"||m==="vertical"&&o==="center")&&c!=="middle"&&De(e[c]))return mr(mr({},e),{},{[c]:e[c]+(i||0)})}return e},dl=(e,a)=>e==="horizontal"&&a==="xAxis"||e==="vertical"&&a==="yAxis"||e==="centric"&&a==="angleAxis"||e==="radial"&&a==="radiusAxis",S4=(e,a,r,n)=>{if(n)return e.map(m=>m.coordinate);var i,o,c=e.map(m=>(m.coordinate===a&&(i=!0),m.coordinate===r&&(o=!0),m.coordinate));return i||c.push(a),o||c.push(r),c},A4=(e,a,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:o,scale:c,realScaleType:m,isCategorical:u,categoricalDomain:h,tickCount:p,ticks:x,niceTicks:j,axisType:v}=e;if(!c)return null;var w=m==="scaleBand"&&c.bandwidth?c.bandwidth()/2:2,A=i==="category"&&c.bandwidth?c.bandwidth()/w:0;if(A=v==="angleAxis"&&o&&o.length>=2?Ra(o[0]-o[1])*2*A:A,x||j){var S=(x||j||[]).map((g,C)=>{var k=n?n.indexOf(g):g;return{coordinate:c(k)+A,value:g,offset:A,index:C}});return S.filter(g=>!xr(g.coordinate))}return u&&h?h.map((g,C)=>({coordinate:c(g)+A,value:g,index:C,offset:A})):c.ticks&&p!=null?c.ticks(p).map((g,C)=>({coordinate:c(g)+A,value:g,offset:A,index:C})):c.domain().map((g,C)=>({coordinate:c(g)+A,value:n?n[g]:g,index:C,offset:A}))},b1=1e-4,Jz=e=>{var a=e.domain();if(!(!a||a.length<=2)){var r=a.length,n=e.range(),i=Math.min(n[0],n[1])-b1,o=Math.max(n[0],n[1])+b1,c=e(a[0]),m=e(a[r-1]);(c<i||c>o||m<i||m>o)&&e.domain([a[0],a[r-1]])}},Wz=(e,a)=>{if(!a||a.length!==2||!De(a[0])||!De(a[1]))return e;var r=Math.min(a[0],a[1]),n=Math.max(a[0],a[1]),i=[e[0],e[1]];return(!De(e[0])||e[0]<r)&&(i[0]=r),(!De(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},Xz=e=>{var a=e.length;if(!(a<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0,c=0;c<a;++c){var m=xr(e[c][r][1])?e[c][r][0]:e[c][r][1];m>=0?(e[c][r][0]=i,e[c][r][1]=i+m,i=e[c][r][1]):(e[c][r][0]=o,e[c][r][1]=o+m,o=e[c][r][1])}},Zz=e=>{var a=e.length;if(!(a<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0;o<a;++o){var c=xr(e[o][r][1])?e[o][r][0]:e[o][r][1];c>=0?(e[o][r][0]=i,e[o][r][1]=i+c,i=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}},Qz={sign:Xz,expand:w8,none:ni,silhouette:S8,wiggle:A8,positive:Zz},eL=(e,a,r)=>{var n=Qz[r],i=N8().keys(a).value((o,c)=>+Na(o,c,0)).order(Ug).offset(n);return i(e)};function tL(e){return e==null?void 0:String(e)}var y1=e=>{var{axis:a,ticks:r,offset:n,bandSize:i,entry:o,index:c}=e;if(a.type==="category")return r[c]?r[c].coordinate+n:null;var m=Na(o,a.dataKey,a.scale.domain()[c]);return Gt(m)?null:a.scale(m)-i/2+n},aL=e=>{var{numericAxis:a}=e,r=a.scale.domain();if(a.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},rL=e=>{var a=e.flat(2).filter(De);return[Math.min(...a),Math.max(...a)]},nL=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],sL=(e,a,r)=>{if(e!=null)return nL(Object.keys(e).reduce((n,i)=>{var o=e[i],{stackedData:c}=o,m=c.reduce((u,h)=>{var p=w4(h,a,r),x=rL(p);return[Math.min(u[0],x[0]),Math.max(u[1],x[1])]},[1/0,-1/0]);return[Math.min(m[0],n[0]),Math.max(m[1],n[1])]},[1/0,-1/0]))},v1=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,j1=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Qb=(e,a,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&a&&a.length>=2){for(var i=Lm(a,p=>p.coordinate),o=1/0,c=1,m=i.length;c<m;c++){var u=i[c],h=i[c-1];o=Math.min((u.coordinate||0)-(h.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0};function N1(e){var{tooltipEntrySettings:a,dataKey:r,payload:n,value:i,name:o}=e;return mr(mr({},a),{},{dataKey:r,payload:n,value:i,name:o})}function C4(e,a){if(e)return String(e);if(typeof a=="string")return a}function lL(e,a,r,n,i){if(r==="horizontal"||r==="vertical"){var o=e>=i.left&&e<=i.left+i.width&&a>=i.top&&a<=i.top+i.height;return o?{x:e,y:a}:null}return n?qz({x:e,y:a},n):null}var iL=(e,a,r,n)=>{var i=a.find(h=>h&&h.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.y};if(e==="vertical")return{x:n.x,y:i.coordinate};if(e==="centric"){var o=i.coordinate,{radius:c}=n;return mr(mr(mr({},n),oa(n.cx,n.cy,c,o)),{},{angle:o,radius:c})}var m=i.coordinate,{angle:u}=n;return mr(mr(mr({},n),oa(n.cx,n.cy,m,u)),{},{angle:u,radius:m})}return{x:0,y:0}},oL=(e,a)=>a==="horizontal"?e.x:a==="vertical"?e.y:a==="centric"?e.angle:e.radius,Pn=e=>e.layout.width,_n=e=>e.layout.height,cL=e=>e.layout.scale,k4=e=>e.layout.margin,Bm=le(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Im=le(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),dL="data-recharts-item-index",uL="data-recharts-item-data-key",bc=60;function w1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tu(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?w1(Object(r),!0).forEach(function(n){mL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mL(e,a,r){return(a=fL(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function fL(e){var a=pL(e,"string");return typeof a=="symbol"?a:a+""}function pL(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var hL=e=>e.brush.height;function xL(e){var a=Im(e);return a.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:bc;return r+i}return r},0)}function gL(e){var a=Im(e);return a.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:bc;return r+i}return r},0)}function bL(e){var a=Bm(e);return a.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function yL(e){var a=Bm(e);return a.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Xt=le([Pn,_n,k4,hL,xL,gL,bL,yL,j4,Az],(e,a,r,n,i,o,c,m,u,h)=>{var p={left:(r.left||0)+i,right:(r.right||0)+o},x={top:(r.top||0)+c,bottom:(r.bottom||0)+m},j=tu(tu({},x),p),v=j.bottom;j.bottom+=n,j=Gz(j,u,h);var w=e-j.left-j.right,A=a-j.top-j.bottom;return tu(tu({brushBottom:v},j),{},{width:Math.max(w,0),height:Math.max(A,0)})}),vL=le(Xt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),e0=le(Pn,_n,(e,a)=>({x:0,y:0,width:e,height:a})),jL=b.createContext(null),Wa=()=>b.useContext(jL)!=null,Fm=e=>e.brush,$m=le([Fm,Xt,k4],(e,a,r)=>({height:e.height,x:De(e.x)?e.x:a.left,y:De(e.y)?e.y:a.top+a.height+a.brushBottom-(r?.bottom||0),width:De(e.width)?e.width:a.width})),$x={},Ux={},qx={},S1;function NL(){return S1||(S1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r,n,{signal:i,edges:o}={}){let c,m=null;const u=o!=null&&o.includes("leading"),h=o==null||o.includes("trailing"),p=()=>{m!==null&&(r.apply(c,m),c=void 0,m=null)},x=()=>{h&&p(),A()};let j=null;const v=()=>{j!=null&&clearTimeout(j),j=setTimeout(()=>{j=null,x()},n)},w=()=>{j!==null&&(clearTimeout(j),j=null)},A=()=>{w(),c=void 0,m=null},S=()=>{p()},g=function(...C){if(i?.aborted)return;c=this,m=C;const k=j==null;v(),u&&k&&p()};return g.schedule=v,g.cancel=A,g.flush=S,i?.addEventListener("abort",A,{once:!0}),g}e.debounce=a})(qx)),qx}var A1;function wL(){return A1||(A1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=NL();function r(n,i=0,o={}){typeof o!="object"&&(o={});const{leading:c=!1,trailing:m=!0,maxWait:u}=o,h=Array(2);c&&(h[0]="leading"),m&&(h[1]="trailing");let p,x=null;const j=a.debounce(function(...A){p=n.apply(this,A),x=null},i,{edges:h}),v=function(...A){return u!=null&&(x===null&&(x=Date.now()),Date.now()-x>=u)?(p=n.apply(this,A),x=Date.now(),j.cancel(),j.schedule(),p):(j.apply(this,A),p)},w=()=>(j.flush(),p);return v.cancel=j.cancel,v.flush=w,v}e.debounce=r})(Ux)),Ux}var C1;function SL(){return C1||(C1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=wL();function r(n,i=0,o={}){const{leading:c=!0,trailing:m=!0}=o;return a.debounce(n,i,{leading:c,maxWait:i,trailing:m})}e.throttle=r})($x)),$x}var Hx,k1;function AL(){return k1||(k1=1,Hx=SL().throttle),Hx}var CL=AL();const kL=Or(CL);var Hu=function(a,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o]},E4=(e,a,r)=>{var{width:n="100%",height:i="100%",aspect:o,maxHeight:c}=r,m=Cn(n)?e:Number(n),u=Cn(i)?a:Number(i);return o&&o>0&&(m?u=m/o:u&&(m=u*o),c&&u>c&&(u=c)),{calculatedWidth:m,calculatedHeight:u}},EL={width:0,height:0,overflow:"visible"},OL={width:0,overflowX:"visible"},DL={height:0,overflowY:"visible"},TL={},RL=e=>{var{width:a,height:r}=e,n=Cn(a),i=Cn(r);return n&&i?EL:n?OL:i?DL:TL};function PL(e){var{width:a,height:r,aspect:n}=e,i=a,o=r;return i===void 0&&o===void 0?(i="100%",o="100%"):i===void 0?i=n&&n>0?void 0:"100%":o===void 0&&(o=n&&n>0?void 0:"100%"),{width:i,height:o}}function fa(e){return Number.isFinite(e)}function li(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hg.apply(null,arguments)}function E1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function O1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?E1(Object(r),!0).forEach(function(n){_L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _L(e,a,r){return(a=ML(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function ML(e){var a=zL(e,"string");return typeof a=="symbol"?a:a+""}function zL(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var O4=b.createContext({width:-1,height:-1});function D4(e){var{children:a,width:r,height:n}=e,i=b.useMemo(()=>({width:r,height:n}),[r,n]);return r<=0||n<=0?null:b.createElement(O4.Provider,{value:i},a)}var t0=()=>b.useContext(O4),LL=b.forwardRef((e,a)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:i,height:o,minWidth:c=0,minHeight:m,maxHeight:u,children:h,debounce:p=0,id:x,className:j,onResize:v,style:w={}}=e,A=b.useRef(null),S=b.useRef();S.current=v,b.useImperativeHandle(a,()=>A.current);var[g,C]=b.useState({containerWidth:n.width,containerHeight:n.height}),k=b.useCallback((T,R)=>{C(z=>{var $=Math.round(T),Z=Math.round(R);return z.containerWidth===$&&z.containerHeight===Z?z:{containerWidth:$,containerHeight:Z}})},[]);b.useEffect(()=>{var T=Z=>{var fe,{width:se,height:ie}=Z[0].contentRect;k(se,ie),(fe=S.current)===null||fe===void 0||fe.call(S,se,ie)};p>0&&(T=kL(T,p,{trailing:!0,leading:!1}));var R=new ResizeObserver(T),{width:z,height:$}=A.current.getBoundingClientRect();return k(z,$),R.observe(A.current),()=>{R.disconnect()}},[k,p]);var{containerWidth:O,containerHeight:D}=g;Hu(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:B,calculatedHeight:L}=E4(O,D,{width:i,height:o,aspect:r,maxHeight:u});return Hu(B>0||L>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.`,B,L,i,o,c,m,r),b.createElement("div",{id:x?"".concat(x):void 0,className:gt("recharts-responsive-container",j),style:O1(O1({},w),{},{width:i,height:o,minWidth:c,minHeight:m,maxHeight:u}),ref:A},b.createElement("div",{style:RL({width:i,height:o})},b.createElement(D4,{width:B,height:L},h)))}),BL=b.forwardRef((e,a)=>{var r=t0();if(li(r.width)&&li(r.height))return e.children;var{width:n,height:i}=PL({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:c}=E4(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return De(o)&&De(c)?b.createElement(D4,{width:o,height:c},e.children):b.createElement(LL,Hg({},e,{width:n,height:i,ref:a}))}),Um=()=>{var e,a=Wa(),r=Te(vL),n=Te($m),i=(e=Te(Fm))===null||e===void 0?void 0:e.padding;return!a||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},IL={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},T4=()=>{var e;return(e=Te(Xt))!==null&&e!==void 0?e:IL},R4=()=>Te(Pn),P4=()=>Te(_n),at=e=>e.layout.layoutType,a0=()=>Te(at),qm=e=>{var a=zt(),r=Wa(),{width:n,height:i}=e,o=t0(),c=n,m=i;return o&&(c=o.width>0?o.width:n,m=o.height>0?o.height:i),b.useEffect(()=>{!r&&li(c)&&li(m)&&a(Tz({width:c,height:m}))},[a,r,c,m]),null},FL={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},_4=za({name:"legend",initialState:FL,reducers:{setLegendSize(e,a){e.size.width=a.payload.width,e.size.height=a.payload.height},setLegendSettings(e,a){e.settings.align=a.payload.align,e.settings.layout=a.payload.layout,e.settings.verticalAlign=a.payload.verticalAlign,e.settings.itemSorter=a.payload.itemSorter},addLegendPayload:{reducer(e,a){e.payload.push(a.payload)},prepare:xa()},removeLegendPayload:{reducer(e,a){var r=yn(e).payload.indexOf(a.payload);r>-1&&e.payload.splice(r,1)},prepare:xa()}}}),{setLegendSize:WX,setLegendSettings:XX,addLegendPayload:$L,removeLegendPayload:UL}=_4.actions,qL=_4.reducer;function Vg(){return Vg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vg.apply(null,arguments)}function D1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vx(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?D1(Object(r),!0).forEach(function(n){HL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HL(e,a,r){return(a=VL(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function VL(e){var a=YL(e,"string");return typeof a=="symbol"?a:a+""}function YL(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function KL(e){return Array.isArray(e)&&Hr(e[0])&&Hr(e[1])?e.join(" ~ "):e}var GL=e=>{var{separator:a=" : ",contentStyle:r={},itemStyle:n={},labelStyle:i={},payload:o,formatter:c,itemSorter:m,wrapperClassName:u,labelClassName:h,label:p,labelFormatter:x,accessibilityLayer:j=!1}=e,v=()=>{if(o&&o.length){var D={padding:0,margin:0},B=(m?Lm(o,m):o).map((L,T)=>{if(L.type==="none")return null;var R=L.formatter||c||KL,{value:z,name:$}=L,Z=z,fe=$;if(R){var se=R(z,$,L,T,o);if(Array.isArray(se))[Z,fe]=se;else if(se!=null)Z=se;else return null}var ie=Vx({display:"block",paddingTop:4,paddingBottom:4,color:L.color||"#000"},n);return b.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(T),style:ie},Hr(fe)?b.createElement("span",{className:"recharts-tooltip-item-name"},fe):null,Hr(fe)?b.createElement("span",{className:"recharts-tooltip-item-separator"},a):null,b.createElement("span",{className:"recharts-tooltip-item-value"},Z),b.createElement("span",{className:"recharts-tooltip-item-unit"},L.unit||""))});return b.createElement("ul",{className:"recharts-tooltip-item-list",style:D},B)}return null},w=Vx({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),A=Vx({margin:0},i),S=!Gt(p),g=S?p:"",C=gt("recharts-default-tooltip",u),k=gt("recharts-tooltip-label",h);S&&x&&o!==void 0&&o!==null&&(g=x(p,o));var O=j?{role:"status","aria-live":"assertive"}:{};return b.createElement("div",Vg({className:C,style:w},O),b.createElement("p",{className:k,style:A},b.isValidElement(g)?g:"".concat(g)),v())},Po="recharts-tooltip-wrapper",JL={visibility:"hidden"};function WL(e){var{coordinate:a,translateX:r,translateY:n}=e;return gt(Po,{["".concat(Po,"-right")]:De(r)&&a&&De(a.x)&&r>=a.x,["".concat(Po,"-left")]:De(r)&&a&&De(a.x)&&r<a.x,["".concat(Po,"-bottom")]:De(n)&&a&&De(a.y)&&n>=a.y,["".concat(Po,"-top")]:De(n)&&a&&De(a.y)&&n<a.y})}function T1(e){var{allowEscapeViewBox:a,coordinate:r,key:n,offsetTopLeft:i,position:o,reverseDirection:c,tooltipDimension:m,viewBox:u,viewBoxDimension:h}=e;if(o&&De(o[n]))return o[n];var p=r[n]-m-(i>0?i:0),x=r[n]+i;if(a[n])return c[n]?p:x;var j=u[n];if(j==null)return 0;if(c[n]){var v=p,w=j;return v<w?Math.max(x,j):Math.max(p,j)}if(h==null)return 0;var A=x+m,S=j+h;return A>S?Math.max(p,j):Math.max(x,j)}function XL(e){var{translateX:a,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(a,"px, ").concat(r,"px, 0)"):"translate(".concat(a,"px, ").concat(r,"px)")}}function ZL(e){var{allowEscapeViewBox:a,coordinate:r,offsetTopLeft:n,position:i,reverseDirection:o,tooltipBox:c,useTranslate3d:m,viewBox:u}=e,h,p,x;return c.height>0&&c.width>0&&r?(p=T1({allowEscapeViewBox:a,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:c.width,viewBox:u,viewBoxDimension:u.width}),x=T1({allowEscapeViewBox:a,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:c.height,viewBox:u,viewBoxDimension:u.height}),h=XL({translateX:p,translateY:x,useTranslate3d:m})):h=JL,{cssProperties:h,cssClasses:WL({translateX:p,translateY:x,coordinate:r})}}function R1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function au(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?R1(Object(r),!0).forEach(function(n){Yg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yg(e,a,r){return(a=QL(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function QL(e){var a=eB(e,"string");return typeof a=="symbol"?a:a+""}function eB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}class tB extends b.PureComponent{constructor(){super(...arguments),Yg(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Yg(this,"handleKeyDown",a=>{if(a.key==="Escape"){var r,n,i,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(i=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var a,r;this.state.dismissed&&(((a=this.props.coordinate)===null||a===void 0?void 0:a.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:a,allowEscapeViewBox:r,animationDuration:n,animationEasing:i,children:o,coordinate:c,hasPayload:m,isAnimationActive:u,offset:h,position:p,reverseDirection:x,useTranslate3d:j,viewBox:v,wrapperStyle:w,lastBoundingBox:A,innerRef:S,hasPortalFromProps:g}=this.props,{cssClasses:C,cssProperties:k}=ZL({allowEscapeViewBox:r,coordinate:c,offsetTopLeft:h,position:p,reverseDirection:x,tooltipBox:{height:A.height,width:A.width},useTranslate3d:j,viewBox:v}),O=g?{}:au(au({transition:u&&a?"transform ".concat(n,"ms ").concat(i):void 0},k),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&m?"visible":"hidden",position:"absolute",top:0,left:0}),D=au(au({},O),{},{visibility:!this.state.dismissed&&a&&m?"visible":"hidden"},w);return b.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:C,style:D,ref:S},o)}}var aB=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),ji={devToolsEnabled:!1,isSsr:aB()},M4=()=>Te(e=>e.rootProps.accessibilityLayer);function Kg(){return Kg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kg.apply(null,arguments)}function P1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?P1(Object(r),!0).forEach(function(n){rB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rB(e,a,r){return(a=nB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function nB(e){var a=sB(e,"string");return typeof a=="symbol"?a:a+""}function sB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var M1={curveBasisClosed:u8,curveBasisOpen:m8,curveBasis:d8,curveBumpX:WM,curveBumpY:XM,curveLinearClosed:f8,curveLinear:Mm,curveMonotoneX:p8,curveMonotoneY:h8,curveNatural:x8,curveStep:g8,curveStepAfter:y8,curveStepBefore:b8},ru=e=>fa(e.x)&&fa(e.y),_o=e=>e.x,Mo=e=>e.y,lB=(e,a)=>{if(typeof e=="function")return e;var r="curve".concat(gc(e));return(r==="curveMonotone"||r==="curveBump")&&a?M1["".concat(r).concat(a==="vertical"?"Y":"X")]:M1[r]||Mm},iB=e=>{var{type:a="linear",points:r=[],baseLine:n,layout:i,connectNulls:o=!1}=e,c=lB(a,i),m=o?r.filter(ru):r,u;if(Array.isArray(n)){var h=o?n.filter(x=>ru(x)):n,p=m.map((x,j)=>_1(_1({},x),{},{base:h[j]}));return i==="vertical"?u=Qd().y(Mo).x1(_o).x0(x=>x.base.x):u=Qd().x(_o).y1(Mo).y0(x=>x.base.y),u.defined(ru).curve(c),u(p)}return i==="vertical"&&De(n)?u=Qd().y(Mo).x1(_o).x0(n):De(n)?u=Qd().x(_o).y1(Mo).y0(n):u=JC().x(_o).y(Mo),u.defined(ru).curve(c),u(m)},oB=e=>{var{className:a,points:r,path:n,pathRef:i}=e;if((!r||!r.length)&&!n)return null;var o=r&&r.length?iB(e):n;return b.createElement("path",Kg({},An(e),U8(e),{className:gt("recharts-curve",a),d:o===null?void 0:o,ref:i}))},cB=["x","y","top","left","width","height","className"];function Gg(){return Gg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gg.apply(null,arguments)}function z1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dB(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?z1(Object(r),!0).forEach(function(n){uB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uB(e,a,r){return(a=mB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function mB(e){var a=fB(e,"string");return typeof a=="symbol"?a:a+""}function fB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function pB(e,a){if(e==null)return{};var r,n,i=hB(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hB(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var xB=(e,a,r,n,i,o)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(a,"h").concat(r),gB=e=>{var{x:a=0,y:r=0,top:n=0,left:i=0,width:o=0,height:c=0,className:m}=e,u=pB(e,cB),h=dB({x:a,y:r,top:n,left:i,width:o,height:c},u);return!De(a)||!De(r)||!De(o)||!De(c)||!De(n)||!De(i)?null:b.createElement("path",Gg({},hr(h),{className:gt("recharts-cross",m),d:xB(a,r,o,c,n,i)}))};function bB(e,a,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?a.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:a.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function L1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yB(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?L1(Object(r),!0).forEach(function(n){vB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vB(e,a,r){return(a=jB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function jB(e){var a=NB(e,"string");return typeof a=="symbol"?a:a+""}function NB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function vr(e,a){var r=yB({},e),n=a,i=Object.keys(a),o=i.reduce((c,m)=>(c[m]===void 0&&n[m]!==void 0&&(c[m]=n[m]),c),r);return o}function wB(){}function SB(e){return e!=null}function B1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function I1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?B1(Object(r),!0).forEach(function(n){AB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AB(e,a,r){return(a=CB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function CB(e){var a=kB(e,"string");return typeof a=="symbol"?a:a+""}function kB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var EB=e=>e.replace(/([A-Z])/g,a=>"-".concat(a.toLowerCase())),z4=(e,a,r)=>e.map(n=>"".concat(EB(n)," ").concat(a,"ms ").concat(r)).join(","),OB=(e,a)=>[Object.keys(e),Object.keys(a)].reduce((r,n)=>r.filter(i=>n.includes(i))),ec=(e,a)=>Object.keys(a).reduce((r,n)=>I1(I1({},r),{},{[n]:e(n,a[n])}),{});function F1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ia(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?F1(Object(r),!0).forEach(function(n){DB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DB(e,a,r){return(a=TB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function TB(e){var a=RB(e,"string");return typeof a=="symbol"?a:a+""}function RB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var Vu=(e,a,r)=>e+(a-e)*r,Jg=e=>{var{from:a,to:r}=e;return a!==r},L4=(e,a,r)=>{var n=ec((i,o)=>{if(Jg(o)){var[c,m]=e(o.from,o.to,o.velocity);return ia(ia({},o),{},{from:c,velocity:m})}return o},a);return r<1?ec((i,o)=>Jg(o)?ia(ia({},o),{},{velocity:Vu(o.velocity,n[i].velocity,r),from:Vu(o.from,n[i].from,r)}):o,a):L4(e,n,r-1)};function PB(e,a,r,n,i,o){var c,m=n.reduce((j,v)=>ia(ia({},j),{},{[v]:{from:e[v],velocity:0,to:a[v]}}),{}),u=()=>ec((j,v)=>v.from,m),h=()=>!Object.values(m).filter(Jg).length,p=null,x=j=>{c||(c=j);var v=j-c,w=v/r.dt;m=L4(r,m,w),i(ia(ia(ia({},e),a),u())),c=j,h()||(p=o.setTimeout(x))};return()=>(p=o.setTimeout(x),()=>{p()})}function _B(e,a,r,n,i,o,c){var m=null,u=i.reduce((x,j)=>ia(ia({},x),{},{[j]:[e[j],a[j]]}),{}),h,p=x=>{h||(h=x);var j=(x-h)/n,v=ec((A,S)=>Vu(...S,r(j)),u);if(o(ia(ia(ia({},e),a),v)),j<1)m=c.setTimeout(p);else{var w=ec((A,S)=>Vu(...S,r(1)),u);o(ia(ia(ia({},e),a),w))}};return()=>(m=c.setTimeout(p),()=>{m()})}const MB=(e,a,r,n,i,o)=>{var c=OB(e,a);return r.isStepper===!0?PB(e,a,r,c,i,o):_B(e,a,r,n,c,i,o)};var Yu=1e-4,B4=(e,a)=>[0,3*e,3*a-6*e,3*e-3*a+1],I4=(e,a)=>e.map((r,n)=>r*a**n).reduce((r,n)=>r+n),$1=(e,a)=>r=>{var n=B4(e,a);return I4(n,r)},zB=(e,a)=>r=>{var n=B4(e,a),i=[...n.map((o,c)=>o*c).slice(1),0];return I4(i,r)},U1=function(){for(var a,r,n,i,o=arguments.length,c=new Array(o),m=0;m<o;m++)c[m]=arguments[m];if(c.length===1)switch(c[0]){case"linear":[a,n,r,i]=[0,0,1,1];break;case"ease":[a,n,r,i]=[.25,.1,.25,1];break;case"ease-in":[a,n,r,i]=[.42,0,1,1];break;case"ease-out":[a,n,r,i]=[.42,0,.58,1];break;case"ease-in-out":[a,n,r,i]=[0,0,.58,1];break;default:{var u=c[0].split("(");u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4&&([a,n,r,i]=u[1].split(")")[0].split(",").map(w=>parseFloat(w)))}}else c.length===4&&([a,n,r,i]=c);var h=$1(a,r),p=$1(n,i),x=zB(a,r),j=w=>w>1?1:w<0?0:w,v=w=>{for(var A=w>1?1:w,S=A,g=0;g<8;++g){var C=h(S)-A,k=x(S);if(Math.abs(C-A)<Yu||k<Yu)return p(S);S=j(S-C/k)}return p(S)};return v.isStepper=!1,v},LB=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=a,o=(c,m,u)=>{var h=-(c-m)*r,p=u*n,x=u+(h-p)*i/1e3,j=u*i/1e3+c;return Math.abs(j-m)<Yu&&Math.abs(x)<Yu?[m,0]:[j,x]};return o.isStepper=!0,o.dt=i,o},BB=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return U1(e);case"spring":return LB();default:if(e.split("(")[0]==="cubic-bezier")return U1(e)}return typeof e=="function"?e:null};function IB(e){var a,r=()=>null,n=!1,i=null,o=c=>{if(!n){if(Array.isArray(c)){if(!c.length)return;var m=c,[u,...h]=m;if(typeof u=="number"){i=e.setTimeout(o.bind(null,h),u);return}o(u),i=e.setTimeout(o.bind(null,h));return}typeof c=="string"&&(a=c,r(a)),typeof c=="object"&&(a=c,r(a)),typeof c=="function"&&c()}};return{stop:()=>{n=!0},start:c=>{n=!1,i&&(i(),i=null),o(c)},subscribe:c=>(r=c,()=>{r=()=>null}),getTimeoutController:()=>e}}class FB{setTimeout(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=c=>{c-n>=r?a(c):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{cancelAnimationFrame(i)}}}function $B(){return IB(new FB)}var UB=b.createContext($B);function qB(e,a){var r=b.useContext(UB);return b.useMemo(()=>a??r(e),[e,a,r])}var HB={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},q1={t:0},Yx={t:1};function r0(e){var a=vr(e,HB),{isActive:r,canBegin:n,duration:i,easing:o,begin:c,onAnimationEnd:m,onAnimationStart:u,children:h}=a,p=qB(a.animationId,a.animationManager),[x,j]=b.useState(r?q1:Yx),v=b.useRef(null);return b.useEffect(()=>{r||j(Yx)},[r]),b.useEffect(()=>{if(!r||!n)return wB;var w=MB(q1,Yx,BB(o),i,j,p.getTimeoutController()),A=()=>{v.current=w()};return p.start([u,c,A,i,m]),()=>{p.stop(),v.current&&v.current(),m()}},[r,n,i,o,c,u,m,p]),h(x.t)}function n0(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=b.useRef(Qo(a)),n=b.useRef(e);return n.current!==e&&(r.current=Qo(a),n.current=e),r.current}var VB=["radius"],YB=["radius"];function H1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function V1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?H1(Object(r),!0).forEach(function(n){KB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KB(e,a,r){return(a=GB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function GB(e){var a=JB(e,"string");return typeof a=="symbol"?a:a+""}function JB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Ku(){return Ku=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ku.apply(null,arguments)}function Y1(e,a){if(e==null)return{};var r,n,i=WB(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function WB(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var K1=(e,a,r,n,i)=>{var o=Math.min(Math.abs(r)/2,Math.abs(n)/2),c=n>=0?1:-1,m=r>=0?1:-1,u=n>=0&&r>=0||n<0&&r<0?1:0,h;if(o>0&&i instanceof Array){for(var p=[0,0,0,0],x=0,j=4;x<j;x++)p[x]=i[x]>o?o:i[x];h="M".concat(e,",").concat(a+c*p[0]),p[0]>0&&(h+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(u,",").concat(e+m*p[0],",").concat(a)),h+="L ".concat(e+r-m*p[1],",").concat(a),p[1]>0&&(h+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(u,`,
`).concat(e+r,",").concat(a+c*p[1])),h+="L ".concat(e+r,",").concat(a+n-c*p[2]),p[2]>0&&(h+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(u,`,
`).concat(e+r-m*p[2],",").concat(a+n)),h+="L ".concat(e+m*p[3],",").concat(a+n),p[3]>0&&(h+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(u,`,
`).concat(e,",").concat(a+n-c*p[3])),h+="Z"}else if(o>0&&i===+i&&i>0){var v=Math.min(o,i);h="M ".concat(e,",").concat(a+c*v,`
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(e+m*v,",").concat(a,`
L `).concat(e+r-m*v,",").concat(a,`
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(e+r,",").concat(a+c*v,`
L `).concat(e+r,",").concat(a+n-c*v,`
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(e+r-m*v,",").concat(a+n,`
L `).concat(e+m*v,",").concat(a+n,`
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(e,",").concat(a+n-c*v," Z")}else h="M ".concat(e,",").concat(a," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return h},XB={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},F4=e=>{var a=vr(e,XB),r=b.useRef(null),[n,i]=b.useState(-1);b.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var K=r.current.getTotalLength();K&&i(K)}catch{}},[]);var{x:o,y:c,width:m,height:u,radius:h,className:p}=a,{animationEasing:x,animationDuration:j,animationBegin:v,isAnimationActive:w,isUpdateAnimationActive:A}=a,S=b.useRef(m),g=b.useRef(u),C=b.useRef(o),k=b.useRef(c),O=b.useMemo(()=>({x:o,y:c,width:m,height:u,radius:h}),[o,c,m,u,h]),D=n0(O,"rectangle-");if(o!==+o||c!==+c||m!==+m||u!==+u||m===0||u===0)return null;var B=gt("recharts-rectangle",p);if(!A){var L=hr(a),{radius:T}=L,R=Y1(L,VB);return b.createElement("path",Ku({},R,{radius:typeof h=="number"?h:void 0,className:B,d:K1(o,c,m,u,h)}))}var z=S.current,$=g.current,Z=C.current,fe=k.current,se="0px ".concat(n===-1?1:n,"px"),ie="".concat(n,"px 0px"),V=z4(["strokeDasharray"],j,typeof x=="string"?x:void 0);return b.createElement(r0,{animationId:D,key:D,canBegin:n>0,duration:j,easing:x,isActive:A,begin:v},K=>{var ce=ga(z,m,K),U=ga($,u,K),I=ga(Z,o,K),P=ga(fe,c,K);r.current&&(S.current=ce,g.current=U,C.current=I,k.current=P);var H;w?K>0?H={transition:V,strokeDasharray:ie}:H={strokeDasharray:se}:H={strokeDasharray:ie};var ee=hr(a),{radius:pe}=ee,ve=Y1(ee,YB);return b.createElement("path",Ku({},ve,{radius:typeof h=="number"?h:void 0,className:B,d:K1(I,P,ce,U,h),ref:r,style:V1(V1({},H),a.style)}))})};function $4(e){var{cx:a,cy:r,radius:n,startAngle:i,endAngle:o}=e,c=oa(a,r,n,i),m=oa(a,r,n,o);return{points:[c,m],cx:a,cy:r,radius:n,startAngle:i,endAngle:o}}function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wg.apply(null,arguments)}var ZB=(e,a)=>{var r=Ra(a-e),n=Math.min(Math.abs(a-e),359.999);return r*n},nu=e=>{var{cx:a,cy:r,radius:n,angle:i,sign:o,isExternal:c,cornerRadius:m,cornerIsExternal:u}=e,h=m*(c?1:-1)+n,p=Math.asin(m/h)/qu,x=u?i:i+o*p,j=oa(a,r,h,x),v=oa(a,r,n,x),w=u?i-o*p:i,A=oa(a,r,h*Math.cos(p*qu),w);return{center:j,circleTangency:v,lineTangency:A,theta:p}},U4=e=>{var{cx:a,cy:r,innerRadius:n,outerRadius:i,startAngle:o,endAngle:c}=e,m=ZB(o,c),u=o+m,h=oa(a,r,i,o),p=oa(a,r,i,u),x="M ".concat(h.x,",").concat(h.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(m)>180),",").concat(+(o>u),`,
`).concat(p.x,",").concat(p.y,`
`);if(n>0){var j=oa(a,r,n,o),v=oa(a,r,n,u);x+="L ".concat(v.x,",").concat(v.y,`
A `).concat(n,",").concat(n,`,0,
`).concat(+(Math.abs(m)>180),",").concat(+(o<=u),`,
`).concat(j.x,",").concat(j.y," Z")}else x+="L ".concat(a,",").concat(r," Z");return x},QB=e=>{var{cx:a,cy:r,innerRadius:n,outerRadius:i,cornerRadius:o,forceCornerRadius:c,cornerIsExternal:m,startAngle:u,endAngle:h}=e,p=Ra(h-u),{circleTangency:x,lineTangency:j,theta:v}=nu({cx:a,cy:r,radius:i,angle:u,sign:p,cornerRadius:o,cornerIsExternal:m}),{circleTangency:w,lineTangency:A,theta:S}=nu({cx:a,cy:r,radius:i,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:m}),g=m?Math.abs(u-h):Math.abs(u-h)-v-S;if(g<0)return c?"M ".concat(j.x,",").concat(j.y,`
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
`):U4({cx:a,cy:r,innerRadius:n,outerRadius:i,startAngle:u,endAngle:h});var C="M ".concat(j.x,",").concat(j.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(x.x,",").concat(x.y,`
A`).concat(i,",").concat(i,",0,").concat(+(g>180),",").concat(+(p<0),",").concat(w.x,",").concat(w.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(A.x,",").concat(A.y,`
`);if(n>0){var{circleTangency:k,lineTangency:O,theta:D}=nu({cx:a,cy:r,radius:n,angle:u,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:m}),{circleTangency:B,lineTangency:L,theta:T}=nu({cx:a,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:m}),R=m?Math.abs(u-h):Math.abs(u-h)-D-T;if(R<0&&o===0)return"".concat(C,"L").concat(a,",").concat(r,"Z");C+="L".concat(L.x,",").concat(L.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(B.x,",").concat(B.y,`
A`).concat(n,",").concat(n,",0,").concat(+(R>180),",").concat(+(p>0),",").concat(k.x,",").concat(k.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(O.x,",").concat(O.y,"Z")}else C+="L".concat(a,",").concat(r,"Z");return C},eI={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},q4=e=>{var a=vr(e,eI),{cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:c,forceCornerRadius:m,cornerIsExternal:u,startAngle:h,endAngle:p,className:x}=a;if(o<i||h===p)return null;var j=gt("recharts-sector",x),v=o-i,w=Er(c,v,0,!0),A;return w>0&&Math.abs(h-p)<360?A=QB({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(w,v/2),forceCornerRadius:m,cornerIsExternal:u,startAngle:h,endAngle:p}):A=U4({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:p}),b.createElement("path",Wg({},hr(a),{className:j,d:A}))};function tI(e,a,r){var n,i,o,c;if(e==="horizontal")n=a.x,o=n,i=r.top,c=r.top+r.height;else if(e==="vertical")i=a.y,c=i,n=r.left,o=r.left+r.width;else if(a.cx!=null&&a.cy!=null)if(e==="centric"){var{cx:m,cy:u,innerRadius:h,outerRadius:p,angle:x}=a,j=oa(m,u,h,x),v=oa(m,u,p,x);n=j.x,i=j.y,o=v.x,c=v.y}else return $4(a);return[{x:n,y:i},{x:o,y:c}]}var Kx={},Gx={},Jx={},G1;function aI(){return G1||(G1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=y4();function r(n){return a.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Jx)),Jx}var J1;function rI(){return J1||(J1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=aI();function r(n){return n?(n=a.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(Gx)),Gx}var W1;function nI(){return W1||(W1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=v4(),r=rI();function n(i,o,c){c&&typeof c!="number"&&a.isIterateeCall(i,o,c)&&(o=c=void 0),i=r.toFinite(i),o===void 0?(o=i,i=0):o=r.toFinite(o),c=c===void 0?i<o?1:-1:r.toFinite(c);const m=Math.max(Math.ceil((o-i)/(c||1)),0),u=new Array(m);for(let h=0;h<m;h++)u[h]=i,i+=c;return u}e.range=n})(Kx)),Kx}var Wx,X1;function sI(){return X1||(X1=1,Wx=nI().range),Wx}var lI=sI();const H4=Or(lI);function fs(e,a){return e==null||a==null?NaN:e<a?-1:e>a?1:e>=a?0:NaN}function iI(e,a){return e==null||a==null?NaN:a<e?-1:a>e?1:a>=e?0:NaN}function s0(e){let a,r,n;e.length!==2?(a=fs,r=(m,u)=>fs(e(m),u),n=(m,u)=>e(m)-u):(a=e===fs||e===iI?e:oI,r=e,n=e);function i(m,u,h=0,p=m.length){if(h<p){if(a(u,u)!==0)return p;do{const x=h+p>>>1;r(m[x],u)<0?h=x+1:p=x}while(h<p)}return h}function o(m,u,h=0,p=m.length){if(h<p){if(a(u,u)!==0)return p;do{const x=h+p>>>1;r(m[x],u)<=0?h=x+1:p=x}while(h<p)}return h}function c(m,u,h=0,p=m.length){const x=i(m,u,h,p-1);return x>h&&n(m[x-1],u)>-n(m[x],u)?x-1:x}return{left:i,center:c,right:o}}function oI(){return 0}function V4(e){return e===null?NaN:+e}function*cI(e,a){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const dI=s0(fs),yc=dI.right;s0(V4).center;class Z1 extends Map{constructor(a,r=fI){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),a!=null)for(const[n,i]of a)this.set(n,i)}get(a){return super.get(Q1(this,a))}has(a){return super.has(Q1(this,a))}set(a,r){return super.set(uI(this,a),r)}delete(a){return super.delete(mI(this,a))}}function Q1({_intern:e,_key:a},r){const n=a(r);return e.has(n)?e.get(n):r}function uI({_intern:e,_key:a},r){const n=a(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function mI({_intern:e,_key:a},r){const n=a(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function fI(e){return e!==null&&typeof e=="object"?e.valueOf():e}function pI(e=fs){if(e===fs)return Y4;if(typeof e!="function")throw new TypeError("compare is not a function");return(a,r)=>{const n=e(a,r);return n||n===0?n:(e(r,r)===0)-(e(a,a)===0)}}function Y4(e,a){return(e==null||!(e>=e))-(a==null||!(a>=a))||(e<a?-1:e>a?1:0)}const hI=Math.sqrt(50),xI=Math.sqrt(10),gI=Math.sqrt(2);function Gu(e,a,r){const n=(a-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),c=o>=hI?10:o>=xI?5:o>=gI?2:1;let m,u,h;return i<0?(h=Math.pow(10,-i)/c,m=Math.round(e*h),u=Math.round(a*h),m/h<e&&++m,u/h>a&&--u,h=-h):(h=Math.pow(10,i)*c,m=Math.round(e/h),u=Math.round(a/h),m*h<e&&++m,u*h>a&&--u),u<m&&.5<=r&&r<2?Gu(e,a,r*2):[m,u,h]}function Xg(e,a,r){if(a=+a,e=+e,r=+r,!(r>0))return[];if(e===a)return[e];const n=a<e,[i,o,c]=n?Gu(a,e,r):Gu(e,a,r);if(!(o>=i))return[];const m=o-i+1,u=new Array(m);if(n)if(c<0)for(let h=0;h<m;++h)u[h]=(o-h)/-c;else for(let h=0;h<m;++h)u[h]=(o-h)*c;else if(c<0)for(let h=0;h<m;++h)u[h]=(i+h)/-c;else for(let h=0;h<m;++h)u[h]=(i+h)*c;return u}function Zg(e,a,r){return a=+a,e=+e,r=+r,Gu(e,a,r)[2]}function Qg(e,a,r){a=+a,e=+e,r=+r;const n=a<e,i=n?Zg(a,e,r):Zg(e,a,r);return(n?-1:1)*(i<0?1/-i:i)}function eS(e,a){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function tS(e,a){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function K4(e,a,r=0,n=1/0,i){if(a=Math.floor(a),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=a&&a<=n))return e;for(i=i===void 0?Y4:pI(i);n>r;){if(n-r>600){const u=n-r+1,h=a-r+1,p=Math.log(u),x=.5*Math.exp(2*p/3),j=.5*Math.sqrt(p*x*(u-x)/u)*(h-u/2<0?-1:1),v=Math.max(r,Math.floor(a-h*x/u+j)),w=Math.min(n,Math.floor(a+(u-h)*x/u+j));K4(e,a,v,w,i)}const o=e[a];let c=r,m=n;for(zo(e,r,a),i(e[n],o)>0&&zo(e,r,n);c<m;){for(zo(e,c,m),++c,--m;i(e[c],o)<0;)++c;for(;i(e[m],o)>0;)--m}i(e[r],o)===0?zo(e,r,m):(++m,zo(e,m,n)),m<=a&&(r=m+1),a<=m&&(n=m-1)}return e}function zo(e,a,r){const n=e[a];e[a]=e[r],e[r]=n}function bI(e,a,r){if(e=Float64Array.from(cI(e)),!(!(n=e.length)||isNaN(a=+a))){if(a<=0||n<2)return tS(e);if(a>=1)return eS(e);var n,i=(n-1)*a,o=Math.floor(i),c=eS(K4(e,o).subarray(0,o+1)),m=tS(e.subarray(o+1));return c+(m-c)*(i-o)}}function yI(e,a,r=V4){if(!(!(n=e.length)||isNaN(a=+a))){if(a<=0||n<2)return+r(e[0],0,e);if(a>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*a,o=Math.floor(i),c=+r(e[o],o,e),m=+r(e[o+1],o+1,e);return c+(m-c)*(i-o)}}function vI(e,a,r){e=+e,a=+a,r=(i=arguments.length)<2?(a=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((a-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}function jr(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}function Mn(e,a){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof a=="function"?this.interpolator(a):this.range(a);break}}return this}const eb=Symbol("implicit");function l0(){var e=new Z1,a=[],r=[],n=eb;function i(o){let c=e.get(o);if(c===void 0){if(n!==eb)return n;e.set(o,c=a.push(o)-1)}return r[c%r.length]}return i.domain=function(o){if(!arguments.length)return a.slice();a=[],e=new Z1;for(const c of o)e.has(c)||e.set(c,a.push(c)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return l0(a,r).unknown(n)},jr.apply(i,arguments),i}function i0(){var e=l0().unknown(void 0),a=e.domain,r=e.range,n=0,i=1,o,c,m=!1,u=0,h=0,p=.5;delete e.unknown;function x(){var j=a().length,v=i<n,w=v?i:n,A=v?n:i;o=(A-w)/Math.max(1,j-u+h*2),m&&(o=Math.floor(o)),w+=(A-w-o*(j-u))*p,c=o*(1-u),m&&(w=Math.round(w),c=Math.round(c));var S=vI(j).map(function(g){return w+o*g});return r(v?S.reverse():S)}return e.domain=function(j){return arguments.length?(a(j),x()):a()},e.range=function(j){return arguments.length?([n,i]=j,n=+n,i=+i,x()):[n,i]},e.rangeRound=function(j){return[n,i]=j,n=+n,i=+i,m=!0,x()},e.bandwidth=function(){return c},e.step=function(){return o},e.round=function(j){return arguments.length?(m=!!j,x()):m},e.padding=function(j){return arguments.length?(u=Math.min(1,h=+j),x()):u},e.paddingInner=function(j){return arguments.length?(u=Math.min(1,j),x()):u},e.paddingOuter=function(j){return arguments.length?(h=+j,x()):h},e.align=function(j){return arguments.length?(p=Math.max(0,Math.min(1,j)),x()):p},e.copy=function(){return i0(a(),[n,i]).round(m).paddingInner(u).paddingOuter(h).align(p)},jr.apply(x(),arguments)}function G4(e){var a=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return G4(a())},e}function jI(){return G4(i0.apply(null,arguments).paddingInner(1))}function o0(e,a,r){e.prototype=a.prototype=r,r.constructor=e}function J4(e,a){var r=Object.create(e.prototype);for(var n in a)r[n]=a[n];return r}function vc(){}var tc=.7,Ju=1/tc,ai="\\s*([+-]?\\d+)\\s*",ac="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NI=/^#([0-9a-f]{3,8})$/,wI=new RegExp(`^rgb\\(${ai},${ai},${ai}\\)$`),SI=new RegExp(`^rgb\\(${qr},${qr},${qr}\\)$`),AI=new RegExp(`^rgba\\(${ai},${ai},${ai},${ac}\\)$`),CI=new RegExp(`^rgba\\(${qr},${qr},${qr},${ac}\\)$`),kI=new RegExp(`^hsl\\(${ac},${qr},${qr}\\)$`),EI=new RegExp(`^hsla\\(${ac},${qr},${qr},${ac}\\)$`),aS={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};o0(vc,rc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rS,formatHex:rS,formatHex8:OI,formatHsl:DI,formatRgb:nS,toString:nS});function rS(){return this.rgb().formatHex()}function OI(){return this.rgb().formatHex8()}function DI(){return W4(this).formatHsl()}function nS(){return this.rgb().formatRgb()}function rc(e){var a,r;return e=(e+"").trim().toLowerCase(),(a=NI.exec(e))?(r=a[1].length,a=parseInt(a[1],16),r===6?sS(a):r===3?new Pa(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):r===8?su(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):r===4?su(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=wI.exec(e))?new Pa(a[1],a[2],a[3],1):(a=SI.exec(e))?new Pa(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=AI.exec(e))?su(a[1],a[2],a[3],a[4]):(a=CI.exec(e))?su(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=kI.exec(e))?oS(a[1],a[2]/100,a[3]/100,1):(a=EI.exec(e))?oS(a[1],a[2]/100,a[3]/100,a[4]):aS.hasOwnProperty(e)?sS(aS[e]):e==="transparent"?new Pa(NaN,NaN,NaN,0):null}function sS(e){return new Pa(e>>16&255,e>>8&255,e&255,1)}function su(e,a,r,n){return n<=0&&(e=a=r=NaN),new Pa(e,a,r,n)}function TI(e){return e instanceof vc||(e=rc(e)),e?(e=e.rgb(),new Pa(e.r,e.g,e.b,e.opacity)):new Pa}function tb(e,a,r,n){return arguments.length===1?TI(e):new Pa(e,a,r,n??1)}function Pa(e,a,r,n){this.r=+e,this.g=+a,this.b=+r,this.opacity=+n}o0(Pa,tb,J4(vc,{brighter(e){return e=e==null?Ju:Math.pow(Ju,e),new Pa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?tc:Math.pow(tc,e),new Pa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pa(tl(this.r),tl(this.g),tl(this.b),Wu(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:lS,formatHex:lS,formatHex8:RI,formatRgb:iS,toString:iS}));function lS(){return`#${Gs(this.r)}${Gs(this.g)}${Gs(this.b)}`}function RI(){return`#${Gs(this.r)}${Gs(this.g)}${Gs(this.b)}${Gs((isNaN(this.opacity)?1:this.opacity)*255)}`}function iS(){const e=Wu(this.opacity);return`${e===1?"rgb(":"rgba("}${tl(this.r)}, ${tl(this.g)}, ${tl(this.b)}${e===1?")":`, ${e})`}`}function Wu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gs(e){return e=tl(e),(e<16?"0":"")+e.toString(16)}function oS(e,a,r,n){return n<=0?e=a=r=NaN:r<=0||r>=1?e=a=NaN:a<=0&&(e=NaN),new Cr(e,a,r,n)}function W4(e){if(e instanceof Cr)return new Cr(e.h,e.s,e.l,e.opacity);if(e instanceof vc||(e=rc(e)),!e)return new Cr;if(e instanceof Cr)return e;e=e.rgb();var a=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(a,r,n),o=Math.max(a,r,n),c=NaN,m=o-i,u=(o+i)/2;return m?(a===o?c=(r-n)/m+(r<n)*6:r===o?c=(n-a)/m+2:c=(a-r)/m+4,m/=u<.5?o+i:2-o-i,c*=60):m=u>0&&u<1?0:c,new Cr(c,m,u,e.opacity)}function PI(e,a,r,n){return arguments.length===1?W4(e):new Cr(e,a,r,n??1)}function Cr(e,a,r,n){this.h=+e,this.s=+a,this.l=+r,this.opacity=+n}o0(Cr,PI,J4(vc,{brighter(e){return e=e==null?Ju:Math.pow(Ju,e),new Cr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?tc:Math.pow(tc,e),new Cr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,a=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*a,i=2*r-n;return new Pa(Xx(e>=240?e-240:e+120,i,n),Xx(e,i,n),Xx(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Cr(cS(this.h),lu(this.s),lu(this.l),Wu(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=Wu(this.opacity);return`${e===1?"hsl(":"hsla("}${cS(this.h)}, ${lu(this.s)*100}%, ${lu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function cS(e){return e=(e||0)%360,e<0?e+360:e}function lu(e){return Math.max(0,Math.min(1,e||0))}function Xx(e,a,r){return(e<60?a+(r-a)*e/60:e<180?r:e<240?a+(r-a)*(240-e)/60:a)*255}const c0=e=>()=>e;function _I(e,a){return function(r){return e+r*a}}function MI(e,a,r){return e=Math.pow(e,r),a=Math.pow(a,r)-e,r=1/r,function(n){return Math.pow(e+n*a,r)}}function zI(e){return(e=+e)==1?X4:function(a,r){return r-a?MI(a,r,e):c0(isNaN(a)?r:a)}}function X4(e,a){var r=a-e;return r?_I(e,r):c0(isNaN(e)?a:e)}const dS=(function e(a){var r=zI(a);function n(i,o){var c=r((i=tb(i)).r,(o=tb(o)).r),m=r(i.g,o.g),u=r(i.b,o.b),h=X4(i.opacity,o.opacity);return function(p){return i.r=c(p),i.g=m(p),i.b=u(p),i.opacity=h(p),i+""}}return n.gamma=e,n})(1);function LI(e,a){a||(a=[]);var r=e?Math.min(a.length,e.length):0,n=a.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+a[i]*o;return n}}function BI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function II(e,a){var r=a?a.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),c;for(c=0;c<n;++c)i[c]=Ni(e[c],a[c]);for(;c<r;++c)o[c]=a[c];return function(m){for(c=0;c<n;++c)o[c]=i[c](m);return o}}function FI(e,a){var r=new Date;return e=+e,a=+a,function(n){return r.setTime(e*(1-n)+a*n),r}}function Xu(e,a){return e=+e,a=+a,function(r){return e*(1-r)+a*r}}function $I(e,a){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(a===null||typeof a!="object")&&(a={});for(i in a)i in e?r[i]=Ni(e[i],a[i]):n[i]=a[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var ab=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Zx=new RegExp(ab.source,"g");function UI(e){return function(){return e}}function qI(e){return function(a){return e(a)+""}}function HI(e,a){var r=ab.lastIndex=Zx.lastIndex=0,n,i,o,c=-1,m=[],u=[];for(e=e+"",a=a+"";(n=ab.exec(e))&&(i=Zx.exec(a));)(o=i.index)>r&&(o=a.slice(r,o),m[c]?m[c]+=o:m[++c]=o),(n=n[0])===(i=i[0])?m[c]?m[c]+=i:m[++c]=i:(m[++c]=null,u.push({i:c,x:Xu(n,i)})),r=Zx.lastIndex;return r<a.length&&(o=a.slice(r),m[c]?m[c]+=o:m[++c]=o),m.length<2?u[0]?qI(u[0].x):UI(a):(a=u.length,function(h){for(var p=0,x;p<a;++p)m[(x=u[p]).i]=x.x(h);return m.join("")})}function Ni(e,a){var r=typeof a,n;return a==null||r==="boolean"?c0(a):(r==="number"?Xu:r==="string"?(n=rc(a))?(a=n,dS):HI:a instanceof rc?dS:a instanceof Date?FI:BI(a)?LI:Array.isArray(a)?II:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?$I:Xu)(e,a)}function d0(e,a){return e=+e,a=+a,function(r){return Math.round(e*(1-r)+a*r)}}function VI(e,a){a===void 0&&(a=e,e=Ni);for(var r=0,n=a.length-1,i=a[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=a[++r]);return function(c){var m=Math.max(0,Math.min(n-1,Math.floor(c*=n)));return o[m](c-m)}}function YI(e){return function(){return e}}function Zu(e){return+e}var uS=[0,1];function va(e){return e}function rb(e,a){return(a-=e=+e)?function(r){return(r-e)/a}:YI(isNaN(a)?NaN:.5)}function KI(e,a){var r;return e>a&&(r=e,e=a,a=r),function(n){return Math.max(e,Math.min(a,n))}}function GI(e,a,r){var n=e[0],i=e[1],o=a[0],c=a[1];return i<n?(n=rb(i,n),o=r(c,o)):(n=rb(n,i),o=r(o,c)),function(m){return o(n(m))}}function JI(e,a,r){var n=Math.min(e.length,a.length)-1,i=new Array(n),o=new Array(n),c=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),a=a.slice().reverse());++c<n;)i[c]=rb(e[c],e[c+1]),o[c]=r(a[c],a[c+1]);return function(m){var u=yc(e,m,1,n)-1;return o[u](i[u](m))}}function jc(e,a){return a.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Hm(){var e=uS,a=uS,r=Ni,n,i,o,c=va,m,u,h;function p(){var j=Math.min(e.length,a.length);return c!==va&&(c=KI(e[0],e[j-1])),m=j>2?JI:GI,u=h=null,x}function x(j){return j==null||isNaN(j=+j)?o:(u||(u=m(e.map(n),a,r)))(n(c(j)))}return x.invert=function(j){return c(i((h||(h=m(a,e.map(n),Xu)))(j)))},x.domain=function(j){return arguments.length?(e=Array.from(j,Zu),p()):e.slice()},x.range=function(j){return arguments.length?(a=Array.from(j),p()):a.slice()},x.rangeRound=function(j){return a=Array.from(j),r=d0,p()},x.clamp=function(j){return arguments.length?(c=j?!0:va,p()):c!==va},x.interpolate=function(j){return arguments.length?(r=j,p()):r},x.unknown=function(j){return arguments.length?(o=j,x):o},function(j,v){return n=j,i=v,p()}}function u0(){return Hm()(va,va)}function WI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Qu(e,a){if((r=(e=a?e.toExponential(a-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function ii(e){return e=Qu(Math.abs(e)),e?e[1]:NaN}function XI(e,a){return function(r,n){for(var i=r.length,o=[],c=0,m=e[0],u=0;i>0&&m>0&&(u+m+1>n&&(m=Math.max(1,n-u)),o.push(r.substring(i-=m,i+m)),!((u+=m+1)>n));)m=e[c=(c+1)%e.length];return o.reverse().join(a)}}function ZI(e){return function(a){return a.replace(/[0-9]/g,function(r){return e[+r]})}}var QI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nc(e){if(!(a=QI.exec(e)))throw new Error("invalid format: "+e);var a;return new m0({fill:a[1],align:a[2],sign:a[3],symbol:a[4],zero:a[5],width:a[6],comma:a[7],precision:a[8]&&a[8].slice(1),trim:a[9],type:a[10]})}nc.prototype=m0.prototype;function m0(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+""}m0.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 e9(e){e:for(var a=e.length,r=1,n=-1,i;r<a;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Z4;function t9(e,a){var r=Qu(e,a);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Z4=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,c=n.length;return o===c?n:o>c?n+new Array(o-c+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Qu(e,Math.max(0,a+o-1))[0]}function mS(e,a){var r=Qu(e,a);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const fS={"%":(e,a)=>(e*100).toFixed(a),b:e=>Math.round(e).toString(2),c:e=>e+"",d:WI,e:(e,a)=>e.toExponential(a),f:(e,a)=>e.toFixed(a),g:(e,a)=>e.toPrecision(a),o:e=>Math.round(e).toString(8),p:(e,a)=>mS(e*100,a),r:mS,s:t9,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function pS(e){return e}var hS=Array.prototype.map,xS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function a9(e){var a=e.grouping===void 0||e.thousands===void 0?pS:XI(hS.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?pS:ZI(hS.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",m=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function h(x){x=nc(x);var j=x.fill,v=x.align,w=x.sign,A=x.symbol,S=x.zero,g=x.width,C=x.comma,k=x.precision,O=x.trim,D=x.type;D==="n"?(C=!0,D="g"):fS[D]||(k===void 0&&(k=12),O=!0,D="g"),(S||j==="0"&&v==="=")&&(S=!0,j="0",v="=");var B=A==="$"?r:A==="#"&&/[boxX]/.test(D)?"0"+D.toLowerCase():"",L=A==="$"?n:/[%p]/.test(D)?c:"",T=fS[D],R=/[defgprs%]/.test(D);k=k===void 0?6:/[gprs]/.test(D)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function z($){var Z=B,fe=L,se,ie,V;if(D==="c")fe=T($)+fe,$="";else{$=+$;var K=$<0||1/$<0;if($=isNaN($)?u:T(Math.abs($),k),O&&($=e9($)),K&&+$==0&&w!=="+"&&(K=!1),Z=(K?w==="("?w:m:w==="-"||w==="("?"":w)+Z,fe=(D==="s"?xS[8+Z4/3]:"")+fe+(K&&w==="("?")":""),R){for(se=-1,ie=$.length;++se<ie;)if(V=$.charCodeAt(se),48>V||V>57){fe=(V===46?i+$.slice(se+1):$.slice(se))+fe,$=$.slice(0,se);break}}}C&&!S&&($=a($,1/0));var ce=Z.length+$.length+fe.length,U=ce<g?new Array(g-ce+1).join(j):"";switch(C&&S&&($=a(U+$,U.length?g-fe.length:1/0),U=""),v){case"<":$=Z+$+fe+U;break;case"=":$=Z+U+$+fe;break;case"^":$=U.slice(0,ce=U.length>>1)+Z+$+fe+U.slice(ce);break;default:$=U+Z+$+fe;break}return o($)}return z.toString=function(){return x+""},z}function p(x,j){var v=h((x=nc(x),x.type="f",x)),w=Math.max(-8,Math.min(8,Math.floor(ii(j)/3)))*3,A=Math.pow(10,-w),S=xS[8+w/3];return function(g){return v(A*g)+S}}return{format:h,formatPrefix:p}}var iu,f0,Q4;r9({thousands:",",grouping:[3],currency:["$",""]});function r9(e){return iu=a9(e),f0=iu.format,Q4=iu.formatPrefix,iu}function n9(e){return Math.max(0,-ii(Math.abs(e)))}function s9(e,a){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ii(a)/3)))*3-ii(Math.abs(e)))}function l9(e,a){return e=Math.abs(e),a=Math.abs(a)-e,Math.max(0,ii(a)-ii(e))+1}function ek(e,a,r,n){var i=Qg(e,a,r),o;switch(n=nc(n??",f"),n.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(a));return n.precision==null&&!isNaN(o=s9(i,c))&&(n.precision=o),Q4(n,c)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=l9(i,Math.max(Math.abs(e),Math.abs(a))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=n9(i))&&(n.precision=o-(n.type==="%")*2);break}}return f0(n)}function js(e){var a=e.domain;return e.ticks=function(r){var n=a();return Xg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=a();return ek(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=a(),i=0,o=n.length-1,c=n[i],m=n[o],u,h,p=10;for(m<c&&(h=c,c=m,m=h,h=i,i=o,o=h);p-- >0;){if(h=Zg(c,m,r),h===u)return n[i]=c,n[o]=m,a(n);if(h>0)c=Math.floor(c/h)*h,m=Math.ceil(m/h)*h;else if(h<0)c=Math.ceil(c*h)/h,m=Math.floor(m*h)/h;else break;u=h}return e},e}function tk(){var e=u0();return e.copy=function(){return jc(e,tk())},jr.apply(e,arguments),js(e)}function ak(e){var a;function r(n){return n==null||isNaN(n=+n)?a:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Zu),r):e.slice()},r.unknown=function(n){return arguments.length?(a=n,r):a},r.copy=function(){return ak(e).unknown(a)},e=arguments.length?Array.from(e,Zu):[0,1],js(r)}function rk(e,a){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],c;return o<i&&(c=r,r=n,n=c,c=i,i=o,o=c),e[r]=a.floor(i),e[n]=a.ceil(o),e}function gS(e){return Math.log(e)}function bS(e){return Math.exp(e)}function i9(e){return-Math.log(-e)}function o9(e){return-Math.exp(-e)}function c9(e){return isFinite(e)?+("1e"+e):e<0?0:e}function d9(e){return e===10?c9:e===Math.E?Math.exp:a=>Math.pow(e,a)}function u9(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),a=>Math.log(a)/e)}function yS(e){return(a,r)=>-e(-a,r)}function p0(e){const a=e(gS,bS),r=a.domain;let n=10,i,o;function c(){return i=u9(n),o=d9(n),r()[0]<0?(i=yS(i),o=yS(o),e(i9,o9)):e(gS,bS),a}return a.base=function(m){return arguments.length?(n=+m,c()):n},a.domain=function(m){return arguments.length?(r(m),c()):r()},a.ticks=m=>{const u=r();let h=u[0],p=u[u.length-1];const x=p<h;x&&([h,p]=[p,h]);let j=i(h),v=i(p),w,A;const S=m==null?10:+m;let g=[];if(!(n%1)&&v-j<S){if(j=Math.floor(j),v=Math.ceil(v),h>0){for(;j<=v;++j)for(w=1;w<n;++w)if(A=j<0?w/o(-j):w*o(j),!(A<h)){if(A>p)break;g.push(A)}}else for(;j<=v;++j)for(w=n-1;w>=1;--w)if(A=j>0?w/o(-j):w*o(j),!(A<h)){if(A>p)break;g.push(A)}g.length*2<S&&(g=Xg(h,p,S))}else g=Xg(j,v,Math.min(v-j,S)).map(o);return x?g.reverse():g},a.tickFormat=(m,u)=>{if(m==null&&(m=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=nc(u)).precision==null&&(u.trim=!0),u=f0(u)),m===1/0)return u;const h=Math.max(1,n*m/a.ticks().length);return p=>{let x=p/o(Math.round(i(p)));return x*n<n-.5&&(x*=n),x<=h?u(p):""}},a.nice=()=>r(rk(r(),{floor:m=>o(Math.floor(i(m))),ceil:m=>o(Math.ceil(i(m)))})),a}function nk(){const e=p0(Hm()).domain([1,10]);return e.copy=()=>jc(e,nk()).base(e.base()),jr.apply(e,arguments),e}function vS(e){return function(a){return Math.sign(a)*Math.log1p(Math.abs(a/e))}}function jS(e){return function(a){return Math.sign(a)*Math.expm1(Math.abs(a))*e}}function h0(e){var a=1,r=e(vS(a),jS(a));return r.constant=function(n){return arguments.length?e(vS(a=+n),jS(a)):a},js(r)}function sk(){var e=h0(Hm());return e.copy=function(){return jc(e,sk()).constant(e.constant())},jr.apply(e,arguments)}function NS(e){return function(a){return a<0?-Math.pow(-a,e):Math.pow(a,e)}}function m9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function f9(e){return e<0?-e*e:e*e}function x0(e){var a=e(va,va),r=1;function n(){return r===1?e(va,va):r===.5?e(m9,f9):e(NS(r),NS(1/r))}return a.exponent=function(i){return arguments.length?(r=+i,n()):r},js(a)}function g0(){var e=x0(Hm());return e.copy=function(){return jc(e,g0()).exponent(e.exponent())},jr.apply(e,arguments),e}function p9(){return g0.apply(null,arguments).exponent(.5)}function wS(e){return Math.sign(e)*e*e}function h9(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function lk(){var e=u0(),a=[0,1],r=!1,n;function i(o){var c=h9(e(o));return isNaN(c)?n:r?Math.round(c):c}return i.invert=function(o){return e.invert(wS(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((a=Array.from(o,Zu)).map(wS)),i):a.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return lk(e.domain(),a).round(r).clamp(e.clamp()).unknown(n)},jr.apply(i,arguments),js(i)}function ik(){var e=[],a=[],r=[],n;function i(){var c=0,m=Math.max(1,a.length);for(r=new Array(m-1);++c<m;)r[c-1]=yI(e,c/m);return o}function o(c){return c==null||isNaN(c=+c)?n:a[yc(r,c)]}return o.invertExtent=function(c){var m=a.indexOf(c);return m<0?[NaN,NaN]:[m>0?r[m-1]:e[0],m<r.length?r[m]:e[e.length-1]]},o.domain=function(c){if(!arguments.length)return e.slice();e=[];for(let m of c)m!=null&&!isNaN(m=+m)&&e.push(m);return e.sort(fs),i()},o.range=function(c){return arguments.length?(a=Array.from(c),i()):a.slice()},o.unknown=function(c){return arguments.length?(n=c,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return ik().domain(e).range(a).unknown(n)},jr.apply(o,arguments)}function ok(){var e=0,a=1,r=1,n=[.5],i=[0,1],o;function c(u){return u!=null&&u<=u?i[yc(n,u,0,r)]:o}function m(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*a-(u-r)*e)/(r+1);return c}return c.domain=function(u){return arguments.length?([e,a]=u,e=+e,a=+a,m()):[e,a]},c.range=function(u){return arguments.length?(r=(i=Array.from(u)).length-1,m()):i.slice()},c.invertExtent=function(u){var h=i.indexOf(u);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],a]:[n[h-1],n[h]]},c.unknown=function(u){return arguments.length&&(o=u),c},c.thresholds=function(){return n.slice()},c.copy=function(){return ok().domain([e,a]).range(i).unknown(o)},jr.apply(js(c),arguments)}function ck(){var e=[.5],a=[0,1],r,n=1;function i(o){return o!=null&&o<=o?a[yc(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,a.length-1),i):e.slice()},i.range=function(o){return arguments.length?(a=Array.from(o),n=Math.min(e.length,a.length-1),i):a.slice()},i.invertExtent=function(o){var c=a.indexOf(o);return[e[c-1],e[c]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return ck().domain(e).range(a).unknown(r)},jr.apply(i,arguments)}const Qx=new Date,eg=new Date;function Lt(e,a,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),a(o,1),e(o),o),i.round=o=>{const c=i(o),m=i.ceil(o);return o-c<m-o?c:m},i.offset=(o,c)=>(a(o=new Date(+o),c==null?1:Math.floor(c)),o),i.range=(o,c,m)=>{const u=[];if(o=i.ceil(o),m=m==null?1:Math.floor(m),!(o<c)||!(m>0))return u;let h;do u.push(h=new Date(+o)),a(o,m),e(o);while(h<o&&o<c);return u},i.filter=o=>Lt(c=>{if(c>=c)for(;e(c),!o(c);)c.setTime(c-1)},(c,m)=>{if(c>=c)if(m<0)for(;++m<=0;)for(;a(c,-1),!o(c););else for(;--m>=0;)for(;a(c,1),!o(c););}),r&&(i.count=(o,c)=>(Qx.setTime(+o),eg.setTime(+c),e(Qx),e(eg),Math.floor(r(Qx,eg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?c=>n(c)%o===0:c=>i.count(0,c)%o===0):i)),i}const em=Lt(()=>{},(e,a)=>{e.setTime(+e+a)},(e,a)=>a-e);em.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(a=>{a.setTime(Math.floor(a/e)*e)},(a,r)=>{a.setTime(+a+r*e)},(a,r)=>(r-a)/e):em);em.range;const gn=1e3,fr=gn*60,bn=fr*60,kn=bn*24,b0=kn*7,SS=kn*30,tg=kn*365,Js=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,a)=>{e.setTime(+e+a*gn)},(e,a)=>(a-e)/gn,e=>e.getUTCSeconds());Js.range;const y0=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gn)},(e,a)=>{e.setTime(+e+a*fr)},(e,a)=>(a-e)/fr,e=>e.getMinutes());y0.range;const v0=Lt(e=>{e.setUTCSeconds(0,0)},(e,a)=>{e.setTime(+e+a*fr)},(e,a)=>(a-e)/fr,e=>e.getUTCMinutes());v0.range;const j0=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gn-e.getMinutes()*fr)},(e,a)=>{e.setTime(+e+a*bn)},(e,a)=>(a-e)/bn,e=>e.getHours());j0.range;const N0=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,a)=>{e.setTime(+e+a*bn)},(e,a)=>(a-e)/bn,e=>e.getUTCHours());N0.range;const Nc=Lt(e=>e.setHours(0,0,0,0),(e,a)=>e.setDate(e.getDate()+a),(e,a)=>(a-e-(a.getTimezoneOffset()-e.getTimezoneOffset())*fr)/kn,e=>e.getDate()-1);Nc.range;const Vm=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,a)=>{e.setUTCDate(e.getUTCDate()+a)},(e,a)=>(a-e)/kn,e=>e.getUTCDate()-1);Vm.range;const dk=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,a)=>{e.setUTCDate(e.getUTCDate()+a)},(e,a)=>(a-e)/kn,e=>Math.floor(e/kn));dk.range;function ul(e){return Lt(a=>{a.setDate(a.getDate()-(a.getDay()+7-e)%7),a.setHours(0,0,0,0)},(a,r)=>{a.setDate(a.getDate()+r*7)},(a,r)=>(r-a-(r.getTimezoneOffset()-a.getTimezoneOffset())*fr)/b0)}const Ym=ul(0),tm=ul(1),x9=ul(2),g9=ul(3),oi=ul(4),b9=ul(5),y9=ul(6);Ym.range;tm.range;x9.range;g9.range;oi.range;b9.range;y9.range;function ml(e){return Lt(a=>{a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+7-e)%7),a.setUTCHours(0,0,0,0)},(a,r)=>{a.setUTCDate(a.getUTCDate()+r*7)},(a,r)=>(r-a)/b0)}const Km=ml(0),am=ml(1),v9=ml(2),j9=ml(3),ci=ml(4),N9=ml(5),w9=ml(6);Km.range;am.range;v9.range;j9.range;ci.range;N9.range;w9.range;const w0=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,a)=>{e.setMonth(e.getMonth()+a)},(e,a)=>a.getMonth()-e.getMonth()+(a.getFullYear()-e.getFullYear())*12,e=>e.getMonth());w0.range;const S0=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,a)=>{e.setUTCMonth(e.getUTCMonth()+a)},(e,a)=>a.getUTCMonth()-e.getUTCMonth()+(a.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());S0.range;const En=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,a)=>{e.setFullYear(e.getFullYear()+a)},(e,a)=>a.getFullYear()-e.getFullYear(),e=>e.getFullYear());En.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(a=>{a.setFullYear(Math.floor(a.getFullYear()/e)*e),a.setMonth(0,1),a.setHours(0,0,0,0)},(a,r)=>{a.setFullYear(a.getFullYear()+r*e)});En.range;const On=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,a)=>{e.setUTCFullYear(e.getUTCFullYear()+a)},(e,a)=>a.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());On.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(a=>{a.setUTCFullYear(Math.floor(a.getUTCFullYear()/e)*e),a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},(a,r)=>{a.setUTCFullYear(a.getUTCFullYear()+r*e)});On.range;function uk(e,a,r,n,i,o){const c=[[Js,1,gn],[Js,5,5*gn],[Js,15,15*gn],[Js,30,30*gn],[o,1,fr],[o,5,5*fr],[o,15,15*fr],[o,30,30*fr],[i,1,bn],[i,3,3*bn],[i,6,6*bn],[i,12,12*bn],[n,1,kn],[n,2,2*kn],[r,1,b0],[a,1,SS],[a,3,3*SS],[e,1,tg]];function m(h,p,x){const j=p<h;j&&([h,p]=[p,h]);const v=x&&typeof x.range=="function"?x:u(h,p,x),w=v?v.range(h,+p+1):[];return j?w.reverse():w}function u(h,p,x){const j=Math.abs(p-h)/x,v=s0(([,,S])=>S).right(c,j);if(v===c.length)return e.every(Qg(h/tg,p/tg,x));if(v===0)return em.every(Math.max(Qg(h,p,x),1));const[w,A]=c[j/c[v-1][2]<c[v][2]/j?v-1:v];return w.every(A)}return[m,u]}const[S9,A9]=uk(On,S0,Km,dk,N0,v0),[C9,k9]=uk(En,w0,Ym,Nc,j0,y0);function ag(e){if(0<=e.y&&e.y<100){var a=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return a.setFullYear(e.y),a}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function rg(e){if(0<=e.y&&e.y<100){var a=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return a.setUTCFullYear(e.y),a}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Lo(e,a,r){return{y:e,m:a,d:r,H:0,M:0,S:0,L:0}}function E9(e){var a=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,c=e.shortDays,m=e.months,u=e.shortMonths,h=Bo(i),p=Io(i),x=Bo(o),j=Io(o),v=Bo(c),w=Io(c),A=Bo(m),S=Io(m),g=Bo(u),C=Io(u),k={a:K,A:ce,b:U,B:I,c:null,d:DS,e:DS,f:X9,g:iF,G:cF,H:G9,I:J9,j:W9,L:mk,m:Z9,M:Q9,p:P,q:H,Q:PS,s:_S,S:eF,u:tF,U:aF,V:rF,w:nF,W:sF,x:null,X:null,y:lF,Y:oF,Z:dF,"%":RS},O={a:ee,A:pe,b:ve,B:ue,c:null,d:TS,e:TS,f:pF,g:SF,G:CF,H:uF,I:mF,j:fF,L:pk,m:hF,M:xF,p:he,q:te,Q:PS,s:_S,S:gF,u:bF,U:yF,V:vF,w:jF,W:NF,x:null,X:null,y:wF,Y:AF,Z:kF,"%":RS},D={a:z,A:$,b:Z,B:fe,c:se,d:ES,e:ES,f:H9,g:kS,G:CS,H:OS,I:OS,j:F9,L:q9,m:I9,M:$9,p:R,q:B9,Q:Y9,s:K9,S:U9,u:P9,U:_9,V:M9,w:R9,W:z9,x:ie,X:V,y:kS,Y:CS,Z:L9,"%":V9};k.x=B(r,k),k.X=B(n,k),k.c=B(a,k),O.x=B(r,O),O.X=B(n,O),O.c=B(a,O);function B(G,xe){return function(Ne){var ne=[],_e=-1,je=0,Ee=G.length,Ce,Ke,dt;for(Ne instanceof Date||(Ne=new Date(+Ne));++_e<Ee;)G.charCodeAt(_e)===37&&(ne.push(G.slice(je,_e)),(Ke=AS[Ce=G.charAt(++_e)])!=null?Ce=G.charAt(++_e):Ke=Ce==="e"?" ":"0",(dt=xe[Ce])&&(Ce=dt(Ne,Ke)),ne.push(Ce),je=_e+1);return ne.push(G.slice(je,_e)),ne.join("")}}function L(G,xe){return function(Ne){var ne=Lo(1900,void 0,1),_e=T(ne,G,Ne+="",0),je,Ee;if(_e!=Ne.length)return null;if("Q"in ne)return new Date(ne.Q);if("s"in ne)return new Date(ne.s*1e3+("L"in ne?ne.L:0));if(xe&&!("Z"in ne)&&(ne.Z=0),"p"in ne&&(ne.H=ne.H%12+ne.p*12),ne.m===void 0&&(ne.m="q"in ne?ne.q:0),"V"in ne){if(ne.V<1||ne.V>53)return null;"w"in ne||(ne.w=1),"Z"in ne?(je=rg(Lo(ne.y,0,1)),Ee=je.getUTCDay(),je=Ee>4||Ee===0?am.ceil(je):am(je),je=Vm.offset(je,(ne.V-1)*7),ne.y=je.getUTCFullYear(),ne.m=je.getUTCMonth(),ne.d=je.getUTCDate()+(ne.w+6)%7):(je=ag(Lo(ne.y,0,1)),Ee=je.getDay(),je=Ee>4||Ee===0?tm.ceil(je):tm(je),je=Nc.offset(je,(ne.V-1)*7),ne.y=je.getFullYear(),ne.m=je.getMonth(),ne.d=je.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ee="Z"in ne?rg(Lo(ne.y,0,1)).getUTCDay():ag(Lo(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ee+5)%7:ne.w+ne.U*7-(Ee+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,rg(ne)):ag(ne)}}function T(G,xe,Ne,ne){for(var _e=0,je=xe.length,Ee=Ne.length,Ce,Ke;_e<je;){if(ne>=Ee)return-1;if(Ce=xe.charCodeAt(_e++),Ce===37){if(Ce=xe.charAt(_e++),Ke=D[Ce in AS?xe.charAt(_e++):Ce],!Ke||(ne=Ke(G,Ne,ne))<0)return-1}else if(Ce!=Ne.charCodeAt(ne++))return-1}return ne}function R(G,xe,Ne){var ne=h.exec(xe.slice(Ne));return ne?(G.p=p.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function z(G,xe,Ne){var ne=v.exec(xe.slice(Ne));return ne?(G.w=w.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function $(G,xe,Ne){var ne=x.exec(xe.slice(Ne));return ne?(G.w=j.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function Z(G,xe,Ne){var ne=g.exec(xe.slice(Ne));return ne?(G.m=C.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function fe(G,xe,Ne){var ne=A.exec(xe.slice(Ne));return ne?(G.m=S.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function se(G,xe,Ne){return T(G,a,xe,Ne)}function ie(G,xe,Ne){return T(G,r,xe,Ne)}function V(G,xe,Ne){return T(G,n,xe,Ne)}function K(G){return c[G.getDay()]}function ce(G){return o[G.getDay()]}function U(G){return u[G.getMonth()]}function I(G){return m[G.getMonth()]}function P(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function ee(G){return c[G.getUTCDay()]}function pe(G){return o[G.getUTCDay()]}function ve(G){return u[G.getUTCMonth()]}function ue(G){return m[G.getUTCMonth()]}function he(G){return i[+(G.getUTCHours()>=12)]}function te(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var xe=B(G+="",k);return xe.toString=function(){return G},xe},parse:function(G){var xe=L(G+="",!1);return xe.toString=function(){return G},xe},utcFormat:function(G){var xe=B(G+="",O);return xe.toString=function(){return G},xe},utcParse:function(G){var xe=L(G+="",!0);return xe.toString=function(){return G},xe}}}var AS={"-":"",_:" ",0:"0"},Zt=/^\s*\d+/,O9=/^%/,D9=/[\\^$*+?|[\]().{}]/g;function Xe(e,a,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(a)+i:i)}function T9(e){return e.replace(D9,"\\$&")}function Bo(e){return new RegExp("^(?:"+e.map(T9).join("|")+")","i")}function Io(e){return new Map(e.map((a,r)=>[a.toLowerCase(),r]))}function R9(e,a,r){var n=Zt.exec(a.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function P9(e,a,r){var n=Zt.exec(a.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function _9(e,a,r){var n=Zt.exec(a.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function M9(e,a,r){var n=Zt.exec(a.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function z9(e,a,r){var n=Zt.exec(a.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function CS(e,a,r){var n=Zt.exec(a.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function kS(e,a,r){var n=Zt.exec(a.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function L9(e,a,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(a.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function B9(e,a,r){var n=Zt.exec(a.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function I9(e,a,r){var n=Zt.exec(a.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function ES(e,a,r){var n=Zt.exec(a.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function F9(e,a,r){var n=Zt.exec(a.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function OS(e,a,r){var n=Zt.exec(a.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function $9(e,a,r){var n=Zt.exec(a.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function U9(e,a,r){var n=Zt.exec(a.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function q9(e,a,r){var n=Zt.exec(a.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function H9(e,a,r){var n=Zt.exec(a.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function V9(e,a,r){var n=O9.exec(a.slice(r,r+1));return n?r+n[0].length:-1}function Y9(e,a,r){var n=Zt.exec(a.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function K9(e,a,r){var n=Zt.exec(a.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function DS(e,a){return Xe(e.getDate(),a,2)}function G9(e,a){return Xe(e.getHours(),a,2)}function J9(e,a){return Xe(e.getHours()%12||12,a,2)}function W9(e,a){return Xe(1+Nc.count(En(e),e),a,3)}function mk(e,a){return Xe(e.getMilliseconds(),a,3)}function X9(e,a){return mk(e,a)+"000"}function Z9(e,a){return Xe(e.getMonth()+1,a,2)}function Q9(e,a){return Xe(e.getMinutes(),a,2)}function eF(e,a){return Xe(e.getSeconds(),a,2)}function tF(e){var a=e.getDay();return a===0?7:a}function aF(e,a){return Xe(Ym.count(En(e)-1,e),a,2)}function fk(e){var a=e.getDay();return a>=4||a===0?oi(e):oi.ceil(e)}function rF(e,a){return e=fk(e),Xe(oi.count(En(e),e)+(En(e).getDay()===4),a,2)}function nF(e){return e.getDay()}function sF(e,a){return Xe(tm.count(En(e)-1,e),a,2)}function lF(e,a){return Xe(e.getFullYear()%100,a,2)}function iF(e,a){return e=fk(e),Xe(e.getFullYear()%100,a,2)}function oF(e,a){return Xe(e.getFullYear()%1e4,a,4)}function cF(e,a){var r=e.getDay();return e=r>=4||r===0?oi(e):oi.ceil(e),Xe(e.getFullYear()%1e4,a,4)}function dF(e){var a=e.getTimezoneOffset();return(a>0?"-":(a*=-1,"+"))+Xe(a/60|0,"0",2)+Xe(a%60,"0",2)}function TS(e,a){return Xe(e.getUTCDate(),a,2)}function uF(e,a){return Xe(e.getUTCHours(),a,2)}function mF(e,a){return Xe(e.getUTCHours()%12||12,a,2)}function fF(e,a){return Xe(1+Vm.count(On(e),e),a,3)}function pk(e,a){return Xe(e.getUTCMilliseconds(),a,3)}function pF(e,a){return pk(e,a)+"000"}function hF(e,a){return Xe(e.getUTCMonth()+1,a,2)}function xF(e,a){return Xe(e.getUTCMinutes(),a,2)}function gF(e,a){return Xe(e.getUTCSeconds(),a,2)}function bF(e){var a=e.getUTCDay();return a===0?7:a}function yF(e,a){return Xe(Km.count(On(e)-1,e),a,2)}function hk(e){var a=e.getUTCDay();return a>=4||a===0?ci(e):ci.ceil(e)}function vF(e,a){return e=hk(e),Xe(ci.count(On(e),e)+(On(e).getUTCDay()===4),a,2)}function jF(e){return e.getUTCDay()}function NF(e,a){return Xe(am.count(On(e)-1,e),a,2)}function wF(e,a){return Xe(e.getUTCFullYear()%100,a,2)}function SF(e,a){return e=hk(e),Xe(e.getUTCFullYear()%100,a,2)}function AF(e,a){return Xe(e.getUTCFullYear()%1e4,a,4)}function CF(e,a){var r=e.getUTCDay();return e=r>=4||r===0?ci(e):ci.ceil(e),Xe(e.getUTCFullYear()%1e4,a,4)}function kF(){return"+0000"}function RS(){return"%"}function PS(e){return+e}function _S(e){return Math.floor(+e/1e3)}var Zl,xk,gk;EF({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 EF(e){return Zl=E9(e),xk=Zl.format,Zl.parse,gk=Zl.utcFormat,Zl.utcParse,Zl}function OF(e){return new Date(e)}function DF(e){return e instanceof Date?+e:+new Date(+e)}function A0(e,a,r,n,i,o,c,m,u,h){var p=u0(),x=p.invert,j=p.domain,v=h(".%L"),w=h(":%S"),A=h("%I:%M"),S=h("%I %p"),g=h("%a %d"),C=h("%b %d"),k=h("%B"),O=h("%Y");function D(B){return(u(B)<B?v:m(B)<B?w:c(B)<B?A:o(B)<B?S:n(B)<B?i(B)<B?g:C:r(B)<B?k:O)(B)}return p.invert=function(B){return new Date(x(B))},p.domain=function(B){return arguments.length?j(Array.from(B,DF)):j().map(OF)},p.ticks=function(B){var L=j();return e(L[0],L[L.length-1],B??10)},p.tickFormat=function(B,L){return L==null?D:h(L)},p.nice=function(B){var L=j();return(!B||typeof B.range!="function")&&(B=a(L[0],L[L.length-1],B??10)),B?j(rk(L,B)):p},p.copy=function(){return jc(p,A0(e,a,r,n,i,o,c,m,u,h))},p}function TF(){return jr.apply(A0(C9,k9,En,w0,Ym,Nc,j0,y0,Js,xk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function RF(){return jr.apply(A0(S9,A9,On,S0,Km,Vm,N0,v0,Js,gk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Gm(){var e=0,a=1,r,n,i,o,c=va,m=!1,u;function h(x){return x==null||isNaN(x=+x)?u:c(i===0?.5:(x=(o(x)-r)*i,m?Math.max(0,Math.min(1,x)):x))}h.domain=function(x){return arguments.length?([e,a]=x,r=o(e=+e),n=o(a=+a),i=r===n?0:1/(n-r),h):[e,a]},h.clamp=function(x){return arguments.length?(m=!!x,h):m},h.interpolator=function(x){return arguments.length?(c=x,h):c};function p(x){return function(j){var v,w;return arguments.length?([v,w]=j,c=x(v,w),h):[c(0),c(1)]}}return h.range=p(Ni),h.rangeRound=p(d0),h.unknown=function(x){return arguments.length?(u=x,h):u},function(x){return o=x,r=x(e),n=x(a),i=r===n?0:1/(n-r),h}}function Ns(e,a){return a.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function bk(){var e=js(Gm()(va));return e.copy=function(){return Ns(e,bk())},Mn.apply(e,arguments)}function yk(){var e=p0(Gm()).domain([1,10]);return e.copy=function(){return Ns(e,yk()).base(e.base())},Mn.apply(e,arguments)}function vk(){var e=h0(Gm());return e.copy=function(){return Ns(e,vk()).constant(e.constant())},Mn.apply(e,arguments)}function C0(){var e=x0(Gm());return e.copy=function(){return Ns(e,C0()).exponent(e.exponent())},Mn.apply(e,arguments)}function PF(){return C0.apply(null,arguments).exponent(.5)}function jk(){var e=[],a=va;function r(n){if(n!=null&&!isNaN(n=+n))return a((yc(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(fs),r},r.interpolator=function(n){return arguments.length?(a=n,r):a},r.range=function(){return e.map((n,i)=>a(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>bI(e,o/n))},r.copy=function(){return jk(a).domain(e)},Mn.apply(r,arguments)}function Jm(){var e=0,a=.5,r=1,n=1,i,o,c,m,u,h=va,p,x=!1,j;function v(A){return isNaN(A=+A)?j:(A=.5+((A=+p(A))-o)*(n*A<n*o?m:u),h(x?Math.max(0,Math.min(1,A)):A))}v.domain=function(A){return arguments.length?([e,a,r]=A,i=p(e=+e),o=p(a=+a),c=p(r=+r),m=i===o?0:.5/(o-i),u=o===c?0:.5/(c-o),n=o<i?-1:1,v):[e,a,r]},v.clamp=function(A){return arguments.length?(x=!!A,v):x},v.interpolator=function(A){return arguments.length?(h=A,v):h};function w(A){return function(S){var g,C,k;return arguments.length?([g,C,k]=S,h=VI(A,[g,C,k]),v):[h(0),h(.5),h(1)]}}return v.range=w(Ni),v.rangeRound=w(d0),v.unknown=function(A){return arguments.length?(j=A,v):j},function(A){return p=A,i=A(e),o=A(a),c=A(r),m=i===o?0:.5/(o-i),u=o===c?0:.5/(c-o),n=o<i?-1:1,v}}function Nk(){var e=js(Jm()(va));return e.copy=function(){return Ns(e,Nk())},Mn.apply(e,arguments)}function wk(){var e=p0(Jm()).domain([.1,1,10]);return e.copy=function(){return Ns(e,wk()).base(e.base())},Mn.apply(e,arguments)}function Sk(){var e=h0(Jm());return e.copy=function(){return Ns(e,Sk()).constant(e.constant())},Mn.apply(e,arguments)}function k0(){var e=x0(Jm());return e.copy=function(){return Ns(e,k0()).exponent(e.exponent())},Mn.apply(e,arguments)}function _F(){return k0.apply(null,arguments).exponent(.5)}const Uo=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:i0,scaleDiverging:Nk,scaleDivergingLog:wk,scaleDivergingPow:k0,scaleDivergingSqrt:_F,scaleDivergingSymlog:Sk,scaleIdentity:ak,scaleImplicit:eb,scaleLinear:tk,scaleLog:nk,scaleOrdinal:l0,scalePoint:jI,scalePow:g0,scaleQuantile:ik,scaleQuantize:ok,scaleRadial:lk,scaleSequential:bk,scaleSequentialLog:yk,scaleSequentialPow:C0,scaleSequentialQuantile:jk,scaleSequentialSqrt:PF,scaleSequentialSymlog:vk,scaleSqrt:p9,scaleSymlog:sk,scaleThreshold:ck,scaleTime:TF,scaleUtc:RF,tickFormat:ek},Symbol.toStringTag,{value:"Module"}));var ws=e=>e.chartData,MF=le([ws],e=>{var a=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:a,dataStartIndex:0}}),E0=(e,a,r,n)=>n?MF(e):ws(e);function ll(e){if(Array.isArray(e)&&e.length===2){var[a,r]=e;if(fa(a)&&fa(r))return!0}return!1}function MS(e,a,r){return r?e:[Math.min(e[0],a[0]),Math.max(e[1],a[1])]}function Ak(e,a){if(a&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,o;if(fa(r))i=r;else if(typeof r=="function")return;if(fa(n))o=n;else if(typeof n=="function")return;var c=[i,o];if(ll(c))return c}}function zF(e,a,r){if(!(!r&&a==null)){if(typeof e=="function"&&a!=null)try{var n=e(a,r);if(ll(n))return MS(n,a,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,c,m;if(i==="auto")a!=null&&(c=Math.min(...a));else if(De(i))c=i;else if(typeof i=="function")try{a!=null&&(c=i(a?.[0]))}catch{}else if(typeof i=="string"&&v1.test(i)){var u=v1.exec(i);if(u==null||a==null)c=void 0;else{var h=+u[1];c=a[0]-h}}else c=a?.[0];if(o==="auto")a!=null&&(m=Math.max(...a));else if(De(o))m=o;else if(typeof o=="function")try{a!=null&&(m=o(a?.[1]))}catch{}else if(typeof o=="string"&&j1.test(o)){var p=j1.exec(o);if(p==null||a==null)m=void 0;else{var x=+p[1];m=a[1]+x}}else m=a?.[1];var j=[c,m];if(ll(j))return a==null?j:MS(j,a,r)}}}var wi=1e9,LF={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},D0,yt=!0,gr="[DecimalError] ",al=gr+"Invalid argument: ",O0=gr+"Exponent out of range: ",Si=Math.floor,Vs=Math.pow,BF=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ka,Yt=1e7,ht=7,Ck=9007199254740991,rm=Si(Ck/ht),Se={};Se.absoluteValue=Se.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Se.comparedTo=Se.cmp=function(e){var a,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,a=0,r=n<i?n:i;a<r;++a)if(o.d[a]!==e.d[a])return o.d[a]>e.d[a]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};Se.decimalPlaces=Se.dp=function(){var e=this,a=e.d.length-1,r=(a-e.e)*ht;if(a=e.d[a],a)for(;a%10==0;a/=10)r--;return r<0?0:r};Se.dividedBy=Se.div=function(e){return jn(this,new this.constructor(e))};Se.dividedToIntegerBy=Se.idiv=function(e){var a=this,r=a.constructor;return ct(jn(a,new r(e),0,1),r.precision)};Se.equals=Se.eq=function(e){return!this.cmp(e)};Se.exponent=function(){return Pt(this)};Se.greaterThan=Se.gt=function(e){return this.cmp(e)>0};Se.greaterThanOrEqualTo=Se.gte=function(e){return this.cmp(e)>=0};Se.isInteger=Se.isint=function(){return this.e>this.d.length-2};Se.isNegative=Se.isneg=function(){return this.s<0};Se.isPositive=Se.ispos=function(){return this.s>0};Se.isZero=function(){return this.s===0};Se.lessThan=Se.lt=function(e){return this.cmp(e)<0};Se.lessThanOrEqualTo=Se.lte=function(e){return this.cmp(e)<1};Se.logarithm=Se.log=function(e){var a,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Ka))throw Error(gr+"NaN");if(r.s<1)throw Error(gr+(r.s?"NaN":"-Infinity"));return r.eq(Ka)?new n(0):(yt=!1,a=jn(sc(r,o),sc(e,o),o),yt=!0,ct(a,i))};Se.minus=Se.sub=function(e){var a=this;return e=new a.constructor(e),a.s==e.s?Ok(a,e):kk(a,(e.s=-e.s,e))};Se.modulo=Se.mod=function(e){var a,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(gr+"NaN");return r.s?(yt=!1,a=jn(r,e,0,1).times(e),yt=!0,r.minus(a)):ct(new n(r),i)};Se.naturalExponential=Se.exp=function(){return Ek(this)};Se.naturalLogarithm=Se.ln=function(){return sc(this)};Se.negated=Se.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Se.plus=Se.add=function(e){var a=this;return e=new a.constructor(e),a.s==e.s?kk(a,e):Ok(a,(e.s=-e.s,e))};Se.precision=Se.sd=function(e){var a,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(al+e);if(a=Pt(i)+1,n=i.d.length-1,r=n*ht+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&a>r?a:r};Se.squareRoot=Se.sqrt=function(){var e,a,r,n,i,o,c,m=this,u=m.constructor;if(m.s<1){if(!m.s)return new u(0);throw Error(gr+"NaN")}for(e=Pt(m),yt=!1,i=Math.sqrt(+m),i==0||i==1/0?(a=Ur(m.d),(a.length+e)%2==0&&(a+="0"),i=Math.sqrt(a),e=Si((e+1)/2)-(e<0||e%2),i==1/0?a="5e"+e:(a=i.toExponential(),a=a.slice(0,a.indexOf("e")+1)+e),n=new u(a)):n=new u(i.toString()),r=u.precision,i=c=r+3;;)if(o=n,n=o.plus(jn(m,o,c+2)).times(.5),Ur(o.d).slice(0,c)===(a=Ur(n.d)).slice(0,c)){if(a=a.slice(c-3,c+1),i==c&&a=="4999"){if(ct(o,r+1,0),o.times(o).eq(m)){n=o;break}}else if(a!="9999")break;c+=4}return yt=!0,ct(n,r)};Se.times=Se.mul=function(e){var a,r,n,i,o,c,m,u,h,p=this,x=p.constructor,j=p.d,v=(e=new x(e)).d;if(!p.s||!e.s)return new x(0);for(e.s*=p.s,r=p.e+e.e,u=j.length,h=v.length,u<h&&(o=j,j=v,v=o,c=u,u=h,h=c),o=[],c=u+h,n=c;n--;)o.push(0);for(n=h;--n>=0;){for(a=0,i=u+n;i>n;)m=o[i]+v[n]*j[i-n-1]+a,o[i--]=m%Yt|0,a=m/Yt|0;o[i]=(o[i]+a)%Yt|0}for(;!o[--c];)o.pop();return a?++r:o.shift(),e.d=o,e.e=r,yt?ct(e,x.precision):e};Se.toDecimalPlaces=Se.todp=function(e,a){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Vr(e,0,wi),a===void 0?a=n.rounding:Vr(a,0,8),ct(r,e+Pt(r)+1,a))};Se.toExponential=function(e,a){var r,n=this,i=n.constructor;return e===void 0?r=il(n,!0):(Vr(e,0,wi),a===void 0?a=i.rounding:Vr(a,0,8),n=ct(new i(n),e+1,a),r=il(n,!0,e+1)),r};Se.toFixed=function(e,a){var r,n,i=this,o=i.constructor;return e===void 0?il(i):(Vr(e,0,wi),a===void 0?a=o.rounding:Vr(a,0,8),n=ct(new o(i),e+Pt(i)+1,a),r=il(n.abs(),!1,e+Pt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Se.toInteger=Se.toint=function(){var e=this,a=e.constructor;return ct(new a(e),Pt(e)+1,a.rounding)};Se.toNumber=function(){return+this};Se.toPower=Se.pow=function(e){var a,r,n,i,o,c,m=this,u=m.constructor,h=12,p=+(e=new u(e));if(!e.s)return new u(Ka);if(m=new u(m),!m.s){if(e.s<1)throw Error(gr+"Infinity");return m}if(m.eq(Ka))return m;if(n=u.precision,e.eq(Ka))return ct(m,n);if(a=e.e,r=e.d.length-1,c=a>=r,o=m.s,c){if((r=p<0?-p:p)<=Ck){for(i=new u(Ka),a=Math.ceil(n/ht+4),yt=!1;r%2&&(i=i.times(m),LS(i.d,a)),r=Si(r/2),r!==0;)m=m.times(m),LS(m.d,a);return yt=!0,e.s<0?new u(Ka).div(i):ct(i,n)}}else if(o<0)throw Error(gr+"NaN");return o=o<0&&e.d[Math.max(a,r)]&1?-1:1,m.s=1,yt=!1,i=e.times(sc(m,n+h)),yt=!0,i=Ek(i),i.s=o,i};Se.toPrecision=function(e,a){var r,n,i=this,o=i.constructor;return e===void 0?(r=Pt(i),n=il(i,r<=o.toExpNeg||r>=o.toExpPos)):(Vr(e,1,wi),a===void 0?a=o.rounding:Vr(a,0,8),i=ct(new o(i),e,a),r=Pt(i),n=il(i,e<=r||r<=o.toExpNeg,e)),n};Se.toSignificantDigits=Se.tosd=function(e,a){var r=this,n=r.constructor;return e===void 0?(e=n.precision,a=n.rounding):(Vr(e,1,wi),a===void 0?a=n.rounding:Vr(a,0,8)),ct(new n(r),e,a)};Se.toString=Se.valueOf=Se.val=Se.toJSON=Se[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,a=Pt(e),r=e.constructor;return il(e,a<=r.toExpNeg||a>=r.toExpPos)};function kk(e,a){var r,n,i,o,c,m,u,h,p=e.constructor,x=p.precision;if(!e.s||!a.s)return a.s||(a=new p(e)),yt?ct(a,x):a;if(u=e.d,h=a.d,c=e.e,i=a.e,u=u.slice(),o=c-i,o){for(o<0?(n=u,o=-o,m=h.length):(n=h,i=c,m=u.length),c=Math.ceil(x/ht),m=c>m?c+1:m+1,o>m&&(o=m,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(m=u.length,o=h.length,m-o<0&&(o=m,n=h,h=u,u=n),r=0;o;)r=(u[--o]=u[o]+h[o]+r)/Yt|0,u[o]%=Yt;for(r&&(u.unshift(r),++i),m=u.length;u[--m]==0;)u.pop();return a.d=u,a.e=i,yt?ct(a,x):a}function Vr(e,a,r){if(e!==~~e||e<a||e>r)throw Error(al+e)}function Ur(e){var a,r,n,i=e.length-1,o="",c=e[0];if(i>0){for(o+=c,a=1;a<i;a++)n=e[a]+"",r=ht-n.length,r&&(o+=cs(r)),o+=n;c=e[a],n=c+"",r=ht-n.length,r&&(o+=cs(r))}else if(c===0)return"0";for(;c%10===0;)c/=10;return o+c}var jn=(function(){function e(n,i){var o,c=0,m=n.length;for(n=n.slice();m--;)o=n[m]*i+c,n[m]=o%Yt|0,c=o/Yt|0;return c&&n.unshift(c),n}function a(n,i,o,c){var m,u;if(o!=c)u=o>c?1:-1;else for(m=u=0;m<o;m++)if(n[m]!=i[m]){u=n[m]>i[m]?1:-1;break}return u}function r(n,i,o){for(var c=0;o--;)n[o]-=c,c=n[o]<i[o]?1:0,n[o]=c*Yt+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,c){var m,u,h,p,x,j,v,w,A,S,g,C,k,O,D,B,L,T,R=n.constructor,z=n.s==i.s?1:-1,$=n.d,Z=i.d;if(!n.s)return new R(n);if(!i.s)throw Error(gr+"Division by zero");for(u=n.e-i.e,L=Z.length,D=$.length,v=new R(z),w=v.d=[],h=0;Z[h]==($[h]||0);)++h;if(Z[h]>($[h]||0)&&--u,o==null?C=o=R.precision:c?C=o+(Pt(n)-Pt(i))+1:C=o,C<0)return new R(0);if(C=C/ht+2|0,h=0,L==1)for(p=0,Z=Z[0],C++;(h<D||p)&&C--;h++)k=p*Yt+($[h]||0),w[h]=k/Z|0,p=k%Z|0;else{for(p=Yt/(Z[0]+1)|0,p>1&&(Z=e(Z,p),$=e($,p),L=Z.length,D=$.length),O=L,A=$.slice(0,L),S=A.length;S<L;)A[S++]=0;T=Z.slice(),T.unshift(0),B=Z[0],Z[1]>=Yt/2&&++B;do p=0,m=a(Z,A,L,S),m<0?(g=A[0],L!=S&&(g=g*Yt+(A[1]||0)),p=g/B|0,p>1?(p>=Yt&&(p=Yt-1),x=e(Z,p),j=x.length,S=A.length,m=a(x,A,j,S),m==1&&(p--,r(x,L<j?T:Z,j))):(p==0&&(m=p=1),x=Z.slice()),j=x.length,j<S&&x.unshift(0),r(A,x,S),m==-1&&(S=A.length,m=a(Z,A,L,S),m<1&&(p++,r(A,L<S?T:Z,S))),S=A.length):m===0&&(p++,A=[0]),w[h++]=p,m&&A[0]?A[S++]=$[O]||0:(A=[$[O]],S=1);while((O++<D||A[0]!==void 0)&&C--)}return w[0]||w.shift(),v.e=u,ct(v,c?o+Pt(v)+1:o)}})();function Ek(e,a){var r,n,i,o,c,m,u=0,h=0,p=e.constructor,x=p.precision;if(Pt(e)>16)throw Error(O0+Pt(e));if(!e.s)return new p(Ka);for(yt=!1,m=x,c=new p(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(n=Math.log(Vs(2,h))/Math.LN10*2+5|0,m+=n,r=i=o=new p(Ka),p.precision=m;;){if(i=ct(i.times(e),m),r=r.times(++u),c=o.plus(jn(i,r,m)),Ur(c.d).slice(0,m)===Ur(o.d).slice(0,m)){for(;h--;)o=ct(o.times(o),m);return p.precision=x,a==null?(yt=!0,ct(o,x)):o}o=c}}function Pt(e){for(var a=e.e*ht,r=e.d[0];r>=10;r/=10)a++;return a}function ng(e,a,r){if(a>e.LN10.sd())throw yt=!0,r&&(e.precision=r),Error(gr+"LN10 precision limit exceeded");return ct(new e(e.LN10),a)}function cs(e){for(var a="";e--;)a+="0";return a}function sc(e,a){var r,n,i,o,c,m,u,h,p,x=1,j=10,v=e,w=v.d,A=v.constructor,S=A.precision;if(v.s<1)throw Error(gr+(v.s?"NaN":"-Infinity"));if(v.eq(Ka))return new A(0);if(a==null?(yt=!1,h=S):h=a,v.eq(10))return a==null&&(yt=!0),ng(A,h);if(h+=j,A.precision=h,r=Ur(w),n=r.charAt(0),o=Pt(v),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(e),r=Ur(v.d),n=r.charAt(0),x++;o=Pt(v),n>1?(v=new A("0."+r),o++):v=new A(n+"."+r.slice(1))}else return u=ng(A,h+2,S).times(o+""),v=sc(new A(n+"."+r.slice(1)),h-j).plus(u),A.precision=S,a==null?(yt=!0,ct(v,S)):v;for(m=c=v=jn(v.minus(Ka),v.plus(Ka),h),p=ct(v.times(v),h),i=3;;){if(c=ct(c.times(p),h),u=m.plus(jn(c,new A(i),h)),Ur(u.d).slice(0,h)===Ur(m.d).slice(0,h))return m=m.times(2),o!==0&&(m=m.plus(ng(A,h+2,S).times(o+""))),m=jn(m,new A(x),h),A.precision=S,a==null?(yt=!0,ct(m,S)):m;m=u,i+=2}}function zS(e,a){var r,n,i;for((r=a.indexOf("."))>-1&&(a=a.replace(".","")),(n=a.search(/e/i))>0?(r<0&&(r=n),r+=+a.slice(n+1),a=a.substring(0,n)):r<0&&(r=a.length),n=0;a.charCodeAt(n)===48;)++n;for(i=a.length;a.charCodeAt(i-1)===48;)--i;if(a=a.slice(n,i),a){if(i-=n,r=r-n-1,e.e=Si(r/ht),e.d=[],n=(r+1)%ht,r<0&&(n+=ht),n<i){for(n&&e.d.push(+a.slice(0,n)),i-=ht;n<i;)e.d.push(+a.slice(n,n+=ht));a=a.slice(n),n=ht-a.length}else n-=i;for(;n--;)a+="0";if(e.d.push(+a),yt&&(e.e>rm||e.e<-rm))throw Error(O0+r)}else e.s=0,e.e=0,e.d=[0];return e}function ct(e,a,r){var n,i,o,c,m,u,h,p,x=e.d;for(c=1,o=x[0];o>=10;o/=10)c++;if(n=a-c,n<0)n+=ht,i=a,h=x[p=0];else{if(p=Math.ceil((n+1)/ht),o=x.length,p>=o)return e;for(h=o=x[p],c=1;o>=10;o/=10)c++;n%=ht,i=n-ht+c}if(r!==void 0&&(o=Vs(10,c-i-1),m=h/o%10|0,u=a<0||x[p+1]!==void 0||h%o,u=r<4?(m||u)&&(r==0||r==(e.s<0?3:2)):m>5||m==5&&(r==4||u||r==6&&(n>0?i>0?h/Vs(10,c-i):0:x[p-1])%10&1||r==(e.s<0?8:7))),a<1||!x[0])return u?(o=Pt(e),x.length=1,a=a-o-1,x[0]=Vs(10,(ht-a%ht)%ht),e.e=Si(-a/ht)||0):(x.length=1,x[0]=e.e=e.s=0),e;if(n==0?(x.length=p,o=1,p--):(x.length=p+1,o=Vs(10,ht-n),x[p]=i>0?(h/Vs(10,c-i)%Vs(10,i)|0)*o:0),u)for(;;)if(p==0){(x[0]+=o)==Yt&&(x[0]=1,++e.e);break}else{if(x[p]+=o,x[p]!=Yt)break;x[p--]=0,o=1}for(n=x.length;x[--n]===0;)x.pop();if(yt&&(e.e>rm||e.e<-rm))throw Error(O0+Pt(e));return e}function Ok(e,a){var r,n,i,o,c,m,u,h,p,x,j=e.constructor,v=j.precision;if(!e.s||!a.s)return a.s?a.s=-a.s:a=new j(e),yt?ct(a,v):a;if(u=e.d,x=a.d,n=a.e,h=e.e,u=u.slice(),c=h-n,c){for(p=c<0,p?(r=u,c=-c,m=x.length):(r=x,n=h,m=u.length),i=Math.max(Math.ceil(v/ht),m)+2,c>i&&(c=i,r.length=1),r.reverse(),i=c;i--;)r.push(0);r.reverse()}else{for(i=u.length,m=x.length,p=i<m,p&&(m=i),i=0;i<m;i++)if(u[i]!=x[i]){p=u[i]<x[i];break}c=0}for(p&&(r=u,u=x,x=r,a.s=-a.s),m=u.length,i=x.length-m;i>0;--i)u[m++]=0;for(i=x.length;i>c;){if(u[--i]<x[i]){for(o=i;o&&u[--o]===0;)u[o]=Yt-1;--u[o],u[i]+=Yt}u[i]-=x[i]}for(;u[--m]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(a.d=u,a.e=n,yt?ct(a,v):a):new j(0)}function il(e,a,r){var n,i=Pt(e),o=Ur(e.d),c=o.length;return a?(r&&(n=r-c)>0?o=o.charAt(0)+"."+o.slice(1)+cs(n):c>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+cs(-i-1)+o,r&&(n=r-c)>0&&(o+=cs(n))):i>=c?(o+=cs(i+1-c),r&&(n=r-i-1)>0&&(o=o+"."+cs(n))):((n=i+1)<c&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-c)>0&&(i+1===c&&(o+="."),o+=cs(n))),e.s<0?"-"+o:o}function LS(e,a){if(e.length>a)return e.length=a,!0}function Dk(e){var a,r,n;function i(o){var c=this;if(!(c instanceof i))return new i(o);if(c.constructor=i,o instanceof i){c.s=o.s,c.e=o.e,c.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(al+o);if(o>0)c.s=1;else if(o<0)o=-o,c.s=-1;else{c.s=0,c.e=0,c.d=[0];return}if(o===~~o&&o<1e7){c.e=0,c.d=[o];return}return zS(c,o.toString())}else if(typeof o!="string")throw Error(al+o);if(o.charCodeAt(0)===45?(o=o.slice(1),c.s=-1):c.s=1,BF.test(o))zS(c,o);else throw Error(al+o)}if(i.prototype=Se,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Dk,i.config=i.set=IF,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],a=0;a<n.length;)e.hasOwnProperty(r=n[a++])||(e[r]=this[r]);return i.config(e),i}function IF(e){if(!e||typeof e!="object")throw Error(gr+"Object expected");var a,r,n,i=["precision",1,wi,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(a=0;a<i.length;a+=3)if((n=e[r=i[a]])!==void 0)if(Si(n)===n&&n>=i[a+1]&&n<=i[a+2])this[r]=n;else throw Error(al+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(al+r+": "+n);return this}var D0=Dk(LF);Ka=new D0(1);const tt=D0;var FF=e=>e,Tk={},Rk=e=>e===Tk,BS=e=>function a(){return arguments.length===0||arguments.length===1&&Rk(arguments.length<=0?void 0:arguments[0])?a:e(...arguments)},Pk=(e,a)=>e===1?a:BS(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var o=n.filter(c=>c!==Tk).length;return o>=e?a(...n):Pk(e-o,BS(function(){for(var c=arguments.length,m=new Array(c),u=0;u<c;u++)m[u]=arguments[u];var h=n.map(p=>Rk(p)?m.shift():p);return a(...h,...m)}))}),Wm=e=>Pk(e.length,e),nb=(e,a)=>{for(var r=[],n=e;n<a;++n)r[n-e]=n;return r},$F=Wm((e,a)=>Array.isArray(a)?a.map(e):Object.keys(a).map(r=>a[r]).map(e)),UF=function(){for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];if(!r.length)return FF;var i=r.reverse(),o=i[0],c=i.slice(1);return function(){return c.reduce((m,u)=>u(m),o(...arguments))}},sb=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),_k=e=>{var a=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return a&&i.every((c,m)=>{var u;return c===((u=a)===null||u===void 0?void 0:u[m])})||(a=i,r=e(...i)),r}};function Mk(e){var a;return e===0?a=1:a=Math.floor(new tt(e).abs().log(10).toNumber())+1,a}function zk(e,a,r){for(var n=new tt(e),i=0,o=[];n.lt(a)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}Wm((e,a,r)=>{var n=+e,i=+a;return n+r*(i-n)});Wm((e,a,r)=>{var n=a-+e;return n=n||1/0,(r-e)/n});Wm((e,a,r)=>{var n=a-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});var Lk=e=>{var[a,r]=e,[n,i]=[a,r];return a>r&&([n,i]=[r,a]),[n,i]},Bk=(e,a,r)=>{if(e.lte(0))return new tt(0);var n=Mk(e.toNumber()),i=new tt(10).pow(n),o=e.div(i),c=n!==1?.05:.1,m=new tt(Math.ceil(o.div(c).toNumber())).add(r).mul(c),u=m.mul(i);return a?new tt(u.toNumber()):new tt(Math.ceil(u.toNumber()))},qF=(e,a,r)=>{var n=new tt(1),i=new tt(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new tt(10).pow(Mk(e)-1),i=new tt(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new tt(Math.floor(e)))}else e===0?i=new tt(Math.floor((a-1)/2)):r||(i=new tt(Math.floor(e)));var c=Math.floor((a-1)/2),m=UF($F(u=>i.add(new tt(u-c).mul(n)).toNumber()),nb);return m(0,a)},Ik=function(a,r,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-a)/(n-1)))return{step:new tt(0),tickMin:new tt(0),tickMax:new tt(0)};var c=Bk(new tt(r).sub(a).div(n-1),i,o),m;a<=0&&r>=0?m=new tt(0):(m=new tt(a).add(r).div(2),m=m.sub(new tt(m).mod(c)));var u=Math.ceil(m.sub(a).div(c).toNumber()),h=Math.ceil(new tt(r).sub(m).div(c).toNumber()),p=u+h+1;return p>n?Ik(a,r,n,i,o+1):(p<n&&(h=r>0?h+(n-p):h,u=r>0?u:u+(n-p)),{step:c,tickMin:m.sub(new tt(u).mul(c)),tickMax:m.add(new tt(h).mul(c))})};function HF(e){var[a,r]=e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(n,2),[c,m]=Lk([a,r]);if(c===-1/0||m===1/0){var u=m===1/0?[c,...nb(0,n-1).map(()=>1/0)]:[...nb(0,n-1).map(()=>-1/0),m];return a>r?sb(u):u}if(c===m)return qF(c,n,i);var{step:h,tickMin:p,tickMax:x}=Ik(c,m,o,i,0),j=zk(p,x.add(new tt(.1).mul(h)),h);return a>r?sb(j):j}function VF(e,a){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,c]=Lk([r,n]);if(o===-1/0||c===1/0)return[r,n];if(o===c)return[o];var m=Math.max(a,2),u=Bk(new tt(c).sub(o).div(m-1),i,0),h=[...zk(new tt(o),new tt(c),u),c];return i===!1&&(h=h.map(p=>Math.round(p))),r>n?sb(h):h}var YF=_k(HF),KF=_k(VF),Fk=e=>e.rootProps.maxBarSize,GF=e=>e.rootProps.barGap,$k=e=>e.rootProps.barCategoryGap,JF=e=>e.rootProps.barSize,Xm=e=>e.rootProps.stackOffset,T0=e=>e.options.chartName,R0=e=>e.rootProps.syncId,Uk=e=>e.rootProps.syncMethod,P0=e=>e.options.eventEmitter,hn={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},Ya={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},Zm=(e,a)=>{if(!(!e||!a))return e!=null&&e.reversed?[a[1],a[0]]:a},WF={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:hn.angleAxisId,includeHidden:!1,name:void 0,reversed:hn.reversed,scale:hn.scale,tick:hn.tick,tickCount:void 0,ticks:void 0,type:hn.type,unit:void 0},XF={allowDataOverflow:Ya.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ya.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ya.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ya.scale,tick:Ya.tick,tickCount:Ya.tickCount,ticks:void 0,type:Ya.type,unit:void 0},ZF={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:hn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:hn.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:hn.scale,tick:hn.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},QF={allowDataOverflow:Ya.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ya.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ya.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ya.scale,tick:Ya.tick,tickCount:Ya.tickCount,ticks:void 0,type:"category",unit:void 0},_0=(e,a)=>e.polarAxis.angleAxis[a]!=null?e.polarAxis.angleAxis[a]:e.layout.layoutType==="radial"?ZF:WF,M0=(e,a)=>e.polarAxis.radiusAxis[a]!=null?e.polarAxis.radiusAxis[a]:e.layout.layoutType==="radial"?QF:XF,Qm=e=>e.polarOptions,z0=le([Pn,_n,Xt],Bz),qk=le([Qm,z0],(e,a)=>{if(e!=null)return Er(e.innerRadius,a,0)}),Hk=le([Qm,z0],(e,a)=>{if(e!=null)return Er(e.outerRadius,a,a*.8)}),e$=e=>{if(e==null)return[0,0];var{startAngle:a,endAngle:r}=e;return[a,r]},Vk=le([Qm],e$);le([_0,Vk],Zm);var Yk=le([z0,qk,Hk],(e,a,r)=>{if(!(e==null||a==null||r==null))return[a,r]});le([M0,Yk],Zm);var Kk=le([at,Qm,qk,Hk,Pn,_n],(e,a,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||a==null||r==null||n==null)){var{cx:c,cy:m,startAngle:u,endAngle:h}=a;return{cx:Er(c,i,i/2),cy:Er(m,o,o/2),innerRadius:r,outerRadius:n,startAngle:u,endAngle:h,clockWise:!1}}}),Bt=(e,a)=>a,ef=(e,a,r)=>r;function L0(e){return e?.id}var It=e=>{var a=at(e);return a==="horizontal"?"xAxis":a==="vertical"?"yAxis":a==="centric"?"angleAxis":"radiusAxis"},Ai=e=>e.tooltip.settings.axisId,Ft=e=>{var a=It(e),r=Ai(e);return wc(e,a,r)},Gk=le([Ft],e=>e?.dataKey);function Jk(e,a,r){var{chartData:n=[]}=a,{allowDuplicatedCategory:i,dataKey:o}=r,c=new Map;return e.forEach(m=>{var u,h=(u=m.data)!==null&&u!==void 0?u:n;if(!(h==null||h.length===0)){var p=L0(m);h.forEach((x,j)=>{var v=o==null||i?j:String(Na(x,o,null)),w=Na(x,m.dataKey,0),A;c.has(v)?A=c.get(v):A={},Object.assign(A,{[p]:w}),c.set(v,A)})}}),Array.from(c.values())}function tf(e){return e.stackId!=null&&e.dataKey!=null}var af=(e,a)=>e===a?!0:e==null||a==null?!1:e[0]===a[0]&&e[1]===a[1];function rf(e,a){return Array.isArray(e)&&Array.isArray(a)&&e.length===0&&a.length===0?!0:e===a}function IS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nm(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?IS(Object(r),!0).forEach(function(n){t$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t$(e,a,r){return(a=a$(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function a$(e){var a=r$(e,"string");return typeof a=="symbol"?a:a+""}function r$(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var lb=[0,"auto"],Ha={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},Wk=(e,a)=>e.cartesianAxis.xAxis[a],zn=(e,a)=>{var r=Wk(e,a);return r??Ha},Va={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:lb,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:bc},Xk=(e,a)=>e.cartesianAxis.yAxis[a],Ln=(e,a)=>{var r=Xk(e,a);return r??Va},n$={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},B0=(e,a)=>{var r=e.cartesianAxis.zAxis[a];return r??n$},wa=(e,a,r)=>{switch(a){case"xAxis":return zn(e,r);case"yAxis":return Ln(e,r);case"zAxis":return B0(e,r);case"angleAxis":return _0(e,r);case"radiusAxis":return M0(e,r);default:throw new Error("Unexpected axis type: ".concat(a))}},s$=(e,a,r)=>{switch(a){case"xAxis":return zn(e,r);case"yAxis":return Ln(e,r);default:throw new Error("Unexpected axis type: ".concat(a))}},wc=(e,a,r)=>{switch(a){case"xAxis":return zn(e,r);case"yAxis":return Ln(e,r);case"angleAxis":return _0(e,r);case"radiusAxis":return M0(e,r);default:throw new Error("Unexpected axis type: ".concat(a))}},Zk=e=>e.graphicalItems.cartesianItems.some(a=>a.type==="bar")||e.graphicalItems.polarItems.some(a=>a.type==="radialBar");function Qk(e,a){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===a;case"yAxis":return"yAxisId"in r&&r.yAxisId===a;case"zAxis":return"zAxisId"in r&&r.zAxisId===a;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===a;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===a;default:return!1}}}var I0=e=>e.graphicalItems.cartesianItems,l$=le([Bt,ef],Qk),eE=(e,a,r)=>e.filter(r).filter(n=>a?.includeHidden===!0?!0:!n.hide),Sc=le([I0,wa,l$],eE,{memoizeOptions:{resultEqualityCheck:rf}}),tE=le([Sc],e=>e.filter(a=>a.type==="area"||a.type==="bar").filter(tf)),aE=e=>e.filter(a=>!("stackId"in a)||a.stackId===void 0),i$=le([Sc],aE),rE=e=>e.map(a=>a.data).filter(Boolean).flat(1),o$=le([Sc],rE,{memoizeOptions:{resultEqualityCheck:rf}}),nE=(e,a)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=a;return e.length>0?e:r.slice(n,i+1)},F0=le([o$,E0],nE),sE=(e,a,r)=>a?.dataKey!=null?e.map(n=>({value:Na(n,a.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Na(i,n)}))):e.map(n=>({value:n})),nf=le([F0,wa,Sc],sE);function lE(e,a){switch(e){case"xAxis":return a.direction==="x";case"yAxis":return a.direction==="y";default:return!1}}function Su(e){if(Hr(e)||e instanceof Date){var a=Number(e);if(fa(a))return a}}function FS(e){if(Array.isArray(e)){var a=[Su(e[0]),Su(e[1])];return ll(a)?a:void 0}var r=Su(e);if(r!=null)return[r,r]}function Ci(e){return e.map(Su).filter(SB)}function c$(e,a,r){return!r||typeof a!="number"||xr(a)?[]:r.length?Ci(r.flatMap(n=>{var i=Na(e,n.dataKey),o,c;if(Array.isArray(i)?[o,c]=i:o=c=i,!(!fa(o)||!fa(c)))return[a-o,a+c]})):[]}var d$=le([tE,E0,Ft],Jk),iE=(e,a,r)=>{var n={},i=a.reduce((o,c)=>(c.stackId==null||(o[c.stackId]==null&&(o[c.stackId]=[]),o[c.stackId].push(c)),o),n);return Object.fromEntries(Object.entries(i).map(o=>{var[c,m]=o,u=m.map(L0);return[c,{stackedData:eL(e,u,r),graphicalItems:m}]}))},ib=le([d$,tE,Xm],iE),oE=(e,a,r,n)=>{var{dataStartIndex:i,dataEndIndex:o}=a;if(n==null&&r!=="zAxis"){var c=sL(e,i,o);if(!(c!=null&&c[0]===0&&c[1]===0))return c}},u$=le([wa],e=>e.allowDataOverflow),$0=e=>{var a;if(e==null||!("domain"in e))return lb;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=Ci(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(a=e?.domain)!==null&&a!==void 0?a:lb},cE=le([wa],$0),dE=le([cE,u$],Ak),m$=le([ib,ws,Bt,dE],oE,{memoizeOptions:{resultEqualityCheck:af}}),U0=e=>e.errorBars,f$=(e,a,r)=>e.flatMap(n=>a[n.id]).filter(Boolean).filter(n=>lE(r,n)),sm=function(){for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var o=i.flat(),c=Math.min(...o),m=Math.max(...o);return[c,m]}},uE=(e,a,r,n,i)=>{var o,c;if(r.length>0&&e.forEach(m=>{r.forEach(u=>{var h,p,x=(h=n[u.id])===null||h===void 0?void 0:h.filter(g=>lE(i,g)),j=Na(m,(p=a.dataKey)!==null&&p!==void 0?p:u.dataKey),v=c$(m,j,x);if(v.length>=2){var w=Math.min(...v),A=Math.max(...v);(o==null||w<o)&&(o=w),(c==null||A>c)&&(c=A)}var S=FS(j);S!=null&&(o=o==null?S[0]:Math.min(o,S[0]),c=c==null?S[1]:Math.max(c,S[1]))})}),a?.dataKey!=null&&e.forEach(m=>{var u=FS(Na(m,a.dataKey));u!=null&&(o=o==null?u[0]:Math.min(o,u[0]),c=c==null?u[1]:Math.max(c,u[1]))}),fa(o)&&fa(c))return[o,c]},p$=le([F0,wa,i$,U0,Bt],uE,{memoizeOptions:{resultEqualityCheck:af}});function h$(e){var{value:a}=e;if(Hr(a)||a instanceof Date)return a}var x$=(e,a,r)=>{var n=e.map(h$).filter(i=>i!=null);return r&&(a.dataKey==null||a.allowDuplicatedCategory&&i4(n))?H4(0,e.length):a.allowDuplicatedCategory?n:Array.from(new Set(n))},mE=e=>e.referenceElements.dots,ki=(e,a,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>a==="xAxis"?n.xAxisId===r:n.yAxisId===r),g$=le([mE,Bt,ef],ki),fE=e=>e.referenceElements.areas,b$=le([fE,Bt,ef],ki),pE=e=>e.referenceElements.lines,y$=le([pE,Bt,ef],ki),hE=(e,a)=>{var r=Ci(e.map(n=>a==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},v$=le(g$,Bt,hE),xE=(e,a)=>{var r=Ci(e.flatMap(n=>[a==="xAxis"?n.x1:n.y1,a==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},j$=le([b$,Bt],xE),gE=(e,a)=>{var r=Ci(e.map(n=>a==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},N$=le(y$,Bt,gE),w$=le(v$,N$,j$,(e,a,r)=>sm(e,r,a)),bE=(e,a,r,n,i,o,c,m)=>{if(r!=null)return r;var u=c==="vertical"&&m==="xAxis"||c==="horizontal"&&m==="yAxis",h=u?sm(n,o,i):sm(o,i);return zF(a,h,e.allowDataOverflow)},S$=le([wa,cE,dE,m$,p$,w$,at,Bt],bE,{memoizeOptions:{resultEqualityCheck:af}}),A$=[0,1],yE=(e,a,r,n,i,o,c)=>{if(!((e==null||r==null||r.length===0)&&c===void 0)){var{dataKey:m,type:u}=e,h=dl(a,o);return h&&m==null?H4(0,r.length):u==="category"?x$(n,e,h):i==="expand"?A$:c}},q0=le([wa,at,F0,nf,Xm,Bt,S$],yE),vE=(e,a,r,n,i)=>{if(e!=null){var{scale:o,type:c}=e;if(o==="auto")return a==="radial"&&i==="radiusAxis"?"band":a==="radial"&&i==="angleAxis"?"linear":c==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":c==="category"?"band":"linear";if(typeof o=="string"){var m="scale".concat(gc(o));return m in Uo?m:"point"}}},Ac=le([wa,at,Zk,T0,Bt],vE);function C$(e){if(e!=null){if(e in Uo)return Uo[e]();var a="scale".concat(gc(e));if(a in Uo)return Uo[a]()}}function H0(e,a,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=C$(a);if(i!=null){var o=i.domain(r).range(n);return Jz(o),o}}}var jE=(e,a,r)=>{var n=$0(a);if(!(r!=="auto"&&r!=="linear")){if(a!=null&&a.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&ll(e))return YF(e,a.tickCount,a.allowDecimals);if(a!=null&&a.tickCount&&a.type==="number"&&ll(e))return KF(e,a.tickCount,a.allowDecimals)}},V0=le([q0,wc,Ac],jE),NE=(e,a,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&ll(a)&&Array.isArray(r)&&r.length>0){var i=a[0],o=r[0],c=a[1],m=r[r.length-1];return[Math.min(i,o),Math.max(c,m)]}return a},k$=le([wa,q0,V0,Bt],NE),E$=le(nf,wa,(e,a)=>{if(!(!a||a.type!=="number")){var r=1/0,n=Array.from(Ci(e.map(m=>m.value))).sort((m,u)=>m-u);if(n.length<2)return 1/0;var i=n[n.length-1]-n[0];if(i===0)return 1/0;for(var o=0;o<n.length-1;o++){var c=n[o+1]-n[o];r=Math.min(r,c)}return r/i}}),wE=le(E$,at,$k,Xt,(e,a,r,n)=>n,(e,a,r,n,i)=>{if(!fa(e))return 0;var o=a==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var c=Er(r,e*o),m=e*o/2;return m-c-(m-c)/o*c}return 0}),O$=(e,a)=>{var r=zn(e,a);return r==null||typeof r.padding!="string"?0:wE(e,"xAxis",a,r.padding)},D$=(e,a)=>{var r=Ln(e,a);return r==null||typeof r.padding!="string"?0:wE(e,"yAxis",a,r.padding)},T$=le(zn,O$,(e,a)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:a,right:a}:{left:((r=i.left)!==null&&r!==void 0?r:0)+a,right:((n=i.right)!==null&&n!==void 0?n:0)+a}}),R$=le(Ln,D$,(e,a)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:a,bottom:a}:{top:((r=i.top)!==null&&r!==void 0?r:0)+a,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+a}}),P$=le([Xt,T$,$m,Fm,(e,a,r)=>r],(e,a,r,n,i)=>{var{padding:o}=n;return i?[o.left,r.width-o.right]:[e.left+a.left,e.left+e.width-a.right]}),_$=le([Xt,at,R$,$m,Fm,(e,a,r)=>r],(e,a,r,n,i,o)=>{var{padding:c}=i;return o?[n.height-c.bottom,c.top]:a==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Cc=(e,a,r,n)=>{var i;switch(a){case"xAxis":return P$(e,r,n);case"yAxis":return _$(e,r,n);case"zAxis":return(i=B0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return Vk(e);case"radiusAxis":return Yk(e,r);default:return}},SE=le([wa,Cc],Zm),Ei=le([wa,Ac,k$,SE],H0);le([Sc,U0,Bt],f$);function AE(e,a){return e.id<a.id?-1:e.id>a.id?1:0}var sf=(e,a)=>a,lf=(e,a,r)=>r,M$=le(Bm,sf,lf,(e,a,r)=>e.filter(n=>n.orientation===a).filter(n=>n.mirror===r).sort(AE)),z$=le(Im,sf,lf,(e,a,r)=>e.filter(n=>n.orientation===a).filter(n=>n.mirror===r).sort(AE)),CE=(e,a)=>({width:e.width,height:a.height}),L$=(e,a)=>{var r=typeof a.width=="number"?a.width:bc;return{width:r,height:e.height}},kE=le(Xt,zn,CE),B$=(e,a,r)=>{switch(a){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},I$=(e,a,r)=>{switch(a){case"left":return e.left;case"right":return r-e.right;default:return 0}},F$=le(_n,Xt,M$,sf,lf,(e,a,r,n,i)=>{var o={},c;return r.forEach(m=>{var u=CE(a,m);c==null&&(c=B$(a,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[m.id]=c-Number(h)*u.height,c+=(h?-1:1)*u.height}),o}),$$=le(Pn,Xt,z$,sf,lf,(e,a,r,n,i)=>{var o={},c;return r.forEach(m=>{var u=L$(a,m);c==null&&(c=I$(a,n,e));var h=n==="left"&&!i||n==="right"&&i;o[m.id]=c-Number(h)*u.width,c+=(h?-1:1)*u.width}),o}),U$=(e,a)=>{var r=zn(e,a);if(r!=null)return F$(e,r.orientation,r.mirror)},q$=le([Xt,zn,U$,(e,a)=>a],(e,a,r,n)=>{if(a!=null){var i=r?.[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),H$=(e,a)=>{var r=Ln(e,a);if(r!=null)return $$(e,r.orientation,r.mirror)},V$=le([Xt,Ln,H$,(e,a)=>a],(e,a,r,n)=>{if(a!=null){var i=r?.[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),EE=le(Xt,Ln,(e,a)=>{var r=typeof a.width=="number"?a.width:bc;return{width:r,height:e.height}}),$S=(e,a,r)=>{switch(a){case"xAxis":return kE(e,r).width;case"yAxis":return EE(e,r).height;default:return}},OE=(e,a,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:o,dataKey:c}=r,m=dl(e,n),u=a.map(h=>h.value);if(c&&m&&o==="category"&&i&&i4(u))return u}},Y0=le([at,nf,wa,Bt],OE),DE=(e,a,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:o}=r,c=dl(e,n);if(c&&(i==="number"||o!=="auto"))return a.map(m=>m.value)}},K0=le([at,nf,wc,Bt],DE),US=le([at,s$,Ac,Ei,Y0,K0,Cc,V0,Bt],(e,a,r,n,i,o,c,m,u)=>{if(a==null)return null;var h=dl(e,u);return{angle:a.angle,interval:a.interval,minTickGap:a.minTickGap,orientation:a.orientation,tick:a.tick,tickCount:a.tickCount,tickFormatter:a.tickFormatter,ticks:a.ticks,type:a.type,unit:a.unit,axisType:u,categoricalDomain:o,duplicateDomain:i,isCategorical:h,niceTicks:m,range:c,realScaleType:r,scale:n}}),Y$=(e,a,r,n,i,o,c,m,u)=>{if(!(a==null||n==null)){var h=dl(e,u),{type:p,ticks:x,tickCount:j}=a,v=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,w=p==="category"&&n.bandwidth?n.bandwidth()/v:0;w=u==="angleAxis"&&o!=null&&o.length>=2?Ra(o[0]-o[1])*2*w:w;var A=x||i;if(A){var S=A.map((g,C)=>{var k=c?c.indexOf(g):g;return{index:C,coordinate:n(k)+w,value:g,offset:w}});return S.filter(g=>!xr(g.coordinate))}return h&&m?m.map((g,C)=>({coordinate:n(g)+w,value:g,index:C,offset:w})):n.ticks?n.ticks(j).map(g=>({coordinate:n(g)+w,value:g,offset:w})):n.domain().map((g,C)=>({coordinate:n(g)+w,value:c?c[g]:g,index:C,offset:w}))}},TE=le([at,wc,Ac,Ei,V0,Cc,Y0,K0,Bt],Y$),K$=(e,a,r,n,i,o,c)=>{if(!(a==null||r==null||n==null||n[0]===n[1])){var m=dl(e,c),{tickCount:u}=a,h=0;return h=c==="angleAxis"&&n?.length>=2?Ra(n[0]-n[1])*2*h:h,m&&o?o.map((p,x)=>({coordinate:r(p)+h,value:p,index:x,offset:h})):r.ticks?r.ticks(u).map(p=>({coordinate:r(p)+h,value:p,offset:h})):r.domain().map((p,x)=>({coordinate:r(p)+h,value:i?i[p]:p,index:x,offset:h}))}},di=le([at,wc,Ei,Cc,Y0,K0,Bt],K$),ui=le(wa,Ei,(e,a)=>{if(!(e==null||a==null))return nm(nm({},e),{},{scale:a})}),G$=le([wa,Ac,q0,SE],H0);le((e,a,r)=>B0(e,r),G$,(e,a)=>{if(!(e==null||a==null))return nm(nm({},e),{},{scale:a})});var J$=le([at,Bm,Im],(e,a,r)=>{switch(e){case"horizontal":return a.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),RE=e=>e.options.defaultTooltipEventType,PE=e=>e.options.validateTooltipEventTypes;function _E(e,a,r){if(e==null)return a;var n=e?"axis":"item";return r==null?a:r.includes(n)?n:a}function G0(e,a){var r=RE(e),n=PE(e);return _E(a,r,n)}function W$(e){return Te(a=>G0(a,e))}var ME=(e,a)=>{var r,n=Number(a);if(!(xr(n)||a==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},X$=e=>e.tooltip.settings,ms={active:!1,index:null,dataKey:void 0,coordinate:void 0},Z$={itemInteraction:{click:ms,hover:ms},axisInteraction:{click:ms,hover:ms},keyboardInteraction:ms,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},zE=za({name:"tooltip",initialState:Z$,reducers:{addTooltipEntrySettings:{reducer(e,a){e.tooltipItemPayloads.push(a.payload)},prepare:xa()},removeTooltipEntrySettings:{reducer(e,a){var r=yn(e).tooltipItemPayloads.indexOf(a.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:xa()},setTooltipSettingsState(e,a){e.settings=a.payload},setActiveMouseOverItemIndex(e,a){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=a.payload.activeIndex,e.itemInteraction.hover.dataKey=a.payload.activeDataKey,e.itemInteraction.hover.coordinate=a.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,a){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=a.payload.activeIndex,e.itemInteraction.click.dataKey=a.payload.activeDataKey,e.itemInteraction.click.coordinate=a.payload.activeCoordinate},setMouseOverAxisIndex(e,a){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=a.payload.activeIndex,e.axisInteraction.hover.dataKey=a.payload.activeDataKey,e.axisInteraction.hover.coordinate=a.payload.activeCoordinate},setMouseClickAxisIndex(e,a){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=a.payload.activeIndex,e.axisInteraction.click.dataKey=a.payload.activeDataKey,e.axisInteraction.click.coordinate=a.payload.activeCoordinate},setSyncInteraction(e,a){e.syncInteraction=a.payload},setKeyboardInteraction(e,a){e.keyboardInteraction.active=a.payload.active,e.keyboardInteraction.index=a.payload.activeIndex,e.keyboardInteraction.coordinate=a.payload.activeCoordinate,e.keyboardInteraction.dataKey=a.payload.activeDataKey}}}),{addTooltipEntrySettings:Q$,removeTooltipEntrySettings:eU,setTooltipSettingsState:tU,setActiveMouseOverItemIndex:LE,mouseLeaveItem:aU,mouseLeaveChart:BE,setActiveClickItemIndex:rU,setMouseOverAxisIndex:IE,setMouseClickAxisIndex:nU,setSyncInteraction:ob,setKeyboardInteraction:cb}=zE.actions,sU=zE.reducer;function qS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ou(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?qS(Object(r),!0).forEach(function(n){lU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lU(e,a,r){return(a=iU(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function iU(e){var a=oU(e,"string");return typeof a=="symbol"?a:a+""}function oU(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function cU(e,a,r){return a==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function dU(e){return e.index!=null}var FE=(e,a,r,n)=>{if(a==null)return ms;var i=cU(e,a,r);if(i==null)return ms;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(dU(i)){if(o)return ou(ou({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return ou(ou({},ms),{},{coordinate:i.coordinate})},J0=(e,a)=>{var r=e?.index;if(r==null)return null;var n=Number(r);if(!fa(n))return r;var i=0,o=1/0;return a.length>0&&(o=a.length-1),String(Math.max(i,Math.min(n,o)))},$E=(e,a,r,n,i,o,c,m)=>{if(!(o==null||m==null)){var u=c[0],h=u==null?void 0:m(u.positions,o);if(h!=null)return h;var p=i?.[Number(o)];if(p)switch(r){case"horizontal":return{x:p.coordinate,y:(n.top+a)/2};default:return{x:(n.left+e)/2,y:p.coordinate}}}},UE=(e,a,r,n)=>{if(a==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return r==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&n!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var c;return((c=o.settings)===null||c===void 0?void 0:c.dataKey)===i})},kc=e=>e.options.tooltipPayloadSearcher,Oi=e=>e.tooltip;function HS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function VS(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?HS(Object(r),!0).forEach(function(n){uU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uU(e,a,r){return(a=mU(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function mU(e){var a=fU(e,"string");return typeof a=="symbol"?a:a+""}function fU(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function pU(e,a){return e??a}var qE=(e,a,r,n,i,o,c)=>{if(!(a==null||o==null)){var{chartData:m,computedData:u,dataStartIndex:h,dataEndIndex:p}=r,x=[];return e.reduce((j,v)=>{var w,{dataDefinedOnItem:A,settings:S}=v,g=pU(A,m),C=Array.isArray(g)?w4(g,h,p):g,k=(w=S?.dataKey)!==null&&w!==void 0?w:n,O=S?.nameKey,D;if(n&&Array.isArray(C)&&!Array.isArray(C[0])&&c==="axis"?D=T8(C,n,i):D=o(C,a,u,O),Array.isArray(D))D.forEach(L=>{var T=VS(VS({},S),{},{name:L.name,unit:L.unit,color:void 0,fill:void 0});j.push(N1({tooltipEntrySettings:T,dataKey:L.dataKey,payload:L.payload,value:Na(L.payload,L.dataKey),name:L.name}))});else{var B;j.push(N1({tooltipEntrySettings:S,dataKey:k,payload:D,value:Na(D,k),name:(B=Na(D,O))!==null&&B!==void 0?B:S?.name}))}return j},x)}},W0=le([Ft,at,Zk,T0,It],vE),hU=le([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,a)=>[...e,...a]),xU=le([It,Ai],Qk),Ec=le([hU,Ft,xU],eE,{memoizeOptions:{resultEqualityCheck:rf}}),gU=le([Ec],e=>e.filter(tf)),bU=le([Ec],rE,{memoizeOptions:{resultEqualityCheck:rf}}),Di=le([bU,ws],nE),yU=le([gU,ws,Ft],Jk),X0=le([Di,Ft,Ec],sE),HE=le([Ft],$0),vU=le([Ft],e=>e.allowDataOverflow),VE=le([HE,vU],Ak),jU=le([Ec],e=>e.filter(tf)),NU=le([yU,jU,Xm],iE),wU=le([NU,ws,It,VE],oE),SU=le([Ec],aE),AU=le([Di,Ft,SU,U0,It],uE,{memoizeOptions:{resultEqualityCheck:af}}),CU=le([mE,It,Ai],ki),kU=le([CU,It],hE),EU=le([fE,It,Ai],ki),OU=le([EU,It],xE),DU=le([pE,It,Ai],ki),TU=le([DU,It],gE),RU=le([kU,TU,OU],sm),PU=le([Ft,HE,VE,wU,AU,RU,at,It],bE),YE=le([Ft,at,Di,X0,Xm,It,PU],yE),_U=le([YE,Ft,W0],jE),MU=le([Ft,YE,_U,It],NE),KE=e=>{var a=It(e),r=Ai(e),n=!1;return Cc(e,a,r,n)},GE=le([Ft,KE],Zm),JE=le([Ft,W0,MU,GE],H0),zU=le([at,X0,Ft,It],OE),LU=le([at,X0,Ft,It],DE),BU=(e,a,r,n,i,o,c,m)=>{if(a){var{type:u}=a,h=dl(e,m);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,x=u==="category"&&n.bandwidth?n.bandwidth()/p:0;return x=m==="angleAxis"&&i!=null&&i?.length>=2?Ra(i[0]-i[1])*2*x:x,h&&c?c.map((j,v)=>({coordinate:n(j)+x,value:j,index:v,offset:x})):n.domain().map((j,v)=>({coordinate:n(j)+x,value:o?o[j]:j,index:v,offset:x}))}}},Bn=le([at,Ft,W0,JE,KE,zU,LU,It],BU),Z0=le([RE,PE,X$],(e,a,r)=>_E(r.shared,e,a)),WE=e=>e.tooltip.settings.trigger,Q0=e=>e.tooltip.settings.defaultIndex,of=le([Oi,Z0,WE,Q0],FE),mi=le([of,Di],J0),XE=le([Bn,mi],ME),ZE=le([of],e=>{if(e)return e.dataKey}),QE=le([Oi,Z0,WE,Q0],UE),IU=le([Pn,_n,at,Xt,Bn,Q0,QE,kc],$E),FU=le([of,IU],(e,a)=>e!=null&&e.coordinate?e.coordinate:a),$U=le([of],e=>e.active),UU=le([QE,mi,ws,Gk,XE,kc,Z0],qE);le([UU],e=>{if(e!=null){var a=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(a))}});function YS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function KS(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?YS(Object(r),!0).forEach(function(n){qU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qU(e,a,r){return(a=HU(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function HU(e){var a=VU(e,"string");return typeof a=="symbol"?a:a+""}function VU(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var YU=()=>Te(Ft),KU=()=>{var e=YU(),a=Te(Bn),r=Te(JE);return Qb(KS(KS({},e),{},{scale:r}),a)},GU=()=>Te(T0),ey=(e,a)=>a,eO=(e,a,r)=>r,ty=(e,a,r,n)=>n,JU=le(Bn,e=>Lm(e,a=>a.coordinate)),ay=le([Oi,ey,eO,ty],FE),tO=le([ay,Di],J0),WU=(e,a,r)=>{if(a!=null){var n=Oi(e);return a==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},aO=le([Oi,ey,eO,ty],UE),lm=le([Pn,_n,at,Xt,Bn,ty,aO,kc],$E),XU=le([ay,lm],(e,a)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:a}),rO=le(Bn,tO,ME),ZU=le([aO,tO,ws,Gk,rO,kc,ey],qE),QU=le([ay],e=>({isActive:e.active,activeIndex:e.index})),eq=(e,a,r,n,i,o,c,m)=>{if(!(!e||!a||!n||!i||!o)){var u=lL(e.chartX,e.chartY,a,r,m);if(u){var h=oL(u,a),p=Kz(h,c,o,n,i),x=iL(a,o,p,u);return{activeIndex:String(p),activeCoordinate:x}}}};function db(){return db=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},db.apply(null,arguments)}function GS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cu(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?GS(Object(r),!0).forEach(function(n){tq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tq(e,a,r){return(a=aq(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function aq(e){var a=rq(e,"string");return typeof a=="symbol"?a:a+""}function rq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function nq(e){var{coordinate:a,payload:r,index:n,offset:i,tooltipAxisBandSize:o,layout:c,cursor:m,tooltipEventType:u,chartName:h}=e,p=a,x=r,j=n;if(!m||!p||h!=="ScatterChart"&&u!=="axis")return null;var v,w;if(h==="ScatterChart")v=p,w=gB;else if(h==="BarChart")v=bB(c,p,i,o),w=F4;else if(c==="radial"){var{cx:A,cy:S,radius:g,startAngle:C,endAngle:k}=$4(p);v={cx:A,cy:S,startAngle:C,endAngle:k,innerRadius:g,outerRadius:g},w=q4}else v={points:tI(c,p,i)},w=oB;var O=typeof m=="object"&&"className"in m?m.className:void 0,D=cu(cu(cu(cu({stroke:"#ccc",pointerEvents:"none"},i),v),qb(m)),{},{payload:x,payloadIndex:j,className:gt("recharts-tooltip-cursor",O)});return b.isValidElement(m)?b.cloneElement(m,D):b.createElement(w,D)}function sq(e){var a=KU(),r=T4(),n=a0(),i=GU();return b.createElement(nq,db({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:n,tooltipAxisBandSize:a,chartName:i}))}var nO=b.createContext(null),lq=()=>b.useContext(nO),sg={exports:{}},JS;function iq(){return JS||(JS=1,(function(e){var a=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,h,p){this.fn=u,this.context=h,this.once=p||!1}function o(u,h,p,x,j){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,x||u,j),w=r?r+h:h;return u._events[w]?u._events[w].fn?u._events[w]=[u._events[w],v]:u._events[w].push(v):(u._events[w]=v,u._eventsCount++),u}function c(u,h){--u._eventsCount===0?u._events=new n:delete u._events[h]}function m(){this._events=new n,this._eventsCount=0}m.prototype.eventNames=function(){var h=[],p,x;if(this._eventsCount===0)return h;for(x in p=this._events)a.call(p,x)&&h.push(r?x.slice(1):x);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},m.prototype.listeners=function(h){var p=r?r+h:h,x=this._events[p];if(!x)return[];if(x.fn)return[x.fn];for(var j=0,v=x.length,w=new Array(v);j<v;j++)w[j]=x[j].fn;return w},m.prototype.listenerCount=function(h){var p=r?r+h:h,x=this._events[p];return x?x.fn?1:x.length:0},m.prototype.emit=function(h,p,x,j,v,w){var A=r?r+h:h;if(!this._events[A])return!1;var S=this._events[A],g=arguments.length,C,k;if(S.fn){switch(S.once&&this.removeListener(h,S.fn,void 0,!0),g){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,p),!0;case 3:return S.fn.call(S.context,p,x),!0;case 4:return S.fn.call(S.context,p,x,j),!0;case 5:return S.fn.call(S.context,p,x,j,v),!0;case 6:return S.fn.call(S.context,p,x,j,v,w),!0}for(k=1,C=new Array(g-1);k<g;k++)C[k-1]=arguments[k];S.fn.apply(S.context,C)}else{var O=S.length,D;for(k=0;k<O;k++)switch(S[k].once&&this.removeListener(h,S[k].fn,void 0,!0),g){case 1:S[k].fn.call(S[k].context);break;case 2:S[k].fn.call(S[k].context,p);break;case 3:S[k].fn.call(S[k].context,p,x);break;case 4:S[k].fn.call(S[k].context,p,x,j);break;default:if(!C)for(D=1,C=new Array(g-1);D<g;D++)C[D-1]=arguments[D];S[k].fn.apply(S[k].context,C)}}return!0},m.prototype.on=function(h,p,x){return o(this,h,p,x,!1)},m.prototype.once=function(h,p,x){return o(this,h,p,x,!0)},m.prototype.removeListener=function(h,p,x,j){var v=r?r+h:h;if(!this._events[v])return this;if(!p)return c(this,v),this;var w=this._events[v];if(w.fn)w.fn===p&&(!j||w.once)&&(!x||w.context===x)&&c(this,v);else{for(var A=0,S=[],g=w.length;A<g;A++)(w[A].fn!==p||j&&!w[A].once||x&&w[A].context!==x)&&S.push(w[A]);S.length?this._events[v]=S.length===1?S[0]:S:c(this,v)}return this},m.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&c(this,p)):(this._events=new n,this._eventsCount=0),this},m.prototype.off=m.prototype.removeListener,m.prototype.addListener=m.prototype.on,m.prefixed=r,m.EventEmitter=m,e.exports=m})(sg)),sg.exports}var oq=iq();const cq=Or(oq);var lc=new cq,ub="recharts.syncEvent.tooltip",WS="recharts.syncEvent.brush";function dq(e,a){if(a){var r=Number.parseInt(a,10);if(!xr(r))return e?.[r]}}var uq={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},sO=za({name:"options",initialState:uq,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),mq=sO.reducer,{createEventEmitter:fq}=sO.actions;function pq(e){return e.tooltip.syncInteraction}var hq={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},lO=za({name:"chartData",initialState:hq,reducers:{setChartData(e,a){if(e.chartData=a.payload,a.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}a.payload.length>0&&e.dataEndIndex!==a.payload.length-1&&(e.dataEndIndex=a.payload.length-1)},setComputedData(e,a){e.computedData=a.payload},setDataStartEndIndexes(e,a){var{startIndex:r,endIndex:n}=a.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:XS,setDataStartEndIndexes:xq,setComputedData:ZX}=lO.actions,gq=lO.reducer,bq=["x","y"];function ZS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ql(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?ZS(Object(r),!0).forEach(function(n){yq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yq(e,a,r){return(a=vq(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function vq(e){var a=jq(e,"string");return typeof a=="symbol"?a:a+""}function jq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Nq(e,a){if(e==null)return{};var r,n,i=wq(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function wq(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var iO=()=>{};function Sq(){var e=Te(R0),a=Te(P0),r=zt(),n=Te(Uk),i=Te(Bn),o=a0(),c=Um(),m=Te(u=>u.rootProps.className);b.useEffect(()=>{if(e==null)return iO;var u=(h,p,x)=>{if(a!==x&&e===h){if(n==="index"){var j;if(c&&p!==null&&p!==void 0&&(j=p.payload)!==null&&j!==void 0&&j.coordinate&&p.payload.sourceViewBox){var v=p.payload.coordinate,{x:w,y:A}=v,S=Nq(v,bq),{x:g,y:C,width:k,height:O}=p.payload.sourceViewBox,D=Ql(Ql({},S),{},{x:c.x+(k?(w-g)/k:0)*c.width,y:c.y+(O?(A-C)/O:0)*c.height});r(Ql(Ql({},p),{},{payload:Ql(Ql({},p.payload),{},{coordinate:D})}))}else r(p);return}if(i!=null){var B;if(typeof n=="function"){var L={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},T=n(i,L);B=i[T]}else n==="value"&&(B=i.find(V=>String(V.value)===p.payload.label));var{coordinate:R}=p.payload;if(B==null||p.payload.active===!1||R==null||c==null){r(ob({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0}));return}var{x:z,y:$}=R,Z=Math.min(z,c.x+c.width),fe=Math.min($,c.y+c.height),se={x:o==="horizontal"?B.coordinate:Z,y:o==="horizontal"?fe:B.coordinate},ie=ob({active:p.payload.active,coordinate:se,dataKey:p.payload.dataKey,index:String(B.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox});r(ie)}}};return lc.on(ub,u),()=>{lc.off(ub,u)}},[m,r,a,e,n,i,o,c])}function Aq(){var e=Te(R0),a=Te(P0),r=zt();b.useEffect(()=>{if(e==null)return iO;var n=(i,o,c)=>{a!==c&&e===i&&r(xq(o))};return lc.on(WS,n),()=>{lc.off(WS,n)}},[r,a,e])}function Cq(){var e=zt();b.useEffect(()=>{e(fq())},[e]),Sq(),Aq()}function kq(e,a,r,n,i,o){var c=Te(v=>WU(v,e,a)),m=Te(P0),u=Te(R0),h=Te(Uk),p=Te(pq),x=p?.active,j=Um();b.useEffect(()=>{if(!x&&u!=null&&m!=null){var v=ob({active:o,coordinate:r,dataKey:c,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:j});lc.emit(ub,u,v,m)}},[x,r,c,i,n,m,u,h,o,j])}function QS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function eA(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?QS(Object(r),!0).forEach(function(n){Eq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eq(e,a,r){return(a=Oq(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function Oq(e){var a=Dq(e,"string");return typeof a=="symbol"?a:a+""}function Dq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Tq(e){return e.dataKey}function Rq(e,a){return b.isValidElement(e)?b.cloneElement(e,a):typeof e=="function"?b.createElement(e,a):b.createElement(GL,a)}var tA=[],Pq={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!ji.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function _q(e){var a=vr(e,Pq),{active:r,allowEscapeViewBox:n,animationDuration:i,animationEasing:o,content:c,filterNull:m,isAnimationActive:u,offset:h,payloadUniqBy:p,position:x,reverseDirection:j,useTranslate3d:v,wrapperStyle:w,cursor:A,shared:S,trigger:g,defaultIndex:C,portal:k,axisId:O}=a,D=zt(),B=typeof C=="number"?String(C):C;b.useEffect(()=>{D(tU({shared:S,trigger:g,axisId:O,active:r,defaultIndex:B}))},[D,S,g,O,r,B]);var L=Um(),T=M4(),R=W$(S),{activeIndex:z,isActive:$}=Te(ve=>QU(ve,R,g,B)),Z=Te(ve=>ZU(ve,R,g,B)),fe=Te(ve=>rO(ve,R,g,B)),se=Te(ve=>XU(ve,R,g,B)),ie=Z,V=lq(),K=r??$,[ce,U]=kz([ie,K]),I=R==="axis"?fe:void 0;kq(R,g,se,I,z,K);var P=k??V;if(P==null)return null;var H=ie??tA;K||(H=tA),m&&H.length&&(H=cz(ie.filter(ve=>ve.value!=null&&(ve.hide!==!0||a.includeHidden)),p,Tq));var ee=H.length>0,pe=b.createElement(tB,{allowEscapeViewBox:n,animationDuration:i,animationEasing:o,isAnimationActive:u,active:K,coordinate:se,hasPayload:ee,offset:h,position:x,reverseDirection:j,useTranslate3d:v,viewBox:L,wrapperStyle:w,lastBoundingBox:ce,innerRef:U,hasPortalFromProps:!!k},Rq(c,eA(eA({},a),{},{payload:H,label:I,active:K,coordinate:se,accessibilityLayer:T})));return b.createElement(b.Fragment,null,d7.createPortal(pe,P),K&&b.createElement(sq,{cursor:A,tooltipEventType:R,coordinate:se,payload:ie,index:z}))}var oO=e=>null;oO.displayName="Cell";function Mq(e,a,r){return(a=zq(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function zq(e){var a=Lq(e,"string");return typeof a=="symbol"?a:a+""}function Lq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}class Bq{constructor(a){Mq(this,"cache",new Map),this.maxSize=a}get(a){var r=this.cache.get(a);return r!==void 0&&(this.cache.delete(a),this.cache.set(a,r)),r}set(a,r){if(this.cache.has(a))this.cache.delete(a);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(a,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function aA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Iq(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?aA(Object(r),!0).forEach(function(n){Fq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fq(e,a,r){return(a=$q(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function $q(e){var a=Uq(e,"string");return typeof a=="symbol"?a:a+""}function Uq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var qq={cacheSize:2e3,enableCache:!0},cO=Iq({},qq),rA=new Bq(cO.cacheSize),Hq={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},nA="recharts_measurement_span";function Vq(e,a){var r=a.fontSize||"",n=a.fontFamily||"",i=a.fontWeight||"",o=a.fontStyle||"",c=a.letterSpacing||"",m=a.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(o,"|").concat(c,"|").concat(m)}var sA=(e,a)=>{try{var r=document.getElementById(nA);r||(r=document.createElement("span"),r.setAttribute("id",nA),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,Hq,a),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Go=function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(a==null||ji.isSsr)return{width:0,height:0};if(!cO.enableCache)return sA(a,r);var n=Vq(a,r),i=rA.get(n);if(i)return i;var o=sA(a,r);return rA.set(n,o),o},lA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Yq=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Kq=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,dO={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Gq=Object.keys(dO),ei="NaN";function Jq(e,a){return e*dO[a]}class Ta{static parse(a){var r,[,n,i]=(r=Kq.exec(a))!==null&&r!==void 0?r:[];return new Ta(parseFloat(n),i??"")}constructor(a,r){this.num=a,this.unit=r,this.num=a,this.unit=r,xr(a)&&(this.unit=""),r!==""&&!Yq.test(r)&&(this.num=NaN,this.unit=""),Gq.includes(r)&&(this.num=Jq(a,r),this.unit="px")}add(a){return this.unit!==a.unit?new Ta(NaN,""):new Ta(this.num+a.num,this.unit)}subtract(a){return this.unit!==a.unit?new Ta(NaN,""):new Ta(this.num-a.num,this.unit)}multiply(a){return this.unit!==""&&a.unit!==""&&this.unit!==a.unit?new Ta(NaN,""):new Ta(this.num*a.num,this.unit||a.unit)}divide(a){return this.unit!==""&&a.unit!==""&&this.unit!==a.unit?new Ta(NaN,""):new Ta(this.num/a.num,this.unit||a.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return xr(this.num)}}function uO(e){if(e.includes(ei))return ei;for(var a=e;a.includes("*")||a.includes("/");){var r,[,n,i,o]=(r=lA.exec(a))!==null&&r!==void 0?r:[],c=Ta.parse(n??""),m=Ta.parse(o??""),u=i==="*"?c.multiply(m):c.divide(m);if(u.isNaN())return ei;a=a.replace(lA,u.toString())}for(;a.includes("+")||/.-\d+(?:\.\d+)?/.test(a);){var h,[,p,x,j]=(h=iA.exec(a))!==null&&h!==void 0?h:[],v=Ta.parse(p??""),w=Ta.parse(j??""),A=x==="+"?v.add(w):v.subtract(w);if(A.isNaN())return ei;a=a.replace(iA,A.toString())}return a}var oA=/\(([^()]*)\)/;function Wq(e){for(var a=e,r;(r=oA.exec(a))!=null;){var[,n]=r;a=a.replace(oA,uO(n))}return a}function Xq(e){var a=e.replace(/\s+/g,"");return a=Wq(a),a=uO(a),a}function Zq(e){try{return Xq(e)}catch{return ei}}function lg(e){var a=Zq(e.slice(5,-1));return a===ei?"":a}var Qq=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],eH=["dx","dy","angle","className","breakAll"];function mb(){return mb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mb.apply(null,arguments)}function cA(e,a){if(e==null)return{};var r,n,i=tH(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function tH(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var mO=/[ \f\n\r\t\v\u2028\u2029]+/,fO=e=>{var{children:a,breakAll:r,style:n}=e;try{var i=[];Gt(a)||(r?i=a.toString().split(""):i=a.toString().split(mO));var o=i.map(m=>({word:m,width:Go(m,n).width})),c=r?0:Go(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:c}}catch{return null}},aH=(e,a,r,n,i)=>{var{maxLines:o,children:c,style:m,breakAll:u}=e,h=De(o),p=c,x=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce((Z,fe)=>{var{word:se,width:ie}=fe,V=Z[Z.length-1];if(V&&(n==null||i||V.width+ie+r<Number(n)))V.words.push(se),V.width+=ie+r;else{var K={words:[se],width:ie};Z.push(K)}return Z},[])},j=x(a),v=z=>z.reduce(($,Z)=>$.width>Z.width?$:Z);if(!h||i)return j;var w=j.length>o||v(j).width>Number(n);if(!w)return j;for(var A="…",S=z=>{var $=p.slice(0,z),Z=fO({breakAll:u,style:m,children:$+A}).wordsWithComputedWidth,fe=x(Z),se=fe.length>o||v(fe).width>Number(n);return[se,fe]},g=0,C=p.length-1,k=0,O;g<=C&&k<=p.length-1;){var D=Math.floor((g+C)/2),B=D-1,[L,T]=S(B),[R]=S(D);if(!L&&!R&&(g=D+1),L&&R&&(C=D-1),!L&&R){O=T;break}k++}return O||j},dA=e=>{var a=Gt(e)?[]:e.toString().split(mO);return[{words:a}]},rH=e=>{var{width:a,scaleToFit:r,children:n,style:i,breakAll:o,maxLines:c}=e;if((a||r)&&!ji.isSsr){var m,u,h=fO({breakAll:o,children:n,style:i});if(h){var{wordsWithComputedWidth:p,spaceWidth:x}=h;m=p,u=x}else return dA(n);return aH({breakAll:o,children:n,maxLines:c,style:i},m,u,a,r)}return dA(n)},uA="#808080",ry=b.forwardRef((e,a)=>{var{x:r=0,y:n=0,lineHeight:i="1em",capHeight:o="0.71em",scaleToFit:c=!1,textAnchor:m="start",verticalAnchor:u="end",fill:h=uA}=e,p=cA(e,Qq),x=b.useMemo(()=>rH({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:c,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,c,p.style,p.width]),{dx:j,dy:v,angle:w,className:A,breakAll:S}=p,g=cA(p,eH);if(!Hr(r)||!Hr(n)||x.length===0)return null;var C=r+(De(j)?j:0),k=n+(De(v)?v:0),O;switch(u){case"start":O=lg("calc(".concat(o,")"));break;case"middle":O=lg("calc(".concat((x.length-1)/2," * -").concat(i," + (").concat(o," / 2))"));break;default:O=lg("calc(".concat(x.length-1," * -").concat(i,")"));break}var D=[];if(c){var B=x[0].width,{width:L}=p;D.push("scale(".concat(De(L)?L/B:1,")"))}return w&&D.push("rotate(".concat(w,", ").concat(C,", ").concat(k,")")),D.length&&(g.transform=D.join(" ")),b.createElement("text",mb({},hr(g),{ref:a,x:C,y:k,className:gt("recharts-text",A),textAnchor:m,fill:h.includes("url")?uA:h}),x.map((T,R)=>{var z=T.words.join(S?"":" ");return b.createElement("tspan",{x:C,dy:R===0?O:i,key:"".concat(z,"-").concat(R)},z)}))});ry.displayName="Text";var nH=["labelRef"];function sH(e,a){if(e==null)return{};var r,n,i=lH(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lH(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function mA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?mA(Object(r),!0).forEach(function(n){iH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iH(e,a,r){return(a=oH(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function oH(e){var a=cH(e,"string");return typeof a=="symbol"?a:a+""}function cH(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function xn(){return xn=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xn.apply(null,arguments)}var pO=b.createContext(null),dH=e=>{var{x:a,y:r,width:n,height:i,children:o}=e,c=b.useMemo(()=>({x:a,y:r,width:n,height:i}),[a,r,n,i]);return b.createElement(pO.Provider,{value:c},o)},hO=()=>{var e=b.useContext(pO),a=Um();return e||a},uH=b.createContext(null),mH=()=>{var e=b.useContext(uH),a=Te(Kk);return e||a},fH=e=>{var{value:a,formatter:r}=e,n=Gt(e.children)?a:e.children;return typeof r=="function"?r(n):n},ny=e=>e!=null&&typeof e=="function",pH=(e,a)=>{var r=Ra(a-e),n=Math.min(Math.abs(a-e),360);return r*n},hH=(e,a,r,n,i)=>{var{offset:o,className:c}=e,{cx:m,cy:u,innerRadius:h,outerRadius:p,startAngle:x,endAngle:j,clockWise:v}=i,w=(h+p)/2,A=pH(x,j),S=A>=0?1:-1,g,C;switch(a){case"insideStart":g=x+S*o,C=v;break;case"insideEnd":g=j-S*o,C=!v;break;case"end":g=j+S*o,C=v;break;default:throw new Error("Unsupported position ".concat(a))}C=A<=0?C:!C;var k=oa(m,u,w,g),O=oa(m,u,w,g+(C?1:-1)*359),D="M".concat(k.x,",").concat(k.y,`
A`).concat(w,",").concat(w,",0,1,").concat(C?0:1,`,
`).concat(O.x,",").concat(O.y),B=Gt(e.id)?Qo("recharts-radial-line-"):e.id;return b.createElement("text",xn({},n,{dominantBaseline:"central",className:gt("recharts-radial-bar-label",c)}),b.createElement("defs",null,b.createElement("path",{id:B,d:D})),b.createElement("textPath",{xlinkHref:"#".concat(B)},r))},xH=(e,a,r)=>{var{cx:n,cy:i,innerRadius:o,outerRadius:c,startAngle:m,endAngle:u}=e,h=(m+u)/2;if(r==="outside"){var{x:p,y:x}=oa(n,i,c+a,h);return{x:p,y:x,textAnchor:p>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var j=(o+c)/2,{x:v,y:w}=oa(n,i,j,h);return{x:v,y:w,textAnchor:"middle",verticalAnchor:"middle"}},xO=e=>"cx"in e&&De(e.cx),gH=(e,a)=>{var{parentViewBox:r,offset:n,position:i}=e,o;r!=null&&!xO(r)&&(o=r);var{x:c,y:m,width:u,height:h}=a,p=h>=0?1:-1,x=p*n,j=p>0?"end":"start",v=p>0?"start":"end",w=u>=0?1:-1,A=w*n,S=w>0?"end":"start",g=w>0?"start":"end";if(i==="top"){var C={x:c+u/2,y:m-p*n,textAnchor:"middle",verticalAnchor:j};return Et(Et({},C),o?{height:Math.max(m-o.y,0),width:u}:{})}if(i==="bottom"){var k={x:c+u/2,y:m+h+x,textAnchor:"middle",verticalAnchor:v};return Et(Et({},k),o?{height:Math.max(o.y+o.height-(m+h),0),width:u}:{})}if(i==="left"){var O={x:c-A,y:m+h/2,textAnchor:S,verticalAnchor:"middle"};return Et(Et({},O),o?{width:Math.max(O.x-o.x,0),height:h}:{})}if(i==="right"){var D={x:c+u+A,y:m+h/2,textAnchor:g,verticalAnchor:"middle"};return Et(Et({},D),o?{width:Math.max(o.x+o.width-D.x,0),height:h}:{})}var B=o?{width:u,height:h}:{};return i==="insideLeft"?Et({x:c+A,y:m+h/2,textAnchor:g,verticalAnchor:"middle"},B):i==="insideRight"?Et({x:c+u-A,y:m+h/2,textAnchor:S,verticalAnchor:"middle"},B):i==="insideTop"?Et({x:c+u/2,y:m+x,textAnchor:"middle",verticalAnchor:v},B):i==="insideBottom"?Et({x:c+u/2,y:m+h-x,textAnchor:"middle",verticalAnchor:j},B):i==="insideTopLeft"?Et({x:c+A,y:m+x,textAnchor:g,verticalAnchor:v},B):i==="insideTopRight"?Et({x:c+u-A,y:m+x,textAnchor:S,verticalAnchor:v},B):i==="insideBottomLeft"?Et({x:c+A,y:m+h-x,textAnchor:g,verticalAnchor:j},B):i==="insideBottomRight"?Et({x:c+u-A,y:m+h-x,textAnchor:S,verticalAnchor:j},B):i&&typeof i=="object"&&(De(i.x)||Cn(i.x))&&(De(i.y)||Cn(i.y))?Et({x:c+Er(i.x,u),y:m+Er(i.y,h),textAnchor:"end",verticalAnchor:"end"},B):Et({x:c+u/2,y:m+h/2,textAnchor:"middle",verticalAnchor:"middle"},B)},bH={offset:5};function ds(e){var a=vr(e,bH),{viewBox:r,position:n,value:i,children:o,content:c,className:m="",textBreakAll:u,labelRef:h}=a,p=mH(),x=hO(),j=n==="center"?x:p??x,v=r||j;if(!v||Gt(i)&&Gt(o)&&!b.isValidElement(c)&&typeof c!="function")return null;var w=Et(Et({},a),{},{viewBox:v});if(b.isValidElement(c)){var{labelRef:A}=w,S=sH(w,nH);return b.cloneElement(c,S)}var g;if(typeof c=="function"){if(g=b.createElement(c,w),b.isValidElement(g))return g}else g=fH(a);var C=xO(v),k=hr(a);if(C&&(n==="insideStart"||n==="insideEnd"||n==="end"))return hH(a,n,g,k,v);var O=C?xH(v,a.offset,a.position):gH(a,v);return b.createElement(ry,xn({ref:h,className:gt("recharts-label",m)},k,O,{breakAll:u}),g)}ds.displayName="Label";var yH=(e,a,r)=>{if(!e)return null;var n={viewBox:a,labelRef:r};return e===!0?b.createElement(ds,xn({key:"label-implicit"},n)):Hr(e)?b.createElement(ds,xn({key:"label-implicit",value:e},n)):b.isValidElement(e)?e.type===ds?b.cloneElement(e,Et({key:"label-implicit"},n)):b.createElement(ds,xn({key:"label-implicit",content:e},n)):ny(e)?b.createElement(ds,xn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?b.createElement(ds,xn({},e,{key:"label-implicit"},n)):null};function vH(e){var{label:a,labelRef:r}=e,n=hO();return yH(a,n,r)||null}var ig={},og={},fA;function jH(){return fA||(fA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r[r.length-1]}e.last=a})(og)),og}var cg={},pA;function NH(){return pA||(pA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=a})(cg)),cg}var hA;function wH(){return hA||(hA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=jH(),r=NH(),n=Xb();function i(o){if(n.isArrayLike(o))return a.last(r.toArray(o))}e.last=i})(ig)),ig}var dg,xA;function SH(){return xA||(xA=1,dg=wH().last),dg}var AH=SH();const CH=Or(AH);var kH=["valueAccessor"],EH=["dataKey","clockWise","id","textBreakAll"];function im(){return im=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},im.apply(null,arguments)}function gA(e,a){if(e==null)return{};var r,n,i=OH(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function OH(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var DH=e=>Array.isArray(e.value)?CH(e.value):e.value,gO=b.createContext(void 0),TH=gO.Provider,bO=b.createContext(void 0);bO.Provider;function RH(){return b.useContext(gO)}function PH(){return b.useContext(bO)}function Au(e){var{valueAccessor:a=DH}=e,r=gA(e,kH),{dataKey:n,clockWise:i,id:o,textBreakAll:c}=r,m=gA(r,EH),u=RH(),h=PH(),p=u||h;return!p||!p.length?null:b.createElement(xs,{className:"recharts-label-list"},p.map((x,j)=>{var v,w=Gt(n)?a(x,j):Na(x&&x.payload,n),A=Gt(o)?{}:{id:"".concat(o,"-").concat(j)};return b.createElement(ds,im({key:"label-".concat(j)},hr(x),m,A,{fill:(v=r.fill)!==null&&v!==void 0?v:x.fill,parentViewBox:x.parentViewBox,value:w,textBreakAll:c,viewBox:x.viewBox,index:j}))}))}Au.displayName="LabelList";function _H(e){var{label:a}=e;return a?a===!0?b.createElement(Au,{key:"labelList-implicit"}):b.isValidElement(a)||ny(a)?b.createElement(Au,{key:"labelList-implicit",content:a}):typeof a=="object"?b.createElement(Au,im({key:"labelList-implicit"},a,{type:String(a.type)})):null:null}var MH={radiusAxis:{},angleAxis:{}},yO=za({name:"polarAxis",initialState:MH,reducers:{addRadiusAxis(e,a){e.radiusAxis[a.payload.id]=a.payload},removeRadiusAxis(e,a){delete e.radiusAxis[a.payload.id]},addAngleAxis(e,a){e.angleAxis[a.payload.id]=a.payload},removeAngleAxis(e,a){delete e.angleAxis[a.payload.id]}}}),{addRadiusAxis:QX,removeRadiusAxis:eZ,addAngleAxis:tZ,removeAngleAxis:aZ}=yO.actions,zH=yO.reducer,ug={exports:{}},lt={};/**
* @license React
* react-is.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 bA;function LH(){if(bA)return lt;bA=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),j=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function w(A){if(typeof A=="object"&&A!==null){var S=A.$$typeof;switch(S){case e:switch(A=A.type,A){case r:case i:case n:case u:case h:case j:return A;default:switch(A=A&&A.$$typeof,A){case c:case m:case x:case p:return A;case o:return A;default:return S}}case a:return S}}}return lt.ContextConsumer=o,lt.ContextProvider=c,lt.Element=e,lt.ForwardRef=m,lt.Fragment=r,lt.Lazy=x,lt.Memo=p,lt.Portal=a,lt.Profiler=i,lt.StrictMode=n,lt.Suspense=u,lt.SuspenseList=h,lt.isContextConsumer=function(A){return w(A)===o},lt.isContextProvider=function(A){return w(A)===c},lt.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===e},lt.isForwardRef=function(A){return w(A)===m},lt.isFragment=function(A){return w(A)===r},lt.isLazy=function(A){return w(A)===x},lt.isMemo=function(A){return w(A)===p},lt.isPortal=function(A){return w(A)===a},lt.isProfiler=function(A){return w(A)===i},lt.isStrictMode=function(A){return w(A)===n},lt.isSuspense=function(A){return w(A)===u},lt.isSuspenseList=function(A){return w(A)===h},lt.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===r||A===i||A===n||A===u||A===h||typeof A=="object"&&A!==null&&(A.$$typeof===x||A.$$typeof===p||A.$$typeof===c||A.$$typeof===o||A.$$typeof===m||A.$$typeof===v||A.getModuleId!==void 0)},lt.typeOf=w,lt}var yA;function BH(){return yA||(yA=1,ug.exports=LH()),ug.exports}var IH=BH(),vA=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",jA=null,mg=null,vO=e=>{if(e===jA&&Array.isArray(mg))return mg;var a=[];return b.Children.forEach(e,r=>{Gt(r)||(IH.isFragment(r)?a=a.concat(vO(r.props.children)):a.push(r))}),mg=a,jA=e,a};function FH(e,a){var r=[],n=[];return Array.isArray(a)?n=a.map(i=>vA(i)):n=[vA(a)],vO(e).forEach(i=>{var o=si(i,"type.displayName")||si(i,"type.name");n.indexOf(o)!==-1&&r.push(i)}),r}var fg={},NA;function $H(){return NA||(NA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=a})(fg)),fg}var pg,wA;function UH(){return wA||(wA=1,pg=$H().isPlainObject),pg}var qH=UH();const HH=Or(qH);function SA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function AA(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?SA(Object(r),!0).forEach(function(n){VH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VH(e,a,r){return(a=YH(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function YH(e){var a=KH(e,"string");return typeof a=="symbol"?a:a+""}function KH(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function om(){return om=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},om.apply(null,arguments)}var CA=(e,a,r,n,i)=>{var o=r-n,c;return c="M ".concat(e,",").concat(a),c+="L ".concat(e+r,",").concat(a),c+="L ".concat(e+r-o/2,",").concat(a+i),c+="L ".concat(e+r-o/2-n,",").concat(a+i),c+="L ".concat(e,",").concat(a," Z"),c},GH={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},JH=e=>{var a=vr(e,GH),{x:r,y:n,upperWidth:i,lowerWidth:o,height:c,className:m}=a,{animationEasing:u,animationDuration:h,animationBegin:p,isUpdateAnimationActive:x}=a,j=b.useRef(null),[v,w]=b.useState(-1),A=b.useRef(i),S=b.useRef(o),g=b.useRef(c),C=b.useRef(r),k=b.useRef(n),O=n0(e,"trapezoid-");if(b.useEffect(()=>{if(j.current&&j.current.getTotalLength)try{var se=j.current.getTotalLength();se&&w(se)}catch{}},[]),r!==+r||n!==+n||i!==+i||o!==+o||c!==+c||i===0&&o===0||c===0)return null;var D=gt("recharts-trapezoid",m);if(!x)return b.createElement("g",null,b.createElement("path",om({},hr(a),{className:D,d:CA(r,n,i,o,c)})));var B=A.current,L=S.current,T=g.current,R=C.current,z=k.current,$="0px ".concat(v===-1?1:v,"px"),Z="".concat(v,"px 0px"),fe=z4(["strokeDasharray"],h,u);return b.createElement(r0,{animationId:O,key:O,canBegin:v>0,duration:h,easing:u,isActive:x,begin:p},se=>{var ie=ga(B,i,se),V=ga(L,o,se),K=ga(T,c,se),ce=ga(R,r,se),U=ga(z,n,se);j.current&&(A.current=ie,S.current=V,g.current=K,C.current=ce,k.current=U);var I=se>0?{transition:fe,strokeDasharray:Z}:{strokeDasharray:$};return b.createElement("path",om({},hr(a),{className:D,d:CA(ce,U,ie,V,K),ref:j,style:AA(AA({},I),a.style)}))})},WH=["option","shapeType","propTransformer","activeClassName","isActive"];function XH(e,a){if(e==null)return{};var r,n,i=ZH(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ZH(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function kA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cm(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?kA(Object(r),!0).forEach(function(n){QH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QH(e,a,r){return(a=eV(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function eV(e){var a=tV(e,"string");return typeof a=="symbol"?a:a+""}function tV(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function aV(e,a){return cm(cm({},a),e)}function rV(e,a){return e==="symbols"}function EA(e){var{shapeType:a,elementProps:r}=e;switch(a){case"rectangle":return b.createElement(F4,r);case"trapezoid":return b.createElement(JH,r);case"sector":return b.createElement(q4,r);case"symbols":if(rV(a))return b.createElement(c4,r);break;default:return null}}function nV(e){return b.isValidElement(e)?e.props:e}function sV(e){var{option:a,shapeType:r,propTransformer:n=aV,activeClassName:i="recharts-active-shape",isActive:o}=e,c=XH(e,WH),m;if(b.isValidElement(a))m=b.cloneElement(a,cm(cm({},c),nV(a)));else if(typeof a=="function")m=a(c);else if(HH(a)&&typeof a!="boolean"){var u=n(a,c);m=b.createElement(EA,{shapeType:r,elementProps:u})}else{var h=c;m=b.createElement(EA,{shapeType:r,elementProps:h})}return o?b.createElement(xs,{className:i},m):m}var jO=(e,a)=>{var r=zt();return(n,i)=>o=>{e?.(n,i,o),r(LE({activeIndex:String(i),activeDataKey:a,activeCoordinate:n.tooltipPosition}))}},NO=e=>{var a=zt();return(r,n)=>i=>{e?.(r,n,i),a(aU())}},wO=(e,a)=>{var r=zt();return(n,i)=>o=>{e?.(n,i,o),r(rU({activeIndex:String(i),activeDataKey:a,activeCoordinate:n.tooltipPosition}))}};function lV(e){var{fn:a,args:r}=e,n=zt(),i=Wa();return b.useLayoutEffect(()=>{if(!i){var o=a(r);return n(Q$(o)),()=>{n(eU(o))}}},[a,r,n,i]),null}var iV=()=>{};function oV(e){var{legendPayload:a}=e,r=zt(),n=Wa();return b.useLayoutEffect(()=>n?iV:(r($L(a)),()=>{r(UL(a))}),[r,n,a]),null}var hg,cV=()=>{var[e]=b.useState(()=>Qo("uid-"));return e},dV=(hg=wT.useId)!==null&&hg!==void 0?hg:cV;function uV(e,a){var r=dV();return a||(e?"".concat(e,"-").concat(r):r)}var mV=b.createContext(void 0),fV=e=>{var{id:a,type:r,children:n}=e,i=uV("recharts-".concat(r),a);return b.createElement(mV.Provider,{value:i},n(i))},pV={cartesianItems:[],polarItems:[]},SO=za({name:"graphicalItems",initialState:pV,reducers:{addCartesianGraphicalItem:{reducer(e,a){e.cartesianItems.push(a.payload)},prepare:xa()},replaceCartesianGraphicalItem:{reducer(e,a){var{prev:r,next:n}=a.payload,i=yn(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:xa()},removeCartesianGraphicalItem:{reducer(e,a){var r=yn(e).cartesianItems.indexOf(a.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:xa()},addPolarGraphicalItem:{reducer(e,a){e.polarItems.push(a.payload)},prepare:xa()},removePolarGraphicalItem:{reducer(e,a){var r=yn(e).polarItems.indexOf(a.payload);r>-1&&e.polarItems.splice(r,1)},prepare:xa()}}}),{addCartesianGraphicalItem:hV,replaceCartesianGraphicalItem:xV,removeCartesianGraphicalItem:gV,addPolarGraphicalItem:rZ,removePolarGraphicalItem:nZ}=SO.actions,bV=SO.reducer;function yV(e){var a=zt(),r=b.useRef(null);return b.useLayoutEffect(()=>{r.current===null?a(hV(e)):r.current!==e&&a(xV({prev:r.current,next:e})),r.current=e},[a,e]),b.useLayoutEffect(()=>()=>{r.current&&(a(gV(r.current)),r.current=null)},[a]),null}function OA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DA(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?OA(Object(r),!0).forEach(function(n){vV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vV(e,a,r){return(a=jV(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function jV(e){var a=NV(e,"string");return typeof a=="symbol"?a:a+""}function NV(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var wV={xAxis:{},yAxis:{},zAxis:{}},AO=za({name:"cartesianAxis",initialState:wV,reducers:{addXAxis:{reducer(e,a){e.xAxis[a.payload.id]=a.payload},prepare:xa()},removeXAxis:{reducer(e,a){delete e.xAxis[a.payload.id]},prepare:xa()},addYAxis:{reducer(e,a){e.yAxis[a.payload.id]=a.payload},prepare:xa()},removeYAxis:{reducer(e,a){delete e.yAxis[a.payload.id]},prepare:xa()},addZAxis:{reducer(e,a){e.zAxis[a.payload.id]=a.payload},prepare:xa()},removeZAxis:{reducer(e,a){delete e.zAxis[a.payload.id]},prepare:xa()},updateYAxisWidth(e,a){var{id:r,width:n}=a.payload,i=e.yAxis[r];if(i){var o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&n===o[1]&&n!==i.width&&Math.abs(n-o[0])<=1)return;var c=[...o,n].slice(-3);e.yAxis[r]=DA(DA({},e.yAxis[r]),{},{width:n,widthHistory:c})}}}}),{addXAxis:SV,removeXAxis:AV,addYAxis:CV,removeYAxis:kV,addZAxis:sZ,removeZAxis:lZ,updateYAxisWidth:EV}=AO.actions,OV=AO.reducer,DV=le([Xt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),TV=le([DV,Pn,_n],(e,a,r)=>{if(!(!e||a==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,a-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),CO=()=>Te(TV),RV="Invariant failed";function PV(e,a){throw new Error(RV)}var _V=["x","y"];function fb(){return fb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fb.apply(null,arguments)}function TA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fo(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?TA(Object(r),!0).forEach(function(n){MV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MV(e,a,r){return(a=zV(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function zV(e){var a=LV(e,"string");return typeof a=="symbol"?a:a+""}function LV(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function BV(e,a){if(e==null)return{};var r,n,i=IV(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function IV(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function FV(e,a){var{x:r,y:n}=e,i=BV(e,_V),o="".concat(r),c=parseInt(o,10),m="".concat(n),u=parseInt(m,10),h="".concat(a.height||i.height),p=parseInt(h,10),x="".concat(a.width||i.width),j=parseInt(x,10);return Fo(Fo(Fo(Fo(Fo({},a),i),c?{x:c}:{}),u?{y:u}:{}),{},{height:p,width:j,name:a.name,radius:a.radius})}function sy(e){return b.createElement(sV,fb({shapeType:"rectangle",propTransformer:FV,activeClassName:"recharts-active-bar"},e))}var $V=function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(De(a))return a;var o=De(n)||Gt(n);return o?a(n,i):(o||PV(),r)}},UV={},kO=za({name:"errorBars",initialState:UV,reducers:{addErrorBar:(e,a)=>{var{itemId:r,errorBar:n}=a.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,a)=>{var{itemId:r,prev:n,next:i}=a.payload;e[r]&&(e[r]=e[r].map(o=>o.dataKey===n.dataKey&&o.direction===n.direction?i:o))},removeErrorBar:(e,a)=>{var{itemId:r,errorBar:n}=a.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:iZ,replaceErrorBar:oZ,removeErrorBar:cZ}=kO.actions,qV=kO.reducer,HV=["children"];function VV(e,a){if(e==null)return{};var r,n,i=YV(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function YV(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var KV={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},GV=b.createContext(KV);function JV(e){var{children:a}=e,r=VV(e,HV);return b.createElement(GV.Provider,{value:r},a)}function EO(e,a){var r,n,i=Te(h=>zn(h,e)),o=Te(h=>Ln(h,a)),c=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:Ha.allowDataOverflow,m=(n=o?.allowDataOverflow)!==null&&n!==void 0?n:Va.allowDataOverflow,u=c||m;return{needClip:u,needClipX:c,needClipY:m}}function WV(e){var{xAxisId:a,yAxisId:r,clipPathId:n}=e,i=CO(),{needClipX:o,needClipY:c,needClip:m}=EO(a,r);if(!m)return null;var{x:u,y:h,width:p,height:x}=i;return b.createElement("clipPath",{id:"clipPath-".concat(n)},b.createElement("rect",{x:o?u:u-p/2,y:c?h:h-x/2,width:o?p:p*2,height:c?x:x*2}))}var XV=["onMouseEnter","onMouseLeave","onClick"],ZV=["value","background","tooltipPosition"],QV=["id"],eY=["onMouseEnter","onClick","onMouseLeave"];function gs(){return gs=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gs.apply(null,arguments)}function RA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ba(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?RA(Object(r),!0).forEach(function(n){tY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tY(e,a,r){return(a=aY(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function aY(e){var a=rY(e,"string");return typeof a=="symbol"?a:a+""}function rY(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function dm(e,a){if(e==null)return{};var r,n,i=nY(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function nY(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var sY=e=>{var{dataKey:a,name:r,fill:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:a,type:i,color:n,value:C4(r,a),payload:e}]};function lY(e){var{dataKey:a,stroke:r,strokeWidth:n,fill:i,name:o,hide:c,unit:m}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:a,nameKey:void 0,name:C4(o,a),hide:c,type:e.tooltipType,color:e.fill,unit:m}}}function iY(e){var a=Te(mi),{data:r,dataKey:n,background:i,allOtherBarProps:o}=e,{onMouseEnter:c,onMouseLeave:m,onClick:u}=o,h=dm(o,XV),p=jO(c,n),x=NO(m),j=wO(u,n);if(!i||r==null)return null;var v=qb(i);return b.createElement(b.Fragment,null,r.map((w,A)=>{var{value:S,background:g,tooltipPosition:C}=w,k=dm(w,ZV);if(!g)return null;var O=p(w,A),D=x(w,A),B=j(w,A),L=ba(ba(ba(ba(ba({option:i,isActive:String(A)===a},k),{},{fill:"#eee"},g),v),Wb(h,w,A)),{},{onMouseEnter:O,onMouseLeave:D,onClick:B,dataKey:n,index:A,className:"recharts-bar-background-rectangle"});return b.createElement(sy,gs({key:"background-bar-".concat(A)},L))}))}function oY(e){var{showLabels:a,children:r,rects:n}=e,i=n?.map(o=>{var c={x:o.x,y:o.y,width:o.width,height:o.height};return ba(ba({},c),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:c,fill:o.fill})});return b.createElement(TH,{value:a?i:void 0},r)}function cY(e){var{shape:a,activeBar:r,baseProps:n,entry:i,index:o,dataKey:c}=e,m=Te(mi),u=Te(ZE),h=r&&String(o)===m&&(u==null||c===u),p=h?r:a;return b.createElement(sy,gs({},n,{name:String(n.name)},i,{isActive:h,option:p,index:o,dataKey:c}))}function dY(e){var{shape:a,baseProps:r,entry:n,index:i,dataKey:o}=e;return b.createElement(sy,gs({},r,{name:String(r.name)},n,{isActive:!1,option:a,index:i,dataKey:o}))}function uY(e){var{data:a,props:r}=e,n=An(r),{id:i}=n,o=dm(n,QV),{shape:c,dataKey:m,activeBar:u}=r,{onMouseEnter:h,onClick:p,onMouseLeave:x}=r,j=dm(r,eY),v=jO(h,m),w=NO(x),A=wO(p,m);return a?b.createElement(b.Fragment,null,a.map((S,g)=>b.createElement(xs,gs({key:"rectangle-".concat(S?.x,"-").concat(S?.y,"-").concat(S?.value,"-").concat(g),className:"recharts-bar-rectangle"},Wb(j,S,g),{onMouseEnter:v(S,g),onMouseLeave:w(S,g),onClick:A(S,g)}),u?b.createElement(cY,{shape:c,activeBar:u,baseProps:o,entry:S,index:g,dataKey:m}):b.createElement(dY,{shape:c,baseProps:o,entry:S,index:g,dataKey:m})))):null}function mY(e){var{props:a,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:o,animationBegin:c,animationDuration:m,animationEasing:u,onAnimationEnd:h,onAnimationStart:p}=a,x=r.current,j=n0(a,"recharts-bar-"),[v,w]=b.useState(!1),A=!v,S=b.useCallback(()=>{typeof h=="function"&&h(),w(!1)},[h]),g=b.useCallback(()=>{typeof p=="function"&&p(),w(!0)},[p]);return b.createElement(oY,{showLabels:A,rects:n},b.createElement(r0,{animationId:j,begin:c,duration:m,isActive:o,easing:u,onAnimationEnd:S,onAnimationStart:g,key:j},C=>{var k=C===1?n:n?.map((O,D)=>{var B=x&&x[D];if(B)return ba(ba({},O),{},{x:ga(B.x,O.x,C),y:ga(B.y,O.y,C),width:ga(B.width,O.width,C),height:ga(B.height,O.height,C)});if(i==="horizontal"){var L=ga(0,O.height,C);return ba(ba({},O),{},{y:O.y+O.height-L,height:L})}var T=ga(0,O.width,C);return ba(ba({},O),{},{width:T})});return C>0&&(r.current=k??null),k==null?null:b.createElement(xs,null,b.createElement(uY,{props:a,data:k}))}),b.createElement(_H,{label:a.label}),a.children)}function fY(e){var a=b.useRef(null);return b.createElement(mY,{previousRectanglesRef:a,props:e})}var OO=0,pY=(e,a)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Na(e,a)}};class hY extends b.PureComponent{render(){var{hide:a,data:r,dataKey:n,className:i,xAxisId:o,yAxisId:c,needClip:m,background:u,id:h}=this.props;if(a||r==null)return null;var p=gt("recharts-bar",i),x=h;return b.createElement(xs,{className:p,id:h},m&&b.createElement("defs",null,b.createElement(WV,{clipPathId:x,xAxisId:o,yAxisId:c})),b.createElement(xs,{className:"recharts-bar-rectangles",clipPath:m?"url(#clipPath-".concat(x,")"):void 0},b.createElement(iY,{data:r,dataKey:n,background:u,allOtherBarProps:this.props}),b.createElement(fY,this.props)))}}var xY={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!ji.isSsr,legendType:"rect",minPointSize:OO,xAxisId:0,yAxisId:0};function gY(e){var{xAxisId:a,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:c,animationBegin:m,animationDuration:u,animationEasing:h,isAnimationActive:p}=e,{needClip:x}=EO(a,r),j=a0(),v=Wa(),w=FH(e.children,oO),A=Te(C=>VY(C,a,r,v,e.id,w));if(j!=="vertical"&&j!=="horizontal")return null;var S,g=A?.[0];return g==null||g.height==null||g.width==null?S=0:S=j==="vertical"?g.height/2:g.width/2,b.createElement(JV,{xAxisId:a,yAxisId:r,data:A,dataPointFormatter:pY,errorBarOffset:S},b.createElement(hY,gs({},e,{layout:j,needClip:x,data:A,xAxisId:a,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:c,animationBegin:m,animationDuration:u,animationEasing:h,isAnimationActive:p})))}function bY(e){var{layout:a,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:o,xAxis:c,yAxis:m,xAxisTicks:u,yAxisTicks:h,stackedData:p,displayedData:x,offset:j,cells:v,parentViewBox:w}=e,A=a==="horizontal"?m:c,S=p?A.scale.domain():null,g=aL({numericAxis:A});return x.map((C,k)=>{var O,D,B,L,T,R;p?O=Wz(p[k],S):(O=Na(C,r),Array.isArray(O)||(O=[g,O]));var z=$V(n,OO)(O[1],k);if(a==="horizontal"){var $,[Z,fe]=[m.scale(O[0]),m.scale(O[1])];D=y1({axis:c,ticks:u,bandSize:o,offset:i.offset,entry:C,index:k}),B=($=fe??Z)!==null&&$!==void 0?$:void 0,L=i.size;var se=Z-fe;if(T=xr(se)?0:se,R={x:D,y:j.top,width:L,height:j.height},Math.abs(z)>0&&Math.abs(T)<Math.abs(z)){var ie=Ra(T||z)*(Math.abs(z)-Math.abs(T));B-=ie,T+=ie}}else{var[V,K]=[c.scale(O[0]),c.scale(O[1])];if(D=V,B=y1({axis:m,ticks:h,bandSize:o,offset:i.offset,entry:C,index:k}),L=K-V,T=i.size,R={x:j.left,y:B,width:j.width,height:T},Math.abs(z)>0&&Math.abs(L)<Math.abs(z)){var ce=Ra(L||z)*(Math.abs(z)-Math.abs(L));L+=ce}}if(D==null||B==null||L==null||T==null)return null;var U=ba(ba({},C),{},{x:D,y:B,width:L,height:T,value:p?O:O[1],payload:C,background:R,tooltipPosition:{x:D+L/2,y:B+T/2},parentViewBox:w},v&&v[k]&&v[k].props);return U}).filter(Boolean)}function yY(e){var a=vr(e,xY),r=Wa();return b.createElement(fV,{id:a.id,type:"bar"},n=>b.createElement(b.Fragment,null,b.createElement(oV,{legendPayload:sY(a)}),b.createElement(lV,{fn:lY,args:a}),b.createElement(yV,{type:"bar",id:n,data:void 0,xAxisId:a.xAxisId,yAxisId:a.yAxisId,zAxisId:0,dataKey:a.dataKey,stackId:tL(a.stackId),hide:a.hide,barSize:a.barSize,minPointSize:a.minPointSize,maxBarSize:a.maxBarSize,isPanorama:r}),b.createElement(gY,gs({},a,{id:n}))))}var DO=b.memo(yY);DO.displayName="Bar";function PA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function du(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?PA(Object(r),!0).forEach(function(n){vY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vY(e,a,r){return(a=jY(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function jY(e){var a=NY(e,"string");return typeof a=="symbol"?a:a+""}function NY(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var wY=(e,a)=>a,SY=(e,a,r)=>r,AY=(e,a,r,n)=>n,CY=(e,a,r,n,i)=>i,Oc=le([I0,CY],(e,a)=>e.filter(r=>r.type==="bar").find(r=>r.id===a)),kY=le([Oc],e=>e?.maxBarSize),EY=(e,a,r,n,i,o)=>o,_A=(e,a,r)=>{var n=r??e;if(!Gt(n))return Er(n,a,0)},OY=le([at,I0,wY,SY,AY],(e,a,r,n,i)=>a.filter(o=>e==="horizontal"?o.xAxisId===r:o.yAxisId===n).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),DY=(e,a,r,n)=>{var i=at(e);return i==="horizontal"?ib(e,"yAxis",r,n):ib(e,"xAxis",a,n)},TY=(e,a,r)=>{var n=at(e);return n==="horizontal"?$S(e,"xAxis",a):$S(e,"yAxis",r)},RY=(e,a,r)=>{var n={},i=e.filter(tf),o=e.filter(h=>h.stackId==null),c=i.reduce((h,p)=>(h[p.stackId]||(h[p.stackId]=[]),h[p.stackId].push(p),h),n),m=Object.entries(c).map(h=>{var[p,x]=h,j=x.map(w=>w.dataKey),v=_A(a,r,x[0].barSize);return{stackId:p,dataKeys:j,barSize:v}}),u=o.map(h=>{var p=[h.dataKey].filter(j=>j!=null),x=_A(a,r,h.barSize);return{stackId:void 0,dataKeys:p,barSize:x}});return[...m,...u]},PY=le([OY,JF,TY],RY),_Y=(e,a,r,n,i)=>{var o,c,m=Oc(e,a,r,n,i);if(m!=null){var u=at(e),h=Fk(e),{maxBarSize:p}=m,x=Gt(p)?h:p,j,v;return u==="horizontal"?(j=ui(e,"xAxis",a,n),v=di(e,"xAxis",a,n)):(j=ui(e,"yAxis",r,n),v=di(e,"yAxis",r,n)),(o=(c=Qb(j,v,!0))!==null&&c!==void 0?c:x)!==null&&o!==void 0?o:0}},TO=(e,a,r,n)=>{var i=at(e),o,c;return i==="horizontal"?(o=ui(e,"xAxis",a,n),c=di(e,"xAxis",a,n)):(o=ui(e,"yAxis",r,n),c=di(e,"yAxis",r,n)),Qb(o,c)};function MY(e,a,r,n,i){var o=n.length;if(!(o<1)){var c=Er(e,r,0,!0),m,u=[];if(fa(n[0].barSize)){var h=!1,p=r/o,x=n.reduce((g,C)=>g+(C.barSize||0),0);x+=(o-1)*c,x>=r&&(x-=(o-1)*c,c=0),x>=r&&p>0&&(h=!0,p*=.9,x=o*p);var j=(r-x)/2>>0,v={offset:j-c,size:0};m=n.reduce((g,C)=>{var k,O={stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:v.offset+v.size+c,size:h?p:(k=C.barSize)!==null&&k!==void 0?k:0}},D=[...g,O];return v=D[D.length-1].position,D},u)}else{var w=Er(a,r,0,!0);r-2*w-(o-1)*c<=0&&(c=0);var A=(r-2*w-(o-1)*c)/o;A>1&&(A>>=0);var S=fa(i)?Math.min(A,i):A;m=n.reduce((g,C,k)=>[...g,{stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:w+(A+c)*k+(A-S)/2,size:S}}],u)}return m}}var zY=(e,a,r,n,i,o,c)=>{var m=Gt(c)?a:c,u=MY(r,n,i!==o?i:o,e,m);return i!==o&&u!=null&&(u=u.map(h=>du(du({},h),{},{position:du(du({},h.position),{},{offset:h.position.offset-i/2})}))),u},LY=le([PY,Fk,GF,$k,_Y,TO,kY],zY),BY=(e,a,r,n)=>ui(e,"xAxis",a,n),IY=(e,a,r,n)=>ui(e,"yAxis",r,n),FY=(e,a,r,n)=>di(e,"xAxis",a,n),$Y=(e,a,r,n)=>di(e,"yAxis",r,n),UY=le([LY,Oc],(e,a)=>{if(!(e==null||a==null)){var r=e.find(n=>n.stackId===a.stackId&&a.dataKey!=null&&n.dataKeys.includes(a.dataKey));if(r!=null)return r.position}}),qY=(e,a)=>{var r=L0(a);if(!(!e||r==null||a==null)){var{stackId:n}=a;if(n!=null){var i=e[n];if(i){var{stackedData:o}=i;if(o)return o.find(c=>c.key===r)}}}},HY=le([DY,Oc],qY),VY=le([Xt,e0,BY,IY,FY,$Y,UY,at,E0,TO,HY,Oc,EY],(e,a,r,n,i,o,c,m,u,h,p,x,j)=>{var{chartData:v,dataStartIndex:w,dataEndIndex:A}=u;if(!(x==null||c==null||a==null||m!=="horizontal"&&m!=="vertical"||r==null||n==null||i==null||o==null||h==null)){var{data:S}=x,g;if(S!=null&&S.length>0?g=S:g=v?.slice(w,A+1),g!=null)return bY({layout:m,barSettings:x,pos:c,parentViewBox:a,bandSize:h,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,stackedData:p,displayedData:g,offset:e,cells:j})}}),YY=e=>{var{chartData:a}=e,r=zt(),n=Wa();return b.useEffect(()=>n?()=>{}:(r(XS(a)),()=>{r(XS(void 0))}),[a,r,n]),null},MA={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},RO=za({name:"brush",initialState:MA,reducers:{setBrushSettings(e,a){return a.payload==null?MA:a.payload}}}),{setBrushSettings:dZ}=RO.actions,KY=RO.reducer;function GY(e,a,r){return(a=JY(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function JY(e){var a=WY(e,"string");return typeof a=="symbol"?a:a+""}function WY(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}class ly{static create(a){return new ly(a)}constructor(a){this.scale=a}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(a){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(a!==void 0){if(n)switch(n){case"start":return this.scale(a);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(a)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(a)+o}default:return this.scale(a)}if(r){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(a)+c}return this.scale(a)}}isInRange(a){var r=this.range(),n=r[0],i=r[r.length-1];return n<=i?a>=n&&a<=i:a>=i&&a<=n}}GY(ly,"EPS",1e-4);function XY(e){return(e%180+180)%180}var ZY=function(a){var{width:r,height:n}=a,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=XY(i),c=o*Math.PI/180,m=Math.atan(n/r),u=c>m&&c<Math.PI-m?n/Math.sin(c):r/Math.cos(c);return Math.abs(u)},QY={dots:[],areas:[],lines:[]},PO=za({name:"referenceElements",initialState:QY,reducers:{addDot:(e,a)=>{e.dots.push(a.payload)},removeDot:(e,a)=>{var r=yn(e).dots.findIndex(n=>n===a.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,a)=>{e.areas.push(a.payload)},removeArea:(e,a)=>{var r=yn(e).areas.findIndex(n=>n===a.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,a)=>{e.lines.push(a.payload)},removeLine:(e,a)=>{var r=yn(e).lines.findIndex(n=>n===a.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:uZ,removeDot:mZ,addArea:fZ,removeArea:pZ,addLine:hZ,removeLine:xZ}=PO.actions,eK=PO.reducer,tK=b.createContext(void 0),aK=e=>{var{children:a}=e,[r]=b.useState("".concat(Qo("recharts"),"-clip")),n=CO();if(n==null)return null;var{x:i,y:o,width:c,height:m}=n;return b.createElement(tK.Provider,{value:r},b.createElement("defs",null,b.createElement("clipPath",{id:r},b.createElement("rect",{x:i,y:o,height:m,width:c}))),a)};function fi(e,a){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(a,r)||e[r]!==a[r]))return!1;for(var n in a)if({}.hasOwnProperty.call(a,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function _O(e,a,r){if(a<1)return[];if(a===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=a)n.push(e[i]);return n}function rK(e,a,r){var n={width:e.width+a.width,height:e.height+a.height};return ZY(n,r)}function nK(e,a,r){var n=r==="width",{x:i,y:o,width:c,height:m}=e;return a===1?{start:n?i:o,end:n?i+c:o+m}:{start:n?i+c:o+m,end:n?i:o}}function um(e,a,r,n,i){if(e*a<e*n||e*a>e*i)return!1;var o=r();return e*(a-e*o/2-n)>=0&&e*(a+e*o/2-i)<=0}function sK(e,a){return _O(e,a+1)}function lK(e,a,r,n,i){for(var o=(n||[]).slice(),{start:c,end:m}=a,u=0,h=1,p=c,x=function(){var w=n?.[u];if(w===void 0)return{v:_O(n,h)};var A=u,S,g=()=>(S===void 0&&(S=r(w,A)),S),C=w.coordinate,k=u===0||um(e,C,g,p,m);k||(u=0,p=c,h+=1),k&&(p=C+e*(g()/2+i),u+=h)},j;h<=o.length;)if(j=x(),j)return j.v;return[]}function zA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function da(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?zA(Object(r),!0).forEach(function(n){iK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iK(e,a,r){return(a=oK(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function oK(e){var a=cK(e,"string");return typeof a=="symbol"?a:a+""}function cK(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function dK(e,a,r,n,i){for(var o=(n||[]).slice(),c=o.length,{start:m}=a,{end:u}=a,h=function(j){var v=o[j],w,A=()=>(w===void 0&&(w=r(v,j)),w);if(j===c-1){var S=e*(v.coordinate+e*A()/2-u);o[j]=v=da(da({},v),{},{tickCoord:S>0?v.coordinate-S*e:v.coordinate})}else o[j]=v=da(da({},v),{},{tickCoord:v.coordinate});var g=um(e,v.tickCoord,A,m,u);g&&(u=v.tickCoord-e*(A()/2+i),o[j]=da(da({},v),{},{isShow:!0}))},p=c-1;p>=0;p--)h(p);return o}function uK(e,a,r,n,i,o){var c=(n||[]).slice(),m=c.length,{start:u,end:h}=a;if(o){var p=n[m-1],x=r(p,m-1),j=e*(p.coordinate+e*x/2-h);c[m-1]=p=da(da({},p),{},{tickCoord:j>0?p.coordinate-j*e:p.coordinate});var v=um(e,p.tickCoord,()=>x,u,h);v&&(h=p.tickCoord-e*(x/2+i),c[m-1]=da(da({},p),{},{isShow:!0}))}for(var w=o?m-1:m,A=function(C){var k=c[C],O,D=()=>(O===void 0&&(O=r(k,C)),O);if(C===0){var B=e*(k.coordinate-e*D()/2-u);c[C]=k=da(da({},k),{},{tickCoord:B<0?k.coordinate-B*e:k.coordinate})}else c[C]=k=da(da({},k),{},{tickCoord:k.coordinate});var L=um(e,k.tickCoord,D,u,h);L&&(u=k.tickCoord+e*(D()/2+i),c[C]=da(da({},k),{},{isShow:!0}))},S=0;S<w;S++)A(S);return c}function iy(e,a,r){var{tick:n,ticks:i,viewBox:o,minTickGap:c,orientation:m,interval:u,tickFormatter:h,unit:p,angle:x}=e;if(!i||!i.length||!n)return[];if(De(u)||ji.isSsr){var j;return(j=sK(i,De(u)?u:0))!==null&&j!==void 0?j:[]}var v=[],w=m==="top"||m==="bottom"?"width":"height",A=p&&w==="width"?Go(p,{fontSize:a,letterSpacing:r}):{width:0,height:0},S=(k,O)=>{var D=typeof h=="function"?h(k.value,O):k.value;return w==="width"?rK(Go(D,{fontSize:a,letterSpacing:r}),A,x):Go(D,{fontSize:a,letterSpacing:r})[w]},g=i.length>=2?Ra(i[1].coordinate-i[0].coordinate):1,C=nK(o,g,w);return u==="equidistantPreserveStart"?lK(g,C,S,i,c):(u==="preserveStart"||u==="preserveStartEnd"?v=uK(g,C,S,i,c,u==="preserveStartEnd"):v=dK(g,C,S,i,c),v.filter(k=>k.isShow))}var mK=e=>{var{ticks:a,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:o=0}=e,c=0;if(a){Array.from(a).forEach(p=>{if(p){var x=p.getBoundingClientRect();x.width>c&&(c=x.width)}});var m=r?r.getBoundingClientRect().width:0,u=i+o,h=c+u+m+(r?n:0);return Math.round(h)}return 0},fK=["axisLine","width","height","className","hide","ticks"],pK=["viewBox"],hK=["viewBox"];function pb(e,a){if(e==null)return{};var r,n,i=xK(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xK(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ol(){return ol=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ol.apply(null,arguments)}function LA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?LA(Object(r),!0).forEach(function(n){gK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gK(e,a,r){return(a=bK(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function bK(e){var a=yK(e,"string");return typeof a=="symbol"?a:a+""}function yK(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var oy={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"};function vK(e){var{x:a,y:r,width:n,height:i,orientation:o,mirror:c,axisLine:m,otherSvgProps:u}=e;if(!m)return null;var h=Mt(Mt(Mt({},u),An(m)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!c||o==="bottom"&&c);h=Mt(Mt({},h),{},{x1:a,y1:r+p*i,x2:a+n,y2:r+p*i})}else{var x=+(o==="left"&&!c||o==="right"&&c);h=Mt(Mt({},h),{},{x1:a+x*n,y1:r,x2:a+x*n,y2:r+i})}return b.createElement("line",ol({},h,{className:gt("recharts-cartesian-axis-line",si(m,"className"))}))}function jK(e,a,r,n,i,o,c,m,u){var h,p,x,j,v,w,A=m?-1:1,S=e.tickSize||c,g=De(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=p=e.coordinate,j=r+ +!m*i,x=j-A*S,w=x-A*u,v=g;break;case"left":x=j=e.coordinate,p=a+ +!m*n,h=p-A*S,v=h-A*u,w=g;break;case"right":x=j=e.coordinate,p=a+ +m*n,h=p+A*S,v=h+A*u,w=g;break;default:h=p=e.coordinate,j=r+ +m*i,x=j+A*S,w=x+A*u,v=g;break}return{line:{x1:h,y1:x,x2:p,y2:j},tick:{x:v,y:w}}}function NK(e,a){switch(e){case"left":return a?"start":"end";case"right":return a?"end":"start";default:return"middle"}}function wK(e,a){switch(e){case"left":case"right":return"middle";case"top":return a?"start":"end";default:return a?"end":"start"}}function SK(e){var{option:a,tickProps:r,value:n}=e,i,o=gt(r.className,"recharts-cartesian-axis-tick-value");if(b.isValidElement(a))i=b.cloneElement(a,Mt(Mt({},r),{},{className:o}));else if(typeof a=="function")i=a(Mt(Mt({},r),{},{className:o}));else{var c="recharts-cartesian-axis-tick-value";typeof a!="boolean"&&(c=gt(c,a?.className)),i=b.createElement(ry,ol({},r,{className:c}),n)}return i}function AK(e){var{ticks:a=[],tick:r,tickLine:n,stroke:i,tickFormatter:o,unit:c,padding:m,tickTextProps:u,orientation:h,mirror:p,x,y:j,width:v,height:w,tickSize:A,tickMargin:S,fontSize:g,letterSpacing:C,getTicksConfig:k,events:O}=e,D=iy(Mt(Mt({},k),{},{ticks:a}),g,C),B=NK(h,p),L=wK(h,p),T=An(k),R=qb(r),z={};typeof n=="object"&&(z=n);var $=Mt(Mt({},T),{},{fill:"none"},z),Z=D.map((fe,se)=>{var{line:ie,tick:V}=jK(fe,x,j,v,w,h,A,p,S),K=Mt(Mt(Mt(Mt({textAnchor:B,verticalAnchor:L},T),{},{stroke:"none",fill:i},R),V),{},{index:se,payload:fe,visibleTicksCount:D.length,tickFormatter:o,padding:m},u);return b.createElement(xs,ol({className:"recharts-cartesian-axis-tick",key:"tick-".concat(fe.value,"-").concat(fe.coordinate,"-").concat(fe.tickCoord)},Wb(O,fe,se)),n&&b.createElement("line",ol({},$,ie,{className:gt("recharts-cartesian-axis-tick-line",si(n,"className"))})),r&&b.createElement(SK,{option:r,tickProps:K,value:"".concat(typeof o=="function"?o(fe.value,se):fe.value).concat(c||"")}))});return Z.length>0?b.createElement("g",{className:"recharts-cartesian-axis-ticks"},Z):null}var CK=b.forwardRef((e,a)=>{var{axisLine:r,width:n,height:i,className:o,hide:c,ticks:m}=e,u=pb(e,fK),[h,p]=b.useState(""),[x,j]=b.useState(""),v=b.useRef(null);b.useImperativeHandle(a,()=>({getCalculatedWidth:()=>{var A;return mK({ticks:v.current,label:(A=e.labelRef)===null||A===void 0?void 0:A.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var w=b.useCallback(A=>{if(A){var S=A.getElementsByClassName("recharts-cartesian-axis-tick-value");v.current=S;var g=S[0];if(g){var C=window.getComputedStyle(g),k=C.fontSize,O=C.letterSpacing;(k!==h||O!==x)&&(p(k),j(O))}}},[h,x]);return c||n!=null&&n<=0||i!=null&&i<=0?null:b.createElement(xs,{className:gt("recharts-cartesian-axis",o),ref:w},b.createElement(vK,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:An(e)}),b.createElement(AK,{ticks:m,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:h,letterSpacing:x,getTicksConfig:e,events:u}),b.createElement(dH,{x:e.x,y:e.y,width:e.width,height:e.height},b.createElement(vH,{label:e.label,labelRef:e.labelRef}),e.children))}),kK=b.memo(CK,(e,a)=>{var{viewBox:r}=e,n=pb(e,pK),{viewBox:i}=a,o=pb(a,hK);return fi(r,i)&&fi(n,o)}),cy=b.forwardRef((e,a)=>{var r=vr(e,oy);return b.createElement(kK,ol({},r,{ref:a}))});cy.displayName="CartesianAxis";var EK=["x1","y1","x2","y2","key"],OK=["offset"],DK=["xAxisId","yAxisId"],TK=["xAxisId","yAxisId"];function BA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ua(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?BA(Object(r),!0).forEach(function(n){RK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RK(e,a,r){return(a=PK(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function PK(e){var a=_K(e,"string");return typeof a=="symbol"?a:a+""}function _K(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Ws(){return Ws=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ws.apply(null,arguments)}function mm(e,a){if(e==null)return{};var r,n,i=MK(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function MK(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var zK=e=>{var{fill:a}=e;if(!a||a==="none")return null;var{fillOpacity:r,x:n,y:i,width:o,height:c,ry:m}=e;return b.createElement("rect",{x:n,y:i,ry:m,width:o,height:c,stroke:"none",fill:a,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function MO(e,a){var r;if(b.isValidElement(e))r=b.cloneElement(e,a);else if(typeof e=="function")r=e(a);else{var{x1:n,y1:i,x2:o,y2:c,key:m}=a,u=mm(a,EK),h=An(u),{offset:p}=h,x=mm(h,OK);r=b.createElement("line",Ws({},x,{x1:n,y1:i,x2:o,y2:c,fill:"none",key:m}))}return r}function LK(e){var{x:a,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:o,yAxisId:c}=e,m=mm(e,DK),u=i.map((h,p)=>{var x=ua(ua({},m),{},{x1:a,y1:h,x2:a+r,y2:h,key:"line-".concat(p),index:p});return MO(n,x)});return b.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function BK(e){var{y:a,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:o,yAxisId:c}=e,m=mm(e,TK),u=i.map((h,p)=>{var x=ua(ua({},m),{},{x1:h,y1:a,x2:h,y2:a+r,key:"line-".concat(p),index:p});return MO(n,x)});return b.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function IK(e){var{horizontalFill:a,fillOpacity:r,x:n,y:i,width:o,height:c,horizontalPoints:m,horizontal:u=!0}=e;if(!u||!a||!a.length)return null;var h=m.map(x=>Math.round(x+i-i)).sort((x,j)=>x-j);i!==h[0]&&h.unshift(0);var p=h.map((x,j)=>{var v=!h[j+1],w=v?i+c-x:h[j+1]-x;if(w<=0)return null;var A=j%a.length;return b.createElement("rect",{key:"react-".concat(j),y:x,x:n,height:w,width:o,stroke:"none",fill:a[A],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return b.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function FK(e){var{vertical:a=!0,verticalFill:r,fillOpacity:n,x:i,y:o,width:c,height:m,verticalPoints:u}=e;if(!a||!r||!r.length)return null;var h=u.map(x=>Math.round(x+i-i)).sort((x,j)=>x-j);i!==h[0]&&h.unshift(0);var p=h.map((x,j)=>{var v=!h[j+1],w=v?i+c-x:h[j+1]-x;if(w<=0)return null;var A=j%r.length;return b.createElement("rect",{key:"react-".concat(j),x,y:o,width:w,height:m,stroke:"none",fill:r[A],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return b.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var $K=(e,a)=>{var{xAxis:r,width:n,height:i,offset:o}=e;return S4(iy(ua(ua(ua({},oy),r),{},{ticks:A4(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,a)},UK=(e,a)=>{var{yAxis:r,width:n,height:i,offset:o}=e;return S4(iy(ua(ua(ua({},oy),r),{},{ticks:A4(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,a)},qK={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function zO(e){var a=R4(),r=P4(),n=T4(),i=ua(ua({},vr(e,qK)),{},{x:De(e.x)?e.x:n.left,y:De(e.y)?e.y:n.top,width:De(e.width)?e.width:n.width,height:De(e.height)?e.height:n.height}),{xAxisId:o,yAxisId:c,x:m,y:u,width:h,height:p,syncWithTicks:x,horizontalValues:j,verticalValues:v}=i,w=Wa(),A=Te(R=>US(R,"xAxis",o,w)),S=Te(R=>US(R,"yAxis",c,w));if(!De(h)||h<=0||!De(p)||p<=0||!De(m)||m!==+m||!De(u)||u!==+u)return null;var g=i.verticalCoordinatesGenerator||$K,C=i.horizontalCoordinatesGenerator||UK,{horizontalPoints:k,verticalPoints:O}=i;if((!k||!k.length)&&typeof C=="function"){var D=j&&j.length,B=C({yAxis:S?ua(ua({},S),{},{ticks:D?j:S.ticks}):void 0,width:a,height:r,offset:n},D?!0:x);Hu(Array.isArray(B),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(k=B)}if((!O||!O.length)&&typeof g=="function"){var L=v&&v.length,T=g({xAxis:A?ua(ua({},A),{},{ticks:L?v:A.ticks}):void 0,width:a,height:r,offset:n},L?!0:x);Hu(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof T,"]")),Array.isArray(T)&&(O=T)}return b.createElement("g",{className:"recharts-cartesian-grid"},b.createElement(zK,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),b.createElement(IK,Ws({},i,{horizontalPoints:k})),b.createElement(FK,Ws({},i,{verticalPoints:O})),b.createElement(LK,Ws({},i,{offset:n,horizontalPoints:k,xAxis:A,yAxis:S})),b.createElement(BK,Ws({},i,{offset:n,verticalPoints:O,xAxis:A,yAxis:S})))}zO.displayName="CartesianGrid";var HK=["dangerouslySetInnerHTML","ticks"],VK=["id"],YK=["domain"],KK=["domain"];function hb(){return hb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hb.apply(null,arguments)}function fm(e,a){if(e==null)return{};var r,n,i=GK(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function GK(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function JK(e){var a=zt();return b.useLayoutEffect(()=>(a(SV(e)),()=>{a(AV(e))}),[e,a]),null}var WK=e=>{var{xAxisId:a,className:r}=e,n=Te(e0),i=Wa(),o="xAxis",c=Te(S=>Ei(S,o,a,i)),m=Te(S=>TE(S,o,a,i)),u=Te(S=>kE(S,a)),h=Te(S=>q$(S,a)),p=Te(S=>Wk(S,a));if(u==null||h==null||p==null)return null;var{dangerouslySetInnerHTML:x,ticks:j}=e,v=fm(e,HK),{id:w}=p,A=fm(p,VK);return b.createElement(cy,hb({},v,A,{scale:c,x:h.x,y:h.y,width:u.width,height:u.height,className:gt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:m}))},XK={allowDataOverflow:Ha.allowDataOverflow,allowDecimals:Ha.allowDecimals,allowDuplicatedCategory:Ha.allowDuplicatedCategory,height:Ha.height,hide:!1,mirror:Ha.mirror,orientation:Ha.orientation,padding:Ha.padding,reversed:Ha.reversed,scale:Ha.scale,tickCount:Ha.tickCount,type:Ha.type,xAxisId:0},ZK=e=>{var a,r,n,i,o,c=vr(e,XK);return b.createElement(b.Fragment,null,b.createElement(JK,{interval:(a=c.interval)!==null&&a!==void 0?a:"preserveEnd",id:c.xAxisId,scale:c.scale,type:c.type,padding:c.padding,allowDataOverflow:c.allowDataOverflow,domain:c.domain,dataKey:c.dataKey,allowDuplicatedCategory:c.allowDuplicatedCategory,allowDecimals:c.allowDecimals,tickCount:c.tickCount,includeHidden:(r=c.includeHidden)!==null&&r!==void 0?r:!1,reversed:c.reversed,ticks:c.ticks,height:c.height,orientation:c.orientation,mirror:c.mirror,hide:c.hide,unit:c.unit,name:c.name,angle:(n=c.angle)!==null&&n!==void 0?n:0,minTickGap:(i=c.minTickGap)!==null&&i!==void 0?i:5,tick:(o=c.tick)!==null&&o!==void 0?o:!0,tickFormatter:c.tickFormatter}),b.createElement(WK,c))},QK=(e,a)=>{var{domain:r}=e,n=fm(e,YK),{domain:i}=a,o=fm(a,KK);return fi(n,o)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:fi({domain:r},{domain:i}):!1},LO=b.memo(ZK,QK);LO.displayName="XAxis";var eG=["dangerouslySetInnerHTML","ticks"],tG=["id"],aG=["domain"],rG=["domain"];function xb(){return xb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xb.apply(null,arguments)}function pm(e,a){if(e==null)return{};var r,n,i=nG(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function nG(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function sG(e){var a=zt();return b.useLayoutEffect(()=>(a(CV(e)),()=>{a(kV(e))}),[e,a]),null}var lG=e=>{var{yAxisId:a,className:r,width:n,label:i}=e,o=b.useRef(null),c=b.useRef(null),m=Te(e0),u=Wa(),h=zt(),p="yAxis",x=Te(D=>Ei(D,p,a,u)),j=Te(D=>EE(D,a)),v=Te(D=>V$(D,a)),w=Te(D=>TE(D,p,a,u)),A=Te(D=>Xk(D,a));if(b.useLayoutEffect(()=>{if(!(n!=="auto"||!j||ny(i)||b.isValidElement(i)||A==null)){var D=o.current;if(D){var B=D.getCalculatedWidth();Math.round(j.width)!==Math.round(B)&&h(EV({id:a,width:B}))}}},[w,j,h,i,a,n,A]),j==null||v==null||A==null)return null;var{dangerouslySetInnerHTML:S,ticks:g}=e,C=pm(e,eG),{id:k}=A,O=pm(A,tG);return b.createElement(cy,xb({},C,O,{ref:o,labelRef:c,scale:x,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:j.width,height:j.height,className:gt("recharts-".concat(p," ").concat(p),r),viewBox:m,ticks:w}))},iG={allowDataOverflow:Va.allowDataOverflow,allowDecimals:Va.allowDecimals,allowDuplicatedCategory:Va.allowDuplicatedCategory,hide:!1,mirror:Va.mirror,orientation:Va.orientation,padding:Va.padding,reversed:Va.reversed,scale:Va.scale,tickCount:Va.tickCount,type:Va.type,width:Va.width,yAxisId:0},oG=e=>{var a,r,n,i,o,c=vr(e,iG);return b.createElement(b.Fragment,null,b.createElement(sG,{interval:(a=c.interval)!==null&&a!==void 0?a:"preserveEnd",id:c.yAxisId,scale:c.scale,type:c.type,domain:c.domain,allowDataOverflow:c.allowDataOverflow,dataKey:c.dataKey,allowDuplicatedCategory:c.allowDuplicatedCategory,allowDecimals:c.allowDecimals,tickCount:c.tickCount,padding:c.padding,includeHidden:(r=c.includeHidden)!==null&&r!==void 0?r:!1,reversed:c.reversed,ticks:c.ticks,width:c.width,orientation:c.orientation,mirror:c.mirror,hide:c.hide,unit:c.unit,name:c.name,angle:(n=c.angle)!==null&&n!==void 0?n:0,minTickGap:(i=c.minTickGap)!==null&&i!==void 0?i:5,tick:(o=c.tick)!==null&&o!==void 0?o:!0,tickFormatter:c.tickFormatter}),b.createElement(lG,c))},cG=(e,a)=>{var{domain:r}=e,n=pm(e,aG),{domain:i}=a,o=pm(a,rG);return fi(n,o)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:fi({domain:r},{domain:i}):!1},BO=b.memo(oG,cG);BO.displayName="YAxis";var dG=(e,a)=>a,dy=le([dG,at,Kk,It,GE,Bn,JU,Xt],eq),uy=e=>{var a=e.currentTarget.getBoundingClientRect(),r=a.width/e.currentTarget.offsetWidth,n=a.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-a.left)/r),chartY:Math.round((e.clientY-a.top)/n)}},IO=ja("mouseClick"),FO=cc();FO.startListening({actionCreator:IO,effect:(e,a)=>{var r=e.payload,n=dy(a.getState(),uy(r));n?.activeIndex!=null&&a.dispatch(nU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var gb=ja("mouseMove"),$O=cc();$O.startListening({actionCreator:gb,effect:(e,a)=>{var r=e.payload,n=a.getState(),i=G0(n,n.tooltip.settings.shared),o=dy(n,uy(r));i==="axis"&&(o?.activeIndex!=null?a.dispatch(IE({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):a.dispatch(BE()))}});var IA={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},UO=za({name:"rootProps",initialState:IA,reducers:{updateOptions:(e,a)=>{var r;e.accessibilityLayer=a.payload.accessibilityLayer,e.barCategoryGap=a.payload.barCategoryGap,e.barGap=(r=a.payload.barGap)!==null&&r!==void 0?r:IA.barGap,e.barSize=a.payload.barSize,e.maxBarSize=a.payload.maxBarSize,e.stackOffset=a.payload.stackOffset,e.syncId=a.payload.syncId,e.syncMethod=a.payload.syncMethod,e.className=a.payload.className}}}),uG=UO.reducer,{updateOptions:mG}=UO.actions,qO=za({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,a)=>a.payload}}),{updatePolarOptions:gZ}=qO.actions,fG=qO.reducer,HO=ja("keyDown"),VO=ja("focus"),my=cc();my.startListening({actionCreator:HO,effect:(e,a)=>{var r=a.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var c=Number(J0(i,Di(r))),m=Bn(r);if(o==="Enter"){var u=lm(r,"axis","hover",String(i.index));a.dispatch(cb({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:u}));return}var h=J$(r),p=h==="left-to-right"?1:-1,x=o==="ArrowRight"?1:-1,j=c+x*p;if(!(m==null||j>=m.length||j<0)){var v=lm(r,"axis","hover",String(j));a.dispatch(cb({active:!0,activeIndex:j.toString(),activeDataKey:void 0,activeCoordinate:v}))}}}}});my.startListening({actionCreator:VO,effect:(e,a)=>{var r=a.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var o="0",c=lm(r,"axis","hover",String(o));a.dispatch(cb({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:c}))}}}});var ur=ja("externalEvent"),YO=cc();YO.startListening({actionCreator:ur,effect:(e,a)=>{if(e.payload.handler!=null){var r=a.getState(),n={activeCoordinate:FU(r),activeDataKey:ZE(r),activeIndex:mi(r),activeLabel:XE(r),activeTooltipIndex:mi(r),isTooltipActive:$U(r)};e.payload.handler(n,e.payload.reactEvent)}}});var pG=le([Oi],e=>e.tooltipItemPayloads),hG=le([pG,kc,(e,a,r)=>a,(e,a,r)=>r],(e,a,r,n)=>{var i=e.find(m=>m.settings.dataKey===n);if(i!=null){var{positions:o}=i;if(o!=null){var c=a(o,r);return c}}}),KO=ja("touchMove"),GO=cc();GO.startListening({actionCreator:KO,effect:(e,a)=>{var r=e.payload,n=a.getState(),i=G0(n,n.tooltip.settings.shared);if(i==="axis"){var o=dy(n,uy({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));o?.activeIndex!=null&&a.dispatch(IE({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var c,m=r.touches[0],u=document.elementFromPoint(m.clientX,m.clientY);if(!u||!u.getAttribute)return;var h=u.getAttribute(dL),p=(c=u.getAttribute(uL))!==null&&c!==void 0?c:void 0,x=hG(a.getState(),h,p);a.dispatch(LE({activeDataKey:p,activeIndex:h,activeCoordinate:x}))}}});var xG=h3({brush:KY,cartesianAxis:OV,chartData:gq,errorBars:qV,graphicalItems:bV,layout:Pz,legend:qL,options:mq,polarAxis:zH,polarOptions:fG,referenceElements:eK,rootProps:uG,tooltip:sU}),gG=function(a){return O3({reducer:xG,preloadedState:a,middleware:r=>r({serializableCheck:!1}).concat([FO.middleware,$O.middleware,my.middleware,YO.middleware,GO.middleware]),enhancers:r=>{var n=r;return typeof r=="function"&&(n=r()),n.concat(E3({type:"raf"}))},devTools:ji.devToolsEnabled})};function bG(e){var{preloadedState:a,children:r,reduxStoreName:n}=e,i=Wa(),o=b.useRef(null);if(i)return r;o.current==null&&(o.current=gG(a));var c=Zb;return b.createElement(u3,{context:c,store:o.current},r)}function yG(e){var{layout:a,margin:r}=e,n=zt(),i=Wa();return b.useEffect(()=>{i||(n(Dz(a)),n(Oz(r)))},[n,i,a,r]),null}function vG(e){var a=zt();return b.useEffect(()=>{a(mG(e))},[a,e]),null}var jG=["children"];function NG(e,a){if(e==null)return{};var r,n,i=wG(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function wG(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hm.apply(null,arguments)}var SG={width:"100%",height:"100%",display:"block"},AG=b.forwardRef((e,a)=>{var r=R4(),n=P4(),i=M4();if(!li(r)||!li(n))return null;var{children:o,otherAttributes:c,title:m,desc:u}=e,h,p;return typeof c.tabIndex=="number"?h=c.tabIndex:h=i?0:void 0,typeof c.role=="string"?p=c.role:p=i?"application":void 0,b.createElement(qC,hm({},c,{title:m,desc:u,role:p,tabIndex:h,width:r,height:n,style:SG,ref:a}),o)}),CG=e=>{var{children:a}=e,r=Te($m);if(!r)return null;var{width:n,height:i,y:o,x:c}=r;return b.createElement(qC,{width:n,height:i,x:c,y:o},a)},FA=b.forwardRef((e,a)=>{var{children:r}=e,n=NG(e,jG),i=Wa();return i?b.createElement(CG,null,r):b.createElement(AG,hm({ref:a},n),r)});function kG(){var e=zt(),[a,r]=b.useState(null),n=Te(cL);return b.useEffect(()=>{if(a!=null){var i=a.getBoundingClientRect(),o=i.width/a.offsetWidth;fa(o)&&o!==n&&e(Rz(o))}},[a,e,n]),r}function $A(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EG(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?$A(Object(r),!0).forEach(function(n){OG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$A(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OG(e,a,r){return(a=DG(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function DG(e){var a=TG(e,"string");return typeof a=="symbol"?a:a+""}function TG(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cl.apply(null,arguments)}var RG=()=>(Cq(),null);function xm(e){if(typeof e=="number")return e;if(typeof e=="string"){var a=parseFloat(e);if(!Number.isNaN(a))return a}return 0}var PG=b.forwardRef((e,a)=>{var r,n,i=b.useRef(null),[o,c]=b.useState({containerWidth:xm((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:xm((n=e.style)===null||n===void 0?void 0:n.height)}),m=b.useCallback((h,p)=>{c(x=>{var j=Math.round(h),v=Math.round(p);return x.containerWidth===j&&x.containerHeight===v?x:{containerWidth:j,containerHeight:v}})},[]),u=b.useCallback(h=>{if(typeof a=="function"&&a(h),h!=null){var{width:p,height:x}=h.getBoundingClientRect();m(p,x);var j=w=>{var{width:A,height:S}=w[0].contentRect;m(A,S)},v=new ResizeObserver(j);v.observe(h),i.current=v}},[a,m]);return b.useEffect(()=>()=>{var h=i.current;h?.disconnect()},[m]),b.createElement(b.Fragment,null,b.createElement(qm,{width:o.containerWidth,height:o.containerHeight}),b.createElement("div",cl({ref:u},e)))}),_G=b.forwardRef((e,a)=>{var{width:r,height:n}=e,[i,o]=b.useState({containerWidth:xm(r),containerHeight:xm(n)}),c=b.useCallback((u,h)=>{o(p=>{var x=Math.round(u),j=Math.round(h);return p.containerWidth===x&&p.containerHeight===j?p:{containerWidth:x,containerHeight:j}})},[]),m=b.useCallback(u=>{if(typeof a=="function"&&a(u),u!=null){var{width:h,height:p}=u.getBoundingClientRect();c(h,p)}},[a,c]);return b.createElement(b.Fragment,null,b.createElement(qm,{width:i.containerWidth,height:i.containerHeight}),b.createElement("div",cl({ref:m},e)))}),MG=b.forwardRef((e,a)=>{var{width:r,height:n}=e;return b.createElement(b.Fragment,null,b.createElement(qm,{width:r,height:n}),b.createElement("div",cl({ref:a},e)))}),zG=b.forwardRef((e,a)=>{var{width:r,height:n}=e;return Cn(r)||Cn(n)?b.createElement(_G,cl({},e,{ref:a})):b.createElement(MG,cl({},e,{ref:a}))});function LG(e){return e===!0?PG:zG}var BG=b.forwardRef((e,a)=>{var{children:r,className:n,height:i,onClick:o,onContextMenu:c,onDoubleClick:m,onMouseDown:u,onMouseEnter:h,onMouseLeave:p,onMouseMove:x,onMouseUp:j,onTouchEnd:v,onTouchMove:w,onTouchStart:A,style:S,width:g,responsive:C,dispatchTouchEvents:k=!0}=e,O=b.useRef(null),D=zt(),[B,L]=b.useState(null),[T,R]=b.useState(null),z=kG(),$=t0(),Z=$?.width>0?$.width:g,fe=$?.height>0?$.height:i,se=b.useCallback(G=>{z(G),typeof a=="function"&&a(G),L(G),R(G),G!=null&&(O.current=G)},[z,a,L,R]),ie=b.useCallback(G=>{D(IO(G)),D(ur({handler:o,reactEvent:G}))},[D,o]),V=b.useCallback(G=>{D(gb(G)),D(ur({handler:h,reactEvent:G}))},[D,h]),K=b.useCallback(G=>{D(BE()),D(ur({handler:p,reactEvent:G}))},[D,p]),ce=b.useCallback(G=>{D(gb(G)),D(ur({handler:x,reactEvent:G}))},[D,x]),U=b.useCallback(()=>{D(VO())},[D]),I=b.useCallback(G=>{D(HO(G.key))},[D]),P=b.useCallback(G=>{D(ur({handler:c,reactEvent:G}))},[D,c]),H=b.useCallback(G=>{D(ur({handler:m,reactEvent:G}))},[D,m]),ee=b.useCallback(G=>{D(ur({handler:u,reactEvent:G}))},[D,u]),pe=b.useCallback(G=>{D(ur({handler:j,reactEvent:G}))},[D,j]),ve=b.useCallback(G=>{D(ur({handler:A,reactEvent:G}))},[D,A]),ue=b.useCallback(G=>{k&&D(KO(G)),D(ur({handler:w,reactEvent:G}))},[D,k,w]),he=b.useCallback(G=>{D(ur({handler:v,reactEvent:G}))},[D,v]),te=LG(C);return b.createElement(nO.Provider,{value:B},b.createElement(YM.Provider,{value:T},b.createElement(te,{width:Z??S?.width,height:fe??S?.height,className:gt("recharts-wrapper",n),style:EG({position:"relative",cursor:"default",width:Z,height:fe},S),onClick:ie,onContextMenu:P,onDoubleClick:H,onFocus:U,onKeyDown:I,onMouseDown:ee,onMouseEnter:V,onMouseLeave:K,onMouseMove:ce,onMouseUp:pe,onTouchEnd:he,onTouchMove:ue,onTouchStart:ve,ref:se},b.createElement(RG,null),r)))}),IG=["width","height","responsive","children","className","style","compact","title","desc"];function FG(e,a){if(e==null)return{};var r,n,i=$G(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function $G(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var UG=b.forwardRef((e,a)=>{var{width:r,height:n,responsive:i,children:o,className:c,style:m,compact:u,title:h,desc:p}=e,x=FG(e,IG),j=An(x);return u?b.createElement(b.Fragment,null,b.createElement(qm,{width:r,height:n}),b.createElement(FA,{otherAttributes:j,title:h,desc:p},o)):b.createElement(BG,{className:c,style:m,width:r,height:n,responsive:i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},b.createElement(FA,{otherAttributes:j,title:h,desc:p,ref:a},b.createElement(aK,null,o)))});function bb(){return bb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bb.apply(null,arguments)}var qG={top:5,right:5,bottom:5,left:5},HG={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:qG,reverseStackOrder:!1,syncMethod:"index",responsive:!1},VG=b.forwardRef(function(a,r){var n,i=vr(a.categoricalChartProps,HG),{chartName:o,defaultTooltipEventType:c,validateTooltipEventTypes:m,tooltipPayloadSearcher:u,categoricalChartProps:h}=a,p={chartName:o,defaultTooltipEventType:c,validateTooltipEventTypes:m,tooltipPayloadSearcher:u,eventEmitter:void 0};return b.createElement(bG,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},b.createElement(YY,{chartData:h.data}),b.createElement(yG,{layout:i.layout,margin:i.margin}),b.createElement(vG,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),b.createElement(UG,bb({},i,{ref:r})))}),YG=["axis","item"],KG=b.forwardRef((e,a)=>b.createElement(VG,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:YG,tooltipPayloadSearcher:dq,categoricalChartProps:e,ref:a}));const GG=()=>{const[e,a]=b.useState("1Week"),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState(""),[j,v]=b.useState([]),{user:w}=br(te=>te.user),[A,S]=b.useState(null),[g,C]=b.useState({amount:"",remarks:""}),[k,O]=b.useState(null),[D,B]=b.useState({amount:"",remarks:""});b.useEffect(()=>{(async()=>{try{const G=localStorage.getItem("token"),xe=await F.get("/api/expenses/",{headers:{Authorization:`Bearer ${G}`}});xe.data?.expenses&&v(xe.data.expenses.map(Ne=>({id:Ne._id,date:Ne.date?Ne.date.split("T")[0]:"",expenseName:Ne.expenseName,amount:Ne.amount,remarks:Ne.remarks||"",createdBy:Ne.createdBy})))}catch(G){console.error("load expenses error",G.response?.data||G.message)}})()},[]);const[L,T]=b.useState(!1),[R,z]=b.useState("all"),[$,Z]=b.useState(""),[fe,se]=b.useState(""),[ie,V]=b.useState(""),[K,ce]=b.useState(""),U=async()=>{if(!c||!r||!i){_.error("Please fill Date, Select, and Amount fields");return}const te=Number(String(i).replace(/,/g,""));if(Number.isNaN(te)){_.error("Please enter a valid number for amount");return}const xe={date:c,type:r,expenseName:{office:"Office Expense",bills:"Bills",salaries:"Salaries"}[r]||"Other Expense",amount:te,remarks:u};try{const Ne=localStorage.getItem("token"),_e=(await F.post("/api/expenses/",xe,{headers:{Authorization:`Bearer ${Ne}`}})).data?.expense;if(_e){const je={id:_e._id,date:_e.date?_e.date.split("T")[0]:c,expenseName:_e.expenseName,amount:_e.amount,remarks:_e.remarks||"",createdBy:_e.createdBy};v(Ee=>[je,...Ee])}else v(je=>[{id:Date.now(),date:c,expenseName:xe.expenseName,amount:xe.amount,remarks:xe.remarks},...je]);n(""),o(""),m(""),h(""),_.success("Expense added")}catch(Ne){console.error("create expense failed",Ne.response?.data||Ne.message),_.error("Failed to create expense")}},I=te=>te?new Date(te):null,P=b.useMemo(()=>{if(!j||j.length===0)return[];const te=new Date,G=(je,Ee)=>{const Ce=new Date(je),Ke=new Date(Ee);return Ke.setHours(23,59,59,999),j.reduce((dt,Qt)=>{const Xa=I(Qt.date);return Xa&&Xa>=Ce&&Xa<=Ke?dt+Number(Qt.amount||0):dt},0)},xe=je=>new Date(je).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Ne=je=>new Date(je).toLocaleDateString(void 0,{month:"short",year:"numeric"});if(e==="1Week"){const je=[];for(let Ee=6;Ee>=0;Ee--){const Ce=new Date(te);Ce.setDate(te.getDate()-Ee);const Ke=new Date(Ce.getFullYear(),Ce.getMonth(),Ce.getDate()),dt=new Date(Ce.getFullYear(),Ce.getMonth(),Ce.getDate()),Qt=G(Ke,dt);je.push({label:xe(Ce),value:Qt})}return je}if(e==="1Month"){const je=[];for(let Ee=29;Ee>=0;Ee--){const Ce=new Date(te);Ce.setDate(te.getDate()-Ee);const Ke=new Date(Ce.getFullYear(),Ce.getMonth(),Ce.getDate()),dt=new Date(Ce.getFullYear(),Ce.getMonth(),Ce.getDate()),Qt=G(Ke,dt);je.push({label:xe(Ce),value:Qt})}return je}if(e==="5Weeks"){const je=[];for(let Ee=4;Ee>=0;Ee--){const Ce=new Date(te);Ce.setDate(te.getDate()-Ee*7);const Ke=new Date(Ce);Ke.setDate(Ce.getDate()-6);const dt=G(Ke,Ce);je.push({label:`${xe(Ke)} - ${xe(Ce)}`,value:dt})}return je}if(e==="1Year"){const je=[];for(let Ee=11;Ee>=0;Ee--){const Ce=new Date(te.getFullYear(),te.getMonth()-Ee,1),Ke=new Date(Ce.getFullYear(),Ce.getMonth(),1),dt=new Date(Ce.getFullYear(),Ce.getMonth()+1,0),Qt=G(Ke,dt);je.push({label:Ne(Ce),value:Qt})}return je}const ne=new Map;return j.forEach(je=>{if(!je.date)return;const Ee=I(je.date);if(!Ee)return;const Ce=`${Ee.getFullYear()}-${String(Ee.getMonth()+1).padStart(2,"0")}`;ne.set(Ce,(ne.get(Ce)||0)+Number(je.amount||0))}),Array.from(ne.entries()).sort((je,Ee)=>je[0].localeCompare(Ee[0])).map(([je,Ee])=>{const[Ce,Ke]=je.split("-"),dt=new Date(Number(Ce),Number(Ke)-1,1);return{label:Ne(dt),value:Ee}})},[j,e]),H=j.filter(te=>{const G=p.toLowerCase();if(!(te.expenseName.toLowerCase().includes(G)||te.remarks.toLowerCase().includes(G)||te.amount.toString().toLowerCase().includes(G)||te.date.toLowerCase().includes(G)))return!1;if(R!=="all"){const dt={office:"Office Expense",bills:"Bills",salaries:"Salaries"}[R]||null;if(dt&&te.expenseName!==dt)return!1}const Ne=I(te.date),ne=I($),_e=I(fe);if(ne&&Ne<ne||_e&&Ne>_e)return!1;const je=Number(te.amount.toString().replace(/,/g,"")),Ee=ie?Number(ie):null,Ce=K?Number(K):null;return!(Ee!==null&&je<Ee||Ce!==null&&je>Ce)}),ee=()=>{z("all"),Z(""),se(""),V(""),ce("")},[pe,ve]=b.useState(!1),ue=()=>{ve(!0),T(!1),_.success("Filters applied")},he=()=>{try{const te=H,G=`
<html>
<head>
<title>Expenses Report</title>
<style>
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid #ddd; padding: 8px; }
th { background: #f3f3f3; }
</style>
</head>
<body>
<h2>Expenses Report</h2>
<p>Total: ${Number(j.reduce((Ne,ne)=>Ne+Number(ne.amount||0),0)).toLocaleString()}</p>
<table>
<thead><tr><th>Date</th><th>Expense Name</th><th>Amount</th><th>Remarks</th></tr></thead>
<tbody>
${te.map(Ne=>`<tr><td>${Ne.date}</td><td>${Ne.expenseName}</td><td>${Number(Ne.amount).toLocaleString()}</td><td>${Ne.remarks||""}</td></tr>`).join("")}
</tbody>
</table>
</body>
</html>
`,xe=window.open("","_blank");xe.document.write(G),xe.document.close(),xe.focus(),xe.print(),xe.close()}catch(te){console.error("print failed",te),_.error("Print failed")}};return t.jsxs("div",{className:"flex min-h-screen bg-gray-50",children:[t.jsx("div",{className:"hidden md:block w-[20%] bg-white",children:t.jsx(Rr,{})}),t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"min-h-screen bg-gray-100 p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-6",children:[t.jsx("div",{className:"flex-1 flex justify-center gap-3",children:[{key:"1Week",label:"1 Week"},{key:"1Month",label:"1 Month"},{key:"1Year",label:"1 Year"},{key:"5Weeks",label:"5 Weeks"},{key:"MAX",label:"MAX"}].map(te=>t.jsx("button",{onClick:()=>a(te.key),className:`px-3 py-1 rounded-md text-sm border transition-colors duration-200 ${e===te.key?"bg-blue-600 border-blue-700 text-white":"bg-blue-200 border-blue-400 text-blue-800 hover:bg-blue-200"}`,children:te.label},te.key))}),t.jsx("div",{className:"ml-6",children:t.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 rounded-md bg-green-600 text-white hover:bg-green-700 transition-colors duration-200",children:[t.jsx(mt,{className:"text-white"}),t.jsx("span",{className:"text-sm font-medium",children:"Print"})]})})]}),t.jsxs("div",{className:"bg-orange-100 rounded-xl p-4 mb-5 shadow-lg",children:[t.jsx("div",{className:"flex items-center justify-center mb-3",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-400"}),t.jsx("div",{className:"text-2xl font-semibold text-gray-800",children:Number(j.reduce((te,G)=>te+Number(G.amount||0),0)).toLocaleString()}),t.jsx("div",{className:"text-sm text-gray-800 ml-2",children:"Total Expense"})]})}),t.jsx("div",{className:"w-full h-72 md:h-96",children:t.jsx(BL,{width:"100%",height:"100%",children:t.jsxs(KG,{data:P,margin:{top:20,right:30,left:20,bottom:5},barCategoryGap:"20%",barGap:0,children:[t.jsx(zO,{strokeDasharray:"3 3",vertical:!1}),t.jsx(LO,{dataKey:"label",tickLine:!1,axisLine:!1}),t.jsx(BO,{tickFormatter:te=>te>=1e3?`${te/1e3}k`:te}),t.jsx(_q,{formatter:te=>new Intl.NumberFormat().format(te)}),t.jsx(DO,{dataKey:"value",radius:0,fill:"#16a34a"})]})})})]}),t.jsx("div",{className:"bg-green-100 rounded-lg p-4 mb-4 shadow-sm border border-green-200",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-6 gap-3 items-end",children:[t.jsxs("div",{className:"md:col-span-1",children:[t.jsx("label",{className:"text-sm block mb-1",children:"Select"}),t.jsxs("select",{value:r,onChange:te=>n(te.target.value),className:"w-full bg-white px-3 py-2 rounded border border-gray-200",children:[t.jsx("option",{value:"",children:"Select"}),t.jsx("option",{value:"office",children:"Office Expense"}),t.jsx("option",{value:"bills",children:"Bills"}),t.jsx("option",{value:"salaries",children:"Salaries"})]})]}),t.jsxs("div",{className:"md:col-span-1",children:[t.jsx("label",{className:"text-sm block mb-1",children:"Amount"}),t.jsx("input",{value:i,onChange:te=>o(te.target.value),className:"w-full bg-white px-3 py-2 rounded border border-gray-200",placeholder:"25,000"})]}),t.jsxs("div",{className:"md:col-span-1",children:[t.jsx("label",{className:"text-sm block mb-1",children:"Date"}),t.jsx("input",{value:c,onChange:te=>m(te.target.value),type:"date",className:"w-full bg-white px-3 py-2 rounded border border-gray-200"})]}),t.jsxs("div",{className:"md:col-span-3",children:[t.jsx("label",{className:"text-sm block mb-1",children:"Remarks"}),t.jsx("input",{value:u,onChange:te=>h(te.target.value),className:"w-full bg-white px-3 py-2 rounded border border-gray-200",placeholder:"Lorem ipsum dolor sit amet consectetur. Ante egestas."})]}),t.jsx("div",{className:"md:col-span-6 flex justify-center mt-2",children:t.jsx("button",{onClick:U,className:"bg-green-600 text-white py-2 px-28 rounded-md font-semibold",children:"Add"})})]})}),t.jsxs("div",{className:"flex items-center gap-3 mb-3 relative",children:[t.jsxs("div",{className:"flex items-center bg-green-100 rounded-md px-3 py-2 flex-1",children:[t.jsx(pa,{className:"text-green-700 mr-2"}),t.jsx("input",{onChange:te=>x(te.target.value),value:p,placeholder:"e.g electric bills",className:"bg-transparent outline-none w-full text-sm"})]}),t.jsxs("button",{onClick:()=>T(!L),className:"flex items-center gap-2 bg-green-600 text-white px-3 py-2 rounded-md relative z-10",children:[t.jsx(zC,{}),"Filter"]}),t.jsxs("button",{className:"flex items-center gap-2 bg-green-600 text-white px-3 py-2 rounded-md",children:[t.jsx(mt,{}),t.jsx("span",{onClick:he,children:"Print"})]}),L&&t.jsxs("div",{className:"absolute top-full right-0 mt-12 w-80 bg-white rounded shadow-lg border border-gray-300 z-20 p-4",children:[t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Expense Name"}),t.jsxs("select",{className:"w-full border border-gray-300 rounded px-2 py-1",value:R,onChange:te=>z(te.target.value),children:[t.jsx("option",{value:"all",children:"All"}),t.jsx("option",{value:"office",children:"Office Expense"}),t.jsx("option",{value:"bills",children:"Bills"}),t.jsx("option",{value:"salaries",children:"Salaries"})]})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Date From"}),t.jsx("input",{type:"date",className:"w-full border border-gray-300 rounded px-2 py-1",value:$,onChange:te=>Z(te.target.value)})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Date To"}),t.jsx("input",{type:"date",className:"w-full border border-gray-300 rounded px-2 py-1",value:fe,onChange:te=>se(te.target.value)})]}),t.jsxs("div",{className:"mb-3 grid grid-cols-2 gap-3",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Min Amount"}),t.jsx("input",{type:"number",className:"w-full border border-gray-300 rounded px-2 py-1",value:ie,onChange:te=>V(te.target.value),placeholder:"0",min:0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Max Amount"}),t.jsx("input",{type:"number",className:"w-full border border-gray-300 rounded px-2 py-1",value:K,onChange:te=>ce(te.target.value),placeholder:"0",min:0})]})]}),t.jsxs("div",{className:"flex justify-between mt-4",children:[t.jsx("button",{onClick:()=>{ee(),T(!1),_("Filters reset")},className:"px-4 py-2 bg-gray-300 rounded",children:"Reset"}),t.jsx("button",{onClick:ue,className:"px-4 py-2 bg-green-600 text-white rounded",children:"Apply"})]})]})]}),t.jsx("hr",{className:"border-t border-gray-200 mb-4"}),t.jsx("div",{className:"bg-white shadow-sm overflow-x-auto ",children:t.jsxs("table",{className:"min-w-full table-auto border border-black",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-50",children:[t.jsxs("th",{className:"px-4 py-3 border-b text-right text-sm font-medium",children:["Date"," ",t.jsx(qh,{className:"inline-block ml-2 text-gray-400"})]}),t.jsxs("th",{className:"px-4 py-3 border-b text-right text-sm font-medium",children:["Expense Name"," ",t.jsx(qh,{className:"inline-block ml-2 text-gray-400"})]}),t.jsxs("th",{className:"px-4 py-3 border-b text-right text-sm font-medium",children:["Amount"," ",t.jsx(qh,{className:"inline-block ml-2 text-gray-400"})]}),t.jsx("th",{className:"px-4 py-3 border-b text-left text-sm font-medium",children:"Remarks"})]})}),t.jsxs("tbody",{className:"",children:[H.map(te=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-3 border-b text-right text-sm",children:te.date}),t.jsx("td",{className:"px-4 py-3 border-b text-right text-sm",children:te.expenseName}),t.jsx("td",{className:"px-4 py-3 border-b text-right text-sm",children:Number(te.amount).toLocaleString()}),t.jsxs("td",{className:"px-4 py-3 border-b text-sm flex items-center justify-between",children:[t.jsx("span",{children:te.remarks}),t.jsx("div",{className:"flex items-center gap-2",children:A===te.id?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{value:g.amount,onChange:G=>C(xe=>({...xe,amount:G.target.value})),className:"w-24 px-2 py-1 border rounded",placeholder:"Amount"}),t.jsx("input",{value:g.remarks,onChange:G=>C(xe=>({...xe,remarks:G.target.value})),className:"w-48 px-2 py-1 border rounded",placeholder:"Remarks"}),t.jsx("button",{onClick:async()=>{const G=Number(String(g.amount).replace(/,/g,""));if(Number.isNaN(G)){_.error("Invalid amount");return}try{const xe=localStorage.getItem("token");await F.put(`/api/expenses/${te.id}`,{amount:G,remarks:g.remarks},{headers:{Authorization:`Bearer ${xe}`}}),v(j.map(Ne=>Ne.id===te.id?{...Ne,amount:G,remarks:g.remarks}:Ne)),S(null),_.success("Expense updated")}catch(xe){console.error(xe),_.error("Update failed")}},className:"px-2 py-1 bg-blue-600 text-white rounded",children:"Save"}),t.jsx("button",{onClick:()=>{S(null),C({amount:"",remarks:""})},className:"px-2 py-1 bg-gray-300 rounded",children:"Cancel"})]}):k===te.id?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{value:D.amount,onChange:G=>B(xe=>({...xe,amount:G.target.value})),className:"w-24 px-2 py-1 border rounded",placeholder:"Amount"}),t.jsx("input",{value:D.remarks,onChange:G=>B(xe=>({...xe,remarks:G.target.value})),className:"w-48 px-2 py-1 border rounded",placeholder:"Remarks"}),t.jsx("button",{onClick:async()=>{const G=Number(String(D.amount).replace(/,/g,""));if(Number.isNaN(G)){_.error("Invalid amount");return}try{const xe=localStorage.getItem("token");await F.post(`/api/expenses/${te.id}/request`,{requestType:"edit",payload:{amount:G,remarks:D.remarks}},{headers:{Authorization:`Bearer ${xe}`}}),O(null),B({amount:"",remarks:""}),_.success("Edit request submitted to superadmin")}catch(xe){console.error(xe),_.error("Request failed")}},className:"px-2 py-1 bg-yellow-600 text-white rounded",children:"Submit"}),t.jsx("button",{onClick:()=>{O(null),B({amount:"",remarks:""})},className:"px-2 py-1 bg-gray-300 rounded",children:"Cancel"})]}):w?.role==="superadmin"?t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>{S(te.id),C({amount:te.amount,remarks:te.remarks})},className:"px-2 py-1 bg-blue-600 text-white rounded",children:"Edit"}),t.jsx("button",{onClick:async()=>{try{const G=localStorage.getItem("token");await F.delete(`/api/expenses/${te.id}`,{headers:{Authorization:`Bearer ${G}`}}),v(j.filter(xe=>xe.id!==te.id)),_.success("Expense deleted")}catch(G){console.error(G),_.error("Delete failed")}},className:"px-2 py-1 bg-red-600 text-white rounded",children:"Delete"})]}):t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>{O(te.id),B({amount:te.amount,remarks:te.remarks})},className:"px-2 py-1 bg-yellow-600 text-white rounded",children:"Request Edit"}),t.jsx("button",{onClick:async()=>{try{const G=localStorage.getItem("token");await F.post(`/api/expenses/${te.id}/request`,{requestType:"delete"},{headers:{Authorization:`Bearer ${G}`}}),_.success("Delete request submitted to superadmin")}catch(G){console.error(G),_.error("Request failed")}},className:"px-2 py-1 bg-yellow-600 text-white rounded",children:"Request Delete"})]})})]})]},te.id)),H.length===0&&t.jsx("tr",{children:t.jsx("td",{colSpan:4,className:"text-center py-4 text-gray-500",children:"No expenses found."})})]})]})})]})})]})};function JG(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 0 0 9.3-35.2l-.9-2.6a443.74 443.74 0 0 0-79.7-137.9l-1.8-2.1a32.12 32.12 0 0 0-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 0 0-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 0 0-25.8 25.7l-15.8 85.4a351.86 351.86 0 0 0-99 57.4l-81.9-29.1a32 32 0 0 0-35.1 9.5l-1.8 2.1a446.02 446.02 0 0 0-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 0 0-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0 0 35.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0 0 25.8 25.7l2.7.5a449.4 449.4 0 0 0 159 0l2.7-.5a32.05 32.05 0 0 0 25.8-25.7l15.7-85a350 350 0 0 0 99.7-57.6l81.3 28.9a32 32 0 0 0 35.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 0 1-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 0 1-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 0 1 512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 0 1 400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 0 1 624 502c0 29.9-11.7 58-32.8 79.2z"},child:[]}]})(e)}function WG(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M824.2 699.9a301.55 301.55 0 0 0-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 0 0-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 0 0 8 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 0 1 612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 0 0 8-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 0 1-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 0 1 612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 0 1-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 0 0 8 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"},child:[]}]})(e)}function XG(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M858.5 763.6a374 374 0 0 0-80.6-119.5 375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"},child:[]}]})(e)}function ZG(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"7",height:"7"},child:[]},{tag:"rect",attr:{x:"14",y:"3",width:"7",height:"7"},child:[]},{tag:"rect",attr:{x:"14",y:"14",width:"7",height:"7"},child:[]},{tag:"rect",attr:{x:"3",y:"14",width:"7",height:"7"},child:[]}]})(e)}function QG(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"12 2 2 7 12 12 22 7 12 2"},child:[]},{tag:"polyline",attr:{points:"2 17 12 22 22 17"},child:[]},{tag:"polyline",attr:{points:"2 12 12 17 22 12"},child:[]}]})(e)}const UA=[{to:"/admin",label:"Admin Area",icon:ZG},{to:"/admin/configuration",label:"Configuration",icon:JG},{to:"/admin/accounting",label:"Accounting & Finance",icon:QG},{to:"/admin/employer-management",label:"Employer Management",icon:WG},{to:"/admin/candidate-management",label:"Candidate Management",icon:XG}],qA=[{to:"/admin/dashboard",label:"Dashboard"},{to:"/admin/manage-users",label:"Manage Users"},{to:"/admin/manage-role",label:"Manage Role"},{to:"/admin/user-log-report",label:"User Log Report"}],HA=[{to:"/admin/accounting/chart-of-accounts",label:"Chart of Accounts"},{to:"/admin/accounting/opening-balance",label:"Opening Balance"},{to:"/admin/accounting/cash-receipt",label:"Cash Receipt"},{to:"/admin/accounting/cash-payment",label:"Cash Payment"},{to:"/admin/accounting/bank-receipt",label:"Bank Receipt"},{to:"/admin/accounting/bank-payment",label:"Bank Payment"},{to:"/admin/accounting/jv",label:"JV"},{to:"/admin/accounting/manage-payments",label:"Manage Payments"},{to:"/admin/accounting/job-payment",label:"Job Payment"},{to:"/admin/accounting/travel-agent-payment",label:"Travel Agent Payment"},{to:"/admin/accounting/candidate-receipt",label:"Candidate Receipt"},{to:"/admin/accounting/candidate-jv",label:"Candidate JV"},{to:"/admin/accounting/expenses-against-candidate",label:"Expenses Against Candidate"},{to:"/admin/accounting/report-manager",label:"Report Manager (AF)"},{to:"/admin/accounting/chart-of-accounts-balances",label:"Chart of Account with Balances"},{to:"/admin/accounting/cash-book",label:"Cash Book"},{to:"/admin/accounting/bank-book",label:"Bank Book"},{to:"/admin/accounting/general-ledger",label:"General Ledger"},{to:"/admin/accounting/trial-balance",label:"Trial Balance"},{to:"/admin/accounting/account-balances",label:"Account Balances"},{to:"/admin/accounting/income-statement",label:"Income Statement"},{to:"/admin/accounting/balance-sheet",label:"Balance Sheet"},{to:"/admin/accounting/cash-flow-statement",label:"Cash Flow Statement"},{to:"/admin/accounting/equity-report",label:"Equity Report"}],VA=[{to:"/admin/config/add-payment-agent",label:"Add Payment Agent"},{to:"/admin/config/add-recruitment-agent",label:"Add Recruitment Agent"},{to:"/admin/config/add-travel-agent",label:"Add Travel Agent"},{to:"/admin/config/manage-travel-agents",label:"Manage Travel Agents"},{to:"/admin/config/visa-categories",label:"Visa Categories"},{to:"/admin/config/education-categories",label:"Education Categories"},{to:"/admin/config/job-categories",label:"Job Categories"},{to:"/admin/config/sub-categories",label:"Sub Categories"},{to:"/admin/config/working-categories",label:"Working Categories"},{to:"/admin/config/visa-issuing-authorities",label:"Visa Issuing Authorities"},{to:"/admin/config/verifying-institutions",label:"Verifying Institutions"},{to:"/admin/config/add-test-center",label:"Add Test Center"},{to:"/admin/config/add-medical-centers",label:"Add Medical Centers"},{to:"/admin/config/test-types",label:"Add Test Types"},{to:"/admin/config/age-ranges",label:"Age Ranges"},{to:"/admin/config/salary-ranges",label:"Salary Ranges"},{to:"/admin/config/experience-ranges",label:"Experience Ranges"},{to:"/admin/config/airlines",label:"Airlines"},{to:"/admin/config/visa-professions",label:"Visa Profession"},{to:"/admin/skills",label:"Skills"},{to:"/admin/config/working-sectors",label:"Sectors / Industries"},{to:"/admin/config/cities",label:"Cities"},{to:"/admin/config/education-level",label:"Education Level"},{to:"/admin/config/career-level",label:"Carrer Level"}],YA=[{to:"/admin/employer-management/employer-setup",label:"Employer Setup"},{to:"/admin/employer-management/employer-plans",label:"Employer Plans"},{to:"/admin/employer-management/job-setup",label:"Job Setup"},{to:"/admin/employer-management/employer-ledger",label:"Employer Ledger"},{to:"/admin/employer-management/job-grouping-prints",label:"Job Grouping for Prints"},{to:"/admin/employer-management/status-jobs-report",label:"Status of Jobs Report"},{to:"/admin/employer-management/security-fee-refund-prints",label:"Security Fee Refund Prints"},{to:"/admin/employer-management/travel-agent-ledger",label:"Travel Agent Ledger"}],KA=[{to:"/admin/candidate-management/initial-registration",label:"Initial Registration"},{to:"/admin/candidate-management/candidate-final-registration",label:"Candidate Final Registration"},{to:"/admin/candidate-management/apply-job",label:"Apply Job"},{to:"/admin/candidate-management/shortlisting",label:"Shortlisting"},{to:"/admin/candidate-management/shortlisted-candidates",label:"Shortlisted Candidates"},{to:"/admin/candidate-management/online-applications",label:"Online Applications"},{to:"/admin/candidate-management/job-applications",label:"Job Applications"},{to:"/admin/candidate-management/freeze-applications",label:"Freeze Applications"},{to:"/admin/candidate-management/completed-applications",label:"Completed Applications"},{to:"/admin/candidate-management/interview-schedule",label:"Interview Schedule"},{to:"/admin/candidate-management/bulk-application-maker",label:"Bulk Application Maker"},{to:"/admin/candidate-management/bulk-offer-sender",label:"Bulk Offer Sender"},{to:"/admin/candidate-management/bulk-flight-cancel",label:"Bulk flight Cancel"},{to:"/admin/candidate-management/report-manager",label:"Report Manager (CM)"},{to:"/admin/candidate-management/candidate-ledger-expenses",label:"Candidate Ledger with Expenses"},{to:"/admin/candidate-management/candidate-ledger-summary",label:"Candidate Ledger Summary"},{to:"/admin/candidate-management/candidate-agent-ledger",label:"Candidate Agent Ledger"},{to:"/admin/candidate-management/protector-print-candidates",label:"Protector Print for Candidates"},{to:"/admin/candidate-management/candidate-filter-report",label:"Candidate Filter Report"},{to:"/admin/candidate-management/traveled-candidates-report",label:"Traveled Candidates Report"},{to:"/admin/candidate-management/candidate-application-status-report",label:"Candidate Application Status Report"}],we=()=>{const[e,a]=b.useState(null);return t.jsx("nav",{className:"bg-white rounded-lg shadow-sm mb-6 px-4 py-3",children:t.jsx("div",{className:"max-w-7xl mx-auto",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-800",children:"Admin"}),t.jsx("p",{className:"text-sm text-gray-500",children:"Management"})]}),t.jsx("div",{className:"hidden md:flex items-center space-x-3",children:UA.map(r=>{const n=r.icon;return r.to==="/admin"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin"&&t.jsx("div",{className:"absolute left-0 mt-2 w-56 bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("ul",{className:"py-2",children:qA.map(i=>t.jsx("li",{children:t.jsx(Vt,{to:i.to,className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:i.label})},i.to))})})]},r.to):r.to==="/admin/configuration"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin/configuration"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin/configuration"&&t.jsx("div",{className:"absolute left-0 mt-2 w-[760px] bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("div",{className:"p-4",children:t.jsx("div",{className:"grid grid-cols-3 gap-2",children:VA.map(i=>t.jsx(Vt,{to:i.to,className:"block px-3 py-2 text-sm text-gray-700 rounded hover:bg-gray-100",children:i.label},i.to))})})})]},r.to):r.to==="/admin/accounting"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin/accounting"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin/accounting"&&t.jsx("div",{className:"absolute left-0 mt-2 w-[800px] bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("div",{className:"p-4",children:t.jsx("div",{className:"grid grid-cols-3 gap-2",children:HA.map(i=>t.jsx(Vt,{to:i.to,className:"block px-3 py-2 text-sm text-gray-700 rounded hover:bg-gray-100",children:i.label},i.to))})})})]},r.to):r.to==="/admin/employer-management"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin/employer-management"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin/employer-management"&&t.jsx("div",{className:"absolute left-0 mt-2 w-64 bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("ul",{className:"py-2",children:YA.map(i=>t.jsx("li",{children:t.jsx(Vt,{to:i.to,className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:i.label})},i.to))})})]},r.to):r.to==="/admin/candidate-management"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin/candidate-management"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin/candidate-management"&&t.jsx("div",{className:"absolute right-0 mt-2 w-[800px] bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("div",{className:"p-4",children:t.jsx("div",{className:"grid grid-cols-3 gap-2",children:KA.map(i=>t.jsx(Vt,{to:i.to,className:"block px-3 py-2 text-sm text-gray-700 rounded hover:bg-gray-100",children:i.label},i.to))})})})]},r.to):t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label})]},r.to)})}),t.jsx("div",{className:"md:hidden",children:t.jsxs("details",{className:"relative",children:[t.jsx("summary",{className:"list-none cursor-pointer px-3 py-2 rounded-md bg-gray-100 text-gray-700",children:"Menu"}),t.jsx("div",{className:"absolute right-0 mt-2 w-64 bg-white border rounded shadow-md z-20",children:t.jsx("ul",{className:"divide-y",children:UA.map(r=>t.jsxs("li",{children:[t.jsxs(Vt,{to:r.to,className:"flex items-center gap-2 px-3 py-2 hover:bg-gray-50 text-sm text-gray-700",children:[t.jsx(r.icon,{}),t.jsx("span",{children:r.label})]}),r.to==="/admin"&&t.jsx("ul",{className:"pl-8 py-2",children:qA.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))}),r.to==="/admin/configuration"&&t.jsx("ul",{className:"pl-8 py-2",children:VA.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))}),r.to==="/admin/accounting"&&t.jsx("ul",{className:"pl-8 py-2",children:HA.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))}),r.to==="/admin/employer-management"&&t.jsx("ul",{className:"pl-8 py-2",children:YA.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))}),r.to==="/admin/candidate-management"&&t.jsx("ul",{className:"pl-8 py-2",children:KA.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))})]},r.to))})})]})})]})})})},eJ=()=>{const{user:e}=br(w=>w.user),[a,r]=b.useState([]),[n,i]=b.useState({username:"",email:"",password:""}),[o,c]=b.useState(null),[m,u]=b.useState([]);b.useEffect(()=>{if(e?.role!=="superadmin")return;(async()=>{try{const S=await Ih();r(S.data?.users||[])}catch(S){console.error("fetch users error",S)}})(),(async()=>{try{const S=localStorage.getItem("token"),g=await F.get("/api/expenses/requests",{headers:{Authorization:`Bearer ${S}`}});p(g.data?.requests||[])}catch(S){console.error("fetch requests failed",S)}})()},[e]);const[h,p]=b.useState([]),x=async w=>{w.preventDefault();try{const A=await BP(n.username,n.email,n.password);_.success(A.data.message||"Admin created"),i({username:"",email:"",password:""});try{const S=await Ih();r(S.data?.users||[])}catch(S){console.error("refresh after createAdmin failed",S)}}catch(A){console.error(A),_.error(A.response?.data?.message||"Error")}},j=async w=>{try{const A=await IP(w,m);_.success(A.data.message||"Permissions updated");try{const S=await Ih();r(S.data?.users||[])}catch(S){console.error("refresh after updatePermissions failed",S)}}catch(A){console.error(A),_.error(A.response?.data?.message||"Error updating permissions")}},v=async(w,A)=>{try{const S=localStorage.getItem("token"),g=await F.post(`/api/expenses/requests/${w}/handle`,{action:A},{headers:{Authorization:`Bearer ${S}`}});_.success(g.data.message||"Handled");const C=await F.get("/api/expenses/requests",{headers:{Authorization:`Bearer ${S}`}});p(C.data?.requests||[])}catch(S){console.error("handle request failed",S),_.error(S.response?.data?.message||"Failed")}};return e?.role!=="superadmin"?t.jsx("div",{className:"p-6",children:"Access denied."}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Super Admin Panel"}),t.jsxs("section",{className:"mb-6",children:[t.jsx("h3",{className:"font-semibold",children:"Create Admin"}),t.jsxs("form",{onSubmit:x,className:"space-y-2",children:[t.jsx("input",{value:n.username,onChange:w=>i({...n,username:w.target.value}),placeholder:"Username",className:"border p-2 w-full"}),t.jsx("input",{value:n.email,onChange:w=>i({...n,email:w.target.value}),placeholder:"Email",className:"border p-2 w-full"}),t.jsx("input",{value:n.password,onChange:w=>i({...n,password:w.target.value}),placeholder:"Password",type:"password",className:"border p-2 w-full"}),t.jsx("button",{type:"submit",className:"bg-green-600 text-white px-4 py-2 rounded",children:"Create Admin"})]})]}),t.jsxs("section",{children:[t.jsx("h3",{className:"font-semibold mb-2",children:"Manage Users & Permissions"}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx("div",{children:t.jsx("ul",{className:"border p-2 max-h-64 overflow-auto",children:a.map(w=>t.jsxs("li",{className:`p-2 cursor-pointer ${o===w._id?"bg-gray-200":""}`,onClick:()=>{c(w._id),u(w.permittedPages||[])},children:[t.jsxs("div",{className:"font-medium",children:[w.username," ",t.jsxs("span",{className:"text-xs text-gray-500",children:["(",w.role,")"]})]}),t.jsx("div",{className:"text-xs text-gray-600",children:w.email})]},w._id))})}),t.jsx("div",{children:o?t.jsxs("div",{className:"border p-2",children:[t.jsx("h4",{className:"font-medium mb-2",children:"Edit Permissions"}),t.jsxs("label",{className:"block mb-2",children:[t.jsx("input",{type:"checkbox",checked:m.includes("/dashboard"),onChange:w=>{const A=m.includes("/dashboard")?m.filter(S=>S!=="/dashboard"):[...m,"/dashboard"];u(A)}})," ","Dashboard"]}),t.jsxs("label",{className:"block mb-2",children:[t.jsx("input",{type:"checkbox",checked:m.includes("/expense"),onChange:w=>{const A=m.includes("/expense")?m.filter(S=>S!=="/expense"):[...m,"/expense"];u(A)}})," ","Expense"]}),t.jsxs("label",{className:"block mb-2",children:[t.jsx("input",{type:"checkbox",checked:m.includes("/candidates-cv"),onChange:w=>{const A=m.includes("/candidates-cv")?m.filter(S=>S!=="/candidates-cv"):[...m,"/candidates-cv"];u(A)}})," ","Candidates CV"]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"bg-blue-600 text-white px-3 py-1 rounded",onClick:()=>j(o),children:"Save"})})]}):t.jsx("div",{className:"border p-2",children:"Select a user to edit permissions"})})]})]}),t.jsxs("section",{className:"mt-6",children:[t.jsx("h3",{className:"font-semibold mb-2",children:"Pending Expense Requests"}),t.jsx("div",{className:"border p-3 max-h-72 overflow-auto",children:h.length===0?t.jsx("div",{className:"text-sm text-gray-500",children:"No pending requests"}):t.jsx("ul",{className:"space-y-2",children:h.map(w=>t.jsxs("li",{className:"border p-2 rounded flex justify-between items-start",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium",children:w.requestType.toUpperCase()}),t.jsxs("div",{className:"text-xs text-gray-600",children:["By: ",w.requestedBy?.username||"Unknown"," (",w.requestedBy?.email||"",")"]}),t.jsxs("div",{className:"text-xs text-gray-700 mt-2",children:["Payload: ",JSON.stringify(w.payload||{})]}),t.jsxs("div",{className:"text-xs text-gray-500",children:["Status: ",w.status]})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("button",{onClick:()=>v(w._id,"approve"),className:"px-2 py-1 bg-green-600 text-white rounded",children:"Approve"}),t.jsx("button",{onClick:()=>v(w._id,"reject"),className:"px-2 py-1 bg-red-600 text-white rounded",children:"Reject"})]})]},w._id))})})]})]})};var xg={exports:{}},gg,GA;function tJ(){if(GA)return gg;GA=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gg=e,gg}var bg,JA;function aJ(){if(JA)return bg;JA=1;var e=tJ();function a(){}function r(){}return r.resetWarningCache=a,bg=function(){function n(c,m,u,h,p,x){if(x!==e){var j=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 j.name="Invariant Violation",j}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:a};return o.PropTypes=o,o},bg}var WA;function rJ(){return WA||(WA=1,xg.exports=aJ()()),xg.exports}var nJ=rJ();const ot=Or(nJ);function fl(e,a,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function m(p){try{h(n.next(p))}catch(x){c(x)}}function u(p){try{h(n.throw(p))}catch(x){c(x)}}function h(p){p.done?o(p.value):i(p.value).then(m,u)}h((n=n.apply(e,a||[])).next())})}const sJ=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function pi(e,a,r){const n=lJ(e),{webkitRelativePath:i}=e,o=typeof a=="string"?a:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&XA(n,"path",o),XA(n,"relativePath",o),n}function lJ(e){const{name:a}=e;if(a&&a.lastIndexOf(".")!==-1&&!e.type){const n=a.split(".").pop().toLowerCase(),i=sJ.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function XA(e,a,r){Object.defineProperty(e,a,{value:r,writable:!1,configurable:!1,enumerable:!0})}const iJ=[".DS_Store","Thumbs.db"];function oJ(e){return fl(this,void 0,void 0,function*(){return gm(e)&&cJ(e.dataTransfer)?fJ(e.dataTransfer,e.type):dJ(e)?uJ(e):Array.isArray(e)&&e.every(a=>"getFile"in a&&typeof a.getFile=="function")?mJ(e):[]})}function cJ(e){return gm(e)}function dJ(e){return gm(e)&&gm(e.target)}function gm(e){return typeof e=="object"&&e!==null}function uJ(e){return yb(e.target.files).map(a=>pi(a))}function mJ(e){return fl(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>pi(r))})}function fJ(e,a){return fl(this,void 0,void 0,function*(){if(e.items){const r=yb(e.items).filter(i=>i.kind==="file");if(a!=="drop")return r;const n=yield Promise.all(r.map(pJ));return ZA(JO(n))}return ZA(yb(e.files).map(r=>pi(r)))})}function ZA(e){return e.filter(a=>iJ.indexOf(a.name)===-1)}function yb(e){if(e===null)return[];const a=[];for(let r=0;r<e.length;r++){const n=e[r];a.push(n)}return a}function pJ(e){if(typeof e.webkitGetAsEntry!="function")return QA(e);const a=e.webkitGetAsEntry();return a&&a.isDirectory?WO(a):QA(e,a)}function JO(e){return e.reduce((a,r)=>[...a,...Array.isArray(r)?JO(r):[r]],[])}function QA(e,a){return fl(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const o=yield e.getAsFileSystemHandle();if(o===null)throw new Error(`${e} is not a File`);if(o!==void 0){const c=yield o.getFile();return c.handle=o,pi(c)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return pi(n,(r=a?.fullPath)!==null&&r!==void 0?r:void 0)})}function hJ(e){return fl(this,void 0,void 0,function*(){return e.isDirectory?WO(e):xJ(e)})}function WO(e){const a=e.createReader();return new Promise((r,n)=>{const i=[];function o(){a.readEntries(c=>fl(this,void 0,void 0,function*(){if(c.length){const m=Promise.all(c.map(hJ));i.push(m),o()}else try{const m=yield Promise.all(i);r(m)}catch(m){n(m)}}),c=>{n(c)})}o()})}function xJ(e){return fl(this,void 0,void 0,function*(){return new Promise((a,r)=>{e.file(n=>{const i=pi(n,e.fullPath);a(i)},n=>{r(n)})})})}var uu={},e3;function gJ(){return e3||(e3=1,uu.__esModule=!0,uu.default=function(e,a){if(e&&a){var r=Array.isArray(a)?a:a.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return r.some(function(c){var m=c.trim().toLowerCase();return m.charAt(0)==="."?n.toLowerCase().endsWith(m):m.endsWith("/*")?o===m.replace(/\/.*$/,""):i===m})}return!0}),uu}var bJ=gJ();const yg=Or(bJ);function t3(e){return jJ(e)||vJ(e)||ZO(e)||yJ()}function yJ(){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 vJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jJ(e){if(Array.isArray(e))return vb(e)}function a3(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function r3(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?a3(Object(r),!0).forEach(function(n){XO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XO(e,a,r){return a in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function ic(e,a){return SJ(e)||wJ(e,a)||ZO(e,a)||NJ()}function NJ(){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 ZO(e,a){if(e){if(typeof e=="string")return vb(e,a);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vb(e,a)}}function vb(e,a){(a==null||a>e.length)&&(a=e.length);for(var r=0,n=new Array(a);r<a;r++)n[r]=e[r];return n}function wJ(e,a){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,c,m;try{for(r=r.call(e);!(i=(c=r.next()).done)&&(n.push(c.value),!(a&&n.length===a));i=!0);}catch(u){o=!0,m=u}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw m}}return n}}function SJ(e){if(Array.isArray(e))return e}var AJ=typeof yg=="function"?yg:yg.default,CJ="file-invalid-type",kJ="file-too-large",EJ="file-too-small",OJ="too-many-files",DJ=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=a.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:CJ,message:"File type must be ".concat(n)}},n3=function(a){return{code:kJ,message:"File is larger than ".concat(a," ").concat(a===1?"byte":"bytes")}},s3=function(a){return{code:EJ,message:"File is smaller than ".concat(a," ").concat(a===1?"byte":"bytes")}},TJ={code:OJ,message:"Too many files"};function QO(e,a){var r=e.type==="application/x-moz-file"||AJ(e,a);return[r,r?null:DJ(a)]}function e6(e,a,r){if(Ys(e.size))if(Ys(a)&&Ys(r)){if(e.size>r)return[!1,n3(r)];if(e.size<a)return[!1,s3(a)]}else{if(Ys(a)&&e.size<a)return[!1,s3(a)];if(Ys(r)&&e.size>r)return[!1,n3(r)]}return[!0,null]}function Ys(e){return e!=null}function RJ(e){var a=e.files,r=e.accept,n=e.minSize,i=e.maxSize,o=e.multiple,c=e.maxFiles,m=e.validator;return!o&&a.length>1||o&&c>=1&&a.length>c?!1:a.every(function(u){var h=QO(u,r),p=ic(h,1),x=p[0],j=e6(u,n,i),v=ic(j,1),w=v[0],A=m?m(u):null;return x&&w&&!A})}function bm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function mu(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(a){return a==="Files"||a==="application/x-moz-file"}):!!e.target&&!!e.target.files}function l3(e){e.preventDefault()}function PJ(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function _J(e){return e.indexOf("Edge/")!==-1}function MJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return PJ(e)||_J(e)}function Ir(){for(var e=arguments.length,a=new Array(e),r=0;r<e;r++)a[r]=arguments[r];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),c=1;c<i;c++)o[c-1]=arguments[c];return a.some(function(m){return!bm(n)&&m&&m.apply(void 0,[n].concat(o)),bm(n)})}}function zJ(){return"showOpenFilePicker"in window}function LJ(e){if(Ys(e)){var a=Object.entries(e).filter(function(r){var n=ic(r,2),i=n[0],o=n[1],c=!0;return t6(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),c=!1),(!Array.isArray(o)||!o.every(a6))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(r,n){var i=ic(n,2),o=i[0],c=i[1];return r3(r3({},r),{},XO({},o,c))},{});return[{description:"Files",accept:a}]}return e}function BJ(e){if(Ys(e))return Object.entries(e).reduce(function(a,r){var n=ic(r,2),i=n[0],o=n[1];return[].concat(t3(a),[i],t3(o))},[]).filter(function(a){return t6(a)||a6(a)}).join(",")}function IJ(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function FJ(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function t6(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function a6(e){return/^.*\.[\w]+$/.test(e)}var $J=["children"],UJ=["open"],qJ=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],HJ=["refKey","onChange","onClick"];function VJ(e){return GJ(e)||KJ(e)||r6(e)||YJ()}function YJ(){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 KJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GJ(e){if(Array.isArray(e))return jb(e)}function vg(e,a){return XJ(e)||WJ(e,a)||r6(e,a)||JJ()}function JJ(){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 r6(e,a){if(e){if(typeof e=="string")return jb(e,a);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jb(e,a)}}function jb(e,a){(a==null||a>e.length)&&(a=e.length);for(var r=0,n=new Array(a);r<a;r++)n[r]=e[r];return n}function WJ(e,a){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,c,m;try{for(r=r.call(e);!(i=(c=r.next()).done)&&(n.push(c.value),!(a&&n.length===a));i=!0);}catch(u){o=!0,m=u}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw m}}return n}}function XJ(e){if(Array.isArray(e))return e}function i3(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?i3(Object(r),!0).forEach(function(n){Nb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nb(e,a,r){return a in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function ym(e,a){if(e==null)return{};var r=ZJ(e,a),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(a.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZJ(e,a){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(a.indexOf(i)>=0)&&(r[i]=e[i]);return r}var fy=b.forwardRef(function(e,a){var r=e.children,n=ym(e,$J),i=s6(n),o=i.open,c=ym(i,UJ);return b.useImperativeHandle(a,function(){return{open:o}},[o]),pr.createElement(b.Fragment,null,r(Nt(Nt({},c),{},{open:o})))});fy.displayName="Dropzone";var n6={disabled:!1,getFilesFromEvent:oJ,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};fy.defaultProps=n6;fy.propTypes={children:ot.func,accept:ot.objectOf(ot.arrayOf(ot.string)),multiple:ot.bool,preventDropOnDocument:ot.bool,noClick:ot.bool,noKeyboard:ot.bool,noDrag:ot.bool,noDragEventsBubbling:ot.bool,minSize:ot.number,maxSize:ot.number,maxFiles:ot.number,disabled:ot.bool,getFilesFromEvent:ot.func,onFileDialogCancel:ot.func,onFileDialogOpen:ot.func,useFsAccessApi:ot.bool,autoFocus:ot.bool,onDragEnter:ot.func,onDragLeave:ot.func,onDragOver:ot.func,onDrop:ot.func,onDropAccepted:ot.func,onDropRejected:ot.func,onError:ot.func,validator:ot.func};var wb={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function s6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=Nt(Nt({},n6),e),r=a.accept,n=a.disabled,i=a.getFilesFromEvent,o=a.maxSize,c=a.minSize,m=a.multiple,u=a.maxFiles,h=a.onDragEnter,p=a.onDragLeave,x=a.onDragOver,j=a.onDrop,v=a.onDropAccepted,w=a.onDropRejected,A=a.onFileDialogCancel,S=a.onFileDialogOpen,g=a.useFsAccessApi,C=a.autoFocus,k=a.preventDropOnDocument,O=a.noClick,D=a.noKeyboard,B=a.noDrag,L=a.noDragEventsBubbling,T=a.onError,R=a.validator,z=b.useMemo(function(){return BJ(r)},[r]),$=b.useMemo(function(){return LJ(r)},[r]),Z=b.useMemo(function(){return typeof S=="function"?S:o3},[S]),fe=b.useMemo(function(){return typeof A=="function"?A:o3},[A]),se=b.useRef(null),ie=b.useRef(null),V=b.useReducer(QJ,wb),K=vg(V,2),ce=K[0],U=K[1],I=ce.isFocused,P=ce.isFileDialogActive,H=b.useRef(typeof window<"u"&&window.isSecureContext&&g&&zJ()),ee=function(){!H.current&&P&&setTimeout(function(){if(ie.current){var Pe=ie.current.files;Pe.length||(U({type:"closeDialog"}),fe())}},300)};b.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[ie,P,fe,H]);var pe=b.useRef([]),ve=function(Pe){se.current&&se.current.contains(Pe.target)||(Pe.preventDefault(),pe.current=[])};b.useEffect(function(){return k&&(document.addEventListener("dragover",l3,!1),document.addEventListener("drop",ve,!1)),function(){k&&(document.removeEventListener("dragover",l3),document.removeEventListener("drop",ve))}},[se,k]),b.useEffect(function(){return!n&&C&&se.current&&se.current.focus(),function(){}},[se,C,n]);var ue=b.useCallback(function(ye){T?T(ye):console.error(ye)},[T]),he=b.useCallback(function(ye){ye.preventDefault(),ye.persist(),Xa(ye),pe.current=[].concat(VJ(pe.current),[ye.target]),mu(ye)&&Promise.resolve(i(ye)).then(function(Pe){if(!(bm(ye)&&!L)){var jt=Pe.length,At=jt>0&&RJ({files:Pe,accept:z,minSize:c,maxSize:o,multiple:m,maxFiles:u,validator:R}),$t=jt>0&&!At;U({isDragAccept:At,isDragReject:$t,isDragActive:!0,type:"setDraggedFiles"}),h&&h(ye)}}).catch(function(Pe){return ue(Pe)})},[i,h,ue,L,z,c,o,m,u,R]),te=b.useCallback(function(ye){ye.preventDefault(),ye.persist(),Xa(ye);var Pe=mu(ye);if(Pe&&ye.dataTransfer)try{ye.dataTransfer.dropEffect="copy"}catch{}return Pe&&x&&x(ye),!1},[x,L]),G=b.useCallback(function(ye){ye.preventDefault(),ye.persist(),Xa(ye);var Pe=pe.current.filter(function(At){return se.current&&se.current.contains(At)}),jt=Pe.indexOf(ye.target);jt!==-1&&Pe.splice(jt,1),pe.current=Pe,!(Pe.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),mu(ye)&&p&&p(ye))},[se,p,L]),xe=b.useCallback(function(ye,Pe){var jt=[],At=[];ye.forEach(function($t){var Ss=QO($t,z),Kr=vg(Ss,2),Ri=Kr[0],Pi=Kr[1],Gr=e6($t,c,o),Ut=vg(Gr,2),Za=Ut[0],ea=Ut[1],_i=R?R($t):null;if(Ri&&Za&&!_i)jt.push($t);else{var Mi=[Pi,ea];_i&&(Mi=Mi.concat(_i)),At.push({file:$t,errors:Mi.filter(function(uf){return uf})})}}),(!m&&jt.length>1||m&&u>=1&&jt.length>u)&&(jt.forEach(function($t){At.push({file:$t,errors:[TJ]})}),jt.splice(0)),U({acceptedFiles:jt,fileRejections:At,isDragReject:At.length>0,type:"setFiles"}),j&&j(jt,At,Pe),At.length>0&&w&&w(At,Pe),jt.length>0&&v&&v(jt,Pe)},[U,m,z,c,o,u,j,v,w,R]),Ne=b.useCallback(function(ye){ye.preventDefault(),ye.persist(),Xa(ye),pe.current=[],mu(ye)&&Promise.resolve(i(ye)).then(function(Pe){bm(ye)&&!L||xe(Pe,ye)}).catch(function(Pe){return ue(Pe)}),U({type:"reset"})},[i,xe,ue,L]),ne=b.useCallback(function(){if(H.current){U({type:"openDialog"}),Z();var ye={multiple:m,types:$};window.showOpenFilePicker(ye).then(function(Pe){return i(Pe)}).then(function(Pe){xe(Pe,null),U({type:"closeDialog"})}).catch(function(Pe){IJ(Pe)?(fe(Pe),U({type:"closeDialog"})):FJ(Pe)?(H.current=!1,ie.current?(ie.current.value=null,ie.current.click()):ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ue(Pe)});return}ie.current&&(U({type:"openDialog"}),Z(),ie.current.value=null,ie.current.click())},[U,Z,fe,g,xe,ue,$,m]),_e=b.useCallback(function(ye){!se.current||!se.current.isEqualNode(ye.target)||(ye.key===" "||ye.key==="Enter"||ye.keyCode===32||ye.keyCode===13)&&(ye.preventDefault(),ne())},[se,ne]),je=b.useCallback(function(){U({type:"focus"})},[]),Ee=b.useCallback(function(){U({type:"blur"})},[]),Ce=b.useCallback(function(){O||(MJ()?setTimeout(ne,0):ne())},[O,ne]),Ke=function(Pe){return n?null:Pe},dt=function(Pe){return D?null:Ke(Pe)},Qt=function(Pe){return B?null:Ke(Pe)},Xa=function(Pe){L&&Pe.stopPropagation()},Ti=b.useMemo(function(){return function(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Pe=ye.refKey,jt=Pe===void 0?"ref":Pe,At=ye.role,$t=ye.onKeyDown,Ss=ye.onFocus,Kr=ye.onBlur,Ri=ye.onClick,Pi=ye.onDragEnter,Gr=ye.onDragOver,Ut=ye.onDragLeave,Za=ye.onDrop,ea=ym(ye,qJ);return Nt(Nt(Nb({onKeyDown:dt(Ir($t,_e)),onFocus:dt(Ir(Ss,je)),onBlur:dt(Ir(Kr,Ee)),onClick:Ke(Ir(Ri,Ce)),onDragEnter:Qt(Ir(Pi,he)),onDragOver:Qt(Ir(Gr,te)),onDragLeave:Qt(Ir(Ut,G)),onDrop:Qt(Ir(Za,Ne)),role:typeof At=="string"&&At!==""?At:"presentation"},jt,se),!n&&!D?{tabIndex:0}:{}),ea)}},[se,_e,je,Ee,Ce,he,te,G,Ne,D,B,n]),cf=b.useCallback(function(ye){ye.stopPropagation()},[]),df=b.useMemo(function(){return function(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Pe=ye.refKey,jt=Pe===void 0?"ref":Pe,At=ye.onChange,$t=ye.onClick,Ss=ym(ye,HJ),Kr=Nb({accept:z,multiple:m,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ke(Ir(At,Ne)),onClick:Ke(Ir($t,cf)),tabIndex:-1},jt,ie);return Nt(Nt({},Kr),Ss)}},[ie,r,m,Ne,n]);return Nt(Nt({},ce),{},{isFocused:I&&!n,getRootProps:Ti,getInputProps:df,rootRef:se,inputRef:ie,open:Ke(ne)})}function QJ(e,a){switch(a.type){case"focus":return Nt(Nt({},e),{},{isFocused:!0});case"blur":return Nt(Nt({},e),{},{isFocused:!1});case"openDialog":return Nt(Nt({},wb),{},{isFileDialogActive:!0});case"closeDialog":return Nt(Nt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Nt(Nt({},e),{},{isDragActive:a.isDragActive,isDragAccept:a.isDragAccept,isDragReject:a.isDragReject});case"setFiles":return Nt(Nt({},e),{},{acceptedFiles:a.acceptedFiles,fileRejections:a.fileRejections,isDragReject:a.isDragReject});case"reset":return Nt({},wb);default:return e}}function o3(){}const eW=()=>{const[e,a]=b.useState({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),[r,n]=b.useState([]),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null);b.useEffect(()=>{(async()=>{try{const C=localStorage.getItem("token"),k=await F.get("/api/config/payment-agents",{headers:{Authorization:`Bearer ${C}`}});o(k.data.agents||[])}catch(C){console.error("Load agents error",C)}})()},[]);const p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})},{getRootProps:x,getInputProps:j}=s6({onDrop:g=>{n(g)}}),v=async g=>{g.preventDefault();try{const C=localStorage.getItem("token"),k=new FormData;Object.keys(e).forEach(D=>{k.append(D,e[D])}),r.forEach(D=>{k.append("files",D)}),u?(await F.put(`/api/config/payment-agents/${u._id}`,k,{headers:{Authorization:`Bearer ${C}`}}),_.success("Payment Agent updated successfully")):(await F.post("/api/config/payment-agents",k,{headers:{Authorization:`Bearer ${C}`}}),_.success("Payment Agent added successfully")),a({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),n([]),h(null);const O=await F.get("/api/config/payment-agents",{headers:{Authorization:`Bearer ${C}`}});o(O.data.agents||[])}catch(C){console.error("Submit error",C),_.error("Failed to save Payment Agent")}},w=g=>{h(g),a({code:g.code,name:g.name,location:g.location,cnic:g.cnic,passportNo:g.passportNo,primaryEmail:g.primaryEmail,secondaryEmail:g.secondaryEmail,primaryPhone:g.primaryPhone,secondaryPhone:g.secondaryPhone})},A=async g=>{if(window.confirm("Are you sure you want to delete this agent?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/payment-agents/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Payment Agent deleted successfully"),o(i.filter(k=>k._id!==g))}catch(C){console.error("Delete error",C),_.error("Failed to delete Payment Agent")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.code.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Payment Agents"}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:u?"Edit Detail":"Add Detail"}),t.jsxs("form",{onSubmit:v,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Code *"}),t.jsx("input",{type:"text",name:"code",value:e.code,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Location *"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"CNIC *"}),t.jsx("input",{type:"text",name:"cnic",value:e.cnic,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport No *"}),t.jsx("input",{type:"text",name:"passportNo",value:e.passportNo,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Primary Email"}),t.jsx("input",{type:"email",name:"primaryEmail",value:e.primaryEmail,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Secondary Email"}),t.jsx("input",{type:"email",name:"secondaryEmail",value:e.secondaryEmail,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Primary Phone"}),t.jsx("input",{type:"tel",name:"primaryPhone",value:e.primaryPhone,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Secondary Phone"}),t.jsx("input",{type:"tel",name:"secondaryPhone",value:e.secondaryPhone,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsx("div",{className:"md:col-span-2",children:t.jsxs("div",{...x(),className:"border-2 border-dashed border-gray-300 rounded-md p-6 text-center cursor-pointer hover:border-blue-500 transition-colors",children:[t.jsx("input",{...j()}),t.jsx("p",{className:"text-gray-600",children:"Drag & drop files here or click to select files"}),r.length>0&&t.jsx("div",{className:"mt-2",children:t.jsxs("p",{className:"text-sm text-gray-500",children:[r.length," file(s) selected"]})})]})}),t.jsxs("div",{className:"md:col-span-2 flex gap-4",children:[t.jsxs("button",{type:"submit",className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:[u?"Update":"Add"," Payment Agent"]}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),n([])},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Payment Agent Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[S.length," records"]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Location"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"CNIC"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Primary Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Secondary Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Primary Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Secondary Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.code}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.location}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.cnic}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.primaryEmail}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.secondaryEmail}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.primaryPhone}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.secondaryPhone}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>w(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"9",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length>0?1:0," to"," ",S.length," of ",S.length," entries"]})]})]})]})},tW=()=>{const[e,a]=b.useState({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState([]),[u,h]=b.useState(""),[p,x]=b.useState(null),j=O=>{const{name:D,value:B}=O.target;a({...e,[D]:B})},v=O=>{n(Array.from(O.target.files))},w=O=>{n(r.filter((D,B)=>B!==O))};b.useEffect(()=>{A()},[]);const A=async()=>{try{const O=localStorage.getItem("token"),D=await F.get("/api/config/recruitment-agents/",{headers:{Authorization:`Bearer ${O}`}});m(D.data.agents||[])}catch(O){console.error("Error loading agents:",O),_.error("Failed to load recruitment agents")}},S=async O=>{O.preventDefault(),o(!0);try{const D=localStorage.getItem("token"),B=new FormData;Object.keys(e).forEach(L=>{B.append(L,e[L])}),r.forEach(L=>{B.append("files",L)}),p?(await F.put(`/api/config/recruitment-agents/${p._id}`,B,{headers:{Authorization:`Bearer ${D}`,"Content-Type":"multipart/form-data"}}),_.success("Recruitment Agent updated successfully!")):(await F.post("/api/config/recruitment-agents/",B,{headers:{Authorization:`Bearer ${D}`,"Content-Type":"multipart/form-data"}}),_.success("Recruitment Agent added successfully!")),a({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),n([]),x(null),A()}catch(D){console.error("Error saving recruitment agent:",D),_.error(D.response?.data?.message||"Failed to save recruitment agent")}finally{o(!1)}},g=O=>{x(O),a({code:O.code,name:O.name,location:O.location,cnic:O.cnic,passportNo:O.passportNo,primaryEmail:O.primaryEmail||"",secondaryEmail:O.secondaryEmail||"",primaryPhone:O.primaryPhone||"",secondaryPhone:O.secondaryPhone||""}),n([])},C=async O=>{if(window.confirm("Are you sure you want to delete this recruitment agent?"))try{const D=localStorage.getItem("token");await F.delete(`/api/config/recruitment-agents/${O}`,{headers:{Authorization:`Bearer ${D}`}}),_.success("Recruitment Agent deleted successfully!"),A()}catch(D){console.error("Error deleting agent:",D),_.error("Failed to delete recruitment agent")}},k=c.filter(O=>O.name.toLowerCase().includes(u.toLowerCase())||O.code.toLowerCase().includes(u.toLowerCase())||O.location.toLowerCase().includes(u.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:p?"Edit Recruitment Agent":"Add Recruitment Agent"}),t.jsxs("form",{onSubmit:S,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Agent Code *"}),t.jsx("input",{type:"text",name:"code",value:e.code,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Agent Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Location *"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"CNIC *"}),t.jsx("input",{type:"text",name:"cnic",value:e.cnic,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Passport No *"}),t.jsx("input",{type:"text",name:"passportNo",value:e.passportNo,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Email"}),t.jsx("input",{type:"email",name:"primaryEmail",value:e.primaryEmail,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Email"}),t.jsx("input",{type:"email",name:"secondaryEmail",value:e.secondaryEmail,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Phone"}),t.jsx("input",{type:"tel",name:"primaryPhone",value:e.primaryPhone,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Phone"}),t.jsx("input",{type:"tel",name:"secondaryPhone",value:e.secondaryPhone,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Upload Files"}),t.jsx("input",{type:"file",multiple:!0,onChange:v,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",accept:".pdf,.doc,.docx,.jpg,.jpeg,.png"}),r.length>0&&t.jsx("div",{className:"mt-2 space-y-1",children:r.map((O,D)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-100 px-3 py-2 rounded",children:[t.jsx("span",{className:"text-sm text-gray-700",children:O.name}),t.jsx("button",{type:"button",onClick:()=>w(D),className:"text-red-500 hover:text-red-700",children:t.jsx(ze,{})})]},D))})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:i,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:i?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",p?"Update":"Add"," Recruitment Agent"]})}),p&&t.jsx("button",{type:"button",onClick:()=>{x(null),a({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),n([])},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Recruitment Agents"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search agents...",value:u,onChange:O=>h(O.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Location"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"CNIC"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Primary Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Secondary Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Primary Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Secondary Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:k.length>0?k.map(O=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.code}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.location}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.cnic}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.primaryEmail||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.secondaryEmail||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.primaryPhone||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.secondaryPhone||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>g(O),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>C(O._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},O._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"9",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No recruitment agents found."})})})]})}),k.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",k.length," of ",c.length," entries"]})]})]})]})},aW=()=>{const[e,a]=b.useState({code:"",name:"",location:"",airlinesDealsWith:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:"",address:""}),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState([]),[u,h]=b.useState(""),[p,x]=b.useState(null),j=O=>{const{name:D,value:B}=O.target;a({...e,[D]:B})},v=O=>{n(Array.from(O.target.files))},w=O=>{n(r.filter((D,B)=>B!==O))};b.useEffect(()=>{A()},[]);const A=async()=>{try{const O=localStorage.getItem("token"),D=await F.get("/api/config/travel-agents/",{headers:{Authorization:`Bearer ${O}`}});m(D.data.agents||[])}catch(O){console.error("Error loading agents:",O),_.error("Failed to load travel agents")}},S=async O=>{O.preventDefault(),o(!0);try{const D=localStorage.getItem("token"),B=new FormData;Object.keys(e).forEach(L=>{B.append(L,e[L])}),r.forEach(L=>{B.append("files",L)}),p?(await F.put(`/api/config/travel-agents/${p._id}`,B,{headers:{Authorization:`Bearer ${D}`,"Content-Type":"multipart/form-data"}}),_.success("Travel Agent updated successfully!")):(await F.post("/api/config/travel-agents/",B,{headers:{Authorization:`Bearer ${D}`,"Content-Type":"multipart/form-data"}}),_.success("Travel Agent added successfully!")),a({code:"",name:"",location:"",airlinesDealsWith:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:"",address:""}),n([]),x(null),A()}catch(D){console.error("Error saving travel agent:",D),_.error(D.response?.data?.message||"Failed to save travel agent")}finally{o(!1)}},g=O=>{x(O),a({code:O.code,name:O.name,location:O.location,airlinesDealsWith:O.airlinesDealsWith,primaryEmail:O.primaryEmail||"",secondaryEmail:O.secondaryEmail||"",primaryPhone:O.primaryPhone||"",secondaryPhone:O.secondaryPhone||"",address:O.address||""}),n([])},C=async O=>{if(window.confirm("Are you sure you want to delete this travel agent?"))try{const D=localStorage.getItem("token");await F.delete(`/api/config/travel-agents/${O}`,{headers:{Authorization:`Bearer ${D}`}}),_.success("Travel Agent deleted successfully!"),A()}catch(D){console.error("Error deleting agent:",D),_.error("Failed to delete travel agent")}},k=c.filter(O=>O.name.toLowerCase().includes(u.toLowerCase())||O.code.toLowerCase().includes(u.toLowerCase())||O.location.toLowerCase().includes(u.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:p?"Edit Travel Agent":"Add Travel Agent"}),t.jsxs("form",{onSubmit:S,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Agent Code *"}),t.jsx("input",{type:"text",name:"code",value:e.code,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Agent Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Location *"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Airlines Deals With *"}),t.jsx("input",{type:"text",name:"airlinesDealsWith",value:e.airlinesDealsWith,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Email"}),t.jsx("input",{type:"email",name:"primaryEmail",value:e.primaryEmail,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Email"}),t.jsx("input",{type:"email",name:"secondaryEmail",value:e.secondaryEmail,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Phone"}),t.jsx("input",{type:"tel",name:"primaryPhone",value:e.primaryPhone,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Phone"}),t.jsx("input",{type:"tel",name:"secondaryPhone",value:e.secondaryPhone,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Address"}),t.jsx("textarea",{name:"address",value:e.address,onChange:j,rows:"3",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Enter address..."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Upload Files"}),t.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 text-center hover:border-gray-400 transition-colors",children:[t.jsx("input",{type:"file",multiple:!0,onChange:v,className:"hidden",id:"file-upload",accept:".pdf,.doc,.docx,.jpg,.jpeg,.png"}),t.jsx("label",{htmlFor:"file-upload",className:"cursor-pointer",children:t.jsxs("div",{className:"text-gray-500",children:[t.jsx(Ve,{className:"mx-auto mb-2 text-2xl"}),t.jsx("p",{children:"Drag & drop files here or click to browse"})]})})]}),r.length>0&&t.jsx("div",{className:"mt-2 space-y-1",children:r.map((O,D)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-100 px-3 py-2 rounded",children:[t.jsx("span",{className:"text-sm text-gray-700",children:O.name}),t.jsx("button",{type:"button",onClick:()=>w(D),className:"text-red-500 hover:text-red-700",children:t.jsx(ze,{})})]},D))})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:i,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:i?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",p?"Update":"Add"," Travel Agent"]})}),p&&t.jsx("button",{type:"button",onClick:()=>{x(null),a({code:"",name:"",location:"",airlinesDealsWith:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:"",address:""}),n([])},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Travel Agents"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search agents...",value:u,onChange:O=>h(O.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Location"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Airlines Deals With"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:k.length>0?k.map(O=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.code}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.location}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.primaryPhone||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.airlinesDealsWith}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>g(O),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>C(O._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},O._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No travel agents found."})})})]})}),k.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",k.length," of ",c.length," entries"]})]})]})]})},rW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/visa-categories/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.categories||[])}catch(g){console.error("Error loading visa categories:",g),_.error("Failed to load visa categories")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/visa-categories/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Visa Category updated successfully!")):(await F.post("/api/config/visa-categories/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Visa Category added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving visa category:",C),_.error(C.response?.data?.message||"Failed to save visa category")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this visa category?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/visa-categories/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Visa Category deleted successfully!"),x()}catch(C){console.error("Error deleting category:",C),_.error("Failed to delete visa category")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/visa-categories/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Visa Category ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Visa Category":"Add Visa Category"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Visa Category *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Category"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Visa Categories"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search categories...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No visa categories found."})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," entries"]})]})]})]})},nW=()=>{const[e,a]=b.useState({name:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/visa-issuing-authorities/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.authorities||[])}catch(g){console.error("Error loading visa issuing authorities:",g),_.error("Failed to load visa issuing authorities")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/visa-issuing-authorities/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Visa Issuing Authority updated successfully!")):(await F.post("/api/config/visa-issuing-authorities/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Visa Issuing Authority added successfully!")),a({name:""}),h(null),x()}catch(C){console.error("Error saving visa issuing authority:",C),_.error(C.response?.data?.message||"Failed to save visa issuing authority")}finally{n(!1)}},v=g=>{h(g),a({name:g.name})},w=async g=>{if(window.confirm("Are you sure you want to delete this visa issuing authority?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/visa-issuing-authorities/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Visa Issuing Authority deleted successfully!"),x()}catch(C){console.error("Error deleting authority:",C),_.error("Failed to delete visa issuing authority")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/visa-issuing-authorities/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Visa Issuing Authority ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Visa Issuing Authority":"Add Visa Issuing Authority"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Visa Issuing Authority *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Authority"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Visa Issuing Authorities"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search authorities...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No visa issuing authorities found."})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," ","entries"]})]})]})]})},sW=()=>{const[e,a]=b.useState({name:"",type:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/verifying-institutions/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.institutions||[])}catch(g){console.error("Error loading verifying institutions:",g),_.error("Failed to load verifying institutions")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/verifying-institutions/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Verifying Institution updated successfully!")):(await F.post("/api/config/verifying-institutions/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Verifying Institution added successfully!")),a({name:"",type:""}),h(null),x()}catch(C){console.error("Error saving verifying institution:",C),_.error(C.response?.data?.message||"Failed to save verifying institution")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,type:g.type})},w=async g=>{if(window.confirm("Are you sure you want to delete this verifying institution?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/verifying-institutions/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Verifying Institution deleted successfully!"),x()}catch(C){console.error("Error deleting institution:",C),_.error("Failed to delete verifying institution")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/verifying-institutions/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Verifying Institution ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.type.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Verifying Institution":"Add Verifying Institution"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Institution Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Type *"}),t.jsxs("select",{name:"type",value:e.type,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Type"}),t.jsx("option",{value:"Degree",children:"Degree"}),t.jsx("option",{value:"Diploma",children:"Diploma"})]})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," ","Institution"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",type:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Verifying Institutions"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search institutions...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.type}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No verifying institutions found."})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," ","entries"]})]})]})]})},lW=()=>{const[e,a]=b.useState({name:"",email:"",contactPerson:"",phone:"",location:"",address:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/test-centers/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.testCenters||[])}catch(g){console.error("Error loading test centers:",g),_.error("Failed to load test centers")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/test-centers/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Test Center updated successfully!")):(await F.post("/api/config/test-centers/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Test Center added successfully!")),a({name:"",email:"",contactPerson:"",phone:"",location:"",address:""}),h(null),x()}catch(C){console.error("Error saving test center:",C),_.error(C.response?.data?.message||"Failed to save test center")}finally{n(!1)}},v=g=>{a({name:g.name,email:g.email,contactPerson:g.contactPerson,phone:g.phone,location:g.location,address:g.address}),h(g)},w=async g=>{if(window.confirm("Are you sure you want to delete this test center?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/test-centers/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Test Center deleted successfully!"),x()}catch(C){console.error("Error deleting test center:",C),_.error("Failed to delete test center")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/test-centers/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Test Center ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling test center status:",k),_.error("Failed to update test center status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto py-6 px-4",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Test Center"}),t.jsxs("div",{className:"mb-8",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),t.jsx("input",{type:"email",name:"email",value:e.email,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Contact Person"}),t.jsx("input",{type:"text",name:"contactPerson",value:e.contactPerson,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Phone"}),t.jsx("input",{type:"text",name:"phone",value:e.phone,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Location"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Address *"}),t.jsx("textarea",{name:"address",value:e.address,onChange:p,rows:"3",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("button",{type:"submit",disabled:r,className:"bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50",children:r?"Saving...":u?"Update":"Add"}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",email:"",contactPerson:"",phone:"",location:"",address:""})},className:"ml-4 bg-gray-600 text-white px-6 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500",children:"Cancel"})]})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Test Centre Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[S.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:g=>m(g.target.value),className:"px-3 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Search by name..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Location"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Address"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-center",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.email}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.contactPerson}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.phone}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.location}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.address}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 text-center",children:t.jsxs("div",{className:"flex justify-center space-x-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," ","entries"]})]})]})})]})},iW=()=>{const[e,a]=b.useState({city:"",name:"",phoneNo:"",contactPerson:"",fax:"",email:"",location:"",address:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/medical-centers/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.medicalCenters||[])}catch(g){console.error("Error loading medical centers:",g),_.error("Failed to load medical centers")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/medical-centers/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Medical Center updated successfully!")):(await F.post("/api/config/medical-centers/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Medical Center added successfully!")),a({city:"",name:"",phoneNo:"",contactPerson:"",fax:"",email:"",location:"",address:""}),h(null),x()}catch(C){console.error("Error saving medical center:",C),_.error(C.response?.data?.message||"Failed to save medical center")}finally{n(!1)}},v=g=>{a({city:g.city,name:g.name,phoneNo:g.phoneNo,contactPerson:g.contactPerson,fax:g.fax,email:g.email,location:g.location,address:g.address}),h(g)},w=async g=>{if(window.confirm("Are you sure you want to delete this medical center?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/medical-centers/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Medical Center deleted successfully!"),x()}catch(C){console.error("Error deleting medical center:",C),_.error("Failed to delete medical center")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/medical-centers/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Medical Center ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling medical center status:",k),_.error("Failed to update medical center status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto py-6 px-4",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Medical Center"}),t.jsxs("div",{className:"mb-8",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"City *"}),t.jsx("input",{type:"text",name:"city",value:e.city,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Phone No *"}),t.jsx("input",{type:"text",name:"phoneNo",value:e.phoneNo,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Contact Person"}),t.jsx("input",{type:"text",name:"contactPerson",value:e.contactPerson,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Fax"}),t.jsx("input",{type:"text",name:"fax",value:e.fax,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),t.jsx("input",{type:"email",name:"email",value:e.email,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Location"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Address"}),t.jsx("textarea",{name:"address",value:e.address,onChange:p,rows:"3",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("button",{type:"submit",disabled:r,className:"bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50",children:r?"Saving...":u?"Update":"Add"}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({city:"",name:"",phoneNo:"",contactPerson:"",fax:"",email:"",location:"",address:""})},className:"ml-4 bg-gray-600 text-white px-6 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500",children:"Cancel"})]})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Medical Center Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[S.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:g=>m(g.target.value),className:"px-3 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Search by name..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Fax"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-center",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.fax}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.email}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.phoneNo}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 text-center",children:t.jsxs("div",{className:"flex justify-center space-x-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of"," ",i.length," entries"]})]})]})})]})},oW=()=>{const[e,a]=b.useState({testType:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/test-types/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.testTypes||[])}catch(g){console.error("Error loading test types:",g),_.error("Failed to load test types")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/test-types/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Test Type updated successfully!")):(await F.post("/api/config/test-types/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Test Type added successfully!")),a({testType:""}),h(null),x()}catch(C){console.error("Error saving test type:",C),_.error(C.response?.data?.message||"Failed to save test type")}finally{n(!1)}},v=g=>{a({testType:g.testType}),h(g)},w=async g=>{if(window.confirm("Are you sure you want to delete this test type?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/test-types/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Test Type deleted successfully!"),x()}catch(C){console.error("Error deleting test type:",C),_.error("Failed to delete test type")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/test-types/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Test Type ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling test type status:",k),_.error("Failed to update test type status")}},S=i.filter(g=>g.testType.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto py-6 px-4",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Test Types"}),t.jsxs("div",{className:"mb-8",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Test Type *"}),t.jsx("input",{type:"text",name:"testType",value:e.testType,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("button",{type:"submit",disabled:r,className:"bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50",children:r?"Saving...":u?"Update":"Add"}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({testType:""})},className:"ml-4 bg-gray-600 text-white px-6 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500",children:"Cancel"})]})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Test Types Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[S.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:g=>m(g.target.value),className:"px-3 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Search by test type..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Test Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-center",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.testType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 text-center",children:t.jsxs("div",{className:"flex justify-center space-x-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," entries"]})]})]})})]})},cW=()=>{const[e,a]=b.useState({ageRange:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/age-ranges/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.ageRanges||[])}catch(g){console.error("Error loading age ranges:",g),_.error("Failed to load age ranges")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/age-ranges/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Age Range updated successfully!")):(await F.post("/api/config/age-ranges/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Age Range added successfully!")),a({ageRange:""}),h(null),x()}catch(C){console.error("Error saving age range:",C),_.error(C.response?.data?.message||"Failed to save age range")}finally{n(!1)}},v=g=>{a({ageRange:g.ageRange}),h(g)},w=async g=>{if(window.confirm("Are you sure you want to delete this age range?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/age-ranges/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Age Range deleted successfully!"),x()}catch(C){console.error("Error deleting age range:",C),_.error("Failed to delete age range")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/age-ranges/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Age Range ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling age range status:",k),_.error("Failed to update age range status")}},S=i.filter(g=>g.ageRange.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto py-6 px-4",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Age Ranges"}),t.jsxs("div",{className:"mb-8",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Age Range *"}),t.jsx("input",{type:"text",name:"ageRange",value:e.ageRange,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("button",{type:"submit",disabled:r,className:"bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50",children:r?"Saving...":u?"Update":"Add"}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({ageRange:""})},className:"ml-4 bg-gray-600 text-white px-6 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500",children:"Cancel"})]})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Age Ranges Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[S.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:g=>m(g.target.value),className:"px-3 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Search by age range..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Age Range"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-center",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.ageRange}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 text-center",children:t.jsxs("div",{className:"flex justify-center space-x-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," entries"]})]})]})})]})},dW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(""),[c,m]=b.useState(!1),[u,h]=b.useState(null),[p,x]=b.useState({salaryRange:""}),[j,v]=b.useState(!1),w="http://213.199.41.219:3001/api/config/salary-ranges",A=async()=>{try{const D=localStorage.getItem("token"),B=await F.get(w,{headers:{Authorization:`Bearer ${D}`}});a(B.data.salaryRanges),n(B.data.salaryRanges)}catch{_.error("Failed to fetch salary ranges")}};b.useEffect(()=>{A()},[]),b.useEffect(()=>{const D=e.filter(B=>B.salaryRange.toLowerCase().includes(i.toLowerCase()));n(D)},[i,e]);const S=async D=>{D.preventDefault(),v(!0);try{const B=localStorage.getItem("token");u?(await F.put(`${w}/${u._id}`,p,{headers:{Authorization:`Bearer ${B}`}}),_.success("Salary Range updated successfully")):(await F.post(w,p,{headers:{Authorization:`Bearer ${B}`}}),_.success("Salary Range created successfully")),x({salaryRange:""}),m(!1),h(null),A()}catch(B){_.error(B.response?.data?.message||"Failed to save salary range")}finally{v(!1)}},g=D=>{h(D),x({salaryRange:D.salaryRange}),m(!0)},C=async D=>{if(window.confirm("Are you sure you want to delete this salary range?"))try{const B=localStorage.getItem("token");await F.delete(`${w}/${D}`,{headers:{Authorization:`Bearer ${B}`}}),_.success("Salary Range deleted successfully"),A()}catch{_.error("Failed to delete salary range")}},k=async D=>{try{const B=localStorage.getItem("token");await F.patch(`${w}/${D}/toggle-status`,{},{headers:{Authorization:`Bearer ${B}`}}),_.success("Status updated successfully"),A()}catch{_.error("Failed to update status")}},O=()=>{x({salaryRange:""}),h(null),m(!1)};return t.jsx("div",{className:"p-6 bg-gray-50 min-h-screen",children:t.jsx("div",{className:"max-w-7xl mx-auto",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Salary Ranges"}),t.jsxs("button",{onClick:()=>m(!0),className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700 flex items-center gap-2",children:[t.jsx(IC,{className:"text-lg"}),"Add Salary Range"]})]}),c&&t.jsxs("div",{className:"mb-6 p-4 border rounded-lg bg-gray-50",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:u?"Edit Salary Range":"Add Salary Range"}),t.jsxs("form",{onSubmit:S,className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Salary Range *"}),t.jsx("input",{type:"text",value:p.salaryRange,onChange:D=>x({...p,salaryRange:D.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"submit",disabled:j,className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700 disabled:opacity-50",children:j?"Saving...":u?"Update":"Create"}),t.jsx("button",{type:"button",onClick:O,className:"bg-gray-500 text-white px-4 py-2 rounded-md hover:bg-gray-600",children:"Cancel"})]})]})]}),t.jsx("div",{className:"mb-4 flex items-center gap-4",children:t.jsxs("div",{className:"relative flex-1 max-w-md",children:[t.jsx(BC,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 text-lg"}),t.jsx("input",{type:"text",placeholder:"Search salary ranges...",value:i,onChange:D=>o(D.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500"})]})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-200 rounded-lg",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Salary Range"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created By"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created At"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"px-6 py-4 text-center text-gray-500",children:"No salary ranges found"})}):r.map(D=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:D.salaryRange}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${D.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:D.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:D.createdBy?.username||"N/A"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:new Date(D.createdAt).toLocaleDateString()}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{onClick:()=>g(D),className:"text-blue-600 hover:text-blue-900",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>k(D._id),className:`${D.isActive?"text-green-600":"text-gray-600"} hover:text-gray-900`,title:D.isActive?"Deactivate":"Activate",children:D.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>C(D._id),className:"text-red-600 hover:text-red-900",title:"Delete",children:t.jsx(ze,{})})]})})]},D._id))})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-500",children:["Showing ",r.length," of ",e.length," ","entries"]})]})})})},uW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(""),[c,m]=b.useState(!1),[u,h]=b.useState(null),[p,x]=b.useState({experienceRange:""}),[j,v]=b.useState(!1),w="http://213.199.41.219:3001/api/config/experience-ranges",A=async()=>{try{const D=localStorage.getItem("token"),B=await F.get(w,{headers:{Authorization:`Bearer ${D}`}});a(B.data.experienceRanges),n(B.data.experienceRanges)}catch{_.error("Failed to fetch experience ranges")}};b.useEffect(()=>{A()},[]),b.useEffect(()=>{const D=e.filter(B=>B.experienceRange.toLowerCase().includes(i.toLowerCase()));n(D)},[i,e]);const S=async D=>{D.preventDefault(),v(!0);try{const B=localStorage.getItem("token");u?(await F.put(`${w}/${u._id}`,p,{headers:{Authorization:`Bearer ${B}`}}),_.success("Experience Range updated successfully")):(await F.post(w,p,{headers:{Authorization:`Bearer ${B}`}}),_.success("Experience Range created successfully")),x({experienceRange:""}),m(!1),h(null),A()}catch(B){_.error(B.response?.data?.message||"Failed to save experience range")}finally{v(!1)}},g=D=>{h(D),x({experienceRange:D.experienceRange}),m(!0)},C=async D=>{if(window.confirm("Are you sure you want to delete this experience range?"))try{const B=localStorage.getItem("token");await F.delete(`${w}/${D}`,{headers:{Authorization:`Bearer ${B}`}}),_.success("Experience Range deleted successfully"),A()}catch{_.error("Failed to delete experience range")}},k=async D=>{try{const B=localStorage.getItem("token");await F.patch(`${w}/${D}/toggle-status`,{},{headers:{Authorization:`Bearer ${B}`}}),_.success("Status updated successfully"),A()}catch{_.error("Failed to update status")}},O=()=>{x({experienceRange:""}),h(null),m(!1)};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Experience Ranges"}),t.jsxs("button",{onClick:()=>m(!0),className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700 flex items-center gap-2",children:[t.jsx(IC,{className:"text-lg"}),"Add Experience Range"]})]}),c&&t.jsxs("div",{className:"mb-6 p-4 border rounded-lg bg-gray-50",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:u?"Edit Experience Range":"Add Experience Range"}),t.jsxs("form",{onSubmit:S,className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Experience Range *"}),t.jsx("input",{type:"text",value:p.experienceRange,onChange:D=>x({...p,experienceRange:D.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"submit",disabled:j,className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700 disabled:opacity-50",children:j?"Saving...":u?"Update":"Create"}),t.jsx("button",{type:"button",onClick:O,className:"bg-gray-500 text-white px-4 py-2 rounded-md hover:bg-gray-600",children:"Cancel"})]})]})]}),t.jsx("div",{className:"mb-4 flex items-center gap-4",children:t.jsxs("div",{className:"relative flex-1 max-w-md",children:[t.jsx(BC,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 text-lg"}),t.jsx("input",{type:"text",placeholder:"Search experience ranges...",value:i,onChange:D=>o(D.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500"})]})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-200 rounded-lg",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Experience Range"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created By"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created At"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"px-6 py-4 text-center text-gray-500",children:"No experience ranges found"})}):r.map(D=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:D.experienceRange}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${D.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:D.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:D.createdBy?.username||"N/A"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:new Date(D.createdAt).toLocaleDateString()}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{onClick:()=>g(D),className:"text-blue-600 hover:text-blue-900",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>k(D._id),className:`${D.isActive?"text-green-600":"text-gray-600"} hover:text-gray-900`,title:D.isActive?"Deactivate":"Activate",children:D.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>C(D._id),className:"text-red-600 hover:text-red-900",title:"Delete",children:t.jsx(ze,{})})]})})]},D._id))})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-500",children:["Showing ",r.length," of"," ",e.length," entries"]})]})})]})},mW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/airlines/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.airlines||[])}catch(g){console.error("Error loading airlines:",g),_.error("Failed to load airlines")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/airlines/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Airline updated successfully!")):(await F.post("/api/config/airlines/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Airline added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving airline:",C),_.error(C.response?.data?.message||"Failed to save airline")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this airline?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/airlines/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Airline deleted successfully!"),x()}catch(C){console.error("Error deleting airline:",C),_.error("Failed to delete airline")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/airlines/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Airline ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Airline":"Add Airline"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Airline Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Airline"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Airlines"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search airlines...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No airlines found."})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," entries"]})]})]})]})},fW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/visa-professions/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.professions||[])}catch(g){console.error("Error loading visa professions:",g),_.error("Failed to load visa professions")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/visa-professions/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Visa Profession updated successfully!")):(await F.post("/api/config/visa-professions/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Visa Profession added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving visa profession:",C),_.error(C.response?.data?.message||"Failed to save visa profession")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this visa profession?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/visa-professions/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Visa Profession deleted successfully!"),x()}catch(C){console.error("Error deleting profession:",C),_.error("Failed to delete visa profession")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/visa-professions/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Visa Profession ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Visa Profession":"Add Visa Profession"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Profession"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Visa Profession Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search professions...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," ","entries"]})]})]})]})},pW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(""),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({name:"",description:""}),[p,x]=b.useState(!1),j="http://213.199.41.219:3001/api/config/working-sectors";b.useEffect(()=>{v()},[]);const v=async()=>{try{const k=localStorage.getItem("token"),O=await F.get(j,{headers:{Authorization:`Bearer ${k}`}});a(O.data.sectors)}catch(k){console.error("Error fetching sectors:",k),We.error("Failed to fetch working sectors")}},w=async k=>{k.preventDefault(),x(!0);try{const D={headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}};c?(await F.put(`${j}/${c._id}`,u,D),We.success("Working Sector updated successfully")):(await F.post(j,u,D),We.success("Working Sector created successfully")),v(),o(!1),m(null),h({name:"",description:""})}catch(O){console.error("Error saving sector:",O),We.error(O.response?.data?.message||"Failed to save working sector")}finally{x(!1)}},A=k=>{m(k),h({name:k.name,description:k.description||""}),o(!0)},S=async k=>{if(window.confirm("Are you sure you want to delete this working sector?"))try{const O=localStorage.getItem("token");await F.delete(`${j}/${k}`,{headers:{Authorization:`Bearer ${O}`}}),We.success("Working Sector deleted successfully"),v()}catch(O){console.error("Error deleting sector:",O),We.error("Failed to delete working sector")}},g=async k=>{try{const O=localStorage.getItem("token");await F.patch(`${j}/${k}/toggle-status`,{},{headers:{Authorization:`Bearer ${O}`}}),We.success("Status updated successfully"),v()}catch(O){console.error("Error toggling status:",O),We.error("Failed to update status")}},C=e.filter(k=>k.name.toLowerCase().includes(r.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Working Sectors"}),t.jsx("button",{onClick:()=>{m(null),h({name:"",description:""}),o(!0)},className:"bg-emerald-600 text-white px-4 py-2 rounded-lg hover:bg-emerald-700 transition-colors",children:"Add Working Sector"})]}),t.jsx("div",{className:"mb-4",children:t.jsx("input",{type:"text",placeholder:"Search working sectors...",value:r,onChange:k=>n(k.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-emerald-500 focus:border-transparent"})}),t.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Description"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:C.map(k=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:k.name}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:k.description||"-"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:k.isActive?"Active":"Inactive"})}),t.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium space-x-2",children:[t.jsx("button",{onClick:()=>A(k),className:"text-blue-600 hover:text-blue-900",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>g(k._id),className:`${k.isActive?"text-green-600 hover:text-green-900":"text-gray-600 hover:text-gray-900"}`,children:k.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>S(k._id),className:"text-red-600 hover:text-red-900",children:t.jsx(ze,{})})]})]},k._id))})]})})}),i&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Working Sector":"Add Working Sector"}),t.jsxs("form",{onSubmit:w,children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Working Sector Name *"}),t.jsx("input",{type:"text",value:u.name,onChange:k=>h({...u,name:k.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("textarea",{value:u.description,onChange:k=>h({...u,description:k.target.value}),rows:3,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500"})]}),t.jsxs("div",{className:"flex justify-end space-x-3",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"px-4 py-2 text-gray-600 border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),t.jsx("button",{type:"submit",disabled:p,className:"px-4 py-2 bg-emerald-600 text-white rounded-md hover:bg-emerald-700 disabled:opacity-50",children:p?"Saving...":c?"Update":"Create"})]})]})]})})]})]})},hW=()=>{const[e,a]=b.useState({name:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/cities/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.cities||[])}catch(g){console.error("Error loading cities:",g),_.error("Failed to load cities")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/cities/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("City updated successfully!")):(await F.post("/api/config/cities/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("City added successfully!")),a({name:""}),h(null),x()}catch(C){console.error("Error saving city:",C),_.error(C.response?.data?.message||"Failed to save city")}finally{n(!1)}},v=g=>{h(g),a({name:g.name})},w=async g=>{if(window.confirm("Are you sure you want to delete this city?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/cities/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("City deleted successfully!"),x()}catch(C){console.error("Error deleting city:",C),_.error("Failed to delete city")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/cities/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`City ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit City":"Add City"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"City Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," City"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Cities Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search cities...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"City Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No cities found."})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," entries"]})]})]})]})},xW=()=>{const[e,a]=b.useState({name:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/education-levels/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.educationLevels||[])}catch(g){console.error("Error loading education levels:",g),_.error("Failed to load education levels")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/education-levels/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Education Level updated successfully!")):(await F.post("/api/config/education-levels/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Education Level added successfully!")),a({name:""}),h(null),x()}catch(C){console.error("Error saving education level:",C),_.error(C.response?.data?.message||"Failed to save education level")}finally{n(!1)}},v=g=>{h(g),a({name:g.name})},w=async g=>{if(window.confirm("Are you sure you want to delete this education level?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/education-levels/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Education Level deleted successfully!"),x()}catch(C){console.error("Error deleting education level:",C),_.error("Failed to delete education level")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/education-levels/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Education Level ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Education Level":"Add Education Level"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Education Level Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," ","Education Level"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Education Levels Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search education levels...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Education Level Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No education levels found."})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of"," ",i.length," entries"]})]})]})]})},gW=()=>{const[e,a]=b.useState({name:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/career-levels/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.careerLevels||[])}catch(g){console.error("Error loading career levels:",g),_.error("Failed to load career levels")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/career-levels/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Career Level updated successfully!")):(await F.post("/api/config/career-levels/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Career Level added successfully!")),a({name:""}),h(null),x()}catch(C){console.error("Error saving career level:",C),_.error(C.response?.data?.message||"Failed to save career level")}finally{n(!1)}},v=g=>{h(g),a({name:g.name})},w=async g=>{if(window.confirm("Are you sure you want to delete this career level?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/career-levels/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Career Level deleted successfully!"),x()}catch(C){console.error("Error deleting career level:",C),_.error("Failed to delete career level")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/career-levels/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Career Level ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Career Level":"Add Career Level"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Career Level Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Career Level"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Career Levels Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search career levels...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Career Level Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No career levels found."})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," ","entries"]})]})]})]})},bW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(""),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({name:""}),[p,x]=b.useState(!1),j="http://213.199.41.219:3001/api/skills";b.useEffect(()=>{v()},[]);const v=async()=>{try{const k=localStorage.getItem("token"),O=await F.get(j,{headers:{Authorization:`Bearer ${k}`}});a(O.data.skills)}catch(k){console.error("Error fetching skills:",k),We.error("Failed to fetch skills")}},w=async k=>{k.preventDefault(),x(!0);try{const D={headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}};c?(await F.put(`${j}/${c._id}`,u,D),We.success("Skill updated successfully")):(await F.post(j,u,D),We.success("Skill created successfully")),v(),o(!1),m(null),h({name:""})}catch(O){console.error("Error saving skill:",O),We.error(O.response?.data?.message||"Failed to save skill")}finally{x(!1)}},A=k=>{m(k),h({name:k.name}),o(!0)},S=async k=>{if(window.confirm("Are you sure you want to delete this skill?"))try{const O=localStorage.getItem("token");await F.delete(`${j}/${k}`,{headers:{Authorization:`Bearer ${O}`}}),We.success("Skill deleted successfully"),v()}catch(O){console.error("Error deleting skill:",O),We.error("Failed to delete skill")}},g=async k=>{try{const O=localStorage.getItem("token");await F.patch(`${j}/${k}/toggle-status`,{},{headers:{Authorization:`Bearer ${O}`}}),We.success("Status updated successfully"),v()}catch(O){console.error("Error toggling status:",O),We.error("Failed to update status")}},C=e.filter(k=>k.name.toLowerCase().includes(r.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Skills"}),t.jsx("button",{onClick:()=>{m(null),h({name:""}),o(!0)},className:"bg-emerald-600 text-white px-4 py-2 rounded-lg hover:bg-emerald-700 transition-colors",children:"Add Skill"})]}),t.jsx("div",{className:"mb-4",children:t.jsx("input",{type:"text",placeholder:"Search skills...",value:r,onChange:k=>n(k.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-emerald-500 focus:border-transparent"})}),t.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:C.map(k=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:k.name}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:k.isActive?"Active":"Inactive"})}),t.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium space-x-2",children:[t.jsx("button",{onClick:()=>A(k),className:"text-blue-600 hover:text-blue-900",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>g(k._id),className:`${k.isActive?"text-green-600 hover:text-green-900":"text-gray-600 hover:text-gray-900"}`,children:k.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>S(k._id),className:"text-red-600 hover:text-red-900",children:t.jsx(ze,{})})]})]},k._id))})]})})}),i&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Skill":"Add Skill"}),t.jsxs("form",{onSubmit:w,children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Skill Name *"}),t.jsx("input",{type:"text",value:u.name,onChange:k=>h({...u,name:k.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{className:"flex justify-end space-x-3",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"px-4 py-2 text-gray-600 border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),t.jsx("button",{type:"submit",disabled:p,className:"px-4 py-2 bg-emerald-600 text-white rounded-md hover:bg-emerald-700 disabled:opacity-50",children:p?"Saving...":c?"Update":"Create"})]})]})]})})]})]})},fu={actions:{editTestInterview:!1,editMedicalTest:!1,editENumber:!1,editSubmission:!1,editVisaStamped:!1,editNadra:!1,editProtector:!1,editFlight:!1,editDeparted:!1,goBack:!1,editJobPrices:!1},configuration:{configuration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addOptions:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},ageRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},salaryRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},experienceRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},airlines:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaProfession:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},sectorsIndustries:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},skills:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cities:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},educationLevel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},careerLevel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addPaymentAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addRecruitmentAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTravelAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},educationCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},subCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},workingCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaIssuingAuthorities:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},verifyingInstitutions:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTestCenter:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addMedicalCenters:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTestTypes:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},candidateManagement:{candidateManagement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},initialRegistration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateFinalRegistration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},applyJob:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},shortlisting:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},shortlistedCandidates:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},onlineApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerCm:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateLedgerExpenses:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateLedgerSummary:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateAgentLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},protectorPrintCandidates:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateFilterReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},traveledCandidatesReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateApplicationStatusReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},freezeApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},completedApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},interviewSchedule:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkApplicationMaker:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkOfferSender:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkFlightCancel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},accountingFinance:{accountingFinance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},chartOfAccounts:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},managePayments:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},travelAgentPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateJv:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},expensesAgainstCandidate:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},openingBalance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerAf:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},chartOfAccountBalances:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashBook:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankBook:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},generalLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},trialBalance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},accountBalances:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},incomeStatement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},balanceSheet:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashFlowStatement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},equityReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jv:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},adminArea:{adminArea:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},dashboard:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},manageUsers:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},manageRole:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerAn:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},userLogReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},applicationProcess:{applicationProcess:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},viewDetails:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},employerManagement:{employerManagement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerSetup:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerPlans:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobSetup:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerEm:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobGroupingPrints:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},statusJobsReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},securityFeeRefundPrints:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},travelAgentLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}}},yW=({users:e,onEdit:a,onDelete:r,onToggleStatus:n})=>t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border","aria-label":"Users table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Username"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"First Name"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Last Name"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Email"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(i=>t.jsxs("tr",{"aria-label":`User ${i.username}`,children:[t.jsx("td",{className:"py-2 px-4 border",children:i.username}),t.jsx("td",{className:"py-2 px-4 border",children:i.firstName||"-"}),t.jsx("td",{className:"py-2 px-4 border",children:i.lastName||"-"}),t.jsx("td",{className:"py-2 px-4 border",children:i.email}),t.jsxs("td",{className:"py-2 px-4 border",children:[t.jsx("button",{onClick:()=>a(i),className:"bg-blue-500 text-white px-2 py-1 rounded mr-2","aria-label":`Edit user ${i.username}`,children:"Edit"}),t.jsx("button",{onClick:()=>r(i._id),className:"bg-red-500 text-white px-2 py-1 rounded mr-2","aria-label":`Delete user ${i.username}`,children:"Delete"}),t.jsx("button",{onClick:()=>n(i._id,i.isActive),className:`px-2 py-1 rounded ${i.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,"aria-label":`${i.isActive?"Deactivate":"Activate"} user ${i.username}`,children:i.isActive?"Active":"Inactive"})]})]},i._id))})]})}),vW=({form:e,setForm:a,editing:r,onSubmit:n,onCancel:i,permissions:o,setPermissions:c})=>{const m={actions:{editTestInterview:"User can edit Test Interview",editMedicalTest:"User can edit Medical Test",editENumber:"User can edit E Number",editSubmission:"User can edit Submission",editVisaStamped:"User can edit Visa Stamped",editNadra:"User can edit Nadra",editProtector:"User can edit Protector",editFlight:"User can edit Flight",editDeparted:"User can edit Departed",goBack:"User can go back",editJobPrices:"User can edit Job prices"},configuration:{configuration:"Configuration",addOptions:"Add Options",ageRanges:"Age Ranges",salaryRanges:"Salary Ranges",experienceRanges:"Experience Ranges",airlines:"Airlines",visaProfession:"Visa Profession",sectorsIndustries:"Sectors / Industries",skills:"Skills",cities:"Cities",educationLevel:"Education Level",careerLevel:"Career Level",addPaymentAgent:"Add Payment Agent",addRecruitmentAgent:"Add Recruitment Agent",addTravelAgent:"Add Travel Agent",visaCategories:"Visa Categories",educationCategories:"Education Categories",jobCategories:"Job Categories",subCategories:"Sub Categories",workingCategories:"Working Categories",visaIssuingAuthorities:"Visa Issuing Authorities",verifyingInstitutions:"Verifying Institutions",addTestCenter:"Add Test Center",addMedicalCenters:"Add Medical Centers",addTestTypes:"Add Test Types"},candidateManagement:{candidateManagement:"Candidate Management",initialRegistration:"Initial Registration",candidateFinalRegistration:"Candidate Final Registration",applyJob:"Apply Job",shortlisting:"Shortlisting",shortlistedCandidates:"Shortlisted Candidates",onlineApplications:"Online Applications",jobApplications:"Job Applications",reportManagerCm:"Report Manager (CM)",candidateLedgerExpenses:"Candidate Ledger with Expenses",candidateLedgerSummary:"Candidate Ledger Summary",candidateAgentLedger:"Candidate Agent Ledger",protectorPrintCandidates:"Protector Print for Candidates",candidateFilterReport:"Candidate Filter Report",traveledCandidatesReport:"Traveled Candidates Report",candidateApplicationStatusReport:"Candidate Application Status Report",freezeApplications:"Freeze Applications",completedApplications:"Completed Applications",interviewSchedule:"Interview Schedule",bulkApplicationMaker:"Bulk Application Maker",bulkOfferSender:"Bulk Offer Sender",bulkFlightCancel:"Bulk flight Cancel"},accountingFinance:{accountingFinance:"Accounting & Finance",chartOfAccounts:"Chart of Accounts",managePayments:"Manage Payments",jobPayment:"Job Payment",travelAgentPayment:"Travel Agent Payment",candidateReceipt:"Candidate Receipt",candidateJv:"Candidate JV",expensesAgainstCandidate:"Expenses Against Candidate",openingBalance:"Opening Balance",cashReceipt:"Cash Receipt",cashPayment:"Cash Payment",reportManagerAf:"Report Manager (AF)",chartOfAccountBalances:"Chart of Account with Balances",cashBook:"Cash Book",bankBook:"Bank Book",generalLedger:"General Ledger",trialBalance:"Trial Balance",accountBalances:"Account Balances",incomeStatement:"Income Statement",balanceSheet:"Balance Sheet",cashFlowStatement:"Cash Flow Statement",equityReport:"Equity Report",bankReceipt:"Bank Receipt",bankPayment:"Bank Payment",jv:"JV"},adminArea:{adminArea:"Admin Area",dashboard:"Dashboard",manageUsers:"Manage Users",manageRole:"Manage Role",reportManagerAn:"Report Manager (AN)",userLogReport:"User Log Report"},applicationProcess:{applicationProcess:"Application Process",viewDetails:"View Details"},employerManagement:{employerManagement:"Employer Management",employerSetup:"Employer Setup",employerPlans:"Employer Plans",jobSetup:"Job Setup",reportManagerEm:"Report Manager (EM)",employerLedger:"Employer Ledger",jobGroupingPrints:"Job Grouping for Prints",statusJobsReport:"Status of Jobs Report",securityFeeRefundPrints:"Security Fee Refund Prints",travelAgentLedger:"Travel Agent Ledger"}};return t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium mb-2",children:r?"Edit User":"Add User"}),t.jsxs("form",{onSubmit:n,className:"space-y-4",children:[t.jsxs("label",{htmlFor:"username",className:"block mb-1",children:["Username",t.jsx("input",{id:"username",type:"text",placeholder:"Username",value:e.username,onChange:u=>a({...e,username:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),t.jsxs("label",{htmlFor:"email",className:"block mb-1",children:["Email",t.jsx("input",{id:"email",type:"email",placeholder:"Email",value:e.email,onChange:u=>a({...e,email:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),!r&&t.jsxs("label",{htmlFor:"password",className:"block mb-1",children:["Password",t.jsx("input",{id:"password",type:"password",placeholder:"Password",value:e.password,onChange:u=>a({...e,password:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),t.jsxs("label",{htmlFor:"userType",className:"block mb-1",children:["User Type",t.jsxs("select",{id:"userType",value:e.userType,onChange:u=>a({...e,userType:u.target.value}),className:"w-full p-2 border rounded",children:[t.jsx("option",{value:"admin",children:"Admin"}),t.jsx("option",{value:"hr",children:"HR"}),t.jsx("option",{value:"accountant",children:"Accountant"}),t.jsx("option",{value:"superadmin",children:"Super Admin"})]})]}),t.jsxs("label",{htmlFor:"role",className:"block mb-1",children:["Role *",t.jsx("input",{id:"role",type:"text",placeholder:"Role",value:e.role,onChange:u=>a({...e,role:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),t.jsxs("label",{htmlFor:"firstName",className:"block mb-1",children:["First Name",t.jsx("input",{id:"firstName",type:"text",placeholder:"First Name",value:e.firstName,onChange:u=>a({...e,firstName:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"lastName",className:"block mb-1",children:["Last Name",t.jsx("input",{id:"lastName",type:"text",placeholder:"Last Name",value:e.lastName,onChange:u=>a({...e,lastName:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"fatherName",className:"block mb-1",children:["Father Name",t.jsx("input",{id:"fatherName",type:"text",placeholder:"Father Name",value:e.fatherName,onChange:u=>a({...e,fatherName:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"contactNo",className:"block mb-1",children:["Contact No",t.jsx("input",{id:"contactNo",type:"text",placeholder:"Contact No.",value:e.contactNo,onChange:u=>a({...e,contactNo:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"cnic",className:"block mb-1",children:["CNIC",t.jsx("input",{id:"cnic",type:"text",placeholder:"CNIC",value:e.cnic,onChange:u=>a({...e,cnic:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"isActive",className:"block mb-1",children:[t.jsx("input",{id:"isActive",type:"checkbox",checked:e.isActive,onChange:u=>a({...e,isActive:u.target.checked}),className:"mr-2"}),"Admin Active"]}),r&&t.jsxs("div",{className:"border p-4 rounded",children:[t.jsx("h4",{className:"font-medium mb-2",children:"Permissions"}),t.jsxs("div",{className:"mb-4",children:[t.jsx("h5",{className:"font-semibold",children:"Actions"}),Object.keys(o.actions).map(u=>t.jsxs("label",{className:"block",children:[t.jsx("input",{type:"checkbox",checked:o.actions[u],onChange:h=>c({...o,actions:{...o.actions,[u]:h.target.checked}})})," ",m.actions[u]]},u))]}),Object.keys(o).filter(u=>u!=="actions").map(u=>t.jsxs("div",{className:"mb-4",children:[t.jsx("h5",{className:"font-semibold",children:m[u][u]||u}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full border",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{className:"border px-2 py-1",children:"Title"}),t.jsx("th",{className:"border px-2 py-1",children:"View"}),t.jsx("th",{className:"border px-2 py-1",children:"Add"}),t.jsx("th",{className:"border px-2 py-1",children:"Edit"}),t.jsx("th",{className:"border px-2 py-1",children:"Delete"}),t.jsx("th",{className:"border px-2 py-1",children:"Authorize"})]})}),t.jsx("tbody",{children:Object.keys(o[u]).map(h=>t.jsxs("tr",{children:[t.jsx("td",{className:"border px-2 py-1",children:m[u][h]}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].view,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],view:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].add,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],add:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].edit,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],edit:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].delete,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],delete:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].authorize,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],authorize:p.target.checked}}})})})]},h))})]})})]},u)),t.jsx("button",{type:"button",onClick:()=>handlePermissions(r,o),className:"mt-4 bg-purple-500 text-white px-4 py-2 rounded",children:"Update Permissions"})]}),t.jsx("button",{type:"submit",className:"w-full bg-green-500 text-white py-2 rounded","aria-label":r?"Update user":"Add user",children:r?"Update User":"Add User"}),t.jsx("button",{type:"button",onClick:i,className:"w-full bg-gray-500 text-white py-2 rounded mt-2","aria-label":"Cancel",children:"Cancel"})]})]})},jW=()=>{const{user:e}=br(ie=>ie.user),[a,r]=b.useState([]),[n,i]=b.useState({username:"",userType:"admin",role:"",password:"",firstName:"",lastName:"",fatherName:"",contactNo:"",email:"",cnic:"",isActive:!1}),[o,c]=b.useState(fu),[m,u]=b.useState(null),[h,p]=b.useState(!1),[x,j]=b.useState(!1),[v,w]=b.useState(null),[A,S]=b.useState(""),[g,C]=b.useState(1),k=10;b.useEffect(()=>{e?.role==="superadmin"&&O()},[e]),b.useEffect(()=>{C(1)},[A]);const O=async()=>{try{const ie=localStorage.getItem("token"),V=await F.get("/api/users",{headers:{Authorization:`Bearer ${ie}`}});r(V.data?.users||[])}catch(ie){console.error("fetch users error",ie),_.error(ie.response?.status===401?"Unauthorized: Please log in again":"Failed to fetch users")}},D=()=>n.username?!n.email||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.email)?"Valid email is required":!m&&!n.password?"Password is required":null:"Username is required",B=async ie=>{ie.preventDefault();const V=D();if(V){_.error(V);return}try{const K=localStorage.getItem("token"),ce={...n},U=m?await F.put(`/api/users/${m._id}`,ce,{headers:{Authorization:`Bearer ${K}`}}):await F.post("/api/users/create-admin",ce,{headers:{Authorization:`Bearer ${K}`}});_.success(m?"User updated":"User created"),$(),O()}catch(K){console.error(K),_.error(K.response?.status===401?"Unauthorized: Please log in again":K.response?.data?.message||"Error")}},L=ie=>{i({username:ie.username,email:ie.email,password:"",userType:ie.userType||"admin",role:ie.role||"",firstName:ie.firstName||"",lastName:ie.lastName||"",fatherName:ie.fatherName||"",contactNo:ie.contactNo||"",cnic:ie.cnic||"",isActive:ie.isActive||!1}),c(ie.permissions||fu),u(ie),p(!0)},T=async()=>{try{const ie=localStorage.getItem("token");await F.delete(`/api/users/${v}`,{headers:{Authorization:`Bearer ${ie}`}}),_.success("User deleted"),O(),j(!1),w(null)}catch(ie){console.error(ie),_.error("Failed to delete")}},R=async(ie,V)=>{try{const K=localStorage.getItem("token");await F.patch(`/api/users/${ie}/status`,{isActive:!V},{headers:{Authorization:`Bearer ${K}`}}),_.success("Status updated"),O()}catch(K){console.error(K),_.error("Failed to update status")}},z=()=>{p(!0),u(null),i({username:"",email:"",password:"",userType:"admin",role:"",firstName:"",lastName:"",fatherName:"",contactNo:"",cnic:"",isActive:!1}),c(fu)},$=()=>{i({username:"",email:"",password:"",userType:"admin",role:"",firstName:"",lastName:"",fatherName:"",contactNo:"",cnic:"",isActive:!1}),u(null),p(!1),c(fu)},Z=b.useMemo(()=>{const ie=A.toLowerCase();return a.filter(V=>V.username.toLowerCase().includes(ie)||V.firstName&&V.firstName.toLowerCase().includes(ie)||V.lastName&&V.lastName.toLowerCase().includes(ie)||V.email.toLowerCase().includes(ie))},[a,A]),fe=Math.ceil(Z.length/k),se=Z.slice((g-1)*k,g*k);return e?.role!=="superadmin"?t.jsx("div",{className:"p-6",children:"Access denied."}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Manage Users"}),t.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h3",{className:"text-lg font-medium",children:"User List"}),t.jsx("button",{onClick:z,className:"bg-green-500 text-white px-4 py-2 rounded","aria-label":"Add new user",children:"Add User"})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{htmlFor:"search",className:"sr-only",children:"Search users"}),t.jsx("input",{id:"search",type:"text",placeholder:"Search by username, first name, last name, or email",value:A,onChange:ie=>S(ie.target.value),className:"w-full p-2 border rounded"})]}),t.jsx(yW,{users:se,onEdit:L,onDelete:ie=>{w(ie),j(!0)},onToggleStatus:R}),t.jsxs("div",{className:"flex justify-between mt-4",children:[t.jsx("button",{disabled:g===1,onClick:()=>C(g-1),className:"bg-blue-500 text-white px-4 py-2 rounded disabled:bg-gray-300","aria-label":"Previous page",children:"Previous"}),t.jsxs("span",{children:["Page ",g," of ",fe]}),t.jsx("button",{disabled:g===fe,onClick:()=>C(g+1),className:"bg-blue-500 text-white px-4 py-2 rounded disabled:bg-gray-300","aria-label":"Next page",children:"Next"})]})]}),h&&t.jsx(vW,{form:n,setForm:i,editing:m,onSubmit:B,onCancel:$,permissions:o,setPermissions:c})]}),x&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center",children:t.jsxs("div",{className:"bg-white p-6 rounded",children:[t.jsx("h3",{className:"text-lg mb-4",children:"Are you sure you want to delete this user?"}),t.jsx("button",{onClick:T,className:"bg-red-500 text-white px-4 py-2 rounded mr-2","aria-label":"Confirm delete",children:"Yes"}),t.jsx("button",{onClick:()=>j(!1),className:"bg-gray-500 text-white px-4 py-2 rounded","aria-label":"Cancel delete",children:"No"})]})})]})},pu={actions:{editTestInterview:!1,editMedicalTest:!1,editENumber:!1,editSubmission:!1,editVisaStamped:!1,editNadra:!1,editProtector:!1,editFlight:!1,editDeparted:!1,goBack:!1,editJobPrices:!1},configuration:{configuration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addOptions:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},ageRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},salaryRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},experienceRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},airlines:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaProfession:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},sectorsIndustries:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},skills:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cities:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},educationLevel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},careerLevel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addPaymentAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addRecruitmentAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTravelAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},educationCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},subCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},workingCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaIssuingAuthorities:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},verifyingInstitutions:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTestCenter:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addMedicalCenters:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTestTypes:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},candidateManagement:{candidateManagement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},initialRegistration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateFinalRegistration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},applyJob:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},shortlisting:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},shortlistedCandidates:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},onlineApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerCm:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateLedgerExpenses:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateLedgerSummary:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateAgentLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},protectorPrintCandidates:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateFilterReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},traveledCandidatesReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateApplicationStatusReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},freezeApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},completedApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},interviewSchedule:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkApplicationMaker:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkOfferSender:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkFlightCancel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},accountingFinance:{accountingFinance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},chartOfAccounts:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},managePayments:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},travelAgentPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateJv:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},expensesAgainstCandidate:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},openingBalance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerAf:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},chartOfAccountBalances:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashBook:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankBook:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},generalLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},trialBalance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},accountBalances:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},incomeStatement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},balanceSheet:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashFlowStatement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},equityReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jv:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},adminArea:{adminArea:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},dashboard:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},manageUsers:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},manageRole:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerAn:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},userLogReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},applicationProcess:{applicationProcess:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},viewDetails:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},employerManagement:{employerManagement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerSetup:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerPlans:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobSetup:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerEm:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobGroupingPrints:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},statusJobsReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},securityFeeRefundPrints:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},travelAgentLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}}},NW=({roles:e,onEdit:a,onDelete:r})=>t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border","aria-label":"Roles table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Role Name"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Created At"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(n=>t.jsxs("tr",{"aria-label":`Role ${n.name}`,children:[t.jsx("td",{className:"py-2 px-4 border",children:n.name}),t.jsx("td",{className:"py-2 px-4 border",children:new Date(n.createdAt).toLocaleDateString()}),t.jsxs("td",{className:"py-2 px-4 border",children:[t.jsx("button",{onClick:()=>a(n),className:"bg-blue-500 text-white px-2 py-1 rounded mr-2","aria-label":`Edit role ${n.name}`,children:"Edit"}),t.jsx("button",{onClick:()=>r(n._id),className:"bg-red-500 text-white px-2 py-1 rounded mr-2","aria-label":`Delete role ${n.name}`,children:"Delete"})]})]},n._id))})]})}),wW=({form:e,setForm:a,editing:r,onSubmit:n,onCancel:i,permissions:o,setPermissions:c})=>{const m={actions:{editTestInterview:"User can edit Test Interview",editMedicalTest:"User can edit Medical Test",editENumber:"User can edit E Number",editSubmission:"User can edit Submission",editVisaStamped:"User can edit Visa Stamped",editNadra:"User can edit Nadra",editProtector:"User can edit Protector",editFlight:"User can edit Flight",editDeparted:"User can edit Departed",goBack:"User can go back",editJobPrices:"User can edit Job prices"},configuration:{configuration:"Configuration",addOptions:"Add Options",ageRanges:"Age Ranges",salaryRanges:"Salary Ranges",experienceRanges:"Experience Ranges",airlines:"Airlines",visaProfession:"Visa Profession",sectorsIndustries:"Sectors / Industries",skills:"Skills",cities:"Cities",educationLevel:"Education Level",careerLevel:"Career Level",addPaymentAgent:"Add Payment Agent",addRecruitmentAgent:"Add Recruitment Agent",addTravelAgent:"Add Travel Agent",visaCategories:"Visa Categories",educationCategories:"Education Categories",jobCategories:"Job Categories",subCategories:"Sub Categories",workingCategories:"Working Categories",visaIssuingAuthorities:"Visa Issuing Authorities",verifyingInstitutions:"Verifying Institutions",addTestCenter:"Add Test Center",addMedicalCenters:"Add Medical Centers",addTestTypes:"Add Test Types"},candidateManagement:{candidateManagement:"Candidate Management",initialRegistration:"Initial Registration",candidateFinalRegistration:"Candidate Final Registration",applyJob:"Apply Job",shortlisting:"Shortlisting",shortlistedCandidates:"Shortlisted Candidates",onlineApplications:"Online Applications",jobApplications:"Job Applications",reportManagerCm:"Report Manager (CM)",candidateLedgerExpenses:"Candidate Ledger with Expenses",candidateLedgerSummary:"Candidate Ledger Summary",candidateAgentLedger:"Candidate Agent Ledger",protectorPrintCandidates:"Protector Print for Candidates",candidateFilterReport:"Candidate Filter Report",traveledCandidatesReport:"Traveled Candidates Report",candidateApplicationStatusReport:"Candidate Application Status Report",freezeApplications:"Freeze Applications",completedApplications:"Completed Applications",interviewSchedule:"Interview Schedule",bulkApplicationMaker:"Bulk Application Maker",bulkOfferSender:"Bulk Offer Sender",bulkFlightCancel:"Bulk flight Cancel"},accountingFinance:{accountingFinance:"Accounting & Finance",chartOfAccounts:"Chart of Accounts",managePayments:"Manage Payments",jobPayment:"Job Payment",travelAgentPayment:"Travel Agent Payment",candidateReceipt:"Candidate Receipt",candidateJv:"Candidate JV",expensesAgainstCandidate:"Expenses Against Candidate",openingBalance:"Opening Balance",cashReceipt:"Cash Receipt",cashPayment:"Cash Payment",reportManagerAf:"Report Manager (AF)",chartOfAccountBalances:"Chart of Account with Balances",cashBook:"Cash Book",bankBook:"Bank Book",generalLedger:"General Ledger",trialBalance:"Trial Balance",accountBalances:"Account Balances",incomeStatement:"Income Statement",balanceSheet:"Balance Sheet",cashFlowStatement:"Cash Flow Statement",equityReport:"Equity Report",bankReceipt:"Bank Receipt",bankPayment:"Bank Payment",jv:"JV"},adminArea:{adminArea:"Admin Area",dashboard:"Dashboard",manageUsers:"Manage Users",manageRole:"Manage Role",reportManagerAn:"Report Manager (AN)",userLogReport:"User Log Report"},applicationProcess:{applicationProcess:"Application Process",viewDetails:"View Details"},employerManagement:{employerManagement:"Employer Management",employerSetup:"Employer Setup",employerPlans:"Employer Plans",jobSetup:"Job Setup",reportManagerEm:"Report Manager (EM)",employerLedger:"Employer Ledger",jobGroupingPrints:"Job Grouping for Prints",statusJobsReport:"Status of Jobs Report",securityFeeRefundPrints:"Security Fee Refund Prints",travelAgentLedger:"Travel Agent Ledger"}};return t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium mb-2",children:r?"Edit Role":"Add Role"}),t.jsxs("form",{onSubmit:n,className:"space-y-4",children:[t.jsxs("label",{htmlFor:"name",className:"block mb-1",children:["Role Name",t.jsx("input",{id:"name",type:"text",placeholder:"Role Name",value:e.name,onChange:u=>a({...e,name:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),t.jsxs("div",{className:"border p-4 rounded",children:[t.jsx("h4",{className:"font-medium mb-2",children:"Permissions"}),t.jsxs("div",{className:"mb-4",children:[t.jsx("h5",{className:"font-semibold",children:"Actions"}),Object.keys(o.actions).map(u=>t.jsxs("label",{className:"block",children:[t.jsx("input",{type:"checkbox",checked:o.actions[u],onChange:h=>c({...o,actions:{...o.actions,[u]:h.target.checked}})})," ",m.actions[u]]},u))]}),Object.keys(o).filter(u=>u!=="actions").map(u=>t.jsxs("div",{className:"mb-4",children:[t.jsx("h5",{className:"font-semibold",children:m[u][u]||u}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full border",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{className:"border px-2 py-1",children:"Title"}),t.jsx("th",{className:"border px-2 py-1",children:"View"}),t.jsx("th",{className:"border px-2 py-1",children:"Add"}),t.jsx("th",{className:"border px-2 py-1",children:"Edit"}),t.jsx("th",{className:"border px-2 py-1",children:"Delete"}),t.jsx("th",{className:"border px-2 py-1",children:"Authorize"})]})}),t.jsx("tbody",{children:Object.keys(o[u]).map(h=>t.jsxs("tr",{children:[t.jsx("td",{className:"border px-2 py-1",children:m[u][h]}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].view,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],view:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].add,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],add:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].edit,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],edit:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].delete,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],delete:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].authorize,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],authorize:p.target.checked}}})})})]},h))})]})})]},u))]}),t.jsx("button",{type:"submit",className:"w-full bg-green-500 text-white py-2 rounded","aria-label":r?"Update role":"Add role",children:r?"Update Role":"Add Role"}),t.jsx("button",{type:"button",onClick:i,className:"w-full bg-gray-500 text-white py-2 rounded mt-2","aria-label":"Cancel",children:"Cancel"})]})]})},SW=()=>{const{user:e}=br(se=>se.user),[a,r]=b.useState([]),[n,i]=b.useState({name:""}),[o,c]=b.useState(pu),[m,u]=b.useState(null),[h,p]=b.useState(!1),[x,j]=b.useState(!1),[v,w]=b.useState(null),[A,S]=b.useState(""),[g,C]=b.useState(1),k=10;b.useEffect(()=>{e?.role==="superadmin"&&O()},[e]),b.useEffect(()=>{C(1)},[A]);const O=async()=>{try{const se=localStorage.getItem("token"),ie=await F.get("/api/roles",{headers:{Authorization:`Bearer ${se}`}});r(ie.data)}catch(se){console.error("fetch roles error",se),_.error(se.response?.status===401?"Unauthorized: Please log in again":"Failed to fetch roles")}},D=()=>n.name?null:"Role name is required",B=async se=>{se.preventDefault();const ie=D();if(ie){_.error(ie);return}try{const V=localStorage.getItem("token"),K={...n,permissions:o},ce=m?await F.put(`/api/roles/${m._id}`,K,{headers:{Authorization:`Bearer ${V}`}}):await F.post("/api/roles",K,{headers:{Authorization:`Bearer ${V}`}});_.success(m?"Role updated":"Role created"),z(),O()}catch(V){console.error(V),_.error(V.response?.status===401?"Unauthorized: Please log in again":V.response?.data?.message||"Error")}},L=se=>{i({name:se.name}),c(se.permissions||pu),u(se),p(!0)},T=async()=>{try{const se=localStorage.getItem("token");await F.delete(`/api/roles/${v}`,{headers:{Authorization:`Bearer ${se}`}}),_.success("Role deleted"),O(),j(!1),w(null)}catch(se){console.error(se),_.error("Failed to delete")}},R=()=>{p(!0),u(null),i({name:""}),c(pu)},z=()=>{i({name:""}),u(null),p(!1),c(pu)},$=b.useMemo(()=>{const se=A.toLowerCase();return a.filter(ie=>ie.name.toLowerCase().includes(se))},[a,A]),Z=Math.ceil($.length/k),fe=$.slice((g-1)*k,g*k);return e?.role!=="superadmin"?t.jsx("div",{className:"p-6",children:"Access denied."}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Manage Roles"}),t.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Role List"}),t.jsx("button",{onClick:R,className:"bg-green-500 text-white px-4 py-2 rounded","aria-label":"Add new role",children:"New"})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{htmlFor:"search",className:"sr-only",children:"Search roles"}),t.jsx("input",{id:"search",type:"text",placeholder:"Search by role name",value:A,onChange:se=>S(se.target.value),className:"w-full p-2 border rounded"})]}),t.jsx(NW,{roles:fe,onEdit:L,onDelete:se=>{w(se),j(!0)}}),t.jsxs("div",{className:"flex justify-between mt-4",children:[t.jsx("button",{disabled:g===1,onClick:()=>C(g-1),className:"bg-blue-500 text-white px-4 py-2 rounded disabled:bg-gray-300","aria-label":"Previous page",children:"Previous"}),t.jsxs("span",{children:["Page ",g," of ",Z]}),t.jsx("button",{disabled:g===Z,onClick:()=>C(g+1),className:"bg-blue-500 text-white px-4 py-2 rounded disabled:bg-gray-300","aria-label":"Next page",children:"Next"})]})]}),h&&t.jsx(wW,{form:n,setForm:i,editing:m,onSubmit:B,onCancel:z,permissions:o,setPermissions:c})]}),x&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center",children:t.jsxs("div",{className:"bg-white p-6 rounded",children:[t.jsx("h3",{className:"text-lg mb-4",children:"Are you sure you want to delete this role?"}),t.jsx("button",{onClick:T,className:"bg-red-500 text-white px-4 py-2 rounded mr-2","aria-label":"Confirm delete",children:"Yes"}),t.jsx("button",{onClick:()=>j(!1),className:"bg-gray-500 text-white px-4 py-2 rounded","aria-label":"Cancel delete",children:"No"})]})})]})},AW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState([]),[c,m]=b.useState(!1),u=async()=>{if(!e||!r){alert("Please select both From Date and To Date");return}m(!0);try{const p=await F.get(`undefined/api/users/logs?from=${e}&to=${r}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});o(p.data)}catch(p){console.error("Error fetching user log report:",p),alert("Failed to fetch report data")}finally{m(!1)}},h=()=>{window.print()};return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto p-6",children:[t.jsx("h1",{className:"text-3xl font-bold text-gray-800 mb-6",children:"User Log Report"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Report Parameters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"From Date"}),t.jsx("input",{type:"date",value:e,onChange:p=>a(p.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"To Date"}),t.jsx("input",{type:"date",value:r,onChange:p=>n(p.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsx("div",{className:"flex items-end",children:t.jsx("button",{onClick:u,className:"w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 transition-colors",disabled:c,children:c?"Generating...":"Generate Report"})})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:"Report Data"}),t.jsxs("button",{onClick:h,className:"flex items-center gap-2 bg-green-600 text-white py-2 px-4 rounded-md hover:bg-green-700 transition-colors",children:[t.jsx(mt,{}),"Print"]})]}),c?t.jsx("div",{className:"text-center py-8",children:"Loading report data..."}):i.length===0?t.jsx("div",{className:"text-center py-8 text-gray-500",children:"No data available. Please generate the report."}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-100",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Username"}),t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Email"}),t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Role"}),t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Created At"}),t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Last Updated"})]})}),t.jsx("tbody",{children:i.map((p,x)=>t.jsxs("tr",{className:"border-t border-gray-200",children:[t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:p.username}),t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:p.email}),t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:p.role}),t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:new Date(p.createdAt).toLocaleDateString()}),t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:new Date(p.updatedAt).toLocaleDateString()})]},x))})]})})]})]})]})},CW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/education-categories/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.categories||[])}catch(g){console.error("Error loading education categories:",g),_.error("Failed to load education categories")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/education-categories/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Education Category updated successfully!")):(await F.post("/api/config/education-categories/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Education Category added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving education category:",C),_.error(C.response?.data?.message||"Failed to save education category")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this education category?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/education-categories/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Education Category deleted successfully!"),x()}catch(C){console.error("Error deleting category:",C),_.error("Failed to delete education category")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/education-categories/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Education Category ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Education Category":"Add Education Category"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Category"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Education Categories"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search categories...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No education categories found."})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," entries"]})]})]})]})},kW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:k}=g.target;a({...e,[C]:k})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.categories||[])}catch(g){console.error("Error loading job categories:",g),_.error("Failed to load job categories")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/job-categories/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Job Category updated successfully!")):(await F.post("/api/config/job-categories/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),_.success("Job Category added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving job category:",C),_.error(C.response?.data?.message||"Failed to save job category")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this job category?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/job-categories/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Job Category deleted successfully!"),x()}catch(C){console.error("Error deleting category:",C),_.error("Failed to delete job category")}},A=async(g,C)=>{try{const k=localStorage.getItem("token");await F.patch(`/api/config/job-categories/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${k}`}}),_.success(`Job Category ${C?"deactivated":"activated"} successfully!`),x()}catch(k){console.error("Error toggling status:",k),_.error("Failed to update status")}},S=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Job Category":"Add Job Category"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Category Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Category"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Categories Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search categories...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>A(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),S.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," of ",i.length," entries"]})]})]})]})},EW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(""),[c,m]=b.useState(!1),[u,h]=b.useState(null),[p,x]=b.useState({mainCategory:"",name:"",description:""});b.useEffect(()=>{j(),v()},[]);const j=async()=>{try{const k=localStorage.getItem("token"),O=await F.get("/api/config/sub-categories/",{headers:{Authorization:`Bearer ${k}`}});a(O.data.subCategories||[])}catch(k){console.error("load sub categories error",k)}},v=async()=>{try{const k=localStorage.getItem("token"),O=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${k}`}});n(O.data.categories||[])}catch(k){console.error("load job categories error",k)}},w=async k=>{k.preventDefault();try{const O=localStorage.getItem("token");u?(await F.put(`/api/config/sub-categories/${u._id}`,p,{headers:{Authorization:`Bearer ${O}`}}),_.success("Sub Category updated successfully")):(await F.post("/api/config/sub-categories/",p,{headers:{Authorization:`Bearer ${O}`}}),_.success("Sub Category created successfully")),m(!1),h(null),x({mainCategory:"",name:"",description:""}),j()}catch(O){console.error("submit error",O),_.error("Operation failed")}},A=k=>{h(k),x({mainCategory:k.mainCategory._id,name:k.name,description:k.description||""}),m(!0)},S=async k=>{if(window.confirm("Are you sure you want to delete this sub category?"))try{const O=localStorage.getItem("token");await F.delete(`/api/config/sub-categories/${k}`,{headers:{Authorization:`Bearer ${O}`}}),_.success("Sub Category deleted successfully"),j()}catch(O){console.error("delete error",O),_.error("Delete failed")}},g=async(k,O)=>{try{const D=localStorage.getItem("token");await F.patch(`/api/config/sub-categories/${k}/toggle`,{isActive:!O},{headers:{Authorization:`Bearer ${D}`}}),_.success("Status updated"),j()}catch(D){console.error("toggle error",D),_.error("Status update failed")}},C=e.filter(k=>k.name.toLowerCase().includes(i.toLowerCase())||k.mainCategory.name.toLowerCase().includes(i.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Manage Sub Categories"}),t.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Add/Edit Detail"}),t.jsx("button",{onClick:()=>{m(!c),h(null),x({mainCategory:"",name:"",description:""})},className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:c?"Cancel":"Add New"})]}),c&&t.jsxs("form",{onSubmit:w,className:"mb-6 space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Main Category *"}),t.jsxs("select",{value:p.mainCategory,onChange:k=>x({...p,mainCategory:k.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",required:!0,children:[t.jsx("option",{value:"",children:"Select Main Category"}),r.map(k=>t.jsx("option",{value:k._id,children:k.name},k._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Sub Category Name *"}),t.jsx("input",{type:"text",value:p.name,onChange:k=>x({...p,name:k.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description"}),t.jsx("textarea",{value:p.description,onChange:k=>x({...p,description:k.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",rows:"3"})]}),t.jsx("button",{type:"submit",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:u?"Update":"Create"})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Sub Categories Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[C.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Search:"}),t.jsx("input",{type:"text",value:i,onChange:k=>o(k.target.value),className:"border border-gray-300 rounded px-2 py-1 text-sm",placeholder:"Search..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-50",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Main Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sub Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:C.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})}):C.map(k=>t.jsxs("tr",{children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:k.mainCategory.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:k.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:k.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>g(k._id,k.isActive),className:`px-2 py-1 rounded text-xs ${k.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:k.isActive?"Active":"Inactive"})}),t.jsxs("td",{className:"border border-gray-300 px-4 py-2",children:[t.jsx("button",{onClick:()=>A(k),className:"bg-blue-600 text-white px-2 py-1 rounded text-xs mr-2 hover:bg-blue-700",children:"Edit"}),t.jsx("button",{onClick:()=>S(k._id),className:"bg-red-600 text-white px-2 py-1 rounded text-xs hover:bg-red-700",children:"Delete"})]})]},k._id))})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",C.length," to"," ",C.length," of ",C.length," ","entries"]})]})]})]})]})},OW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(!1),[p,x]=b.useState(null),[j,v]=b.useState({mainCategory:"",subCategory:"",name:"",description:""});b.useEffect(()=>{w(),A(),S()},[]);const w=async()=>{try{const L=localStorage.getItem("token"),T=await F.get("/api/config/working-categories/",{headers:{Authorization:`Bearer ${L}`}});a(T.data.workingCategories||[])}catch(L){console.error("load working categories error",L)}},A=async()=>{try{const L=localStorage.getItem("token"),T=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${L}`}});n(T.data.categories||[])}catch(L){console.error("load job categories error",L)}},S=async()=>{try{const L=localStorage.getItem("token"),T=await F.get("/api/config/sub-categories/",{headers:{Authorization:`Bearer ${L}`}});o(T.data.subCategories||[])}catch(L){console.error("load sub categories error",L)}},g=async L=>{L.preventDefault();try{const T=localStorage.getItem("token");p?(await F.put(`/api/config/working-categories/${p._id}`,j,{headers:{Authorization:`Bearer ${T}`}}),_.success("Working Category updated successfully")):(await F.post("/api/config/working-categories/",j,{headers:{Authorization:`Bearer ${T}`}}),_.success("Working Category created successfully")),h(!1),x(null),v({mainCategory:"",subCategory:"",name:"",description:""}),w()}catch(T){console.error("submit error",T),_.error("Operation failed")}},C=L=>{x(L),v({mainCategory:L.mainCategory._id,subCategory:L.subCategory._id,name:L.name,description:L.description||""}),h(!0)},k=async L=>{if(window.confirm("Are you sure you want to delete this working category?"))try{const T=localStorage.getItem("token");await F.delete(`/api/config/working-categories/${L}`,{headers:{Authorization:`Bearer ${T}`}}),_.success("Working Category deleted successfully"),w()}catch(T){console.error("delete error",T),_.error("Delete failed")}},O=async(L,T)=>{try{const R=localStorage.getItem("token");await F.patch(`/api/config/working-categories/${L}/toggle-status`,{isActive:!T},{headers:{Authorization:`Bearer ${R}`}}),_.success("Status updated"),w()}catch(R){console.error("toggle error",R),_.error("Status update failed")}},D=e.filter(L=>L.name.toLowerCase().includes(c.toLowerCase())||L.mainCategory.name.toLowerCase().includes(c.toLowerCase())||L.subCategory.name.toLowerCase().includes(c.toLowerCase())),B=i.filter(L=>L.mainCategory._id===j.mainCategory);return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Manage Working Categories"}),t.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Add/Edit Detail"}),t.jsx("button",{onClick:()=>{h(!u),x(null),v({mainCategory:"",subCategory:"",name:"",description:""})},className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:u?"Cancel":"Add New"})]}),u&&t.jsxs("form",{onSubmit:g,className:"mb-6 space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Main Category *"}),t.jsxs("select",{value:j.mainCategory,onChange:L=>{v({...j,mainCategory:L.target.value,subCategory:""})},className:"w-full border border-gray-300 rounded px-3 py-2",required:!0,children:[t.jsx("option",{value:"",children:"Select Main Category"}),r.map(L=>t.jsx("option",{value:L._id,children:L.name},L._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Sub Category *"}),t.jsxs("select",{value:j.subCategory,onChange:L=>v({...j,subCategory:L.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",required:!0,disabled:!j.mainCategory,children:[t.jsx("option",{value:"",children:"Select Sub Category"}),B.map(L=>t.jsx("option",{value:L._id,children:L.name},L._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Working Category Name *"}),t.jsx("input",{type:"text",value:j.name,onChange:L=>v({...j,name:L.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description"}),t.jsx("textarea",{value:j.description,onChange:L=>v({...j,description:L.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",rows:"3"})]}),t.jsx("button",{type:"submit",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:p?"Update":"Create"})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Working Categories Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[D.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:L=>m(L.target.value),className:"border border-gray-300 rounded px-2 py-1 text-sm",placeholder:"Search..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-50",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Main Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sub Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Working Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:D.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})}):D.map(L=>t.jsxs("tr",{children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:L.mainCategory.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:L.subCategory.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:L.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:L.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>O(L._id,L.isActive),className:`px-2 py-1 rounded text-xs ${L.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:L.isActive?"Active":"Inactive"})}),t.jsxs("td",{className:"border border-gray-300 px-4 py-2",children:[t.jsx("button",{onClick:()=>C(L),className:"bg-blue-600 text-white px-2 py-1 rounded text-xs mr-2 hover:bg-blue-700",children:"Edit"}),t.jsx("button",{onClick:()=>k(L._id),className:"bg-red-600 text-white px-2 py-1 rounded text-xs hover:bg-red-700",children:"Delete"})]})]},L._id))})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",D.length," to"," ",D.length," of"," ",D.length," entries"]})]})]})]})]})},DW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState(null),[c,m]=b.useState(""),[u,h]=b.useState({accountCode:"",accountName:"",accountType:"",subType:"",parentAccount:"",description:""});b.useEffect(()=>{p()},[]);const p=async()=>{try{const A=localStorage.getItem("token"),S=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${A}`}});a(S.data.accounts||[])}catch(A){console.error("Load accounts error",A),_.error("Failed to load accounts")}},x=async A=>{A.preventDefault();try{const S=localStorage.getItem("token");i?(await F.put(`/api/accounting/accounts/${i._id}`,u,{headers:{Authorization:`Bearer ${S}`}}),_.success("Account updated successfully")):(await F.post("/api/accounting/accounts/",u,{headers:{Authorization:`Bearer ${S}`}}),_.success("Account created successfully")),n(!1),o(null),h({accountCode:"",accountName:"",accountType:"",subType:"",parentAccount:"",description:""}),p()}catch(S){console.error("Submit error",S),_.error("Failed to save account")}},j=A=>{o(A),h({accountCode:A.accountCode,accountName:A.accountName,accountType:A.accountType,subType:A.subType||"",parentAccount:A.parentAccount?._id||"",description:A.description||""}),n(!0)},v=async A=>{if(window.confirm("Are you sure you want to delete this account?"))try{const S=localStorage.getItem("token");await F.delete(`/api/accounting/accounts/${A}`,{headers:{Authorization:`Bearer ${S}`}}),_.success("Account deleted successfully"),p()}catch(S){console.error("Delete error",S),_.error("Failed to delete account")}},w=e.filter(A=>A.accountName.toLowerCase().includes(c.toLowerCase())||A.accountCode.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Chart of Accounts"}),t.jsxs("button",{onClick:()=>n(!0),className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," Add Account"]})]}),t.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search accounts...",value:c,onChange:A=>m(A.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 flex-1"})]}),r&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:i?"Edit Account":"Add Account"}),t.jsxs("form",{onSubmit:x,className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Code *"}),t.jsx("input",{type:"text",value:u.accountCode,onChange:A=>h({...u,accountCode:A.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Name *"}),t.jsx("input",{type:"text",value:u.accountName,onChange:A=>h({...u,accountName:A.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Type *"}),t.jsxs("select",{value:u.accountType,onChange:A=>h({...u,accountType:A.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Type"}),t.jsx("option",{value:"Asset",children:"Asset"}),t.jsx("option",{value:"Liability",children:"Liability"}),t.jsx("option",{value:"Equity",children:"Equity"}),t.jsx("option",{value:"Revenue",children:"Revenue"}),t.jsx("option",{value:"Expense",children:"Expense"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Sub Type"}),t.jsx("input",{type:"text",value:u.subType,onChange:A=>h({...u,subType:A.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),t.jsx("textarea",{value:u.description,onChange:A=>h({...u,description:A.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:"3"})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:i?"Update":"Create"}),t.jsx("button",{type:"button",onClick:()=>{n(!1),o(null),h({accountCode:"",accountName:"",accountType:"",subType:"",parentAccount:"",description:""})},className:"flex-1 px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel"})]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sub Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:w.length>0?w.map(A=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:A.accountCode}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:A.accountName}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:A.accountType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:A.subType||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>j(A),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>v(A._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",children:t.jsx(ze,{})})]})})]},A._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No accounts found."})})})]})})]})]})},TW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState({fromDate:"",toDate:""});b.useEffect(()=>{c()},[]);const c=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.fromDate&&(x.fromDate=i.fromDate),i.toDate&&(x.toDate=i.toDate);const j=await F.get("/api/accounting/reports/chart-of-accounts-balances",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.balances||[])}catch(p){console.error("Load balances error",p),_.error("Failed to load balances")}finally{n(!1)}},m=p=>{o({...i,[p.target.name]:p.target.value})},u=()=>{c()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Chart of Accounts with Balances"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"fromDate",value:i.fromDate,onChange:m,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"toDate",value:i.toDate,onChange:m,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Balances Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading balances..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Net Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((p,x)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.accountCode}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.accountName}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.accountType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.debitBalance?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.creditBalance?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.netBalance?.toFixed(2)||"0.00"})]},x)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No balances found. Please adjust filters and view report."})})})]})]})]})]})},RW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState({startDate:"",endDate:"",accountId:""});b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${v}`}});o(w.data.accounts||[])}catch(v){console.error("Load accounts error",v),_.error("Failed to load accounts")}},h=async()=>{n(!0);try{const v=localStorage.getItem("token"),w={};c.startDate&&(w.startDate=c.startDate),c.endDate&&(w.endDate=c.endDate),c.accountId&&(w.accountId=c.accountId);const A=await F.get("/api/accounting/reports/cash-book",{headers:{Authorization:`Bearer ${v}`},params:w});a(A.data.cashBook||[])}catch(v){console.error("Load cash book error",v),_.error("Failed to load cash book")}finally{n(!1)}},p=v=>{m({...c,[v.target.name]:v.target.value})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Cash Book"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"startDate",value:c.startDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"endDate",value:c.endDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account/Party"}),t.jsxs("select",{name:"accountId",value:c.accountId,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading cash book..."})}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher#"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.date}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherNumber}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.description}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debit?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.credit?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.balance?.toFixed(2)||"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No cash book data found. Please adjust filters and view report."})})})]})})]})]})]})},PW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState({startDate:"",endDate:"",accountId:""});b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${v}`}});o(w.data.accounts||[])}catch(v){console.error("Load accounts error",v),_.error("Failed to load accounts")}},h=async()=>{n(!0);try{const v=localStorage.getItem("token"),w={};c.startDate&&(w.startDate=c.startDate),c.endDate&&(w.endDate=c.endDate),c.accountId&&(w.accountId=c.accountId);const A=await F.get("/api/accounting/reports/bank-book",{headers:{Authorization:`Bearer ${v}`},params:w});a(A.data.bankBook||[])}catch(v){console.error("Load bank book error",v),_.error("Failed to load bank book")}finally{n(!1)}},p=v=>{m({...c,[v.target.name]:v.target.value})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Bank Book"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"startDate",value:c.startDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"endDate",value:c.endDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account/Party"}),t.jsxs("select",{name:"accountId",value:c.accountId,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading bank book..."})}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher#"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.date}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherNumber}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.description}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debit?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.credit?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.balance?.toFixed(2)||"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No bank book data found. Please adjust filters and view report."})})})]})})]})]})]})},_W=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState(null),[p,x]=b.useState(""),[j,v]=b.useState({account:"",date:"",debit:"",credit:"",description:""}),[w,A]=b.useState({debit:"",credit:""});b.useEffect(()=>{S(),g()},[]);const S=async()=>{try{const R=localStorage.getItem("token"),z=await F.get("/api/accounting/opening-balances/",{headers:{Authorization:`Bearer ${R}`}});a(z.data.openingBalances||[])}catch(R){console.error("Load balances error",R),_.error("Failed to load opening balances")}},g=async()=>{try{const R=localStorage.getItem("token"),z=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${R}`}});n(z.data.accounts||[])}catch(R){console.error("Load accounts error",R)}},C=async R=>{R.preventDefault();try{const z=localStorage.getItem("token");c?(await F.put(`/api/accounting/opening-balances/${c._id}`,j,{headers:{Authorization:`Bearer ${z}`}}),_.success("Opening balance updated successfully")):(await F.post("/api/accounting/opening-balances/",j,{headers:{Authorization:`Bearer ${z}`}}),_.success("Opening balance created successfully")),o(!1),m(null),v({account:"",date:"",debit:"",credit:"",description:""}),S()}catch(z){console.error("Submit error",z),_.error("Failed to save opening balance")}},k=R=>{m(R),v({account:R.account._id,date:R.date?R.date.split("T")[0]:"",debit:R.debit,credit:R.credit,description:R.description||""}),o(!0)},O=async R=>{if(window.confirm("Are you sure you want to delete this opening balance?"))try{const z=localStorage.getItem("token");await F.delete(`/api/accounting/opening-balances/${R}`,{headers:{Authorization:`Bearer ${z}`}}),_.success("Opening balance deleted successfully"),S()}catch(z){console.error("Delete error",z),_.error("Failed to delete opening balance")}},D=R=>{h(R._id),A({debit:R.debit,credit:R.credit})},B=async R=>{try{const z=localStorage.getItem("token");await F.put(`/api/accounting/opening-balances/${R}`,{debit:Number(w.debit)||0,credit:Number(w.credit)||0},{headers:{Authorization:`Bearer ${z}`}}),_.success("Opening balance updated successfully"),h(null),S()}catch(z){console.error("Inline save error",z),_.error("Failed to update opening balance")}},L=()=>{h(null),A({debit:"",credit:""})},T=e.filter(R=>R.account.accountName.toLowerCase().includes(p.toLowerCase())||R.account.accountCode.toLowerCase().includes(p.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Opening Balance"}),t.jsxs("button",{onClick:()=>o(!0),className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," Add Opening Balance"]})]}),t.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search accounts...",value:p,onChange:R=>x(R.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 flex-1"})]}),i&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:c?"Edit Opening Balance":"Add Opening Balance"}),t.jsxs("form",{onSubmit:C,className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account *"}),t.jsxs("select",{value:j.account,onChange:R=>v({...j,account:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Account"}),r.map(R=>t.jsxs("option",{value:R._id,children:[R.accountCode," - ",R.accountName]},R._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:j.date,onChange:R=>v({...j,date:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Debit"}),t.jsx("input",{type:"number",step:"0.01",value:j.debit,onChange:R=>v({...j,debit:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Credit"}),t.jsx("input",{type:"number",step:"0.01",value:j.credit,onChange:R=>v({...j,credit:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),t.jsx("textarea",{value:j.description,onChange:R=>v({...j,description:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:"3"})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:c?"Update":"Create"}),t.jsx("button",{type:"button",onClick:()=>{o(!1),m(null),v({account:"",date:"",debit:"",credit:"",description:""})},className:"flex-1 px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel"})]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:T.length>0?T.map(R=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsxs("td",{className:"border border-gray-300 px-4 py-2",children:[R.account.accountCode," -"," ",R.account.accountName]}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:new Date(R.date).toLocaleDateString()}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:u===R._id?t.jsx("input",{type:"number",step:"0.01",value:w.debit,onChange:z=>A({...w,debit:z.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}):R.debit.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:u===R._id?t.jsx("input",{type:"number",step:"0.01",value:w.credit,onChange:z=>A({...w,credit:z.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}):R.credit.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:R.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("div",{className:"flex gap-2",children:u===R._id?t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>B(R._id),className:"px-2 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Save"}),t.jsx("button",{onClick:L,className:"px-2 py-1 bg-gray-500 text-white rounded hover:bg-gray-600",children:"Cancel"})]}):t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>D(R),className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>k(R),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>O(R._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",children:t.jsx(ze,{})})]})})})]},R._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No opening balances found."})})})]})})]})]})},MW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState([]),[u,h]=b.useState([{code:"",name:"",description:"",receipt:""}]),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[u]);const j=async()=>{try{const T=localStorage.getItem("token"),R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});m(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),_.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),$=String(T.getDate()).padStart(2,"0"),Z=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${$}${Z}`)},w=()=>{const T=u.reduce((R,z)=>R+(parseFloat(z.receipt)||0),0);x(T)},A=(T,R)=>{const z=c.find($=>$._id===R);if(z){const $=[...u];$[T]={...$[T],code:z.accountCode,name:z.accountName},h($)}},S=(T,R,z)=>{const $=[...u];$[T][R]=z,h($)},g=()=>{h([...u,{code:"",name:"",description:"",receipt:""}])},C=T=>{if(u.length>1){const R=u.filter((z,$)=>$!==T);h(R)}},k=async()=>{if(!e||!r||!i){_.error("Please fill in all required fields");return}if(u.some(T=>!T.code||!T.receipt)){_.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token"),R=u.map(z=>{const $=c.find(Z=>Z.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Cash Receipt",date:r,reference:e,description:z.description,amount:parseFloat(z.receipt),account:i,contraAccount:$._id},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),_.success("Cash receipt voucher saved successfully"),O()}catch(T){console.error("Save error",T),_.error("Failed to save cash receipt voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),o(""),h([{code:"",name:"",description:"",receipt:""}]),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),_.success("Voucher cleared"))},L=()=>{_.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Cash Receipt Voucher"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:k,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Close"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Cash A/c Code *"}),t.jsxs("select",{value:i,onChange:T=>o(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Cash Account"}),c.filter(T=>T.accountName.toLowerCase().includes("cash")).map(T=>t.jsxs("option",{value:T._id,children:[T.accountCode," - ",T.accountName]},T._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Receipt"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[u.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>A(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),c.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>S(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.receipt,onChange:z=>S(R,"receipt",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:u.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},zW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState([]),[u,h]=b.useState([{code:"",name:"",description:"",payment:""}]),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[u]);const j=async()=>{try{const T=localStorage.getItem("token"),R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});m(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),_.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),$=String(T.getDate()).padStart(2,"0"),Z=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${$}${Z}`)},w=()=>{const T=u.reduce((R,z)=>R+(parseFloat(z.payment)||0),0);x(T)},A=(T,R)=>{const z=c.find($=>$._id===R);if(z){const $=[...u];$[T]={...$[T],code:z.accountCode,name:z.accountName},h($)}},S=(T,R,z)=>{const $=[...u];$[T][R]=z,h($)},g=()=>{h([...u,{code:"",name:"",description:"",payment:""}])},C=T=>{if(u.length>1){const R=u.filter((z,$)=>$!==T);h(R)}},k=async()=>{if(!e||!r||!i){_.error("Please fill in all required fields");return}if(u.some(T=>!T.code||!T.payment)){_.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token"),R=u.map(z=>{const $=c.find(Z=>Z.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Cash Payment",date:r,reference:e,description:z.description,amount:parseFloat(z.payment),account:$._id,contraAccount:i},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),_.success("Cash payment voucher saved successfully"),O()}catch(T){console.error("Save error",T),_.error("Failed to save cash payment voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),o(""),h([{code:"",name:"",description:"",payment:""}]),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),_.success("Voucher cleared"))},L=()=>{_.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Cash Payment Voucher"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:k,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Cancel"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Cash A/c Code *"}),t.jsxs("select",{value:i,onChange:T=>o(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Cash Account"}),c.filter(T=>T.accountName.toLowerCase().includes("cash")).map(T=>t.jsxs("option",{value:T._id,children:[T.accountCode," - ",T.accountName]},T._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Payment"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[u.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>A(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),c.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>S(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.payment,onChange:z=>S(R,"payment",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:u.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},LW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState([]),[c,m]=b.useState([{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}]),[u,h]=b.useState(0),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[c]);const j=async()=>{try{const T=localStorage.getItem("token"),R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});o(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),_.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),$=String(T.getDate()).padStart(2,"0"),Z=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${$}${Z}`)},w=()=>{const T=c.reduce((z,$)=>z+(parseFloat($.debit)||0),0),R=c.reduce((z,$)=>z+(parseFloat($.credit)||0),0);h(T),x(R)},A=(T,R)=>{const z=i.find($=>$._id===R);if(z){const $=[...c];$[T]={...$[T],code:z.accountCode,name:z.accountName},m($)}},S=(T,R,z)=>{const $=[...c];$[T][R]=z,m($)},g=()=>{m([...c,{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}])},C=T=>{if(c.length>1){const R=c.filter((z,$)=>$!==T);m(R)}},k=async()=>{if(!e||!r){_.error("Please fill in all required fields");return}if(c.some(T=>!T.code||!T.debit&&!T.credit)){_.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token"),R=c.map(z=>{const $=i.find(Z=>Z.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Bank Receipt",date:r,reference:e,description:z.description,amount:parseFloat(z.debit)||parseFloat(z.credit),account:$._id,contraAccount:null,chequeNumber:z.chequeNumber,chequeDate:z.dated},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),_.success("Bank receipt voucher saved successfully"),O()}catch(T){console.error("Save error",T),_.error("Failed to save bank receipt voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),m([{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}]),h(0),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),_.success("Voucher cleared"))},L=()=>{_.info("Cancel functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Bank Receipt Voucher"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Add/Edit Bank Receipt Voucher"})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:k,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Cancel"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Voucher Number *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Cheque Number"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Dated"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[c.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>A(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>S(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.chequeNumber,onChange:z=>S(R,"chequeNumber",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Cheque Number"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"date",value:T.dated,onChange:z=>S(R,"dated",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.debit,onChange:z=>S(R,"debit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.credit,onChange:z=>S(R,"credit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:c.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:u.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},BW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState([]),[c,m]=b.useState([{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}]),[u,h]=b.useState(0),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[c]);const j=async()=>{try{const T=localStorage.getItem("token"),R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});o(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),_.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),$=String(T.getDate()).padStart(2,"0"),Z=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${$}${Z}`)},w=()=>{const T=c.reduce((z,$)=>z+(parseFloat($.debit)||0),0),R=c.reduce((z,$)=>z+(parseFloat($.credit)||0),0);h(T),x(R)},A=(T,R)=>{const z=i.find($=>$._id===R);if(z){const $=[...c];$[T]={...$[T],code:z.accountCode,name:z.accountName},m($)}},S=(T,R,z)=>{const $=[...c];$[T][R]=z,m($)},g=()=>{m([...c,{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}])},C=T=>{if(c.length>1){const R=c.filter((z,$)=>$!==T);m(R)}},k=async()=>{if(!e||!r){_.error("Please fill in all required fields");return}if(c.some(T=>!T.code||!T.debit&&!T.credit)){_.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token"),R=c.map(z=>{const $=i.find(Z=>Z.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Bank Payment",date:r,reference:e,description:z.description,amount:parseFloat(z.debit)||parseFloat(z.credit),account:$._id,contraAccount:null,chequeNumber:z.chequeNumber,chequeDate:z.dated},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),_.success("Bank payment voucher saved successfully"),O()}catch(T){console.error("Save error",T),_.error("Failed to save bank payment voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),m([{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}]),h(0),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),_.success("Voucher cleared"))},L=()=>{_.info("Cancel functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Bank Payment Voucher"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Add/Edit Bank Payment Voucher"})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:k,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Cancel"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Voucher Number *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Cheque Number"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Dated"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[c.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>A(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>S(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.chequeNumber,onChange:z=>S(R,"chequeNumber",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Cheque Number"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"date",value:T.dated,onChange:z=>S(R,"dated",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.debit,onChange:z=>S(R,"debit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.credit,onChange:z=>S(R,"credit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:c.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:u.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},IW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState([]),[c,m]=b.useState([{code:"",name:"",description:"",debit:"",credit:""}]),[u,h]=b.useState(0),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[c]);const j=async()=>{try{const T=localStorage.getItem("token")||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4ZWY0NGNhNzQ3YWJmYjA5OGZlYjRjZSIsImVtYWlsIjoiYWhhZHF1cmVzaGkxNjc1NkBnbWFpbC5jb20iLCJ1c2VybmFtZSI6ImFoYWQiLCJyb2xlIjoic3VwZXJhZG1pbiIsImlhdCI6MTc2MTY1MDc3MCwiZXhwIjoxNzYyOTQ2NzcwfQ.pvJJRM4tl11bR6Qw6arXiu-tLlYYrwWJuPjzb_7h33E",R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});o(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),_.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),$=String(T.getDate()).padStart(2,"0"),Z=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${$}${Z}`)},w=()=>{const T=c.reduce((z,$)=>z+(parseFloat($.debit)||0),0),R=c.reduce((z,$)=>z+(parseFloat($.credit)||0),0);h(T),x(R)},A=(T,R)=>{const z=i.find($=>$._id===R);if(z){const $=[...c];$[T]={...$[T],code:z.accountCode,name:z.accountName},m($)}},S=(T,R,z)=>{const $=[...c];$[T][R]=z,m($)},g=()=>{m([...c,{code:"",name:"",description:"",debit:"",credit:""}])},C=T=>{if(c.length>1){const R=c.filter((z,$)=>$!==T);m(R)}},k=async()=>{if(!e||!r){_.error("Please fill in all required fields");return}if(c.some(T=>!T.code||!T.debit&&!T.credit)){_.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token")||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4ZWY0NGNhNzQ3YWJmYjA5OGZlYjRjZSIsImVtYWlsIjoiYWhhZHF1cmVzaGkxNjc1NkBnbWFpbC5jb20iLCJ1c2VybmFtZSI6ImFoYWQiLCJyb2xlIjoic3VwZXJhZG1pbiIsImlhdCI6MTc2MTY1MDc3MCwiZXhwIjoxNzYyOTQ2NzcwfQ.pvJJRM4tl11bR6Qw6arXiu-tLlYYrwWJuPjzb_7h33E",R=c.map(z=>{const $=i.find(Z=>Z.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Journal Voucher",date:r,reference:e,description:z.description,amount:parseFloat(z.debit)||parseFloat(z.credit),account:$._id,contraAccount:null},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),_.success("Journal voucher saved successfully"),O()}catch(T){console.error("Save error",T),_.error("Failed to save journal voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),m([{code:"",name:"",description:"",debit:"",credit:""}]),h(0),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),_.success("Voucher cleared"))},L=()=>{_.info("Cancel functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Journal Voucher"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Add/Edit Journal Voucher"})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:k,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Cancel"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Voucher Number *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[c.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>A(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>S(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.debit,onChange:z=>S(R,"debit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.credit,onChange:z=>S(R,"credit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:c.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:u.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},FW=()=>{bs();const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(""),[c,m]=b.useState(1),u=10;b.useEffect(()=>{h()},[]);const h=async()=>{try{const w=localStorage.getItem("token"),S=await(await fetch("http://localhost:3001/api/accounting/job-payments/",{headers:{Authorization:`Bearer ${w}`}})).json();a(S)}catch{_.error("Failed to fetch job payments")}finally{n(!1)}},p=e.filter(w=>w.employer?.name?.toLowerCase().includes(i.toLowerCase())||w.job?.title?.toLowerCase().includes(i.toLowerCase())),x=Math.ceil(p.length/u),j=(c-1)*u,v=p.slice(j,j+u);return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto px-4 py-6",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Manage Job Payments"}),t.jsx("button",{className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700",children:"Add New Payment"})]}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm text-gray-600",children:"Job Payment Listing"}),t.jsx("span",{className:"text-sm text-gray-500",children:"Employer"})]}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[u," records"]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:i,onChange:w=>o(w.target.value),className:"border border-gray-300 rounded px-2 py-1 text-sm",placeholder:"umer.aziz"})]})]})]}),r?t.jsx("div",{className:"text-center py-8",children:"Loading..."}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Id"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Email"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Phone"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Title"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"UnSkilled"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Semi Skilled"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Skilled"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Highly Skilled"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Highly Qualified"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:v.length>0?v.map((w,A)=>t.jsxs("tr",{children:[t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:j+A+1}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.employer?.name||"N/A"}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.employer?.email||"N/A"}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.employer?.phone||"N/A"}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.job?.title||"N/A"}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.unSkilled||0}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.semiSkilled||0}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.skilled||0}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.highlySkilled||0}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.highlyQualified||0})]},w._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"10",className:"px-4 py-8 text-center text-sm text-gray-500",children:"No data available in table"})})})]})}),t.jsxs("div",{className:"flex justify-between items-center mt-4",children:[t.jsxs("div",{className:"text-sm text-gray-700",children:["Showing ",j+1," to"," ",Math.min(j+u,p.length)," of"," ",p.length," entries"]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>m(w=>Math.max(w-1,1)),disabled:c===1,className:"px-3 py-1 border border-gray-300 rounded text-sm disabled:opacity-50",children:"Previous"}),t.jsxs("span",{className:"px-3 py-1 text-sm",children:["Page ",c," of ",x]}),t.jsx("button",{onClick:()=>m(w=>Math.min(w+1,x)),disabled:c===x,className:"px-3 py-1 border border-gray-300 rounded text-sm disabled:opacity-50",children:"Next"})]})]})]})})]})},$W=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!0),[c,m]=b.useState(!1),[u,h]=b.useState(null),[p,x]=b.useState("1"),[j,v]=b.useState({vouNumber:"",date:new Date().toISOString().split("T")[0],accountCode:"",payments:[{name:"",job:"",agent:"",description:"",amount:0}]});b.useEffect(()=>{w(),A(),S()},[]);const w=async()=>{try{const R=await F.get("/api/accounting/travel-agent-payments/",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});a(R.data)}catch{We.error("Failed to fetch travel agent payments")}finally{o(!1)}},A=async()=>{try{const R=await F.get("/api/config/travel-agents/",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});n(R.data)}catch{We.error("Failed to fetch travel agents")}},S=async()=>{try{const R=await F.get("/api/accounting/travel-agent-payments/next-vou-number",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});x(R.data.nextVouNumber),v(z=>({...z,vouNumber:R.data.nextVouNumber}))}catch{console.error("Failed to fetch next voucher number")}},g=async R=>{R.preventDefault();try{const z={...j,payments:j.payments.filter($=>$.name&&$.job&&$.agent&&$.description&&$.amount>0)};u?(await F.put(`/api/accounting/travel-agent-payments/${u._id}`,z,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}),We.success("Travel agent payment updated successfully")):(await F.post("/api/accounting/travel-agent-payments/",z,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}),We.success("Travel agent payment created successfully")),w(),S(),O()}catch(z){We.error(z.response?.data?.message||"Failed to save payment")}},C=async R=>{if(window.confirm("Are you sure you want to delete this payment?"))try{await F.delete(`/api/accounting/travel-agent-payments/${R}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}),We.success("Payment deleted successfully"),w()}catch{We.error("Failed to delete payment")}},k=R=>{h(R),v({vouNumber:R.vouNumber,date:new Date(R.date).toISOString().split("T")[0],accountCode:R.accountCode,payments:R.payments}),m(!0)},O=()=>{v({vouNumber:p,date:new Date().toISOString().split("T")[0],accountCode:"",payments:[{name:"",job:"",agent:"",description:"",amount:0}]}),h(null),m(!1)},D=()=>{v(R=>({...R,payments:[...R.payments,{name:"",job:"",agent:"",description:"",amount:0}]}))},B=R=>{v(z=>({...z,payments:z.payments.filter(($,Z)=>Z!==R)}))},L=(R,z,$)=>{v(Z=>({...Z,payments:Z.payments.map((fe,se)=>se===R?{...fe,[z]:$}:fe)}))},T=()=>j.payments.reduce((R,z)=>R+(parseFloat(z.amount)||0),0);return i?t.jsx("div",{className:"flex justify-center items-center h-64",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-emerald-600"})}):t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsxs("div",{className:"p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Travel Agent Payment"}),t.jsxs("button",{onClick:()=>m(!c),className:"bg-emerald-600 text-white px-4 py-2 rounded-lg hover:bg-emerald-700 flex items-center gap-2",children:[t.jsx(Ve,{}),c?"Cancel":"Add Payment"]})]}),c&&t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:u?"Edit Travel Agent Payment":"Add Travel Agent Payment"}),t.jsxs("form",{onSubmit:g,children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:j.vouNumber,onChange:R=>v(z=>({...z,vouNumber:R.target.value})),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:j.date,onChange:R=>v(z=>({...z,date:R.target.value})),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Code *"}),t.jsx("input",{type:"text",value:j.accountCode,onChange:R=>v(z=>({...z,accountCode:R.target.value})),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-50",children:[t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Job"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Agent"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Description"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Amount"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Actions"})]})}),t.jsx("tbody",{children:j.payments.map((R,z)=>t.jsxs("tr",{children:[t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsx("input",{type:"text",value:R.name,onChange:$=>L(z,"name",$.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsx("input",{type:"text",value:R.job,onChange:$=>L(z,"job",$.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsxs("select",{value:R.agent,onChange:$=>L(z,"agent",$.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Agent"}),r.map($=>t.jsxs("option",{value:$._id,children:[$.name," (",$.code,")"]},$._id))]})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsx("input",{type:"text",value:R.description,onChange:$=>L(z,"description",$.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsx("input",{type:"number",step:"0.01",value:R.amount,onChange:$=>L(z,"amount",parseFloat($.target.value)||0),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:j.payments.length>1&&t.jsx("button",{type:"button",onClick:()=>B(z),className:"text-red-600 hover:text-red-800",children:t.jsx(ze,{})})})]},z))})]})}),t.jsxs("div",{className:"flex justify-between items-center mt-4",children:[t.jsxs("button",{type:"button",onClick:D,className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700 flex items-center gap-2",children:[t.jsx(Ve,{}),"Add Row"]}),t.jsxs("div",{className:"text-lg font-semibold",children:["Total: $",T().toFixed(2)]})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{type:"submit",className:"bg-emerald-600 text-white px-6 py-2 rounded-lg hover:bg-emerald-700 flex items-center gap-2",children:[t.jsx(Tn,{}),u?"Update":"Save"]}),t.jsxs("button",{type:"button",onClick:O,className:"bg-gray-600 text-white px-6 py-2 rounded-lg hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(Rn,{}),"Cancel"]})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsx("h2",{className:"text-lg font-semibold text-gray-800",children:"Travel Agent Payments"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Vou #"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Date"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Account Code"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Total"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created By"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"px-6 py-4 text-center text-gray-500",children:"No travel agent payments found"})}):e.map(R=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:R.vouNumber}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:new Date(R.date).toLocaleDateString()}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:R.accountCode}),t.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:["$",R.total.toFixed(2)]}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:R.createdBy?.name||"Unknown"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>k(R),className:"text-blue-600 hover:text-blue-900",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>C(R._id),className:"text-red-600 hover:text-red-900",children:t.jsx(ze,{})})]})})]},R._id))})]})})]})]})]})},UW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState([]),[j,v]=b.useState([]),[w,A]=b.useState([]),[S,g]=b.useState([]),[C,k]=b.useState([{name:"",job:"",agent:"",description:"",amount:""}]),[O,D]=b.useState(0);b.useEffect(()=>{B(),L(),T(),R(),z()},[]),b.useEffect(()=>{$()},[C]);const B=async()=>{try{const P=localStorage.getItem("token"),H=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${P}`}});x(H.data.accounts||[])}catch(P){console.error("Load accounts error",P),_.error("Failed to load accounts")}},L=async()=>{try{const P=localStorage.getItem("token"),H=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${P}`}});v(H.data||[])}catch(P){console.error("Load candidates error",P),_.error("Failed to load candidates")}},T=async()=>{try{const P=localStorage.getItem("token"),H=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${P}`}});A(H.data.categories||[])}catch(P){console.error("Load jobs error",P),_.error("Failed to load jobs")}},R=async()=>{try{const P=localStorage.getItem("token"),H=await F.get("/api/recruitment-agents/",{headers:{Authorization:`Bearer ${P}`}});g(H.data.agents||[])}catch(P){console.error("Load recruitment agents error",P),_.error("Failed to load recruitment agents")}},z=()=>{const P=new Date,H=P.getFullYear(),ee=String(P.getMonth()+1).padStart(2,"0"),pe=String(P.getDate()).padStart(2,"0"),ve=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${H}${ee}${pe}${ve}`)},$=()=>{const P=C.reduce((H,ee)=>H+(parseFloat(ee.amount)||0),0);D(P)},Z=(P,H,ee)=>{const pe=[...C];pe[P][H]=ee,k(pe)},fe=()=>{k([...C,{name:"",job:"",agent:"",description:"",amount:""}])},se=P=>{if(C.length>1){const H=C.filter((ee,pe)=>pe!==P);k(H)}},ie=async()=>{if(!e||!r||!i||!c||!u){_.error("Please fill in all required fields");return}if(C.some(P=>!P.name||!P.amount)){_.error("Please fill in all entry details");return}try{const P=localStorage.getItem("token"),H=C.map(ee=>{const pe=j.find(ve=>ve.name===ee.name);return F.post("/api/accounting/transactions/",{transactionType:"Candidate Receipt",date:r,reference:e,description:ee.description,amount:parseFloat(ee.amount),account:i,contraAccount:i,candidate:pe?._id,job:c},{headers:{Authorization:`Bearer ${P}`}})});await Promise.all(H),_.success("Candidate receipt voucher saved successfully"),V()}catch(P){console.error("Save error",P),_.error("Failed to save candidate receipt voucher")}},V=()=>{z(),n(new Date().toISOString().split("T")[0]),o(""),m(""),h(""),k([{name:"",job:"",agent:"",description:"",amount:""}]),D(0)},K=()=>{window.print()},ce=()=>{_.info("Client print functionality - opens client receipt")},U=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(V(),_.success("Voucher cleared"))},I=()=>{_.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Candidate Receipts"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:V,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:ie,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:K,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:ce,className:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition-colors flex items-center gap-2",children:[t.jsx(LC,{})," Client Print"]}),t.jsxs("button",{onClick:U,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:I,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Close"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:P=>a(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:P=>n(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Account Code *"}),t.jsxs("select",{value:i,onChange:P=>o(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Account"}),p.map(P=>t.jsxs("option",{value:P._id,children:[P.accountCode," - ",P.accountName]},P._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job *"}),t.jsxs("select",{value:c,onChange:P=>m(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Job"}),w.map(P=>t.jsx("option",{value:P._id,children:P.name},P._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsxs("select",{value:u,onChange:P=>h(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Candidate"}),j.map(P=>t.jsx("option",{value:P._id,children:P.name},P._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Job"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Agent"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[C.map((P,H)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:P.name,onChange:ee=>Z(H,"name",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Candidate"}),j.map(ee=>t.jsx("option",{value:ee.name,children:ee.name},ee._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:P.job,onChange:ee=>Z(H,"job",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Job"}),w.map(ee=>t.jsx("option",{value:ee.name,children:ee.name},ee._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:P.agent,onChange:ee=>Z(H,"agent",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Agent"}),S.map(ee=>t.jsx("option",{value:ee.name,children:ee.name},ee._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:P.description,onChange:ee=>Z(H,"description",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:P.amount,onChange:ee=>Z(H,"amount",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>se(H),disabled:C.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},H)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:O.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:fe,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},qW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState([]),[p,x]=b.useState([]),[j,v]=b.useState([]),[w,A]=b.useState([{code:"",name:"",ct:"",description:"",debit:"",credit:""}]),[S,g]=b.useState(0),[C,k]=b.useState(0);b.useEffect(()=>{O(),D(),B(),L()},[]),b.useEffect(()=>{T()},[w]);const O=async()=>{try{const K=localStorage.getItem("token"),ce=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${K}`}});h(ce.data.accounts||[])}catch(K){console.error("Load accounts error",K),_.error("Failed to load accounts")}},D=async()=>{try{const K=localStorage.getItem("token"),ce=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${K}`}});x(ce.data||[])}catch(K){console.error("Load candidates error",K),_.error("Failed to load candidates")}},B=async()=>{try{const K=localStorage.getItem("token"),ce=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${K}`}});v(ce.data.categories||[])}catch(K){console.error("Load jobs error",K),_.error("Failed to load jobs")}},L=()=>{const K=new Date,ce=K.getFullYear(),U=String(K.getMonth()+1).padStart(2,"0"),I=String(K.getDate()).padStart(2,"0"),P=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${ce}${U}${I}${P}`)},T=()=>{const K=w.reduce((U,I)=>U+(parseFloat(I.debit)||0),0),ce=w.reduce((U,I)=>U+(parseFloat(I.credit)||0),0);g(K),k(ce)},R=(K,ce)=>{const U=u.find(I=>I._id===ce);if(U){const I=[...w];I[K]={...I[K],code:U.accountCode,name:U.accountName},A(I)}},z=(K,ce,U)=>{const I=[...w];I[K][ce]=U,A(I)},$=()=>{A([...w,{code:"",name:"",ct:"",description:"",debit:"",credit:""}])},Z=K=>{if(w.length>1){const ce=w.filter((U,I)=>I!==K);A(ce)}},fe=async()=>{if(!e||!r||!i||!c){_.error("Please fill in all required fields");return}if(w.some(K=>!K.code||!K.debit&&!K.credit)){_.error("Please fill in all entry details");return}if(S!==C){_.error("Debit and Credit totals must be equal");return}try{const K=localStorage.getItem("token"),ce=w.map(U=>{const I=u.find(H=>H.accountCode===U.code),P=p.find(H=>H.name===c);if(parseFloat(U.debit)>0)return F.post("/api/accounting/transactions/",{transactionType:"Candidate JV",date:r,reference:e,description:U.description,amount:parseFloat(U.debit),account:I._id,contraAccount:I._id,candidate:P?._id,job:i},{headers:{Authorization:`Bearer ${K}`}});if(parseFloat(U.credit)>0)return F.post("/api/accounting/transactions/",{transactionType:"Candidate JV",date:r,reference:e,description:U.description,amount:-parseFloat(U.credit),account:I._id,contraAccount:I._id,candidate:P?._id,job:i},{headers:{Authorization:`Bearer ${K}`}})}).filter(Boolean);await Promise.all(ce),_.success("Candidate JV saved successfully"),se()}catch(K){console.error("Save error",K),_.error("Failed to save candidate JV")}},se=()=>{L(),n(new Date().toISOString().split("T")[0]),o(""),m(""),A([{code:"",name:"",ct:"",description:"",debit:"",credit:""}]),g(0),k(0)},ie=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(se(),_.success("Voucher cleared"))},V=()=>{_.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Candidate JV"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:se,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:fe,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:ie,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:V,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Close"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:K=>a(K.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:K=>n(K.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job *"}),t.jsxs("select",{value:i,onChange:K=>o(K.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Job"}),j.map(K=>t.jsx("option",{value:K._id,children:K.name},K._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsxs("select",{value:c,onChange:K=>m(K.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Candidate"}),p.map(K=>t.jsx("option",{value:K.name,children:K.name},K._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"CT"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[w.map((K,ce)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:K.code,onChange:U=>R(ce,U.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),u.map(U=>t.jsx("option",{value:U._id,children:U.accountCode},U._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:K.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:K.ct,onChange:U=>z(ce,"ct",U.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"CT"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:K.description,onChange:U=>z(ce,"description",U.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:K.debit,onChange:U=>z(ce,"debit",U.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:K.credit,onChange:U=>z(ce,"credit",U.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>Z(ce),disabled:w.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},ce)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:S.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:C.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:$,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},HW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState([]),[j,v]=b.useState([]),[w,A]=b.useState([]),[S,g]=b.useState([{candidate:"",code:"",name:"",description:"",amount:""}]),[C,k]=b.useState(0);b.useEffect(()=>{O(),D(),B(),L()},[]),b.useEffect(()=>{T()},[S]);const O=async()=>{try{const U=localStorage.getItem("token"),I=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${U}`}});x(I.data.accounts||[])}catch(U){console.error("Load accounts error",U),_.error("Failed to load accounts")}},D=async()=>{try{const U=localStorage.getItem("token"),I=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${U}`}});v(I.data||[])}catch(U){console.error("Load candidates error",U),_.error("Failed to load candidates")}},B=async()=>{try{const U=localStorage.getItem("token"),I=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${U}`}});A(I.data.categories||[])}catch(U){console.error("Load jobs error",U),_.error("Failed to load jobs")}},L=()=>{const U=new Date,I=U.getFullYear(),P=String(U.getMonth()+1).padStart(2,"0"),H=String(U.getDate()).padStart(2,"0"),ee=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${I}${P}${H}${ee}`)},T=()=>{const U=S.reduce((I,P)=>I+(parseFloat(P.amount)||0),0);k(U)},R=(U,I)=>{const P=p.find(H=>H._id===I);if(P){const H=[...S];H[U]={...H[U],code:P.accountCode,name:P.accountName},g(H)}},z=(U,I,P)=>{const H=[...S];H[U][I]=P,g(H)},$=()=>{g([...S,{candidate:"",code:"",name:"",description:"",amount:""}])},Z=U=>{if(S.length>1){const I=S.filter((P,H)=>H!==U);g(I)}},fe=async()=>{if(!e||!r||!i||!c||!u){_.error("Please fill in all required fields");return}if(S.some(U=>!U.candidate||!U.code||!U.amount)){_.error("Please fill in all entry details");return}try{const U=localStorage.getItem("token"),I=S.map(P=>{const H=p.find(pe=>pe.accountCode===P.code),ee=j.find(pe=>pe.name===P.candidate);return F.post("/api/accounting/transactions/",{transactionType:"Expenses Against Candidate",date:r,reference:e,description:P.description,amount:parseFloat(P.amount),account:H._id,contraAccount:i,candidate:ee?._id,job:c},{headers:{Authorization:`Bearer ${U}`}})});await Promise.all(I),_.success("Expenses against candidate saved successfully"),se()}catch(U){console.error("Save error",U),_.error("Failed to save expenses against candidate")}},se=()=>{L(),n(new Date().toISOString().split("T")[0]),o(""),m(""),h(""),g([{candidate:"",code:"",name:"",description:"",amount:""}]),k(0)},ie=()=>{window.print()},V=()=>{_.info("Client print functionality - opens client receipt")},K=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(se(),_.success("Voucher cleared"))},ce=()=>{_.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Candidate Payments"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:se,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:fe,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:ie,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:V,className:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition-colors flex items-center gap-2",children:[t.jsx(LC,{})," Client Print"]}),t.jsxs("button",{onClick:K,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:ce,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Close"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:U=>a(U.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:U=>n(U.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Code *"}),t.jsxs("select",{value:i,onChange:U=>o(U.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Account"}),p.map(U=>t.jsxs("option",{value:U._id,children:[U.accountCode," - ",U.accountName]},U._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job *"}),t.jsxs("select",{value:c,onChange:U=>m(U.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Job"}),w.map(U=>t.jsx("option",{value:U._id,children:U.name},U._id))]})]}),t.jsxs("div",{className:"md:col-span-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsxs("select",{value:u,onChange:U=>h(U.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Candidate"}),j.map(U=>t.jsx("option",{value:U.name,children:U.name},U._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[S.map((U,I)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:U.candidate,onChange:P=>z(I,"candidate",P.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Candidate"}),j.map(P=>t.jsx("option",{value:P.name,children:P.name},P._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:U.code,onChange:P=>R(I,P.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),p.map(P=>t.jsx("option",{value:P._id,children:P.accountCode},P._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:U.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:U.description,onChange:P=>z(I,"description",P.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:U.amount,onChange:P=>z(I,"amount",P.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>Z(I),disabled:S.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},I)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:C.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:$,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},c3=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState({fromDate:"",toDate:"",filterZeroBalance:!1}),c=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.fromDate&&(x.fromDate=i.fromDate),i.toDate&&(x.toDate=i.toDate),x.filterZeroBalance=i.filterZeroBalance;const j=await F.get("/api/accounting/reports/trial-balance",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.trialBalance||[])}catch(p){console.error("Load trial balance error",p),_.error("Failed to load trial balance")}finally{n(!1)}},m=p=>{const{name:x,value:j,type:v,checked:w}=p.target;o({...i,[x]:v==="checkbox"?w:j})},u=()=>{c()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Trial Balance"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{}),"Show Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"fromDate",value:i.fromDate,onChange:m,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"toDate",value:i.toDate,onChange:m,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",name:"filterZeroBalance",checked:i.filterZeroBalance,onChange:m,className:"mr-2"}),t.jsx("label",{className:"text-sm font-medium text-gray-700",children:"Filter Zero Balance"})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Data"}),r?t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading trial balance..."})]}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Opening Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((p,x)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.code}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.accountName}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.openingBalance}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.debit}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.credit}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.balance})]},x)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No trial balance data found. Please adjust filters and view report."})})})]})})]})]})]})},VW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState({fromDate:"",toDate:"",account:""});b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts",{headers:{Authorization:`Bearer ${v}`}});n(w.data.accounts||[])}catch(v){console.error("Load accounts error",v),_.error("Failed to load accounts")}},h=async()=>{o(!0);try{const v=localStorage.getItem("token"),w={};c.fromDate&&(w.fromDate=c.fromDate),c.toDate&&(w.toDate=c.toDate),c.account&&(w.accountId=c.account);const A=await F.get("/api/accounting/reports/account-balances",{headers:{Authorization:`Bearer ${v}`},params:w});a(A.data.balances||[])}catch(v){console.error("Load balances error",v),_.error("Failed to load balances")}finally{o(!1)}},p=v=>{m({...c,[v.target.name]:v.target.value})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Account Balances"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"fromDate",value:c.fromDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"toDate",value:c.toDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account"}),t.jsxs("select",{name:"account",value:c.account,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"All Accounts"}),r.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Balances Data"})}),i?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading balances..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Net Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.accountCode}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.accountName}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.accountType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debitBalance?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.creditBalance?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.netBalance?.toFixed(2)||"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No balances found. Please adjust filters and view report."})})})]})]})]})]})},YW=()=>{const[e,a]=b.useState({}),[r,n]=b.useState(!1),[i,o]=b.useState({startDate:"",endDate:""}),c=p=>{o({...i,[p.target.name]:p.target.value})},m=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.startDate&&(x.startDate=i.startDate),i.endDate&&(x.endDate=i.endDate);const j=await F.get("/api/accounting/reports/income-statement",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.incomeStatement||{})}catch(p){console.error("Load income statement error",p),_.error("Failed to load income statement")}finally{n(!1)}},u=()=>{m()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Income Statement Report"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"startDate",value:i.startDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"endDate",value:i.endDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading income statement..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sr. No."}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Particulars"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Most Inner Column"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Inner Column"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Outer Column"})]})}),t.jsx("tbody",{children:e.revenue!==void 0?t.jsxs(t.Fragment,{children:[t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"1"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Revenue"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.revenue?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Expenses"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.expenses?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"})]}),t.jsxs("tr",{className:"hover:bg-gray-50 font-semibold",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"3"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Net Income"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.netIncome?.toFixed(2)||"0.00"})]})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data found. Please adjust filters and view report."})})})]})]})]})]})},KW=()=>{const[e,a]=b.useState({}),[r,n]=b.useState(!1),[i,o]=b.useState({startDate:"",endDate:""}),c=p=>{o({...i,[p.target.name]:p.target.value})},m=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.startDate&&(x.startDate=i.startDate),i.endDate&&(x.endDate=i.endDate);const j=await F.get("/api/accounting/reports/balance-sheet",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.balanceSheet||{})}catch(p){console.error("Load balance sheet error",p),_.error("Failed to load balance sheet")}finally{n(!1)}},u=()=>{m()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Balance Sheet Report"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"startDate",value:i.startDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"endDate",value:i.endDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Balance Sheet"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading balance sheet..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Particulars"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"})]})}),t.jsx("tbody",{children:e.assets!==void 0?t.jsxs(t.Fragment,{children:[t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Assets"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.assets?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Liabilities"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.liabilities?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Equity"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.equity?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50 font-bold",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Total Liabilities and Equity"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.totalLiabilitiesAndEquity?.toFixed(2)||"0.00"})]})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data found. Please adjust filters and view report."})})})]})]})]})]})},GW=()=>{const[e,a]=b.useState({}),[r,n]=b.useState(!1),[i,o]=b.useState({startDate:"",endDate:""}),c=p=>{o({...i,[p.target.name]:p.target.value})},m=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.startDate&&(x.startDate=i.startDate),i.endDate&&(x.endDate=i.endDate);const j=await F.get("/api/accounting/reports/cash-flow-statement",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.cashFlowStatement||{})}catch(p){console.error("Load cash flow statement error",p),_.error("Failed to load cash flow statement")}finally{n(!1)}},u=()=>{m()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Cash Flow Statement"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"startDate",value:i.startDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"endDate",value:i.endDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading cash flow statement..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Particulars"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"})]})}),t.jsx("tbody",{children:e.operatingCashFlow!==void 0?t.jsxs(t.Fragment,{children:[t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Operating Cash Flow"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.operatingCashFlow?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Investing Cash Flow"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.investingCashFlow?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Financing Cash Flow"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.financingCashFlow?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50 font-bold",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Net Cash Flow"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.netCashFlow?.toFixed(2)||"0.00"})]})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data found. Please adjust filters and view report."})})})]})]})]})]})},JW=()=>{const[e,a]=b.useState({}),[r,n]=b.useState(!1),[i,o]=b.useState({startDate:"",endDate:""}),c=p=>{o({...i,[p.target.name]:p.target.value})},m=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.startDate&&(x.startDate=i.startDate),i.endDate&&(x.endDate=i.endDate);const j=await F.get("/api/accounting/reports/statement-of-owners-equity",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.statementOfOwnersEquity||{})}catch(p){console.error("Load statement of owners equity error",p),_.error("Failed to load statement of owners equity")}finally{n(!1)}},u=()=>{m()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Statement of Owners Equity Report"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"startDate",value:i.startDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"endDate",value:i.endDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading statement of owners equity..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Particulars"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"})]})}),t.jsx("tbody",{children:e.openingEquity!==void 0?t.jsxs(t.Fragment,{children:[t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Opening Equity"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.openingEquity?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Net Income"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.netIncome?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Equity Changes"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.equityChanges?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50 font-bold",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Closing Equity"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.closingEquity?.toFixed(2)||"0.00"})]})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data found. Please adjust filters and view report."})})})]})]})]})]})},WW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({code:"",username:"",companyName:"",city:"",state:"",country:"",password:"",ownership:"",sector:"",salesTurnover:"",numberOfEmployees:"",numberOfOffices:"",companyInfo:"",companyAddress:"",zip:"",street:"",fax:"",website:"",plan:"",phone:"",type:"",email:"",contactPersonName:"",contactPersonPhone:"",files:[]});b.useEffect(()=>{p()},[]);const p=async()=>{try{const C=localStorage.getItem("token"),k=await F.get("/api/employers/",{headers:{Authorization:`Bearer ${C}`}});a(k.data.employers)}catch(C){_.error("Failed to fetch employers"),console.error(C)}finally{n(!1)}},x=C=>{const{name:k,value:O}=C.target;h({...u,[k]:O})},j=C=>{h({...u,files:Array.from(C.target.files)})},v=async C=>{C.preventDefault();try{const k=localStorage.getItem("token"),O=new FormData;Object.keys(u).forEach(D=>{D==="files"?u.files.forEach(B=>O.append("files",B)):O.append(D,u[D])}),c?(await F.put(`/api/employers/${c._id}`,O,{headers:{Authorization:`Bearer ${k}`}}),_.success("Employer updated successfully")):(await F.post("/api/employers/",O,{headers:{Authorization:`Bearer ${k}`}}),_.success("Employer created successfully")),o(!1),m(null),S(),p()}catch(k){_.error(k.response?.data?.message||"Failed to save employer"),console.error(k)}},w=C=>{m(C),h({code:C.code,username:C.username,companyName:C.companyName,city:C.city,state:C.state,country:C.country,password:"",ownership:C.ownership||"",sector:C.sector||"",salesTurnover:C.salesTurnover||"",numberOfEmployees:C.numberOfEmployees||"",numberOfOffices:C.numberOfOffices||"",companyInfo:C.companyInfo||"",companyAddress:C.companyAddress||"",zip:C.zip||"",street:C.street||"",fax:C.fax||"",website:C.website||"",plan:C.plan||"",phone:C.phone||"",type:C.type||"",email:C.email,contactPersonName:C.contactPersonName||"",contactPersonPhone:C.contactPersonPhone||"",files:[]}),o(!0)},A=async C=>{if(window.confirm("Are you sure you want to delete this employer?"))try{const k=localStorage.getItem("token");await F.delete(`/api/employers/${C}`,{headers:{Authorization:`Bearer ${k}`}}),_.success("Employer deleted successfully"),p()}catch(k){_.error("Failed to delete employer"),console.error(k)}},S=()=>{h({code:"",username:"",companyName:"",city:"",state:"",country:"",password:"",ownership:"",sector:"",salesTurnover:"",numberOfEmployees:"",numberOfOffices:"",companyInfo:"",companyAddress:"",zip:"",street:"",fax:"",website:"",plan:"",phone:"",type:"",email:"",contactPersonName:"",contactPersonPhone:"",files:[]})},g=()=>{m(null),S(),o(!0)};return r?t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("div",{className:"text-center",children:"Loading..."})]}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Employers"}),i?t.jsxs("div",{className:"bg-white p-6 rounded shadow-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Employer":"Add/Edit Detail"}),t.jsxs("form",{onSubmit:v,className:"space-y-4",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Username *"}),t.jsx("input",{type:"text",name:"username",value:u.username,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Password *"}),t.jsx("input",{type:"password",name:"password",value:u.password,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!c})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Code *"}),t.jsx("input",{type:"text",name:"code",value:u.code,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Company Name *"}),t.jsx("input",{type:"text",name:"companyName",value:u.companyName,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Ownership"}),t.jsx("input",{type:"text",name:"ownership",value:u.ownership,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Sector / Industry"}),t.jsx("input",{type:"text",name:"sector",value:u.sector,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Sales Turnover"}),t.jsx("input",{type:"text",name:"salesTurnover",value:u.salesTurnover,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Number Of Employees"}),t.jsx("input",{type:"text",name:"numberOfEmployees",value:u.numberOfEmployees,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Number Of Offices"}),t.jsx("input",{type:"text",name:"numberOfOffices",value:u.numberOfOffices,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Company Info"}),t.jsx("textarea",{name:"companyInfo",value:u.companyInfo,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Company Address"}),t.jsx("input",{type:"text",name:"companyAddress",value:u.companyAddress,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Country"}),t.jsx("input",{type:"text",name:"country",value:u.country,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"State"}),t.jsx("input",{type:"text",name:"state",value:u.state,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"City *"}),t.jsx("input",{type:"text",name:"city",value:u.city,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Zip"}),t.jsx("input",{type:"text",name:"zip",value:u.zip,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Street *"}),t.jsx("input",{type:"text",name:"street",value:u.street,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Fax"}),t.jsx("input",{type:"text",name:"fax",value:u.fax,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Website URL"}),t.jsx("input",{type:"text",name:"website",value:u.website,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Plan"}),t.jsx("input",{type:"text",name:"plan",value:u.plan,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Phone Number"}),t.jsx("input",{type:"text",name:"phone",value:u.phone,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Type"}),t.jsx("input",{type:"text",name:"type",value:u.type,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Email *"}),t.jsx("input",{type:"email",name:"email",value:u.email,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Contact Person"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Name *"}),t.jsx("input",{type:"text",name:"contactPersonName",value:u.contactPersonName,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Phone *"}),t.jsx("input",{type:"text",name:"contactPersonPhone",value:u.contactPersonPhone,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]})]})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Files"}),t.jsx("input",{type:"file",multiple:!0,onChange:j,className:"w-full border border-gray-300 p-2 rounded"})]})]}),t.jsxs("div",{className:"flex justify-end space-x-2",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600",children:"Cancel"}),t.jsx("button",{type:"submit",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:"Save"}),!c&&t.jsx("button",{type:"submit",className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"Save & Close"})]})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-4",children:t.jsx("button",{onClick:g,className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"New"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border",children:"Code"}),t.jsx("th",{className:"px-4 py-2 border",children:"Username"}),t.jsx("th",{className:"px-4 py-2 border",children:"Company Name"}),t.jsx("th",{className:"px-4 py-2 border",children:"City"}),t.jsx("th",{className:"px-4 py-2 border",children:"State"}),t.jsx("th",{className:"px-4 py-2 border",children:"Country"}),t.jsx("th",{className:"px-4 py-2 border",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(C=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border",children:C.code}),t.jsx("td",{className:"px-4 py-2 border",children:C.username}),t.jsx("td",{className:"px-4 py-2 border",children:C.companyName}),t.jsx("td",{className:"px-4 py-2 border",children:C.city}),t.jsx("td",{className:"px-4 py-2 border",children:C.state}),t.jsx("td",{className:"px-4 py-2 border",children:C.country}),t.jsxs("td",{className:"px-4 py-2 border",children:[t.jsx("button",{onClick:()=>w(C),className:"bg-yellow-500 text-white px-2 py-1 rounded mr-2 hover:bg-yellow-600",children:"Edit"}),t.jsx("button",{onClick:()=>A(C._id),className:"bg-red-500 text-white px-2 py-1 rounded hover:bg-red-600",children:"Delete"})]})]},C._id))})]})})]})]})},XW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({name:"",amount:"",validForDays:"",maxJobsAllowed:"",supportsFeaturedJobs:!0,allowedNumberOfFeaturedJobs:"",featuredJobAmount:"",featuredEmployerAmount:""});b.useEffect(()=>{p()},[]);const p=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/employer-plans/",{headers:{Authorization:`Bearer ${g}`}});a(C.data.plans)}catch(g){_.error("Failed to fetch employer plans"),console.error(g)}finally{n(!1)}},x=g=>{const{name:C,value:k,type:O,checked:D}=g.target;h({...u,[C]:O==="checkbox"?D:k})},j=async g=>{g.preventDefault();const C=g.nativeEvent.submitter.value;try{const k=localStorage.getItem("token"),O={...u,amount:parseFloat(u.amount),validForDays:parseInt(u.validForDays),maxJobsAllowed:parseInt(u.maxJobsAllowed),allowedNumberOfFeaturedJobs:parseInt(u.allowedNumberOfFeaturedJobs),featuredJobAmount:parseFloat(u.featuredJobAmount),featuredEmployerAmount:parseFloat(u.featuredEmployerAmount)};c?(await F.put(`/api/employer-plans/${c._id}`,O,{headers:{Authorization:`Bearer ${k}`}}),_.success("Employer plan updated successfully")):(await F.post("/api/employer-plans/",O,{headers:{Authorization:`Bearer ${k}`}}),_.success("Employer plan created successfully")),p(),C==="saveAndClose"?(o(!1),m(null),A()):c||A()}catch(k){_.error(k.response?.data?.message||"Failed to save employer plan"),console.error(k)}},v=g=>{m(g),h({name:g.name,amount:g.amount.toString(),validForDays:g.validForDays.toString(),maxJobsAllowed:g.maxJobsAllowed.toString(),supportsFeaturedJobs:g.supportsFeaturedJobs,allowedNumberOfFeaturedJobs:g.allowedNumberOfFeaturedJobs.toString(),featuredJobAmount:g.featuredJobAmount.toString(),featuredEmployerAmount:g.featuredEmployerAmount.toString()}),o(!0)},w=async g=>{if(window.confirm("Are you sure you want to delete this employer plan?"))try{const C=localStorage.getItem("token");await F.delete(`/api/employer-plans/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Employer plan deleted successfully"),p()}catch(C){_.error("Failed to delete employer plan"),console.error(C)}},A=()=>{h({name:"",amount:"",validForDays:"",maxJobsAllowed:"",supportsFeaturedJobs:!0,allowedNumberOfFeaturedJobs:"",featuredJobAmount:"",featuredEmployerAmount:""})},S=()=>{m(null),A(),o(!0)};return r?t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("div",{className:"text-center",children:"Loading..."})]}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Employer Plans"}),i?t.jsxs("div",{className:"bg-white p-6 rounded shadow-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Employer Plan":"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"space-y-4",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Plan Name : *"}),t.jsx("input",{type:"text",name:"name",value:u.name,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Plan Amount :"}),t.jsx("input",{type:"number",step:"0.01",name:"amount",value:u.amount,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Valid For (In days) :"}),t.jsx("input",{type:"number",name:"validForDays",value:u.validForDays,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Maximum Jobs Allowed :"}),t.jsx("input",{type:"number",name:"maxJobsAllowed",value:u.maxJobsAllowed,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0}),t.jsx("small",{className:"text-gray-500",children:"[Maximum No of jobs, employer can post.-1 for unlimited]"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsxs("label",{className:"block text-sm font-medium",children:[t.jsx("input",{type:"checkbox",name:"supportsFeaturedJobs",checked:!u.supportsFeaturedJobs,onChange:g=>h({...u,supportsFeaturedJobs:!g.target.checked}),className:"mr-2"}),"This Plan Doesn't Support to mark a job/employer as a feature job/employer"]}),t.jsx("small",{className:"text-gray-500 block",children:"(If Checked, User will not be able to mark their job as featured job/feature employer)"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Allowed Number Of Featured Job :"}),t.jsx("input",{type:"number",name:"allowedNumberOfFeaturedJobs",value:u.allowedNumberOfFeaturedJobs,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0}),t.jsx("small",{className:"text-gray-500",children:"[Employer will be able to mark his/her job as featured job under this limitation.-1 for unlimited]"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Featured Job Amount :"}),t.jsx("input",{type:"number",step:"0.01",name:"featuredJobAmount",value:u.featuredJobAmount,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0}),t.jsx("small",{className:"text-gray-500",children:"(If employer exceed his/her limit of featured job request this amount will be charge to the employer account.)"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Featured Employer Amount :"}),t.jsx("input",{type:"number",step:"0.01",name:"featuredEmployerAmount",value:u.featuredEmployerAmount,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0}),t.jsx("small",{className:"text-gray-500",children:"(This Amount will be charge if employer wants to mark him as a featured employer)"})]})]}),t.jsxs("div",{className:"flex justify-end space-x-2",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600",children:"Cancel"}),t.jsx("button",{type:"submit",value:"save",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:"Save"}),t.jsx("button",{type:"submit",value:"saveAndClose",className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"Save & Close"})]})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-4",children:t.jsx("button",{onClick:S,className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"New"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border",children:"Amount"}),t.jsx("th",{className:"px-4 py-2 border",children:"Max Jobs Allowed"}),t.jsx("th",{className:"px-4 py-2 border",children:"Allowed Number Of Featured Job"}),t.jsx("th",{className:"px-4 py-2 border",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border",children:g.name}),t.jsx("td",{className:"px-4 py-2 border",children:g.amount.toFixed(2)}),t.jsx("td",{className:"px-4 py-2 border",children:g.maxJobsAllowed===-1?"Unlimited":g.maxJobsAllowed}),t.jsx("td",{className:"px-4 py-2 border",children:g.allowedNumberOfFeaturedJobs===-1?"Unlimited":g.allowedNumberOfFeaturedJobs}),t.jsxs("td",{className:"px-4 py-2 border",children:[t.jsx("button",{onClick:()=>v(g),className:"bg-yellow-500 text-white px-2 py-1 rounded mr-2 hover:bg-yellow-600",children:"Edit"}),t.jsx("button",{onClick:()=>w(g._id),className:"bg-red-500 text-white px-2 py-1 rounded hover:bg-red-600",children:"Delete"})]})]},g._id))})]})})]})]})},ZW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({employer:"",jobTitle:"",jobNo:"",processTypes:"",receiptDate:"",letterNo:"",visaNo:"",numberOfVisa:"",visaDate:"",currency:"",permissionNo:"",permissionDate:"",issuanceDate:"",deadlineDate:"",salaryAmount:"",deploymentArea:"",city:"",state:"",country:"",categories:"",jobTitleForDisplay:"",type:"",noOfPerson:"",educationalCategory:"",educationLevel:"",experienceRange:"",ageRange:"",salaryRange:"",careerLevel:"",salary:"",contractDuration:"",skills:"",additionalExperience:"",jobDetails:"",specialInstructions:"",jobDescription:"",jobType:"Full Time",applyMode:"With Resume Online",jobStatus:"Open",showOnWeb:!1});b.useEffect(()=>{p()},[]);const p=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/jobs/",{headers:{Authorization:`Bearer ${g}`}});a(C.data.jobs)}catch(g){_.error("Failed to fetch jobs"),console.error(g)}finally{n(!1)}},x=g=>{const{name:C,value:k,type:O,checked:D}=g.target;h({...u,[C]:O==="checkbox"?D:k})},j=async g=>{g.preventDefault();const C=g.nativeEvent.submitter.value;try{const k=localStorage.getItem("token"),O={...u,numberOfVisa:parseInt(u.numberOfVisa)||0,salaryAmount:parseFloat(u.salaryAmount)||0,noOfPerson:parseInt(u.noOfPerson)||0,salary:parseFloat(u.salary)||0,contractDuration:parseInt(u.contractDuration)||0};c?(await F.put(`/api/jobs/${c._id}`,O,{headers:{Authorization:`Bearer ${k}`}}),_.success("Job updated successfully")):(await F.post("/api/jobs/",O,{headers:{Authorization:`Bearer ${k}`}}),_.success("Job created successfully")),p(),C==="saveAndClose"?(o(!1),m(null),A()):c||A()}catch(k){_.error(k.response?.data?.message||"Failed to save job"),console.error(k)}},v=g=>{m(g),h({employer:g.employer||"",jobTitle:g.jobTitle||"",jobNo:g.jobNo||"",processTypes:g.processTypes||"",receiptDate:g.receiptDate||"",letterNo:g.letterNo||"",visaNo:g.visaNo||"",numberOfVisa:g.numberOfVisa||"",visaDate:g.visaDate||"",currency:g.currency||"",permissionNo:g.permissionNo||"",permissionDate:g.permissionDate||"",issuanceDate:g.issuanceDate||"",deadlineDate:g.deadlineDate||"",salaryAmount:g.salaryAmount||"",deploymentArea:g.deploymentArea||"",city:g.city||"",state:g.state||"",country:g.country||"",categories:g.categories||"",jobTitleForDisplay:g.jobTitleForDisplay||"",type:g.type||"",noOfPerson:g.noOfPerson||"",educationalCategory:g.educationalCategory||"",educationLevel:g.educationLevel||"",experienceRange:g.experienceRange||"",ageRange:g.ageRange||"",salaryRange:g.salaryRange||"",careerLevel:g.careerLevel||"",salary:g.salary||"",contractDuration:g.contractDuration||"",skills:g.skills||"",additionalExperience:g.additionalExperience||"",jobDetails:g.jobDetails||"",specialInstructions:g.specialInstructions||"",jobDescription:g.jobDescription||"",jobType:g.jobType||"Full Time",applyMode:g.applyMode||"With Resume Online",jobStatus:g.jobStatus||"Open",showOnWeb:g.showOnWeb||!1}),o(!0)},w=async g=>{if(window.confirm("Are you sure you want to delete this job?"))try{const C=localStorage.getItem("token");await F.delete(`/api/jobs/${g}`,{headers:{Authorization:`Bearer ${C}`}}),_.success("Job deleted successfully"),p()}catch(C){_.error("Failed to delete job"),console.error(C)}},A=()=>{h({employer:"",jobTitle:"",jobNo:"",processTypes:"",receiptDate:"",letterNo:"",visaNo:"",numberOfVisa:"",visaDate:"",currency:"",permissionNo:"",permissionDate:"",issuanceDate:"",deadlineDate:"",salaryAmount:"",deploymentArea:"",city:"",state:"",country:"",categories:"",jobTitleForDisplay:"",type:"",noOfPerson:"",educationalCategory:"",educationLevel:"",experienceRange:"",ageRange:"",salaryRange:"",careerLevel:"",salary:"",contractDuration:"",skills:"",additionalExperience:"",jobDetails:"",specialInstructions:"",jobDescription:"",jobType:"Full Time",applyMode:"With Resume Online",jobStatus:"Open",showOnWeb:!1})},S=()=>{m(null),A(),o(!0)};return r?t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("div",{className:"text-center",children:"Loading..."})]}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Jobs"}),i?t.jsxs("div",{className:"bg-white p-6 rounded shadow-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Job":"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"space-y-4",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Employer *"}),t.jsx("input",{type:"text",name:"employer",value:u.employer,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Title *"}),t.jsx("input",{type:"text",name:"jobTitle",value:u.jobTitle,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job No. *"}),t.jsx("input",{type:"text",name:"jobNo",value:u.jobNo,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Process Types *"}),t.jsx("input",{type:"text",name:"processTypes",value:u.processTypes,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Receipt Date"}),t.jsx("input",{type:"date",name:"receiptDate",value:u.receiptDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Letter No"}),t.jsx("input",{type:"text",name:"letterNo",value:u.letterNo,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Visa No"}),t.jsx("input",{type:"text",name:"visaNo",value:u.visaNo,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Number of Visa"}),t.jsx("input",{type:"number",name:"numberOfVisa",value:u.numberOfVisa,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Visa Date"}),t.jsx("input",{type:"date",name:"visaDate",value:u.visaDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Currency"}),t.jsx("input",{type:"text",name:"currency",value:u.currency,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Permission No. *"}),t.jsx("input",{type:"text",name:"permissionNo",value:u.permissionNo,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Permission Date *"}),t.jsx("input",{type:"date",name:"permissionDate",value:u.permissionDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Issuance Date"}),t.jsx("input",{type:"date",name:"issuanceDate",value:u.issuanceDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Deadline Date"}),t.jsx("input",{type:"date",name:"deadlineDate",value:u.deadlineDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Salary Amount"}),t.jsx("input",{type:"number",step:"0.01",name:"salaryAmount",value:u.salaryAmount,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Deployment Area"}),t.jsx("input",{type:"text",name:"deploymentArea",value:u.deploymentArea,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"City"}),t.jsx("input",{type:"text",name:"city",value:u.city,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"State"}),t.jsx("input",{type:"text",name:"state",value:u.state,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Country"}),t.jsx("input",{type:"text",name:"country",value:u.country,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Categories *"}),t.jsx("input",{type:"text",name:"categories",value:u.categories,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Title for Display *"}),t.jsx("input",{type:"text",name:"jobTitleForDisplay",value:u.jobTitleForDisplay,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Type *"}),t.jsx("input",{type:"text",name:"type",value:u.type,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"No of Person *"}),t.jsx("input",{type:"number",name:"noOfPerson",value:u.noOfPerson,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Educational Category"}),t.jsx("input",{type:"text",name:"educationalCategory",value:u.educationalCategory,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Education Level"}),t.jsx("input",{type:"text",name:"educationLevel",value:u.educationLevel,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Experience Range"}),t.jsx("input",{type:"text",name:"experienceRange",value:u.experienceRange,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Age Range"}),t.jsx("input",{type:"text",name:"ageRange",value:u.ageRange,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Salary Range"}),t.jsx("input",{type:"text",name:"salaryRange",value:u.salaryRange,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Career Level"}),t.jsx("input",{type:"text",name:"careerLevel",value:u.careerLevel,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Salary *"}),t.jsx("input",{type:"number",step:"0.01",name:"salary",value:u.salary,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Contract Duration *"}),t.jsx("input",{type:"number",name:"contractDuration",value:u.contractDuration,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Skills"}),t.jsx("textarea",{name:"skills",value:u.skills,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Additional Experience"}),t.jsx("textarea",{name:"additionalExperience",value:u.additionalExperience,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Details"}),t.jsx("textarea",{name:"jobDetails",value:u.jobDetails,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Special Instructions"}),t.jsx("textarea",{name:"specialInstructions",value:u.specialInstructions,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Description"}),t.jsx("textarea",{name:"jobDescription",value:u.jobDescription,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Type"}),t.jsxs("select",{name:"jobType",value:u.jobType,onChange:x,className:"w-full border border-gray-300 p-2 rounded",children:[t.jsx("option",{value:"Full Time",children:"Full Time"}),t.jsx("option",{value:"Part Time",children:"Part Time"}),t.jsx("option",{value:"Contract",children:"Contract"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Apply Mode"}),t.jsxs("select",{name:"applyMode",value:u.applyMode,onChange:x,className:"w-full border border-gray-300 p-2 rounded",children:[t.jsx("option",{value:"With Resume Online",children:"With Resume Online"}),t.jsx("option",{value:"Via Email",children:"Via Email"}),t.jsx("option",{value:"Via Post",children:"Via Post"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Status"}),t.jsxs("select",{name:"jobStatus",value:u.jobStatus,onChange:x,className:"w-full border border-gray-300 p-2 rounded",children:[t.jsx("option",{value:"Open",children:"Open"}),t.jsx("option",{value:"Closed",children:"Closed"}),t.jsx("option",{value:"In Progress",children:"In Progress"})]})]}),t.jsx("div",{className:"md:col-span-2",children:t.jsxs("label",{className:"block text-sm font-medium",children:[t.jsx("input",{type:"checkbox",name:"showOnWeb",checked:u.showOnWeb,onChange:x,className:"mr-2"}),"Show On Web"]})})]}),t.jsxs("div",{className:"flex justify-end space-x-2",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600",children:"Cancel"}),t.jsx("button",{type:"submit",value:"save",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:"Save"}),t.jsx("button",{type:"submit",value:"saveAndClose",className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"Save & Close"})]})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-4",children:t.jsx("button",{onClick:S,className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"New"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border",children:"Employer"}),t.jsx("th",{className:"px-4 py-2 border",children:"Job No"}),t.jsx("th",{className:"px-4 py-2 border",children:"Status"}),t.jsx("th",{className:"px-4 py-2 border",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border",children:g.jobTitle}),t.jsx("td",{className:"px-4 py-2 border",children:g.employer}),t.jsx("td",{className:"px-4 py-2 border",children:g.jobNo}),t.jsx("td",{className:"px-4 py-2 border",children:g.jobStatus}),t.jsxs("td",{className:"px-4 py-2 border",children:[t.jsx("button",{onClick:()=>v(g),className:"bg-yellow-500 text-white px-2 py-1 rounded mr-2 hover:bg-yellow-600",children:"Edit"}),t.jsx("button",{onClick:()=>w(g._id),className:"bg-red-500 text-white px-2 py-1 rounded hover:bg-red-600",children:"Delete"})]})]},g._id))})]})})]})]})},QW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState({fromDate:"",toDate:"",accountId:""}),[c,m]=b.useState([]);b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${v}`}});m(w.data.accounts||[])}catch(v){_.error("Failed to fetch accounts"),console.error(v)}},h=async()=>{if(!i.accountId){_.error("Please select an account/party");return}n(!0);try{const v=localStorage.getItem("token"),w={accountId:i.accountId};i.fromDate&&(w.startDate=i.fromDate),i.toDate&&(w.endDate=i.toDate);const A=await F.get("/api/accounting/reports/general-ledger",{headers:{Authorization:`Bearer ${v}`},params:w});a(A.data.generalLedger||[])}catch(v){console.error("Load employer ledger error",v),_.error("Failed to load employer ledger")}finally{n(!1)}},p=v=>{const{name:w,value:A}=v.target;o({...i,[w]:A})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Employer Ledger"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{}),"Show Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"fromDate",value:i.fromDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"toDate",value:i.toDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account/Party"}),t.jsxs("select",{name:"accountId",value:i.accountId,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account/Party"}),c.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Data"}),r?t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading employer ledger..."})]}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher#"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.date}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherNumber}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.description}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debit?v.debit.toFixed(2):"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.credit?v.credit.toFixed(2):"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.balance?v.balance.toFixed(2):"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No ledger data found. Please adjust filters and view report."})})})]})})]})]})]})},eX=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState("");b.useEffect(()=>{u()},[]);const u=async()=>{o(!0);try{const x=localStorage.getItem("token"),j=await F.get("/api/jobs/candidates",{headers:{Authorization:`Bearer ${x}`}});a(j.data.candidates||[])}catch(x){_.error("Failed to fetch job candidates"),console.error(x)}finally{o(!1)}},h=x=>{r.find(j=>j._id===x._id)?n(r.filter(j=>j._id!==x._id)):n([...r,x])},p=()=>{if(!c){_.error("Please select a print type");return}if(r.length===0){_.error("Please select candidates to print");return}window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Job Grouping"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("select",{value:c,onChange:x=>m(x.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Print Type *"}),t.jsx("option",{value:"application",children:"Application Form"}),t.jsx("option",{value:"contract",children:"Contract Letter"}),t.jsx("option",{value:"visa",children:"Visa Form"})]}),t.jsxs("button",{onClick:p,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Job Candidates Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("p",{className:"text-sm text-gray-600",children:[e.length," records"]}),t.jsx("input",{type:"text",placeholder:"Search:",className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:t.jsx("input",{type:"checkbox"})}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Salary"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Company Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Application Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"})]})}),t.jsx("tbody",{children:e.length>0?e.map((x,j)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"checkbox",checked:r.some(v=>v._id===x._id),onChange:()=>h(x)})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.salary||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.companyName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.contactPerson||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.candidateName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.mobile||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.applicationDate||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.status||""})]},j)):t.jsx("tr",{children:t.jsx("td",{colSpan:"9",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No candidates found."})})})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing 1 to ",e.length," of ",e.length," ","entries"]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Selected Candidates Listing"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Job Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Salary"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Company Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Application Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"})]})}),t.jsx("tbody",{children:r.length>0?r.map((x,j)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.salary||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.companyName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.contactPerson||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.candidateName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.mobile||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.applicationDate||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.status||""})]},j)):t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No selected candidates."})})})]})})]})]})]})},tX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState([]),[c,m]=b.useState(!1),u=async()=>{if(!e||!r){_.error("Please select both From Date and To Date");return}m(!0);try{const p=localStorage.getItem("token"),x=await F.get("/api/employer-management/status-jobs-report",{headers:{Authorization:`Bearer ${p}`},params:{fromDate:e,toDate:r}});o(x.data.report||[])}catch(p){_.error("Failed to fetch report data"),console.error(p)}finally{m(!1)}},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Status of Jobs Report"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{}),"Show Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-2",children:"From Date *"}),t.jsx("input",{type:"date",value:e,onChange:p=>a(p.target.value),className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-2",children:"To Date *"}),t.jsx("input",{type:"date",value:r,onChange:p=>n(p.target.value),className:"w-full border border-gray-300 p-2 rounded",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Data"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sr. No"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Employer"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Job Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Categories"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Vacancies"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Jobs in Process"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Filled"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:c?t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"Loading..."})}):i.length>0?i.map((p,x)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x+1}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.employer||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.categories||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.vacancies||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.jobsInProcess||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.filled||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.balance||0})]},x)):t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:'No data available. Please select dates and click "Show Report".'})})})]})})]})]})]})},aX=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState("");b.useEffect(()=>{u()},[]);const u=async()=>{o(!0);try{const x=localStorage.getItem("token"),j=await F.get("/api/employer-management/security-fee-refund-candidates",{headers:{Authorization:`Bearer ${x}`}});a(j.data.candidates||[])}catch(x){_.error("Failed to fetch job candidates"),console.error(x)}finally{o(!1)}},h=x=>{r.find(j=>j._id===x._id)?n(r.filter(j=>j._id!==x._id)):n([...r,x])},p=()=>{if(!c){_.error("Please select a print type");return}if(r.length===0){_.error("Please select candidates to print");return}window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Security Fee Refund"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("select",{value:c,onChange:x=>m(x.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Print Type *"}),t.jsx("option",{value:"refund-form",children:"Refund Form"}),t.jsx("option",{value:"receipt",children:"Receipt"}),t.jsx("option",{value:"confirmation",children:"Confirmation Letter"})]}),t.jsxs("button",{onClick:p,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Job Candidates Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("p",{className:"text-sm text-gray-600",children:[e.length," records"]}),t.jsx("input",{type:"text",placeholder:"Search:",className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:t.jsx("input",{type:"checkbox"})}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Salary"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Company Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Application Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"})]})}),t.jsx("tbody",{children:e.length>0?e.map((x,j)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"checkbox",checked:r.some(v=>v._id===x._id),onChange:()=>h(x)})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.salary||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.companyName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.contactPerson||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.candidateName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.mobile||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.applicationDate||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.status||""})]},j)):t.jsx("tr",{children:t.jsx("td",{colSpan:"9",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Selected Candidates Listing"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Job Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Salary"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Company Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Application Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"})]})}),t.jsx("tbody",{children:r.length>0?r.map((x,j)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.salary||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.companyName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.contactPerson||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.candidateName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.mobile||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.applicationDate||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.status||""})]},j)):t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No selected candidates."})})})]})})]})]})]})},rX=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState({fromDate:"",toDate:"",accountId:""}),[c,m]=b.useState([]);b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${v}`}});m(w.data.accounts||[])}catch(v){_.error("Failed to fetch accounts"),console.error(v)}},h=async()=>{if(!i.accountId){_.error("Please select an account/party");return}n(!0);try{const v=localStorage.getItem("token"),w={accountId:i.accountId};i.fromDate&&(w.startDate=i.fromDate),i.toDate&&(w.endDate=i.toDate);const A=await F.get("/api/accounting/reports/general-ledger",{headers:{Authorization:`Bearer ${v}`},params:w});a(A.data.generalLedger||[])}catch(v){console.error("Load travel agent ledger error",v),_.error("Failed to load travel agent ledger")}finally{n(!1)}},p=v=>{const{name:w,value:A}=v.target;o({...i,[w]:A})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Travel Agent Ledger"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{}),"Show Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"fromDate",value:i.fromDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"toDate",value:i.toDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account/Party"}),t.jsxs("select",{name:"accountId",value:i.accountId,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account/Party"}),c.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Data"}),r?t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading travel agent ledger..."})]}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher#"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.date}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherNumber}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.description}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debit?v.debit.toFixed(2):"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.credit?v.credit.toFixed(2):"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.balance?v.balance.toFixed(2):"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No ledger data found. Please adjust filters and view report."})})})]})})]})]})]})},nX=()=>{const[e,a]=b.useState({firstName:"",lastName:"",email:"",mobile:"",profession:"",address:"",experience:""}),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState(""),[u,h]=b.useState(null);b.useEffect(()=>{p()},[]);const p=async()=>{try{const S=localStorage.getItem("token"),g=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${S}`}});n(g.data?.candidates||g.data||[])}catch(S){_.error("Failed to fetch candidates"),console.error(S)}},x=S=>{const{name:g,value:C}=S.target;a({...e,[g]:C})},j=async()=>{if(!e.firstName||!e.lastName||!e.email||!e.mobile){_.error("Please fill in all required fields");return}o(!0);try{const S=localStorage.getItem("token"),g={name:`${e.firstName} ${e.lastName}`,email:e.email,contact:e.mobile,profession:e.profession,address:e.address,experience:e.experience,status:"Initial Registration"};u?(await F.put(`/api/candidates/${u._id}`,g,{headers:{Authorization:`Bearer ${S}`}}),_.success("Candidate updated successfully")):(await F.post("/api/candidates/",g,{headers:{Authorization:`Bearer ${S}`}}),_.success("Candidate registered successfully")),a({firstName:"",lastName:"",email:"",mobile:"",profession:"",address:"",experience:""}),h(null),p()}catch(S){_.error(u?"Failed to update candidate":"Failed to register candidate"),console.error(S)}finally{o(!1)}},v=()=>{a({firstName:"",lastName:"",email:"",mobile:"",profession:"",address:"",experience:""}),h(null)},w=S=>{const g=S.name.split(" ");a({firstName:g[0]||"",lastName:g.slice(1).join(" ")||"",email:S.email||"",mobile:S.contact||"",profession:S.profession||"",address:S.address||"",experience:S.experience||""}),h(S)},A=r.filter(S=>{const g=(S?.name||"").toString(),C=(S?.email||"").toString(),k=(c||"").toLowerCase();return g.toLowerCase().includes(k)||C.toLowerCase().includes(k)});return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("div",{className:"flex justify-between items-center mb-6",children:t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Candidate Initial Registration"})}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:u?"Edit Candidate":"Add/Edit Candidate"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"First Name *"}),t.jsx("input",{type:"text",name:"firstName",value:e.firstName,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"First Name"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Last Name *"}),t.jsx("input",{type:"text",name:"lastName",value:e.lastName,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Last Name"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email *"}),t.jsx("input",{type:"email",name:"email",value:e.email,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Email"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile *"}),t.jsx("input",{type:"tel",name:"mobile",value:e.mobile,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Mobile"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Profession"}),t.jsx("input",{type:"text",name:"profession",value:e.profession,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Profession"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Address"}),t.jsx("textarea",{name:"address",value:e.address,onChange:x,rows:"3",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Address"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Experience"}),t.jsx("input",{type:"text",name:"experience",value:e.experience,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Experience"})]}),t.jsxs("div",{className:"flex gap-4 pt-4",children:[t.jsx("button",{onClick:j,disabled:i,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50",children:i?"Saving...":"Save"}),t.jsx("button",{onClick:v,className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel"})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Record Listing"}),t.jsx("div",{className:"mb-4",children:t.jsx("input",{type:"text",placeholder:"Search by name or email...",value:c,onChange:S=>m(S.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate No"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Experience"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map((S,g)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:String(g+1).padStart(2,"0")}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:S.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:S.email}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:S.contact}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:S.experience||"N/A"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>w(S),className:"px-3 py-1 bg-yellow-500 text-white rounded-md hover:bg-yellow-600 transition-colors text-sm",children:"Edit"})})]},S._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," entries"]})]})]})]})]})},sX=()=>{const[e,a]=b.useState("addEdit"),[r,n]=b.useState(!1),[i,o]=b.useState({username:"",candidateType:"",title:"",firstName:"",lastName:"",cnic:"",fatherName:"",gender:"",dateOfBirth:"",age:"",placeOfBirth:"",nationality:"",password:"",religion:"",wages:"",maritalStatus:"",education:"",profession:"",experience:"",jobType:"",jobAppliedFor:"",plan:"",passportNumber:"",passportIssueDate:"",passportExpiryDate:"",passportIssuePlace:"",country:"",state:"",province:"",zip:"",district:"",city:"",street:"",phone:"",mobile:"",email:"",fax:"",website:"",contactAddress:"",returnAddress:"",emergencyContact:"",emergencyContactRelation:"",skills:[],educations:[],currentStatus:"",statusDate:"",convicted:"",politicalAffiliation:"",presentEmployment:"",achievements:"",dependents:[],resumes:[]}),[c,m]=b.useState([]),[u,h]=b.useState(!1),[p,x]=b.useState(""),[j,v]=b.useState(null),[w,A]=b.useState({from:"",to:"",degree:"",institute:"",duration:""}),[S,g]=b.useState({dependent:"",gender:"",age:""}),[C,k]=b.useState({from:"",to:"",degree:"",institute:"",duration:""}),[O,D]=b.useState(""),B=[{id:"addEdit",label:"Add/Edit Detail"},{id:"basic",label:"Basic Info"},{id:"passport",label:"Passport Info"},{id:"residence",label:"Residence Info"},{id:"contact",label:"Contact Details"},{id:"education",label:"Education"},{id:"skills",label:"Skills"},{id:"status",label:"Present Status"},{id:"dependents",label:"Candidate Dependents"},{id:"resumes",label:"Resumes"}];b.useEffect(()=>{L()},[]);const L=async()=>{try{const I=localStorage.getItem("token"),P=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${I}`}});m(P.data||[])}catch(I){_.error("Failed to fetch candidates"),console.error(I)}},T=I=>{const{name:P,value:H}=I.target;o({...i,[P]:H})},R=I=>{const H=Array.from(I.target.files).map(ee=>({file:ee,name:ee.name}));o({...i,resumes:[...i.resumes,...H]})},z=()=>{w.degree&&w.institute&&(o({...i,skills:[...i.skills,{...w}]}),A({from:"",to:"",degree:"",institute:"",duration:""}))},$=I=>{o({...i,skills:i.skills.filter((P,H)=>H!==I)})},Z=()=>{S.dependent&&S.gender&&(o({...i,dependents:[...i.dependents,{...S}]}),g({dependent:"",gender:"",age:""}))},fe=I=>{o({...i,dependents:i.dependents.filter((P,H)=>H!==I)})},se=()=>{C.degree&&C.institute&&(o({...i,educations:[...i.educations,{...C}]}),k({from:"",to:"",degree:"",institute:"",duration:""}))},ie=I=>{o({...i,educations:i.educations.filter((P,H)=>H!==I)})},V=async(I=!1)=>{if(!i.firstName||!i.lastName||!i.cnic||!i.fatherName||!i.dateOfBirth||!i.nationality){_.error("Please fill in all required fields");return}h(!0);try{const P=localStorage.getItem("token"),H={...i,name:`${i.firstName} ${i.lastName}`,status:"Final Registration"};j?(await F.put(`/api/candidates/${j._id}`,H,{headers:{Authorization:`Bearer ${P}`}}),_.success("Candidate updated successfully")):(await F.post("/api/candidates/",H,{headers:{Authorization:`Bearer ${P}`}}),_.success("Candidate registered successfully")),I?K():(o({username:"",candidateType:"",title:"",firstName:"",lastName:"",cnic:"",fatherName:"",gender:"",dateOfBirth:"",age:"",placeOfBirth:"",nationality:"",password:"",religion:"",wages:"",maritalStatus:"",education:"",profession:"",experience:"",jobType:"",jobAppliedFor:"",plan:"",passportNumber:"",passportIssueDate:"",passportExpiryDate:"",passportIssuePlace:"",country:"",state:"",province:"",zip:"",district:"",city:"",street:"",phone:"",mobile:"",email:"",fax:"",website:"",contactAddress:"",returnAddress:"",emergencyContact:"",emergencyContactRelation:"",skills:[],educations:[],currentStatus:"",statusDate:"",convicted:"",politicalAffiliation:"",presentEmployment:"",achievements:"",dependents:[],resumes:[]}),v(null),L())}catch(P){_.error(j?"Failed to update candidate":"Failed to register candidate"),console.error(P)}finally{h(!1)}},K=()=>{o({username:"",candidateType:"",title:"",firstName:"",lastName:"",cnic:"",fatherName:"",gender:"",dateOfBirth:"",age:"",placeOfBirth:"",nationality:"",password:"",religion:"",wages:"",maritalStatus:"",education:"",profession:"",experience:"",jobType:"",jobAppliedFor:"",plan:"",passportNumber:"",passportIssueDate:"",passportExpiryDate:"",passportIssuePlace:"",country:"",state:"",province:"",zip:"",district:"",city:"",street:"",phone:"",mobile:"",email:"",fax:"",website:"",contactAddress:"",returnAddress:"",emergencyContact:"",emergencyContactRelation:"",skills:[],educations:[],currentStatus:"",statusDate:"",convicted:"",politicalAffiliation:"",presentEmployment:"",achievements:"",dependents:[],resumes:[]}),v(null),n(!1)},ce=I=>{const P=(I.name||"").split(" ");o({username:I.username||"",candidateType:I.candidateType||"",title:I.title||"",firstName:P[0]||"",lastName:P.slice(1).join(" ")||"",cnic:I.cnic||"",fatherName:I.fatherName||"",gender:I.gender||"",dateOfBirth:I.dateOfBirth||"",age:I.age||"",placeOfBirth:I.placeOfBirth||"",nationality:I.nationality||"",password:"",religion:I.religion||"",wages:I.wages||"",maritalStatus:I.maritalStatus||"",education:I.education||"",profession:I.profession||"",experience:I.experience||"",jobType:I.jobType||"",jobAppliedFor:I.jobAppliedFor||"",plan:I.plan||"",passportNumber:I.passportNumber||"",passportIssueDate:I.passportIssueDate||"",passportExpiryDate:I.passportExpiryDate||"",passportIssuePlace:I.passportIssuePlace||"",country:I.country||"",state:I.state||"",province:I.province||"",zip:I.zip||"",district:I.district||"",city:I.city||"",street:I.street||"",phone:I.phone||"",mobile:I.mobile||I.contact||"",email:I.email||"",fax:I.fax||"",website:I.website||"",contactAddress:I.contactAddress||"",returnAddress:I.returnAddress||"",emergencyContact:I.emergencyContact||"",emergencyContactRelation:I.emergencyContactRelation||"",skills:I.skills||[],currentStatus:I.currentStatus||"",statusDate:I.statusDate||"",convicted:I.convicted||"",politicalAffiliation:I.politicalAffiliation||"",presentEmployment:I.presentEmployment||"",achievements:I.achievements||"",dependents:I.dependents||[],resumes:I.resumes||[]}),v(I),n(!0)},U=(c||[]).filter(I=>{const P=(I?.name||"").toString(),H=(I?.email||"").toString(),ee=(p||"").toLowerCase();return P.toLowerCase().includes(ee)||H.toLowerCase().includes(ee)});return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Candidate Final Registration"}),r&&t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("div",{className:"flex space-x-2 mb-6 border-b",children:B.map(I=>t.jsx("button",{onClick:()=>a(I.id),className:`px-4 py-2 text-sm font-medium rounded-t-md ${e===I.id?"bg-blue-600 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,children:I.label},I.id))}),e==="addEdit"&&t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{onClick:()=>V(!0),className:"px-4 py-2 bg-blue-600 text-white rounded",children:"Save"}),t.jsx("button",{onClick:K,className:"px-4 py-2 bg-gray-600 text-white rounded",children:"Cancel"})]}),e==="basic"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Username"}),t.jsx("input",{type:"text",name:"username",value:i.username,onChange:T,placeholder:"Username",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate Type"}),t.jsxs("select",{name:"candidateType",value:i.candidateType,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Candidate Type"}),t.jsx("option",{value:"unskilled",children:"Unskilled"}),t.jsx("option",{value:"semiskilled",children:"Semi-skilled"}),t.jsx("option",{value:"skilled",children:"Skilled"}),t.jsx("option",{value:"highlyskilled",children:"Highly Skilled"}),t.jsx("option",{value:"highly qualified",children:"Highly Qualified"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Title"}),t.jsx("input",{type:"text",name:"title",value:i.title,onChange:T,placeholder:"Title",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"First Name *"}),t.jsx("input",{type:"text",name:"firstName",value:i.firstName,onChange:T,placeholder:"First Name",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Last Name *"}),t.jsx("input",{type:"text",name:"lastName",value:i.lastName,onChange:T,placeholder:"Last Name",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"CNIC *"}),t.jsx("input",{type:"text",name:"cnic",value:i.cnic,onChange:T,placeholder:"CNIC",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Father Name *"}),t.jsx("input",{type:"text",name:"fatherName",value:i.fatherName,onChange:T,placeholder:"Father Name",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Gender"}),t.jsxs("select",{name:"gender",value:i.gender,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Gender"}),t.jsx("option",{value:"Male",children:"Male"}),t.jsx("option",{value:"Female",children:"Female"}),t.jsx("option",{value:"Other",children:"Other"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date of Birth *"}),t.jsx("input",{type:"date",name:"dateOfBirth",value:i.dateOfBirth,onChange:T,placeholder:"Date of Birth",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Age"}),t.jsx("input",{type:"number",name:"age",value:i.age,onChange:T,placeholder:"Age",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Place Of Birth"}),t.jsx("input",{type:"text",name:"placeOfBirth",value:i.placeOfBirth,onChange:T,placeholder:"Place Of Birth",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Nationality *"}),t.jsx("input",{type:"text",name:"nationality",value:i.nationality,onChange:T,placeholder:"Nationality",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),t.jsx("input",{type:"password",name:"password",value:i.password,onChange:T,placeholder:"Password",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Religion"}),t.jsx("input",{type:"text",name:"religion",value:i.religion,onChange:T,placeholder:"Religion",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Wages/Salary"}),t.jsx("input",{type:"number",name:"wages",value:i.wages,onChange:T,placeholder:"Wages",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Marital Status"}),t.jsxs("select",{name:"maritalStatus",value:i.maritalStatus,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Marital Status"}),t.jsx("option",{value:"single",children:"Single"}),t.jsx("option",{value:"married",children:"Married"}),t.jsx("option",{value:"divorced",children:"Divorced"}),t.jsx("option",{value:"widow",children:"Widow"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Education"}),t.jsxs("select",{name:"education",value:i.education,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Education"}),t.jsx("option",{value:"computerscience",children:"Computer Science"}),t.jsx("option",{value:"engineering",children:"Engineering"}),t.jsx("option",{value:"arts",children:"Arts"}),t.jsx("option",{value:"designing",children:"Designing"}),t.jsx("option",{value:"mba finance",children:"MBA Finance"}),t.jsx("option",{value:"mba hr",children:"MBA HR"}),t.jsx("option",{value:"mba global chain supply",children:"MBA Global Chain Supply"}),t.jsx("option",{value:"B.A",children:"B.A"}),t.jsx("option",{value:"science",children:"Science"}),t.jsx("option",{value:"under matric",children:"Under Matric"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Profession"}),t.jsx("input",{type:"text",name:"profession",value:i.profession,onChange:T,placeholder:"Profession",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Experience"}),t.jsx("input",{type:"text",name:"experience",value:i.experience,onChange:T,placeholder:"Experience",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Type"}),t.jsx("input",{type:"text",name:"jobType",value:i.jobType,onChange:T,placeholder:"Job Type",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Applied For"}),t.jsx("input",{type:"text",name:"jobAppliedFor",value:i.jobAppliedFor,onChange:T,placeholder:"Job Applied For",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Plan"}),t.jsx("input",{type:"text",name:"plan",value:i.plan,onChange:T,placeholder:"Plan",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{className:"col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Upload Files"}),t.jsx("input",{type:"file",multiple:!0,onChange:R,className:"w-full px-3 py-2 border rounded"}),t.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Drag & drop files here …"})]})]}),e==="passport"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport Number"}),t.jsx("input",{type:"text",name:"passportNumber",value:i.passportNumber,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport Issue Date"}),t.jsx("input",{type:"date",name:"passportIssueDate",value:i.passportIssueDate,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport Expiry Date"}),t.jsx("input",{type:"date",name:"passportExpiryDate",value:i.passportExpiryDate,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport Issue Place"}),t.jsx("input",{type:"text",name:"passportIssuePlace",value:i.passportIssuePlace,onChange:T,className:"w-full px-3 py-2 border rounded"})]})]}),e==="residence"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Country"}),t.jsx("input",{type:"text",name:"country",value:i.country,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"State"}),t.jsx("input",{type:"text",name:"state",value:i.state,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Province"}),t.jsx("input",{type:"text",name:"province",value:i.province,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Zip"}),t.jsx("input",{type:"text",name:"zip",value:i.zip,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"District"}),t.jsx("input",{type:"text",name:"district",value:i.district,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"City"}),t.jsx("input",{type:"text",name:"city",value:i.city,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Street"}),t.jsx("input",{type:"text",name:"street",value:i.street,onChange:T,className:"w-full px-3 py-2 border rounded"})]})]}),e==="contact"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Phone"}),t.jsx("input",{type:"text",name:"phone",value:i.phone,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile"}),t.jsx("input",{type:"text",name:"mobile",value:i.mobile,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),t.jsx("input",{type:"email",name:"email",value:i.email,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Fax"}),t.jsx("input",{type:"text",name:"fax",value:i.fax,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Website"}),t.jsx("input",{type:"text",name:"website",value:i.website,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Contact Address"}),t.jsx("input",{type:"text",name:"contactAddress",value:i.contactAddress,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Return Address"}),t.jsx("input",{type:"text",name:"returnAddress",value:i.returnAddress,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Emergency Contact"}),t.jsx("input",{type:"text",name:"emergencyContact",value:i.emergencyContact,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Emergency Contact Relation"}),t.jsx("input",{type:"text",name:"emergencyContactRelation",value:i.emergencyContactRelation,onChange:T,className:"w-full px-3 py-2 border rounded"})]})]}),e==="skills"&&t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Add Skill"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-2",children:[t.jsx("input",{type:"date",placeholder:"From",value:w.from,onChange:I=>A({...w,from:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"date",placeholder:"To",value:w.to,onChange:I=>A({...w,to:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Degree",value:w.degree,onChange:I=>A({...w,degree:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Institute",value:w.institute,onChange:I=>A({...w,institute:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Duration",value:w.duration,onChange:I=>A({...w,duration:I.target.value}),className:"px-3 py-2 border rounded"})]}),t.jsx("button",{onClick:z,className:"mt-2 px-4 py-2 bg-blue-600 text-white rounded",children:"Add Skill"})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Skills"}),t.jsx("div",{className:"space-y-2",children:i.skills.map((I,P)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-50 p-2 rounded",children:[t.jsxs("span",{children:[I.degree," - ",I.institute," - From:"," ",I.from," - To: ",I.to," - Duration:"," ",I.duration]}),t.jsx("button",{onClick:()=>$(P),className:"text-red-500 hover:text-red-700",children:"Remove"})]},P))})]})]}),e==="status"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Have you ever convicted in police case in the court of law"}),t.jsxs("select",{name:"convicted",value:i.convicted,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select"}),t.jsx("option",{value:"Yes",children:"Yes"}),t.jsx("option",{value:"No",children:"No"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Do you have affiliation/membership with any political/religious party"}),t.jsxs("select",{name:"politicalAffiliation",value:i.politicalAffiliation,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select"}),t.jsx("option",{value:"Yes",children:"Yes"}),t.jsx("option",{value:"No",children:"No"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Present Employment"}),t.jsx("input",{type:"text",name:"presentEmployment",value:i.presentEmployment,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Achievements"}),t.jsx("textarea",{name:"achievements",value:i.achievements,onChange:T,rows:"4",className:"w-full px-3 py-2 border rounded"})]})]}),e==="dependents"&&t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Add Dependent"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[t.jsxs("select",{value:S.dependent,onChange:I=>g({...S,dependent:I.target.value}),className:"px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Dependent"}),t.jsx("option",{value:"mother",children:"Mother"}),t.jsx("option",{value:"father",children:"Father"}),t.jsx("option",{value:"wife",children:"Wife"}),t.jsx("option",{value:"brother",children:"Brother"}),t.jsx("option",{value:"children",children:"Children"}),t.jsx("option",{value:"sisters",children:"Sisters"})]}),t.jsx("input",{type:"text",placeholder:"Gender",value:S.gender,onChange:I=>g({...S,gender:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"number",placeholder:"Age",value:S.age,onChange:I=>g({...S,age:I.target.value}),className:"px-3 py-2 border rounded"})]}),t.jsx("button",{onClick:Z,className:"mt-2 px-4 py-2 bg-blue-600 text-white rounded",children:"Add Dependent"})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Dependents"}),t.jsx("div",{className:"space-y-2",children:i.dependents.map((I,P)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-50 p-2 rounded",children:[t.jsxs("span",{children:[I.dependent," - ",I.gender," - Age:"," ",I.age]}),t.jsx("button",{onClick:()=>fe(P),className:"text-red-500 hover:text-red-700",children:"Remove"})]},P))})]})]}),e==="education"&&t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Add Education"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-2",children:[t.jsx("input",{type:"date",placeholder:"From",value:C.from,onChange:I=>k({...C,from:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"date",placeholder:"To",value:C.to,onChange:I=>k({...C,to:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Degree",value:C.degree,onChange:I=>k({...C,degree:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Institute",value:C.institute,onChange:I=>k({...C,institute:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Duration",value:C.duration,onChange:I=>k({...C,duration:I.target.value}),className:"px-3 py-2 border rounded"})]}),t.jsx("button",{onClick:se,className:"mt-2 px-4 py-2 bg-blue-600 text-white rounded",children:"Add Education"})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Education"}),t.jsx("div",{className:"space-y-2",children:i.educations.map((I,P)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-50 p-2 rounded",children:[t.jsxs("span",{children:[I.degree," - ",I.institute," - From: ",I.from," - To: ",I.to," - Duration: ",I.duration]}),t.jsx("button",{onClick:()=>ie(P),className:"text-red-500 hover:text-red-700",children:"Remove"})]},P))})]})]}),e==="resumes"&&t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Resume Name"}),t.jsx("input",{type:"text",value:O,onChange:I=>D(I.target.value),placeholder:"Enter resume name",className:"w-full px-3 py-2 border rounded"})]}),t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Upload Resumes"}),t.jsx("input",{type:"file",multiple:!0,onChange:R,className:"w-full px-3 py-2 border rounded"}),t.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Drag & drop files here …"}),t.jsxs("div",{className:"mt-4",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Resumes"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Action"})]})}),t.jsx("tbody",{children:i.resumes.length>0?i.resumes.map((I,P)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border px-4 py-2",children:I.name}),t.jsx("td",{className:"border px-4 py-2",children:t.jsx("button",{onClick:()=>{o({...i,resumes:i.resumes.filter((H,ee)=>ee!==P)})},className:"text-red-500 hover:text-red-700",children:"×"})})]},P)):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border px-4 py-8 text-center text-gray-500",children:"No resumes uploaded"})})})]})})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mt-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:"text-lg font-semibold",children:"Candidates"}),t.jsx("button",{onClick:()=>{n(!0),a("addEdit"),v(null),o({username:"",candidateType:"",title:"",firstName:"",lastName:"",cnic:"",fatherName:"",gender:"",dateOfBirth:"",age:"",placeOfBirth:"",nationality:"",password:"",religion:"",wages:"",maritalStatus:"",education:"",profession:"",experience:"",jobType:"",jobAppliedFor:"",plan:"",passportNumber:"",passportIssueDate:"",passportExpiryDate:"",passportIssuePlace:"",address:"",city:"",state:"",country:"",postalCode:"",mobile:"",email:"",emergencyContact:"",emergencyContactRelation:"",skills:[],currentStatus:"",statusDate:"",dependents:[],resumes:[]})},className:"px-4 py-2 bg-green-600 text-white rounded",children:"New"})]}),t.jsx("input",{type:"text",placeholder:"Search by name or email...",value:p,onChange:I=>x(I.target.value),className:"w-full px-3 py-2 border rounded mb-4"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border px-4 py-2 text-left",children:"#"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Email"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:U.length>0?U.map((I,P)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border px-4 py-2",children:P+1}),t.jsx("td",{className:"border px-4 py-2",children:I.name}),t.jsx("td",{className:"border px-4 py-2",children:I.email}),t.jsx("td",{className:"border px-4 py-2",children:I.contact}),t.jsx("td",{className:"border px-4 py-2",children:t.jsx("button",{onClick:()=>ce(I),className:"px-2 py-1 bg-yellow-500 text-white rounded",children:"Edit"})})]},I._id||P)):t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border px-4 py-8 text-center text-gray-500",children:"No data available"})})})]})})]})]})]})},lX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState({name:"",cnic:"",qualification:"",mobile:""}),[j,v]=b.useState(""),w=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Apply Job"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Add/Edit Detail"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employers *"}),t.jsx("select",{value:e,onChange:A=>a(A.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Title *"}),t.jsx("select",{value:r,onChange:A=>n(A.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Title"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Categories *"}),t.jsx("select",{value:i,onChange:A=>o(A.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Category"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"All Candidates"}),t.jsx("select",{value:c,onChange:A=>m(A.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsx("select",{value:u,onChange:A=>h(A.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Candidate Info"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),t.jsx("input",{type:"text",value:p.name,onChange:A=>x({...p,name:A.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"CNIC"}),t.jsx("input",{type:"text",value:p.cnic,onChange:A=>x({...p,cnic:A.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Qualification"}),t.jsx("input",{type:"text",value:p.qualification,onChange:A=>x({...p,qualification:A.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile"}),t.jsx("input",{type:"text",value:p.mobile,onChange:A=>x({...p,mobile:A.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Applied Job Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:j,onChange:A=>v(A.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"umer.aziz"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Principle Company"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"})]})}),t.jsx("tbody",{children:w.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):w.map((A,S)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:A.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:A.principleCompany}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:A.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:A.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:A.name}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:A.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:A.applicationDate})]},S))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})]})},iX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(!1),[u,h]=b.useState("Dear {Name} congratulations upon shortlisting of your job application for the post of {JobPosition}."),p=[],x=()=>{console.log("Sending email...")},j=()=>{console.log("Sending SMS...")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Short Listing"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Short List Candidate by Job"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employers *"}),t.jsx("select",{value:e,onChange:v=>a(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Title *"}),t.jsx("select",{value:r,onChange:v=>n(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Title"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Categories *"}),t.jsx("select",{value:i,onChange:v=>o(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Category"})})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Short Listed Candidate"}),t.jsxs("div",{className:"flex items-center mb-4",children:[t.jsx("input",{type:"checkbox",id:"showPlaceholders",checked:c,onChange:v=>m(v.target.checked),className:"mr-2"}),t.jsx("label",{htmlFor:"showPlaceholders",className:"text-sm font-medium text-gray-700",children:"Show/Hide Place Holders"})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message:"}),t.jsx("textarea",{value:u,onChange:v=>h(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:"3"})]}),t.jsxs("div",{className:"flex gap-4 mb-6",children:[t.jsx("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Send Email"}),t.jsx("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500",children:"Send SMS"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:"flex justify-between items-center mb-4",children:t.jsx("div",{className:"text-sm text-gray-600",children:"All"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Qualification"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"City"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Email"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Address"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Experience"})]})}),t.jsx("tbody",{children:p.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):p.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.name}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.qualification}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.city}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.email}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.address}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.experience})]},w))})]})})]})]})]})]})},oX=()=>{const[e,a]=b.useState(""),r=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Short Listed Candidates"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Short Listed Candidates Details"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:e,onChange:n=>a(n.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"umer.aziz"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile #"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Address"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Employer"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"})]})}),t.jsx("tbody",{children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):r.map((n,i)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.address}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.employer}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.jobTitle})]},i))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})},cX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),u=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Online Applications"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Manage Online Applications"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer:"}),t.jsx("select",{value:e,onChange:h=>a(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job:"}),t.jsx("select",{value:r,onChange:h=>n(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate:"}),t.jsx("select",{value:i,onChange:h=>o(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]})]}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:h=>m(h.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:""})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Principle Company"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"})]})}),t.jsx("tbody",{children:u.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):u.map((h,p)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.principleCompany}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.name}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.applicationDate})]},p))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})},dX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState(""),[j,v]=b.useState({name:"",cnic:"",qualification:"",mobile:""}),[w,A]=b.useState(""),S=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Job Applications"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Add/Edit Detail"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employers *"}),t.jsx("select",{value:e,onChange:g=>a(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Title *"}),t.jsx("select",{value:r,onChange:g=>n(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Title"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Categories *"}),t.jsx("select",{value:i,onChange:g=>o(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Category"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"All Candidates"}),t.jsx("select",{value:c,onChange:g=>m(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsx("select",{value:u,onChange:g=>h(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Agent *"}),t.jsx("select",{value:p,onChange:g=>x(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Agent"})})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Candidate Info"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),t.jsx("input",{type:"text",value:j.name,onChange:g=>v({...j,name:g.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"CNIC"}),t.jsx("input",{type:"text",value:j.cnic,onChange:g=>v({...j,cnic:g.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Qualification"}),t.jsx("input",{type:"text",value:j.qualification,onChange:g=>v({...j,qualification:g.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile"}),t.jsx("input",{type:"text",value:j.mobile,onChange:g=>v({...j,mobile:g.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Job Candidates Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:w,onChange:g=>A(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"umer.aziz"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Salary"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Company Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Status"})]})}),t.jsx("tbody",{children:S.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):S.map((g,C)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.salary}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.companyName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.applicationDate}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.status})]},C))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})]})},uX=()=>{const[e,a]=b.useState(""),r=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Freez Applications"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Freez Applications Details"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:e,onChange:n=>a(n.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:""})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Salary"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Company Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Status"})]})}),t.jsx("tbody",{children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):r.map((n,i)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.salary}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.companyName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.applicationDate}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.status})]},i))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})},mX=()=>{const[e,a]=b.useState(""),r=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Completed Applications"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Completed Applications Details"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:e,onChange:n=>a(n.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:""})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Salary"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Company Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Status"})]})}),t.jsx("tbody",{children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):r.map((n,i)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.salary}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.companyName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.applicationDate}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.status})]},i))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})},fX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),u=()=>{alert("Show Applicants clicked")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Interview Schedules"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer: *"}),t.jsx("select",{value:e,onChange:h=>a(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job: *"}),t.jsx("select",{value:r,onChange:h=>n(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Category: *"}),t.jsx("select",{value:i,onChange:h=>o(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Category"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Filter Type: *"}),t.jsx("select",{value:c,onChange:h=>m(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Filter Type"})})]})]}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Interview Schedules"}),t.jsx("button",{onClick:u,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Show Applicants"})]})]})]})},pX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),c=()=>{alert("Load Data clicked")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Bulk Application Maker"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer: *"}),t.jsx("select",{value:e,onChange:m=>a(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job: *"}),t.jsx("select",{value:r,onChange:m=>n(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Category: *"}),t.jsx("select",{value:i,onChange:m=>o(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Category"})})]})]}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Bulk Application Maker"}),t.jsx("button",{onClick:c,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Load Data"})]})]})]})},hX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),c=()=>{alert("Show Applicants clicked")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Bulk Offer Sender"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer: *"}),t.jsx("select",{value:e,onChange:m=>a(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job: *"}),t.jsx("select",{value:r,onChange:m=>n(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Category: *"}),t.jsx("select",{value:i,onChange:m=>o(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Category"})})]})]}),t.jsx("button",{onClick:c,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Show Applicants"})]})]})]})},xX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),i=()=>{alert("Load Flights clicked")},o=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Flight Cancellation"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer:"}),t.jsx("select",{value:e,onChange:c=>a(c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job:"}),t.jsx("select",{value:r,onChange:c=>n(c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]})]}),t.jsx("button",{onClick:i,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 mb-6",children:"Load Flights"}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Short Listed Candidates"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Address"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Employer"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"})]})}),t.jsx("tbody",{children:o.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):o.map((c,m)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.address}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.employer}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.jobTitle})]},m))})]})})]})]})]})},gX=()=>{const[e,a]=b.useState(""),r=[],n=[{particulars:"Ledger",amount:0},{particulars:"Expenses",amount:0}],i=n.reduce((o,c)=>o+c.amount,0);return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Passenger Ledger"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"mb-6",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passenger"}),t.jsx("select",{value:e,onChange:o=>a(o.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Passenger"})})]}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Data"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passenger:"}),t.jsx("input",{type:"text",value:e,readOnly:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md bg-gray-100"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Agent:"}),t.jsx("input",{type:"text",value:"",readOnly:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md bg-gray-100"})]})]}),t.jsx("div",{className:"overflow-x-auto mb-6",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Vou. Type"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Vou#"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Particulars"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Debit"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Credit"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Balance"})]})}),t.jsx("tbody",{children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):r.map((o,c)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.date}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.vouType}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.vouNumber}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.particulars}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.debit}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.credit}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.balance})]},c))})]})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Particulars"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Amount"})]})}),t.jsxs("tbody",{children:[n.map((o,c)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.particulars}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.amount})]},c)),t.jsxs("tr",{className:"bg-gray-100 font-semibold",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:"Total Profit:"}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:i})]})]})]})})]})]})]})},bX=()=>{const[e,a]=b.useState("2025-07-01"),[r,n]=b.useState("2025-11-03"),i=()=>{alert("Print clicked")},o=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"File Passenger Summary"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",value:e,onChange:c=>a(c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",value:r,onChange:c=>n(c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("button",{onClick:i,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 mb-6",children:"Print"}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Data"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"File"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Passenger Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Father Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Passport"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Agent"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Receivable"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Received"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Ledger Balance"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Last Ledger Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Expenses"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Last Expenses"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Gross Income"})]})}),t.jsx("tbody",{children:o.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"12",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):o.map((c,m)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.file}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.passengerName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.fatherName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.passport}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.agent}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.receivable}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.received}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.ledgerBalance}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.lastLedgerDate}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.expenses}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.lastExpenses}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.grossIncome})]},m))})]})})]})]})]})},yX=()=>{const[e,a]=b.useState("2025-07-01"),[r,n]=b.useState("2025-11-03"),[i,o]=b.useState(""),c=()=>{alert("Print clicked")},m=()=>{alert("Show Reports clicked")},u=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Recruitment Agent Ledger"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",value:e,onChange:h=>a(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",value:r,onChange:h=>n(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Agent"}),t.jsx("select",{value:i,onChange:h=>o(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Agent"})})]})]}),t.jsxs("div",{className:"flex gap-4 mb-6",children:[t.jsx("button",{onClick:c,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Print"}),t.jsx("button",{onClick:m,className:"px-4 py-2 bg-green-500 text-white rounded-md hover:bg-green-600 focus:outline-none focus:ring-2 focus:ring-green-500",children:"Show Reports"})]}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Data"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Vou.Type"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Vou#"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Passport/Chq"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Passenger"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Trade"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Status"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Debit"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Credit"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Balance"})]})}),t.jsx("tbody",{children:u.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"10",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):u.map((h,p)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.date}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.vouType}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.vouNumber}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.passportChq}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.passenger}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.trade}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.status}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.debit}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.credit}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.balance})]},p))})]})})]})]})]})},vX="/components_logo.png",jX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState({}),c=bs(),m=Dn(),{loading:u,error:h,success:p,user:x}=br(w=>w.user),j=()=>{const w={};return e?/\S+@\S+\.\S+/.test(e)||(w.email="Invalid email format"):w.email="Email is required",r?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(r)||(w.password="Password must be at least 8 characters, including uppercase, lowercase, number, and special character"):w.password="Password is required",o(w),Object.keys(w).length===0},v=async w=>{if(w.preventDefault(),!j())return;c(hs());const A=await c(qo({email:e,password:r}));if(qo.fulfilled.match(A)){a(""),n("");try{const C=(((await c(el()).unwrap()).user||A.payload?.user||x)?.permittedPages||[]).map(D=>(D||"").toLowerCase()),O=["/expense","/candidates-cv","/candidate","/deposit-slip","/contract-letter","/undertaking-letter","/nbpchallan","/visa-form","/allied-form","/dashboard"].find(D=>C.includes(D))||"/dashboard";m(O)}catch{m("/dashboard")}}};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:vX,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Login"}),h&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:h}),p&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:p}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:w=>a(w.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your email",disabled:u}),i.email&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:i.email})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Password"}),t.jsx("input",{type:"password",value:r,onChange:w=>n(w.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your password",disabled:u}),i.password&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:i.password})]}),t.jsx("button",{onClick:v,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:u,children:u?"Logging in...":"Login"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Don't have an account?"," ",t.jsx("button",{type:"button",onClick:()=>m("/signup"),className:"text-green-600 hover:underline font-medium",disabled:u,children:"Sign Up"})]}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Forgot password?"," ",t.jsx("button",{type:"button",onClick:()=>m("/forgot-password"),className:"text-green-600 hover:underline font-medium",disabled:u,children:"Reset Password"})]})]})]})})},NX="/components_logo.png",wX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState({}),u=bs(),h=Dn(),{loading:p,error:x,success:j}=br(A=>A.user),v=()=>{const A={};return e||(A.name="Full name is required"),r?/\S+@\S+\.\S+/.test(r)||(A.email="Invalid email format"):A.email="Email is required",i?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(i)||(A.password="Password must be at least 8 characters, including uppercase, lowercase, number, and special character"):A.password="Password is required",m(A),Object.keys(A).length===0},w=async A=>{if(A.preventDefault(),!v())return;u(hs());const S=await u(Ho({username:e,email:r,password:i}));Ho.fulfilled.match(S)&&(a(""),n(""),o(""),h("/verify-otp"))};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:NX,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Sign Up"}),x&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:x}),j&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:j}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Full Name"}),t.jsx("input",{type:"text",value:e,onChange:A=>a(A.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your full name",disabled:p}),c.name&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.name})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Email"}),t.jsx("input",{type:"email",value:r,onChange:A=>n(A.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your email",disabled:p}),c.email&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.email})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Password"}),t.jsx("input",{type:"password",value:i,onChange:A=>o(A.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your password",disabled:p}),c.password&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.password})]}),t.jsx("button",{onClick:w,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:p,children:p?"Signing up...":"Sign Up"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Already have an account?"," ",t.jsx("button",{type:"button",onClick:()=>h("/login"),className:"text-green-600 hover:underline font-medium",disabled:p,children:"Login"})]})]})]})})},SX="/components_logo.png",AX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState({}),i=bs(),o=Dn(),{loading:c,error:m,success:u}=br(j=>j.user),h=()=>{const j={};return e||(j.otp="OTP is required"),n(j),Object.keys(j).length===0},p=async j=>{if(j.preventDefault(),!h())return;i(hs());const v=await i(Vo(e));Vo.fulfilled.match(v)&&(a(""),o("/dashboard"))},x=async()=>{i(hs()),await i(bu())};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:SX,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Verify OTP"}),m&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:m}),u&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"OTP"}),t.jsx("input",{type:"text",value:e,onChange:j=>a(j.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter OTP",disabled:c}),r.otp&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:r.otp})]}),t.jsx("button",{onClick:p,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:c,children:c?"Verifying...":"Verify OTP"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Didn't receive OTP?"," ",t.jsx("button",{type:"button",onClick:x,className:"text-green-600 hover:underline font-medium",disabled:c,children:"Resend OTP"})]}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Back to"," ",t.jsx("button",{type:"button",onClick:()=>o("/login"),className:"text-green-600 hover:underline font-medium",disabled:c,children:"Login"})]})]})]})})},CX="/components_logo.png",kX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState({}),i=bs(),o=Dn(),{loading:c,error:m,success:u}=br(x=>x.user),h=()=>{const x={};return e?/\S+@\S+\.\S+/.test(e)||(x.email="Invalid email format"):x.email="Email is required",n(x),Object.keys(x).length===0},p=async x=>{if(x.preventDefault(),!h())return;i(hs());const j=await i(Yo(e));Yo.fulfilled.match(j)&&(a(""),o("/reset-password"))};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:CX,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Forgot Password"}),m&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:m}),u&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:x=>a(x.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your email",disabled:c}),r.email&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:r.email})]}),t.jsx("button",{onClick:p,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:c,children:c?"Sending OTP...":"Send OTP"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Back to"," ",t.jsx("button",{type:"button",onClick:()=>o("/login"),className:"text-green-600 hover:underline font-medium",disabled:c,children:"Login"})]})]})]})})},EX="/components_logo.png",OX=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState({}),u=bs(),h=Dn(),{loading:p,error:x,success:j}=br(A=>A.user),v=()=>{const A={};return e?/\S+@\S+\.\S+/.test(e)||(A.email="Invalid email format"):A.email="Email is required",r||(A.otp="OTP is required"),i?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(i)||(A.newPassword="New password must be at least 8 characters, including uppercase, lowercase, number, and special character"):A.newPassword="New password is required",m(A),Object.keys(A).length===0},w=async A=>{if(A.preventDefault(),!v())return;u(hs());const S=await u(Ko({email:e,otp:r,newPassword:i}));Ko.fulfilled.match(S)&&(a(""),n(""),o(""),h("/login"))};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:EX,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Reset Password"}),x&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:x}),j&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:j}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:A=>a(A.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your email",disabled:p}),c.email&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.email})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"OTP"}),t.jsx("input",{type:"text",value:r,onChange:A=>n(A.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter OTP",disabled:p}),c.otp&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.otp})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"New Password"}),t.jsx("input",{type:"password",value:i,onChange:A=>o(A.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter new password",disabled:p}),c.newPassword&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.newPassword})]}),t.jsx("button",{onClick:w,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:p,children:p?"Resetting...":"Reset Password"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Back to"," ",t.jsx("button",{type:"button",onClick:()=>h("/login"),className:"text-green-600 hover:underline font-medium",disabled:p,children:"Login"})]})]})]})})},be=({children:e})=>{const a=yr(),r=["/login","/signup","/verify-otp","/forgot-password","/reset-password"];return t.jsxs(t.Fragment,{children:[!r.includes(a.pathname)&&t.jsx(dM,{}),e]})};function DX(){const e=bs(),{isAuthenticated:a,loading:r,error:n}=br(m=>m.user),[i,o]=b.useState(!1);b.useEffect(()=>{(async()=>{let u=localStorage.getItem("token");console.log("Checking auth, token:",u?"present":"missing"),u||(u="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4ZWY0NGNhNzQ3YWJmYjA5OGZlYjRjZSIsImVtYWlsIjoiYWhhZHF1cmVzaGkxNjc1NkBnbWFpbC5jb20iLCJ1c2VybmFtZSI6ImFoYWQiLCJyb2xlIjoic3VwZXJhZG1pbiIsImlhdCI6MTc2MTg5NjQ0NywiZXhwIjoxNzYzMTkyNDQ3fQ.dZcyWdxwSSk7Ndgn_x4HxB4FNXClPBL_uCyrGEiHNkk",localStorage.setItem("token",u),console.log("Set fallback token"));try{await e(el()).unwrap(),console.log("getAuthUser successful, isAuthenticated:",a)}catch(h){console.error("getAuthUser failed:",h)}o(!0)})()},[e]);const c=({children:m})=>{if(!i)return console.log("Auth not checked yet, waiting..."),t.jsx("div",{children:"Loading..."});console.log("ProtectedRoute check, isAuthenticated:",a);const u=localStorage.getItem("token");return a||u?m:t.jsx($h,{to:"/login"})};return t.jsx(t7,{children:i?t.jsxs(t.Fragment,{children:[n&&t.jsx("div",{className:"fixed top-0 w-full bg-red-600 text-white text-center p-2",children:n}),t.jsx(Z7,{position:"top-right"}),t.jsxs(R_,{children:[t.jsx(ge,{path:"/login",element:t.jsx(be,{children:t.jsx(jX,{})})}),t.jsx(ge,{path:"/signup",element:t.jsx(be,{children:t.jsx(wX,{})})}),t.jsx(ge,{path:"/verify-otp",element:t.jsx(be,{children:t.jsx(AX,{})})}),t.jsx(ge,{path:"/forgot-password",element:t.jsx(be,{children:t.jsx(kX,{})})}),t.jsx(ge,{path:"/reset-password",element:t.jsx(be,{children:t.jsx(OX,{})})}),t.jsx(ge,{path:"/dashboard",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(AM,{})})})}),t.jsx(ge,{path:"/sidebar",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(Rr,{})})})}),t.jsx(ge,{path:"/candidate",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(CM,{})})})}),t.jsx(ge,{path:"/deposit-slip",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(kM,{})})})}),t.jsx(ge,{path:"/candidates-cv",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(DM,{})})})}),t.jsx(ge,{path:"/contract-letter",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(TM,{})})})}),t.jsx(ge,{path:"/undertaking-letter",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(RM,{})})})}),t.jsx(ge,{path:"/nbpchallan",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(PM,{})})})}),t.jsx(ge,{path:"/visa-form",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(MM,{})})})}),t.jsx(ge,{path:"/allied-form",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(LM,{})})})}),t.jsx(ge,{path:"/expense",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(GG,{})})})}),t.jsx(ge,{path:"/super-admin",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(eJ,{})})})}),t.jsx(ge,{path:"/admin/config/add-payment-agent",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(eW,{})})})}),t.jsx(ge,{path:"/admin/config/add-recruitment-agent",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(tW,{})})})}),t.jsx(ge,{path:"/admin/config/add-travel-agent",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(aW,{})})})}),t.jsx(ge,{path:"/admin/config/visa-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(rW,{})})})}),t.jsx(ge,{path:"/admin/config/visa-issuing-authorities",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(nW,{})})})}),t.jsx(ge,{path:"/admin/config/verifying-institutions",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(sW,{})})})}),t.jsx(ge,{path:"/admin/config/add-test-center",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(lW,{})})})}),t.jsx(ge,{path:"/admin/config/add-medical-centers",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(iW,{})})})}),t.jsx(ge,{path:"/admin/config/test-types",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(oW,{})})})}),t.jsx(ge,{path:"/admin/config/age-ranges",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(cW,{})})})}),t.jsx(ge,{path:"/admin/config/salary-ranges",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(dW,{})})})}),t.jsx(ge,{path:"/admin/config/experience-ranges",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(uW,{})})})}),t.jsx(ge,{path:"/admin/config/airlines",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(mW,{})})})}),t.jsx(ge,{path:"/admin/config/visa-professions",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(fW,{})})})}),t.jsx(ge,{path:"/admin/config/working-sectors",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(pW,{})})})}),t.jsx(ge,{path:"/admin/config/cities",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(hW,{})})})}),t.jsx(ge,{path:"/admin/config/education-level",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(xW,{})})})}),t.jsx(ge,{path:"/admin/config/career-level",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(gW,{})})})}),t.jsx(ge,{path:"/admin/skills",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(bW,{})})})}),t.jsx(ge,{path:"/admin/manage-users",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(jW,{})})})}),t.jsx(ge,{path:"/admin/manage-role",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(SW,{})})})}),t.jsx(ge,{path:"/admin/user-log-report",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(AW,{})})})}),t.jsx(ge,{path:"/admin/config/education-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(CW,{})})})}),t.jsx(ge,{path:"/admin/config/job-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(kW,{})})})}),t.jsx(ge,{path:"/admin/config/sub-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(EW,{})})})}),t.jsx(ge,{path:"/admin/config/working-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(OW,{})})})}),t.jsx(ge,{path:"/admin/accounting/chart-of-accounts",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(DW,{})})})}),t.jsx(ge,{path:"/admin/accounting/chart-of-accounts-balances",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(TW,{})})})}),t.jsx(ge,{path:"/admin/accounting/cash-book",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(RW,{})})})}),t.jsx(ge,{path:"/admin/accounting/bank-book",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(PW,{})})})}),t.jsx(ge,{path:"/admin/accounting/opening-balance",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(_W,{})})})}),t.jsx(ge,{path:"/admin/accounting/cash-receipt",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(MW,{})})})}),t.jsx(ge,{path:"/admin/accounting/cash-payment",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(zW,{})})})}),t.jsx(ge,{path:"/admin/accounting/bank-receipt",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(LW,{})})})}),t.jsx(ge,{path:"/admin/accounting/bank-payment",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(BW,{})})})}),t.jsx(ge,{path:"/admin/accounting/jv",element:t.jsx(be,{children:t.jsx(IW,{})})}),t.jsx(ge,{path:"/admin/accounting/job-payment",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(FW,{})})})}),t.jsx(ge,{path:"/admin/accounting/travel-agent-payment",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx($W,{})})})}),t.jsx(ge,{path:"/admin/accounting/candidate-receipt",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(UW,{})})})}),t.jsx(ge,{path:"/admin/accounting/candidate-jv",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(qW,{})})})}),t.jsx(ge,{path:"/admin/accounting/expenses-against-candidate",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(HW,{})})})}),t.jsx(ge,{path:"/admin/accounting/general-ledger",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(c3,{})})})}),t.jsx(ge,{path:"/admin/accounting/trial-balance",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(c3,{})})})}),t.jsx(ge,{path:"/admin/accounting/account-balances",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(VW,{})})})}),t.jsx(ge,{path:"/admin/accounting/income-statement",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(YW,{})})})}),t.jsx(ge,{path:"/admin/accounting/balance-sheet",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(KW,{})})})}),t.jsx(ge,{path:"/admin/accounting/cash-flow-statement",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(GW,{})})})}),t.jsx(ge,{path:"/admin/accounting/equity-report",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(JW,{})})})}),t.jsx(ge,{path:"/admin/employer-management/employer-setup",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(WW,{})})})}),t.jsx(ge,{path:"/admin/employer-management/employer-plans",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(XW,{})})})}),t.jsx(ge,{path:"/admin/employer-management/job-setup",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(ZW,{})})})}),t.jsx(ge,{path:"/admin/employer-management/employer-ledger",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(QW,{})})})}),t.jsx(ge,{path:"/admin/employer-management/job-grouping-prints",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(eX,{})})})}),t.jsx(ge,{path:"/admin/employer-management/status-jobs-report",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(tX,{})})})}),t.jsx(ge,{path:"/admin/employer-management/security-fee-refund-prints",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(aX,{})})})}),t.jsx(ge,{path:"/admin/employer-management/travel-agent-ledger",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(rX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/initial-registration",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(nX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/apply-job",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(lX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/shortlisting",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(iX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/shortlisted-candidates",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(oX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/online-applications",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(cX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/job-applications",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(dX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/freeze-applications",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(uX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/completed-applications",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(mX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/interview-schedule",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(fX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/bulk-application-maker",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(pX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/bulk-offer-sender",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(hX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/bulk-flight-cancel",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(xX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/candidate-ledger-expenses",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(gX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/candidate-ledger-summary",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(bX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/candidate-agent-ledger",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(yX,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/candidate-final-registration",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(sX,{})})})}),t.jsx(ge,{path:"/",element:t.jsx($h,{to:"/login"})}),t.jsx(ge,{path:"*",element:t.jsx($h,{to:"/login"})})]})]}):t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:t.jsx("div",{className:"text-xl font-semibold text-gray-700",children:"Loading..."})})})}const TX=OT.createRoot(document.getElementById("root"));TX.render(t.jsx(pr.StrictMode,{children:t.jsx(u3,{store:UP,children:t.jsx(DX,{})})}));