@samanhappy/mcphub 0.7.6 → 0.7.7
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/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/middlewares/index.js +1 -24
- package/dist/middlewares/index.js.map +1 -1
- package/dist/services/mcpService.js +19 -7
- package/dist/services/mcpService.js.map +1 -1
- package/frontend/dist/assets/index-B0BhrPem.css +1 -0
- package/frontend/dist/assets/index-Dr8Yov3b.js +172 -0
- package/frontend/dist/assets/index-Dr8Yov3b.js.map +1 -0
- package/frontend/dist/index.html +2 -2
- package/package.json +2 -2
- package/frontend/dist/assets/index-BJOKTjFG.css +0 -1
- package/frontend/dist/assets/index-CzkrFruH.js +0 -168
- package/frontend/dist/assets/index-CzkrFruH.js.map +0 -1
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function r(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(d){if(d.ep)return;d.ep=!0;const f=r(d);fetch(d.href,f)}})();function km(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var cu={exports:{}},ls={};/**
|
|
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 _h;function Jp(){if(_h)return ls;_h=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(o,d,f){var h=null;if(f!==void 0&&(h=""+f),d.key!==void 0&&(h=""+d.key),"key"in d){f={};for(var x in d)x!=="key"&&(f[x]=d[x])}else f=d;return d=f.ref,{$$typeof:l,type:o,key:h,ref:d!==void 0?d:null,props:f}}return ls.Fragment=s,ls.jsx=r,ls.jsxs=r,ls}var Hh;function Fp(){return Hh||(Hh=1,cu.exports=Jp()),cu.exports}var u=Fp(),du={exports:{}},be={};/**
|
|
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 Bh;function Wp(){if(Bh)return be;Bh=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),S=Symbol.iterator;function v(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,j={};function k(T,Y,ee){this.props=T,this.context=Y,this.refs=j,this.updater=ee||M}k.prototype.isReactComponent={},k.prototype.setState=function(T,Y){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,Y,"setState")},k.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function A(){}A.prototype=k.prototype;function E(T,Y,ee){this.props=T,this.context=Y,this.refs=j,this.updater=ee||M}var O=E.prototype=new A;O.constructor=E,N(O,k.prototype),O.isPureReactComponent=!0;var D=Array.isArray,U={H:null,A:null,T:null,S:null,V:null},ne=Object.prototype.hasOwnProperty;function $(T,Y,ee,X,re,ve){return ee=ve.ref,{$$typeof:l,type:T,key:Y,ref:ee!==void 0?ee:null,props:ve}}function G(T,Y){return $(T.type,Y,void 0,void 0,void 0,T.props)}function P(T){return typeof T=="object"&&T!==null&&T.$$typeof===l}function J(T){var Y={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(ee){return Y[ee]})}var le=/\/+/g;function te(T,Y){return typeof T=="object"&&T!==null&&T.key!=null?J(""+T.key):Y.toString(36)}function se(){}function oe(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(se,se):(T.status="pending",T.then(function(Y){T.status==="pending"&&(T.status="fulfilled",T.value=Y)},function(Y){T.status==="pending"&&(T.status="rejected",T.reason=Y)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function I(T,Y,ee,X,re){var ve=typeof T;(ve==="undefined"||ve==="boolean")&&(T=null);var F=!1;if(T===null)F=!0;else switch(ve){case"bigint":case"string":case"number":F=!0;break;case"object":switch(T.$$typeof){case l:case s:F=!0;break;case y:return F=T._init,I(F(T._payload),Y,ee,X,re)}}if(F)return re=re(T),F=X===""?"."+te(T,0):X,D(re)?(ee="",F!=null&&(ee=F.replace(le,"$&/")+"/"),I(re,Y,ee,"",function(pe){return pe})):re!=null&&(P(re)&&(re=G(re,ee+(re.key==null||T&&T.key===re.key?"":(""+re.key).replace(le,"$&/")+"/")+F)),Y.push(re)),1;F=0;var ae=X===""?".":X+":";if(D(T))for(var ie=0;ie<T.length;ie++)X=T[ie],ve=ae+te(X,ie),F+=I(X,Y,ee,ve,re);else if(ie=v(T),typeof ie=="function")for(T=ie.call(T),ie=0;!(X=T.next()).done;)X=X.value,ve=ae+te(X,ie++),F+=I(X,Y,ee,ve,re);else if(ve==="object"){if(typeof T.then=="function")return I(oe(T),Y,ee,X,re);throw Y=String(T),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return F}function H(T,Y,ee){if(T==null)return T;var X=[],re=0;return I(T,X,"","",function(ve){return Y.call(ee,ve,re++)}),X}function W(T){if(T._status===-1){var Y=T._result;Y=Y(),Y.then(function(ee){(T._status===0||T._status===-1)&&(T._status=1,T._result=ee)},function(ee){(T._status===0||T._status===-1)&&(T._status=2,T._result=ee)}),T._status===-1&&(T._status=0,T._result=Y)}if(T._status===1)return T._result.default;throw T._result}var q=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)};function fe(){}return be.Children={map:H,forEach:function(T,Y,ee){H(T,function(){Y.apply(this,arguments)},ee)},count:function(T){var Y=0;return H(T,function(){Y++}),Y},toArray:function(T){return H(T,function(Y){return Y})||[]},only:function(T){if(!P(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},be.Component=k,be.Fragment=r,be.Profiler=d,be.PureComponent=E,be.StrictMode=o,be.Suspense=m,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,be.__COMPILER_RUNTIME={__proto__:null,c:function(T){return U.H.useMemoCache(T)}},be.cache=function(T){return function(){return T.apply(null,arguments)}},be.cloneElement=function(T,Y,ee){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var X=N({},T.props),re=T.key,ve=void 0;if(Y!=null)for(F in Y.ref!==void 0&&(ve=void 0),Y.key!==void 0&&(re=""+Y.key),Y)!ne.call(Y,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&Y.ref===void 0||(X[F]=Y[F]);var F=arguments.length-2;if(F===1)X.children=ee;else if(1<F){for(var ae=Array(F),ie=0;ie<F;ie++)ae[ie]=arguments[ie+2];X.children=ae}return $(T.type,re,void 0,void 0,ve,X)},be.createContext=function(T){return T={$$typeof:h,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:f,_context:T},T},be.createElement=function(T,Y,ee){var X,re={},ve=null;if(Y!=null)for(X in Y.key!==void 0&&(ve=""+Y.key),Y)ne.call(Y,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(re[X]=Y[X]);var F=arguments.length-2;if(F===1)re.children=ee;else if(1<F){for(var ae=Array(F),ie=0;ie<F;ie++)ae[ie]=arguments[ie+2];re.children=ae}if(T&&T.defaultProps)for(X in F=T.defaultProps,F)re[X]===void 0&&(re[X]=F[X]);return $(T,ve,void 0,void 0,null,re)},be.createRef=function(){return{current:null}},be.forwardRef=function(T){return{$$typeof:x,render:T}},be.isValidElement=P,be.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:W}},be.memo=function(T,Y){return{$$typeof:g,type:T,compare:Y===void 0?null:Y}},be.startTransition=function(T){var Y=U.T,ee={};U.T=ee;try{var X=T(),re=U.S;re!==null&&re(ee,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(fe,q)}catch(ve){q(ve)}finally{U.T=Y}},be.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},be.use=function(T){return U.H.use(T)},be.useActionState=function(T,Y,ee){return U.H.useActionState(T,Y,ee)},be.useCallback=function(T,Y){return U.H.useCallback(T,Y)},be.useContext=function(T){return U.H.useContext(T)},be.useDebugValue=function(){},be.useDeferredValue=function(T,Y){return U.H.useDeferredValue(T,Y)},be.useEffect=function(T,Y,ee){var X=U.H;if(typeof ee=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return X.useEffect(T,Y)},be.useId=function(){return U.H.useId()},be.useImperativeHandle=function(T,Y,ee){return U.H.useImperativeHandle(T,Y,ee)},be.useInsertionEffect=function(T,Y){return U.H.useInsertionEffect(T,Y)},be.useLayoutEffect=function(T,Y){return U.H.useLayoutEffect(T,Y)},be.useMemo=function(T,Y){return U.H.useMemo(T,Y)},be.useOptimistic=function(T,Y){return U.H.useOptimistic(T,Y)},be.useReducer=function(T,Y,ee){return U.H.useReducer(T,Y,ee)},be.useRef=function(T){return U.H.useRef(T)},be.useState=function(T){return U.H.useState(T)},be.useSyncExternalStore=function(T,Y,ee){return U.H.useSyncExternalStore(T,Y,ee)},be.useTransition=function(){return U.H.useTransition()},be.version="19.1.0",be}var qh;function Mu(){return qh||(qh=1,du.exports=Wp()),du.exports}var w=Mu();const wu=km(w);var fu={exports:{}},ss={},hu={exports:{}},mu={};/**
|
|
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
|
-
*/var Gh;function Ip(){return Gh||(Gh=1,function(l){function s(H,W){var q=H.length;H.push(W);e:for(;0<q;){var fe=q-1>>>1,T=H[fe];if(0<d(T,W))H[fe]=W,H[q]=T,q=fe;else break e}}function r(H){return H.length===0?null:H[0]}function o(H){if(H.length===0)return null;var W=H[0],q=H.pop();if(q!==W){H[0]=q;e:for(var fe=0,T=H.length,Y=T>>>1;fe<Y;){var ee=2*(fe+1)-1,X=H[ee],re=ee+1,ve=H[re];if(0>d(X,q))re<T&&0>d(ve,X)?(H[fe]=ve,H[re]=q,fe=re):(H[fe]=X,H[ee]=q,fe=ee);else if(re<T&&0>d(ve,q))H[fe]=ve,H[re]=q,fe=re;else break e}}return W}function d(H,W){var q=H.sortIndex-W.sortIndex;return q!==0?q:H.id-W.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var h=Date,x=h.now();l.unstable_now=function(){return h.now()-x}}var m=[],g=[],y=1,S=null,v=3,M=!1,N=!1,j=!1,k=!1,A=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(H){for(var W=r(g);W!==null;){if(W.callback===null)o(g);else if(W.startTime<=H)o(g),W.sortIndex=W.expirationTime,s(m,W);else break;W=r(g)}}function U(H){if(j=!1,D(H),!N)if(r(m)!==null)N=!0,ne||(ne=!0,te());else{var W=r(g);W!==null&&I(U,W.startTime-H)}}var ne=!1,$=-1,G=5,P=-1;function J(){return k?!0:!(l.unstable_now()-P<G)}function le(){if(k=!1,ne){var H=l.unstable_now();P=H;var W=!0;try{e:{N=!1,j&&(j=!1,E($),$=-1),M=!0;var q=v;try{t:{for(D(H),S=r(m);S!==null&&!(S.expirationTime>H&&J());){var fe=S.callback;if(typeof fe=="function"){S.callback=null,v=S.priorityLevel;var T=fe(S.expirationTime<=H);if(H=l.unstable_now(),typeof T=="function"){S.callback=T,D(H),W=!0;break t}S===r(m)&&o(m),D(H)}else o(m);S=r(m)}if(S!==null)W=!0;else{var Y=r(g);Y!==null&&I(U,Y.startTime-H),W=!1}}break e}finally{S=null,v=q,M=!1}W=void 0}}finally{W?te():ne=!1}}}var te;if(typeof O=="function")te=function(){O(le)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,oe=se.port2;se.port1.onmessage=le,te=function(){oe.postMessage(null)}}else te=function(){A(le,0)};function I(H,W){$=A(function(){H(l.unstable_now())},W)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(H){H.callback=null},l.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<H?Math.floor(1e3/H):5},l.unstable_getCurrentPriorityLevel=function(){return v},l.unstable_next=function(H){switch(v){case 1:case 2:case 3:var W=3;break;default:W=v}var q=v;v=W;try{return H()}finally{v=q}},l.unstable_requestPaint=function(){k=!0},l.unstable_runWithPriority=function(H,W){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var q=v;v=H;try{return W()}finally{v=q}},l.unstable_scheduleCallback=function(H,W,q){var fe=l.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?fe+q:fe):q=fe,H){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=q+T,H={id:y++,callback:W,priorityLevel:H,startTime:q,expirationTime:T,sortIndex:-1},q>fe?(H.sortIndex=q,s(g,H),r(m)===null&&H===r(g)&&(j?(E($),$=-1):j=!0,I(U,q-fe))):(H.sortIndex=T,s(m,H),N||M||(N=!0,ne||(ne=!0,te()))),H},l.unstable_shouldYield=J,l.unstable_wrapCallback=function(H){var W=v;return function(){var q=v;v=W;try{return H.apply(this,arguments)}finally{v=q}}}}(mu)),mu}var Vh;function ex(){return Vh||(Vh=1,hu.exports=Ip()),hu.exports}var gu={exports:{}},ot={};/**
|
|
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 $h;function tx(){if($h)return ot;$h=1;var l=Mu();function s(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(s(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(m,g,y){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:S==null?null:""+S,children:m,containerInfo:g,implementation:y}}var h=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ot.createPortal=function(m,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return f(m,g,null,y)},ot.flushSync=function(m){var g=h.T,y=o.p;try{if(h.T=null,o.p=2,m)return m()}finally{h.T=g,o.p=y,o.d.f()}},ot.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(m,g))},ot.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},ot.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var y=g.as,S=x(y,g.crossOrigin),v=typeof g.integrity=="string"?g.integrity:void 0,M=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?o.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:v,fetchPriority:M}):y==="script"&&o.d.X(m,{crossOrigin:S,integrity:v,fetchPriority:M,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ot.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=x(g.as,g.crossOrigin);o.d.M(m,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(m)},ot.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,S=x(y,g.crossOrigin);o.d.L(m,y,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ot.preloadModule=function(m,g){if(typeof m=="string")if(g){var y=x(g.as,g.crossOrigin);o.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(m)},ot.requestFormReset=function(m){o.d.r(m)},ot.unstable_batchedUpdates=function(m,g){return m(g)},ot.useFormState=function(m,g,y){return h.H.useFormState(m,g,y)},ot.useFormStatus=function(){return h.H.useHostTransitionStatus()},ot.version="19.1.0",ot}var Yh;function ax(){if(Yh)return gu.exports;Yh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),gu.exports=tx(),gu.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 Kh;function nx(){if(Kh)return ss;Kh=1;var l=ex(),s=Mu(),r=ax();function o(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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(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 x(e){if(f(e)!==e)throw Error(o(188))}function m(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var c=i.alternate;if(c===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===a)return x(i),e;if(c===n)return x(i),t;c=c.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=c;else{for(var p=!1,b=i.child;b;){if(b===a){p=!0,a=i,n=c;break}if(b===n){p=!0,n=i,a=c;break}b=b.sibling}if(!p){for(b=c.child;b;){if(b===a){p=!0,a=c,n=i;break}if(b===n){p=!0,n=c,a=i;break}b=b.sibling}if(!p)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var se=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case k:return"Profiler";case j:return"StrictMode";case U:return"Suspense";case ne:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case O:return(e.displayName||"Context")+".Provider";case E:return(e._context.displayName||"Context")+".Consumer";case D:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:oe(e.type)||"Memo";case G:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var I=Array.isArray,H=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},fe=[],T=-1;function Y(e){return{current:e}}function ee(e){0>T||(e.current=fe[T],fe[T]=null,T--)}function X(e,t){T++,fe[T]=e.current,e.current=t}var re=Y(null),ve=Y(null),F=Y(null),ae=Y(null);function ie(e,t){switch(X(F,t),X(ve,e),X(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dh(t),e=fh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ee(re),X(re,e)}function pe(){ee(re),ee(ve),ee(F)}function Ge(e){e.memoizedState!==null&&X(ae,e);var t=re.current,a=fh(t,e.type);t!==a&&(X(ve,e),X(re,a))}function st(e){ve.current===e&&(ee(re),ee(ve)),ae.current===e&&(ee(ae),Il._currentValue=q)}var pt=Object.prototype.hasOwnProperty,Va=l.unstable_scheduleCallback,$a=l.unstable_cancelCallback,Fr=l.unstable_shouldYield,Ag=l.unstable_requestPaint,Vt=l.unstable_now,Rg=l.unstable_getCurrentPriorityLevel,Yu=l.unstable_ImmediatePriority,Ku=l.unstable_UserBlockingPriority,bs=l.unstable_NormalPriority,Og=l.unstable_LowPriority,Qu=l.unstable_IdlePriority,Mg=l.log,zg=l.unstable_setDisableYieldValue,il=null,xt=null;function ga(e){if(typeof Mg=="function"&&zg(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(il,e)}catch{}}var yt=Math.clz32?Math.clz32:Lg,Dg=Math.log,Ug=Math.LN2;function Lg(e){return e>>>=0,e===0?32:31-(Dg(e)/Ug|0)|0}var vs=256,ws=4194304;function Ya(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 Ss(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=n&134217727;return b!==0?(n=b&~c,n!==0?i=Ya(n):(p&=b,p!==0?i=Ya(p):a||(a=b&~e,a!==0&&(i=Ya(a))))):(b=n&~c,b!==0?i=Ya(b):p!==0?i=Ya(p):a||(a=n&~e,a!==0&&(i=Ya(a)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:i}function ol(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _g(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 Xu(){var e=vs;return vs<<=1,(vs&4194048)===0&&(vs=256),e}function Zu(){var e=ws;return ws<<=1,(ws&62914560)===0&&(ws=4194304),e}function Wr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ul(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hg(e,t,a,n,i,c){var p=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 b=e.entanglements,C=e.expirationTimes,_=e.hiddenUpdates;for(a=p&~a;0<a;){var K=31-yt(a),Z=1<<K;b[K]=0,C[K]=-1;var B=_[K];if(B!==null)for(_[K]=null,K=0;K<B.length;K++){var V=B[K];V!==null&&(V.lane&=-536870913)}a&=~Z}n!==0&&Pu(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(p&~t))}function Pu(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-yt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function Ju(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-yt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Ir(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 ei(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fu(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Oh(e.type))}function Bg(e,t){var a=W.p;try{return W.p=e,t()}finally{W.p=a}}var pa=Math.random().toString(36).slice(2),rt="__reactFiber$"+pa,dt="__reactProps$"+pa,fn="__reactContainer$"+pa,ti="__reactEvents$"+pa,qg="__reactListeners$"+pa,Gg="__reactHandles$"+pa,Wu="__reactResources$"+pa,cl="__reactMarker$"+pa;function ai(e){delete e[rt],delete e[dt],delete e[ti],delete e[qg],delete e[Gg]}function hn(e){var t=e[rt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[fn]||a[rt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=ph(e);e!==null;){if(a=e[rt])return a;e=ph(e)}return t}e=a,a=e.parentNode}return null}function mn(e){if(e=e[rt]||e[fn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function dl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function gn(e){var t=e[Wu];return t||(t=e[Wu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function We(e){e[cl]=!0}var Iu=new Set,ec={};function Ka(e,t){pn(e,t),pn(e+"Capture",t)}function pn(e,t){for(ec[e]=t,e=0;e<t.length;e++)Iu.add(t[e])}var Vg=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]*$"),tc={},ac={};function $g(e){return pt.call(ac,e)?!0:pt.call(tc,e)?!1:Vg.test(e)?ac[e]=!0:(tc[e]=!0,!1)}function js(e,t,a){if($g(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 Ns(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 Ft(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 ni,nc;function xn(e){if(ni===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ni=t&&t[1]||"",nc=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ni+e+nc}var li=!1;function si(e,t){if(!e||li)return"";li=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(V){var B=V}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(V){B=V}e.call(Z.prototype)}}else{try{throw Error()}catch(V){B=V}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(V){if(V&&B&&typeof V.stack=="string")return[V.stack,B.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),p=c[0],b=c[1];if(p&&b){var C=p.split(`
|
|
44
|
-
`),_=b.split(`
|
|
45
|
-
`);for(i=n=0;n<C.length&&!C[n].includes("DetermineComponentFrameRoot");)n++;for(;i<_.length&&!_[i].includes("DetermineComponentFrameRoot");)i++;if(n===C.length||i===_.length)for(n=C.length-1,i=_.length-1;1<=n&&0<=i&&C[n]!==_[i];)i--;for(;1<=n&&0<=i;n--,i--)if(C[n]!==_[i]){if(n!==1||i!==1)do if(n--,i--,0>i||C[n]!==_[i]){var K=`
|
|
46
|
-
`+C[n].replace(" at new "," at ");return e.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",e.displayName)),K}while(1<=n&&0<=i);break}}}finally{li=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?xn(a):""}function Yg(e){switch(e.tag){case 26:case 27:case 5:return xn(e.type);case 16:return xn("Lazy");case 13:return xn("Suspense");case 19:return xn("SuspenseList");case 0:case 15:return si(e.type,!1);case 11:return si(e.type.render,!1);case 1:return si(e.type,!0);case 31:return xn("Activity");default:return""}}function lc(e){try{var t="";do t+=Yg(e),e=e.return;while(e);return t}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kg(e){var t=sc(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 i=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(p){n=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Es(e){e._valueTracker||(e._valueTracker=Kg(e))}function rc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=sc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Cs(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 Qg=/[\n"\\]/g;function kt(e){return e.replace(Qg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ri(e,t,a,n,i,c,p,b){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ct(t)):e.value!==""+Ct(t)&&(e.value=""+Ct(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?ii(e,p,Ct(t)):a!=null?ii(e,p,Ct(a)):n!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Ct(b):e.removeAttribute("name")}function ic(e,t,a,n,i,c,p,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null))return;a=a!=null?""+Ct(a):"",t=t!=null?""+Ct(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=b?e.checked:!!n,e.defaultChecked=!!n,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p)}function ii(e,t,a){t==="number"&&Cs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function yn(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function oc(e,t,a){if(t!=null&&(t=""+Ct(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ct(a):""}function uc(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(I(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Ct(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n)}function bn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Xg=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function cc(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Xg.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function dc(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(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 i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&cc(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&cc(e,c,t[c])}function oi(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 Zg=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"]]),Pg=/^[\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 ks(e){return Pg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ui=null;function ci(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vn=null,wn=null;function fc(e){var t=mn(e);if(t&&(e=t.stateNode)){var a=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ri(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="'+kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[dt]||null;if(!i)throw Error(o(90));ri(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&rc(n)}break e;case"textarea":oc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&yn(e,!!a.multiple,t,!1)}}}var di=!1;function hc(e,t,a){if(di)return e(t,a);di=!0;try{var n=e(t);return n}finally{if(di=!1,(vn!==null||wn!==null)&&(fr(),vn&&(t=vn,e=wn,wn=vn=null,fc(t),e)))for(t=0;t<e.length;t++)fc(e[t])}}function fl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[dt]||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(o(231,t,typeof a));return a}var Wt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fi=!1;if(Wt)try{var hl={};Object.defineProperty(hl,"passive",{get:function(){fi=!0}}),window.addEventListener("test",hl,hl),window.removeEventListener("test",hl,hl)}catch{fi=!1}var xa=null,hi=null,Ts=null;function mc(){if(Ts)return Ts;var e,t=hi,a=t.length,n,i="value"in xa?xa.value:xa.textContent,c=i.length;for(e=0;e<a&&t[e]===i[e];e++);var p=a-e;for(n=1;n<=p&&t[a-n]===i[c-n];n++);return Ts=i.slice(e,1<n?1-n:void 0)}function As(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 Rs(){return!0}function gc(){return!1}function ft(e){function t(a,n,i,c,p){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Rs:gc,this.isPropagationStopped=gc,this}return y(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=Rs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Rs)},persist:function(){},isPersistent:Rs}),t}var Qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Os=ft(Qa),ml=y({},Qa,{view:0,detail:0}),Jg=ft(ml),mi,gi,gl,Ms=y({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xi,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!==gl&&(gl&&e.type==="mousemove"?(mi=e.screenX-gl.screenX,gi=e.screenY-gl.screenY):gi=mi=0,gl=e),mi)},movementY:function(e){return"movementY"in e?e.movementY:gi}}),pc=ft(Ms),Fg=y({},Ms,{dataTransfer:0}),Wg=ft(Fg),Ig=y({},ml,{relatedTarget:0}),pi=ft(Ig),e0=y({},Qa,{animationName:0,elapsedTime:0,pseudoElement:0}),t0=ft(e0),a0=y({},Qa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),n0=ft(a0),l0=y({},Qa,{data:0}),xc=ft(l0),s0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r0={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"},i0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=i0[e])?!!t[e]:!1}function xi(){return o0}var u0=y({},ml,{key:function(e){if(e.key){var t=s0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=As(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xi,charCode:function(e){return e.type==="keypress"?As(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?As(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),c0=ft(u0),d0=y({},Ms,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yc=ft(d0),f0=y({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xi}),h0=ft(f0),m0=y({},Qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),g0=ft(m0),p0=y({},Ms,{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}),x0=ft(p0),y0=y({},Qa,{newState:0,oldState:0}),b0=ft(y0),v0=[9,13,27,32],yi=Wt&&"CompositionEvent"in window,pl=null;Wt&&"documentMode"in document&&(pl=document.documentMode);var w0=Wt&&"TextEvent"in window&&!pl,bc=Wt&&(!yi||pl&&8<pl&&11>=pl),vc=" ",wc=!1;function Sc(e,t){switch(e){case"keyup":return v0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sn=!1;function S0(e,t){switch(e){case"compositionend":return jc(t);case"keypress":return t.which!==32?null:(wc=!0,vc);case"textInput":return e=t.data,e===vc&&wc?null:e;default:return null}}function j0(e,t){if(Sn)return e==="compositionend"||!yi&&Sc(e,t)?(e=mc(),Ts=hi=xa=null,Sn=!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 bc&&t.locale!=="ko"?null:t.data;default:return null}}var N0={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 Nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!N0[e.type]:t==="textarea"}function Ec(e,t,a,n){vn?wn?wn.push(n):wn=[n]:vn=n,t=yr(t,"onChange"),0<t.length&&(a=new Os("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var xl=null,yl=null;function E0(e){rh(e,0)}function zs(e){var t=dl(e);if(rc(t))return e}function Cc(e,t){if(e==="change")return t}var kc=!1;if(Wt){var bi;if(Wt){var vi="oninput"in document;if(!vi){var Tc=document.createElement("div");Tc.setAttribute("oninput","return;"),vi=typeof Tc.oninput=="function"}bi=vi}else bi=!1;kc=bi&&(!document.documentMode||9<document.documentMode)}function Ac(){xl&&(xl.detachEvent("onpropertychange",Rc),yl=xl=null)}function Rc(e){if(e.propertyName==="value"&&zs(yl)){var t=[];Ec(t,yl,e,ci(e)),hc(E0,t)}}function C0(e,t,a){e==="focusin"?(Ac(),xl=t,yl=a,xl.attachEvent("onpropertychange",Rc)):e==="focusout"&&Ac()}function k0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zs(yl)}function T0(e,t){if(e==="click")return zs(t)}function A0(e,t){if(e==="input"||e==="change")return zs(t)}function R0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bt=typeof Object.is=="function"?Object.is:R0;function bl(e,t){if(bt(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 i=a[n];if(!pt.call(t,i)||!bt(e[i],t[i]))return!1}return!0}function Oc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mc(e,t){var a=Oc(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=Oc(a)}}function zc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Cs(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=Cs(e.document)}return t}function wi(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 O0=Wt&&"documentMode"in document&&11>=document.documentMode,jn=null,Si=null,vl=null,ji=!1;function Uc(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ji||jn==null||jn!==Cs(n)||(n=jn,"selectionStart"in n&&wi(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}),vl&&bl(vl,n)||(vl=n,n=yr(Si,"onSelect"),0<n.length&&(t=new Os("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=jn)))}function Xa(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Nn={animationend:Xa("Animation","AnimationEnd"),animationiteration:Xa("Animation","AnimationIteration"),animationstart:Xa("Animation","AnimationStart"),transitionrun:Xa("Transition","TransitionRun"),transitionstart:Xa("Transition","TransitionStart"),transitioncancel:Xa("Transition","TransitionCancel"),transitionend:Xa("Transition","TransitionEnd")},Ni={},Lc={};Wt&&(Lc=document.createElement("div").style,"AnimationEvent"in window||(delete Nn.animationend.animation,delete Nn.animationiteration.animation,delete Nn.animationstart.animation),"TransitionEvent"in window||delete Nn.transitionend.transition);function Za(e){if(Ni[e])return Ni[e];if(!Nn[e])return e;var t=Nn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Lc)return Ni[e]=t[a];return e}var _c=Za("animationend"),Hc=Za("animationiteration"),Bc=Za("animationstart"),M0=Za("transitionrun"),z0=Za("transitionstart"),D0=Za("transitioncancel"),qc=Za("transitionend"),Gc=new Map,Ei="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(" ");Ei.push("scrollEnd");function _t(e,t){Gc.set(e,t),Ka(t,[e])}var Vc=new WeakMap;function Tt(e,t){if(typeof e=="object"&&e!==null){var a=Vc.get(e);return a!==void 0?a:(t={value:e,source:t,stack:lc(t)},Vc.set(e,t),t)}return{value:e,source:t,stack:lc(t)}}var At=[],En=0,Ci=0;function Ds(){for(var e=En,t=Ci=En=0;t<e;){var a=At[t];At[t++]=null;var n=At[t];At[t++]=null;var i=At[t];At[t++]=null;var c=At[t];if(At[t++]=null,n!==null&&i!==null){var p=n.pending;p===null?i.next=i:(i.next=p.next,p.next=i),n.pending=i}c!==0&&$c(a,i,c)}}function Us(e,t,a,n){At[En++]=e,At[En++]=t,At[En++]=a,At[En++]=n,Ci|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ki(e,t,a,n){return Us(e,t,a,n),Ls(e)}function Cn(e,t){return Us(e,null,null,t),Ls(e)}function $c(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,c=e.return;c!==null;)c.childLanes|=a,n=c.alternate,n!==null&&(n.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-yt(a),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),c):null}function Ls(e){if(50<Kl)throw Kl=0,Do=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var kn={};function U0(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 vt(e,t,a,n){return new U0(e,t,a,n)}function Ti(e){return e=e.prototype,!(!e||!e.isReactComponent)}function It(e,t){var a=e.alternate;return a===null?(a=vt(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 Yc(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 _s(e,t,a,n,i,c){var p=0;if(n=e,typeof e=="function")Ti(e)&&(p=1);else if(typeof e=="string")p=_p(e,a,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=vt(31,a,t,i),e.elementType=P,e.lanes=c,e;case N:return Pa(a.children,i,c,t);case j:p=8,i|=24;break;case k:return e=vt(12,a,t,i|2),e.elementType=k,e.lanes=c,e;case U:return e=vt(13,a,t,i),e.elementType=U,e.lanes=c,e;case ne:return e=vt(19,a,t,i),e.elementType=ne,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case A:case O:p=10;break e;case E:p=9;break e;case D:p=11;break e;case $:p=14;break e;case G:p=16,n=null;break e}p=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=vt(p,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function Pa(e,t,a,n){return e=vt(7,e,n,t),e.lanes=a,e}function Ai(e,t,a){return e=vt(6,e,null,t),e.lanes=a,e}function Ri(e,t,a){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Tn=[],An=0,Hs=null,Bs=0,Rt=[],Ot=0,Ja=null,ea=1,ta="";function Fa(e,t){Tn[An++]=Bs,Tn[An++]=Hs,Hs=e,Bs=t}function Kc(e,t,a){Rt[Ot++]=ea,Rt[Ot++]=ta,Rt[Ot++]=Ja,Ja=e;var n=ea;e=ta;var i=32-yt(n)-1;n&=~(1<<i),a+=1;var c=32-yt(t)+i;if(30<c){var p=i-i%5;c=(n&(1<<p)-1).toString(32),n>>=p,i-=p,ea=1<<32-yt(t)+i|a<<i|n,ta=c+e}else ea=1<<c|a<<i|n,ta=e}function Oi(e){e.return!==null&&(Fa(e,1),Kc(e,1,0))}function Mi(e){for(;e===Hs;)Hs=Tn[--An],Tn[An]=null,Bs=Tn[--An],Tn[An]=null;for(;e===Ja;)Ja=Rt[--Ot],Rt[Ot]=null,ta=Rt[--Ot],Rt[Ot]=null,ea=Rt[--Ot],Rt[Ot]=null}var ct=null,Ve=null,Re=!1,Wa=null,$t=!1,zi=Error(o(519));function Ia(e){var t=Error(o(418,""));throw jl(Tt(t,e)),zi}function Qc(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[rt]=e,t[dt]=n,a){case"dialog":Ce("cancel",t),Ce("close",t);break;case"iframe":case"object":case"embed":Ce("load",t);break;case"video":case"audio":for(a=0;a<Xl.length;a++)Ce(Xl[a],t);break;case"source":Ce("error",t);break;case"img":case"image":case"link":Ce("error",t),Ce("load",t);break;case"details":Ce("toggle",t);break;case"input":Ce("invalid",t),ic(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),Es(t);break;case"select":Ce("invalid",t);break;case"textarea":Ce("invalid",t),uc(t,n.value,n.defaultValue,n.children),Es(t)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||ch(t.textContent,a)?(n.popover!=null&&(Ce("beforetoggle",t),Ce("toggle",t)),n.onScroll!=null&&Ce("scroll",t),n.onScrollEnd!=null&&Ce("scrollend",t),n.onClick!=null&&(t.onclick=br),t=!0):t=!1,t||Ia(e)}function Xc(e){for(ct=e.return;ct;)switch(ct.tag){case 5:case 13:$t=!1;return;case 27:case 3:$t=!0;return;default:ct=ct.return}}function wl(e){if(e!==ct)return!1;if(!Re)return Xc(e),Re=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Jo(e.type,e.memoizedProps)),a=!a),a&&Ve&&Ia(e),Xc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){Ve=Bt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Ve=null}}else t===27?(t=Ve,za(e.type)?(e=eu,eu=null,Ve=e):Ve=t):Ve=ct?Bt(e.stateNode.nextSibling):null;return!0}function Sl(){Ve=ct=null,Re=!1}function Zc(){var e=Wa;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),Wa=null),e}function jl(e){Wa===null?Wa=[e]:Wa.push(e)}var Di=Y(null),en=null,aa=null;function ya(e,t,a){X(Di,t._currentValue),t._currentValue=a}function na(e){e._currentValue=Di.current,ee(Di)}function Ui(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 Li(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var p=i.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=i;for(var C=0;C<t.length;C++)if(b.context===t[C]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),Ui(c.return,a,e),n||(p=null);break e}c=b.next}}else if(i.tag===18){if(p=i.return,p===null)throw Error(o(341));p.lanes|=a,c=p.alternate,c!==null&&(c.lanes|=a),Ui(p,a,e),p=null}else p=i.child;if(p!==null)p.return=i;else for(p=i;p!==null;){if(p===e){p=null;break}if(i=p.sibling,i!==null){i.return=p.return,p=i;break}p=p.return}i=p}}function Nl(e,t,a,n){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var p=i.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var b=i.type;bt(i.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(i===ae.current){if(p=i.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Il):e=[Il])}i=i.return}e!==null&&Li(t,e,a,n),t.flags|=262144}function qs(e){for(e=e.firstContext;e!==null;){if(!bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function tn(e){en=e,aa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function it(e){return Pc(en,e)}function Gs(e,t){return en===null&&tn(e),Pc(e,t)}function Pc(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},aa===null){if(e===null)throw Error(o(308));aa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else aa=aa.next=t;return a}var L0=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()})}},_0=l.unstable_scheduleCallback,H0=l.unstable_NormalPriority,Ze={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _i(){return{controller:new L0,data:new Map,refCount:0}}function El(e){e.refCount--,e.refCount===0&&_0(H0,function(){e.controller.abort()})}var Cl=null,Hi=0,Rn=0,On=null;function B0(e,t){if(Cl===null){var a=Cl=[];Hi=0,Rn=Go(),On={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Hi++,t.then(Jc,Jc),t}function Jc(){if(--Hi===0&&Cl!==null){On!==null&&(On.status="fulfilled");var e=Cl;Cl=null,Rn=0,On=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function q0(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var Fc=H.S;H.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&B0(e,t),Fc!==null&&Fc(e,t)};var an=Y(null);function Bi(){var e=an.current;return e!==null?e:_e.pooledCache}function Vs(e,t){t===null?X(an,an.current):X(an,t.pool)}function Wc(){var e=Bi();return e===null?null:{parent:Ze._currentValue,pool:e}}var kl=Error(o(460)),Ic=Error(o(474)),$s=Error(o(542)),qi={then:function(){}};function ed(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ys(){}function td(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ys,Ys),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,nd(e),e;default:if(typeof t.status=="string")t.then(Ys,Ys);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,nd(e),e}throw Tl=t,kl}}var Tl=null;function ad(){if(Tl===null)throw Error(o(459));var e=Tl;return Tl=null,e}function nd(e){if(e===kl||e===$s)throw Error(o(483))}var ba=!1;function Gi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vi(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 va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Oe&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Ls(e),$c(e,null,a),t}return Us(e,n,t,a),Ls(e)}function Al(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,Ju(e,a)}}function $i(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=p:c=c.next=p,a=a.next}while(a!==null);c===null?i=c=t:c=c.next=t}else i=c=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:c,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 Yi=!1;function Rl(){if(Yi){var e=On;if(e!==null)throw e}}function Ol(e,t,a,n){Yi=!1;var i=e.updateQueue;ba=!1;var c=i.firstBaseUpdate,p=i.lastBaseUpdate,b=i.shared.pending;if(b!==null){i.shared.pending=null;var C=b,_=C.next;C.next=null,p===null?c=_:p.next=_,p=C;var K=e.alternate;K!==null&&(K=K.updateQueue,b=K.lastBaseUpdate,b!==p&&(b===null?K.firstBaseUpdate=_:b.next=_,K.lastBaseUpdate=C))}if(c!==null){var Z=i.baseState;p=0,K=_=C=null,b=c;do{var B=b.lane&-536870913,V=B!==b.lane;if(V?(Te&B)===B:(n&B)===B){B!==0&&B===Rn&&(Yi=!0),K!==null&&(K=K.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var xe=e,me=b;B=t;var Ue=a;switch(me.tag){case 1:if(xe=me.payload,typeof xe=="function"){Z=xe.call(Ue,Z,B);break e}Z=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=me.payload,B=typeof xe=="function"?xe.call(Ue,Z,B):xe,B==null)break e;Z=y({},Z,B);break e;case 2:ba=!0}}B=b.callback,B!==null&&(e.flags|=64,V&&(e.flags|=8192),V=i.callbacks,V===null?i.callbacks=[B]:V.push(B))}else V={lane:B,tag:b.tag,payload:b.payload,callback:b.callback,next:null},K===null?(_=K=V,C=Z):K=K.next=V,p|=B;if(b=b.next,b===null){if(b=i.shared.pending,b===null)break;V=b,b=V.next,V.next=null,i.lastBaseUpdate=V,i.shared.pending=null}}while(!0);K===null&&(C=Z),i.baseState=C,i.firstBaseUpdate=_,i.lastBaseUpdate=K,c===null&&(i.shared.lanes=0),Aa|=p,e.lanes=p,e.memoizedState=Z}}function ld(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function sd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ld(a[e],t)}var Mn=Y(null),Ks=Y(0);function rd(e,t){e=ca,X(Ks,e),X(Mn,t),ca=e|t.baseLanes}function Ki(){X(Ks,ca),X(Mn,Mn.current)}function Qi(){ca=Ks.current,ee(Mn),ee(Ks)}var Sa=0,we=null,ze=null,Qe=null,Qs=!1,zn=!1,nn=!1,Xs=0,Ml=0,Dn=null,G0=0;function Ye(){throw Error(o(321))}function Xi(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!bt(e[a],t[a]))return!1;return!0}function Zi(e,t,a,n,i,c){return Sa=c,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?$d:Yd,nn=!1,c=a(n,i),nn=!1,zn&&(c=od(t,a,n,i)),id(e),c}function id(e){H.H=Is;var t=ze!==null&&ze.next!==null;if(Sa=0,Qe=ze=we=null,Qs=!1,Ml=0,Dn=null,t)throw Error(o(300));e===null||Ie||(e=e.dependencies,e!==null&&qs(e)&&(Ie=!0))}function od(e,t,a,n){we=e;var i=0;do{if(zn&&(Dn=null),Ml=0,zn=!1,25<=i)throw Error(o(301));if(i+=1,Qe=ze=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}H.H=Z0,c=t(a,n)}while(zn);return c}function V0(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?zl(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(we.flags|=1024),t}function Pi(){var e=Xs!==0;return Xs=0,e}function Ji(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Fi(e){if(Qs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qs=!1}Sa=0,Qe=ze=we=null,zn=!1,Ml=Xs=0,Dn=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?we.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function Xe(){if(ze===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Qe===null?we.memoizedState:Qe.next;if(t!==null)Qe=t,ze=e;else{if(e===null)throw we.alternate===null?Error(o(467)):Error(o(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Qe===null?we.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function Wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zl(e){var t=Ml;return Ml+=1,Dn===null&&(Dn=[]),e=td(Dn,e,t),t=we,(Qe===null?t.memoizedState:Qe.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?$d:Yd),e}function Zs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return zl(e);if(e.$$typeof===O)return it(e)}throw Error(o(438,String(e)))}function Ii(e){var t=null,a=we.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=we.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Wi(),we.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]=J;return t.index++,a}function la(e,t){return typeof t=="function"?t(e):t}function Ps(e){var t=Xe();return eo(t,ze,e)}function eo(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,c=n.pending;if(c!==null){if(i!==null){var p=i.next;i.next=c.next,c.next=p}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var b=p=null,C=null,_=t,K=!1;do{var Z=_.lane&-536870913;if(Z!==_.lane?(Te&Z)===Z:(Sa&Z)===Z){var B=_.revertLane;if(B===0)C!==null&&(C=C.next={lane:0,revertLane:0,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),Z===Rn&&(K=!0);else if((Sa&B)===B){_=_.next,B===Rn&&(K=!0);continue}else Z={lane:0,revertLane:_.revertLane,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},C===null?(b=C=Z,p=c):C=C.next=Z,we.lanes|=B,Aa|=B;Z=_.action,nn&&a(c,Z),c=_.hasEagerState?_.eagerState:a(c,Z)}else B={lane:Z,revertLane:_.revertLane,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},C===null?(b=C=B,p=c):C=C.next=B,we.lanes|=Z,Aa|=Z;_=_.next}while(_!==null&&_!==t);if(C===null?p=c:C.next=b,!bt(c,e.memoizedState)&&(Ie=!0,K&&(a=On,a!==null)))throw a;e.memoizedState=c,e.baseState=p,e.baseQueue=C,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function to(e){var t=Xe(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,c=t.memoizedState;if(i!==null){a.pending=null;var p=i=i.next;do c=e(c,p.action),p=p.next;while(p!==i);bt(c,t.memoizedState)||(Ie=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function ud(e,t,a){var n=we,i=Xe(),c=Re;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var p=!bt((ze||i).memoizedState,a);p&&(i.memoizedState=a,Ie=!0),i=i.queue;var b=fd.bind(null,n,i,e);if(Dl(2048,8,b,[e]),i.getSnapshot!==t||p||Qe!==null&&Qe.memoizedState.tag&1){if(n.flags|=2048,Un(9,Js(),dd.bind(null,n,i,a,t),null),_e===null)throw Error(o(349));c||(Sa&124)!==0||cd(n,t,a)}return a}function cd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=we.updateQueue,t===null?(t=Wi(),we.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function dd(e,t,a,n){t.value=a,t.getSnapshot=n,hd(t)&&md(e)}function fd(e,t,a){return a(function(){hd(t)&&md(e)})}function hd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!bt(e,a)}catch{return!0}}function md(e){var t=Cn(e,2);t!==null&&Et(t,e,2)}function ao(e){var t=ht();if(typeof e=="function"){var a=e;if(e=a(),nn){ga(!0);try{a()}finally{ga(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:e},t}function gd(e,t,a,n){return e.baseState=a,eo(e,ze,typeof n=="function"?n:la)}function $0(e,t,a,n,i){if(Ws(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){c.listeners.push(p)}};H.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,pd(t,c)):(c.next=a.next,t.pending=a.next=c)}}function pd(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=H.T,p={};H.T=p;try{var b=a(i,n),C=H.S;C!==null&&C(p,b),xd(e,t,b)}catch(_){no(e,t,_)}finally{H.T=c}}else try{c=a(i,n),xd(e,t,c)}catch(_){no(e,t,_)}}function xd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){yd(e,t,n)},function(n){return no(e,t,n)}):yd(e,t,a)}function yd(e,t,a){t.status="fulfilled",t.value=a,bd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,pd(e,a)))}function no(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,bd(t),t=t.next;while(t!==n)}e.action=null}function bd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function vd(e,t){return t}function wd(e,t){if(Re){var a=_e.formState;if(a!==null){e:{var n=we;if(Re){if(Ve){t:{for(var i=Ve,c=$t;i.nodeType!==8;){if(!c){i=null;break t}if(i=Bt(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){Ve=Bt(i.nextSibling),n=i.data==="F!";break e}}Ia(n)}n=!1}n&&(t=a[0])}}return a=ht(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vd,lastRenderedState:t},a.queue=n,a=qd.bind(null,we,n),n.dispatch=a,n=ao(!1),c=oo.bind(null,we,!1,n.queue),n=ht(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=$0.bind(null,we,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function Sd(e){var t=Xe();return jd(t,ze,e)}function jd(e,t,a){if(t=eo(e,t,vd)[0],e=Ps(la)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=zl(t)}catch(p){throw p===kl?$s:p}else n=t;t=Xe();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(we.flags|=2048,Un(9,Js(),Y0.bind(null,i,a),null)),[n,c,e]}function Y0(e,t){e.action=t}function Nd(e){var t=Xe(),a=ze;if(a!==null)return jd(t,a,e);Xe(),t=t.memoizedState,a=Xe();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Un(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=we.updateQueue,t===null&&(t=Wi(),we.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 Js(){return{destroy:void 0,resource:void 0}}function Ed(){return Xe().memoizedState}function Fs(e,t,a,n){var i=ht();n=n===void 0?null:n,we.flags|=e,i.memoizedState=Un(1|t,Js(),a,n)}function Dl(e,t,a,n){var i=Xe();n=n===void 0?null:n;var c=i.memoizedState.inst;ze!==null&&n!==null&&Xi(n,ze.memoizedState.deps)?i.memoizedState=Un(t,c,a,n):(we.flags|=e,i.memoizedState=Un(1|t,c,a,n))}function Cd(e,t){Fs(8390656,8,e,t)}function kd(e,t){Dl(2048,8,e,t)}function Td(e,t){return Dl(4,2,e,t)}function Ad(e,t){return Dl(4,4,e,t)}function Rd(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 Od(e,t,a){a=a!=null?a.concat([e]):null,Dl(4,4,Rd.bind(null,t,e),a)}function lo(){}function Md(e,t){var a=Xe();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Xi(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function zd(e,t){var a=Xe();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Xi(t,n[1]))return n[0];if(n=e(),nn){ga(!0);try{e()}finally{ga(!1)}}return a.memoizedState=[n,t],n}function so(e,t,a){return a===void 0||(Sa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=_f(),we.lanes|=e,Aa|=e,a)}function Dd(e,t,a,n){return bt(a,t)?a:Mn.current!==null?(e=so(e,a,n),bt(e,t)||(Ie=!0),e):(Sa&42)===0?(Ie=!0,e.memoizedState=a):(e=_f(),we.lanes|=e,Aa|=e,t)}function Ud(e,t,a,n,i){var c=W.p;W.p=c!==0&&8>c?c:8;var p=H.T,b={};H.T=b,oo(e,!1,t,a);try{var C=i(),_=H.S;if(_!==null&&_(b,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var K=q0(C,n);Ul(e,t,K,Nt(e))}else Ul(e,t,n,Nt(e))}catch(Z){Ul(e,t,{then:function(){},status:"rejected",reason:Z},Nt())}finally{W.p=c,H.T=p}}function K0(){}function ro(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Ld(e).queue;Ud(e,i,t,q,a===null?K0:function(){return _d(e),a(n)})}function Ld(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:q},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _d(e){var t=Ld(e).next.queue;Ul(e,t,{},Nt())}function io(){return it(Il)}function Hd(){return Xe().memoizedState}function Bd(){return Xe().memoizedState}function Q0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Nt();e=va(a);var n=wa(t,e,a);n!==null&&(Et(n,t,a),Al(n,t,a)),t={cache:_i()},e.payload=t;return}t=t.return}}function X0(e,t,a){var n=Nt();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Ws(e)?Gd(t,a):(a=ki(e,t,a,n),a!==null&&(Et(a,e,n),Vd(a,t,n)))}function qd(e,t,a){var n=Nt();Ul(e,t,a,n)}function Ul(e,t,a,n){var i={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ws(e))Gd(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,b=c(p,a);if(i.hasEagerState=!0,i.eagerState=b,bt(b,p))return Us(e,t,i,0),_e===null&&Ds(),!1}catch{}finally{}if(a=ki(e,t,i,n),a!==null)return Et(a,e,n),Vd(a,t,n),!0}return!1}function oo(e,t,a,n){if(n={lane:2,revertLane:Go(),action:n,hasEagerState:!1,eagerState:null,next:null},Ws(e)){if(t)throw Error(o(479))}else t=ki(e,a,n,2),t!==null&&Et(t,e,2)}function Ws(e){var t=e.alternate;return e===we||t!==null&&t===we}function Gd(e,t){zn=Qs=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Vd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Ju(e,a)}}var Is={readContext:it,use:Zs,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye},$d={readContext:it,use:Zs,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:Cd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Fs(4194308,4,Rd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var a=ht();t=t===void 0?null:t;var n=e();if(nn){ga(!0);try{e()}finally{ga(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ht();if(a!==void 0){var i=a(t);if(nn){ga(!0);try{a(t)}finally{ga(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=X0.bind(null,we,e),[n.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=ao(e);var t=e.queue,a=qd.bind(null,we,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:lo,useDeferredValue:function(e,t){var a=ht();return so(a,e,t)},useTransition:function(){var e=ao(!1);return e=Ud.bind(null,we,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=we,i=ht();if(Re){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),_e===null)throw Error(o(349));(Te&124)!==0||cd(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Cd(fd.bind(null,n,c,e),[e]),n.flags|=2048,Un(9,Js(),dd.bind(null,n,c,a,t),null),a},useId:function(){var e=ht(),t=_e.identifierPrefix;if(Re){var a=ta,n=ea;a=(n&~(1<<32-yt(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=Xs++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=G0++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:io,useFormState:wd,useActionState:wd,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=oo.bind(null,we,!0,a),a.dispatch=t,[e,t]},useMemoCache:Ii,useCacheRefresh:function(){return ht().memoizedState=Q0.bind(null,we)}},Yd={readContext:it,use:Zs,useCallback:Md,useContext:it,useEffect:kd,useImperativeHandle:Od,useInsertionEffect:Td,useLayoutEffect:Ad,useMemo:zd,useReducer:Ps,useRef:Ed,useState:function(){return Ps(la)},useDebugValue:lo,useDeferredValue:function(e,t){var a=Xe();return Dd(a,ze.memoizedState,e,t)},useTransition:function(){var e=Ps(la)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:zl(e),t]},useSyncExternalStore:ud,useId:Hd,useHostTransitionStatus:io,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,t){var a=Xe();return gd(a,ze,e,t)},useMemoCache:Ii,useCacheRefresh:Bd},Z0={readContext:it,use:Zs,useCallback:Md,useContext:it,useEffect:kd,useImperativeHandle:Od,useInsertionEffect:Td,useLayoutEffect:Ad,useMemo:zd,useReducer:to,useRef:Ed,useState:function(){return to(la)},useDebugValue:lo,useDeferredValue:function(e,t){var a=Xe();return ze===null?so(a,e,t):Dd(a,ze.memoizedState,e,t)},useTransition:function(){var e=to(la)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:zl(e),t]},useSyncExternalStore:ud,useId:Hd,useHostTransitionStatus:io,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var a=Xe();return ze!==null?gd(a,ze,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Ii,useCacheRefresh:Bd},Ln=null,Ll=0;function er(e){var t=Ll;return Ll+=1,Ln===null&&(Ln=[]),td(Ln,e,t)}function _l(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function tr(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kd(e){var t=e._init;return t(e._payload)}function Qd(e){function t(z,R){if(e){var L=z.deletions;L===null?(z.deletions=[R],z.flags|=16):L.push(R)}}function a(z,R){if(!e)return null;for(;R!==null;)t(z,R),R=R.sibling;return null}function n(z){for(var R=new Map;z!==null;)z.key!==null?R.set(z.key,z):R.set(z.index,z),z=z.sibling;return R}function i(z,R){return z=It(z,R),z.index=0,z.sibling=null,z}function c(z,R,L){return z.index=L,e?(L=z.alternate,L!==null?(L=L.index,L<R?(z.flags|=67108866,R):L):(z.flags|=67108866,R)):(z.flags|=1048576,R)}function p(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function b(z,R,L,Q){return R===null||R.tag!==6?(R=Ai(L,z.mode,Q),R.return=z,R):(R=i(R,L),R.return=z,R)}function C(z,R,L,Q){var ue=L.type;return ue===N?K(z,R,L.props.children,Q,L.key):R!==null&&(R.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===G&&Kd(ue)===R.type)?(R=i(R,L.props),_l(R,L),R.return=z,R):(R=_s(L.type,L.key,L.props,null,z.mode,Q),_l(R,L),R.return=z,R)}function _(z,R,L,Q){return R===null||R.tag!==4||R.stateNode.containerInfo!==L.containerInfo||R.stateNode.implementation!==L.implementation?(R=Ri(L,z.mode,Q),R.return=z,R):(R=i(R,L.children||[]),R.return=z,R)}function K(z,R,L,Q,ue){return R===null||R.tag!==7?(R=Pa(L,z.mode,Q,ue),R.return=z,R):(R=i(R,L),R.return=z,R)}function Z(z,R,L){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=Ai(""+R,z.mode,L),R.return=z,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case v:return L=_s(R.type,R.key,R.props,null,z.mode,L),_l(L,R),L.return=z,L;case M:return R=Ri(R,z.mode,L),R.return=z,R;case G:var Q=R._init;return R=Q(R._payload),Z(z,R,L)}if(I(R)||te(R))return R=Pa(R,z.mode,L,null),R.return=z,R;if(typeof R.then=="function")return Z(z,er(R),L);if(R.$$typeof===O)return Z(z,Gs(z,R),L);tr(z,R)}return null}function B(z,R,L,Q){var ue=R!==null?R.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ue!==null?null:b(z,R,""+L,Q);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case v:return L.key===ue?C(z,R,L,Q):null;case M:return L.key===ue?_(z,R,L,Q):null;case G:return ue=L._init,L=ue(L._payload),B(z,R,L,Q)}if(I(L)||te(L))return ue!==null?null:K(z,R,L,Q,null);if(typeof L.then=="function")return B(z,R,er(L),Q);if(L.$$typeof===O)return B(z,R,Gs(z,L),Q);tr(z,L)}return null}function V(z,R,L,Q,ue){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return z=z.get(L)||null,b(R,z,""+Q,ue);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return z=z.get(Q.key===null?L:Q.key)||null,C(R,z,Q,ue);case M:return z=z.get(Q.key===null?L:Q.key)||null,_(R,z,Q,ue);case G:var Ne=Q._init;return Q=Ne(Q._payload),V(z,R,L,Q,ue)}if(I(Q)||te(Q))return z=z.get(L)||null,K(R,z,Q,ue,null);if(typeof Q.then=="function")return V(z,R,L,er(Q),ue);if(Q.$$typeof===O)return V(z,R,L,Gs(R,Q),ue);tr(R,Q)}return null}function xe(z,R,L,Q){for(var ue=null,Ne=null,he=R,ge=R=0,tt=null;he!==null&&ge<L.length;ge++){he.index>ge?(tt=he,he=null):tt=he.sibling;var Ae=B(z,he,L[ge],Q);if(Ae===null){he===null&&(he=tt);break}e&&he&&Ae.alternate===null&&t(z,he),R=c(Ae,R,ge),Ne===null?ue=Ae:Ne.sibling=Ae,Ne=Ae,he=tt}if(ge===L.length)return a(z,he),Re&&Fa(z,ge),ue;if(he===null){for(;ge<L.length;ge++)he=Z(z,L[ge],Q),he!==null&&(R=c(he,R,ge),Ne===null?ue=he:Ne.sibling=he,Ne=he);return Re&&Fa(z,ge),ue}for(he=n(he);ge<L.length;ge++)tt=V(he,z,ge,L[ge],Q),tt!==null&&(e&&tt.alternate!==null&&he.delete(tt.key===null?ge:tt.key),R=c(tt,R,ge),Ne===null?ue=tt:Ne.sibling=tt,Ne=tt);return e&&he.forEach(function(Ha){return t(z,Ha)}),Re&&Fa(z,ge),ue}function me(z,R,L,Q){if(L==null)throw Error(o(151));for(var ue=null,Ne=null,he=R,ge=R=0,tt=null,Ae=L.next();he!==null&&!Ae.done;ge++,Ae=L.next()){he.index>ge?(tt=he,he=null):tt=he.sibling;var Ha=B(z,he,Ae.value,Q);if(Ha===null){he===null&&(he=tt);break}e&&he&&Ha.alternate===null&&t(z,he),R=c(Ha,R,ge),Ne===null?ue=Ha:Ne.sibling=Ha,Ne=Ha,he=tt}if(Ae.done)return a(z,he),Re&&Fa(z,ge),ue;if(he===null){for(;!Ae.done;ge++,Ae=L.next())Ae=Z(z,Ae.value,Q),Ae!==null&&(R=c(Ae,R,ge),Ne===null?ue=Ae:Ne.sibling=Ae,Ne=Ae);return Re&&Fa(z,ge),ue}for(he=n(he);!Ae.done;ge++,Ae=L.next())Ae=V(he,z,ge,Ae.value,Q),Ae!==null&&(e&&Ae.alternate!==null&&he.delete(Ae.key===null?ge:Ae.key),R=c(Ae,R,ge),Ne===null?ue=Ae:Ne.sibling=Ae,Ne=Ae);return e&&he.forEach(function(Pp){return t(z,Pp)}),Re&&Fa(z,ge),ue}function Ue(z,R,L,Q){if(typeof L=="object"&&L!==null&&L.type===N&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case v:e:{for(var ue=L.key;R!==null;){if(R.key===ue){if(ue=L.type,ue===N){if(R.tag===7){a(z,R.sibling),Q=i(R,L.props.children),Q.return=z,z=Q;break e}}else if(R.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===G&&Kd(ue)===R.type){a(z,R.sibling),Q=i(R,L.props),_l(Q,L),Q.return=z,z=Q;break e}a(z,R);break}else t(z,R);R=R.sibling}L.type===N?(Q=Pa(L.props.children,z.mode,Q,L.key),Q.return=z,z=Q):(Q=_s(L.type,L.key,L.props,null,z.mode,Q),_l(Q,L),Q.return=z,z=Q)}return p(z);case M:e:{for(ue=L.key;R!==null;){if(R.key===ue)if(R.tag===4&&R.stateNode.containerInfo===L.containerInfo&&R.stateNode.implementation===L.implementation){a(z,R.sibling),Q=i(R,L.children||[]),Q.return=z,z=Q;break e}else{a(z,R);break}else t(z,R);R=R.sibling}Q=Ri(L,z.mode,Q),Q.return=z,z=Q}return p(z);case G:return ue=L._init,L=ue(L._payload),Ue(z,R,L,Q)}if(I(L))return xe(z,R,L,Q);if(te(L)){if(ue=te(L),typeof ue!="function")throw Error(o(150));return L=ue.call(L),me(z,R,L,Q)}if(typeof L.then=="function")return Ue(z,R,er(L),Q);if(L.$$typeof===O)return Ue(z,R,Gs(z,L),Q);tr(z,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,R!==null&&R.tag===6?(a(z,R.sibling),Q=i(R,L),Q.return=z,z=Q):(a(z,R),Q=Ai(L,z.mode,Q),Q.return=z,z=Q),p(z)):a(z,R)}return function(z,R,L,Q){try{Ll=0;var ue=Ue(z,R,L,Q);return Ln=null,ue}catch(he){if(he===kl||he===$s)throw he;var Ne=vt(29,he,null,z.mode);return Ne.lanes=Q,Ne.return=z,Ne}finally{}}}var _n=Qd(!0),Xd=Qd(!1),Mt=Y(null),Yt=null;function ja(e){var t=e.alternate;X(Pe,Pe.current&1),X(Mt,e),Yt===null&&(t===null||Mn.current!==null||t.memoizedState!==null)&&(Yt=e)}function Zd(e){if(e.tag===22){if(X(Pe,Pe.current),X(Mt,e),Yt===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Yt=e)}}else Na()}function Na(){X(Pe,Pe.current),X(Mt,Mt.current)}function sa(e){ee(Mt),Yt===e&&(Yt=null),ee(Pe)}var Pe=Y(0);function ar(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==="$?"||Io(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)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 uo(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var co={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Nt(),i=va(n);i.payload=t,a!=null&&(i.callback=a),t=wa(e,i,n),t!==null&&(Et(t,e,n),Al(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Nt(),i=va(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=wa(e,i,n),t!==null&&(Et(t,e,n),Al(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Nt(),n=va(a);n.tag=2,t!=null&&(n.callback=t),t=wa(e,n,a),t!==null&&(Et(t,e,a),Al(t,e,a))}};function Pd(e,t,a,n,i,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,p):t.prototype&&t.prototype.isPureReactComponent?!bl(a,n)||!bl(i,c):!0}function Jd(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 ln(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=y({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}var nr=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 Fd(e){nr(e)}function Wd(e){console.error(e)}function Id(e){nr(e)}function lr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function ef(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function fo(e,t,a){return a=va(a),a.tag=3,a.payload={element:null},a.callback=function(){lr(e,t)},a}function tf(e){return e=va(e),e.tag=3,e}function af(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var c=n.value;e.payload=function(){return i(c)},e.callback=function(){ef(t,a,n)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){ef(t,a,n),typeof i!="function"&&(Ra===null?Ra=new Set([this]):Ra.add(this));var b=n.stack;this.componentDidCatch(n.value,{componentStack:b!==null?b:""})})}function P0(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Nl(t,a,i,!0),a=Mt.current,a!==null){switch(a.tag){case 13:return Yt===null?Lo():a.alternate===null&&$e===0&&($e=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===qi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ho(e,n,i)),!1;case 22:return a.flags|=65536,n===qi?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)),Ho(e,n,i)),!1}throw Error(o(435,a.tag))}return Ho(e,n,i),Lo(),!1}if(Re)return t=Mt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==zi&&(e=Error(o(422),{cause:n}),jl(Tt(e,a)))):(n!==zi&&(t=Error(o(423),{cause:n}),jl(Tt(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=Tt(n,a),i=fo(e.stateNode,n,i),$i(e,i),$e!==4&&($e=2)),!1;var c=Error(o(520),{cause:n});if(c=Tt(c,a),Yl===null?Yl=[c]:Yl.push(c),$e!==4&&($e=2),t===null)return!0;n=Tt(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=fo(a.stateNode,n,e),$i(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Ra===null||!Ra.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=tf(i),af(i,e,a,n),$i(a,i),!1}a=a.return}while(a!==null);return!1}var nf=Error(o(461)),Ie=!1;function at(e,t,a,n){t.child=e===null?Xd(t,null,a,n):_n(t,e.child,a,n)}function lf(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var p={};for(var b in n)b!=="ref"&&(p[b]=n[b])}else p=n;return tn(t),n=Zi(e,t,a,p,c,i),b=Pi(),e!==null&&!Ie?(Ji(e,t,i),ra(e,t,i)):(Re&&b&&Oi(t),t.flags|=1,at(e,t,n,i),t.child)}function sf(e,t,a,n,i){if(e===null){var c=a.type;return typeof c=="function"&&!Ti(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,rf(e,t,c,n,i)):(e=_s(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!vo(e,i)){var p=c.memoizedProps;if(a=a.compare,a=a!==null?a:bl,a(p,n)&&e.ref===t.ref)return ra(e,t,i)}return t.flags|=1,e=It(c,n),e.ref=t.ref,e.return=t,t.child=e}function rf(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(bl(c,n)&&e.ref===t.ref)if(Ie=!1,t.pendingProps=n=c,vo(e,i))(e.flags&131072)!==0&&(Ie=!0);else return t.lanes=e.lanes,ra(e,t,i)}return ho(e,t,a,n,i)}function of(e,t,a){var n=t.pendingProps,i=n.children,c=e!==null?e.memoizedState:null;if(n.mode==="hidden"){if((t.flags&128)!==0){if(n=c!==null?c.baseLanes|a:a,e!==null){for(i=t.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;t.childLanes=c&~n}else t.childLanes=0,t.child=null;return uf(e,t,n,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vs(t,c!==null?c.cachePool:null),c!==null?rd(t,c):Ki(),Zd(t);else return t.lanes=t.childLanes=536870912,uf(e,t,c!==null?c.baseLanes|a:a,a)}else c!==null?(Vs(t,c.cachePool),rd(t,c),Na(),t.memoizedState=null):(e!==null&&Vs(t,null),Ki(),Na());return at(e,t,i,a),t.child}function uf(e,t,a,n){var i=Bi();return i=i===null?null:{parent:Ze._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&Vs(t,null),Ki(),Zd(t),e!==null&&Nl(e,t,n,!0),null}function sr(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(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function ho(e,t,a,n,i){return tn(t),a=Zi(e,t,a,n,void 0,i),n=Pi(),e!==null&&!Ie?(Ji(e,t,i),ra(e,t,i)):(Re&&n&&Oi(t),t.flags|=1,at(e,t,a,i),t.child)}function cf(e,t,a,n,i,c){return tn(t),t.updateQueue=null,a=od(t,n,a,i),id(e),n=Pi(),e!==null&&!Ie?(Ji(e,t,c),ra(e,t,c)):(Re&&n&&Oi(t),t.flags|=1,at(e,t,a,c),t.child)}function df(e,t,a,n,i){if(tn(t),t.stateNode===null){var c=kn,p=a.contextType;typeof p=="object"&&p!==null&&(c=it(p)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=co,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Gi(t),p=a.contextType,c.context=typeof p=="object"&&p!==null?it(p):kn,c.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(uo(t,a,p,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(p=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),p!==c.state&&co.enqueueReplaceState(c,c.state,null),Ol(t,n,c,i),Rl(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,C=ln(a,b);c.props=C;var _=c.context,K=a.contextType;p=kn,typeof K=="object"&&K!==null&&(p=it(K));var Z=a.getDerivedStateFromProps;K=typeof Z=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,K||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||_!==p)&&Jd(t,c,n,p),ba=!1;var B=t.memoizedState;c.state=B,Ol(t,n,c,i),Rl(),_=t.memoizedState,b||B!==_||ba?(typeof Z=="function"&&(uo(t,a,Z,n),_=t.memoizedState),(C=ba||Pd(t,a,C,n,B,_,p))?(K||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=_),c.props=n,c.state=_,c.context=p,n=C):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,Vi(e,t),p=t.memoizedProps,K=ln(a,p),c.props=K,Z=t.pendingProps,B=c.context,_=a.contextType,C=kn,typeof _=="object"&&_!==null&&(C=it(_)),b=a.getDerivedStateFromProps,(_=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(p!==Z||B!==C)&&Jd(t,c,n,C),ba=!1,B=t.memoizedState,c.state=B,Ol(t,n,c,i),Rl();var V=t.memoizedState;p!==Z||B!==V||ba||e!==null&&e.dependencies!==null&&qs(e.dependencies)?(typeof b=="function"&&(uo(t,a,b,n),V=t.memoizedState),(K=ba||Pd(t,a,K,n,B,V,C)||e!==null&&e.dependencies!==null&&qs(e.dependencies))?(_||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,V,C),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,V,C)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=V),c.props=n,c.state=V,c.context=C,n=K):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,sr(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=_n(t,e.child,null,i),t.child=_n(t,null,a,i)):at(e,t,a,i),t.memoizedState=c.state,e=t.child):e=ra(e,t,i),e}function ff(e,t,a,n){return Sl(),t.flags|=256,at(e,t,a,n),t.child}var mo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function go(e){return{baseLanes:e,cachePool:Wc()}}function po(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=zt),e}function hf(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,p;if((p=c)||(p=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),p&&(i=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(i?ja(t):Na(),Re){var b=Ve,C;if(C=b){e:{for(C=b,b=$t;C.nodeType!==8;){if(!b){b=null;break e}if(C=Bt(C.nextSibling),C===null){b=null;break e}}b=C}b!==null?(t.memoizedState={dehydrated:b,treeContext:Ja!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},C=vt(18,null,null,0),C.stateNode=b,C.return=t,t.child=C,ct=t,Ve=null,C=!0):C=!1}C||Ia(t)}if(b=t.memoizedState,b!==null&&(b=b.dehydrated,b!==null))return Io(b)?t.lanes=32:t.lanes=536870912,null;sa(t)}return b=n.children,n=n.fallback,i?(Na(),i=t.mode,b=rr({mode:"hidden",children:b},i),n=Pa(n,i,a,null),b.return=t,n.return=t,b.sibling=n,t.child=b,i=t.child,i.memoizedState=go(a),i.childLanes=po(e,p,a),t.memoizedState=mo,n):(ja(t),xo(t,b))}if(C=e.memoizedState,C!==null&&(b=C.dehydrated,b!==null)){if(c)t.flags&256?(ja(t),t.flags&=-257,t=yo(e,t,a)):t.memoizedState!==null?(Na(),t.child=e.child,t.flags|=128,t=null):(Na(),i=n.fallback,b=t.mode,n=rr({mode:"visible",children:n.children},b),i=Pa(i,b,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,_n(t,e.child,null,a),n=t.child,n.memoizedState=go(a),n.childLanes=po(e,p,a),t.memoizedState=mo,t=i);else if(ja(t),Io(b)){if(p=b.nextSibling&&b.nextSibling.dataset,p)var _=p.dgst;p=_,n=Error(o(419)),n.stack="",n.digest=p,jl({value:n,source:null,stack:null}),t=yo(e,t,a)}else if(Ie||Nl(e,t,a,!1),p=(a&e.childLanes)!==0,Ie||p){if(p=_e,p!==null&&(n=a&-a,n=(n&42)!==0?1:Ir(n),n=(n&(p.suspendedLanes|a))!==0?0:n,n!==0&&n!==C.retryLane))throw C.retryLane=n,Cn(e,n),Et(p,e,n),nf;b.data==="$?"||Lo(),t=yo(e,t,a)}else b.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,Ve=Bt(b.nextSibling),ct=t,Re=!0,Wa=null,$t=!1,e!==null&&(Rt[Ot++]=ea,Rt[Ot++]=ta,Rt[Ot++]=Ja,ea=e.id,ta=e.overflow,Ja=t),t=xo(t,n.children),t.flags|=4096);return t}return i?(Na(),i=n.fallback,b=t.mode,C=e.child,_=C.sibling,n=It(C,{mode:"hidden",children:n.children}),n.subtreeFlags=C.subtreeFlags&65011712,_!==null?i=It(_,i):(i=Pa(i,b,a,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,b=e.child.memoizedState,b===null?b=go(a):(C=b.cachePool,C!==null?(_=Ze._currentValue,C=C.parent!==_?{parent:_,pool:_}:C):C=Wc(),b={baseLanes:b.baseLanes|a,cachePool:C}),i.memoizedState=b,i.childLanes=po(e,p,a),t.memoizedState=mo,n):(ja(t),a=e.child,e=a.sibling,a=It(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function xo(e,t){return t=rr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rr(e,t){return e=vt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function yo(e,t,a){return _n(t,e.child,null,a),e=xo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mf(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ui(e.return,t,a)}function bo(e,t,a,n,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=n,c.tail=a,c.tailMode=i)}function gf(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;if(at(e,t,n.children,a),n=Pe.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mf(e,a,t);else if(e.tag===19)mf(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(X(Pe,n),i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&ar(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),bo(t,!1,i,a,c);break;case"backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ar(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}bo(t,!0,a,null,c);break;case"together":bo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ra(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Aa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Nl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=It(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=It(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function vo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&qs(e)))}function J0(e,t,a){switch(t.tag){case 3:ie(t,t.stateNode.containerInfo),ya(t,Ze,e.memoizedState.cache),Sl();break;case 27:case 5:Ge(t);break;case 4:ie(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(ja(t),t.flags|=128,null):(a&t.child.childLanes)!==0?hf(e,t,a):(ja(t),e=ra(e,t,a),e!==null?e.sibling:null);ja(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Nl(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return gf(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),X(Pe,Pe.current),n)break;return null;case 22:case 23:return t.lanes=0,of(e,t,a);case 24:ya(t,Ze,e.memoizedState.cache)}return ra(e,t,a)}function pf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ie=!0;else{if(!vo(e,a)&&(t.flags&128)===0)return Ie=!1,J0(e,t,a);Ie=(e.flags&131072)!==0}else Ie=!1,Re&&(t.flags&1048576)!==0&&Kc(t,Bs,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var n=t.elementType,i=n._init;if(n=i(n._payload),t.type=n,typeof n=="function")Ti(n)?(e=ln(n,e),t.tag=1,t=df(null,t,n,e,a)):(t.tag=0,t=ho(null,t,n,e,a));else{if(n!=null){if(i=n.$$typeof,i===D){t.tag=11,t=lf(null,t,n,e,a);break e}else if(i===$){t.tag=14,t=sf(null,t,n,e,a);break e}}throw t=oe(n)||n,Error(o(306,t,""))}}return t;case 0:return ho(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=ln(n,t.pendingProps),df(e,t,n,i,a);case 3:e:{if(ie(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,Vi(e,t),Ol(t,n,null,a);var p=t.memoizedState;if(n=p.cache,ya(t,Ze,n),n!==c.cache&&Li(t,[Ze],a,!0),Rl(),n=p.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=ff(e,t,n,a);break e}else if(n!==i){i=Tt(Error(o(424)),t),jl(i),t=ff(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(Ve=Bt(e.firstChild),ct=t,Re=!0,Wa=null,$t=!0,a=Xd(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Sl(),n===i){t=ra(e,t,a);break e}at(e,t,n,a)}t=t.child}return t;case 26:return sr(e,t),e===null?(a=vh(t.type,null,t.pendingProps,null))?t.memoizedState=a:Re||(a=t.type,e=t.pendingProps,n=vr(F.current).createElement(a),n[rt]=t,n[dt]=e,lt(n,a,e),We(n),t.stateNode=n):t.memoizedState=vh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ge(t),e===null&&Re&&(n=t.stateNode=xh(t.type,t.pendingProps,F.current),ct=t,$t=!0,i=Ve,za(t.type)?(eu=i,Ve=Bt(n.firstChild)):Ve=i),at(e,t,t.pendingProps.children,a),sr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((i=n=Ve)&&(n=Np(n,t.type,t.pendingProps,$t),n!==null?(t.stateNode=n,ct=t,Ve=Bt(n.firstChild),$t=!1,i=!0):i=!1),i||Ia(t)),Ge(t),i=t.type,c=t.pendingProps,p=e!==null?e.memoizedProps:null,n=c.children,Jo(i,c)?n=null:p!==null&&Jo(i,p)&&(t.flags|=32),t.memoizedState!==null&&(i=Zi(e,t,V0,null,null,a),Il._currentValue=i),sr(e,t),at(e,t,n,a),t.child;case 6:return e===null&&Re&&((e=a=Ve)&&(a=Ep(a,t.pendingProps,$t),a!==null?(t.stateNode=a,ct=t,Ve=null,e=!0):e=!1),e||Ia(t)),null;case 13:return hf(e,t,a);case 4:return ie(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=_n(t,null,n,a):at(e,t,n,a),t.child;case 11:return lf(e,t,t.type,t.pendingProps,a);case 7:return at(e,t,t.pendingProps,a),t.child;case 8:return at(e,t,t.pendingProps.children,a),t.child;case 12:return at(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,ya(t,t.type,n.value),at(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,tn(t),i=it(i),n=n(i),t.flags|=1,at(e,t,n,a),t.child;case 14:return sf(e,t,t.type,t.pendingProps,a);case 15:return rf(e,t,t.type,t.pendingProps,a);case 19:return gf(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=rr(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=It(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return of(e,t,a);case 24:return tn(t),n=it(Ze),e===null?(i=Bi(),i===null&&(i=_e,c=_i(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},Gi(t),ya(t,Ze,i)):((e.lanes&a)!==0&&(Vi(e,t),Ol(t,null,null,a),Rl()),i=e.memoizedState,c=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ya(t,Ze,n)):(n=c.cache,ya(t,Ze,n),n!==i.cache&&Li(t,[Ze],a,!0))),at(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ia(e){e.flags|=4}function xf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Eh(t)){if(t=Mt.current,t!==null&&((Te&4194048)===Te?Yt!==null:(Te&62914560)!==Te&&(Te&536870912)===0||t!==Yt))throw Tl=qi,Ic;e.flags|=8192}}function ir(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Zu():536870912,e.lanes|=t,Gn|=t)}function Hl(e,t){if(!Re)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 qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function F0(e,t,a){var n=t.pendingProps;switch(Mi(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return qe(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),na(Ze),pe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(wl(t)?ia(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zc())),qe(t),null;case 26:return a=t.memoizedState,e===null?(ia(t),a!==null?(qe(t),xf(t,a)):(qe(t),t.flags&=-16777217)):a?a!==e.memoizedState?(ia(t),qe(t),xf(t,a)):(qe(t),t.flags&=-16777217):(e.memoizedProps!==n&&ia(t),qe(t),t.flags&=-16777217),null;case 27:st(t),a=F.current;var i=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&ia(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return qe(t),null}e=re.current,wl(t)?Qc(t):(e=xh(i,n,a),t.stateNode=e,ia(t))}return qe(t),null;case 5:if(st(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&ia(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return qe(t),null}if(e=re.current,wl(t))Qc(t);else{switch(i=vr(F.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?i.createElement("select",{is:n.is}):i.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?i.createElement(a,{is:n.is}):i.createElement(a)}}e[rt]=t,e[dt]=n;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(lt(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&&ia(t)}}return qe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&ia(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=F.current,wl(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=ct,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[rt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||ch(e.nodeValue,a)),e||Ia(t)}else e=vr(e).createTextNode(n),e[rt]=t,t.stateNode=e}return qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=wl(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[rt]=t}else Sl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),i=!1}else i=Zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(sa(t),t):(sa(t),null)}if(sa(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool);var c=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==i&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),ir(t,t.updateQueue),qe(t),null;case 4:return pe(),e===null&&Ko(t.stateNode.containerInfo),qe(t),null;case 10:return na(t.type),qe(t),null;case 19:if(ee(Pe),i=t.memoizedState,i===null)return qe(t),null;if(n=(t.flags&128)!==0,c=i.rendering,c===null)if(n)Hl(i,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=ar(e),c!==null){for(t.flags|=128,Hl(i,!1),e=c.updateQueue,t.updateQueue=e,ir(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Yc(a,e),a=a.sibling;return X(Pe,Pe.current&1|2),t.child}e=e.sibling}i.tail!==null&&Vt()>cr&&(t.flags|=128,n=!0,Hl(i,!1),t.lanes=4194304)}else{if(!n)if(e=ar(c),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ir(t,e),Hl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!Re)return qe(t),null}else 2*Vt()-i.renderingStartTime>cr&&a!==536870912&&(t.flags|=128,n=!0,Hl(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(e=i.last,e!==null?e.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Vt(),t.sibling=null,e=Pe.current,X(Pe,n?e&1|2:e&1),t):(qe(t),null);case 22:case 23:return sa(t),Qi(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),a=t.updateQueue,a!==null&&ir(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&&ee(an),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),na(Ze),qe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function W0(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return na(Ze),pe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return st(t),null;case 13:if(sa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Sl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(Pe),null;case 4:return pe(),null;case 10:return na(t.type),null;case 22:case 23:return sa(t),Qi(),e!==null&&ee(an),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return na(Ze),null;case 25:return null;default:return null}}function yf(e,t){switch(Mi(t),t.tag){case 3:na(Ze),pe();break;case 26:case 27:case 5:st(t);break;case 4:pe();break;case 13:sa(t);break;case 19:ee(Pe);break;case 10:na(t.type);break;case 22:case 23:sa(t),Qi(),e!==null&&ee(an);break;case 24:na(Ze)}}function Bl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){n=void 0;var c=a.create,p=a.inst;n=c(),p.destroy=n}a=a.next}while(a!==i)}}catch(b){Le(t,t.return,b)}}function Ea(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var c=i.next;n=c;do{if((n.tag&e)===e){var p=n.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,i=t;var C=a,_=b;try{_()}catch(K){Le(i,C,K)}}}n=n.next}while(n!==c)}}catch(K){Le(t,t.return,K)}}function bf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{sd(t,a)}catch(n){Le(e,e.return,n)}}}function vf(e,t,a){a.props=ln(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Le(e,t,n)}}function ql(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(i){Le(e,t,i)}}function Kt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){Le(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){Le(e,t,i)}else a.current=null}function wf(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(i){Le(e,e.return,i)}}function wo(e,t,a){try{var n=e.stateNode;bp(n,e.type,a,t),n[dt]=t}catch(i){Le(e,e.return,i)}}function Sf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&za(e.type)||e.tag===4}function So(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sf(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&&za(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 jo(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=br));else if(n!==4&&(n===27&&za(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(jo(e,t,a),e=e.sibling;e!==null;)jo(e,t,a),e=e.sibling}function or(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&&za(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(or(e,t,a),e=e.sibling;e!==null;)or(e,t,a),e=e.sibling}function jf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);lt(t,n,a),t[rt]=e,t[dt]=a}catch(c){Le(e,e.return,c)}}var oa=!1,Ke=!1,No=!1,Nf=typeof WeakSet=="function"?WeakSet:Set,et=null;function I0(e,t){if(e=e.containerInfo,Zo=Cr,e=Dc(e),wi(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 i=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var p=0,b=-1,C=-1,_=0,K=0,Z=e,B=null;t:for(;;){for(var V;Z!==a||i!==0&&Z.nodeType!==3||(b=p+i),Z!==c||n!==0&&Z.nodeType!==3||(C=p+n),Z.nodeType===3&&(p+=Z.nodeValue.length),(V=Z.firstChild)!==null;)B=Z,Z=V;for(;;){if(Z===e)break t;if(B===a&&++_===i&&(b=p),B===c&&++K===n&&(C=p),(V=Z.nextSibling)!==null)break;Z=B,B=Z.parentNode}Z=V}a=b===-1||C===-1?null:{start:b,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(Po={focusedElem:e,selectionRange:a},Cr=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,c=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,i=c.memoizedProps,c=c.memoizedState,n=a.stateNode;try{var xe=ln(a.type,i,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(xe,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(me){Le(a,a.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Wo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Wo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}}function Ef(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ca(e,a),n&4&&Bl(5,a);break;case 1:if(Ca(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){Le(a,a.return,p)}else{var i=ln(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Le(a,a.return,p)}}n&64&&bf(a),n&512&&ql(a,a.return);break;case 3:if(Ca(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{sd(e,t)}catch(p){Le(a,a.return,p)}}break;case 27:t===null&&n&4&&jf(a);case 26:case 5:Ca(e,a),t===null&&n&4&&wf(a),n&512&&ql(a,a.return);break;case 12:Ca(e,a);break;case 13:Ca(e,a),n&4&&Tf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=op.bind(null,a),Cp(e,a))));break;case 22:if(n=a.memoizedState!==null||oa,!n){t=t!==null&&t.memoizedState!==null||Ke,i=oa;var c=Ke;oa=n,(Ke=t)&&!c?ka(e,a,(a.subtreeFlags&8772)!==0):Ca(e,a),oa=i,Ke=c}break;case 30:break;default:Ca(e,a)}}function Cf(e){var t=e.alternate;t!==null&&(e.alternate=null,Cf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ai(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 He=null,mt=!1;function ua(e,t,a){for(a=a.child;a!==null;)kf(e,t,a),a=a.sibling}function kf(e,t,a){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(il,a)}catch{}switch(a.tag){case 26:Ke||Kt(a,t),ua(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ke||Kt(a,t);var n=He,i=mt;za(a.type)&&(He=a.stateNode,mt=!1),ua(e,t,a),Pl(a.stateNode),He=n,mt=i;break;case 5:Ke||Kt(a,t);case 6:if(n=He,i=mt,He=null,ua(e,t,a),He=n,mt=i,He!==null)if(mt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(c){Le(a,t,c)}else try{He.removeChild(a.stateNode)}catch(c){Le(a,t,c)}break;case 18:He!==null&&(mt?(e=He,gh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ns(e)):gh(He,a.stateNode));break;case 4:n=He,i=mt,He=a.stateNode.containerInfo,mt=!0,ua(e,t,a),He=n,mt=i;break;case 0:case 11:case 14:case 15:Ke||Ea(2,a,t),Ke||Ea(4,a,t),ua(e,t,a);break;case 1:Ke||(Kt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&vf(a,t,n)),ua(e,t,a);break;case 21:ua(e,t,a);break;case 22:Ke=(n=Ke)||a.memoizedState!==null,ua(e,t,a),Ke=n;break;default:ua(e,t,a)}}function Tf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ns(e)}catch(a){Le(t,t.return,a)}}function ep(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Nf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Nf),t;default:throw Error(o(435,e.tag))}}function Eo(e,t){var a=ep(e);t.forEach(function(n){var i=up.bind(null,e,n);a.has(n)||(a.add(n),n.then(i,i))})}function wt(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,p=t,b=p;e:for(;b!==null;){switch(b.tag){case 27:if(za(b.type)){He=b.stateNode,mt=!1;break e}break;case 5:He=b.stateNode,mt=!1;break e;case 3:case 4:He=b.stateNode.containerInfo,mt=!0;break e}b=b.return}if(He===null)throw Error(o(160));kf(c,p,i),He=null,mt=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Af(t,e),t=t.sibling}var Ht=null;function Af(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wt(t,e),St(e),n&4&&(Ea(3,e,e.return),Bl(3,e),Ea(5,e,e.return));break;case 1:wt(t,e),St(e),n&512&&(Ke||a===null||Kt(a,a.return)),n&64&&oa&&(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 i=Ht;if(wt(t,e),St(e),n&512&&(Ke||a===null||Kt(a,a.return)),n&4){var c=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,i=i.ownerDocument||i;t:switch(n){case"title":c=i.getElementsByTagName("title")[0],(!c||c[cl]||c[rt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),lt(c,n,a),c[rt]=e,We(c),n=c;break e;case"link":var p=jh("link","href",i).get(n+(a.href||""));if(p){for(var b=0;b<p.length;b++)if(c=p[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(b,1);break t}}c=i.createElement(n),lt(c,n,a),i.head.appendChild(c);break;case"meta":if(p=jh("meta","content",i).get(n+(a.content||""))){for(b=0;b<p.length;b++)if(c=p[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(b,1);break t}}c=i.createElement(n),lt(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[rt]=e,We(c),n=c}e.stateNode=n}else Nh(i,e.type,e.stateNode);else e.stateNode=Sh(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?Nh(i,e.type,e.stateNode):Sh(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&wo(e,e.memoizedProps,a.memoizedProps)}break;case 27:wt(t,e),St(e),n&512&&(Ke||a===null||Kt(a,a.return)),a!==null&&n&4&&wo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(wt(t,e),St(e),n&512&&(Ke||a===null||Kt(a,a.return)),e.flags&32){i=e.stateNode;try{bn(i,"")}catch(V){Le(e,e.return,V)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,wo(e,i,a!==null?a.memoizedProps:i)),n&1024&&(No=!0);break;case 6:if(wt(t,e),St(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(V){Le(e,e.return,V)}}break;case 3:if(jr=null,i=Ht,Ht=wr(t.containerInfo),wt(t,e),Ht=i,St(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{ns(t.containerInfo)}catch(V){Le(e,e.return,V)}No&&(No=!1,Rf(e));break;case 4:n=Ht,Ht=wr(e.stateNode.containerInfo),wt(t,e),St(e),Ht=n;break;case 12:wt(t,e),St(e);break;case 13:wt(t,e),St(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Oo=Vt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Eo(e,n)));break;case 22:i=e.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,_=oa,K=Ke;if(oa=_||i,Ke=K||C,wt(t,e),Ke=K,oa=_,St(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||C||oa||Ke||sn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){C=a=t;try{if(c=C.stateNode,i)p=c.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{b=C.stateNode;var Z=C.memoizedProps.style,B=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;b.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(V){Le(C,C.return,V)}}}else if(t.tag===6){if(a===null){C=t;try{C.stateNode.nodeValue=i?"":C.memoizedProps}catch(V){Le(C,C.return,V)}}}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,Eo(e,a))));break;case 19:wt(t,e),St(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Eo(e,n)));break;case 30:break;case 21:break;default:wt(t,e),St(e)}}function St(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Sf(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=So(e);or(e,c,i);break;case 5:var p=a.stateNode;a.flags&32&&(bn(p,""),a.flags&=-33);var b=So(e);or(e,b,p);break;case 3:case 4:var C=a.stateNode.containerInfo,_=So(e);jo(e,_,C);break;default:throw Error(o(161))}}catch(K){Le(e,e.return,K)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Rf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ca(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ef(e,t.alternate,t),t=t.sibling}function sn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ea(4,t,t.return),sn(t);break;case 1:Kt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&vf(t,t.return,a),sn(t);break;case 27:Pl(t.stateNode);case 26:case 5:Kt(t,t.return),sn(t);break;case 22:t.memoizedState===null&&sn(t);break;case 30:sn(t);break;default:sn(t)}e=e.sibling}}function ka(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,p=c.flags;switch(c.tag){case 0:case 11:case 15:ka(i,c,a),Bl(4,c);break;case 1:if(ka(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(_){Le(n,n.return,_)}if(n=c,i=n.updateQueue,i!==null){var b=n.stateNode;try{var C=i.shared.hiddenCallbacks;if(C!==null)for(i.shared.hiddenCallbacks=null,i=0;i<C.length;i++)ld(C[i],b)}catch(_){Le(n,n.return,_)}}a&&p&64&&bf(c),ql(c,c.return);break;case 27:jf(c);case 26:case 5:ka(i,c,a),a&&n===null&&p&4&&wf(c),ql(c,c.return);break;case 12:ka(i,c,a);break;case 13:ka(i,c,a),a&&p&4&&Tf(i,c);break;case 22:c.memoizedState===null&&ka(i,c,a),ql(c,c.return);break;case 30:break;default:ka(i,c,a)}t=t.sibling}}function Co(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&&El(a))}function ko(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&El(e))}function Qt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Of(e,t,a,n),t=t.sibling}function Of(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Qt(e,t,a,n),i&2048&&Bl(9,t);break;case 1:Qt(e,t,a,n);break;case 3:Qt(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&El(e)));break;case 12:if(i&2048){Qt(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,p=c.id,b=c.onPostCommit;typeof b=="function"&&b(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Le(t,t.return,C)}}else Qt(e,t,a,n);break;case 13:Qt(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,p=t.alternate,t.memoizedState!==null?c._visibility&2?Qt(e,t,a,n):Gl(e,t):c._visibility&2?Qt(e,t,a,n):(c._visibility|=2,Hn(e,t,a,n,(t.subtreeFlags&10256)!==0)),i&2048&&Co(p,t);break;case 24:Qt(e,t,a,n),i&2048&&ko(t.alternate,t);break;default:Qt(e,t,a,n)}}function Hn(e,t,a,n,i){for(i=i&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var c=e,p=t,b=a,C=n,_=p.flags;switch(p.tag){case 0:case 11:case 15:Hn(c,p,b,C,i),Bl(8,p);break;case 23:break;case 22:var K=p.stateNode;p.memoizedState!==null?K._visibility&2?Hn(c,p,b,C,i):Gl(c,p):(K._visibility|=2,Hn(c,p,b,C,i)),i&&_&2048&&Co(p.alternate,p);break;case 24:Hn(c,p,b,C,i),i&&_&2048&&ko(p.alternate,p);break;default:Hn(c,p,b,C,i)}t=t.sibling}}function Gl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:Gl(a,n),i&2048&&Co(n.alternate,n);break;case 24:Gl(a,n),i&2048&&ko(n.alternate,n);break;default:Gl(a,n)}t=t.sibling}}var Vl=8192;function Bn(e){if(e.subtreeFlags&Vl)for(e=e.child;e!==null;)Mf(e),e=e.sibling}function Mf(e){switch(e.tag){case 26:Bn(e),e.flags&Vl&&e.memoizedState!==null&&Bp(Ht,e.memoizedState,e.memoizedProps);break;case 5:Bn(e);break;case 3:case 4:var t=Ht;Ht=wr(e.stateNode.containerInfo),Bn(e),Ht=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Vl,Vl=16777216,Bn(e),Vl=t):Bn(e));break;default:Bn(e)}}function zf(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 $l(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];et=n,Uf(n,e)}zf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Df(e),e=e.sibling}function Df(e){switch(e.tag){case 0:case 11:case 15:$l(e),e.flags&2048&&Ea(9,e,e.return);break;case 3:$l(e);break;case 12:$l(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ur(e)):$l(e);break;default:$l(e)}}function ur(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];et=n,Uf(n,e)}zf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ea(8,t,t.return),ur(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ur(t));break;default:ur(t)}e=e.sibling}}function Uf(e,t){for(;et!==null;){var a=et;switch(a.tag){case 0:case 11:case 15:Ea(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:El(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,et=n;else e:for(a=e;et!==null;){n=et;var i=n.sibling,c=n.return;if(Cf(n),n===a){et=null;break e}if(i!==null){i.return=c,et=i;break e}et=c}}}var tp={getCacheForType:function(e){var t=it(Ze),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},ap=typeof WeakMap=="function"?WeakMap:Map,Oe=0,_e=null,Ee=null,Te=0,Me=0,jt=null,Ta=!1,qn=!1,To=!1,ca=0,$e=0,Aa=0,rn=0,Ao=0,zt=0,Gn=0,Yl=null,gt=null,Ro=!1,Oo=0,cr=1/0,dr=null,Ra=null,nt=0,Oa=null,Vn=null,$n=0,Mo=0,zo=null,Lf=null,Kl=0,Do=null;function Nt(){if((Oe&2)!==0&&Te!==0)return Te&-Te;if(H.T!==null){var e=Rn;return e!==0?e:Go()}return Fu()}function _f(){zt===0&&(zt=(Te&536870912)===0||Re?Xu():536870912);var e=Mt.current;return e!==null&&(e.flags|=32),zt}function Et(e,t,a){(e===_e&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(Yn(e,0),Ma(e,Te,zt,!1)),ul(e,a),((Oe&2)===0||e!==_e)&&(e===_e&&((Oe&2)===0&&(rn|=a),$e===4&&Ma(e,Te,zt,!1)),Xt(e))}function Hf(e,t,a){if((Oe&6)!==0)throw Error(o(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||ol(e,t),i=n?sp(e,t):_o(e,t,!0),c=n;do{if(i===0){qn&&!n&&Ma(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!np(a)){i=_o(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var b=e;i=Yl;var C=b.current.memoizedState.isDehydrated;if(C&&(Yn(b,p).flags|=256),p=_o(b,p,!1),p!==2){if(To&&!C){b.errorRecoveryDisabledLanes|=c,rn|=c,i=4;break e}c=gt,gt=i,c!==null&&(gt===null?gt=c:gt.push.apply(gt,c))}i=p}if(c=!1,i!==2)continue}}if(i===1){Yn(e,0),Ma(e,t,0,!0);break}e:{switch(n=e,c=i,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ma(n,t,zt,!Ta);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=Oo+300-Vt(),10<i)){if(Ma(n,t,zt,!Ta),Ss(n,0,!0)!==0)break e;n.timeoutHandle=hh(Bf.bind(null,n,a,gt,dr,Ro,t,zt,rn,Gn,Ta,c,2,-0,0),i);break e}Bf(n,a,gt,dr,Ro,t,zt,rn,Gn,Ta,c,0,-0,0)}}break}while(!0);Xt(e)}function Bf(e,t,a,n,i,c,p,b,C,_,K,Z,B,V){if(e.timeoutHandle=-1,Z=t.subtreeFlags,(Z&8192||(Z&16785408)===16785408)&&(Wl={stylesheets:null,count:0,unsuspend:Hp},Mf(t),Z=qp(),Z!==null)){e.cancelPendingCommit=Z(Qf.bind(null,e,t,c,a,n,i,p,b,C,K,1,B,V)),Ma(e,c,p,!_);return}Qf(e,t,c,a,n,i,p,b,C)}function np(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 i=a[n],c=i.getSnapshot;i=i.value;try{if(!bt(c(),i))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 Ma(e,t,a,n){t&=~Ao,t&=~rn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-yt(i),p=1<<c;n[c]=-1,i&=~p}a!==0&&Pu(e,a,t)}function fr(){return(Oe&6)===0?(Ql(0),!1):!0}function Uo(){if(Ee!==null){if(Me===0)var e=Ee.return;else e=Ee,aa=en=null,Fi(e),Ln=null,Ll=0,e=Ee;for(;e!==null;)yf(e.alternate,e),e=e.return;Ee=null}}function Yn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,wp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Uo(),_e=e,Ee=a=It(e.current,null),Te=t,Me=0,jt=null,Ta=!1,qn=ol(e,t),To=!1,Gn=zt=Ao=rn=Aa=$e=0,gt=Yl=null,Ro=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-yt(n),c=1<<i;t|=e[i],n&=~c}return ca=t,Ds(),a}function qf(e,t){we=null,H.H=Is,t===kl||t===$s?(t=ad(),Me=3):t===Ic?(t=ad(),Me=4):Me=t===nf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jt=t,Ee===null&&($e=1,lr(e,Tt(t,e.current)))}function Gf(){var e=H.H;return H.H=Is,e===null?Is:e}function Vf(){var e=H.A;return H.A=tp,e}function Lo(){$e=4,Ta||(Te&4194048)!==Te&&Mt.current!==null||(qn=!0),(Aa&134217727)===0&&(rn&134217727)===0||_e===null||Ma(_e,Te,zt,!1)}function _o(e,t,a){var n=Oe;Oe|=2;var i=Gf(),c=Vf();(_e!==e||Te!==t)&&(dr=null,Yn(e,t)),t=!1;var p=$e;e:do try{if(Me!==0&&Ee!==null){var b=Ee,C=jt;switch(Me){case 8:Uo(),p=6;break e;case 3:case 2:case 9:case 6:Mt.current===null&&(t=!0);var _=Me;if(Me=0,jt=null,Kn(e,b,C,_),a&&qn){p=0;break e}break;default:_=Me,Me=0,jt=null,Kn(e,b,C,_)}}lp(),p=$e;break}catch(K){qf(e,K)}while(!0);return t&&e.shellSuspendCounter++,aa=en=null,Oe=n,H.H=i,H.A=c,Ee===null&&(_e=null,Te=0,Ds()),p}function lp(){for(;Ee!==null;)$f(Ee)}function sp(e,t){var a=Oe;Oe|=2;var n=Gf(),i=Vf();_e!==e||Te!==t?(dr=null,cr=Vt()+500,Yn(e,t)):qn=ol(e,t);e:do try{if(Me!==0&&Ee!==null){t=Ee;var c=jt;t:switch(Me){case 1:Me=0,jt=null,Kn(e,t,c,1);break;case 2:case 9:if(ed(c)){Me=0,jt=null,Yf(t);break}t=function(){Me!==2&&Me!==9||_e!==e||(Me=7),Xt(e)},c.then(t,t);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:ed(c)?(Me=0,jt=null,Yf(t)):(Me=0,jt=null,Kn(e,t,c,7));break;case 5:var p=null;switch(Ee.tag){case 26:p=Ee.memoizedState;case 5:case 27:var b=Ee;if(!p||Eh(p)){Me=0,jt=null;var C=b.sibling;if(C!==null)Ee=C;else{var _=b.return;_!==null?(Ee=_,hr(_)):Ee=null}break t}}Me=0,jt=null,Kn(e,t,c,5);break;case 6:Me=0,jt=null,Kn(e,t,c,6);break;case 8:Uo(),$e=6;break e;default:throw Error(o(462))}}rp();break}catch(K){qf(e,K)}while(!0);return aa=en=null,H.H=n,H.A=i,Oe=a,Ee!==null?0:(_e=null,Te=0,Ds(),$e)}function rp(){for(;Ee!==null&&!Fr();)$f(Ee)}function $f(e){var t=pf(e.alternate,e,ca);e.memoizedProps=e.pendingProps,t===null?hr(e):Ee=t}function Yf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=cf(a,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=cf(a,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:Fi(t);default:yf(a,t),t=Ee=Yc(t,ca),t=pf(a,t,ca)}e.memoizedProps=e.pendingProps,t===null?hr(e):Ee=t}function Kn(e,t,a,n){aa=en=null,Fi(t),Ln=null,Ll=0;var i=t.return;try{if(P0(e,i,t,a,Te)){$e=1,lr(e,Tt(a,e.current)),Ee=null;return}}catch(c){if(i!==null)throw Ee=i,c;$e=1,lr(e,Tt(a,e.current)),Ee=null;return}t.flags&32768?(Re||n===1?e=!0:qn||(Te&536870912)!==0?e=!1:(Ta=e=!0,(n===2||n===9||n===3||n===6)&&(n=Mt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Kf(t,e)):hr(t)}function hr(e){var t=e;do{if((t.flags&32768)!==0){Kf(t,Ta);return}e=t.return;var a=F0(t.alternate,t,ca);if(a!==null){Ee=a;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);$e===0&&($e=5)}function Kf(e,t){do{var a=W0(e.alternate,e);if(a!==null){a.flags&=32767,Ee=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ee=e;return}Ee=e=a}while(e!==null);$e=6,Ee=null}function Qf(e,t,a,n,i,c,p,b,C){e.cancelPendingCommit=null;do mr();while(nt!==0);if((Oe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=Ci,Hg(e,a,c,p,b,C),e===_e&&(Ee=_e=null,Te=0),Vn=t,Oa=e,$n=a,Mo=c,zo=i,Lf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cp(bs,function(){return Ff(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=H.T,H.T=null,i=W.p,W.p=2,p=Oe,Oe|=4;try{I0(e,t,a)}finally{Oe=p,W.p=i,H.T=n}}nt=1,Xf(),Zf(),Pf()}}function Xf(){if(nt===1){nt=0;var e=Oa,t=Vn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var n=W.p;W.p=2;var i=Oe;Oe|=4;try{Af(t,e);var c=Po,p=Dc(e.containerInfo),b=c.focusedElem,C=c.selectionRange;if(p!==b&&b&&b.ownerDocument&&zc(b.ownerDocument.documentElement,b)){if(C!==null&&wi(b)){var _=C.start,K=C.end;if(K===void 0&&(K=_),"selectionStart"in b)b.selectionStart=_,b.selectionEnd=Math.min(K,b.value.length);else{var Z=b.ownerDocument||document,B=Z&&Z.defaultView||window;if(B.getSelection){var V=B.getSelection(),xe=b.textContent.length,me=Math.min(C.start,xe),Ue=C.end===void 0?me:Math.min(C.end,xe);!V.extend&&me>Ue&&(p=Ue,Ue=me,me=p);var z=Mc(b,me),R=Mc(b,Ue);if(z&&R&&(V.rangeCount!==1||V.anchorNode!==z.node||V.anchorOffset!==z.offset||V.focusNode!==R.node||V.focusOffset!==R.offset)){var L=Z.createRange();L.setStart(z.node,z.offset),V.removeAllRanges(),me>Ue?(V.addRange(L),V.extend(R.node,R.offset)):(L.setEnd(R.node,R.offset),V.addRange(L))}}}}for(Z=[],V=b;V=V.parentNode;)V.nodeType===1&&Z.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Z.length;b++){var Q=Z[b];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Cr=!!Zo,Po=Zo=null}finally{Oe=i,W.p=n,H.T=a}}e.current=t,nt=2}}function Zf(){if(nt===2){nt=0;var e=Oa,t=Vn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var n=W.p;W.p=2;var i=Oe;Oe|=4;try{Ef(e,t.alternate,t)}finally{Oe=i,W.p=n,H.T=a}}nt=3}}function Pf(){if(nt===4||nt===3){nt=0,Ag();var e=Oa,t=Vn,a=$n,n=Lf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?nt=5:(nt=0,Vn=Oa=null,Jf(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ra=null),ei(a),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(il,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=H.T,i=W.p,W.p=2,H.T=null;try{for(var c=e.onRecoverableError,p=0;p<n.length;p++){var b=n[p];c(b.value,{componentStack:b.stack})}}finally{H.T=t,W.p=i}}($n&3)!==0&&mr(),Xt(e),i=e.pendingLanes,(a&4194090)!==0&&(i&42)!==0?e===Do?Kl++:(Kl=0,Do=e):Kl=0,Ql(0)}}function Jf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,El(t)))}function mr(e){return Xf(),Zf(),Pf(),Ff()}function Ff(){if(nt!==5)return!1;var e=Oa,t=Mo;Mo=0;var a=ei($n),n=H.T,i=W.p;try{W.p=32>a?32:a,H.T=null,a=zo,zo=null;var c=Oa,p=$n;if(nt=0,Vn=Oa=null,$n=0,(Oe&6)!==0)throw Error(o(331));var b=Oe;if(Oe|=4,Df(c.current),Of(c,c.current,p,a),Oe=b,Ql(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(il,c)}catch{}return!0}finally{W.p=i,H.T=n,Jf(e,t)}}function Wf(e,t,a){t=Tt(a,t),t=fo(e.stateNode,t,2),e=wa(e,t,2),e!==null&&(ul(e,2),Xt(e))}function Le(e,t,a){if(e.tag===3)Wf(e,e,a);else for(;t!==null;){if(t.tag===3){Wf(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ra===null||!Ra.has(n))){e=Tt(a,e),a=tf(2),n=wa(t,a,2),n!==null&&(af(a,n,t,e),ul(n,2),Xt(n));break}}t=t.return}}function Ho(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new ap;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(To=!0,i.add(a),e=ip.bind(null,e,t,a),t.then(e,e))}function ip(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,_e===e&&(Te&a)===a&&($e===4||$e===3&&(Te&62914560)===Te&&300>Vt()-Oo?(Oe&2)===0&&Yn(e,0):Ao|=a,Gn===Te&&(Gn=0)),Xt(e)}function If(e,t){t===0&&(t=Zu()),e=Cn(e,t),e!==null&&(ul(e,t),Xt(e))}function op(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),If(e,a)}function up(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),If(e,a)}function cp(e,t){return Va(e,t)}var gr=null,Qn=null,Bo=!1,pr=!1,qo=!1,on=0;function Xt(e){e!==Qn&&e.next===null&&(Qn===null?gr=Qn=e:Qn=Qn.next=e),pr=!0,Bo||(Bo=!0,fp())}function Ql(e,t){if(!qo&&pr){qo=!0;do for(var a=!1,n=gr;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var p=n.suspendedLanes,b=n.pingedLanes;c=(1<<31-yt(42|e)+1)-1,c&=i&~(p&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,nh(n,c))}else c=Te,c=Ss(n,n===_e?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||ol(n,c)||(a=!0,nh(n,c));n=n.next}while(a);qo=!1}}function dp(){eh()}function eh(){pr=Bo=!1;var e=0;on!==0&&(vp()&&(e=on),on=0);for(var t=Vt(),a=null,n=gr;n!==null;){var i=n.next,c=th(n,t);c===0?(n.next=null,a===null?gr=i:a.next=i,i===null&&(Qn=a)):(a=n,(e!==0||(c&3)!==0)&&(pr=!0)),n=i}Ql(e)}function th(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var p=31-yt(c),b=1<<p,C=i[p];C===-1?((b&a)===0||(b&n)!==0)&&(i[p]=_g(b,t)):C<=t&&(e.expiredLanes|=b),c&=~b}if(t=_e,a=Te,a=Ss(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&$a(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ol(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&$a(n),ei(a)){case 2:case 8:a=Ku;break;case 32:a=bs;break;case 268435456:a=Qu;break;default:a=bs}return n=ah.bind(null,e),a=Va(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&$a(n),e.callbackPriority=2,e.callbackNode=null,2}function ah(e,t){if(nt!==0&&nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(mr()&&e.callbackNode!==a)return null;var n=Te;return n=Ss(e,e===_e?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Hf(e,n,t),th(e,Vt()),e.callbackNode!=null&&e.callbackNode===a?ah.bind(null,e):null)}function nh(e,t){if(mr())return null;Hf(e,t,!0)}function fp(){Sp(function(){(Oe&6)!==0?Va(Yu,dp):eh()})}function Go(){return on===0&&(on=Xu()),on}function lh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ks(""+e)}function sh(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 hp(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=lh((i[dt]||null).action),p=n.submitter;p&&(t=(t=p[dt]||null)?lh(t.formAction):p.getAttribute("formAction"),t!==null&&(c=t,p=null));var b=new Os("action","action",null,n,i);e.push({event:b,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(on!==0){var C=p?sh(i,p):new FormData(i);ro(a,{pending:!0,data:C,method:i.method,action:c},null,C)}}else typeof c=="function"&&(b.preventDefault(),C=p?sh(i,p):new FormData(i),ro(a,{pending:!0,data:C,method:i.method,action:c},c,C))},currentTarget:i}]})}}for(var Vo=0;Vo<Ei.length;Vo++){var $o=Ei[Vo],mp=$o.toLowerCase(),gp=$o[0].toUpperCase()+$o.slice(1);_t(mp,"on"+gp)}_t(_c,"onAnimationEnd"),_t(Hc,"onAnimationIteration"),_t(Bc,"onAnimationStart"),_t("dblclick","onDoubleClick"),_t("focusin","onFocus"),_t("focusout","onBlur"),_t(M0,"onTransitionRun"),_t(z0,"onTransitionStart"),_t(D0,"onTransitionCancel"),_t(qc,"onTransitionEnd"),pn("onMouseEnter",["mouseout","mouseover"]),pn("onMouseLeave",["mouseout","mouseover"]),pn("onPointerEnter",["pointerout","pointerover"]),pn("onPointerLeave",["pointerout","pointerover"]),Ka("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ka("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ka("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ka("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ka("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ka("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xl="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(" "),pp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xl));function rh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var p=n.length-1;0<=p;p--){var b=n[p],C=b.instance,_=b.currentTarget;if(b=b.listener,C!==c&&i.isPropagationStopped())break e;c=b,i.currentTarget=_;try{c(i)}catch(K){nr(K)}i.currentTarget=null,c=C}else for(p=0;p<n.length;p++){if(b=n[p],C=b.instance,_=b.currentTarget,b=b.listener,C!==c&&i.isPropagationStopped())break e;c=b,i.currentTarget=_;try{c(i)}catch(K){nr(K)}i.currentTarget=null,c=C}}}}function Ce(e,t){var a=t[ti];a===void 0&&(a=t[ti]=new Set);var n=e+"__bubble";a.has(n)||(ih(t,e,2,!1),a.add(n))}function Yo(e,t,a){var n=0;t&&(n|=4),ih(a,e,n,t)}var xr="_reactListening"+Math.random().toString(36).slice(2);function Ko(e){if(!e[xr]){e[xr]=!0,Iu.forEach(function(a){a!=="selectionchange"&&(pp.has(a)||Yo(a,!1,e),Yo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xr]||(t[xr]=!0,Yo("selectionchange",!1,t))}}function ih(e,t,a,n){switch(Oh(t)){case 2:var i=$p;break;case 8:i=Yp;break;default:i=su}a=i.bind(null,t,a,e),i=void 0,!fi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function Qo(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var p=n.tag;if(p===3||p===4){var b=n.stateNode.containerInfo;if(b===i)break;if(p===4)for(p=n.return;p!==null;){var C=p.tag;if((C===3||C===4)&&p.stateNode.containerInfo===i)return;p=p.return}for(;b!==null;){if(p=hn(b),p===null)return;if(C=p.tag,C===5||C===6||C===26||C===27){n=c=p;continue e}b=b.parentNode}}n=n.return}hc(function(){var _=c,K=ci(a),Z=[];e:{var B=Gc.get(e);if(B!==void 0){var V=Os,xe=e;switch(e){case"keypress":if(As(a)===0)break e;case"keydown":case"keyup":V=c0;break;case"focusin":xe="focus",V=pi;break;case"focusout":xe="blur",V=pi;break;case"beforeblur":case"afterblur":V=pi;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":V=pc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Wg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=h0;break;case _c:case Hc:case Bc:V=t0;break;case qc:V=g0;break;case"scroll":case"scrollend":V=Jg;break;case"wheel":V=x0;break;case"copy":case"cut":case"paste":V=n0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=yc;break;case"toggle":case"beforetoggle":V=b0}var me=(t&4)!==0,Ue=!me&&(e==="scroll"||e==="scrollend"),z=me?B!==null?B+"Capture":null:B;me=[];for(var R=_,L;R!==null;){var Q=R;if(L=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||L===null||z===null||(Q=fl(R,z),Q!=null&&me.push(Zl(R,Q,L))),Ue)break;R=R.return}0<me.length&&(B=new V(B,xe,null,a,K),Z.push({event:B,listeners:me}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",B&&a!==ui&&(xe=a.relatedTarget||a.fromElement)&&(hn(xe)||xe[fn]))break e;if((V||B)&&(B=K.window===K?K:(B=K.ownerDocument)?B.defaultView||B.parentWindow:window,V?(xe=a.relatedTarget||a.toElement,V=_,xe=xe?hn(xe):null,xe!==null&&(Ue=f(xe),me=xe.tag,xe!==Ue||me!==5&&me!==27&&me!==6)&&(xe=null)):(V=null,xe=_),V!==xe)){if(me=pc,Q="onMouseLeave",z="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(me=yc,Q="onPointerLeave",z="onPointerEnter",R="pointer"),Ue=V==null?B:dl(V),L=xe==null?B:dl(xe),B=new me(Q,R+"leave",V,a,K),B.target=Ue,B.relatedTarget=L,Q=null,hn(K)===_&&(me=new me(z,R+"enter",xe,a,K),me.target=L,me.relatedTarget=Ue,Q=me),Ue=Q,V&&xe)t:{for(me=V,z=xe,R=0,L=me;L;L=Xn(L))R++;for(L=0,Q=z;Q;Q=Xn(Q))L++;for(;0<R-L;)me=Xn(me),R--;for(;0<L-R;)z=Xn(z),L--;for(;R--;){if(me===z||z!==null&&me===z.alternate)break t;me=Xn(me),z=Xn(z)}me=null}else me=null;V!==null&&oh(Z,B,V,me,!1),xe!==null&&Ue!==null&&oh(Z,Ue,xe,me,!0)}}e:{if(B=_?dl(_):window,V=B.nodeName&&B.nodeName.toLowerCase(),V==="select"||V==="input"&&B.type==="file")var ue=Cc;else if(Nc(B))if(kc)ue=A0;else{ue=k0;var Ne=C0}else V=B.nodeName,!V||V.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?_&&oi(_.elementType)&&(ue=Cc):ue=T0;if(ue&&(ue=ue(e,_))){Ec(Z,ue,a,K);break e}Ne&&Ne(e,B,_),e==="focusout"&&_&&B.type==="number"&&_.memoizedProps.value!=null&&ii(B,"number",B.value)}switch(Ne=_?dl(_):window,e){case"focusin":(Nc(Ne)||Ne.contentEditable==="true")&&(jn=Ne,Si=_,vl=null);break;case"focusout":vl=Si=jn=null;break;case"mousedown":ji=!0;break;case"contextmenu":case"mouseup":case"dragend":ji=!1,Uc(Z,a,K);break;case"selectionchange":if(O0)break;case"keydown":case"keyup":Uc(Z,a,K)}var he;if(yi)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else Sn?Sc(e,a)&&(ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ge="onCompositionStart");ge&&(bc&&a.locale!=="ko"&&(Sn||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&Sn&&(he=mc()):(xa=K,hi="value"in xa?xa.value:xa.textContent,Sn=!0)),Ne=yr(_,ge),0<Ne.length&&(ge=new xc(ge,e,null,a,K),Z.push({event:ge,listeners:Ne}),he?ge.data=he:(he=jc(a),he!==null&&(ge.data=he)))),(he=w0?S0(e,a):j0(e,a))&&(ge=yr(_,"onBeforeInput"),0<ge.length&&(Ne=new xc("onBeforeInput","beforeinput",null,a,K),Z.push({event:Ne,listeners:ge}),Ne.data=he)),hp(Z,e,_,a,K)}rh(Z,t)})}function Zl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function yr(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=fl(e,a),i!=null&&n.unshift(Zl(e,i,c)),i=fl(e,t),i!=null&&n.push(Zl(e,i,c))),e.tag===3)return n;e=e.return}return[]}function Xn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function oh(e,t,a,n,i){for(var c=t._reactName,p=[];a!==null&&a!==n;){var b=a,C=b.alternate,_=b.stateNode;if(b=b.tag,C!==null&&C===n)break;b!==5&&b!==26&&b!==27||_===null||(C=_,i?(_=fl(a,c),_!=null&&p.unshift(Zl(a,_,C))):i||(_=fl(a,c),_!=null&&p.push(Zl(a,_,C)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var xp=/\r\n?/g,yp=/\u0000|\uFFFD/g;function uh(e){return(typeof e=="string"?e:""+e).replace(xp,`
|
|
49
|
-
`).replace(yp,"")}function ch(e,t){return t=uh(t),uh(e)===t}function br(){}function De(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||bn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&bn(e,""+n);break;case"className":Ns(e,"class",n);break;case"tabIndex":Ns(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ns(e,a,n);break;case"style":dc(e,n,c);break;case"data":if(t!=="object"){Ns(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=ks(""+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 c=="function"&&(a==="formAction"?(t!=="input"&&De(e,t,"name",i.name,i,null),De(e,t,"formEncType",i.formEncType,i,null),De(e,t,"formMethod",i.formMethod,i,null),De(e,t,"formTarget",i.formTarget,i,null)):(De(e,t,"encType",i.encType,i,null),De(e,t,"method",i.method,i,null),De(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ks(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=br);break;case"onScroll":n!=null&&Ce("scroll",e);break;case"onScrollEnd":n!=null&&Ce("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(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=ks(""+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":Ce("beforetoggle",e),Ce("toggle",e),js(e,"popover",n);break;case"xlinkActuate":Ft(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Ft(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Ft(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Ft(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Ft(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Ft(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":js(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=Zg.get(a)||a,js(e,a,n))}}function Xo(e,t,a,n,i,c){switch(a){case"style":dc(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?bn(e,n):(typeof n=="number"||typeof n=="bigint")&&bn(e,""+n);break;case"onScroll":n!=null&&Ce("scroll",e);break;case"onScrollEnd":n!=null&&Ce("scrollend",e);break;case"onClick":n!=null&&(e.onclick=br);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ec.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),c=e[dt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof n=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):js(e,a,n)}}}function lt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ce("error",e),Ce("load",e);var n=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var p=a[c];if(p!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:De(e,t,c,p,a,null)}}i&&De(e,t,"srcSet",a.srcSet,a,null),n&&De(e,t,"src",a.src,a,null);return;case"input":Ce("invalid",e);var b=c=p=i=null,C=null,_=null;for(n in a)if(a.hasOwnProperty(n)){var K=a[n];if(K!=null)switch(n){case"name":i=K;break;case"type":p=K;break;case"checked":C=K;break;case"defaultChecked":_=K;break;case"value":c=K;break;case"defaultValue":b=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(o(137,t));break;default:De(e,t,n,K,a,null)}}ic(e,c,b,C,_,p,i,!1),Es(e);return;case"select":Ce("invalid",e),n=p=c=null;for(i in a)if(a.hasOwnProperty(i)&&(b=a[i],b!=null))switch(i){case"value":c=b;break;case"defaultValue":p=b;break;case"multiple":n=b;default:De(e,t,i,b,a,null)}t=c,a=p,e.multiple=!!n,t!=null?yn(e,!!n,t,!1):a!=null&&yn(e,!!n,a,!0);return;case"textarea":Ce("invalid",e),c=i=n=null;for(p in a)if(a.hasOwnProperty(p)&&(b=a[p],b!=null))switch(p){case"value":n=b;break;case"defaultValue":i=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:De(e,t,p,b,a,null)}uc(e,n,i,c),Es(e);return;case"option":for(C in a)if(a.hasOwnProperty(C)&&(n=a[C],n!=null))switch(C){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:De(e,t,C,n,a,null)}return;case"dialog":Ce("beforetoggle",e),Ce("toggle",e),Ce("cancel",e),Ce("close",e);break;case"iframe":case"object":Ce("load",e);break;case"video":case"audio":for(n=0;n<Xl.length;n++)Ce(Xl[n],e);break;case"image":Ce("error",e),Ce("load",e);break;case"details":Ce("toggle",e);break;case"embed":case"source":case"link":Ce("error",e),Ce("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(_ in a)if(a.hasOwnProperty(_)&&(n=a[_],n!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:De(e,t,_,n,a,null)}return;default:if(oi(t)){for(K in a)a.hasOwnProperty(K)&&(n=a[K],n!==void 0&&Xo(e,t,K,n,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(n=a[b],n!=null&&De(e,t,b,n,a,null))}function bp(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 i=null,c=null,p=null,b=null,C=null,_=null,K=null;for(V in a){var Z=a[V];if(a.hasOwnProperty(V)&&Z!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":C=Z;default:n.hasOwnProperty(V)||De(e,t,V,null,n,Z)}}for(var B in n){var V=n[B];if(Z=a[B],n.hasOwnProperty(B)&&(V!=null||Z!=null))switch(B){case"type":c=V;break;case"name":i=V;break;case"checked":_=V;break;case"defaultChecked":K=V;break;case"value":p=V;break;case"defaultValue":b=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:V!==Z&&De(e,t,B,V,n,Z)}}ri(e,p,b,C,_,K,c,i);return;case"select":V=p=b=B=null;for(c in a)if(C=a[c],a.hasOwnProperty(c)&&C!=null)switch(c){case"value":break;case"multiple":V=C;default:n.hasOwnProperty(c)||De(e,t,c,null,n,C)}for(i in n)if(c=n[i],C=a[i],n.hasOwnProperty(i)&&(c!=null||C!=null))switch(i){case"value":B=c;break;case"defaultValue":b=c;break;case"multiple":p=c;default:c!==C&&De(e,t,i,c,n,C)}t=b,a=p,n=V,B!=null?yn(e,!!a,B,!1):!!n!=!!a&&(t!=null?yn(e,!!a,t,!0):yn(e,!!a,a?[]:"",!1));return;case"textarea":V=B=null;for(b in a)if(i=a[b],a.hasOwnProperty(b)&&i!=null&&!n.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:De(e,t,b,null,n,i)}for(p in n)if(i=n[p],c=a[p],n.hasOwnProperty(p)&&(i!=null||c!=null))switch(p){case"value":B=i;break;case"defaultValue":V=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&De(e,t,p,i,n,c)}oc(e,B,V);return;case"option":for(var xe in a)if(B=a[xe],a.hasOwnProperty(xe)&&B!=null&&!n.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:De(e,t,xe,null,n,B)}for(C in n)if(B=n[C],V=a[C],n.hasOwnProperty(C)&&B!==V&&(B!=null||V!=null))switch(C){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:De(e,t,C,B,n,V)}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 me in a)B=a[me],a.hasOwnProperty(me)&&B!=null&&!n.hasOwnProperty(me)&&De(e,t,me,null,n,B);for(_ in n)if(B=n[_],V=a[_],n.hasOwnProperty(_)&&B!==V&&(B!=null||V!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:De(e,t,_,B,n,V)}return;default:if(oi(t)){for(var Ue in a)B=a[Ue],a.hasOwnProperty(Ue)&&B!==void 0&&!n.hasOwnProperty(Ue)&&Xo(e,t,Ue,void 0,n,B);for(K in n)B=n[K],V=a[K],!n.hasOwnProperty(K)||B===V||B===void 0&&V===void 0||Xo(e,t,K,B,n,V);return}}for(var z in a)B=a[z],a.hasOwnProperty(z)&&B!=null&&!n.hasOwnProperty(z)&&De(e,t,z,null,n,B);for(Z in n)B=n[Z],V=a[Z],!n.hasOwnProperty(Z)||B===V||B==null&&V==null||De(e,t,Z,B,n,V)}var Zo=null,Po=null;function vr(e){return e.nodeType===9?e:e.ownerDocument}function dh(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 fh(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 Jo(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 Fo=null;function vp(){var e=window.event;return e&&e.type==="popstate"?e===Fo?!1:(Fo=e,!0):(Fo=null,!1)}var hh=typeof setTimeout=="function"?setTimeout:void 0,wp=typeof clearTimeout=="function"?clearTimeout:void 0,mh=typeof Promise=="function"?Promise:void 0,Sp=typeof queueMicrotask=="function"?queueMicrotask:typeof mh<"u"?function(e){return mh.resolve(null).then(e).catch(jp)}:hh;function jp(e){setTimeout(function(){throw e})}function za(e){return e==="head"}function gh(e,t){var a=t,n=0,i=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(0<n&&8>n){a=n;var p=e.ownerDocument;if(a&1&&Pl(p.documentElement),a&2&&Pl(p.body),a&4)for(a=p.head,Pl(a),p=a.firstChild;p;){var b=p.nextSibling,C=p.nodeName;p[cl]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=b}}if(i===0){e.removeChild(c),ns(t);return}i--}else a==="$"||a==="$?"||a==="$!"?i++:n=a.charCodeAt(0)-48;else n=0;a=c}while(a);ns(t)}function Wo(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":Wo(a),ai(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Np(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[cl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Bt(e.nextSibling),e===null)break}return null}function Ep(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Bt(e.nextSibling),e===null))return null;return e}function Io(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Cp(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 Bt(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 eu=null;function ph(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 xh(e,t,a){switch(t=vr(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Pl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ai(e)}var Dt=new Map,yh=new Set;function wr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var da=W.d;W.d={f:kp,r:Tp,D:Ap,C:Rp,L:Op,m:Mp,X:Dp,S:zp,M:Up};function kp(){var e=da.f(),t=fr();return e||t}function Tp(e){var t=mn(e);t!==null&&t.tag===5&&t.type==="form"?_d(t):da.r(e)}var Zn=typeof document>"u"?null:document;function bh(e,t,a){var n=Zn;if(n&&typeof t=="string"&&t){var i=kt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),yh.has(i)||(yh.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),lt(t,"link",e),We(t),n.head.appendChild(t)))}}function Ap(e){da.D(e),bh("dns-prefetch",e,null)}function Rp(e,t){da.C(e,t),bh("preconnect",e,t)}function Op(e,t,a){da.L(e,t,a);var n=Zn;if(n&&e&&t){var i='link[rel="preload"][as="'+kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+kt(a.imageSizes)+'"]')):i+='[href="'+kt(e)+'"]';var c=i;switch(t){case"style":c=Pn(e);break;case"script":c=Jn(e)}Dt.has(c)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Dt.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Jl(c))||t==="script"&&n.querySelector(Fl(c))||(t=n.createElement("link"),lt(t,"link",e),We(t),n.head.appendChild(t)))}}function Mp(e,t){da.m(e,t);var a=Zn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+kt(n)+'"][href="'+kt(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Jn(e)}if(!Dt.has(c)&&(e=y({rel:"modulepreload",href:e},t),Dt.set(c,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fl(c)))return}n=a.createElement("link"),lt(n,"link",e),We(n),a.head.appendChild(n)}}}function zp(e,t,a){da.S(e,t,a);var n=Zn;if(n&&e){var i=gn(n).hoistableStyles,c=Pn(e);t=t||"default";var p=i.get(c);if(!p){var b={loading:0,preload:null};if(p=n.querySelector(Jl(c)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Dt.get(c))&&tu(e,a);var C=p=n.createElement("link");We(C),lt(C,"link",e),C._p=new Promise(function(_,K){C.onload=_,C.onerror=K}),C.addEventListener("load",function(){b.loading|=1}),C.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Sr(p,t,n)}p={type:"stylesheet",instance:p,count:1,state:b},i.set(c,p)}}}function Dp(e,t){da.X(e,t);var a=Zn;if(a&&e){var n=gn(a).hoistableScripts,i=Jn(e),c=n.get(i);c||(c=a.querySelector(Fl(i)),c||(e=y({src:e,async:!0},t),(t=Dt.get(i))&&au(e,t),c=a.createElement("script"),We(c),lt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function Up(e,t){da.M(e,t);var a=Zn;if(a&&e){var n=gn(a).hoistableScripts,i=Jn(e),c=n.get(i);c||(c=a.querySelector(Fl(i)),c||(e=y({src:e,async:!0,type:"module"},t),(t=Dt.get(i))&&au(e,t),c=a.createElement("script"),We(c),lt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function vh(e,t,a,n){var i=(i=F.current)?wr(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Pn(a.href),a=gn(i).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=Pn(a.href);var c=gn(i).hoistableStyles,p=c.get(e);if(p||(i=i.ownerDocument||i,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,p),(c=i.querySelector(Jl(e)))&&!c._p&&(p.instance=c,p.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),c||Lp(i,e,a,p.state))),t&&n===null)throw Error(o(528,""));return p}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Jn(a),a=gn(i).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(o(444,e))}}function Pn(e){return'href="'+kt(e)+'"'}function Jl(e){return'link[rel="stylesheet"]['+e+"]"}function wh(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Lp(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}),lt(t,"link",a),We(t),e.head.appendChild(t))}function Jn(e){return'[src="'+kt(e)+'"]'}function Fl(e){return"script[async]"+e}function Sh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+kt(a.href)+'"]');if(n)return t.instance=n,We(n),n;var i=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),We(n),lt(n,"style",i),Sr(n,a.precedence,e),t.instance=n;case"stylesheet":i=Pn(a.href);var c=e.querySelector(Jl(i));if(c)return t.state.loading|=4,t.instance=c,We(c),c;n=wh(a),(i=Dt.get(i))&&tu(n,i),c=(e.ownerDocument||e).createElement("link"),We(c);var p=c;return p._p=new Promise(function(b,C){p.onload=b,p.onerror=C}),lt(c,"link",n),t.state.loading|=4,Sr(c,a.precedence,e),t.instance=c;case"script":return c=Jn(a.src),(i=e.querySelector(Fl(c)))?(t.instance=i,We(i),i):(n=a,(i=Dt.get(c))&&(n=y({},a),au(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),We(i),lt(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Sr(n,a.precedence,e));return t.instance}function Sr(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,c=i,p=0;p<n.length;p++){var b=n[p];if(b.dataset.precedence===t)c=b;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function tu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function au(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var jr=null;function jh(e,t,a){if(jr===null){var n=new Map,i=jr=new Map;i.set(a,n)}else i=jr,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var c=a[i];if(!(c[cl]||c[rt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var p=c.getAttribute(t)||"";p=e+p;var b=n.get(p);b?b.push(c):n.set(p,[c])}}return n}function Nh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function _p(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 Eh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Wl=null;function Hp(){}function Bp(e,t,a){if(Wl===null)throw Error(o(475));var n=Wl;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var i=Pn(a.href),c=e.querySelector(Jl(i));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=Nr.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=c,We(c);return}c=e.ownerDocument||e,a=wh(a),(i=Dt.get(i))&&tu(a,i),c=c.createElement("link"),We(c);var p=c;p._p=new Promise(function(b,C){p.onload=b,p.onerror=C}),lt(c,"link",a),t.instance=c}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(n.count++,t=Nr.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function qp(){if(Wl===null)throw Error(o(475));var e=Wl;return e.stylesheets&&e.count===0&&nu(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&nu(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 Nr(){if(this.count--,this.count===0){if(this.stylesheets)nu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Er=null;function nu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Er=new Map,t.forEach(Gp,e),Er=null,Nr.call(e))}function Gp(e,t){if(!(t.state.loading&4)){var a=Er.get(e);if(a)var n=a.get(null);else{a=new Map,Er.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var p=i[c];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),n=p)}n&&a.set(null,n)}i=t.instance,p=i.getAttribute("data-precedence"),c=a.get(p)||n,c===n&&a.set(null,i),a.set(p,i),this.count++,n=Nr.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Il={$$typeof:O,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function Vp(e,t,a,n,i,c,p,b){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=i,this.onCaughtError=c,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Ch(e,t,a,n,i,c,p,b,C,_,K,Z){return e=new Vp(e,t,a,p,b,C,_,Z),t=1,c===!0&&(t|=24),c=vt(3,null,null,t),e.current=c,c.stateNode=e,t=_i(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},Gi(c),e}function kh(e){return e?(e=kn,e):kn}function Th(e,t,a,n,i,c){i=kh(i),n.context===null?n.context=i:n.pendingContext=i,n=va(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=wa(e,n,t),a!==null&&(Et(a,e,t),Al(a,e,t))}function Ah(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function lu(e,t){Ah(e,t),(e=e.alternate)&&Ah(e,t)}function Rh(e){if(e.tag===13){var t=Cn(e,67108864);t!==null&&Et(t,e,67108864),lu(e,67108864)}}var Cr=!0;function $p(e,t,a,n){var i=H.T;H.T=null;var c=W.p;try{W.p=2,su(e,t,a,n)}finally{W.p=c,H.T=i}}function Yp(e,t,a,n){var i=H.T;H.T=null;var c=W.p;try{W.p=8,su(e,t,a,n)}finally{W.p=c,H.T=i}}function su(e,t,a,n){if(Cr){var i=ru(n);if(i===null)Qo(e,t,n,kr,a),Mh(e,n);else if(Qp(i,e,t,a,n))n.stopPropagation();else if(Mh(e,n),t&4&&-1<Kp.indexOf(e)){for(;i!==null;){var c=mn(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var p=Ya(c.pendingLanes);if(p!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var C=1<<31-yt(p);b.entanglements[1]|=C,p&=~C}Xt(c),(Oe&6)===0&&(cr=Vt()+500,Ql(0))}}break;case 13:b=Cn(c,2),b!==null&&Et(b,c,2),fr(),lu(c,2)}if(c=ru(n),c===null&&Qo(e,t,n,kr,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else Qo(e,t,n,null,a)}}function ru(e){return e=ci(e),iu(e)}var kr=null;function iu(e){if(kr=null,e=hn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(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 kr=e,null}function Oh(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(Rg()){case Yu:return 2;case Ku:return 8;case bs:case Og:return 32;case Qu:return 268435456;default:return 32}default:return 32}}var ou=!1,Da=null,Ua=null,La=null,es=new Map,ts=new Map,_a=[],Kp="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 Mh(e,t){switch(e){case"focusin":case"focusout":Da=null;break;case"dragenter":case"dragleave":Ua=null;break;case"mouseover":case"mouseout":La=null;break;case"pointerover":case"pointerout":es.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ts.delete(t.pointerId)}}function as(e,t,a,n,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:c,targetContainers:[i]},t!==null&&(t=mn(t),t!==null&&Rh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Qp(e,t,a,n,i){switch(t){case"focusin":return Da=as(Da,e,t,a,n,i),!0;case"dragenter":return Ua=as(Ua,e,t,a,n,i),!0;case"mouseover":return La=as(La,e,t,a,n,i),!0;case"pointerover":var c=i.pointerId;return es.set(c,as(es.get(c)||null,e,t,a,n,i)),!0;case"gotpointercapture":return c=i.pointerId,ts.set(c,as(ts.get(c)||null,e,t,a,n,i)),!0}return!1}function zh(e){var t=hn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Bg(e.priority,function(){if(a.tag===13){var n=Nt();n=Ir(n);var i=Cn(a,n);i!==null&&Et(i,a,n),lu(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 Tr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ru(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);ui=n,a.target.dispatchEvent(n),ui=null}else return t=mn(a),t!==null&&Rh(t),e.blockedOn=a,!1;t.shift()}return!0}function Dh(e,t,a){Tr(e)&&a.delete(t)}function Xp(){ou=!1,Da!==null&&Tr(Da)&&(Da=null),Ua!==null&&Tr(Ua)&&(Ua=null),La!==null&&Tr(La)&&(La=null),es.forEach(Dh),ts.forEach(Dh)}function Ar(e,t){e.blockedOn===t&&(e.blockedOn=null,ou||(ou=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Xp)))}var Rr=null;function Uh(e){Rr!==e&&(Rr=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Rr===e&&(Rr=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(iu(n||a)===null)continue;break}var c=mn(a);c!==null&&(e.splice(t,3),t-=3,ro(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function ns(e){function t(C){return Ar(C,e)}Da!==null&&Ar(Da,e),Ua!==null&&Ar(Ua,e),La!==null&&Ar(La,e),es.forEach(t),ts.forEach(t);for(var a=0;a<_a.length;a++){var n=_a[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<_a.length&&(a=_a[0],a.blockedOn===null);)zh(a),a.blockedOn===null&&_a.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],c=a[n+1],p=i[dt]||null;if(typeof c=="function")p||Uh(a);else if(p){var b=null;if(c&&c.hasAttribute("formAction")){if(i=c,p=c[dt]||null)b=p.formAction;else if(iu(i)!==null)continue}else b=p.action;typeof b=="function"?a[n+1]=b:(a.splice(n,3),n-=3),Uh(a)}}}function uu(e){this._internalRoot=e}Or.prototype.render=uu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Nt();Th(a,n,e,t,null,null)},Or.prototype.unmount=uu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Th(e.current,2,null,e,null,null),fr(),t[fn]=null}};function Or(e){this._internalRoot=e}Or.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fu();e={blockedOn:null,target:e,priority:t};for(var a=0;a<_a.length&&t!==0&&t<_a[a].priority;a++);_a.splice(a,0,e),a===0&&zh(e)}};var Lh=s.version;if(Lh!=="19.1.0")throw Error(o(527,Lh,"19.1.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=m(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Zp={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mr.isDisabled&&Mr.supportsFiber)try{il=Mr.inject(Zp),xt=Mr}catch{}}return ss.createRoot=function(e,t){if(!d(e))throw Error(o(299));var a=!1,n="",i=Fd,c=Wd,p=Id,b=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(b=t.unstable_transitionCallbacks)),t=Ch(e,1,!1,null,null,a,n,i,c,p,b,null),e[fn]=t.current,Ko(e),new uu(t)},ss.hydrateRoot=function(e,t,a){if(!d(e))throw Error(o(299));var n=!1,i="",c=Fd,p=Wd,b=Id,C=null,_=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(C=a.unstable_transitionCallbacks),a.formState!==void 0&&(_=a.formState)),t=Ch(e,1,!0,t,a??null,n,i,c,p,b,C,_),t.context=kh(null),a=t.current,n=Nt(),n=Ir(n),i=va(n),i.callback=null,wa(a,i,n),a=n,t.current.lanes=a,ul(t,a),Xt(t),e[fn]=t.current,Ko(e),new Or(t)},ss.version="19.1.0",ss}var Qh;function lx(){if(Qh)return fu.exports;Qh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),fu.exports=nx(),fu.exports}var sx=lx();const Xh=km(sx);var rs={},Zh;function rx(){if(Zh)return rs;Zh=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.parse=h,rs.serialize=g;const l=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,s=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/,d=Object.prototype.toString,f=(()=>{const v=function(){};return v.prototype=Object.create(null),v})();function h(v,M){const N=new f,j=v.length;if(j<2)return N;const k=(M==null?void 0:M.decode)||y;let A=0;do{const E=v.indexOf("=",A);if(E===-1)break;const O=v.indexOf(";",A),D=O===-1?j:O;if(E>D){A=v.lastIndexOf(";",E-1)+1;continue}const U=x(v,A,E),ne=m(v,E,U),$=v.slice(U,ne);if(N[$]===void 0){let G=x(v,E+1,D),P=m(v,D,G);const J=k(v.slice(G,P));N[$]=J}A=D+1}while(A<j);return N}function x(v,M,N){do{const j=v.charCodeAt(M);if(j!==32&&j!==9)return M}while(++M<N);return N}function m(v,M,N){for(;M>N;){const j=v.charCodeAt(--M);if(j!==32&&j!==9)return M+1}return N}function g(v,M,N){const j=(N==null?void 0:N.encode)||encodeURIComponent;if(!l.test(v))throw new TypeError(`argument name is invalid: ${v}`);const k=j(M);if(!s.test(k))throw new TypeError(`argument val is invalid: ${M}`);let A=v+"="+k;if(!N)return A;if(N.maxAge!==void 0){if(!Number.isInteger(N.maxAge))throw new TypeError(`option maxAge is invalid: ${N.maxAge}`);A+="; Max-Age="+N.maxAge}if(N.domain){if(!r.test(N.domain))throw new TypeError(`option domain is invalid: ${N.domain}`);A+="; Domain="+N.domain}if(N.path){if(!o.test(N.path))throw new TypeError(`option path is invalid: ${N.path}`);A+="; Path="+N.path}if(N.expires){if(!S(N.expires)||!Number.isFinite(N.expires.valueOf()))throw new TypeError(`option expires is invalid: ${N.expires}`);A+="; Expires="+N.expires.toUTCString()}if(N.httpOnly&&(A+="; HttpOnly"),N.secure&&(A+="; Secure"),N.partitioned&&(A+="; Partitioned"),N.priority)switch(typeof N.priority=="string"?N.priority.toLowerCase():void 0){case"low":A+="; Priority=Low";break;case"medium":A+="; Priority=Medium";break;case"high":A+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${N.priority}`)}if(N.sameSite)switch(typeof N.sameSite=="string"?N.sameSite.toLowerCase():N.sameSite){case!0:case"strict":A+="; SameSite=Strict";break;case"lax":A+="; SameSite=Lax";break;case"none":A+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${N.sameSite}`)}return A}function y(v){if(v.indexOf("%")===-1)return v;try{return decodeURIComponent(v)}catch{return v}}function S(v){return d.call(v)==="[object Date]"}return rs}rx();var Ph="popstate";function ix(l={}){function s(o,d){let{pathname:f,search:h,hash:x}=o.location;return Su("",{pathname:f,search:h,hash:x},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(o,d){return typeof d=="string"?d:fs(d)}return ux(s,r,null,l)}function Be(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}function qt(l,s){if(!l){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function ox(){return Math.random().toString(36).substring(2,10)}function Jh(l,s){return{usr:l.state,key:l.key,idx:s}}function Su(l,s,r=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof s=="string"?al(s):s,state:r,key:s&&s.key||o||ox()}}function fs({pathname:l="/",search:s="",hash:r=""}){return s&&s!=="?"&&(l+=s.charAt(0)==="?"?s:"?"+s),r&&r!=="#"&&(l+=r.charAt(0)==="#"?r:"#"+r),l}function al(l){let s={};if(l){let r=l.indexOf("#");r>=0&&(s.hash=l.substring(r),l=l.substring(0,r));let o=l.indexOf("?");o>=0&&(s.search=l.substring(o),l=l.substring(0,o)),l&&(s.pathname=l)}return s}function ux(l,s,r,o={}){let{window:d=document.defaultView,v5Compat:f=!1}=o,h=d.history,x="POP",m=null,g=y();g==null&&(g=0,h.replaceState({...h.state,idx:g},""));function y(){return(h.state||{idx:null}).idx}function S(){x="POP";let k=y(),A=k==null?null:k-g;g=k,m&&m({action:x,location:j.location,delta:A})}function v(k,A){x="PUSH";let E=Su(j.location,k,A);g=y()+1;let O=Jh(E,g),D=j.createHref(E);try{h.pushState(O,"",D)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;d.location.assign(D)}f&&m&&m({action:x,location:j.location,delta:1})}function M(k,A){x="REPLACE";let E=Su(j.location,k,A);g=y();let O=Jh(E,g),D=j.createHref(E);h.replaceState(O,"",D),f&&m&&m({action:x,location:j.location,delta:0})}function N(k){return cx(k)}let j={get action(){return x},get location(){return l(d,h)},listen(k){if(m)throw new Error("A history only accepts one active listener");return d.addEventListener(Ph,S),m=k,()=>{d.removeEventListener(Ph,S),m=null}},createHref(k){return s(d,k)},createURL:N,encodeLocation(k){let A=N(k);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:v,replace:M,go(k){return h.go(k)}};return j}function cx(l,s=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Be(r,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:fs(l);return o=o.replace(/ $/,"%20"),!s&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Tm(l,s,r="/"){return dx(l,s,r,!1)}function dx(l,s,r,o){let d=typeof s=="string"?al(s):s,f=ma(d.pathname||"/",r);if(f==null)return null;let h=Am(l);fx(h);let x=null;for(let m=0;x==null&&m<h.length;++m){let g=jx(f);x=wx(h[m],g,o)}return x}function Am(l,s=[],r=[],o=""){let d=(f,h,x)=>{let m={relativePath:x===void 0?f.path||"":x,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};m.relativePath.startsWith("/")&&(Be(m.relativePath.startsWith(o),`Absolute route path "${m.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(o.length));let g=ha([o,m.relativePath]),y=r.concat(m);f.children&&f.children.length>0&&(Be(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Am(f.children,s,y,g)),!(f.path==null&&!f.index)&&s.push({path:g,score:bx(g,f.index),routesMeta:y})};return l.forEach((f,h)=>{var x;if(f.path===""||!((x=f.path)!=null&&x.includes("?")))d(f,h);else for(let m of Rm(f.path))d(f,h,m)}),s}function Rm(l){let s=l.split("/");if(s.length===0)return[];let[r,...o]=s,d=r.endsWith("?"),f=r.replace(/\?$/,"");if(o.length===0)return d?[f,""]:[f];let h=Rm(o.join("/")),x=[];return x.push(...h.map(m=>m===""?f:[f,m].join("/"))),d&&x.push(...h),x.map(m=>l.startsWith("/")&&m===""?"/":m)}function fx(l){l.sort((s,r)=>s.score!==r.score?r.score-s.score:vx(s.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var hx=/^:[\w-]+$/,mx=3,gx=2,px=1,xx=10,yx=-2,Fh=l=>l==="*";function bx(l,s){let r=l.split("/"),o=r.length;return r.some(Fh)&&(o+=yx),s&&(o+=gx),r.filter(d=>!Fh(d)).reduce((d,f)=>d+(hx.test(f)?mx:f===""?px:xx),o)}function vx(l,s){return l.length===s.length&&l.slice(0,-1).every((o,d)=>o===s[d])?l[l.length-1]-s[s.length-1]:0}function wx(l,s,r=!1){let{routesMeta:o}=l,d={},f="/",h=[];for(let x=0;x<o.length;++x){let m=o[x],g=x===o.length-1,y=f==="/"?s:s.slice(f.length)||"/",S=Gr({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},y),v=m.route;if(!S&&g&&r&&!o[o.length-1].route.index&&(S=Gr({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},y)),!S)return null;Object.assign(d,S.params),h.push({params:d,pathname:ha([f,S.pathname]),pathnameBase:kx(ha([f,S.pathnameBase])),route:v}),S.pathnameBase!=="/"&&(f=ha([f,S.pathnameBase]))}return h}function Gr(l,s){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[r,o]=Sx(l.path,l.caseSensitive,l.end),d=s.match(r);if(!d)return null;let f=d[0],h=f.replace(/(.)\/+$/,"$1"),x=d.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:S},v)=>{if(y==="*"){let N=x[v]||"";h=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const M=x[v];return S&&!M?g[y]=void 0:g[y]=(M||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:h,pattern:l}}function Sx(l,s=!1,r=!0){qt(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let o=[],d="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,x,m)=>(o.push({paramName:x,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return l.endsWith("*")?(o.push({paramName:"*"}),d+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?d+="\\/*$":l!==""&&l!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,s?void 0:"i"),o]}function jx(l){try{return l.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return qt(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),l}}function ma(l,s){if(s==="/")return l;if(!l.toLowerCase().startsWith(s.toLowerCase()))return null;let r=s.endsWith("/")?s.length-1:s.length,o=l.charAt(r);return o&&o!=="/"?null:l.slice(r)||"/"}function Nx(l,s="/"){let{pathname:r,search:o="",hash:d=""}=typeof l=="string"?al(l):l;return{pathname:r?r.startsWith("/")?r:Ex(r,s):s,search:Tx(o),hash:Ax(d)}}function Ex(l,s){let r=s.replace(/\/+$/,"").split("/");return l.split("/").forEach(d=>{d===".."?r.length>1&&r.pop():d!=="."&&r.push(d)}),r.length>1?r.join("/"):"/"}function pu(l,s,r,o){return`Cannot include a '${l}' character in a manually specified \`to.${s}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Cx(l){return l.filter((s,r)=>r===0||s.route.path&&s.route.path.length>0)}function zu(l){let s=Cx(l);return s.map((r,o)=>o===s.length-1?r.pathname:r.pathnameBase)}function Du(l,s,r,o=!1){let d;typeof l=="string"?d=al(l):(d={...l},Be(!d.pathname||!d.pathname.includes("?"),pu("?","pathname","search",d)),Be(!d.pathname||!d.pathname.includes("#"),pu("#","pathname","hash",d)),Be(!d.search||!d.search.includes("#"),pu("#","search","hash",d)));let f=l===""||d.pathname==="",h=f?"/":d.pathname,x;if(h==null)x=r;else{let S=s.length-1;if(!o&&h.startsWith("..")){let v=h.split("/");for(;v[0]==="..";)v.shift(),S-=1;d.pathname=v.join("/")}x=S>=0?s[S]:"/"}let m=Nx(d,x),g=h&&h!=="/"&&h.endsWith("/"),y=(f||h===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(g||y)&&(m.pathname+="/"),m}var ha=l=>l.join("/").replace(/\/\/+/g,"/"),kx=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Tx=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Ax=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function Rx(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}var Om=["POST","PUT","PATCH","DELETE"];new Set(Om);var Ox=["GET",...Om];new Set(Ox);var nl=w.createContext(null);nl.displayName="DataRouter";var Qr=w.createContext(null);Qr.displayName="DataRouterState";var Mm=w.createContext({isTransitioning:!1});Mm.displayName="ViewTransition";var Mx=w.createContext(new Map);Mx.displayName="Fetchers";var zx=w.createContext(null);zx.displayName="Await";var Gt=w.createContext(null);Gt.displayName="Navigation";var gs=w.createContext(null);gs.displayName="Location";var Lt=w.createContext({outlet:null,matches:[],isDataRoute:!1});Lt.displayName="Route";var Uu=w.createContext(null);Uu.displayName="RouteError";function Dx(l,{relative:s}={}){Be(ll(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=w.useContext(Gt),{hash:d,pathname:f,search:h}=ps(l,{relative:s}),x=f;return r!=="/"&&(x=f==="/"?r:ha([r,f])),o.createHref({pathname:x,search:h,hash:d})}function ll(){return w.useContext(gs)!=null}function Jt(){return Be(ll(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(gs).location}var zm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Dm(l){w.useContext(Gt).static||w.useLayoutEffect(l)}function dn(){let{isDataRoute:l}=w.useContext(Lt);return l?Jx():Ux()}function Ux(){Be(ll(),"useNavigate() may be used only in the context of a <Router> component.");let l=w.useContext(nl),{basename:s,navigator:r}=w.useContext(Gt),{matches:o}=w.useContext(Lt),{pathname:d}=Jt(),f=JSON.stringify(zu(o)),h=w.useRef(!1);return Dm(()=>{h.current=!0}),w.useCallback((m,g={})=>{if(qt(h.current,zm),!h.current)return;if(typeof m=="number"){r.go(m);return}let y=Du(m,JSON.parse(f),d,g.relative==="path");l==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:ha([s,y.pathname])),(g.replace?r.replace:r.push)(y,g.state,g)},[s,r,f,d,l])}var Lx=w.createContext(null);function _x(l){let s=w.useContext(Lt).outlet;return s&&w.createElement(Lx.Provider,{value:l},s)}function Hx(){let{matches:l}=w.useContext(Lt),s=l[l.length-1];return s?s.params:{}}function ps(l,{relative:s}={}){let{matches:r}=w.useContext(Lt),{pathname:o}=Jt(),d=JSON.stringify(zu(r));return w.useMemo(()=>Du(l,JSON.parse(d),o,s==="path"),[l,d,o,s])}function Bx(l,s){return Um(l,s)}function Um(l,s,r,o){var A;Be(ll(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=w.useContext(Gt),{matches:f}=w.useContext(Lt),h=f[f.length-1],x=h?h.params:{},m=h?h.pathname:"/",g=h?h.pathnameBase:"/",y=h&&h.route;{let E=y&&y.path||"";Lm(m,!y||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
-
|
|
51
|
-
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let S=Jt(),v;if(s){let E=typeof s=="string"?al(s):s;Be(g==="/"||((A=E.pathname)==null?void 0:A.startsWith(g)),`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 "${g}" but pathname "${E.pathname}" was given in the \`location\` prop.`),v=E}else v=S;let M=v.pathname||"/",N=M;if(g!=="/"){let E=g.replace(/^\//,"").split("/");N="/"+M.replace(/^\//,"").split("/").slice(E.length).join("/")}let j=Tm(l,{pathname:N});qt(y||j!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),qt(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=Yx(j&&j.map(E=>Object.assign({},E,{params:Object.assign({},x,E.params),pathname:ha([g,d.encodeLocation?d.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?g:ha([g,d.encodeLocation?d.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),f,r,o);return s&&k?w.createElement(gs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},k):k}function qx(){let l=Px(),s=Rx(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),r=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},h=null;return console.error("Error handled by React Router default ErrorBoundary:",l),h=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},s),r?w.createElement("pre",{style:d},r):null,h)}var Gx=w.createElement(qx,null),Vx=class extends w.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,s){return s.location!==l.location||s.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:s.error,location:s.location,revalidation:l.revalidation||s.revalidation}}componentDidCatch(l,s){console.error("React Router caught the following error during render",l,s)}render(){return this.state.error!==void 0?w.createElement(Lt.Provider,{value:this.props.routeContext},w.createElement(Uu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function $x({routeContext:l,match:s,children:r}){let o=w.useContext(nl);return o&&o.static&&o.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=s.route.id),w.createElement(Lt.Provider,{value:l},r)}function Yx(l,s=[],r=null,o=null){if(l==null){if(!r)return null;if(r.errors)l=r.matches;else if(s.length===0&&!r.initialized&&r.matches.length>0)l=r.matches;else return null}let d=l,f=r==null?void 0:r.errors;if(f!=null){let m=d.findIndex(g=>g.route.id&&(f==null?void 0:f[g.route.id])!==void 0);Be(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,m+1))}let h=!1,x=-1;if(r)for(let m=0;m<d.length;m++){let g=d[m];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(x=m),g.route.id){let{loaderData:y,errors:S}=r,v=g.route.loader&&!y.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||v){h=!0,x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}return d.reduceRight((m,g,y)=>{let S,v=!1,M=null,N=null;r&&(S=f&&g.route.id?f[g.route.id]:void 0,M=g.route.errorElement||Gx,h&&(x<0&&y===0?(Lm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,N=null):x===y&&(v=!0,N=g.route.hydrateFallbackElement||null)));let j=s.concat(d.slice(0,y+1)),k=()=>{let A;return S?A=M:v?A=N:g.route.Component?A=w.createElement(g.route.Component,null):g.route.element?A=g.route.element:A=m,w.createElement($x,{match:g,routeContext:{outlet:m,matches:j,isDataRoute:r!=null},children:A})};return r&&(g.route.ErrorBoundary||g.route.errorElement||y===0)?w.createElement(Vx,{location:r.location,revalidation:r.revalidation,component:M,error:S,children:k(),routeContext:{outlet:null,matches:j,isDataRoute:!0}}):k()},null)}function Lu(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kx(l){let s=w.useContext(nl);return Be(s,Lu(l)),s}function Qx(l){let s=w.useContext(Qr);return Be(s,Lu(l)),s}function Xx(l){let s=w.useContext(Lt);return Be(s,Lu(l)),s}function _u(l){let s=Xx(l),r=s.matches[s.matches.length-1];return Be(r.route.id,`${l} can only be used on routes that contain a unique "id"`),r.route.id}function Zx(){return _u("useRouteId")}function Px(){var o;let l=w.useContext(Uu),s=Qx("useRouteError"),r=_u("useRouteError");return l!==void 0?l:(o=s.errors)==null?void 0:o[r]}function Jx(){let{router:l}=Kx("useNavigate"),s=_u("useNavigate"),r=w.useRef(!1);return Dm(()=>{r.current=!0}),w.useCallback(async(d,f={})=>{qt(r.current,zm),r.current&&(typeof d=="number"?l.navigate(d):await l.navigate(d,{fromRouteId:s,...f}))},[l,s])}var Wh={};function Lm(l,s,r){!s&&!Wh[l]&&(Wh[l]=!0,qt(!1,r))}w.memo(Fx);function Fx({routes:l,future:s,state:r}){return Um(l,void 0,r,s)}function _m({to:l,replace:s,state:r,relative:o}){Be(ll(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=w.useContext(Gt);qt(!d,"<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:f}=w.useContext(Lt),{pathname:h}=Jt(),x=dn(),m=Du(l,zu(f),h,o==="path"),g=JSON.stringify(m);return w.useEffect(()=>{x(JSON.parse(g),{replace:s,state:r,relative:o})},[x,g,o,s,r]),null}function Hm(l){return _x(l.context)}function Ut(l){Be(!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 Wx({basename:l="/",children:s=null,location:r,navigationType:o="POP",navigator:d,static:f=!1}){Be(!ll(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=l.replace(/^\/*/,"/"),x=w.useMemo(()=>({basename:h,navigator:d,static:f,future:{}}),[h,d,f]);typeof r=="string"&&(r=al(r));let{pathname:m="/",search:g="",hash:y="",state:S=null,key:v="default"}=r,M=w.useMemo(()=>{let N=ma(m,h);return N==null?null:{location:{pathname:N,search:g,hash:y,state:S,key:v},navigationType:o}},[h,m,g,y,S,v,o]);return qt(M!=null,`<Router basename="${h}"> is not able to match the URL "${m}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:w.createElement(Gt.Provider,{value:x},w.createElement(gs.Provider,{children:s,value:M}))}function Ix({children:l,location:s}){return Bx(ju(l),s)}function ju(l,s=[]){let r=[];return w.Children.forEach(l,(o,d)=>{if(!w.isValidElement(o))return;let f=[...s,d];if(o.type===w.Fragment){r.push.apply(r,ju(o.props.children,f));return}Be(o.type===Ut,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Be(!o.props.index||!o.props.children,"An index route cannot have child routes.");let h={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(h.children=ju(o.props.children,f)),r.push(h)}),r}var Br="get",qr="application/x-www-form-urlencoded";function Xr(l){return l!=null&&typeof l.tagName=="string"}function ey(l){return Xr(l)&&l.tagName.toLowerCase()==="button"}function ty(l){return Xr(l)&&l.tagName.toLowerCase()==="form"}function ay(l){return Xr(l)&&l.tagName.toLowerCase()==="input"}function ny(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function ly(l,s){return l.button===0&&(!s||s==="_self")&&!ny(l)}var zr=null;function sy(){if(zr===null)try{new FormData(document.createElement("form"),0),zr=!1}catch{zr=!0}return zr}var ry=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xu(l){return l!=null&&!ry.has(l)?(qt(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qr}"`),null):l}function iy(l,s){let r,o,d,f,h;if(ty(l)){let x=l.getAttribute("action");o=x?ma(x,s):null,r=l.getAttribute("method")||Br,d=xu(l.getAttribute("enctype"))||qr,f=new FormData(l)}else if(ey(l)||ay(l)&&(l.type==="submit"||l.type==="image")){let x=l.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=l.getAttribute("formaction")||x.getAttribute("action");if(o=m?ma(m,s):null,r=l.getAttribute("formmethod")||x.getAttribute("method")||Br,d=xu(l.getAttribute("formenctype"))||xu(x.getAttribute("enctype"))||qr,f=new FormData(x,l),!sy()){let{name:g,type:y,value:S}=l;if(y==="image"){let v=g?`${g}.`:"";f.append(`${v}x`,"0"),f.append(`${v}y`,"0")}else g&&f.append(g,S)}}else{if(Xr(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Br,o=null,d=qr,h=l}return f&&d==="text/plain"&&(h=f,f=void 0),{action:o,method:r.toLowerCase(),encType:d,formData:f,body:h}}function Hu(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}async function oy(l,s){if(l.id in s)return s[l.id];try{let r=await import(l.module);return s[l.id]=r,r}catch(r){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function uy(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function cy(l,s,r){let o=await Promise.all(l.map(async d=>{let f=s.routes[d.route.id];if(f){let h=await oy(f,r);return h.links?h.links():[]}return[]}));return my(o.flat(1).filter(uy).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Ih(l,s,r,o,d,f){let h=(m,g)=>r[g]?m.route.id!==r[g].route.id:!0,x=(m,g)=>{var y;return r[g].pathname!==m.pathname||((y=r[g].route.path)==null?void 0:y.endsWith("*"))&&r[g].params["*"]!==m.params["*"]};return f==="assets"?s.filter((m,g)=>h(m,g)||x(m,g)):f==="data"?s.filter((m,g)=>{var S;let y=o.routes[m.route.id];if(!y||!y.hasLoader)return!1;if(h(m,g)||x(m,g))return!0;if(m.route.shouldRevalidate){let v=m.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((S=r[0])==null?void 0:S.params)||{},nextUrl:new URL(l,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function dy(l,s,{includeHydrateFallback:r}={}){return fy(l.map(o=>{let d=s.routes[o.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),r&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function fy(l){return[...new Set(l)]}function hy(l){let s={},r=Object.keys(l).sort();for(let o of r)s[o]=l[o];return s}function my(l,s){let r=new Set;return new Set(s),l.reduce((o,d)=>{let f=JSON.stringify(hy(d));return r.has(f)||(r.add(f),o.push({key:f,link:d})),o},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var gy=new Set([100,101,204,205]);function py(l,s){let r=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return r.pathname==="/"?r.pathname="_root.data":s&&ma(r.pathname,s)==="/"?r.pathname=`${s.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Bm(){let l=w.useContext(nl);return Hu(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function xy(){let l=w.useContext(Qr);return Hu(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Bu=w.createContext(void 0);Bu.displayName="FrameworkContext";function qm(){let l=w.useContext(Bu);return Hu(l,"You must render this element inside a <HydratedRouter> element"),l}function yy(l,s){let r=w.useContext(Bu),[o,d]=w.useState(!1),[f,h]=w.useState(!1),{onFocus:x,onBlur:m,onMouseEnter:g,onMouseLeave:y,onTouchStart:S}=s,v=w.useRef(null);w.useEffect(()=>{if(l==="render"&&h(!0),l==="viewport"){let j=A=>{A.forEach(E=>{h(E.isIntersecting)})},k=new IntersectionObserver(j,{threshold:.5});return v.current&&k.observe(v.current),()=>{k.disconnect()}}},[l]),w.useEffect(()=>{if(o){let j=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(j)}}},[o]);let M=()=>{d(!0)},N=()=>{d(!1),h(!1)};return r?l!=="intent"?[f,v,{}]:[f,v,{onFocus:is(x,M),onBlur:is(m,N),onMouseEnter:is(g,M),onMouseLeave:is(y,N),onTouchStart:is(S,M)}]:[!1,v,{}]}function is(l,s){return r=>{l&&l(r),r.defaultPrevented||s(r)}}function by({page:l,...s}){let{router:r}=Bm(),o=w.useMemo(()=>Tm(r.routes,l,r.basename),[r.routes,l,r.basename]);return o?w.createElement(wy,{page:l,matches:o,...s}):null}function vy(l){let{manifest:s,routeModules:r}=qm(),[o,d]=w.useState([]);return w.useEffect(()=>{let f=!1;return cy(l,s,r).then(h=>{f||d(h)}),()=>{f=!0}},[l,s,r]),o}function wy({page:l,matches:s,...r}){let o=Jt(),{manifest:d,routeModules:f}=qm(),{basename:h}=Bm(),{loaderData:x,matches:m}=xy(),g=w.useMemo(()=>Ih(l,s,m,d,o,"data"),[l,s,m,d,o]),y=w.useMemo(()=>Ih(l,s,m,d,o,"assets"),[l,s,m,d,o]),S=w.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let N=new Set,j=!1;if(s.forEach(A=>{var O;let E=d.routes[A.route.id];!E||!E.hasLoader||(!g.some(D=>D.route.id===A.route.id)&&A.route.id in x&&((O=f[A.route.id])!=null&&O.shouldRevalidate)||E.hasClientLoader?j=!0:N.add(A.route.id))}),N.size===0)return[];let k=py(l,h);return j&&N.size>0&&k.searchParams.set("_routes",s.filter(A=>N.has(A.route.id)).map(A=>A.route.id).join(",")),[k.pathname+k.search]},[h,x,o,d,g,s,l,f]),v=w.useMemo(()=>dy(y,d),[y,d]),M=vy(y);return w.createElement(w.Fragment,null,S.map(N=>w.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...r})),v.map(N=>w.createElement("link",{key:N,rel:"modulepreload",href:N,...r})),M.map(({key:N,link:j})=>w.createElement("link",{key:N,...j})))}function Sy(...l){return s=>{l.forEach(r=>{typeof r=="function"?r(s):r!=null&&(r.current=s)})}}var Gm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Gm&&(window.__reactRouterVersion="7.6.1")}catch{}function jy({basename:l,children:s,window:r}){let o=w.useRef();o.current==null&&(o.current=ix({window:r,v5Compat:!0}));let d=o.current,[f,h]=w.useState({action:d.action,location:d.location}),x=w.useCallback(m=>{w.startTransition(()=>h(m))},[h]);return w.useLayoutEffect(()=>d.listen(x),[d,x]),w.createElement(Wx,{basename:l,children:s,location:f.location,navigationType:f.action,navigator:d})}var Vm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$m=w.forwardRef(function({onClick:s,discover:r="render",prefetch:o="none",relative:d,reloadDocument:f,replace:h,state:x,target:m,to:g,preventScrollReset:y,viewTransition:S,...v},M){let{basename:N}=w.useContext(Gt),j=typeof g=="string"&&Vm.test(g),k,A=!1;if(typeof g=="string"&&j&&(k=g,Gm))try{let P=new URL(window.location.href),J=g.startsWith("//")?new URL(P.protocol+g):new URL(g),le=ma(J.pathname,N);J.origin===P.origin&&le!=null?g=le+J.search+J.hash:A=!0}catch{qt(!1,`<Link to="${g}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let E=Dx(g,{relative:d}),[O,D,U]=yy(o,v),ne=Cy(g,{replace:h,state:x,target:m,preventScrollReset:y,relative:d,viewTransition:S});function $(P){s&&s(P),P.defaultPrevented||ne(P)}let G=w.createElement("a",{...v,...U,href:k||E,onClick:A||f?s:$,ref:Sy(M,D),target:m,"data-discover":!j&&r==="render"?"true":void 0});return O&&!j?w.createElement(w.Fragment,null,G,w.createElement(by,{page:E})):G});$m.displayName="Link";var Ym=w.forwardRef(function({"aria-current":s="page",caseSensitive:r=!1,className:o="",end:d=!1,style:f,to:h,viewTransition:x,children:m,...g},y){let S=ps(h,{relative:g.relative}),v=Jt(),M=w.useContext(Qr),{navigator:N,basename:j}=w.useContext(Gt),k=M!=null&&Oy(S)&&x===!0,A=N.encodeLocation?N.encodeLocation(S).pathname:S.pathname,E=v.pathname,O=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;r||(E=E.toLowerCase(),O=O?O.toLowerCase():null,A=A.toLowerCase()),O&&j&&(O=ma(O,j)||O);const D=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let U=E===A||!d&&E.startsWith(A)&&E.charAt(D)==="/",ne=O!=null&&(O===A||!d&&O.startsWith(A)&&O.charAt(A.length)==="/"),$={isActive:U,isPending:ne,isTransitioning:k},G=U?s:void 0,P;typeof o=="function"?P=o($):P=[o,U?"active":null,ne?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let J=typeof f=="function"?f($):f;return w.createElement($m,{...g,"aria-current":G,className:P,ref:y,style:J,to:h,viewTransition:x},typeof m=="function"?m($):m)});Ym.displayName="NavLink";var Ny=w.forwardRef(({discover:l="render",fetcherKey:s,navigate:r,reloadDocument:o,replace:d,state:f,method:h=Br,action:x,onSubmit:m,relative:g,preventScrollReset:y,viewTransition:S,...v},M)=>{let N=Ay(),j=Ry(x,{relative:g}),k=h.toLowerCase()==="get"?"get":"post",A=typeof x=="string"&&Vm.test(x),E=O=>{if(m&&m(O),O.defaultPrevented)return;O.preventDefault();let D=O.nativeEvent.submitter,U=(D==null?void 0:D.getAttribute("formmethod"))||h;N(D||O.currentTarget,{fetcherKey:s,method:U,navigate:r,replace:d,state:f,relative:g,preventScrollReset:y,viewTransition:S})};return w.createElement("form",{ref:M,method:k,action:j,onSubmit:o?m:E,...v,"data-discover":!A&&l==="render"?"true":void 0})});Ny.displayName="Form";function Ey(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Km(l){let s=w.useContext(nl);return Be(s,Ey(l)),s}function Cy(l,{target:s,replace:r,state:o,preventScrollReset:d,relative:f,viewTransition:h}={}){let x=dn(),m=Jt(),g=ps(l,{relative:f});return w.useCallback(y=>{if(ly(y,s)){y.preventDefault();let S=r!==void 0?r:fs(m)===fs(g);x(l,{replace:S,state:o,preventScrollReset:d,relative:f,viewTransition:h})}},[m,x,g,r,o,s,l,d,f,h])}var ky=0,Ty=()=>`__${String(++ky)}__`;function Ay(){let{router:l}=Km("useSubmit"),{basename:s}=w.useContext(Gt),r=Zx();return w.useCallback(async(o,d={})=>{let{action:f,method:h,encType:x,formData:m,body:g}=iy(o,s);if(d.navigate===!1){let y=d.fetcherKey||Ty();await l.fetch(y,r,d.action||f,{preventScrollReset:d.preventScrollReset,formData:m,body:g,formMethod:d.method||h,formEncType:d.encType||x,flushSync:d.flushSync})}else await l.navigate(d.action||f,{preventScrollReset:d.preventScrollReset,formData:m,body:g,formMethod:d.method||h,formEncType:d.encType||x,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,s,r])}function Ry(l,{relative:s}={}){let{basename:r}=w.useContext(Gt),o=w.useContext(Lt);Be(o,"useFormAction must be used inside a RouteContext");let[d]=o.matches.slice(-1),f={...ps(l||".",{relative:s})},h=Jt();if(l==null){f.search=h.search;let x=new URLSearchParams(f.search),m=x.getAll("index");if(m.some(y=>y==="")){x.delete("index"),m.filter(S=>S).forEach(S=>x.append("index",S));let y=x.toString();f.search=y?`?${y}`:""}}return(!l||l===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:ha([r,f.pathname])),fs(f)}function Oy(l,s={}){let r=w.useContext(Mm);Be(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Km("useViewTransitionState"),d=ps(l,{relative:s.relative});if(!r.isTransitioning)return!1;let f=ma(r.currentLocation.pathname,o)||r.currentLocation.pathname,h=ma(r.nextLocation.pathname,o)||r.nextLocation.pathname;return Gr(d.pathname,h)!=null||Gr(d.pathname,f)!=null}[...gy];const My=()=>window.__MCPHUB_CONFIG__||{basePath:"",version:"dev",name:"mcphub"},Qm=()=>{const s=My().basePath||"";return s&&!s.startsWith("/")?"/"+s:s},zy=()=>Qm()+"/api",je=l=>{const s=zy(),r=l.startsWith("/")?l:"/"+l;return s+r},Dy=async()=>{try{const l=window.location.pathname,s=[l.replace(/\/[^\/]*$/,"")+"/config","/config",...l.includes("/")?[l.split("/")[1]?`/${l.split("/")[1]}/config`:"/config"]:["/config"]];for(const r of s)try{const o=await fetch(r,{method:"GET",headers:{Accept:"application/json","Cache-Control":"no-cache"}});if(o.ok){const d=await o.json();if(d.success&&d.data)return d.data}}catch(o){console.debug(`Failed to load config from ${r}:`,o)}return console.warn("Could not load runtime config from server, using defaults"),{basePath:"",version:"dev",name:"mcphub"}}catch(l){return console.error("Error loading runtime config:",l),{basePath:"",version:"dev",name:"mcphub"}}},qu="mcphub_token",Ga=()=>localStorage.getItem(qu),Xm=l=>{localStorage.setItem(qu,l)},Nu=()=>{localStorage.removeItem(qu)},Uy=async l=>{try{console.log(je("/auth/login"));const r=await(await fetch(je("/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return r.success&&r.token&&Xm(r.token),r}catch(s){return console.error("Login error:",s),{success:!1,message:"An error occurred during login"}}},Ly=async l=>{try{const r=await(await fetch(je("/auth/register"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return r.success&&r.token&&Xm(r.token),r}catch(s){return console.error("Register error:",s),{success:!1,message:"An error occurred during registration"}}},_y=async()=>{const l=Ga();if(!l)return{success:!1,message:"No authentication token"};try{return await(await fetch(je("/auth/user"),{method:"GET",headers:{"x-auth-token":l}})).json()}catch(s){return console.error("Get current user error:",s),{success:!1,message:"An error occurred while fetching user data"}}},Hy=async l=>{const s=Ga();if(!s)return{success:!1,message:"No authentication token"};try{return await(await fetch(je("/auth/change-password"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":s},body:JSON.stringify(l)})).json()}catch(r){return console.error("Change password error:",r),{success:!1,message:"An error occurred while changing password"}}},By=()=>{Nu()},Zt={token:null,isAuthenticated:!1,loading:!0,user:null,error:null},Zm=w.createContext({auth:Zt,login:async()=>!1,register:async()=>!1,logout:()=>{}}),qy=({children:l})=>{const[s,r]=w.useState(Zt);w.useEffect(()=>{(async()=>{const x=Ga();if(!x){r({...Zt,loading:!1});return}try{const m=await _y();m.success&&m.user?r({token:x,isAuthenticated:!0,loading:!1,user:m.user,error:null}):(Nu(),r({...Zt,loading:!1}))}catch{Nu(),r({...Zt,loading:!1})}})()},[]);const o=async(h,x)=>{try{const m=await Uy({username:h,password:x});return m.success&&m.token&&m.user?(r({token:m.token,isAuthenticated:!0,loading:!1,user:m.user,error:null}),!0):(r({...Zt,loading:!1,error:m.message||"Authentication failed"}),!1)}catch{return r({...Zt,loading:!1,error:"Authentication failed"}),!1}},d=async(h,x,m=!1)=>{try{const g=await Ly({username:h,password:x,isAdmin:m});return g.success&&g.token&&g.user?(r({token:g.token,isAuthenticated:!0,loading:!1,user:g.user,error:null}),!0):(r({...Zt,loading:!1,error:g.message||"Registration failed"}),!1)}catch{return r({...Zt,loading:!1,error:"Registration failed"}),!1}},f=()=>{By(),r({...Zt,loading:!1})};return u.jsx(Zm.Provider,{value:{auth:s,login:o,register:d,logout:f},children:l})},Zr=()=>w.useContext(Zm);/**
|
|
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 Gy=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Vy=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,r,o)=>o?o.toUpperCase():r.toLowerCase()),em=l=>{const s=Vy(l);return s.charAt(0).toUpperCase()+s.slice(1)},Pm=(...l)=>l.filter((s,r,o)=>!!s&&s.trim()!==""&&o.indexOf(s)===r).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 $y={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 Yy=w.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:d="",children:f,iconNode:h,...x},m)=>w.createElement("svg",{ref:m,...$y,width:s,height:s,stroke:l,strokeWidth:o?Number(r)*24/Number(s):r,className:Pm("lucide",d),...x},[...h.map(([g,y])=>w.createElement(g,y)),...Array.isArray(f)?f:[f]]));/**
|
|
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 Fe=(l,s)=>{const r=w.forwardRef(({className:o,...d},f)=>w.createElement(Yy,{ref:f,iconNode:s,className:Pm(`lucide-${Gy(em(l))}`,`lucide-${l}`,o),...d}));return r.displayName=em(l),r};/**
|
|
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 Ky=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pr=Fe("check",Ky);/**
|
|
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 Qy=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jm=Fe("chevron-down",Qy);/**
|
|
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 Xy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Fm=Fe("chevron-right",Xy);/**
|
|
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 Zy=[["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"}]],Wm=Fe("circle-alert",Zy);/**
|
|
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 Py=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Jy=Fe("circle-check-big",Py);/**
|
|
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 Fy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Wy=Fe("circle-x",Fy);/**
|
|
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 Iy=[["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"}]],Im=Fe("copy",Iy);/**
|
|
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 eb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],tb=Fe("info",eb);/**
|
|
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 ab=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],nb=Fe("loader",ab);/**
|
|
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 lb=[["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"}]],sb=Fe("log-out",lb);/**
|
|
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 rb=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],ib=Fe("moon",rb);/**
|
|
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 ob=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],ub=Fe("play",ob);/**
|
|
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 cb=[["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"}]],db=Fe("refresh-cw",cb);/**
|
|
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 fb=[["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"}]],hb=Fe("settings",fb);/**
|
|
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 mb=[["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"}]],eg=Fe("square-pen",mb);/**
|
|
147
|
-
* @license lucide-react v0.486.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const gb=[["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"}]],pb=Fe("sun",gb);/**
|
|
152
|
-
* @license lucide-react v0.486.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const xb=[["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"}]],yb=Fe("trash",xb);/**
|
|
157
|
-
* @license lucide-react v0.486.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const bb=[["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"}]],vb=Fe("user",bb);/**
|
|
162
|
-
* @license lucide-react v0.486.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const wb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hs=Fe("x",wb);function tg(l){var s,r,o="";if(typeof l=="string"||typeof l=="number")o+=l;else if(typeof l=="object")if(Array.isArray(l)){var d=l.length;for(s=0;s<d;s++)l[s]&&(r=tg(l[s]))&&(o&&(o+=" "),o+=r)}else for(r in l)l[r]&&(o&&(o+=" "),o+=r);return o}function Sb(){for(var l,s,r=0,o="",d=arguments.length;r<d;r++)(l=arguments[r])&&(s=tg(l))&&(o&&(o+=" "),o+=s);return o}const Gu="-",jb=l=>{const s=Eb(l),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=l;return{getClassGroupId:h=>{const x=h.split(Gu);return x[0]===""&&x.length!==1&&x.shift(),ag(x,s)||Nb(h)},getConflictingClassGroupIds:(h,x)=>{const m=r[h]||[];return x&&o[h]?[...m,...o[h]]:m}}},ag=(l,s)=>{var h;if(l.length===0)return s.classGroupId;const r=l[0],o=s.nextPart.get(r),d=o?ag(l.slice(1),o):void 0;if(d)return d;if(s.validators.length===0)return;const f=l.join(Gu);return(h=s.validators.find(({validator:x})=>x(f)))==null?void 0:h.classGroupId},tm=/^\[(.+)\]$/,Nb=l=>{if(tm.test(l)){const s=tm.exec(l)[1],r=s==null?void 0:s.substring(0,s.indexOf(":"));if(r)return"arbitrary.."+r}},Eb=l=>{const{theme:s,classGroups:r}=l,o={nextPart:new Map,validators:[]};for(const d in r)Eu(r[d],o,d,s);return o},Eu=(l,s,r,o)=>{l.forEach(d=>{if(typeof d=="string"){const f=d===""?s:am(s,d);f.classGroupId=r;return}if(typeof d=="function"){if(Cb(d)){Eu(d(o),s,r,o);return}s.validators.push({validator:d,classGroupId:r});return}Object.entries(d).forEach(([f,h])=>{Eu(h,am(s,f),r,o)})})},am=(l,s)=>{let r=l;return s.split(Gu).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Cb=l=>l.isThemeGetter,kb=l=>{if(l<1)return{get:()=>{},set:()=>{}};let s=0,r=new Map,o=new Map;const d=(f,h)=>{r.set(f,h),s++,s>l&&(s=0,o=r,r=new Map)};return{get(f){let h=r.get(f);if(h!==void 0)return h;if((h=o.get(f))!==void 0)return d(f,h),h},set(f,h){r.has(f)?r.set(f,h):d(f,h)}}},Cu="!",ku=":",Tb=ku.length,Ab=l=>{const{prefix:s,experimentalParseClassName:r}=l;let o=d=>{const f=[];let h=0,x=0,m=0,g;for(let N=0;N<d.length;N++){let j=d[N];if(h===0&&x===0){if(j===ku){f.push(d.slice(m,N)),m=N+Tb;continue}if(j==="/"){g=N;continue}}j==="["?h++:j==="]"?h--:j==="("?x++:j===")"&&x--}const y=f.length===0?d:d.substring(m),S=Rb(y),v=S!==y,M=g&&g>m?g-m:void 0;return{modifiers:f,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:M}};if(s){const d=s+ku,f=o;o=h=>h.startsWith(d)?f(h.substring(d.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:h,maybePostfixModifierPosition:void 0}}if(r){const d=o;o=f=>r({className:f,parseClassName:d})}return o},Rb=l=>l.endsWith(Cu)?l.substring(0,l.length-1):l.startsWith(Cu)?l.substring(1):l,Ob=l=>{const s=Object.fromEntries(l.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const d=[];let f=[];return o.forEach(h=>{h[0]==="["||s[h]?(d.push(...f.sort(),h),f=[]):f.push(h)}),d.push(...f.sort()),d}},Mb=l=>({cache:kb(l.cacheSize),parseClassName:Ab(l),sortModifiers:Ob(l),...jb(l)}),zb=/\s+/,Db=(l,s)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:d,sortModifiers:f}=s,h=[],x=l.trim().split(zb);let m="";for(let g=x.length-1;g>=0;g-=1){const y=x[g],{isExternal:S,modifiers:v,hasImportantModifier:M,baseClassName:N,maybePostfixModifierPosition:j}=r(y);if(S){m=y+(m.length>0?" "+m:m);continue}let k=!!j,A=o(k?N.substring(0,j):N);if(!A){if(!k){m=y+(m.length>0?" "+m:m);continue}if(A=o(N),!A){m=y+(m.length>0?" "+m:m);continue}k=!1}const E=f(v).join(":"),O=M?E+Cu:E,D=O+A;if(h.includes(D))continue;h.push(D);const U=d(A,k);for(let ne=0;ne<U.length;++ne){const $=U[ne];h.push(O+$)}m=y+(m.length>0?" "+m:m)}return m};function Ub(){let l=0,s,r,o="";for(;l<arguments.length;)(s=arguments[l++])&&(r=ng(s))&&(o&&(o+=" "),o+=r);return o}const ng=l=>{if(typeof l=="string")return l;let s,r="";for(let o=0;o<l.length;o++)l[o]&&(s=ng(l[o]))&&(r&&(r+=" "),r+=s);return r};function Lb(l,...s){let r,o,d,f=h;function h(m){const g=s.reduce((y,S)=>S(y),l());return r=Mb(g),o=r.cache.get,d=r.cache.set,f=x,x(m)}function x(m){const g=o(m);if(g)return g;const y=Db(m,r);return d(m,y),y}return function(){return f(Ub.apply(null,arguments))}}const Je=l=>{const s=r=>r[l]||[];return s.isThemeGetter=!0,s},lg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_b=/^\d+\/\d+$/,Hb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bb=/\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$/,qb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Gb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fn=l=>_b.test(l),Se=l=>!!l&&!Number.isNaN(Number(l)),Ba=l=>!!l&&Number.isInteger(Number(l)),yu=l=>l.endsWith("%")&&Se(l.slice(0,-1)),fa=l=>Hb.test(l),$b=()=>!0,Yb=l=>Bb.test(l)&&!qb.test(l),rg=()=>!1,Kb=l=>Gb.test(l),Qb=l=>Vb.test(l),Xb=l=>!ce(l)&&!de(l),Zb=l=>sl(l,ug,rg),ce=l=>lg.test(l),un=l=>sl(l,cg,Yb),bu=l=>sl(l,Ib,Se),nm=l=>sl(l,ig,rg),Pb=l=>sl(l,og,Qb),Dr=l=>sl(l,dg,Kb),de=l=>sg.test(l),os=l=>rl(l,cg),Jb=l=>rl(l,ev),lm=l=>rl(l,ig),Fb=l=>rl(l,ug),Wb=l=>rl(l,og),Ur=l=>rl(l,dg,!0),sl=(l,s,r)=>{const o=lg.exec(l);return o?o[1]?s(o[1]):r(o[2]):!1},rl=(l,s,r=!1)=>{const o=sg.exec(l);return o?o[1]?s(o[1]):r:!1},ig=l=>l==="position"||l==="percentage",og=l=>l==="image"||l==="url",ug=l=>l==="length"||l==="size"||l==="bg-size",cg=l=>l==="length",Ib=l=>l==="number",ev=l=>l==="family-name",dg=l=>l==="shadow",tv=()=>{const l=Je("color"),s=Je("font"),r=Je("text"),o=Je("font-weight"),d=Je("tracking"),f=Je("leading"),h=Je("breakpoint"),x=Je("container"),m=Je("spacing"),g=Je("radius"),y=Je("shadow"),S=Je("inset-shadow"),v=Je("text-shadow"),M=Je("drop-shadow"),N=Je("blur"),j=Je("perspective"),k=Je("aspect"),A=Je("ease"),E=Je("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...D(),de,ce],ne=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],G=()=>[de,ce,m],P=()=>[Fn,"full","auto",...G()],J=()=>[Ba,"none","subgrid",de,ce],le=()=>["auto",{span:["full",Ba,de,ce]},Ba,de,ce],te=()=>[Ba,"auto",de,ce],se=()=>["auto","min","max","fr",de,ce],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...G()],W=()=>[Fn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],q=()=>[l,de,ce],fe=()=>[...D(),lm,nm,{position:[de,ce]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",Fb,Zb,{size:[de,ce]}],ee=()=>[yu,os,un],X=()=>["","none","full",g,de,ce],re=()=>["",Se,os,un],ve=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Se,yu,lm,nm],ie=()=>["","none",N,de,ce],pe=()=>["none",Se,de,ce],Ge=()=>["none",Se,de,ce],st=()=>[Se,de,ce],pt=()=>[Fn,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fa],breakpoint:[fa],color:[$b],container:[fa],"drop-shadow":[fa],ease:["in","out","in-out"],font:[Xb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fa],shadow:[fa],spacing:["px",Se],text:[fa],"text-shadow":[fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Fn,ce,de,k]}],container:["container"],columns:[{columns:[Se,ce,de,x]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:U()}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Ba,"auto",de,ce]}],basis:[{basis:[Fn,"full","auto",x,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Se,Fn,"auto","initial","none",ce]}],grow:[{grow:["",Se,de,ce]}],shrink:[{shrink:["",Se,de,ce]}],order:[{order:[Ba,"first","last","none",de,ce]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[x,"screen",...W()]}],"min-w":[{"min-w":[x,"screen","none",...W()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[h]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",r,os,un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,de,bu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yu,ce]}],"font-family":[{font:[Jb,ce,s]}],"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:[d,de,ce]}],"line-clamp":[{"line-clamp":[Se,"none",de,bu]}],leading:[{leading:[f,...G()]}],"list-image":[{"list-image":["none",de,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Se,"from-font","auto",de,un]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[Se,"auto",de,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",de,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ba,de,ce],radial:["",de,ce],conic:[Ba,de,ce]},Wb,Pb]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Se,de,ce]}],"outline-w":[{outline:["",Se,os,un]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",y,Ur,Dr]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",S,Ur,Dr]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[Se,un]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",v,Ur,Dr]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[Se,de,ce]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Se]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[de,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Se]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ce]}],filter:[{filter:["","none",de,ce]}],blur:[{blur:ie()}],brightness:[{brightness:[Se,de,ce]}],contrast:[{contrast:[Se,de,ce]}],"drop-shadow":[{"drop-shadow":["","none",M,Ur,Dr]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",Se,de,ce]}],"hue-rotate":[{"hue-rotate":[Se,de,ce]}],invert:[{invert:["",Se,de,ce]}],saturate:[{saturate:[Se,de,ce]}],sepia:[{sepia:["",Se,de,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ce]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[Se,de,ce]}],"backdrop-contrast":[{"backdrop-contrast":[Se,de,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Se,de,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Se,de,ce]}],"backdrop-invert":[{"backdrop-invert":["",Se,de,ce]}],"backdrop-opacity":[{"backdrop-opacity":[Se,de,ce]}],"backdrop-saturate":[{"backdrop-saturate":[Se,de,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Se,de,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Se,"initial",de,ce]}],ease:[{ease:["linear","initial",A,de,ce]}],delay:[{delay:[Se,de,ce]}],animate:[{animate:["none",E,de,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,de,ce]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:Ge()}],"scale-x":[{"scale-x":Ge()}],"scale-y":[{"scale-y":Ge()}],"scale-z":[{"scale-z":Ge()}],"scale-3d":["scale-3d"],skew:[{skew:st()}],"skew-x":[{"skew-x":st()}],"skew-y":[{"skew-y":st()}],transform:[{transform:[de,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pt()}],"translate-x":[{"translate-x":pt()}],"translate-y":[{"translate-y":pt()}],"translate-z":[{"translate-z":pt()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"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",de,ce]}],"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":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",de,ce]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[Se,os,un,bu]}],stroke:[{stroke:["none",...q()]}],"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-x","border-w-y","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-x","border-color-y","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:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},av=Lb(tv);function qa(...l){return av(Sb(l))}const nv=({message:l,type:s="info",duration:r=3e3,onClose:o,visible:d})=>{w.useEffect(()=>{if(d){const m=setTimeout(()=>{o()},r);return()=>clearTimeout(m)}},[d,r,o]);const f={success:u.jsx(Pr,{className:"w-5 h-5 text-green-500"}),error:u.jsx(hs,{className:"w-5 h-5 text-red-500"}),info:u.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),warning:u.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})},h={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"},x={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return u.jsx("div",{className:qa("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",h[s],"transform transition-all duration-300 ease-in-out",d?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:u.jsxs("div",{className:"flex items-start",children:[u.jsx("div",{className:"flex-shrink-0",children:f[s]}),u.jsx("div",{className:"ml-3",children:u.jsx("p",{className:qa("text-sm font-medium",x[s]),children:l})}),u.jsx("div",{className:"ml-auto pl-3",children:u.jsx("div",{className:"-mx-1.5 -my-1.5",children:u.jsxs("button",{onClick:o,className:qa("inline-flex rounded-md p-1.5",`hover:bg-${s}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${s}-500`),children:[u.jsx("span",{className:"sr-only",children:"Dismiss"}),u.jsx(hs,{className:"h-5 w-5"})]})})})]})})},fg=w.createContext(void 0),xs=()=>{const l=w.useContext(fg);if(!l)throw new Error("useToast must be used within a ToastProvider");return l},lv=({children:l})=>{const[s,r]=w.useState({message:"",type:"info",visible:!1,duration:3e3}),o=w.useCallback((f,h="info",x=3e3)=>{r({message:f,type:h,visible:!0,duration:x})},[]),d=w.useCallback(()=>{r(f=>({...f,visible:!1}))},[]);return u.jsxs(fg.Provider,{value:{showToast:o},children:[l,u.jsx(nv,{message:s.message,type:s.type,duration:s.duration,onClose:d,visible:s.visible})]})},hg=w.createContext(void 0),sv=()=>{const l=w.useContext(hg);if(!l)throw new Error("useTheme must be used within a ThemeProvider");return l},rv=({children:l})=>{const[s,r]=w.useState(()=>localStorage.getItem("theme")||"system"),[o,d]=w.useState("light"),f=h=>{r(h),localStorage.setItem("theme",h)};return w.useEffect(()=>{const h=()=>{const m=window.document.documentElement,g=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",y=s==="system"?g:s;d(y),y==="dark"?(console.log("Applying dark mode to HTML root element"),m.classList.add("dark"),document.body.style.backgroundColor="#111827"):(console.log("Removing dark mode from HTML root element"),m.classList.remove("dark"),document.body.style.backgroundColor="")},x=window.matchMedia("(prefers-color-scheme: dark)");return x.addEventListener("change",h),h(),()=>{x.removeEventListener("change",h)}},[s]),u.jsx(hg.Provider,{value:{theme:s,setTheme:f,resolvedTheme:o},children:l})},iv=(l,s,r,o)=>{var f,h,x,m;const d=[r,{code:s,...o||{}}];if((h=(f=l==null?void 0:l.services)==null?void 0:f.logger)!=null&&h.forward)return l.services.logger.forward(d,"warn","react-i18next::",!0);cn(d[0])&&(d[0]=`react-i18next:: ${d[0]}`),(m=(x=l==null?void 0:l.services)==null?void 0:x.logger)!=null&&m.warn?l.services.logger.warn(...d):console!=null&&console.warn&&console.warn(...d)},sm={},Tu=(l,s,r,o)=>{cn(r)&&sm[r]||(cn(r)&&(sm[r]=new Date),iv(l,s,r,o))},mg=(l,s)=>()=>{if(l.isInitialized)s();else{const r=()=>{setTimeout(()=>{l.off("initialized",r)},0),s()};l.on("initialized",r)}},Au=(l,s,r)=>{l.loadNamespaces(s,mg(l,r))},rm=(l,s,r,o)=>{if(cn(r)&&(r=[r]),l.options.preload&&l.options.preload.indexOf(s)>-1)return Au(l,r,o);r.forEach(d=>{l.options.ns.indexOf(d)<0&&l.options.ns.push(d)}),l.loadLanguages(s,mg(l,o))},ov=(l,s,r={})=>!s.languages||!s.languages.length?(Tu(s,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:s.languages}),!0):s.hasLoadedNamespace(l,{lng:r.lng,precheck:(o,d)=>{var f;if(((f=r.bindI18n)==null?void 0:f.indexOf("languageChanging"))>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!d(o.isLanguageChangingTo,l))return!1}}),cn=l=>typeof l=="string",uv=l=>typeof l=="object"&&l!==null,cv=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,dv={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},fv=l=>dv[l],hv=l=>l.replace(cv,fv);let Ru={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:hv};const mv=(l={})=>{Ru={...Ru,...l}},gv=()=>Ru;let gg;const pv=l=>{gg=l},xv=()=>gg,yv={type:"3rdParty",init(l){mv(l.options.react),pv(l)}},bv=w.createContext();class vv{constructor(){this.usedNamespaces={}}addUsedNamespaces(s){s.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const wv=(l,s)=>{const r=w.useRef();return w.useEffect(()=>{r.current=l},[l,s]),r.current},pg=(l,s,r,o)=>l.getFixedT(s,r,o),Sv=(l,s,r,o)=>w.useCallback(pg(l,s,r,o),[l,s,r,o]),ke=(l,s={})=>{var D,U,ne,$;const{i18n:r}=s,{i18n:o,defaultNS:d}=w.useContext(bv)||{},f=r||o||xv();if(f&&!f.reportNamespaces&&(f.reportNamespaces=new vv),!f){Tu(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const G=(J,le)=>cn(le)?le:uv(le)&&cn(le.defaultValue)?le.defaultValue:Array.isArray(J)?J[J.length-1]:J,P=[G,{},!1];return P.t=G,P.i18n={},P.ready=!1,P}(D=f.options.react)!=null&&D.wait&&Tu(f,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const h={...gv(),...f.options.react,...s},{useSuspense:x,keyPrefix:m}=h;let g=d||((U=f.options)==null?void 0:U.defaultNS);g=cn(g)?[g]:g||["translation"],($=(ne=f.reportNamespaces).addUsedNamespaces)==null||$.call(ne,g);const y=(f.isInitialized||f.initializedStoreOnce)&&g.every(G=>ov(G,f,h)),S=Sv(f,s.lng||null,h.nsMode==="fallback"?g:g[0],m),v=()=>S,M=()=>pg(f,s.lng||null,h.nsMode==="fallback"?g:g[0],m),[N,j]=w.useState(v);let k=g.join();s.lng&&(k=`${s.lng}${k}`);const A=wv(k),E=w.useRef(!0);w.useEffect(()=>{const{bindI18n:G,bindI18nStore:P}=h;E.current=!0,!y&&!x&&(s.lng?rm(f,s.lng,g,()=>{E.current&&j(M)}):Au(f,g,()=>{E.current&&j(M)})),y&&A&&A!==k&&E.current&&j(M);const J=()=>{E.current&&j(M)};return G&&(f==null||f.on(G,J)),P&&(f==null||f.store.on(P,J)),()=>{E.current=!1,f&&(G==null||G.split(" ").forEach(le=>f.off(le,J))),P&&f&&P.split(" ").forEach(le=>f.store.off(le,J))}},[f,k]),w.useEffect(()=>{E.current&&y&&j(v)},[f,m,y]);const O=[N,f,y];if(O.t=N,O.i18n=f,O.ready=y,y||!y&&!x)return O;throw new Promise(G=>{s.lng?rm(f,s.lng,g,()=>G()):Au(f,g,()=>G())})},xg=()=>{const{t:l}=ke(),{theme:s,setTheme:r}=sv();return u.jsx("div",{className:"flex items-center space-x-2",children:u.jsxs("div",{className:"flex bg-gray-200 dark:bg-gray-700 rounded-lg p-1",children:[u.jsx("button",{onClick:()=>r("light"),className:`flex items-center justify-center rounded-md p-1.5 ${s==="light"?"bg-white text-yellow-600 shadow":"text-black dark:text-gray-300 hover:text-yellow-600 dark:hover:text-yellow-500"}`,title:l("theme.light"),"aria-label":l("theme.light"),children:u.jsx(pb,{size:18})}),u.jsx("button",{onClick:()=>r("dark"),className:`flex items-center justify-center rounded-md p-1.5 ${s==="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:l("theme.dark"),"aria-label":l("theme.dark"),children:u.jsx(ib,{size:18})})]})})},jv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"GitHub"}),u.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"})]}),Nv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"Sponsor"}),u.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"})]}),Ev=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"WeChat"}),u.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"})]}),Cv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"Discord"}),u.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"})]}),kv=({open:l,onOpenChange:s})=>{const{i18n:r,t:o}=ke();return l?u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6 relative",children:[u.jsx("button",{onClick:()=>s(!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":o("common.close"),children:u.jsx(hs,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("sponsor.title")}),u.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:r.language==="zh"?u.jsx("img",{src:"./assets/reward.png",alt:o("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:o("sponsor.supportMessage")}),u.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:o("sponsor.supportButton")})]})})]})})}):null},Tv=({open:l,onOpenChange:s})=>{const{t:r}=ke();return l?u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6 relative",children:[u.jsx("button",{onClick:()=>s(!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":r("common.close"),children:u.jsx(hs,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:r("wechat.title")}),u.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[u.jsx("img",{src:"./assets/wexin.png",alt:r("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),u.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:r("wechat.scanMessage")})]})]})})}):null},Av=({onToggleSidebar:l})=>{const{t:s,i18n:r}=ke(),{auth:o}=Zr(),[d,f]=w.useState(!1),[h,x]=w.useState(!1);return u.jsxs("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:[u.jsxs("div",{className:"flex justify-between items-center px-4 py-3",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("button",{onClick:l,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":s("app.toggleSidebar"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),u.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:s("app.title")})]}),u.jsxs("div",{className:"flex items-center space-x-4",children:[u.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"v0.7.6"}),u.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:u.jsx(jv,{className:"h-5 w-5"})}),r.language==="zh"?u.jsx("button",{onClick:()=>x(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":s("wechat.label"),children:u.jsx(Ev,{className:"h-5 w-5"})}):u.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":s("discord.label"),children:u.jsx(Cv,{className:"h-5 w-5"})}),u.jsx("button",{onClick:()=>f(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":s("sponsor.label"),children:u.jsx(Nv,{className:"h-5 w-5"})}),u.jsx(xg,{})]})]}),u.jsx(kv,{open:d,onOpenChange:f}),u.jsx(Tv,{open:h,onOpenChange:x})]})},Rv="https://registry.npmjs.org",Ov="@samanhappy/mcphub",yg=async()=>{try{const l=await fetch(`${Rv}/${Ov}/latest`);if(!l.ok)throw new Error(`Failed to fetch latest version: ${l.status}`);return(await l.json()).version||null}catch(l){return console.error("Error checking for latest version:",l),null}},bg=(l,s)=>{if(l==="dev")return-1;const r=l.split(".").map(Number),o=s.split(".").map(Number);for(let d=0;d<3;d++){const f=r[d]||0,h=o[d]||0;if(f>h)return-1;if(f<h)return 1}return 0},Mv=({isOpen:l,onClose:s,version:r})=>{const{t:o}=ke(),[d,f]=w.useState(!1),[h,x]=w.useState(""),[m,g]=w.useState(!1),y=async()=>{g(!0);try{const S=await yg();S&&(x(S),f(bg(r,S)>0))}catch(S){console.error("Failed to check for updates:",S)}finally{g(!1)}};return w.useEffect(()=>{l&&y()},[l,r]),l?u.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6 relative",children:[u.jsx("button",{onClick:s,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":o("common.close"),children:u.jsx(hs,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("about.title")}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[o("about.currentVersion"),":"]}),u.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:r})]}),d&&h&&u.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:u.jsxs("div",{className:"flex items-start",children:[u.jsx("div",{className:"flex-shrink-0",children:u.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[u.jsx("p",{children:o("about.newVersionAvailable",{version:h})}),u.jsx("p",{className:"mt-1",children:u.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:o("about.viewOnGitHub")})})]})]})}),u.jsxs("button",{onClick:y,disabled:m,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
|
|
167
|
-
${m?"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:[u.jsx(db,{className:`h-4 w-4 mr-2 ${m?"animate-spin":""}`}),o(m?"about.checking":"about.checkForUpdates")]})]})]})})}):null},zv=({collapsed:l,version:s})=>{var k;const{t:r}=ke(),o=dn(),{auth:d,logout:f}=Zr(),[h,x]=w.useState(!1),[m,g]=w.useState(!1),[y,S]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{(async()=>{try{const E=await yg();E&&g(bg(s,E)>0)}catch(E){console.error("Error checking for new version:",E)}})()},[s]),w.useEffect(()=>{const A=E=>{v.current&&!v.current.contains(E.target)&&x(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[]);const M=()=>{o("/settings"),x(!1)},N=()=>{f(),o("/login")},j=()=>{S(!0),x(!1)};return u.jsxs("div",{ref:v,className:"relative",children:[u.jsxs("button",{onClick:()=>x(!h),className:`flex ${l?"justify-center":"items-center"} w-full p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors rounded-md ${h?"bg-gray-100 dark:bg-gray-700":""}`,children:[u.jsxs("div",{className:"flex-shrink-0 relative",children:[u.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:u.jsx(vb,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),m&&u.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!l&&u.jsx("div",{className:"ml-3 flex flex-col items-start",children:u.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((k=d.user)==null?void 0:k.username)||r("auth.user")})})]}),h&&u.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:[u.jsxs("button",{onClick:M,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:[u.jsx(hb,{className:"h-4 w-4 mr-2"}),r("nav.settings")]}),u.jsxs("button",{onClick:j,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:[u.jsx(tb,{className:"h-4 w-4 mr-2"}),r("about.title"),m&&u.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),u.jsxs("button",{onClick:N,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:[u.jsx(sb,{className:"h-4 w-4 mr-2"}),r("app.logout")]})]}),u.jsx(Mv,{isOpen:y,onClose:()=>S(!1),version:s})]})},Dv=({collapsed:l})=>{const{t:s}=ke();Jt();const r="0.7.6",o=[{path:"/",label:s("nav.dashboard"),icon:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[u.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),u.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:s("nav.servers"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"})})},{path:"/groups",label:s("nav.groups"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{d:"M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"})})},{path:"/market",label:s("nav.market"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})})},{path:"/logs",label:s("nav.logs"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"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 u.jsxs("aside",{className:`bg-white dark:bg-gray-800 shadow-sm transition-all duration-300 ease-in-out flex flex-col h-full relative ${l?"w-16":"w-64"}`,children:[u.jsx("div",{className:"overflow-y-auto flex-grow",children:u.jsx("nav",{className:"p-3 space-y-1",children:o.map(d=>u.jsxs(Ym,{to:d.path,className:({isActive:f})=>`flex items-center px-3 py-2 rounded-md transition-colors ${f?"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:d.path==="/",children:[u.jsx("span",{className:"flex-shrink-0",children:d.icon}),!l&&u.jsx("span",{className:"ml-3",children:d.label})]},d.path))})}),u.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:u.jsx(zv,{collapsed:l,version:r})})]})},Uv=({children:l})=>u.jsx("main",{className:"flex-1 overflow-auto p-6 bg-gray-100 dark:bg-gray-900",children:u.jsx("div",{className:"container mx-auto",children:l})}),Lv=()=>{const[l,s]=wu.useState(!1),r=()=>{s(!l)};return u.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[u.jsx(Av,{onToggleSidebar:r}),u.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[u.jsx(Dv,{collapsed:l}),u.jsx(Uv,{children:u.jsx(Hm,{})})]})]})},_v=({redirectPath:l="/login"})=>{const{t:s}=ke(),{auth:r}=Zr();return r.loading?u.jsx("div",{className:"flex items-center justify-center h-screen",children:s("app.loading")}):r.isAuthenticated?u.jsx(Hm,{}):u.jsx(_m,{to:l,replace:!0})},Hv=()=>{const{t:l}=ke(),[s,r]=w.useState(""),[o,d]=w.useState(""),[f,h]=w.useState(null),[x,m]=w.useState(!1),{login:g}=Zr(),y=dn(),S=async v=>{v.preventDefault(),h(null),m(!0);try{if(!s||!o){h(l("auth.emptyFields")),m(!1);return}await g(s,o)?y("/"):h(l("auth.loginFailed"))}catch{h(l("auth.loginError"))}finally{m(!1)}};return u.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:[u.jsx("div",{className:"absolute top-4 right-4",children:u.jsx(xg,{})}),u.jsxs("div",{className:"max-w-md w-full space-y-8",children:[u.jsx("div",{children:u.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white",children:l("auth.loginTitle")})}),u.jsxs("form",{className:"mt-8 space-y-6",onSubmit:S,children:[u.jsxs("div",{className:"rounded-md shadow-sm -space-y-px",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"username",className:"sr-only",children:l("auth.username")}),u.jsx("input",{id:"username",name:"username",type:"text",autoComplete:"username",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 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:l("auth.username"),value:s,onChange:v=>r(v.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"sr-only",children:l("auth.password")}),u.jsx("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 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:l("auth.password"),value:o,onChange:v=>d(v.target.value)})]})]}),f&&u.jsx("div",{className:"text-red-500 dark:text-red-400 text-sm text-center",children:f}),u.jsx("div",{children:u.jsx("button",{type:"submit",disabled:x,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:l(x?"auth.loggingIn":"auth.login")})})]})]})]})},Lr={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},ys=()=>{const{t:l}=ke(),[s,r]=w.useState([]),[o,d]=w.useState(null),[f,h]=w.useState(0),[x,m]=w.useState(!0),[g,y]=w.useState(0),S=w.useRef(null),v=w.useRef(0),M=()=>{S.current&&(clearInterval(S.current),S.current=null)},N=w.useCallback(()=>{M();const D=async()=>{try{const U=localStorage.getItem("mcphub_token"),$=await(await fetch(je("/servers"),{headers:{"x-auth-token":U||""}})).json();$&&$.success&&Array.isArray($.data)?r($.data):$&&Array.isArray($)?r($):(console.error("Invalid server data format:",$),r([])),d(null)}catch(U){console.error("Error fetching servers during normal polling:",U),navigator.onLine?U instanceof TypeError&&(U.message.includes("NetworkError")||U.message.includes("Failed to fetch"))?d(l("errors.serverConnection")):d(l("errors.serverFetch")):d(l("errors.network"))}};D(),S.current=setInterval(D,Lr.normal.pollingInterval)},[l]);return w.useEffect(()=>{f>0&&(v.current=0,y(0));const D=async()=>{try{const U=localStorage.getItem("mcphub_token"),$=await(await fetch(je("/servers"),{headers:{"x-auth-token":U||""}})).json();return $&&$.success&&Array.isArray($.data)?(r($.data),m(!1),N(),!0):$&&Array.isArray($)?(r($),m(!1),N(),!0):(console.error("Invalid server data format:",$),r([]),m(!1),N(),!0)}catch(U){return v.current+=1,console.error(`Initial loading attempt ${v.current} failed:`,U),y(v.current),navigator.onLine?d(l("errors.initialStartup")):d(l("errors.network")),v.current>=Lr.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),m(!1),M(),N()),!1}};return x?(M(),D(),S.current=setInterval(D,Lr.startup.pollingInterval),console.log(`Started initial polling with interval: ${Lr.startup.pollingInterval}ms`)):N(),()=>{M()}},[f,l,x,N]),{servers:s,error:o,setError:d,isLoading:x,fetchAttempts:g,triggerRefresh:()=>{M(),x&&(m(!0),v.current=0,y(0)),h(D=>D+1)},handleServerAdd:()=>{h(D=>D+1)},handleServerEdit:async D=>{try{const U=localStorage.getItem("mcphub_token"),$=await(await fetch(je("/settings"),{headers:{"x-auth-token":U||""}})).json();if($&&$.success&&$.data&&$.data.mcpServers&&$.data.mcpServers[D.name]){const G=$.data.mcpServers[D.name];return{name:D.name,status:D.status,tools:D.tools||[],config:G}}else return console.error("Failed to get server config from settings:",$),d(l("server.invalidConfig",{serverName:D.name})),null}catch(U){return console.error("Error fetching server settings:",U),d(U instanceof Error?U.message:String(U)),null}},handleServerRemove:async D=>{try{const U=localStorage.getItem("mcphub_token"),ne=await fetch(je(`/servers/${D}`),{method:"DELETE",headers:{"x-auth-token":U||""}}),$=await ne.json();return ne.ok?(h(G=>G+1),!0):(d($.message||l("server.deleteError",{serverName:D})),!1)}catch(U){return d(l("errors.general")+": "+(U instanceof Error?U.message:String(U))),!1}},handleServerToggle:async(D,U)=>{try{const ne=localStorage.getItem("mcphub_token"),$=await fetch(je(`/servers/${D.name}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":ne||""},body:JSON.stringify({enabled:U})}),G=await $.json();return $.ok?(h(P=>P+1),!0):(console.error("Failed to toggle server:",G),d(l("server.toggleError",{serverName:D.name})),!1)}catch(ne){return console.error("Error toggling server:",ne),d(ne instanceof Error?ne.message:String(ne)),!1}}}},Bv=()=>{const{t:l}=ke(),{servers:s,error:r,setError:o,isLoading:d}=ys(),f={total:s.length,online:s.filter(m=>m.status==="connected").length,offline:s.filter(m=>m.status==="disconnected").length,connecting:s.filter(m=>m.status==="connecting").length},h={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"},x=m=>s.length===0?0:Math.round(s.filter(g=>g.status===m).length/s.length*100);return u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:l("pages.dashboard.title")}),r&&u.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-red-600 text-lg font-medium",children:l("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:r})]}),u.jsx("button",{onClick:()=>o(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("app.closeButton"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 111.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),d?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):u.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[u.jsx("div",{className:"bg-white rounded-lg shadow p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.totalServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.total})]})]})}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.onlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.online})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-green-500 rounded-full",style:{width:`${x("connected")}%`}})})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.offlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.offline})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-red-500 rounded-full",style:{width:`${x("disconnected")}%`}})})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.connectingServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.connecting})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-yellow-500 rounded-full",style:{width:`${x("connecting")}%`}})})]})]}),s.length>0&&!d&&u.jsxs("div",{className:"mt-8",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:l("pages.dashboard.recentServers")}),u.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.name")}),u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.status")}),u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.tools")}),u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.enabled")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.slice(0,5).map((m,g)=>{var y;return u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:m.name}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${m.status==="connected"?"bg-green-100 text-green-800":m.status==="disconnected"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:l(h[m.status]||m.status)})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((y=m.tools)==null?void 0:y.length)||0}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:m.enabled!==!1?u.jsx("span",{className:"text-green-600",children:"✓"}):u.jsx("span",{className:"text-red-600",children:"✗"})})]},g)})})]})})]})]})},qv="modulepreload",Gv=function(l,s){return new URL(l,s).href},im={},Vv=function(s,r,o){let d=Promise.resolve();if(r&&r.length>0){let h=function(y){return Promise.all(y.map(S=>Promise.resolve(S).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const x=document.getElementsByTagName("link"),m=document.querySelector("meta[property=csp-nonce]"),g=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));d=h(r.map(y=>{if(y=Gv(y,o),y in im)return;im[y]=!0;const S=y.endsWith(".css"),v=S?'[rel="stylesheet"]':"";if(!!o)for(let j=x.length-1;j>=0;j--){const k=x[j];if(k.href===y&&(!S||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${v}`))return;const N=document.createElement("link");if(N.rel=S?"stylesheet":qv,S||(N.as="script"),N.crossOrigin="",N.href=y,g&&N.setAttribute("nonce",g),document.head.appendChild(N),S)return new Promise((j,k)=>{N.addEventListener("load",j),N.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${y}`)))})}))}function f(h){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=h,window.dispatchEvent(x),!x.defaultPrevented)throw h}return d.then(h=>{for(const x of h||[])x.status==="rejected"&&f(x.reason);return s().catch(f)})},$v={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 _r({children:l,variant:s="default",className:r,onClick:o}){return u.jsx("span",{className:qa("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",$v[s],o?"cursor-pointer":"",r),onClick:o,children:l})}const Yv=({status:l})=>{const{t:s}=ke(),r={connecting:"bg-yellow-100 text-yellow-800",connected:"bg-green-100 text-green-800",disconnected:"bg-red-100 text-red-800"},o={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"};return u.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${r[l]}`,children:s(o[l]||l)})},vg=async(l,s)=>{try{const r=Ga();if(!r)throw new Error("Authentication token not found. Please log in.");const o=s?`/tools/call/${s}`:"/tools/call",d=await fetch(je(o),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":r,Authorization:`Bearer ${r}`},body:JSON.stringify({toolName:l.toolName,arguments:l.arguments})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return f.success?{success:!0,content:f.data.content||[]}:{success:!1,error:f.message||"Tool call failed"}}catch(r){return console.error("Error calling tool:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}},Kv=async(l,s,r)=>{try{const o=Ga();if(!o)throw new Error("Authentication token not found. Please log in.");const d=await fetch(je(`/servers/${l}/tools/${s}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":o,Authorization:`Bearer ${o}`},body:JSON.stringify({enabled:r})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return{success:f.success,error:f.success?void 0:f.message}}catch(o){return console.error("Error toggling tool:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error occurred"}}},wg=async(l,s,r)=>{try{const o=Ga();if(!o)throw new Error("Authentication token not found. Please log in.");const d=await fetch(je(`/servers/${l}/tools/${s}/description`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":o,Authorization:`Bearer ${o}`},body:JSON.stringify({description:r})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return{success:f.success,error:f.success?void 0:f.message}}catch(o){return console.error("Error updating tool description:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error occurred"}}},Qv=Object.freeze(Object.defineProperty({__proto__:null,callTool:vg,toggleTool:Kv,updateToolDescription:wg},Symbol.toStringTag,{value:"Module"})),Xv=({value:l,isSelected:s,onClick:r,children:o})=>u.jsxs("button",{type:"button",role:"checkbox","aria-checked":s,className:qa("flex w-full items-center justify-between p-2 rounded transition-colors cursor-pointer",s?"bg-blue-50 text-blue-700 hover:bg-blue-100 border-l-4 border-blue-500":"hover:bg-gray-50 text-gray-700"),onClick:r,children:[u.jsx("span",{className:"flex items-center",children:o}),s&&u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5 text-blue-500",children:u.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]}),Sg=({label:l,helpText:s,noOptionsText:r="No options available",values:o,options:d,onChange:f,className:h})=>{const x=m=>{const g=o.includes(m);f(g?o.filter(y=>y!==m):[...o,m])};return u.jsxs("div",{className:h,children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:l}),u.jsx("div",{className:"border rounded shadow max-h-60 overflow-y-auto",children:d.length===0?u.jsx("p",{className:"text-gray-500 text-sm p-3",children:r}):u.jsx("div",{className:"space-y-1 p-1",children:d.map(m=>u.jsx(Xv,{value:m.value,isSelected:o.includes(m.value),onClick:()=>x(m.value),children:m.label},m.value))})}),s&&u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:s})]})},cs=({checked:l,onCheckedChange:s,disabled:r=!1})=>u.jsx("button",{type:"button",role:"switch","aria-checked":l,disabled:r,className:qa("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",l?"bg-blue-600":"bg-gray-200",r?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>!r&&s(!l),children:u.jsx("span",{className:qa("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",l?"translate-x-6":"translate-x-1")})}),Zv=({schema:l,onSubmit:s,onCancel:r,loading:o=!1,storageKey:d})=>{const{t:f}=ke(),[h,x]=w.useState({}),[m,g]=w.useState({}),y=w.useMemo(()=>(k=>{const A=E=>{if(typeof E=="object"&&E!==null){const O=E;return{type:O.type||"string",description:O.description,enum:O.enum,default:O.default,properties:O.properties?Object.fromEntries(Object.entries(O.properties).map(([D,U])=>[D,A(U)])):void 0,required:O.required,items:O.items?A(O.items):void 0}}return{type:"string"}};return{type:k.type,properties:k.properties?Object.fromEntries(Object.entries(k.properties).map(([E,O])=>[E,A(O)])):void 0,required:k.required}})(l),[l]);w.useEffect(()=>{const j=(A,E="")=>{const O={};return A.type==="object"&&A.properties&&Object.entries(A.properties).forEach(([D,U])=>{const ne=E?`${E}.${D}`:D;U.default!==void 0?O[D]=U.default:U.type==="string"?O[D]="":U.type==="number"||U.type==="integer"?O[D]=0:U.type==="boolean"?O[D]=!1:U.type==="array"?O[D]=[]:U.type==="object"&&(O[D]=j(U,ne))}),O};let k=j(y);if(d)try{const A=localStorage.getItem(d);if(A){const E=JSON.parse(A);k={...k,...E}}}catch(A){console.warn("Failed to load saved form data:",A)}x(k)},[y,d]);const S=(j,k)=>{x(A=>{const E={...A},O=j.split(".");let D=E;for(let U=0;U<O.length-1;U++)D[O[U]]||(D[O[U]]={}),D=D[O[U]];if(D[O[O.length-1]]=k,d)try{localStorage.setItem(d,JSON.stringify(E))}catch(U){console.warn("Failed to save form data to localStorage:",U)}return E}),m[j]&&g(A=>{const E={...A};return delete E[j],E})},v=()=>{const j={},k=(A,E,O="")=>{A.type==="object"&&A.properties&&Object.entries(A.properties).forEach(([D,U])=>{var G;const ne=O?`${O}.${D}`:D,$=E==null?void 0:E[D];if((G=A.required)!=null&&G.includes(D)&&($==null||$==="")){j[ne]=`${D} is required`;return}$!=null&&$!==""&&(U.type==="string"&&typeof $!="string"?j[ne]=`${D} must be a string`:U.type==="number"&&typeof $!="number"?j[ne]=`${D} must be a number`:U.type==="integer"&&(!Number.isInteger($)||typeof $!="number")?j[ne]=`${D} must be an integer`:U.type==="boolean"&&typeof $!="boolean"?j[ne]=`${D} must be a boolean`:U.type==="object"&&typeof $=="object"&&k(U,$,ne))})};return k(y,h),g(j),Object.keys(j).length===0},M=j=>{j.preventDefault(),v()&&s(h)},N=(j,k,A="")=>{var U,ne,$,G,P;const E=A?`${A}.${j}`:j,O=h[j],D=m[E];return k.type==="string"?k.enum?u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[j,((U=y.required)==null?void 0:U.includes(j))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),k.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:k.description}),u.jsxs("select",{value:O||"",onChange:J=>S(E,J.target.value),className:`w-full border rounded-md px-3 py-2 ${D?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[u.jsx("option",{value:"",children:f("tool.selectOption")}),k.enum.map((J,le)=>u.jsx("option",{value:J,children:J},le))]}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},E):u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[j,((ne=y.required)==null?void 0:ne.includes(j))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),k.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:k.description}),u.jsx("input",{type:"text",value:O||"",onChange:J=>S(E,J.target.value),className:`w-full border rounded-md px-3 py-2 ${D?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},E):k.type==="number"||k.type==="integer"?u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[j,(($=y.required)==null?void 0:$.includes(j))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),k.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:k.description}),u.jsx("input",{type:"number",step:k.type==="integer"?"1":"any",value:O||"",onChange:J=>{const le=J.target.value===""?"":k.type==="integer"?parseInt(J.target.value):parseFloat(J.target.value);S(E,le)},className:`w-full border rounded-md px-3 py-2 ${D?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},E):k.type==="boolean"?u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("input",{type:"checkbox",checked:O||!1,onChange:J=>S(E,J.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),u.jsxs("label",{className:"ml-2 block text-sm text-gray-700",children:[j,((G=y.required)==null?void 0:G.includes(j))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})]}),k.description&&u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:k.description}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},E):u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[j,((P=y.required)==null?void 0:P.includes(j))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"}),u.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",k.type,")"]})]}),k.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:k.description}),u.jsx("input",{type:"text",value:O||"",onChange:J=>S(E,J.target.value),placeholder:f("tool.enterValue",{type:k.type}),className:`w-full border rounded-md px-3 py-2 ${D?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},E)};return y.properties?u.jsxs("form",{onSubmit:M,className:"space-y-4",children:[Object.entries(y.properties||{}).map(([j,k])=>N(j,k)),u.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:f("tool.cancel")}),u.jsx("button",{type:"submit",disabled:o,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:f(o?"tool.running":"tool.runTool")})]})]}):u.jsxs("div",{className:"p-4 bg-gray-50 rounded-md",children:[u.jsx("p",{className:"text-sm text-gray-600",children:f("tool.noParameters")}),u.jsxs("div",{className:"flex justify-end space-x-2 mt-4",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:f("tool.cancel")}),u.jsx("button",{onClick:()=>s({}),disabled:o,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:f(o?"tool.running":"tool.runTool")})]})]})},Pv=({result:l,onClose:s})=>{const{t:r}=ke(),o=l.content,d=h=>Array.isArray(h)?h.map((x,m)=>u.jsx("div",{className:"mb-3 last:mb-0",children:f(x)},m)):f(h),f=h=>{if(typeof h=="string")return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:h})});if(typeof h=="object"&&h!==null){if(h.type==="text"&&h.text)return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:h.text})});if(h.type==="image"&&h.data)return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("img",{src:`data:${h.mimeType||"image/png"};base64,${h.data}`,alt:r("tool.toolResult"),className:"max-w-full h-auto rounded-md"})});try{const x=typeof h=="string"?h:JSON.stringify(h,null,2),m=typeof h=="string"?JSON.parse(h):h;return u.jsxs("div",{className:"bg-gray-50 rounded-md p-3",children:[u.jsx("div",{className:"text-xs text-gray-500 mb-2",children:r("tool.jsonResponse")}),u.jsx("pre",{className:"text-sm text-gray-800 overflow-auto",children:JSON.stringify(m,null,2)})]})}catch{return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(h)})})}}return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(h)})})};return u.jsxs("div",{className:"border border-gray-300 rounded-lg bg-white shadow-sm",children:[u.jsx("div",{className:"border-b border-gray-300 px-4 py-3 bg-gray-50 rounded-t-lg",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[l.success?u.jsx(Jy,{size:20,className:"text-green-500"}):u.jsx(Wy,{size:20,className:"text-red-500"}),u.jsx("div",{children:u.jsxs("h4",{className:"text-sm font-medium text-gray-900",children:[r("tool.execution")," ",l.success?r("tool.successful"):r("tool.failed")]})})]}),u.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 text-sm",children:"✕"})]})}),u.jsx("div",{className:"p-4",children:l.success?u.jsx("div",{children:l.content&&l.content.length>0?u.jsxs("div",{children:[u.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.result")}),d(l.content)]}):u.jsx("div",{className:"text-sm text-gray-500 italic",children:r("tool.noContent")})}):u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[u.jsx(Wm,{size:16,className:"text-red-500"}),u.jsx("span",{className:"text-sm font-medium text-red-700",children:r("tool.error")})]}),o&&o.length>0?u.jsxs("div",{children:[u.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.errorDetails")}),d(o)]}):u.jsx("div",{className:"bg-red-50 border border-red-300 rounded-md p-3",children:u.jsx("pre",{className:"text-sm text-red-800 whitespace-pre-wrap",children:l.error||l.message||r("tool.unknownError")})})]})})]})},Jv=({tool:l,server:s,onToggle:r,onDescriptionUpdate:o})=>{const{t:d}=ke(),[f,h]=w.useState(!1),[x,m]=w.useState(!1),[g,y]=w.useState(!1),[S,v]=w.useState(null),[M,N]=w.useState(!1),[j,k]=w.useState(l.description||""),A=w.useRef(null),E=w.useRef(null),[O,D]=w.useState(0);w.useEffect(()=>{M&&A.current&&(A.current.focus(),O>0&&(A.current.style.width=`${O+20}px`))},[M,O]),w.useEffect(()=>{!M&&E.current&&D(E.current.offsetWidth)},[M,j]);const U=w.useCallback(()=>`mcphub_tool_form_${s?`${s}_`:""}${l.name}`,[l.name,s]),ne=w.useCallback(()=>{localStorage.removeItem(U())},[U]),$=I=>{r&&r(l.name,I)},G=()=>{N(!0)},P=async()=>{try{const I=await wg(s,l.name,j);I.success?(N(!1),o&&o(l.name,j)):(k(l.description||""),console.error("Failed to update tool description:",I.error))}catch(I){console.error("Error updating tool description:",I),k(l.description||""),N(!1)}},J=I=>{k(I.target.value)},le=I=>{I.key==="Enter"?P():I.key==="Escape"&&(k(l.description||""),N(!1))},te=async I=>{y(!0);try{const H=await vg({toolName:l.name,arguments:I},s);v(H)}catch(H){v({success:!1,error:H instanceof Error?H.message:"Unknown error occurred"})}finally{y(!1)}},se=()=>{m(!1),ne(),v(null)},oe=()=>{v(null)};return u.jsxs("div",{className:"bg-white border border-gray-300 shadow rounded-lg p-4 mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>h(!f),children:[u.jsx("div",{className:"flex-1",children:u.jsxs("h3",{className:"text-lg font-medium text-gray-900",children:[l.name.replace(s+"-",""),u.jsx("span",{className:"ml-2 text-sm font-normal text-gray-600 inline-flex items-center",children:M?u.jsxs(u.Fragment,{children:[u.jsx("input",{ref:A,type:"text",className:"px-2 py-1 border border-blue-300 rounded bg-white text-sm",value:j,onChange:J,onKeyDown:le,onClick:I=>I.stopPropagation(),style:{minWidth:"100px",width:O>0?`${O+20}px`:"auto"}}),u.jsx("button",{className:"ml-2 p-1 text-green-600 hover:text-green-800",onClick:I=>{I.stopPropagation(),P()},children:u.jsx(Pr,{size:16})})]}):u.jsxs(u.Fragment,{children:[u.jsx("span",{ref:E,children:j||d("tool.noDescription")}),u.jsx("button",{className:"ml-2 p-1 text-gray-500 hover:text-blue-600 transition-colors",onClick:I=>{I.stopPropagation(),G()},children:u.jsx(eg,{size:14})})]})})]})}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("div",{className:"flex items-center space-x-2",onClick:I=>I.stopPropagation(),children:u.jsx(cs,{checked:l.enabled??!0,onCheckedChange:$,disabled:g})}),u.jsxs("button",{onClick:I=>{I.stopPropagation(),h(!0),m(!0)},className:"flex items-center space-x-1 px-3 py-1 text-sm text-blue-600 bg-blue-50 hover:bg-blue-100 rounded-md transition-colors",disabled:g||!l.enabled,children:[g?u.jsx(nb,{size:14,className:"animate-spin"}):u.jsx(ub,{size:14}),u.jsx("span",{children:d(g?"tool.running":"tool.run")})]}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:f?u.jsx(Jm,{size:18}):u.jsx(Fm,{size:18})})]})]}),f&&u.jsxs("div",{className:"mt-4 space-y-4",children:[!x&&u.jsxs("div",{className:"bg-gray-50 rounded p-3 border border-gray-300",children:[u.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:d("tool.inputSchema")}),u.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(l.inputSchema,null,2)})]}),x&&u.jsxs("div",{className:"border border-gray-300 rounded-lg p-4 bg-blue-50",children:[u.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:d("tool.runToolWithName",{name:l.name.replace(s+"-","")})}),u.jsx(Zv,{schema:l.inputSchema||{type:"object"},onSubmit:te,onCancel:se,loading:g,storageKey:U()}),S&&u.jsx("div",{className:"mt-4",children:u.jsx(Pv,{result:S,onClose:oe})})]})]})]})},jg=({isOpen:l,onClose:s,onConfirm:r,serverName:o,isGroup:d=!1})=>{const{t:f}=ke();return l?u.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:f(d?"groups.confirmDelete":"server.confirmDelete")}),u.jsx("p",{className:"text-gray-500 mb-6",children:d?f("groups.deleteWarning",{name:o}):f("server.deleteWarning",{name:o})}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{onClick:s,className:"px-4 py-2 text-gray-600 hover:text-gray-800",children:f("common.cancel")}),u.jsx("button",{onClick:r,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:f("common.delete")})]})]})})}):null},Fv=({server:l,onRemove:s,onEdit:r,onToggle:o,onRefresh:d})=>{var P;const{t:f}=ke(),{showToast:h}=xs(),[x,m]=w.useState(!1),[g,y]=w.useState(!1),[S,v]=w.useState(!1),[M,N]=w.useState(!1),[j,k]=w.useState(!1),A=w.useRef(null);w.useEffect(()=>{const J=le=>{A.current&&!A.current.contains(le.target)&&N(!1)};return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[]);const E=J=>{J.stopPropagation(),y(!0)},O=J=>{J.stopPropagation(),r(l)},D=async J=>{if(J.stopPropagation(),!(S||!o)){v(!0);try{await o(l,l.enabled===!1)}finally{v(!1)}}},U=J=>{J.stopPropagation(),N(!M)},ne=J=>{if(J.stopPropagation(),!!l.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(l.error).then(()=>{k(!0),h(f("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>k(!1),2e3)});else{const le=document.createElement("textarea");le.value=l.error,le.style.position="fixed",le.style.left="-9999px",document.body.appendChild(le),le.focus(),le.select();try{document.execCommand("copy"),k(!0),h(f("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>k(!1),2e3)}catch(te){h(f("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",te)}document.body.removeChild(le)}},$=()=>{s(l.name),y(!1)},G=async(J,le)=>{try{const{toggleTool:te}=await Vv(async()=>{const{toggleTool:oe}=await Promise.resolve().then(()=>Qv);return{toggleTool:oe}},[],import.meta.url),se=await te(l.name,J,le);se.success?(h(f(le?"tool.enableSuccess":"tool.disableSuccess",{name:J}),"success"),d&&d()):h(se.error||f("tool.toggleFailed"),"error")}catch(te){console.error("Error toggling tool:",te),h(f("tool.toggleFailed"),"error")}};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 ${l.enabled===!1?"opacity-60":""}`,children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>m(!x),children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("h2",{className:`text-xl font-semibold ${l.enabled===!1?"text-gray-600":"text-gray-900"}`,children:l.name}),u.jsx(Yv,{status:l.status}),u.jsxs("div",{className:"flex items-center px-2 py-1 bg-blue-50 text-blue-700 rounded-full text-sm",children:[u.jsx("svg",{className:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:u.jsx("path",{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"})}),u.jsxs("span",{children:[((P=l.tools)==null?void 0:P.length)||0," ",f("server.tools")]})]}),l.error&&u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"cursor-pointer",onClick:U,"aria-label":f("server.viewErrorDetails"),children:u.jsx(Wm,{className:"text-red-500 hover:text-red-600",size:18})}),M&&u.jsxs("div",{ref:A,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:J=>J.stopPropagation(),children:[u.jsxs("div",{className:"flex justify-between items-center sticky top-0 bg-white py-2 px-4 border-b border-gray-200 z-20 shadow-sm",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("h4",{className:"text-sm font-medium text-red-600",children:f("server.errorDetails")}),u.jsx("button",{onClick:ne,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:f("common.copy"),children:j?u.jsx(Pr,{size:14,className:"text-green-500"}):u.jsx(Im,{size:14})})]}),u.jsx("button",{onClick:J=>{J.stopPropagation(),N(!1)},className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),u.jsx("div",{className:"p-4 pt-2",children:u.jsx("pre",{className:"text-sm text-gray-700 break-words whitespace-pre-wrap",children:l.error})})]})]})]}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx("button",{onClick:O,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm",children:f("server.edit")}),u.jsx("div",{className:"flex items-center",children:u.jsx("button",{onClick:D,className:`px-3 py-1 text-sm rounded transition-colors ${S?"bg-gray-200 text-gray-500":l.enabled!==!1?"bg-green-100 text-green-800 hover:bg-green-200":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,disabled:S,children:S?f("common.processing"):l.enabled!==!1?f("server.disable"):f("server.enable")})}),u.jsx("button",{onClick:E,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:f("server.delete")}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:x?u.jsx(Jm,{size:18}):u.jsx(Fm,{size:18})})]})]}),x&&l.tools&&u.jsxs("div",{className:"mt-6",children:[u.jsx("h6",{className:`font-medium ${l.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:f("server.tools")}),u.jsx("div",{className:"space-y-4",children:l.tools.map((J,le)=>u.jsx(Jv,{server:l.name,tool:J,onToggle:G},le))})]})]}),u.jsx(jg,{isOpen:g,onClose:()=>y(!1),onConfirm:$,serverName:l.name})]})},Vu=({onSubmit:l,onCancel:s,initialData:r=null,modalTitle:o,formError:d=null})=>{const{t:f}=ke(),h=()=>!r||!r.config?"stdio":r.config.type?r.config.type:r.config.url?"sse":"stdio",[x,m]=w.useState(h()),[g,y]=w.useState({name:r&&r.name||"",url:r&&r.config&&r.config.url||"",command:r&&r.config&&r.config.command||"",arguments:r&&r.config&&r.config.args?Array.isArray(r.config.args)?r.config.args.join(" "):String(r.config.args):"",args:r&&r.config&&r.config.args||[],type:h(),env:[],headers:[]}),[S,v]=w.useState(r&&r.config&&r.config.env?Object.entries(r.config.env).map(([te,se])=>({key:te,value:se})):[]),[M,N]=w.useState(r&&r.config&&r.config.headers?Object.entries(r.config.headers).map(([te,se])=>({key:te,value:se})):[]),[j,k]=w.useState(null),A=!!r,E=te=>{const{name:se,value:oe}=te.target;y({...g,[se]:oe})},O=te=>{let se=te.split(" ").filter(oe=>oe.trim()!=="");y({...g,arguments:te,args:se})},D=te=>{m(te),y(se=>({...se,type:te}))},U=(te,se,oe)=>{const I=[...S];I[te][se]=oe,v(I)},ne=()=>{v([...S,{key:"",value:""}])},$=te=>{const se=[...S];se.splice(te,1),v(se)},G=(te,se,oe)=>{const I=[...M];I[te][se]=oe,N(I)},P=()=>{N([...M,{key:"",value:""}])},J=te=>{const se=[...M];se.splice(te,1),N(se)},le=async te=>{te.preventDefault(),k(null);try{const se={};S.forEach(({key:H,value:W})=>{H.trim()&&(se[H.trim()]=W)});const oe={};M.forEach(({key:H,value:W})=>{H.trim()&&(oe[H.trim()]=W)});const I={name:g.name,config:{type:x,...x==="sse"||x==="streamable-http"?{url:g.url,...Object.keys(oe).length>0?{headers:oe}:{}}:{command:g.command,args:g.args,env:Object.keys(se).length>0?se:void 0}}};l(I)}catch(se){k(`Error: ${se instanceof Error?se.message:String(se)}`)}};return u.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-xl max-h-screen overflow-y-auto",children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:o}),u.jsx("button",{onClick:s,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(j||d)&&u.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:d||j}),u.jsxs("form",{onSubmit:le,children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:f("server.name")}),u.jsx("input",{type:"text",name:"name",id:"name",value:g.name,onChange:E,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:A})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:f("server.type")}),u.jsxs("div",{className:"flex space-x-4",children:[u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"command",name:"serverType",value:"command",checked:x==="stdio",onChange:()=>D("stdio"),className:"mr-1"}),u.jsx("label",{htmlFor:"command",children:"STDIO"})]}),u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"url",name:"serverType",value:"url",checked:x==="sse",onChange:()=>D("sse"),className:"mr-1"}),u.jsx("label",{htmlFor:"url",children:"SSE"})]}),u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"streamable-http",name:"serverType",value:"streamable-http",checked:x==="streamable-http",onChange:()=>D("streamable-http"),className:"mr-1"}),u.jsx("label",{htmlFor:"streamable-http",children:"Streamable HTTP"})]})]})]}),x==="sse"||x==="streamable-http"?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"url",children:f("server.url")}),u.jsx("input",{type:"url",name:"url",id:"url",value:g.url,onChange:E,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:x==="streamable-http"?"e.g.: http://localhost:3000/mcp":"e.g.: http://localhost:3000/sse",required:x==="sse"||x==="streamable-http"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center mb-2",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:f("server.headers")}),u.jsxs("button",{type:"button",onClick:P,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",f("server.add")]})]}),M.map((te,se)=>u.jsxs("div",{className:"flex items-center mb-2",children:[u.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[u.jsx("input",{type:"text",value:te.key,onChange:oe=>G(se,"key",oe.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:"Authorization"}),u.jsx("span",{className:"flex items-center",children:":"}),u.jsx("input",{type:"text",value:te.value,onChange:oe=>G(se,"value",oe.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:"Bearer token..."})]}),u.jsxs("button",{type:"button",onClick:()=>J(se),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:["- ",f("server.remove")]})]},se))]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"command",children:f("server.command")}),u.jsx("input",{type:"text",name:"command",id:"command",value:g.command,onChange:E,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:x==="stdio"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"arguments",children:f("server.arguments")}),u.jsx("input",{type:"text",name:"arguments",id:"arguments",value:g.arguments,onChange:te=>O(te.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:x==="stdio"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center mb-2",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:f("server.envVars")}),u.jsxs("button",{type:"button",onClick:ne,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",f("server.add")]})]}),S.map((te,se)=>u.jsxs("div",{className:"flex items-center mb-2",children:[u.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[u.jsx("input",{type:"text",value:te.key,onChange:oe=>U(se,"key",oe.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:f("server.key")}),u.jsx("span",{className:"flex items-center",children:":"}),u.jsx("input",{type:"text",value:te.value,onChange:oe=>U(se,"value",oe.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:f("server.value")})]}),u.jsxs("button",{type:"button",onClick:()=>$(se),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:["- ",f("server.remove")]})]},se))]})]}),u.jsxs("div",{className:"flex justify-end mt-6",children:[u.jsx("button",{type:"button",onClick:s,className:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-medium py-2 px-4 rounded mr-2",children:f("server.cancel")}),u.jsx("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:f(A?"server.save":"server.add")})]})]})]})},Wv=({onAdd:l})=>{const{t:s}=ke(),[r,o]=w.useState(!1),[d,f]=w.useState(null),h=()=>{o(!r),f(null)},x=async m=>{try{f(null);const g=localStorage.getItem("mcphub_token"),y=await fetch(je("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify(m)}),S=await y.json();if(!y.ok){S&&S.message?f(S.message):y.status===400?f(s("server.invalidData")):y.status===409?f(s("server.alreadyExists",{serverName:m.name})):f(s("server.addError"));return}o(!1),l()}catch(g){console.error("Error adding server:",g),navigator.onLine?g instanceof TypeError&&(g.message.includes("NetworkError")||g.message.includes("Failed to fetch"))?f(s("errors.serverConnection")):f(s("errors.serverAdd")):f(s("errors.network"))}};return u.jsxs("div",{children:[u.jsxs("button",{onClick:h,className:"w-full bg-blue-100 text-blue-800 rounded hover:bg-blue-200 py-2 px-4 flex items-center justify-center",children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})}),s("server.add")]}),r&&u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Vu,{onSubmit:x,onCancel:h,modalTitle:s("server.addServer"),formError:d})})]})},Iv=({server:l,onEdit:s,onCancel:r})=>{const{t:o}=ke(),[d,f]=w.useState(null),h=async x=>{try{f(null);const m=localStorage.getItem("mcphub_token"),g=await fetch(je(`/servers/${l.name}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":m||""},body:JSON.stringify(x)}),y=await g.json();if(!g.ok){y&&y.message?f(y.message):g.status===404?f(o("server.notFound",{serverName:l.name})):g.status===400?f(o("server.invalidData")):f(o("server.updateError",{serverName:l.name}));return}s()}catch(m){console.error("Error updating server:",m),navigator.onLine?m instanceof TypeError&&(m.message.includes("NetworkError")||m.message.includes("Failed to fetch"))?f(o("errors.serverConnection")):f(o("errors.serverUpdate",{serverName:l.name})):f(o("errors.network"))}};return u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Vu,{onSubmit:h,onCancel:r,initialData:l,modalTitle:o("server.editTitle",{serverName:l.name}),formError:d})})},e1=()=>{const{t:l}=ke(),s=dn(),{servers:r,error:o,setError:d,isLoading:f,handleServerAdd:h,handleServerEdit:x,handleServerRemove:m,handleServerToggle:g,triggerRefresh:y}=ys(),[S,v]=w.useState(null),[M,N]=w.useState(!1),j=async E=>{const O=await x(E);O&&v(O)},k=()=>{v(null),y()},A=async()=>{N(!0);try{y(),await new Promise(E=>setTimeout(E,500))}finally{N(!1)}};return u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between items-center mb-8",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:l("pages.servers.title")}),u.jsxs("div",{className:"flex space-x-4",children:[u.jsxs("button",{onClick:()=>s("/market"),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{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"})}),l("nav.market")]}),u.jsx(Wv,{onAdd:h}),u.jsxs("button",{onClick:A,disabled:M,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center ${M?"opacity-70 cursor-not-allowed":""}`,children:[M?u.jsxs("svg",{className:"animate-spin h-4 w-4 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})}),l("common.refresh")]})]})]}),o&&u.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-red-600 text-lg font-medium",children:l("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:o})]}),u.jsx("button",{onClick:()=>d(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("app.closeButton"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 111.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),f?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):r.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:l("app.noServers")})}):u.jsx("div",{className:"space-y-6",children:r.map((E,O)=>u.jsx(Fv,{server:E,onRemove:m,onEdit:j,onToggle:g,onRefresh:y},O))}),S&&u.jsx(Iv,{server:S,onEdit:k,onCancel:()=>v(null)})]})},$u=()=>{const{t:l}=ke(),[s,r]=w.useState([]),[o,d]=w.useState(!0),[f,h]=w.useState(null),[x,m]=w.useState(0),g=w.useCallback(async()=>{try{d(!0);const A=localStorage.getItem("mcphub_token"),E=await fetch(je("/groups"),{headers:{"x-auth-token":A||""}});if(!E.ok)throw new Error(`Status: ${E.status}`);const O=await E.json();O&&O.success&&Array.isArray(O.data)?r(O.data):(console.error("Invalid group data format:",O),r([])),h(null)}catch(A){console.error("Error fetching groups:",A),h(A instanceof Error?A.message:"Failed to fetch groups"),r([])}finally{d(!1)}},[]),y=w.useCallback(()=>{m(A=>A+1)},[]),S=async(A,E,O=[])=>{try{const D=localStorage.getItem("mcphub_token"),U=await fetch(je("/groups"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":D||""},body:JSON.stringify({name:A,description:E,servers:O})}),ne=await U.json();return U.ok?(y(),ne.data||null):(h(ne.message||l("groups.createError")),null)}catch(D){return h(D instanceof Error?D.message:"Failed to create group"),null}},v=async(A,E)=>{try{const O=localStorage.getItem("mcphub_token"),D=await fetch(je(`/groups/${A}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":O||""},body:JSON.stringify(E)}),U=await D.json();return D.ok?(y(),U.data||null):(h(U.message||l("groups.updateError")),null)}catch(O){return h(O instanceof Error?O.message:"Failed to update group"),null}},M=async(A,E)=>{try{const O=localStorage.getItem("mcphub_token"),D=await fetch(je(`/groups/${A}/servers/batch`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":O||""},body:JSON.stringify({servers:E})}),U=await D.json();return D.ok?(y(),U.data||null):(h(U.message||l("groups.updateError")),null)}catch(O){return h(O instanceof Error?O.message:"Failed to update group servers"),null}},N=async A=>{try{const E=localStorage.getItem("mcphub_token"),O=await fetch(je(`/groups/${A}`),{method:"DELETE",headers:{"x-auth-token":E||""}}),D=await O.json();return O.ok?(y(),!0):(h(D.message||l("groups.deleteError")),!1)}catch(E){return h(E instanceof Error?E.message:"Failed to delete group"),!1}},j=async(A,E)=>{try{const O=localStorage.getItem("mcphub_token"),D=await fetch(je(`/groups/${A}/servers`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":O||""},body:JSON.stringify({serverName:E})}),U=await D.json();return D.ok?(y(),U.data||null):(h(U.message||l("groups.serverAddError")),null)}catch(O){return h(O instanceof Error?O.message:"Failed to add server to group"),null}},k=async(A,E)=>{try{const O=localStorage.getItem("mcphub_token"),D=await fetch(je(`/groups/${A}/servers/${E}`),{method:"DELETE",headers:{"x-auth-token":O||""}}),U=await D.json();return D.ok?(y(),U.data||null):(h(U.message||l("groups.serverRemoveError")),null)}catch(O){return h(O instanceof Error?O.message:"Failed to remove server from group"),null}};return w.useEffect(()=>{g()},[g,x]),{groups:s,loading:o,error:f,setError:h,triggerRefresh:y,createGroup:S,updateGroup:v,updateGroupServers:M,deleteGroup:N,addServerToGroup:j,removeServerFromGroup:k}},t1=({onAdd:l,onCancel:s})=>{const{t:r}=ke(),{createGroup:o}=$u(),{servers:d}=ys(),[f,h]=w.useState([]),[x,m]=w.useState(null),[g,y]=w.useState(!1),[S,v]=w.useState({name:"",description:"",servers:[]});w.useEffect(()=>{h(d.filter(j=>j.enabled!==!1))},[d]);const M=j=>{const{name:k,value:A}=j.target;v(E=>({...E,[k]:A}))},N=async j=>{j.preventDefault(),y(!0),m(null);try{if(!S.name.trim()){m(r("groups.nameRequired")),y(!1);return}if(!await o(S.name,S.description,S.servers)){m(r("groups.createError")),y(!1);return}l()}catch(k){m(k instanceof Error?k.message:String(k)),y(!1)}};return u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:r("groups.addNew")}),x&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:x}),u.jsxs("form",{onSubmit:N,children:[u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[r("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:S.name,onChange:M,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:r("groups.namePlaceholder"),required:!0})]}),u.jsx(Sg,{className:"mb-6",label:r("groups.servers"),noOptionsText:r("groups.noServerOptions"),values:S.servers,options:f.map(j=>({value:j.name,label:j.name})),onChange:j=>v(k=>({...k,servers:j}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:g,children:r("common.cancel")}),u.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:g,children:r(g?"common.submitting":"common.create")})]})]})]})})})},a1=({group:l,onEdit:s,onCancel:r})=>{const{t:o}=ke(),{updateGroup:d}=$u(),{servers:f}=ys(),[h,x]=w.useState([]),[m,g]=w.useState(null),[y,S]=w.useState(!1),[v,M]=w.useState({name:l.name,description:l.description||"",servers:l.servers||[]});w.useEffect(()=>{x(f.filter(k=>k.enabled!==!1))},[f]);const N=k=>{const{name:A,value:E}=k.target;M(O=>({...O,[A]:E}))},j=async k=>{k.preventDefault(),S(!0),g(null);try{if(!v.name.trim()){g(o("groups.nameRequired")),S(!1);return}if(!await d(l.id,{name:v.name,description:v.description,servers:v.servers})){g(o("groups.updateError")),S(!1);return}s()}catch(A){g(A instanceof Error?A.message:String(A)),S(!1)}};return u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:o("groups.edit")}),m&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:m}),u.jsxs("form",{onSubmit:j,children:[u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[o("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:v.name,onChange:N,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:o("groups.namePlaceholder"),required:!0})]}),u.jsx(Sg,{className:"mb-6",label:o("groups.servers"),noOptionsText:o("groups.noServerOptions"),values:v.servers,options:h.map(k=>({value:k.name,label:k.name})),onChange:k=>M(A=>({...A,servers:k}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:y,children:o("common.cancel")}),u.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:y,children:o(y?"common.submitting":"common.save")})]})]})]})})})},n1=({group:l,servers:s,onEdit:r,onDelete:o})=>{const{t:d}=ke(),{showToast:f}=xs(),[h,x]=w.useState(!1),[m,g]=w.useState(!1),y=()=>{r(l)},S=()=>{x(!0)},v=()=>{o(l.id),x(!1)},M=()=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(l.id).then(()=>{g(!0),setTimeout(()=>g(!1),2e3)});else{const j=document.createElement("textarea");j.value=l.id,j.style.position="fixed",j.style.left="-9999px",document.body.appendChild(j),j.focus(),j.select();try{document.execCommand("copy"),g(!0),setTimeout(()=>g(!1),2e3)}catch(k){f(d("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",k)}document.body.removeChild(j)}},N=s.filter(j=>l.servers.includes(j.name));return u.jsxs("div",{className:"bg-white shadow rounded-lg p-6",children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:l.name}),u.jsxs("div",{className:"flex items-center ml-3",children:[u.jsx("span",{className:"text-xs text-gray-500 mr-1",children:l.id}),u.jsx("button",{onClick:M,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:d("common.copy"),children:m?u.jsx(Pr,{size:14,className:"text-green-500"}):u.jsx(Im,{size:14})})]})]}),l.description&&u.jsx("p",{className:"text-gray-600 text-sm mt-1",children:l.description})]}),u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("div",{className:"bg-blue-50 text-blue-700 px-3 py-1 rounded-full text-sm",children:d("groups.serverCount",{count:l.servers.length})}),u.jsx("button",{onClick:y,className:"text-gray-500 hover:text-gray-700",title:d("groups.edit"),children:u.jsx(eg,{size:18})}),u.jsx("button",{onClick:S,className:"text-gray-500 hover:text-red-600",title:d("groups.delete"),children:u.jsx(yb,{size:18})})]})]}),u.jsx("div",{className:"mt-4",children:N.length===0?u.jsx("p",{className:"text-gray-500 italic",children:d("groups.noServers")}):u.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:N.map(j=>u.jsxs("div",{className:"inline-flex items-center px-3 py-1 bg-gray-50 rounded",children:[u.jsx("span",{className:"font-medium text-gray-700 text-sm",children:j.name}),u.jsx("span",{className:`ml-2 inline-block h-2 w-2 rounded-full ${j.status==="connected"?"bg-green-500":j.status==="connecting"?"bg-yellow-500":"bg-red-500"}`})]},j.name))})}),u.jsx(jg,{isOpen:h,onClose:()=>x(!1),onConfirm:v,serverName:l.name,isGroup:!0})]})},l1=()=>{const{t:l}=ke(),{groups:s,loading:r,error:o,setError:d,deleteGroup:f,triggerRefresh:h}=$u(),{servers:x}=ys(),[m,g]=w.useState(null),[y,S]=w.useState(!1),v=A=>{g(A)},M=()=>{g(null),h()},N=async A=>{await f(A)||d(l("groups.deleteError"))},j=()=>{S(!0)},k=()=>{S(!1),h()};return u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between items-center mb-8",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:l("pages.groups.title")}),u.jsx("div",{className:"flex space-x-4",children:u.jsxs("button",{onClick:j,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 00-1 1v5H4a1 1 0 100 2h5v5a1 1 0 102 0v-5h5a1 1 0 100-2h-5V4a1 1 0 00-1-1z",clipRule:"evenodd"})}),l("groups.add")]})})]}),o&&u.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:u.jsx("p",{children:o})}),r?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsxs("div",{className:"flex flex-col items-center justify-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):s.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:l("groups.noGroups")})}):u.jsx("div",{className:"space-y-6",children:s.map(A=>u.jsx(n1,{group:A,servers:x,onEdit:v,onDelete:N},A.id))}),y&&u.jsx(t1,{onAdd:k,onCancel:k}),m&&u.jsx(a1,{group:m,onEdit:M,onCancel:()=>g(null)})]})},s1=({onSuccess:l,onCancel:s})=>{const{t:r}=ke(),[o,d]=w.useState({currentPassword:"",newPassword:""}),[f,h]=w.useState(""),[x,m]=w.useState(!1),[g,y]=w.useState(null),[S,v]=w.useState(!1),M=j=>{const{name:k,value:A}=j.target;k==="confirmPassword"?h(A):d(E=>({...E,[k]:A}))},N=async j=>{if(j.preventDefault(),y(null),o.newPassword!==f){y(r("auth.passwordsNotMatch"));return}m(!0);try{const k=await Hy(o);k.success?(v(!0),l&&l()):y(k.message||r("auth.changePasswordError"))}catch{y(r("auth.changePasswordError"))}finally{m(!1)}};return u.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[u.jsx("h2",{className:"text-xl font-bold mb-4",children:r("auth.changePassword")}),S?u.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:r("auth.changePasswordSuccess")}):u.jsxs("form",{onSubmit:N,children:[g&&u.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:g}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:r("auth.currentPassword")}),u.jsx("input",{type:"password",id:"currentPassword",name:"currentPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:o.currentPassword,onChange:M,required:!0})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:r("auth.newPassword")}),u.jsx("input",{type:"password",id:"newPassword",name:"newPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:o.newPassword,onChange:M,required:!0,minLength:6})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:r("auth.confirmPassword")}),u.jsx("input",{type:"password",id:"confirmPassword",name:"confirmPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:f,onChange:M,required:!0,minLength:6})]}),u.jsxs("div",{className:"flex justify-end space-x-2",children:[s&&u.jsx("button",{type:"button",onClick:s,disabled:x,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:r("common.cancel")}),u.jsx("button",{type:"submit",disabled:x,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:x?u.jsxs("span",{className:"flex items-center",children:[u.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r("common.save")]}):r("common.save")})]})]})]})},r1=()=>{const{t:l}=ke(),{showToast:s}=xs(),[r,o]=w.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:""}),[d,f]=w.useState({bearerAuthKey:""}),[h,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[m,g]=w.useState({enabled:!1,dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[y,S]=w.useState(!1),[v,M]=w.useState(null),[N,j]=w.useState(0),k=w.useCallback(()=>{j($=>$+1)},[]),A=w.useCallback(async()=>{var $,G,P,J,le,te;S(!0),M(null);try{const se=localStorage.getItem("mcphub_token"),oe=await fetch(je("/settings"),{headers:{"x-auth-token":se||""}});if(!oe.ok)throw new Error(`HTTP error! Status: ${oe.status}`);const I=await oe.json();I.success&&((G=($=I.data)==null?void 0:$.systemConfig)!=null&&G.routing)&&o({enableGlobalRoute:I.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:I.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:I.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:I.data.systemConfig.routing.bearerAuthKey||""}),I.success&&((J=(P=I.data)==null?void 0:P.systemConfig)!=null&&J.install)&&x({pythonIndexUrl:I.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:I.data.systemConfig.install.npmRegistry||""}),I.success&&((te=(le=I.data)==null?void 0:le.systemConfig)!=null&&te.smartRouting)&&g({enabled:I.data.systemConfig.smartRouting.enabled??!1,dbUrl:I.data.systemConfig.smartRouting.dbUrl||"",openaiApiBaseUrl:I.data.systemConfig.smartRouting.openaiApiBaseUrl||"",openaiApiKey:I.data.systemConfig.smartRouting.openaiApiKey||"",openaiApiEmbeddingModel:I.data.systemConfig.smartRouting.openaiApiEmbeddingModel||""})}catch(se){console.error("Failed to fetch settings:",se),M(se instanceof Error?se.message:"Failed to fetch settings"),s(l("errors.failedToFetchSettings"))}finally{S(!1)}},[l]),E=async($,G)=>{S(!0),M(null);try{const P=localStorage.getItem("mcphub_token"),J=await fetch(je("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":P||""},body:JSON.stringify({routing:{[$]:G}})});if(!J.ok)throw new Error(`HTTP error! Status: ${J.status}`);return(await J.json()).success?(o({...r,[$]:G}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateRouteConfig")),!1)}catch(P){return console.error("Failed to update routing config:",P),M(P instanceof Error?P.message:"Failed to update routing config"),s(l("errors.failedToUpdateRouteConfig")),!1}finally{S(!1)}},O=async($,G)=>{S(!0),M(null);try{const P=localStorage.getItem("mcphub_token"),J=await fetch(je("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":P||""},body:JSON.stringify({install:{[$]:G}})});if(!J.ok)throw new Error(`HTTP error! Status: ${J.status}`);return(await J.json()).success?(x({...h,[$]:G}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateSystemConfig")),!1)}catch(P){return console.error("Failed to update system config:",P),M(P instanceof Error?P.message:"Failed to update system config"),s(l("errors.failedToUpdateSystemConfig")),!1}finally{S(!1)}},D=async($,G)=>{S(!0),M(null);try{const P=localStorage.getItem("mcphub_token"),J=await fetch(je("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":P||""},body:JSON.stringify({smartRouting:{[$]:G}})});if(!J.ok){const te=await J.json();throw new Error(te.message||`HTTP error! Status: ${J.status}`)}const le=await J.json();return le.success?(g({...m,[$]:G}),s(l("settings.systemConfigUpdated")),!0):(s(le.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(P){console.error("Failed to update smart routing config:",P);const J=P instanceof Error?P.message:"Failed to update smart routing config";return M(J),s(J),!1}finally{S(!1)}},U=async $=>{S(!0),M(null);try{const G=localStorage.getItem("mcphub_token"),P=await fetch(je("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":G||""},body:JSON.stringify({smartRouting:$})});if(!P.ok){const le=await P.json();throw new Error(le.message||`HTTP error! Status: ${P.status}`)}const J=await P.json();return J.success?(g({...m,...$}),s(l("settings.systemConfigUpdated")),!0):(s(J.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(G){console.error("Failed to update smart routing config:",G);const P=G instanceof Error?G.message:"Failed to update smart routing config";return M(P),s(P),!1}finally{S(!1)}},ne=async $=>{S(!0),M(null);try{const G=localStorage.getItem("mcphub_token"),P=await fetch(je("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":G||""},body:JSON.stringify({routing:$})});if(!P.ok)throw new Error(`HTTP error! Status: ${P.status}`);return(await P.json()).success?(o({...r,...$}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateRouteConfig")),!1)}catch(G){return console.error("Failed to update routing config:",G),M(G instanceof Error?G.message:"Failed to update routing config"),s(l("errors.failedToUpdateRouteConfig")),!1}finally{S(!1)}};return w.useEffect(()=>{A()},[A,N]),w.useEffect(()=>{r&&f({bearerAuthKey:r.bearerAuthKey})},[r]),{routingConfig:r,tempRoutingConfig:d,setTempRoutingConfig:f,installConfig:h,smartRoutingConfig:m,loading:y,error:v,setError:M,triggerRefresh:k,fetchSettings:A,updateRoutingConfig:E,updateInstallConfig:O,updateSmartRoutingConfig:D,updateSmartRoutingConfigBatch:U,updateRoutingConfigBatch:ne}};function i1(l=32){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=new Uint8Array(l);return crypto.getRandomValues(r),Array.from(r).map(o=>s.charAt(o%s.length)).join("")}const o1=()=>{const{t:l,i18n:s}=ke(),r=dn(),{showToast:o}=xs(),[d,f]=w.useState(s.language);w.useEffect(()=>{f(s.language)},[s.language]);const[h,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[m,g]=w.useState({dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),{routingConfig:y,tempRoutingConfig:S,setTempRoutingConfig:v,installConfig:M,smartRoutingConfig:N,loading:j,updateRoutingConfig:k,updateRoutingConfigBatch:A,updateInstallConfig:E,updateSmartRoutingConfig:O,updateSmartRoutingConfigBatch:D}=r1();w.useEffect(()=>{M&&x(M)},[M]),w.useEffect(()=>{N&&g({dbUrl:N.dbUrl||"",openaiApiBaseUrl:N.openaiApiBaseUrl||"",openaiApiKey:N.openaiApiKey||"",openaiApiEmbeddingModel:N.openaiApiEmbeddingModel||""})},[N]);const[U,ne]=w.useState({routingConfig:!1,installConfig:!1,smartRoutingConfig:!1,password:!1}),$=q=>{ne(fe=>({...fe,[q]:!fe[q]}))},G=async(q,fe)=>{if(q==="enableBearerAuth"&&fe===!0&&!S.bearerAuthKey&&!y.bearerAuthKey){const T=i1();P(T),await A({enableBearerAuth:!0,bearerAuthKey:T})&&v(ee=>({...ee,bearerAuthKey:T}));return}await k(q,fe)},P=q=>{v(fe=>({...fe,bearerAuthKey:q}))},J=async()=>{await k("bearerAuthKey",S.bearerAuthKey)},le=(q,fe)=>{x({...h,[q]:fe})},te=async q=>{await E(q,h[q])},se=(q,fe)=>{g({...m,[q]:fe})},oe=async q=>{await O(q,m[q])},I=async q=>{if(q){const fe=m.dbUrl||N.dbUrl,T=m.openaiApiKey||N.openaiApiKey;if(!fe||!T){const ee=[];fe||ee.push(l("settings.dbUrl")),T||ee.push(l("settings.openaiApiKey")),o(l("settings.smartRoutingValidationError",{fields:ee.join(", ")}));return}const Y={enabled:q};m.dbUrl!==N.dbUrl&&(Y.dbUrl=m.dbUrl),m.openaiApiBaseUrl!==N.openaiApiBaseUrl&&(Y.openaiApiBaseUrl=m.openaiApiBaseUrl),m.openaiApiKey!==N.openaiApiKey&&(Y.openaiApiKey=m.openaiApiKey),m.openaiApiEmbeddingModel!==N.openaiApiEmbeddingModel&&(Y.openaiApiEmbeddingModel=m.openaiApiEmbeddingModel),await D(Y)}else await O("enabled",q)},H=()=>{setTimeout(()=>{r("/")},2e3)},W=q=>{localStorage.setItem("i18nextLng",q),window.location.reload()};return u.jsxs("div",{className:"container mx-auto",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:l("pages.settings.title")}),u.jsx("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.language")}),u.jsxs("div",{className:"flex space-x-3",children:[u.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${d.startsWith("en")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>W("en"),children:"English"}),u.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${d.startsWith("zh")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>W("zh"),children:"中文"})]})]})}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>$("smartRoutingConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.smartRouting")}),u.jsx("span",{className:"text-gray-500",children:U.smartRoutingConfig?"▼":"►"})]}),U.smartRoutingConfig&&u.jsxs("div",{className:"space-y-4 mt-4",children:[u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableSmartRouting")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableSmartRoutingDescription")})]}),u.jsx(cs,{disabled:j,checked:N.enabled,onCheckedChange:q=>I(q)})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsxs("h3",{className:"font-medium text-gray-700",children:[u.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.dbUrl")]})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:m.dbUrl,onChange:q=>se("dbUrl",q.target.value),placeholder:l("settings.dbUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300",disabled:j}),u.jsx("button",{onClick:()=>oe("dbUrl"),disabled:j,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:l("common.save")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsxs("h3",{className:"font-medium text-gray-700",children:[u.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.openaiApiKey")]})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"password",value:m.openaiApiKey,onChange:q=>se("openaiApiKey",q.target.value),placeholder:l("settings.openaiApiKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300",disabled:j}),u.jsx("button",{onClick:()=>oe("openaiApiKey"),disabled:j,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:l("common.save")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiBaseUrl")})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:m.openaiApiBaseUrl,onChange:q=>se("openaiApiBaseUrl",q.target.value),placeholder:l("settings.openaiApiBaseUrlPlaceholder"),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:j}),u.jsx("button",{onClick:()=>oe("openaiApiBaseUrl"),disabled:j,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:l("common.save")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiEmbeddingModel")})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:m.openaiApiEmbeddingModel,onChange:q=>se("openaiApiEmbeddingModel",q.target.value),placeholder:l("settings.openaiApiEmbeddingModelPlaceholder"),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:j}),u.jsx("button",{onClick:()=>oe("openaiApiEmbeddingModel"),disabled:j,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:l("common.save")})]})]})]})]}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>$("routingConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.routeConfig")}),u.jsx("span",{className:"text-gray-500",children:U.routingConfig?"▼":"►"})]}),U.routingConfig&&u.jsxs("div",{className:"space-y-4 mt-4",children:[u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableBearerAuth")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableBearerAuthDescription")})]}),u.jsx(cs,{disabled:j,checked:y.enableBearerAuth,onCheckedChange:q=>G("enableBearerAuth",q)})]}),y.enableBearerAuth&&u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{className:"mb-2",children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.bearerAuthKey")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.bearerAuthKeyDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:S.bearerAuthKey,onChange:q=>P(q.target.value),placeholder:l("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:j||!y.enableBearerAuth}),u.jsx("button",{onClick:J,disabled:j||!y.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:l("common.save")})]})]}),u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableGlobalRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGlobalRouteDescription")})]}),u.jsx(cs,{disabled:j,checked:y.enableGlobalRoute,onCheckedChange:q=>G("enableGlobalRoute",q)})]}),u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableGroupNameRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGroupNameRouteDescription")})]}),u.jsx(cs,{disabled:j,checked:y.enableGroupNameRoute,onCheckedChange:q=>G("enableGroupNameRoute",q)})]})]})]}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>$("installConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("settings.installConfig")}),u.jsx("span",{className:"text-gray-500",children:U.installConfig?"▼":"►"})]}),U.installConfig&&u.jsxs("div",{className:"space-y-4 mt-4",children:[u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{className:"mb-2",children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.pythonIndexUrl")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.pythonIndexUrlDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:h.pythonIndexUrl,onChange:q=>le("pythonIndexUrl",q.target.value),placeholder:l("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:j}),u.jsx("button",{onClick:()=>te("pythonIndexUrl"),disabled:j,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:l("common.save")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{className:"mb-2",children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.npmRegistry")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.npmRegistryDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:h.npmRegistry,onChange:q=>le("npmRegistry",q.target.value),placeholder:l("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:j}),u.jsx("button",{onClick:()=>te("npmRegistry"),disabled:j,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:l("common.save")})]})]})]})]}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>$("password"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("auth.changePassword")}),u.jsx("span",{className:"text-gray-500",children:U.password?"▼":"►"})]}),U.password&&u.jsx("div",{className:"max-w-lg mt-4",children:u.jsx(s1,{onSuccess:H})})]})]})},u1=()=>{const{t:l}=ke(),[s,r]=w.useState([]),[o,d]=w.useState([]),[f,h]=w.useState([]),[x,m]=w.useState([]),[g,y]=w.useState(""),[S,v]=w.useState(""),[M,N]=w.useState(""),[j,k]=w.useState(!0),[A,E]=w.useState(null),[O,D]=w.useState(null),[U,ne]=w.useState([]),[$,G]=w.useState(1),[P,J]=w.useState(9),[le,te]=w.useState(1),se=w.useCallback(async()=>{try{k(!0);const F=localStorage.getItem("mcphub_token"),ae=await fetch(je("/market/servers"),{headers:{"x-auth-token":F||""}});if(!ae.ok)throw new Error(`Status: ${ae.status}`);const ie=await ae.json();ie&&ie.success&&Array.isArray(ie.data)?(d(ie.data),oe(ie.data,$)):(console.error("Invalid market servers data format:",ie),E(l("market.fetchError")))}catch(F){console.error("Error fetching market servers:",F),E(F instanceof Error?F.message:String(F))}finally{k(!1)}},[l]),oe=w.useCallback((F,ae,ie=P)=>{const pe=F.length,Ge=Math.ceil(pe/ie);te(Ge);const st=Math.max(1,Math.min(ae,Ge));st!==ae&&G(st);const pt=(st-1)*ie,Va=F.slice(pt,pt+ie);r(Va)},[P]),I=w.useCallback(F=>{G(F),oe(o,F,P)},[o,oe,P]),H=w.useCallback(async()=>{try{const F=localStorage.getItem("mcphub_token"),ae=await fetch(je("/market/categories"),{headers:{"x-auth-token":F||""}});if(!ae.ok)throw new Error(`Status: ${ae.status}`);const ie=await ae.json();ie&&ie.success&&Array.isArray(ie.data)?h(ie.data):console.error("Invalid categories data format:",ie)}catch(F){console.error("Error fetching categories:",F)}},[]),W=w.useCallback(async()=>{try{const F=localStorage.getItem("mcphub_token"),ae=await fetch(je("/market/tags"),{headers:{"x-auth-token":F||""}});if(!ae.ok)throw new Error(`Status: ${ae.status}`);const ie=await ae.json();ie&&ie.success&&Array.isArray(ie.data)?m(ie.data):console.error("Invalid tags data format:",ie)}catch(F){console.error("Error fetching tags:",F)}},[]),q=w.useCallback(async F=>{try{k(!0);const ae=localStorage.getItem("mcphub_token"),ie=await fetch(je(`/market/servers/${F}`),{headers:{"x-auth-token":ae||""}});if(!ie.ok)throw new Error(`Status: ${ie.status}`);const pe=await ie.json();return pe&&pe.success&&pe.data?(D(pe.data),pe.data):(console.error("Invalid server data format:",pe),E(l("market.serverNotFound")),null)}catch(ae){return console.error(`Error fetching server ${F}:`,ae),E(ae instanceof Error?ae.message:String(ae)),null}finally{k(!1)}},[l]),fe=w.useCallback(async F=>{try{if(k(!0),N(F),!F.trim()){se();return}const ae=localStorage.getItem("mcphub_token"),ie=await fetch(je(`/market/servers/search?query=${encodeURIComponent(F)}`),{headers:{"x-auth-token":ae||""}});if(!ie.ok)throw new Error(`Status: ${ie.status}`);const pe=await ie.json();pe&&pe.success&&Array.isArray(pe.data)?(d(pe.data),G(1),oe(pe.data,1)):(console.error("Invalid search results format:",pe),E(l("market.searchError")))}catch(ae){console.error("Error searching servers:",ae),E(ae instanceof Error?ae.message:String(ae))}finally{k(!1)}},[l,o,oe,se]),T=w.useCallback(async F=>{try{if(k(!0),y(F),v(""),!F){se();return}const ae=localStorage.getItem("mcphub_token"),ie=await fetch(je(`/market/categories/${encodeURIComponent(F)}`),{headers:{"x-auth-token":ae||""}});if(!ie.ok)throw new Error(`Status: ${ie.status}`);const pe=await ie.json();pe&&pe.success&&Array.isArray(pe.data)?(d(pe.data),G(1),oe(pe.data,1)):(console.error("Invalid category filter results format:",pe),E(l("market.filterError")))}catch(ae){console.error("Error filtering servers by category:",ae),E(ae instanceof Error?ae.message:String(ae))}finally{k(!1)}},[l,se,oe]),Y=w.useCallback(async F=>{try{if(k(!0),v(F),y(""),!F){se();return}const ae=localStorage.getItem("mcphub_token"),ie=await fetch(je(`/market/tags/${encodeURIComponent(F)}`),{headers:{"x-auth-token":ae||""}});if(!ie.ok)throw new Error(`Status: ${ie.status}`);const pe=await ie.json();pe&&pe.success&&Array.isArray(pe.data)?(d(pe.data),G(1),oe(pe.data,1)):(console.error("Invalid tag filter results format:",pe),E(l("market.tagFilterError")))}catch(ae){console.error("Error filtering servers by tag:",ae),E(ae instanceof Error?ae.message:String(ae))}finally{k(!1)}},[l,se,oe]),ee=w.useCallback(async()=>{try{const F=localStorage.getItem("mcphub_token"),ae=await fetch(je("/servers"),{headers:{"x-auth-token":F||""}});if(!ae.ok)throw new Error(`Status: ${ae.status}`);const ie=await ae.json();if(ie&&ie.success&&Array.isArray(ie.data)){const pe=ie.data.map(Ge=>Ge.name);ne(pe)}}catch(F){console.error("Error fetching installed servers:",F)}},[]),X=w.useCallback(F=>U.includes(F),[U]),re=w.useCallback(async(F,ae)=>{var ie,pe;try{const Ge=(ie=F.installations)!=null&&ie.npm?"npm":Object.keys(F.installations||{}).length>0?Object.keys(F.installations)[0]:null;if(!Ge||!((pe=F.installations)!=null&&pe[Ge]))return E(l("market.noInstallationMethod")),!1;const st=F.installations[Ge],pt={name:F.name,config:{command:ae.command||st.command||"",args:ae.args||st.args||[],env:{...st.env,...ae.env}}},Va=localStorage.getItem("mcphub_token"),$a=await fetch(je("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":Va||""},body:JSON.stringify(pt)});if(!$a.ok){const Fr=await $a.json();throw new Error(Fr.message||`Status: ${$a.status}`)}return await ee(),!0}catch(Ge){return console.error("Error installing server:",Ge),E(Ge instanceof Error?Ge.message:String(Ge)),!1}},[l,ee]),ve=w.useCallback(F=>{J(F),G(1),oe(o,1,F)},[o,oe]);return w.useEffect(()=>{se(),H(),W(),ee()},[se,H,W,ee]),{servers:s,allServers:o,categories:f,tags:x,selectedCategory:g,selectedTag:S,searchQuery:M,loading:j,error:A,setError:E,currentServer:O,fetchMarketServers:se,fetchServerByName:q,searchServers:fe,filterByCategory:T,filterByTag:Y,installServer:re,currentPage:$,totalPages:le,serversPerPage:P,changePage:I,changeServersPerPage:ve,isServerInstalled:X}},c1=({server:l,onClick:s})=>{var x,m,g,y;const{t:r}=ke(),o=()=>{if(!l.tags||l.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const S=28,v=E=>E.length+3;let M=0,N=0;const j=[...l.tags].sort((E,O)=>E.length-O.length);for(N=0;N<j.length;N++){const E=v(j[N]);if(M+E>S)break;if(M+=E,N===j.length-1)return{tagsToShow:j,hasMore:!1,moreCount:0}}N===0&&j.length>0&&(N=1);const k=j.length-N,A=3+String(k).length+r("market.moreTags").length;return M+A<=S||N<1?{tagsToShow:j.slice(0,N),hasMore:!0,moreCount:k}:{tagsToShow:j.slice(0,Math.max(1,N-1)),hasMore:!0,moreCount:k+1}},{tagsToShow:d,hasMore:f,moreCount:h}=o();return u.jsxs("div",{className:"bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow cursor-pointer flex flex-col h-full",onClick:()=>s(l),children:[u.jsxs("div",{className:"flex justify-between items-start mb-3",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-1 mr-2",children:l.display_name}),l.is_official&&u.jsx("span",{className:"bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded flex-shrink-0",children:r("market.official")})]}),u.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:l.description}),u.jsx("div",{className:"flex flex-wrap gap-1 mb-2 min-h-[28px]",children:((x=l.categories)==null?void 0:x.length)>0?l.categories.map((S,v)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:S},v)):u.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),u.jsx("div",{className:"relative mb-3 min-h-[28px] overflow-x-auto",children:((m=l.tags)==null?void 0:m.length)>0?u.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[d.map((S,v)=>u.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",S]},v)),f&&u.jsxs("span",{className:"bg-gray-100 text-gray-600 text-xs px-1.5 py-1 rounded flex-shrink-0",children:["+",h," ",r("market.moreTags")]})]}):u.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),u.jsxs("div",{className:"flex justify-between items-center mt-auto pt-2 text-xs text-gray-500 border-t border-gray-100",children:[u.jsxs("div",{className:"overflow-hidden",children:[u.jsxs("span",{className:"whitespace-nowrap",children:[r("market.by")," "]}),u.jsx("span",{className:"font-medium whitespace-nowrap overflow-hidden text-ellipsis max-w-[120px] inline-block align-bottom",children:((g=l.author)==null?void 0:g.name)||r("market.unknown")})]}),u.jsxs("div",{className:"flex items-center flex-shrink-0",children:[u.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"})}),u.jsxs("span",{children:[((y=l.tools)==null?void 0:y.length)||0," ",r("market.tools")]})]})]})]})},d1=({server:l,onBack:s,onInstall:r,installing:o=!1,isInstalled:d=!1})=>{var A,E;const{t:f}=ke(),[h,x]=w.useState(!1),[m,g]=w.useState(null),y=()=>d?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:f("market.installed")}:o?{className:"bg-gray-400 cursor-not-allowed px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:f("market.installing")}:{className:"bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded text-sm font-medium text-white",disabled:!1,text:f("market.install")},S=()=>{x(!h),g(null)},v=()=>{d||S()},M=()=>{if(!l.installations)return;if(l.installations.npm)return l.installations.npm;if(l.installations.uvx)return l.installations.uvx;if(l.installations.default)return l.installations.default;const O=Object.keys(l.installations);if(O.length>0)return l.installations[O[0]]},N=async O=>{try{g(null),r(l,O.config),x(!1)}catch(D){console.error("Error installing server:",D),g(f("errors.serverInstall"))}},j=y(),k=M();return u.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[u.jsx("div",{className:"mb-4",children:u.jsxs("button",{onClick:s,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[u.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"})}),f("market.backToList")]})}),u.jsxs("div",{className:"flex justify-between items-start mb-4",children:[u.jsx("div",{children:u.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[l.display_name,u.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",l.name,")"]}),u.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[f("market.author"),": ",l.author.name," • ",f("market.license"),": ",l.license," •",u.jsx("a",{href:l.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",children:f("market.repository")})]})]})}),u.jsxs("div",{className:"flex items-center",children:[l.is_official&&u.jsx("span",{className:"bg-blue-100 text-blue-800 text-sm font-medium px-4 py-2 rounded mr-2 flex items-center",children:f("market.official")}),u.jsx("button",{onClick:v,disabled:j.disabled,className:j.className,children:j.text})]})]}),u.jsx("p",{className:"text-gray-700 mb-6",children:l.description}),u.jsxs("div",{className:"mb-6",children:[u.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[f("market.categories")," & ",f("market.tags")]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[(A=l.categories)==null?void 0:A.map((O,D)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:O},`cat-${D}`)),l.tags&&l.tags.map((O,D)=>u.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",O]},`tag-${D}`))]})]}),l.arguments&&Object.keys(l.arguments).length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.arguments")}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:f("market.argumentName")}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:f("market.description")}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:f("market.required")}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:f("market.example")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(l.arguments).map(([O,D],U)=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:O}),u.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:D.description}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:D.required?u.jsx("span",{className:"text-green-600",children:"✓"}):u.jsx("span",{className:"text-red-600",children:"✗"})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:D.example})})]},U))})]})})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.tools")}),u.jsx("div",{className:"space-y-4",children:(E=l.tools)==null?void 0:E.map((O,D)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsxs("h4",{className:"font-medium mb-2",children:[O.name,u.jsx("button",{type:"button",onClick:()=>{const U=document.getElementById(`schema-${D}`);U&&U.classList.toggle("hidden")},className:"text-sm text-blue-600 hover:underline focus:outline-none ml-2",children:f("market.viewSchema")})]}),u.jsx("p",{className:"text-gray-600 mb-2",children:O.description}),u.jsx("div",{className:"mt-2",children:u.jsx("pre",{id:`schema-${D}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(O.inputSchema,null,2)})})]},D))})]}),l.examples&&l.examples.length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.examples")}),u.jsx("div",{className:"space-y-4",children:l.examples.map((O,D)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsx("h4",{className:"font-medium mb-2",children:O.title}),u.jsx("p",{className:"text-gray-600 mb-2",children:O.description}),u.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:O.prompt})]},D))})]}),u.jsx("div",{className:"mt-6 flex justify-end",children:u.jsx("button",{onClick:v,disabled:j.disabled,className:j.className,children:j.text})}),h&&u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Vu,{onSubmit:N,onCancel:S,modalTitle:f("market.installServer",{name:l.display_name}),formError:m,initialData:{name:l.name,status:"disconnected",config:k?{command:k.command||"",args:k.args||[],env:k.env||{}}:void 0}})})]})},f1=({currentPage:l,totalPages:s,onPageChange:r})=>{const o=()=>{const d=[];d.push(u.jsx("button",{onClick:()=>r(1),className:`px-3 py-1 mx-1 rounded ${l===1?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"1"},"first"));let h=Math.max(2,l-Math.floor(5/2));h>2&&d.push(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let x=h;x<=Math.min(s-1,h+5-3);x++)d.push(u.jsx("button",{onClick:()=>r(x),className:`px-3 py-1 mx-1 rounded ${l===x?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:x},x));return h+5-3<s-1&&d.push(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),s>1&&d.push(u.jsx("button",{onClick:()=>r(s),className:`px-3 py-1 mx-1 rounded ${l===s?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:s},"last")),d};return s<=1?null:u.jsxs("div",{className:"flex justify-center items-center my-6",children:[u.jsx("button",{onClick:()=>r(Math.max(1,l-1)),disabled:l===1,className:`px-3 py-1 rounded mr-2 ${l===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"« Prev"}),u.jsx("div",{className:"flex",children:o()}),u.jsx("button",{onClick:()=>r(Math.min(s,l+1)),disabled:l===s,className:`px-3 py-1 rounded ml-2 ${l===s?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"Next »"})]})},om=()=>{const{t:l}=ke(),s=dn();Jt();const{serverName:r}=Hx(),{showToast:o}=xs(),{servers:d,allServers:f,categories:h,loading:x,error:m,setError:g,searchServers:y,filterByCategory:S,filterByTag:v,selectedCategory:M,selectedTag:N,installServer:j,fetchServerByName:k,isServerInstalled:A,currentPage:E,totalPages:O,changePage:D,serversPerPage:U,changeServersPerPage:ne}=u1(),[$,G]=w.useState(null),[P,J]=w.useState(""),[le,te]=w.useState(!1),[se,oe]=w.useState(!1);w.useEffect(()=>{(async()=>{if(r){const re=await k(r);re?G(re):s("/market")}else G(null)})()},[r,k,s]);const I=X=>{X.preventDefault(),y(P)},H=X=>{S(X)},W=()=>{J(""),S(""),v("")},q=X=>{s(`/market/${X.name}`)},fe=()=>{s("/market")},T=async(X,re)=>{try{te(!0),await j(X,re)&&o(l("market.installSuccess",{serverName:X.display_name}),"success")}finally{te(!1)}},Y=X=>{D(X),window.scrollTo({top:0,behavior:"smooth"})},ee=X=>{const re=parseInt(X.target.value,10);ne(re)};return $?u.jsx(d1,{server:$,onBack:fe,onInstall:T,installing:le,isInstalled:A($.name)}):u.jsxs("div",{children:[u.jsx("div",{className:"flex justify-between items-center mb-8",children:u.jsx("div",{children:u.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center",children:[l("market.title"),u.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:l("pages.market.title").split(" - ")[1]})]})})}),m&&u.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("p",{children:m}),u.jsx("button",{onClick:()=>g(null),className:"text-red-700 hover:text-red-900",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 01.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),u.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:u.jsxs("form",{onSubmit:I,className:"flex space-x-4 mb-0",children:[u.jsx("div",{className:"flex-grow",children:u.jsx("input",{type:"text",value:P,onChange:X=>J(X.target.value),placeholder:l("market.searchPlaceholder"),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"})}),u.jsx("button",{type:"submit",className:"bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded",children:l("market.search")}),(P||M||N)&&u.jsx("button",{type:"button",onClick:W,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50",children:l("market.clearFilters")})]})}),u.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[u.jsx("div",{className:"md:w-48 flex-shrink-0",children:u.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4",children:h.length>0?u.jsxs("div",{className:"mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center mb-3",children:[u.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")}),M&&u.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline",onClick:()=>S(""),children:l("market.clearCategoryFilter")})]}),u.jsx("div",{className:"flex flex-col gap-2",children:h.map(X=>u.jsx("button",{onClick:()=>H(X),className:`px-3 py-2 rounded text-sm text-left ${M===X?"bg-blue-100 text-blue-800 font-medium":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:X},X))})]}):x?u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"mb-3",children:u.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")})}),u.jsxs("div",{className:"flex flex-col gap-2 items-center py-4",children:[u.jsxs("svg",{className:"animate-spin h-6 w-6 text-blue-500 mb-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-sm text-gray-600",children:l("app.loading")})]})]}):u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"mb-3",children:u.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")})}),u.jsx("p",{className:"text-sm text-gray-600 py-2",children:l("market.noCategories")})]})})}),u.jsx("div",{className:"flex-grow",children:x?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):d.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:l("market.noServers")})}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:d.map((X,re)=>u.jsx(c1,{server:X,onClick:q},re))}),u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("div",{className:"text-sm text-gray-500",children:l("market.showing",{from:(E-1)*U+1,to:Math.min(E*U,f.length),total:f.length})}),u.jsx(f1,{currentPage:E,totalPages:O,onPageChange:Y}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[l("market.perPage"),":"]}),u.jsxs("select",{id:"perPage",value:U,onChange:ee,className:"border rounded p-1 text-sm",children:[u.jsx("option",{value:"6",children:"6"}),u.jsx("option",{value:"9",children:"9"}),u.jsx("option",{value:"12",children:"12"}),u.jsx("option",{value:"24",children:"24"})]})]})]}),u.jsx("div",{className:"mt-6"})]})})]})]})},h1={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"},m1={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 g1({variant:l="default",size:s="default",className:r,disabled:o,children:d,...f}){return u.jsx("button",{className:qa("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",h1[l],m1[s],r),disabled:o,...f,children:d})}const p1=({logs:l,isLoading:s=!1,error:r=null,onClear:o})=>{const{t:d}=ke(),f=w.useRef(null),[h,x]=w.useState(!0),[m,g]=w.useState(""),[y,S]=w.useState(["info","error","warn","debug"]),[v,M]=w.useState(["main","child"]);w.useEffect(()=>{h&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[l,h]);const N=l.filter(E=>{const O=m?E.message.toLowerCase().includes(m.toLowerCase()):!0,D=y.includes(E.type),U=v.includes(E.source);return O&&D&&U}),j=E=>new Date(E).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),k=E=>{switch(E){case"error":return"bg-red-400";case"warn":return"bg-yellow-400";case"debug":return"bg-purple-400";default:return"bg-blue-400"}},A=E=>{switch(E){case"main":return"bg-green-400";case"child":return"bg-orange-400";default:return"bg-gray-400"}};return u.jsxs("div",{className:"flex flex-col h-full",children:[u.jsxs("div",{className:"bg-card p-3 rounded-t-md border-b flex flex-wrap items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("span",{className:"font-semibold text-sm",children:[d("logs.filters"),":"]}),u.jsx("input",{type:"text",placeholder:d("logs.search"),className:"px-2 py-1 text-sm border rounded",value:m,onChange:E=>g(E.target.value)}),u.jsx("div",{className:"flex gap-1 items-center",children:["info","error","warn","debug"].map(E=>u.jsx(_r,{variant:y.includes(E)?"default":"outline",className:`cursor-pointer ${y.includes(E)?k(E):""}`,onClick:()=>{y.includes(E)?S(O=>O.filter(D=>D!==E)):S(O=>[...O,E])},children:E},E))}),u.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child"].map(E=>u.jsx(_r,{variant:v.includes(E)?"default":"outline",className:`cursor-pointer ${v.includes(E)?A(E):""}`,onClick:()=>{v.includes(E)?M(O=>O.filter(D=>D!==E)):M(O=>[...O,E])},children:d(E==="main"?"logs.mainProcess":"logs.childProcess")},E))})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[u.jsx("input",{type:"checkbox",checked:h,onChange:()=>x(!h),className:"form-checkbox h-4 w-4"}),d("logs.autoScroll")]}),u.jsx(g1,{variant:"outline",size:"sm",onClick:o,disabled:s||l.length===0,children:d("logs.clearLogs")})]})]}),u.jsx("div",{ref:f,className:"flex-grow p-2 overflow-auto bg-card rounded-b-md font-mono text-sm",style:{maxHeight:"calc(100vh - 300px)"},children:s?u.jsx("div",{className:"flex justify-center items-center h-full",children:u.jsx("span",{children:d("logs.loading")})}):r?u.jsx("div",{className:"text-red-500 p-2",children:r.message}):N.length===0?u.jsx("div",{className:"text-center text-muted-foreground p-8",children:m||y.length<4||v.length<2?d("logs.noMatch"):d("logs.noLogs")}):N.map((E,O)=>u.jsxs("div",{className:`py-1 border-b border-gray-100 dark:border-gray-800 ${E.type==="error"?"text-red-500":E.type==="warn"?"text-yellow-500":""}`,children:[u.jsxs("span",{className:"text-gray-400",children:["[",j(E.timestamp),"]"]}),u.jsx(_r,{className:`ml-2 mr-1 ${k(E.type)}`,children:E.type}),u.jsxs(_r,{variant:"default",className:`mr-2 ${A(E.source)}`,children:[E.source==="main"?d("logs.main"):d("logs.child"),E.processId?` (${E.processId})`:""]}),u.jsx("span",{className:"whitespace-pre-wrap",children:E.message})]},`${E.timestamp}-${O}`))})]})},x1=async()=>{try{const l=Ga();if(!l)throw new Error("Authentication token not found. Please log in.");const r=await(await fetch(je("/logs"),{method:"DELETE",headers:{"x-auth-token":l}})).json();if(!r.success)throw new Error(r.error||"Failed to clear logs")}catch(l){throw console.error("Error clearing logs:",l),l}},y1=()=>{const[l,s]=w.useState([]),[r,o]=w.useState(!0),[d,f]=w.useState(null);return w.useEffect(()=>{let x=null,m=!0;const g=()=>{try{x&&x.close();const y=Ga();if(!y){f(new Error("Authentication token not found. Please log in.")),o(!1);return}x=new EventSource(je(`/logs/stream?token=${y}`)),x.onmessage=S=>{if(m)try{const v=JSON.parse(S.data);v.type==="initial"?(s(v.logs),o(!1)):v.type==="log"&&s(M=>[...M,v.log])}catch(v){console.error("Error parsing SSE message:",v)}},x.onerror=()=>{m&&(x&&(x.close(),setTimeout(g,5e3)),f(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(y){if(!m)return;f(y instanceof Error?y:new Error("Failed to connect to log stream")),o(!1)}};return g(),()=>{m=!1,x&&x.close()}},[]),{logs:l,loading:r,error:d,clearLogs:async()=>{try{await x1(),s([])}catch(x){f(x instanceof Error?x:new Error("Failed to clear logs"))}}}},b1=()=>{const{t:l}=ke(),{logs:s,loading:r,error:o,clearLogs:d}=y1();return u.jsxs("div",{className:"container mx-auto p-4",children:[u.jsx("div",{className:"flex justify-between items-center mb-4",children:u.jsx("h1",{className:"text-2xl font-bold",children:l("pages.logs.title")})}),u.jsx("div",{className:"bg-card rounded-md shadow-sm",children:u.jsx(p1,{logs:s,isLoading:r,error:o,onClear:d})})]})};function um(){const l=Qm();return u.jsx(rv,{children:u.jsx(qy,{children:u.jsx(lv,{children:u.jsx(jy,{basename:l,children:u.jsxs(Ix,{children:[u.jsx(Ut,{path:"/login",element:u.jsx(Hv,{})}),u.jsx(Ut,{element:u.jsx(_v,{}),children:u.jsxs(Ut,{element:u.jsx(Lv,{}),children:[u.jsx(Ut,{path:"/",element:u.jsx(Bv,{})}),u.jsx(Ut,{path:"/servers",element:u.jsx(e1,{})}),u.jsx(Ut,{path:"/groups",element:u.jsx(l1,{})}),u.jsx(Ut,{path:"/market",element:u.jsx(om,{})}),u.jsx(Ut,{path:"/market/:serverName",element:u.jsx(om,{})}),u.jsx(Ut,{path:"/logs",element:u.jsx(b1,{})}),u.jsx(Ut,{path:"/settings",element:u.jsx(o1,{})})]})}),u.jsx(Ut,{path:"*",element:u.jsx(_m,{to:"/"})})]})})})})})}const ye=l=>typeof l=="string",us=()=>{let l,s;const r=new Promise((o,d)=>{l=o,s=d});return r.resolve=l,r.reject=s,r},cm=l=>l==null?"":""+l,v1=(l,s,r)=>{l.forEach(o=>{s[o]&&(r[o]=s[o])})},w1=/###/g,dm=l=>l&&l.indexOf("###")>-1?l.replace(w1,"."):l,fm=l=>!l||ye(l),ds=(l,s,r)=>{const o=ye(s)?s.split("."):s;let d=0;for(;d<o.length-1;){if(fm(l))return{};const f=dm(o[d]);!l[f]&&r&&(l[f]=new r),Object.prototype.hasOwnProperty.call(l,f)?l=l[f]:l={},++d}return fm(l)?{}:{obj:l,k:dm(o[d])}},hm=(l,s,r)=>{const{obj:o,k:d}=ds(l,s,Object);if(o!==void 0||s.length===1){o[d]=r;return}let f=s[s.length-1],h=s.slice(0,s.length-1),x=ds(l,h,Object);for(;x.obj===void 0&&h.length;)f=`${h[h.length-1]}.${f}`,h=h.slice(0,h.length-1),x=ds(l,h,Object),x!=null&&x.obj&&typeof x.obj[`${x.k}.${f}`]<"u"&&(x.obj=void 0);x.obj[`${x.k}.${f}`]=r},S1=(l,s,r,o)=>{const{obj:d,k:f}=ds(l,s,Object);d[f]=d[f]||[],d[f].push(r)},Vr=(l,s)=>{const{obj:r,k:o}=ds(l,s);if(r&&Object.prototype.hasOwnProperty.call(r,o))return r[o]},j1=(l,s,r)=>{const o=Vr(l,r);return o!==void 0?o:Vr(s,r)},Ng=(l,s,r)=>{for(const o in s)o!=="__proto__"&&o!=="constructor"&&(o in l?ye(l[o])||l[o]instanceof String||ye(s[o])||s[o]instanceof String?r&&(l[o]=s[o]):Ng(l[o],s[o],r):l[o]=s[o]);return l},Wn=l=>l.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var N1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const E1=l=>ye(l)?l.replace(/[&<>"'\/]/g,s=>N1[s]):l;class C1{constructor(s){this.capacity=s,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(s){const r=this.regExpMap.get(s);if(r!==void 0)return r;const o=new RegExp(s);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(s,o),this.regExpQueue.push(s),o}}const k1=[" ",",","?","!",";"],T1=new C1(20),A1=(l,s,r)=>{s=s||"",r=r||"";const o=k1.filter(h=>s.indexOf(h)<0&&r.indexOf(h)<0);if(o.length===0)return!0;const d=T1.getRegExp(`(${o.map(h=>h==="?"?"\\?":h).join("|")})`);let f=!d.test(l);if(!f){const h=l.indexOf(r);h>0&&!d.test(l.substring(0,h))&&(f=!0)}return f},Ou=function(l,s){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!l)return;if(l[s])return Object.prototype.hasOwnProperty.call(l,s)?l[s]:void 0;const o=s.split(r);let d=l;for(let f=0;f<o.length;){if(!d||typeof d!="object")return;let h,x="";for(let m=f;m<o.length;++m)if(m!==f&&(x+=r),x+=o[m],h=d[x],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&m<o.length-1)continue;f+=m-f+1;break}d=h}return d},$r=l=>l==null?void 0:l.replace("_","-"),R1={type:"logger",log(l){this.output("log",l)},warn(l){this.output("warn",l)},error(l){this.output("error",l)},output(l,s){var r,o;(o=(r=console==null?void 0:console[l])==null?void 0:r.apply)==null||o.call(r,console,s)}};class Yr{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(s,r)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=s||R1,this.options=r,this.debug=r.debug}log(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}warn(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}error(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"error","")}deprecate(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(s,r,o,d){return d&&!this.debug?null:(ye(s[0])&&(s[0]=`${o}${this.prefix} ${s[0]}`),this.logger[r](s))}create(s){return new Yr(this.logger,{prefix:`${this.prefix}:${s}:`,...this.options})}clone(s){return s=s||this.options,s.prefix=s.prefix||this.prefix,new Yr(this.logger,s)}}var Pt=new Yr;class Jr{constructor(){this.observers={}}on(s,r){return s.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const d=this.observers[o].get(r)||0;this.observers[o].set(r,d+1)}),this}off(s,r){if(this.observers[s]){if(!r){delete this.observers[s];return}this.observers[s].delete(r)}}emit(s){for(var r=arguments.length,o=new Array(r>1?r-1:0),d=1;d<r;d++)o[d-1]=arguments[d];this.observers[s]&&Array.from(this.observers[s].entries()).forEach(h=>{let[x,m]=h;for(let g=0;g<m;g++)x(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(h=>{let[x,m]=h;for(let g=0;g<m;g++)x.apply(x,[s,...o])})}}class mm extends Jr{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=s||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(s){this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}removeNamespaces(s){const r=this.options.ns.indexOf(s);r>-1&&this.options.ns.splice(r,1)}getResource(s,r,o){var g,y;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const f=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator,h=d.ignoreJSONStructure!==void 0?d.ignoreJSONStructure:this.options.ignoreJSONStructure;let x;s.indexOf(".")>-1?x=s.split("."):(x=[s,r],o&&(Array.isArray(o)?x.push(...o):ye(o)&&f?x.push(...o.split(f)):x.push(o)));const m=Vr(this.data,x);return!m&&!r&&!o&&s.indexOf(".")>-1&&(s=x[0],r=x[1],o=x.slice(2).join(".")),m||!h||!ye(o)?m:Ou((y=(g=this.data)==null?void 0:g[s])==null?void 0:y[r],o,f)}addResource(s,r,o,d){let f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const h=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let x=[s,r];o&&(x=x.concat(h?o.split(h):o)),s.indexOf(".")>-1&&(x=s.split("."),d=r,r=x[1]),this.addNamespaces(r),hm(this.data,x,d),f.silent||this.emit("added",s,r,o,d)}addResources(s,r,o){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const f in o)(ye(o[f])||Array.isArray(o[f]))&&this.addResource(s,r,f,o[f],{silent:!0});d.silent||this.emit("added",s,r,o)}addResourceBundle(s,r,o,d,f){let h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},x=[s,r];s.indexOf(".")>-1&&(x=s.split("."),d=o,o=r,r=x[1]),this.addNamespaces(r);let m=Vr(this.data,x)||{};h.skipCopy||(o=JSON.parse(JSON.stringify(o))),d?Ng(m,o,f):m={...m,...o},hm(this.data,x,m),h.silent||this.emit("added",s,r,o)}removeResourceBundle(s,r){this.hasResourceBundle(s,r)&&delete this.data[s][r],this.removeNamespaces(r),this.emit("removed",s,r)}hasResourceBundle(s,r){return this.getResource(s,r)!==void 0}getResourceBundle(s,r){return r||(r=this.options.defaultNS),this.getResource(s,r)}getDataByLanguage(s){return this.data[s]}hasLanguageSomeTranslations(s){const r=this.getDataByLanguage(s);return!!(r&&Object.keys(r)||[]).find(d=>r[d]&&Object.keys(r[d]).length>0)}toJSON(){return this.data}}var Eg={processors:{},addPostProcessor(l){this.processors[l.name]=l},handle(l,s,r,o,d){return l.forEach(f=>{var h;s=((h=this.processors[f])==null?void 0:h.process(s,r,o,d))??s}),s}};const gm={},pm=l=>!ye(l)&&typeof l!="boolean"&&typeof l!="number";class Kr extends Jr{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),v1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],s,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Pt.create("translator")}changeLanguage(s){s&&(this.language=s)}exists(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(s==null)return!1;const o=this.resolve(s,r);return(o==null?void 0:o.res)!==void 0}extractFromKey(s,r){let o=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const d=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let f=r.ns||this.options.defaultNS||[];const h=o&&s.indexOf(o)>-1,x=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!A1(s,o,d);if(h&&!x){const m=s.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:s,namespaces:ye(f)?[f]:f};const g=s.split(o);(o!==d||o===d&&this.options.ns.indexOf(g[0])>-1)&&(f=g.shift()),s=g.join(d)}return{key:s,namespaces:ye(f)?[f]:f}}translate(s,r,o){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),s==null)return"";Array.isArray(s)||(s=[String(s)]);const d=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,f=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:h,namespaces:x}=this.extractFromKey(s[s.length-1],r),m=x[x.length-1],g=r.lng||this.language,y=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((g==null?void 0:g.toLowerCase())==="cimode"){if(y){const le=r.nsSeparator||this.options.nsSeparator;return d?{res:`${m}${le}${h}`,usedKey:h,exactUsedKey:h,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:`${m}${le}${h}`}return d?{res:h,usedKey:h,exactUsedKey:h,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:h}const S=this.resolve(s,r);let v=S==null?void 0:S.res;const M=(S==null?void 0:S.usedKey)||h,N=(S==null?void 0:S.exactUsedKey)||h,j=["[object Number]","[object Function]","[object RegExp]"],k=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,E=r.count!==void 0&&!ye(r.count),O=Kr.hasDefaultValue(r),D=E?this.pluralResolver.getSuffix(g,r.count,r):"",U=r.ordinal&&E?this.pluralResolver.getSuffix(g,r.count,{ordinal:!1}):"",ne=E&&!r.ordinal&&r.count===0,$=ne&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${D}`]||r[`defaultValue${U}`]||r.defaultValue;let G=v;A&&!v&&O&&(G=$);const P=pm(G),J=Object.prototype.toString.apply(G);if(A&&G&&P&&j.indexOf(J)<0&&!(ye(k)&&Array.isArray(G))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const le=this.options.returnedObjectHandler?this.options.returnedObjectHandler(M,G,{...r,ns:x}):`key '${h} (${this.language})' returned an object instead of string.`;return d?(S.res=le,S.usedParams=this.getUsedParamsDetails(r),S):le}if(f){const le=Array.isArray(G),te=le?[]:{},se=le?N:M;for(const oe in G)if(Object.prototype.hasOwnProperty.call(G,oe)){const I=`${se}${f}${oe}`;O&&!v?te[oe]=this.translate(I,{...r,defaultValue:pm($)?$[oe]:void 0,joinArrays:!1,ns:x}):te[oe]=this.translate(I,{...r,joinArrays:!1,ns:x}),te[oe]===I&&(te[oe]=G[oe])}v=te}}else if(A&&ye(k)&&Array.isArray(v))v=v.join(k),v&&(v=this.extendTranslation(v,s,r,o));else{let le=!1,te=!1;!this.isValidLookup(v)&&O&&(le=!0,v=$),this.isValidLookup(v)||(te=!0,v=h);const oe=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:v,I=O&&$!==v&&this.options.updateMissing;if(te||le||I){if(this.logger.log(I?"updateKey":"missingKey",g,m,h,I?$:v),f){const fe=this.resolve(h,{...r,keySeparator:!1});fe&&fe.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 H=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let fe=0;fe<W.length;fe++)H.push(W[fe]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(r.lng||this.language):H.push(r.lng||this.language);const q=(fe,T,Y)=>{var X;const ee=O&&Y!==v?Y:oe;this.options.missingKeyHandler?this.options.missingKeyHandler(fe,m,T,ee,I,r):(X=this.backendConnector)!=null&&X.saveMissing&&this.backendConnector.saveMissing(fe,m,T,ee,I,r),this.emit("missingKey",fe,m,T,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?H.forEach(fe=>{const T=this.pluralResolver.getSuffixes(fe,r);ne&&r[`defaultValue${this.options.pluralSeparator}zero`]&&T.indexOf(`${this.options.pluralSeparator}zero`)<0&&T.push(`${this.options.pluralSeparator}zero`),T.forEach(Y=>{q([fe],h+Y,r[`defaultValue${Y}`]||$)})}):q(H,h,$))}v=this.extendTranslation(v,s,r,S,o),te&&v===h&&this.options.appendNamespaceToMissingKey&&(v=`${m}:${h}`),(te||le)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}:${h}`:h,le?v:void 0))}return d?(S.res=v,S.usedParams=this.getUsedParamsDetails(r),S):v}extendTranslation(s,r,o,d,f){var g,y;var h=this;if((g=this.i18nFormat)!=null&&g.parse)s=this.i18nFormat.parse(s,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||d.usedLng,d.usedNS,d.usedKey,{resolved:d});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const S=ye(s)&&(((y=o==null?void 0:o.interpolation)==null?void 0:y.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(S){const N=s.match(this.interpolator.nestingRegexp);v=N&&N.length}let M=o.replace&&!ye(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(M={...this.options.interpolation.defaultVariables,...M}),s=this.interpolator.interpolate(s,M,o.lng||this.language||d.usedLng,o),S){const N=s.match(this.interpolator.nestingRegexp),j=N&&N.length;v<j&&(o.nest=!1)}!o.lng&&d&&d.res&&(o.lng=this.language||d.usedLng),o.nest!==!1&&(s=this.interpolator.nest(s,function(){for(var N=arguments.length,j=new Array(N),k=0;k<N;k++)j[k]=arguments[k];return(f==null?void 0:f[0])===j[0]&&!o.context?(h.logger.warn(`It seems you are nesting recursively key: ${j[0]} in key: ${r[0]}`),null):h.translate(...j,r)},o)),o.interpolation&&this.interpolator.reset()}const x=o.postProcess||this.options.postProcess,m=ye(x)?[x]:x;return s!=null&&(m!=null&&m.length)&&o.applyPostProcessor!==!1&&(s=Eg.handle(m,s,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...d,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),s}resolve(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,d,f,h,x;return ye(s)&&(s=[s]),s.forEach(m=>{if(this.isValidLookup(o))return;const g=this.extractFromKey(m,r),y=g.key;d=y;let S=g.namespaces;this.options.fallbackNS&&(S=S.concat(this.options.fallbackNS));const v=r.count!==void 0&&!ye(r.count),M=v&&!r.ordinal&&r.count===0,N=r.context!==void 0&&(ye(r.context)||typeof r.context=="number")&&r.context!=="",j=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);S.forEach(k=>{var A,E;this.isValidLookup(o)||(x=k,!gm[`${j[0]}-${k}`]&&((A=this.utils)!=null&&A.hasLoadedNamespace)&&!((E=this.utils)!=null&&E.hasLoadedNamespace(x))&&(gm[`${j[0]}-${k}`]=!0,this.logger.warn(`key "${d}" for languages "${j.join(", ")}" won't get resolved as namespace "${x}" 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!!!")),j.forEach(O=>{var ne;if(this.isValidLookup(o))return;h=O;const D=[y];if((ne=this.i18nFormat)!=null&&ne.addLookupKeys)this.i18nFormat.addLookupKeys(D,y,O,k,r);else{let $;v&&($=this.pluralResolver.getSuffix(O,r.count,r));const G=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(D.push(y+$),r.ordinal&&$.indexOf(P)===0&&D.push(y+$.replace(P,this.options.pluralSeparator)),M&&D.push(y+G)),N){const J=`${y}${this.options.contextSeparator}${r.context}`;D.push(J),v&&(D.push(J+$),r.ordinal&&$.indexOf(P)===0&&D.push(J+$.replace(P,this.options.pluralSeparator)),M&&D.push(J+G))}}let U;for(;U=D.pop();)this.isValidLookup(o)||(f=U,o=this.getResource(O,k,U,r))}))})}),{res:o,usedKey:d,exactUsedKey:f,usedLng:h,usedNS:x}}isValidLookup(s){return s!==void 0&&!(!this.options.returnNull&&s===null)&&!(!this.options.returnEmptyString&&s==="")}getResource(s,r,o){var f;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(f=this.i18nFormat)!=null&&f.getResource?this.i18nFormat.getResource(s,r,o,d):this.resourceStore.getResource(s,r,o,d)}getUsedParamsDetails(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=s.replace&&!ye(s.replace);let d=o?s.replace:s;if(o&&typeof s.count<"u"&&(d.count=s.count),this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),!o){d={...d};for(const f of r)delete d[f]}return d}static hasDefaultValue(s){const r="defaultValue";for(const o in s)if(Object.prototype.hasOwnProperty.call(s,o)&&r===o.substring(0,r.length)&&s[o]!==void 0)return!0;return!1}}class xm{constructor(s){this.options=s,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pt.create("languageUtils")}getScriptPartFromCode(s){if(s=$r(s),!s||s.indexOf("-")<0)return null;const r=s.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(s){if(s=$r(s),!s||s.indexOf("-")<0)return s;const r=s.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(s){if(ye(s)&&s.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(s)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?s.toLowerCase():s)}return this.options.cleanCode||this.options.lowerCaseLng?s.toLowerCase():s}isSupportedCode(s){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(s=this.getLanguagePartFromCode(s)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(s)>-1}getBestMatchFromCodes(s){if(!s)return null;let r;return s.forEach(o=>{if(r)return;const d=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(d))&&(r=d)}),!r&&this.options.supportedLngs&&s.forEach(o=>{if(r)return;const d=this.getLanguagePartFromCode(o);if(this.isSupportedCode(d))return r=d;r=this.options.supportedLngs.find(f=>{if(f===d)return f;if(!(f.indexOf("-")<0&&d.indexOf("-")<0)&&(f.indexOf("-")>0&&d.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===d||f.indexOf(d)===0&&d.length>1))return f})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(s,r){if(!s)return[];if(typeof s=="function"&&(s=s(r)),ye(s)&&(s=[s]),Array.isArray(s))return s;if(!r)return s.default||[];let o=s[r];return o||(o=s[this.getScriptPartFromCode(r)]),o||(o=s[this.formatLanguageCode(r)]),o||(o=s[this.getLanguagePartFromCode(r)]),o||(o=s.default),o||[]}toResolveHierarchy(s,r){const o=this.getFallbackCodes(r||this.options.fallbackLng||[],s),d=[],f=h=>{h&&(this.isSupportedCode(h)?d.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return ye(s)&&(s.indexOf("-")>-1||s.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(s)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(s)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(s))):ye(s)&&f(this.formatLanguageCode(s)),o.forEach(h=>{d.indexOf(h)<0&&f(this.formatLanguageCode(h))}),d}}const ym={zero:0,one:1,two:2,few:3,many:4,other:5},bm={select:l=>l===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class O1{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=s,this.options=r,this.logger=Pt.create("pluralResolver"),this.pluralRulesCache={}}addRule(s,r){this.rules[s]=r}clearCache(){this.pluralRulesCache={}}getRule(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=$r(s==="dev"?"en":s),d=r.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:o,type:d});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let h;try{h=new Intl.PluralRules(o,{type:d})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),bm;if(!s.match(/-|_/))return bm;const m=this.languageUtils.getLanguagePartFromCode(s);h=this.getRule(m,r)}return this.pluralRulesCache[f]=h,h}needsPlural(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(s,r);return o||(o=this.getRule("dev",r)),(o==null?void 0:o.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(s,o).map(d=>`${r}${d}`)}getSuffixes(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(s,r);return o||(o=this.getRule("dev",r)),o?o.resolvedOptions().pluralCategories.sort((d,f)=>ym[d]-ym[f]).map(d=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${d}`):[]}getSuffix(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const d=this.getRule(s,o);return d?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${d.select(r)}`:(this.logger.warn(`no plural rule found for: ${s}`),this.getSuffix("dev",r,o))}}const vm=function(l,s,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,f=j1(l,s,r);return!f&&d&&ye(r)&&(f=Ou(l,r,o),f===void 0&&(f=Ou(s,r,o))),f},vu=l=>l.replace(/\$/g,"$$$$");class M1{constructor(){var r;let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Pt.create("interpolator"),this.options=s,this.format=((r=s==null?void 0:s.interpolation)==null?void 0:r.format)||(o=>o),this.init(s)}init(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};s.interpolation||(s.interpolation={escapeValue:!0});const{escape:r,escapeValue:o,useRawValueToEscape:d,prefix:f,prefixEscaped:h,suffix:x,suffixEscaped:m,formatSeparator:g,unescapeSuffix:y,unescapePrefix:S,nestingPrefix:v,nestingPrefixEscaped:M,nestingSuffix:N,nestingSuffixEscaped:j,nestingOptionsSeparator:k,maxReplaces:A,alwaysFormat:E}=s.interpolation;this.escape=r!==void 0?r:E1,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=d!==void 0?d:!1,this.prefix=f?Wn(f):h||"{{",this.suffix=x?Wn(x):m||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":S||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=v?Wn(v):M||Wn("$t("),this.nestingSuffix=N?Wn(N):j||Wn(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=A||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const s=(r,o)=>(r==null?void 0:r.source)===o?(r.lastIndex=0,r):new RegExp(o,"g");this.regexp=s(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=s(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=s(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(s,r,o,d){var M;let f,h,x;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=N=>{if(N.indexOf(this.formatSeparator)<0){const E=vm(r,m,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,o,{...d,...r,interpolationkey:N}):E}const j=N.split(this.formatSeparator),k=j.shift().trim(),A=j.join(this.formatSeparator).trim();return this.format(vm(r,m,k,this.options.keySeparator,this.options.ignoreJSONStructure),A,o,{...d,...r,interpolationkey:k})};this.resetRegExp();const y=(d==null?void 0:d.missingInterpolationHandler)||this.options.missingInterpolationHandler,S=((M=d==null?void 0:d.interpolation)==null?void 0:M.skipOnVariables)!==void 0?d.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>vu(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?vu(this.escape(N)):vu(N)}].forEach(N=>{for(x=0;f=N.regex.exec(s);){const j=f[1].trim();if(h=g(j),h===void 0)if(typeof y=="function"){const A=y(s,f,d);h=ye(A)?A:""}else if(d&&Object.prototype.hasOwnProperty.call(d,j))h="";else if(S){h=f[0];continue}else this.logger.warn(`missed to pass in variable ${j} for interpolating ${s}`),h="";else!ye(h)&&!this.useRawValueToEscape&&(h=cm(h));const k=N.safeValue(h);if(s=s.replace(f[0],k),S?(N.regex.lastIndex+=h.length,N.regex.lastIndex-=f[0].length):N.regex.lastIndex=0,x++,x>=this.maxReplaces)break}}),s}nest(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,f,h;const x=(m,g)=>{const y=this.nestingOptionsSeparator;if(m.indexOf(y)<0)return m;const S=m.split(new RegExp(`${y}[ ]*{`));let v=`{${S[1]}`;m=S[0],v=this.interpolate(v,h);const M=v.match(/'/g),N=v.match(/"/g);(((M==null?void 0:M.length)??0)%2===0&&!N||N.length%2!==0)&&(v=v.replace(/'/g,'"'));try{h=JSON.parse(v),g&&(h={...g,...h})}catch(j){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,j),`${m}${y}${v}`}return h.defaultValue&&h.defaultValue.indexOf(this.prefix)>-1&&delete h.defaultValue,m};for(;d=this.nestingRegexp.exec(s);){let m=[];h={...o},h=h.replace&&!ye(h.replace)?h.replace:h,h.applyPostProcessor=!1,delete h.defaultValue;let g=!1;if(d[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(d[1])){const y=d[1].split(this.formatSeparator).map(S=>S.trim());d[1]=y.shift(),m=y,g=!0}if(f=r(x.call(this,d[1].trim(),h),h),f&&d[0]===s&&!ye(f))return f;ye(f)||(f=cm(f)),f||(this.logger.warn(`missed to resolve ${d[1]} for nesting ${s}`),f=""),g&&(f=m.reduce((y,S)=>this.format(y,S,o.lng,{...o,interpolationkey:d[1].trim()}),f.trim())),s=s.replace(d[0],f),this.regexp.lastIndex=0}return s}}const z1=l=>{let s=l.toLowerCase().trim();const r={};if(l.indexOf("(")>-1){const o=l.split("(");s=o[0].toLowerCase().trim();const d=o[1].substring(0,o[1].length-1);s==="currency"&&d.indexOf(":")<0?r.currency||(r.currency=d.trim()):s==="relativetime"&&d.indexOf(":")<0?r.range||(r.range=d.trim()):d.split(";").forEach(h=>{if(h){const[x,...m]=h.split(":"),g=m.join(":").trim().replace(/^'+|'+$/g,""),y=x.trim();r[y]||(r[y]=g),g==="false"&&(r[y]=!1),g==="true"&&(r[y]=!0),isNaN(g)||(r[y]=parseInt(g,10))}})}return{formatName:s,formatOptions:r}},In=l=>{const s={};return(r,o,d)=>{let f=d;d&&d.interpolationkey&&d.formatParams&&d.formatParams[d.interpolationkey]&&d[d.interpolationkey]&&(f={...f,[d.interpolationkey]:void 0});const h=o+JSON.stringify(f);let x=s[h];return x||(x=l($r(o),d),s[h]=x),x(r)}};class D1{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Pt.create("formatter"),this.options=s,this.formats={number:In((r,o)=>{const d=new Intl.NumberFormat(r,{...o});return f=>d.format(f)}),currency:In((r,o)=>{const d=new Intl.NumberFormat(r,{...o,style:"currency"});return f=>d.format(f)}),datetime:In((r,o)=>{const d=new Intl.DateTimeFormat(r,{...o});return f=>d.format(f)}),relativetime:In((r,o)=>{const d=new Intl.RelativeTimeFormat(r,{...o});return f=>d.format(f,o.range||"day")}),list:In((r,o)=>{const d=new Intl.ListFormat(r,{...o});return f=>d.format(f)})},this.init(s)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(s,r){this.formats[s.toLowerCase().trim()]=r}addCached(s,r){this.formats[s.toLowerCase().trim()]=In(r)}format(s,r,o){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const f=r.split(this.formatSeparator);if(f.length>1&&f[0].indexOf("(")>1&&f[0].indexOf(")")<0&&f.find(x=>x.indexOf(")")>-1)){const x=f.findIndex(m=>m.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,x)].join(this.formatSeparator)}return f.reduce((x,m)=>{var S;const{formatName:g,formatOptions:y}=z1(m);if(this.formats[g]){let v=x;try{const M=((S=d==null?void 0:d.formatParams)==null?void 0:S[d.interpolationkey])||{},N=M.locale||M.lng||d.locale||d.lng||o;v=this.formats[g](x,N,{...y,...d,...M})}catch(M){this.logger.warn(M)}return v}else this.logger.warn(`there was no format function for ${g}`);return x},s)}}const U1=(l,s)=>{l.pending[s]!==void 0&&(delete l.pending[s],l.pendingCount--)};class L1 extends Jr{constructor(s,r,o){var f,h;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=s,this.store=r,this.services=o,this.languageUtils=o.languageUtils,this.options=d,this.logger=Pt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=d.maxParallelReads||10,this.readingCalls=0,this.maxRetries=d.maxRetries>=0?d.maxRetries:5,this.retryTimeout=d.retryTimeout>=1?d.retryTimeout:350,this.state={},this.queue=[],(h=(f=this.backend)==null?void 0:f.init)==null||h.call(f,o,d.backend,d)}queueLoad(s,r,o,d){const f={},h={},x={},m={};return s.forEach(g=>{let y=!0;r.forEach(S=>{const v=`${g}|${S}`;!o.reload&&this.store.hasResourceBundle(g,S)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?h[v]===void 0&&(h[v]=!0):(this.state[v]=1,y=!1,h[v]===void 0&&(h[v]=!0),f[v]===void 0&&(f[v]=!0),m[S]===void 0&&(m[S]=!0)))}),y||(x[g]=!0)}),(Object.keys(f).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:d}),{toLoad:Object.keys(f),pending:Object.keys(h),toLoadLanguages:Object.keys(x),toLoadNamespaces:Object.keys(m)}}loaded(s,r,o){const d=s.split("|"),f=d[0],h=d[1];r&&this.emit("failedLoading",f,h,r),!r&&o&&this.store.addResourceBundle(f,h,o,void 0,void 0,{skipCopy:!0}),this.state[s]=r?-1:2,r&&o&&(this.state[s]=0);const x={};this.queue.forEach(m=>{S1(m.loaded,[f],h),U1(m,s),r&&m.errors.push(r),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(g=>{x[g]||(x[g]={});const y=m.loaded[g];y.length&&y.forEach(S=>{x[g][S]===void 0&&(x[g][S]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",x),this.queue=this.queue.filter(m=>!m.done)}read(s,r,o){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!s.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:s,ns:r,fcName:o,tried:d,wait:f,callback:h});return}this.readingCalls++;const x=(g,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const S=this.waitingReads.shift();this.read(S.lng,S.ns,S.fcName,S.tried,S.wait,S.callback)}if(g&&y&&d<this.maxRetries){setTimeout(()=>{this.read.call(this,s,r,o,d+1,f*2,h)},f);return}h(g,y)},m=this.backend[o].bind(this.backend);if(m.length===2){try{const g=m(s,r);g&&typeof g.then=="function"?g.then(y=>x(null,y)).catch(x):x(null,g)}catch(g){x(g)}return}return m(s,r,x)}prepareLoading(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=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."),d&&d();ye(s)&&(s=this.languageUtils.toResolveHierarchy(s)),ye(r)&&(r=[r]);const f=this.queueLoad(s,r,o,d);if(!f.toLoad.length)return f.pending.length||d(),null;f.toLoad.forEach(h=>{this.loadOne(h)})}load(s,r,o){this.prepareLoading(s,r,{},o)}reload(s,r,o){this.prepareLoading(s,r,{reload:!0},o)}loadOne(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const o=s.split("|"),d=o[0],f=o[1];this.read(d,f,"read",void 0,void 0,(h,x)=>{h&&this.logger.warn(`${r}loading namespace ${f} for language ${d} failed`,h),!h&&x&&this.logger.log(`${r}loaded namespace ${f} for language ${d}`,x),this.loaded(s,h,x)})}saveMissing(s,r,o,d,f){var m,g,y,S,v;let h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},x=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((g=(m=this.services)==null?void 0:m.utils)!=null&&g.hasLoadedNamespace&&!((S=(y=this.services)==null?void 0:y.utils)!=null&&S.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${o}" as the namespace "${r}" 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(!(o==null||o==="")){if((v=this.backend)!=null&&v.create){const M={...h,isUpdate:f},N=this.backend.create.bind(this.backend);if(N.length<6)try{let j;N.length===5?j=N(s,r,o,d,M):j=N(s,r,o,d),j&&typeof j.then=="function"?j.then(k=>x(null,k)).catch(x):x(null,j)}catch(j){x(j)}else N(s,r,o,d,x,M)}!s||!s[0]||this.store.addResource(s[0],r,o,d)}}}const wm=()=>({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:l=>{let s={};if(typeof l[1]=="object"&&(s=l[1]),ye(l[1])&&(s.defaultValue=l[1]),ye(l[2])&&(s.tDescription=l[2]),typeof l[2]=="object"||typeof l[3]=="object"){const r=l[3]||l[2];Object.keys(r).forEach(o=>{s[o]=r[o]})}return s},interpolation:{escapeValue:!0,format:l=>l,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Sm=l=>{var s,r;return ye(l.ns)&&(l.ns=[l.ns]),ye(l.fallbackLng)&&(l.fallbackLng=[l.fallbackLng]),ye(l.fallbackNS)&&(l.fallbackNS=[l.fallbackNS]),((r=(s=l.supportedLngs)==null?void 0:s.indexOf)==null?void 0:r.call(s,"cimode"))<0&&(l.supportedLngs=l.supportedLngs.concat(["cimode"])),typeof l.initImmediate=="boolean"&&(l.initAsync=l.initImmediate),l},Hr=()=>{},_1=l=>{Object.getOwnPropertyNames(Object.getPrototypeOf(l)).forEach(r=>{typeof l[r]=="function"&&(l[r]=l[r].bind(l))})};class ms extends Jr{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Sm(s),this.services={},this.logger=Pt,this.modules={external:[]},_1(this),r&&!this.isInitialized&&!s.isClone){if(!this.options.initAsync)return this.init(s,r),this;setTimeout(()=>{this.init(s,r)},0)}}init(){var s=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(o=r,r={}),r.defaultNS==null&&r.ns&&(ye(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const d=wm();this.options={...d,...this.options,...Sm(r)},this.options.interpolation={...d.interpolation,...this.options.interpolation},r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const f=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?Pt.init(f(this.modules.logger),this.options):Pt.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:y=D1;const S=new xm(this.options);this.store=new mm(this.options.resources,this.options);const v=this.services;v.logger=Pt,v.resourceStore=this.store,v.languageUtils=S,v.pluralResolver=new O1(S,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),y&&(!this.options.interpolation.format||this.options.interpolation.format===d.interpolation.format)&&(v.formatter=f(y),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new M1(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new L1(f(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",function(M){for(var N=arguments.length,j=new Array(N>1?N-1:0),k=1;k<N;k++)j[k-1]=arguments[k];s.emit(M,...j)}),this.modules.languageDetector&&(v.languageDetector=f(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=f(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new Kr(this.services,this.options),this.translator.on("*",function(M){for(var N=arguments.length,j=new Array(N>1?N-1:0),k=1;k<N;k++)j[k-1]=arguments[k];s.emit(M,...j)}),this.modules.external.forEach(M=>{M.init&&M.init(this)})}if(this.format=this.options.interpolation.format,o||(o=Hr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[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(y=>{this[y]=function(){return s.store[y](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=function(){return s.store[y](...arguments),s}});const m=us(),g=()=>{const y=(S,v)=>{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),m.resolve(v),o(S,v)};if(this.languages&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}loadResources(s){var f,h;let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hr;const d=ye(s)?s:this.language;if(typeof s=="function"&&(o=s),!this.options.resources||this.options.partialBundledLanguages){if((d==null?void 0:d.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const x=[],m=g=>{if(!g||g==="cimode")return;this.services.languageUtils.toResolveHierarchy(g).forEach(S=>{S!=="cimode"&&x.indexOf(S)<0&&x.push(S)})};d?m(d):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>m(y)),(h=(f=this.options.preload)==null?void 0:f.forEach)==null||h.call(f,g=>m(g)),this.services.backendConnector.load(x,this.options.ns,g=>{!g&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(g)})}else o(null)}reloadResources(s,r,o){const d=us();return typeof s=="function"&&(o=s,s=void 0),typeof r=="function"&&(o=r,r=void 0),s||(s=this.languages),r||(r=this.options.ns),o||(o=Hr),this.services.backendConnector.reload(s,r,f=>{d.resolve(),o(f)}),d}use(s){if(!s)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!s.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return s.type==="backend"&&(this.modules.backend=s),(s.type==="logger"||s.log&&s.warn&&s.error)&&(this.modules.logger=s),s.type==="languageDetector"&&(this.modules.languageDetector=s),s.type==="i18nFormat"&&(this.modules.i18nFormat=s),s.type==="postProcessor"&&Eg.addPostProcessor(s),s.type==="formatter"&&(this.modules.formatter=s),s.type==="3rdParty"&&this.modules.external.push(s),this}setResolvedLanguage(s){if(!(!s||!this.languages)&&!(["cimode","dev"].indexOf(s)>-1))for(let r=0;r<this.languages.length;r++){const o=this.languages[r];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}changeLanguage(s,r){var o=this;this.isLanguageChangingTo=s;const d=us();this.emit("languageChanging",s);const f=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},h=(m,g)=>{g?(f(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,d.resolve(function(){return o.t(...arguments)}),r&&r(m,function(){return o.t(...arguments)})},x=m=>{var y,S;!s&&!m&&this.services.languageDetector&&(m=[]);const g=ye(m)?m:this.services.languageUtils.getBestMatchFromCodes(m);g&&(this.language||f(g),this.translator.language||this.translator.changeLanguage(g),(S=(y=this.services.languageDetector)==null?void 0:y.cacheUserLanguage)==null||S.call(y,g)),this.loadResources(g,v=>{h(v,g)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?x(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(x):this.services.languageDetector.detect(x):x(s),d}getFixedT(s,r,o){var d=this;const f=function(h,x){let m;if(typeof x!="object"){for(var g=arguments.length,y=new Array(g>2?g-2:0),S=2;S<g;S++)y[S-2]=arguments[S];m=d.options.overloadTranslationOptionHandler([h,x].concat(y))}else m={...x};m.lng=m.lng||f.lng,m.lngs=m.lngs||f.lngs,m.ns=m.ns||f.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||o||f.keyPrefix);const v=d.options.keySeparator||".";let M;return m.keyPrefix&&Array.isArray(h)?M=h.map(N=>`${m.keyPrefix}${v}${N}`):M=m.keyPrefix?`${m.keyPrefix}${v}${h}`:h,d.t(M,m)};return ye(s)?f.lng=s:f.lngs=s,f.ns=r,f.keyPrefix=o,f}t(){var d;for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return(d=this.translator)==null?void 0:d.translate(...r)}exists(){var d;for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return(d=this.translator)==null?void 0:d.exists(...r)}setDefaultNamespace(s){this.options.defaultNS=s}hasLoadedNamespace(s){let r=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 o=r.lng||this.resolvedLanguage||this.languages[0],d=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const h=(x,m)=>{const g=this.services.backendConnector.state[`${x}|${m}`];return g===-1||g===0||g===2};if(r.precheck){const x=r.precheck(this,h);if(x!==void 0)return x}return!!(this.hasResourceBundle(o,s)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(o,s)&&(!d||h(f,s)))}loadNamespaces(s,r){const o=us();return this.options.ns?(ye(s)&&(s=[s]),s.forEach(d=>{this.options.ns.indexOf(d)<0&&this.options.ns.push(d)}),this.loadResources(d=>{o.resolve(),r&&r(d)}),o):(r&&r(),Promise.resolve())}loadLanguages(s,r){const o=us();ye(s)&&(s=[s]);const d=this.options.preload||[],f=s.filter(h=>d.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return f.length?(this.options.preload=d.concat(f),this.loadResources(h=>{o.resolve(),r&&r(h)}),o):(r&&r(),Promise.resolve())}dir(s){var d,f;if(s||(s=this.resolvedLanguage||(((d=this.languages)==null?void 0:d.length)>0?this.languages[0]:this.language)),!s)return"rtl";const r=["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"],o=((f=this.services)==null?void 0:f.languageUtils)||new xm(wm());return r.indexOf(o.getLanguagePartFromCode(s))>-1||s.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new ms(s,r)}cloneInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hr;const o=s.forkResourceStore;o&&delete s.forkResourceStore;const d={...this.options,...s,isClone:!0},f=new ms(d);if((s.debug!==void 0||s.prefix!==void 0)&&(f.logger=f.logger.clone(s)),["store","services","language"].forEach(x=>{f[x]=this[x]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},o){const x=Object.keys(this.store.data).reduce((m,g)=>(m[g]={...this.store.data[g]},Object.keys(m[g]).reduce((y,S)=>(y[S]={...m[g][S]},y),{})),{});f.store=new mm(x,d),f.services.resourceStore=f.store}return f.translator=new Kr(f.services,d),f.translator.on("*",function(x){for(var m=arguments.length,g=new Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];f.emit(x,...g)}),f.init(d,r),f.translator.options=d,f.translator.backendConnector.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ut=ms.createInstance();ut.createInstance=ms.createInstance;ut.createInstance;ut.dir;ut.init;ut.loadResources;ut.reloadResources;ut.use;ut.changeLanguage;ut.getFixedT;ut.t;ut.exists;ut.setDefaultNamespace;ut.hasLoadedNamespace;ut.loadNamespaces;ut.loadLanguages;const{slice:H1,forEach:B1}=[];function q1(l){return B1.call(H1.call(arguments,1),s=>{if(s)for(const r in s)l[r]===void 0&&(l[r]=s[r])}),l}function G1(l){return typeof l!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(l))}const jm=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,V1=function(l,s){const o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},d=encodeURIComponent(s);let f=`${l}=${d}`;if(o.maxAge>0){const h=o.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");f+=`; Max-Age=${Math.floor(h)}`}if(o.domain){if(!jm.test(o.domain))throw new TypeError("option domain is invalid");f+=`; Domain=${o.domain}`}if(o.path){if(!jm.test(o.path))throw new TypeError("option path is invalid");f+=`; Path=${o.path}`}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");f+=`; Expires=${o.expires.toUTCString()}`}if(o.httpOnly&&(f+="; HttpOnly"),o.secure&&(f+="; Secure"),o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(f+="; Partitioned"),f},Nm={create(l,s,r,o){let d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(d.expires=new Date,d.expires.setTime(d.expires.getTime()+r*60*1e3)),o&&(d.domain=o),document.cookie=V1(l,encodeURIComponent(s),d)},read(l){const s=`${l}=`,r=document.cookie.split(";");for(let o=0;o<r.length;o++){let d=r[o];for(;d.charAt(0)===" ";)d=d.substring(1,d.length);if(d.indexOf(s)===0)return d.substring(s.length,d.length)}return null},remove(l){this.create(l,"",-1)}};var $1={name:"cookie",lookup(l){let{lookupCookie:s}=l;if(s&&typeof document<"u")return Nm.read(s)||void 0},cacheUserLanguage(l,s){let{lookupCookie:r,cookieMinutes:o,cookieDomain:d,cookieOptions:f}=s;r&&typeof document<"u"&&Nm.create(r,l,o,d,f)}},Y1={name:"querystring",lookup(l){var o;let{lookupQuerystring:s}=l,r;if(typeof window<"u"){let{search:d}=window.location;!window.location.search&&((o=window.location.hash)==null?void 0:o.indexOf("?"))>-1&&(d=window.location.hash.substring(window.location.hash.indexOf("?")));const h=d.substring(1).split("&");for(let x=0;x<h.length;x++){const m=h[x].indexOf("=");m>0&&h[x].substring(0,m)===s&&(r=h[x].substring(m+1))}}return r}};let el=null;const Em=()=>{if(el!==null)return el;try{if(el=typeof window<"u"&&window.localStorage!==null,!el)return!1;const l="i18next.translate.boo";window.localStorage.setItem(l,"foo"),window.localStorage.removeItem(l)}catch{el=!1}return el};var K1={name:"localStorage",lookup(l){let{lookupLocalStorage:s}=l;if(s&&Em())return window.localStorage.getItem(s)||void 0},cacheUserLanguage(l,s){let{lookupLocalStorage:r}=s;r&&Em()&&window.localStorage.setItem(r,l)}};let tl=null;const Cm=()=>{if(tl!==null)return tl;try{if(tl=typeof window<"u"&&window.sessionStorage!==null,!tl)return!1;const l="i18next.translate.boo";window.sessionStorage.setItem(l,"foo"),window.sessionStorage.removeItem(l)}catch{tl=!1}return tl};var Q1={name:"sessionStorage",lookup(l){let{lookupSessionStorage:s}=l;if(s&&Cm())return window.sessionStorage.getItem(s)||void 0},cacheUserLanguage(l,s){let{lookupSessionStorage:r}=s;r&&Cm()&&window.sessionStorage.setItem(r,l)}},X1={name:"navigator",lookup(l){const s=[];if(typeof navigator<"u"){const{languages:r,userLanguage:o,language:d}=navigator;if(r)for(let f=0;f<r.length;f++)s.push(r[f]);o&&s.push(o),d&&s.push(d)}return s.length>0?s:void 0}},Z1={name:"htmlTag",lookup(l){let{htmlTag:s}=l,r;const o=s||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(r=o.getAttribute("lang")),r}},P1={name:"path",lookup(l){var d;let{lookupFromPathIndex:s}=l;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(d=r[typeof s=="number"?s:0])==null?void 0:d.replace("/",""):void 0}},J1={name:"subdomain",lookup(l){var d,f;let{lookupFromSubdomainIndex:s}=l;const r=typeof s=="number"?s+1:1,o=typeof window<"u"&&((f=(d=window.location)==null?void 0:d.hostname)==null?void 0:f.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(o)return o[r]}};let Cg=!1;try{document.cookie,Cg=!0}catch{}const kg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Cg||kg.splice(1,1);const F1=()=>({order:kg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:l=>l});class Tg{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(s,r)}init(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=s,this.options=q1(r,this.options||{},F1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=d=>d.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector($1),this.addDetector(Y1),this.addDetector(K1),this.addDetector(Q1),this.addDetector(X1),this.addDetector(Z1),this.addDetector(P1),this.addDetector(J1)}addDetector(s){return this.detectors[s.name]=s,this}detect(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return s.forEach(o=>{if(this.detectors[o]){let d=this.detectors[o].lookup(this.options);d&&typeof d=="string"&&(d=[d]),d&&(r=r.concat(d))}}),r=r.filter(o=>o!=null&&!G1(o)).map(o=>this.options.convertDetectedLanguage(o)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(s)>-1||r.forEach(o=>{this.detectors[o]&&this.detectors[o].cacheUserLanguage(s,this.options)}))}}Tg.type="languageDetector";const W1={title:"MCP Hub Dashboard",error:"Error",closeButton:"Close",noServers:"No MCP servers available",loading:"Loading...",logout:"Logout",profile:"Profile",changePassword:"Change Password",toggleSidebar:"Toggle Sidebar",welcomeUser:"Welcome, {{username}}",name:"MCP Hub"},I1={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..."},e2={viewProfile:"View profile",userCenter:"User Center"},t2={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"},a2={label:"WeChat",title:"Connect via WeChat",qrCodeAlt:"WeChat QR Code",scanMessage:"Scan this QR code to connect with us on WeChat"},n2={label:"Discord",title:"Join our Discord server",community:"Join our growing community on Discord for support, discussions, and updates!"},l2={title:"Theme",light:"Light",dark:"Dark",system:"System"},s2={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"},r2={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",headers:"HTTP Headers",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"},i2={online:"Online",offline:"Offline",connecting:"Connecting"},o2={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",failedToUpdateSmartRoutingConfig:"Failed to update smart routing configuration"},u2={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"},c2={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market",logs:"Logs"},d2={dashboard:{title:"Dashboard",totalServers:"Total",onlineServers:"Online",offlineServers:"Offline",connectingServers:"Connecting",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",installConfig:"Installation",smartRouting:"Smart Routing"},market:{title:"Server Market - (Data from mcpm.sh)"},logs:{title:"System Logs"}},f2={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"},h2={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"},m2={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"},g2={run:"Run",running:"Running...",runTool:"Run Tool",cancel:"Cancel",noDescription:"No description available",inputSchema:"Input Schema:",runToolWithName:"Run Tool: {{name}}",execution:"Tool Execution",successful:"Successful",failed:"Failed",result:"Result:",error:"Error",errorDetails:"Error Details:",noContent:"Tool executed successfully but returned no content.",unknownError:"Unknown error occurred",jsonResponse:"JSON Response:",toolResult:"Tool result",noParameters:"This tool does not require any parameters.",selectOption:"Select an option",enterValue:"Enter {{type}} value",enabled:"Enabled",enableSuccess:"Tool {{name}} enabled successfully",disableSuccess:"Tool {{name}} disabled successfully",toggleFailed:"Failed to toggle tool status"},p2={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",systemConfigUpdated:"System configuration updated successfully",enableSmartRouting:"Enable Smart Routing",enableSmartRoutingDescription:"Enable smart routing feature to search the most suitable tool based on input (using $smart group name)",dbUrl:"PostgreSQL URL (requires pgvector support)",dbUrlPlaceholder:"e.g. postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"OpenAI API Base URL",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API Key",openaiApiKeyPlaceholder:"Enter OpenAI API key",openaiApiEmbeddingModel:"OpenAI Embedding Model",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"Smart routing configuration updated successfully",smartRoutingRequiredFields:"Database URL and OpenAI API Key are required to enable smart routing",smartRoutingValidationError:"Please fill in the required fields before enabling Smart Routing: {{fields}}"},x2={app:W1,about:I1,profile:e2,sponsor:t2,wechat:a2,discord:n2,theme:l2,auth:s2,server:r2,status:i2,errors:o2,common:u2,nav:c2,pages:d2,logs:f2,groups:h2,market:m2,tool:g2,settings:p2},y2={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},b2={title:"关于",versionInfo:"MCP Hub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本",newVersionAvailable:"新版本 {{version}} 已发布",viewOnGitHub:"在 GitHub 上查看",checkForUpdates:"检查更新",checking:"检查更新中..."},v2={viewProfile:"查看个人中心",userCenter:"个人中心"},w2={label:"赞助",title:"支持项目",rewardAlt:"赞赏码",supportMessage:"通过捐赠支持 MCP Hub 的开发!",supportButton:"在 Ko-fi 上支持"},S2={label:"微信",title:"微信联系",qrCodeAlt:"微信二维码",scanMessage:"扫描二维码添加微信"},j2={label:"Discord",title:"加入我们的 Discord 服务器",community:"加入我们不断壮大的 Discord 社区,获取支持、参与讨论并了解最新动态!"},N2={title:"主题",light:"浅色",dark:"深色",system:"系统"},E2={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},C2={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:"环境变量",headers:"HTTP 请求头",key:"键",value:"值",enabled:"已启用",enable:"启用",disable:"禁用",remove:"移除",toggleError:"切换服务器 {{serverName}} 状态失败",alreadyExists:"服务器 {{serverName}} 已经存在",invalidData:"提供的服务器数据无效",notFound:"找不到服务器 {{serverName}}",namePlaceholder:"请输入服务器名称",urlPlaceholder:"请输入服务器URL",commandPlaceholder:"请输入命令",argumentsPlaceholder:"请输入参数",errorDetails:"错误详情",viewErrorDetails:"查看错误详情"},k2={online:"在线",offline:"离线",connecting:"连接中"},T2={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败",failedToUpdateSmartRoutingConfig:"更新智能路由配置失败"},A2={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",close:"关闭"},R2={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场",logs:"日志"},O2={dashboard:{title:"仪表盘",totalServers:"总数",onlineServers:"在线",offlineServers:"离线",connectingServers:"连接中",recentServers:"最近的服务器"},servers:{title:"服务器管理"},settings:{title:"设置",language:"语言",account:"账户设置",password:"修改密码",appearance:"外观",routeConfig:"安全配置",installConfig:"安装",smartRouting:"智能路由"},groups:{title:"分组管理"},market:{title:"服务器市场 - (数据来源于 mcpm.sh)"},logs:{title:"系统日志"}},M2={filters:"筛选",search:"搜索日志...",autoScroll:"自动滚动",clearLogs:"清除日志",loading:"加载日志中...",noLogs:"暂无日志。",noMatch:"没有匹配当前筛选条件的日志。",mainProcess:"主进程",childProcess:"子进程",main:"主",child:"子"},z2={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}} 台服务器"},D2={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:"每页显示"},U2={run:"运行",running:"运行中...",runTool:"运行工具",cancel:"取消",noDescription:"无描述信息",inputSchema:"输入模式:",runToolWithName:"运行工具:{{name}}",execution:"工具执行",successful:"成功",failed:"失败",result:"结果:",error:"错误",errorDetails:"错误详情:",noContent:"工具执行成功但未返回内容。",unknownError:"发生未知错误",jsonResponse:"JSON 响应:",toolResult:"工具结果",noParameters:"此工具不需要任何参数。",selectOption:"选择一个选项",enterValue:"输入{{type}}值",enabled:"已启用",enableSuccess:"工具 {{name}} 启用成功",disableSuccess:"工具 {{name}} 禁用成功",toggleFailed:"切换工具状态失败"},L2={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:"系统配置更新成功",enableSmartRouting:"启用智能路由",enableSmartRoutingDescription:"开启智能路由功能,根据输入自动搜索最合适的工具(使用 $smart 分组)",dbUrl:"PostgreSQL 连接地址(必须支持 pgvector)",dbUrlPlaceholder:"例如: postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"OpenAI API 基础地址",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API 密钥",openaiApiKeyDescription:"用于访问 OpenAI API 的密钥",openaiApiKeyPlaceholder:"请输入 OpenAI API 密钥",openaiApiEmbeddingModel:"OpenAI 嵌入模型",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"智能路由配置更新成功",smartRoutingRequiredFields:"启用智能路由需要填写数据库连接地址和 OpenAI API 密钥",smartRoutingValidationError:"启用智能路由前请先填写必要字段:{{fields}}"},_2={app:y2,about:b2,profile:v2,sponsor:w2,wechat:S2,discord:j2,theme:N2,auth:E2,server:C2,status:k2,errors:T2,common:A2,nav:R2,pages:O2,logs:M2,groups:z2,market:D2,tool:U2,settings:L2};ut.use(Tg).use(yv).init({resources:{en:{translation:x2},zh:{translation:_2}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});async function H2(){try{console.log("Loading runtime configuration...");const l=await Dy();console.log("Runtime configuration loaded:",l),window.__MCPHUB_CONFIG__=l,Xh.createRoot(document.getElementById("root")).render(u.jsx(wu.StrictMode,{children:u.jsx(um,{})}))}catch(l){console.error("Failed to initialize app:",l),console.log("Starting app with default configuration..."),window.__MCPHUB_CONFIG__={basePath:"",version:"dev",name:"mcphub"},Xh.createRoot(document.getElementById("root")).render(u.jsx(wu.StrictMode,{children:u.jsx(um,{})}))}}H2();
|
|
168
|
-
//# sourceMappingURL=index-CzkrFruH.js.map
|