@samanhappy/mcphub 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +24 -0
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/server.js +27 -1
- package/dist/server.js.map +1 -1
- package/frontend/dist/assets/favicon-DKeT5aEu.ico +0 -0
- package/frontend/dist/assets/index-BYmTZOyw.css +1 -0
- package/frontend/dist/assets/index-D7dQ4HtK.js +120 -0
- package/frontend/dist/index.html +14 -0
- package/package.json +40 -31
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function a(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(l){if(l.ep)return;l.ep=!0;const s=a(l);fetch(l.href,s)}})();function nd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ld={exports:{}},jr={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Qg=Symbol.for("react.transitional.element"),Kg=Symbol.for("react.fragment");function sd(e,t,a){var n=null;if(a!==void 0&&(n=""+a),t.key!==void 0&&(n=""+t.key),"key"in t){a={};for(var l in t)l!=="key"&&(a[l]=t[l])}else a=t;return t=a.ref,{$$typeof:Qg,type:e,key:n,ref:t!==void 0?t:null,props:a}}jr.Fragment=Kg;jr.jsx=sd;jr.jsxs=sd;ld.exports=jr;var u=ld.exports,rd={exports:{}},Y={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var _o=Symbol.for("react.transitional.element"),Zg=Symbol.for("react.portal"),Jg=Symbol.for("react.fragment"),Fg=Symbol.for("react.strict_mode"),Pg=Symbol.for("react.profiler"),Wg=Symbol.for("react.consumer"),Ig=Symbol.for("react.context"),ep=Symbol.for("react.forward_ref"),tp=Symbol.for("react.suspense"),ap=Symbol.for("react.memo"),id=Symbol.for("react.lazy"),Wu=Symbol.iterator;function np(e){return e===null||typeof e!="object"?null:(e=Wu&&e[Wu]||e["@@iterator"],typeof e=="function"?e:null)}var od={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ud=Object.assign,cd={};function Un(e,t,a){this.props=e,this.context=t,this.refs=cd,this.updater=a||od}Un.prototype.isReactComponent={};Un.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Un.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fd(){}fd.prototype=Un.prototype;function Ho(e,t,a){this.props=e,this.context=t,this.refs=cd,this.updater=a||od}var Bo=Ho.prototype=new fd;Bo.constructor=Ho;ud(Bo,Un.prototype);Bo.isPureReactComponent=!0;var Iu=Array.isArray,fe={H:null,A:null,T:null,S:null,V:null},dd=Object.prototype.hasOwnProperty;function Go(e,t,a,n,l,s){return a=s.ref,{$$typeof:_o,type:e,key:t,ref:a!==void 0?a:null,props:s}}function lp(e,t){return Go(e.type,t,void 0,void 0,void 0,e.props)}function qo(e){return typeof e=="object"&&e!==null&&e.$$typeof===_o}function sp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var ec=/\/+/g;function Qr(e,t){return typeof e=="object"&&e!==null&&e.key!=null?sp(""+e.key):t.toString(36)}function tc(){}function rp(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(tc,tc):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ia(e,t,a,n,l){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var r=!1;if(e===null)r=!0;else switch(s){case"bigint":case"string":case"number":r=!0;break;case"object":switch(e.$$typeof){case _o:case Zg:r=!0;break;case id:return r=e._init,Ia(r(e._payload),t,a,n,l)}}if(r)return l=l(e),r=n===""?"."+Qr(e,0):n,Iu(l)?(a="",r!=null&&(a=r.replace(ec,"$&/")+"/"),Ia(l,t,a,"",function(c){return c})):l!=null&&(qo(l)&&(l=lp(l,a+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(ec,"$&/")+"/")+r)),t.push(l)),1;r=0;var i=n===""?".":n+":";if(Iu(e))for(var o=0;o<e.length;o++)n=e[o],s=i+Qr(n,o),r+=Ia(n,t,a,s,l);else if(o=np(e),typeof o=="function")for(e=o.call(e),o=0;!(n=e.next()).done;)n=n.value,s=i+Qr(n,o++),r+=Ia(n,t,a,s,l);else if(s==="object"){if(typeof e.then=="function")return Ia(rp(e),t,a,n,l);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return r}function cs(e,t,a){if(e==null)return e;var n=[],l=0;return Ia(e,n,"","",function(s){return t.call(a,s,l++)}),n}function ip(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a)},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ac=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function op(){}Y.Children={map:cs,forEach:function(e,t,a){cs(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return cs(e,function(){t++}),t},toArray:function(e){return cs(e,function(t){return t})||[]},only:function(e){if(!qo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=Un;Y.Fragment=Jg;Y.Profiler=Pg;Y.PureComponent=Ho;Y.StrictMode=Fg;Y.Suspense=tp;Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=fe;Y.__COMPILER_RUNTIME={__proto__:null,c:function(e){return fe.H.useMemoCache(e)}};Y.cache=function(e){return function(){return e.apply(null,arguments)}};Y.cloneElement=function(e,t,a){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=ud({},e.props),l=e.key,s=void 0;if(t!=null)for(r in t.ref!==void 0&&(s=void 0),t.key!==void 0&&(l=""+t.key),t)!dd.call(t,r)||r==="key"||r==="__self"||r==="__source"||r==="ref"&&t.ref===void 0||(n[r]=t[r]);var r=arguments.length-2;if(r===1)n.children=a;else if(1<r){for(var i=Array(r),o=0;o<r;o++)i[o]=arguments[o+2];n.children=i}return Go(e.type,l,void 0,void 0,s,n)};Y.createContext=function(e){return e={$$typeof:Ig,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Wg,_context:e},e};Y.createElement=function(e,t,a){var n,l={},s=null;if(t!=null)for(n in t.key!==void 0&&(s=""+t.key),t)dd.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(l[n]=t[n]);var r=arguments.length-2;if(r===1)l.children=a;else if(1<r){for(var i=Array(r),o=0;o<r;o++)i[o]=arguments[o+2];l.children=i}if(e&&e.defaultProps)for(n in r=e.defaultProps,r)l[n]===void 0&&(l[n]=r[n]);return Go(e,s,void 0,void 0,null,l)};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:ep,render:e}};Y.isValidElement=qo;Y.lazy=function(e){return{$$typeof:id,_payload:{_status:-1,_result:e},_init:ip}};Y.memo=function(e,t){return{$$typeof:ap,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=fe.T,a={};fe.T=a;try{var n=e(),l=fe.S;l!==null&&l(a,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(op,ac)}catch(s){ac(s)}finally{fe.T=t}};Y.unstable_useCacheRefresh=function(){return fe.H.useCacheRefresh()};Y.use=function(e){return fe.H.use(e)};Y.useActionState=function(e,t,a){return fe.H.useActionState(e,t,a)};Y.useCallback=function(e,t){return fe.H.useCallback(e,t)};Y.useContext=function(e){return fe.H.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e,t){return fe.H.useDeferredValue(e,t)};Y.useEffect=function(e,t,a){var n=fe.H;if(typeof a=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return n.useEffect(e,t)};Y.useId=function(){return fe.H.useId()};Y.useImperativeHandle=function(e,t,a){return fe.H.useImperativeHandle(e,t,a)};Y.useInsertionEffect=function(e,t){return fe.H.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return fe.H.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return fe.H.useMemo(e,t)};Y.useOptimistic=function(e,t){return fe.H.useOptimistic(e,t)};Y.useReducer=function(e,t,a){return fe.H.useReducer(e,t,a)};Y.useRef=function(e){return fe.H.useRef(e)};Y.useState=function(e){return fe.H.useState(e)};Y.useSyncExternalStore=function(e,t,a){return fe.H.useSyncExternalStore(e,t,a)};Y.useTransition=function(){return fe.H.useTransition()};Y.version="19.1.0";rd.exports=Y;var x=rd.exports;const hd=nd(x);var md={exports:{}},Er={},gd={exports:{}},pd={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(A,_){var k=A.length;A.push(_);e:for(;0<k;){var U=k-1>>>1,J=A[U];if(0<l(J,_))A[U]=_,A[k]=J,k=U;else break e}}function a(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var _=A[0],k=A.pop();if(k!==_){A[0]=k;e:for(var U=0,J=A.length,ze=J>>>1;U<ze;){var Me=2*(U+1)-1,F=A[Me],pe=Me+1,dt=A[pe];if(0>l(F,k))pe<J&&0>l(dt,F)?(A[U]=dt,A[pe]=k,U=pe):(A[U]=F,A[Me]=k,U=Me);else if(pe<J&&0>l(dt,k))A[U]=dt,A[pe]=k,U=pe;else break e}}return _}function l(A,_){var k=A.sortIndex-_.sortIndex;return k!==0?k:A.id-_.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var r=Date,i=r.now();e.unstable_now=function(){return r.now()-i}}var o=[],c=[],f=1,h=null,d=3,y=!1,S=!1,v=!1,w=!1,g=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;function b(A){for(var _=a(c);_!==null;){if(_.callback===null)n(c);else if(_.startTime<=A)n(c),_.sortIndex=_.expirationTime,t(o,_);else break;_=a(c)}}function j(A){if(v=!1,b(A),!S)if(a(o)!==null)S=!0,E||(E=!0,ee());else{var _=a(c);_!==null&&ie(j,_.startTime-A)}}var E=!1,N=-1,C=5,R=-1;function O(){return w?!0:!(e.unstable_now()-R<C)}function B(){if(w=!1,E){var A=e.unstable_now();R=A;var _=!0;try{e:{S=!1,v&&(v=!1,m(N),N=-1),y=!0;var k=d;try{t:{for(b(A),h=a(o);h!==null&&!(h.expirationTime>A&&O());){var U=h.callback;if(typeof U=="function"){h.callback=null,d=h.priorityLevel;var J=U(h.expirationTime<=A);if(A=e.unstable_now(),typeof J=="function"){h.callback=J,b(A),_=!0;break t}h===a(o)&&n(o),b(A)}else n(o);h=a(o)}if(h!==null)_=!0;else{var ze=a(c);ze!==null&&ie(j,ze.startTime-A),_=!1}}break e}finally{h=null,d=k,y=!1}_=void 0}}finally{_?ee():E=!1}}}var ee;if(typeof p=="function")ee=function(){p(B)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,Z=me.port2;me.port1.onmessage=B,ee=function(){Z.postMessage(null)}}else ee=function(){g(B,0)};function ie(A,_){N=g(function(){A(e.unstable_now())},_)}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(A){A.callback=null},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(A){switch(d){case 1:case 2:case 3:var _=3;break;default:_=d}var k=d;d=_;try{return A()}finally{d=k}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(A,_){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var k=d;d=A;try{return _()}finally{d=k}},e.unstable_scheduleCallback=function(A,_,k){var U=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?U+k:U):k=U,A){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=k+J,A={id:f++,callback:_,priorityLevel:A,startTime:k,expirationTime:J,sortIndex:-1},k>U?(A.sortIndex=k,t(c,A),a(o)===null&&A===a(c)&&(v?(m(N),N=-1):v=!0,ie(j,k-U))):(A.sortIndex=J,t(o,A),S||y||(S=!0,E||(E=!0,ee()))),A},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(A){var _=d;return function(){var k=d;d=_;try{return A.apply(this,arguments)}finally{d=k}}}})(pd);gd.exports=pd;var up=gd.exports,yd={exports:{}},qe={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var cp=x;function vd(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Jt(){}var Ge={d:{f:Jt,r:function(){throw Error(vd(522))},D:Jt,C:Jt,L:Jt,m:Jt,X:Jt,S:Jt,M:Jt},p:0,findDOMNode:null},fp=Symbol.for("react.portal");function dp(e,t,a){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fp,key:n==null?null:""+n,children:e,containerInfo:t,implementation:a}}var fl=cp.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Cr(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}qe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ge;qe.createPortal=function(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(vd(299));return dp(e,t,null,a)};qe.flushSync=function(e){var t=fl.T,a=Ge.p;try{if(fl.T=null,Ge.p=2,e)return e()}finally{fl.T=t,Ge.p=a,Ge.d.f()}};qe.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ge.d.C(e,t))};qe.prefetchDNS=function(e){typeof e=="string"&&Ge.d.D(e)};qe.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var a=t.as,n=Cr(a,t.crossOrigin),l=typeof t.integrity=="string"?t.integrity:void 0,s=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;a==="style"?Ge.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:l,fetchPriority:s}):a==="script"&&Ge.d.X(e,{crossOrigin:n,integrity:l,fetchPriority:s,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};qe.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var a=Cr(t.as,t.crossOrigin);Ge.d.M(e,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Ge.d.M(e)};qe.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var a=t.as,n=Cr(a,t.crossOrigin);Ge.d.L(e,a,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};qe.preloadModule=function(e,t){if(typeof e=="string")if(t){var a=Cr(t.as,t.crossOrigin);Ge.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Ge.d.m(e)};qe.requestFormReset=function(e){Ge.d.r(e)};qe.unstable_batchedUpdates=function(e,t){return e(t)};qe.useFormState=function(e,t,a){return fl.H.useFormState(e,t,a)};qe.useFormStatus=function(){return fl.H.useHostTransitionStatus()};qe.version="19.1.0";function xd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xd)}catch(e){console.error(e)}}xd(),yd.exports=qe;var hp=yd.exports;/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Ee=up,bd=x,mp=hp;function T(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Sd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Yl(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function wd(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function nc(e){if(Yl(e)!==e)throw Error(T(188))}function gp(e){var t=e.alternate;if(!t){if(t=Yl(e),t===null)throw Error(T(188));return t!==e?null:e}for(var a=e,n=t;;){var l=a.return;if(l===null)break;var s=l.alternate;if(s===null){if(n=l.return,n!==null){a=n;continue}break}if(l.child===s.child){for(s=l.child;s;){if(s===a)return nc(l),e;if(s===n)return nc(l),t;s=s.sibling}throw Error(T(188))}if(a.return!==n.return)a=l,n=s;else{for(var r=!1,i=l.child;i;){if(i===a){r=!0,a=l,n=s;break}if(i===n){r=!0,n=l,a=s;break}i=i.sibling}if(!r){for(i=s.child;i;){if(i===a){r=!0,a=s,n=l;break}if(i===n){r=!0,n=s,a=l;break}i=i.sibling}if(!r)throw Error(T(189))}}if(a.alternate!==n)throw Error(T(190))}if(a.tag!==3)throw Error(T(188));return a.stateNode.current===a?e:t}function Nd(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Nd(e),t!==null)return t;e=e.sibling}return null}var oe=Object.assign,pp=Symbol.for("react.element"),fs=Symbol.for("react.transitional.element"),il=Symbol.for("react.portal"),nn=Symbol.for("react.fragment"),jd=Symbol.for("react.strict_mode"),zi=Symbol.for("react.profiler"),yp=Symbol.for("react.provider"),Ed=Symbol.for("react.consumer"),Dt=Symbol.for("react.context"),Vo=Symbol.for("react.forward_ref"),Mi=Symbol.for("react.suspense"),ki=Symbol.for("react.suspense_list"),Yo=Symbol.for("react.memo"),ea=Symbol.for("react.lazy"),Di=Symbol.for("react.activity"),vp=Symbol.for("react.memo_cache_sentinel"),lc=Symbol.iterator;function Fn(e){return e===null||typeof e!="object"?null:(e=lc&&e[lc]||e["@@iterator"],typeof e=="function"?e:null)}var xp=Symbol.for("react.client.reference");function Li(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xp?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case nn:return"Fragment";case zi:return"Profiler";case jd:return"StrictMode";case Mi:return"Suspense";case ki:return"SuspenseList";case Di:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case il:return"Portal";case Dt:return(e.displayName||"Context")+".Provider";case Ed:return(e._context.displayName||"Context")+".Consumer";case Vo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yo:return t=e.displayName||null,t!==null?t:Li(e.type)||"Memo";case ea:t=e._payload,e=e._init;try{return Li(e(t))}catch{}}return null}var ol=Array.isArray,H=bd.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=mp.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ra={pending:!1,data:null,method:null,action:null},Ui=[],ln=-1;function Tt(e){return{current:e}}function Oe(e){0>ln||(e.current=Ui[ln],Ui[ln]=null,ln--)}function de(e,t){ln++,Ui[ln]=e.current,e.current=t}var jt=Tt(null),Tl=Tt(null),ca=Tt(null),Ys=Tt(null);function $s(e,t){switch(de(ca,t),de(Tl,e),de(jt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=cf(t),e=Vm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Oe(jt),de(jt,e)}function En(){Oe(jt),Oe(Tl),Oe(ca)}function _i(e){e.memoizedState!==null&&de(Ys,e);var t=jt.current,a=Vm(t,e.type);t!==a&&(de(Tl,e),de(jt,a))}function Xs(e){Tl.current===e&&(Oe(jt),Oe(Tl)),Ys.current===e&&(Oe(Ys),_l._currentValue=Ra)}var Hi=Object.prototype.hasOwnProperty,$o=Ee.unstable_scheduleCallback,Kr=Ee.unstable_cancelCallback,bp=Ee.unstable_shouldYield,Sp=Ee.unstable_requestPaint,Et=Ee.unstable_now,wp=Ee.unstable_getCurrentPriorityLevel,Cd=Ee.unstable_ImmediatePriority,Td=Ee.unstable_UserBlockingPriority,Qs=Ee.unstable_NormalPriority,Np=Ee.unstable_LowPriority,Ad=Ee.unstable_IdlePriority,jp=Ee.log,Ep=Ee.unstable_setDisableYieldValue,$l=null,Pe=null;function ra(e){if(typeof jp=="function"&&Ep(e),Pe&&typeof Pe.setStrictMode=="function")try{Pe.setStrictMode($l,e)}catch{}}var We=Math.clz32?Math.clz32:Ap,Cp=Math.log,Tp=Math.LN2;function Ap(e){return e>>>=0,e===0?32:31-(Cp(e)/Tp|0)|0}var ds=256,hs=4194304;function Ca(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Tr(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var l=0,s=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var i=n&134217727;return i!==0?(n=i&~s,n!==0?l=Ca(n):(r&=i,r!==0?l=Ca(r):a||(a=i&~e,a!==0&&(l=Ca(a))))):(i=n&~s,i!==0?l=Ca(i):r!==0?l=Ca(r):a||(a=n&~e,a!==0&&(l=Ca(a)))),l===0?0:t!==0&&t!==l&&!(t&s)&&(s=l&-l,a=t&-t,s>=a||s===32&&(a&4194048)!==0)?t:l}function Xl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Rp(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rd(){var e=ds;return ds<<=1,!(ds&4194048)&&(ds=256),e}function Od(){var e=hs;return hs<<=1,!(hs&62914560)&&(hs=4194304),e}function Zr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ql(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Op(e,t,a,n,l,s){var r=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var i=e.entanglements,o=e.expirationTimes,c=e.hiddenUpdates;for(a=r&~a;0<a;){var f=31-We(a),h=1<<f;i[f]=0,o[f]=-1;var d=c[f];if(d!==null)for(c[f]=null,f=0;f<d.length;f++){var y=d[f];y!==null&&(y.lane&=-536870913)}a&=~h}n!==0&&zd(e,n,0),s!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=s&~(r&~t))}function zd(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-We(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function Md(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-We(a),l=1<<n;l&t|e[n]&t&&(e[n]|=t),a&=~l}}function Xo(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Qo(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function kd(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Wm(e.type))}function zp(e,t){var a=I.p;try{return I.p=e,t()}finally{I.p=a}}var Sa=Math.random().toString(36).slice(2),Ue="__reactFiber$"+Sa,Xe="__reactProps$"+Sa,_n="__reactContainer$"+Sa,Bi="__reactEvents$"+Sa,Mp="__reactListeners$"+Sa,kp="__reactHandles$"+Sa,sc="__reactResources$"+Sa,Kl="__reactMarker$"+Sa;function Ko(e){delete e[Ue],delete e[Xe],delete e[Bi],delete e[Mp],delete e[kp]}function sn(e){var t=e[Ue];if(t)return t;for(var a=e.parentNode;a;){if(t=a[_n]||a[Ue]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=hf(e);e!==null;){if(a=e[Ue])return a;e=hf(e)}return t}e=a,a=e.parentNode}return null}function Hn(e){if(e=e[Ue]||e[_n]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function ul(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(T(33))}function pn(e){var t=e[sc];return t||(t=e[sc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ae(e){e[Kl]=!0}var Dd=new Set,Ld={};function qa(e,t){Cn(e,t),Cn(e+"Capture",t)}function Cn(e,t){for(Ld[e]=t,e=0;e<t.length;e++)Dd.add(t[e])}var Dp=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]*$"),rc={},ic={};function Lp(e){return Hi.call(ic,e)?!0:Hi.call(rc,e)?!1:Dp.test(e)?ic[e]=!0:(rc[e]=!0,!1)}function As(e,t,a){if(Lp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ms(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Ot(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}var Jr,oc;function en(e){if(Jr===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Jr=t&&t[1]||"",oc=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Jr+e+oc}var Fr=!1;function Pr(e,t){if(!e||Fr)return"";Fr=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(y){var d=y}Reflect.construct(e,[],h)}else{try{h.call()}catch(y){d=y}e.call(h.prototype)}}else{try{throw Error()}catch(y){d=y}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(y){if(y&&d&&typeof y.stack=="string")return[y.stack,d.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=n.DetermineComponentFrameRoot(),r=s[0],i=s[1];if(r&&i){var o=r.split(`
|
|
44
|
+
`),c=i.split(`
|
|
45
|
+
`);for(l=n=0;n<o.length&&!o[n].includes("DetermineComponentFrameRoot");)n++;for(;l<c.length&&!c[l].includes("DetermineComponentFrameRoot");)l++;if(n===o.length||l===c.length)for(n=o.length-1,l=c.length-1;1<=n&&0<=l&&o[n]!==c[l];)l--;for(;1<=n&&0<=l;n--,l--)if(o[n]!==c[l]){if(n!==1||l!==1)do if(n--,l--,0>l||o[n]!==c[l]){var f=`
|
|
46
|
+
`+o[n].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=n&&0<=l);break}}}finally{Fr=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?en(a):""}function Up(e){switch(e.tag){case 26:case 27:case 5:return en(e.type);case 16:return en("Lazy");case 13:return en("Suspense");case 19:return en("SuspenseList");case 0:case 15:return Pr(e.type,!1);case 11:return Pr(e.type.render,!1);case 1:return Pr(e.type,!0);case 31:return en("Activity");default:return""}}function uc(e){try{var t="";do t+=Up(e),e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}function nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ud(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _p(e){var t=Ud(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(r){n=""+r,s.call(this,r)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ks(e){e._valueTracker||(e._valueTracker=_p(e))}function _d(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Ud(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Zs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Hp=/[\n"\\]/g;function rt(e){return e.replace(Hp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gi(e,t,a,n,l,s,r,i){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+nt(t)):e.value!==""+nt(t)&&(e.value=""+nt(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?qi(e,r,nt(t)):a!=null?qi(e,r,nt(a)):n!=null&&e.removeAttribute("value"),l==null&&s!=null&&(e.defaultChecked=!!s),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.name=""+nt(i):e.removeAttribute("name")}function Hd(e,t,a,n,l,s,r,i){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||a!=null){if(!(s!=="submit"&&s!=="reset"||t!=null))return;a=a!=null?""+nt(a):"",t=t!=null?""+nt(t):a,i||t===e.value||(e.value=t),e.defaultValue=t}n=n??l,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=i?e.checked:!!n,e.defaultChecked=!!n,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r)}function qi(e,t,a){t==="number"&&Zs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function yn(e,t,a,n){if(e=e.options,t){t={};for(var l=0;l<a.length;l++)t["$"+a[l]]=!0;for(a=0;a<e.length;a++)l=t.hasOwnProperty("$"+e[a].value),e[a].selected!==l&&(e[a].selected=l),l&&n&&(e[a].defaultSelected=!0)}else{for(a=""+nt(a),t=null,l=0;l<e.length;l++){if(e[l].value===a){e[l].selected=!0,n&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Bd(e,t,a){if(t!=null&&(t=""+nt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+nt(a):""}function Gd(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(T(92));if(ol(n)){if(1<n.length)throw Error(T(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=nt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n)}function Tn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Bp=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 cc(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Bp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function qd(e,t,a){if(t!=null&&typeof t!="object")throw Error(T(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var l in t)n=t[l],t.hasOwnProperty(l)&&a[l]!==n&&cc(e,l,n)}else for(var s in t)t.hasOwnProperty(s)&&cc(e,s,t[s])}function Zo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gp=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"]]),qp=/^[\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 Rs(e){return qp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Vi=null;function Jo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,vn=null;function fc(e){var t=Hn(e);if(t&&(e=t.stateNode)){var a=e[Xe]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gi(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+rt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var l=n[Xe]||null;if(!l)throw Error(T(90));Gi(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&_d(n)}break e;case"textarea":Bd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&yn(e,!!a.multiple,t,!1)}}}var Wr=!1;function Vd(e,t,a){if(Wr)return e(t,a);Wr=!0;try{var n=e(t);return n}finally{if(Wr=!1,(rn!==null||vn!==null)&&(_r(),rn&&(t=rn,e=vn,vn=rn=null,fc(t),e)))for(t=0;t<e.length;t++)fc(e[t])}}function Al(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Xe]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(T(231,t,typeof a));return a}var Vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yi=!1;if(Vt)try{var Pn={};Object.defineProperty(Pn,"passive",{get:function(){Yi=!0}}),window.addEventListener("test",Pn,Pn),window.removeEventListener("test",Pn,Pn)}catch{Yi=!1}var ia=null,Fo=null,Os=null;function Yd(){if(Os)return Os;var e,t=Fo,a=t.length,n,l="value"in ia?ia.value:ia.textContent,s=l.length;for(e=0;e<a&&t[e]===l[e];e++);var r=a-e;for(n=1;n<=r&&t[a-n]===l[s-n];n++);return Os=l.slice(e,1<n?1-n:void 0)}function zs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gs(){return!0}function dc(){return!1}function Qe(e){function t(a,n,l,s,r){this._reactName=a,this._targetInst=l,this.type=n,this.nativeEvent=s,this.target=r,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(a=e[i],this[i]=a?a(s):s[i]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?gs:dc,this.isPropagationStopped=dc,this}return oe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=gs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=gs)},persist:function(){},isPersistent:gs}),t}var Va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ar=Qe(Va),Zl=oe({},Va,{view:0,detail:0}),Vp=Qe(Zl),Ir,ei,Wn,Rr=oe({},Zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Po,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wn&&(Wn&&e.type==="mousemove"?(Ir=e.screenX-Wn.screenX,ei=e.screenY-Wn.screenY):ei=Ir=0,Wn=e),Ir)},movementY:function(e){return"movementY"in e?e.movementY:ei}}),hc=Qe(Rr),Yp=oe({},Rr,{dataTransfer:0}),$p=Qe(Yp),Xp=oe({},Zl,{relatedTarget:0}),ti=Qe(Xp),Qp=oe({},Va,{animationName:0,elapsedTime:0,pseudoElement:0}),Kp=Qe(Qp),Zp=oe({},Va,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jp=Qe(Zp),Fp=oe({},Va,{data:0}),mc=Qe(Fp),Pp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wp={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"},Ip={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ip[e])?!!t[e]:!1}function Po(){return e0}var t0=oe({},Zl,{key:function(e){if(e.key){var t=Pp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Po,charCode:function(e){return e.type==="keypress"?zs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),a0=Qe(t0),n0=oe({},Rr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gc=Qe(n0),l0=oe({},Zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Po}),s0=Qe(l0),r0=oe({},Va,{propertyName:0,elapsedTime:0,pseudoElement:0}),i0=Qe(r0),o0=oe({},Rr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),u0=Qe(o0),c0=oe({},Va,{newState:0,oldState:0}),f0=Qe(c0),d0=[9,13,27,32],Wo=Vt&&"CompositionEvent"in window,dl=null;Vt&&"documentMode"in document&&(dl=document.documentMode);var h0=Vt&&"TextEvent"in window&&!dl,$d=Vt&&(!Wo||dl&&8<dl&&11>=dl),pc=" ",yc=!1;function Xd(e,t){switch(e){case"keyup":return d0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var on=!1;function m0(e,t){switch(e){case"compositionend":return Qd(t);case"keypress":return t.which!==32?null:(yc=!0,pc);case"textInput":return e=t.data,e===pc&&yc?null:e;default:return null}}function g0(e,t){if(on)return e==="compositionend"||!Wo&&Xd(e,t)?(e=Yd(),Os=Fo=ia=null,on=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $d&&t.locale!=="ko"?null:t.data;default:return null}}var p0={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 vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!p0[e.type]:t==="textarea"}function Kd(e,t,a,n){rn?vn?vn.push(n):vn=[n]:rn=n,t=dr(t,"onChange"),0<t.length&&(a=new Ar("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var hl=null,Rl=null;function y0(e){Bm(e,0)}function Or(e){var t=ul(e);if(_d(t))return e}function xc(e,t){if(e==="change")return t}var Zd=!1;if(Vt){var ai;if(Vt){var ni="oninput"in document;if(!ni){var bc=document.createElement("div");bc.setAttribute("oninput","return;"),ni=typeof bc.oninput=="function"}ai=ni}else ai=!1;Zd=ai&&(!document.documentMode||9<document.documentMode)}function Sc(){hl&&(hl.detachEvent("onpropertychange",Jd),Rl=hl=null)}function Jd(e){if(e.propertyName==="value"&&Or(Rl)){var t=[];Kd(t,Rl,e,Jo(e)),Vd(y0,t)}}function v0(e,t,a){e==="focusin"?(Sc(),hl=t,Rl=a,hl.attachEvent("onpropertychange",Jd)):e==="focusout"&&Sc()}function x0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Or(Rl)}function b0(e,t){if(e==="click")return Or(t)}function S0(e,t){if(e==="input"||e==="change")return Or(t)}function w0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tt=typeof Object.is=="function"?Object.is:w0;function Ol(e,t){if(tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var l=a[n];if(!Hi.call(t,l)||!tt(e[l],t[l]))return!1}return!0}function wc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nc(e,t){var a=wc(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=wc(a)}}function Fd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zs(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Zs(e.document)}return t}function Io(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var N0=Vt&&"documentMode"in document&&11>=document.documentMode,un=null,$i=null,ml=null,Xi=!1;function jc(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Xi||un==null||un!==Zs(n)||(n=un,"selectionStart"in n&&Io(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ml&&Ol(ml,n)||(ml=n,n=dr($i,"onSelect"),0<n.length&&(t=new Ar("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=un)))}function ja(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var cn={animationend:ja("Animation","AnimationEnd"),animationiteration:ja("Animation","AnimationIteration"),animationstart:ja("Animation","AnimationStart"),transitionrun:ja("Transition","TransitionRun"),transitionstart:ja("Transition","TransitionStart"),transitioncancel:ja("Transition","TransitionCancel"),transitionend:ja("Transition","TransitionEnd")},li={},Wd={};Vt&&(Wd=document.createElement("div").style,"AnimationEvent"in window||(delete cn.animationend.animation,delete cn.animationiteration.animation,delete cn.animationstart.animation),"TransitionEvent"in window||delete cn.transitionend.transition);function Ya(e){if(li[e])return li[e];if(!cn[e])return e;var t=cn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Wd)return li[e]=t[a];return e}var Id=Ya("animationend"),eh=Ya("animationiteration"),th=Ya("animationstart"),j0=Ya("transitionrun"),E0=Ya("transitionstart"),C0=Ya("transitioncancel"),ah=Ya("transitionend"),nh=new Map,Qi="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(" ");Qi.push("scrollEnd");function yt(e,t){nh.set(e,t),qa(t,[e])}var Ec=new WeakMap;function it(e,t){if(typeof e=="object"&&e!==null){var a=Ec.get(e);return a!==void 0?a:(t={value:e,source:t,stack:uc(t)},Ec.set(e,t),t)}return{value:e,source:t,stack:uc(t)}}var at=[],fn=0,eu=0;function zr(){for(var e=fn,t=eu=fn=0;t<e;){var a=at[t];at[t++]=null;var n=at[t];at[t++]=null;var l=at[t];at[t++]=null;var s=at[t];if(at[t++]=null,n!==null&&l!==null){var r=n.pending;r===null?l.next=l:(l.next=r.next,r.next=l),n.pending=l}s!==0&&lh(a,l,s)}}function Mr(e,t,a,n){at[fn++]=e,at[fn++]=t,at[fn++]=a,at[fn++]=n,eu|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function tu(e,t,a,n){return Mr(e,t,a,n),Js(e)}function Bn(e,t){return Mr(e,null,null,t),Js(e)}function lh(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var l=!1,s=e.return;s!==null;)s.childLanes|=a,n=s.alternate,n!==null&&(n.childLanes|=a),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(l=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,l&&t!==null&&(l=31-We(a),e=s.hiddenUpdates,n=e[l],n===null?e[l]=[t]:n.push(t),t.lane=a|536870912),s):null}function Js(e){if(50<jl)throw jl=0,mo=null,Error(T(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var dn={};function T0(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fe(e,t,a,n){return new T0(e,t,a,n)}function au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bt(e,t){var a=e.alternate;return a===null?(a=Fe(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function sh(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ms(e,t,a,n,l,s){var r=0;if(n=e,typeof e=="function")au(e)&&(r=1);else if(typeof e=="string")r=Ry(e,a,jt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Di:return e=Fe(31,a,t,l),e.elementType=Di,e.lanes=s,e;case nn:return Oa(a.children,l,s,t);case jd:r=8,l|=24;break;case zi:return e=Fe(12,a,t,l|2),e.elementType=zi,e.lanes=s,e;case Mi:return e=Fe(13,a,t,l),e.elementType=Mi,e.lanes=s,e;case ki:return e=Fe(19,a,t,l),e.elementType=ki,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yp:case Dt:r=10;break e;case Ed:r=9;break e;case Vo:r=11;break e;case Yo:r=14;break e;case ea:r=16,n=null;break e}r=29,a=Error(T(130,e===null?"null":typeof e,"")),n=null}return t=Fe(r,a,t,l),t.elementType=e,t.type=n,t.lanes=s,t}function Oa(e,t,a,n){return e=Fe(7,e,n,t),e.lanes=a,e}function si(e,t,a){return e=Fe(6,e,null,t),e.lanes=a,e}function ri(e,t,a){return t=Fe(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hn=[],mn=0,Fs=null,Ps=0,lt=[],st=0,za=null,Lt=1,Ut="";function Ta(e,t){hn[mn++]=Ps,hn[mn++]=Fs,Fs=e,Ps=t}function rh(e,t,a){lt[st++]=Lt,lt[st++]=Ut,lt[st++]=za,za=e;var n=Lt;e=Ut;var l=32-We(n)-1;n&=~(1<<l),a+=1;var s=32-We(t)+l;if(30<s){var r=l-l%5;s=(n&(1<<r)-1).toString(32),n>>=r,l-=r,Lt=1<<32-We(t)+l|a<<l|n,Ut=s+e}else Lt=1<<s|a<<l|n,Ut=e}function nu(e){e.return!==null&&(Ta(e,1),rh(e,1,0))}function lu(e){for(;e===Fs;)Fs=hn[--mn],hn[mn]=null,Ps=hn[--mn],hn[mn]=null;for(;e===za;)za=lt[--st],lt[st]=null,Ut=lt[--st],lt[st]=null,Lt=lt[--st],lt[st]=null}var Be=null,ye=null,W=!1,Ma=null,St=!1,Ki=Error(T(519));function _a(e){var t=Error(T(418,""));throw zl(it(t,e)),Ki}function Cc(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Ue]=e,t[Xe]=n,a){case"dialog":X("cancel",t),X("close",t);break;case"iframe":case"object":case"embed":X("load",t);break;case"video":case"audio":for(a=0;a<Dl.length;a++)X(Dl[a],t);break;case"source":X("error",t);break;case"img":case"image":case"link":X("error",t),X("load",t);break;case"details":X("toggle",t);break;case"input":X("invalid",t),Hd(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),Ks(t);break;case"select":X("invalid",t);break;case"textarea":X("invalid",t),Gd(t,n.value,n.defaultValue,n.children),Ks(t)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||qm(t.textContent,a)?(n.popover!=null&&(X("beforetoggle",t),X("toggle",t)),n.onScroll!=null&&X("scroll",t),n.onScrollEnd!=null&&X("scrollend",t),n.onClick!=null&&(t.onclick=Gr),t=!0):t=!1,t||_a(e)}function Tc(e){for(Be=e.return;Be;)switch(Be.tag){case 5:case 13:St=!1;return;case 27:case 3:St=!0;return;default:Be=Be.return}}function In(e){if(e!==Be)return!1;if(!W)return Tc(e),W=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||bo(e.type,e.memoizedProps)),a=!a),a&&ye&&_a(e),Tc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){ye=gt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}ye=null}}else t===27?(t=ye,wa(e.type)?(e=No,No=null,ye=e):ye=t):ye=Be?gt(e.stateNode.nextSibling):null;return!0}function Jl(){ye=Be=null,W=!1}function Ac(){var e=Ma;return e!==null&&($e===null?$e=e:$e.push.apply($e,e),Ma=null),e}function zl(e){Ma===null?Ma=[e]:Ma.push(e)}var Zi=Tt(null),$a=null,_t=null;function aa(e,t,a){de(Zi,t._currentValue),t._currentValue=a}function Gt(e){e._currentValue=Zi.current,Oe(Zi)}function Ji(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Fi(e,t,a,n){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var s=l.dependencies;if(s!==null){var r=l.child;s=s.firstContext;e:for(;s!==null;){var i=s;s=l;for(var o=0;o<t.length;o++)if(i.context===t[o]){s.lanes|=a,i=s.alternate,i!==null&&(i.lanes|=a),Ji(s.return,a,e),n||(r=null);break e}s=i.next}}else if(l.tag===18){if(r=l.return,r===null)throw Error(T(341));r.lanes|=a,s=r.alternate,s!==null&&(s.lanes|=a),Ji(r,a,e),r=null}else r=l.child;if(r!==null)r.return=l;else for(r=l;r!==null;){if(r===e){r=null;break}if(l=r.sibling,l!==null){l.return=r.return,r=l;break}r=r.return}l=r}}function Fl(e,t,a,n){e=null;for(var l=t,s=!1;l!==null;){if(!s){if(l.flags&524288)s=!0;else if(l.flags&262144)break}if(l.tag===10){var r=l.alternate;if(r===null)throw Error(T(387));if(r=r.memoizedProps,r!==null){var i=l.type;tt(l.pendingProps.value,r.value)||(e!==null?e.push(i):e=[i])}}else if(l===Ys.current){if(r=l.alternate,r===null)throw Error(T(387));r.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(_l):e=[_l])}l=l.return}e!==null&&Fi(t,e,a,n),t.flags|=262144}function Ws(e){for(e=e.firstContext;e!==null;){if(!tt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ha(e){$a=e,_t=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _e(e){return ih($a,e)}function ps(e,t){return $a===null&&Ha(e),ih(e,t)}function ih(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},_t===null){if(e===null)throw Error(T(308));_t=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _t=_t.next=t;return a}var A0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},R0=Ee.unstable_scheduleCallback,O0=Ee.unstable_NormalPriority,Ne={$$typeof:Dt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function su(){return{controller:new A0,data:new Map,refCount:0}}function Pl(e){e.refCount--,e.refCount===0&&R0(O0,function(){e.controller.abort()})}var gl=null,Pi=0,An=0,xn=null;function z0(e,t){if(gl===null){var a=gl=[];Pi=0,An=Au(),xn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Pi++,t.then(Rc,Rc),t}function Rc(){if(--Pi===0&&gl!==null){xn!==null&&(xn.status="fulfilled");var e=gl;gl=null,An=0,xn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function M0(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(l){a.push(l)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var l=0;l<a.length;l++)(0,a[l])(t)},function(l){for(n.status="rejected",n.reason=l,l=0;l<a.length;l++)(0,a[l])(void 0)}),n}var Oc=H.S;H.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&z0(e,t),Oc!==null&&Oc(e,t)};var ka=Tt(null);function ru(){var e=ka.current;return e!==null?e:re.pooledCache}function ks(e,t){t===null?de(ka,ka.current):de(ka,t.pool)}function oh(){var e=ru();return e===null?null:{parent:Ne._currentValue,pool:e}}var Wl=Error(T(460)),uh=Error(T(474)),kr=Error(T(542)),Wi={then:function(){}};function zc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ys(){}function ch(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ys,ys),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,kc(e),e;default:if(typeof t.status=="string")t.then(ys,ys);else{if(e=re,e!==null&&100<e.shellSuspendCounter)throw Error(T(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=n}},function(n){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,kc(e),e}throw pl=t,Wl}}var pl=null;function Mc(){if(pl===null)throw Error(T(459));var e=pl;return pl=null,e}function kc(e){if(e===Wl||e===kr)throw Error(T(483))}var ta=!1;function iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ii(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function da(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ae&2){var l=n.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),n.pending=t,t=Js(e),lh(e,null,a),t}return Mr(e,n,t,a),Js(e)}function yl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Md(e,a)}}function ii(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var l=null,s=null;if(a=a.firstBaseUpdate,a!==null){do{var r={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};s===null?l=s=r:s=s.next=r,a=a.next}while(a!==null);s===null?l=s=t:s=s.next=t}else l=s=t;a={baseState:n.baseState,firstBaseUpdate:l,lastBaseUpdate:s,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var eo=!1;function vl(){if(eo){var e=xn;if(e!==null)throw e}}function xl(e,t,a,n){eo=!1;var l=e.updateQueue;ta=!1;var s=l.firstBaseUpdate,r=l.lastBaseUpdate,i=l.shared.pending;if(i!==null){l.shared.pending=null;var o=i,c=o.next;o.next=null,r===null?s=c:r.next=c,r=o;var f=e.alternate;f!==null&&(f=f.updateQueue,i=f.lastBaseUpdate,i!==r&&(i===null?f.firstBaseUpdate=c:i.next=c,f.lastBaseUpdate=o))}if(s!==null){var h=l.baseState;r=0,f=c=o=null,i=s;do{var d=i.lane&-536870913,y=d!==i.lane;if(y?(P&d)===d:(n&d)===d){d!==0&&d===An&&(eo=!0),f!==null&&(f=f.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var S=e,v=i;d=t;var w=a;switch(v.tag){case 1:if(S=v.payload,typeof S=="function"){h=S.call(w,h,d);break e}h=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=v.payload,d=typeof S=="function"?S.call(w,h,d):S,d==null)break e;h=oe({},h,d);break e;case 2:ta=!0}}d=i.callback,d!==null&&(e.flags|=64,y&&(e.flags|=8192),y=l.callbacks,y===null?l.callbacks=[d]:y.push(d))}else y={lane:d,tag:i.tag,payload:i.payload,callback:i.callback,next:null},f===null?(c=f=y,o=h):f=f.next=y,r|=d;if(i=i.next,i===null){if(i=l.shared.pending,i===null)break;y=i,i=y.next,y.next=null,l.lastBaseUpdate=y,l.shared.pending=null}}while(!0);f===null&&(o=h),l.baseState=o,l.firstBaseUpdate=c,l.lastBaseUpdate=f,s===null&&(l.shared.lanes=0),ba|=r,e.lanes=r,e.memoizedState=h}}function fh(e,t){if(typeof e!="function")throw Error(T(191,e));e.call(t)}function dh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)fh(a[e],t)}var Rn=Tt(null),Is=Tt(0);function Dc(e,t){e=Xt,de(Is,e),de(Rn,t),Xt=e|t.baseLanes}function to(){de(Is,Xt),de(Rn,Rn.current)}function ou(){Xt=Is.current,Oe(Rn),Oe(Is)}var va=0,$=null,le=null,Se=null,er=!1,bn=!1,Ba=!1,tr=0,Ml=0,Sn=null,k0=0;function xe(){throw Error(T(321))}function uu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!tt(e[a],t[a]))return!1;return!0}function cu(e,t,a,n,l,s){return va=s,$=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?Yh:$h,Ba=!1,s=a(n,l),Ba=!1,bn&&(s=mh(t,a,n,l)),hh(e),s}function hh(e){H.H=ar;var t=le!==null&&le.next!==null;if(va=0,Se=le=$=null,er=!1,Ml=0,Sn=null,t)throw Error(T(300));e===null||Re||(e=e.dependencies,e!==null&&Ws(e)&&(Re=!0))}function mh(e,t,a,n){$=e;var l=0;do{if(bn&&(Sn=null),Ml=0,bn=!1,25<=l)throw Error(T(301));if(l+=1,Se=le=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}H.H=G0,s=t(a,n)}while(bn);return s}function D0(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?Il(t):t,e=e.useState()[0],(le!==null?le.memoizedState:null)!==e&&($.flags|=1024),t}function fu(){var e=tr!==0;return tr=0,e}function du(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function hu(e){if(er){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}er=!1}va=0,Se=le=$=null,bn=!1,Ml=tr=0,Sn=null}function Ve(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?$.memoizedState=Se=e:Se=Se.next=e,Se}function we(){if(le===null){var e=$.alternate;e=e!==null?e.memoizedState:null}else e=le.next;var t=Se===null?$.memoizedState:Se.next;if(t!==null)Se=t,le=e;else{if(e===null)throw $.alternate===null?Error(T(467)):Error(T(310));le=e,e={memoizedState:le.memoizedState,baseState:le.baseState,baseQueue:le.baseQueue,queue:le.queue,next:null},Se===null?$.memoizedState=Se=e:Se=Se.next=e}return Se}function mu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Il(e){var t=Ml;return Ml+=1,Sn===null&&(Sn=[]),e=ch(Sn,e,t),t=$,(Se===null?t.memoizedState:Se.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?Yh:$h),e}function Dr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Il(e);if(e.$$typeof===Dt)return _e(e)}throw Error(T(438,String(e)))}function gu(e){var t=null,a=$.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=$.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=mu(),$.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=vp;return t.index++,a}function Yt(e,t){return typeof t=="function"?t(e):t}function Ds(e){var t=we();return pu(t,le,e)}function pu(e,t,a){var n=e.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=a;var l=e.baseQueue,s=n.pending;if(s!==null){if(l!==null){var r=l.next;l.next=s.next,s.next=r}t.baseQueue=l=s,n.pending=null}if(s=e.baseState,l===null)e.memoizedState=s;else{t=l.next;var i=r=null,o=null,c=t,f=!1;do{var h=c.lane&-536870913;if(h!==c.lane?(P&h)===h:(va&h)===h){var d=c.revertLane;if(d===0)o!==null&&(o=o.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===An&&(f=!0);else if((va&d)===d){c=c.next,d===An&&(f=!0);continue}else h={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(i=o=h,r=s):o=o.next=h,$.lanes|=d,ba|=d;h=c.action,Ba&&a(s,h),s=c.hasEagerState?c.eagerState:a(s,h)}else d={lane:h,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(i=o=d,r=s):o=o.next=d,$.lanes|=h,ba|=h;c=c.next}while(c!==null&&c!==t);if(o===null?r=s:o.next=i,!tt(s,e.memoizedState)&&(Re=!0,f&&(a=xn,a!==null)))throw a;e.memoizedState=s,e.baseState=r,e.baseQueue=o,n.lastRenderedState=s}return l===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function oi(e){var t=we(),a=t.queue;if(a===null)throw Error(T(311));a.lastRenderedReducer=e;var n=a.dispatch,l=a.pending,s=t.memoizedState;if(l!==null){a.pending=null;var r=l=l.next;do s=e(s,r.action),r=r.next;while(r!==l);tt(s,t.memoizedState)||(Re=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),a.lastRenderedState=s}return[s,n]}function gh(e,t,a){var n=$,l=we(),s=W;if(s){if(a===void 0)throw Error(T(407));a=a()}else a=t();var r=!tt((le||l).memoizedState,a);r&&(l.memoizedState=a,Re=!0),l=l.queue;var i=vh.bind(null,n,l,e);if(es(2048,8,i,[e]),l.getSnapshot!==t||r||Se!==null&&Se.memoizedState.tag&1){if(n.flags|=2048,On(9,Lr(),yh.bind(null,n,l,a,t),null),re===null)throw Error(T(349));s||va&124||ph(n,t,a)}return a}function ph(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=$.updateQueue,t===null?(t=mu(),$.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function yh(e,t,a,n){t.value=a,t.getSnapshot=n,xh(t)&&bh(e)}function vh(e,t,a){return a(function(){xh(t)&&bh(e)})}function xh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!tt(e,a)}catch{return!0}}function bh(e){var t=Bn(e,2);t!==null&&et(t,e,2)}function ao(e){var t=Ve();if(typeof e=="function"){var a=e;if(e=a(),Ba){ra(!0);try{a()}finally{ra(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yt,lastRenderedState:e},t}function Sh(e,t,a,n){return e.baseState=a,pu(e,le,typeof n=="function"?n:Yt)}function L0(e,t,a,n,l){if(Ur(e))throw Error(T(485));if(e=t.action,e!==null){var s={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){s.listeners.push(r)}};H.T!==null?a(!0):s.isTransition=!1,n(s),a=t.pending,a===null?(s.next=t.pending=s,wh(t,s)):(s.next=a.next,t.pending=a.next=s)}}function wh(e,t){var a=t.action,n=t.payload,l=e.state;if(t.isTransition){var s=H.T,r={};H.T=r;try{var i=a(l,n),o=H.S;o!==null&&o(r,i),Lc(e,t,i)}catch(c){no(e,t,c)}finally{H.T=s}}else try{s=a(l,n),Lc(e,t,s)}catch(c){no(e,t,c)}}function Lc(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Uc(e,t,n)},function(n){return no(e,t,n)}):Uc(e,t,a)}function Uc(e,t,a){t.status="fulfilled",t.value=a,Nh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,wh(e,a)))}function no(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Nh(t),t=t.next;while(t!==n)}e.action=null}function Nh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function jh(e,t){return t}function _c(e,t){if(W){var a=re.formState;if(a!==null){e:{var n=$;if(W){if(ye){t:{for(var l=ye,s=St;l.nodeType!==8;){if(!s){l=null;break t}if(l=gt(l.nextSibling),l===null){l=null;break t}}s=l.data,l=s==="F!"||s==="F"?l:null}if(l){ye=gt(l.nextSibling),n=l.data==="F!";break e}}_a(n)}n=!1}n&&(t=a[0])}}return a=Ve(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jh,lastRenderedState:t},a.queue=n,a=Gh.bind(null,$,n),n.dispatch=a,n=ao(!1),s=bu.bind(null,$,!1,n.queue),n=Ve(),l={state:t,dispatch:null,action:e,pending:null},n.queue=l,a=L0.bind(null,$,l,s,a),l.dispatch=a,n.memoizedState=e,[t,a,!1]}function Hc(e){var t=we();return Eh(t,le,e)}function Eh(e,t,a){if(t=pu(e,t,jh)[0],e=Ds(Yt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Il(t)}catch(r){throw r===Wl?kr:r}else n=t;t=we();var l=t.queue,s=l.dispatch;return a!==t.memoizedState&&($.flags|=2048,On(9,Lr(),U0.bind(null,l,a),null)),[n,s,e]}function U0(e,t){e.action=t}function Bc(e){var t=we(),a=le;if(a!==null)return Eh(t,a,e);we(),t=t.memoizedState,a=we();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function On(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=$.updateQueue,t===null&&(t=mu(),$.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Lr(){return{destroy:void 0,resource:void 0}}function Ch(){return we().memoizedState}function Ls(e,t,a,n){var l=Ve();n=n===void 0?null:n,$.flags|=e,l.memoizedState=On(1|t,Lr(),a,n)}function es(e,t,a,n){var l=we();n=n===void 0?null:n;var s=l.memoizedState.inst;le!==null&&n!==null&&uu(n,le.memoizedState.deps)?l.memoizedState=On(t,s,a,n):($.flags|=e,l.memoizedState=On(1|t,s,a,n))}function Gc(e,t){Ls(8390656,8,e,t)}function Th(e,t){es(2048,8,e,t)}function Ah(e,t){return es(4,2,e,t)}function Rh(e,t){return es(4,4,e,t)}function Oh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zh(e,t,a){a=a!=null?a.concat([e]):null,es(4,4,Oh.bind(null,t,e),a)}function yu(){}function Mh(e,t){var a=we();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&uu(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function kh(e,t){var a=we();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&uu(t,n[1]))return n[0];if(n=e(),Ba){ra(!0);try{e()}finally{ra(!1)}}return a.memoizedState=[n,t],n}function vu(e,t,a){return a===void 0||va&1073741824?e.memoizedState=t:(e.memoizedState=a,e=Nm(),$.lanes|=e,ba|=e,a)}function Dh(e,t,a,n){return tt(a,t)?a:Rn.current!==null?(e=vu(e,a,n),tt(e,t)||(Re=!0),e):va&42?(e=Nm(),$.lanes|=e,ba|=e,t):(Re=!0,e.memoizedState=a)}function Lh(e,t,a,n,l){var s=I.p;I.p=s!==0&&8>s?s:8;var r=H.T,i={};H.T=i,bu(e,!1,t,a);try{var o=l(),c=H.S;if(c!==null&&c(i,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var f=M0(o,n);bl(e,t,f,Ie(e))}else bl(e,t,n,Ie(e))}catch(h){bl(e,t,{then:function(){},status:"rejected",reason:h},Ie())}finally{I.p=s,H.T=r}}function _0(){}function lo(e,t,a,n){if(e.tag!==5)throw Error(T(476));var l=Uh(e).queue;Lh(e,l,t,Ra,a===null?_0:function(){return _h(e),a(n)})}function Uh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ra,baseState:Ra,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yt,lastRenderedState:Ra},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yt,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _h(e){var t=Uh(e).next.queue;bl(e,t,{},Ie())}function xu(){return _e(_l)}function Hh(){return we().memoizedState}function Bh(){return we().memoizedState}function H0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ie();e=fa(a);var n=da(t,e,a);n!==null&&(et(n,t,a),yl(n,t,a)),t={cache:su()},e.payload=t;return}t=t.return}}function B0(e,t,a){var n=Ie();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Ur(e)?qh(t,a):(a=tu(e,t,a,n),a!==null&&(et(a,e,n),Vh(a,t,n)))}function Gh(e,t,a){var n=Ie();bl(e,t,a,n)}function bl(e,t,a,n){var l={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ur(e))qh(t,l);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var r=t.lastRenderedState,i=s(r,a);if(l.hasEagerState=!0,l.eagerState=i,tt(i,r))return Mr(e,t,l,0),re===null&&zr(),!1}catch{}finally{}if(a=tu(e,t,l,n),a!==null)return et(a,e,n),Vh(a,t,n),!0}return!1}function bu(e,t,a,n){if(n={lane:2,revertLane:Au(),action:n,hasEagerState:!1,eagerState:null,next:null},Ur(e)){if(t)throw Error(T(479))}else t=tu(e,a,n,2),t!==null&&et(t,e,2)}function Ur(e){var t=e.alternate;return e===$||t!==null&&t===$}function qh(e,t){bn=er=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Vh(e,t,a){if(a&4194048){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Md(e,a)}}var ar={readContext:_e,use:Dr,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useLayoutEffect:xe,useInsertionEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useSyncExternalStore:xe,useId:xe,useHostTransitionStatus:xe,useFormState:xe,useActionState:xe,useOptimistic:xe,useMemoCache:xe,useCacheRefresh:xe},Yh={readContext:_e,use:Dr,useCallback:function(e,t){return Ve().memoizedState=[e,t===void 0?null:t],e},useContext:_e,useEffect:Gc,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ls(4194308,4,Oh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var a=Ve();t=t===void 0?null:t;var n=e();if(Ba){ra(!0);try{e()}finally{ra(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=Ve();if(a!==void 0){var l=a(t);if(Ba){ra(!0);try{a(t)}finally{ra(!1)}}}else l=t;return n.memoizedState=n.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},n.queue=e,e=e.dispatch=B0.bind(null,$,e),[n.memoizedState,e]},useRef:function(e){var t=Ve();return e={current:e},t.memoizedState=e},useState:function(e){e=ao(e);var t=e.queue,a=Gh.bind(null,$,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:yu,useDeferredValue:function(e,t){var a=Ve();return vu(a,e,t)},useTransition:function(){var e=ao(!1);return e=Lh.bind(null,$,e.queue,!0,!1),Ve().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=$,l=Ve();if(W){if(a===void 0)throw Error(T(407));a=a()}else{if(a=t(),re===null)throw Error(T(349));P&124||ph(n,t,a)}l.memoizedState=a;var s={value:a,getSnapshot:t};return l.queue=s,Gc(vh.bind(null,n,s,e),[e]),n.flags|=2048,On(9,Lr(),yh.bind(null,n,s,a,t),null),a},useId:function(){var e=Ve(),t=re.identifierPrefix;if(W){var a=Ut,n=Lt;a=(n&~(1<<32-We(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=tr++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=k0++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:xu,useFormState:_c,useActionState:_c,useOptimistic:function(e){var t=Ve();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=bu.bind(null,$,!0,a),a.dispatch=t,[e,t]},useMemoCache:gu,useCacheRefresh:function(){return Ve().memoizedState=H0.bind(null,$)}},$h={readContext:_e,use:Dr,useCallback:Mh,useContext:_e,useEffect:Th,useImperativeHandle:zh,useInsertionEffect:Ah,useLayoutEffect:Rh,useMemo:kh,useReducer:Ds,useRef:Ch,useState:function(){return Ds(Yt)},useDebugValue:yu,useDeferredValue:function(e,t){var a=we();return Dh(a,le.memoizedState,e,t)},useTransition:function(){var e=Ds(Yt)[0],t=we().memoizedState;return[typeof e=="boolean"?e:Il(e),t]},useSyncExternalStore:gh,useId:Hh,useHostTransitionStatus:xu,useFormState:Hc,useActionState:Hc,useOptimistic:function(e,t){var a=we();return Sh(a,le,e,t)},useMemoCache:gu,useCacheRefresh:Bh},G0={readContext:_e,use:Dr,useCallback:Mh,useContext:_e,useEffect:Th,useImperativeHandle:zh,useInsertionEffect:Ah,useLayoutEffect:Rh,useMemo:kh,useReducer:oi,useRef:Ch,useState:function(){return oi(Yt)},useDebugValue:yu,useDeferredValue:function(e,t){var a=we();return le===null?vu(a,e,t):Dh(a,le.memoizedState,e,t)},useTransition:function(){var e=oi(Yt)[0],t=we().memoizedState;return[typeof e=="boolean"?e:Il(e),t]},useSyncExternalStore:gh,useId:Hh,useHostTransitionStatus:xu,useFormState:Bc,useActionState:Bc,useOptimistic:function(e,t){var a=we();return le!==null?Sh(a,le,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:gu,useCacheRefresh:Bh},wn=null,kl=0;function vs(e){var t=kl;return kl+=1,wn===null&&(wn=[]),ch(wn,e,t)}function el(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function xs(e,t){throw t.$$typeof===pp?Error(T(525)):(e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qc(e){var t=e._init;return t(e._payload)}function Xh(e){function t(g,m){if(e){var p=g.deletions;p===null?(g.deletions=[m],g.flags|=16):p.push(m)}}function a(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function n(g){for(var m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function l(g,m){return g=Bt(g,m),g.index=0,g.sibling=null,g}function s(g,m,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<m?(g.flags|=67108866,m):p):(g.flags|=67108866,m)):(g.flags|=1048576,m)}function r(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function i(g,m,p,b){return m===null||m.tag!==6?(m=si(p,g.mode,b),m.return=g,m):(m=l(m,p),m.return=g,m)}function o(g,m,p,b){var j=p.type;return j===nn?f(g,m,p.props.children,b,p.key):m!==null&&(m.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ea&&qc(j)===m.type)?(m=l(m,p.props),el(m,p),m.return=g,m):(m=Ms(p.type,p.key,p.props,null,g.mode,b),el(m,p),m.return=g,m)}function c(g,m,p,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==p.containerInfo||m.stateNode.implementation!==p.implementation?(m=ri(p,g.mode,b),m.return=g,m):(m=l(m,p.children||[]),m.return=g,m)}function f(g,m,p,b,j){return m===null||m.tag!==7?(m=Oa(p,g.mode,b,j),m.return=g,m):(m=l(m,p),m.return=g,m)}function h(g,m,p){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=si(""+m,g.mode,p),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case fs:return p=Ms(m.type,m.key,m.props,null,g.mode,p),el(p,m),p.return=g,p;case il:return m=ri(m,g.mode,p),m.return=g,m;case ea:var b=m._init;return m=b(m._payload),h(g,m,p)}if(ol(m)||Fn(m))return m=Oa(m,g.mode,p,null),m.return=g,m;if(typeof m.then=="function")return h(g,vs(m),p);if(m.$$typeof===Dt)return h(g,ps(g,m),p);xs(g,m)}return null}function d(g,m,p,b){var j=m!==null?m.key:null;if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return j!==null?null:i(g,m,""+p,b);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case fs:return p.key===j?o(g,m,p,b):null;case il:return p.key===j?c(g,m,p,b):null;case ea:return j=p._init,p=j(p._payload),d(g,m,p,b)}if(ol(p)||Fn(p))return j!==null?null:f(g,m,p,b,null);if(typeof p.then=="function")return d(g,m,vs(p),b);if(p.$$typeof===Dt)return d(g,m,ps(g,p),b);xs(g,p)}return null}function y(g,m,p,b,j){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return g=g.get(p)||null,i(m,g,""+b,j);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case fs:return g=g.get(b.key===null?p:b.key)||null,o(m,g,b,j);case il:return g=g.get(b.key===null?p:b.key)||null,c(m,g,b,j);case ea:var E=b._init;return b=E(b._payload),y(g,m,p,b,j)}if(ol(b)||Fn(b))return g=g.get(p)||null,f(m,g,b,j,null);if(typeof b.then=="function")return y(g,m,p,vs(b),j);if(b.$$typeof===Dt)return y(g,m,p,ps(m,b),j);xs(m,b)}return null}function S(g,m,p,b){for(var j=null,E=null,N=m,C=m=0,R=null;N!==null&&C<p.length;C++){N.index>C?(R=N,N=null):R=N.sibling;var O=d(g,N,p[C],b);if(O===null){N===null&&(N=R);break}e&&N&&O.alternate===null&&t(g,N),m=s(O,m,C),E===null?j=O:E.sibling=O,E=O,N=R}if(C===p.length)return a(g,N),W&&Ta(g,C),j;if(N===null){for(;C<p.length;C++)N=h(g,p[C],b),N!==null&&(m=s(N,m,C),E===null?j=N:E.sibling=N,E=N);return W&&Ta(g,C),j}for(N=n(N);C<p.length;C++)R=y(N,g,C,p[C],b),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?C:R.key),m=s(R,m,C),E===null?j=R:E.sibling=R,E=R);return e&&N.forEach(function(B){return t(g,B)}),W&&Ta(g,C),j}function v(g,m,p,b){if(p==null)throw Error(T(151));for(var j=null,E=null,N=m,C=m=0,R=null,O=p.next();N!==null&&!O.done;C++,O=p.next()){N.index>C?(R=N,N=null):R=N.sibling;var B=d(g,N,O.value,b);if(B===null){N===null&&(N=R);break}e&&N&&B.alternate===null&&t(g,N),m=s(B,m,C),E===null?j=B:E.sibling=B,E=B,N=R}if(O.done)return a(g,N),W&&Ta(g,C),j;if(N===null){for(;!O.done;C++,O=p.next())O=h(g,O.value,b),O!==null&&(m=s(O,m,C),E===null?j=O:E.sibling=O,E=O);return W&&Ta(g,C),j}for(N=n(N);!O.done;C++,O=p.next())O=y(N,g,C,O.value,b),O!==null&&(e&&O.alternate!==null&&N.delete(O.key===null?C:O.key),m=s(O,m,C),E===null?j=O:E.sibling=O,E=O);return e&&N.forEach(function(ee){return t(g,ee)}),W&&Ta(g,C),j}function w(g,m,p,b){if(typeof p=="object"&&p!==null&&p.type===nn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case fs:e:{for(var j=p.key;m!==null;){if(m.key===j){if(j=p.type,j===nn){if(m.tag===7){a(g,m.sibling),b=l(m,p.props.children),b.return=g,g=b;break e}}else if(m.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ea&&qc(j)===m.type){a(g,m.sibling),b=l(m,p.props),el(b,p),b.return=g,g=b;break e}a(g,m);break}else t(g,m);m=m.sibling}p.type===nn?(b=Oa(p.props.children,g.mode,b,p.key),b.return=g,g=b):(b=Ms(p.type,p.key,p.props,null,g.mode,b),el(b,p),b.return=g,g=b)}return r(g);case il:e:{for(j=p.key;m!==null;){if(m.key===j)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){a(g,m.sibling),b=l(m,p.children||[]),b.return=g,g=b;break e}else{a(g,m);break}else t(g,m);m=m.sibling}b=ri(p,g.mode,b),b.return=g,g=b}return r(g);case ea:return j=p._init,p=j(p._payload),w(g,m,p,b)}if(ol(p))return S(g,m,p,b);if(Fn(p)){if(j=Fn(p),typeof j!="function")throw Error(T(150));return p=j.call(p),v(g,m,p,b)}if(typeof p.then=="function")return w(g,m,vs(p),b);if(p.$$typeof===Dt)return w(g,m,ps(g,p),b);xs(g,p)}return typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint"?(p=""+p,m!==null&&m.tag===6?(a(g,m.sibling),b=l(m,p),b.return=g,g=b):(a(g,m),b=si(p,g.mode,b),b.return=g,g=b),r(g)):a(g,m)}return function(g,m,p,b){try{kl=0;var j=w(g,m,p,b);return wn=null,j}catch(N){if(N===Wl||N===kr)throw N;var E=Fe(29,N,null,g.mode);return E.lanes=b,E.return=g,E}finally{}}}var zn=Xh(!0),Qh=Xh(!1),ut=Tt(null),Ct=null;function na(e){var t=e.alternate;de(je,je.current&1),de(ut,e),Ct===null&&(t===null||Rn.current!==null||t.memoizedState!==null)&&(Ct=e)}function Kh(e){if(e.tag===22){if(de(je,je.current),de(ut,e),Ct===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Ct=e)}}else la()}function la(){de(je,je.current),de(ut,ut.current)}function Ht(e){Oe(ut),Ct===e&&(Ct=null),Oe(je)}var je=Tt(0);function nr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||wo(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ui(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:oe({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var so={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ie(),l=fa(n);l.payload=t,a!=null&&(l.callback=a),t=da(e,l,n),t!==null&&(et(t,e,n),yl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ie(),l=fa(n);l.tag=1,l.payload=t,a!=null&&(l.callback=a),t=da(e,l,n),t!==null&&(et(t,e,n),yl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ie(),n=fa(a);n.tag=2,t!=null&&(n.callback=t),t=da(e,n,a),t!==null&&(et(t,e,a),yl(t,e,a))}};function Vc(e,t,a,n,l,s,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,r):t.prototype&&t.prototype.isPureReactComponent?!Ol(a,n)||!Ol(l,s):!0}function Yc(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&so.enqueueReplaceState(t,t.state,null)}function Ga(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=oe({},a));for(var l in e)a[l]===void 0&&(a[l]=e[l])}return a}var lr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Zh(e){lr(e)}function Jh(e){console.error(e)}function Fh(e){lr(e)}function sr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function $c(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function ro(e,t,a){return a=fa(a),a.tag=3,a.payload={element:null},a.callback=function(){sr(e,t)},a}function Ph(e){return e=fa(e),e.tag=3,e}function Wh(e,t,a,n){var l=a.type.getDerivedStateFromError;if(typeof l=="function"){var s=n.value;e.payload=function(){return l(s)},e.callback=function(){$c(t,a,n)}}var r=a.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){$c(t,a,n),typeof l!="function"&&(ha===null?ha=new Set([this]):ha.add(this));var i=n.stack;this.componentDidCatch(n.value,{componentStack:i!==null?i:""})})}function q0(e,t,a,n,l){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Fl(t,a,l,!0),a=ut.current,a!==null){switch(a.tag){case 13:return Ct===null?go():a.alternate===null&&ve===0&&(ve=3),a.flags&=-257,a.flags|=65536,a.lanes=l,n===Wi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),bi(e,n,l)),!1;case 22:return a.flags|=65536,n===Wi?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),bi(e,n,l)),!1}throw Error(T(435,a.tag))}return bi(e,n,l),go(),!1}if(W)return t=ut.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=l,n!==Ki&&(e=Error(T(422),{cause:n}),zl(it(e,a)))):(n!==Ki&&(t=Error(T(423),{cause:n}),zl(it(t,a))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,n=it(n,a),l=ro(e.stateNode,n,l),ii(e,l),ve!==4&&(ve=2)),!1;var s=Error(T(520),{cause:n});if(s=it(s,a),Nl===null?Nl=[s]:Nl.push(s),ve!==4&&(ve=2),t===null)return!0;n=it(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=l&-l,a.lanes|=e,e=ro(a.stateNode,n,e),ii(a,e),!1;case 1:if(t=a.type,s=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(ha===null||!ha.has(s))))return a.flags|=65536,l&=-l,a.lanes|=l,l=Ph(l),Wh(l,e,a,n),ii(a,l),!1}a=a.return}while(a!==null);return!1}var Ih=Error(T(461)),Re=!1;function ke(e,t,a,n){t.child=e===null?Qh(t,null,a,n):zn(t,e.child,a,n)}function Xc(e,t,a,n,l){a=a.render;var s=t.ref;if("ref"in n){var r={};for(var i in n)i!=="ref"&&(r[i]=n[i])}else r=n;return Ha(t),n=cu(e,t,a,r,s,l),i=fu(),e!==null&&!Re?(du(e,t,l),$t(e,t,l)):(W&&i&&nu(t),t.flags|=1,ke(e,t,n,l),t.child)}function Qc(e,t,a,n,l){if(e===null){var s=a.type;return typeof s=="function"&&!au(s)&&s.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=s,em(e,t,s,n,l)):(e=Ms(a.type,null,n,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Su(e,l)){var r=s.memoizedProps;if(a=a.compare,a=a!==null?a:Ol,a(r,n)&&e.ref===t.ref)return $t(e,t,l)}return t.flags|=1,e=Bt(s,n),e.ref=t.ref,e.return=t,t.child=e}function em(e,t,a,n,l){if(e!==null){var s=e.memoizedProps;if(Ol(s,n)&&e.ref===t.ref)if(Re=!1,t.pendingProps=n=s,Su(e,l))e.flags&131072&&(Re=!0);else return t.lanes=e.lanes,$t(e,t,l)}return io(e,t,a,n,l)}function tm(e,t,a){var n=t.pendingProps,l=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden"){if(t.flags&128){if(n=s!==null?s.baseLanes|a:a,e!==null){for(l=t.child=e.child,s=0;l!==null;)s=s|l.lanes|l.childLanes,l=l.sibling;t.childLanes=s&~n}else t.childLanes=0,t.child=null;return Kc(e,t,n,a)}if(a&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ks(t,s!==null?s.cachePool:null),s!==null?Dc(t,s):to(),Kh(t);else return t.lanes=t.childLanes=536870912,Kc(e,t,s!==null?s.baseLanes|a:a,a)}else s!==null?(ks(t,s.cachePool),Dc(t,s),la(),t.memoizedState=null):(e!==null&&ks(t,null),to(),la());return ke(e,t,l,a),t.child}function Kc(e,t,a,n){var l=ru();return l=l===null?null:{parent:Ne._currentValue,pool:l},t.memoizedState={baseLanes:a,cachePool:l},e!==null&&ks(t,null),to(),Kh(t),e!==null&&Fl(e,t,n,!0),null}function Us(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(T(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function io(e,t,a,n,l){return Ha(t),a=cu(e,t,a,n,void 0,l),n=fu(),e!==null&&!Re?(du(e,t,l),$t(e,t,l)):(W&&n&&nu(t),t.flags|=1,ke(e,t,a,l),t.child)}function Zc(e,t,a,n,l,s){return Ha(t),t.updateQueue=null,a=mh(t,n,a,l),hh(e),n=fu(),e!==null&&!Re?(du(e,t,s),$t(e,t,s)):(W&&n&&nu(t),t.flags|=1,ke(e,t,a,s),t.child)}function Jc(e,t,a,n,l){if(Ha(t),t.stateNode===null){var s=dn,r=a.contextType;typeof r=="object"&&r!==null&&(s=_e(r)),s=new a(n,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=so,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=n,s.state=t.memoizedState,s.refs={},iu(t),r=a.contextType,s.context=typeof r=="object"&&r!==null?_e(r):dn,s.state=t.memoizedState,r=a.getDerivedStateFromProps,typeof r=="function"&&(ui(t,a,r,n),s.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(r=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),r!==s.state&&so.enqueueReplaceState(s,s.state,null),xl(t,n,s,l),vl(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){s=t.stateNode;var i=t.memoizedProps,o=Ga(a,i);s.props=o;var c=s.context,f=a.contextType;r=dn,typeof f=="object"&&f!==null&&(r=_e(f));var h=a.getDerivedStateFromProps;f=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function",i=t.pendingProps!==i,f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i||c!==r)&&Yc(t,s,n,r),ta=!1;var d=t.memoizedState;s.state=d,xl(t,n,s,l),vl(),c=t.memoizedState,i||d!==c||ta?(typeof h=="function"&&(ui(t,a,h,n),c=t.memoizedState),(o=ta||Vc(t,a,o,n,d,c,r))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),s.props=n,s.state=c,s.context=r,n=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Ii(e,t),r=t.memoizedProps,f=Ga(a,r),s.props=f,h=t.pendingProps,d=s.context,c=a.contextType,o=dn,typeof c=="object"&&c!==null&&(o=_e(c)),i=a.getDerivedStateFromProps,(c=typeof i=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(r!==h||d!==o)&&Yc(t,s,n,o),ta=!1,d=t.memoizedState,s.state=d,xl(t,n,s,l),vl();var y=t.memoizedState;r!==h||d!==y||ta||e!==null&&e.dependencies!==null&&Ws(e.dependencies)?(typeof i=="function"&&(ui(t,a,i,n),y=t.memoizedState),(f=ta||Vc(t,a,f,n,d,y,o)||e!==null&&e.dependencies!==null&&Ws(e.dependencies))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,y,o),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,y,o)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),s.props=n,s.state=y,s.context=o,n=f):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return s=n,Us(e,t),n=(t.flags&128)!==0,s||n?(s=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&n?(t.child=zn(t,e.child,null,l),t.child=zn(t,null,a,l)):ke(e,t,a,l),t.memoizedState=s.state,e=t.child):e=$t(e,t,l),e}function Fc(e,t,a,n){return Jl(),t.flags|=256,ke(e,t,a,n),t.child}var ci={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fi(e){return{baseLanes:e,cachePool:oh()}}function di(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ot),e}function am(e,t,a){var n=t.pendingProps,l=!1,s=(t.flags&128)!==0,r;if((r=s)||(r=e!==null&&e.memoizedState===null?!1:(je.current&2)!==0),r&&(l=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(W){if(l?na(t):la(),W){var i=ye,o;if(o=i){e:{for(o=i,i=St;o.nodeType!==8;){if(!i){i=null;break e}if(o=gt(o.nextSibling),o===null){i=null;break e}}i=o}i!==null?(t.memoizedState={dehydrated:i,treeContext:za!==null?{id:Lt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},o=Fe(18,null,null,0),o.stateNode=i,o.return=t,t.child=o,Be=t,ye=null,o=!0):o=!1}o||_a(t)}if(i=t.memoizedState,i!==null&&(i=i.dehydrated,i!==null))return wo(i)?t.lanes=32:t.lanes=536870912,null;Ht(t)}return i=n.children,n=n.fallback,l?(la(),l=t.mode,i=rr({mode:"hidden",children:i},l),n=Oa(n,l,a,null),i.return=t,n.return=t,i.sibling=n,t.child=i,l=t.child,l.memoizedState=fi(a),l.childLanes=di(e,r,a),t.memoizedState=ci,n):(na(t),oo(t,i))}if(o=e.memoizedState,o!==null&&(i=o.dehydrated,i!==null)){if(s)t.flags&256?(na(t),t.flags&=-257,t=hi(e,t,a)):t.memoizedState!==null?(la(),t.child=e.child,t.flags|=128,t=null):(la(),l=n.fallback,i=t.mode,n=rr({mode:"visible",children:n.children},i),l=Oa(l,i,a,null),l.flags|=2,n.return=t,l.return=t,n.sibling=l,t.child=n,zn(t,e.child,null,a),n=t.child,n.memoizedState=fi(a),n.childLanes=di(e,r,a),t.memoizedState=ci,t=l);else if(na(t),wo(i)){if(r=i.nextSibling&&i.nextSibling.dataset,r)var c=r.dgst;r=c,n=Error(T(419)),n.stack="",n.digest=r,zl({value:n,source:null,stack:null}),t=hi(e,t,a)}else if(Re||Fl(e,t,a,!1),r=(a&e.childLanes)!==0,Re||r){if(r=re,r!==null&&(n=a&-a,n=n&42?1:Xo(n),n=n&(r.suspendedLanes|a)?0:n,n!==0&&n!==o.retryLane))throw o.retryLane=n,Bn(e,n),et(r,e,n),Ih;i.data==="$?"||go(),t=hi(e,t,a)}else i.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,ye=gt(i.nextSibling),Be=t,W=!0,Ma=null,St=!1,e!==null&&(lt[st++]=Lt,lt[st++]=Ut,lt[st++]=za,Lt=e.id,Ut=e.overflow,za=t),t=oo(t,n.children),t.flags|=4096);return t}return l?(la(),l=n.fallback,i=t.mode,o=e.child,c=o.sibling,n=Bt(o,{mode:"hidden",children:n.children}),n.subtreeFlags=o.subtreeFlags&65011712,c!==null?l=Bt(c,l):(l=Oa(l,i,a,null),l.flags|=2),l.return=t,n.return=t,n.sibling=l,t.child=n,n=l,l=t.child,i=e.child.memoizedState,i===null?i=fi(a):(o=i.cachePool,o!==null?(c=Ne._currentValue,o=o.parent!==c?{parent:c,pool:c}:o):o=oh(),i={baseLanes:i.baseLanes|a,cachePool:o}),l.memoizedState=i,l.childLanes=di(e,r,a),t.memoizedState=ci,n):(na(t),a=e.child,e=a.sibling,a=Bt(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=a,t.memoizedState=null,a)}function oo(e,t){return t=rr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rr(e,t){return e=Fe(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function hi(e,t,a){return zn(t,e.child,null,a),e=oo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Pc(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ji(e.return,t,a)}function mi(e,t,a,n,l){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:l}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=a,s.tailMode=l)}function nm(e,t,a){var n=t.pendingProps,l=n.revealOrder,s=n.tail;if(ke(e,t,n.children,a),n=je.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pc(e,a,t);else if(e.tag===19)Pc(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}switch(de(je,n),l){case"forwards":for(a=t.child,l=null;a!==null;)e=a.alternate,e!==null&&nr(e)===null&&(l=a),a=a.sibling;a=l,a===null?(l=t.child,t.child=null):(l=a.sibling,a.sibling=null),mi(t,!1,l,a,s);break;case"backwards":for(a=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&nr(e)===null){t.child=l;break}e=l.sibling,l.sibling=a,a=l,l=e}mi(t,!0,a,null,s);break;case"together":mi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $t(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),ba|=t.lanes,!(a&t.childLanes))if(e!==null){if(Fl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,a=Bt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Bt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Su(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Ws(e)))}function V0(e,t,a){switch(t.tag){case 3:$s(t,t.stateNode.containerInfo),aa(t,Ne,e.memoizedState.cache),Jl();break;case 27:case 5:_i(t);break;case 4:$s(t,t.stateNode.containerInfo);break;case 10:aa(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(na(t),t.flags|=128,null):a&t.child.childLanes?am(e,t,a):(na(t),e=$t(e,t,a),e!==null?e.sibling:null);na(t);break;case 19:var l=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Fl(e,t,a,!1),n=(a&t.childLanes)!==0),l){if(n)return nm(e,t,a);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),de(je,je.current),n)break;return null;case 22:case 23:return t.lanes=0,tm(e,t,a);case 24:aa(t,Ne,e.memoizedState.cache)}return $t(e,t,a)}function lm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Re=!0;else{if(!Su(e,a)&&!(t.flags&128))return Re=!1,V0(e,t,a);Re=!!(e.flags&131072)}else Re=!1,W&&t.flags&1048576&&rh(t,Ps,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var n=t.elementType,l=n._init;if(n=l(n._payload),t.type=n,typeof n=="function")au(n)?(e=Ga(n,e),t.tag=1,t=Jc(null,t,n,e,a)):(t.tag=0,t=io(null,t,n,e,a));else{if(n!=null){if(l=n.$$typeof,l===Vo){t.tag=11,t=Xc(null,t,n,e,a);break e}else if(l===Yo){t.tag=14,t=Qc(null,t,n,e,a);break e}}throw t=Li(n)||n,Error(T(306,t,""))}}return t;case 0:return io(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,l=Ga(n,t.pendingProps),Jc(e,t,n,l,a);case 3:e:{if($s(t,t.stateNode.containerInfo),e===null)throw Error(T(387));n=t.pendingProps;var s=t.memoizedState;l=s.element,Ii(e,t),xl(t,n,null,a);var r=t.memoizedState;if(n=r.cache,aa(t,Ne,n),n!==s.cache&&Fi(t,[Ne],a,!0),vl(),n=r.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Fc(e,t,n,a);break e}else if(n!==l){l=it(Error(T(424)),t),zl(l),t=Fc(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ye=gt(e.firstChild),Be=t,W=!0,Ma=null,St=!0,a=Qh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Jl(),n===l){t=$t(e,t,a);break e}ke(e,t,n,a)}t=t.child}return t;case 26:return Us(e,t),e===null?(a=gf(t.type,null,t.pendingProps,null))?t.memoizedState=a:W||(a=t.type,e=t.pendingProps,n=hr(ca.current).createElement(a),n[Ue]=t,n[Xe]=e,Le(n,a,e),Ae(n),t.stateNode=n):t.memoizedState=gf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _i(t),e===null&&W&&(n=t.stateNode=$m(t.type,t.pendingProps,ca.current),Be=t,St=!0,l=ye,wa(t.type)?(No=l,ye=gt(n.firstChild)):ye=l),ke(e,t,t.pendingProps.children,a),Us(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&W&&((l=n=ye)&&(n=py(n,t.type,t.pendingProps,St),n!==null?(t.stateNode=n,Be=t,ye=gt(n.firstChild),St=!1,l=!0):l=!1),l||_a(t)),_i(t),l=t.type,s=t.pendingProps,r=e!==null?e.memoizedProps:null,n=s.children,bo(l,s)?n=null:r!==null&&bo(l,r)&&(t.flags|=32),t.memoizedState!==null&&(l=cu(e,t,D0,null,null,a),_l._currentValue=l),Us(e,t),ke(e,t,n,a),t.child;case 6:return e===null&&W&&((e=a=ye)&&(a=yy(a,t.pendingProps,St),a!==null?(t.stateNode=a,Be=t,ye=null,e=!0):e=!1),e||_a(t)),null;case 13:return am(e,t,a);case 4:return $s(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=zn(t,null,n,a):ke(e,t,n,a),t.child;case 11:return Xc(e,t,t.type,t.pendingProps,a);case 7:return ke(e,t,t.pendingProps,a),t.child;case 8:return ke(e,t,t.pendingProps.children,a),t.child;case 12:return ke(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,aa(t,t.type,n.value),ke(e,t,n.children,a),t.child;case 9:return l=t.type._context,n=t.pendingProps.children,Ha(t),l=_e(l),n=n(l),t.flags|=1,ke(e,t,n,a),t.child;case 14:return Qc(e,t,t.type,t.pendingProps,a);case 15:return em(e,t,t.type,t.pendingProps,a);case 19:return nm(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=rr(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=Bt(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return tm(e,t,a);case 24:return Ha(t),n=_e(Ne),e===null?(l=ru(),l===null&&(l=re,s=su(),l.pooledCache=s,s.refCount++,s!==null&&(l.pooledCacheLanes|=a),l=s),t.memoizedState={parent:n,cache:l},iu(t),aa(t,Ne,l)):(e.lanes&a&&(Ii(e,t),xl(t,null,null,a),vl()),l=e.memoizedState,s=t.memoizedState,l.parent!==n?(l={parent:n,cache:n},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),aa(t,Ne,n)):(n=s.cache,aa(t,Ne,n),n!==l.cache&&Fi(t,[Ne],a,!0))),ke(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(T(156,t.tag))}function zt(e){e.flags|=4}function Wc(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Km(t)){if(t=ut.current,t!==null&&((P&4194048)===P?Ct!==null:(P&62914560)!==P&&!(P&536870912)||t!==Ct))throw pl=Wi,uh;e.flags|=8192}}function bs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Od():536870912,e.lanes|=t,Mn|=t)}function tl(e,t){if(!W)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var l=e.child;l!==null;)a|=l.lanes|l.childLanes,n|=l.subtreeFlags&65011712,n|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)a|=l.lanes|l.childLanes,n|=l.subtreeFlags,n|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Y0(e,t,a){var n=t.pendingProps;switch(lu(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ge(t),null;case 1:return ge(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Gt(Ne),En(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(In(t)?zt(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ac())),ge(t),null;case 26:return a=t.memoizedState,e===null?(zt(t),a!==null?(ge(t),Wc(t,a)):(ge(t),t.flags&=-16777217)):a?a!==e.memoizedState?(zt(t),ge(t),Wc(t,a)):(ge(t),t.flags&=-16777217):(e.memoizedProps!==n&&zt(t),ge(t),t.flags&=-16777217),null;case 27:Xs(t),a=ca.current;var l=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&zt(t);else{if(!n){if(t.stateNode===null)throw Error(T(166));return ge(t),null}e=jt.current,In(t)?Cc(t):(e=$m(l,n,a),t.stateNode=e,zt(t))}return ge(t),null;case 5:if(Xs(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&zt(t);else{if(!n){if(t.stateNode===null)throw Error(T(166));return ge(t),null}if(e=jt.current,In(t))Cc(t);else{switch(l=hr(ca.current),e){case 1:e=l.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=l.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?l.createElement("select",{is:n.is}):l.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?l.createElement(a,{is:n.is}):l.createElement(a)}}e[Ue]=t,e[Xe]=n;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)e.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=e;e:switch(Le(e,a,n),a){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&zt(t)}}return ge(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&zt(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(T(166));if(e=ca.current,In(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,l=Be,l!==null)switch(l.tag){case 27:case 5:n=l.memoizedProps}e[Ue]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||qm(e.nodeValue,a)),e||_a(t)}else e=hr(e).createTextNode(n),e[Ue]=t,t.stateNode=e}return ge(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=In(t),n!==null&&n.dehydrated!==null){if(e===null){if(!l)throw Error(T(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(T(317));l[Ue]=t}else Jl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ge(t),l=!1}else l=Ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Ht(t),t):(Ht(t),null)}if(Ht(t),t.flags&128)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,l=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(l=n.alternate.memoizedState.cachePool.pool);var s=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==l&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),bs(t,t.updateQueue),ge(t),null;case 4:return En(),e===null&&Ru(t.stateNode.containerInfo),ge(t),null;case 10:return Gt(t.type),ge(t),null;case 19:if(Oe(je),l=t.memoizedState,l===null)return ge(t),null;if(n=(t.flags&128)!==0,s=l.rendering,s===null)if(n)tl(l,!1);else{if(ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=nr(e),s!==null){for(t.flags|=128,tl(l,!1),e=s.updateQueue,t.updateQueue=e,bs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)sh(a,e),a=a.sibling;return de(je,je.current&1|2),t.child}e=e.sibling}l.tail!==null&&Et()>or&&(t.flags|=128,n=!0,tl(l,!1),t.lanes=4194304)}else{if(!n)if(e=nr(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,bs(t,e),tl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!W)return ge(t),null}else 2*Et()-l.renderingStartTime>or&&a!==536870912&&(t.flags|=128,n=!0,tl(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Et(),t.sibling=null,e=je.current,de(je,n?e&1|2:e&1),t):(ge(t),null);case 22:case 23:return Ht(t),ou(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?a&536870912&&!(t.flags&128)&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),a=t.updateQueue,a!==null&&bs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Oe(ka),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Gt(Ne),ge(t),null;case 25:return null;case 30:return null}throw Error(T(156,t.tag))}function $0(e,t){switch(lu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gt(Ne),En(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xs(t),null;case 13:if(Ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));Jl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(je),null;case 4:return En(),null;case 10:return Gt(t.type),null;case 22:case 23:return Ht(t),ou(),e!==null&&Oe(ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gt(Ne),null;case 25:return null;default:return null}}function sm(e,t){switch(lu(t),t.tag){case 3:Gt(Ne),En();break;case 26:case 27:case 5:Xs(t);break;case 4:En();break;case 13:Ht(t);break;case 19:Oe(je);break;case 10:Gt(t.type);break;case 22:case 23:Ht(t),ou(),e!==null&&Oe(ka);break;case 24:Gt(Ne)}}function ts(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var l=n.next;a=l;do{if((a.tag&e)===e){n=void 0;var s=a.create,r=a.inst;n=s(),r.destroy=n}a=a.next}while(a!==l)}}catch(i){se(t,t.return,i)}}function xa(e,t,a){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var s=l.next;n=s;do{if((n.tag&e)===e){var r=n.inst,i=r.destroy;if(i!==void 0){r.destroy=void 0,l=t;var o=a,c=i;try{c()}catch(f){se(l,o,f)}}}n=n.next}while(n!==s)}}catch(f){se(t,t.return,f)}}function rm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{dh(t,a)}catch(n){se(e,e.return,n)}}}function im(e,t,a){a.props=Ga(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){se(e,t,n)}}function Sl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(l){se(e,t,l)}}function wt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(l){se(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(l){se(e,t,l)}else a.current=null}function om(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(l){se(e,e.return,l)}}function gi(e,t,a){try{var n=e.stateNode;fy(n,e.type,a,t),n[Xe]=t}catch(l){se(e,e.return,l)}}function um(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wa(e.type)||e.tag===4}function pi(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||um(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&wa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uo(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Gr));else if(n!==4&&(n===27&&wa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(uo(e,t,a),e=e.sibling;e!==null;)uo(e,t,a),e=e.sibling}function ir(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&wa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ir(e,t,a),e=e.sibling;e!==null;)ir(e,t,a),e=e.sibling}function cm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Le(t,n,a),t[Ue]=e,t[Xe]=a}catch(s){se(e,e.return,s)}}var kt=!1,be=!1,yi=!1,Ic=typeof WeakSet=="function"?WeakSet:Set,Te=null;function X0(e,t){if(e=e.containerInfo,vo=yr,e=Pd(e),Io(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var l=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{a.nodeType,s.nodeType}catch{a=null;break e}var r=0,i=-1,o=-1,c=0,f=0,h=e,d=null;t:for(;;){for(var y;h!==a||l!==0&&h.nodeType!==3||(i=r+l),h!==s||n!==0&&h.nodeType!==3||(o=r+n),h.nodeType===3&&(r+=h.nodeValue.length),(y=h.firstChild)!==null;)d=h,h=y;for(;;){if(h===e)break t;if(d===a&&++c===l&&(i=r),d===s&&++f===n&&(o=r),(y=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=y}a=i===-1||o===-1?null:{start:i,end:o}}else a=null}a=a||{start:0,end:0}}else a=null;for(xo={focusedElem:e,selectionRange:a},yr=!1,Te=t;Te!==null;)if(t=Te,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Te=e;else for(;Te!==null;){switch(t=Te,s=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&s!==null){e=void 0,a=t,l=s.memoizedProps,s=s.memoizedState,n=a.stateNode;try{var S=Ga(a.type,l,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(S,s),n.__reactInternalSnapshotBeforeUpdate=e}catch(v){se(a,a.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)So(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":So(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(T(163))}if(e=t.sibling,e!==null){e.return=t.return,Te=e;break}Te=t.return}}function fm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ft(e,a),n&4&&ts(5,a);break;case 1:if(Ft(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(r){se(a,a.return,r)}else{var l=Ga(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){se(a,a.return,r)}}n&64&&rm(a),n&512&&Sl(a,a.return);break;case 3:if(Ft(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{dh(e,t)}catch(r){se(a,a.return,r)}}break;case 27:t===null&&n&4&&cm(a);case 26:case 5:Ft(e,a),t===null&&n&4&&om(a),n&512&&Sl(a,a.return);break;case 12:Ft(e,a);break;case 13:Ft(e,a),n&4&&mm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=ey.bind(null,a),vy(e,a))));break;case 22:if(n=a.memoizedState!==null||kt,!n){t=t!==null&&t.memoizedState!==null||be,l=kt;var s=be;kt=n,(be=t)&&!s?It(e,a,(a.subtreeFlags&8772)!==0):Ft(e,a),kt=l,be=s}break;case 30:break;default:Ft(e,a)}}function dm(e){var t=e.alternate;t!==null&&(e.alternate=null,dm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ko(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ce=null,Ye=!1;function Mt(e,t,a){for(a=a.child;a!==null;)hm(e,t,a),a=a.sibling}function hm(e,t,a){if(Pe&&typeof Pe.onCommitFiberUnmount=="function")try{Pe.onCommitFiberUnmount($l,a)}catch{}switch(a.tag){case 26:be||wt(a,t),Mt(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:be||wt(a,t);var n=ce,l=Ye;wa(a.type)&&(ce=a.stateNode,Ye=!1),Mt(e,t,a),El(a.stateNode),ce=n,Ye=l;break;case 5:be||wt(a,t);case 6:if(n=ce,l=Ye,ce=null,Mt(e,t,a),ce=n,Ye=l,ce!==null)if(Ye)try{(ce.nodeType===9?ce.body:ce.nodeName==="HTML"?ce.ownerDocument.body:ce).removeChild(a.stateNode)}catch(s){se(a,t,s)}else try{ce.removeChild(a.stateNode)}catch(s){se(a,t,s)}break;case 18:ce!==null&&(Ye?(e=ce,df(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Gl(e)):df(ce,a.stateNode));break;case 4:n=ce,l=Ye,ce=a.stateNode.containerInfo,Ye=!0,Mt(e,t,a),ce=n,Ye=l;break;case 0:case 11:case 14:case 15:be||xa(2,a,t),be||xa(4,a,t),Mt(e,t,a);break;case 1:be||(wt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&im(a,t,n)),Mt(e,t,a);break;case 21:Mt(e,t,a);break;case 22:be=(n=be)||a.memoizedState!==null,Mt(e,t,a),be=n;break;default:Mt(e,t,a)}}function mm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gl(e)}catch(a){se(t,t.return,a)}}function Q0(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ic),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ic),t;default:throw Error(T(435,e.tag))}}function vi(e,t){var a=Q0(e);t.forEach(function(n){var l=ty.bind(null,e,n);a.has(n)||(a.add(n),n.then(l,l))})}function Ke(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var l=a[n],s=e,r=t,i=r;e:for(;i!==null;){switch(i.tag){case 27:if(wa(i.type)){ce=i.stateNode,Ye=!1;break e}break;case 5:ce=i.stateNode,Ye=!1;break e;case 3:case 4:ce=i.stateNode.containerInfo,Ye=!0;break e}i=i.return}if(ce===null)throw Error(T(160));hm(s,r,l),ce=null,Ye=!1,s=l.alternate,s!==null&&(s.return=null),l.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)gm(t,e),t=t.sibling}var mt=null;function gm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ke(t,e),Ze(e),n&4&&(xa(3,e,e.return),ts(3,e),xa(5,e,e.return));break;case 1:Ke(t,e),Ze(e),n&512&&(be||a===null||wt(a,a.return)),n&64&&kt&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var l=mt;if(Ke(t,e),Ze(e),n&512&&(be||a===null||wt(a,a.return)),n&4){var s=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,l=l.ownerDocument||l;t:switch(n){case"title":s=l.getElementsByTagName("title")[0],(!s||s[Kl]||s[Ue]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=l.createElement(n),l.head.insertBefore(s,l.querySelector("head > title"))),Le(s,n,a),s[Ue]=e,Ae(s),n=s;break e;case"link":var r=yf("link","href",l).get(n+(a.href||""));if(r){for(var i=0;i<r.length;i++)if(s=r[i],s.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&s.getAttribute("rel")===(a.rel==null?null:a.rel)&&s.getAttribute("title")===(a.title==null?null:a.title)&&s.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){r.splice(i,1);break t}}s=l.createElement(n),Le(s,n,a),l.head.appendChild(s);break;case"meta":if(r=yf("meta","content",l).get(n+(a.content||""))){for(i=0;i<r.length;i++)if(s=r[i],s.getAttribute("content")===(a.content==null?null:""+a.content)&&s.getAttribute("name")===(a.name==null?null:a.name)&&s.getAttribute("property")===(a.property==null?null:a.property)&&s.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&s.getAttribute("charset")===(a.charSet==null?null:a.charSet)){r.splice(i,1);break t}}s=l.createElement(n),Le(s,n,a),l.head.appendChild(s);break;default:throw Error(T(468,n))}s[Ue]=e,Ae(s),n=s}e.stateNode=n}else vf(l,e.type,e.stateNode);else e.stateNode=pf(l,n,e.memoizedProps);else s!==n?(s===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):s.count--,n===null?vf(l,e.type,e.stateNode):pf(l,n,e.memoizedProps)):n===null&&e.stateNode!==null&&gi(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ke(t,e),Ze(e),n&512&&(be||a===null||wt(a,a.return)),a!==null&&n&4&&gi(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ke(t,e),Ze(e),n&512&&(be||a===null||wt(a,a.return)),e.flags&32){l=e.stateNode;try{Tn(l,"")}catch(y){se(e,e.return,y)}}n&4&&e.stateNode!=null&&(l=e.memoizedProps,gi(e,l,a!==null?a.memoizedProps:l)),n&1024&&(yi=!0);break;case 6:if(Ke(t,e),Ze(e),n&4){if(e.stateNode===null)throw Error(T(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(y){se(e,e.return,y)}}break;case 3:if(Bs=null,l=mt,mt=mr(t.containerInfo),Ke(t,e),mt=l,Ze(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(y){se(e,e.return,y)}yi&&(yi=!1,pm(e));break;case 4:n=mt,mt=mr(e.stateNode.containerInfo),Ke(t,e),Ze(e),mt=n;break;case 12:Ke(t,e),Ze(e);break;case 13:Ke(t,e),Ze(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Cu=Et()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,vi(e,n)));break;case 22:l=e.memoizedState!==null;var o=a!==null&&a.memoizedState!==null,c=kt,f=be;if(kt=c||l,be=f||o,Ke(t,e),be=f,kt=c,Ze(e),n&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(a===null||o||kt||be||Aa(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){o=a=t;try{if(s=o.stateNode,l)r=s.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{i=o.stateNode;var h=o.memoizedProps.style,d=h!=null&&h.hasOwnProperty("display")?h.display:null;i.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(y){se(o,o.return,y)}}}else if(t.tag===6){if(a===null){o=t;try{o.stateNode.nodeValue=l?"":o.memoizedProps}catch(y){se(o,o.return,y)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,vi(e,a))));break;case 19:Ke(t,e),Ze(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,vi(e,n)));break;case 30:break;case 21:break;default:Ke(t,e),Ze(e)}}function Ze(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(um(n)){a=n;break}n=n.return}if(a==null)throw Error(T(160));switch(a.tag){case 27:var l=a.stateNode,s=pi(e);ir(e,s,l);break;case 5:var r=a.stateNode;a.flags&32&&(Tn(r,""),a.flags&=-33);var i=pi(e);ir(e,i,r);break;case 3:case 4:var o=a.stateNode.containerInfo,c=pi(e);uo(e,c,o);break;default:throw Error(T(161))}}catch(f){se(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ft(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fm(e,t.alternate,t),t=t.sibling}function Aa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xa(4,t,t.return),Aa(t);break;case 1:wt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&im(t,t.return,a),Aa(t);break;case 27:El(t.stateNode);case 26:case 5:wt(t,t.return),Aa(t);break;case 22:t.memoizedState===null&&Aa(t);break;case 30:Aa(t);break;default:Aa(t)}e=e.sibling}}function It(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,l=e,s=t,r=s.flags;switch(s.tag){case 0:case 11:case 15:It(l,s,a),ts(4,s);break;case 1:if(It(l,s,a),n=s,l=n.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(c){se(n,n.return,c)}if(n=s,l=n.updateQueue,l!==null){var i=n.stateNode;try{var o=l.shared.hiddenCallbacks;if(o!==null)for(l.shared.hiddenCallbacks=null,l=0;l<o.length;l++)fh(o[l],i)}catch(c){se(n,n.return,c)}}a&&r&64&&rm(s),Sl(s,s.return);break;case 27:cm(s);case 26:case 5:It(l,s,a),a&&n===null&&r&4&&om(s),Sl(s,s.return);break;case 12:It(l,s,a);break;case 13:It(l,s,a),a&&r&4&&mm(l,s);break;case 22:s.memoizedState===null&&It(l,s,a),Sl(s,s.return);break;case 30:break;default:It(l,s,a)}t=t.sibling}}function wu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Pl(a))}function Nu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pl(e))}function xt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ym(e,t,a,n),t=t.sibling}function ym(e,t,a,n){var l=t.flags;switch(t.tag){case 0:case 11:case 15:xt(e,t,a,n),l&2048&&ts(9,t);break;case 1:xt(e,t,a,n);break;case 3:xt(e,t,a,n),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pl(e)));break;case 12:if(l&2048){xt(e,t,a,n),e=t.stateNode;try{var s=t.memoizedProps,r=s.id,i=s.onPostCommit;typeof i=="function"&&i(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){se(t,t.return,o)}}else xt(e,t,a,n);break;case 13:xt(e,t,a,n);break;case 23:break;case 22:s=t.stateNode,r=t.alternate,t.memoizedState!==null?s._visibility&2?xt(e,t,a,n):wl(e,t):s._visibility&2?xt(e,t,a,n):(s._visibility|=2,tn(e,t,a,n,(t.subtreeFlags&10256)!==0)),l&2048&&wu(r,t);break;case 24:xt(e,t,a,n),l&2048&&Nu(t.alternate,t);break;default:xt(e,t,a,n)}}function tn(e,t,a,n,l){for(l=l&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var s=e,r=t,i=a,o=n,c=r.flags;switch(r.tag){case 0:case 11:case 15:tn(s,r,i,o,l),ts(8,r);break;case 23:break;case 22:var f=r.stateNode;r.memoizedState!==null?f._visibility&2?tn(s,r,i,o,l):wl(s,r):(f._visibility|=2,tn(s,r,i,o,l)),l&&c&2048&&wu(r.alternate,r);break;case 24:tn(s,r,i,o,l),l&&c&2048&&Nu(r.alternate,r);break;default:tn(s,r,i,o,l)}t=t.sibling}}function wl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,l=n.flags;switch(n.tag){case 22:wl(a,n),l&2048&&wu(n.alternate,n);break;case 24:wl(a,n),l&2048&&Nu(n.alternate,n);break;default:wl(a,n)}t=t.sibling}}var cl=8192;function Qa(e){if(e.subtreeFlags&cl)for(e=e.child;e!==null;)vm(e),e=e.sibling}function vm(e){switch(e.tag){case 26:Qa(e),e.flags&cl&&e.memoizedState!==null&&zy(mt,e.memoizedState,e.memoizedProps);break;case 5:Qa(e);break;case 3:case 4:var t=mt;mt=mr(e.stateNode.containerInfo),Qa(e),mt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=cl,cl=16777216,Qa(e),cl=t):Qa(e));break;default:Qa(e)}}function xm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Te=n,Sm(n,e)}xm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bm(e),e=e.sibling}function bm(e){switch(e.tag){case 0:case 11:case 15:al(e),e.flags&2048&&xa(9,e,e.return);break;case 3:al(e);break;case 12:al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,_s(e)):al(e);break;default:al(e)}}function _s(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Te=n,Sm(n,e)}xm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xa(8,t,t.return),_s(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,_s(t));break;default:_s(t)}e=e.sibling}}function Sm(e,t){for(;Te!==null;){var a=Te;switch(a.tag){case 0:case 11:case 15:xa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Pl(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Te=n;else e:for(a=e;Te!==null;){n=Te;var l=n.sibling,s=n.return;if(dm(n),n===a){Te=null;break e}if(l!==null){l.return=s,Te=l;break e}Te=s}}}var K0={getCacheForType:function(e){var t=_e(Ne),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},Z0=typeof WeakMap=="function"?WeakMap:Map,ae=0,re=null,Q=null,P=0,te=0,Je=null,oa=!1,Gn=!1,ju=!1,Xt=0,ve=0,ba=0,Da=0,Eu=0,ot=0,Mn=0,Nl=null,$e=null,co=!1,Cu=0,or=1/0,ur=null,ha=null,De=0,ma=null,kn=null,Nn=0,fo=0,ho=null,wm=null,jl=0,mo=null;function Ie(){if(ae&2&&P!==0)return P&-P;if(H.T!==null){var e=An;return e!==0?e:Au()}return kd()}function Nm(){ot===0&&(ot=!(P&536870912)||W?Rd():536870912);var e=ut.current;return e!==null&&(e.flags|=32),ot}function et(e,t,a){(e===re&&(te===2||te===9)||e.cancelPendingCommit!==null)&&(Dn(e,0),ua(e,P,ot,!1)),Ql(e,a),(!(ae&2)||e!==re)&&(e===re&&(!(ae&2)&&(Da|=a),ve===4&&ua(e,P,ot,!1)),At(e))}function jm(e,t,a){if(ae&6)throw Error(T(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||Xl(e,t),l=n?P0(e,t):xi(e,t,!0),s=n;do{if(l===0){Gn&&!n&&ua(e,t,0,!1);break}else{if(a=e.current.alternate,s&&!J0(a)){l=xi(e,t,!1),s=!1;continue}if(l===2){if(s=t,e.errorRecoveryDisabledLanes&s)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var i=e;l=Nl;var o=i.current.memoizedState.isDehydrated;if(o&&(Dn(i,r).flags|=256),r=xi(i,r,!1),r!==2){if(ju&&!o){i.errorRecoveryDisabledLanes|=s,Da|=s,l=4;break e}s=$e,$e=l,s!==null&&($e===null?$e=s:$e.push.apply($e,s))}l=r}if(s=!1,l!==2)continue}}if(l===1){Dn(e,0),ua(e,t,0,!0);break}e:{switch(n=e,s=l,s){case 0:case 1:throw Error(T(345));case 4:if((t&4194048)!==t)break;case 6:ua(n,t,ot,!oa);break e;case 2:$e=null;break;case 3:case 5:break;default:throw Error(T(329))}if((t&62914560)===t&&(l=Cu+300-Et(),10<l)){if(ua(n,t,ot,!oa),Tr(n,0,!0)!==0)break e;n.timeoutHandle=Ym(ef.bind(null,n,a,$e,ur,co,t,ot,Da,Mn,oa,s,2,-0,0),l);break e}ef(n,a,$e,ur,co,t,ot,Da,Mn,oa,s,0,-0,0)}}break}while(!0);At(e)}function ef(e,t,a,n,l,s,r,i,o,c,f,h,d,y){if(e.timeoutHandle=-1,h=t.subtreeFlags,(h&8192||(h&16785408)===16785408)&&(Ul={stylesheets:null,count:0,unsuspend:Oy},vm(t),h=My(),h!==null)){e.cancelPendingCommit=h(af.bind(null,e,t,s,a,n,l,r,i,o,f,1,d,y)),ua(e,s,r,!c);return}af(e,t,s,a,n,l,r,i,o)}function J0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var l=a[n],s=l.getSnapshot;l=l.value;try{if(!tt(s(),l))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ua(e,t,a,n){t&=~Eu,t&=~Da,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var l=t;0<l;){var s=31-We(l),r=1<<s;n[s]=-1,l&=~r}a!==0&&zd(e,a,t)}function _r(){return ae&6?!0:(as(0),!1)}function Tu(){if(Q!==null){if(te===0)var e=Q.return;else e=Q,_t=$a=null,hu(e),wn=null,kl=0,e=Q;for(;e!==null;)sm(e.alternate,e),e=e.return;Q=null}}function Dn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,hy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Tu(),re=e,Q=a=Bt(e.current,null),P=t,te=0,Je=null,oa=!1,Gn=Xl(e,t),ju=!1,Mn=ot=Eu=Da=ba=ve=0,$e=Nl=null,co=!1,t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var l=31-We(n),s=1<<l;t|=e[l],n&=~s}return Xt=t,zr(),a}function Em(e,t){$=null,H.H=ar,t===Wl||t===kr?(t=Mc(),te=3):t===uh?(t=Mc(),te=4):te=t===Ih?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Je=t,Q===null&&(ve=1,sr(e,it(t,e.current)))}function Cm(){var e=H.H;return H.H=ar,e===null?ar:e}function Tm(){var e=H.A;return H.A=K0,e}function go(){ve=4,oa||(P&4194048)!==P&&ut.current!==null||(Gn=!0),!(ba&134217727)&&!(Da&134217727)||re===null||ua(re,P,ot,!1)}function xi(e,t,a){var n=ae;ae|=2;var l=Cm(),s=Tm();(re!==e||P!==t)&&(ur=null,Dn(e,t)),t=!1;var r=ve;e:do try{if(te!==0&&Q!==null){var i=Q,o=Je;switch(te){case 8:Tu(),r=6;break e;case 3:case 2:case 9:case 6:ut.current===null&&(t=!0);var c=te;if(te=0,Je=null,gn(e,i,o,c),a&&Gn){r=0;break e}break;default:c=te,te=0,Je=null,gn(e,i,o,c)}}F0(),r=ve;break}catch(f){Em(e,f)}while(!0);return t&&e.shellSuspendCounter++,_t=$a=null,ae=n,H.H=l,H.A=s,Q===null&&(re=null,P=0,zr()),r}function F0(){for(;Q!==null;)Am(Q)}function P0(e,t){var a=ae;ae|=2;var n=Cm(),l=Tm();re!==e||P!==t?(ur=null,or=Et()+500,Dn(e,t)):Gn=Xl(e,t);e:do try{if(te!==0&&Q!==null){t=Q;var s=Je;t:switch(te){case 1:te=0,Je=null,gn(e,t,s,1);break;case 2:case 9:if(zc(s)){te=0,Je=null,tf(t);break}t=function(){te!==2&&te!==9||re!==e||(te=7),At(e)},s.then(t,t);break e;case 3:te=7;break e;case 4:te=5;break e;case 7:zc(s)?(te=0,Je=null,tf(t)):(te=0,Je=null,gn(e,t,s,7));break;case 5:var r=null;switch(Q.tag){case 26:r=Q.memoizedState;case 5:case 27:var i=Q;if(!r||Km(r)){te=0,Je=null;var o=i.sibling;if(o!==null)Q=o;else{var c=i.return;c!==null?(Q=c,Hr(c)):Q=null}break t}}te=0,Je=null,gn(e,t,s,5);break;case 6:te=0,Je=null,gn(e,t,s,6);break;case 8:Tu(),ve=6;break e;default:throw Error(T(462))}}W0();break}catch(f){Em(e,f)}while(!0);return _t=$a=null,H.H=n,H.A=l,ae=a,Q!==null?0:(re=null,P=0,zr(),ve)}function W0(){for(;Q!==null&&!bp();)Am(Q)}function Am(e){var t=lm(e.alternate,e,Xt);e.memoizedProps=e.pendingProps,t===null?Hr(e):Q=t}function tf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Zc(a,t,t.pendingProps,t.type,void 0,P);break;case 11:t=Zc(a,t,t.pendingProps,t.type.render,t.ref,P);break;case 5:hu(t);default:sm(a,t),t=Q=sh(t,Xt),t=lm(a,t,Xt)}e.memoizedProps=e.pendingProps,t===null?Hr(e):Q=t}function gn(e,t,a,n){_t=$a=null,hu(t),wn=null,kl=0;var l=t.return;try{if(q0(e,l,t,a,P)){ve=1,sr(e,it(a,e.current)),Q=null;return}}catch(s){if(l!==null)throw Q=l,s;ve=1,sr(e,it(a,e.current)),Q=null;return}t.flags&32768?(W||n===1?e=!0:Gn||P&536870912?e=!1:(oa=e=!0,(n===2||n===9||n===3||n===6)&&(n=ut.current,n!==null&&n.tag===13&&(n.flags|=16384))),Rm(t,e)):Hr(t)}function Hr(e){var t=e;do{if(t.flags&32768){Rm(t,oa);return}e=t.return;var a=Y0(t.alternate,t,Xt);if(a!==null){Q=a;return}if(t=t.sibling,t!==null){Q=t;return}Q=t=e}while(t!==null);ve===0&&(ve=5)}function Rm(e,t){do{var a=$0(e.alternate,e);if(a!==null){a.flags&=32767,Q=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Q=e;return}Q=e=a}while(e!==null);ve=6,Q=null}function af(e,t,a,n,l,s,r,i,o){e.cancelPendingCommit=null;do Br();while(De!==0);if(ae&6)throw Error(T(327));if(t!==null){if(t===e.current)throw Error(T(177));if(s=t.lanes|t.childLanes,s|=eu,Op(e,a,s,r,i,o),e===re&&(Q=re=null,P=0),kn=t,ma=e,Nn=a,fo=s,ho=l,wm=n,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ay(Qs,function(){return Dm(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,t.subtreeFlags&13878||n){n=H.T,H.T=null,l=I.p,I.p=2,r=ae,ae|=4;try{X0(e,t,a)}finally{ae=r,I.p=l,H.T=n}}De=1,Om(),zm(),Mm()}}function Om(){if(De===1){De=0;var e=ma,t=kn,a=(t.flags&13878)!==0;if(t.subtreeFlags&13878||a){a=H.T,H.T=null;var n=I.p;I.p=2;var l=ae;ae|=4;try{gm(t,e);var s=xo,r=Pd(e.containerInfo),i=s.focusedElem,o=s.selectionRange;if(r!==i&&i&&i.ownerDocument&&Fd(i.ownerDocument.documentElement,i)){if(o!==null&&Io(i)){var c=o.start,f=o.end;if(f===void 0&&(f=c),"selectionStart"in i)i.selectionStart=c,i.selectionEnd=Math.min(f,i.value.length);else{var h=i.ownerDocument||document,d=h&&h.defaultView||window;if(d.getSelection){var y=d.getSelection(),S=i.textContent.length,v=Math.min(o.start,S),w=o.end===void 0?v:Math.min(o.end,S);!y.extend&&v>w&&(r=w,w=v,v=r);var g=Nc(i,v),m=Nc(i,w);if(g&&m&&(y.rangeCount!==1||y.anchorNode!==g.node||y.anchorOffset!==g.offset||y.focusNode!==m.node||y.focusOffset!==m.offset)){var p=h.createRange();p.setStart(g.node,g.offset),y.removeAllRanges(),v>w?(y.addRange(p),y.extend(m.node,m.offset)):(p.setEnd(m.node,m.offset),y.addRange(p))}}}}for(h=[],y=i;y=y.parentNode;)y.nodeType===1&&h.push({element:y,left:y.scrollLeft,top:y.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<h.length;i++){var b=h[i];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yr=!!vo,xo=vo=null}finally{ae=l,I.p=n,H.T=a}}e.current=t,De=2}}function zm(){if(De===2){De=0;var e=ma,t=kn,a=(t.flags&8772)!==0;if(t.subtreeFlags&8772||a){a=H.T,H.T=null;var n=I.p;I.p=2;var l=ae;ae|=4;try{fm(e,t.alternate,t)}finally{ae=l,I.p=n,H.T=a}}De=3}}function Mm(){if(De===4||De===3){De=0,Sp();var e=ma,t=kn,a=Nn,n=wm;t.subtreeFlags&10256||t.flags&10256?De=5:(De=0,kn=ma=null,km(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(ha=null),Qo(a),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot=="function")try{Pe.onCommitFiberRoot($l,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=H.T,l=I.p,I.p=2,H.T=null;try{for(var s=e.onRecoverableError,r=0;r<n.length;r++){var i=n[r];s(i.value,{componentStack:i.stack})}}finally{H.T=t,I.p=l}}Nn&3&&Br(),At(e),l=e.pendingLanes,a&4194090&&l&42?e===mo?jl++:(jl=0,mo=e):jl=0,as(0)}}function km(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Pl(t)))}function Br(e){return Om(),zm(),Mm(),Dm()}function Dm(){if(De!==5)return!1;var e=ma,t=fo;fo=0;var a=Qo(Nn),n=H.T,l=I.p;try{I.p=32>a?32:a,H.T=null,a=ho,ho=null;var s=ma,r=Nn;if(De=0,kn=ma=null,Nn=0,ae&6)throw Error(T(331));var i=ae;if(ae|=4,bm(s.current),ym(s,s.current,r,a),ae=i,as(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot=="function")try{Pe.onPostCommitFiberRoot($l,s)}catch{}return!0}finally{I.p=l,H.T=n,km(e,t)}}function nf(e,t,a){t=it(a,t),t=ro(e.stateNode,t,2),e=da(e,t,2),e!==null&&(Ql(e,2),At(e))}function se(e,t,a){if(e.tag===3)nf(e,e,a);else for(;t!==null;){if(t.tag===3){nf(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ha===null||!ha.has(n))){e=it(a,e),a=Ph(2),n=da(t,a,2),n!==null&&(Wh(a,n,t,e),Ql(n,2),At(n));break}}t=t.return}}function bi(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Z0;var l=new Set;n.set(t,l)}else l=n.get(t),l===void 0&&(l=new Set,n.set(t,l));l.has(a)||(ju=!0,l.add(a),e=I0.bind(null,e,t,a),t.then(e,e))}function I0(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,re===e&&(P&a)===a&&(ve===4||ve===3&&(P&62914560)===P&&300>Et()-Cu?!(ae&2)&&Dn(e,0):Eu|=a,Mn===P&&(Mn=0)),At(e)}function Lm(e,t){t===0&&(t=Od()),e=Bn(e,t),e!==null&&(Ql(e,t),At(e))}function ey(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Lm(e,a)}function ty(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,l=e.memoizedState;l!==null&&(a=l.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(T(314))}n!==null&&n.delete(t),Lm(e,a)}function ay(e,t){return $o(e,t)}var cr=null,an=null,po=!1,fr=!1,Si=!1,La=0;function At(e){e!==an&&e.next===null&&(an===null?cr=an=e:an=an.next=e),fr=!0,po||(po=!0,ly())}function as(e,t){if(!Si&&fr){Si=!0;do for(var a=!1,n=cr;n!==null;){if(e!==0){var l=n.pendingLanes;if(l===0)var s=0;else{var r=n.suspendedLanes,i=n.pingedLanes;s=(1<<31-We(42|e)+1)-1,s&=l&~(r&~i),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(a=!0,lf(n,s))}else s=P,s=Tr(n,n===re?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),!(s&3)||Xl(n,s)||(a=!0,lf(n,s));n=n.next}while(a);Si=!1}}function ny(){Um()}function Um(){fr=po=!1;var e=0;La!==0&&(dy()&&(e=La),La=0);for(var t=Et(),a=null,n=cr;n!==null;){var l=n.next,s=_m(n,t);s===0?(n.next=null,a===null?cr=l:a.next=l,l===null&&(an=a)):(a=n,(e!==0||s&3)&&(fr=!0)),n=l}as(e)}function _m(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,l=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var r=31-We(s),i=1<<r,o=l[r];o===-1?(!(i&a)||i&n)&&(l[r]=Rp(i,t)):o<=t&&(e.expiredLanes|=i),s&=~i}if(t=re,a=P,a=Tr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(te===2||te===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Kr(n),e.callbackNode=null,e.callbackPriority=0;if(!(a&3)||Xl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Kr(n),Qo(a)){case 2:case 8:a=Td;break;case 32:a=Qs;break;case 268435456:a=Ad;break;default:a=Qs}return n=Hm.bind(null,e),a=$o(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Kr(n),e.callbackPriority=2,e.callbackNode=null,2}function Hm(e,t){if(De!==0&&De!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Br()&&e.callbackNode!==a)return null;var n=P;return n=Tr(e,e===re?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(jm(e,n,t),_m(e,Et()),e.callbackNode!=null&&e.callbackNode===a?Hm.bind(null,e):null)}function lf(e,t){if(Br())return null;jm(e,t,!0)}function ly(){my(function(){ae&6?$o(Cd,ny):Um()})}function Au(){return La===0&&(La=Rd()),La}function sf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rs(""+e)}function rf(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function sy(e,t,a,n,l){if(t==="submit"&&a&&a.stateNode===l){var s=sf((l[Xe]||null).action),r=n.submitter;r&&(t=(t=r[Xe]||null)?sf(t.formAction):r.getAttribute("formAction"),t!==null&&(s=t,r=null));var i=new Ar("action","action",null,n,l);e.push({event:i,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(La!==0){var o=r?rf(l,r):new FormData(l);lo(a,{pending:!0,data:o,method:l.method,action:s},null,o)}}else typeof s=="function"&&(i.preventDefault(),o=r?rf(l,r):new FormData(l),lo(a,{pending:!0,data:o,method:l.method,action:s},s,o))},currentTarget:l}]})}}for(var wi=0;wi<Qi.length;wi++){var Ni=Qi[wi],ry=Ni.toLowerCase(),iy=Ni[0].toUpperCase()+Ni.slice(1);yt(ry,"on"+iy)}yt(Id,"onAnimationEnd");yt(eh,"onAnimationIteration");yt(th,"onAnimationStart");yt("dblclick","onDoubleClick");yt("focusin","onFocus");yt("focusout","onBlur");yt(j0,"onTransitionRun");yt(E0,"onTransitionStart");yt(C0,"onTransitionCancel");yt(ah,"onTransitionEnd");Cn("onMouseEnter",["mouseout","mouseover"]);Cn("onMouseLeave",["mouseout","mouseover"]);Cn("onPointerEnter",["pointerout","pointerover"]);Cn("onPointerLeave",["pointerout","pointerover"]);qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));qa("onBeforeInput",["compositionend","keypress","textInput","paste"]);qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="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(" "),oy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function Bm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],l=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var r=n.length-1;0<=r;r--){var i=n[r],o=i.instance,c=i.currentTarget;if(i=i.listener,o!==s&&l.isPropagationStopped())break e;s=i,l.currentTarget=c;try{s(l)}catch(f){lr(f)}l.currentTarget=null,s=o}else for(r=0;r<n.length;r++){if(i=n[r],o=i.instance,c=i.currentTarget,i=i.listener,o!==s&&l.isPropagationStopped())break e;s=i,l.currentTarget=c;try{s(l)}catch(f){lr(f)}l.currentTarget=null,s=o}}}}function X(e,t){var a=t[Bi];a===void 0&&(a=t[Bi]=new Set);var n=e+"__bubble";a.has(n)||(Gm(t,e,2,!1),a.add(n))}function ji(e,t,a){var n=0;t&&(n|=4),Gm(a,e,n,t)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function Ru(e){if(!e[Ss]){e[Ss]=!0,Dd.forEach(function(a){a!=="selectionchange"&&(oy.has(a)||ji(a,!1,e),ji(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ss]||(t[Ss]=!0,ji("selectionchange",!1,t))}}function Gm(e,t,a,n){switch(Wm(t)){case 2:var l=Ly;break;case 8:l=Uy;break;default:l=ku}a=l.bind(null,t,a,e),l=void 0,!Yi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),n?l!==void 0?e.addEventListener(t,a,{capture:!0,passive:l}):e.addEventListener(t,a,!0):l!==void 0?e.addEventListener(t,a,{passive:l}):e.addEventListener(t,a,!1)}function Ei(e,t,a,n,l){var s=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var r=n.tag;if(r===3||r===4){var i=n.stateNode.containerInfo;if(i===l)break;if(r===4)for(r=n.return;r!==null;){var o=r.tag;if((o===3||o===4)&&r.stateNode.containerInfo===l)return;r=r.return}for(;i!==null;){if(r=sn(i),r===null)return;if(o=r.tag,o===5||o===6||o===26||o===27){n=s=r;continue e}i=i.parentNode}}n=n.return}Vd(function(){var c=s,f=Jo(a),h=[];e:{var d=nh.get(e);if(d!==void 0){var y=Ar,S=e;switch(e){case"keypress":if(zs(a)===0)break e;case"keydown":case"keyup":y=a0;break;case"focusin":S="focus",y=ti;break;case"focusout":S="blur",y=ti;break;case"beforeblur":case"afterblur":y=ti;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=hc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=$p;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=s0;break;case Id:case eh:case th:y=Kp;break;case ah:y=i0;break;case"scroll":case"scrollend":y=Vp;break;case"wheel":y=u0;break;case"copy":case"cut":case"paste":y=Jp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=gc;break;case"toggle":case"beforetoggle":y=f0}var v=(t&4)!==0,w=!v&&(e==="scroll"||e==="scrollend"),g=v?d!==null?d+"Capture":null:d;v=[];for(var m=c,p;m!==null;){var b=m;if(p=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||p===null||g===null||(b=Al(m,g),b!=null&&v.push(Ll(m,b,p))),w)break;m=m.return}0<v.length&&(d=new y(d,S,null,a,f),h.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",d&&a!==Vi&&(S=a.relatedTarget||a.fromElement)&&(sn(S)||S[_n]))break e;if((y||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,y?(S=a.relatedTarget||a.toElement,y=c,S=S?sn(S):null,S!==null&&(w=Yl(S),v=S.tag,S!==w||v!==5&&v!==27&&v!==6)&&(S=null)):(y=null,S=c),y!==S)){if(v=hc,b="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=gc,b="onPointerLeave",g="onPointerEnter",m="pointer"),w=y==null?d:ul(y),p=S==null?d:ul(S),d=new v(b,m+"leave",y,a,f),d.target=w,d.relatedTarget=p,b=null,sn(f)===c&&(v=new v(g,m+"enter",S,a,f),v.target=p,v.relatedTarget=w,b=v),w=b,y&&S)t:{for(v=y,g=S,m=0,p=v;p;p=Ka(p))m++;for(p=0,b=g;b;b=Ka(b))p++;for(;0<m-p;)v=Ka(v),m--;for(;0<p-m;)g=Ka(g),p--;for(;m--;){if(v===g||g!==null&&v===g.alternate)break t;v=Ka(v),g=Ka(g)}v=null}else v=null;y!==null&&of(h,d,y,v,!1),S!==null&&w!==null&&of(h,w,S,v,!0)}}e:{if(d=c?ul(c):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var j=xc;else if(vc(d))if(Zd)j=S0;else{j=x0;var E=v0}else y=d.nodeName,!y||y.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&Zo(c.elementType)&&(j=xc):j=b0;if(j&&(j=j(e,c))){Kd(h,j,a,f);break e}E&&E(e,d,c),e==="focusout"&&c&&d.type==="number"&&c.memoizedProps.value!=null&&qi(d,"number",d.value)}switch(E=c?ul(c):window,e){case"focusin":(vc(E)||E.contentEditable==="true")&&(un=E,$i=c,ml=null);break;case"focusout":ml=$i=un=null;break;case"mousedown":Xi=!0;break;case"contextmenu":case"mouseup":case"dragend":Xi=!1,jc(h,a,f);break;case"selectionchange":if(N0)break;case"keydown":case"keyup":jc(h,a,f)}var N;if(Wo)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else on?Xd(e,a)&&(C="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(C="onCompositionStart");C&&($d&&a.locale!=="ko"&&(on||C!=="onCompositionStart"?C==="onCompositionEnd"&&on&&(N=Yd()):(ia=f,Fo="value"in ia?ia.value:ia.textContent,on=!0)),E=dr(c,C),0<E.length&&(C=new mc(C,e,null,a,f),h.push({event:C,listeners:E}),N?C.data=N:(N=Qd(a),N!==null&&(C.data=N)))),(N=h0?m0(e,a):g0(e,a))&&(C=dr(c,"onBeforeInput"),0<C.length&&(E=new mc("onBeforeInput","beforeinput",null,a,f),h.push({event:E,listeners:C}),E.data=N)),sy(h,e,c,a,f)}Bm(h,t)})}function Ll(e,t,a){return{instance:e,listener:t,currentTarget:a}}function dr(e,t){for(var a=t+"Capture",n=[];e!==null;){var l=e,s=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||s===null||(l=Al(e,a),l!=null&&n.unshift(Ll(e,l,s)),l=Al(e,t),l!=null&&n.push(Ll(e,l,s))),e.tag===3)return n;e=e.return}return[]}function Ka(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function of(e,t,a,n,l){for(var s=t._reactName,r=[];a!==null&&a!==n;){var i=a,o=i.alternate,c=i.stateNode;if(i=i.tag,o!==null&&o===n)break;i!==5&&i!==26&&i!==27||c===null||(o=c,l?(c=Al(a,s),c!=null&&r.unshift(Ll(a,c,o))):l||(c=Al(a,s),c!=null&&r.push(Ll(a,c,o)))),a=a.return}r.length!==0&&e.push({event:t,listeners:r})}var uy=/\r\n?/g,cy=/\u0000|\uFFFD/g;function uf(e){return(typeof e=="string"?e:""+e).replace(uy,`
|
|
49
|
+
`).replace(cy,"")}function qm(e,t){return t=uf(t),uf(e)===t}function Gr(){}function ne(e,t,a,n,l,s){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Tn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Tn(e,""+n);break;case"className":ms(e,"class",n);break;case"tabIndex":ms(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ms(e,a,n);break;case"style":qd(e,n,s);break;case"data":if(t!=="object"){ms(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Rs(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"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 s=="function"&&(a==="formAction"?(t!=="input"&&ne(e,t,"name",l.name,l,null),ne(e,t,"formEncType",l.formEncType,l,null),ne(e,t,"formMethod",l.formMethod,l,null),ne(e,t,"formTarget",l.formTarget,l,null)):(ne(e,t,"encType",l.encType,l,null),ne(e,t,"method",l.method,l,null),ne(e,t,"target",l.target,l,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Rs(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Gr);break;case"onScroll":n!=null&&X("scroll",e);break;case"onScrollEnd":n!=null&&X("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(T(61));if(a=n.__html,a!=null){if(l.children!=null)throw Error(T(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=Rs(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":X("beforetoggle",e),X("toggle",e),As(e,"popover",n);break;case"xlinkActuate":Ot(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Ot(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Ot(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Ot(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Ot(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Ot(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Ot(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Ot(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Ot(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":As(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Gp.get(a)||a,As(e,a,n))}}function yo(e,t,a,n,l,s){switch(a){case"style":qd(e,n,s);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(T(61));if(a=n.__html,a!=null){if(l.children!=null)throw Error(T(60));e.innerHTML=a}}break;case"children":typeof n=="string"?Tn(e,n):(typeof n=="number"||typeof n=="bigint")&&Tn(e,""+n);break;case"onScroll":n!=null&&X("scroll",e);break;case"onScrollEnd":n!=null&&X("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Gr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ld.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(l=a.endsWith("Capture"),t=a.slice(2,l?a.length-7:void 0),s=e[Xe]||null,s=s!=null?s[a]:null,typeof s=="function"&&e.removeEventListener(t,s,l),typeof n=="function")){typeof s!="function"&&s!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,l);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):As(e,a,n)}}}function Le(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":X("error",e),X("load",e);var n=!1,l=!1,s;for(s in a)if(a.hasOwnProperty(s)){var r=a[s];if(r!=null)switch(s){case"src":n=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(T(137,t));default:ne(e,t,s,r,a,null)}}l&&ne(e,t,"srcSet",a.srcSet,a,null),n&&ne(e,t,"src",a.src,a,null);return;case"input":X("invalid",e);var i=s=r=l=null,o=null,c=null;for(n in a)if(a.hasOwnProperty(n)){var f=a[n];if(f!=null)switch(n){case"name":l=f;break;case"type":r=f;break;case"checked":o=f;break;case"defaultChecked":c=f;break;case"value":s=f;break;case"defaultValue":i=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(T(137,t));break;default:ne(e,t,n,f,a,null)}}Hd(e,s,i,o,c,r,l,!1),Ks(e);return;case"select":X("invalid",e),n=r=s=null;for(l in a)if(a.hasOwnProperty(l)&&(i=a[l],i!=null))switch(l){case"value":s=i;break;case"defaultValue":r=i;break;case"multiple":n=i;default:ne(e,t,l,i,a,null)}t=s,a=r,e.multiple=!!n,t!=null?yn(e,!!n,t,!1):a!=null&&yn(e,!!n,a,!0);return;case"textarea":X("invalid",e),s=l=n=null;for(r in a)if(a.hasOwnProperty(r)&&(i=a[r],i!=null))switch(r){case"value":n=i;break;case"defaultValue":l=i;break;case"children":s=i;break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(T(91));break;default:ne(e,t,r,i,a,null)}Gd(e,n,l,s),Ks(e);return;case"option":for(o in a)if(a.hasOwnProperty(o)&&(n=a[o],n!=null))switch(o){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:ne(e,t,o,n,a,null)}return;case"dialog":X("beforetoggle",e),X("toggle",e),X("cancel",e),X("close",e);break;case"iframe":case"object":X("load",e);break;case"video":case"audio":for(n=0;n<Dl.length;n++)X(Dl[n],e);break;case"image":X("error",e),X("load",e);break;case"details":X("toggle",e);break;case"embed":case"source":case"link":X("error",e),X("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in a)if(a.hasOwnProperty(c)&&(n=a[c],n!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(T(137,t));default:ne(e,t,c,n,a,null)}return;default:if(Zo(t)){for(f in a)a.hasOwnProperty(f)&&(n=a[f],n!==void 0&&yo(e,t,f,n,a,void 0));return}}for(i in a)a.hasOwnProperty(i)&&(n=a[i],n!=null&&ne(e,t,i,n,a,null))}function fy(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,s=null,r=null,i=null,o=null,c=null,f=null;for(y in a){var h=a[y];if(a.hasOwnProperty(y)&&h!=null)switch(y){case"checked":break;case"value":break;case"defaultValue":o=h;default:n.hasOwnProperty(y)||ne(e,t,y,null,n,h)}}for(var d in n){var y=n[d];if(h=a[d],n.hasOwnProperty(d)&&(y!=null||h!=null))switch(d){case"type":s=y;break;case"name":l=y;break;case"checked":c=y;break;case"defaultChecked":f=y;break;case"value":r=y;break;case"defaultValue":i=y;break;case"children":case"dangerouslySetInnerHTML":if(y!=null)throw Error(T(137,t));break;default:y!==h&&ne(e,t,d,y,n,h)}}Gi(e,r,i,o,c,f,s,l);return;case"select":y=r=i=d=null;for(s in a)if(o=a[s],a.hasOwnProperty(s)&&o!=null)switch(s){case"value":break;case"multiple":y=o;default:n.hasOwnProperty(s)||ne(e,t,s,null,n,o)}for(l in n)if(s=n[l],o=a[l],n.hasOwnProperty(l)&&(s!=null||o!=null))switch(l){case"value":d=s;break;case"defaultValue":i=s;break;case"multiple":r=s;default:s!==o&&ne(e,t,l,s,n,o)}t=i,a=r,n=y,d!=null?yn(e,!!a,d,!1):!!n!=!!a&&(t!=null?yn(e,!!a,t,!0):yn(e,!!a,a?[]:"",!1));return;case"textarea":y=d=null;for(i in a)if(l=a[i],a.hasOwnProperty(i)&&l!=null&&!n.hasOwnProperty(i))switch(i){case"value":break;case"children":break;default:ne(e,t,i,null,n,l)}for(r in n)if(l=n[r],s=a[r],n.hasOwnProperty(r)&&(l!=null||s!=null))switch(r){case"value":d=l;break;case"defaultValue":y=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(T(91));break;default:l!==s&&ne(e,t,r,l,n,s)}Bd(e,d,y);return;case"option":for(var S in a)if(d=a[S],a.hasOwnProperty(S)&&d!=null&&!n.hasOwnProperty(S))switch(S){case"selected":e.selected=!1;break;default:ne(e,t,S,null,n,d)}for(o in n)if(d=n[o],y=a[o],n.hasOwnProperty(o)&&d!==y&&(d!=null||y!=null))switch(o){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:ne(e,t,o,d,n,y)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in a)d=a[v],a.hasOwnProperty(v)&&d!=null&&!n.hasOwnProperty(v)&&ne(e,t,v,null,n,d);for(c in n)if(d=n[c],y=a[c],n.hasOwnProperty(c)&&d!==y&&(d!=null||y!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(T(137,t));break;default:ne(e,t,c,d,n,y)}return;default:if(Zo(t)){for(var w in a)d=a[w],a.hasOwnProperty(w)&&d!==void 0&&!n.hasOwnProperty(w)&&yo(e,t,w,void 0,n,d);for(f in n)d=n[f],y=a[f],!n.hasOwnProperty(f)||d===y||d===void 0&&y===void 0||yo(e,t,f,d,n,y);return}}for(var g in a)d=a[g],a.hasOwnProperty(g)&&d!=null&&!n.hasOwnProperty(g)&&ne(e,t,g,null,n,d);for(h in n)d=n[h],y=a[h],!n.hasOwnProperty(h)||d===y||d==null&&y==null||ne(e,t,h,d,n,y)}var vo=null,xo=null;function hr(e){return e.nodeType===9?e:e.ownerDocument}function cf(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Vm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function bo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ci=null;function dy(){var e=window.event;return e&&e.type==="popstate"?e===Ci?!1:(Ci=e,!0):(Ci=null,!1)}var Ym=typeof setTimeout=="function"?setTimeout:void 0,hy=typeof clearTimeout=="function"?clearTimeout:void 0,ff=typeof Promise=="function"?Promise:void 0,my=typeof queueMicrotask=="function"?queueMicrotask:typeof ff<"u"?function(e){return ff.resolve(null).then(e).catch(gy)}:Ym;function gy(e){setTimeout(function(){throw e})}function wa(e){return e==="head"}function df(e,t){var a=t,n=0,l=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(0<n&&8>n){a=n;var r=e.ownerDocument;if(a&1&&El(r.documentElement),a&2&&El(r.body),a&4)for(a=r.head,El(a),r=a.firstChild;r;){var i=r.nextSibling,o=r.nodeName;r[Kl]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&r.rel.toLowerCase()==="stylesheet"||a.removeChild(r),r=i}}if(l===0){e.removeChild(s),Gl(t);return}l--}else a==="$"||a==="$?"||a==="$!"?l++:n=a.charCodeAt(0)-48;else n=0;a=s}while(a);Gl(t)}function So(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":So(a),Ko(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function py(e,t,a,n){for(;e.nodeType===1;){var l=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Kl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=gt(e.nextSibling),e===null)break}return null}function yy(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=gt(e.nextSibling),e===null))return null;return e}function wo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function vy(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function gt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var No=null;function hf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function $m(e,t,a){switch(t=hr(a),e){case"html":if(e=t.documentElement,!e)throw Error(T(452));return e;case"head":if(e=t.head,!e)throw Error(T(453));return e;case"body":if(e=t.body,!e)throw Error(T(454));return e;default:throw Error(T(451))}}function El(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ko(e)}var ct=new Map,mf=new Set;function mr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Kt=I.d;I.d={f:xy,r:by,D:Sy,C:wy,L:Ny,m:jy,X:Cy,S:Ey,M:Ty};function xy(){var e=Kt.f(),t=_r();return e||t}function by(e){var t=Hn(e);t!==null&&t.tag===5&&t.type==="form"?_h(t):Kt.r(e)}var qn=typeof document>"u"?null:document;function Xm(e,t,a){var n=qn;if(n&&typeof t=="string"&&t){var l=rt(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof a=="string"&&(l+='[crossorigin="'+a+'"]'),mf.has(l)||(mf.add(l),e={rel:e,crossOrigin:a,href:t},n.querySelector(l)===null&&(t=n.createElement("link"),Le(t,"link",e),Ae(t),n.head.appendChild(t)))}}function Sy(e){Kt.D(e),Xm("dns-prefetch",e,null)}function wy(e,t){Kt.C(e,t),Xm("preconnect",e,t)}function Ny(e,t,a){Kt.L(e,t,a);var n=qn;if(n&&e&&t){var l='link[rel="preload"][as="'+rt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(l+='[imagesrcset="'+rt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(l+='[imagesizes="'+rt(a.imageSizes)+'"]')):l+='[href="'+rt(e)+'"]';var s=l;switch(t){case"style":s=Ln(e);break;case"script":s=Vn(e)}ct.has(s)||(e=oe({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ct.set(s,e),n.querySelector(l)!==null||t==="style"&&n.querySelector(ns(s))||t==="script"&&n.querySelector(ls(s))||(t=n.createElement("link"),Le(t,"link",e),Ae(t),n.head.appendChild(t)))}}function jy(e,t){Kt.m(e,t);var a=qn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+rt(n)+'"][href="'+rt(e)+'"]',s=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Vn(e)}if(!ct.has(s)&&(e=oe({rel:"modulepreload",href:e},t),ct.set(s,e),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ls(s)))return}n=a.createElement("link"),Le(n,"link",e),Ae(n),a.head.appendChild(n)}}}function Ey(e,t,a){Kt.S(e,t,a);var n=qn;if(n&&e){var l=pn(n).hoistableStyles,s=Ln(e);t=t||"default";var r=l.get(s);if(!r){var i={loading:0,preload:null};if(r=n.querySelector(ns(s)))i.loading=5;else{e=oe({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ct.get(s))&&Ou(e,a);var o=r=n.createElement("link");Ae(o),Le(o,"link",e),o._p=new Promise(function(c,f){o.onload=c,o.onerror=f}),o.addEventListener("load",function(){i.loading|=1}),o.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Hs(r,t,n)}r={type:"stylesheet",instance:r,count:1,state:i},l.set(s,r)}}}function Cy(e,t){Kt.X(e,t);var a=qn;if(a&&e){var n=pn(a).hoistableScripts,l=Vn(e),s=n.get(l);s||(s=a.querySelector(ls(l)),s||(e=oe({src:e,async:!0},t),(t=ct.get(l))&&zu(e,t),s=a.createElement("script"),Ae(s),Le(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(l,s))}}function Ty(e,t){Kt.M(e,t);var a=qn;if(a&&e){var n=pn(a).hoistableScripts,l=Vn(e),s=n.get(l);s||(s=a.querySelector(ls(l)),s||(e=oe({src:e,async:!0,type:"module"},t),(t=ct.get(l))&&zu(e,t),s=a.createElement("script"),Ae(s),Le(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(l,s))}}function gf(e,t,a,n){var l=(l=ca.current)?mr(l):null;if(!l)throw Error(T(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ln(a.href),a=pn(l).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ln(a.href);var s=pn(l).hoistableStyles,r=s.get(e);if(r||(l=l.ownerDocument||l,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,r),(s=l.querySelector(ns(e)))&&!s._p&&(r.instance=s,r.state.loading=5),ct.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ct.set(e,a),s||Ay(l,e,a,r.state))),t&&n===null)throw Error(T(528,""));return r}if(t&&n!==null)throw Error(T(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Vn(a),a=pn(l).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(T(444,e))}}function Ln(e){return'href="'+rt(e)+'"'}function ns(e){return'link[rel="stylesheet"]['+e+"]"}function Qm(e){return oe({},e,{"data-precedence":e.precedence,precedence:null})}function Ay(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Le(t,"link",a),Ae(t),e.head.appendChild(t))}function Vn(e){return'[src="'+rt(e)+'"]'}function ls(e){return"script[async]"+e}function pf(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+rt(a.href)+'"]');if(n)return t.instance=n,Ae(n),n;var l=oe({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ae(n),Le(n,"style",l),Hs(n,a.precedence,e),t.instance=n;case"stylesheet":l=Ln(a.href);var s=e.querySelector(ns(l));if(s)return t.state.loading|=4,t.instance=s,Ae(s),s;n=Qm(a),(l=ct.get(l))&&Ou(n,l),s=(e.ownerDocument||e).createElement("link"),Ae(s);var r=s;return r._p=new Promise(function(i,o){r.onload=i,r.onerror=o}),Le(s,"link",n),t.state.loading|=4,Hs(s,a.precedence,e),t.instance=s;case"script":return s=Vn(a.src),(l=e.querySelector(ls(s)))?(t.instance=l,Ae(l),l):(n=a,(l=ct.get(s))&&(n=oe({},a),zu(n,l)),e=e.ownerDocument||e,l=e.createElement("script"),Ae(l),Le(l,"link",n),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(T(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(n=t.instance,t.state.loading|=4,Hs(n,a.precedence,e));return t.instance}function Hs(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=n.length?n[n.length-1]:null,s=l,r=0;r<n.length;r++){var i=n[r];if(i.dataset.precedence===t)s=i;else if(s!==l)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Ou(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function zu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Bs=null;function yf(e,t,a){if(Bs===null){var n=new Map,l=Bs=new Map;l.set(a,n)}else l=Bs,n=l.get(a),n||(n=new Map,l.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),l=0;l<a.length;l++){var s=a[l];if(!(s[Kl]||s[Ue]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var r=s.getAttribute(t)||"";r=e+r;var i=n.get(r);i?i.push(s):n.set(r,[s])}}return n}function vf(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ry(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Km(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Ul=null;function Oy(){}function zy(e,t,a){if(Ul===null)throw Error(T(475));var n=Ul;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var l=Ln(a.href),s=e.querySelector(ns(l));if(s){e=s._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=gr.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=s,Ae(s);return}s=e.ownerDocument||e,a=Qm(a),(l=ct.get(l))&&Ou(a,l),s=s.createElement("link"),Ae(s);var r=s;r._p=new Promise(function(i,o){r.onload=i,r.onerror=o}),Le(s,"link",a),t.instance=s}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(n.count++,t=gr.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function My(){if(Ul===null)throw Error(T(475));var e=Ul;return e.stylesheets&&e.count===0&&jo(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&jo(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function gr(){if(this.count--,this.count===0){if(this.stylesheets)jo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pr=null;function jo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pr=new Map,t.forEach(ky,e),pr=null,gr.call(e))}function ky(e,t){if(!(t.state.loading&4)){var a=pr.get(e);if(a)var n=a.get(null);else{a=new Map,pr.set(e,a);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<l.length;s++){var r=l[s];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(a.set(r.dataset.precedence,r),n=r)}n&&a.set(null,n)}l=t.instance,r=l.getAttribute("data-precedence"),s=a.get(r)||n,s===n&&a.set(null,l),a.set(r,l),this.count++,n=gr.bind(this),l.addEventListener("load",n),l.addEventListener("error",n),s?s.parentNode.insertBefore(l,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var _l={$$typeof:Dt,Provider:null,Consumer:null,_currentValue:Ra,_currentValue2:Ra,_threadCount:0};function Dy(e,t,a,n,l,s,r,i){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Zr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zr(0),this.hiddenUpdates=Zr(null),this.identifierPrefix=n,this.onUncaughtError=l,this.onCaughtError=s,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=i,this.incompleteTransitions=new Map}function Zm(e,t,a,n,l,s,r,i,o,c,f,h){return e=new Dy(e,t,a,r,i,o,c,h),t=1,s===!0&&(t|=24),s=Fe(3,null,null,t),e.current=s,s.stateNode=e,t=su(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:n,isDehydrated:a,cache:t},iu(s),e}function Jm(e){return e?(e=dn,e):dn}function Fm(e,t,a,n,l,s){l=Jm(l),n.context===null?n.context=l:n.pendingContext=l,n=fa(t),n.payload={element:a},s=s===void 0?null:s,s!==null&&(n.callback=s),a=da(e,n,t),a!==null&&(et(a,e,t),yl(a,e,t))}function xf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Mu(e,t){xf(e,t),(e=e.alternate)&&xf(e,t)}function Pm(e){if(e.tag===13){var t=Bn(e,67108864);t!==null&&et(t,e,67108864),Mu(e,67108864)}}var yr=!0;function Ly(e,t,a,n){var l=H.T;H.T=null;var s=I.p;try{I.p=2,ku(e,t,a,n)}finally{I.p=s,H.T=l}}function Uy(e,t,a,n){var l=H.T;H.T=null;var s=I.p;try{I.p=8,ku(e,t,a,n)}finally{I.p=s,H.T=l}}function ku(e,t,a,n){if(yr){var l=Eo(n);if(l===null)Ei(e,t,n,vr,a),bf(e,n);else if(Hy(l,e,t,a,n))n.stopPropagation();else if(bf(e,n),t&4&&-1<_y.indexOf(e)){for(;l!==null;){var s=Hn(l);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var r=Ca(s.pendingLanes);if(r!==0){var i=s;for(i.pendingLanes|=2,i.entangledLanes|=2;r;){var o=1<<31-We(r);i.entanglements[1]|=o,r&=~o}At(s),!(ae&6)&&(or=Et()+500,as(0))}}break;case 13:i=Bn(s,2),i!==null&&et(i,s,2),_r(),Mu(s,2)}if(s=Eo(n),s===null&&Ei(e,t,n,vr,a),s===l)break;l=s}l!==null&&n.stopPropagation()}else Ei(e,t,n,null,a)}}function Eo(e){return e=Jo(e),Du(e)}var vr=null;function Du(e){if(vr=null,e=sn(e),e!==null){var t=Yl(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=wd(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vr=e,null}function Wm(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(wp()){case Cd:return 2;case Td:return 8;case Qs:case Np:return 32;case Ad:return 268435456;default:return 32}default:return 32}}var Co=!1,ga=null,pa=null,ya=null,Hl=new Map,Bl=new Map,sa=[],_y="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 bf(e,t){switch(e){case"focusin":case"focusout":ga=null;break;case"dragenter":case"dragleave":pa=null;break;case"mouseover":case"mouseout":ya=null;break;case"pointerover":case"pointerout":Hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(t.pointerId)}}function nl(e,t,a,n,l,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:s,targetContainers:[l]},t!==null&&(t=Hn(t),t!==null&&Pm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Hy(e,t,a,n,l){switch(t){case"focusin":return ga=nl(ga,e,t,a,n,l),!0;case"dragenter":return pa=nl(pa,e,t,a,n,l),!0;case"mouseover":return ya=nl(ya,e,t,a,n,l),!0;case"pointerover":var s=l.pointerId;return Hl.set(s,nl(Hl.get(s)||null,e,t,a,n,l)),!0;case"gotpointercapture":return s=l.pointerId,Bl.set(s,nl(Bl.get(s)||null,e,t,a,n,l)),!0}return!1}function Im(e){var t=sn(e.target);if(t!==null){var a=Yl(t);if(a!==null){if(t=a.tag,t===13){if(t=wd(a),t!==null){e.blockedOn=t,zp(e.priority,function(){if(a.tag===13){var n=Ie();n=Xo(n);var l=Bn(a,n);l!==null&&et(l,a,n),Mu(a,n)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Eo(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Vi=n,a.target.dispatchEvent(n),Vi=null}else return t=Hn(a),t!==null&&Pm(t),e.blockedOn=a,!1;t.shift()}return!0}function Sf(e,t,a){Gs(e)&&a.delete(t)}function By(){Co=!1,ga!==null&&Gs(ga)&&(ga=null),pa!==null&&Gs(pa)&&(pa=null),ya!==null&&Gs(ya)&&(ya=null),Hl.forEach(Sf),Bl.forEach(Sf)}function ws(e,t){e.blockedOn===t&&(e.blockedOn=null,Co||(Co=!0,Ee.unstable_scheduleCallback(Ee.unstable_NormalPriority,By)))}var Ns=null;function wf(e){Ns!==e&&(Ns=e,Ee.unstable_scheduleCallback(Ee.unstable_NormalPriority,function(){Ns===e&&(Ns=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],l=e[t+2];if(typeof n!="function"){if(Du(n||a)===null)continue;break}var s=Hn(a);s!==null&&(e.splice(t,3),t-=3,lo(s,{pending:!0,data:l,method:a.method,action:n},n,l))}}))}function Gl(e){function t(o){return ws(o,e)}ga!==null&&ws(ga,e),pa!==null&&ws(pa,e),ya!==null&&ws(ya,e),Hl.forEach(t),Bl.forEach(t);for(var a=0;a<sa.length;a++){var n=sa[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<sa.length&&(a=sa[0],a.blockedOn===null);)Im(a),a.blockedOn===null&&sa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var l=a[n],s=a[n+1],r=l[Xe]||null;if(typeof s=="function")r||wf(a);else if(r){var i=null;if(s&&s.hasAttribute("formAction")){if(l=s,r=s[Xe]||null)i=r.formAction;else if(Du(l)!==null)continue}else i=r.action;typeof i=="function"?a[n+1]=i:(a.splice(n,3),n-=3),wf(a)}}}function Lu(e){this._internalRoot=e}qr.prototype.render=Lu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));var a=t.current,n=Ie();Fm(a,n,e,t,null,null)};qr.prototype.unmount=Lu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fm(e.current,2,null,e,null,null),_r(),t[_n]=null}};function qr(e){this._internalRoot=e}qr.prototype.unstable_scheduleHydration=function(e){if(e){var t=kd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<sa.length&&t!==0&&t<sa[a].priority;a++);sa.splice(a,0,e),a===0&&Im(e)}};var Nf=bd.version;if(Nf!=="19.1.0")throw Error(T(527,Nf,"19.1.0"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(T(188)):(e=Object.keys(e).join(","),Error(T(268,e)));return e=gp(t),e=e!==null?Nd(e):null,e=e===null?null:e.stateNode,e};var Gy={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var js=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!js.isDisabled&&js.supportsFiber)try{$l=js.inject(Gy),Pe=js}catch{}}Er.createRoot=function(e,t){if(!Sd(e))throw Error(T(299));var a=!1,n="",l=Zh,s=Jh,r=Fh,i=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(i=t.unstable_transitionCallbacks)),t=Zm(e,1,!1,null,null,a,n,l,s,r,i,null),e[_n]=t.current,Ru(e),new Lu(t)};Er.hydrateRoot=function(e,t,a){if(!Sd(e))throw Error(T(299));var n=!1,l="",s=Zh,r=Jh,i=Fh,o=null,c=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(s=a.onUncaughtError),a.onCaughtError!==void 0&&(r=a.onCaughtError),a.onRecoverableError!==void 0&&(i=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(o=a.unstable_transitionCallbacks),a.formState!==void 0&&(c=a.formState)),t=Zm(e,1,!0,t,a??null,n,l,s,r,i,o,c),t.context=Jm(null),a=t.current,n=Ie(),n=Xo(n),l=fa(n),l.callback=null,da(a,l,n),a=n,t.current.lanes=a,Ql(t,a),At(t),e[_n]=t.current,Ru(e),new qr(t)};Er.version="19.1.0";function eg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eg)}catch(e){console.error(e)}}eg(),md.exports=Er;var qy=md.exports;const Vy=nd(qy);var Uu={};Object.defineProperty(Uu,"__esModule",{value:!0});Uu.parse=Jy;Uu.serialize=Fy;const Yy=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,$y=/^[\u0021-\u003A\u003C-\u007E]*$/,Xy=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Qy=/^[\u0020-\u003A\u003D-\u007E]*$/,Ky=Object.prototype.toString,Zy=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function Jy(e,t){const a=new Zy,n=e.length;if(n<2)return a;const l=(t==null?void 0:t.decode)||Py;let s=0;do{const r=e.indexOf("=",s);if(r===-1)break;const i=e.indexOf(";",s),o=i===-1?n:i;if(r>o){s=e.lastIndexOf(";",r-1)+1;continue}const c=jf(e,s,r),f=Ef(e,r,c),h=e.slice(c,f);if(a[h]===void 0){let d=jf(e,r+1,o),y=Ef(e,o,d);const S=l(e.slice(d,y));a[h]=S}s=o+1}while(s<n);return a}function jf(e,t,a){do{const n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<a);return a}function Ef(e,t,a){for(;t>a;){const n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return a}function Fy(e,t,a){const n=(a==null?void 0:a.encode)||encodeURIComponent;if(!Yy.test(e))throw new TypeError(`argument name is invalid: ${e}`);const l=n(t);if(!$y.test(l))throw new TypeError(`argument val is invalid: ${t}`);let s=e+"="+l;if(!a)return s;if(a.maxAge!==void 0){if(!Number.isInteger(a.maxAge))throw new TypeError(`option maxAge is invalid: ${a.maxAge}`);s+="; Max-Age="+a.maxAge}if(a.domain){if(!Xy.test(a.domain))throw new TypeError(`option domain is invalid: ${a.domain}`);s+="; Domain="+a.domain}if(a.path){if(!Qy.test(a.path))throw new TypeError(`option path is invalid: ${a.path}`);s+="; Path="+a.path}if(a.expires){if(!Wy(a.expires)||!Number.isFinite(a.expires.valueOf()))throw new TypeError(`option expires is invalid: ${a.expires}`);s+="; Expires="+a.expires.toUTCString()}if(a.httpOnly&&(s+="; HttpOnly"),a.secure&&(s+="; Secure"),a.partitioned&&(s+="; Partitioned"),a.priority)switch(typeof a.priority=="string"?a.priority.toLowerCase():void 0){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${a.priority}`)}if(a.sameSite)switch(typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"none":s+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${a.sameSite}`)}return s}function Py(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function Wy(e){return Ky.call(e)==="[object Date]"}/**
|
|
50
|
+
* react-router v7.5.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var Cf="popstate";function Iy(e={}){function t(n,l){let{pathname:s,search:r,hash:i}=n.location;return To("",{pathname:s,search:r,hash:i},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function a(n,l){return typeof l=="string"?l:ql(l)}return tv(t,a,null,e)}function he(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function pt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ev(){return Math.random().toString(36).substring(2,10)}function Tf(e,t){return{usr:e.state,key:e.key,idx:t}}function To(e,t,a=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Yn(t):t,state:a,key:t&&t.key||n||ev()}}function ql({pathname:e="/",search:t="",hash:a=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function Yn(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function tv(e,t,a,n={}){let{window:l=document.defaultView,v5Compat:s=!1}=n,r=l.history,i="POP",o=null,c=f();c==null&&(c=0,r.replaceState({...r.state,idx:c},""));function f(){return(r.state||{idx:null}).idx}function h(){i="POP";let w=f(),g=w==null?null:w-c;c=w,o&&o({action:i,location:v.location,delta:g})}function d(w,g){i="PUSH";let m=To(v.location,w,g);c=f()+1;let p=Tf(m,c),b=v.createHref(m);try{r.pushState(p,"",b)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;l.location.assign(b)}s&&o&&o({action:i,location:v.location,delta:1})}function y(w,g){i="REPLACE";let m=To(v.location,w,g);c=f();let p=Tf(m,c),b=v.createHref(m);r.replaceState(p,"",b),s&&o&&o({action:i,location:v.location,delta:0})}function S(w){let g=l.location.origin!=="null"?l.location.origin:l.location.href,m=typeof w=="string"?w:ql(w);return m=m.replace(/ $/,"%20"),he(g,`No window.location.(origin|href) available to create URL for href: ${m}`),new URL(m,g)}let v={get action(){return i},get location(){return e(l,r)},listen(w){if(o)throw new Error("A history only accepts one active listener");return l.addEventListener(Cf,h),o=w,()=>{l.removeEventListener(Cf,h),o=null}},createHref(w){return t(l,w)},createURL:S,encodeLocation(w){let g=S(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:y,go(w){return r.go(w)}};return v}function tg(e,t,a="/"){return av(e,t,a,!1)}function av(e,t,a,n){let l=typeof t=="string"?Yn(t):t,s=Qt(l.pathname||"/",a);if(s==null)return null;let r=ag(e);nv(r);let i=null;for(let o=0;i==null&&o<r.length;++o){let c=mv(s);i=dv(r[o],c,n)}return i}function ag(e,t=[],a=[],n=""){let l=(s,r,i)=>{let o={relativePath:i===void 0?s.path||"":i,caseSensitive:s.caseSensitive===!0,childrenIndex:r,route:s};o.relativePath.startsWith("/")&&(he(o.relativePath.startsWith(n),`Absolute route path "${o.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(n.length));let c=qt([n,o.relativePath]),f=a.concat(o);s.children&&s.children.length>0&&(he(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),ag(s.children,t,f,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:cv(c,s.index),routesMeta:f})};return e.forEach((s,r)=>{var i;if(s.path===""||!((i=s.path)!=null&&i.includes("?")))l(s,r);else for(let o of ng(s.path))l(s,r,o)}),t}function ng(e){let t=e.split("/");if(t.length===0)return[];let[a,...n]=t,l=a.endsWith("?"),s=a.replace(/\?$/,"");if(n.length===0)return l?[s,""]:[s];let r=ng(n.join("/")),i=[];return i.push(...r.map(o=>o===""?s:[s,o].join("/"))),l&&i.push(...r),i.map(o=>e.startsWith("/")&&o===""?"/":o)}function nv(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:fv(t.routesMeta.map(n=>n.childrenIndex),a.routesMeta.map(n=>n.childrenIndex)))}var lv=/^:[\w-]+$/,sv=3,rv=2,iv=1,ov=10,uv=-2,Af=e=>e==="*";function cv(e,t){let a=e.split("/"),n=a.length;return a.some(Af)&&(n+=uv),t&&(n+=rv),a.filter(l=>!Af(l)).reduce((l,s)=>l+(lv.test(s)?sv:s===""?iv:ov),n)}function fv(e,t){return e.length===t.length&&e.slice(0,-1).every((n,l)=>n===t[l])?e[e.length-1]-t[t.length-1]:0}function dv(e,t,a=!1){let{routesMeta:n}=e,l={},s="/",r=[];for(let i=0;i<n.length;++i){let o=n[i],c=i===n.length-1,f=s==="/"?t:t.slice(s.length)||"/",h=xr({path:o.relativePath,caseSensitive:o.caseSensitive,end:c},f),d=o.route;if(!h&&c&&a&&!n[n.length-1].route.index&&(h=xr({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},f)),!h)return null;Object.assign(l,h.params),r.push({params:l,pathname:qt([s,h.pathname]),pathnameBase:vv(qt([s,h.pathnameBase])),route:d}),h.pathnameBase!=="/"&&(s=qt([s,h.pathnameBase]))}return r}function xr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,n]=hv(e.path,e.caseSensitive,e.end),l=t.match(a);if(!l)return null;let s=l[0],r=s.replace(/(.)\/+$/,"$1"),i=l.slice(1);return{params:n.reduce((c,{paramName:f,isOptional:h},d)=>{if(f==="*"){let S=i[d]||"";r=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const y=i[d];return h&&!y?c[f]=void 0:c[f]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:r,pattern:e}}function hv(e,t=!1,a=!0){pt(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=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(r,i,o)=>(n.push({paramName:i,isOptional:o!=null}),o?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),n]}function mv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return pt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Qt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,n=e.charAt(a);return n&&n!=="/"?null:e.slice(a)||"/"}function gv(e,t="/"){let{pathname:a,search:n="",hash:l=""}=typeof e=="string"?Yn(e):e;return{pathname:a?a.startsWith("/")?a:pv(a,t):t,search:xv(n),hash:bv(l)}}function pv(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?a.length>1&&a.pop():l!=="."&&a.push(l)}),a.length>1?a.join("/"):"/"}function Ti(e,t,a,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function yv(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function _u(e){let t=yv(e);return t.map((a,n)=>n===t.length-1?a.pathname:a.pathnameBase)}function Hu(e,t,a,n=!1){let l;typeof e=="string"?l=Yn(e):(l={...e},he(!l.pathname||!l.pathname.includes("?"),Ti("?","pathname","search",l)),he(!l.pathname||!l.pathname.includes("#"),Ti("#","pathname","hash",l)),he(!l.search||!l.search.includes("#"),Ti("#","search","hash",l)));let s=e===""||l.pathname==="",r=s?"/":l.pathname,i;if(r==null)i=a;else{let h=t.length-1;if(!n&&r.startsWith("..")){let d=r.split("/");for(;d[0]==="..";)d.shift(),h-=1;l.pathname=d.join("/")}i=h>=0?t[h]:"/"}let o=gv(l,i),c=r&&r!=="/"&&r.endsWith("/"),f=(s||r===".")&&a.endsWith("/");return!o.pathname.endsWith("/")&&(c||f)&&(o.pathname+="/"),o}var qt=e=>e.join("/").replace(/\/\/+/g,"/"),vv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Sv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var lg=["POST","PUT","PATCH","DELETE"];new Set(lg);var wv=["GET",...lg];new Set(wv);var $n=x.createContext(null);$n.displayName="DataRouter";var Vr=x.createContext(null);Vr.displayName="DataRouterState";var sg=x.createContext({isTransitioning:!1});sg.displayName="ViewTransition";var Nv=x.createContext(new Map);Nv.displayName="Fetchers";var jv=x.createContext(null);jv.displayName="Await";var vt=x.createContext(null);vt.displayName="Navigation";var ss=x.createContext(null);ss.displayName="Location";var ft=x.createContext({outlet:null,matches:[],isDataRoute:!1});ft.displayName="Route";var Bu=x.createContext(null);Bu.displayName="RouteError";function Ev(e,{relative:t}={}){he(Xn(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:n}=x.useContext(vt),{hash:l,pathname:s,search:r}=rs(e,{relative:t}),i=s;return a!=="/"&&(i=s==="/"?a:qt([a,s])),n.createHref({pathname:i,search:r,hash:l})}function Xn(){return x.useContext(ss)!=null}function Rt(){return he(Xn(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(ss).location}var rg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ig(e){x.useContext(vt).static||x.useLayoutEffect(e)}function Xa(){let{isDataRoute:e}=x.useContext(ft);return e?qv():Cv()}function Cv(){he(Xn(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext($n),{basename:t,navigator:a}=x.useContext(vt),{matches:n}=x.useContext(ft),{pathname:l}=Rt(),s=JSON.stringify(_u(n)),r=x.useRef(!1);return ig(()=>{r.current=!0}),x.useCallback((o,c={})=>{if(pt(r.current,rg),!r.current)return;if(typeof o=="number"){a.go(o);return}let f=Hu(o,JSON.parse(s),l,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:qt([t,f.pathname])),(c.replace?a.replace:a.push)(f,c.state,c)},[t,a,s,l,e])}var Tv=x.createContext(null);function Av(e){let t=x.useContext(ft).outlet;return t&&x.createElement(Tv.Provider,{value:e},t)}function Rv(){let{matches:e}=x.useContext(ft),t=e[e.length-1];return t?t.params:{}}function rs(e,{relative:t}={}){let{matches:a}=x.useContext(ft),{pathname:n}=Rt(),l=JSON.stringify(_u(a));return x.useMemo(()=>Hu(e,JSON.parse(l),n,t==="path"),[e,l,n,t])}function Ov(e,t){return og(e,t)}function og(e,t,a,n){var m;he(Xn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l,static:s}=x.useContext(vt),{matches:r}=x.useContext(ft),i=r[r.length-1],o=i?i.params:{},c=i?i.pathname:"/",f=i?i.pathnameBase:"/",h=i&&i.route;{let p=h&&h.path||"";ug(c,!h||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let d=Rt(),y;if(t){let p=typeof t=="string"?Yn(t):t;he(f==="/"||((m=p.pathname)==null?void 0:m.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${p.pathname}" was given in the \`location\` prop.`),y=p}else y=d;let S=y.pathname||"/",v=S;if(f!=="/"){let p=f.replace(/^\//,"").split("/");v="/"+S.replace(/^\//,"").split("/").slice(p.length).join("/")}let w=!s&&a&&a.matches&&a.matches.length>0?a.matches:tg(e,{pathname:v});pt(h||w!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),pt(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.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=Lv(w&&w.map(p=>Object.assign({},p,{params:Object.assign({},o,p.params),pathname:qt([f,l.encodeLocation?l.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?f:qt([f,l.encodeLocation?l.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),r,a,n);return t&&g?x.createElement(ss.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...y},navigationType:"POP"}},g):g}function zv(){let e=Gv(),t=Sv(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},r=null;return console.error("Error handled by React Router default ErrorBoundary:",e),r=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:s},"ErrorBoundary")," or"," ",x.createElement("code",{style:s},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),a?x.createElement("pre",{style:l},a):null,r)}var Mv=x.createElement(zv,null),kv=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?x.createElement(ft.Provider,{value:this.props.routeContext},x.createElement(Bu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Dv({routeContext:e,match:t,children:a}){let n=x.useContext($n);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(ft.Provider,{value:e},a)}function Lv(e,t=[],a=null,n=null){if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,s=a==null?void 0:a.errors;if(s!=null){let o=l.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id])!==void 0);he(o>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),l=l.slice(0,Math.min(l.length,o+1))}let r=!1,i=-1;if(a)for(let o=0;o<l.length;o++){let c=l[o];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(i=o),c.route.id){let{loaderData:f,errors:h}=a,d=c.route.loader&&!f.hasOwnProperty(c.route.id)&&(!h||h[c.route.id]===void 0);if(c.route.lazy||d){r=!0,i>=0?l=l.slice(0,i+1):l=[l[0]];break}}}return l.reduceRight((o,c,f)=>{let h,d=!1,y=null,S=null;a&&(h=s&&c.route.id?s[c.route.id]:void 0,y=c.route.errorElement||Mv,r&&(i<0&&f===0?(ug("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,S=null):i===f&&(d=!0,S=c.route.hydrateFallbackElement||null)));let v=t.concat(l.slice(0,f+1)),w=()=>{let g;return h?g=y:d?g=S:c.route.Component?g=x.createElement(c.route.Component,null):c.route.element?g=c.route.element:g=o,x.createElement(Dv,{match:c,routeContext:{outlet:o,matches:v,isDataRoute:a!=null},children:g})};return a&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?x.createElement(kv,{location:a.location,revalidation:a.revalidation,component:y,error:h,children:w(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):w()},null)}function Gu(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Uv(e){let t=x.useContext($n);return he(t,Gu(e)),t}function _v(e){let t=x.useContext(Vr);return he(t,Gu(e)),t}function Hv(e){let t=x.useContext(ft);return he(t,Gu(e)),t}function qu(e){let t=Hv(e),a=t.matches[t.matches.length-1];return he(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function Bv(){return qu("useRouteId")}function Gv(){var n;let e=x.useContext(Bu),t=_v("useRouteError"),a=qu("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[a]}function qv(){let{router:e}=Uv("useNavigate"),t=qu("useNavigate"),a=x.useRef(!1);return ig(()=>{a.current=!0}),x.useCallback(async(l,s={})=>{pt(a.current,rg),a.current&&(typeof l=="number"?e.navigate(l):await e.navigate(l,{fromRouteId:t,...s}))},[e,t])}var Rf={};function ug(e,t,a){!t&&!Rf[e]&&(Rf[e]=!0,pt(!1,a))}x.memo(Vv);function Vv({routes:e,future:t,state:a}){return og(e,void 0,a,t)}function cg({to:e,replace:t,state:a,relative:n}){he(Xn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=x.useContext(vt);pt(!l,"<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:s}=x.useContext(ft),{pathname:r}=Rt(),i=Xa(),o=Hu(e,_u(s),r,n==="path"),c=JSON.stringify(o);return x.useEffect(()=>{i(JSON.parse(c),{replace:t,state:a,relative:n})},[i,c,n,t,a]),null}function fg(e){return Av(e.context)}function ht(e){he(!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 Yv({basename:e="/",children:t=null,location:a,navigationType:n="POP",navigator:l,static:s=!1}){he(!Xn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let r=e.replace(/^\/*/,"/"),i=x.useMemo(()=>({basename:r,navigator:l,static:s,future:{}}),[r,l,s]);typeof a=="string"&&(a=Yn(a));let{pathname:o="/",search:c="",hash:f="",state:h=null,key:d="default"}=a,y=x.useMemo(()=>{let S=Qt(o,r);return S==null?null:{location:{pathname:S,search:c,hash:f,state:h,key:d},navigationType:n}},[r,o,c,f,h,d,n]);return pt(y!=null,`<Router basename="${r}"> is not able to match the URL "${o}${c}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:x.createElement(vt.Provider,{value:i},x.createElement(ss.Provider,{children:t,value:y}))}function $v({children:e,location:t}){return Ov(Ao(e),t)}function Ao(e,t=[]){let a=[];return x.Children.forEach(e,(n,l)=>{if(!x.isValidElement(n))return;let s=[...t,l];if(n.type===x.Fragment){a.push.apply(a,Ao(n.props.children,s));return}he(n.type===ht,`[${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>`),he(!n.props.index||!n.props.children,"An index route cannot have child routes.");let r={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,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&&(r.children=Ao(n.props.children,s)),a.push(r)}),a}var qs="get",Vs="application/x-www-form-urlencoded";function Yr(e){return e!=null&&typeof e.tagName=="string"}function Xv(e){return Yr(e)&&e.tagName.toLowerCase()==="button"}function Qv(e){return Yr(e)&&e.tagName.toLowerCase()==="form"}function Kv(e){return Yr(e)&&e.tagName.toLowerCase()==="input"}function Zv(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Jv(e,t){return e.button===0&&(!t||t==="_self")&&!Zv(e)}var Es=null;function Fv(){if(Es===null)try{new FormData(document.createElement("form"),0),Es=!1}catch{Es=!0}return Es}var Pv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ai(e){return e!=null&&!Pv.has(e)?(pt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vs}"`),null):e}function Wv(e,t){let a,n,l,s,r;if(Qv(e)){let i=e.getAttribute("action");n=i?Qt(i,t):null,a=e.getAttribute("method")||qs,l=Ai(e.getAttribute("enctype"))||Vs,s=new FormData(e)}else if(Xv(e)||Kv(e)&&(e.type==="submit"||e.type==="image")){let i=e.form;if(i==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let o=e.getAttribute("formaction")||i.getAttribute("action");if(n=o?Qt(o,t):null,a=e.getAttribute("formmethod")||i.getAttribute("method")||qs,l=Ai(e.getAttribute("formenctype"))||Ai(i.getAttribute("enctype"))||Vs,s=new FormData(i,e),!Fv()){let{name:c,type:f,value:h}=e;if(f==="image"){let d=c?`${c}.`:"";s.append(`${d}x`,"0"),s.append(`${d}y`,"0")}else c&&s.append(c,h)}}else{if(Yr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=qs,n=null,l=Vs,r=e}return s&&l==="text/plain"&&(r=s,s=void 0),{action:n,method:a.toLowerCase(),encType:l,formData:s,body:r}}function Vu(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Iv(e,t){if(e.id in t)return t[e.id];try{let a=await import(e.module);return t[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ex(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 tx(e,t,a){let n=await Promise.all(e.map(async l=>{let s=t.routes[l.route.id];if(s){let r=await Iv(s,a);return r.links?r.links():[]}return[]}));return sx(n.flat(1).filter(ex).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Of(e,t,a,n,l,s){let r=(o,c)=>a[c]?o.route.id!==a[c].route.id:!0,i=(o,c)=>{var f;return a[c].pathname!==o.pathname||((f=a[c].route.path)==null?void 0:f.endsWith("*"))&&a[c].params["*"]!==o.params["*"]};return s==="assets"?t.filter((o,c)=>r(o,c)||i(o,c)):s==="data"?t.filter((o,c)=>{var h;let f=n.routes[o.route.id];if(!f||!f.hasLoader)return!1;if(r(o,c)||i(o,c))return!0;if(o.route.shouldRevalidate){let d=o.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((h=a[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:o.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function ax(e,t,{includeHydrateFallback:a}={}){return nx(e.map(n=>{let l=t.routes[n.route.id];if(!l)return[];let s=[l.module];return l.clientActionModule&&(s=s.concat(l.clientActionModule)),l.clientLoaderModule&&(s=s.concat(l.clientLoaderModule)),a&&l.hydrateFallbackModule&&(s=s.concat(l.hydrateFallbackModule)),l.imports&&(s=s.concat(l.imports)),s}).flat(1))}function nx(e){return[...new Set(e)]}function lx(e){let t={},a=Object.keys(e).sort();for(let n of a)t[n]=e[n];return t}function sx(e,t){let a=new Set;return new Set(t),e.reduce((n,l)=>{let s=JSON.stringify(lx(l));return a.has(s)||(a.add(s),n.push({key:s,link:l})),n},[])}function rx(e,t){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a.pathname==="/"?a.pathname="_root.data":t&&Qt(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.data`:a.pathname=`${a.pathname.replace(/\/$/,"")}.data`,a}function dg(){let e=x.useContext($n);return Vu(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ix(){let e=x.useContext(Vr);return Vu(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Yu=x.createContext(void 0);Yu.displayName="FrameworkContext";function hg(){let e=x.useContext(Yu);return Vu(e,"You must render this element inside a <HydratedRouter> element"),e}function ox(e,t){let a=x.useContext(Yu),[n,l]=x.useState(!1),[s,r]=x.useState(!1),{onFocus:i,onBlur:o,onMouseEnter:c,onMouseLeave:f,onTouchStart:h}=t,d=x.useRef(null);x.useEffect(()=>{if(e==="render"&&r(!0),e==="viewport"){let v=g=>{g.forEach(m=>{r(m.isIntersecting)})},w=new IntersectionObserver(v,{threshold:.5});return d.current&&w.observe(d.current),()=>{w.disconnect()}}},[e]),x.useEffect(()=>{if(n){let v=setTimeout(()=>{r(!0)},100);return()=>{clearTimeout(v)}}},[n]);let y=()=>{l(!0)},S=()=>{l(!1),r(!1)};return a?e!=="intent"?[s,d,{}]:[s,d,{onFocus:ll(i,y),onBlur:ll(o,S),onMouseEnter:ll(c,y),onMouseLeave:ll(f,S),onTouchStart:ll(h,y)}]:[!1,d,{}]}function ll(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function ux({page:e,...t}){let{router:a}=dg(),n=x.useMemo(()=>tg(a.routes,e,a.basename),[a.routes,e,a.basename]);return n?x.createElement(fx,{page:e,matches:n,...t}):null}function cx(e){let{manifest:t,routeModules:a}=hg(),[n,l]=x.useState([]);return x.useEffect(()=>{let s=!1;return tx(e,t,a).then(r=>{s||l(r)}),()=>{s=!0}},[e,t,a]),n}function fx({page:e,matches:t,...a}){let n=Rt(),{manifest:l,routeModules:s}=hg(),{basename:r}=dg(),{loaderData:i,matches:o}=ix(),c=x.useMemo(()=>Of(e,t,o,l,n,"data"),[e,t,o,l,n]),f=x.useMemo(()=>Of(e,t,o,l,n,"assets"),[e,t,o,l,n]),h=x.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let S=new Set,v=!1;if(t.forEach(g=>{var p;let m=l.routes[g.route.id];!m||!m.hasLoader||(!c.some(b=>b.route.id===g.route.id)&&g.route.id in i&&((p=s[g.route.id])!=null&&p.shouldRevalidate)||m.hasClientLoader?v=!0:S.add(g.route.id))}),S.size===0)return[];let w=rx(e,r);return v&&S.size>0&&w.searchParams.set("_routes",t.filter(g=>S.has(g.route.id)).map(g=>g.route.id).join(",")),[w.pathname+w.search]},[r,i,n,l,c,t,e,s]),d=x.useMemo(()=>ax(f,l),[f,l]),y=cx(f);return x.createElement(x.Fragment,null,h.map(S=>x.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...a})),d.map(S=>x.createElement("link",{key:S,rel:"modulepreload",href:S,...a})),y.map(({key:S,link:v})=>x.createElement("link",{key:S,...v})))}function dx(...e){return t=>{e.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var mg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{mg&&(window.__reactRouterVersion="7.5.0")}catch{}function hx({basename:e,children:t,window:a}){let n=x.useRef();n.current==null&&(n.current=Iy({window:a,v5Compat:!0}));let l=n.current,[s,r]=x.useState({action:l.action,location:l.location}),i=x.useCallback(o=>{x.startTransition(()=>r(o))},[r]);return x.useLayoutEffect(()=>l.listen(i),[l,i]),x.createElement(Yv,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:l})}var gg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pg=x.forwardRef(function({onClick:t,discover:a="render",prefetch:n="none",relative:l,reloadDocument:s,replace:r,state:i,target:o,to:c,preventScrollReset:f,viewTransition:h,...d},y){let{basename:S}=x.useContext(vt),v=typeof c=="string"&&gg.test(c),w,g=!1;if(typeof c=="string"&&v&&(w=c,mg))try{let R=new URL(window.location.href),O=c.startsWith("//")?new URL(R.protocol+c):new URL(c),B=Qt(O.pathname,S);O.origin===R.origin&&B!=null?c=B+O.search+O.hash:g=!0}catch{pt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let m=Ev(c,{relative:l}),[p,b,j]=ox(n,d),E=px(c,{replace:r,state:i,target:o,preventScrollReset:f,relative:l,viewTransition:h});function N(R){t&&t(R),R.defaultPrevented||E(R)}let C=x.createElement("a",{...d,...j,href:w||m,onClick:g||s?t:N,ref:dx(y,b),target:o,"data-discover":!v&&a==="render"?"true":void 0});return p&&!v?x.createElement(x.Fragment,null,C,x.createElement(ux,{page:m})):C});pg.displayName="Link";var yg=x.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:n="",end:l=!1,style:s,to:r,viewTransition:i,children:o,...c},f){let h=rs(r,{relative:c.relative}),d=Rt(),y=x.useContext(Vr),{navigator:S,basename:v}=x.useContext(vt),w=y!=null&&Sx(h)&&i===!0,g=S.encodeLocation?S.encodeLocation(h).pathname:h.pathname,m=d.pathname,p=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;a||(m=m.toLowerCase(),p=p?p.toLowerCase():null,g=g.toLowerCase()),p&&v&&(p=Qt(p,v)||p);const b=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let j=m===g||!l&&m.startsWith(g)&&m.charAt(b)==="/",E=p!=null&&(p===g||!l&&p.startsWith(g)&&p.charAt(g.length)==="/"),N={isActive:j,isPending:E,isTransitioning:w},C=j?t:void 0,R;typeof n=="function"?R=n(N):R=[n,j?"active":null,E?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let O=typeof s=="function"?s(N):s;return x.createElement(pg,{...c,"aria-current":C,className:R,ref:f,style:O,to:r,viewTransition:i},typeof o=="function"?o(N):o)});yg.displayName="NavLink";var mx=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:n,replace:l,state:s,method:r=qs,action:i,onSubmit:o,relative:c,preventScrollReset:f,viewTransition:h,...d},y)=>{let S=xx(),v=bx(i,{relative:c}),w=r.toLowerCase()==="get"?"get":"post",g=typeof i=="string"&&gg.test(i),m=p=>{if(o&&o(p),p.defaultPrevented)return;p.preventDefault();let b=p.nativeEvent.submitter,j=(b==null?void 0:b.getAttribute("formmethod"))||r;S(b||p.currentTarget,{fetcherKey:t,method:j,navigate:a,replace:l,state:s,relative:c,preventScrollReset:f,viewTransition:h})};return x.createElement("form",{ref:y,method:w,action:v,onSubmit:n?o:m,...d,"data-discover":!g&&e==="render"?"true":void 0})});mx.displayName="Form";function gx(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vg(e){let t=x.useContext($n);return he(t,gx(e)),t}function px(e,{target:t,replace:a,state:n,preventScrollReset:l,relative:s,viewTransition:r}={}){let i=Xa(),o=Rt(),c=rs(e,{relative:s});return x.useCallback(f=>{if(Jv(f,t)){f.preventDefault();let h=a!==void 0?a:ql(o)===ql(c);i(e,{replace:h,state:n,preventScrollReset:l,relative:s,viewTransition:r})}},[o,i,c,a,n,t,e,l,s,r])}var yx=0,vx=()=>`__${String(++yx)}__`;function xx(){let{router:e}=vg("useSubmit"),{basename:t}=x.useContext(vt),a=Bv();return x.useCallback(async(n,l={})=>{let{action:s,method:r,encType:i,formData:o,body:c}=Wv(n,t);if(l.navigate===!1){let f=l.fetcherKey||vx();await e.fetch(f,a,l.action||s,{preventScrollReset:l.preventScrollReset,formData:o,body:c,formMethod:l.method||r,formEncType:l.encType||i,flushSync:l.flushSync})}else await e.navigate(l.action||s,{preventScrollReset:l.preventScrollReset,formData:o,body:c,formMethod:l.method||r,formEncType:l.encType||i,replace:l.replace,state:l.state,fromRouteId:a,flushSync:l.flushSync,viewTransition:l.viewTransition})},[e,t,a])}function bx(e,{relative:t}={}){let{basename:a}=x.useContext(vt),n=x.useContext(ft);he(n,"useFormAction must be used inside a RouteContext");let[l]=n.matches.slice(-1),s={...rs(e||".",{relative:t})},r=Rt();if(e==null){s.search=r.search;let i=new URLSearchParams(s.search),o=i.getAll("index");if(o.some(f=>f==="")){i.delete("index"),o.filter(h=>h).forEach(h=>i.append("index",h));let f=i.toString();s.search=f?`?${f}`:""}}return(!e||e===".")&&l.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(s.pathname=s.pathname==="/"?a:qt([a,s.pathname])),ql(s)}function Sx(e,t={}){let a=x.useContext(sg);he(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=vg("useViewTransitionState"),l=rs(e,{relative:t.relative});if(!a.isTransitioning)return!1;let s=Qt(a.currentLocation.pathname,n)||a.currentLocation.pathname,r=Qt(a.nextLocation.pathname,n)||a.nextLocation.pathname;return xr(l.pathname,r)!=null||xr(l.pathname,s)!=null}new TextEncoder;const $r="",$u="mcphub_token",Xu=()=>localStorage.getItem($u),xg=e=>{localStorage.setItem($u,e)},Ro=()=>{localStorage.removeItem($u)},wx=async e=>{try{const a=await(await fetch(`${$r}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();return a.success&&a.token&&xg(a.token),a}catch(t){return console.error("Login error:",t),{success:!1,message:"An error occurred during login"}}},Nx=async e=>{try{const a=await(await fetch(`${$r}/auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();return a.success&&a.token&&xg(a.token),a}catch(t){return console.error("Register error:",t),{success:!1,message:"An error occurred during registration"}}},jx=async()=>{const e=Xu();if(!e)return{success:!1,message:"No authentication token"};try{return await(await fetch(`${$r}/auth/user`,{method:"GET",headers:{"x-auth-token":e}})).json()}catch(t){return console.error("Get current user error:",t),{success:!1,message:"An error occurred while fetching user data"}}},Ex=async e=>{const t=Xu();if(!t)return{success:!1,message:"No authentication token"};try{return await(await fetch(`${$r}/auth/change-password`,{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":t},body:JSON.stringify(e)})).json()}catch(a){return console.error("Change password error:",a),{success:!1,message:"An error occurred while changing password"}}},Cx=()=>{Ro()},bt={token:null,isAuthenticated:!1,loading:!0,user:null,error:null},bg=x.createContext({auth:bt,login:async()=>!1,register:async()=>!1,logout:()=>{}}),Tx=({children:e})=>{const[t,a]=x.useState(bt);x.useEffect(()=>{(async()=>{const i=Xu();if(!i){a({...bt,loading:!1});return}try{const o=await jx();o.success&&o.user?a({token:i,isAuthenticated:!0,loading:!1,user:o.user,error:null}):(Ro(),a({...bt,loading:!1}))}catch{Ro(),a({...bt,loading:!1})}})()},[]);const n=async(r,i)=>{try{const o=await wx({username:r,password:i});return o.success&&o.token&&o.user?(a({token:o.token,isAuthenticated:!0,loading:!1,user:o.user,error:null}),!0):(a({...bt,loading:!1,error:o.message||"Authentication failed"}),!1)}catch{return a({...bt,loading:!1,error:"Authentication failed"}),!1}},l=async(r,i,o=!1)=>{try{const c=await Nx({username:r,password:i,isAdmin:o});return c.success&&c.token&&c.user?(a({token:c.token,isAuthenticated:!0,loading:!1,user:c.user,error:null}),!0):(a({...bt,loading:!1,error:c.message||"Registration failed"}),!1)}catch{return a({...bt,loading:!1,error:"Registration failed"}),!1}},s=()=>{Cx(),a({...bt,loading:!1})};return u.jsx(bg.Provider,{value:{auth:t,login:n,register:l,logout:s},children:e})},Qu=()=>x.useContext(bg);/**
|
|
61
|
+
* @license lucide-react v0.486.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const Ax=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rx=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,n)=>n?n.toUpperCase():a.toLowerCase()),zf=e=>{const t=Rx(e);return t.charAt(0).toUpperCase()+t.slice(1)},Sg=(...e)=>e.filter((t,a,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===a).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v0.486.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var Ox={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
71
|
+
* @license lucide-react v0.486.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const zx=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:l="",children:s,iconNode:r,...i},o)=>x.createElement("svg",{ref:o,...Ox,width:t,height:t,stroke:e,strokeWidth:n?Number(a)*24/Number(t):a,className:Sg("lucide",l),...i},[...r.map(([c,f])=>x.createElement(c,f)),...Array.isArray(s)?s:[s]]));/**
|
|
76
|
+
* @license lucide-react v0.486.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Na=(e,t)=>{const a=x.forwardRef(({className:n,...l},s)=>x.createElement(zx,{ref:s,iconNode:t,className:Sg(`lucide-${Ax(zf(e))}`,`lucide-${e}`,n),...l}));return a.displayName=zf(e),a};/**
|
|
81
|
+
* @license lucide-react v0.486.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const Mx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ku=Na("check",Mx);/**
|
|
86
|
+
* @license lucide-react v0.486.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const kx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],wg=Na("chevron-down",kx);/**
|
|
91
|
+
* @license lucide-react v0.486.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Dx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ng=Na("chevron-right",Dx);/**
|
|
96
|
+
* @license lucide-react v0.486.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const Lx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ux=Na("circle-alert",Lx);/**
|
|
101
|
+
* @license lucide-react v0.486.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const _x=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],jg=Na("copy",_x);/**
|
|
106
|
+
* @license lucide-react v0.486.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const Hx=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Bx=Na("square-pen",Hx);/**
|
|
111
|
+
* @license lucide-react v0.486.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Gx=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],qx=Na("trash",Gx);/**
|
|
116
|
+
* @license lucide-react v0.486.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const Vx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Mf=Na("x",Vx);function Eg(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=Eg(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function Yx(){for(var e,t,a=0,n="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=Eg(e))&&(n&&(n+=" "),n+=t);return n}const Zu="-",$x=e=>{const t=Qx(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:r=>{const i=r.split(Zu);return i[0]===""&&i.length!==1&&i.shift(),Cg(i,t)||Xx(r)},getConflictingClassGroupIds:(r,i)=>{const o=a[r]||[];return i&&n[r]?[...o,...n[r]]:o}}},Cg=(e,t)=>{var r;if(e.length===0)return t.classGroupId;const a=e[0],n=t.nextPart.get(a),l=n?Cg(e.slice(1),n):void 0;if(l)return l;if(t.validators.length===0)return;const s=e.join(Zu);return(r=t.validators.find(({validator:i})=>i(s)))==null?void 0:r.classGroupId},kf=/^\[(.+)\]$/,Xx=e=>{if(kf.test(e)){const t=kf.exec(e)[1],a=t==null?void 0:t.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Qx=e=>{const{theme:t,classGroups:a}=e,n={nextPart:new Map,validators:[]};for(const l in a)Oo(a[l],n,l,t);return n},Oo=(e,t,a,n)=>{e.forEach(l=>{if(typeof l=="string"){const s=l===""?t:Df(t,l);s.classGroupId=a;return}if(typeof l=="function"){if(Kx(l)){Oo(l(n),t,a,n);return}t.validators.push({validator:l,classGroupId:a});return}Object.entries(l).forEach(([s,r])=>{Oo(r,Df(t,s),a,n)})})},Df=(e,t)=>{let a=e;return t.split(Zu).forEach(n=>{a.nextPart.has(n)||a.nextPart.set(n,{nextPart:new Map,validators:[]}),a=a.nextPart.get(n)}),a},Kx=e=>e.isThemeGetter,Zx=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,n=new Map;const l=(s,r)=>{a.set(s,r),t++,t>e&&(t=0,n=a,a=new Map)};return{get(s){let r=a.get(s);if(r!==void 0)return r;if((r=n.get(s))!==void 0)return l(s,r),r},set(s,r){a.has(s)?a.set(s,r):l(s,r)}}},zo="!",Mo=":",Jx=Mo.length,Fx=e=>{const{prefix:t,experimentalParseClassName:a}=e;let n=l=>{const s=[];let r=0,i=0,o=0,c;for(let S=0;S<l.length;S++){let v=l[S];if(r===0&&i===0){if(v===Mo){s.push(l.slice(o,S)),o=S+Jx;continue}if(v==="/"){c=S;continue}}v==="["?r++:v==="]"?r--:v==="("?i++:v===")"&&i--}const f=s.length===0?l:l.substring(o),h=Px(f),d=h!==f,y=c&&c>o?c-o:void 0;return{modifiers:s,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:y}};if(t){const l=t+Mo,s=n;n=r=>r.startsWith(l)?s(r.substring(l.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:r,maybePostfixModifierPosition:void 0}}if(a){const l=n;n=s=>a({className:s,parseClassName:l})}return n},Px=e=>e.endsWith(zo)?e.substring(0,e.length-1):e.startsWith(zo)?e.substring(1):e,Wx=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const l=[];let s=[];return n.forEach(r=>{r[0]==="["||t[r]?(l.push(...s.sort(),r),s=[]):s.push(r)}),l.push(...s.sort()),l}},Ix=e=>({cache:Zx(e.cacheSize),parseClassName:Fx(e),sortModifiers:Wx(e),...$x(e)}),eb=/\s+/,tb=(e,t)=>{const{parseClassName:a,getClassGroupId:n,getConflictingClassGroupIds:l,sortModifiers:s}=t,r=[],i=e.trim().split(eb);let o="";for(let c=i.length-1;c>=0;c-=1){const f=i[c],{isExternal:h,modifiers:d,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:v}=a(f);if(h){o=f+(o.length>0?" "+o:o);continue}let w=!!v,g=n(w?S.substring(0,v):S);if(!g){if(!w){o=f+(o.length>0?" "+o:o);continue}if(g=n(S),!g){o=f+(o.length>0?" "+o:o);continue}w=!1}const m=s(d).join(":"),p=y?m+zo:m,b=p+g;if(r.includes(b))continue;r.push(b);const j=l(g,w);for(let E=0;E<j.length;++E){const N=j[E];r.push(p+N)}o=f+(o.length>0?" "+o:o)}return o};function ab(){let e=0,t,a,n="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Tg(t))&&(n&&(n+=" "),n+=a);return n}const Tg=e=>{if(typeof e=="string")return e;let t,a="";for(let n=0;n<e.length;n++)e[n]&&(t=Tg(e[n]))&&(a&&(a+=" "),a+=t);return a};function nb(e,...t){let a,n,l,s=r;function r(o){const c=t.reduce((f,h)=>h(f),e());return a=Ix(c),n=a.cache.get,l=a.cache.set,s=i,i(o)}function i(o){const c=n(o);if(c)return c;const f=tb(o,a);return l(o,f),f}return function(){return s(ab.apply(null,arguments))}}const Ce=e=>{const t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ag=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lb=/^\d+\/\d+$/,sb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ib=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ob=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ub=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Za=e=>lb.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),Pt=e=>!!e&&Number.isInteger(Number(e)),Lf=e=>e.endsWith("%")&&K(e.slice(0,-1)),Wt=e=>sb.test(e),cb=()=>!0,fb=e=>rb.test(e)&&!ib.test(e),Ju=()=>!1,db=e=>ob.test(e),hb=e=>ub.test(e),mb=e=>!z(e)&&!M(e),gb=e=>Qn(e,Mg,Ju),z=e=>Ag.test(e),Ea=e=>Qn(e,kg,fb),Ri=e=>Qn(e,Cb,K),pb=e=>Qn(e,Og,Ju),yb=e=>Qn(e,zg,hb),vb=e=>Qn(e,Ju,db),M=e=>Rg.test(e),sl=e=>Kn(e,kg),xb=e=>Kn(e,Tb),bb=e=>Kn(e,Og),Sb=e=>Kn(e,Mg),wb=e=>Kn(e,zg),Nb=e=>Kn(e,Ab,!0),Qn=(e,t,a)=>{const n=Ag.exec(e);return n?n[1]?t(n[1]):a(n[2]):!1},Kn=(e,t,a=!1)=>{const n=Rg.exec(e);return n?n[1]?t(n[1]):a:!1},Og=e=>e==="position",jb=new Set(["image","url"]),zg=e=>jb.has(e),Eb=new Set(["length","size","percentage"]),Mg=e=>Eb.has(e),kg=e=>e==="length",Cb=e=>e==="number",Tb=e=>e==="family-name",Ab=e=>e==="shadow",Rb=()=>{const e=Ce("color"),t=Ce("font"),a=Ce("text"),n=Ce("font-weight"),l=Ce("tracking"),s=Ce("leading"),r=Ce("breakpoint"),i=Ce("container"),o=Ce("spacing"),c=Ce("radius"),f=Ce("shadow"),h=Ce("inset-shadow"),d=Ce("drop-shadow"),y=Ce("blur"),S=Ce("perspective"),v=Ce("aspect"),w=Ce("ease"),g=Ce("animate"),m=()=>["auto","avoid","all","avoid-page","page","left","right","column"],p=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],b=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],E=()=>[M,z,o],N=()=>[Za,"full","auto",...E()],C=()=>[Pt,"none","subgrid",M,z],R=()=>["auto",{span:["full",Pt,M,z]},Pt,M,z],O=()=>[Pt,"auto",M,z],B=()=>["auto","min","max","fr",M,z],ee=()=>["start","end","center","between","around","evenly","stretch","baseline"],me=()=>["start","end","center","stretch"],Z=()=>["auto",...E()],ie=()=>[Za,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],A=()=>[e,M,z],_=()=>[Lf,sl,Ea],k=()=>["","none","full",c,M,z],U=()=>["",K,sl,Ea],J=()=>["solid","dashed","dotted","double"],ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Me=()=>["","none",y,M,z],F=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M,z],pe=()=>["none",K,M,z],dt=()=>["none",K,M,z],D=()=>[K,M,z],L=()=>[Za,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Wt],breakpoint:[Wt],color:[cb],container:[Wt],"drop-shadow":[Wt],ease:["in","out","in-out"],font:[mb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Wt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Wt],shadow:[Wt],spacing:["px",K],text:[Wt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Za,z,M,v]}],container:["container"],columns:[{columns:[K,z,M,i]}],"break-after":[{"break-after":m()}],"break-before":[{"break-before":m()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...p(),z,M]}],overflow:[{overflow:b()}],"overflow-x":[{"overflow-x":b()}],"overflow-y":[{"overflow-y":b()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Pt,"auto",M,z]}],basis:[{basis:[Za,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[K,Za,"auto","initial","none",z]}],grow:[{grow:["",K,M,z]}],shrink:[{shrink:["",K,M,z]}],order:[{order:[Pt,"first","last","none",M,z]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...me(),"normal"]}],"justify-self":[{"justify-self":["auto",...me()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...me(),"baseline"]}],"align-self":[{self:["auto",...me(),"baseline"]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...me(),"baseline"]}],"place-self":[{"place-self":["auto",...me()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:ie()}],w:[{w:[i,"screen",...ie()]}],"min-w":[{"min-w":[i,"screen","none",...ie()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[r]},...ie()]}],h:[{h:["screen",...ie()]}],"min-h":[{"min-h":["screen","none",...ie()]}],"max-h":[{"max-h":["screen",...ie()]}],"font-size":[{text:["base",a,sl,Ea]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,M,Ri]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Lf,z]}],"font-family":[{font:[xb,z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,M,z]}],"line-clamp":[{"line-clamp":[K,"none",M,Ri]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",M,z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[K,"from-font","auto",M,Ea]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[K,"auto",M,z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M,z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",M,z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...p(),bb,pb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Sb,gb]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pt,M,z],radial:["",M,z],conic:[Pt,M,z]},wb,yb]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[K,M,z]}],"outline-w":[{outline:["",K,sl,Ea]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,Nb,vb]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",M,z,h]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[K,Ea]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":A()}],opacity:[{opacity:[K,M,z]}],"mix-blend":[{"mix-blend":[...ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ze()}],filter:[{filter:["","none",M,z]}],blur:[{blur:Me()}],brightness:[{brightness:[K,M,z]}],contrast:[{contrast:[K,M,z]}],"drop-shadow":[{"drop-shadow":["","none",d,M,z]}],grayscale:[{grayscale:["",K,M,z]}],"hue-rotate":[{"hue-rotate":[K,M,z]}],invert:[{invert:["",K,M,z]}],saturate:[{saturate:[K,M,z]}],sepia:[{sepia:["",K,M,z]}],"backdrop-filter":[{"backdrop-filter":["","none",M,z]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[K,M,z]}],"backdrop-contrast":[{"backdrop-contrast":[K,M,z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",K,M,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,M,z]}],"backdrop-invert":[{"backdrop-invert":["",K,M,z]}],"backdrop-opacity":[{"backdrop-opacity":[K,M,z]}],"backdrop-saturate":[{"backdrop-saturate":[K,M,z]}],"backdrop-sepia":[{"backdrop-sepia":["",K,M,z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",M,z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[K,"initial",M,z]}],ease:[{ease:["linear","initial",w,M,z]}],delay:[{delay:[K,M,z]}],animate:[{animate:["none",g,M,z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,M,z]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:dt()}],"scale-x":[{"scale-x":dt()}],"scale-y":[{"scale-y":dt()}],"scale-z":[{"scale-z":dt()}],"scale-3d":["scale-3d"],skew:[{skew:D()}],"skew-x":[{"skew-x":D()}],"skew-y":[{"skew-y":D()}],transform:[{transform:[M,z,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",M,z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",M,z]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[K,sl,Ea,Ri]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},Ob=nb(Rb);function jn(...e){return Ob(Yx(e))}const zb=({message:e,type:t="info",duration:a=3e3,onClose:n,visible:l})=>{x.useEffect(()=>{if(l){const o=setTimeout(()=>{n()},a);return()=>clearTimeout(o)}},[l,a,n]);const s={success:u.jsx(Ku,{className:"w-5 h-5 text-green-500"}),error:u.jsx(Mf,{className:"w-5 h-5 text-red-500"}),info:u.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),warning:u.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})},r={success:"bg-green-50 border-green-200",error:"bg-red-50 border-red-200",info:"bg-blue-50 border-blue-200",warning:"bg-yellow-50 border-yellow-200"},i={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return u.jsx("div",{className:jn("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",r[t],"transform transition-all duration-300 ease-in-out",l?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:u.jsxs("div",{className:"flex items-start",children:[u.jsx("div",{className:"flex-shrink-0",children:s[t]}),u.jsx("div",{className:"ml-3",children:u.jsx("p",{className:jn("text-sm font-medium",i[t]),children:e})}),u.jsx("div",{className:"ml-auto pl-3",children:u.jsx("div",{className:"-mx-1.5 -my-1.5",children:u.jsxs("button",{onClick:n,className:jn("inline-flex rounded-md p-1.5",`hover:bg-${t}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${t}-500`),children:[u.jsx("span",{className:"sr-only",children:"Dismiss"}),u.jsx(Mf,{className:"h-5 w-5"})]})})})]})})},Dg=x.createContext(void 0),is=()=>{const e=x.useContext(Dg);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},Mb=({children:e})=>{const[t,a]=x.useState({message:"",type:"info",visible:!1,duration:3e3}),n=(s,r="info",i=3e3)=>{a({message:s,type:r,visible:!0,duration:i})},l=()=>{a(s=>({...s,visible:!1}))};return u.jsxs(Dg.Provider,{value:{showToast:n},children:[e,u.jsx(zb,{message:t.message,type:t.type,duration:t.duration,onClose:l,visible:t.visible})]})},kb=(e,t,a,n)=>{var s,r,i,o;const l=[a,{code:t,...n||{}}];if((r=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&r.forward)return e.services.logger.forward(l,"warn","react-i18next::",!0);Ua(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),(o=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&o.warn?e.services.logger.warn(...l):console!=null&&console.warn&&console.warn(...l)},Uf={},ko=(e,t,a,n)=>{Ua(a)&&Uf[a]||(Ua(a)&&(Uf[a]=new Date),kb(e,t,a,n))},Lg=(e,t)=>()=>{if(e.isInitialized)t();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),t()};e.on("initialized",a)}},Do=(e,t,a)=>{e.loadNamespaces(t,Lg(e,a))},_f=(e,t,a,n)=>{if(Ua(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Do(e,a,n);a.forEach(l=>{e.options.ns.indexOf(l)<0&&e.options.ns.push(l)}),e.loadLanguages(t,Lg(e,n))},Db=(e,t,a={})=>!t.languages||!t.languages.length?(ko(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:a.lng,precheck:(n,l)=>{var s;if(((s=a.bindI18n)==null?void 0:s.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!l(n.isLanguageChangingTo,e))return!1}}),Ua=e=>typeof e=="string",Lb=e=>typeof e=="object"&&e!==null,Ub=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_b={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Hb=e=>_b[e],Bb=e=>e.replace(Ub,Hb);let Lo={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Bb};const Gb=(e={})=>{Lo={...Lo,...e}},qb=()=>Lo;let Ug;const Vb=e=>{Ug=e},Yb=()=>Ug,$b={type:"3rdParty",init(e){Gb(e.options.react),Vb(e)}},Xb=x.createContext();class Qb{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Kb=(e,t)=>{const a=x.useRef();return x.useEffect(()=>{a.current=e},[e,t]),a.current},_g=(e,t,a,n)=>e.getFixedT(t,a,n),Zb=(e,t,a,n)=>x.useCallback(_g(e,t,a,n),[e,t,a,n]),ue=(e,t={})=>{var b,j,E,N;const{i18n:a}=t,{i18n:n,defaultNS:l}=x.useContext(Xb)||{},s=a||n||Yb();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Qb),!s){ko(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const C=(O,B)=>Ua(B)?B:Lb(B)&&Ua(B.defaultValue)?B.defaultValue:Array.isArray(O)?O[O.length-1]:O,R=[C,{},!1];return R.t=C,R.i18n={},R.ready=!1,R}(b=s.options.react)!=null&&b.wait&&ko(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const r={...qb(),...s.options.react,...t},{useSuspense:i,keyPrefix:o}=r;let c=l||((j=s.options)==null?void 0:j.defaultNS);c=Ua(c)?[c]:c||["translation"],(N=(E=s.reportNamespaces).addUsedNamespaces)==null||N.call(E,c);const f=(s.isInitialized||s.initializedStoreOnce)&&c.every(C=>Db(C,s,r)),h=Zb(s,t.lng||null,r.nsMode==="fallback"?c:c[0],o),d=()=>h,y=()=>_g(s,t.lng||null,r.nsMode==="fallback"?c:c[0],o),[S,v]=x.useState(d);let w=c.join();t.lng&&(w=`${t.lng}${w}`);const g=Kb(w),m=x.useRef(!0);x.useEffect(()=>{const{bindI18n:C,bindI18nStore:R}=r;m.current=!0,!f&&!i&&(t.lng?_f(s,t.lng,c,()=>{m.current&&v(y)}):Do(s,c,()=>{m.current&&v(y)})),f&&g&&g!==w&&m.current&&v(y);const O=()=>{m.current&&v(y)};return C&&(s==null||s.on(C,O)),R&&(s==null||s.store.on(R,O)),()=>{m.current=!1,s&&(C==null||C.split(" ").forEach(B=>s.off(B,O))),R&&s&&R.split(" ").forEach(B=>s.store.off(B,O))}},[s,w]),x.useEffect(()=>{m.current&&f&&v(d)},[s,o,f]);const p=[S,s,f];if(p.t=S,p.i18n=s,p.ready=f,f||!f&&!i)return p;throw new Promise(C=>{t.lng?_f(s,t.lng,c,()=>C()):Do(s,c,()=>C())})},Jb=({onToggleSidebar:e})=>{const{t}=ue(),a=Xa(),{auth:n,logout:l}=Qu(),s=()=>{l(),a("/login")};return u.jsx("header",{className:"bg-white shadow-sm z-10",children:u.jsxs("div",{className:"flex justify-between items-center px-4 py-3",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("button",{onClick:e,className:"p-2 rounded-md text-gray-500 hover:text-gray-900 hover:bg-gray-100 focus:outline-none","aria-label":t("app.toggleSidebar"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),u.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900",children:t("app.title")})]}),u.jsxs("div",{className:"flex items-center space-x-4",children:[n.user&&u.jsx("span",{className:"text-sm text-gray-700",children:t("app.welcomeUser",{username:n.user.username})}),u.jsx("div",{className:"flex space-x-2",children:u.jsx("button",{onClick:s,className:"px-3 py-1.5 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:t("app.logout")})})]})]})})},Fb=({collapsed:e})=>{const{t}=ue();Rt();const a=[{path:"/",label:t("nav.dashboard"),icon:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[u.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),u.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:t("nav.servers"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"})})},{path:"/groups",label:t("nav.groups"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{d:"M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"})})},{path:"/market",label:t("nav.market"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})})},{path:"/settings",label:t("nav.settings"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"})})}];return u.jsx("aside",{className:`bg-white shadow-sm transition-all duration-300 ease-in-out ${e?"w-16":"w-64"}`,children:u.jsx("nav",{className:"p-3 space-y-1",children:a.map(n=>u.jsxs(yg,{to:n.path,className:({isActive:l})=>`flex items-center px-3 py-2 rounded-md transition-colors ${l?"bg-blue-100 text-blue-800":"text-gray-700 hover:bg-gray-100"}`,end:n.path==="/",children:[u.jsx("span",{className:"flex-shrink-0",children:n.icon}),!e&&u.jsx("span",{className:"ml-3",children:n.label})]},n.path))})})},Pb=({children:e})=>u.jsx("main",{className:"flex-1 p-6 overflow-auto",children:u.jsx("div",{className:"max-w-5xl mx-auto",children:e})}),Wb=()=>{const[e,t]=hd.useState(!1),a=()=>{t(!e)};return u.jsxs("div",{className:"flex flex-col min-h-screen bg-gray-100",children:[u.jsx(Jb,{onToggleSidebar:a}),u.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[u.jsx(Fb,{collapsed:e}),u.jsx(Pb,{children:u.jsx(fg,{})})]})]})},Ib=({redirectPath:e="/login"})=>{const{t}=ue(),{auth:a}=Qu();return a.loading?u.jsx("div",{className:"flex items-center justify-center h-screen",children:t("app.loading")}):a.isAuthenticated?u.jsx(fg,{}):u.jsx(cg,{to:e,replace:!0})},e1=()=>{const{t:e}=ue(),[t,a]=x.useState(""),[n,l]=x.useState(""),[s,r]=x.useState(null),[i,o]=x.useState(!1),{login:c}=Qu(),f=Xa(),h=async d=>{d.preventDefault(),r(null),o(!0);try{if(!t||!n){r(e("auth.emptyFields")),o(!1);return}await c(t,n)?f("/"):r(e("auth.loginFailed"))}catch{r(e("auth.loginError"))}finally{o(!1)}};return u.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-md w-full space-y-8",children:[u.jsx("div",{children:u.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900",children:e("auth.loginTitle")})}),u.jsxs("form",{className:"mt-8 space-y-6",onSubmit:h,children:[u.jsxs("div",{className:"rounded-md shadow-sm -space-y-px",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"username",className:"sr-only",children:e("auth.username")}),u.jsx("input",{id:"username",name:"username",type:"text",autoComplete:"username",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:e("auth.username"),value:t,onChange:d=>a(d.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"sr-only",children:e("auth.password")}),u.jsx("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:e("auth.password"),value:n,onChange:d=>l(d.target.value)})]})]}),s&&u.jsx("div",{className:"text-red-500 text-sm text-center",children:s}),u.jsx("div",{children:u.jsx("button",{type:"submit",disabled:i,className:"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:e(i?"auth.loggingIn":"auth.login")})})]})]})})},Cs={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},os=()=>{const{t:e}=ue(),[t,a]=x.useState([]),[n,l]=x.useState(null),[s,r]=x.useState(0),[i,o]=x.useState(!0),[c,f]=x.useState(0),h=x.useRef(null),d=x.useRef(0),y=()=>{h.current&&(clearInterval(h.current),h.current=null)},S=x.useCallback(()=>{y();const b=async()=>{try{const j=localStorage.getItem("mcphub_token"),N=await(await fetch("/api/servers",{headers:{"x-auth-token":j||""}})).json();N&&N.success&&Array.isArray(N.data)?a(N.data):N&&Array.isArray(N)?a(N):(console.error("Invalid server data format:",N),a([])),l(null)}catch(j){console.error("Error fetching servers during normal polling:",j),navigator.onLine?j instanceof TypeError&&(j.message.includes("NetworkError")||j.message.includes("Failed to fetch"))?l(e("errors.serverConnection")):l(e("errors.serverFetch")):l(e("errors.network"))}};b(),h.current=setInterval(b,Cs.normal.pollingInterval)},[e]);return x.useEffect(()=>{s>0&&(d.current=0,f(0));const b=async()=>{try{const j=localStorage.getItem("mcphub_token"),N=await(await fetch("/api/servers",{headers:{"x-auth-token":j||""}})).json();return N&&N.success&&Array.isArray(N.data)?(a(N.data),o(!1),S(),!0):N&&Array.isArray(N)?(a(N),o(!1),S(),!0):(console.error("Invalid server data format:",N),a([]),o(!1),S(),!0)}catch(j){return d.current+=1,console.error(`Initial loading attempt ${d.current} failed:`,j),f(d.current),navigator.onLine?l(e("errors.initialStartup")):l(e("errors.network")),d.current>=Cs.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),o(!1),y(),S()),!1}};return i?(y(),b(),h.current=setInterval(b,Cs.startup.pollingInterval),console.log(`Started initial polling with interval: ${Cs.startup.pollingInterval}ms`)):S(),()=>{y()}},[s,e,i,S]),{servers:t,error:n,setError:l,isLoading:i,fetchAttempts:c,triggerRefresh:()=>{y(),i&&(o(!0),d.current=0,f(0)),r(b=>b+1)},handleServerAdd:()=>{r(b=>b+1)},handleServerEdit:async b=>{try{const j=localStorage.getItem("mcphub_token"),N=await(await fetch("/api/settings",{headers:{"x-auth-token":j||""}})).json();if(N&&N.success&&N.data&&N.data.mcpServers&&N.data.mcpServers[b.name]){const C=N.data.mcpServers[b.name];return{name:b.name,status:b.status,tools:b.tools||[],config:C}}else return console.error("Failed to get server config from settings:",N),l(e("server.invalidConfig",{serverName:b.name})),null}catch(j){return console.error("Error fetching server settings:",j),l(j instanceof Error?j.message:String(j)),null}},handleServerRemove:async b=>{try{const j=localStorage.getItem("mcphub_token"),E=await fetch(`/api/servers/${b}`,{method:"DELETE",headers:{"x-auth-token":j||""}}),N=await E.json();return E.ok?(r(C=>C+1),!0):(l(N.message||e("server.deleteError",{serverName:b})),!1)}catch(j){return l(e("errors.general")+": "+(j instanceof Error?j.message:String(j))),!1}},handleServerToggle:async(b,j)=>{try{const E=localStorage.getItem("mcphub_token"),N=await fetch(`/api/servers/${b.name}/toggle`,{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":E||""},body:JSON.stringify({enabled:j})}),C=await N.json();return N.ok?(r(R=>R+1),!0):(console.error("Failed to toggle server:",C),l(e("server.toggleError",{serverName:b.name})),!1)}catch(E){return console.error("Error toggling server:",E),l(E instanceof Error?E.message:String(E)),!1}}}},t1=()=>{const{t:e}=ue(),{servers:t,error:a,setError:n,isLoading:l}=os(),s={total:t.length,online:t.filter(o=>o.status==="connected").length,offline:t.filter(o=>o.status==="disconnected").length,connecting:t.filter(o=>o.status==="connecting").length},r={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"},i=o=>t.length===0?0:Math.round(t.filter(c=>c.status===o).length/t.length*100);return u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:e("pages.dashboard.title")}),a&&u.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-red-600 text-lg font-medium",children:e("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:a})]}),u.jsx("button",{onClick:()=>n(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":e("app.closeButton"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 111.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),l?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):u.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[u.jsx("div",{className:"bg-white rounded-lg shadow p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.totalServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.total})]})]})}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.onlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.online})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-green-500 rounded-full",style:{width:`${i("connected")}%`}})})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.offlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.offline})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-red-500 rounded-full",style:{width:`${i("disconnected")}%`}})})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.connectingServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.connecting})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-yellow-500 rounded-full",style:{width:`${i("connecting")}%`}})})]})]}),t.length>0&&!l&&u.jsxs("div",{className:"mt-8",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:e("pages.dashboard.recentServers")}),u.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e("server.name")}),u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e("server.status")}),u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e("server.tools")}),u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e("server.enabled")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:t.slice(0,5).map((o,c)=>{var f;return u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:o.name}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${o.status==="connected"?"bg-green-100 text-green-800":o.status==="disconnected"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:e(r[o.status]||o.status)})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((f=o.tools)==null?void 0:f.length)||0}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:o.enabled!==!1?u.jsx("span",{className:"text-green-600",children:"✓"}):u.jsx("span",{className:"text-red-600",children:"✗"})})]},c)})})]})})]})]})},a1=({status:e})=>{const{t}=ue(),a={connecting:"bg-yellow-100 text-yellow-800",connected:"bg-green-100 text-green-800",disconnected:"bg-red-100 text-red-800"},n={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"};return u.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${a[e]}`,children:t(n[e]||e)})},n1=({tool:e})=>{const[t,a]=x.useState(!1);return u.jsxs("div",{className:"bg-white shadow rounded-lg p-4 mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>a(!t),children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900",children:e.name}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:t?u.jsx(wg,{size:18}):u.jsx(Ng,{size:18})})]}),t&&u.jsxs("div",{className:"mt-4",children:[u.jsx("p",{className:"text-gray-600 mb-2",children:e.description||"No description available"}),u.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[u.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Input Schema:"}),u.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(e.inputSchema,null,2)})]})]})]})},Hg=({isOpen:e,onClose:t,onConfirm:a,serverName:n,isGroup:l=!1})=>{const{t:s}=ue();return e?u.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-30 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:s(l?"groups.confirmDelete":"server.confirmDelete")}),u.jsx("p",{className:"text-gray-500 mb-6",children:l?s("groups.deleteWarning",{name:n}):s("server.deleteWarning",{name:n})}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{onClick:t,className:"px-4 py-2 text-gray-600 hover:text-gray-800",children:s("common.cancel")}),u.jsx("button",{onClick:a,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:s("common.delete")})]})]})})}):null},l1=({server:e,onRemove:t,onEdit:a,onToggle:n})=>{const{t:l}=ue(),{showToast:s}=is(),[r,i]=x.useState(!1),[o,c]=x.useState(!1),[f,h]=x.useState(!1),[d,y]=x.useState(!1),[S,v]=x.useState(!1),w=x.useRef(null);x.useEffect(()=>{const N=C=>{w.current&&!w.current.contains(C.target)&&y(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]);const g=N=>{N.stopPropagation(),c(!0)},m=N=>{N.stopPropagation(),a(e)},p=async N=>{if(N.stopPropagation(),!(f||!n)){h(!0);try{await n(e,e.enabled===!1)}finally{h(!1)}}},b=N=>{N.stopPropagation(),y(!d)},j=N=>{if(N.stopPropagation(),!!e.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(e.error).then(()=>{v(!0),s(l("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>v(!1),2e3)});else{const C=document.createElement("textarea");C.value=e.error,C.style.position="fixed",C.style.left="-9999px",document.body.appendChild(C),C.focus(),C.select();try{document.execCommand("copy"),v(!0),s(l("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>v(!1),2e3)}catch(R){s(l("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",R)}document.body.removeChild(C)}},E=()=>{t(e.name),c(!1)};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 ${e.enabled===!1?"opacity-60":""}`,children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>i(!r),children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("h2",{className:`text-xl font-semibold ${e.enabled===!1?"text-gray-600":"text-gray-900"}`,children:e.name}),u.jsx(a1,{status:e.status}),e.error&&u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"cursor-pointer",onClick:b,"aria-label":l("server.viewErrorDetails"),children:u.jsx(Ux,{className:"text-red-500 hover:text-red-600",size:18})}),d&&u.jsxs("div",{ref:w,className:"absolute z-10 mt-2 bg-white border border-gray-200 rounded-md shadow-lg p-0 w-120",style:{left:"-231px",top:"24px",maxHeight:"300px",overflowY:"auto",width:"480px",transform:"translateX(50%)"},onClick:N=>N.stopPropagation(),children:[u.jsxs("div",{className:"flex justify-between items-center sticky top-0 bg-white py-2 px-4 border-b border-gray-200 z-20 shadow-sm",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("h4",{className:"text-sm font-medium text-red-600",children:l("server.errorDetails")}),u.jsx("button",{onClick:j,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:l("common.copy"),children:S?u.jsx(Ku,{size:14,className:"text-green-500"}):u.jsx(jg,{size:14})})]}),u.jsx("button",{onClick:N=>{N.stopPropagation(),y(!1)},className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),u.jsx("div",{className:"p-4 pt-2",children:u.jsx("pre",{className:"text-sm text-gray-700 break-words whitespace-pre-wrap",children:e.error})})]})]})]}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx("button",{onClick:m,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm",children:l("server.edit")}),u.jsx("div",{className:"flex items-center",children:u.jsx("button",{onClick:p,className:`px-3 py-1 text-sm rounded transition-colors ${f?"bg-gray-200 text-gray-500":e.enabled!==!1?"bg-green-100 text-green-800 hover:bg-green-200":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,disabled:f,children:f?l("common.processing"):e.enabled!==!1?l("server.disable"):l("server.enable")})}),u.jsx("button",{onClick:g,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:l("server.delete")}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:r?u.jsx(wg,{size:18}):u.jsx(Ng,{size:18})})]})]}),r&&e.tools&&u.jsxs("div",{className:"mt-6",children:[u.jsx("h3",{className:`text-lg font-medium ${e.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:l("server.tools")}),u.jsx("div",{className:"space-y-4",children:e.tools.map((N,C)=>u.jsx(n1,{tool:N},C))})]})]}),u.jsx(Hg,{isOpen:o,onClose:()=>c(!1),onConfirm:E,serverName:e.name})]})},Fu=({onSubmit:e,onCancel:t,initialData:a=null,modalTitle:n,formError:l=null})=>{const{t:s}=ue(),[r,i]=x.useState(a&&a.config&&a.config.url?"sse":"stdio"),[o,c]=x.useState({name:a&&a.name||"",url:a&&a.config&&a.config.url||"",command:a&&a.config&&a.config.command||"",arguments:a&&a.config&&a.config.args?Array.isArray(a.config.args)?a.config.args.join(" "):String(a.config.args):"",args:a&&a.config&&a.config.args||[]}),[f,h]=x.useState(a&&a.config&&a.config.env?Object.entries(a.config.env).map(([j,E])=>({key:j,value:E})):[]),[d,y]=x.useState(null),S=!!a,v=j=>{const{name:E,value:N}=j.target;c({...o,[E]:N})},w=j=>{let E=j.split(" ").filter(N=>N.trim()!=="");c({...o,arguments:j,args:E})},g=(j,E,N)=>{const C=[...f];C[j][E]=N,h(C)},m=()=>{h([...f,{key:"",value:""}])},p=j=>{const E=[...f];E.splice(j,1),h(E)},b=async j=>{j.preventDefault(),y(null);try{const E={};f.forEach(({key:C,value:R})=>{C.trim()&&(E[C.trim()]=R)});const N={name:o.name,config:r==="sse"?{url:o.url}:{command:o.command,args:o.args,env:Object.keys(E).length>0?E:void 0}};e(N)}catch(E){y(`Error: ${E instanceof Error?E.message:String(E)}`)}};return u.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-xl max-h-screen overflow-y-auto",children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:n}),u.jsx("button",{onClick:t,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(d||l)&&u.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:l||d}),u.jsxs("form",{onSubmit:b,children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:s("server.name")}),u.jsx("input",{type:"text",name:"name",id:"name",value:o.name,onChange:v,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: time-mcp",required:!0,disabled:S})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:s("server.type")}),u.jsxs("div",{className:"flex space-x-4",children:[u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"command",name:"serverType",value:"command",checked:r==="stdio",onChange:()=>i("stdio"),className:"mr-1"}),u.jsx("label",{htmlFor:"command",children:"stdio"})]}),u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"url",name:"serverType",value:"url",checked:r==="sse",onChange:()=>i("sse"),className:"mr-1"}),u.jsx("label",{htmlFor:"url",children:"sse"})]})]})]}),r==="sse"?u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"url",children:s("server.url")}),u.jsx("input",{type:"url",name:"url",id:"url",value:o.url,onChange:v,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: http://localhost:3000/sse",required:r==="sse"})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"command",children:s("server.command")}),u.jsx("input",{type:"text",name:"command",id:"command",value:o.command,onChange:v,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: npx",required:r==="stdio"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"arguments",children:s("server.arguments")}),u.jsx("input",{type:"text",name:"arguments",id:"arguments",value:o.arguments,onChange:j=>w(j.target.value),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: -y time-mcp",required:r==="stdio"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center mb-2",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:s("server.envVars")}),u.jsxs("button",{type:"button",onClick:m,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",s("server.add")]})]}),f.map((j,E)=>u.jsxs("div",{className:"flex items-center mb-2",children:[u.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[u.jsx("input",{type:"text",value:j.key,onChange:N=>g(E,"key",N.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:s("server.key")}),u.jsx("span",{className:"flex items-center",children:":"}),u.jsx("input",{type:"text",value:j.value,onChange:N=>g(E,"value",N.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:s("server.value")})]}),u.jsxs("button",{type:"button",onClick:()=>p(E),className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center justify-center min-w-[56px] ml-2",children:["- ",s("server.remove")]})]},E))]})]}),u.jsxs("div",{className:"flex justify-end mt-6",children:[u.jsx("button",{type:"button",onClick:t,className:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-medium py-2 px-4 rounded mr-2",children:s("server.cancel")}),u.jsx("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:s(S?"server.save":"server.add")})]})]})]})},s1=({onAdd:e})=>{const{t}=ue(),[a,n]=x.useState(!1),[l,s]=x.useState(null),r=()=>{n(!a),s(null)},i=async o=>{try{s(null);const c=localStorage.getItem("mcphub_token"),f=await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":c||""},body:JSON.stringify(o)}),h=await f.json();if(!f.ok){h&&h.message?s(h.message):f.status===400?s(t("server.invalidData")):f.status===409?s(t("server.alreadyExists",{serverName:o.name})):s(t("server.addError"));return}n(!1),e()}catch(c){console.error("Error adding server:",c),navigator.onLine?c instanceof TypeError&&(c.message.includes("NetworkError")||c.message.includes("Failed to fetch"))?s(t("errors.serverConnection")):s(t("errors.serverAdd")):s(t("errors.network"))}};return u.jsxs("div",{children:[u.jsx("button",{onClick:r,className:"w-full bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:t("server.addServer")}),a&&u.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:u.jsx(Fu,{onSubmit:i,onCancel:r,modalTitle:t("server.addServer"),formError:l})})]})},r1=({server:e,onEdit:t,onCancel:a})=>{const{t:n}=ue(),[l,s]=x.useState(null),r=async i=>{try{s(null);const o=localStorage.getItem("mcphub_token"),c=await fetch(`/api/servers/${e.name}`,{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":o||""},body:JSON.stringify(i)}),f=await c.json();if(!c.ok){f&&f.message?s(f.message):c.status===404?s(n("server.notFound",{serverName:e.name})):c.status===400?s(n("server.invalidData")):s(n("server.updateError",{serverName:e.name}));return}t()}catch(o){console.error("Error updating server:",o),navigator.onLine?o instanceof TypeError&&(o.message.includes("NetworkError")||o.message.includes("Failed to fetch"))?s(n("errors.serverConnection")):s(n("errors.serverUpdate",{serverName:e.name})):s(n("errors.network"))}};return u.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:u.jsx(Fu,{onSubmit:r,onCancel:a,initialData:e,modalTitle:n("server.editTitle",{serverName:e.name}),formError:l})})},i1=()=>{const{t:e}=ue(),t=Xa(),{servers:a,error:n,setError:l,isLoading:s,handleServerAdd:r,handleServerEdit:i,handleServerRemove:o,handleServerToggle:c,triggerRefresh:f}=os(),[h,d]=x.useState(null),[y,S]=x.useState(!1),v=async m=>{const p=await i(m);p&&d(p)},w=()=>{d(null),f()},g=async()=>{S(!0);try{f(),await new Promise(m=>setTimeout(m,500))}finally{S(!1)}};return u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between items-center mb-8",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:e("pages.servers.title")}),u.jsxs("div",{className:"flex space-x-4",children:[u.jsxs("button",{onClick:()=>t("/market"),className:"px-4 py-2 bg-emerald-100 text-emerald-800 rounded hover:bg-emerald-200 flex items-center",children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3z"})}),e("nav.market")]}),u.jsx(s1,{onAdd:r}),u.jsxs("button",{onClick:g,disabled:y,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center ${y?"opacity-70 cursor-not-allowed":""}`,children:[y?u.jsxs("svg",{className:"animate-spin h-4 w-4 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})}),e("common.refresh")]})]})]}),n&&u.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-red-600 text-lg font-medium",children:e("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:n})]}),u.jsx("button",{onClick:()=>l(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":e("app.closeButton"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 111.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),s?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):a.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:e("app.noServers")})}):u.jsx("div",{className:"space-y-6",children:a.map((m,p)=>u.jsx(l1,{server:m,onRemove:o,onEdit:v,onToggle:c},p))}),h&&u.jsx(r1,{server:h,onEdit:w,onCancel:()=>d(null)})]})},Pu=()=>{const{t:e}=ue(),[t,a]=x.useState([]),[n,l]=x.useState(!0),[s,r]=x.useState(null),[i,o]=x.useState(0),c=x.useCallback(async()=>{try{l(!0);const g=localStorage.getItem("mcphub_token"),m=await fetch("/api/groups",{headers:{"x-auth-token":g||""}});if(!m.ok)throw new Error(`Status: ${m.status}`);const p=await m.json();p&&p.success&&Array.isArray(p.data)?a(p.data):(console.error("Invalid group data format:",p),a([])),r(null)}catch(g){console.error("Error fetching groups:",g),r(g instanceof Error?g.message:"Failed to fetch groups"),a([])}finally{l(!1)}},[]),f=x.useCallback(()=>{o(g=>g+1)},[]),h=async(g,m,p=[])=>{try{const b=localStorage.getItem("mcphub_token"),j=await fetch("/api/groups",{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":b||""},body:JSON.stringify({name:g,description:m,servers:p})}),E=await j.json();return j.ok?(f(),E.data||null):(r(E.message||e("groups.createError")),null)}catch(b){return r(b instanceof Error?b.message:"Failed to create group"),null}},d=async(g,m)=>{try{const p=localStorage.getItem("mcphub_token"),b=await fetch(`/api/groups/${g}`,{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":p||""},body:JSON.stringify(m)}),j=await b.json();return b.ok?(f(),j.data||null):(r(j.message||e("groups.updateError")),null)}catch(p){return r(p instanceof Error?p.message:"Failed to update group"),null}},y=async(g,m)=>{try{const p=localStorage.getItem("mcphub_token"),b=await fetch(`/api/groups/${g}/servers/batch`,{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":p||""},body:JSON.stringify({servers:m})}),j=await b.json();return b.ok?(f(),j.data||null):(r(j.message||e("groups.updateError")),null)}catch(p){return r(p instanceof Error?p.message:"Failed to update group servers"),null}},S=async g=>{try{const m=localStorage.getItem("mcphub_token"),p=await fetch(`/api/groups/${g}`,{method:"DELETE",headers:{"x-auth-token":m||""}}),b=await p.json();return p.ok?(f(),!0):(r(b.message||e("groups.deleteError")),!1)}catch(m){return r(m instanceof Error?m.message:"Failed to delete group"),!1}},v=async(g,m)=>{try{const p=localStorage.getItem("mcphub_token"),b=await fetch(`/api/groups/${g}/servers`,{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":p||""},body:JSON.stringify({serverName:m})}),j=await b.json();return b.ok?(f(),j.data||null):(r(j.message||e("groups.serverAddError")),null)}catch(p){return r(p instanceof Error?p.message:"Failed to add server to group"),null}},w=async(g,m)=>{try{const p=localStorage.getItem("mcphub_token"),b=await fetch(`/api/groups/${g}/servers/${m}`,{method:"DELETE",headers:{"x-auth-token":p||""}}),j=await b.json();return b.ok?(f(),j.data||null):(r(j.message||e("groups.serverRemoveError")),null)}catch(p){return r(p instanceof Error?p.message:"Failed to remove server from group"),null}};return x.useEffect(()=>{c()},[c,i]),{groups:t,loading:n,error:s,setError:r,triggerRefresh:f,createGroup:h,updateGroup:d,updateGroupServers:y,deleteGroup:S,addServerToGroup:v,removeServerFromGroup:w}},o1=({value:e,isSelected:t,onClick:a,children:n})=>u.jsxs("button",{type:"button",role:"checkbox","aria-checked":t,className:jn("flex w-full items-center justify-between p-2 rounded transition-colors cursor-pointer",t?"bg-blue-50 text-blue-700 hover:bg-blue-100 border-l-4 border-blue-500":"hover:bg-gray-50 text-gray-700"),onClick:a,children:[u.jsx("span",{className:"flex items-center",children:n}),t&&u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5 text-blue-500",children:u.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]}),Bg=({label:e,helpText:t,noOptionsText:a="No options available",values:n,options:l,onChange:s,className:r})=>{const i=o=>{const c=n.includes(o);s(c?n.filter(f=>f!==o):[...n,o])};return u.jsxs("div",{className:r,children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:e}),u.jsx("div",{className:"border rounded shadow max-h-60 overflow-y-auto",children:l.length===0?u.jsx("p",{className:"text-gray-500 text-sm p-3",children:a}):u.jsx("div",{className:"space-y-1 p-1",children:l.map(o=>u.jsx(o1,{value:o.value,isSelected:n.includes(o.value),onClick:()=>i(o.value),children:o.label},o.value))})}),t&&u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:t})]})},Hf=({checked:e,onCheckedChange:t,disabled:a=!1})=>u.jsx("button",{type:"button",role:"switch","aria-checked":e,disabled:a,className:jn("relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",e?"bg-blue-600":"bg-gray-200",a?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>!a&&t(!e),children:u.jsx("span",{className:jn("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",e?"translate-x-6":"translate-x-1")})}),u1=({onAdd:e,onCancel:t})=>{const{t:a}=ue(),{createGroup:n}=Pu(),{servers:l}=os(),[s,r]=x.useState([]),[i,o]=x.useState(null),[c,f]=x.useState(!1),[h,d]=x.useState({name:"",description:"",servers:[]});x.useEffect(()=>{r(l.filter(v=>v.enabled!==!1))},[l]);const y=v=>{const{name:w,value:g}=v.target;d(m=>({...m,[w]:g}))},S=async v=>{v.preventDefault(),f(!0),o(null);try{if(!h.name.trim()){o(a("groups.nameRequired")),f(!1);return}if(!await n(h.name,h.description,h.servers)){o(a("groups.createError")),f(!1);return}e()}catch(w){o(w instanceof Error?w.message:String(w)),f(!1)}};return u.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:a("groups.addNew")}),i&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:i}),u.jsxs("form",{onSubmit:S,children:[u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[a("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:h.name,onChange:y,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:a("groups.namePlaceholder"),required:!0})]}),u.jsx(Bg,{className:"mb-6",label:a("groups.servers"),noOptionsText:a("groups.noServerOptions"),values:h.servers,options:s.map(v=>({value:v.name,label:v.name})),onChange:v=>d(w=>({...w,servers:v}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:c,children:a("common.cancel")}),u.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:c,children:a(c?"common.submitting":"common.create")})]})]})]})})})},c1=({group:e,onEdit:t,onCancel:a})=>{const{t:n}=ue(),{updateGroup:l}=Pu(),{servers:s}=os(),[r,i]=x.useState([]),[o,c]=x.useState(null),[f,h]=x.useState(!1),[d,y]=x.useState({name:e.name,description:e.description||"",servers:e.servers||[]});x.useEffect(()=>{i(s.filter(w=>w.enabled!==!1))},[s]);const S=w=>{const{name:g,value:m}=w.target;y(p=>({...p,[g]:m}))},v=async w=>{w.preventDefault(),h(!0),c(null);try{if(!d.name.trim()){c(n("groups.nameRequired")),h(!1);return}if(!await l(e.id,{name:d.name,description:d.description,servers:d.servers})){c(n("groups.updateError")),h(!1);return}t()}catch(g){c(g instanceof Error?g.message:String(g)),h(!1)}};return u.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:n("groups.edit")}),o&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:o}),u.jsxs("form",{onSubmit:v,children:[u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[n("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:d.name,onChange:S,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:n("groups.namePlaceholder"),required:!0})]}),u.jsx(Bg,{className:"mb-6",label:n("groups.servers"),noOptionsText:n("groups.noServerOptions"),values:d.servers,options:r.map(w=>({value:w.name,label:w.name})),onChange:w=>y(g=>({...g,servers:w}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:a,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:f,children:n("common.cancel")}),u.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:f,children:n(f?"common.submitting":"common.save")})]})]})]})})})},f1=({group:e,servers:t,onEdit:a,onDelete:n})=>{const{t:l}=ue(),{showToast:s}=is(),[r,i]=x.useState(!1),[o,c]=x.useState(!1),f=()=>{a(e)},h=()=>{i(!0)},d=()=>{n(e.id),i(!1)},y=()=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(e.id).then(()=>{c(!0),setTimeout(()=>c(!1),2e3)});else{const v=document.createElement("textarea");v.value=e.id,v.style.position="fixed",v.style.left="-9999px",document.body.appendChild(v),v.focus(),v.select();try{document.execCommand("copy"),c(!0),setTimeout(()=>c(!1),2e3)}catch(w){s(l("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",w)}document.body.removeChild(v)}},S=t.filter(v=>e.servers.includes(v.name));return u.jsxs("div",{className:"bg-white shadow rounded-lg p-6",children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:e.name}),u.jsxs("div",{className:"flex items-center ml-3",children:[u.jsx("span",{className:"text-xs text-gray-500 mr-1",children:e.id}),u.jsx("button",{onClick:y,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:l("common.copy"),children:o?u.jsx(Ku,{size:14,className:"text-green-500"}):u.jsx(jg,{size:14})})]})]}),e.description&&u.jsx("p",{className:"text-gray-600 text-sm mt-1",children:e.description})]}),u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("div",{className:"bg-blue-50 text-blue-700 px-3 py-1 rounded-full text-sm",children:l("groups.serverCount",{count:e.servers.length})}),u.jsx("button",{onClick:f,className:"text-gray-500 hover:text-gray-700",title:l("groups.edit"),children:u.jsx(Bx,{size:18})}),u.jsx("button",{onClick:h,className:"text-gray-500 hover:text-red-600",title:l("groups.delete"),children:u.jsx(qx,{size:18})})]})]}),u.jsx("div",{className:"mt-4",children:S.length===0?u.jsx("p",{className:"text-gray-500 italic",children:l("groups.noServers")}):u.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:S.map(v=>u.jsxs("div",{className:"inline-flex items-center px-3 py-1 bg-gray-50 rounded",children:[u.jsx("span",{className:"font-medium text-gray-700 text-sm",children:v.name}),u.jsx("span",{className:`ml-2 inline-block h-2 w-2 rounded-full ${v.status==="connected"?"bg-green-500":v.status==="connecting"?"bg-yellow-500":"bg-red-500"}`})]},v.name))})}),u.jsx(Hg,{isOpen:r,onClose:()=>i(!1),onConfirm:d,serverName:e.name,isGroup:!0})]})},d1=()=>{const{t:e}=ue(),{groups:t,loading:a,error:n,setError:l,deleteGroup:s,triggerRefresh:r}=Pu(),{servers:i}=os(),[o,c]=x.useState(null),[f,h]=x.useState(!1),d=g=>{c(g)},y=()=>{c(null),r()},S=async g=>{await s(g)||l(e("groups.deleteError"))},v=()=>{h(!0)},w=()=>{h(!1),r()};return u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between items-center mb-8",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:e("pages.groups.title")}),u.jsx("div",{className:"flex space-x-4",children:u.jsxs("button",{onClick:v,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 00-1 1v5H4a1 1 0 100 2h5v5a1 1 0 102 0v-5h5a1 1 0 100-2h-5V4a1 1 0 00-1-1z",clipRule:"evenodd"})}),e("groups.add")]})})]}),n&&u.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:u.jsx("p",{children:n})}),a?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsxs("div",{className:"flex flex-col items-center justify-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):t.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:e("groups.noGroups")})}):u.jsx("div",{className:"space-y-6",children:t.map(g=>u.jsx(f1,{group:g,servers:i,onEdit:d,onDelete:S},g.id))}),f&&u.jsx(u1,{onAdd:w,onCancel:w}),o&&u.jsx(c1,{group:o,onEdit:y,onCancel:()=>c(null)})]})},h1=({onSuccess:e,onCancel:t})=>{const{t:a}=ue(),[n,l]=x.useState({currentPassword:"",newPassword:""}),[s,r]=x.useState(""),[i,o]=x.useState(!1),[c,f]=x.useState(null),[h,d]=x.useState(!1),y=v=>{const{name:w,value:g}=v.target;w==="confirmPassword"?r(g):l(m=>({...m,[w]:g}))},S=async v=>{if(v.preventDefault(),f(null),n.newPassword!==s){f(a("auth.passwordsNotMatch"));return}o(!0);try{const w=await Ex(n);w.success?(d(!0),e&&e()):f(w.message||a("auth.changePasswordError"))}catch{f(a("auth.changePasswordError"))}finally{o(!1)}};return u.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[u.jsx("h2",{className:"text-xl font-bold mb-4",children:a("auth.changePassword")}),h?u.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:a("auth.changePasswordSuccess")}):u.jsxs("form",{onSubmit:S,children:[c&&u.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:c}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:a("auth.currentPassword")}),u.jsx("input",{type:"password",id:"currentPassword",name:"currentPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:n.currentPassword,onChange:y,required:!0})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:a("auth.newPassword")}),u.jsx("input",{type:"password",id:"newPassword",name:"newPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:n.newPassword,onChange:y,required:!0,minLength:6})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:a("auth.confirmPassword")}),u.jsx("input",{type:"password",id:"confirmPassword",name:"confirmPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:s,onChange:y,required:!0,minLength:6})]}),u.jsxs("div",{className:"flex justify-end space-x-2",children:[t&&u.jsx("button",{type:"button",onClick:t,disabled:i,className:"py-2 px-4 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:a("common.cancel")}),u.jsx("button",{type:"submit",disabled:i,className:"py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:i?u.jsxs("span",{className:"flex items-center",children:[u.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a("common.save")]}):a("common.save")})]})]})]})},m1=()=>{const{t:e}=ue(),{showToast:t}=is(),[a,n]=x.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0}),[l,s]=x.useState(!1),[r,i]=x.useState(null),[o,c]=x.useState(0),f=x.useCallback(()=>{c(y=>y+1)},[]),h=x.useCallback(async()=>{var y,S;s(!0),i(null);try{const v=localStorage.getItem("mcphub_token"),w=await fetch("/api/settings",{headers:{"x-auth-token":v||""}});if(!w.ok)throw new Error(`HTTP error! Status: ${w.status}`);const g=await w.json();g.success&&((S=(y=g.data)==null?void 0:y.systemConfig)!=null&&S.routing)&&n({enableGlobalRoute:g.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:g.data.systemConfig.routing.enableGroupNameRoute??!0})}catch(v){console.error("Failed to fetch settings:",v),i(v instanceof Error?v.message:"Failed to fetch settings"),t(e("errors.failedToFetchSettings"))}finally{s(!1)}},[e,t]),d=async(y,S)=>{s(!0),i(null);try{const v=localStorage.getItem("mcphub_token"),w=await fetch("/api/system-config",{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":v||""},body:JSON.stringify({routing:{[y]:S}})});if(!w.ok)throw new Error(`HTTP error! Status: ${w.status}`);return(await w.json()).success?(n({...a,[y]:S}),t(e("settings.systemConfigUpdated")),!0):(t(e("errors.failedToUpdateSystemConfig")),!1)}catch(v){return console.error("Failed to update system config:",v),i(v instanceof Error?v.message:"Failed to update system config"),t(e("errors.failedToUpdateSystemConfig")),!1}finally{s(!1)}};return x.useEffect(()=>{h()},[h,o]),{routingConfig:a,loading:l,error:r,setError:i,triggerRefresh:f,fetchSettings:h,updateRoutingConfig:d}},g1=()=>{const{t:e,i18n:t}=ue(),a=Xa(),{showToast:n}=is(),[l,s]=x.useState(t.language);x.useEffect(()=>{s(t.language)},[t.language]);const{routingConfig:r,loading:i,updateRoutingConfig:o}=m1(),[c,f]=x.useState({routingConfig:!1,password:!1}),h=v=>{f(w=>({...w,[v]:!w[v]}))},d=async(v,w)=>{await o(v,w)},y=()=>{setTimeout(()=>{a("/")},2e3)},S=v=>{localStorage.setItem("i18nextLng",v),window.location.reload()};return u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:e("pages.settings.title")}),u.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:e("pages.settings.language")}),u.jsxs("div",{className:"flex space-x-3",children:[u.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${l.startsWith("en")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>S("en"),children:"English"}),u.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${l.startsWith("zh")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>S("zh"),children:"中文"})]})]})}),u.jsxs("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>h("routingConfig"),children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:e("pages.settings.routeConfig")}),u.jsx("span",{className:"text-gray-500",children:c.routingConfig?"▼":"►"})]}),c.routingConfig&&u.jsxs("div",{className:"space-y-4 mt-4",children:[u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.enableGlobalRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:e("settings.enableGlobalRouteDescription")})]}),u.jsx(Hf,{disabled:i,checked:r.enableGlobalRoute,onCheckedChange:v=>d("enableGlobalRoute",v)})]}),u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.enableGroupNameRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:e("settings.enableGroupNameRouteDescription")})]}),u.jsx(Hf,{disabled:i,checked:r.enableGroupNameRoute,onCheckedChange:v=>d("enableGroupNameRoute",v)})]})]})]}),u.jsxs("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>h("password"),children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:e("auth.changePassword")}),u.jsx("span",{className:"text-gray-500",children:c.password?"▼":"►"})]}),c.password&&u.jsx("div",{className:"max-w-lg mt-4",children:u.jsx(h1,{onSuccess:y})})]})]})},p1=()=>{const{t:e}=ue(),[t,a]=x.useState([]),[n,l]=x.useState([]),[s,r]=x.useState([]),[i,o]=x.useState([]),[c,f]=x.useState(""),[h,d]=x.useState(""),[y,S]=x.useState(""),[v,w]=x.useState(!0),[g,m]=x.useState(null),[p,b]=x.useState(null),[j,E]=x.useState([]),[N,C]=x.useState(1),[R,O]=x.useState(9),[B,ee]=x.useState(1),me=x.useCallback(async()=>{try{w(!0);const D=localStorage.getItem("mcphub_token"),L=await fetch("/api/market/servers",{headers:{"x-auth-token":D||""}});if(!L.ok)throw new Error(`Status: ${L.status}`);const G=await L.json();G&&G.success&&Array.isArray(G.data)?(l(G.data),Z(G.data,N)):(console.error("Invalid market servers data format:",G),m(e("market.fetchError")))}catch(D){console.error("Error fetching market servers:",D),m(D instanceof Error?D.message:String(D))}finally{w(!1)}},[e,N]),Z=x.useCallback((D,L,G=R)=>{const V=D.length,Zt=Math.ceil(V/G);ee(Zt);const Zn=Math.max(1,Math.min(L,Zt));Zn!==L&&C(Zn);const us=(Zn-1)*G,Jn=D.slice(us,us+G);a(Jn)},[R]),ie=x.useCallback(D=>{C(D),Z(n,D,R)},[n,Z,R]),A=x.useCallback(async()=>{try{const D=localStorage.getItem("mcphub_token"),L=await fetch("/api/market/categories",{headers:{"x-auth-token":D||""}});if(!L.ok)throw new Error(`Status: ${L.status}`);const G=await L.json();G&&G.success&&Array.isArray(G.data)?r(G.data):console.error("Invalid categories data format:",G)}catch(D){console.error("Error fetching categories:",D)}},[]),_=x.useCallback(async()=>{try{const D=localStorage.getItem("mcphub_token"),L=await fetch("/api/market/tags",{headers:{"x-auth-token":D||""}});if(!L.ok)throw new Error(`Status: ${L.status}`);const G=await L.json();G&&G.success&&Array.isArray(G.data)?o(G.data):console.error("Invalid tags data format:",G)}catch(D){console.error("Error fetching tags:",D)}},[]),k=x.useCallback(async D=>{try{w(!0);const L=localStorage.getItem("mcphub_token"),G=await fetch(`/api/market/servers/${D}`,{headers:{"x-auth-token":L||""}});if(!G.ok)throw new Error(`Status: ${G.status}`);const V=await G.json();return V&&V.success&&V.data?(b(V.data),V.data):(console.error("Invalid server data format:",V),m(e("market.serverNotFound")),null)}catch(L){return console.error(`Error fetching server ${D}:`,L),m(L instanceof Error?L.message:String(L)),null}finally{w(!1)}},[e]),U=x.useCallback(async D=>{try{if(w(!0),S(D),!D.trim()){me();return}const L=localStorage.getItem("mcphub_token"),G=await fetch(`/api/market/servers/search?query=${encodeURIComponent(D)}`,{headers:{"x-auth-token":L||""}});if(!G.ok)throw new Error(`Status: ${G.status}`);const V=await G.json();V&&V.success&&Array.isArray(V.data)?(l(V.data),C(1),Z(V.data,1)):(console.error("Invalid search results format:",V),m(e("market.searchError")))}catch(L){console.error("Error searching servers:",L),m(L instanceof Error?L.message:String(L))}finally{w(!1)}},[e,n,Z,me]),J=x.useCallback(async D=>{try{if(w(!0),f(D),d(""),!D){me();return}const L=localStorage.getItem("mcphub_token"),G=await fetch(`/api/market/categories/${encodeURIComponent(D)}`,{headers:{"x-auth-token":L||""}});if(!G.ok)throw new Error(`Status: ${G.status}`);const V=await G.json();V&&V.success&&Array.isArray(V.data)?(l(V.data),C(1),Z(V.data,1)):(console.error("Invalid category filter results format:",V),m(e("market.filterError")))}catch(L){console.error("Error filtering servers by category:",L),m(L instanceof Error?L.message:String(L))}finally{w(!1)}},[e,me,Z]),ze=x.useCallback(async D=>{try{if(w(!0),d(D),f(""),!D){me();return}const L=localStorage.getItem("mcphub_token"),G=await fetch(`/api/market/tags/${encodeURIComponent(D)}`,{headers:{"x-auth-token":L||""}});if(!G.ok)throw new Error(`Status: ${G.status}`);const V=await G.json();V&&V.success&&Array.isArray(V.data)?(l(V.data),C(1),Z(V.data,1)):(console.error("Invalid tag filter results format:",V),m(e("market.tagFilterError")))}catch(L){console.error("Error filtering servers by tag:",L),m(L instanceof Error?L.message:String(L))}finally{w(!1)}},[e,me,Z]),Me=x.useCallback(async()=>{try{const D=localStorage.getItem("mcphub_token"),L=await fetch("/api/servers",{headers:{"x-auth-token":D||""}});if(!L.ok)throw new Error(`Status: ${L.status}`);const G=await L.json();if(G&&G.success&&Array.isArray(G.data)){const V=G.data.map(Zt=>Zt.name);E(V)}}catch(D){console.error("Error fetching installed servers:",D)}},[]),F=x.useCallback(D=>j.includes(D),[j]),pe=x.useCallback(async D=>{var L,G;try{const V=(L=D.installations)!=null&&L.npm?"npm":Object.keys(D.installations||{}).length>0?Object.keys(D.installations)[0]:null;if(!V||!((G=D.installations)!=null&&G[V]))return m(e("market.noInstallationMethod")),!1;const Zt=D.installations[V],Zn={name:D.name,config:{command:Zt.command,args:Zt.args,env:Zt.env||{}}},us=localStorage.getItem("mcphub_token"),Jn=await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":us||""},body:JSON.stringify(Zn)});if(!Jn.ok){const Xg=await Jn.json();throw new Error(Xg.message||`Status: ${Jn.status}`)}return await Me(),!0}catch(V){return console.error("Error installing server:",V),m(V instanceof Error?V.message:String(V)),!1}},[e,Me]),dt=x.useCallback(D=>{O(D),C(1),Z(n,1,D)},[n,Z]);return x.useEffect(()=>{me(),A(),_(),Me()},[me,A,_,Me]),{servers:t,allServers:n,categories:s,tags:i,selectedCategory:c,selectedTag:h,searchQuery:y,loading:v,error:g,setError:m,currentServer:p,fetchMarketServers:me,fetchServerByName:k,searchServers:U,filterByCategory:J,filterByTag:ze,installServer:pe,currentPage:N,totalPages:B,serversPerPage:R,changePage:ie,changeServersPerPage:dt,isServerInstalled:F}},y1=({server:e,onClick:t})=>{var i,o,c,f;const{t:a}=ue(),n=()=>{if(!e.tags||e.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const h=28,d=m=>m.length+3;let y=0,S=0;const v=[...e.tags].sort((m,p)=>m.length-p.length);for(S=0;S<v.length;S++){const m=d(v[S]);if(y+m>h)break;if(y+=m,S===v.length-1)return{tagsToShow:v,hasMore:!1,moreCount:0}}S===0&&v.length>0&&(S=1);const w=v.length-S,g=3+String(w).length+a("market.moreTags").length;return y+g<=h||S<1?{tagsToShow:v.slice(0,S),hasMore:!0,moreCount:w}:{tagsToShow:v.slice(0,Math.max(1,S-1)),hasMore:!0,moreCount:w+1}},{tagsToShow:l,hasMore:s,moreCount:r}=n();return u.jsxs("div",{className:"bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow cursor-pointer flex flex-col h-full",onClick:()=>t(e),children:[u.jsxs("div",{className:"flex justify-between items-start mb-3",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-1 mr-2",children:e.display_name}),e.is_official&&u.jsx("span",{className:"bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded flex-shrink-0",children:a("market.official")})]}),u.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:e.description}),u.jsx("div",{className:"flex flex-wrap gap-1 mb-2 min-h-[28px]",children:((i=e.categories)==null?void 0:i.length)>0?e.categories.map((h,d)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:h},d)):u.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),u.jsx("div",{className:"relative mb-3 min-h-[28px] overflow-x-auto",children:((o=e.tags)==null?void 0:o.length)>0?u.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[l.map((h,d)=>u.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",h]},d)),s&&u.jsxs("span",{className:"bg-gray-100 text-gray-600 text-xs px-1.5 py-1 rounded flex-shrink-0",children:["+",r," ",a("market.moreTags")]})]}):u.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),u.jsxs("div",{className:"flex justify-between items-center mt-auto pt-2 text-xs text-gray-500 border-t border-gray-100",children:[u.jsxs("div",{className:"overflow-hidden",children:[u.jsxs("span",{className:"whitespace-nowrap",children:[a("market.by")," "]}),u.jsx("span",{className:"font-medium whitespace-nowrap overflow-hidden text-ellipsis max-w-[120px] inline-block align-bottom",children:((c=e.author)==null?void 0:c.name)||a("market.unknown")})]}),u.jsxs("div",{className:"flex items-center flex-shrink-0",children:[u.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"})}),u.jsxs("span",{children:[((f=e.tools)==null?void 0:f.length)||0," ",a("market.tools")]})]})]})]})},v1=({server:e,onBack:t,onInstall:a,installing:n=!1,isInstalled:l=!1})=>{var g,m;const{t:s}=ue(),[r,i]=x.useState(!1),[o,c]=x.useState(null),f=()=>l?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:s("market.installed")}:n?{className:"bg-gray-400 cursor-not-allowed px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:s("market.installing")}:{className:"bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded text-sm font-medium text-white",disabled:!1,text:s("market.install")},h=()=>{i(!r),c(null)},d=()=>{l||h()},y=()=>{if(!e.installations)return;if(e.installations.npm)return e.installations.npm;if(e.installations.uvx)return e.installations.uvx;if(e.installations.default)return e.installations.default;const p=Object.keys(e.installations);if(p.length>0)return e.installations[p[0]]},S=async p=>{try{c(null),a(e),i(!1)}catch(b){console.error("Error installing server:",b),c(s("errors.serverInstall"))}},v=f(),w=y();return u.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[u.jsx("div",{className:"mb-4",children:u.jsxs("button",{onClick:t,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[u.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"})}),s("market.backToList")]})}),u.jsxs("div",{className:"flex justify-between items-start mb-4",children:[u.jsx("div",{children:u.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[e.display_name,u.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",e.name,")"]}),u.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[s("market.author"),": ",e.author.name," • ",s("market.license"),": ",e.license," •",u.jsx("a",{href:e.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",children:s("market.repository")})]})]})}),u.jsxs("div",{className:"flex items-center",children:[e.is_official&&u.jsx("span",{className:"bg-blue-100 text-blue-800 text-sm font-medium px-4 py-2 rounded mr-2 flex items-center",children:s("market.official")}),u.jsx("button",{onClick:d,disabled:v.disabled,className:v.className,children:v.text})]})]}),u.jsx("p",{className:"text-gray-700 mb-6",children:e.description}),u.jsxs("div",{className:"mb-6",children:[u.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[s("market.categories")," & ",s("market.tags")]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[(g=e.categories)==null?void 0:g.map((p,b)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:p},`cat-${b}`)),e.tags&&e.tags.map((p,b)=>u.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",p]},`tag-${b}`))]})]}),e.arguments&&Object.keys(e.arguments).length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:s("market.arguments")}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:s("market.argumentName")}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:s("market.description")}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:s("market.required")}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:s("market.example")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(e.arguments).map(([p,b],j)=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:p}),u.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:b.description}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:b.required?u.jsx("span",{className:"text-green-600",children:"✓"}):u.jsx("span",{className:"text-red-600",children:"✗"})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:b.example})})]},j))})]})})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:s("market.tools")}),u.jsx("div",{className:"space-y-4",children:(m=e.tools)==null?void 0:m.map((p,b)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsxs("h4",{className:"font-medium mb-2",children:[p.name,u.jsx("button",{type:"button",onClick:()=>{const j=document.getElementById(`schema-${b}`);j&&j.classList.toggle("hidden")},className:"text-sm text-blue-600 hover:underline focus:outline-none ml-2",children:s("market.viewSchema")})]}),u.jsx("p",{className:"text-gray-600 mb-2",children:p.description}),u.jsx("div",{className:"mt-2",children:u.jsx("pre",{id:`schema-${b}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(p.inputSchema,null,2)})})]},b))})]}),e.examples&&e.examples.length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:s("market.examples")}),u.jsx("div",{className:"space-y-4",children:e.examples.map((p,b)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsx("h4",{className:"font-medium mb-2",children:p.title}),u.jsx("p",{className:"text-gray-600 mb-2",children:p.description}),u.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:p.prompt})]},b))})]}),u.jsx("div",{className:"mt-6 flex justify-end",children:u.jsx("button",{onClick:d,disabled:v.disabled,className:v.className,children:v.text})}),r&&u.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:u.jsx(Fu,{onSubmit:S,onCancel:h,modalTitle:s("market.installServer",{name:e.display_name}),formError:o,initialData:{name:e.name,status:"disconnected",config:w?{command:w.command||"",args:w.args||[],env:w.env||{}}:void 0}})})]})},x1=({currentPage:e,totalPages:t,onPageChange:a})=>{const n=()=>{const l=[];l.push(u.jsx("button",{onClick:()=>a(1),className:`px-3 py-1 mx-1 rounded ${e===1?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"1"},"first"));let r=Math.max(2,e-Math.floor(5/2));r>2&&l.push(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let i=r;i<=Math.min(t-1,r+5-3);i++)l.push(u.jsx("button",{onClick:()=>a(i),className:`px-3 py-1 mx-1 rounded ${e===i?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:i},i));return r+5-3<t-1&&l.push(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),t>1&&l.push(u.jsx("button",{onClick:()=>a(t),className:`px-3 py-1 mx-1 rounded ${e===t?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:t},"last")),l};return t<=1?null:u.jsxs("div",{className:"flex justify-center items-center my-6",children:[u.jsx("button",{onClick:()=>a(Math.max(1,e-1)),disabled:e===1,className:`px-3 py-1 rounded mr-2 ${e===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"« Prev"}),u.jsx("div",{className:"flex",children:n()}),u.jsx("button",{onClick:()=>a(Math.min(t,e+1)),disabled:e===t,className:`px-3 py-1 rounded ml-2 ${e===t?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"Next »"})]})},Bf=()=>{const{t:e}=ue(),t=Xa();Rt();const{serverName:a}=Rv(),{showToast:n}=is(),{servers:l,allServers:s,categories:r,loading:i,error:o,setError:c,searchServers:f,filterByCategory:h,filterByTag:d,selectedCategory:y,selectedTag:S,installServer:v,fetchServerByName:w,isServerInstalled:g,currentPage:m,totalPages:p,changePage:b,serversPerPage:j,changeServersPerPage:E}=p1(),[N,C]=x.useState(null),[R,O]=x.useState(""),[B,ee]=x.useState(!1),[me,Z]=x.useState(!1);x.useEffect(()=>{(async()=>{if(a){const pe=await w(a);pe?C(pe):t("/market")}else C(null)})()},[a,w,t]);const ie=F=>{F.preventDefault(),f(R)},A=F=>{h(F)},_=()=>{O(""),h(""),d("")},k=F=>{t(`/market/${F.name}`)},U=()=>{t("/market")},J=async F=>{try{ee(!0),await v(F)&&n(e("market.installSuccess",{serverName:F.display_name}),"success")}finally{ee(!1)}},ze=F=>{b(F),window.scrollTo({top:0,behavior:"smooth"})},Me=F=>{const pe=parseInt(F.target.value,10);E(pe)};return N?u.jsx(v1,{server:N,onBack:U,onInstall:J,installing:B,isInstalled:g(N.name)}):u.jsxs("div",{children:[u.jsx("div",{className:"flex justify-between items-center mb-8",children:u.jsx("div",{children:u.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center",children:[e("market.title"),u.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:e("pages.market.title").split(" - ")[1]})]})})}),o&&u.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("p",{children:o}),u.jsx("button",{onClick:()=>c(null),className:"text-red-700 hover:text-red-900",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 01.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),u.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:u.jsxs("form",{onSubmit:ie,className:"flex space-x-4 mb-0",children:[u.jsx("div",{className:"flex-grow",children:u.jsx("input",{type:"text",value:R,onChange:F=>O(F.target.value),placeholder:e("market.searchPlaceholder"),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"})}),u.jsx("button",{type:"submit",className:"bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded",children:e("market.search")}),(R||y||S)&&u.jsx("button",{type:"button",onClick:_,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50",children:e("market.clearFilters")})]})}),u.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[u.jsx("div",{className:"md:w-48 flex-shrink-0",children:u.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4",children:r.length>0?u.jsxs("div",{className:"mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center mb-3",children:[u.jsx("h3",{className:"font-medium text-gray-900",children:e("market.categories")}),y&&u.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline",onClick:()=>h(""),children:e("market.clearCategoryFilter")})]}),u.jsx("div",{className:"flex flex-col gap-2",children:r.map(F=>u.jsx("button",{onClick:()=>A(F),className:`px-3 py-2 rounded text-sm text-left ${y===F?"bg-blue-100 text-blue-800 font-medium":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:F},F))})]}):i?u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"mb-3",children:u.jsx("h3",{className:"font-medium text-gray-900",children:e("market.categories")})}),u.jsxs("div",{className:"flex flex-col gap-2 items-center py-4",children:[u.jsxs("svg",{className:"animate-spin h-6 w-6 text-blue-500 mb-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-sm text-gray-600",children:e("app.loading")})]})]}):u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"mb-3",children:u.jsx("h3",{className:"font-medium text-gray-900",children:e("market.categories")})}),u.jsx("p",{className:"text-sm text-gray-600 py-2",children:e("market.noCategories")})]})})}),u.jsx("div",{className:"flex-grow",children:i?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):l.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:e("market.noServers")})}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:l.map((F,pe)=>u.jsx(y1,{server:F,onClick:k},pe))}),u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("div",{className:"text-sm text-gray-500",children:e("market.showing",{from:(m-1)*j+1,to:Math.min(m*j,s.length),total:s.length})}),u.jsx(x1,{currentPage:m,totalPages:p,onPageChange:ze}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[e("market.perPage"),":"]}),u.jsxs("select",{id:"perPage",value:j,onChange:Me,className:"border rounded p-1 text-sm",children:[u.jsx("option",{value:"6",children:"6"}),u.jsx("option",{value:"9",children:"9"}),u.jsx("option",{value:"12",children:"12"}),u.jsx("option",{value:"24",children:"24"})]})]})]}),u.jsx("div",{className:"mt-6"})]})})]})]})};function b1(){return u.jsx(Tx,{children:u.jsx(Mb,{children:u.jsx(hx,{children:u.jsxs($v,{children:[u.jsx(ht,{path:"/login",element:u.jsx(e1,{})}),u.jsx(ht,{element:u.jsx(Ib,{}),children:u.jsxs(ht,{element:u.jsx(Wb,{}),children:[u.jsx(ht,{path:"/",element:u.jsx(t1,{})}),u.jsx(ht,{path:"/servers",element:u.jsx(i1,{})}),u.jsx(ht,{path:"/groups",element:u.jsx(d1,{})}),u.jsx(ht,{path:"/market",element:u.jsx(Bf,{})}),u.jsx(ht,{path:"/market/:serverName",element:u.jsx(Bf,{})}),u.jsx(ht,{path:"/settings",element:u.jsx(g1,{})})]})}),u.jsx(ht,{path:"*",element:u.jsx(cg,{to:"/"})})]})})})})}const q=e=>typeof e=="string",rl=()=>{let e,t;const a=new Promise((n,l)=>{e=n,t=l});return a.resolve=e,a.reject=t,a},Gf=e=>e==null?"":""+e,S1=(e,t,a)=>{e.forEach(n=>{t[n]&&(a[n]=t[n])})},w1=/###/g,qf=e=>e&&e.indexOf("###")>-1?e.replace(w1,"."):e,Vf=e=>!e||q(e),Cl=(e,t,a)=>{const n=q(t)?t.split("."):t;let l=0;for(;l<n.length-1;){if(Vf(e))return{};const s=qf(n[l]);!e[s]&&a&&(e[s]=new a),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++l}return Vf(e)?{}:{obj:e,k:qf(n[l])}},Yf=(e,t,a)=>{const{obj:n,k:l}=Cl(e,t,Object);if(n!==void 0||t.length===1){n[l]=a;return}let s=t[t.length-1],r=t.slice(0,t.length-1),i=Cl(e,r,Object);for(;i.obj===void 0&&r.length;)s=`${r[r.length-1]}.${s}`,r=r.slice(0,r.length-1),i=Cl(e,r,Object),i!=null&&i.obj&&typeof i.obj[`${i.k}.${s}`]<"u"&&(i.obj=void 0);i.obj[`${i.k}.${s}`]=a},N1=(e,t,a,n)=>{const{obj:l,k:s}=Cl(e,t,Object);l[s]=l[s]||[],l[s].push(a)},br=(e,t)=>{const{obj:a,k:n}=Cl(e,t);if(a&&Object.prototype.hasOwnProperty.call(a,n))return a[n]},j1=(e,t,a)=>{const n=br(e,a);return n!==void 0?n:br(t,a)},Gg=(e,t,a)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?q(e[n])||e[n]instanceof String||q(t[n])||t[n]instanceof String?a&&(e[n]=t[n]):Gg(e[n],t[n],a):e[n]=t[n]);return e},Ja=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var E1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const C1=e=>q(e)?e.replace(/[&<>"'\/]/g,t=>E1[t]):e;class T1{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const a=this.regExpMap.get(t);if(a!==void 0)return a;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const A1=[" ",",","?","!",";"],R1=new T1(20),O1=(e,t,a)=>{t=t||"",a=a||"";const n=A1.filter(r=>t.indexOf(r)<0&&a.indexOf(r)<0);if(n.length===0)return!0;const l=R1.getRegExp(`(${n.map(r=>r==="?"?"\\?":r).join("|")})`);let s=!l.test(e);if(!s){const r=e.indexOf(a);r>0&&!l.test(e.substring(0,r))&&(s=!0)}return s},Uo=function(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(a);let l=e;for(let s=0;s<n.length;){if(!l||typeof l!="object")return;let r,i="";for(let o=s;o<n.length;++o)if(o!==s&&(i+=a),i+=n[o],r=l[i],r!==void 0){if(["string","number","boolean"].indexOf(typeof r)>-1&&o<n.length-1)continue;s+=o-s+1;break}l=r}return l},Sr=e=>e==null?void 0:e.replace("_","-"),z1={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var a,n;(n=(a=console==null?void 0:console[e])==null?void 0:a.apply)==null||n.call(a,console,t)}};class wr{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,a)}init(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=t||z1,this.options=a,this.debug=a.debug}log(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"log","",!0)}warn(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"warn","",!0)}error(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"error","")}deprecate(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(t,a,n,l){return l&&!this.debug?null:(q(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new wr(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new wr(this.logger,t)}}var Nt=new wr;class Xr{constructor(){this.observers={}}on(t,a){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const l=this.observers[n].get(a)||0;this.observers[n].set(a,l+1)}),this}off(t,a){if(this.observers[t]){if(!a){delete this.observers[t];return}this.observers[t].delete(a)}}emit(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),l=1;l<a;l++)n[l-1]=arguments[l];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(r=>{let[i,o]=r;for(let c=0;c<o;c++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(r=>{let[i,o]=r;for(let c=0;c<o;c++)i.apply(i,[t,...n])})}}class $f extends Xr{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const a=this.options.ns.indexOf(t);a>-1&&this.options.ns.splice(a,1)}getResource(t,a,n){var c,f;let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,r=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;t.indexOf(".")>-1?i=t.split("."):(i=[t,a],n&&(Array.isArray(n)?i.push(...n):q(n)&&s?i.push(...n.split(s)):i.push(n)));const o=br(this.data,i);return!o&&!a&&!n&&t.indexOf(".")>-1&&(t=i[0],a=i[1],n=i.slice(2).join(".")),o||!r||!q(n)?o:Uo((f=(c=this.data)==null?void 0:c[t])==null?void 0:f[a],n,s)}addResource(t,a,n,l){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const r=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let i=[t,a];n&&(i=i.concat(r?n.split(r):n)),t.indexOf(".")>-1&&(i=t.split("."),l=a,a=i[1]),this.addNamespaces(a),Yf(this.data,i,l),s.silent||this.emit("added",t,a,n,l)}addResources(t,a,n){let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(q(n[s])||Array.isArray(n[s]))&&this.addResource(t,a,s,n[s],{silent:!0});l.silent||this.emit("added",t,a,n)}addResourceBundle(t,a,n,l,s){let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},i=[t,a];t.indexOf(".")>-1&&(i=t.split("."),l=n,n=a,a=i[1]),this.addNamespaces(a);let o=br(this.data,i)||{};r.skipCopy||(n=JSON.parse(JSON.stringify(n))),l?Gg(o,n,s):o={...o,...n},Yf(this.data,i,o),r.silent||this.emit("added",t,a,n)}removeResourceBundle(t,a){this.hasResourceBundle(t,a)&&delete this.data[t][a],this.removeNamespaces(a),this.emit("removed",t,a)}hasResourceBundle(t,a){return this.getResource(t,a)!==void 0}getResourceBundle(t,a){return a||(a=this.options.defaultNS),this.getResource(t,a)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const a=this.getDataByLanguage(t);return!!(a&&Object.keys(a)||[]).find(l=>a[l]&&Object.keys(a[l]).length>0)}toJSON(){return this.data}}var qg={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,a,n,l){return e.forEach(s=>{var r;t=((r=this.processors[s])==null?void 0:r.process(t,a,n,l))??t}),t}};const Xf={},Qf=e=>!q(e)&&typeof e!="boolean"&&typeof e!="number";class Nr extends Xr{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),S1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Nt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,a);return(n==null?void 0:n.res)!==void 0}extractFromKey(t,a){let n=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=a.ns||this.options.defaultNS||[];const r=n&&t.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!O1(t,n,l);if(r&&!i){const o=t.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:t,namespaces:q(s)?[s]:s};const c=t.split(n);(n!==l||n===l&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(l)}return{key:t,namespaces:q(s)?[s]:s}}translate(t,a,n){if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:r,namespaces:i}=this.extractFromKey(t[t.length-1],a),o=i[i.length-1],c=a.lng||this.language,f=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(f){const B=a.nsSeparator||this.options.nsSeparator;return l?{res:`${o}${B}${r}`,usedKey:r,exactUsedKey:r,usedLng:c,usedNS:o,usedParams:this.getUsedParamsDetails(a)}:`${o}${B}${r}`}return l?{res:r,usedKey:r,exactUsedKey:r,usedLng:c,usedNS:o,usedParams:this.getUsedParamsDetails(a)}:r}const h=this.resolve(t,a);let d=h==null?void 0:h.res;const y=(h==null?void 0:h.usedKey)||r,S=(h==null?void 0:h.exactUsedKey)||r,v=["[object Number]","[object Function]","[object RegExp]"],w=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,m=a.count!==void 0&&!q(a.count),p=Nr.hasDefaultValue(a),b=m?this.pluralResolver.getSuffix(c,a.count,a):"",j=a.ordinal&&m?this.pluralResolver.getSuffix(c,a.count,{ordinal:!1}):"",E=m&&!a.ordinal&&a.count===0,N=E&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${b}`]||a[`defaultValue${j}`]||a.defaultValue;let C=d;g&&!d&&p&&(C=N);const R=Qf(C),O=Object.prototype.toString.apply(C);if(g&&C&&R&&v.indexOf(O)<0&&!(q(w)&&Array.isArray(C))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,C,{...a,ns:i}):`key '${r} (${this.language})' returned an object instead of string.`;return l?(h.res=B,h.usedParams=this.getUsedParamsDetails(a),h):B}if(s){const B=Array.isArray(C),ee=B?[]:{},me=B?S:y;for(const Z in C)if(Object.prototype.hasOwnProperty.call(C,Z)){const ie=`${me}${s}${Z}`;p&&!d?ee[Z]=this.translate(ie,{...a,defaultValue:Qf(N)?N[Z]:void 0,joinArrays:!1,ns:i}):ee[Z]=this.translate(ie,{...a,joinArrays:!1,ns:i}),ee[Z]===ie&&(ee[Z]=C[Z])}d=ee}}else if(g&&q(w)&&Array.isArray(d))d=d.join(w),d&&(d=this.extendTranslation(d,t,a,n));else{let B=!1,ee=!1;!this.isValidLookup(d)&&p&&(B=!0,d=N),this.isValidLookup(d)||(ee=!0,d=r);const Z=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ee?void 0:d,ie=p&&N!==d&&this.options.updateMissing;if(ee||B||ie){if(this.logger.log(ie?"updateKey":"missingKey",c,o,r,ie?N:d),s){const U=this.resolve(r,{...a,keySeparator:!1});U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let A=[];const _=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&_&&_[0])for(let U=0;U<_.length;U++)A.push(_[U]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(a.lng||this.language):A.push(a.lng||this.language);const k=(U,J,ze)=>{var F;const Me=p&&ze!==d?ze:Z;this.options.missingKeyHandler?this.options.missingKeyHandler(U,o,J,Me,ie,a):(F=this.backendConnector)!=null&&F.saveMissing&&this.backendConnector.saveMissing(U,o,J,Me,ie,a),this.emit("missingKey",U,o,J,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&m?A.forEach(U=>{const J=this.pluralResolver.getSuffixes(U,a);E&&a[`defaultValue${this.options.pluralSeparator}zero`]&&J.indexOf(`${this.options.pluralSeparator}zero`)<0&&J.push(`${this.options.pluralSeparator}zero`),J.forEach(ze=>{k([U],r+ze,a[`defaultValue${ze}`]||N)})}):k(A,r,N))}d=this.extendTranslation(d,t,a,h,n),ee&&d===r&&this.options.appendNamespaceToMissingKey&&(d=`${o}:${r}`),(ee||B)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${o}:${r}`:r,B?d:void 0))}return l?(h.res=d,h.usedParams=this.getUsedParamsDetails(a),h):d}extendTranslation(t,a,n,l,s){var c,f;var r=this;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||l.usedLng,l.usedNS,l.usedKey,{resolved:l});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const h=q(t)&&(((f=n==null?void 0:n.interpolation)==null?void 0:f.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(h){const S=t.match(this.interpolator.nestingRegexp);d=S&&S.length}let y=n.replace&&!q(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),t=this.interpolator.interpolate(t,y,n.lng||this.language||l.usedLng,n),h){const S=t.match(this.interpolator.nestingRegexp),v=S&&S.length;d<v&&(n.nest=!1)}!n.lng&&l&&l.res&&(n.lng=this.language||l.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var S=arguments.length,v=new Array(S),w=0;w<S;w++)v[w]=arguments[w];return(s==null?void 0:s[0])===v[0]&&!n.context?(r.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${a[0]}`),null):r.translate(...v,a)},n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,o=q(i)?[i]:i;return t!=null&&(o!=null&&o.length)&&n.applyPostProcessor!==!1&&(t=qg.handle(o,t,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...l,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,l,s,r,i;return q(t)&&(t=[t]),t.forEach(o=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(o,a),f=c.key;l=f;let h=c.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=a.count!==void 0&&!q(a.count),y=d&&!a.ordinal&&a.count===0,S=a.context!==void 0&&(q(a.context)||typeof a.context=="number")&&a.context!=="",v=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);h.forEach(w=>{var g,m;this.isValidLookup(n)||(i=w,!Xf[`${v[0]}-${w}`]&&((g=this.utils)!=null&&g.hasLoadedNamespace)&&!((m=this.utils)!=null&&m.hasLoadedNamespace(i))&&(Xf[`${v[0]}-${w}`]=!0,this.logger.warn(`key "${l}" for languages "${v.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(p=>{var E;if(this.isValidLookup(n))return;r=p;const b=[f];if((E=this.i18nFormat)!=null&&E.addLookupKeys)this.i18nFormat.addLookupKeys(b,f,p,w,a);else{let N;d&&(N=this.pluralResolver.getSuffix(p,a.count,a));const C=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(b.push(f+N),a.ordinal&&N.indexOf(R)===0&&b.push(f+N.replace(R,this.options.pluralSeparator)),y&&b.push(f+C)),S){const O=`${f}${this.options.contextSeparator}${a.context}`;b.push(O),d&&(b.push(O+N),a.ordinal&&N.indexOf(R)===0&&b.push(O+N.replace(R,this.options.pluralSeparator)),y&&b.push(O+C))}}let j;for(;j=b.pop();)this.isValidLookup(n)||(s=j,n=this.getResource(p,w,j,a))}))})}),{res:n,usedKey:l,exactUsedKey:s,usedLng:r,usedNS:i}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,a,n){var s;let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,a,n,l):this.resourceStore.getResource(t,a,n,l)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!q(t.replace);let l=n?t.replace:t;if(n&&typeof t.count<"u"&&(l.count=t.count),this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),!n){l={...l};for(const s of a)delete l[s]}return l}static hasDefaultValue(t){const a="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&a===n.substring(0,a.length)&&t[n]!==void 0)return!0;return!1}}class Kf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Nt.create("languageUtils")}getScriptPartFromCode(t){if(t=Sr(t),!t||t.indexOf("-")<0)return null;const a=t.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(t){if(t=Sr(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(q(t)&&t.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(t)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let a;return t.forEach(n=>{if(a)return;const l=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(l))&&(a=l)}),!a&&this.options.supportedLngs&&t.forEach(n=>{if(a)return;const l=this.getLanguagePartFromCode(n);if(this.isSupportedCode(l))return a=l;a=this.options.supportedLngs.find(s=>{if(s===l)return s;if(!(s.indexOf("-")<0&&l.indexOf("-")<0)&&(s.indexOf("-")>0&&l.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===l||s.indexOf(l)===0&&l.length>1))return s})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(t,a){if(!t)return[];if(typeof t=="function"&&(t=t(a)),q(t)&&(t=[t]),Array.isArray(t))return t;if(!a)return t.default||[];let n=t[a];return n||(n=t[this.getScriptPartFromCode(a)]),n||(n=t[this.formatLanguageCode(a)]),n||(n=t[this.getLanguagePartFromCode(a)]),n||(n=t.default),n||[]}toResolveHierarchy(t,a){const n=this.getFallbackCodes(a||this.options.fallbackLng||[],t),l=[],s=r=>{r&&(this.isSupportedCode(r)?l.push(r):this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`))};return q(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):q(t)&&s(this.formatLanguageCode(t)),n.forEach(r=>{l.indexOf(r)<0&&s(this.formatLanguageCode(r))}),l}}const Zf={zero:0,one:1,two:2,few:3,many:4,other:5},Jf={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class M1{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=a,this.logger=Nt.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,a){this.rules[t]=a}clearCache(){this.pluralRulesCache={}}getRule(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=Sr(t==="dev"?"en":t),l=a.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:l});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let r;try{r=new Intl.PluralRules(n,{type:l})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Jf;if(!t.match(/-|_/))return Jf;const o=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(o,a)}return this.pluralRulesCache[s]=r,r}needsPlural(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,a);return n||(n=this.getRule("dev",a)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(l=>`${a}${l}`)}getSuffixes(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,a);return n||(n=this.getRule("dev",a)),n?n.resolvedOptions().pluralCategories.sort((l,s)=>Zf[l]-Zf[s]).map(l=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const l=this.getRule(t,n);return l?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${l.select(a)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",a,n))}}const Ff=function(e,t,a){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=j1(e,t,a);return!s&&l&&q(a)&&(s=Uo(e,a,n),s===void 0&&(s=Uo(t,a,n))),s},Oi=e=>e.replace(/\$/g,"$$$$");class k1{constructor(){var a;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Nt.create("interpolator"),this.options=t,this.format=((a=t==null?void 0:t.interpolation)==null?void 0:a.format)||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:a,escapeValue:n,useRawValueToEscape:l,prefix:s,prefixEscaped:r,suffix:i,suffixEscaped:o,formatSeparator:c,unescapeSuffix:f,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:v,nestingOptionsSeparator:w,maxReplaces:g,alwaysFormat:m}=t.interpolation;this.escape=a!==void 0?a:C1,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=s?Ja(s):r||"{{",this.suffix=i?Ja(i):o||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Ja(d):y||Ja("$t("),this.nestingSuffix=S?Ja(S):v||Ja(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=g||1e3,this.alwaysFormat=m!==void 0?m:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(a,n)=>(a==null?void 0:a.source)===n?(a.lastIndex=0,a):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,a,n,l){var y;let s,r,i;const o=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=S=>{if(S.indexOf(this.formatSeparator)<0){const m=Ff(a,o,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,n,{...l,...a,interpolationkey:S}):m}const v=S.split(this.formatSeparator),w=v.shift().trim(),g=v.join(this.formatSeparator).trim();return this.format(Ff(a,o,w,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...l,...a,interpolationkey:w})};this.resetRegExp();const f=(l==null?void 0:l.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((y=l==null?void 0:l.interpolation)==null?void 0:y.skipOnVariables)!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>Oi(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Oi(this.escape(S)):Oi(S)}].forEach(S=>{for(i=0;s=S.regex.exec(t);){const v=s[1].trim();if(r=c(v),r===void 0)if(typeof f=="function"){const g=f(t,s,l);r=q(g)?g:""}else if(l&&Object.prototype.hasOwnProperty.call(l,v))r="";else if(h){r=s[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),r="";else!q(r)&&!this.useRawValueToEscape&&(r=Gf(r));const w=S.safeValue(r);if(t=t.replace(s[0],w),h?(S.regex.lastIndex+=r.length,S.regex.lastIndex-=s[0].length):S.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),t}nest(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l,s,r;const i=(o,c)=>{const f=this.nestingOptionsSeparator;if(o.indexOf(f)<0)return o;const h=o.split(new RegExp(`${f}[ ]*{`));let d=`{${h[1]}`;o=h[0],d=this.interpolate(d,r);const y=d.match(/'/g),S=d.match(/"/g);(((y==null?void 0:y.length)??0)%2===0&&!S||S.length%2!==0)&&(d=d.replace(/'/g,'"'));try{r=JSON.parse(d),c&&(r={...c,...r})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${o}`,v),`${o}${f}${d}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,o};for(;l=this.nestingRegexp.exec(t);){let o=[];r={...n},r=r.replace&&!q(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;let c=!1;if(l[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(l[1])){const f=l[1].split(this.formatSeparator).map(h=>h.trim());l[1]=f.shift(),o=f,c=!0}if(s=a(i.call(this,l[1].trim(),r),r),s&&l[0]===t&&!q(s))return s;q(s)||(s=Gf(s)),s||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${t}`),s=""),c&&(s=o.reduce((f,h)=>this.format(f,h,n.lng,{...n,interpolationkey:l[1].trim()}),s.trim())),t=t.replace(l[0],s),this.regexp.lastIndex=0}return t}}const D1=e=>{let t=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const l=n[1].substring(0,n[1].length-1);t==="currency"&&l.indexOf(":")<0?a.currency||(a.currency=l.trim()):t==="relativetime"&&l.indexOf(":")<0?a.range||(a.range=l.trim()):l.split(";").forEach(r=>{if(r){const[i,...o]=r.split(":"),c=o.join(":").trim().replace(/^'+|'+$/g,""),f=i.trim();a[f]||(a[f]=c),c==="false"&&(a[f]=!1),c==="true"&&(a[f]=!0),isNaN(c)||(a[f]=parseInt(c,10))}})}return{formatName:t,formatOptions:a}},Fa=e=>{const t={};return(a,n,l)=>{let s=l;l&&l.interpolationkey&&l.formatParams&&l.formatParams[l.interpolationkey]&&l[l.interpolationkey]&&(s={...s,[l.interpolationkey]:void 0});const r=n+JSON.stringify(s);let i=t[r];return i||(i=e(Sr(n),l),t[r]=i),i(a)}};class L1{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Nt.create("formatter"),this.options=t,this.formats={number:Fa((a,n)=>{const l=new Intl.NumberFormat(a,{...n});return s=>l.format(s)}),currency:Fa((a,n)=>{const l=new Intl.NumberFormat(a,{...n,style:"currency"});return s=>l.format(s)}),datetime:Fa((a,n)=>{const l=new Intl.DateTimeFormat(a,{...n});return s=>l.format(s)}),relativetime:Fa((a,n)=>{const l=new Intl.RelativeTimeFormat(a,{...n});return s=>l.format(s,n.range||"day")}),list:Fa((a,n)=>{const l=new Intl.ListFormat(a,{...n});return s=>l.format(s)})},this.init(t)}init(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=a.interpolation.formatSeparator||","}add(t,a){this.formats[t.toLowerCase().trim()]=a}addCached(t,a){this.formats[t.toLowerCase().trim()]=Fa(a)}format(t,a,n){let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=a.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(i=>i.indexOf(")")>-1)){const i=s.findIndex(o=>o.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,i)].join(this.formatSeparator)}return s.reduce((i,o)=>{var h;const{formatName:c,formatOptions:f}=D1(o);if(this.formats[c]){let d=i;try{const y=((h=l==null?void 0:l.formatParams)==null?void 0:h[l.interpolationkey])||{},S=y.locale||y.lng||l.locale||l.lng||n;d=this.formats[c](i,S,{...f,...l,...y})}catch(y){this.logger.warn(y)}return d}else this.logger.warn(`there was no format function for ${c}`);return i},t)}}const U1=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class _1 extends Xr{constructor(t,a,n){var s,r;let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=a,this.services=n,this.languageUtils=n.languageUtils,this.options=l,this.logger=Nt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],(r=(s=this.backend)==null?void 0:s.init)==null||r.call(s,n,l.backend,l)}queueLoad(t,a,n,l){const s={},r={},i={},o={};return t.forEach(c=>{let f=!0;a.forEach(h=>{const d=`${c}|${h}`;!n.reload&&this.store.hasResourceBundle(c,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?r[d]===void 0&&(r[d]=!0):(this.state[d]=1,f=!1,r[d]===void 0&&(r[d]=!0),s[d]===void 0&&(s[d]=!0),o[h]===void 0&&(o[h]=!0)))}),f||(i[c]=!0)}),(Object.keys(s).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(o)}}loaded(t,a,n){const l=t.split("|"),s=l[0],r=l[1];a&&this.emit("failedLoading",s,r,a),!a&&n&&this.store.addResourceBundle(s,r,n,void 0,void 0,{skipCopy:!0}),this.state[t]=a?-1:2,a&&n&&(this.state[t]=0);const i={};this.queue.forEach(o=>{N1(o.loaded,[s],r),U1(o,t),a&&o.errors.push(a),o.pendingCount===0&&!o.done&&(Object.keys(o.loaded).forEach(c=>{i[c]||(i[c]={});const f=o.loaded[c];f.length&&f.forEach(h=>{i[c][h]===void 0&&(i[c][h]=!0)})}),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(o=>!o.done)}read(t,a,n){let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:a,fcName:n,tried:l,wait:s,callback:r});return}this.readingCalls++;const i=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(c&&f&&l<this.maxRetries){setTimeout(()=>{this.read.call(this,t,a,n,l+1,s*2,r)},s);return}r(c,f)},o=this.backend[n].bind(this.backend);if(o.length===2){try{const c=o(t,a);c&&typeof c.then=="function"?c.then(f=>i(null,f)).catch(i):i(null,c)}catch(c){i(c)}return}return o(t,a,i)}prepareLoading(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();q(t)&&(t=this.languageUtils.toResolveHierarchy(t)),q(a)&&(a=[a]);const s=this.queueLoad(t,a,n,l);if(!s.toLoad.length)return s.pending.length||l(),null;s.toLoad.forEach(r=>{this.loadOne(r)})}load(t,a,n){this.prepareLoading(t,a,{},n)}reload(t,a,n){this.prepareLoading(t,a,{reload:!0},n)}loadOne(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),l=n[0],s=n[1];this.read(l,s,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${a}loading namespace ${s} for language ${l} failed`,r),!r&&i&&this.logger.log(`${a}loaded namespace ${s} for language ${l}`,i),this.loaded(t,r,i)})}saveMissing(t,a,n,l,s){var o,c,f,h,d;let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(o=this.services)==null?void 0:o.utils)!=null&&c.hasLoadedNamespace&&!((h=(f=this.services)==null?void 0:f.utils)!=null&&h.hasLoadedNamespace(a))){this.logger.warn(`did not save key "${n}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((d=this.backend)!=null&&d.create){const y={...r,isUpdate:s},S=this.backend.create.bind(this.backend);if(S.length<6)try{let v;S.length===5?v=S(t,a,n,l,y):v=S(t,a,n,l),v&&typeof v.then=="function"?v.then(w=>i(null,w)).catch(i):i(null,v)}catch(v){i(v)}else S(t,a,n,l,i,y)}!t||!t[0]||this.store.addResource(t[0],a,n,l)}}}const Pf=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),q(e[1])&&(t.defaultValue=e[1]),q(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(n=>{t[n]=a[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Wf=e=>{var t,a;return q(e.ns)&&(e.ns=[e.ns]),q(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),q(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((a=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:a.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Ts=()=>{},H1=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class Vl extends Xr{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Wf(t),this.services={},this.logger=Nt,this.modules={external:[]},H1(this),a&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,a),this;setTimeout(()=>{this.init(t,a)},0)}}init(){var t=this;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof a=="function"&&(n=a,a={}),a.defaultNS==null&&a.ns&&(q(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const l=Pf();this.options={...l,...this.options,...Wf(a)},this.options.interpolation={...l.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const s=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Nt.init(s(this.modules.logger),this.options):Nt.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=L1;const h=new Kf(this.options);this.store=new $f(this.options.resources,this.options);const d=this.services;d.logger=Nt,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new M1(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===l.interpolation.format)&&(d.formatter=s(f),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new k1(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new _1(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(y){for(var S=arguments.length,v=new Array(S>1?S-1:0),w=1;w<S;w++)v[w-1]=arguments[w];t.emit(y,...v)}),this.modules.languageDetector&&(d.languageDetector=s(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=s(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Nr(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,v=new Array(S>1?S-1:0),w=1;w<S;w++)v[w-1]=arguments[w];t.emit(y,...v)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ts),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const o=rl(),c=()=>{const f=(h,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),n(h,d)};if(this.languages&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),o}loadResources(t){var s,r;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ts;const l=q(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((l==null?void 0:l.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],o=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(h=>{h!=="cimode"&&i.indexOf(h)<0&&i.push(h)})};l?o(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>o(f)),(r=(s=this.options.preload)==null?void 0:s.forEach)==null||r.call(s,c=>o(c)),this.services.backendConnector.load(i,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(t,a,n){const l=rl();return typeof t=="function"&&(n=t,t=void 0),typeof a=="function"&&(n=a,a=void 0),t||(t=this.languages),a||(a=this.options.ns),n||(n=Ts),this.services.backendConnector.reload(t,a,s=>{l.resolve(),n(s)}),l}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&qg.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let a=0;a<this.languages.length;a++){const n=this.languages[a];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,a){var n=this;this.isLanguageChangingTo=t;const l=rl();this.emit("languageChanging",t);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},r=(o,c)=>{c?(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,l.resolve(function(){return n.t(...arguments)}),a&&a(o,function(){return n.t(...arguments)})},i=o=>{var f,h;!t&&!o&&this.services.languageDetector&&(o=[]);const c=q(o)?o:this.services.languageUtils.getBestMatchFromCodes(o);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(h=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||h.call(f,c)),this.loadResources(c,d=>{r(d,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(t),l}getFixedT(t,a,n){var l=this;const s=function(r,i){let o;if(typeof i!="object"){for(var c=arguments.length,f=new Array(c>2?c-2:0),h=2;h<c;h++)f[h-2]=arguments[h];o=l.options.overloadTranslationOptionHandler([r,i].concat(f))}else o={...i};o.lng=o.lng||s.lng,o.lngs=o.lngs||s.lngs,o.ns=o.ns||s.ns,o.keyPrefix!==""&&(o.keyPrefix=o.keyPrefix||n||s.keyPrefix);const d=l.options.keySeparator||".";let y;return o.keyPrefix&&Array.isArray(r)?y=r.map(S=>`${o.keyPrefix}${d}${S}`):y=o.keyPrefix?`${o.keyPrefix}${d}${r}`:r,l.t(y,o)};return q(t)?s.lng=t:s.lngs=t,s.ns=a,s.keyPrefix=n,s}t(){var l;for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return(l=this.translator)==null?void 0:l.translate(...a)}exists(){var l;for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return(l=this.translator)==null?void 0:l.exists(...a)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=a.lng||this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const r=(i,o)=>{const c=this.services.backendConnector.state[`${i}|${o}`];return c===-1||c===0||c===2};if(a.precheck){const i=a.precheck(this,r);if(i!==void 0)return i}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(n,t)&&(!l||r(s,t)))}loadNamespaces(t,a){const n=rl();return this.options.ns?(q(t)&&(t=[t]),t.forEach(l=>{this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}),this.loadResources(l=>{n.resolve(),a&&a(l)}),n):(a&&a(),Promise.resolve())}loadLanguages(t,a){const n=rl();q(t)&&(t=[t]);const l=this.options.preload||[],s=t.filter(r=>l.indexOf(r)<0&&this.services.languageUtils.isSupportedCode(r));return s.length?(this.options.preload=l.concat(s),this.loadResources(r=>{n.resolve(),a&&a(r)}),n):(a&&a(),Promise.resolve())}dir(t){var l,s;if(t||(t=this.resolvedLanguage||(((l=this.languages)==null?void 0:l.length)>0?this.languages[0]:this.language)),!t)return"rtl";const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((s=this.services)==null?void 0:s.languageUtils)||new Kf(Pf());return a.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;return new Vl(t,a)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ts;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const l={...this.options,...t,isClone:!0},s=new Vl(l);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(i=>{s[i]=this[i]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const i=Object.keys(this.store.data).reduce((o,c)=>(o[c]={...this.store.data[c]},Object.keys(o[c]).reduce((f,h)=>(f[h]={...o[c][h]},f),{})),{});s.store=new $f(i,l),s.services.resourceStore=s.store}return s.translator=new Nr(s.services,l),s.translator.on("*",function(i){for(var o=arguments.length,c=new Array(o>1?o-1:0),f=1;f<o;f++)c[f-1]=arguments[f];s.emit(i,...c)}),s.init(l,a),s.translator.options=l,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const He=Vl.createInstance();He.createInstance=Vl.createInstance;He.createInstance;He.dir;He.init;He.loadResources;He.reloadResources;He.use;He.changeLanguage;He.getFixedT;He.t;He.exists;He.setDefaultNamespace;He.hasLoadedNamespace;He.loadNamespaces;He.loadLanguages;const{slice:B1,forEach:G1}=[];function q1(e){return G1.call(B1.call(arguments,1),t=>{if(t)for(const a in t)e[a]===void 0&&(e[a]=t[a])}),e}const If=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,V1=function(e,t){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},l=encodeURIComponent(t);let s=`${e}=${l}`;if(n.maxAge>0){const r=n.maxAge-0;if(Number.isNaN(r))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(r)}`}if(n.domain){if(!If.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!If.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},ed={create(e,t,a,n){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};a&&(l.expires=new Date,l.expires.setTime(l.expires.getTime()+a*60*1e3)),n&&(l.domain=n),document.cookie=V1(e,encodeURIComponent(t),l)},read(e){const t=`${e}=`,a=document.cookie.split(";");for(let n=0;n<a.length;n++){let l=a[n];for(;l.charAt(0)===" ";)l=l.substring(1,l.length);if(l.indexOf(t)===0)return l.substring(t.length,l.length)}return null},remove(e){this.create(e,"",-1)}};var Y1={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return ed.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:a,cookieMinutes:n,cookieDomain:l,cookieOptions:s}=t;a&&typeof document<"u"&&ed.create(a,e,n,l,s)}},$1={name:"querystring",lookup(e){var n;let{lookupQuerystring:t}=e,a;if(typeof window<"u"){let{search:l}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(l=window.location.hash.substring(window.location.hash.indexOf("?")));const r=l.substring(1).split("&");for(let i=0;i<r.length;i++){const o=r[i].indexOf("=");o>0&&r[i].substring(0,o)===t&&(a=r[i].substring(o+1))}}return a}};let Pa=null;const td=()=>{if(Pa!==null)return Pa;try{if(Pa=typeof window<"u"&&window.localStorage!==null,!Pa)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Pa=!1}return Pa};var X1={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&td())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:a}=t;a&&td()&&window.localStorage.setItem(a,e)}};let Wa=null;const ad=()=>{if(Wa!==null)return Wa;try{if(Wa=typeof window<"u"&&window.sessionStorage!==null,!Wa)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Wa=!1}return Wa};var Q1={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&ad())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:a}=t;a&&ad()&&window.sessionStorage.setItem(a,e)}},K1={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:a,userLanguage:n,language:l}=navigator;if(a)for(let s=0;s<a.length;s++)t.push(a[s]);n&&t.push(n),l&&t.push(l)}return t.length>0?t:void 0}},Z1={name:"htmlTag",lookup(e){let{htmlTag:t}=e,a;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(a=n.getAttribute("lang")),a}},J1={name:"path",lookup(e){var l;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const a=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(l=a[typeof t=="number"?t:0])==null?void 0:l.replace("/",""):void 0}},F1={name:"subdomain",lookup(e){var l,s;let{lookupFromSubdomainIndex:t}=e;const a=typeof t=="number"?t+1:1,n=typeof window<"u"&&((s=(l=window.location)==null?void 0:l.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[a]}};let Vg=!1;try{document.cookie,Vg=!0}catch{}const Yg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Vg||Yg.splice(1,1);const P1=()=>({order:Yg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class $g{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,a)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=q1(a,this.options||{},P1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=l=>l.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Y1),this.addDetector($1),this.addDetector(X1),this.addDetector(Q1),this.addDetector(K1),this.addDetector(Z1),this.addDetector(J1),this.addDetector(F1)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,a=[];return t.forEach(n=>{if(this.detectors[n]){let l=this.detectors[n].lookup(this.options);l&&typeof l=="string"&&(l=[l]),l&&(a=a.concat(l))}}),a=a.map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}cacheUserLanguage(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;a&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||a.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}$g.type="languageDetector";const W1={title:"MCP Hub Dashboard",error:"Error",closeButton:"Close",noServers:"No MCP servers available",loading:"Loading...",logout:"Logout",profile:"Profile",changePassword:"Change Password",toggleSidebar:"Toggle Sidebar",welcomeUser:"Welcome, {{username}}",name:"MCP Hub"},I1={login:"Login",loginTitle:"Login to MCP Hub",username:"Username",password:"Password",loggingIn:"Logging in...",emptyFields:"Username and password cannot be empty",loginFailed:"Login failed, please check your username and password",loginError:"An error occurred during login",currentPassword:"Current Password",newPassword:"New Password",confirmPassword:"Confirm Password",passwordsNotMatch:"New password and confirmation do not match",changePasswordSuccess:"Password changed successfully",changePasswordError:"Failed to change password",changePassword:"Change Password",passwordChanged:"Password changed successfully",passwordChangeError:"Failed to change password"},e2={addServer:"Add Server",add:"Add",edit:"Edit",delete:"Delete",confirmDelete:"Are you sure you want to delete this server?",deleteWarning:"Deleting server '{{name}}' will remove it and all its data. This action cannot be undone.",status:"Status",tools:"Tools",name:"Server Name",url:"Server URL",apiKey:"API Key",save:"Save",cancel:"Cancel",invalidConfig:"Could not find configuration data for {{serverName}}",addError:"Failed to add server",editError:"Failed to edit server {{serverName}}",deleteError:"Failed to delete server {{serverName}}",updateError:"Failed to update server",editTitle:"Edit Server: {{serverName}}",type:"Server Type",command:"Command",arguments:"Arguments",envVars:"Environment Variables",key:"key",value:"value",enabled:"Enabled",enable:"Enable",disable:"Disable",remove:"Remove",toggleError:"Failed to toggle server {{serverName}}",alreadyExists:"Server {{serverName}} already exists",invalidData:"Invalid server data provided",notFound:"Server {{serverName}} not found",namePlaceholder:"Enter server name",urlPlaceholder:"Enter server URL",commandPlaceholder:"Enter command",argumentsPlaceholder:"Enter arguments",errorDetails:"Error Details",viewErrorDetails:"View error details"},t2={online:"Online",offline:"Offline",connecting:"Connecting"},a2={general:"Something went wrong",network:"Network connection error. Please check your internet connection",serverConnection:"Unable to connect to the server. Please check if the server is running",serverAdd:"Failed to add server. Please check the server status",serverUpdate:"Failed to edit server {{serverName}}. Please check the server status",serverFetch:"Failed to retrieve server data. Please try again later",initialStartup:"The server might be starting up. Please wait a moment as this process can take some time on first launch...",serverInstall:"Failed to install server",failedToFetchSettings:"Failed to fetch settings",failedToUpdateRouteConfig:"Failed to update route configuration"},n2={processing:"Processing...",save:"Save",cancel:"Cancel",refresh:"Refresh",create:"Create",submitting:"Submitting...",delete:"Delete",copy:"Copy",copySuccess:"Copied to clipboard",copyFailed:"Copy failed"},l2={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market"},s2={dashboard:{title:"Dashboard",totalServers:"Total Servers",onlineServers:"Online Servers",offlineServers:"Offline Servers",connectingServers:"Connecting Servers",recentServers:"Recent Servers"},servers:{title:"Servers Management"},groups:{title:"Group Management"},settings:{title:"Settings",language:"Language",account:"Account Settings",password:"Change Password",appearance:"Appearance",routeConfig:"Route Configuration"},market:{title:"Server Market - (Data from mcpm.sh)"}},r2={add:"Add",addNew:"Add New Group",edit:"Edit Group",delete:"Delete",confirmDelete:"Are you sure you want to delete this group?",deleteWarning:"Deleting group '{{name}}' will remove it and all its server associations. This action cannot be undone.",name:"Group Name",namePlaceholder:"Enter group name",nameRequired:"Group name is required",description:"Description",descriptionPlaceholder:"Enter group description (optional)",createError:"Failed to create group",updateError:"Failed to update group",deleteError:"Failed to delete group",serverAddError:"Failed to add server to group",serverRemoveError:"Failed to remove server from group",addServer:"Add Server to Group",selectServer:"Select a server to add",servers:"Servers in Group",remove:"Remove",noGroups:"No groups available. Create a new group to get started.",noServers:"No servers in this group.",noServerOptions:"No servers available",serverCount:"{{count}} Servers"},i2={title:"Server Market",official:"Official",by:"By",unknown:"Unknown",tools:"tools",search:"Search",searchPlaceholder:"Search for servers by name, category, or tags",clearFilters:"Clear",clearCategoryFilter:"",clearTagFilter:"",categories:"Categories",tags:"Tags",showTags:"Show tags",hideTags:"Hide tags",moreTags:"",noServers:"No servers found matching your search",backToList:"Back to list",install:"Install",installing:"Installing...",installed:"Installed",installServer:"Install Server: {{name}}",installSuccess:"Server {{serverName}} installed successfully",author:"Author",license:"License",repository:"Repository",examples:"Examples",arguments:"Arguments",argumentName:"Name",description:"Description",required:"Required",example:"Example",viewSchema:"View schema",fetchError:"Error fetching market servers",serverNotFound:"Server not found",searchError:"Error searching servers",filterError:"Error filtering servers by category",tagFilterError:"Error filtering servers by tag",noInstallationMethod:"No installation method available for this server",showing:"Showing {{from}}-{{to}} of {{total}} servers",perPage:"Per page"},o2={enableGlobalRoute:"Enable Global Route",enableGlobalRouteDescription:"Allow connections to /sse endpoint without specifying a group ID",enableGroupNameRoute:"Enable Group Name Route",enableGroupNameRouteDescription:"Allow connections to /sse endpoint using group names instead of just group IDs",systemConfigUpdated:"System configuration updated successfully"},u2={app:W1,auth:I1,server:e2,status:t2,errors:a2,common:n2,nav:l2,pages:s2,groups:r2,market:i2,settings:o2},c2={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},f2={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},d2={addServer:"添加服务器",add:"添加",edit:"编辑",delete:"删除",confirmDelete:"您确定要删除此服务器吗?",deleteWarning:"删除服务器 '{{name}}' 将会移除该服务器及其所有数据。此操作无法撤销。",status:"状态",tools:"工具",name:"服务器名称",url:"服务器 URL",apiKey:"API 密钥",save:"保存",cancel:"取消",addError:"添加服务器失败",editError:"编辑服务器 {{serverName}} 失败",invalidConfig:"无法找到 {{serverName}} 的配置数据",deleteError:"删除服务器 {{serverName}} 失败",updateError:"更新服务器失败",editTitle:"编辑服务器: {{serverName}}",type:"服务器类型",command:"命令",arguments:"参数",envVars:"环境变量",key:"键",value:"值",enabled:"已启用",enable:"启用",disable:"禁用",remove:"移除",toggleError:"切换服务器 {{serverName}} 状态失败",alreadyExists:"服务器 {{serverName}} 已经存在",invalidData:"提供的服务器数据无效",notFound:"找不到服务器 {{serverName}}",namePlaceholder:"请输入服务器名称",urlPlaceholder:"请输入服务器URL",commandPlaceholder:"请输入命令",argumentsPlaceholder:"请输入参数",errorDetails:"错误详情",viewErrorDetails:"查看错误详情"},h2={online:"在线",offline:"离线",connecting:"连接中"},m2={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败"},g2={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败"},p2={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场"},y2={dashboard:{title:"仪表盘",totalServers:"服务器总数",onlineServers:"在线服务器",offlineServers:"离线服务器",connectingServers:"连接中服务",recentServers:"最近的服务器"},servers:{title:"服务器管理"},settings:{title:"设置",language:"语言",account:"账户设置",password:"修改密码",appearance:"外观",routeConfig:"路由配置"},groups:{title:"分组管理"},market:{title:"服务器市场 - (数据来源于 mcpm.sh)"}},v2={add:"添加",addNew:"添加新分组",edit:"编辑分组",delete:"删除",confirmDelete:"您确定要删除此分组吗?",deleteWarning:"删除分组 '{{name}}' 将会移除该分组及其所有服务器关联。此操作无法撤销。",name:"分组名称",namePlaceholder:"请输入分组名称",nameRequired:"分组名称不能为空",description:"描述",descriptionPlaceholder:"请输入分组描述(可选)",createError:"创建分组失败",updateError:"更新分组失败",deleteError:"删除分组失败",serverAddError:"向分组添加服务器失败",serverRemoveError:"从分组移除服务器失败",addServer:"添加服务器到分组",selectServer:"选择要添加的服务器",servers:"分组中的服务器",remove:"移除",noGroups:"暂无可用分组。创建一个新分组以开始使用。",noServers:"此分组中没有服务器。",noServerOptions:"没有可用的服务器",serverCount:"{{count}} 台服务器"},x2={title:"服务器市场",official:"官方",by:"作者",unknown:"未知",tools:"工具",search:"搜索",searchPlaceholder:"搜索服务器名称、分类或标签",clearFilters:"清除",clearCategoryFilter:"",clearTagFilter:"",categories:"分类",tags:"标签",showTags:"显示标签",hideTags:"隐藏标签",moreTags:"",noServers:"未找到匹配的服务器",backToList:"返回列表",install:"安装",installing:"安装中...",installed:"已安装",installServer:"安装服务器: {{name}}",installSuccess:"服务器 {{serverName}} 安装成功",author:"作者",license:"许可证",repository:"代码仓库",examples:"示例",arguments:"参数",argumentName:"名称",description:"描述",required:"必填",example:"示例",viewSchema:"查看结构",fetchError:"获取服务器市场数据失败",serverNotFound:"未找到服务器",searchError:"搜索服务器失败",filterError:"按分类筛选服务器失败",tagFilterError:"按标签筛选服务器失败",noInstallationMethod:"该服务器没有可用的安装方法",showing:"显示 {{from}}-{{to}}/{{total}} 个服务器",perPage:"每页显示"},b2={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定分组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用分组名称路由",enableGroupNameRouteDescription:"允许使用分组名称而非分组 ID 连接到 /sse 端点",systemConfigUpdated:"系统配置更新成功"},S2={app:c2,auth:f2,server:d2,status:h2,errors:m2,common:g2,nav:p2,pages:y2,groups:v2,market:x2,settings:b2};He.use($g).use($b).init({resources:{en:{translation:u2},zh:{translation:S2}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});Vy.createRoot(document.getElementById("root")).render(u.jsx(hd.StrictMode,{children:u.jsx(b1,{})}));
|