@samanhappy/mcphub 0.6.2 → 0.7.1
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/README.md +36 -18
- package/README.zh.md +35 -17
- package/dist/config/index.js +1 -0
- package/dist/config/index.js.map +1 -1
- package/dist/controllers/configController.js +28 -0
- package/dist/controllers/configController.js.map +1 -0
- package/dist/controllers/serverController.js +83 -2
- package/dist/controllers/serverController.js.map +1 -1
- package/dist/db/connection.js +279 -0
- package/dist/db/connection.js.map +1 -0
- package/dist/db/entities/VectorEmbedding.js +62 -0
- package/dist/db/entities/VectorEmbedding.js.map +1 -0
- package/dist/db/entities/index.js +6 -0
- package/dist/db/entities/index.js.map +1 -0
- package/dist/db/index.js +32 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/repositories/BaseRepository.js +58 -0
- package/dist/db/repositories/BaseRepository.js.map +1 -0
- package/dist/db/repositories/VectorEmbeddingRepository.js +173 -0
- package/dist/db/repositories/VectorEmbeddingRepository.js.map +1 -0
- package/dist/db/repositories/index.js +4 -0
- package/dist/db/repositories/index.js.map +1 -0
- package/dist/db/subscribers/VectorEmbeddingSubscriber.js +56 -0
- package/dist/db/subscribers/VectorEmbeddingSubscriber.js.map +1 -0
- package/dist/db/types/postgresVectorType.js +33 -0
- package/dist/db/types/postgresVectorType.js.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/middlewares/index.js +18 -8
- package/dist/middlewares/index.js.map +1 -1
- package/dist/routes/index.js +13 -9
- package/dist/routes/index.js.map +1 -1
- package/dist/server.js +18 -9
- package/dist/server.js.map +1 -1
- package/dist/services/mcpService.js +185 -3
- package/dist/services/mcpService.js.map +1 -1
- package/dist/services/sseService.js +16 -10
- package/dist/services/sseService.js.map +1 -1
- package/dist/services/vectorSearchService.js +603 -0
- package/dist/services/vectorSearchService.js.map +1 -0
- package/frontend/dist/assets/favicon-DJnZjsC8.ico +0 -0
- package/frontend/dist/assets/index-CO9hZSAL.js +148 -0
- package/frontend/dist/assets/index-CO9hZSAL.js.map +1 -0
- package/frontend/dist/assets/index-D9p3VMBc.css +1 -0
- package/frontend/dist/index.html +3 -3
- package/package.json +15 -7
- package/frontend/dist/assets/favicon-DKeT5aEu.ico +0 -0
- package/frontend/dist/assets/index-B7KNaMJO.js +0 -148
- package/frontend/dist/assets/index-B7KNaMJO.js.map +0 -1
- package/frontend/dist/assets/index-DDs5RqXX.css +0 -1
|
@@ -1,148 +0,0 @@
|
|
|
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 ld(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sd={exports:{}},Tr={};/**
|
|
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 Pg=Symbol.for("react.transitional.element"),Wg=Symbol.for("react.fragment");function rd(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:Pg,type:e,key:n,ref:t!==void 0?t:null,props:a}}Tr.Fragment=Wg;Tr.jsx=rd;Tr.jsxs=rd;sd.exports=Tr;var o=sd.exports,id={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 qo=Symbol.for("react.transitional.element"),Ig=Symbol.for("react.portal"),e0=Symbol.for("react.fragment"),t0=Symbol.for("react.strict_mode"),a0=Symbol.for("react.profiler"),n0=Symbol.for("react.consumer"),l0=Symbol.for("react.context"),s0=Symbol.for("react.forward_ref"),r0=Symbol.for("react.suspense"),i0=Symbol.for("react.memo"),od=Symbol.for("react.lazy"),tc=Symbol.iterator;function o0(e){return e===null||typeof e!="object"?null:(e=tc&&e[tc]||e["@@iterator"],typeof e=="function"?e:null)}var ud={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cd=Object.assign,fd={};function Un(e,t,a){this.props=e,this.context=t,this.refs=fd,this.updater=a||ud}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 dd(){}dd.prototype=Un.prototype;function Yo(e,t,a){this.props=e,this.context=t,this.refs=fd,this.updater=a||ud}var $o=Yo.prototype=new dd;$o.constructor=Yo;cd($o,Un.prototype);$o.isPureReactComponent=!0;var ac=Array.isArray,fe={H:null,A:null,T:null,S:null,V:null},hd=Object.prototype.hasOwnProperty;function Ko(e,t,a,n,l,s){return a=s.ref,{$$typeof:qo,type:e,key:t,ref:a!==void 0?a:null,props:s}}function u0(e,t){return Ko(e.type,t,void 0,void 0,void 0,e.props)}function Qo(e){return typeof e=="object"&&e!==null&&e.$$typeof===qo}function c0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var nc=/\/+/g;function Fr(e,t){return typeof e=="object"&&e!==null&&e.key!=null?c0(""+e.key):t.toString(36)}function lc(){}function f0(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(lc,lc):(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 en(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 qo:case Ig:r=!0;break;case od:return r=e._init,en(r(e._payload),t,a,n,l)}}if(r)return l=l(e),r=n===""?"."+Fr(e,0):n,ac(l)?(a="",r!=null&&(a=r.replace(nc,"$&/")+"/"),en(l,t,a,"",function(c){return c})):l!=null&&(Qo(l)&&(l=u0(l,a+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(nc,"$&/")+"/")+r)),t.push(l)),1;r=0;var i=n===""?".":n+":";if(ac(e))for(var u=0;u<e.length;u++)n=e[u],s=i+Fr(n,u),r+=en(n,t,a,s,l);else if(u=o0(e),typeof u=="function")for(e=u.call(e),u=0;!(n=e.next()).done;)n=n.value,s=i+Fr(n,u++),r+=en(n,t,a,s,l);else if(s==="object"){if(typeof e.then=="function")return en(f0(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 ds(e,t,a){if(e==null)return e;var n=[],l=0;return en(e,n,"","",function(s){return t.call(a,s,l++)}),n}function d0(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 sc=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 h0(){}Y.Children={map:ds,forEach:function(e,t,a){ds(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return ds(e,function(){t++}),t},toArray:function(e){return ds(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=e0;Y.Profiler=a0;Y.PureComponent=Yo;Y.StrictMode=t0;Y.Suspense=r0;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=cd({},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)!hd.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),u=0;u<r;u++)i[u]=arguments[u+2];n.children=i}return Ko(e.type,l,void 0,void 0,s,n)};Y.createContext=function(e){return e={$$typeof:l0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:n0,_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)hd.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),u=0;u<r;u++)i[u]=arguments[u+2];l.children=i}if(e&&e.defaultProps)for(n in r=e.defaultProps,r)l[n]===void 0&&(l[n]=r[n]);return Ko(e,s,void 0,void 0,null,l)};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:s0,render:e}};Y.isValidElement=Qo;Y.lazy=function(e){return{$$typeof:od,_payload:{_status:-1,_result:e},_init:d0}};Y.memo=function(e,t){return{$$typeof:i0,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(h0,sc)}catch(s){sc(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";id.exports=Y;var x=id.exports;const md=ld(x);var gd={exports:{}},Ar={},pd={exports:{}},yd={};/**
|
|
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(k,H){var z=k.length;k.push(H);e:for(;0<z;){var U=z-1>>>1,J=k[U];if(0<l(J,H))k[U]=H,k[z]=J,z=U;else break e}}function a(k){return k.length===0?null:k[0]}function n(k){if(k.length===0)return null;var H=k[0],z=k.pop();if(z!==H){k[0]=z;e:for(var U=0,J=k.length,Oe=J>>>1;U<Oe;){var Me=2*(U+1)-1,F=k[Me],pe=Me+1,mt=k[pe];if(0>l(F,z))pe<J&&0>l(mt,F)?(k[U]=mt,k[pe]=z,U=pe):(k[U]=F,k[Me]=z,U=Me);else if(pe<J&&0>l(mt,z))k[U]=mt,k[pe]=z,U=pe;else break e}}return H}function l(k,H){var z=k.sortIndex-H.sortIndex;return z!==0?z:k.id-H.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 u=[],c=[],f=1,m=null,d=3,y=!1,S=!1,b=!1,w=!1,p=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function v(k){for(var H=a(c);H!==null;){if(H.callback===null)n(c);else if(H.startTime<=k)n(c),H.sortIndex=H.expirationTime,t(u,H);else break;H=a(c)}}function j(k){if(b=!1,v(k),!S)if(a(u)!==null)S=!0,C||(C=!0,te());else{var H=a(c);H!==null&&oe(j,H.startTime-k)}}var C=!1,N=-1,E=5,A=-1;function R(){return w?!0:!(e.unstable_now()-A<E)}function _(){if(w=!1,C){var k=e.unstable_now();A=k;var H=!0;try{e:{S=!1,b&&(b=!1,h(N),N=-1),y=!0;var z=d;try{t:{for(v(k),m=a(u);m!==null&&!(m.expirationTime>k&&R());){var U=m.callback;if(typeof U=="function"){m.callback=null,d=m.priorityLevel;var J=U(m.expirationTime<=k);if(k=e.unstable_now(),typeof J=="function"){m.callback=J,v(k),H=!0;break t}m===a(u)&&n(u),v(k)}else n(u);m=a(u)}if(m!==null)H=!0;else{var Oe=a(c);Oe!==null&&oe(j,Oe.startTime-k),H=!1}}break e}finally{m=null,d=z,y=!1}H=void 0}}finally{H?te():C=!1}}}var te;if(typeof g=="function")te=function(){g(_)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,Z=me.port2;me.port1.onmessage=_,te=function(){Z.postMessage(null)}}else te=function(){p(_,0)};function oe(k,H){N=p(function(){k(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(k){switch(d){case 1:case 2:case 3:var H=3;break;default:H=d}var z=d;d=H;try{return k()}finally{d=z}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(k,H){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var z=d;d=k;try{return H()}finally{d=z}},e.unstable_scheduleCallback=function(k,H,z){var U=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?U+z:U):z=U,k){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=z+J,k={id:f++,callback:H,priorityLevel:k,startTime:z,expirationTime:J,sortIndex:-1},z>U?(k.sortIndex=z,t(c,k),a(u)===null&&k===a(c)&&(b?(h(N),N=-1):b=!0,oe(j,z-U))):(k.sortIndex=J,t(u,k),S||y||(S=!0,C||(C=!0,te()))),k},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(k){var H=d;return function(){var z=d;d=H;try{return k.apply(this,arguments)}finally{d=z}}}})(yd);pd.exports=yd;var m0=pd.exports,xd={exports:{}},Ve={};/**
|
|
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 g0=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 Ft(){}var Ge={d:{f:Ft,r:function(){throw Error(vd(522))},D:Ft,C:Ft,L:Ft,m:Ft,X:Ft,S:Ft,M:Ft},p:0,findDOMNode:null},p0=Symbol.for("react.portal");function y0(e,t,a){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p0,key:n==null?null:""+n,children:e,containerInfo:t,implementation:a}}var fl=g0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function kr(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ve.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ge;Ve.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 y0(e,t,null,a)};Ve.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()}};Ve.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))};Ve.prefetchDNS=function(e){typeof e=="string"&&Ge.d.D(e)};Ve.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var a=t.as,n=kr(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})}};Ve.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var a=kr(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)};Ve.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var a=t.as,n=kr(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})}};Ve.preloadModule=function(e,t){if(typeof e=="string")if(t){var a=kr(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)};Ve.requestFormReset=function(e){Ge.d.r(e)};Ve.unstable_batchedUpdates=function(e,t){return e(t)};Ve.useFormState=function(e,t,a){return fl.H.useFormState(e,t,a)};Ve.useFormStatus=function(){return fl.H.useHostTransitionStatus()};Ve.version="19.1.0";function bd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bd)}catch(e){console.error(e)}}bd(),xd.exports=Ve;var x0=xd.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=m0,Sd=x,v0=x0;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 wd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $l(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 Nd(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 rc(e){if($l(e)!==e)throw Error(T(188))}function b0(e){var t=e.alternate;if(!t){if(t=$l(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 rc(l),e;if(s===n)return rc(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 jd(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=jd(e),t!==null)return t;e=e.sibling}return null}var ue=Object.assign,S0=Symbol.for("react.element"),hs=Symbol.for("react.transitional.element"),il=Symbol.for("react.portal"),ln=Symbol.for("react.fragment"),Ed=Symbol.for("react.strict_mode"),Ui=Symbol.for("react.profiler"),w0=Symbol.for("react.provider"),Cd=Symbol.for("react.consumer"),Lt=Symbol.for("react.context"),Xo=Symbol.for("react.forward_ref"),_i=Symbol.for("react.suspense"),Hi=Symbol.for("react.suspense_list"),Zo=Symbol.for("react.memo"),ta=Symbol.for("react.lazy"),Bi=Symbol.for("react.activity"),N0=Symbol.for("react.memo_cache_sentinel"),ic=Symbol.iterator;function Fn(e){return e===null||typeof e!="object"?null:(e=ic&&e[ic]||e["@@iterator"],typeof e=="function"?e:null)}var j0=Symbol.for("react.client.reference");function Gi(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===j0?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ln:return"Fragment";case Ui:return"Profiler";case Ed:return"StrictMode";case _i:return"Suspense";case Hi:return"SuspenseList";case Bi:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case il:return"Portal";case Lt:return(e.displayName||"Context")+".Provider";case Cd:return(e._context.displayName||"Context")+".Consumer";case Xo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zo:return t=e.displayName||null,t!==null?t:Gi(e.type)||"Memo";case ta:t=e._payload,e=e._init;try{return Gi(e(t))}catch{}}return null}var ol=Array.isArray,B=Sd.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=v0.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ra={pending:!1,data:null,method:null,action:null},Vi=[],sn=-1;function At(e){return{current:e}}function Re(e){0>sn||(e.current=Vi[sn],Vi[sn]=null,sn--)}function de(e,t){sn++,Vi[sn]=e.current,e.current=t}var Et=At(null),Tl=At(null),fa=At(null),Qs=At(null);function Xs(e,t){switch(de(fa,t),de(Tl,e),de(Et,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?hf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=hf(t),e=Ym(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Re(Et),de(Et,e)}function En(){Re(Et),Re(Tl),Re(fa)}function qi(e){e.memoizedState!==null&&de(Qs,e);var t=Et.current,a=Ym(t,e.type);t!==a&&(de(Tl,e),de(Et,a))}function Zs(e){Tl.current===e&&(Re(Et),Re(Tl)),Qs.current===e&&(Re(Qs),_l._currentValue=Ra)}var Yi=Object.prototype.hasOwnProperty,Jo=Ee.unstable_scheduleCallback,Pr=Ee.unstable_cancelCallback,E0=Ee.unstable_shouldYield,C0=Ee.unstable_requestPaint,Ct=Ee.unstable_now,T0=Ee.unstable_getCurrentPriorityLevel,Td=Ee.unstable_ImmediatePriority,Ad=Ee.unstable_UserBlockingPriority,Js=Ee.unstable_NormalPriority,A0=Ee.unstable_LowPriority,kd=Ee.unstable_IdlePriority,k0=Ee.log,R0=Ee.unstable_setDisableYieldValue,Kl=null,We=null;function ia(e){if(typeof k0=="function"&&R0(e),We&&typeof We.setStrictMode=="function")try{We.setStrictMode(Kl,e)}catch{}}var Ie=Math.clz32?Math.clz32:z0,O0=Math.log,M0=Math.LN2;function z0(e){return e>>>=0,e===0?32:31-(O0(e)/M0|0)|0}var ms=256,gs=4194304;function Ta(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 Rr(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=Ta(n):(r&=i,r!==0?l=Ta(r):a||(a=i&~e,a!==0&&(l=Ta(a))))):(i=n&~s,i!==0?l=Ta(i):r!==0?l=Ta(r):a||(a=n&~e,a!==0&&(l=Ta(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 Ql(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function D0(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=ms;return ms<<=1,!(ms&4194048)&&(ms=256),e}function Od(){var e=gs;return gs<<=1,!(gs&62914560)&&(gs=4194304),e}function Wr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Xl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function L0(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,u=e.expirationTimes,c=e.hiddenUpdates;for(a=r&~a;0<a;){var f=31-Ie(a),m=1<<f;i[f]=0,u[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&=~m}n!==0&&Md(e,n,0),s!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=s&~(r&~t))}function Md(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Ie(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function zd(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Ie(a),l=1<<n;l&t|e[n]&t&&(e[n]|=t),a&=~l}}function Fo(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 Po(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Dd(){var e=ee.p;return e!==0?e:(e=window.event,e===void 0?32:Im(e.type))}function U0(e,t){var a=ee.p;try{return ee.p=e,t()}finally{ee.p=a}}var Na=Math.random().toString(36).slice(2),Ue="__reactFiber$"+Na,Qe="__reactProps$"+Na,_n="__reactContainer$"+Na,$i="__reactEvents$"+Na,_0="__reactListeners$"+Na,H0="__reactHandles$"+Na,oc="__reactResources$"+Na,Zl="__reactMarker$"+Na;function Wo(e){delete e[Ue],delete e[Qe],delete e[$i],delete e[_0],delete e[H0]}function rn(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=pf(e);e!==null;){if(a=e[Ue])return a;e=pf(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 yn(e){var t=e[oc];return t||(t=e[oc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ae(e){e[Zl]=!0}var Ld=new Set,Ud={};function qa(e,t){Cn(e,t),Cn(e+"Capture",t)}function Cn(e,t){for(Ud[e]=t,e=0;e<t.length;e++)Ld.add(t[e])}var B0=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]*$"),uc={},cc={};function G0(e){return Yi.call(cc,e)?!0:Yi.call(uc,e)?!1:B0.test(e)?cc[e]=!0:(uc[e]=!0,!1)}function Os(e,t,a){if(G0(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 ps(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 Ir,fc;function tn(e){if(Ir===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ir=t&&t[1]||"",fc=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Ir+e+fc}var ei=!1;function ti(e,t){if(!e||ei)return"";ei=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(y){var d=y}Reflect.construct(e,[],m)}else{try{m.call()}catch(y){d=y}e.call(m.prototype)}}else{try{throw Error()}catch(y){d=y}(m=e())&&typeof m.catch=="function"&&m.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 u=r.split(`
|
|
44
|
-
`),c=i.split(`
|
|
45
|
-
`);for(l=n=0;n<u.length&&!u[n].includes("DetermineComponentFrameRoot");)n++;for(;l<c.length&&!c[l].includes("DetermineComponentFrameRoot");)l++;if(n===u.length||l===c.length)for(n=u.length-1,l=c.length-1;1<=n&&0<=l&&u[n]!==c[l];)l--;for(;1<=n&&0<=l;n--,l--)if(u[n]!==c[l]){if(n!==1||l!==1)do if(n--,l--,0>l||u[n]!==c[l]){var f=`
|
|
46
|
-
`+u[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{ei=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?tn(a):""}function V0(e){switch(e.tag){case 26:case 27:case 5:return tn(e.type);case 16:return tn("Lazy");case 13:return tn("Suspense");case 19:return tn("SuspenseList");case 0:case 15:return ti(e.type,!1);case 11:return ti(e.type.render,!1);case 1:return ti(e.type,!0);case 31:return tn("Activity");default:return""}}function dc(e){try{var t="";do t+=V0(e),e=e.return;while(e);return t}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}function st(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _d(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function q0(e){var t=_d(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 Fs(e){e._valueTracker||(e._valueTracker=q0(e))}function Hd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=_d(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Ps(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 Y0=/[\n"\\]/g;function ot(e){return e.replace(Y0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ki(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=""+st(t)):e.value!==""+st(t)&&(e.value=""+st(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?Qi(e,r,st(t)):a!=null?Qi(e,r,st(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=""+st(i):e.removeAttribute("name")}function Bd(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?""+st(a):"",t=t!=null?""+st(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"&&Ps(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function xn(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=""+st(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 Gd(e,t,a){if(t!=null&&(t=""+st(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+st(a):""}function Vd(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=st(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 $0=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 hc(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||$0.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&&hc(e,l,n)}else for(var s in t)t.hasOwnProperty(s)&&hc(e,s,t[s])}function Io(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 K0=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"]]),Q0=/^[\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 Ms(e){return Q0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Xi=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,vn=null;function mc(e){var t=Hn(e);if(t&&(e=t.stateNode)){var a=e[Qe]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ki(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="'+ot(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var l=n[Qe]||null;if(!l)throw Error(T(90));Ki(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&&Hd(n)}break e;case"textarea":Gd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&xn(e,!!a.multiple,t,!1)}}}var ai=!1;function Yd(e,t,a){if(ai)return e(t,a);ai=!0;try{var n=e(t);return n}finally{if(ai=!1,(on!==null||vn!==null)&&(Gr(),on&&(t=on,e=vn,vn=on=null,mc(t),e)))for(t=0;t<e.length;t++)mc(e[t])}}function Al(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Qe]||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 Yt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zi=!1;if(Yt)try{var Pn={};Object.defineProperty(Pn,"passive",{get:function(){Zi=!0}}),window.addEventListener("test",Pn,Pn),window.removeEventListener("test",Pn,Pn)}catch{Zi=!1}var oa=null,tu=null,zs=null;function $d(){if(zs)return zs;var e,t=tu,a=t.length,n,l="value"in oa?oa.value:oa.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 zs=l.slice(e,1<n?1-n:void 0)}function Ds(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 ys(){return!0}function gc(){return!1}function Xe(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)?ys:gc,this.isPropagationStopped=gc,this}return ue(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=ys)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ys)},persist:function(){},isPersistent:ys}),t}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Or=Xe(Ya),Jl=ue({},Ya,{view:0,detail:0}),X0=Xe(Jl),ni,li,Wn,Mr=ue({},Jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:au,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"?(ni=e.screenX-Wn.screenX,li=e.screenY-Wn.screenY):li=ni=0,Wn=e),ni)},movementY:function(e){return"movementY"in e?e.movementY:li}}),pc=Xe(Mr),Z0=ue({},Mr,{dataTransfer:0}),J0=Xe(Z0),F0=ue({},Jl,{relatedTarget:0}),si=Xe(F0),P0=ue({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),W0=Xe(P0),I0=ue({},Ya,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ep=Xe(I0),tp=ue({},Ya,{data:0}),yc=Xe(tp),ap={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},np={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"},lp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lp[e])?!!t[e]:!1}function au(){return sp}var rp=ue({},Jl,{key:function(e){if(e.key){var t=ap[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?np[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:au,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ip=Xe(rp),op=ue({},Mr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xc=Xe(op),up=ue({},Jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:au}),cp=Xe(up),fp=ue({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),dp=Xe(fp),hp=ue({},Mr,{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}),mp=Xe(hp),gp=ue({},Ya,{newState:0,oldState:0}),pp=Xe(gp),yp=[9,13,27,32],nu=Yt&&"CompositionEvent"in window,dl=null;Yt&&"documentMode"in document&&(dl=document.documentMode);var xp=Yt&&"TextEvent"in window&&!dl,Kd=Yt&&(!nu||dl&&8<dl&&11>=dl),vc=" ",bc=!1;function Qd(e,t){switch(e){case"keyup":return yp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var un=!1;function vp(e,t){switch(e){case"compositionend":return Xd(t);case"keypress":return t.which!==32?null:(bc=!0,vc);case"textInput":return e=t.data,e===vc&&bc?null:e;default:return null}}function bp(e,t){if(un)return e==="compositionend"||!nu&&Qd(e,t)?(e=$d(),zs=tu=oa=null,un=!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 Kd&&t.locale!=="ko"?null:t.data;default:return null}}var Sp={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 Sc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Sp[e.type]:t==="textarea"}function Zd(e,t,a,n){on?vn?vn.push(n):vn=[n]:on=n,t=gr(t,"onChange"),0<t.length&&(a=new Or("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var hl=null,kl=null;function wp(e){Gm(e,0)}function zr(e){var t=ul(e);if(Hd(t))return e}function wc(e,t){if(e==="change")return t}var Jd=!1;if(Yt){var ri;if(Yt){var ii="oninput"in document;if(!ii){var Nc=document.createElement("div");Nc.setAttribute("oninput","return;"),ii=typeof Nc.oninput=="function"}ri=ii}else ri=!1;Jd=ri&&(!document.documentMode||9<document.documentMode)}function jc(){hl&&(hl.detachEvent("onpropertychange",Fd),kl=hl=null)}function Fd(e){if(e.propertyName==="value"&&zr(kl)){var t=[];Zd(t,kl,e,eu(e)),Yd(wp,t)}}function Np(e,t,a){e==="focusin"?(jc(),hl=t,kl=a,hl.attachEvent("onpropertychange",Fd)):e==="focusout"&&jc()}function jp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zr(kl)}function Ep(e,t){if(e==="click")return zr(t)}function Cp(e,t){if(e==="input"||e==="change")return zr(t)}function Tp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var at=typeof Object.is=="function"?Object.is:Tp;function Rl(e,t){if(at(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(!Yi.call(t,l)||!at(e[l],t[l]))return!1}return!0}function Ec(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cc(e,t){var a=Ec(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=Ec(a)}}function Pd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ps(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=Ps(e.document)}return t}function lu(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 Ap=Yt&&"documentMode"in document&&11>=document.documentMode,cn=null,Ji=null,ml=null,Fi=!1;function Tc(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Fi||cn==null||cn!==Ps(n)||(n=cn,"selectionStart"in n&&lu(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&&Rl(ml,n)||(ml=n,n=gr(Ji,"onSelect"),0<n.length&&(t=new Or("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=cn)))}function Ea(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var fn={animationend:Ea("Animation","AnimationEnd"),animationiteration:Ea("Animation","AnimationIteration"),animationstart:Ea("Animation","AnimationStart"),transitionrun:Ea("Transition","TransitionRun"),transitionstart:Ea("Transition","TransitionStart"),transitioncancel:Ea("Transition","TransitionCancel"),transitionend:Ea("Transition","TransitionEnd")},oi={},Id={};Yt&&(Id=document.createElement("div").style,"AnimationEvent"in window||(delete fn.animationend.animation,delete fn.animationiteration.animation,delete fn.animationstart.animation),"TransitionEvent"in window||delete fn.transitionend.transition);function $a(e){if(oi[e])return oi[e];if(!fn[e])return e;var t=fn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Id)return oi[e]=t[a];return e}var eh=$a("animationend"),th=$a("animationiteration"),ah=$a("animationstart"),kp=$a("transitionrun"),Rp=$a("transitionstart"),Op=$a("transitioncancel"),nh=$a("transitionend"),lh=new Map,Pi="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(" ");Pi.push("scrollEnd");function xt(e,t){lh.set(e,t),qa(t,[e])}var Ac=new WeakMap;function ut(e,t){if(typeof e=="object"&&e!==null){var a=Ac.get(e);return a!==void 0?a:(t={value:e,source:t,stack:dc(t)},Ac.set(e,t),t)}return{value:e,source:t,stack:dc(t)}}var lt=[],dn=0,su=0;function Dr(){for(var e=dn,t=su=dn=0;t<e;){var a=lt[t];lt[t++]=null;var n=lt[t];lt[t++]=null;var l=lt[t];lt[t++]=null;var s=lt[t];if(lt[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&&sh(a,l,s)}}function Lr(e,t,a,n){lt[dn++]=e,lt[dn++]=t,lt[dn++]=a,lt[dn++]=n,su|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ru(e,t,a,n){return Lr(e,t,a,n),Ws(e)}function Bn(e,t){return Lr(e,null,null,t),Ws(e)}function sh(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-Ie(a),e=s.hiddenUpdates,n=e[l],n===null?e[l]=[t]:n.push(t),t.lane=a|536870912),s):null}function Ws(e){if(50<jl)throw jl=0,vo=null,Error(T(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hn={};function Mp(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 Pe(e,t,a,n){return new Mp(e,t,a,n)}function iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gt(e,t){var a=e.alternate;return a===null?(a=Pe(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 rh(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 Ls(e,t,a,n,l,s){var r=0;if(n=e,typeof e=="function")iu(e)&&(r=1);else if(typeof e=="string")r=Dy(e,a,Et.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Bi:return e=Pe(31,a,t,l),e.elementType=Bi,e.lanes=s,e;case ln:return Oa(a.children,l,s,t);case Ed:r=8,l|=24;break;case Ui:return e=Pe(12,a,t,l|2),e.elementType=Ui,e.lanes=s,e;case _i:return e=Pe(13,a,t,l),e.elementType=_i,e.lanes=s,e;case Hi:return e=Pe(19,a,t,l),e.elementType=Hi,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case w0:case Lt:r=10;break e;case Cd:r=9;break e;case Xo:r=11;break e;case Zo:r=14;break e;case ta:r=16,n=null;break e}r=29,a=Error(T(130,e===null?"null":typeof e,"")),n=null}return t=Pe(r,a,t,l),t.elementType=e,t.type=n,t.lanes=s,t}function Oa(e,t,a,n){return e=Pe(7,e,n,t),e.lanes=a,e}function ui(e,t,a){return e=Pe(6,e,null,t),e.lanes=a,e}function ci(e,t,a){return t=Pe(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mn=[],gn=0,Is=null,er=0,rt=[],it=0,Ma=null,Ut=1,_t="";function Aa(e,t){mn[gn++]=er,mn[gn++]=Is,Is=e,er=t}function ih(e,t,a){rt[it++]=Ut,rt[it++]=_t,rt[it++]=Ma,Ma=e;var n=Ut;e=_t;var l=32-Ie(n)-1;n&=~(1<<l),a+=1;var s=32-Ie(t)+l;if(30<s){var r=l-l%5;s=(n&(1<<r)-1).toString(32),n>>=r,l-=r,Ut=1<<32-Ie(t)+l|a<<l|n,_t=s+e}else Ut=1<<s|a<<l|n,_t=e}function ou(e){e.return!==null&&(Aa(e,1),ih(e,1,0))}function uu(e){for(;e===Is;)Is=mn[--gn],mn[gn]=null,er=mn[--gn],mn[gn]=null;for(;e===Ma;)Ma=rt[--it],rt[it]=null,_t=rt[--it],rt[it]=null,Ut=rt[--it],rt[it]=null}var Be=null,ye=null,I=!1,za=null,wt=!1,Wi=Error(T(519));function Ha(e){var t=Error(T(418,""));throw Ol(ut(t,e)),Wi}function kc(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Ue]=e,t[Qe]=n,a){case"dialog":K("cancel",t),K("close",t);break;case"iframe":case"object":case"embed":K("load",t);break;case"video":case"audio":for(a=0;a<Dl.length;a++)K(Dl[a],t);break;case"source":K("error",t);break;case"img":case"image":case"link":K("error",t),K("load",t);break;case"details":K("toggle",t);break;case"input":K("invalid",t),Bd(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),Fs(t);break;case"select":K("invalid",t);break;case"textarea":K("invalid",t),Vd(t,n.value,n.defaultValue,n.children),Fs(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&&(K("beforetoggle",t),K("toggle",t)),n.onScroll!=null&&K("scroll",t),n.onScrollEnd!=null&&K("scrollend",t),n.onClick!=null&&(t.onclick=Yr),t=!0):t=!1,t||Ha(e)}function Rc(e){for(Be=e.return;Be;)switch(Be.tag){case 5:case 13:wt=!1;return;case 27:case 3:wt=!0;return;default:Be=Be.return}}function In(e){if(e!==Be)return!1;if(!I)return Rc(e),I=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Eo(e.type,e.memoizedProps)),a=!a),a&&ye&&Ha(e),Rc(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=pt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}ye=null}}else t===27?(t=ye,ja(e.type)?(e=Ao,Ao=null,ye=e):ye=t):ye=Be?pt(e.stateNode.nextSibling):null;return!0}function Fl(){ye=Be=null,I=!1}function Oc(){var e=za;return e!==null&&(Ke===null?Ke=e:Ke.push.apply(Ke,e),za=null),e}function Ol(e){za===null?za=[e]:za.push(e)}var Ii=At(null),Ka=null,Ht=null;function na(e,t,a){de(Ii,t._currentValue),t._currentValue=a}function Vt(e){e._currentValue=Ii.current,Re(Ii)}function eo(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 to(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 u=0;u<t.length;u++)if(i.context===t[u]){s.lanes|=a,i=s.alternate,i!==null&&(i.lanes|=a),eo(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),eo(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 Pl(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;at(l.pendingProps.value,r.value)||(e!==null?e.push(i):e=[i])}}else if(l===Qs.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&&to(t,e,a,n),t.flags|=262144}function tr(e){for(e=e.firstContext;e!==null;){if(!at(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ba(e){Ka=e,Ht=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _e(e){return oh(Ka,e)}function xs(e,t){return Ka===null&&Ba(e),oh(e,t)}function oh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ht===null){if(e===null)throw Error(T(308));Ht=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ht=Ht.next=t;return a}var zp=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()})}},Dp=Ee.unstable_scheduleCallback,Lp=Ee.unstable_NormalPriority,Ne={$$typeof:Lt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cu(){return{controller:new zp,data:new Map,refCount:0}}function Wl(e){e.refCount--,e.refCount===0&&Dp(Lp,function(){e.controller.abort()})}var gl=null,ao=0,An=0,bn=null;function Up(e,t){if(gl===null){var a=gl=[];ao=0,An=zu(),bn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return ao++,t.then(Mc,Mc),t}function Mc(){if(--ao===0&&gl!==null){bn!==null&&(bn.status="fulfilled");var e=gl;gl=null,An=0,bn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _p(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 zc=B.S;B.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Up(e,t),zc!==null&&zc(e,t)};var Da=At(null);function fu(){var e=Da.current;return e!==null?e:ie.pooledCache}function Us(e,t){t===null?de(Da,Da.current):de(Da,t.pool)}function uh(){var e=fu();return e===null?null:{parent:Ne._currentValue,pool:e}}var Il=Error(T(460)),ch=Error(T(474)),Ur=Error(T(542)),no={then:function(){}};function Dc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function vs(){}function fh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(vs,vs),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uc(e),e;default:if(typeof t.status=="string")t.then(vs,vs);else{if(e=ie,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,Uc(e),e}throw pl=t,Il}}var pl=null;function Lc(){if(pl===null)throw Error(T(459));var e=pl;return pl=null,e}function Uc(e){if(e===Il||e===Ur)throw Error(T(483))}var aa=!1;function du(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lo(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 da(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ha(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ne&2){var l=n.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),n.pending=t,t=Ws(e),sh(e,null,a),t}return Lr(e,n,t,a),Ws(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,zd(e,a)}}function fi(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 so=!1;function xl(){if(so){var e=bn;if(e!==null)throw e}}function vl(e,t,a,n){so=!1;var l=e.updateQueue;aa=!1;var s=l.firstBaseUpdate,r=l.lastBaseUpdate,i=l.shared.pending;if(i!==null){l.shared.pending=null;var u=i,c=u.next;u.next=null,r===null?s=c:r.next=c,r=u;var f=e.alternate;f!==null&&(f=f.updateQueue,i=f.lastBaseUpdate,i!==r&&(i===null?f.firstBaseUpdate=c:i.next=c,f.lastBaseUpdate=u))}if(s!==null){var m=l.baseState;r=0,f=c=u=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&&(so=!0),f!==null&&(f=f.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var S=e,b=i;d=t;var w=a;switch(b.tag){case 1:if(S=b.payload,typeof S=="function"){m=S.call(w,m,d);break e}m=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=b.payload,d=typeof S=="function"?S.call(w,m,d):S,d==null)break e;m=ue({},m,d);break e;case 2:aa=!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,u=m):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&&(u=m),l.baseState=u,l.firstBaseUpdate=c,l.lastBaseUpdate=f,s===null&&(l.shared.lanes=0),wa|=r,e.lanes=r,e.memoizedState=m}}function dh(e,t){if(typeof e!="function")throw Error(T(191,e));e.call(t)}function hh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)dh(a[e],t)}var kn=At(null),ar=At(0);function _c(e,t){e=Qt,de(ar,e),de(kn,t),Qt=e|t.baseLanes}function ro(){de(ar,Qt),de(kn,kn.current)}function hu(){Qt=ar.current,Re(kn),Re(ar)}var ba=0,$=null,se=null,Se=null,nr=!1,Sn=!1,Ga=!1,lr=0,Ml=0,wn=null,Hp=0;function ve(){throw Error(T(321))}function mu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!at(e[a],t[a]))return!1;return!0}function gu(e,t,a,n,l,s){return ba=s,$=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?$h:Kh,Ga=!1,s=a(n,l),Ga=!1,Sn&&(s=gh(t,a,n,l)),mh(e),s}function mh(e){B.H=sr;var t=se!==null&&se.next!==null;if(ba=0,Se=se=$=null,nr=!1,Ml=0,wn=null,t)throw Error(T(300));e===null||ke||(e=e.dependencies,e!==null&&tr(e)&&(ke=!0))}function gh(e,t,a,n){$=e;var l=0;do{if(Sn&&(wn=null),Ml=0,Sn=!1,25<=l)throw Error(T(301));if(l+=1,Se=se=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}B.H=Kp,s=t(a,n)}while(Sn);return s}function Bp(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?es(t):t,e=e.useState()[0],(se!==null?se.memoizedState:null)!==e&&($.flags|=1024),t}function pu(){var e=lr!==0;return lr=0,e}function yu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function xu(e){if(nr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}nr=!1}ba=0,Se=se=$=null,Sn=!1,Ml=lr=0,wn=null}function Ye(){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(se===null){var e=$.alternate;e=e!==null?e.memoizedState:null}else e=se.next;var t=Se===null?$.memoizedState:Se.next;if(t!==null)Se=t,se=e;else{if(e===null)throw $.alternate===null?Error(T(467)):Error(T(310));se=e,e={memoizedState:se.memoizedState,baseState:se.baseState,baseQueue:se.baseQueue,queue:se.queue,next:null},Se===null?$.memoizedState=Se=e:Se=Se.next=e}return Se}function vu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function es(e){var t=Ml;return Ml+=1,wn===null&&(wn=[]),e=fh(wn,e,t),t=$,(Se===null?t.memoizedState:Se.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?$h:Kh),e}function _r(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return es(e);if(e.$$typeof===Lt)return _e(e)}throw Error(T(438,String(e)))}function bu(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=vu(),$.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]=N0;return t.index++,a}function $t(e,t){return typeof t=="function"?t(e):t}function _s(e){var t=we();return Su(t,se,e)}function Su(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,u=null,c=t,f=!1;do{var m=c.lane&-536870913;if(m!==c.lane?(P&m)===m:(ba&m)===m){var d=c.revertLane;if(d===0)u!==null&&(u=u.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),m===An&&(f=!0);else if((ba&d)===d){c=c.next,d===An&&(f=!0);continue}else m={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},u===null?(i=u=m,r=s):u=u.next=m,$.lanes|=d,wa|=d;m=c.action,Ga&&a(s,m),s=c.hasEagerState?c.eagerState:a(s,m)}else d={lane:m,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},u===null?(i=u=d,r=s):u=u.next=d,$.lanes|=m,wa|=m;c=c.next}while(c!==null&&c!==t);if(u===null?r=s:u.next=i,!at(s,e.memoizedState)&&(ke=!0,f&&(a=bn,a!==null)))throw a;e.memoizedState=s,e.baseState=r,e.baseQueue=u,n.lastRenderedState=s}return l===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function di(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);at(s,t.memoizedState)||(ke=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),a.lastRenderedState=s}return[s,n]}function ph(e,t,a){var n=$,l=we(),s=I;if(s){if(a===void 0)throw Error(T(407));a=a()}else a=t();var r=!at((se||l).memoizedState,a);r&&(l.memoizedState=a,ke=!0),l=l.queue;var i=vh.bind(null,n,l,e);if(ts(2048,8,i,[e]),l.getSnapshot!==t||r||Se!==null&&Se.memoizedState.tag&1){if(n.flags|=2048,Rn(9,Hr(),xh.bind(null,n,l,a,t),null),ie===null)throw Error(T(349));s||ba&124||yh(n,t,a)}return a}function yh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=$.updateQueue,t===null?(t=vu(),$.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function xh(e,t,a,n){t.value=a,t.getSnapshot=n,bh(t)&&Sh(e)}function vh(e,t,a){return a(function(){bh(t)&&Sh(e)})}function bh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!at(e,a)}catch{return!0}}function Sh(e){var t=Bn(e,2);t!==null&&tt(t,e,2)}function io(e){var t=Ye();if(typeof e=="function"){var a=e;if(e=a(),Ga){ia(!0);try{a()}finally{ia(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$t,lastRenderedState:e},t}function wh(e,t,a,n){return e.baseState=a,Su(e,se,typeof n=="function"?n:$t)}function Gp(e,t,a,n,l){if(Br(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)}};B.T!==null?a(!0):s.isTransition=!1,n(s),a=t.pending,a===null?(s.next=t.pending=s,Nh(t,s)):(s.next=a.next,t.pending=a.next=s)}}function Nh(e,t){var a=t.action,n=t.payload,l=e.state;if(t.isTransition){var s=B.T,r={};B.T=r;try{var i=a(l,n),u=B.S;u!==null&&u(r,i),Hc(e,t,i)}catch(c){oo(e,t,c)}finally{B.T=s}}else try{s=a(l,n),Hc(e,t,s)}catch(c){oo(e,t,c)}}function Hc(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Bc(e,t,n)},function(n){return oo(e,t,n)}):Bc(e,t,a)}function Bc(e,t,a){t.status="fulfilled",t.value=a,jh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Nh(e,a)))}function oo(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,jh(t),t=t.next;while(t!==n)}e.action=null}function jh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Eh(e,t){return t}function Gc(e,t){if(I){var a=ie.formState;if(a!==null){e:{var n=$;if(I){if(ye){t:{for(var l=ye,s=wt;l.nodeType!==8;){if(!s){l=null;break t}if(l=pt(l.nextSibling),l===null){l=null;break t}}s=l.data,l=s==="F!"||s==="F"?l:null}if(l){ye=pt(l.nextSibling),n=l.data==="F!";break e}}Ha(n)}n=!1}n&&(t=a[0])}}return a=Ye(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eh,lastRenderedState:t},a.queue=n,a=Vh.bind(null,$,n),n.dispatch=a,n=io(!1),s=Eu.bind(null,$,!1,n.queue),n=Ye(),l={state:t,dispatch:null,action:e,pending:null},n.queue=l,a=Gp.bind(null,$,l,s,a),l.dispatch=a,n.memoizedState=e,[t,a,!1]}function Vc(e){var t=we();return Ch(t,se,e)}function Ch(e,t,a){if(t=Su(e,t,Eh)[0],e=_s($t)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=es(t)}catch(r){throw r===Il?Ur:r}else n=t;t=we();var l=t.queue,s=l.dispatch;return a!==t.memoizedState&&($.flags|=2048,Rn(9,Hr(),Vp.bind(null,l,a),null)),[n,s,e]}function Vp(e,t){e.action=t}function qc(e){var t=we(),a=se;if(a!==null)return Ch(t,a,e);we(),t=t.memoizedState,a=we();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Rn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=$.updateQueue,t===null&&(t=vu(),$.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 Hr(){return{destroy:void 0,resource:void 0}}function Th(){return we().memoizedState}function Hs(e,t,a,n){var l=Ye();n=n===void 0?null:n,$.flags|=e,l.memoizedState=Rn(1|t,Hr(),a,n)}function ts(e,t,a,n){var l=we();n=n===void 0?null:n;var s=l.memoizedState.inst;se!==null&&n!==null&&mu(n,se.memoizedState.deps)?l.memoizedState=Rn(t,s,a,n):($.flags|=e,l.memoizedState=Rn(1|t,s,a,n))}function Yc(e,t){Hs(8390656,8,e,t)}function Ah(e,t){ts(2048,8,e,t)}function kh(e,t){return ts(4,2,e,t)}function Rh(e,t){return ts(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 Mh(e,t,a){a=a!=null?a.concat([e]):null,ts(4,4,Oh.bind(null,t,e),a)}function wu(){}function zh(e,t){var a=we();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&mu(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Dh(e,t){var a=we();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&mu(t,n[1]))return n[0];if(n=e(),Ga){ia(!0);try{e()}finally{ia(!1)}}return a.memoizedState=[n,t],n}function Nu(e,t,a){return a===void 0||ba&1073741824?e.memoizedState=t:(e.memoizedState=a,e=jm(),$.lanes|=e,wa|=e,a)}function Lh(e,t,a,n){return at(a,t)?a:kn.current!==null?(e=Nu(e,a,n),at(e,t)||(ke=!0),e):ba&42?(e=jm(),$.lanes|=e,wa|=e,t):(ke=!0,e.memoizedState=a)}function Uh(e,t,a,n,l){var s=ee.p;ee.p=s!==0&&8>s?s:8;var r=B.T,i={};B.T=i,Eu(e,!1,t,a);try{var u=l(),c=B.S;if(c!==null&&c(i,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=_p(u,n);bl(e,t,f,et(e))}else bl(e,t,n,et(e))}catch(m){bl(e,t,{then:function(){},status:"rejected",reason:m},et())}finally{ee.p=s,B.T=r}}function qp(){}function uo(e,t,a,n){if(e.tag!==5)throw Error(T(476));var l=_h(e).queue;Uh(e,l,t,Ra,a===null?qp:function(){return Hh(e),a(n)})}function _h(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:$t,lastRenderedState:Ra},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$t,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hh(e){var t=_h(e).next.queue;bl(e,t,{},et())}function ju(){return _e(_l)}function Bh(){return we().memoizedState}function Gh(){return we().memoizedState}function Yp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=et();e=da(a);var n=ha(t,e,a);n!==null&&(tt(n,t,a),yl(n,t,a)),t={cache:cu()},e.payload=t;return}t=t.return}}function $p(e,t,a){var n=et();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Br(e)?qh(t,a):(a=ru(e,t,a,n),a!==null&&(tt(a,e,n),Yh(a,t,n)))}function Vh(e,t,a){var n=et();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(Br(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,at(i,r))return Lr(e,t,l,0),ie===null&&Dr(),!1}catch{}finally{}if(a=ru(e,t,l,n),a!==null)return tt(a,e,n),Yh(a,t,n),!0}return!1}function Eu(e,t,a,n){if(n={lane:2,revertLane:zu(),action:n,hasEagerState:!1,eagerState:null,next:null},Br(e)){if(t)throw Error(T(479))}else t=ru(e,a,n,2),t!==null&&tt(t,e,2)}function Br(e){var t=e.alternate;return e===$||t!==null&&t===$}function qh(e,t){Sn=nr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Yh(e,t,a){if(a&4194048){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,zd(e,a)}}var sr={readContext:_e,use:_r,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useLayoutEffect:ve,useInsertionEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useSyncExternalStore:ve,useId:ve,useHostTransitionStatus:ve,useFormState:ve,useActionState:ve,useOptimistic:ve,useMemoCache:ve,useCacheRefresh:ve},$h={readContext:_e,use:_r,useCallback:function(e,t){return Ye().memoizedState=[e,t===void 0?null:t],e},useContext:_e,useEffect:Yc,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Hs(4194308,4,Oh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Hs(4194308,4,e,t)},useInsertionEffect:function(e,t){Hs(4,2,e,t)},useMemo:function(e,t){var a=Ye();t=t===void 0?null:t;var n=e();if(Ga){ia(!0);try{e()}finally{ia(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=Ye();if(a!==void 0){var l=a(t);if(Ga){ia(!0);try{a(t)}finally{ia(!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=$p.bind(null,$,e),[n.memoizedState,e]},useRef:function(e){var t=Ye();return e={current:e},t.memoizedState=e},useState:function(e){e=io(e);var t=e.queue,a=Vh.bind(null,$,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:wu,useDeferredValue:function(e,t){var a=Ye();return Nu(a,e,t)},useTransition:function(){var e=io(!1);return e=Uh.bind(null,$,e.queue,!0,!1),Ye().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=$,l=Ye();if(I){if(a===void 0)throw Error(T(407));a=a()}else{if(a=t(),ie===null)throw Error(T(349));P&124||yh(n,t,a)}l.memoizedState=a;var s={value:a,getSnapshot:t};return l.queue=s,Yc(vh.bind(null,n,s,e),[e]),n.flags|=2048,Rn(9,Hr(),xh.bind(null,n,s,a,t),null),a},useId:function(){var e=Ye(),t=ie.identifierPrefix;if(I){var a=_t,n=Ut;a=(n&~(1<<32-Ie(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=lr++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=Hp++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:ju,useFormState:Gc,useActionState:Gc,useOptimistic:function(e){var t=Ye();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Eu.bind(null,$,!0,a),a.dispatch=t,[e,t]},useMemoCache:bu,useCacheRefresh:function(){return Ye().memoizedState=Yp.bind(null,$)}},Kh={readContext:_e,use:_r,useCallback:zh,useContext:_e,useEffect:Ah,useImperativeHandle:Mh,useInsertionEffect:kh,useLayoutEffect:Rh,useMemo:Dh,useReducer:_s,useRef:Th,useState:function(){return _s($t)},useDebugValue:wu,useDeferredValue:function(e,t){var a=we();return Lh(a,se.memoizedState,e,t)},useTransition:function(){var e=_s($t)[0],t=we().memoizedState;return[typeof e=="boolean"?e:es(e),t]},useSyncExternalStore:ph,useId:Bh,useHostTransitionStatus:ju,useFormState:Vc,useActionState:Vc,useOptimistic:function(e,t){var a=we();return wh(a,se,e,t)},useMemoCache:bu,useCacheRefresh:Gh},Kp={readContext:_e,use:_r,useCallback:zh,useContext:_e,useEffect:Ah,useImperativeHandle:Mh,useInsertionEffect:kh,useLayoutEffect:Rh,useMemo:Dh,useReducer:di,useRef:Th,useState:function(){return di($t)},useDebugValue:wu,useDeferredValue:function(e,t){var a=we();return se===null?Nu(a,e,t):Lh(a,se.memoizedState,e,t)},useTransition:function(){var e=di($t)[0],t=we().memoizedState;return[typeof e=="boolean"?e:es(e),t]},useSyncExternalStore:ph,useId:Bh,useHostTransitionStatus:ju,useFormState:qc,useActionState:qc,useOptimistic:function(e,t){var a=we();return se!==null?wh(a,se,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:bu,useCacheRefresh:Gh},Nn=null,zl=0;function bs(e){var t=zl;return zl+=1,Nn===null&&(Nn=[]),fh(Nn,e,t)}function el(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ss(e,t){throw t.$$typeof===S0?Error(T(525)):(e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $c(e){var t=e._init;return t(e._payload)}function Qh(e){function t(p,h){if(e){var g=p.deletions;g===null?(p.deletions=[h],p.flags|=16):g.push(h)}}function a(p,h){if(!e)return null;for(;h!==null;)t(p,h),h=h.sibling;return null}function n(p){for(var h=new Map;p!==null;)p.key!==null?h.set(p.key,p):h.set(p.index,p),p=p.sibling;return h}function l(p,h){return p=Gt(p,h),p.index=0,p.sibling=null,p}function s(p,h,g){return p.index=g,e?(g=p.alternate,g!==null?(g=g.index,g<h?(p.flags|=67108866,h):g):(p.flags|=67108866,h)):(p.flags|=1048576,h)}function r(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function i(p,h,g,v){return h===null||h.tag!==6?(h=ui(g,p.mode,v),h.return=p,h):(h=l(h,g),h.return=p,h)}function u(p,h,g,v){var j=g.type;return j===ln?f(p,h,g.props.children,v,g.key):h!==null&&(h.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ta&&$c(j)===h.type)?(h=l(h,g.props),el(h,g),h.return=p,h):(h=Ls(g.type,g.key,g.props,null,p.mode,v),el(h,g),h.return=p,h)}function c(p,h,g,v){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=ci(g,p.mode,v),h.return=p,h):(h=l(h,g.children||[]),h.return=p,h)}function f(p,h,g,v,j){return h===null||h.tag!==7?(h=Oa(g,p.mode,v,j),h.return=p,h):(h=l(h,g),h.return=p,h)}function m(p,h,g){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=ui(""+h,p.mode,g),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case hs:return g=Ls(h.type,h.key,h.props,null,p.mode,g),el(g,h),g.return=p,g;case il:return h=ci(h,p.mode,g),h.return=p,h;case ta:var v=h._init;return h=v(h._payload),m(p,h,g)}if(ol(h)||Fn(h))return h=Oa(h,p.mode,g,null),h.return=p,h;if(typeof h.then=="function")return m(p,bs(h),g);if(h.$$typeof===Lt)return m(p,xs(p,h),g);Ss(p,h)}return null}function d(p,h,g,v){var j=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return j!==null?null:i(p,h,""+g,v);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case hs:return g.key===j?u(p,h,g,v):null;case il:return g.key===j?c(p,h,g,v):null;case ta:return j=g._init,g=j(g._payload),d(p,h,g,v)}if(ol(g)||Fn(g))return j!==null?null:f(p,h,g,v,null);if(typeof g.then=="function")return d(p,h,bs(g),v);if(g.$$typeof===Lt)return d(p,h,xs(p,g),v);Ss(p,g)}return null}function y(p,h,g,v,j){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return p=p.get(g)||null,i(h,p,""+v,j);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case hs:return p=p.get(v.key===null?g:v.key)||null,u(h,p,v,j);case il:return p=p.get(v.key===null?g:v.key)||null,c(h,p,v,j);case ta:var C=v._init;return v=C(v._payload),y(p,h,g,v,j)}if(ol(v)||Fn(v))return p=p.get(g)||null,f(h,p,v,j,null);if(typeof v.then=="function")return y(p,h,g,bs(v),j);if(v.$$typeof===Lt)return y(p,h,g,xs(h,v),j);Ss(h,v)}return null}function S(p,h,g,v){for(var j=null,C=null,N=h,E=h=0,A=null;N!==null&&E<g.length;E++){N.index>E?(A=N,N=null):A=N.sibling;var R=d(p,N,g[E],v);if(R===null){N===null&&(N=A);break}e&&N&&R.alternate===null&&t(p,N),h=s(R,h,E),C===null?j=R:C.sibling=R,C=R,N=A}if(E===g.length)return a(p,N),I&&Aa(p,E),j;if(N===null){for(;E<g.length;E++)N=m(p,g[E],v),N!==null&&(h=s(N,h,E),C===null?j=N:C.sibling=N,C=N);return I&&Aa(p,E),j}for(N=n(N);E<g.length;E++)A=y(N,p,E,g[E],v),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?E:A.key),h=s(A,h,E),C===null?j=A:C.sibling=A,C=A);return e&&N.forEach(function(_){return t(p,_)}),I&&Aa(p,E),j}function b(p,h,g,v){if(g==null)throw Error(T(151));for(var j=null,C=null,N=h,E=h=0,A=null,R=g.next();N!==null&&!R.done;E++,R=g.next()){N.index>E?(A=N,N=null):A=N.sibling;var _=d(p,N,R.value,v);if(_===null){N===null&&(N=A);break}e&&N&&_.alternate===null&&t(p,N),h=s(_,h,E),C===null?j=_:C.sibling=_,C=_,N=A}if(R.done)return a(p,N),I&&Aa(p,E),j;if(N===null){for(;!R.done;E++,R=g.next())R=m(p,R.value,v),R!==null&&(h=s(R,h,E),C===null?j=R:C.sibling=R,C=R);return I&&Aa(p,E),j}for(N=n(N);!R.done;E++,R=g.next())R=y(N,p,E,R.value,v),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?E:R.key),h=s(R,h,E),C===null?j=R:C.sibling=R,C=R);return e&&N.forEach(function(te){return t(p,te)}),I&&Aa(p,E),j}function w(p,h,g,v){if(typeof g=="object"&&g!==null&&g.type===ln&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case hs:e:{for(var j=g.key;h!==null;){if(h.key===j){if(j=g.type,j===ln){if(h.tag===7){a(p,h.sibling),v=l(h,g.props.children),v.return=p,p=v;break e}}else if(h.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ta&&$c(j)===h.type){a(p,h.sibling),v=l(h,g.props),el(v,g),v.return=p,p=v;break e}a(p,h);break}else t(p,h);h=h.sibling}g.type===ln?(v=Oa(g.props.children,p.mode,v,g.key),v.return=p,p=v):(v=Ls(g.type,g.key,g.props,null,p.mode,v),el(v,g),v.return=p,p=v)}return r(p);case il:e:{for(j=g.key;h!==null;){if(h.key===j)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){a(p,h.sibling),v=l(h,g.children||[]),v.return=p,p=v;break e}else{a(p,h);break}else t(p,h);h=h.sibling}v=ci(g,p.mode,v),v.return=p,p=v}return r(p);case ta:return j=g._init,g=j(g._payload),w(p,h,g,v)}if(ol(g))return S(p,h,g,v);if(Fn(g)){if(j=Fn(g),typeof j!="function")throw Error(T(150));return g=j.call(g),b(p,h,g,v)}if(typeof g.then=="function")return w(p,h,bs(g),v);if(g.$$typeof===Lt)return w(p,h,xs(p,g),v);Ss(p,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,h!==null&&h.tag===6?(a(p,h.sibling),v=l(h,g),v.return=p,p=v):(a(p,h),v=ui(g,p.mode,v),v.return=p,p=v),r(p)):a(p,h)}return function(p,h,g,v){try{zl=0;var j=w(p,h,g,v);return Nn=null,j}catch(N){if(N===Il||N===Ur)throw N;var C=Pe(29,N,null,p.mode);return C.lanes=v,C.return=p,C}finally{}}}var On=Qh(!0),Xh=Qh(!1),ft=At(null),Tt=null;function la(e){var t=e.alternate;de(je,je.current&1),de(ft,e),Tt===null&&(t===null||kn.current!==null||t.memoizedState!==null)&&(Tt=e)}function Zh(e){if(e.tag===22){if(de(je,je.current),de(ft,e),Tt===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Tt=e)}}else sa()}function sa(){de(je,je.current),de(ft,ft.current)}function Bt(e){Re(ft),Tt===e&&(Tt=null),Re(je)}var je=At(0);function rr(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==="$?"||To(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 hi(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:ue({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var co={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=et(),l=da(n);l.payload=t,a!=null&&(l.callback=a),t=ha(e,l,n),t!==null&&(tt(t,e,n),yl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=et(),l=da(n);l.tag=1,l.payload=t,a!=null&&(l.callback=a),t=ha(e,l,n),t!==null&&(tt(t,e,n),yl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=et(),n=da(a);n.tag=2,t!=null&&(n.callback=t),t=ha(e,n,a),t!==null&&(tt(t,e,a),yl(t,e,a))}};function Kc(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?!Rl(a,n)||!Rl(l,s):!0}function Qc(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&&co.enqueueReplaceState(t,t.state,null)}function Va(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=ue({},a));for(var l in e)a[l]===void 0&&(a[l]=e[l])}return a}var ir=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 Jh(e){ir(e)}function Fh(e){console.error(e)}function Ph(e){ir(e)}function or(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Xc(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 fo(e,t,a){return a=da(a),a.tag=3,a.payload={element:null},a.callback=function(){or(e,t)},a}function Wh(e){return e=da(e),e.tag=3,e}function Ih(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(){Xc(t,a,n)}}var r=a.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Xc(t,a,n),typeof l!="function"&&(ma===null?ma=new Set([this]):ma.add(this));var i=n.stack;this.componentDidCatch(n.value,{componentStack:i!==null?i:""})})}function Qp(e,t,a,n,l){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Pl(t,a,l,!0),a=ft.current,a!==null){switch(a.tag){case 13:return Tt===null?bo():a.alternate===null&&xe===0&&(xe=3),a.flags&=-257,a.flags|=65536,a.lanes=l,n===no?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),ji(e,n,l)),!1;case 22:return a.flags|=65536,n===no?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)),ji(e,n,l)),!1}throw Error(T(435,a.tag))}return ji(e,n,l),bo(),!1}if(I)return t=ft.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=l,n!==Wi&&(e=Error(T(422),{cause:n}),Ol(ut(e,a)))):(n!==Wi&&(t=Error(T(423),{cause:n}),Ol(ut(t,a))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,n=ut(n,a),l=fo(e.stateNode,n,l),fi(e,l),xe!==4&&(xe=2)),!1;var s=Error(T(520),{cause:n});if(s=ut(s,a),Nl===null?Nl=[s]:Nl.push(s),xe!==4&&(xe=2),t===null)return!0;n=ut(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=l&-l,a.lanes|=e,e=fo(a.stateNode,n,e),fi(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"&&(ma===null||!ma.has(s))))return a.flags|=65536,l&=-l,a.lanes|=l,l=Wh(l),Ih(l,e,a,n),fi(a,l),!1}a=a.return}while(a!==null);return!1}var em=Error(T(461)),ke=!1;function ze(e,t,a,n){t.child=e===null?Xh(t,null,a,n):On(t,e.child,a,n)}function Zc(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 Ba(t),n=gu(e,t,a,r,s,l),i=pu(),e!==null&&!ke?(yu(e,t,l),Kt(e,t,l)):(I&&i&&ou(t),t.flags|=1,ze(e,t,n,l),t.child)}function Jc(e,t,a,n,l){if(e===null){var s=a.type;return typeof s=="function"&&!iu(s)&&s.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=s,tm(e,t,s,n,l)):(e=Ls(a.type,null,n,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Cu(e,l)){var r=s.memoizedProps;if(a=a.compare,a=a!==null?a:Rl,a(r,n)&&e.ref===t.ref)return Kt(e,t,l)}return t.flags|=1,e=Gt(s,n),e.ref=t.ref,e.return=t,t.child=e}function tm(e,t,a,n,l){if(e!==null){var s=e.memoizedProps;if(Rl(s,n)&&e.ref===t.ref)if(ke=!1,t.pendingProps=n=s,Cu(e,l))e.flags&131072&&(ke=!0);else return t.lanes=e.lanes,Kt(e,t,l)}return ho(e,t,a,n,l)}function am(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 Fc(e,t,n,a)}if(a&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Us(t,s!==null?s.cachePool:null),s!==null?_c(t,s):ro(),Zh(t);else return t.lanes=t.childLanes=536870912,Fc(e,t,s!==null?s.baseLanes|a:a,a)}else s!==null?(Us(t,s.cachePool),_c(t,s),sa(),t.memoizedState=null):(e!==null&&Us(t,null),ro(),sa());return ze(e,t,l,a),t.child}function Fc(e,t,a,n){var l=fu();return l=l===null?null:{parent:Ne._currentValue,pool:l},t.memoizedState={baseLanes:a,cachePool:l},e!==null&&Us(t,null),ro(),Zh(t),e!==null&&Pl(e,t,n,!0),null}function Bs(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 ho(e,t,a,n,l){return Ba(t),a=gu(e,t,a,n,void 0,l),n=pu(),e!==null&&!ke?(yu(e,t,l),Kt(e,t,l)):(I&&n&&ou(t),t.flags|=1,ze(e,t,a,l),t.child)}function Pc(e,t,a,n,l,s){return Ba(t),t.updateQueue=null,a=gh(t,n,a,l),mh(e),n=pu(),e!==null&&!ke?(yu(e,t,s),Kt(e,t,s)):(I&&n&&ou(t),t.flags|=1,ze(e,t,a,s),t.child)}function Wc(e,t,a,n,l){if(Ba(t),t.stateNode===null){var s=hn,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=co,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=n,s.state=t.memoizedState,s.refs={},du(t),r=a.contextType,s.context=typeof r=="object"&&r!==null?_e(r):hn,s.state=t.memoizedState,r=a.getDerivedStateFromProps,typeof r=="function"&&(hi(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&&co.enqueueReplaceState(s,s.state,null),vl(t,n,s,l),xl(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){s=t.stateNode;var i=t.memoizedProps,u=Va(a,i);s.props=u;var c=s.context,f=a.contextType;r=hn,typeof f=="object"&&f!==null&&(r=_e(f));var m=a.getDerivedStateFromProps;f=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function",i=t.pendingProps!==i,f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i||c!==r)&&Qc(t,s,n,r),aa=!1;var d=t.memoizedState;s.state=d,vl(t,n,s,l),xl(),c=t.memoizedState,i||d!==c||aa?(typeof m=="function"&&(hi(t,a,m,n),c=t.memoizedState),(u=aa||Kc(t,a,u,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=u):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,lo(e,t),r=t.memoizedProps,f=Va(a,r),s.props=f,m=t.pendingProps,d=s.context,c=a.contextType,u=hn,typeof c=="object"&&c!==null&&(u=_e(c)),i=a.getDerivedStateFromProps,(c=typeof i=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(r!==m||d!==u)&&Qc(t,s,n,u),aa=!1,d=t.memoizedState,s.state=d,vl(t,n,s,l),xl();var y=t.memoizedState;r!==m||d!==y||aa||e!==null&&e.dependencies!==null&&tr(e.dependencies)?(typeof i=="function"&&(hi(t,a,i,n),y=t.memoizedState),(f=aa||Kc(t,a,f,n,d,y,u)||e!==null&&e.dependencies!==null&&tr(e.dependencies))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,y,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,y,u)),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=u,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,Bs(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=On(t,e.child,null,l),t.child=On(t,null,a,l)):ze(e,t,a,l),t.memoizedState=s.state,e=t.child):e=Kt(e,t,l),e}function Ic(e,t,a,n){return Fl(),t.flags|=256,ze(e,t,a,n),t.child}var mi={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gi(e){return{baseLanes:e,cachePool:uh()}}function pi(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ct),e}function nm(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(I){if(l?la(t):sa(),I){var i=ye,u;if(u=i){e:{for(u=i,i=wt;u.nodeType!==8;){if(!i){i=null;break e}if(u=pt(u.nextSibling),u===null){i=null;break e}}i=u}i!==null?(t.memoizedState={dehydrated:i,treeContext:Ma!==null?{id:Ut,overflow:_t}:null,retryLane:536870912,hydrationErrors:null},u=Pe(18,null,null,0),u.stateNode=i,u.return=t,t.child=u,Be=t,ye=null,u=!0):u=!1}u||Ha(t)}if(i=t.memoizedState,i!==null&&(i=i.dehydrated,i!==null))return To(i)?t.lanes=32:t.lanes=536870912,null;Bt(t)}return i=n.children,n=n.fallback,l?(sa(),l=t.mode,i=ur({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=gi(a),l.childLanes=pi(e,r,a),t.memoizedState=mi,n):(la(t),mo(t,i))}if(u=e.memoizedState,u!==null&&(i=u.dehydrated,i!==null)){if(s)t.flags&256?(la(t),t.flags&=-257,t=yi(e,t,a)):t.memoizedState!==null?(sa(),t.child=e.child,t.flags|=128,t=null):(sa(),l=n.fallback,i=t.mode,n=ur({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,On(t,e.child,null,a),n=t.child,n.memoizedState=gi(a),n.childLanes=pi(e,r,a),t.memoizedState=mi,t=l);else if(la(t),To(i)){if(r=i.nextSibling&&i.nextSibling.dataset,r)var c=r.dgst;r=c,n=Error(T(419)),n.stack="",n.digest=r,Ol({value:n,source:null,stack:null}),t=yi(e,t,a)}else if(ke||Pl(e,t,a,!1),r=(a&e.childLanes)!==0,ke||r){if(r=ie,r!==null&&(n=a&-a,n=n&42?1:Fo(n),n=n&(r.suspendedLanes|a)?0:n,n!==0&&n!==u.retryLane))throw u.retryLane=n,Bn(e,n),tt(r,e,n),em;i.data==="$?"||bo(),t=yi(e,t,a)}else i.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,ye=pt(i.nextSibling),Be=t,I=!0,za=null,wt=!1,e!==null&&(rt[it++]=Ut,rt[it++]=_t,rt[it++]=Ma,Ut=e.id,_t=e.overflow,Ma=t),t=mo(t,n.children),t.flags|=4096);return t}return l?(sa(),l=n.fallback,i=t.mode,u=e.child,c=u.sibling,n=Gt(u,{mode:"hidden",children:n.children}),n.subtreeFlags=u.subtreeFlags&65011712,c!==null?l=Gt(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=gi(a):(u=i.cachePool,u!==null?(c=Ne._currentValue,u=u.parent!==c?{parent:c,pool:c}:u):u=uh(),i={baseLanes:i.baseLanes|a,cachePool:u}),l.memoizedState=i,l.childLanes=pi(e,r,a),t.memoizedState=mi,n):(la(t),a=e.child,e=a.sibling,a=Gt(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 mo(e,t){return t=ur({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ur(e,t){return e=Pe(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function yi(e,t,a){return On(t,e.child,null,a),e=mo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ef(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),eo(e.return,t,a)}function xi(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 lm(e,t,a){var n=t.pendingProps,l=n.revealOrder,s=n.tail;if(ze(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&&ef(e,a,t);else if(e.tag===19)ef(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&&rr(e)===null&&(l=a),a=a.sibling;a=l,a===null?(l=t.child,t.child=null):(l=a.sibling,a.sibling=null),xi(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&&rr(e)===null){t.child=l;break}e=l.sibling,l.sibling=a,a=l,l=e}xi(t,!0,a,null,s);break;case"together":xi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Kt(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),wa|=t.lanes,!(a&t.childLanes))if(e!==null){if(Pl(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=Gt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Gt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Cu(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&tr(e)))}function Xp(e,t,a){switch(t.tag){case 3:Xs(t,t.stateNode.containerInfo),na(t,Ne,e.memoizedState.cache),Fl();break;case 27:case 5:qi(t);break;case 4:Xs(t,t.stateNode.containerInfo);break;case 10:na(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(la(t),t.flags|=128,null):a&t.child.childLanes?nm(e,t,a):(la(t),e=Kt(e,t,a),e!==null?e.sibling:null);la(t);break;case 19:var l=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Pl(e,t,a,!1),n=(a&t.childLanes)!==0),l){if(n)return lm(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,am(e,t,a);case 24:na(t,Ne,e.memoizedState.cache)}return Kt(e,t,a)}function sm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ke=!0;else{if(!Cu(e,a)&&!(t.flags&128))return ke=!1,Xp(e,t,a);ke=!!(e.flags&131072)}else ke=!1,I&&t.flags&1048576&&ih(t,er,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")iu(n)?(e=Va(n,e),t.tag=1,t=Wc(null,t,n,e,a)):(t.tag=0,t=ho(null,t,n,e,a));else{if(n!=null){if(l=n.$$typeof,l===Xo){t.tag=11,t=Zc(null,t,n,e,a);break e}else if(l===Zo){t.tag=14,t=Jc(null,t,n,e,a);break e}}throw t=Gi(n)||n,Error(T(306,t,""))}}return t;case 0:return ho(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,l=Va(n,t.pendingProps),Wc(e,t,n,l,a);case 3:e:{if(Xs(t,t.stateNode.containerInfo),e===null)throw Error(T(387));n=t.pendingProps;var s=t.memoizedState;l=s.element,lo(e,t),vl(t,n,null,a);var r=t.memoizedState;if(n=r.cache,na(t,Ne,n),n!==s.cache&&to(t,[Ne],a,!0),xl(),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=Ic(e,t,n,a);break e}else if(n!==l){l=ut(Error(T(424)),t),Ol(l),t=Ic(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=pt(e.firstChild),Be=t,I=!0,za=null,wt=!0,a=Xh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Fl(),n===l){t=Kt(e,t,a);break e}ze(e,t,n,a)}t=t.child}return t;case 26:return Bs(e,t),e===null?(a=xf(t.type,null,t.pendingProps,null))?t.memoizedState=a:I||(a=t.type,e=t.pendingProps,n=pr(fa.current).createElement(a),n[Ue]=t,n[Qe]=e,Le(n,a,e),Ae(n),t.stateNode=n):t.memoizedState=xf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return qi(t),e===null&&I&&(n=t.stateNode=Km(t.type,t.pendingProps,fa.current),Be=t,wt=!0,l=ye,ja(t.type)?(Ao=l,ye=pt(n.firstChild)):ye=l),ze(e,t,t.pendingProps.children,a),Bs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&I&&((l=n=ye)&&(n=Sy(n,t.type,t.pendingProps,wt),n!==null?(t.stateNode=n,Be=t,ye=pt(n.firstChild),wt=!1,l=!0):l=!1),l||Ha(t)),qi(t),l=t.type,s=t.pendingProps,r=e!==null?e.memoizedProps:null,n=s.children,Eo(l,s)?n=null:r!==null&&Eo(l,r)&&(t.flags|=32),t.memoizedState!==null&&(l=gu(e,t,Bp,null,null,a),_l._currentValue=l),Bs(e,t),ze(e,t,n,a),t.child;case 6:return e===null&&I&&((e=a=ye)&&(a=wy(a,t.pendingProps,wt),a!==null?(t.stateNode=a,Be=t,ye=null,e=!0):e=!1),e||Ha(t)),null;case 13:return nm(e,t,a);case 4:return Xs(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=On(t,null,n,a):ze(e,t,n,a),t.child;case 11:return Zc(e,t,t.type,t.pendingProps,a);case 7:return ze(e,t,t.pendingProps,a),t.child;case 8:return ze(e,t,t.pendingProps.children,a),t.child;case 12:return ze(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,na(t,t.type,n.value),ze(e,t,n.children,a),t.child;case 9:return l=t.type._context,n=t.pendingProps.children,Ba(t),l=_e(l),n=n(l),t.flags|=1,ze(e,t,n,a),t.child;case 14:return Jc(e,t,t.type,t.pendingProps,a);case 15:return tm(e,t,t.type,t.pendingProps,a);case 19:return lm(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=ur(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=Gt(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return am(e,t,a);case 24:return Ba(t),n=_e(Ne),e===null?(l=fu(),l===null&&(l=ie,s=cu(),l.pooledCache=s,s.refCount++,s!==null&&(l.pooledCacheLanes|=a),l=s),t.memoizedState={parent:n,cache:l},du(t),na(t,Ne,l)):(e.lanes&a&&(lo(e,t),vl(t,null,null,a),xl()),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),na(t,Ne,n)):(n=s.cache,na(t,Ne,n),n!==l.cache&&to(t,[Ne],a,!0))),ze(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(T(156,t.tag))}function Mt(e){e.flags|=4}function tf(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t)){if(t=ft.current,t!==null&&((P&4194048)===P?Tt!==null:(P&62914560)!==P&&!(P&536870912)||t!==Tt))throw pl=no,ch;e.flags|=8192}}function ws(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(!I)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 Zp(e,t,a){var n=t.pendingProps;switch(uu(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),Vt(Ne),En(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(In(t)?Mt(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Oc())),ge(t),null;case 26:return a=t.memoizedState,e===null?(Mt(t),a!==null?(ge(t),tf(t,a)):(ge(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Mt(t),ge(t),tf(t,a)):(ge(t),t.flags&=-16777217):(e.memoizedProps!==n&&Mt(t),ge(t),t.flags&=-16777217),null;case 27:Zs(t),a=fa.current;var l=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Mt(t);else{if(!n){if(t.stateNode===null)throw Error(T(166));return ge(t),null}e=Et.current,In(t)?kc(t):(e=Km(l,n,a),t.stateNode=e,Mt(t))}return ge(t),null;case 5:if(Zs(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Mt(t);else{if(!n){if(t.stateNode===null)throw Error(T(166));return ge(t),null}if(e=Et.current,In(t))kc(t);else{switch(l=pr(fa.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[Qe]=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&&Mt(t)}}return ge(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Mt(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(T(166));if(e=fa.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||Ha(t)}else e=pr(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 Fl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ge(t),l=!1}else l=Oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Bt(t),t):(Bt(t),null)}if(Bt(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),ws(t,t.updateQueue),ge(t),null;case 4:return En(),e===null&&Du(t.stateNode.containerInfo),ge(t),null;case 10:return Vt(t.type),ge(t),null;case 19:if(Re(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(xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=rr(e),s!==null){for(t.flags|=128,tl(l,!1),e=s.updateQueue,t.updateQueue=e,ws(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)rh(a,e),a=a.sibling;return de(je,je.current&1|2),t.child}e=e.sibling}l.tail!==null&&Ct()>fr&&(t.flags|=128,n=!0,tl(l,!1),t.lanes=4194304)}else{if(!n)if(e=rr(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ws(t,e),tl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!I)return ge(t),null}else 2*Ct()-l.renderingStartTime>fr&&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=Ct(),t.sibling=null,e=je.current,de(je,n?e&1|2:e&1),t):(ge(t),null);case 22:case 23:return Bt(t),hu(),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&&ws(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&&Re(Da),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Vt(Ne),ge(t),null;case 25:return null;case 30:return null}throw Error(T(156,t.tag))}function Jp(e,t){switch(uu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vt(Ne),En(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Zs(t),null;case 13:if(Bt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));Fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(je),null;case 4:return En(),null;case 10:return Vt(t.type),null;case 22:case 23:return Bt(t),hu(),e!==null&&Re(Da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vt(Ne),null;case 25:return null;default:return null}}function rm(e,t){switch(uu(t),t.tag){case 3:Vt(Ne),En();break;case 26:case 27:case 5:Zs(t);break;case 4:En();break;case 13:Bt(t);break;case 19:Re(je);break;case 10:Vt(t.type);break;case 22:case 23:Bt(t),hu(),e!==null&&Re(Da);break;case 24:Vt(Ne)}}function as(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){re(t,t.return,i)}}function Sa(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 u=a,c=i;try{c()}catch(f){re(l,u,f)}}}n=n.next}while(n!==s)}}catch(f){re(t,t.return,f)}}function im(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{hh(t,a)}catch(n){re(e,e.return,n)}}}function om(e,t,a){a.props=Va(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){re(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){re(e,t,l)}}function Nt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(l){re(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){re(e,t,l)}else a.current=null}function um(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){re(e,e.return,l)}}function vi(e,t,a){try{var n=e.stateNode;py(n,e.type,a,t),n[Qe]=t}catch(l){re(e,e.return,l)}}function cm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ja(e.type)||e.tag===4}function bi(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cm(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&&ja(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 go(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=Yr));else if(n!==4&&(n===27&&ja(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(go(e,t,a),e=e.sibling;e!==null;)go(e,t,a),e=e.sibling}function cr(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&&ja(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(cr(e,t,a),e=e.sibling;e!==null;)cr(e,t,a),e=e.sibling}function fm(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[Qe]=a}catch(s){re(e,e.return,s)}}var Dt=!1,be=!1,Si=!1,af=typeof WeakSet=="function"?WeakSet:Set,Te=null;function Fp(e,t){if(e=e.containerInfo,No=br,e=Wd(e),lu(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,u=-1,c=0,f=0,m=e,d=null;t:for(;;){for(var y;m!==a||l!==0&&m.nodeType!==3||(i=r+l),m!==s||n!==0&&m.nodeType!==3||(u=r+n),m.nodeType===3&&(r+=m.nodeValue.length),(y=m.firstChild)!==null;)d=m,m=y;for(;;){if(m===e)break t;if(d===a&&++c===l&&(i=r),d===s&&++f===n&&(u=r),(y=m.nextSibling)!==null)break;m=d,d=m.parentNode}m=y}a=i===-1||u===-1?null:{start:i,end:u}}else a=null}a=a||{start:0,end:0}}else a=null;for(jo={focusedElem:e,selectionRange:a},br=!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=Va(a.type,l,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(S,s),n.__reactInternalSnapshotBeforeUpdate=e}catch(b){re(a,a.return,b)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Co(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Co(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 dm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Pt(e,a),n&4&&as(5,a);break;case 1:if(Pt(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(r){re(a,a.return,r)}else{var l=Va(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){re(a,a.return,r)}}n&64&&im(a),n&512&&Sl(a,a.return);break;case 3:if(Pt(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{hh(e,t)}catch(r){re(a,a.return,r)}}break;case 27:t===null&&n&4&&fm(a);case 26:case 5:Pt(e,a),t===null&&n&4&&um(a),n&512&&Sl(a,a.return);break;case 12:Pt(e,a);break;case 13:Pt(e,a),n&4&&gm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=sy.bind(null,a),Ny(e,a))));break;case 22:if(n=a.memoizedState!==null||Dt,!n){t=t!==null&&t.memoizedState!==null||be,l=Dt;var s=be;Dt=n,(be=t)&&!s?ea(e,a,(a.subtreeFlags&8772)!==0):Pt(e,a),Dt=l,be=s}break;case 30:break;default:Pt(e,a)}}function hm(e){var t=e.alternate;t!==null&&(e.alternate=null,hm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Wo(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,$e=!1;function zt(e,t,a){for(a=a.child;a!==null;)mm(e,t,a),a=a.sibling}function mm(e,t,a){if(We&&typeof We.onCommitFiberUnmount=="function")try{We.onCommitFiberUnmount(Kl,a)}catch{}switch(a.tag){case 26:be||Nt(a,t),zt(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:be||Nt(a,t);var n=ce,l=$e;ja(a.type)&&(ce=a.stateNode,$e=!1),zt(e,t,a),El(a.stateNode),ce=n,$e=l;break;case 5:be||Nt(a,t);case 6:if(n=ce,l=$e,ce=null,zt(e,t,a),ce=n,$e=l,ce!==null)if($e)try{(ce.nodeType===9?ce.body:ce.nodeName==="HTML"?ce.ownerDocument.body:ce).removeChild(a.stateNode)}catch(s){re(a,t,s)}else try{ce.removeChild(a.stateNode)}catch(s){re(a,t,s)}break;case 18:ce!==null&&($e?(e=ce,gf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Gl(e)):gf(ce,a.stateNode));break;case 4:n=ce,l=$e,ce=a.stateNode.containerInfo,$e=!0,zt(e,t,a),ce=n,$e=l;break;case 0:case 11:case 14:case 15:be||Sa(2,a,t),be||Sa(4,a,t),zt(e,t,a);break;case 1:be||(Nt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&om(a,t,n)),zt(e,t,a);break;case 21:zt(e,t,a);break;case 22:be=(n=be)||a.memoizedState!==null,zt(e,t,a),be=n;break;default:zt(e,t,a)}}function gm(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){re(t,t.return,a)}}function Pp(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new af),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new af),t;default:throw Error(T(435,e.tag))}}function wi(e,t){var a=Pp(e);t.forEach(function(n){var l=ry.bind(null,e,n);a.has(n)||(a.add(n),n.then(l,l))})}function Ze(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(ja(i.type)){ce=i.stateNode,$e=!1;break e}break;case 5:ce=i.stateNode,$e=!1;break e;case 3:case 4:ce=i.stateNode.containerInfo,$e=!0;break e}i=i.return}if(ce===null)throw Error(T(160));mm(s,r,l),ce=null,$e=!1,s=l.alternate,s!==null&&(s.return=null),l.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)pm(t,e),t=t.sibling}var gt=null;function pm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ze(t,e),Je(e),n&4&&(Sa(3,e,e.return),as(3,e),Sa(5,e,e.return));break;case 1:Ze(t,e),Je(e),n&512&&(be||a===null||Nt(a,a.return)),n&64&&Dt&&(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=gt;if(Ze(t,e),Je(e),n&512&&(be||a===null||Nt(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[Zl]||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=bf("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=bf("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 Sf(l,e.type,e.stateNode);else e.stateNode=vf(l,n,e.memoizedProps);else s!==n?(s===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):s.count--,n===null?Sf(l,e.type,e.stateNode):vf(l,n,e.memoizedProps)):n===null&&e.stateNode!==null&&vi(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ze(t,e),Je(e),n&512&&(be||a===null||Nt(a,a.return)),a!==null&&n&4&&vi(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ze(t,e),Je(e),n&512&&(be||a===null||Nt(a,a.return)),e.flags&32){l=e.stateNode;try{Tn(l,"")}catch(y){re(e,e.return,y)}}n&4&&e.stateNode!=null&&(l=e.memoizedProps,vi(e,l,a!==null?a.memoizedProps:l)),n&1024&&(Si=!0);break;case 6:if(Ze(t,e),Je(e),n&4){if(e.stateNode===null)throw Error(T(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(y){re(e,e.return,y)}}break;case 3:if(qs=null,l=gt,gt=yr(t.containerInfo),Ze(t,e),gt=l,Je(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(y){re(e,e.return,y)}Si&&(Si=!1,ym(e));break;case 4:n=gt,gt=yr(e.stateNode.containerInfo),Ze(t,e),Je(e),gt=n;break;case 12:Ze(t,e),Je(e);break;case 13:Ze(t,e),Je(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ou=Ct()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,wi(e,n)));break;case 22:l=e.memoizedState!==null;var u=a!==null&&a.memoizedState!==null,c=Dt,f=be;if(Dt=c||l,be=f||u,Ze(t,e),be=f,Dt=c,Je(e),n&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(a===null||u||Dt||be||ka(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){u=a=t;try{if(s=u.stateNode,l)r=s.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{i=u.stateNode;var m=u.memoizedProps.style,d=m!=null&&m.hasOwnProperty("display")?m.display:null;i.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(y){re(u,u.return,y)}}}else if(t.tag===6){if(a===null){u=t;try{u.stateNode.nodeValue=l?"":u.memoizedProps}catch(y){re(u,u.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,wi(e,a))));break;case 19:Ze(t,e),Je(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,wi(e,n)));break;case 30:break;case 21:break;default:Ze(t,e),Je(e)}}function Je(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(cm(n)){a=n;break}n=n.return}if(a==null)throw Error(T(160));switch(a.tag){case 27:var l=a.stateNode,s=bi(e);cr(e,s,l);break;case 5:var r=a.stateNode;a.flags&32&&(Tn(r,""),a.flags&=-33);var i=bi(e);cr(e,i,r);break;case 3:case 4:var u=a.stateNode.containerInfo,c=bi(e);go(e,c,u);break;default:throw Error(T(161))}}catch(f){re(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ym(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ym(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Pt(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dm(e,t.alternate,t),t=t.sibling}function ka(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Sa(4,t,t.return),ka(t);break;case 1:Nt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&om(t,t.return,a),ka(t);break;case 27:El(t.stateNode);case 26:case 5:Nt(t,t.return),ka(t);break;case 22:t.memoizedState===null&&ka(t);break;case 30:ka(t);break;default:ka(t)}e=e.sibling}}function ea(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:ea(l,s,a),as(4,s);break;case 1:if(ea(l,s,a),n=s,l=n.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(c){re(n,n.return,c)}if(n=s,l=n.updateQueue,l!==null){var i=n.stateNode;try{var u=l.shared.hiddenCallbacks;if(u!==null)for(l.shared.hiddenCallbacks=null,l=0;l<u.length;l++)dh(u[l],i)}catch(c){re(n,n.return,c)}}a&&r&64&&im(s),Sl(s,s.return);break;case 27:fm(s);case 26:case 5:ea(l,s,a),a&&n===null&&r&4&&um(s),Sl(s,s.return);break;case 12:ea(l,s,a);break;case 13:ea(l,s,a),a&&r&4&&gm(l,s);break;case 22:s.memoizedState===null&&ea(l,s,a),Sl(s,s.return);break;case 30:break;default:ea(l,s,a)}t=t.sibling}}function Tu(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&&Wl(a))}function Au(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wl(e))}function bt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xm(e,t,a,n),t=t.sibling}function xm(e,t,a,n){var l=t.flags;switch(t.tag){case 0:case 11:case 15:bt(e,t,a,n),l&2048&&as(9,t);break;case 1:bt(e,t,a,n);break;case 3:bt(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&&Wl(e)));break;case 12:if(l&2048){bt(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(u){re(t,t.return,u)}}else bt(e,t,a,n);break;case 13:bt(e,t,a,n);break;case 23:break;case 22:s=t.stateNode,r=t.alternate,t.memoizedState!==null?s._visibility&2?bt(e,t,a,n):wl(e,t):s._visibility&2?bt(e,t,a,n):(s._visibility|=2,an(e,t,a,n,(t.subtreeFlags&10256)!==0)),l&2048&&Tu(r,t);break;case 24:bt(e,t,a,n),l&2048&&Au(t.alternate,t);break;default:bt(e,t,a,n)}}function an(e,t,a,n,l){for(l=l&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var s=e,r=t,i=a,u=n,c=r.flags;switch(r.tag){case 0:case 11:case 15:an(s,r,i,u,l),as(8,r);break;case 23:break;case 22:var f=r.stateNode;r.memoizedState!==null?f._visibility&2?an(s,r,i,u,l):wl(s,r):(f._visibility|=2,an(s,r,i,u,l)),l&&c&2048&&Tu(r.alternate,r);break;case 24:an(s,r,i,u,l),l&&c&2048&&Au(r.alternate,r);break;default:an(s,r,i,u,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&&Tu(n.alternate,n);break;case 24:wl(a,n),l&2048&&Au(n.alternate,n);break;default:wl(a,n)}t=t.sibling}}var cl=8192;function Xa(e){if(e.subtreeFlags&cl)for(e=e.child;e!==null;)vm(e),e=e.sibling}function vm(e){switch(e.tag){case 26:Xa(e),e.flags&cl&&e.memoizedState!==null&&Uy(gt,e.memoizedState,e.memoizedProps);break;case 5:Xa(e);break;case 3:case 4:var t=gt;gt=yr(e.stateNode.containerInfo),Xa(e),gt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=cl,cl=16777216,Xa(e),cl=t):Xa(e));break;default:Xa(e)}}function bm(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,wm(n,e)}bm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Sm(e),e=e.sibling}function Sm(e){switch(e.tag){case 0:case 11:case 15:al(e),e.flags&2048&&Sa(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,Gs(e)):al(e);break;default:al(e)}}function Gs(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,wm(n,e)}bm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sa(8,t,t.return),Gs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Gs(t));break;default:Gs(t)}e=e.sibling}}function wm(e,t){for(;Te!==null;){var a=Te;switch(a.tag){case 0:case 11:case 15:Sa(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:Wl(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(hm(n),n===a){Te=null;break e}if(l!==null){l.return=s,Te=l;break e}Te=s}}}var Wp={getCacheForType:function(e){var t=_e(Ne),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},Ip=typeof WeakMap=="function"?WeakMap:Map,ne=0,ie=null,Q=null,P=0,ae=0,Fe=null,ua=!1,Gn=!1,ku=!1,Qt=0,xe=0,wa=0,La=0,Ru=0,ct=0,Mn=0,Nl=null,Ke=null,po=!1,Ou=0,fr=1/0,dr=null,ma=null,De=0,ga=null,zn=null,jn=0,yo=0,xo=null,Nm=null,jl=0,vo=null;function et(){if(ne&2&&P!==0)return P&-P;if(B.T!==null){var e=An;return e!==0?e:zu()}return Dd()}function jm(){ct===0&&(ct=!(P&536870912)||I?Rd():536870912);var e=ft.current;return e!==null&&(e.flags|=32),ct}function tt(e,t,a){(e===ie&&(ae===2||ae===9)||e.cancelPendingCommit!==null)&&(Dn(e,0),ca(e,P,ct,!1)),Xl(e,a),(!(ne&2)||e!==ie)&&(e===ie&&(!(ne&2)&&(La|=a),xe===4&&ca(e,P,ct,!1)),kt(e))}function Em(e,t,a){if(ne&6)throw Error(T(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||Ql(e,t),l=n?ay(e,t):Ni(e,t,!0),s=n;do{if(l===0){Gn&&!n&&ca(e,t,0,!1);break}else{if(a=e.current.alternate,s&&!ey(a)){l=Ni(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 u=i.current.memoizedState.isDehydrated;if(u&&(Dn(i,r).flags|=256),r=Ni(i,r,!1),r!==2){if(ku&&!u){i.errorRecoveryDisabledLanes|=s,La|=s,l=4;break e}s=Ke,Ke=l,s!==null&&(Ke===null?Ke=s:Ke.push.apply(Ke,s))}l=r}if(s=!1,l!==2)continue}}if(l===1){Dn(e,0),ca(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:ca(n,t,ct,!ua);break e;case 2:Ke=null;break;case 3:case 5:break;default:throw Error(T(329))}if((t&62914560)===t&&(l=Ou+300-Ct(),10<l)){if(ca(n,t,ct,!ua),Rr(n,0,!0)!==0)break e;n.timeoutHandle=$m(nf.bind(null,n,a,Ke,dr,po,t,ct,La,Mn,ua,s,2,-0,0),l);break e}nf(n,a,Ke,dr,po,t,ct,La,Mn,ua,s,0,-0,0)}}break}while(!0);kt(e)}function nf(e,t,a,n,l,s,r,i,u,c,f,m,d,y){if(e.timeoutHandle=-1,m=t.subtreeFlags,(m&8192||(m&16785408)===16785408)&&(Ul={stylesheets:null,count:0,unsuspend:Ly},vm(t),m=_y(),m!==null)){e.cancelPendingCommit=m(sf.bind(null,e,t,s,a,n,l,r,i,u,f,1,d,y)),ca(e,s,r,!c);return}sf(e,t,s,a,n,l,r,i,u)}function ey(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(!at(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 ca(e,t,a,n){t&=~Ru,t&=~La,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var l=t;0<l;){var s=31-Ie(l),r=1<<s;n[s]=-1,l&=~r}a!==0&&Md(e,a,t)}function Gr(){return ne&6?!0:(ns(0),!1)}function Mu(){if(Q!==null){if(ae===0)var e=Q.return;else e=Q,Ht=Ka=null,xu(e),Nn=null,zl=0,e=Q;for(;e!==null;)rm(e.alternate,e),e=e.return;Q=null}}function Dn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,xy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Mu(),ie=e,Q=a=Gt(e.current,null),P=t,ae=0,Fe=null,ua=!1,Gn=Ql(e,t),ku=!1,Mn=ct=Ru=La=wa=xe=0,Ke=Nl=null,po=!1,t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var l=31-Ie(n),s=1<<l;t|=e[l],n&=~s}return Qt=t,Dr(),a}function Cm(e,t){$=null,B.H=sr,t===Il||t===Ur?(t=Lc(),ae=3):t===ch?(t=Lc(),ae=4):ae=t===em?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Fe=t,Q===null&&(xe=1,or(e,ut(t,e.current)))}function Tm(){var e=B.H;return B.H=sr,e===null?sr:e}function Am(){var e=B.A;return B.A=Wp,e}function bo(){xe=4,ua||(P&4194048)!==P&&ft.current!==null||(Gn=!0),!(wa&134217727)&&!(La&134217727)||ie===null||ca(ie,P,ct,!1)}function Ni(e,t,a){var n=ne;ne|=2;var l=Tm(),s=Am();(ie!==e||P!==t)&&(dr=null,Dn(e,t)),t=!1;var r=xe;e:do try{if(ae!==0&&Q!==null){var i=Q,u=Fe;switch(ae){case 8:Mu(),r=6;break e;case 3:case 2:case 9:case 6:ft.current===null&&(t=!0);var c=ae;if(ae=0,Fe=null,pn(e,i,u,c),a&&Gn){r=0;break e}break;default:c=ae,ae=0,Fe=null,pn(e,i,u,c)}}ty(),r=xe;break}catch(f){Cm(e,f)}while(!0);return t&&e.shellSuspendCounter++,Ht=Ka=null,ne=n,B.H=l,B.A=s,Q===null&&(ie=null,P=0,Dr()),r}function ty(){for(;Q!==null;)km(Q)}function ay(e,t){var a=ne;ne|=2;var n=Tm(),l=Am();ie!==e||P!==t?(dr=null,fr=Ct()+500,Dn(e,t)):Gn=Ql(e,t);e:do try{if(ae!==0&&Q!==null){t=Q;var s=Fe;t:switch(ae){case 1:ae=0,Fe=null,pn(e,t,s,1);break;case 2:case 9:if(Dc(s)){ae=0,Fe=null,lf(t);break}t=function(){ae!==2&&ae!==9||ie!==e||(ae=7),kt(e)},s.then(t,t);break e;case 3:ae=7;break e;case 4:ae=5;break e;case 7:Dc(s)?(ae=0,Fe=null,lf(t)):(ae=0,Fe=null,pn(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||Zm(r)){ae=0,Fe=null;var u=i.sibling;if(u!==null)Q=u;else{var c=i.return;c!==null?(Q=c,Vr(c)):Q=null}break t}}ae=0,Fe=null,pn(e,t,s,5);break;case 6:ae=0,Fe=null,pn(e,t,s,6);break;case 8:Mu(),xe=6;break e;default:throw Error(T(462))}}ny();break}catch(f){Cm(e,f)}while(!0);return Ht=Ka=null,B.H=n,B.A=l,ne=a,Q!==null?0:(ie=null,P=0,Dr(),xe)}function ny(){for(;Q!==null&&!E0();)km(Q)}function km(e){var t=sm(e.alternate,e,Qt);e.memoizedProps=e.pendingProps,t===null?Vr(e):Q=t}function lf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Pc(a,t,t.pendingProps,t.type,void 0,P);break;case 11:t=Pc(a,t,t.pendingProps,t.type.render,t.ref,P);break;case 5:xu(t);default:rm(a,t),t=Q=rh(t,Qt),t=sm(a,t,Qt)}e.memoizedProps=e.pendingProps,t===null?Vr(e):Q=t}function pn(e,t,a,n){Ht=Ka=null,xu(t),Nn=null,zl=0;var l=t.return;try{if(Qp(e,l,t,a,P)){xe=1,or(e,ut(a,e.current)),Q=null;return}}catch(s){if(l!==null)throw Q=l,s;xe=1,or(e,ut(a,e.current)),Q=null;return}t.flags&32768?(I||n===1?e=!0:Gn||P&536870912?e=!1:(ua=e=!0,(n===2||n===9||n===3||n===6)&&(n=ft.current,n!==null&&n.tag===13&&(n.flags|=16384))),Rm(t,e)):Vr(t)}function Vr(e){var t=e;do{if(t.flags&32768){Rm(t,ua);return}e=t.return;var a=Zp(t.alternate,t,Qt);if(a!==null){Q=a;return}if(t=t.sibling,t!==null){Q=t;return}Q=t=e}while(t!==null);xe===0&&(xe=5)}function Rm(e,t){do{var a=Jp(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);xe=6,Q=null}function sf(e,t,a,n,l,s,r,i,u){e.cancelPendingCommit=null;do qr();while(De!==0);if(ne&6)throw Error(T(327));if(t!==null){if(t===e.current)throw Error(T(177));if(s=t.lanes|t.childLanes,s|=su,L0(e,a,s,r,i,u),e===ie&&(Q=ie=null,P=0),zn=t,ga=e,jn=a,yo=s,xo=l,Nm=n,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,iy(Js,function(){return Lm(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,t.subtreeFlags&13878||n){n=B.T,B.T=null,l=ee.p,ee.p=2,r=ne,ne|=4;try{Fp(e,t,a)}finally{ne=r,ee.p=l,B.T=n}}De=1,Om(),Mm(),zm()}}function Om(){if(De===1){De=0;var e=ga,t=zn,a=(t.flags&13878)!==0;if(t.subtreeFlags&13878||a){a=B.T,B.T=null;var n=ee.p;ee.p=2;var l=ne;ne|=4;try{pm(t,e);var s=jo,r=Wd(e.containerInfo),i=s.focusedElem,u=s.selectionRange;if(r!==i&&i&&i.ownerDocument&&Pd(i.ownerDocument.documentElement,i)){if(u!==null&&lu(i)){var c=u.start,f=u.end;if(f===void 0&&(f=c),"selectionStart"in i)i.selectionStart=c,i.selectionEnd=Math.min(f,i.value.length);else{var m=i.ownerDocument||document,d=m&&m.defaultView||window;if(d.getSelection){var y=d.getSelection(),S=i.textContent.length,b=Math.min(u.start,S),w=u.end===void 0?b:Math.min(u.end,S);!y.extend&&b>w&&(r=w,w=b,b=r);var p=Cc(i,b),h=Cc(i,w);if(p&&h&&(y.rangeCount!==1||y.anchorNode!==p.node||y.anchorOffset!==p.offset||y.focusNode!==h.node||y.focusOffset!==h.offset)){var g=m.createRange();g.setStart(p.node,p.offset),y.removeAllRanges(),b>w?(y.addRange(g),y.extend(h.node,h.offset)):(g.setEnd(h.node,h.offset),y.addRange(g))}}}}for(m=[],y=i;y=y.parentNode;)y.nodeType===1&&m.push({element:y,left:y.scrollLeft,top:y.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<m.length;i++){var v=m[i];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}br=!!No,jo=No=null}finally{ne=l,ee.p=n,B.T=a}}e.current=t,De=2}}function Mm(){if(De===2){De=0;var e=ga,t=zn,a=(t.flags&8772)!==0;if(t.subtreeFlags&8772||a){a=B.T,B.T=null;var n=ee.p;ee.p=2;var l=ne;ne|=4;try{dm(e,t.alternate,t)}finally{ne=l,ee.p=n,B.T=a}}De=3}}function zm(){if(De===4||De===3){De=0,C0();var e=ga,t=zn,a=jn,n=Nm;t.subtreeFlags&10256||t.flags&10256?De=5:(De=0,zn=ga=null,Dm(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(ma=null),Po(a),t=t.stateNode,We&&typeof We.onCommitFiberRoot=="function")try{We.onCommitFiberRoot(Kl,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=B.T,l=ee.p,ee.p=2,B.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{B.T=t,ee.p=l}}jn&3&&qr(),kt(e),l=e.pendingLanes,a&4194090&&l&42?e===vo?jl++:(jl=0,vo=e):jl=0,ns(0)}}function Dm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wl(t)))}function qr(e){return Om(),Mm(),zm(),Lm()}function Lm(){if(De!==5)return!1;var e=ga,t=yo;yo=0;var a=Po(jn),n=B.T,l=ee.p;try{ee.p=32>a?32:a,B.T=null,a=xo,xo=null;var s=ga,r=jn;if(De=0,zn=ga=null,jn=0,ne&6)throw Error(T(331));var i=ne;if(ne|=4,Sm(s.current),xm(s,s.current,r,a),ne=i,ns(0,!1),We&&typeof We.onPostCommitFiberRoot=="function")try{We.onPostCommitFiberRoot(Kl,s)}catch{}return!0}finally{ee.p=l,B.T=n,Dm(e,t)}}function rf(e,t,a){t=ut(a,t),t=fo(e.stateNode,t,2),e=ha(e,t,2),e!==null&&(Xl(e,2),kt(e))}function re(e,t,a){if(e.tag===3)rf(e,e,a);else for(;t!==null;){if(t.tag===3){rf(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ma===null||!ma.has(n))){e=ut(a,e),a=Wh(2),n=ha(t,a,2),n!==null&&(Ih(a,n,t,e),Xl(n,2),kt(n));break}}t=t.return}}function ji(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Ip;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)||(ku=!0,l.add(a),e=ly.bind(null,e,t,a),t.then(e,e))}function ly(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ie===e&&(P&a)===a&&(xe===4||xe===3&&(P&62914560)===P&&300>Ct()-Ou?!(ne&2)&&Dn(e,0):Ru|=a,Mn===P&&(Mn=0)),kt(e)}function Um(e,t){t===0&&(t=Od()),e=Bn(e,t),e!==null&&(Xl(e,t),kt(e))}function sy(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Um(e,a)}function ry(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),Um(e,a)}function iy(e,t){return Jo(e,t)}var hr=null,nn=null,So=!1,mr=!1,Ei=!1,Ua=0;function kt(e){e!==nn&&e.next===null&&(nn===null?hr=nn=e:nn=nn.next=e),mr=!0,So||(So=!0,uy())}function ns(e,t){if(!Ei&&mr){Ei=!0;do for(var a=!1,n=hr;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-Ie(42|e)+1)-1,s&=l&~(r&~i),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(a=!0,of(n,s))}else s=P,s=Rr(n,n===ie?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),!(s&3)||Ql(n,s)||(a=!0,of(n,s));n=n.next}while(a);Ei=!1}}function oy(){_m()}function _m(){mr=So=!1;var e=0;Ua!==0&&(yy()&&(e=Ua),Ua=0);for(var t=Ct(),a=null,n=hr;n!==null;){var l=n.next,s=Hm(n,t);s===0?(n.next=null,a===null?hr=l:a.next=l,l===null&&(nn=a)):(a=n,(e!==0||s&3)&&(mr=!0)),n=l}ns(e)}function Hm(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,l=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var r=31-Ie(s),i=1<<r,u=l[r];u===-1?(!(i&a)||i&n)&&(l[r]=D0(i,t)):u<=t&&(e.expiredLanes|=i),s&=~i}if(t=ie,a=P,a=Rr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(ae===2||ae===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Pr(n),e.callbackNode=null,e.callbackPriority=0;if(!(a&3)||Ql(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Pr(n),Po(a)){case 2:case 8:a=Ad;break;case 32:a=Js;break;case 268435456:a=kd;break;default:a=Js}return n=Bm.bind(null,e),a=Jo(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Pr(n),e.callbackPriority=2,e.callbackNode=null,2}function Bm(e,t){if(De!==0&&De!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(qr()&&e.callbackNode!==a)return null;var n=P;return n=Rr(e,e===ie?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Em(e,n,t),Hm(e,Ct()),e.callbackNode!=null&&e.callbackNode===a?Bm.bind(null,e):null)}function of(e,t){if(qr())return null;Em(e,t,!0)}function uy(){vy(function(){ne&6?Jo(Td,oy):_m()})}function zu(){return Ua===0&&(Ua=Rd()),Ua}function uf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ms(""+e)}function cf(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 cy(e,t,a,n,l){if(t==="submit"&&a&&a.stateNode===l){var s=uf((l[Qe]||null).action),r=n.submitter;r&&(t=(t=r[Qe]||null)?uf(t.formAction):r.getAttribute("formAction"),t!==null&&(s=t,r=null));var i=new Or("action","action",null,n,l);e.push({event:i,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ua!==0){var u=r?cf(l,r):new FormData(l);uo(a,{pending:!0,data:u,method:l.method,action:s},null,u)}}else typeof s=="function"&&(i.preventDefault(),u=r?cf(l,r):new FormData(l),uo(a,{pending:!0,data:u,method:l.method,action:s},s,u))},currentTarget:l}]})}}for(var Ci=0;Ci<Pi.length;Ci++){var Ti=Pi[Ci],fy=Ti.toLowerCase(),dy=Ti[0].toUpperCase()+Ti.slice(1);xt(fy,"on"+dy)}xt(eh,"onAnimationEnd");xt(th,"onAnimationIteration");xt(ah,"onAnimationStart");xt("dblclick","onDoubleClick");xt("focusin","onFocus");xt("focusout","onBlur");xt(kp,"onTransitionRun");xt(Rp,"onTransitionStart");xt(Op,"onTransitionCancel");xt(nh,"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(" "),hy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function Gm(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],u=i.instance,c=i.currentTarget;if(i=i.listener,u!==s&&l.isPropagationStopped())break e;s=i,l.currentTarget=c;try{s(l)}catch(f){ir(f)}l.currentTarget=null,s=u}else for(r=0;r<n.length;r++){if(i=n[r],u=i.instance,c=i.currentTarget,i=i.listener,u!==s&&l.isPropagationStopped())break e;s=i,l.currentTarget=c;try{s(l)}catch(f){ir(f)}l.currentTarget=null,s=u}}}}function K(e,t){var a=t[$i];a===void 0&&(a=t[$i]=new Set);var n=e+"__bubble";a.has(n)||(Vm(t,e,2,!1),a.add(n))}function Ai(e,t,a){var n=0;t&&(n|=4),Vm(a,e,n,t)}var Ns="_reactListening"+Math.random().toString(36).slice(2);function Du(e){if(!e[Ns]){e[Ns]=!0,Ld.forEach(function(a){a!=="selectionchange"&&(hy.has(a)||Ai(a,!1,e),Ai(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ns]||(t[Ns]=!0,Ai("selectionchange",!1,t))}}function Vm(e,t,a,n){switch(Im(t)){case 2:var l=Gy;break;case 8:l=Vy;break;default:l=Hu}a=l.bind(null,t,a,e),l=void 0,!Zi||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 ki(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 u=r.tag;if((u===3||u===4)&&r.stateNode.containerInfo===l)return;r=r.return}for(;i!==null;){if(r=rn(i),r===null)return;if(u=r.tag,u===5||u===6||u===26||u===27){n=s=r;continue e}i=i.parentNode}}n=n.return}Yd(function(){var c=s,f=eu(a),m=[];e:{var d=lh.get(e);if(d!==void 0){var y=Or,S=e;switch(e){case"keypress":if(Ds(a)===0)break e;case"keydown":case"keyup":y=ip;break;case"focusin":S="focus",y=si;break;case"focusout":S="blur",y=si;break;case"beforeblur":case"afterblur":y=si;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=pc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=J0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=cp;break;case eh:case th:case ah:y=W0;break;case nh:y=dp;break;case"scroll":case"scrollend":y=X0;break;case"wheel":y=mp;break;case"copy":case"cut":case"paste":y=ep;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=xc;break;case"toggle":case"beforetoggle":y=pp}var b=(t&4)!==0,w=!b&&(e==="scroll"||e==="scrollend"),p=b?d!==null?d+"Capture":null:d;b=[];for(var h=c,g;h!==null;){var v=h;if(g=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||g===null||p===null||(v=Al(h,p),v!=null&&b.push(Ll(h,v,g))),w)break;h=h.return}0<b.length&&(d=new y(d,S,null,a,f),m.push({event:d,listeners:b}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",d&&a!==Xi&&(S=a.relatedTarget||a.fromElement)&&(rn(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?rn(S):null,S!==null&&(w=$l(S),b=S.tag,S!==w||b!==5&&b!==27&&b!==6)&&(S=null)):(y=null,S=c),y!==S)){if(b=pc,v="onMouseLeave",p="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(b=xc,v="onPointerLeave",p="onPointerEnter",h="pointer"),w=y==null?d:ul(y),g=S==null?d:ul(S),d=new b(v,h+"leave",y,a,f),d.target=w,d.relatedTarget=g,v=null,rn(f)===c&&(b=new b(p,h+"enter",S,a,f),b.target=g,b.relatedTarget=w,v=b),w=v,y&&S)t:{for(b=y,p=S,h=0,g=b;g;g=Za(g))h++;for(g=0,v=p;v;v=Za(v))g++;for(;0<h-g;)b=Za(b),h--;for(;0<g-h;)p=Za(p),g--;for(;h--;){if(b===p||p!==null&&b===p.alternate)break t;b=Za(b),p=Za(p)}b=null}else b=null;y!==null&&ff(m,d,y,b,!1),S!==null&&w!==null&&ff(m,w,S,b,!0)}}e:{if(d=c?ul(c):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var j=wc;else if(Sc(d))if(Jd)j=Cp;else{j=jp;var C=Np}else y=d.nodeName,!y||y.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&Io(c.elementType)&&(j=wc):j=Ep;if(j&&(j=j(e,c))){Zd(m,j,a,f);break e}C&&C(e,d,c),e==="focusout"&&c&&d.type==="number"&&c.memoizedProps.value!=null&&Qi(d,"number",d.value)}switch(C=c?ul(c):window,e){case"focusin":(Sc(C)||C.contentEditable==="true")&&(cn=C,Ji=c,ml=null);break;case"focusout":ml=Ji=cn=null;break;case"mousedown":Fi=!0;break;case"contextmenu":case"mouseup":case"dragend":Fi=!1,Tc(m,a,f);break;case"selectionchange":if(Ap)break;case"keydown":case"keyup":Tc(m,a,f)}var N;if(nu)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else un?Qd(e,a)&&(E="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(E="onCompositionStart");E&&(Kd&&a.locale!=="ko"&&(un||E!=="onCompositionStart"?E==="onCompositionEnd"&&un&&(N=$d()):(oa=f,tu="value"in oa?oa.value:oa.textContent,un=!0)),C=gr(c,E),0<C.length&&(E=new yc(E,e,null,a,f),m.push({event:E,listeners:C}),N?E.data=N:(N=Xd(a),N!==null&&(E.data=N)))),(N=xp?vp(e,a):bp(e,a))&&(E=gr(c,"onBeforeInput"),0<E.length&&(C=new yc("onBeforeInput","beforeinput",null,a,f),m.push({event:C,listeners:E}),C.data=N)),cy(m,e,c,a,f)}Gm(m,t)})}function Ll(e,t,a){return{instance:e,listener:t,currentTarget:a}}function gr(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 Za(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ff(e,t,a,n,l){for(var s=t._reactName,r=[];a!==null&&a!==n;){var i=a,u=i.alternate,c=i.stateNode;if(i=i.tag,u!==null&&u===n)break;i!==5&&i!==26&&i!==27||c===null||(u=c,l?(c=Al(a,s),c!=null&&r.unshift(Ll(a,c,u))):l||(c=Al(a,s),c!=null&&r.push(Ll(a,c,u)))),a=a.return}r.length!==0&&e.push({event:t,listeners:r})}var my=/\r\n?/g,gy=/\u0000|\uFFFD/g;function df(e){return(typeof e=="string"?e:""+e).replace(my,`
|
|
49
|
-
`).replace(gy,"")}function qm(e,t){return t=df(t),df(e)===t}function Yr(){}function le(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":ps(e,"class",n);break;case"tabIndex":ps(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ps(e,a,n);break;case"style":qd(e,n,s);break;case"data":if(t!=="object"){ps(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=Ms(""+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"&&le(e,t,"name",l.name,l,null),le(e,t,"formEncType",l.formEncType,l,null),le(e,t,"formMethod",l.formMethod,l,null),le(e,t,"formTarget",l.formTarget,l,null)):(le(e,t,"encType",l.encType,l,null),le(e,t,"method",l.method,l,null),le(e,t,"target",l.target,l,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Ms(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Yr);break;case"onScroll":n!=null&&K("scroll",e);break;case"onScrollEnd":n!=null&&K("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=Ms(""+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":K("beforetoggle",e),K("toggle",e),Os(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":Os(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=K0.get(a)||a,Os(e,a,n))}}function wo(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&&K("scroll",e);break;case"onScrollEnd":n!=null&&K("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Yr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ud.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[Qe]||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,""):Os(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":K("error",e),K("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:le(e,t,s,r,a,null)}}l&&le(e,t,"srcSet",a.srcSet,a,null),n&&le(e,t,"src",a.src,a,null);return;case"input":K("invalid",e);var i=s=r=l=null,u=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":u=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:le(e,t,n,f,a,null)}}Bd(e,s,i,u,c,r,l,!1),Fs(e);return;case"select":K("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:le(e,t,l,i,a,null)}t=s,a=r,e.multiple=!!n,t!=null?xn(e,!!n,t,!1):a!=null&&xn(e,!!n,a,!0);return;case"textarea":K("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:le(e,t,r,i,a,null)}Vd(e,n,l,s),Fs(e);return;case"option":for(u in a)if(a.hasOwnProperty(u)&&(n=a[u],n!=null))switch(u){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:le(e,t,u,n,a,null)}return;case"dialog":K("beforetoggle",e),K("toggle",e),K("cancel",e),K("close",e);break;case"iframe":case"object":K("load",e);break;case"video":case"audio":for(n=0;n<Dl.length;n++)K(Dl[n],e);break;case"image":K("error",e),K("load",e);break;case"details":K("toggle",e);break;case"embed":case"source":case"link":K("error",e),K("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:le(e,t,c,n,a,null)}return;default:if(Io(t)){for(f in a)a.hasOwnProperty(f)&&(n=a[f],n!==void 0&&wo(e,t,f,n,a,void 0));return}}for(i in a)a.hasOwnProperty(i)&&(n=a[i],n!=null&&le(e,t,i,n,a,null))}function py(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,u=null,c=null,f=null;for(y in a){var m=a[y];if(a.hasOwnProperty(y)&&m!=null)switch(y){case"checked":break;case"value":break;case"defaultValue":u=m;default:n.hasOwnProperty(y)||le(e,t,y,null,n,m)}}for(var d in n){var y=n[d];if(m=a[d],n.hasOwnProperty(d)&&(y!=null||m!=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!==m&&le(e,t,d,y,n,m)}}Ki(e,r,i,u,c,f,s,l);return;case"select":y=r=i=d=null;for(s in a)if(u=a[s],a.hasOwnProperty(s)&&u!=null)switch(s){case"value":break;case"multiple":y=u;default:n.hasOwnProperty(s)||le(e,t,s,null,n,u)}for(l in n)if(s=n[l],u=a[l],n.hasOwnProperty(l)&&(s!=null||u!=null))switch(l){case"value":d=s;break;case"defaultValue":i=s;break;case"multiple":r=s;default:s!==u&&le(e,t,l,s,n,u)}t=i,a=r,n=y,d!=null?xn(e,!!a,d,!1):!!n!=!!a&&(t!=null?xn(e,!!a,t,!0):xn(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:le(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&&le(e,t,r,l,n,s)}Gd(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:le(e,t,S,null,n,d)}for(u in n)if(d=n[u],y=a[u],n.hasOwnProperty(u)&&d!==y&&(d!=null||y!=null))switch(u){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:le(e,t,u,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 b in a)d=a[b],a.hasOwnProperty(b)&&d!=null&&!n.hasOwnProperty(b)&&le(e,t,b,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:le(e,t,c,d,n,y)}return;default:if(Io(t)){for(var w in a)d=a[w],a.hasOwnProperty(w)&&d!==void 0&&!n.hasOwnProperty(w)&&wo(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||wo(e,t,f,d,n,y);return}}for(var p in a)d=a[p],a.hasOwnProperty(p)&&d!=null&&!n.hasOwnProperty(p)&&le(e,t,p,null,n,d);for(m in n)d=n[m],y=a[m],!n.hasOwnProperty(m)||d===y||d==null&&y==null||le(e,t,m,d,n,y)}var No=null,jo=null;function pr(e){return e.nodeType===9?e:e.ownerDocument}function hf(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 Ym(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 Eo(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 Ri=null;function yy(){var e=window.event;return e&&e.type==="popstate"?e===Ri?!1:(Ri=e,!0):(Ri=null,!1)}var $m=typeof setTimeout=="function"?setTimeout:void 0,xy=typeof clearTimeout=="function"?clearTimeout:void 0,mf=typeof Promise=="function"?Promise:void 0,vy=typeof queueMicrotask=="function"?queueMicrotask:typeof mf<"u"?function(e){return mf.resolve(null).then(e).catch(by)}:$m;function by(e){setTimeout(function(){throw e})}function ja(e){return e==="head"}function gf(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,u=r.nodeName;r[Zl]||u==="SCRIPT"||u==="STYLE"||u==="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 Co(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":Co(a),Wo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Sy(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[Zl])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=pt(e.nextSibling),e===null)break}return null}function wy(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=pt(e.nextSibling),e===null))return null;return e}function To(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Ny(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 pt(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 Ao=null;function pf(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 Km(e,t,a){switch(t=pr(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]);Wo(e)}var dt=new Map,yf=new Set;function yr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zt=ee.d;ee.d={f:jy,r:Ey,D:Cy,C:Ty,L:Ay,m:ky,X:Oy,S:Ry,M:My};function jy(){var e=Zt.f(),t=Gr();return e||t}function Ey(e){var t=Hn(e);t!==null&&t.tag===5&&t.type==="form"?Hh(t):Zt.r(e)}var Vn=typeof document>"u"?null:document;function Qm(e,t,a){var n=Vn;if(n&&typeof t=="string"&&t){var l=ot(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof a=="string"&&(l+='[crossorigin="'+a+'"]'),yf.has(l)||(yf.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 Cy(e){Zt.D(e),Qm("dns-prefetch",e,null)}function Ty(e,t){Zt.C(e,t),Qm("preconnect",e,t)}function Ay(e,t,a){Zt.L(e,t,a);var n=Vn;if(n&&e&&t){var l='link[rel="preload"][as="'+ot(t)+'"]';t==="image"&&a&&a.imageSrcSet?(l+='[imagesrcset="'+ot(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(l+='[imagesizes="'+ot(a.imageSizes)+'"]')):l+='[href="'+ot(e)+'"]';var s=l;switch(t){case"style":s=Ln(e);break;case"script":s=qn(e)}dt.has(s)||(e=ue({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),dt.set(s,e),n.querySelector(l)!==null||t==="style"&&n.querySelector(ls(s))||t==="script"&&n.querySelector(ss(s))||(t=n.createElement("link"),Le(t,"link",e),Ae(t),n.head.appendChild(t)))}}function ky(e,t){Zt.m(e,t);var a=Vn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+ot(n)+'"][href="'+ot(e)+'"]',s=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=qn(e)}if(!dt.has(s)&&(e=ue({rel:"modulepreload",href:e},t),dt.set(s,e),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ss(s)))return}n=a.createElement("link"),Le(n,"link",e),Ae(n),a.head.appendChild(n)}}}function Ry(e,t,a){Zt.S(e,t,a);var n=Vn;if(n&&e){var l=yn(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(ls(s)))i.loading=5;else{e=ue({rel:"stylesheet",href:e,"data-precedence":t},a),(a=dt.get(s))&&Lu(e,a);var u=r=n.createElement("link");Ae(u),Le(u,"link",e),u._p=new Promise(function(c,f){u.onload=c,u.onerror=f}),u.addEventListener("load",function(){i.loading|=1}),u.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Vs(r,t,n)}r={type:"stylesheet",instance:r,count:1,state:i},l.set(s,r)}}}function Oy(e,t){Zt.X(e,t);var a=Vn;if(a&&e){var n=yn(a).hoistableScripts,l=qn(e),s=n.get(l);s||(s=a.querySelector(ss(l)),s||(e=ue({src:e,async:!0},t),(t=dt.get(l))&&Uu(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 My(e,t){Zt.M(e,t);var a=Vn;if(a&&e){var n=yn(a).hoistableScripts,l=qn(e),s=n.get(l);s||(s=a.querySelector(ss(l)),s||(e=ue({src:e,async:!0,type:"module"},t),(t=dt.get(l))&&Uu(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 xf(e,t,a,n){var l=(l=fa.current)?yr(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=yn(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=yn(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(ls(e)))&&!s._p&&(r.instance=s,r.state.loading=5),dt.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},dt.set(e,a),s||zy(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=qn(a),a=yn(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="'+ot(e)+'"'}function ls(e){return'link[rel="stylesheet"]['+e+"]"}function Xm(e){return ue({},e,{"data-precedence":e.precedence,precedence:null})}function zy(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 qn(e){return'[src="'+ot(e)+'"]'}function ss(e){return"script[async]"+e}function vf(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+ot(a.href)+'"]');if(n)return t.instance=n,Ae(n),n;var l=ue({},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),Vs(n,a.precedence,e),t.instance=n;case"stylesheet":l=Ln(a.href);var s=e.querySelector(ls(l));if(s)return t.state.loading|=4,t.instance=s,Ae(s),s;n=Xm(a),(l=dt.get(l))&&Lu(n,l),s=(e.ownerDocument||e).createElement("link"),Ae(s);var r=s;return r._p=new Promise(function(i,u){r.onload=i,r.onerror=u}),Le(s,"link",n),t.state.loading|=4,Vs(s,a.precedence,e),t.instance=s;case"script":return s=qn(a.src),(l=e.querySelector(ss(s)))?(t.instance=l,Ae(l),l):(n=a,(l=dt.get(s))&&(n=ue({},a),Uu(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,Vs(n,a.precedence,e));return t.instance}function Vs(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 Lu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Uu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var qs=null;function bf(e,t,a){if(qs===null){var n=new Map,l=qs=new Map;l.set(a,n)}else l=qs,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[Zl]||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 Sf(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Dy(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 Zm(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Ul=null;function Ly(){}function Uy(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(ls(l));if(s){e=s._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=xr.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=s,Ae(s);return}s=e.ownerDocument||e,a=Xm(a),(l=dt.get(l))&&Lu(a,l),s=s.createElement("link"),Ae(s);var r=s;r._p=new Promise(function(i,u){r.onload=i,r.onerror=u}),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=xr.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function _y(){if(Ul===null)throw Error(T(475));var e=Ul;return e.stylesheets&&e.count===0&&ko(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&ko(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 xr(){if(this.count--,this.count===0){if(this.stylesheets)ko(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var vr=null;function ko(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vr=new Map,t.forEach(Hy,e),vr=null,xr.call(e))}function Hy(e,t){if(!(t.state.loading&4)){var a=vr.get(e);if(a)var n=a.get(null);else{a=new Map,vr.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=xr.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:Lt,Provider:null,Consumer:null,_currentValue:Ra,_currentValue2:Ra,_threadCount:0};function By(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=Wr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wr(0),this.hiddenUpdates=Wr(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 Jm(e,t,a,n,l,s,r,i,u,c,f,m){return e=new By(e,t,a,r,i,u,c,m),t=1,s===!0&&(t|=24),s=Pe(3,null,null,t),e.current=s,s.stateNode=e,t=cu(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:n,isDehydrated:a,cache:t},du(s),e}function Fm(e){return e?(e=hn,e):hn}function Pm(e,t,a,n,l,s){l=Fm(l),n.context===null?n.context=l:n.pendingContext=l,n=da(t),n.payload={element:a},s=s===void 0?null:s,s!==null&&(n.callback=s),a=ha(e,n,t),a!==null&&(tt(a,e,t),yl(a,e,t))}function wf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function _u(e,t){wf(e,t),(e=e.alternate)&&wf(e,t)}function Wm(e){if(e.tag===13){var t=Bn(e,67108864);t!==null&&tt(t,e,67108864),_u(e,67108864)}}var br=!0;function Gy(e,t,a,n){var l=B.T;B.T=null;var s=ee.p;try{ee.p=2,Hu(e,t,a,n)}finally{ee.p=s,B.T=l}}function Vy(e,t,a,n){var l=B.T;B.T=null;var s=ee.p;try{ee.p=8,Hu(e,t,a,n)}finally{ee.p=s,B.T=l}}function Hu(e,t,a,n){if(br){var l=Ro(n);if(l===null)ki(e,t,n,Sr,a),Nf(e,n);else if(Yy(l,e,t,a,n))n.stopPropagation();else if(Nf(e,n),t&4&&-1<qy.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=Ta(s.pendingLanes);if(r!==0){var i=s;for(i.pendingLanes|=2,i.entangledLanes|=2;r;){var u=1<<31-Ie(r);i.entanglements[1]|=u,r&=~u}kt(s),!(ne&6)&&(fr=Ct()+500,ns(0))}}break;case 13:i=Bn(s,2),i!==null&&tt(i,s,2),Gr(),_u(s,2)}if(s=Ro(n),s===null&&ki(e,t,n,Sr,a),s===l)break;l=s}l!==null&&n.stopPropagation()}else ki(e,t,n,null,a)}}function Ro(e){return e=eu(e),Bu(e)}var Sr=null;function Bu(e){if(Sr=null,e=rn(e),e!==null){var t=$l(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=Nd(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 Sr=e,null}function Im(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(T0()){case Td:return 2;case Ad:return 8;case Js:case A0:return 32;case kd:return 268435456;default:return 32}default:return 32}}var Oo=!1,pa=null,ya=null,xa=null,Hl=new Map,Bl=new Map,ra=[],qy="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 Nf(e,t){switch(e){case"focusin":case"focusout":pa=null;break;case"dragenter":case"dragleave":ya=null;break;case"mouseover":case"mouseout":xa=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&&Wm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Yy(e,t,a,n,l){switch(t){case"focusin":return pa=nl(pa,e,t,a,n,l),!0;case"dragenter":return ya=nl(ya,e,t,a,n,l),!0;case"mouseover":return xa=nl(xa,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 eg(e){var t=rn(e.target);if(t!==null){var a=$l(t);if(a!==null){if(t=a.tag,t===13){if(t=Nd(a),t!==null){e.blockedOn=t,U0(e.priority,function(){if(a.tag===13){var n=et();n=Fo(n);var l=Bn(a,n);l!==null&&tt(l,a,n),_u(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 Ys(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Ro(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Xi=n,a.target.dispatchEvent(n),Xi=null}else return t=Hn(a),t!==null&&Wm(t),e.blockedOn=a,!1;t.shift()}return!0}function jf(e,t,a){Ys(e)&&a.delete(t)}function $y(){Oo=!1,pa!==null&&Ys(pa)&&(pa=null),ya!==null&&Ys(ya)&&(ya=null),xa!==null&&Ys(xa)&&(xa=null),Hl.forEach(jf),Bl.forEach(jf)}function js(e,t){e.blockedOn===t&&(e.blockedOn=null,Oo||(Oo=!0,Ee.unstable_scheduleCallback(Ee.unstable_NormalPriority,$y)))}var Es=null;function Ef(e){Es!==e&&(Es=e,Ee.unstable_scheduleCallback(Ee.unstable_NormalPriority,function(){Es===e&&(Es=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(Bu(n||a)===null)continue;break}var s=Hn(a);s!==null&&(e.splice(t,3),t-=3,uo(s,{pending:!0,data:l,method:a.method,action:n},n,l))}}))}function Gl(e){function t(u){return js(u,e)}pa!==null&&js(pa,e),ya!==null&&js(ya,e),xa!==null&&js(xa,e),Hl.forEach(t),Bl.forEach(t);for(var a=0;a<ra.length;a++){var n=ra[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ra.length&&(a=ra[0],a.blockedOn===null);)eg(a),a.blockedOn===null&&ra.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[Qe]||null;if(typeof s=="function")r||Ef(a);else if(r){var i=null;if(s&&s.hasAttribute("formAction")){if(l=s,r=s[Qe]||null)i=r.formAction;else if(Bu(l)!==null)continue}else i=r.action;typeof i=="function"?a[n+1]=i:(a.splice(n,3),n-=3),Ef(a)}}}function Gu(e){this._internalRoot=e}$r.prototype.render=Gu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));var a=t.current,n=et();Pm(a,n,e,t,null,null)};$r.prototype.unmount=Gu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pm(e.current,2,null,e,null,null),Gr(),t[_n]=null}};function $r(e){this._internalRoot=e}$r.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ra.length&&t!==0&&t<ra[a].priority;a++);ra.splice(a,0,e),a===0&&eg(e)}};var Cf=Sd.version;if(Cf!=="19.1.0")throw Error(T(527,Cf,"19.1.0"));ee.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=b0(t),e=e!==null?jd(e):null,e=e===null?null:e.stateNode,e};var Ky={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cs.isDisabled&&Cs.supportsFiber)try{Kl=Cs.inject(Ky),We=Cs}catch{}}Ar.createRoot=function(e,t){if(!wd(e))throw Error(T(299));var a=!1,n="",l=Jh,s=Fh,r=Ph,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=Jm(e,1,!1,null,null,a,n,l,s,r,i,null),e[_n]=t.current,Du(e),new Gu(t)};Ar.hydrateRoot=function(e,t,a){if(!wd(e))throw Error(T(299));var n=!1,l="",s=Jh,r=Fh,i=Ph,u=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&&(u=a.unstable_transitionCallbacks),a.formState!==void 0&&(c=a.formState)),t=Jm(e,1,!0,t,a??null,n,l,s,r,i,u,c),t.context=Fm(null),a=t.current,n=et(),n=Fo(n),l=da(n),l.callback=null,ha(a,l,n),a=n,t.current.lanes=a,Xl(t,a),kt(t),e[_n]=t.current,Du(e),new $r(t)};Ar.version="19.1.0";function tg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tg)}catch(e){console.error(e)}}tg(),gd.exports=Ar;var Qy=gd.exports;const Xy=ld(Qy);var Vu={};Object.defineProperty(Vu,"__esModule",{value:!0});Vu.parse=ex;Vu.serialize=tx;const Zy=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,Jy=/^[\u0021-\u003A\u003C-\u007E]*$/,Fy=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Py=/^[\u0020-\u003A\u003D-\u007E]*$/,Wy=Object.prototype.toString,Iy=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function ex(e,t){const a=new Iy,n=e.length;if(n<2)return a;const l=(t==null?void 0:t.decode)||ax;let s=0;do{const r=e.indexOf("=",s);if(r===-1)break;const i=e.indexOf(";",s),u=i===-1?n:i;if(r>u){s=e.lastIndexOf(";",r-1)+1;continue}const c=Tf(e,s,r),f=Af(e,r,c),m=e.slice(c,f);if(a[m]===void 0){let d=Tf(e,r+1,u),y=Af(e,u,d);const S=l(e.slice(d,y));a[m]=S}s=u+1}while(s<n);return a}function Tf(e,t,a){do{const n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<a);return a}function Af(e,t,a){for(;t>a;){const n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return a}function tx(e,t,a){const n=(a==null?void 0:a.encode)||encodeURIComponent;if(!Zy.test(e))throw new TypeError(`argument name is invalid: ${e}`);const l=n(t);if(!Jy.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(!Fy.test(a.domain))throw new TypeError(`option domain is invalid: ${a.domain}`);s+="; Domain="+a.domain}if(a.path){if(!Py.test(a.path))throw new TypeError(`option path is invalid: ${a.path}`);s+="; Path="+a.path}if(a.expires){if(!nx(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 ax(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function nx(e){return Wy.call(e)==="[object Date]"}var kf="popstate";function lx(e={}){function t(n,l){let{pathname:s,search:r,hash:i}=n.location;return Mo("",{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:Vl(l)}return rx(t,a,null,e)}function he(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sx(){return Math.random().toString(36).substring(2,10)}function Rf(e,t){return{usr:e.state,key:e.key,idx:t}}function Mo(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||sx()}}function Vl({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 rx(e,t,a,n={}){let{window:l=document.defaultView,v5Compat:s=!1}=n,r=l.history,i="POP",u=null,c=f();c==null&&(c=0,r.replaceState({...r.state,idx:c},""));function f(){return(r.state||{idx:null}).idx}function m(){i="POP";let w=f(),p=w==null?null:w-c;c=w,u&&u({action:i,location:b.location,delta:p})}function d(w,p){i="PUSH";let h=Mo(b.location,w,p);c=f()+1;let g=Rf(h,c),v=b.createHref(h);try{r.pushState(g,"",v)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;l.location.assign(v)}s&&u&&u({action:i,location:b.location,delta:1})}function y(w,p){i="REPLACE";let h=Mo(b.location,w,p);c=f();let g=Rf(h,c),v=b.createHref(h);r.replaceState(g,"",v),s&&u&&u({action:i,location:b.location,delta:0})}function S(w){return ix(w)}let b={get action(){return i},get location(){return e(l,r)},listen(w){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(kf,m),u=w,()=>{l.removeEventListener(kf,m),u=null}},createHref(w){return t(l,w)},createURL:S,encodeLocation(w){let p=S(w);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:y,go(w){return r.go(w)}};return b}function ix(e,t=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),he(a,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Vl(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=a+n),new URL(n,a)}function ag(e,t,a="/"){return ox(e,t,a,!1)}function ox(e,t,a,n){let l=typeof t=="string"?Yn(t):t,s=Xt(l.pathname||"/",a);if(s==null)return null;let r=ng(e);ux(r);let i=null;for(let u=0;i==null&&u<r.length;++u){let c=bx(s);i=xx(r[u],c,n)}return i}function ng(e,t=[],a=[],n=""){let l=(s,r,i)=>{let u={relativePath:i===void 0?s.path||"":i,caseSensitive:s.caseSensitive===!0,childrenIndex:r,route:s};u.relativePath.startsWith("/")&&(he(u.relativePath.startsWith(n),`Absolute route path "${u.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(n.length));let c=qt([n,u.relativePath]),f=a.concat(u);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}".`),ng(s.children,t,f,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:px(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 u of lg(s.path))l(s,r,u)}),t}function lg(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=lg(n.join("/")),i=[];return i.push(...r.map(u=>u===""?s:[s,u].join("/"))),l&&i.push(...r),i.map(u=>e.startsWith("/")&&u===""?"/":u)}function ux(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:yx(t.routesMeta.map(n=>n.childrenIndex),a.routesMeta.map(n=>n.childrenIndex)))}var cx=/^:[\w-]+$/,fx=3,dx=2,hx=1,mx=10,gx=-2,Of=e=>e==="*";function px(e,t){let a=e.split("/"),n=a.length;return a.some(Of)&&(n+=gx),t&&(n+=dx),a.filter(l=>!Of(l)).reduce((l,s)=>l+(cx.test(s)?fx:s===""?hx:mx),n)}function yx(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 xx(e,t,a=!1){let{routesMeta:n}=e,l={},s="/",r=[];for(let i=0;i<n.length;++i){let u=n[i],c=i===n.length-1,f=s==="/"?t:t.slice(s.length)||"/",m=wr({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},f),d=u.route;if(!m&&c&&a&&!n[n.length-1].route.index&&(m=wr({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!m)return null;Object.assign(l,m.params),r.push({params:l,pathname:qt([s,m.pathname]),pathnameBase:jx(qt([s,m.pathnameBase])),route:d}),m.pathnameBase!=="/"&&(s=qt([s,m.pathnameBase]))}return r}function wr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,n]=vx(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:m},d)=>{if(f==="*"){let S=i[d]||"";r=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const y=i[d];return m&&!y?c[f]=void 0:c[f]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:r,pattern:e}}function vx(e,t=!1,a=!0){yt(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,u)=>(n.push({paramName:i,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),n]}function bx(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return yt(!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 Xt(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 Sx(e,t="/"){let{pathname:a,search:n="",hash:l=""}=typeof e=="string"?Yn(e):e;return{pathname:a?a.startsWith("/")?a:wx(a,t):t,search:Ex(n),hash:Cx(l)}}function wx(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 Oi(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 Nx(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function qu(e){let t=Nx(e);return t.map((a,n)=>n===t.length-1?a.pathname:a.pathnameBase)}function Yu(e,t,a,n=!1){let l;typeof e=="string"?l=Yn(e):(l={...e},he(!l.pathname||!l.pathname.includes("?"),Oi("?","pathname","search",l)),he(!l.pathname||!l.pathname.includes("#"),Oi("#","pathname","hash",l)),he(!l.search||!l.search.includes("#"),Oi("#","search","hash",l)));let s=e===""||l.pathname==="",r=s?"/":l.pathname,i;if(r==null)i=a;else{let m=t.length-1;if(!n&&r.startsWith("..")){let d=r.split("/");for(;d[0]==="..";)d.shift(),m-=1;l.pathname=d.join("/")}i=m>=0?t[m]:"/"}let u=Sx(l,i),c=r&&r!=="/"&&r.endsWith("/"),f=(s||r===".")&&a.endsWith("/");return!u.pathname.endsWith("/")&&(c||f)&&(u.pathname+="/"),u}var qt=e=>e.join("/").replace(/\/\/+/g,"/"),jx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ex=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Cx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Tx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var sg=["POST","PUT","PATCH","DELETE"];new Set(sg);var Ax=["GET",...sg];new Set(Ax);var $n=x.createContext(null);$n.displayName="DataRouter";var Kr=x.createContext(null);Kr.displayName="DataRouterState";var rg=x.createContext({isTransitioning:!1});rg.displayName="ViewTransition";var kx=x.createContext(new Map);kx.displayName="Fetchers";var Rx=x.createContext(null);Rx.displayName="Await";var vt=x.createContext(null);vt.displayName="Navigation";var rs=x.createContext(null);rs.displayName="Location";var ht=x.createContext({outlet:null,matches:[],isDataRoute:!1});ht.displayName="Route";var $u=x.createContext(null);$u.displayName="RouteError";function Ox(e,{relative:t}={}){he(Kn(),"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}=is(e,{relative:t}),i=s;return a!=="/"&&(i=s==="/"?a:qt([a,s])),n.createHref({pathname:i,search:r,hash:l})}function Kn(){return x.useContext(rs)!=null}function Rt(){return he(Kn(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(rs).location}var ig="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function og(e){x.useContext(vt).static||x.useLayoutEffect(e)}function Qa(){let{isDataRoute:e}=x.useContext(ht);return e?Xx():Mx()}function Mx(){he(Kn(),"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(ht),{pathname:l}=Rt(),s=JSON.stringify(qu(n)),r=x.useRef(!1);return og(()=>{r.current=!0}),x.useCallback((u,c={})=>{if(yt(r.current,ig),!r.current)return;if(typeof u=="number"){a.go(u);return}let f=Yu(u,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 zx=x.createContext(null);function Dx(e){let t=x.useContext(ht).outlet;return t&&x.createElement(zx.Provider,{value:e},t)}function Lx(){let{matches:e}=x.useContext(ht),t=e[e.length-1];return t?t.params:{}}function is(e,{relative:t}={}){let{matches:a}=x.useContext(ht),{pathname:n}=Rt(),l=JSON.stringify(qu(a));return x.useMemo(()=>Yu(e,JSON.parse(l),n,t==="path"),[e,l,n,t])}function Ux(e,t){return ug(e,t)}function ug(e,t,a,n){var h;he(Kn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l,static:s}=x.useContext(vt),{matches:r}=x.useContext(ht),i=r[r.length-1],u=i?i.params:{},c=i?i.pathname:"/",f=i?i.pathnameBase:"/",m=i&&i.route;{let g=m&&m.path||"";cg(c,!m||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${g}">) 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.
|
|
50
|
-
|
|
51
|
-
Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let d=Rt(),y;if(t){let g=typeof t=="string"?Yn(t):t;he(f==="/"||((h=g.pathname)==null?void 0:h.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 "${g.pathname}" was given in the \`location\` prop.`),y=g}else y=d;let S=y.pathname||"/",b=S;if(f!=="/"){let g=f.replace(/^\//,"").split("/");b="/"+S.replace(/^\//,"").split("/").slice(g.length).join("/")}let w=!s&&a&&a.matches&&a.matches.length>0?a.matches:ag(e,{pathname:b});yt(m||w!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),yt(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 p=Vx(w&&w.map(g=>Object.assign({},g,{params:Object.assign({},u,g.params),pathname:qt([f,l.encodeLocation?l.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?f:qt([f,l.encodeLocation?l.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),r,a,n);return t&&p?x.createElement(rs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...y},navigationType:"POP"}},p):p}function _x(){let e=Qx(),t=Tx(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 Hx=x.createElement(_x,null),Bx=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(ht.Provider,{value:this.props.routeContext},x.createElement($u.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Gx({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(ht.Provider,{value:e},a)}function Vx(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 u=l.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id])!==void 0);he(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),l=l.slice(0,Math.min(l.length,u+1))}let r=!1,i=-1;if(a)for(let u=0;u<l.length;u++){let c=l[u];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(i=u),c.route.id){let{loaderData:f,errors:m}=a,d=c.route.loader&&!f.hasOwnProperty(c.route.id)&&(!m||m[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((u,c,f)=>{let m,d=!1,y=null,S=null;a&&(m=s&&c.route.id?s[c.route.id]:void 0,y=c.route.errorElement||Hx,r&&(i<0&&f===0?(cg("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 b=t.concat(l.slice(0,f+1)),w=()=>{let p;return m?p=y:d?p=S:c.route.Component?p=x.createElement(c.route.Component,null):c.route.element?p=c.route.element:p=u,x.createElement(Gx,{match:c,routeContext:{outlet:u,matches:b,isDataRoute:a!=null},children:p})};return a&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?x.createElement(Bx,{location:a.location,revalidation:a.revalidation,component:y,error:m,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}function Ku(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qx(e){let t=x.useContext($n);return he(t,Ku(e)),t}function Yx(e){let t=x.useContext(Kr);return he(t,Ku(e)),t}function $x(e){let t=x.useContext(ht);return he(t,Ku(e)),t}function Qu(e){let t=$x(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 Kx(){return Qu("useRouteId")}function Qx(){var n;let e=x.useContext($u),t=Yx("useRouteError"),a=Qu("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[a]}function Xx(){let{router:e}=qx("useNavigate"),t=Qu("useNavigate"),a=x.useRef(!1);return og(()=>{a.current=!0}),x.useCallback(async(l,s={})=>{yt(a.current,ig),a.current&&(typeof l=="number"?e.navigate(l):await e.navigate(l,{fromRouteId:t,...s}))},[e,t])}var Mf={};function cg(e,t,a){!t&&!Mf[e]&&(Mf[e]=!0,yt(!1,a))}x.memo(Zx);function Zx({routes:e,future:t,state:a}){return ug(e,void 0,a,t)}function fg({to:e,replace:t,state:a,relative:n}){he(Kn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=x.useContext(vt);yt(!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(ht),{pathname:r}=Rt(),i=Qa(),u=Yu(e,qu(s),r,n==="path"),c=JSON.stringify(u);return x.useEffect(()=>{i(JSON.parse(c),{replace:t,state:a,relative:n})},[i,c,n,t,a]),null}function dg(e){return Dx(e.context)}function nt(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 Jx({basename:e="/",children:t=null,location:a,navigationType:n="POP",navigator:l,static:s=!1}){he(!Kn(),"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:u="/",search:c="",hash:f="",state:m=null,key:d="default"}=a,y=x.useMemo(()=>{let S=Xt(u,r);return S==null?null:{location:{pathname:S,search:c,hash:f,state:m,key:d},navigationType:n}},[r,u,c,f,m,d,n]);return yt(y!=null,`<Router basename="${r}"> is not able to match the URL "${u}${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(rs.Provider,{children:t,value:y}))}function Fx({children:e,location:t}){return Ux(zo(e),t)}function zo(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,zo(n.props.children,s));return}he(n.type===nt,`[${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=zo(n.props.children,s)),a.push(r)}),a}var $s="get",Ks="application/x-www-form-urlencoded";function Qr(e){return e!=null&&typeof e.tagName=="string"}function Px(e){return Qr(e)&&e.tagName.toLowerCase()==="button"}function Wx(e){return Qr(e)&&e.tagName.toLowerCase()==="form"}function Ix(e){return Qr(e)&&e.tagName.toLowerCase()==="input"}function e1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function t1(e,t){return e.button===0&&(!t||t==="_self")&&!e1(e)}var Ts=null;function a1(){if(Ts===null)try{new FormData(document.createElement("form"),0),Ts=!1}catch{Ts=!0}return Ts}var n1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Mi(e){return e!=null&&!n1.has(e)?(yt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ks}"`),null):e}function l1(e,t){let a,n,l,s,r;if(Wx(e)){let i=e.getAttribute("action");n=i?Xt(i,t):null,a=e.getAttribute("method")||$s,l=Mi(e.getAttribute("enctype"))||Ks,s=new FormData(e)}else if(Px(e)||Ix(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 u=e.getAttribute("formaction")||i.getAttribute("action");if(n=u?Xt(u,t):null,a=e.getAttribute("formmethod")||i.getAttribute("method")||$s,l=Mi(e.getAttribute("formenctype"))||Mi(i.getAttribute("enctype"))||Ks,s=new FormData(i,e),!a1()){let{name:c,type:f,value:m}=e;if(f==="image"){let d=c?`${c}.`:"";s.append(`${d}x`,"0"),s.append(`${d}y`,"0")}else c&&s.append(c,m)}}else{if(Qr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=$s,n=null,l=Ks,r=e}return s&&l==="text/plain"&&(r=s,s=void 0),{action:n,method:a.toLowerCase(),encType:l,formData:s,body:r}}function Xu(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function s1(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 r1(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 i1(e,t,a){let n=await Promise.all(e.map(async l=>{let s=t.routes[l.route.id];if(s){let r=await s1(s,a);return r.links?r.links():[]}return[]}));return f1(n.flat(1).filter(r1).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function zf(e,t,a,n,l,s){let r=(u,c)=>a[c]?u.route.id!==a[c].route.id:!0,i=(u,c)=>{var f;return a[c].pathname!==u.pathname||((f=a[c].route.path)==null?void 0:f.endsWith("*"))&&a[c].params["*"]!==u.params["*"]};return s==="assets"?t.filter((u,c)=>r(u,c)||i(u,c)):s==="data"?t.filter((u,c)=>{var m;let f=n.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(r(u,c)||i(u,c))return!0;if(u.route.shouldRevalidate){let d=u.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((m=a[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function o1(e,t,{includeHydrateFallback:a}={}){return u1(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 u1(e){return[...new Set(e)]}function c1(e){let t={},a=Object.keys(e).sort();for(let n of a)t[n]=e[n];return t}function f1(e,t){let a=new Set;return new Set(t),e.reduce((n,l)=>{let s=JSON.stringify(c1(l));return a.has(s)||(a.add(s),n.push({key:s,link:l})),n},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var d1=new Set([100,101,204,205]);function h1(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&&Xt(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.data`:a.pathname=`${a.pathname.replace(/\/$/,"")}.data`,a}function hg(){let e=x.useContext($n);return Xu(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function m1(){let e=x.useContext(Kr);return Xu(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Zu=x.createContext(void 0);Zu.displayName="FrameworkContext";function mg(){let e=x.useContext(Zu);return Xu(e,"You must render this element inside a <HydratedRouter> element"),e}function g1(e,t){let a=x.useContext(Zu),[n,l]=x.useState(!1),[s,r]=x.useState(!1),{onFocus:i,onBlur:u,onMouseEnter:c,onMouseLeave:f,onTouchStart:m}=t,d=x.useRef(null);x.useEffect(()=>{if(e==="render"&&r(!0),e==="viewport"){let b=p=>{p.forEach(h=>{r(h.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return d.current&&w.observe(d.current),()=>{w.disconnect()}}},[e]),x.useEffect(()=>{if(n){let b=setTimeout(()=>{r(!0)},100);return()=>{clearTimeout(b)}}},[n]);let y=()=>{l(!0)},S=()=>{l(!1),r(!1)};return a?e!=="intent"?[s,d,{}]:[s,d,{onFocus:ll(i,y),onBlur:ll(u,S),onMouseEnter:ll(c,y),onMouseLeave:ll(f,S),onTouchStart:ll(m,y)}]:[!1,d,{}]}function ll(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function p1({page:e,...t}){let{router:a}=hg(),n=x.useMemo(()=>ag(a.routes,e,a.basename),[a.routes,e,a.basename]);return n?x.createElement(x1,{page:e,matches:n,...t}):null}function y1(e){let{manifest:t,routeModules:a}=mg(),[n,l]=x.useState([]);return x.useEffect(()=>{let s=!1;return i1(e,t,a).then(r=>{s||l(r)}),()=>{s=!0}},[e,t,a]),n}function x1({page:e,matches:t,...a}){let n=Rt(),{manifest:l,routeModules:s}=mg(),{basename:r}=hg(),{loaderData:i,matches:u}=m1(),c=x.useMemo(()=>zf(e,t,u,l,n,"data"),[e,t,u,l,n]),f=x.useMemo(()=>zf(e,t,u,l,n,"assets"),[e,t,u,l,n]),m=x.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let S=new Set,b=!1;if(t.forEach(p=>{var g;let h=l.routes[p.route.id];!h||!h.hasLoader||(!c.some(v=>v.route.id===p.route.id)&&p.route.id in i&&((g=s[p.route.id])!=null&&g.shouldRevalidate)||h.hasClientLoader?b=!0:S.add(p.route.id))}),S.size===0)return[];let w=h1(e,r);return b&&S.size>0&&w.searchParams.set("_routes",t.filter(p=>S.has(p.route.id)).map(p=>p.route.id).join(",")),[w.pathname+w.search]},[r,i,n,l,c,t,e,s]),d=x.useMemo(()=>o1(f,l),[f,l]),y=y1(f);return x.createElement(x.Fragment,null,m.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:b})=>x.createElement("link",{key:S,...b})))}function v1(...e){return t=>{e.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var gg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gg&&(window.__reactRouterVersion="7.6.0")}catch{}function b1({basename:e,children:t,window:a}){let n=x.useRef();n.current==null&&(n.current=lx({window:a,v5Compat:!0}));let l=n.current,[s,r]=x.useState({action:l.action,location:l.location}),i=x.useCallback(u=>{x.startTransition(()=>r(u))},[r]);return x.useLayoutEffect(()=>l.listen(i),[l,i]),x.createElement(Jx,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:l})}var pg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yg=x.forwardRef(function({onClick:t,discover:a="render",prefetch:n="none",relative:l,reloadDocument:s,replace:r,state:i,target:u,to:c,preventScrollReset:f,viewTransition:m,...d},y){let{basename:S}=x.useContext(vt),b=typeof c=="string"&&pg.test(c),w,p=!1;if(typeof c=="string"&&b&&(w=c,gg))try{let A=new URL(window.location.href),R=c.startsWith("//")?new URL(A.protocol+c):new URL(c),_=Xt(R.pathname,S);R.origin===A.origin&&_!=null?c=_+R.search+R.hash:p=!0}catch{yt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let h=Ox(c,{relative:l}),[g,v,j]=g1(n,d),C=N1(c,{replace:r,state:i,target:u,preventScrollReset:f,relative:l,viewTransition:m});function N(A){t&&t(A),A.defaultPrevented||C(A)}let E=x.createElement("a",{...d,...j,href:w||h,onClick:p||s?t:N,ref:v1(y,v),target:u,"data-discover":!b&&a==="render"?"true":void 0});return g&&!b?x.createElement(x.Fragment,null,E,x.createElement(p1,{page:h})):E});yg.displayName="Link";var xg=x.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:n="",end:l=!1,style:s,to:r,viewTransition:i,children:u,...c},f){let m=is(r,{relative:c.relative}),d=Rt(),y=x.useContext(Kr),{navigator:S,basename:b}=x.useContext(vt),w=y!=null&&A1(m)&&i===!0,p=S.encodeLocation?S.encodeLocation(m).pathname:m.pathname,h=d.pathname,g=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;a||(h=h.toLowerCase(),g=g?g.toLowerCase():null,p=p.toLowerCase()),g&&b&&(g=Xt(g,b)||g);const v=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let j=h===p||!l&&h.startsWith(p)&&h.charAt(v)==="/",C=g!=null&&(g===p||!l&&g.startsWith(p)&&g.charAt(p.length)==="/"),N={isActive:j,isPending:C,isTransitioning:w},E=j?t:void 0,A;typeof n=="function"?A=n(N):A=[n,j?"active":null,C?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let R=typeof s=="function"?s(N):s;return x.createElement(yg,{...c,"aria-current":E,className:A,ref:f,style:R,to:r,viewTransition:i},typeof u=="function"?u(N):u)});xg.displayName="NavLink";var S1=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:n,replace:l,state:s,method:r=$s,action:i,onSubmit:u,relative:c,preventScrollReset:f,viewTransition:m,...d},y)=>{let S=C1(),b=T1(i,{relative:c}),w=r.toLowerCase()==="get"?"get":"post",p=typeof i=="string"&&pg.test(i),h=g=>{if(u&&u(g),g.defaultPrevented)return;g.preventDefault();let v=g.nativeEvent.submitter,j=(v==null?void 0:v.getAttribute("formmethod"))||r;S(v||g.currentTarget,{fetcherKey:t,method:j,navigate:a,replace:l,state:s,relative:c,preventScrollReset:f,viewTransition:m})};return x.createElement("form",{ref:y,method:w,action:b,onSubmit:n?u:h,...d,"data-discover":!p&&e==="render"?"true":void 0})});S1.displayName="Form";function w1(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,w1(e)),t}function N1(e,{target:t,replace:a,state:n,preventScrollReset:l,relative:s,viewTransition:r}={}){let i=Qa(),u=Rt(),c=is(e,{relative:s});return x.useCallback(f=>{if(t1(f,t)){f.preventDefault();let m=a!==void 0?a:Vl(u)===Vl(c);i(e,{replace:m,state:n,preventScrollReset:l,relative:s,viewTransition:r})}},[u,i,c,a,n,t,e,l,s,r])}var j1=0,E1=()=>`__${String(++j1)}__`;function C1(){let{router:e}=vg("useSubmit"),{basename:t}=x.useContext(vt),a=Kx();return x.useCallback(async(n,l={})=>{let{action:s,method:r,encType:i,formData:u,body:c}=l1(n,t);if(l.navigate===!1){let f=l.fetcherKey||E1();await e.fetch(f,a,l.action||s,{preventScrollReset:l.preventScrollReset,formData:u,body:c,formMethod:l.method||r,formEncType:l.encType||i,flushSync:l.flushSync})}else await e.navigate(l.action||s,{preventScrollReset:l.preventScrollReset,formData:u,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 T1(e,{relative:t}={}){let{basename:a}=x.useContext(vt),n=x.useContext(ht);he(n,"useFormAction must be used inside a RouteContext");let[l]=n.matches.slice(-1),s={...is(e||".",{relative:t})},r=Rt();if(e==null){s.search=r.search;let i=new URLSearchParams(s.search),u=i.getAll("index");if(u.some(f=>f==="")){i.delete("index"),u.filter(m=>m).forEach(m=>i.append("index",m));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])),Vl(s)}function A1(e,t={}){let a=x.useContext(rg);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=is(e,{relative:t.relative});if(!a.isTransitioning)return!1;let s=Xt(a.currentLocation.pathname,n)||a.currentLocation.pathname,r=Xt(a.nextLocation.pathname,n)||a.nextLocation.pathname;return wr(l.pathname,r)!=null||wr(l.pathname,s)!=null}[...d1];const Xr="",Ju="mcphub_token",os=()=>localStorage.getItem(Ju),bg=e=>{localStorage.setItem(Ju,e)},Do=()=>{localStorage.removeItem(Ju)},k1=async e=>{try{const a=await(await fetch(`${Xr}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();return a.success&&a.token&&bg(a.token),a}catch(t){return console.error("Login error:",t),{success:!1,message:"An error occurred during login"}}},R1=async e=>{try{const a=await(await fetch(`${Xr}/auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();return a.success&&a.token&&bg(a.token),a}catch(t){return console.error("Register error:",t),{success:!1,message:"An error occurred during registration"}}},O1=async()=>{const e=os();if(!e)return{success:!1,message:"No authentication token"};try{return await(await fetch(`${Xr}/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"}}},M1=async e=>{const t=os();if(!t)return{success:!1,message:"No authentication token"};try{return await(await fetch(`${Xr}/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"}}},z1=()=>{Do()},St={token:null,isAuthenticated:!1,loading:!0,user:null,error:null},Sg=x.createContext({auth:St,login:async()=>!1,register:async()=>!1,logout:()=>{}}),D1=({children:e})=>{const[t,a]=x.useState(St);x.useEffect(()=>{(async()=>{const i=os();if(!i){a({...St,loading:!1});return}try{const u=await O1();u.success&&u.user?a({token:i,isAuthenticated:!0,loading:!1,user:u.user,error:null}):(Do(),a({...St,loading:!1}))}catch{Do(),a({...St,loading:!1})}})()},[]);const n=async(r,i)=>{try{const u=await k1({username:r,password:i});return u.success&&u.token&&u.user?(a({token:u.token,isAuthenticated:!0,loading:!1,user:u.user,error:null}),!0):(a({...St,loading:!1,error:u.message||"Authentication failed"}),!1)}catch{return a({...St,loading:!1,error:"Authentication failed"}),!1}},l=async(r,i,u=!1)=>{try{const c=await R1({username:r,password:i,isAdmin:u});return c.success&&c.token&&c.user?(a({token:c.token,isAuthenticated:!0,loading:!1,user:c.user,error:null}),!0):(a({...St,loading:!1,error:c.message||"Registration failed"}),!1)}catch{return a({...St,loading:!1,error:"Registration failed"}),!1}},s=()=>{z1(),a({...St,loading:!1})};return o.jsx(Sg.Provider,{value:{auth:t,login:n,register:l,logout:s},children:e})},Zr=()=>x.useContext(Sg);/**
|
|
52
|
-
* @license lucide-react v0.486.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const L1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),U1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,n)=>n?n.toUpperCase():a.toLowerCase()),Df=e=>{const t=U1(e);return t.charAt(0).toUpperCase()+t.slice(1)},wg=(...e)=>e.filter((t,a,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===a).join(" ").trim();/**
|
|
57
|
-
* @license lucide-react v0.486.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/var _1={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"};/**
|
|
62
|
-
* @license lucide-react v0.486.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const H1=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:l="",children:s,iconNode:r,...i},u)=>x.createElement("svg",{ref:u,..._1,width:t,height:t,stroke:e,strokeWidth:n?Number(a)*24/Number(t):a,className:wg("lucide",l),...i},[...r.map(([c,f])=>x.createElement(c,f)),...Array.isArray(s)?s:[s]]));/**
|
|
67
|
-
* @license lucide-react v0.486.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const qe=(e,t)=>{const a=x.forwardRef(({className:n,...l},s)=>x.createElement(H1,{ref:s,iconNode:t,className:wg(`lucide-${L1(Df(e))}`,`lucide-${e}`,n),...l}));return a.displayName=Df(e),a};/**
|
|
72
|
-
* @license lucide-react v0.486.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const B1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Fu=qe("check",B1);/**
|
|
77
|
-
* @license lucide-react v0.486.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const G1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ng=qe("chevron-down",G1);/**
|
|
82
|
-
* @license lucide-react v0.486.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const V1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],jg=qe("chevron-right",V1);/**
|
|
87
|
-
* @license lucide-react v0.486.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const q1=[["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"}]],Y1=qe("circle-alert",q1);/**
|
|
92
|
-
* @license lucide-react v0.486.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const $1=[["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"}]],Eg=qe("copy",$1);/**
|
|
97
|
-
* @license lucide-react v0.486.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const K1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Q1=qe("info",K1);/**
|
|
102
|
-
* @license lucide-react v0.486.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const X1=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],Z1=qe("log-out",X1);/**
|
|
107
|
-
* @license lucide-react v0.486.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const J1=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],F1=qe("moon",J1);/**
|
|
112
|
-
* @license lucide-react v0.486.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const P1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],W1=qe("refresh-cw",P1);/**
|
|
117
|
-
* @license lucide-react v0.486.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const I1=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ev=qe("settings",I1);/**
|
|
122
|
-
* @license lucide-react v0.486.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const tv=[["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"}]],av=qe("square-pen",tv);/**
|
|
127
|
-
* @license lucide-react v0.486.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const nv=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],lv=qe("sun",nv);/**
|
|
132
|
-
* @license lucide-react v0.486.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const sv=[["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"}]],rv=qe("trash",sv);/**
|
|
137
|
-
* @license lucide-react v0.486.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const iv=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ov=qe("user",iv);/**
|
|
142
|
-
* @license lucide-react v0.486.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const uv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ql=qe("x",uv);function Cg(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=Cg(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function cv(){for(var e,t,a=0,n="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=Cg(e))&&(n&&(n+=" "),n+=t);return n}const Pu="-",fv=e=>{const t=hv(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:r=>{const i=r.split(Pu);return i[0]===""&&i.length!==1&&i.shift(),Tg(i,t)||dv(r)},getConflictingClassGroupIds:(r,i)=>{const u=a[r]||[];return i&&n[r]?[...u,...n[r]]:u}}},Tg=(e,t)=>{var r;if(e.length===0)return t.classGroupId;const a=e[0],n=t.nextPart.get(a),l=n?Tg(e.slice(1),n):void 0;if(l)return l;if(t.validators.length===0)return;const s=e.join(Pu);return(r=t.validators.find(({validator:i})=>i(s)))==null?void 0:r.classGroupId},Lf=/^\[(.+)\]$/,dv=e=>{if(Lf.test(e)){const t=Lf.exec(e)[1],a=t==null?void 0:t.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},hv=e=>{const{theme:t,classGroups:a}=e,n={nextPart:new Map,validators:[]};for(const l in a)Lo(a[l],n,l,t);return n},Lo=(e,t,a,n)=>{e.forEach(l=>{if(typeof l=="string"){const s=l===""?t:Uf(t,l);s.classGroupId=a;return}if(typeof l=="function"){if(mv(l)){Lo(l(n),t,a,n);return}t.validators.push({validator:l,classGroupId:a});return}Object.entries(l).forEach(([s,r])=>{Lo(r,Uf(t,s),a,n)})})},Uf=(e,t)=>{let a=e;return t.split(Pu).forEach(n=>{a.nextPart.has(n)||a.nextPart.set(n,{nextPart:new Map,validators:[]}),a=a.nextPart.get(n)}),a},mv=e=>e.isThemeGetter,gv=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)}}},Uo="!",_o=":",pv=_o.length,yv=e=>{const{prefix:t,experimentalParseClassName:a}=e;let n=l=>{const s=[];let r=0,i=0,u=0,c;for(let S=0;S<l.length;S++){let b=l[S];if(r===0&&i===0){if(b===_o){s.push(l.slice(u,S)),u=S+pv;continue}if(b==="/"){c=S;continue}}b==="["?r++:b==="]"?r--:b==="("?i++:b===")"&&i--}const f=s.length===0?l:l.substring(u),m=xv(f),d=m!==f,y=c&&c>u?c-u:void 0;return{modifiers:s,hasImportantModifier:d,baseClassName:m,maybePostfixModifierPosition:y}};if(t){const l=t+_o,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},xv=e=>e.endsWith(Uo)?e.substring(0,e.length-1):e.startsWith(Uo)?e.substring(1):e,vv=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}},bv=e=>({cache:gv(e.cacheSize),parseClassName:yv(e),sortModifiers:vv(e),...fv(e)}),Sv=/\s+/,wv=(e,t)=>{const{parseClassName:a,getClassGroupId:n,getConflictingClassGroupIds:l,sortModifiers:s}=t,r=[],i=e.trim().split(Sv);let u="";for(let c=i.length-1;c>=0;c-=1){const f=i[c],{isExternal:m,modifiers:d,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:b}=a(f);if(m){u=f+(u.length>0?" "+u:u);continue}let w=!!b,p=n(w?S.substring(0,b):S);if(!p){if(!w){u=f+(u.length>0?" "+u:u);continue}if(p=n(S),!p){u=f+(u.length>0?" "+u:u);continue}w=!1}const h=s(d).join(":"),g=y?h+Uo:h,v=g+p;if(r.includes(v))continue;r.push(v);const j=l(p,w);for(let C=0;C<j.length;++C){const N=j[C];r.push(g+N)}u=f+(u.length>0?" "+u:u)}return u};function Nv(){let e=0,t,a,n="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ag(t))&&(n&&(n+=" "),n+=a);return n}const Ag=e=>{if(typeof e=="string")return e;let t,a="";for(let n=0;n<e.length;n++)e[n]&&(t=Ag(e[n]))&&(a&&(a+=" "),a+=t);return a};function jv(e,...t){let a,n,l,s=r;function r(u){const c=t.reduce((f,m)=>m(f),e());return a=bv(c),n=a.cache.get,l=a.cache.set,s=i,i(u)}function i(u){const c=n(u);if(c)return c;const f=wv(u,a);return l(u,f),f}return function(){return s(Nv.apply(null,arguments))}}const Ce=e=>{const t=a=>a[e]||[];return t.isThemeGetter=!0,t},kg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ev=/^\d+\/\d+$/,Cv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tv=/\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$/,Av=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ja=e=>Ev.test(e),X=e=>!!e&&!Number.isNaN(Number(e)),Wt=e=>!!e&&Number.isInteger(Number(e)),_f=e=>e.endsWith("%")&&X(e.slice(0,-1)),It=e=>Cv.test(e),Ov=()=>!0,Mv=e=>Tv.test(e)&&!Av.test(e),Wu=()=>!1,zv=e=>kv.test(e),Dv=e=>Rv.test(e),Lv=e=>!O(e)&&!M(e),Uv=e=>Qn(e,zg,Wu),O=e=>kg.test(e),Ca=e=>Qn(e,Dg,Mv),zi=e=>Qn(e,Xv,X),_v=e=>Qn(e,Og,Wu),Hv=e=>Qn(e,Mg,Dv),Bv=e=>Qn(e,Wu,zv),M=e=>Rg.test(e),sl=e=>Xn(e,Dg),Gv=e=>Xn(e,Zv),Vv=e=>Xn(e,Og),qv=e=>Xn(e,zg),Yv=e=>Xn(e,Mg),$v=e=>Xn(e,Jv,!0),Qn=(e,t,a)=>{const n=kg.exec(e);return n?n[1]?t(n[1]):a(n[2]):!1},Xn=(e,t,a=!1)=>{const n=Rg.exec(e);return n?n[1]?t(n[1]):a:!1},Og=e=>e==="position",Kv=new Set(["image","url"]),Mg=e=>Kv.has(e),Qv=new Set(["length","size","percentage"]),zg=e=>Qv.has(e),Dg=e=>e==="length",Xv=e=>e==="number",Zv=e=>e==="family-name",Jv=e=>e==="shadow",Fv=()=>{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"),u=Ce("spacing"),c=Ce("radius"),f=Ce("shadow"),m=Ce("inset-shadow"),d=Ce("drop-shadow"),y=Ce("blur"),S=Ce("perspective"),b=Ce("aspect"),w=Ce("ease"),p=Ce("animate"),h=()=>["auto","avoid","all","avoid-page","page","left","right","column"],g=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],v=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],C=()=>[M,O,u],N=()=>[Ja,"full","auto",...C()],E=()=>[Wt,"none","subgrid",M,O],A=()=>["auto",{span:["full",Wt,M,O]},Wt,M,O],R=()=>[Wt,"auto",M,O],_=()=>["auto","min","max","fr",M,O],te=()=>["start","end","center","between","around","evenly","stretch","baseline"],me=()=>["start","end","center","stretch"],Z=()=>["auto",...C()],oe=()=>[Ja,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,M,O],H=()=>[_f,sl,Ca],z=()=>["","none","full",c,M,O],U=()=>["",X,sl,Ca],J=()=>["solid","dashed","dotted","double"],Oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Me=()=>["","none",y,M,O],F=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M,O],pe=()=>["none",X,M,O],mt=()=>["none",X,M,O],D=()=>[X,M,O],L=()=>[Ja,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[It],breakpoint:[It],color:[Ov],container:[It],"drop-shadow":[It],ease:["in","out","in-out"],font:[Lv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[It],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[It],shadow:[It],spacing:["px",X],text:[It],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ja,O,M,b]}],container:["container"],columns:[{columns:[X,O,M,i]}],"break-after":[{"break-after":h()}],"break-before":[{"break-before":h()}],"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:[...g(),O,M]}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],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:[Wt,"auto",M,O]}],basis:[{basis:[Ja,"full","auto",i,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,Ja,"auto","initial","none",O]}],grow:[{grow:["",X,M,O]}],shrink:[{shrink:["",X,M,O]}],order:[{order:[Wt,"first","last","none",M,O]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...me(),"normal"]}],"justify-self":[{"justify-self":["auto",...me()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...me(),"baseline"]}],"align-self":[{self:["auto",...me(),"baseline"]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...me(),"baseline"]}],"place-self":[{"place-self":["auto",...me()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],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":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],w:[{w:[i,"screen",...oe()]}],"min-w":[{"min-w":[i,"screen","none",...oe()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[r]},...oe()]}],h:[{h:["screen",...oe()]}],"min-h":[{"min-h":["screen","none",...oe()]}],"max-h":[{"max-h":["screen",...oe()]}],"font-size":[{text:["base",a,sl,Ca]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,M,zi]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_f,O]}],"font-family":[{font:[Gv,O,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,O]}],"line-clamp":[{"line-clamp":[X,"none",M,zi]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",M,O]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",M,Ca]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[X,"auto",M,O]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M,O]}],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,O]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...g(),Vv,_v]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",qv,Uv]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wt,M,O],radial:["",M,O],conic:[Wt,M,O]},Yv,Hv]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"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:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,M,O]}],"outline-w":[{outline:["",X,sl,Ca]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,$v,Bv]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",M,O,m]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[X,Ca]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":k()}],opacity:[{opacity:[X,M,O]}],"mix-blend":[{"mix-blend":[...Oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Oe()}],filter:[{filter:["","none",M,O]}],blur:[{blur:Me()}],brightness:[{brightness:[X,M,O]}],contrast:[{contrast:[X,M,O]}],"drop-shadow":[{"drop-shadow":["","none",d,M,O]}],grayscale:[{grayscale:["",X,M,O]}],"hue-rotate":[{"hue-rotate":[X,M,O]}],invert:[{invert:["",X,M,O]}],saturate:[{saturate:[X,M,O]}],sepia:[{sepia:["",X,M,O]}],"backdrop-filter":[{"backdrop-filter":["","none",M,O]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[X,M,O]}],"backdrop-contrast":[{"backdrop-contrast":[X,M,O]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,M,O]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,M,O]}],"backdrop-invert":[{"backdrop-invert":["",X,M,O]}],"backdrop-opacity":[{"backdrop-opacity":[X,M,O]}],"backdrop-saturate":[{"backdrop-saturate":[X,M,O]}],"backdrop-sepia":[{"backdrop-sepia":["",X,M,O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",M,O]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[X,"initial",M,O]}],ease:[{ease:["linear","initial",w,M,O]}],delay:[{delay:[X,M,O]}],animate:[{animate:["none",p,M,O]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,M,O]}],"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:mt()}],"scale-x":[{"scale-x":mt()}],"scale-y":[{"scale-y":mt()}],"scale-z":[{"scale-z":mt()}],"scale-3d":["scale-3d"],skew:[{skew:D()}],"skew-x":[{"skew-x":D()}],"skew-y":[{"skew-y":D()}],transform:[{transform:[M,O,"","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:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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,O]}],"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":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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,O]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[X,sl,Ca,zi]}],stroke:[{stroke:["none",...k()]}],"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","*","**"]}},Pv=jv(Fv);function va(...e){return Pv(cv(e))}const Wv=({message:e,type:t="info",duration:a=3e3,onClose:n,visible:l})=>{x.useEffect(()=>{if(l){const u=setTimeout(()=>{n()},a);return()=>clearTimeout(u)}},[l,a,n]);const s={success:o.jsx(Fu,{className:"w-5 h-5 text-green-500"}),error:o.jsx(ql,{className:"w-5 h-5 text-red-500"}),info:o.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.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:o.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.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 o.jsx("div",{className:va("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:o.jsxs("div",{className:"flex items-start",children:[o.jsx("div",{className:"flex-shrink-0",children:s[t]}),o.jsx("div",{className:"ml-3",children:o.jsx("p",{className:va("text-sm font-medium",i[t]),children:e})}),o.jsx("div",{className:"ml-auto pl-3",children:o.jsx("div",{className:"-mx-1.5 -my-1.5",children:o.jsxs("button",{onClick:n,className:va("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:[o.jsx("span",{className:"sr-only",children:"Dismiss"}),o.jsx(ql,{className:"h-5 w-5"})]})})})]})})},Lg=x.createContext(void 0),us=()=>{const e=x.useContext(Lg);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},Iv=({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 o.jsxs(Lg.Provider,{value:{showToast:n},children:[e,o.jsx(Wv,{message:t.message,type:t.type,duration:t.duration,onClose:l,visible:t.visible})]})},Ug=x.createContext(void 0),eb=()=>{const e=x.useContext(Ug);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},tb=({children:e})=>{const[t,a]=x.useState(()=>localStorage.getItem("theme")||"system"),[n,l]=x.useState("light"),s=r=>{a(r),localStorage.setItem("theme",r)};return x.useEffect(()=>{const r=()=>{const u=window.document.documentElement,c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",f=t==="system"?c:t;l(f),f==="dark"?(console.log("Applying dark mode to HTML root element"),u.classList.add("dark"),document.body.style.backgroundColor="#111827"):(console.log("Removing dark mode from HTML root element"),u.classList.remove("dark"),document.body.style.backgroundColor="")},i=window.matchMedia("(prefers-color-scheme: dark)");return i.addEventListener("change",r),r(),()=>{i.removeEventListener("change",r)}},[t]),o.jsx(Ug.Provider,{value:{theme:t,setTheme:s,resolvedTheme:n},children:e})},ab=(e,t,a,n)=>{var s,r,i,u;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);_a(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),(u=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&u.warn?e.services.logger.warn(...l):console!=null&&console.warn&&console.warn(...l)},Hf={},Ho=(e,t,a,n)=>{_a(a)&&Hf[a]||(_a(a)&&(Hf[a]=new Date),ab(e,t,a,n))},_g=(e,t)=>()=>{if(e.isInitialized)t();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),t()};e.on("initialized",a)}},Bo=(e,t,a)=>{e.loadNamespaces(t,_g(e,a))},Bf=(e,t,a,n)=>{if(_a(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Bo(e,a,n);a.forEach(l=>{e.options.ns.indexOf(l)<0&&e.options.ns.push(l)}),e.loadLanguages(t,_g(e,n))},nb=(e,t,a={})=>!t.languages||!t.languages.length?(Ho(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}}),_a=e=>typeof e=="string",lb=e=>typeof e=="object"&&e!==null,sb=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,rb={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ib=e=>rb[e],ob=e=>e.replace(sb,ib);let Go={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ob};const ub=(e={})=>{Go={...Go,...e}},cb=()=>Go;let Hg;const fb=e=>{Hg=e},db=()=>Hg,hb={type:"3rdParty",init(e){ub(e.options.react),fb(e)}},mb=x.createContext();class gb{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const pb=(e,t)=>{const a=x.useRef();return x.useEffect(()=>{a.current=e},[e,t]),a.current},Bg=(e,t,a,n)=>e.getFixedT(t,a,n),yb=(e,t,a,n)=>x.useCallback(Bg(e,t,a,n),[e,t,a,n]),W=(e,t={})=>{var v,j,C,N;const{i18n:a}=t,{i18n:n,defaultNS:l}=x.useContext(mb)||{},s=a||n||db();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new gb),!s){Ho(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const E=(R,_)=>_a(_)?_:lb(_)&&_a(_.defaultValue)?_.defaultValue:Array.isArray(R)?R[R.length-1]:R,A=[E,{},!1];return A.t=E,A.i18n={},A.ready=!1,A}(v=s.options.react)!=null&&v.wait&&Ho(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const r={...cb(),...s.options.react,...t},{useSuspense:i,keyPrefix:u}=r;let c=l||((j=s.options)==null?void 0:j.defaultNS);c=_a(c)?[c]:c||["translation"],(N=(C=s.reportNamespaces).addUsedNamespaces)==null||N.call(C,c);const f=(s.isInitialized||s.initializedStoreOnce)&&c.every(E=>nb(E,s,r)),m=yb(s,t.lng||null,r.nsMode==="fallback"?c:c[0],u),d=()=>m,y=()=>Bg(s,t.lng||null,r.nsMode==="fallback"?c:c[0],u),[S,b]=x.useState(d);let w=c.join();t.lng&&(w=`${t.lng}${w}`);const p=pb(w),h=x.useRef(!0);x.useEffect(()=>{const{bindI18n:E,bindI18nStore:A}=r;h.current=!0,!f&&!i&&(t.lng?Bf(s,t.lng,c,()=>{h.current&&b(y)}):Bo(s,c,()=>{h.current&&b(y)})),f&&p&&p!==w&&h.current&&b(y);const R=()=>{h.current&&b(y)};return E&&(s==null||s.on(E,R)),A&&(s==null||s.store.on(A,R)),()=>{h.current=!1,s&&(E==null||E.split(" ").forEach(_=>s.off(_,R))),A&&s&&A.split(" ").forEach(_=>s.store.off(_,R))}},[s,w]),x.useEffect(()=>{h.current&&f&&b(d)},[s,u,f]);const g=[S,s,f];if(g.t=S,g.i18n=s,g.ready=f,f||!f&&!i)return g;throw new Promise(E=>{t.lng?Bf(s,t.lng,c,()=>E()):Bo(s,c,()=>E())})},Gg=()=>{const{t:e}=W(),{theme:t,setTheme:a}=eb();return o.jsx("div",{className:"flex items-center space-x-2",children:o.jsxs("div",{className:"flex bg-gray-200 dark:bg-gray-700 rounded-lg p-1",children:[o.jsx("button",{onClick:()=>a("light"),className:`flex items-center justify-center rounded-md p-1.5 ${t==="light"?"bg-white text-yellow-600 shadow":"text-black dark:text-gray-300 hover:text-yellow-600 dark:hover:text-yellow-500"}`,title:e("theme.light"),"aria-label":e("theme.light"),children:o.jsx(lv,{size:18})}),o.jsx("button",{onClick:()=>a("dark"),className:`flex items-center justify-center rounded-md p-1.5 ${t==="dark"?"bg-gray-800 text-blue-400 shadow":"text-gray-600 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400"}`,title:e("theme.dark"),"aria-label":e("theme.dark"),children:o.jsx(F1,{size:18})})]})})},xb=e=>o.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...e,children:[o.jsx("title",{children:"GitHub"}),o.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),vb=e=>o.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...e,children:[o.jsx("title",{children:"Sponsor"}),o.jsx("path",{d:"M17.625 1.499c-2.32 0-4.354 1.203-5.625 3.03-1.271-1.827-3.305-3.03-5.625-3.03C3.129 1.499 0 4.253 0 8.249c0 4.275 3.068 7.847 5.828 10.227a33.14 33.14 0 0 0 5.616 3.876l.028.017.008.003-.001.003c.163.085.342.126.521.125.179.001.358-.041.521-.125l-.001-.003.008-.003.028-.017a33.14 33.14 0 0 0 5.616-3.876C20.932 16.096 24 12.524 24 8.249c0-3.996-3.129-6.75-6.375-6.75zm-.919 15.275a30.766 30.766 0 0 1-4.703 3.316l-.004-.002-.004.002a30.955 30.955 0 0 1-4.703-3.316c-2.677-2.307-5.047-5.298-5.047-8.523 0-2.754 2.121-4.5 4.125-4.5 2.06 0 3.914 1.479 4.544 3.684.143.495.596.797 1.086.796.49.001.943-.302 1.085-.796.63-2.205 2.484-3.684 4.544-3.684 2.004 0 4.125 1.746 4.125 4.5 0 3.225-2.37 6.216-5.048 8.523z"})]}),bb=e=>o.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...e,children:[o.jsx("title",{children:"WeChat"}),o.jsx("path",{d:"M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 0 1-.023-.156.49.49 0 0 1 .201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.01-.27-.027-.407-.03zm-2.53 3.274c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.97-.982zm4.844 0c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.969-.982z"})]}),Sb=e=>o.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...e,children:[o.jsx("title",{children:"Discord"}),o.jsx("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"})]}),wb=({open:e,onOpenChange:t})=>{const{i18n:a,t:n}=W();return e?o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:o.jsxs("div",{className:"p-6 relative",children:[o.jsx("button",{onClick:()=>t(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":n("common.close"),children:o.jsx(ql,{className:"h-5 w-5"})}),o.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:n("sponsor.title")}),o.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:a.language==="zh"?o.jsx("img",{src:"/assets/reward.png",alt:n("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:n("sponsor.supportMessage")}),o.jsx("a",{href:"https://ko-fi.com/samanhappy",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center bg-[#13C3FF] text-white px-4 py-2 rounded-md hover:bg-[#00A5E5] transition-colors",children:n("sponsor.supportButton")})]})})]})})}):null},Nb=({open:e,onOpenChange:t})=>{const{t:a}=W();return e?o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:o.jsxs("div",{className:"p-6 relative",children:[o.jsx("button",{onClick:()=>t(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":a("common.close"),children:o.jsx(ql,{className:"h-5 w-5"})}),o.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:a("wechat.title")}),o.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[o.jsx("img",{src:"/assets/wexin.png",alt:a("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),o.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:a("wechat.scanMessage")})]})]})})}):null},jb=({onToggleSidebar:e})=>{const{t,i18n:a}=W(),{auth:n}=Zr(),[l,s]=x.useState(!1),[r,i]=x.useState(!1);return o.jsxs("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:[o.jsxs("div",{className:"flex justify-between items-center px-4 py-3",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("button",{onClick:e,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none","aria-label":t("app.toggleSidebar"),children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),o.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:t("app.title")})]}),o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"v0.6.2"}),o.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200","aria-label":"GitHub Repository",children:o.jsx(xb,{className:"h-5 w-5"})}),a.language==="zh"?o.jsx("button",{onClick:()=>i(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":t("wechat.label"),children:o.jsx(bb,{className:"h-5 w-5"})}):o.jsx("a",{href:"https://discord.gg/qMKNsn5Q",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200","aria-label":t("discord.label"),children:o.jsx(Sb,{className:"h-5 w-5"})}),o.jsx("button",{onClick:()=>s(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":t("sponsor.label"),children:o.jsx(vb,{className:"h-5 w-5"})}),o.jsx(Gg,{})]})]}),o.jsx(wb,{open:l,onOpenChange:s}),o.jsx(Nb,{open:r,onOpenChange:i})]})},Eb="https://registry.npmjs.org",Cb="@samanhappy/mcphub",Vg=async()=>{try{const e=await fetch(`${Eb}/${Cb}/latest`);if(!e.ok)throw new Error(`Failed to fetch latest version: ${e.status}`);return(await e.json()).version||null}catch(e){return console.error("Error checking for latest version:",e),null}},qg=(e,t)=>{if(e==="dev")return-1;const a=e.split(".").map(Number),n=t.split(".").map(Number);for(let l=0;l<3;l++){const s=a[l]||0,r=n[l]||0;if(s>r)return-1;if(s<r)return 1}return 0},Tb=({isOpen:e,onClose:t,version:a})=>{const{t:n}=W(),[l,s]=x.useState(!1),[r,i]=x.useState(""),[u,c]=x.useState(!1),f=async()=>{c(!0);try{const m=await Vg();m&&(i(m),s(qg(a,m)>0))}catch(m){console.error("Failed to check for updates:",m)}finally{c(!1)}};return x.useEffect(()=>{e&&f()},[e,a]),e?o.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:o.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:o.jsxs("div",{className:"p-6 relative",children:[o.jsx("button",{onClick:t,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":n("common.close"),children:o.jsx(ql,{className:"h-5 w-5"})}),o.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:n("about.title")}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[n("about.currentVersion"),":"]}),o.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:a})]}),l&&r&&o.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:o.jsxs("div",{className:"flex items-start",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.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"})})}),o.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[o.jsx("p",{children:n("about.newVersionAvailable",{version:r})}),o.jsx("p",{className:"mt-1",children:o.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:n("about.viewOnGitHub")})})]})]})}),o.jsxs("button",{onClick:f,disabled:u,className:`mt-4 inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium
|
|
147
|
-
${u?"text-gray-400 dark:text-gray-500 bg-gray-100 dark:bg-gray-800":"text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500`,children:[o.jsx(W1,{className:`h-4 w-4 mr-2 ${u?"animate-spin":""}`}),n(u?"about.checking":"about.checkForUpdates")]})]})]})})}):null},Ab=({collapsed:e,version:t})=>{var w;const{t:a}=W(),n=Qa(),{auth:l,logout:s}=Zr(),[r,i]=x.useState(!1),[u,c]=x.useState(!1),[f,m]=x.useState(!1),d=x.useRef(null);x.useEffect(()=>{(async()=>{try{const h=await Vg();h&&c(qg(t,h)>0)}catch(h){console.error("Error checking for new version:",h)}})()},[t]),x.useEffect(()=>{const p=h=>{d.current&&!d.current.contains(h.target)&&i(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]);const y=()=>{n("/settings"),i(!1)},S=()=>{s(),n("/login")},b=()=>{m(!0),i(!1)};return o.jsxs("div",{ref:d,className:"relative",children:[o.jsxs("button",{onClick:()=>i(!r),className:`flex ${e?"justify-center":"items-center"} w-full p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors rounded-md ${r?"bg-gray-100 dark:bg-gray-700":""}`,children:[o.jsxs("div",{className:"flex-shrink-0 relative",children:[o.jsx("div",{className:"w-7 h-7 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700",children:o.jsx(ov,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),u&&o.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!e&&o.jsx("div",{className:"ml-3 flex flex-col items-start",children:o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((w=l.user)==null?void 0:w.username)||a("auth.user")})})]}),r&&o.jsxs("div",{className:"absolute top-0 transform -translate-y-full left-0 w-48 bg-white dark:bg-gray-800 shadow-lg rounded-md py-1 z-50",children:[o.jsxs("button",{onClick:y,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[o.jsx(ev,{className:"h-4 w-4 mr-2"}),a("nav.settings")]}),o.jsxs("button",{onClick:b,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 relative",children:[o.jsx(Q1,{className:"h-4 w-4 mr-2"}),a("about.title"),u&&o.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),o.jsxs("button",{onClick:S,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[o.jsx(Z1,{className:"h-4 w-4 mr-2"}),a("app.logout")]})]}),o.jsx(Tb,{isOpen:f,onClose:()=>m(!1),version:t})]})},kb=({collapsed:e})=>{const{t}=W();Rt();const a="0.6.2",n=[{path:"/",label:t("nav.dashboard"),icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[o.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),o.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:t("nav.servers"),icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.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:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.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:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.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:"/logs",label:t("nav.logs"),icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}];return o.jsxs("aside",{className:`bg-white dark:bg-gray-800 shadow-sm transition-all duration-300 ease-in-out flex flex-col h-full relative ${e?"w-16":"w-64"}`,children:[o.jsx("div",{className:"overflow-y-auto flex-grow",children:o.jsx("nav",{className:"p-3 space-y-1",children:n.map(l=>o.jsxs(xg,{to:l.path,className:({isActive:s})=>`flex items-center px-3 py-2 rounded-md transition-colors ${s?"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,end:l.path==="/",children:[o.jsx("span",{className:"flex-shrink-0",children:l.icon}),!e&&o.jsx("span",{className:"ml-3",children:l.label})]},l.path))})}),o.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:o.jsx(Ab,{collapsed:e,version:a})})]})},Rb=({children:e})=>o.jsx("main",{className:"flex-1 overflow-auto p-6 bg-gray-100 dark:bg-gray-900",children:o.jsx("div",{className:"container mx-auto",children:e})}),Ob=()=>{const[e,t]=md.useState(!1),a=()=>{t(!e)};return o.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[o.jsx(jb,{onToggleSidebar:a}),o.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[o.jsx(kb,{collapsed:e}),o.jsx(Rb,{children:o.jsx(dg,{})})]})]})},Mb=({redirectPath:e="/login"})=>{const{t}=W(),{auth:a}=Zr();return a.loading?o.jsx("div",{className:"flex items-center justify-center h-screen",children:t("app.loading")}):a.isAuthenticated?o.jsx(dg,{}):o.jsx(fg,{to:e,replace:!0})},zb=()=>{const{t:e}=W(),[t,a]=x.useState(""),[n,l]=x.useState(""),[s,r]=x.useState(null),[i,u]=x.useState(!1),{login:c}=Zr(),f=Qa(),m=async d=>{d.preventDefault(),r(null),u(!0);try{if(!t||!n){r(e("auth.emptyFields")),u(!1);return}await c(t,n)?f("/"):r(e("auth.loginFailed"))}catch{r(e("auth.loginError"))}finally{u(!1)}};return o.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8",children:[o.jsx("div",{className:"absolute top-4 right-4",children:o.jsx(Gg,{})}),o.jsxs("div",{className:"max-w-md w-full space-y-8",children:[o.jsx("div",{children:o.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white",children:e("auth.loginTitle")})}),o.jsxs("form",{className:"mt-8 space-y-6",onSubmit:m,children:[o.jsxs("div",{className:"rounded-md shadow-sm -space-y-px",children:[o.jsxs("div",{children:[o.jsx("label",{htmlFor:"username",className:"sr-only",children:e("auth.username")}),o.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 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white dark:bg-gray-800 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)})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"password",className:"sr-only",children:e("auth.password")}),o.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 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white dark:bg-gray-800 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&&o.jsx("div",{className:"text-red-500 dark:text-red-400 text-sm text-center",children:s}),o.jsx("div",{children:o.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")})})]})]})]})},As={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},cs=()=>{const{t:e}=W(),[t,a]=x.useState([]),[n,l]=x.useState(null),[s,r]=x.useState(0),[i,u]=x.useState(!0),[c,f]=x.useState(0),m=x.useRef(null),d=x.useRef(0),y=()=>{m.current&&(clearInterval(m.current),m.current=null)},S=x.useCallback(()=>{y();const v=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"))}};v(),m.current=setInterval(v,As.normal.pollingInterval)},[e]);return x.useEffect(()=>{s>0&&(d.current=0,f(0));const v=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),u(!1),S(),!0):N&&Array.isArray(N)?(a(N),u(!1),S(),!0):(console.error("Invalid server data format:",N),a([]),u(!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>=As.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),u(!1),y(),S()),!1}};return i?(y(),v(),m.current=setInterval(v,As.startup.pollingInterval),console.log(`Started initial polling with interval: ${As.startup.pollingInterval}ms`)):S(),()=>{y()}},[s,e,i,S]),{servers:t,error:n,setError:l,isLoading:i,fetchAttempts:c,triggerRefresh:()=>{y(),i&&(u(!0),d.current=0,f(0)),r(v=>v+1)},handleServerAdd:()=>{r(v=>v+1)},handleServerEdit:async v=>{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[v.name]){const E=N.data.mcpServers[v.name];return{name:v.name,status:v.status,tools:v.tools||[],config:E}}else return console.error("Failed to get server config from settings:",N),l(e("server.invalidConfig",{serverName:v.name})),null}catch(j){return console.error("Error fetching server settings:",j),l(j instanceof Error?j.message:String(j)),null}},handleServerRemove:async v=>{try{const j=localStorage.getItem("mcphub_token"),C=await fetch(`/api/servers/${v}`,{method:"DELETE",headers:{"x-auth-token":j||""}}),N=await C.json();return C.ok?(r(E=>E+1),!0):(l(N.message||e("server.deleteError",{serverName:v})),!1)}catch(j){return l(e("errors.general")+": "+(j instanceof Error?j.message:String(j))),!1}},handleServerToggle:async(v,j)=>{try{const C=localStorage.getItem("mcphub_token"),N=await fetch(`/api/servers/${v.name}/toggle`,{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":C||""},body:JSON.stringify({enabled:j})}),E=await N.json();return N.ok?(r(A=>A+1),!0):(console.error("Failed to toggle server:",E),l(e("server.toggleError",{serverName:v.name})),!1)}catch(C){return console.error("Error toggling server:",C),l(C instanceof Error?C.message:String(C)),!1}}}},Db=()=>{const{t:e}=W(),{servers:t,error:a,setError:n,isLoading:l}=cs(),s={total:t.length,online:t.filter(u=>u.status==="connected").length,offline:t.filter(u=>u.status==="disconnected").length,connecting:t.filter(u=>u.status==="connecting").length},r={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"},i=u=>t.length===0?0:Math.round(t.filter(c=>c.status===u).length/t.length*100);return o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:e("pages.dashboard.title")}),a&&o.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-red-600 text-lg font-medium",children:e("app.error")}),o.jsx("p",{className:"text-gray-600 mt-1",children:a})]}),o.jsx("button",{onClick:()=>n(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":e("app.closeButton"),children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.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?o.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center",children:[o.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:[o.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.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"})]}),o.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):o.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[o.jsx("div",{className:"bg-white rounded-lg shadow p-6",children:o.jsxs("div",{className:"flex items-center",children:[o.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800",children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.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"})})}),o.jsxs("div",{className:"ml-4",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.totalServers")}),o.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.total})]})]})}),o.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800",children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.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"})})}),o.jsxs("div",{className:"ml-4",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.onlineServers")}),o.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.online})]})]}),o.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:o.jsx("div",{className:"h-full bg-green-500 rounded-full",style:{width:`${i("connected")}%`}})})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800",children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.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"})})}),o.jsxs("div",{className:"ml-4",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.offlineServers")}),o.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.offline})]})]}),o.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:o.jsx("div",{className:"h-full bg-red-500 rounded-full",style:{width:`${i("disconnected")}%`}})})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800",children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o.jsxs("div",{className:"ml-4",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.connectingServers")}),o.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.connecting})]})]}),o.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:o.jsx("div",{className:"h-full bg-yellow-500 rounded-full",style:{width:`${i("connecting")}%`}})})]})]}),t.length>0&&!l&&o.jsxs("div",{className:"mt-8",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:e("pages.dashboard.recentServers")}),o.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[o.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")}),o.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")}),o.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")}),o.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")})]})}),o.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:t.slice(0,5).map((u,c)=>{var f;return o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:u.name}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:o.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${u.status==="connected"?"bg-green-100 text-green-800":u.status==="disconnected"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:e(r[u.status]||u.status)})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((f=u.tools)==null?void 0:f.length)||0}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u.enabled!==!1?o.jsx("span",{className:"text-green-600",children:"✓"}):o.jsx("span",{className:"text-red-600",children:"✗"})})]},c)})})]})})]})]})},Lb={default:"bg-blue-500 text-white hover:bg-blue-600",secondary:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600",outline:"bg-transparent border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800",destructive:"bg-red-500 text-white hover:bg-red-600"};function ks({children:e,variant:t="default",className:a,onClick:n}){return o.jsx("span",{className:va("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",Lb[t],n?"cursor-pointer":"",a),onClick:n,children:e})}const Ub=({status:e})=>{const{t}=W(),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 o.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${a[e]}`,children:t(n[e]||e)})},_b=({tool:e})=>{const[t,a]=x.useState(!1);return o.jsxs("div",{className:"bg-white shadow rounded-lg p-4 mb-4",children:[o.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>a(!t),children:[o.jsx("h3",{className:"text-lg font-medium text-gray-900",children:e.name}),o.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:t?o.jsx(Ng,{size:18}):o.jsx(jg,{size:18})})]}),t&&o.jsxs("div",{className:"mt-4",children:[o.jsx("p",{className:"text-gray-600 mb-2",children:e.description||"No description available"}),o.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Input Schema:"}),o.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(e.inputSchema,null,2)})]})]})]})},Yg=({isOpen:e,onClose:t,onConfirm:a,serverName:n,isGroup:l=!1})=>{const{t:s}=W();return e?o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-30 z-50 flex items-center justify-center p-4",children:o.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:o.jsxs("div",{className:"p-6",children:[o.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:s(l?"groups.confirmDelete":"server.confirmDelete")}),o.jsx("p",{className:"text-gray-500 mb-6",children:l?s("groups.deleteWarning",{name:n}):s("server.deleteWarning",{name:n})}),o.jsxs("div",{className:"flex justify-end space-x-3",children:[o.jsx("button",{onClick:t,className:"px-4 py-2 text-gray-600 hover:text-gray-800",children:s("common.cancel")}),o.jsx("button",{onClick:a,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:s("common.delete")})]})]})})}):null},Hb=({server:e,onRemove:t,onEdit:a,onToggle:n})=>{const{t:l}=W(),{showToast:s}=us(),[r,i]=x.useState(!1),[u,c]=x.useState(!1),[f,m]=x.useState(!1),[d,y]=x.useState(!1),[S,b]=x.useState(!1),w=x.useRef(null);x.useEffect(()=>{const N=E=>{w.current&&!w.current.contains(E.target)&&y(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]);const p=N=>{N.stopPropagation(),c(!0)},h=N=>{N.stopPropagation(),a(e)},g=async N=>{if(N.stopPropagation(),!(f||!n)){m(!0);try{await n(e,e.enabled===!1)}finally{m(!1)}}},v=N=>{N.stopPropagation(),y(!d)},j=N=>{if(N.stopPropagation(),!!e.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(e.error).then(()=>{b(!0),s(l("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>b(!1),2e3)});else{const E=document.createElement("textarea");E.value=e.error,E.style.position="fixed",E.style.left="-9999px",document.body.appendChild(E),E.focus(),E.select();try{document.execCommand("copy"),b(!0),s(l("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>b(!1),2e3)}catch(A){s(l("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",A)}document.body.removeChild(E)}},C=()=>{t(e.name),c(!1)};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 ${e.enabled===!1?"opacity-60":""}`,children:[o.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>i(!r),children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("h2",{className:`text-xl font-semibold ${e.enabled===!1?"text-gray-600":"text-gray-900"}`,children:e.name}),o.jsx(Ub,{status:e.status}),e.error&&o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"cursor-pointer",onClick:v,"aria-label":l("server.viewErrorDetails"),children:o.jsx(Y1,{className:"text-red-500 hover:text-red-600",size:18})}),d&&o.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:[o.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:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("h4",{className:"text-sm font-medium text-red-600",children:l("server.errorDetails")}),o.jsx("button",{onClick:j,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:l("common.copy"),children:S?o.jsx(Fu,{size:14,className:"text-green-500"}):o.jsx(Eg,{size:14})})]}),o.jsx("button",{onClick:N=>{N.stopPropagation(),y(!1)},className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),o.jsx("div",{className:"p-4 pt-2",children:o.jsx("pre",{className:"text-sm text-gray-700 break-words whitespace-pre-wrap",children:e.error})})]})]})]}),o.jsxs("div",{className:"flex space-x-2",children:[o.jsx("button",{onClick:h,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm",children:l("server.edit")}),o.jsx("div",{className:"flex items-center",children:o.jsx("button",{onClick:g,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")})}),o.jsx("button",{onClick:p,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:l("server.delete")}),o.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:r?o.jsx(Ng,{size:18}):o.jsx(jg,{size:18})})]})]}),r&&e.tools&&o.jsxs("div",{className:"mt-6",children:[o.jsx("h3",{className:`text-lg font-medium ${e.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:l("server.tools")}),o.jsx("div",{className:"space-y-4",children:e.tools.map((N,E)=>o.jsx(_b,{tool:N},E))})]})]}),o.jsx(Yg,{isOpen:u,onClose:()=>c(!1),onConfirm:C,serverName:e.name})]})},Iu=({onSubmit:e,onCancel:t,initialData:a=null,modalTitle:n,formError:l=null})=>{const{t:s}=W(),r=()=>!a||!a.config?"stdio":a.config.type?a.config.type:a.config.url?"sse":"stdio",[i,u]=x.useState(r()),[c,f]=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||[],type:r(),env:[]}),[m,d]=x.useState(a&&a.config&&a.config.env?Object.entries(a.config.env).map(([N,E])=>({key:N,value:E})):[]),[y,S]=x.useState(null),b=!!a,w=N=>{const{name:E,value:A}=N.target;f({...c,[E]:A})},p=N=>{let E=N.split(" ").filter(A=>A.trim()!=="");f({...c,arguments:N,args:E})},h=N=>{u(N),f(E=>({...E,type:N}))},g=(N,E,A)=>{const R=[...m];R[N][E]=A,d(R)},v=()=>{d([...m,{key:"",value:""}])},j=N=>{const E=[...m];E.splice(N,1),d(E)},C=async N=>{N.preventDefault(),S(null);try{const E={};m.forEach(({key:R,value:_})=>{R.trim()&&(E[R.trim()]=_)});const A={name:c.name,config:{type:i,...i==="sse"||i==="streamable-http"?{url:c.url}:{command:c.command,args:c.args,env:Object.keys(E).length>0?E:void 0}}};e(A)}catch(E){S(`Error: ${E instanceof Error?E.message:String(E)}`)}};return o.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-xl max-h-screen overflow-y-auto",children:[o.jsxs("div",{className:"flex justify-between items-center mb-4",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:n}),o.jsx("button",{onClick:t,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(y||l)&&o.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:l||y}),o.jsxs("form",{onSubmit:C,children:[o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:s("server.name")}),o.jsx("input",{type:"text",name:"name",id:"name",value:c.name,onChange:w,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:b})]}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:s("server.type")}),o.jsxs("div",{className:"flex space-x-4",children:[o.jsxs("div",{children:[o.jsx("input",{type:"radio",id:"command",name:"serverType",value:"command",checked:i==="stdio",onChange:()=>h("stdio"),className:"mr-1"}),o.jsx("label",{htmlFor:"command",children:"STDIO"})]}),o.jsxs("div",{children:[o.jsx("input",{type:"radio",id:"url",name:"serverType",value:"url",checked:i==="sse",onChange:()=>h("sse"),className:"mr-1"}),o.jsx("label",{htmlFor:"url",children:"SSE"})]}),o.jsxs("div",{children:[o.jsx("input",{type:"radio",id:"streamable-http",name:"serverType",value:"streamable-http",checked:i==="streamable-http",onChange:()=>h("streamable-http"),className:"mr-1"}),o.jsx("label",{htmlFor:"streamable-http",children:"Streamable HTTP"})]})]})]}),i==="sse"||i==="streamable-http"?o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"url",children:s("server.url")}),o.jsx("input",{type:"url",name:"url",id:"url",value:c.url,onChange:w,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:i==="streamable-http"?"e.g.: http://localhost:3000/mcp":"e.g.: http://localhost:3000/sse",required:i==="sse"||i==="streamable-http"})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"command",children:s("server.command")}),o.jsx("input",{type:"text",name:"command",id:"command",value:c.command,onChange:w,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:i==="stdio"})]}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"arguments",children:s("server.arguments")}),o.jsx("input",{type:"text",name:"arguments",id:"arguments",value:c.arguments,onChange:N=>p(N.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:i==="stdio"})]}),o.jsxs("div",{className:"mb-4",children:[o.jsxs("div",{className:"flex justify-between items-center mb-2",children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:s("server.envVars")}),o.jsxs("button",{type:"button",onClick:v,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")]})]}),m.map((N,E)=>o.jsxs("div",{className:"flex items-center mb-2",children:[o.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[o.jsx("input",{type:"text",value:N.key,onChange:A=>g(E,"key",A.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")}),o.jsx("span",{className:"flex items-center",children:":"}),o.jsx("input",{type:"text",value:N.value,onChange:A=>g(E,"value",A.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")})]}),o.jsxs("button",{type:"button",onClick:()=>j(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))]})]}),o.jsxs("div",{className:"flex justify-end mt-6",children:[o.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")}),o.jsx("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:s(b?"server.save":"server.add")})]})]})]})},Bb=({onAdd:e})=>{const{t}=W(),[a,n]=x.useState(!1),[l,s]=x.useState(null),r=()=>{n(!a),s(null)},i=async u=>{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(u)}),m=await f.json();if(!f.ok){m&&m.message?s(m.message):f.status===400?s(t("server.invalidData")):f.status===409?s(t("server.alreadyExists",{serverName:u.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 o.jsxs("div",{children:[o.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&&o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsx(Iu,{onSubmit:i,onCancel:r,modalTitle:t("server.addServer"),formError:l})})]})},Gb=({server:e,onEdit:t,onCancel:a})=>{const{t:n}=W(),[l,s]=x.useState(null),r=async i=>{try{s(null);const u=localStorage.getItem("mcphub_token"),c=await fetch(`/api/servers/${e.name}`,{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":u||""},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(u){console.error("Error updating server:",u),navigator.onLine?u instanceof TypeError&&(u.message.includes("NetworkError")||u.message.includes("Failed to fetch"))?s(n("errors.serverConnection")):s(n("errors.serverUpdate",{serverName:e.name})):s(n("errors.network"))}};return o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsx(Iu,{onSubmit:r,onCancel:a,initialData:e,modalTitle:n("server.editTitle",{serverName:e.name}),formError:l})})},Vb=()=>{const{t:e}=W(),t=Qa(),{servers:a,error:n,setError:l,isLoading:s,handleServerAdd:r,handleServerEdit:i,handleServerRemove:u,handleServerToggle:c,triggerRefresh:f}=cs(),[m,d]=x.useState(null),[y,S]=x.useState(!1),b=async h=>{const g=await i(h);g&&d(g)},w=()=>{d(null),f()},p=async()=>{S(!0);try{f(),await new Promise(h=>setTimeout(h,500))}finally{S(!1)}};return o.jsxs("div",{children:[o.jsxs("div",{className:"flex justify-between items-center mb-8",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:e("pages.servers.title")}),o.jsxs("div",{className:"flex space-x-4",children:[o.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:[o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:o.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")]}),o.jsx(Bb,{onAdd:r}),o.jsxs("button",{onClick:p,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?o.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:[o.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.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"})]}):o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:o.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&&o.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-red-600 text-lg font-medium",children:e("app.error")}),o.jsx("p",{className:"text-gray-600 mt-1",children:n})]}),o.jsx("button",{onClick:()=>l(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":e("app.closeButton"),children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.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?o.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center",children:[o.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:[o.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.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"})]}),o.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):a.length===0?o.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:o.jsx("p",{className:"text-gray-600",children:e("app.noServers")})}):o.jsx("div",{className:"space-y-6",children:a.map((h,g)=>o.jsx(Hb,{server:h,onRemove:u,onEdit:b,onToggle:c},g))}),m&&o.jsx(Gb,{server:m,onEdit:w,onCancel:()=>d(null)})]})},ec=()=>{const{t:e}=W(),[t,a]=x.useState([]),[n,l]=x.useState(!0),[s,r]=x.useState(null),[i,u]=x.useState(0),c=x.useCallback(async()=>{try{l(!0);const p=localStorage.getItem("mcphub_token"),h=await fetch("/api/groups",{headers:{"x-auth-token":p||""}});if(!h.ok)throw new Error(`Status: ${h.status}`);const g=await h.json();g&&g.success&&Array.isArray(g.data)?a(g.data):(console.error("Invalid group data format:",g),a([])),r(null)}catch(p){console.error("Error fetching groups:",p),r(p instanceof Error?p.message:"Failed to fetch groups"),a([])}finally{l(!1)}},[]),f=x.useCallback(()=>{u(p=>p+1)},[]),m=async(p,h,g=[])=>{try{const v=localStorage.getItem("mcphub_token"),j=await fetch("/api/groups",{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":v||""},body:JSON.stringify({name:p,description:h,servers:g})}),C=await j.json();return j.ok?(f(),C.data||null):(r(C.message||e("groups.createError")),null)}catch(v){return r(v instanceof Error?v.message:"Failed to create group"),null}},d=async(p,h)=>{try{const g=localStorage.getItem("mcphub_token"),v=await fetch(`/api/groups/${p}`,{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify(h)}),j=await v.json();return v.ok?(f(),j.data||null):(r(j.message||e("groups.updateError")),null)}catch(g){return r(g instanceof Error?g.message:"Failed to update group"),null}},y=async(p,h)=>{try{const g=localStorage.getItem("mcphub_token"),v=await fetch(`/api/groups/${p}/servers/batch`,{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify({servers:h})}),j=await v.json();return v.ok?(f(),j.data||null):(r(j.message||e("groups.updateError")),null)}catch(g){return r(g instanceof Error?g.message:"Failed to update group servers"),null}},S=async p=>{try{const h=localStorage.getItem("mcphub_token"),g=await fetch(`/api/groups/${p}`,{method:"DELETE",headers:{"x-auth-token":h||""}}),v=await g.json();return g.ok?(f(),!0):(r(v.message||e("groups.deleteError")),!1)}catch(h){return r(h instanceof Error?h.message:"Failed to delete group"),!1}},b=async(p,h)=>{try{const g=localStorage.getItem("mcphub_token"),v=await fetch(`/api/groups/${p}/servers`,{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify({serverName:h})}),j=await v.json();return v.ok?(f(),j.data||null):(r(j.message||e("groups.serverAddError")),null)}catch(g){return r(g instanceof Error?g.message:"Failed to add server to group"),null}},w=async(p,h)=>{try{const g=localStorage.getItem("mcphub_token"),v=await fetch(`/api/groups/${p}/servers/${h}`,{method:"DELETE",headers:{"x-auth-token":g||""}}),j=await v.json();return v.ok?(f(),j.data||null):(r(j.message||e("groups.serverRemoveError")),null)}catch(g){return r(g instanceof Error?g.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:m,updateGroup:d,updateGroupServers:y,deleteGroup:S,addServerToGroup:b,removeServerFromGroup:w}},qb=({value:e,isSelected:t,onClick:a,children:n})=>o.jsxs("button",{type:"button",role:"checkbox","aria-checked":t,className:va("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:[o.jsx("span",{className:"flex items-center",children:n}),t&&o.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:o.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"})})]}),$g=({label:e,helpText:t,noOptionsText:a="No options available",values:n,options:l,onChange:s,className:r})=>{const i=u=>{const c=n.includes(u);s(c?n.filter(f=>f!==u):[...n,u])};return o.jsxs("div",{className:r,children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:e}),o.jsx("div",{className:"border rounded shadow max-h-60 overflow-y-auto",children:l.length===0?o.jsx("p",{className:"text-gray-500 text-sm p-3",children:a}):o.jsx("div",{className:"space-y-1 p-1",children:l.map(u=>o.jsx(qb,{value:u.value,isSelected:n.includes(u.value),onClick:()=>i(u.value),children:u.label},u.value))})}),t&&o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:t})]})},Di=({checked:e,onCheckedChange:t,disabled:a=!1})=>o.jsx("button",{type:"button",role:"switch","aria-checked":e,disabled:a,className:va("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:o.jsx("span",{className:va("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",e?"translate-x-6":"translate-x-1")})}),Yb=({onAdd:e,onCancel:t})=>{const{t:a}=W(),{createGroup:n}=ec(),{servers:l}=cs(),[s,r]=x.useState([]),[i,u]=x.useState(null),[c,f]=x.useState(!1),[m,d]=x.useState({name:"",description:"",servers:[]});x.useEffect(()=>{r(l.filter(b=>b.enabled!==!1))},[l]);const y=b=>{const{name:w,value:p}=b.target;d(h=>({...h,[w]:p}))},S=async b=>{b.preventDefault(),f(!0),u(null);try{if(!m.name.trim()){u(a("groups.nameRequired")),f(!1);return}if(!await n(m.name,m.description,m.servers)){u(a("groups.createError")),f(!1);return}e()}catch(w){u(w instanceof Error?w.message:String(w)),f(!1)}};return o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:o.jsxs("div",{className:"p-6",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:a("groups.addNew")}),i&&o.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:i}),o.jsxs("form",{onSubmit:S,children:[o.jsxs("div",{className:"mb-4",children:[o.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[a("groups.name")," *"]}),o.jsx("input",{type:"text",id:"name",name:"name",value:m.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})]}),o.jsx($g,{className:"mb-6",label:a("groups.servers"),noOptionsText:a("groups.noServerOptions"),values:m.servers,options:s.map(b=>({value:b.name,label:b.name})),onChange:b=>d(w=>({...w,servers:b}))}),o.jsxs("div",{className:"flex justify-end space-x-3",children:[o.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:c,children:a("common.cancel")}),o.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")})]})]})]})})})},$b=({group:e,onEdit:t,onCancel:a})=>{const{t:n}=W(),{updateGroup:l}=ec(),{servers:s}=cs(),[r,i]=x.useState([]),[u,c]=x.useState(null),[f,m]=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:p,value:h}=w.target;y(g=>({...g,[p]:h}))},b=async w=>{w.preventDefault(),m(!0),c(null);try{if(!d.name.trim()){c(n("groups.nameRequired")),m(!1);return}if(!await l(e.id,{name:d.name,description:d.description,servers:d.servers})){c(n("groups.updateError")),m(!1);return}t()}catch(p){c(p instanceof Error?p.message:String(p)),m(!1)}};return o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:o.jsxs("div",{className:"p-6",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:n("groups.edit")}),u&&o.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:u}),o.jsxs("form",{onSubmit:b,children:[o.jsxs("div",{className:"mb-4",children:[o.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[n("groups.name")," *"]}),o.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})]}),o.jsx($g,{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(p=>({...p,servers:w}))}),o.jsxs("div",{className:"flex justify-end space-x-3",children:[o.jsx("button",{type:"button",onClick:a,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:f,children:n("common.cancel")}),o.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")})]})]})]})})})},Kb=({group:e,servers:t,onEdit:a,onDelete:n})=>{const{t:l}=W(),{showToast:s}=us(),[r,i]=x.useState(!1),[u,c]=x.useState(!1),f=()=>{a(e)},m=()=>{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 b=document.createElement("textarea");b.value=e.id,b.style.position="fixed",b.style.left="-9999px",document.body.appendChild(b),b.focus(),b.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(b)}},S=t.filter(b=>e.servers.includes(b.name));return o.jsxs("div",{className:"bg-white shadow rounded-lg p-6",children:[o.jsxs("div",{className:"flex justify-between items-center mb-4",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:e.name}),o.jsxs("div",{className:"flex items-center ml-3",children:[o.jsx("span",{className:"text-xs text-gray-500 mr-1",children:e.id}),o.jsx("button",{onClick:y,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:l("common.copy"),children:u?o.jsx(Fu,{size:14,className:"text-green-500"}):o.jsx(Eg,{size:14})})]})]}),e.description&&o.jsx("p",{className:"text-gray-600 text-sm mt-1",children:e.description})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[o.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})}),o.jsx("button",{onClick:f,className:"text-gray-500 hover:text-gray-700",title:l("groups.edit"),children:o.jsx(av,{size:18})}),o.jsx("button",{onClick:m,className:"text-gray-500 hover:text-red-600",title:l("groups.delete"),children:o.jsx(rv,{size:18})})]})]}),o.jsx("div",{className:"mt-4",children:S.length===0?o.jsx("p",{className:"text-gray-500 italic",children:l("groups.noServers")}):o.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:S.map(b=>o.jsxs("div",{className:"inline-flex items-center px-3 py-1 bg-gray-50 rounded",children:[o.jsx("span",{className:"font-medium text-gray-700 text-sm",children:b.name}),o.jsx("span",{className:`ml-2 inline-block h-2 w-2 rounded-full ${b.status==="connected"?"bg-green-500":b.status==="connecting"?"bg-yellow-500":"bg-red-500"}`})]},b.name))})}),o.jsx(Yg,{isOpen:r,onClose:()=>i(!1),onConfirm:d,serverName:e.name,isGroup:!0})]})},Qb=()=>{const{t:e}=W(),{groups:t,loading:a,error:n,setError:l,deleteGroup:s,triggerRefresh:r}=ec(),{servers:i}=cs(),[u,c]=x.useState(null),[f,m]=x.useState(!1),d=p=>{c(p)},y=()=>{c(null),r()},S=async p=>{await s(p)||l(e("groups.deleteError"))},b=()=>{m(!0)},w=()=>{m(!1),r()};return o.jsxs("div",{children:[o.jsxs("div",{className:"flex justify-between items-center mb-8",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:e("pages.groups.title")}),o.jsx("div",{className:"flex space-x-4",children:o.jsxs("button",{onClick:b,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:o.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&&o.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:o.jsx("p",{children:n})}),a?o.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:o.jsxs("div",{className:"flex flex-col items-center justify-center",children:[o.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:[o.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.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"})]}),o.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):t.length===0?o.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:o.jsx("p",{className:"text-gray-600",children:e("groups.noGroups")})}):o.jsx("div",{className:"space-y-6",children:t.map(p=>o.jsx(Kb,{group:p,servers:i,onEdit:d,onDelete:S},p.id))}),f&&o.jsx(Yb,{onAdd:w,onCancel:w}),u&&o.jsx($b,{group:u,onEdit:y,onCancel:()=>c(null)})]})},Xb=({onSuccess:e,onCancel:t})=>{const{t:a}=W(),[n,l]=x.useState({currentPassword:"",newPassword:""}),[s,r]=x.useState(""),[i,u]=x.useState(!1),[c,f]=x.useState(null),[m,d]=x.useState(!1),y=b=>{const{name:w,value:p}=b.target;w==="confirmPassword"?r(p):l(h=>({...h,[w]:p}))},S=async b=>{if(b.preventDefault(),f(null),n.newPassword!==s){f(a("auth.passwordsNotMatch"));return}u(!0);try{const w=await M1(n);w.success?(d(!0),e&&e()):f(w.message||a("auth.changePasswordError"))}catch{f(a("auth.changePasswordError"))}finally{u(!1)}};return o.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[o.jsx("h2",{className:"text-xl font-bold mb-4",children:a("auth.changePassword")}),m?o.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:a("auth.changePasswordSuccess")}):o.jsxs("form",{onSubmit:S,children:[c&&o.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:c}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:a("auth.currentPassword")}),o.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})]}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:a("auth.newPassword")}),o.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})]}),o.jsxs("div",{className:"mb-6",children:[o.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:a("auth.confirmPassword")}),o.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})]}),o.jsxs("div",{className:"flex justify-end space-x-2",children:[t&&o.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")}),o.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?o.jsxs("span",{className:"flex items-center",children:[o.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:[o.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.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")})]})]})]})},Zb=()=>{const{t:e}=W(),{showToast:t}=us(),[a,n]=x.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:""}),[l,s]=x.useState({bearerAuthKey:""}),[r,i]=x.useState({pythonIndexUrl:"",npmRegistry:""}),[u,c]=x.useState(!1),[f,m]=x.useState(null),[d,y]=x.useState(0),S=x.useCallback(()=>{y(h=>h+1)},[]),b=x.useCallback(async()=>{var h,g,v,j;c(!0),m(null);try{const C=localStorage.getItem("mcphub_token"),N=await fetch("/api/settings",{headers:{"x-auth-token":C||""}});if(!N.ok)throw new Error(`HTTP error! Status: ${N.status}`);const E=await N.json();E.success&&((g=(h=E.data)==null?void 0:h.systemConfig)!=null&&g.routing)&&n({enableGlobalRoute:E.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:E.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:E.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:E.data.systemConfig.routing.bearerAuthKey||""}),E.success&&((j=(v=E.data)==null?void 0:v.systemConfig)!=null&&j.install)&&i({pythonIndexUrl:E.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:E.data.systemConfig.install.npmRegistry||""})}catch(C){console.error("Failed to fetch settings:",C),m(C instanceof Error?C.message:"Failed to fetch settings"),t(e("errors.failedToFetchSettings"))}finally{c(!1)}},[e,t]),w=async(h,g)=>{c(!0),m(null);try{const v=localStorage.getItem("mcphub_token"),j=await fetch("/api/system-config",{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":v||""},body:JSON.stringify({routing:{[h]:g}})});if(!j.ok)throw new Error(`HTTP error! Status: ${j.status}`);return(await j.json()).success?(n({...a,[h]:g}),t(e("settings.systemConfigUpdated")),!0):(t(e("errors.failedToUpdateRouteConfig")),!1)}catch(v){return console.error("Failed to update routing config:",v),m(v instanceof Error?v.message:"Failed to update routing config"),t(e("errors.failedToUpdateRouteConfig")),!1}finally{c(!1)}},p=async(h,g)=>{c(!0),m(null);try{const v=localStorage.getItem("mcphub_token"),j=await fetch("/api/system-config",{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":v||""},body:JSON.stringify({install:{[h]:g}})});if(!j.ok)throw new Error(`HTTP error! Status: ${j.status}`);return(await j.json()).success?(i({...r,[h]:g}),t(e("settings.systemConfigUpdated")),!0):(t(e("errors.failedToUpdateSystemConfig")),!1)}catch(v){return console.error("Failed to update system config:",v),m(v instanceof Error?v.message:"Failed to update system config"),t(e("errors.failedToUpdateSystemConfig")),!1}finally{c(!1)}};return x.useEffect(()=>{b()},[b,d]),x.useEffect(()=>{a&&s({bearerAuthKey:a.bearerAuthKey})},[a]),{routingConfig:a,tempRoutingConfig:l,setTempRoutingConfig:s,installConfig:r,loading:u,error:f,setError:m,triggerRefresh:S,fetchSettings:b,updateRoutingConfig:w,updateInstallConfig:p}};function Jb(e=32){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=new Uint8Array(e);return crypto.getRandomValues(a),Array.from(a).map(n=>t.charAt(n%t.length)).join("")}const Fb=()=>{const{t:e,i18n:t}=W(),a=Qa(),{showToast:n}=us(),[l,s]=x.useState(t.language);x.useEffect(()=>{s(t.language)},[t.language]);const[r,i]=x.useState({pythonIndexUrl:"",npmRegistry:""}),{routingConfig:u,tempRoutingConfig:c,setTempRoutingConfig:f,installConfig:m,loading:d,updateRoutingConfig:y,updateInstallConfig:S}=Zb();x.useEffect(()=>{m&&i(m)},[m]);const[b,w]=x.useState({routingConfig:!1,installConfig:!1,password:!1}),p=A=>{w(R=>({...R,[A]:!R[A]}))},h=async(A,R)=>{if(await y(A,R),A==="enableBearerAuth"&&R===!0&&!c.bearerAuthKey){const _=Jb();g(_),await y("bearerAuthKey",_)}},g=A=>{f(R=>({...R,bearerAuthKey:A}))},v=async()=>{await y("bearerAuthKey",c.bearerAuthKey)},j=(A,R)=>{i({...r,[A]:R})},C=async A=>{await S(A,r[A])},N=()=>{setTimeout(()=>{a("/")},2e3)},E=A=>{localStorage.setItem("i18nextLng",A),window.location.reload()};return o.jsxs("div",{className:"container mx-auto",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:e("pages.settings.title")}),o.jsx("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"font-semibold text-gray-800",children:e("pages.settings.language")}),o.jsxs("div",{className:"flex space-x-3",children:[o.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:()=>E("en"),children:"English"}),o.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:()=>E("zh"),children:"中文"})]})]})}),o.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[o.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>p("routingConfig"),children:[o.jsx("h2",{className:"font-semibold text-gray-800",children:e("pages.settings.routeConfig")}),o.jsx("span",{className:"text-gray-500",children:b.routingConfig?"▼":"►"})]}),b.routingConfig&&o.jsxs("div",{className:"space-y-4 mt-4",children:[o.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.enableBearerAuth")}),o.jsx("p",{className:"text-sm text-gray-500",children:e("settings.enableBearerAuthDescription")})]}),o.jsx(Di,{disabled:d,checked:u.enableBearerAuth,onCheckedChange:A=>h("enableBearerAuth",A)})]}),u.enableBearerAuth&&o.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[o.jsxs("div",{className:"mb-2",children:[o.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.bearerAuthKey")}),o.jsx("p",{className:"text-sm text-gray-500",children:e("settings.bearerAuthKeyDescription")})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("input",{type:"text",value:c.bearerAuthKey,onChange:A=>g(A.target.value),placeholder:e("settings.bearerAuthKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:d||!u.enableBearerAuth}),o.jsx("button",{onClick:v,disabled:d||!u.enableBearerAuth,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:e("common.save")})]})]}),o.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.enableGlobalRoute")}),o.jsx("p",{className:"text-sm text-gray-500",children:e("settings.enableGlobalRouteDescription")})]}),o.jsx(Di,{disabled:d,checked:u.enableGlobalRoute,onCheckedChange:A=>h("enableGlobalRoute",A)})]}),o.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.enableGroupNameRoute")}),o.jsx("p",{className:"text-sm text-gray-500",children:e("settings.enableGroupNameRouteDescription")})]}),o.jsx(Di,{disabled:d,checked:u.enableGroupNameRoute,onCheckedChange:A=>h("enableGroupNameRoute",A)})]})]})]}),o.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[o.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>p("installConfig"),children:[o.jsx("h2",{className:"font-semibold text-gray-800",children:e("settings.installConfig")}),o.jsx("span",{className:"text-gray-500",children:b.installConfig?"▼":"►"})]}),b.installConfig&&o.jsxs("div",{className:"space-y-4 mt-4",children:[o.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[o.jsxs("div",{className:"mb-2",children:[o.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.pythonIndexUrl")}),o.jsx("p",{className:"text-sm text-gray-500",children:e("settings.pythonIndexUrlDescription")})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("input",{type:"text",value:r.pythonIndexUrl,onChange:A=>j("pythonIndexUrl",A.target.value),placeholder:e("settings.pythonIndexUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:d}),o.jsx("button",{onClick:()=>C("pythonIndexUrl"),disabled:d,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:e("common.save")})]})]}),o.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[o.jsxs("div",{className:"mb-2",children:[o.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.npmRegistry")}),o.jsx("p",{className:"text-sm text-gray-500",children:e("settings.npmRegistryDescription")})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("input",{type:"text",value:r.npmRegistry,onChange:A=>j("npmRegistry",A.target.value),placeholder:e("settings.npmRegistryPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:d}),o.jsx("button",{onClick:()=>C("npmRegistry"),disabled:d,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:e("common.save")})]})]})]})]}),o.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[o.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>p("password"),children:[o.jsx("h2",{className:"font-semibold text-gray-800",children:e("auth.changePassword")}),o.jsx("span",{className:"text-gray-500",children:b.password?"▼":"►"})]}),b.password&&o.jsx("div",{className:"max-w-lg mt-4",children:o.jsx(Xb,{onSuccess:N})})]})]})},Pb=()=>{const{t:e}=W(),[t,a]=x.useState([]),[n,l]=x.useState([]),[s,r]=x.useState([]),[i,u]=x.useState([]),[c,f]=x.useState(""),[m,d]=x.useState(""),[y,S]=x.useState(""),[b,w]=x.useState(!0),[p,h]=x.useState(null),[g,v]=x.useState(null),[j,C]=x.useState([]),[N,E]=x.useState(1),[A,R]=x.useState(9),[_,te]=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),h(e("market.fetchError")))}catch(D){console.error("Error fetching market servers:",D),h(D instanceof Error?D.message:String(D))}finally{w(!1)}},[e]),Z=x.useCallback((D,L,G=A)=>{const q=D.length,Jt=Math.ceil(q/G);te(Jt);const Zn=Math.max(1,Math.min(L,Jt));Zn!==L&&E(Zn);const fs=(Zn-1)*G,Jn=D.slice(fs,fs+G);a(Jn)},[A]),oe=x.useCallback(D=>{E(D),Z(n,D,A)},[n,Z,A]),k=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)}},[]),H=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)?u(G.data):console.error("Invalid tags data format:",G)}catch(D){console.error("Error fetching tags:",D)}},[]),z=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 q=await G.json();return q&&q.success&&q.data?(v(q.data),q.data):(console.error("Invalid server data format:",q),h(e("market.serverNotFound")),null)}catch(L){return console.error(`Error fetching server ${D}:`,L),h(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 q=await G.json();q&&q.success&&Array.isArray(q.data)?(l(q.data),E(1),Z(q.data,1)):(console.error("Invalid search results format:",q),h(e("market.searchError")))}catch(L){console.error("Error searching servers:",L),h(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 q=await G.json();q&&q.success&&Array.isArray(q.data)?(l(q.data),E(1),Z(q.data,1)):(console.error("Invalid category filter results format:",q),h(e("market.filterError")))}catch(L){console.error("Error filtering servers by category:",L),h(L instanceof Error?L.message:String(L))}finally{w(!1)}},[e,me,Z]),Oe=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 q=await G.json();q&&q.success&&Array.isArray(q.data)?(l(q.data),E(1),Z(q.data,1)):(console.error("Invalid tag filter results format:",q),h(e("market.tagFilterError")))}catch(L){console.error("Error filtering servers by tag:",L),h(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 q=G.data.map(Jt=>Jt.name);C(q)}}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 q=(L=D.installations)!=null&&L.npm?"npm":Object.keys(D.installations||{}).length>0?Object.keys(D.installations)[0]:null;if(!q||!((G=D.installations)!=null&&G[q]))return h(e("market.noInstallationMethod")),!1;const Jt=D.installations[q],Zn={name:D.name,config:{command:Jt.command,args:Jt.args,env:Jt.env||{}}},fs=localStorage.getItem("mcphub_token"),Jn=await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":fs||""},body:JSON.stringify(Zn)});if(!Jn.ok){const Fg=await Jn.json();throw new Error(Fg.message||`Status: ${Jn.status}`)}return await Me(),!0}catch(q){return console.error("Error installing server:",q),h(q instanceof Error?q.message:String(q)),!1}},[e,Me]),mt=x.useCallback(D=>{R(D),E(1),Z(n,1,D)},[n,Z]);return x.useEffect(()=>{me(),k(),H(),Me()},[me,k,H,Me]),{servers:t,allServers:n,categories:s,tags:i,selectedCategory:c,selectedTag:m,searchQuery:y,loading:b,error:p,setError:h,currentServer:g,fetchMarketServers:me,fetchServerByName:z,searchServers:U,filterByCategory:J,filterByTag:Oe,installServer:pe,currentPage:N,totalPages:_,serversPerPage:A,changePage:oe,changeServersPerPage:mt,isServerInstalled:F}},Wb=({server:e,onClick:t})=>{var i,u,c,f;const{t:a}=W(),n=()=>{if(!e.tags||e.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const m=28,d=h=>h.length+3;let y=0,S=0;const b=[...e.tags].sort((h,g)=>h.length-g.length);for(S=0;S<b.length;S++){const h=d(b[S]);if(y+h>m)break;if(y+=h,S===b.length-1)return{tagsToShow:b,hasMore:!1,moreCount:0}}S===0&&b.length>0&&(S=1);const w=b.length-S,p=3+String(w).length+a("market.moreTags").length;return y+p<=m||S<1?{tagsToShow:b.slice(0,S),hasMore:!0,moreCount:w}:{tagsToShow:b.slice(0,Math.max(1,S-1)),hasMore:!0,moreCount:w+1}},{tagsToShow:l,hasMore:s,moreCount:r}=n();return o.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:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-1 mr-2",children:e.display_name}),e.is_official&&o.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")})]}),o.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:e.description}),o.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((m,d)=>o.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:m},d)):o.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),o.jsx("div",{className:"relative mb-3 min-h-[28px] overflow-x-auto",children:((u=e.tags)==null?void 0:u.length)>0?o.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[l.map((m,d)=>o.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",m]},d)),s&&o.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")]})]}):o.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),o.jsxs("div",{className:"flex justify-between items-center mt-auto pt-2 text-xs text-gray-500 border-t border-gray-100",children:[o.jsxs("div",{className:"overflow-hidden",children:[o.jsxs("span",{className:"whitespace-nowrap",children:[a("market.by")," "]}),o.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")})]}),o.jsxs("div",{className:"flex items-center flex-shrink-0",children:[o.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:o.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"})}),o.jsxs("span",{children:[((f=e.tools)==null?void 0:f.length)||0," ",a("market.tools")]})]})]})]})},Ib=({server:e,onBack:t,onInstall:a,installing:n=!1,isInstalled:l=!1})=>{var p,h;const{t:s}=W(),[r,i]=x.useState(!1),[u,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")},m=()=>{i(!r),c(null)},d=()=>{l||m()},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 g=Object.keys(e.installations);if(g.length>0)return e.installations[g[0]]},S=async g=>{try{c(null),a(e),i(!1)}catch(v){console.error("Error installing server:",v),c(s("errors.serverInstall"))}},b=f(),w=y();return o.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[o.jsx("div",{className:"mb-4",children:o.jsxs("button",{onClick:t,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[o.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:o.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")]})}),o.jsxs("div",{className:"flex justify-between items-start mb-4",children:[o.jsx("div",{children:o.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[e.display_name,o.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",e.name,")"]}),o.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[s("market.author"),": ",e.author.name," • ",s("market.license"),": ",e.license," •",o.jsx("a",{href:e.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",children:s("market.repository")})]})]})}),o.jsxs("div",{className:"flex items-center",children:[e.is_official&&o.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")}),o.jsx("button",{onClick:d,disabled:b.disabled,className:b.className,children:b.text})]})]}),o.jsx("p",{className:"text-gray-700 mb-6",children:e.description}),o.jsxs("div",{className:"mb-6",children:[o.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[s("market.categories")," & ",s("market.tags")]}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[(p=e.categories)==null?void 0:p.map((g,v)=>o.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:g},`cat-${v}`)),e.tags&&e.tags.map((g,v)=>o.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",g]},`tag-${v}`))]})]}),e.arguments&&Object.keys(e.arguments).length>0&&o.jsxs("div",{className:"mb-6",children:[o.jsx("h3",{className:"text-lg font-semibold mb-3",children:s("market.arguments")}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[o.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")}),o.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")}),o.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")}),o.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")})]})}),o.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(e.arguments).map(([g,v],j)=>o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:g}),o.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:v.description}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:v.required?o.jsx("span",{className:"text-green-600",children:"✓"}):o.jsx("span",{className:"text-red-600",children:"✗"})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:o.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:v.example})})]},j))})]})})]}),o.jsxs("div",{className:"mb-6",children:[o.jsx("h3",{className:"text-lg font-semibold mb-3",children:s("market.tools")}),o.jsx("div",{className:"space-y-4",children:(h=e.tools)==null?void 0:h.map((g,v)=>o.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[o.jsxs("h4",{className:"font-medium mb-2",children:[g.name,o.jsx("button",{type:"button",onClick:()=>{const j=document.getElementById(`schema-${v}`);j&&j.classList.toggle("hidden")},className:"text-sm text-blue-600 hover:underline focus:outline-none ml-2",children:s("market.viewSchema")})]}),o.jsx("p",{className:"text-gray-600 mb-2",children:g.description}),o.jsx("div",{className:"mt-2",children:o.jsx("pre",{id:`schema-${v}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(g.inputSchema,null,2)})})]},v))})]}),e.examples&&e.examples.length>0&&o.jsxs("div",{className:"mb-6",children:[o.jsx("h3",{className:"text-lg font-semibold mb-3",children:s("market.examples")}),o.jsx("div",{className:"space-y-4",children:e.examples.map((g,v)=>o.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[o.jsx("h4",{className:"font-medium mb-2",children:g.title}),o.jsx("p",{className:"text-gray-600 mb-2",children:g.description}),o.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:g.prompt})]},v))})]}),o.jsx("div",{className:"mt-6 flex justify-end",children:o.jsx("button",{onClick:d,disabled:b.disabled,className:b.className,children:b.text})}),r&&o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsx(Iu,{onSubmit:S,onCancel:m,modalTitle:s("market.installServer",{name:e.display_name}),formError:u,initialData:{name:e.name,status:"disconnected",config:w?{command:w.command||"",args:w.args||[],env:w.env||{}}:void 0}})})]})},e2=({currentPage:e,totalPages:t,onPageChange:a})=>{const n=()=>{const l=[];l.push(o.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(o.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let i=r;i<=Math.min(t-1,r+5-3);i++)l.push(o.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(o.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),t>1&&l.push(o.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:o.jsxs("div",{className:"flex justify-center items-center my-6",children:[o.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"}),o.jsx("div",{className:"flex",children:n()}),o.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 »"})]})},Gf=()=>{const{t:e}=W(),t=Qa();Rt();const{serverName:a}=Lx(),{showToast:n}=us(),{servers:l,allServers:s,categories:r,loading:i,error:u,setError:c,searchServers:f,filterByCategory:m,filterByTag:d,selectedCategory:y,selectedTag:S,installServer:b,fetchServerByName:w,isServerInstalled:p,currentPage:h,totalPages:g,changePage:v,serversPerPage:j,changeServersPerPage:C}=Pb(),[N,E]=x.useState(null),[A,R]=x.useState(""),[_,te]=x.useState(!1),[me,Z]=x.useState(!1);x.useEffect(()=>{(async()=>{if(a){const pe=await w(a);pe?E(pe):t("/market")}else E(null)})()},[a,w,t]);const oe=F=>{F.preventDefault(),f(A)},k=F=>{m(F)},H=()=>{R(""),m(""),d("")},z=F=>{t(`/market/${F.name}`)},U=()=>{t("/market")},J=async F=>{try{te(!0),await b(F)&&n(e("market.installSuccess",{serverName:F.display_name}),"success")}finally{te(!1)}},Oe=F=>{v(F),window.scrollTo({top:0,behavior:"smooth"})},Me=F=>{const pe=parseInt(F.target.value,10);C(pe)};return N?o.jsx(Ib,{server:N,onBack:U,onInstall:J,installing:_,isInstalled:p(N.name)}):o.jsxs("div",{children:[o.jsx("div",{className:"flex justify-between items-center mb-8",children:o.jsx("div",{children:o.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center",children:[e("market.title"),o.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:e("pages.market.title").split(" - ")[1]})]})})}),u&&o.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("p",{children:u}),o.jsx("button",{onClick:()=>c(null),className:"text-red-700 hover:text-red-900",children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.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"})})})]})}),o.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:o.jsxs("form",{onSubmit:oe,className:"flex space-x-4 mb-0",children:[o.jsx("div",{className:"flex-grow",children:o.jsx("input",{type:"text",value:A,onChange:F=>R(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"})}),o.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")}),(A||y||S)&&o.jsx("button",{type:"button",onClick:H,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50",children:e("market.clearFilters")})]})}),o.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[o.jsx("div",{className:"md:w-48 flex-shrink-0",children:o.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4",children:r.length>0?o.jsxs("div",{className:"mb-6",children:[o.jsxs("div",{className:"flex justify-between items-center mb-3",children:[o.jsx("h3",{className:"font-medium text-gray-900",children:e("market.categories")}),y&&o.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline",onClick:()=>m(""),children:e("market.clearCategoryFilter")})]}),o.jsx("div",{className:"flex flex-col gap-2",children:r.map(F=>o.jsx("button",{onClick:()=>k(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?o.jsxs("div",{className:"mb-6",children:[o.jsx("div",{className:"mb-3",children:o.jsx("h3",{className:"font-medium text-gray-900",children:e("market.categories")})}),o.jsxs("div",{className:"flex flex-col gap-2 items-center py-4",children:[o.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:[o.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.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"})]}),o.jsx("p",{className:"text-sm text-gray-600",children:e("app.loading")})]})]}):o.jsxs("div",{className:"mb-6",children:[o.jsx("div",{className:"mb-3",children:o.jsx("h3",{className:"font-medium text-gray-900",children:e("market.categories")})}),o.jsx("p",{className:"text-sm text-gray-600 py-2",children:e("market.noCategories")})]})})}),o.jsx("div",{className:"flex-grow",children:i?o.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center",children:[o.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:[o.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.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"})]}),o.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):l.length===0?o.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:o.jsx("p",{className:"text-gray-600",children:e("market.noServers")})}):o.jsxs(o.Fragment,{children:[o.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)=>o.jsx(Wb,{server:F,onClick:z},pe))}),o.jsxs("div",{className:"flex justify-between items-center mb-4",children:[o.jsx("div",{className:"text-sm text-gray-500",children:e("market.showing",{from:(h-1)*j+1,to:Math.min(h*j,s.length),total:s.length})}),o.jsx(e2,{currentPage:h,totalPages:g,onPageChange:Oe}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[e("market.perPage"),":"]}),o.jsxs("select",{id:"perPage",value:j,onChange:Me,className:"border rounded p-1 text-sm",children:[o.jsx("option",{value:"6",children:"6"}),o.jsx("option",{value:"9",children:"9"}),o.jsx("option",{value:"12",children:"12"}),o.jsx("option",{value:"24",children:"24"})]})]})]}),o.jsx("div",{className:"mt-6"})]})})]})]})},t2={default:"bg-blue-500 text-white hover:bg-blue-600 focus:ring-blue-500",outline:"border border-gray-300 dark:border-gray-700 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",ghost:"bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",link:"bg-transparent underline-offset-4 hover:underline text-blue-500 hover:text-blue-600",destructive:"bg-red-500 text-white hover:bg-red-600 focus:ring-red-500"},a2={default:"h-10 py-2 px-4",sm:"h-8 px-3 text-sm",lg:"h-12 px-6",icon:"h-10 w-10 p-0"};function n2({variant:e="default",size:t="default",className:a,disabled:n,children:l,...s}){return o.jsx("button",{className:va("rounded-md inline-flex items-center justify-center font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",t2[e],a2[t],a),disabled:n,...s,children:l})}const l2=({logs:e,isLoading:t=!1,error:a=null,onClear:n})=>{const{t:l}=W(),s=x.useRef(null),[r,i]=x.useState(!0),[u,c]=x.useState(""),[f,m]=x.useState(["info","error","warn","debug"]),[d,y]=x.useState(["main","child"]);x.useEffect(()=>{r&&s.current&&(s.current.scrollTop=s.current.scrollHeight)},[e,r]);const S=e.filter(h=>{const g=u?h.message.toLowerCase().includes(u.toLowerCase()):!0,v=f.includes(h.type),j=d.includes(h.source);return g&&v&&j}),b=h=>new Date(h).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),w=h=>{switch(h){case"error":return"bg-red-400";case"warn":return"bg-yellow-400";case"debug":return"bg-purple-400";default:return"bg-blue-400"}},p=h=>{switch(h){case"main":return"bg-green-400";case"child":return"bg-orange-400";default:return"bg-gray-400"}};return o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"bg-card p-3 rounded-t-md border-b flex flex-wrap items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsxs("span",{className:"font-semibold text-sm",children:[l("logs.filters"),":"]}),o.jsx("input",{type:"text",placeholder:l("logs.search"),className:"px-2 py-1 text-sm border rounded",value:u,onChange:h=>c(h.target.value)}),o.jsx("div",{className:"flex gap-1 items-center",children:["info","error","warn","debug"].map(h=>o.jsx(ks,{variant:f.includes(h)?"default":"outline",className:`cursor-pointer ${f.includes(h)?w(h):""}`,onClick:()=>{f.includes(h)?m(g=>g.filter(v=>v!==h)):m(g=>[...g,h])},children:h},h))}),o.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child"].map(h=>o.jsx(ks,{variant:d.includes(h)?"default":"outline",className:`cursor-pointer ${d.includes(h)?p(h):""}`,onClick:()=>{d.includes(h)?y(g=>g.filter(v=>v!==h)):y(g=>[...g,h])},children:l(h==="main"?"logs.mainProcess":"logs.childProcess")},h))})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[o.jsx("input",{type:"checkbox",checked:r,onChange:()=>i(!r),className:"form-checkbox h-4 w-4"}),l("logs.autoScroll")]}),o.jsx(n2,{variant:"outline",size:"sm",onClick:n,disabled:t||e.length===0,children:l("logs.clearLogs")})]})]}),o.jsx("div",{ref:s,className:"flex-grow p-2 overflow-auto bg-card rounded-b-md font-mono text-sm",style:{maxHeight:"calc(100vh - 300px)"},children:t?o.jsx("div",{className:"flex justify-center items-center h-full",children:o.jsx("span",{children:l("logs.loading")})}):a?o.jsx("div",{className:"text-red-500 p-2",children:a.message}):S.length===0?o.jsx("div",{className:"text-center text-muted-foreground p-8",children:u||f.length<4||d.length<2?l("logs.noMatch"):l("logs.noLogs")}):S.map((h,g)=>o.jsxs("div",{className:`py-1 border-b border-gray-100 dark:border-gray-800 ${h.type==="error"?"text-red-500":h.type==="warn"?"text-yellow-500":""}`,children:[o.jsxs("span",{className:"text-gray-400",children:["[",b(h.timestamp),"]"]}),o.jsx(ks,{className:`ml-2 mr-1 ${w(h.type)}`,children:h.type}),o.jsxs(ks,{variant:"default",className:`mr-2 ${p(h.source)}`,children:[h.source==="main"?l("logs.main"):l("logs.child"),h.processId?` (${h.processId})`:""]}),o.jsx("span",{className:"whitespace-pre-wrap",children:h.message})]},`${h.timestamp}-${g}`))})]})},s2=async()=>{try{const e=os();if(!e)throw new Error("Authentication token not found. Please log in.");const a=await(await fetch("/api/logs",{method:"DELETE",headers:{"x-auth-token":e}})).json();if(!a.success)throw new Error(a.error||"Failed to clear logs")}catch(e){throw console.error("Error clearing logs:",e),e}},r2=()=>{const[e,t]=x.useState([]),[a,n]=x.useState(!0),[l,s]=x.useState(null);return x.useEffect(()=>{let i=null,u=!0;const c=()=>{try{i&&i.close();const f=os();if(!f){s(new Error("Authentication token not found. Please log in.")),n(!1);return}i=new EventSource(`/api/logs/stream?token=${f}`),i.onmessage=m=>{if(u)try{const d=JSON.parse(m.data);d.type==="initial"?(t(d.logs),n(!1)):d.type==="log"&&t(y=>[...y,d.log])}catch(d){console.error("Error parsing SSE message:",d)}},i.onerror=()=>{u&&(i&&(i.close(),setTimeout(c,5e3)),s(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(f){if(!u)return;s(f instanceof Error?f:new Error("Failed to connect to log stream")),n(!1)}};return c(),()=>{u=!1,i&&i.close()}},[]),{logs:e,loading:a,error:l,clearLogs:async()=>{try{await s2(),t([])}catch(i){s(i instanceof Error?i:new Error("Failed to clear logs"))}}}},i2=()=>{const{t:e}=W(),{logs:t,loading:a,error:n,clearLogs:l}=r2();return o.jsxs("div",{className:"container mx-auto p-4",children:[o.jsx("div",{className:"flex justify-between items-center mb-4",children:o.jsx("h1",{className:"text-2xl font-bold",children:e("pages.logs.title")})}),o.jsx("div",{className:"bg-card rounded-md shadow-sm",children:o.jsx(l2,{logs:t,isLoading:a,error:n,onClear:l})})]})};function o2(){return o.jsx(tb,{children:o.jsx(D1,{children:o.jsx(Iv,{children:o.jsx(b1,{children:o.jsxs(Fx,{children:[o.jsx(nt,{path:"/login",element:o.jsx(zb,{})}),o.jsx(nt,{element:o.jsx(Mb,{}),children:o.jsxs(nt,{element:o.jsx(Ob,{}),children:[o.jsx(nt,{path:"/",element:o.jsx(Db,{})}),o.jsx(nt,{path:"/servers",element:o.jsx(Vb,{})}),o.jsx(nt,{path:"/groups",element:o.jsx(Qb,{})}),o.jsx(nt,{path:"/market",element:o.jsx(Gf,{})}),o.jsx(nt,{path:"/market/:serverName",element:o.jsx(Gf,{})}),o.jsx(nt,{path:"/logs",element:o.jsx(i2,{})}),o.jsx(nt,{path:"/settings",element:o.jsx(Fb,{})})]})}),o.jsx(nt,{path:"*",element:o.jsx(fg,{to:"/"})})]})})})})})}const V=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},Vf=e=>e==null?"":""+e,u2=(e,t,a)=>{e.forEach(n=>{t[n]&&(a[n]=t[n])})},c2=/###/g,qf=e=>e&&e.indexOf("###")>-1?e.replace(c2,"."):e,Yf=e=>!e||V(e),Cl=(e,t,a)=>{const n=V(t)?t.split("."):t;let l=0;for(;l<n.length-1;){if(Yf(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 Yf(e)?{}:{obj:e,k:qf(n[l])}},$f=(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},f2=(e,t,a,n)=>{const{obj:l,k:s}=Cl(e,t,Object);l[s]=l[s]||[],l[s].push(a)},Nr=(e,t)=>{const{obj:a,k:n}=Cl(e,t);if(a&&Object.prototype.hasOwnProperty.call(a,n))return a[n]},d2=(e,t,a)=>{const n=Nr(e,a);return n!==void 0?n:Nr(t,a)},Kg=(e,t,a)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?V(e[n])||e[n]instanceof String||V(t[n])||t[n]instanceof String?a&&(e[n]=t[n]):Kg(e[n],t[n],a):e[n]=t[n]);return e},Fa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var h2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const m2=e=>V(e)?e.replace(/[&<>"'\/]/g,t=>h2[t]):e;class g2{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 p2=[" ",",","?","!",";"],y2=new g2(20),x2=(e,t,a)=>{t=t||"",a=a||"";const n=p2.filter(r=>t.indexOf(r)<0&&a.indexOf(r)<0);if(n.length===0)return!0;const l=y2.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},Vo=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 u=s;u<n.length;++u)if(u!==s&&(i+=a),i+=n[u],r=l[i],r!==void 0){if(["string","number","boolean"].indexOf(typeof r)>-1&&u<n.length-1)continue;s+=u-s+1;break}l=r}return l},jr=e=>e==null?void 0:e.replace("_","-"),v2={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 Er{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||v2,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:(V(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new Er(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Er(this.logger,t)}}var jt=new Er;class Jr{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,u]=r;for(let c=0;c<u;c++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(r=>{let[i,u]=r;for(let c=0;c<u;c++)i.apply(i,[t,...n])})}}class Kf extends Jr{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):V(n)&&s?i.push(...n.split(s)):i.push(n)));const u=Nr(this.data,i);return!u&&!a&&!n&&t.indexOf(".")>-1&&(t=i[0],a=i[1],n=i.slice(2).join(".")),u||!r||!V(n)?u:Vo((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),$f(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)(V(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 u=Nr(this.data,i)||{};r.skipCopy||(n=JSON.parse(JSON.stringify(n))),l?Kg(u,n,s):u={...u,...n},$f(this.data,i,u),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 Qf={},Xf=e=>!V(e)&&typeof e!="boolean"&&typeof e!="number";class Cr extends Jr{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),u2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=jt.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&&!x2(t,n,l);if(r&&!i){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:V(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:V(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),u=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 _=a.nsSeparator||this.options.nsSeparator;return l?{res:`${u}${_}${r}`,usedKey:r,exactUsedKey:r,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:`${u}${_}${r}`}return l?{res:r,usedKey:r,exactUsedKey:r,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:r}const m=this.resolve(t,a);let d=m==null?void 0:m.res;const y=(m==null?void 0:m.usedKey)||r,S=(m==null?void 0:m.exactUsedKey)||r,b=["[object Number]","[object Function]","[object RegExp]"],w=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,p=!this.i18nFormat||this.i18nFormat.handleAsObject,h=a.count!==void 0&&!V(a.count),g=Cr.hasDefaultValue(a),v=h?this.pluralResolver.getSuffix(c,a.count,a):"",j=a.ordinal&&h?this.pluralResolver.getSuffix(c,a.count,{ordinal:!1}):"",C=h&&!a.ordinal&&a.count===0,N=C&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${v}`]||a[`defaultValue${j}`]||a.defaultValue;let E=d;p&&!d&&g&&(E=N);const A=Xf(E),R=Object.prototype.toString.apply(E);if(p&&E&&A&&b.indexOf(R)<0&&!(V(w)&&Array.isArray(E))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,E,{...a,ns:i}):`key '${r} (${this.language})' returned an object instead of string.`;return l?(m.res=_,m.usedParams=this.getUsedParamsDetails(a),m):_}if(s){const _=Array.isArray(E),te=_?[]:{},me=_?S:y;for(const Z in E)if(Object.prototype.hasOwnProperty.call(E,Z)){const oe=`${me}${s}${Z}`;g&&!d?te[Z]=this.translate(oe,{...a,defaultValue:Xf(N)?N[Z]:void 0,joinArrays:!1,ns:i}):te[Z]=this.translate(oe,{...a,joinArrays:!1,ns:i}),te[Z]===oe&&(te[Z]=E[Z])}d=te}}else if(p&&V(w)&&Array.isArray(d))d=d.join(w),d&&(d=this.extendTranslation(d,t,a,n));else{let _=!1,te=!1;!this.isValidLookup(d)&&g&&(_=!0,d=N),this.isValidLookup(d)||(te=!0,d=r);const Z=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:d,oe=g&&N!==d&&this.options.updateMissing;if(te||_||oe){if(this.logger.log(oe?"updateKey":"missingKey",c,u,r,oe?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 k=[];const H=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&H&&H[0])for(let U=0;U<H.length;U++)k.push(H[U]);else this.options.saveMissingTo==="all"?k=this.languageUtils.toResolveHierarchy(a.lng||this.language):k.push(a.lng||this.language);const z=(U,J,Oe)=>{var F;const Me=g&&Oe!==d?Oe:Z;this.options.missingKeyHandler?this.options.missingKeyHandler(U,u,J,Me,oe,a):(F=this.backendConnector)!=null&&F.saveMissing&&this.backendConnector.saveMissing(U,u,J,Me,oe,a),this.emit("missingKey",U,u,J,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&h?k.forEach(U=>{const J=this.pluralResolver.getSuffixes(U,a);C&&a[`defaultValue${this.options.pluralSeparator}zero`]&&J.indexOf(`${this.options.pluralSeparator}zero`)<0&&J.push(`${this.options.pluralSeparator}zero`),J.forEach(Oe=>{z([U],r+Oe,a[`defaultValue${Oe}`]||N)})}):z(k,r,N))}d=this.extendTranslation(d,t,a,m,n),te&&d===r&&this.options.appendNamespaceToMissingKey&&(d=`${u}:${r}`),(te||_)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${r}`:r,_?d:void 0))}return l?(m.res=d,m.usedParams=this.getUsedParamsDetails(a),m):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 m=V(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(m){const S=t.match(this.interpolator.nestingRegexp);d=S&&S.length}let y=n.replace&&!V(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),m){const S=t.match(this.interpolator.nestingRegexp),b=S&&S.length;d<b&&(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,b=new Array(S),w=0;w<S;w++)b[w]=arguments[w];return(s==null?void 0:s[0])===b[0]&&!n.context?(r.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${a[0]}`),null):r.translate(...b,a)},n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,u=V(i)?[i]:i;return t!=null&&(u!=null&&u.length)&&n.applyPostProcessor!==!1&&(t=Qg.handle(u,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 V(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(u,a),f=c.key;l=f;let m=c.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const d=a.count!==void 0&&!V(a.count),y=d&&!a.ordinal&&a.count===0,S=a.context!==void 0&&(V(a.context)||typeof a.context=="number")&&a.context!=="",b=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);m.forEach(w=>{var p,h;this.isValidLookup(n)||(i=w,!Qf[`${b[0]}-${w}`]&&((p=this.utils)!=null&&p.hasLoadedNamespace)&&!((h=this.utils)!=null&&h.hasLoadedNamespace(i))&&(Qf[`${b[0]}-${w}`]=!0,this.logger.warn(`key "${l}" for languages "${b.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!!!")),b.forEach(g=>{var C;if(this.isValidLookup(n))return;r=g;const v=[f];if((C=this.i18nFormat)!=null&&C.addLookupKeys)this.i18nFormat.addLookupKeys(v,f,g,w,a);else{let N;d&&(N=this.pluralResolver.getSuffix(g,a.count,a));const E=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(f+N),a.ordinal&&N.indexOf(A)===0&&v.push(f+N.replace(A,this.options.pluralSeparator)),y&&v.push(f+E)),S){const R=`${f}${this.options.contextSeparator}${a.context}`;v.push(R),d&&(v.push(R+N),a.ordinal&&N.indexOf(A)===0&&v.push(R+N.replace(A,this.options.pluralSeparator)),y&&v.push(R+E))}}let j;for(;j=v.pop();)this.isValidLookup(n)||(s=j,n=this.getResource(g,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&&!V(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 Zf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=jt.create("languageUtils")}getScriptPartFromCode(t){if(t=jr(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=jr(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(V(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)),V(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 V(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))):V(t)&&s(this.formatLanguageCode(t)),n.forEach(r=>{l.indexOf(r)<0&&s(this.formatLanguageCode(r))}),l}}const Jf={zero:0,one:1,two:2,few:3,many:4,other:5},Ff={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class b2{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=a,this.logger=jt.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=jr(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!"),Ff;if(!t.match(/-|_/))return Ff;const u=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(u,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)=>Jf[l]-Jf[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 Pf=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=d2(e,t,a);return!s&&l&&V(a)&&(s=Vo(e,a,n),s===void 0&&(s=Vo(t,a,n))),s},Li=e=>e.replace(/\$/g,"$$$$");class S2{constructor(){var a;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jt.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:u,formatSeparator:c,unescapeSuffix:f,unescapePrefix:m,nestingPrefix:d,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:b,nestingOptionsSeparator:w,maxReplaces:p,alwaysFormat:h}=t.interpolation;this.escape=a!==void 0?a:m2,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=s?Fa(s):r||"{{",this.suffix=i?Fa(i):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Fa(d):y||Fa("$t("),this.nestingSuffix=S?Fa(S):b||Fa(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=p||1e3,this.alwaysFormat=h!==void 0?h:!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 u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=S=>{if(S.indexOf(this.formatSeparator)<0){const h=Pf(a,u,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(h,void 0,n,{...l,...a,interpolationkey:S}):h}const b=S.split(this.formatSeparator),w=b.shift().trim(),p=b.join(this.formatSeparator).trim();return this.format(Pf(a,u,w,this.options.keySeparator,this.options.ignoreJSONStructure),p,n,{...l,...a,interpolationkey:w})};this.resetRegExp();const f=(l==null?void 0:l.missingInterpolationHandler)||this.options.missingInterpolationHandler,m=((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=>Li(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Li(this.escape(S)):Li(S)}].forEach(S=>{for(i=0;s=S.regex.exec(t);){const b=s[1].trim();if(r=c(b),r===void 0)if(typeof f=="function"){const p=f(t,s,l);r=V(p)?p:""}else if(l&&Object.prototype.hasOwnProperty.call(l,b))r="";else if(m){r=s[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),r="";else!V(r)&&!this.useRawValueToEscape&&(r=Vf(r));const w=S.safeValue(r);if(t=t.replace(s[0],w),m?(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=(u,c)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const m=u.split(new RegExp(`${f}[ ]*{`));let d=`{${m[1]}`;u=m[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(b){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,b),`${u}${f}${d}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,u};for(;l=this.nestingRegexp.exec(t);){let u=[];r={...n},r=r.replace&&!V(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(m=>m.trim());l[1]=f.shift(),u=f,c=!0}if(s=a(i.call(this,l[1].trim(),r),r),s&&l[0]===t&&!V(s))return s;V(s)||(s=Vf(s)),s||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${t}`),s=""),c&&(s=u.reduce((f,m)=>this.format(f,m,n.lng,{...n,interpolationkey:l[1].trim()}),s.trim())),t=t.replace(l[0],s),this.regexp.lastIndex=0}return t}}const w2=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,...u]=r.split(":"),c=u.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}},Pa=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(jr(n),l),t[r]=i),i(a)}};class N2{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jt.create("formatter"),this.options=t,this.formats={number:Pa((a,n)=>{const l=new Intl.NumberFormat(a,{...n});return s=>l.format(s)}),currency:Pa((a,n)=>{const l=new Intl.NumberFormat(a,{...n,style:"currency"});return s=>l.format(s)}),datetime:Pa((a,n)=>{const l=new Intl.DateTimeFormat(a,{...n});return s=>l.format(s)}),relativetime:Pa((a,n)=>{const l=new Intl.RelativeTimeFormat(a,{...n});return s=>l.format(s,n.range||"day")}),list:Pa((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()]=Pa(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(u=>u.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,i)].join(this.formatSeparator)}return s.reduce((i,u)=>{var m;const{formatName:c,formatOptions:f}=w2(u);if(this.formats[c]){let d=i;try{const y=((m=l==null?void 0:l.formatParams)==null?void 0:m[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 j2=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class E2 extends Jr{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=jt.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={},u={};return t.forEach(c=>{let f=!0;a.forEach(m=>{const d=`${c}|${m}`;!n.reload&&this.store.hasResourceBundle(c,m)?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),u[m]===void 0&&(u[m]=!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(u)}}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(u=>{f2(u.loaded,[s],r),j2(u,t),a&&u.errors.push(a),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{i[c]||(i[c]={});const f=u.loaded[c];f.length&&f.forEach(m=>{i[c][m]===void 0&&(i[c][m]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(u=>!u.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 m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.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)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const c=u(t,a);c&&typeof c.then=="function"?c.then(f=>i(null,f)).catch(i):i(null,c)}catch(c){i(c)}return}return u(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();V(t)&&(t=this.languageUtils.toResolveHierarchy(t)),V(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 u,c,f,m,d;let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(u=this.services)==null?void 0:u.utils)!=null&&c.hasLoadedNamespace&&!((m=(f=this.services)==null?void 0:f.utils)!=null&&m.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 b;S.length===5?b=S(t,a,n,l,y):b=S(t,a,n,l),b&&typeof b.then=="function"?b.then(w=>i(null,w)).catch(i):i(null,b)}catch(b){i(b)}else S(t,a,n,l,i,y)}!t||!t[0]||this.store.addResource(t[0],a,n,l)}}}const Wf=()=>({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]),V(e[1])&&(t.defaultValue=e[1]),V(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}}),If=e=>{var t,a;return V(e.ns)&&(e.ns=[e.ns]),V(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),V(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},Rs=()=>{},C2=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class Yl extends Jr{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(super(),this.options=If(t),this.services={},this.logger=jt,this.modules={external:[]},C2(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&&(V(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const l=Wf();this.options={...l,...this.options,...If(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?jt.init(s(this.modules.logger),this.options):jt.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=N2;const m=new Zf(this.options);this.store=new Kf(this.options.resources,this.options);const d=this.services;d.logger=jt,d.resourceStore=this.store,d.languageUtils=m,d.pluralResolver=new b2(m,{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 S2(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new E2(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(y){for(var S=arguments.length,b=new Array(S>1?S-1:0),w=1;w<S;w++)b[w-1]=arguments[w];t.emit(y,...b)}),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 Cr(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,b=new Array(S>1?S-1:0),w=1;w<S;w++)b[w-1]=arguments[w];t.emit(y,...b)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Rs),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 u=rl(),c=()=>{const f=(m,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),u.resolve(d),n(m,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),u}loadResources(t){var s,r;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rs;const l=V(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=[],u=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(m=>{m!=="cimode"&&i.indexOf(m)<0&&i.push(m)})};l?u(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),(r=(s=this.options.preload)==null?void 0:s.forEach)==null||r.call(s,c=>u(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=Rs),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=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},r=(u,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(u,function(){return n.t(...arguments)})},i=u=>{var f,m;!t&&!u&&this.services.languageDetector&&(u=[]);const c=V(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(m=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||m.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 u;if(typeof i!="object"){for(var c=arguments.length,f=new Array(c>2?c-2:0),m=2;m<c;m++)f[m-2]=arguments[m];u=l.options.overloadTranslationOptionHandler([r,i].concat(f))}else u={...i};u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||s.keyPrefix);const d=l.options.keySeparator||".";let y;return u.keyPrefix&&Array.isArray(r)?y=r.map(S=>`${u.keyPrefix}${d}${S}`):y=u.keyPrefix?`${u.keyPrefix}${d}${r}`:r,l.t(y,u)};return V(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,u)=>{const c=this.services.backendConnector.state[`${i}|${u}`];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?(V(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();V(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 Zf(Wf());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 Yl(t,a)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rs;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const l={...this.options,...t,isClone:!0},s=new Yl(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((u,c)=>(u[c]={...this.store.data[c]},Object.keys(u[c]).reduce((f,m)=>(f[m]={...u[c][m]},f),{})),{});s.store=new Kf(i,l),s.services.resourceStore=s.store}return s.translator=new Cr(s.services,l),s.translator.on("*",function(i){for(var u=arguments.length,c=new Array(u>1?u-1:0),f=1;f<u;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=Yl.createInstance();He.createInstance=Yl.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:T2,forEach:A2}=[];function k2(e){return A2.call(T2.call(arguments,1),t=>{if(t)for(const a in t)e[a]===void 0&&(e[a]=t[a])}),e}const ed=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,R2=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(!ed.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!ed.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},td={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=R2(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 O2={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return td.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:a,cookieMinutes:n,cookieDomain:l,cookieOptions:s}=t;a&&typeof document<"u"&&td.create(a,e,n,l,s)}},M2={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 u=r[i].indexOf("=");u>0&&r[i].substring(0,u)===t&&(a=r[i].substring(u+1))}}return a}};let Wa=null;const ad=()=>{if(Wa!==null)return Wa;try{if(Wa=typeof window<"u"&&window.localStorage!==null,!Wa)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Wa=!1}return Wa};var z2={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&ad())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:a}=t;a&&ad()&&window.localStorage.setItem(a,e)}};let Ia=null;const nd=()=>{if(Ia!==null)return Ia;try{if(Ia=typeof window<"u"&&window.sessionStorage!==null,!Ia)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ia=!1}return Ia};var D2={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&nd())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:a}=t;a&&nd()&&window.sessionStorage.setItem(a,e)}},L2={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}},U2={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}},_2={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}},H2={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 Xg=!1;try{document.cookie,Xg=!0}catch{}const Zg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Xg||Zg.splice(1,1);const B2=()=>({order:Zg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Jg{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=k2(a,this.options||{},B2()),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(O2),this.addDetector(M2),this.addDetector(z2),this.addDetector(D2),this.addDetector(L2),this.addDetector(U2),this.addDetector(_2),this.addDetector(H2)}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)}))}}Jg.type="languageDetector";const G2={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"},V2={title:"About",versionInfo:"MCP Hub Version: {{version}}",newVersion:"New version available!",currentVersion:"Current version",newVersionAvailable:"New version {{version}} is available",viewOnGitHub:"View on GitHub",checkForUpdates:"Check for Updates",checking:"Checking for updates..."},q2={viewProfile:"View profile",userCenter:"User Center"},Y2={label:"Sponsor",title:"Support the Project",rewardAlt:"Reward QR Code",supportMessage:"Support the development of MCP Hub by buying me a coffee!",supportButton:"Support on Ko-fi"},$2={label:"WeChat",title:"Connect via WeChat",qrCodeAlt:"WeChat QR Code",scanMessage:"Scan this QR code to connect with us on WeChat"},K2={label:"Discord",title:"Join our Discord server",community:"Join our growing community on Discord for support, discussions, and updates!"},Q2={title:"Theme",light:"Light",dark:"Dark",system:"System"},X2={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"},Z2={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"},J2={online:"Online",offline:"Offline",connecting:"Connecting"},F2={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"},P2={processing:"Processing...",save:"Save",cancel:"Cancel",refresh:"Refresh",create:"Create",submitting:"Submitting...",delete:"Delete",copy:"Copy",copySuccess:"Copied to clipboard",copyFailed:"Copy failed",close:"Close"},W2={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market",logs:"Logs"},I2={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:"Security Configuration",installConfig:"Installation Configuration"},market:{title:"Server Market - (Data from mcpm.sh)"},logs:{title:"System Logs"}},eS={filters:"Filters",search:"Search logs...",autoScroll:"Auto-scroll",clearLogs:"Clear logs",loading:"Loading logs...",noLogs:"No logs available.",noMatch:"No logs match the current filters.",mainProcess:"Main Process",childProcess:"Child Process",main:"Main",child:"Child"},tS={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"},aS={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"},nS={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",enableBearerAuth:"Enable Bearer Authentication",enableBearerAuthDescription:"Require bearer token authentication for MCP requests",bearerAuthKey:"Bearer Authentication Key",bearerAuthKeyDescription:"The authentication key that will be required in the Bearer token",bearerAuthKeyPlaceholder:"Enter bearer authentication key",pythonIndexUrl:"Python Package Repository URL",pythonIndexUrlDescription:"Set UV_DEFAULT_INDEX environment variable for Python package installation",pythonIndexUrlPlaceholder:"e.g. https://pypi.org/simple",npmRegistry:"NPM Registry URL",npmRegistryDescription:"Set npm_config_registry environment variable for NPM package installation",npmRegistryPlaceholder:"e.g. https://registry.npmjs.org/",installConfig:"Installation Configuration",systemConfigUpdated:"System configuration updated successfully"},lS={app:G2,about:V2,profile:q2,sponsor:Y2,wechat:$2,discord:K2,theme:Q2,auth:X2,server:Z2,status:J2,errors:F2,common:P2,nav:W2,pages:I2,logs:eS,groups:tS,market:aS,settings:nS},sS={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},rS={title:"关于",versionInfo:"MCP Hub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本",newVersionAvailable:"新版本 {{version}} 已发布",viewOnGitHub:"在 GitHub 上查看",checkForUpdates:"检查更新",checking:"检查更新中..."},iS={viewProfile:"查看个人中心",userCenter:"个人中心"},oS={label:"赞助",title:"支持项目",rewardAlt:"赞赏码",supportMessage:"通过捐赠支持 MCP Hub 的开发!",supportButton:"在 Ko-fi 上支持"},uS={label:"微信",title:"微信联系",qrCodeAlt:"微信二维码",scanMessage:"扫描二维码添加微信"},cS={label:"Discord",title:"加入我们的 Discord 服务器",community:"加入我们不断壮大的 Discord 社区,获取支持、参与讨论并了解最新动态!"},fS={title:"主题",light:"浅色",dark:"深色",system:"系统"},dS={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},hS={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:"查看错误详情"},mS={online:"在线",offline:"离线",connecting:"连接中"},gS={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败"},pS={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",close:"关闭"},yS={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场",logs:"日志"},xS={dashboard:{title:"仪表盘",totalServers:"服务器总数",onlineServers:"在线服务器",offlineServers:"离线服务器",connectingServers:"连接中服务",recentServers:"最近的服务器"},servers:{title:"服务器管理"},settings:{title:"设置",language:"语言",account:"账户设置",password:"修改密码",appearance:"外观",routeConfig:"安全配置",installConfig:"安装配置"},groups:{title:"分组管理"},market:{title:"服务器市场 - (数据来源于 mcpm.sh)"},logs:{title:"系统日志"}},vS={filters:"筛选",search:"搜索日志...",autoScroll:"自动滚动",clearLogs:"清除日志",loading:"加载日志中...",noLogs:"暂无日志。",noMatch:"没有匹配当前筛选条件的日志。",mainProcess:"主进程",childProcess:"子进程",main:"主",child:"子"},bS={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}} 台服务器"},SS={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:"每页显示"},wS={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用组名路由",enableGroupNameRouteDescription:"允许使用组名而不仅仅是组 ID 连接到 /sse 端点",enableBearerAuth:"启用 Bearer 认证",enableBearerAuthDescription:"对 MCP 请求启用 Bearer 令牌认证",bearerAuthKey:"Bearer 认证密钥",bearerAuthKeyDescription:"Bearer 令牌中需要携带的认证密钥",bearerAuthKeyPlaceholder:"请输入 Bearer 认证密钥",pythonIndexUrl:"Python 包仓库地址",pythonIndexUrlDescription:"设置 UV_DEFAULT_INDEX 环境变量,用于 Python 包安装",pythonIndexUrlPlaceholder:"例如: https://mirrors.aliyun.com/pypi/simple",npmRegistry:"NPM 仓库地址",npmRegistryDescription:"设置 npm_config_registry 环境变量,用于 NPM 包安装",npmRegistryPlaceholder:"例如: https://registry.npmmirror.com/",installConfig:"安装配置",systemConfigUpdated:"系统配置更新成功"},NS={app:sS,about:rS,profile:iS,sponsor:oS,wechat:uS,discord:cS,theme:fS,auth:dS,server:hS,status:mS,errors:gS,common:pS,nav:yS,pages:xS,logs:vS,groups:bS,market:SS,settings:wS};He.use(Jg).use(hb).init({resources:{en:{translation:lS},zh:{translation:NS}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});Xy.createRoot(document.getElementById("root")).render(o.jsx(md.StrictMode,{children:o.jsx(o2,{})}));
|
|
148
|
-
//# sourceMappingURL=index-B7KNaMJO.js.map
|