agent-dj 0.1.2 โ 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -7
- package/dist/cli.js +116 -3
- package/dist/server.js +97 -3
- package/package.json +1 -1
- package/web/dist/assets/index-BprVp71W.js +348 -0
- package/web/dist/assets/index-tOqJ_oLn.css +1 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-CVUo4o24.js +0 -348
- package/web/dist/assets/index-MHuCb1sM.css +0 -1
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function l(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=l(n);fetch(n.href,i)}})();function xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yf={exports:{}},$i={};/**
|
|
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 Wh=Symbol.for("react.transitional.element"),Fh=Symbol.for("react.fragment");function gf(e,t,l){var a=null;if(l!==void 0&&(a=""+l),t.key!==void 0&&(a=""+t.key),"key"in t){l={};for(var n in t)n!=="key"&&(l[n]=t[n])}else l=t;return t=l.ref,{$$typeof:Wh,type:e,key:a,ref:t!==void 0?t:null,props:l}}$i.Fragment=Fh;$i.jsx=gf;$i.jsxs=gf;yf.exports=$i;var s=yf.exports,pf={exports:{}},R={};/**
|
|
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 sc=Symbol.for("react.transitional.element"),Ih=Symbol.for("react.portal"),Ph=Symbol.for("react.fragment"),e0=Symbol.for("react.strict_mode"),t0=Symbol.for("react.profiler"),l0=Symbol.for("react.consumer"),a0=Symbol.for("react.context"),n0=Symbol.for("react.forward_ref"),i0=Symbol.for("react.suspense"),u0=Symbol.for("react.memo"),vf=Symbol.for("react.lazy"),s0=Symbol.for("react.activity"),br=Symbol.iterator;function c0(e){return e===null||typeof e!="object"?null:(e=br&&e[br]||e["@@iterator"],typeof e=="function"?e:null)}var bf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sf=Object.assign,jf={};function xa(e,t,l){this.props=e,this.context=t,this.refs=jf,this.updater=l||bf}xa.prototype.isReactComponent={};xa.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nf(){}Nf.prototype=xa.prototype;function cc(e,t,l){this.props=e,this.context=t,this.refs=jf,this.updater=l||bf}var rc=cc.prototype=new Nf;rc.constructor=cc;Sf(rc,xa.prototype);rc.isPureReactComponent=!0;var Sr=Array.isArray;function us(){}var ee={H:null,A:null,T:null,S:null},Ef=Object.prototype.hasOwnProperty;function oc(e,t,l){var a=l.ref;return{$$typeof:sc,type:e,key:t,ref:a!==void 0?a:null,props:l}}function r0(e,t){return oc(e.type,t,e.props)}function fc(e){return typeof e=="object"&&e!==null&&e.$$typeof===sc}function o0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(l){return t[l]})}var jr=/\/+/g;function pu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?o0(""+e.key):t.toString(36)}function f0(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(us,us):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ul(e,t,l,a,n){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var u=!1;if(e===null)u=!0;else switch(i){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case sc:case Ih:u=!0;break;case vf:return u=e._init,Ul(u(e._payload),t,l,a,n)}}if(u)return n=n(e),u=a===""?"."+pu(e,0):a,Sr(n)?(l="",u!=null&&(l=u.replace(jr,"$&/")+"/"),Ul(n,t,l,"",function(f){return f})):n!=null&&(fc(n)&&(n=r0(n,l+(n.key==null||e&&e.key===n.key?"":(""+n.key).replace(jr,"$&/")+"/")+u)),t.push(n)),1;u=0;var c=a===""?".":a+":";if(Sr(e))for(var r=0;r<e.length;r++)a=e[r],i=c+pu(a,r),u+=Ul(a,t,l,i,n);else if(r=c0(e),typeof r=="function")for(e=r.call(e),r=0;!(a=e.next()).done;)a=a.value,i=c+pu(a,r++),u+=Ul(a,t,l,i,n);else if(i==="object"){if(typeof e.then=="function")return Ul(f0(e),t,l,a,n);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return u}function Un(e,t,l){if(e==null)return e;var a=[],n=0;return Ul(e,a,"","",function(i){return t.call(l,i,n++)}),a}function d0(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(l){(e._status===0||e._status===-1)&&(e._status=1,e._result=l)},function(l){(e._status===0||e._status===-1)&&(e._status=2,e._result=l)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}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)},m0={map:Un,forEach:function(e,t,l){Un(e,function(){t.apply(this,arguments)},l)},count:function(e){var t=0;return Un(e,function(){t++}),t},toArray:function(e){return Un(e,function(t){return t})||[]},only:function(e){if(!fc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};R.Activity=s0;R.Children=m0;R.Component=xa;R.Fragment=Ph;R.Profiler=t0;R.PureComponent=cc;R.StrictMode=e0;R.Suspense=i0;R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ee;R.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ee.H.useMemoCache(e)}};R.cache=function(e){return function(){return e.apply(null,arguments)}};R.cacheSignal=function(){return null};R.cloneElement=function(e,t,l){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=Sf({},e.props),n=e.key;if(t!=null)for(i in t.key!==void 0&&(n=""+t.key),t)!Ef.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(a[i]=t[i]);var i=arguments.length-2;if(i===1)a.children=l;else if(1<i){for(var u=Array(i),c=0;c<i;c++)u[c]=arguments[c+2];a.children=u}return oc(e.type,n,a)};R.createContext=function(e){return e={$$typeof:a0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:l0,_context:e},e};R.createElement=function(e,t,l){var a,n={},i=null;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)Ef.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(n[a]=t[a]);var u=arguments.length-2;if(u===1)n.children=l;else if(1<u){for(var c=Array(u),r=0;r<u;r++)c[r]=arguments[r+2];n.children=c}if(e&&e.defaultProps)for(a in u=e.defaultProps,u)n[a]===void 0&&(n[a]=u[a]);return oc(e,i,n)};R.createRef=function(){return{current:null}};R.forwardRef=function(e){return{$$typeof:n0,render:e}};R.isValidElement=fc;R.lazy=function(e){return{$$typeof:vf,_payload:{_status:-1,_result:e},_init:d0}};R.memo=function(e,t){return{$$typeof:u0,type:e,compare:t===void 0?null:t}};R.startTransition=function(e){var t=ee.T,l={};ee.T=l;try{var a=e(),n=ee.S;n!==null&&n(l,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(us,Nr)}catch(i){Nr(i)}finally{t!==null&&l.types!==null&&(t.types=l.types),ee.T=t}};R.unstable_useCacheRefresh=function(){return ee.H.useCacheRefresh()};R.use=function(e){return ee.H.use(e)};R.useActionState=function(e,t,l){return ee.H.useActionState(e,t,l)};R.useCallback=function(e,t){return ee.H.useCallback(e,t)};R.useContext=function(e){return ee.H.useContext(e)};R.useDebugValue=function(){};R.useDeferredValue=function(e,t){return ee.H.useDeferredValue(e,t)};R.useEffect=function(e,t){return ee.H.useEffect(e,t)};R.useEffectEvent=function(e){return ee.H.useEffectEvent(e)};R.useId=function(){return ee.H.useId()};R.useImperativeHandle=function(e,t,l){return ee.H.useImperativeHandle(e,t,l)};R.useInsertionEffect=function(e,t){return ee.H.useInsertionEffect(e,t)};R.useLayoutEffect=function(e,t){return ee.H.useLayoutEffect(e,t)};R.useMemo=function(e,t){return ee.H.useMemo(e,t)};R.useOptimistic=function(e,t){return ee.H.useOptimistic(e,t)};R.useReducer=function(e,t,l){return ee.H.useReducer(e,t,l)};R.useRef=function(e){return ee.H.useRef(e)};R.useState=function(e){return ee.H.useState(e)};R.useSyncExternalStore=function(e,t,l){return ee.H.useSyncExternalStore(e,t,l)};R.useTransition=function(){return ee.H.useTransition()};R.version="19.2.4";pf.exports=R;var p=pf.exports;const Ra=xf(p);var Af={exports:{}},Wi={},Tf={exports:{}},Cf={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(C,k){var L=C.length;C.push(k);e:for(;0<L;){var ue=L-1>>>1,ye=C[ue];if(0<n(ye,k))C[ue]=k,C[L]=ye,L=ue;else break e}}function l(C){return C.length===0?null:C[0]}function a(C){if(C.length===0)return null;var k=C[0],L=C.pop();if(L!==k){C[0]=L;e:for(var ue=0,ye=C.length,Dn=ye>>>1;ue<Dn;){var _n=2*(ue+1)-1,gu=C[_n],dl=_n+1,Rn=C[dl];if(0>n(gu,L))dl<ye&&0>n(Rn,gu)?(C[ue]=Rn,C[dl]=L,ue=dl):(C[ue]=gu,C[_n]=L,ue=_n);else if(dl<ye&&0>n(Rn,L))C[ue]=Rn,C[dl]=L,ue=dl;else break e}}return k}function n(C,k){var L=C.sortIndex-k.sortIndex;return L!==0?L:C.id-k.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var r=[],f=[],h=1,m=null,d=3,x=!1,v=!1,S=!1,N=!1,y=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function b(C){for(var k=l(f);k!==null;){if(k.callback===null)a(f);else if(k.startTime<=C)a(f),k.sortIndex=k.expirationTime,t(r,k);else break;k=l(f)}}function A(C){if(S=!1,b(C),!v)if(l(r)!==null)v=!0,z||(z=!0,re());else{var k=l(f);k!==null&&Me(A,k.startTime-C)}}var z=!1,T=-1,M=5,O=-1;function H(){return N?!0:!(e.unstable_now()-O<M)}function E(){if(N=!1,z){var C=e.unstable_now();O=C;var k=!0;try{e:{v=!1,S&&(S=!1,o(T),T=-1),x=!0;var L=d;try{t:{for(b(C),m=l(r);m!==null&&!(m.expirationTime>C&&H());){var ue=m.callback;if(typeof ue=="function"){m.callback=null,d=m.priorityLevel;var ye=ue(m.expirationTime<=C);if(C=e.unstable_now(),typeof ye=="function"){m.callback=ye,b(C),k=!0;break t}m===l(r)&&a(r),b(C)}else a(r);m=l(r)}if(m!==null)k=!0;else{var Dn=l(f);Dn!==null&&Me(A,Dn.startTime-C),k=!1}}break e}finally{m=null,d=L,x=!1}k=void 0}}finally{k?re():z=!1}}}var re;if(typeof g=="function")re=function(){g(E)};else if(typeof MessageChannel<"u"){var Bt=new MessageChannel,fl=Bt.port2;Bt.port1.onmessage=E,re=function(){fl.postMessage(null)}}else re=function(){y(E,0)};function Me(C,k){T=y(function(){C(e.unstable_now())},k)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(C){switch(d){case 1:case 2:case 3:var k=3;break;default:k=d}var L=d;d=k;try{return C()}finally{d=L}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(C,k){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var L=d;d=C;try{return k()}finally{d=L}},e.unstable_scheduleCallback=function(C,k,L){var ue=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?ue+L:ue):L=ue,C){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=L+ye,C={id:h++,callback:k,priorityLevel:C,startTime:L,expirationTime:ye,sortIndex:-1},L>ue?(C.sortIndex=L,t(f,C),l(r)===null&&C===l(f)&&(S?(o(T),T=-1):S=!0,Me(A,L-ue))):(C.sortIndex=ye,t(r,C),v||x||(v=!0,z||(z=!0,re()))),C},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(C){var k=d;return function(){var L=d;d=k;try{return C.apply(this,arguments)}finally{d=L}}}})(Cf);Tf.exports=Cf;var h0=Tf.exports,Mf={exports:{}},Ce={};/**
|
|
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 x0=p;function zf(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 Lt(){}var Te={d:{f:Lt,r:function(){throw Error(zf(522))},D:Lt,C:Lt,L:Lt,m:Lt,X:Lt,S:Lt,M:Lt},p:0,findDOMNode:null},y0=Symbol.for("react.portal");function g0(e,t,l){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:y0,key:a==null?null:""+a,children:e,containerInfo:t,implementation:l}}var Ya=x0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Fi(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ce.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Te;Ce.createPortal=function(e,t){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(zf(299));return g0(e,t,null,l)};Ce.flushSync=function(e){var t=Ya.T,l=Te.p;try{if(Ya.T=null,Te.p=2,e)return e()}finally{Ya.T=t,Te.p=l,Te.d.f()}};Ce.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Te.d.C(e,t))};Ce.prefetchDNS=function(e){typeof e=="string"&&Te.d.D(e)};Ce.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var l=t.as,a=Fi(l,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;l==="style"?Te.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:i}):l==="script"&&Te.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Ce.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var l=Fi(t.as,t.crossOrigin);Te.d.M(e,{crossOrigin:l,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Te.d.M(e)};Ce.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var l=t.as,a=Fi(l,t.crossOrigin);Te.d.L(e,l,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Ce.preloadModule=function(e,t){if(typeof e=="string")if(t){var l=Fi(t.as,t.crossOrigin);Te.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:l,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Te.d.m(e)};Ce.requestFormReset=function(e){Te.d.r(e)};Ce.unstable_batchedUpdates=function(e,t){return e(t)};Ce.useFormState=function(e,t,l){return Ya.H.useFormState(e,t,l)};Ce.useFormStatus=function(){return Ya.H.useHostTransitionStatus()};Ce.version="19.2.4";function wf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wf)}catch(e){console.error(e)}}wf(),Mf.exports=Ce;var p0=Mf.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 xe=h0,Of=p,v0=p0;function j(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 Df(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gn(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function _f(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 Rf(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Er(e){if(gn(e)!==e)throw Error(j(188))}function b0(e){var t=e.alternate;if(!t){if(t=gn(e),t===null)throw Error(j(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return Er(n),e;if(i===a)return Er(n),t;i=i.sibling}throw Error(j(188))}if(l.return!==a.return)l=n,a=i;else{for(var u=!1,c=n.child;c;){if(c===l){u=!0,l=n,a=i;break}if(c===a){u=!0,a=n,l=i;break}c=c.sibling}if(!u){for(c=i.child;c;){if(c===l){u=!0,l=i,a=n;break}if(c===a){u=!0,a=i,l=n;break}c=c.sibling}if(!u)throw Error(j(189))}}if(l.alternate!==a)throw Error(j(190))}if(l.tag!==3)throw Error(j(188));return l.stateNode.current===l?e:t}function Uf(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Uf(e),t!==null)return t;e=e.sibling}return null}var te=Object.assign,S0=Symbol.for("react.element"),Hn=Symbol.for("react.transitional.element"),Ua=Symbol.for("react.portal"),Ll=Symbol.for("react.fragment"),Hf=Symbol.for("react.strict_mode"),ss=Symbol.for("react.profiler"),Bf=Symbol.for("react.consumer"),Nt=Symbol.for("react.context"),dc=Symbol.for("react.forward_ref"),cs=Symbol.for("react.suspense"),rs=Symbol.for("react.suspense_list"),mc=Symbol.for("react.memo"),kt=Symbol.for("react.lazy"),os=Symbol.for("react.activity"),j0=Symbol.for("react.memo_cache_sentinel"),Ar=Symbol.iterator;function Ta(e){return e===null||typeof e!="object"?null:(e=Ar&&e[Ar]||e["@@iterator"],typeof e=="function"?e:null)}var N0=Symbol.for("react.client.reference");function fs(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===N0?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ll:return"Fragment";case ss:return"Profiler";case Hf:return"StrictMode";case cs:return"Suspense";case rs:return"SuspenseList";case os:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Ua:return"Portal";case Nt:return e.displayName||"Context";case Bf:return(e._context.displayName||"Context")+".Consumer";case dc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mc:return t=e.displayName||null,t!==null?t:fs(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return fs(e(t))}catch{}}return null}var Ha=Array.isArray,D=Of.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=v0.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pl={pending:!1,data:null,method:null,action:null},ds=[],kl=-1;function mt(e){return{current:e}}function ve(e){0>kl||(e.current=ds[kl],ds[kl]=null,kl--)}function F(e,t){kl++,ds[kl]=e.current,e.current=t}var ot=mt(null),tn=mt(null),Wt=mt(null),gi=mt(null);function pi(e,t){switch(F(Wt,t),F(tn,e),F(ot,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Do(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Do(t),e=ah(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ve(ot),F(ot,e)}function aa(){ve(ot),ve(tn),ve(Wt)}function ms(e){e.memoizedState!==null&&F(gi,e);var t=ot.current,l=ah(t,e.type);t!==l&&(F(tn,e),F(ot,l))}function vi(e){tn.current===e&&(ve(ot),ve(tn)),gi.current===e&&(ve(gi),mn._currentValue=pl)}var vu,Tr;function hl(e){if(vu===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);vu=t&&t[1]||"",Tr=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+vu+e+Tr}var bu=!1;function Su(e,t){if(!e||bu)return"";bu=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(x){var d=x}Reflect.construct(e,[],m)}else{try{m.call()}catch(x){d=x}e.call(m.prototype)}}else{try{throw Error()}catch(x){d=x}(m=e())&&typeof m.catch=="function"&&m.catch(function(){})}}catch(x){if(x&&d&&typeof x.stack=="string")return[x.stack,d.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),u=i[0],c=i[1];if(u&&c){var r=u.split(`
|
|
44
|
+
`),f=c.split(`
|
|
45
|
+
`);for(n=a=0;a<r.length&&!r[a].includes("DetermineComponentFrameRoot");)a++;for(;n<f.length&&!f[n].includes("DetermineComponentFrameRoot");)n++;if(a===r.length||n===f.length)for(a=r.length-1,n=f.length-1;1<=a&&0<=n&&r[a]!==f[n];)n--;for(;1<=a&&0<=n;a--,n--)if(r[a]!==f[n]){if(a!==1||n!==1)do if(a--,n--,0>n||r[a]!==f[n]){var h=`
|
|
46
|
+
`+r[a].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),h}while(1<=a&&0<=n);break}}}finally{bu=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?hl(l):""}function E0(e,t){switch(e.tag){case 26:case 27:case 5:return hl(e.type);case 16:return hl("Lazy");case 13:return e.child!==t&&t!==null?hl("Suspense Fallback"):hl("Suspense");case 19:return hl("SuspenseList");case 0:case 15:return Su(e.type,!1);case 11:return Su(e.type.render,!1);case 1:return Su(e.type,!0);case 31:return hl("Activity");default:return""}}function Cr(e){try{var t="",l=null;do t+=E0(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var hs=Object.prototype.hasOwnProperty,hc=xe.unstable_scheduleCallback,ju=xe.unstable_cancelCallback,A0=xe.unstable_shouldYield,T0=xe.unstable_requestPaint,qe=xe.unstable_now,C0=xe.unstable_getCurrentPriorityLevel,Lf=xe.unstable_ImmediatePriority,kf=xe.unstable_UserBlockingPriority,bi=xe.unstable_NormalPriority,M0=xe.unstable_LowPriority,qf=xe.unstable_IdlePriority,z0=xe.log,w0=xe.unstable_setDisableYieldValue,pn=null,Ye=null;function Vt(e){if(typeof z0=="function"&&w0(e),Ye&&typeof Ye.setStrictMode=="function")try{Ye.setStrictMode(pn,e)}catch{}}var Ge=Math.clz32?Math.clz32:_0,O0=Math.log,D0=Math.LN2;function _0(e){return e>>>=0,e===0?32:31-(O0(e)/D0|0)|0}var Bn=256,Ln=262144,kn=4194304;function xl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ii(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var c=a&134217727;return c!==0?(a=c&~i,a!==0?n=xl(a):(u&=c,u!==0?n=xl(u):l||(l=c&~e,l!==0&&(n=xl(l))))):(c=a&~i,c!==0?n=xl(c):u!==0?n=xl(u):l||(l=a&~e,l!==0&&(n=xl(l)))),n===0?0:t!==0&&t!==n&&!(t&i)&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function vn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function R0(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 Yf(){var e=kn;return kn<<=1,!(kn&62914560)&&(kn=4194304),e}function Nu(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function bn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function U0(e,t,l,a,n,i){var u=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var c=e.entanglements,r=e.expirationTimes,f=e.hiddenUpdates;for(l=u&~l;0<l;){var h=31-Ge(l),m=1<<h;c[h]=0,r[h]=-1;var d=f[h];if(d!==null)for(f[h]=null,h=0;h<d.length;h++){var x=d[h];x!==null&&(x.lane&=-536870913)}l&=~m}a!==0&&Gf(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(u&~t))}function Gf(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ge(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Xf(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Ge(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Qf(e,t){var l=t&-t;return l=l&42?1:xc(l),l&(e.suspendedLanes|t)?0:l}function xc(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 yc(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Vf(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:hh(e.type))}function Mr(e,t){var l=V.p;try{return V.p=e,t()}finally{V.p=l}}var rl=Math.random().toString(36).slice(2),Se="__reactFiber$"+rl,Re="__reactProps$"+rl,ya="__reactContainer$"+rl,xs="__reactEvents$"+rl,H0="__reactListeners$"+rl,B0="__reactHandles$"+rl,zr="__reactResources$"+rl,Sn="__reactMarker$"+rl;function gc(e){delete e[Se],delete e[Re],delete e[xs],delete e[H0],delete e[B0]}function ql(e){var t=e[Se];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ya]||l[Se]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Bo(e);e!==null;){if(l=e[Se])return l;e=Bo(e)}return t}e=l,l=e.parentNode}return null}function ga(e){if(e=e[Se]||e[ya]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ba(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(j(33))}function Wl(e){var t=e[zr];return t||(t=e[zr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pe(e){e[Sn]=!0}var Zf=new Set,Kf={};function Ml(e,t){na(e,t),na(e+"Capture",t)}function na(e,t){for(Kf[e]=t,e=0;e<t.length;e++)Zf.add(t[e])}var L0=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]*$"),wr={},Or={};function k0(e){return hs.call(Or,e)?!0:hs.call(wr,e)?!1:L0.test(e)?Or[e]=!0:(wr[e]=!0,!1)}function In(e,t,l){if(k0(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function qn(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function yt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Je(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function q0(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(u){l=""+u,i.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ys(e){if(!e._valueTracker){var t=Jf(e)?"checked":"value";e._valueTracker=q0(e,t,""+e[t])}}function $f(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Jf(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Si(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Y0=/[\n"\\]/g;function Fe(e){return e.replace(Y0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function gs(e,t,l,a,n,i,u,c){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Je(t)):e.value!==""+Je(t)&&(e.value=""+Je(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?ps(e,u,Je(t)):l!=null?ps(e,u,Je(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.name=""+Je(c):e.removeAttribute("name")}function Wf(e,t,l,a,n,i,u,c){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){ys(e);return}l=l!=null?""+Je(l):"",t=t!=null?""+Je(t):l,c||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=c?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),ys(e)}function ps(e,t,l){t==="number"&&Si(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Fl(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Je(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Ff(e,t,l){if(t!=null&&(t=""+Je(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Je(l):""}function If(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(j(92));if(Ha(a)){if(1<a.length)throw Error(j(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Je(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),ys(e)}function ia(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var G0=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 Dr(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||G0.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Pf(e,t,l){if(t!=null&&typeof t!="object")throw Error(j(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&Dr(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&Dr(e,i,t[i])}function pc(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 X0=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Q0=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Pn(e){return Q0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Et(){}var vs=null;function vc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yl=null,Il=null;function _r(e){var t=ga(e);if(t&&(e=t.stateNode)){var l=e[Re]||null;e:switch(e=t.stateNode,t.type){case"input":if(gs(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Fe(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[Re]||null;if(!n)throw Error(j(90));gs(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&$f(a)}break e;case"textarea":Ff(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Fl(e,!!l.multiple,t,!1)}}}var Eu=!1;function ed(e,t,l){if(Eu)return e(t,l);Eu=!0;try{var a=e(t);return a}finally{if(Eu=!1,(Yl!==null||Il!==null)&&(ou(),Yl&&(t=Yl,e=Il,Il=Yl=null,_r(t),e)))for(t=0;t<e.length;t++)_r(e[t])}}function ln(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Re]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(j(231,t,typeof l));return l}var zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bs=!1;if(zt)try{var Ca={};Object.defineProperty(Ca,"passive",{get:function(){bs=!0}}),window.addEventListener("test",Ca,Ca),window.removeEventListener("test",Ca,Ca)}catch{bs=!1}var Zt=null,bc=null,ei=null;function td(){if(ei)return ei;var e,t=bc,l=t.length,a,n="value"in Zt?Zt.value:Zt.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var u=l-e;for(a=1;a<=u&&t[l-a]===n[i-a];a++);return ei=n.slice(e,1<a?1-a:void 0)}function ti(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 Yn(){return!0}function Rr(){return!1}function Ue(e){function t(l,a,n,i,u){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(l=e[c],this[c]=l?l(i):i[c]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Yn:Rr,this.isPropagationStopped=Rr,this}return te(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Yn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Yn)},persist:function(){},isPersistent:Yn}),t}var zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pi=Ue(zl),jn=te({},zl,{view:0,detail:0}),V0=Ue(jn),Au,Tu,Ma,eu=te({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sc,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!==Ma&&(Ma&&e.type==="mousemove"?(Au=e.screenX-Ma.screenX,Tu=e.screenY-Ma.screenY):Tu=Au=0,Ma=e),Au)},movementY:function(e){return"movementY"in e?e.movementY:Tu}}),Ur=Ue(eu),Z0=te({},eu,{dataTransfer:0}),K0=Ue(Z0),J0=te({},jn,{relatedTarget:0}),Cu=Ue(J0),$0=te({},zl,{animationName:0,elapsedTime:0,pseudoElement:0}),W0=Ue($0),F0=te({},zl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),I0=Ue(F0),P0=te({},zl,{data:0}),Hr=Ue(P0),ex={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tx={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"},lx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ax(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lx[e])?!!t[e]:!1}function Sc(){return ax}var nx=te({},jn,{key:function(e){if(e.key){var t=ex[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ti(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sc,charCode:function(e){return e.type==="keypress"?ti(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ti(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ix=Ue(nx),ux=te({},eu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Br=Ue(ux),sx=te({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sc}),cx=Ue(sx),rx=te({},zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ox=Ue(rx),fx=te({},eu,{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}),dx=Ue(fx),mx=te({},zl,{newState:0,oldState:0}),hx=Ue(mx),xx=[9,13,27,32],jc=zt&&"CompositionEvent"in window,Ga=null;zt&&"documentMode"in document&&(Ga=document.documentMode);var yx=zt&&"TextEvent"in window&&!Ga,ld=zt&&(!jc||Ga&&8<Ga&&11>=Ga),Lr=" ",kr=!1;function ad(e,t){switch(e){case"keyup":return xx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gl=!1;function gx(e,t){switch(e){case"compositionend":return nd(t);case"keypress":return t.which!==32?null:(kr=!0,Lr);case"textInput":return e=t.data,e===Lr&&kr?null:e;default:return null}}function px(e,t){if(Gl)return e==="compositionend"||!jc&&ad(e,t)?(e=td(),ei=bc=Zt=null,Gl=!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 ld&&t.locale!=="ko"?null:t.data;default:return null}}var vx={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 qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vx[e.type]:t==="textarea"}function id(e,t,l,a){Yl?Il?Il.push(a):Il=[a]:Yl=a,t=ki(t,"onChange"),0<t.length&&(l=new Pi("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Xa=null,an=null;function bx(e){eh(e,0)}function tu(e){var t=Ba(e);if($f(t))return e}function Yr(e,t){if(e==="change")return t}var ud=!1;if(zt){var Mu;if(zt){var zu="oninput"in document;if(!zu){var Gr=document.createElement("div");Gr.setAttribute("oninput","return;"),zu=typeof Gr.oninput=="function"}Mu=zu}else Mu=!1;ud=Mu&&(!document.documentMode||9<document.documentMode)}function Xr(){Xa&&(Xa.detachEvent("onpropertychange",sd),an=Xa=null)}function sd(e){if(e.propertyName==="value"&&tu(an)){var t=[];id(t,an,e,vc(e)),ed(bx,t)}}function Sx(e,t,l){e==="focusin"?(Xr(),Xa=t,an=l,Xa.attachEvent("onpropertychange",sd)):e==="focusout"&&Xr()}function jx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tu(an)}function Nx(e,t){if(e==="click")return tu(t)}function Ex(e,t){if(e==="input"||e==="change")return tu(t)}function Ax(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qe=typeof Object.is=="function"?Object.is:Ax;function nn(e,t){if(Qe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!hs.call(t,n)||!Qe(e[n],t[n]))return!1}return!0}function Qr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vr(e,t){var l=Qr(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Qr(l)}}function cd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Si(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Si(e.document)}return t}function Nc(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 Tx=zt&&"documentMode"in document&&11>=document.documentMode,Xl=null,Ss=null,Qa=null,js=!1;function Zr(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;js||Xl==null||Xl!==Si(a)||(a=Xl,"selectionStart"in a&&Nc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Qa&&nn(Qa,a)||(Qa=a,a=ki(Ss,"onSelect"),0<a.length&&(t=new Pi("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Xl)))}function ml(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ql={animationend:ml("Animation","AnimationEnd"),animationiteration:ml("Animation","AnimationIteration"),animationstart:ml("Animation","AnimationStart"),transitionrun:ml("Transition","TransitionRun"),transitionstart:ml("Transition","TransitionStart"),transitioncancel:ml("Transition","TransitionCancel"),transitionend:ml("Transition","TransitionEnd")},wu={},od={};zt&&(od=document.createElement("div").style,"AnimationEvent"in window||(delete Ql.animationend.animation,delete Ql.animationiteration.animation,delete Ql.animationstart.animation),"TransitionEvent"in window||delete Ql.transitionend.transition);function wl(e){if(wu[e])return wu[e];if(!Ql[e])return e;var t=Ql[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in od)return wu[e]=t[l];return e}var fd=wl("animationend"),dd=wl("animationiteration"),md=wl("animationstart"),Cx=wl("transitionrun"),Mx=wl("transitionstart"),zx=wl("transitioncancel"),hd=wl("transitionend"),xd=new Map,Ns="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(" ");Ns.push("scrollEnd");function ut(e,t){xd.set(e,t),Ml(t,[e])}var ji=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)},Ke=[],Vl=0,Ec=0;function lu(){for(var e=Vl,t=Ec=Vl=0;t<e;){var l=Ke[t];Ke[t++]=null;var a=Ke[t];Ke[t++]=null;var n=Ke[t];Ke[t++]=null;var i=Ke[t];if(Ke[t++]=null,a!==null&&n!==null){var u=a.pending;u===null?n.next=n:(n.next=u.next,u.next=n),a.pending=n}i!==0&&yd(l,n,i)}}function au(e,t,l,a){Ke[Vl++]=e,Ke[Vl++]=t,Ke[Vl++]=l,Ke[Vl++]=a,Ec|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ac(e,t,l,a){return au(e,t,l,a),Ni(e)}function Ol(e,t){return au(e,null,null,t),Ni(e)}function yd(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-Ge(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function Ni(e){if(50<Pa)throw Pa=0,Qs=null,Error(j(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Zl={};function wx(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Le(e,t,l,a){return new wx(e,t,l,a)}function Tc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tt(e,t){var l=e.alternate;return l===null?(l=Le(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function gd(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function li(e,t,l,a,n,i){var u=0;if(a=e,typeof e=="function")Tc(e)&&(u=1);else if(typeof e=="string")u=Uy(e,l,ot.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case os:return e=Le(31,l,t,n),e.elementType=os,e.lanes=i,e;case Ll:return vl(l.children,n,i,t);case Hf:u=8,n|=24;break;case ss:return e=Le(12,l,t,n|2),e.elementType=ss,e.lanes=i,e;case cs:return e=Le(13,l,t,n),e.elementType=cs,e.lanes=i,e;case rs:return e=Le(19,l,t,n),e.elementType=rs,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nt:u=10;break e;case Bf:u=9;break e;case dc:u=11;break e;case mc:u=14;break e;case kt:u=16,a=null;break e}u=29,l=Error(j(130,e===null?"null":typeof e,"")),a=null}return t=Le(u,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function vl(e,t,l,a){return e=Le(7,e,a,t),e.lanes=l,e}function Ou(e,t,l){return e=Le(6,e,null,t),e.lanes=l,e}function pd(e){var t=Le(18,null,null,0);return t.stateNode=e,t}function Du(e,t,l){return t=Le(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kr=new WeakMap;function Ie(e,t){if(typeof e=="object"&&e!==null){var l=Kr.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Cr(t)},Kr.set(e,t),t)}return{value:e,source:t,stack:Cr(t)}}var Kl=[],Jl=0,Ei=null,un=0,$e=[],We=0,il=null,st=1,ct="";function St(e,t){Kl[Jl++]=un,Kl[Jl++]=Ei,Ei=e,un=t}function vd(e,t,l){$e[We++]=st,$e[We++]=ct,$e[We++]=il,il=e;var a=st;e=ct;var n=32-Ge(a)-1;a&=~(1<<n),l+=1;var i=32-Ge(t)+n;if(30<i){var u=n-n%5;i=(a&(1<<u)-1).toString(32),a>>=u,n-=u,st=1<<32-Ge(t)+n|l<<n|a,ct=i+e}else st=1<<i|l<<n|a,ct=e}function Cc(e){e.return!==null&&(St(e,1),vd(e,1,0))}function Mc(e){for(;e===Ei;)Ei=Kl[--Jl],Kl[Jl]=null,un=Kl[--Jl],Kl[Jl]=null;for(;e===il;)il=$e[--We],$e[We]=null,ct=$e[--We],$e[We]=null,st=$e[--We],$e[We]=null}function bd(e,t){$e[We++]=st,$e[We++]=ct,$e[We++]=il,st=t.id,ct=t.overflow,il=e}var je=null,P=null,X=!1,Ft=null,Pe=!1,Es=Error(j(519));function ul(e){var t=Error(j(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw sn(Ie(t,e)),Es}function Jr(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Se]=e,t[Re]=a,l){case"dialog":q("cancel",t),q("close",t);break;case"iframe":case"object":case"embed":q("load",t);break;case"video":case"audio":for(l=0;l<fn.length;l++)q(fn[l],t);break;case"source":q("error",t);break;case"img":case"image":case"link":q("error",t),q("load",t);break;case"details":q("toggle",t);break;case"input":q("invalid",t),Wf(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":q("invalid",t);break;case"textarea":q("invalid",t),If(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||lh(t.textContent,l)?(a.popover!=null&&(q("beforetoggle",t),q("toggle",t)),a.onScroll!=null&&q("scroll",t),a.onScrollEnd!=null&&q("scrollend",t),a.onClick!=null&&(t.onclick=Et),t=!0):t=!1,t||ul(e,!0)}function $r(e){for(je=e.return;je;)switch(je.tag){case 5:case 31:case 13:Pe=!1;return;case 27:case 3:Pe=!0;return;default:je=je.return}}function _l(e){if(e!==je)return!1;if(!X)return $r(e),X=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||$s(e.type,e.memoizedProps)),l=!l),l&&P&&ul(e),$r(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));P=Ho(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));P=Ho(e)}else t===27?(t=P,ol(e.type)?(e=Ps,Ps=null,P=e):P=t):P=je?tt(e.stateNode.nextSibling):null;return!0}function Nl(){P=je=null,X=!1}function _u(){var e=Ft;return e!==null&&(De===null?De=e:De.push.apply(De,e),Ft=null),e}function sn(e){Ft===null?Ft=[e]:Ft.push(e)}var As=mt(null),Dl=null,At=null;function Yt(e,t,l){F(As,t._currentValue),t._currentValue=l}function Ct(e){e._currentValue=As.current,ve(As)}function Ts(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Cs(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var u=n.child;i=i.firstContext;e:for(;i!==null;){var c=i;i=n;for(var r=0;r<t.length;r++)if(c.context===t[r]){i.lanes|=l,c=i.alternate,c!==null&&(c.lanes|=l),Ts(i.return,l,e),a||(u=null);break e}i=c.next}}else if(n.tag===18){if(u=n.return,u===null)throw Error(j(341));u.lanes|=l,i=u.alternate,i!==null&&(i.lanes|=l),Ts(u,l,e),u=null}else u=n.child;if(u!==null)u.return=n;else for(u=n;u!==null;){if(u===e){u=null;break}if(n=u.sibling,n!==null){n.return=u.return,u=n;break}u=u.return}n=u}}function pa(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if(n.flags&524288)i=!0;else if(n.flags&262144)break}if(n.tag===10){var u=n.alternate;if(u===null)throw Error(j(387));if(u=u.memoizedProps,u!==null){var c=n.type;Qe(n.pendingProps.value,u.value)||(e!==null?e.push(c):e=[c])}}else if(n===gi.current){if(u=n.alternate,u===null)throw Error(j(387));u.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(mn):e=[mn])}n=n.return}e!==null&&Cs(t,e,l,a),t.flags|=262144}function Ai(e){for(e=e.firstContext;e!==null;){if(!Qe(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function El(e){Dl=e,At=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ne(e){return Sd(Dl,e)}function Gn(e,t){return Dl===null&&El(e),Sd(e,t)}function Sd(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},At===null){if(e===null)throw Error(j(308));At=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else At=At.next=t;return l}var Ox=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Dx=xe.unstable_scheduleCallback,_x=xe.unstable_NormalPriority,de={$$typeof:Nt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zc(){return{controller:new Ox,data:new Map,refCount:0}}function Nn(e){e.refCount--,e.refCount===0&&Dx(_x,function(){e.controller.abort()})}var Va=null,Ms=0,ua=0,Pl=null;function Rx(e,t){if(Va===null){var l=Va=[];Ms=0,ua=er(),Pl={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Ms++,t.then(Wr,Wr),t}function Wr(){if(--Ms===0&&Va!==null){Pl!==null&&(Pl.status="fulfilled");var e=Va;Va=null,ua=0,Pl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ux(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var Fr=D.S;D.S=function(e,t){Um=qe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Rx(e,t),Fr!==null&&Fr(e,t)};var bl=mt(null);function wc(){var e=bl.current;return e!==null?e:W.pooledCache}function ai(e,t){t===null?F(bl,bl.current):F(bl,t.pool)}function jd(){var e=wc();return e===null?null:{parent:de._currentValue,pool:e}}var va=Error(j(460)),Oc=Error(j(474)),nu=Error(j(542)),Ti={then:function(){}};function Ir(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Nd(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Et,Et),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eo(e),e;default:if(typeof t.status=="string")t.then(Et,Et);else{if(e=W,e!==null&&100<e.shellSuspendCounter)throw Error(j(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eo(e),e}throw Sl=t,va}}function yl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Sl=l,va):l}}var Sl=null;function Pr(){if(Sl===null)throw Error(j(459));var e=Sl;return Sl=null,e}function eo(e){if(e===va||e===nu)throw Error(j(483))}var ea=null,cn=0;function Xn(e){var t=cn;return cn+=1,ea===null&&(ea=[]),Nd(ea,e,t)}function za(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Qn(e,t){throw t.$$typeof===S0?Error(j(525)):(e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ed(e){function t(y,o){if(e){var g=y.deletions;g===null?(y.deletions=[o],y.flags|=16):g.push(o)}}function l(y,o){if(!e)return null;for(;o!==null;)t(y,o),o=o.sibling;return null}function a(y){for(var o=new Map;y!==null;)y.key!==null?o.set(y.key,y):o.set(y.index,y),y=y.sibling;return o}function n(y,o){return y=Tt(y,o),y.index=0,y.sibling=null,y}function i(y,o,g){return y.index=g,e?(g=y.alternate,g!==null?(g=g.index,g<o?(y.flags|=67108866,o):g):(y.flags|=67108866,o)):(y.flags|=1048576,o)}function u(y){return e&&y.alternate===null&&(y.flags|=67108866),y}function c(y,o,g,b){return o===null||o.tag!==6?(o=Ou(g,y.mode,b),o.return=y,o):(o=n(o,g),o.return=y,o)}function r(y,o,g,b){var A=g.type;return A===Ll?h(y,o,g.props.children,b,g.key):o!==null&&(o.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===kt&&yl(A)===o.type)?(o=n(o,g.props),za(o,g),o.return=y,o):(o=li(g.type,g.key,g.props,null,y.mode,b),za(o,g),o.return=y,o)}function f(y,o,g,b){return o===null||o.tag!==4||o.stateNode.containerInfo!==g.containerInfo||o.stateNode.implementation!==g.implementation?(o=Du(g,y.mode,b),o.return=y,o):(o=n(o,g.children||[]),o.return=y,o)}function h(y,o,g,b,A){return o===null||o.tag!==7?(o=vl(g,y.mode,b,A),o.return=y,o):(o=n(o,g),o.return=y,o)}function m(y,o,g){if(typeof o=="string"&&o!==""||typeof o=="number"||typeof o=="bigint")return o=Ou(""+o,y.mode,g),o.return=y,o;if(typeof o=="object"&&o!==null){switch(o.$$typeof){case Hn:return g=li(o.type,o.key,o.props,null,y.mode,g),za(g,o),g.return=y,g;case Ua:return o=Du(o,y.mode,g),o.return=y,o;case kt:return o=yl(o),m(y,o,g)}if(Ha(o)||Ta(o))return o=vl(o,y.mode,g,null),o.return=y,o;if(typeof o.then=="function")return m(y,Xn(o),g);if(o.$$typeof===Nt)return m(y,Gn(y,o),g);Qn(y,o)}return null}function d(y,o,g,b){var A=o!==null?o.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return A!==null?null:c(y,o,""+g,b);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Hn:return g.key===A?r(y,o,g,b):null;case Ua:return g.key===A?f(y,o,g,b):null;case kt:return g=yl(g),d(y,o,g,b)}if(Ha(g)||Ta(g))return A!==null?null:h(y,o,g,b,null);if(typeof g.then=="function")return d(y,o,Xn(g),b);if(g.$$typeof===Nt)return d(y,o,Gn(y,g),b);Qn(y,g)}return null}function x(y,o,g,b,A){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return y=y.get(g)||null,c(o,y,""+b,A);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Hn:return y=y.get(b.key===null?g:b.key)||null,r(o,y,b,A);case Ua:return y=y.get(b.key===null?g:b.key)||null,f(o,y,b,A);case kt:return b=yl(b),x(y,o,g,b,A)}if(Ha(b)||Ta(b))return y=y.get(g)||null,h(o,y,b,A,null);if(typeof b.then=="function")return x(y,o,g,Xn(b),A);if(b.$$typeof===Nt)return x(y,o,g,Gn(o,b),A);Qn(o,b)}return null}function v(y,o,g,b){for(var A=null,z=null,T=o,M=o=0,O=null;T!==null&&M<g.length;M++){T.index>M?(O=T,T=null):O=T.sibling;var H=d(y,T,g[M],b);if(H===null){T===null&&(T=O);break}e&&T&&H.alternate===null&&t(y,T),o=i(H,o,M),z===null?A=H:z.sibling=H,z=H,T=O}if(M===g.length)return l(y,T),X&&St(y,M),A;if(T===null){for(;M<g.length;M++)T=m(y,g[M],b),T!==null&&(o=i(T,o,M),z===null?A=T:z.sibling=T,z=T);return X&&St(y,M),A}for(T=a(T);M<g.length;M++)O=x(T,y,M,g[M],b),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?M:O.key),o=i(O,o,M),z===null?A=O:z.sibling=O,z=O);return e&&T.forEach(function(E){return t(y,E)}),X&&St(y,M),A}function S(y,o,g,b){if(g==null)throw Error(j(151));for(var A=null,z=null,T=o,M=o=0,O=null,H=g.next();T!==null&&!H.done;M++,H=g.next()){T.index>M?(O=T,T=null):O=T.sibling;var E=d(y,T,H.value,b);if(E===null){T===null&&(T=O);break}e&&T&&E.alternate===null&&t(y,T),o=i(E,o,M),z===null?A=E:z.sibling=E,z=E,T=O}if(H.done)return l(y,T),X&&St(y,M),A;if(T===null){for(;!H.done;M++,H=g.next())H=m(y,H.value,b),H!==null&&(o=i(H,o,M),z===null?A=H:z.sibling=H,z=H);return X&&St(y,M),A}for(T=a(T);!H.done;M++,H=g.next())H=x(T,y,M,H.value,b),H!==null&&(e&&H.alternate!==null&&T.delete(H.key===null?M:H.key),o=i(H,o,M),z===null?A=H:z.sibling=H,z=H);return e&&T.forEach(function(re){return t(y,re)}),X&&St(y,M),A}function N(y,o,g,b){if(typeof g=="object"&&g!==null&&g.type===Ll&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Hn:e:{for(var A=g.key;o!==null;){if(o.key===A){if(A=g.type,A===Ll){if(o.tag===7){l(y,o.sibling),b=n(o,g.props.children),b.return=y,y=b;break e}}else if(o.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===kt&&yl(A)===o.type){l(y,o.sibling),b=n(o,g.props),za(b,g),b.return=y,y=b;break e}l(y,o);break}else t(y,o);o=o.sibling}g.type===Ll?(b=vl(g.props.children,y.mode,b,g.key),b.return=y,y=b):(b=li(g.type,g.key,g.props,null,y.mode,b),za(b,g),b.return=y,y=b)}return u(y);case Ua:e:{for(A=g.key;o!==null;){if(o.key===A)if(o.tag===4&&o.stateNode.containerInfo===g.containerInfo&&o.stateNode.implementation===g.implementation){l(y,o.sibling),b=n(o,g.children||[]),b.return=y,y=b;break e}else{l(y,o);break}else t(y,o);o=o.sibling}b=Du(g,y.mode,b),b.return=y,y=b}return u(y);case kt:return g=yl(g),N(y,o,g,b)}if(Ha(g))return v(y,o,g,b);if(Ta(g)){if(A=Ta(g),typeof A!="function")throw Error(j(150));return g=A.call(g),S(y,o,g,b)}if(typeof g.then=="function")return N(y,o,Xn(g),b);if(g.$$typeof===Nt)return N(y,o,Gn(y,g),b);Qn(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,o!==null&&o.tag===6?(l(y,o.sibling),b=n(o,g),b.return=y,y=b):(l(y,o),b=Ou(g,y.mode,b),b.return=y,y=b),u(y)):l(y,o)}return function(y,o,g,b){try{cn=0;var A=N(y,o,g,b);return ea=null,A}catch(T){if(T===va||T===nu)throw T;var z=Le(29,T,null,y.mode);return z.lanes=b,z.return=y,z}finally{}}}var Al=Ed(!0),Ad=Ed(!1),qt=!1;function Dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zs(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 It(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pt(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,Q&2){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Ni(e),yd(e,null,l),t}return au(e,a,t,l),Ni(e)}function Za(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Xf(e,l)}}function Ru(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=u:i=i.next=u,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var ws=!1;function Ka(){if(ws){var e=Pl;if(e!==null)throw e}}function Ja(e,t,l,a){ws=!1;var n=e.updateQueue;qt=!1;var i=n.firstBaseUpdate,u=n.lastBaseUpdate,c=n.shared.pending;if(c!==null){n.shared.pending=null;var r=c,f=r.next;r.next=null,u===null?i=f:u.next=f,u=r;var h=e.alternate;h!==null&&(h=h.updateQueue,c=h.lastBaseUpdate,c!==u&&(c===null?h.firstBaseUpdate=f:c.next=f,h.lastBaseUpdate=r))}if(i!==null){var m=n.baseState;u=0,h=f=r=null,c=i;do{var d=c.lane&-536870913,x=d!==c.lane;if(x?(G&d)===d:(a&d)===d){d!==0&&d===ua&&(ws=!0),h!==null&&(h=h.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});e:{var v=e,S=c;d=t;var N=l;switch(S.tag){case 1:if(v=S.payload,typeof v=="function"){m=v.call(N,m,d);break e}m=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=S.payload,d=typeof v=="function"?v.call(N,m,d):v,d==null)break e;m=te({},m,d);break e;case 2:qt=!0}}d=c.callback,d!==null&&(e.flags|=64,x&&(e.flags|=8192),x=n.callbacks,x===null?n.callbacks=[d]:x.push(d))}else x={lane:d,tag:c.tag,payload:c.payload,callback:c.callback,next:null},h===null?(f=h=x,r=m):h=h.next=x,u|=d;if(c=c.next,c===null){if(c=n.shared.pending,c===null)break;x=c,c=x.next,x.next=null,n.lastBaseUpdate=x,n.shared.pending=null}}while(!0);h===null&&(r=m),n.baseState=r,n.firstBaseUpdate=f,n.lastBaseUpdate=h,i===null&&(n.shared.lanes=0),cl|=u,e.lanes=u,e.memoizedState=m}}function Td(e,t){if(typeof e!="function")throw Error(j(191,e));e.call(t)}function Cd(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Td(l[e],t)}var sa=mt(null),Ci=mt(0);function to(e,t){e=_t,F(Ci,e),F(sa,t),_t=e|t.baseLanes}function Os(){F(Ci,_t),F(sa,sa.current)}function _c(){_t=Ci.current,ve(sa),ve(Ci)}var Ve=mt(null),et=null;function Gt(e){var t=e.alternate;F(se,se.current&1),F(Ve,e),et===null&&(t===null||sa.current!==null||t.memoizedState!==null)&&(et=e)}function Ds(e){F(se,se.current),F(Ve,e),et===null&&(et=e)}function Md(e){e.tag===22?(F(se,se.current),F(Ve,e),et===null&&(et=e)):Xt()}function Xt(){F(se,se.current),F(Ve,Ve.current)}function Be(e){ve(Ve),et===e&&(et=null),ve(se)}var se=mt(0);function Mi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Fs(l)||Is(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wt=0,U=null,$=null,oe=null,zi=!1,ta=!1,Tl=!1,wi=0,rn=0,la=null,Hx=0;function ne(){throw Error(j(321))}function Rc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Qe(e[l],t[l]))return!1;return!0}function Uc(e,t,l,a,n,i){return wt=i,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?im:Zc,Tl=!1,i=l(a,n),Tl=!1,ta&&(i=wd(t,l,a,n)),zd(e),i}function zd(e){D.H=on;var t=$!==null&&$.next!==null;if(wt=0,oe=$=U=null,zi=!1,rn=0,la=null,t)throw Error(j(300));e===null||me||(e=e.dependencies,e!==null&&Ai(e)&&(me=!0))}function wd(e,t,l,a){U=e;var n=0;do{if(ta&&(la=null),rn=0,ta=!1,25<=n)throw Error(j(301));if(n+=1,oe=$=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=um,i=t(l,a)}while(ta);return i}function Bx(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?En(t):t,e=e.useState()[0],($!==null?$.memoizedState:null)!==e&&(U.flags|=1024),t}function Hc(){var e=wi!==0;return wi=0,e}function Bc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Lc(e){if(zi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zi=!1}wt=0,oe=$=U=null,ta=!1,rn=wi=0,la=null}function Ae(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oe===null?U.memoizedState=oe=e:oe=oe.next=e,oe}function ce(){if($===null){var e=U.alternate;e=e!==null?e.memoizedState:null}else e=$.next;var t=oe===null?U.memoizedState:oe.next;if(t!==null)oe=t,$=e;else{if(e===null)throw U.alternate===null?Error(j(467)):Error(j(310));$=e,e={memoizedState:$.memoizedState,baseState:$.baseState,baseQueue:$.baseQueue,queue:$.queue,next:null},oe===null?U.memoizedState=oe=e:oe=oe.next=e}return oe}function iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function En(e){var t=rn;return rn+=1,la===null&&(la=[]),e=Nd(la,e,t),t=U,(oe===null?t.memoizedState:oe.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?im:Zc),e}function uu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return En(e);if(e.$$typeof===Nt)return Ne(e)}throw Error(j(438,String(e)))}function kc(e){var t=null,l=U.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=U.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=iu(),U.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=j0;return t.index++,l}function Ot(e,t){return typeof t=="function"?t(e):t}function ni(e){var t=ce();return qc(t,$,e)}function qc(e,t,l){var a=e.queue;if(a===null)throw Error(j(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var u=n.next;n.next=i.next,i.next=u}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var c=u=null,r=null,f=t,h=!1;do{var m=f.lane&-536870913;if(m!==f.lane?(G&m)===m:(wt&m)===m){var d=f.revertLane;if(d===0)r!==null&&(r=r.next={lane:0,revertLane:0,gesture:null,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),m===ua&&(h=!0);else if((wt&d)===d){f=f.next,d===ua&&(h=!0);continue}else m={lane:0,revertLane:f.revertLane,gesture:null,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null},r===null?(c=r=m,u=i):r=r.next=m,U.lanes|=d,cl|=d;m=f.action,Tl&&l(i,m),i=f.hasEagerState?f.eagerState:l(i,m)}else d={lane:m,revertLane:f.revertLane,gesture:f.gesture,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null},r===null?(c=r=d,u=i):r=r.next=d,U.lanes|=m,cl|=m;f=f.next}while(f!==null&&f!==t);if(r===null?u=i:r.next=c,!Qe(i,e.memoizedState)&&(me=!0,h&&(l=Pl,l!==null)))throw l;e.memoizedState=i,e.baseState=u,e.baseQueue=r,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Uu(e){var t=ce(),l=t.queue;if(l===null)throw Error(j(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var u=n=n.next;do i=e(i,u.action),u=u.next;while(u!==n);Qe(i,t.memoizedState)||(me=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function Od(e,t,l){var a=U,n=ce(),i=X;if(i){if(l===void 0)throw Error(j(407));l=l()}else l=t();var u=!Qe(($||n).memoizedState,l);if(u&&(n.memoizedState=l,me=!0),n=n.queue,Yc(Rd.bind(null,a,n,e),[e]),n.getSnapshot!==t||u||oe!==null&&oe.memoizedState.tag&1){if(a.flags|=2048,ca(9,{destroy:void 0},_d.bind(null,a,n,l,t),null),W===null)throw Error(j(349));i||wt&127||Dd(a,t,l)}return l}function Dd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=U.updateQueue,t===null?(t=iu(),U.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function _d(e,t,l,a){t.value=l,t.getSnapshot=a,Ud(t)&&Hd(e)}function Rd(e,t,l){return l(function(){Ud(t)&&Hd(e)})}function Ud(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Qe(e,l)}catch{return!0}}function Hd(e){var t=Ol(e,2);t!==null&&_e(t,e,2)}function _s(e){var t=Ae();if(typeof e=="function"){var l=e;if(e=l(),Tl){Vt(!0);try{l()}finally{Vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ot,lastRenderedState:e},t}function Bd(e,t,l,a){return e.baseState=l,qc(e,$,typeof a=="function"?a:Ot)}function Lx(e,t,l,a,n){if(cu(e))throw Error(j(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};D.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,Ld(t,i)):(i.next=l.next,t.pending=l.next=i)}}function Ld(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=D.T,u={};D.T=u;try{var c=l(n,a),r=D.S;r!==null&&r(u,c),lo(e,t,c)}catch(f){Rs(e,t,f)}finally{i!==null&&u.types!==null&&(i.types=u.types),D.T=i}}else try{i=l(n,a),lo(e,t,i)}catch(f){Rs(e,t,f)}}function lo(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){ao(e,t,a)},function(a){return Rs(e,t,a)}):ao(e,t,l)}function ao(e,t,l){t.status="fulfilled",t.value=l,kd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Ld(e,l)))}function Rs(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,kd(t),t=t.next;while(t!==a)}e.action=null}function kd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qd(e,t){return t}function no(e,t){if(X){var l=W.formState;if(l!==null){e:{var a=U;if(X){if(P){t:{for(var n=P,i=Pe;n.nodeType!==8;){if(!i){n=null;break t}if(n=tt(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){P=tt(n.nextSibling),a=n.data==="F!";break e}}ul(a)}a=!1}a&&(t=l[0])}}return l=Ae(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qd,lastRenderedState:t},l.queue=a,l=lm.bind(null,U,a),a.dispatch=l,a=_s(!1),i=Vc.bind(null,U,!1,a.queue),a=Ae(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=Lx.bind(null,U,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function io(e){var t=ce();return Yd(t,$,e)}function Yd(e,t,l){if(t=qc(e,t,qd)[0],e=ni(Ot)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=En(t)}catch(u){throw u===va?nu:u}else a=t;t=ce();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(U.flags|=2048,ca(9,{destroy:void 0},kx.bind(null,n,l),null)),[a,i,e]}function kx(e,t){e.action=t}function uo(e){var t=ce(),l=$;if(l!==null)return Yd(t,l,e);ce(),t=t.memoizedState,l=ce();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function ca(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=U.updateQueue,t===null&&(t=iu(),U.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Gd(){return ce().memoizedState}function ii(e,t,l,a){var n=Ae();U.flags|=e,n.memoizedState=ca(1|t,{destroy:void 0},l,a===void 0?null:a)}function su(e,t,l,a){var n=ce();a=a===void 0?null:a;var i=n.memoizedState.inst;$!==null&&a!==null&&Rc(a,$.memoizedState.deps)?n.memoizedState=ca(t,i,l,a):(U.flags|=e,n.memoizedState=ca(1|t,i,l,a))}function so(e,t){ii(8390656,8,e,t)}function Yc(e,t){su(2048,8,e,t)}function qx(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=iu(),U.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Xd(e){var t=ce().memoizedState;return qx({ref:t,nextImpl:e}),function(){if(Q&2)throw Error(j(440));return t.impl.apply(void 0,arguments)}}function Qd(e,t){return su(4,2,e,t)}function Vd(e,t){return su(4,4,e,t)}function Zd(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kd(e,t,l){l=l!=null?l.concat([e]):null,su(4,4,Zd.bind(null,t,e),l)}function Gc(){}function Jd(e,t){var l=ce();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Rc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function $d(e,t){var l=ce();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Rc(t,a[1]))return a[0];if(a=e(),Tl){Vt(!0);try{e()}finally{Vt(!1)}}return l.memoizedState=[a,t],a}function Xc(e,t,l){return l===void 0||wt&1073741824&&!(G&261930)?e.memoizedState=t:(e.memoizedState=l,e=Bm(),U.lanes|=e,cl|=e,l)}function Wd(e,t,l,a){return Qe(l,t)?l:sa.current!==null?(e=Xc(e,l,a),Qe(e,t)||(me=!0),e):!(wt&42)||wt&1073741824&&!(G&261930)?(me=!0,e.memoizedState=l):(e=Bm(),U.lanes|=e,cl|=e,t)}function Fd(e,t,l,a,n){var i=V.p;V.p=i!==0&&8>i?i:8;var u=D.T,c={};D.T=c,Vc(e,!1,t,l);try{var r=n(),f=D.S;if(f!==null&&f(c,r),r!==null&&typeof r=="object"&&typeof r.then=="function"){var h=Ux(r,a);$a(e,t,h,Xe(e))}else $a(e,t,a,Xe(e))}catch(m){$a(e,t,{then:function(){},status:"rejected",reason:m},Xe())}finally{V.p=i,u!==null&&c.types!==null&&(u.types=c.types),D.T=u}}function Yx(){}function Us(e,t,l,a){if(e.tag!==5)throw Error(j(476));var n=Id(e).queue;Fd(e,n,t,pl,l===null?Yx:function(){return Pd(e),l(a)})}function Id(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pl,baseState:pl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ot,lastRenderedState:pl},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ot,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Pd(e){var t=Id(e);t.next===null&&(t=e.alternate.memoizedState),$a(e,t.next.queue,{},Xe())}function Qc(){return Ne(mn)}function em(){return ce().memoizedState}function tm(){return ce().memoizedState}function Gx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Xe();e=It(l);var a=Pt(t,e,l);a!==null&&(_e(a,t,l),Za(a,t,l)),t={cache:zc()},e.payload=t;return}t=t.return}}function Xx(e,t,l){var a=Xe();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},cu(e)?am(t,l):(l=Ac(e,t,l,a),l!==null&&(_e(l,e,a),nm(l,t,a)))}function lm(e,t,l){var a=Xe();$a(e,t,l,a)}function $a(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(cu(e))am(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var u=t.lastRenderedState,c=i(u,l);if(n.hasEagerState=!0,n.eagerState=c,Qe(c,u))return au(e,t,n,0),W===null&&lu(),!1}catch{}finally{}if(l=Ac(e,t,n,a),l!==null)return _e(l,e,a),nm(l,t,a),!0}return!1}function Vc(e,t,l,a){if(a={lane:2,revertLane:er(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},cu(e)){if(t)throw Error(j(479))}else t=Ac(e,l,a,2),t!==null&&_e(t,e,2)}function cu(e){var t=e.alternate;return e===U||t!==null&&t===U}function am(e,t){ta=zi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function nm(e,t,l){if(l&4194048){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Xf(e,l)}}var on={readContext:Ne,use:uu,useCallback:ne,useContext:ne,useEffect:ne,useImperativeHandle:ne,useLayoutEffect:ne,useInsertionEffect:ne,useMemo:ne,useReducer:ne,useRef:ne,useState:ne,useDebugValue:ne,useDeferredValue:ne,useTransition:ne,useSyncExternalStore:ne,useId:ne,useHostTransitionStatus:ne,useFormState:ne,useActionState:ne,useOptimistic:ne,useMemoCache:ne,useCacheRefresh:ne};on.useEffectEvent=ne;var im={readContext:Ne,use:uu,useCallback:function(e,t){return Ae().memoizedState=[e,t===void 0?null:t],e},useContext:Ne,useEffect:so,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ii(4194308,4,Zd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ii(4194308,4,e,t)},useInsertionEffect:function(e,t){ii(4,2,e,t)},useMemo:function(e,t){var l=Ae();t=t===void 0?null:t;var a=e();if(Tl){Vt(!0);try{e()}finally{Vt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Ae();if(l!==void 0){var n=l(t);if(Tl){Vt(!0);try{l(t)}finally{Vt(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Xx.bind(null,U,e),[a.memoizedState,e]},useRef:function(e){var t=Ae();return e={current:e},t.memoizedState=e},useState:function(e){e=_s(e);var t=e.queue,l=lm.bind(null,U,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Gc,useDeferredValue:function(e,t){var l=Ae();return Xc(l,e,t)},useTransition:function(){var e=_s(!1);return e=Fd.bind(null,U,e.queue,!0,!1),Ae().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=U,n=Ae();if(X){if(l===void 0)throw Error(j(407));l=l()}else{if(l=t(),W===null)throw Error(j(349));G&127||Dd(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,so(Rd.bind(null,a,i,e),[e]),a.flags|=2048,ca(9,{destroy:void 0},_d.bind(null,a,i,l,t),null),l},useId:function(){var e=Ae(),t=W.identifierPrefix;if(X){var l=ct,a=st;l=(a&~(1<<32-Ge(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=wi++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Hx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qc,useFormState:no,useActionState:no,useOptimistic:function(e){var t=Ae();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Vc.bind(null,U,!0,l),l.dispatch=t,[e,t]},useMemoCache:kc,useCacheRefresh:function(){return Ae().memoizedState=Gx.bind(null,U)},useEffectEvent:function(e){var t=Ae(),l={impl:e};return t.memoizedState=l,function(){if(Q&2)throw Error(j(440));return l.impl.apply(void 0,arguments)}}},Zc={readContext:Ne,use:uu,useCallback:Jd,useContext:Ne,useEffect:Yc,useImperativeHandle:Kd,useInsertionEffect:Qd,useLayoutEffect:Vd,useMemo:$d,useReducer:ni,useRef:Gd,useState:function(){return ni(Ot)},useDebugValue:Gc,useDeferredValue:function(e,t){var l=ce();return Wd(l,$.memoizedState,e,t)},useTransition:function(){var e=ni(Ot)[0],t=ce().memoizedState;return[typeof e=="boolean"?e:En(e),t]},useSyncExternalStore:Od,useId:em,useHostTransitionStatus:Qc,useFormState:io,useActionState:io,useOptimistic:function(e,t){var l=ce();return Bd(l,$,e,t)},useMemoCache:kc,useCacheRefresh:tm};Zc.useEffectEvent=Xd;var um={readContext:Ne,use:uu,useCallback:Jd,useContext:Ne,useEffect:Yc,useImperativeHandle:Kd,useInsertionEffect:Qd,useLayoutEffect:Vd,useMemo:$d,useReducer:Uu,useRef:Gd,useState:function(){return Uu(Ot)},useDebugValue:Gc,useDeferredValue:function(e,t){var l=ce();return $===null?Xc(l,e,t):Wd(l,$.memoizedState,e,t)},useTransition:function(){var e=Uu(Ot)[0],t=ce().memoizedState;return[typeof e=="boolean"?e:En(e),t]},useSyncExternalStore:Od,useId:em,useHostTransitionStatus:Qc,useFormState:uo,useActionState:uo,useOptimistic:function(e,t){var l=ce();return $!==null?Bd(l,$,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:kc,useCacheRefresh:tm};um.useEffectEvent=Xd;function Hu(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:te({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Hs={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Xe(),n=It(a);n.payload=t,l!=null&&(n.callback=l),t=Pt(e,n,a),t!==null&&(_e(t,e,a),Za(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Xe(),n=It(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Pt(e,n,a),t!==null&&(_e(t,e,a),Za(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Xe(),a=It(l);a.tag=2,t!=null&&(a.callback=t),t=Pt(e,a,l),t!==null&&(_e(t,e,l),Za(t,e,l))}};function co(e,t,l,a,n,i,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,u):t.prototype&&t.prototype.isPureReactComponent?!nn(l,a)||!nn(n,i):!0}function ro(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function Cl(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=te({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function sm(e){ji(e)}function cm(e){console.error(e)}function rm(e){ji(e)}function Oi(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function oo(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Bs(e,t,l){return l=It(l),l.tag=3,l.payload={element:null},l.callback=function(){Oi(e,t)},l}function om(e){return e=It(e),e.tag=3,e}function fm(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){oo(t,l,a)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){oo(t,l,a),typeof n!="function"&&(el===null?el=new Set([this]):el.add(this));var c=a.stack;this.componentDidCatch(a.value,{componentStack:c!==null?c:""})})}function Qx(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&pa(t,l,n,!0),l=Ve.current,l!==null){switch(l.tag){case 31:case 13:return et===null?Hi():l.alternate===null&&ie===0&&(ie=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Ti?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Ku(e,a,n)),!1;case 22:return l.flags|=65536,a===Ti?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Ku(e,a,n)),!1}throw Error(j(435,l.tag))}return Ku(e,a,n),Hi(),!1}if(X)return t=Ve.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Es&&(e=Error(j(422),{cause:a}),sn(Ie(e,l)))):(a!==Es&&(t=Error(j(423),{cause:a}),sn(Ie(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Ie(a,l),n=Bs(e.stateNode,a,n),Ru(e,n),ie!==4&&(ie=2)),!1;var i=Error(j(520),{cause:a});if(i=Ie(i,l),Ia===null?Ia=[i]:Ia.push(i),ie!==4&&(ie=2),t===null)return!0;a=Ie(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=Bs(l.stateNode,a,e),Ru(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(el===null||!el.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=om(n),fm(n,e,l,a),Ru(l,n),!1}l=l.return}while(l!==null);return!1}var Kc=Error(j(461)),me=!1;function be(e,t,l,a){t.child=e===null?Ad(t,null,l,a):Al(t,e.child,l,a)}function fo(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var u={};for(var c in a)c!=="ref"&&(u[c]=a[c])}else u=a;return El(t),a=Uc(e,t,l,u,i,n),c=Hc(),e!==null&&!me?(Bc(e,t,n),Dt(e,t,n)):(X&&c&&Cc(t),t.flags|=1,be(e,t,a,n),t.child)}function mo(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!Tc(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,dm(e,t,i,a,n)):(e=li(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Jc(e,n)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:nn,l(u,a)&&e.ref===t.ref)return Dt(e,t,n)}return t.flags|=1,e=Tt(i,a),e.ref=t.ref,e.return=t,t.child=e}function dm(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(nn(i,a)&&e.ref===t.ref)if(me=!1,t.pendingProps=a=i,Jc(e,n))e.flags&131072&&(me=!0);else return t.lanes=e.lanes,Dt(e,t,n)}return Ls(e,t,l,a,n)}function mm(e,t,l,a){var n=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return ho(e,t,i,l,a)}if(l&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ai(t,i!==null?i.cachePool:null),i!==null?to(t,i):Os(),Md(t);else return a=t.lanes=536870912,ho(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(ai(t,i.cachePool),to(t,i),Xt(),t.memoizedState=null):(e!==null&&ai(t,null),Os(),Xt());return be(e,t,n,l),t.child}function La(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ho(e,t,l,a,n){var i=wc();return i=i===null?null:{parent:de._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&ai(t,null),Os(),Md(t),e!==null&&pa(e,t,a,!0),t.childLanes=n,null}function ui(e,t){return t=Di({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xo(e,t,l){return Al(t,e.child,null,l),e=ui(t,t.pendingProps),e.flags|=2,Be(t),t.memoizedState=null,e}function Vx(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(X){if(a.mode==="hidden")return e=ui(t,a),t.lanes=536870912,La(null,e);if(Ds(t),(e=P)?(e=ih(e,Pe),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:il!==null?{id:st,overflow:ct}:null,retryLane:536870912,hydrationErrors:null},l=pd(e),l.return=t,t.child=l,je=t,P=null)):e=null,e===null)throw ul(t);return t.lanes=536870912,null}return ui(t,a)}var i=e.memoizedState;if(i!==null){var u=i.dehydrated;if(Ds(t),n)if(t.flags&256)t.flags&=-257,t=xo(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(j(558));else if(me||pa(e,t,l,!1),n=(l&e.childLanes)!==0,me||n){if(a=W,a!==null&&(u=Qf(a,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,Ol(e,u),_e(a,e,u),Kc;Hi(),t=xo(e,t,l)}else e=i.treeContext,P=tt(u.nextSibling),je=t,X=!0,Ft=null,Pe=!1,e!==null&&bd(t,e),t=ui(t,a),t.flags|=4096;return t}return e=Tt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function si(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(j(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Ls(e,t,l,a,n){return El(t),l=Uc(e,t,l,a,void 0,n),a=Hc(),e!==null&&!me?(Bc(e,t,n),Dt(e,t,n)):(X&&a&&Cc(t),t.flags|=1,be(e,t,l,n),t.child)}function yo(e,t,l,a,n,i){return El(t),t.updateQueue=null,l=wd(t,a,l,n),zd(e),a=Hc(),e!==null&&!me?(Bc(e,t,i),Dt(e,t,i)):(X&&a&&Cc(t),t.flags|=1,be(e,t,l,i),t.child)}function go(e,t,l,a,n){if(El(t),t.stateNode===null){var i=Zl,u=l.contextType;typeof u=="object"&&u!==null&&(i=Ne(u)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Hs,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Dc(t),u=l.contextType,i.context=typeof u=="object"&&u!==null?Ne(u):Zl,i.state=t.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(Hu(t,l,u,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&Hs.enqueueReplaceState(i,i.state,null),Ja(t,a,i,n),Ka(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var c=t.memoizedProps,r=Cl(l,c);i.props=r;var f=i.context,h=l.contextType;u=Zl,typeof h=="object"&&h!==null&&(u=Ne(h));var m=l.getDerivedStateFromProps;h=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function",c=t.pendingProps!==c,h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c||f!==u)&&ro(t,i,a,u),qt=!1;var d=t.memoizedState;i.state=d,Ja(t,a,i,n),Ka(),f=t.memoizedState,c||d!==f||qt?(typeof m=="function"&&(Hu(t,l,m,a),f=t.memoizedState),(r=qt||co(t,l,r,a,d,f,u))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=f),i.props=a,i.state=f,i.context=u,a=r):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,zs(e,t),u=t.memoizedProps,h=Cl(l,u),i.props=h,m=t.pendingProps,d=i.context,f=l.contextType,r=Zl,typeof f=="object"&&f!==null&&(r=Ne(f)),c=l.getDerivedStateFromProps,(f=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==m||d!==r)&&ro(t,i,a,r),qt=!1,d=t.memoizedState,i.state=d,Ja(t,a,i,n),Ka();var x=t.memoizedState;u!==m||d!==x||qt||e!==null&&e.dependencies!==null&&Ai(e.dependencies)?(typeof c=="function"&&(Hu(t,l,c,a),x=t.memoizedState),(h=qt||co(t,l,h,a,d,x,r)||e!==null&&e.dependencies!==null&&Ai(e.dependencies))?(f||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,x,r),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,x,r)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=x),i.props=a,i.state=x,i.context=r,a=h):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,si(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Al(t,e.child,null,n),t.child=Al(t,null,l,n)):be(e,t,l,n),t.memoizedState=i.state,e=t.child):e=Dt(e,t,n),e}function po(e,t,l,a){return Nl(),t.flags|=256,be(e,t,l,a),t.child}var Bu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lu(e){return{baseLanes:e,cachePool:jd()}}function ku(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=ke),e}function hm(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(se.current&2)!==0),u&&(n=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(X){if(n?Gt(t):Xt(),(e=P)?(e=ih(e,Pe),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:il!==null?{id:st,overflow:ct}:null,retryLane:536870912,hydrationErrors:null},l=pd(e),l.return=t,t.child=l,je=t,P=null)):e=null,e===null)throw ul(t);return Is(e)?t.lanes=32:t.lanes=536870912,null}var c=a.children;return a=a.fallback,n?(Xt(),n=t.mode,c=Di({mode:"hidden",children:c},n),a=vl(a,n,l,null),c.return=t,a.return=t,c.sibling=a,t.child=c,a=t.child,a.memoizedState=Lu(l),a.childLanes=ku(e,u,l),t.memoizedState=Bu,La(null,a)):(Gt(t),ks(t,c))}var r=e.memoizedState;if(r!==null&&(c=r.dehydrated,c!==null)){if(i)t.flags&256?(Gt(t),t.flags&=-257,t=qu(e,t,l)):t.memoizedState!==null?(Xt(),t.child=e.child,t.flags|=128,t=null):(Xt(),c=a.fallback,n=t.mode,a=Di({mode:"visible",children:a.children},n),c=vl(c,n,l,null),c.flags|=2,a.return=t,c.return=t,a.sibling=c,t.child=a,Al(t,e.child,null,l),a=t.child,a.memoizedState=Lu(l),a.childLanes=ku(e,u,l),t.memoizedState=Bu,t=La(null,a));else if(Gt(t),Is(c)){if(u=c.nextSibling&&c.nextSibling.dataset,u)var f=u.dgst;u=f,a=Error(j(419)),a.stack="",a.digest=u,sn({value:a,source:null,stack:null}),t=qu(e,t,l)}else if(me||pa(e,t,l,!1),u=(l&e.childLanes)!==0,me||u){if(u=W,u!==null&&(a=Qf(u,l),a!==0&&a!==r.retryLane))throw r.retryLane=a,Ol(e,a),_e(u,e,a),Kc;Fs(c)||Hi(),t=qu(e,t,l)}else Fs(c)?(t.flags|=192,t.child=e.child,t=null):(e=r.treeContext,P=tt(c.nextSibling),je=t,X=!0,Ft=null,Pe=!1,e!==null&&bd(t,e),t=ks(t,a.children),t.flags|=4096);return t}return n?(Xt(),c=a.fallback,n=t.mode,r=e.child,f=r.sibling,a=Tt(r,{mode:"hidden",children:a.children}),a.subtreeFlags=r.subtreeFlags&65011712,f!==null?c=Tt(f,c):(c=vl(c,n,l,null),c.flags|=2),c.return=t,a.return=t,a.sibling=c,t.child=a,La(null,a),a=t.child,c=e.child.memoizedState,c===null?c=Lu(l):(n=c.cachePool,n!==null?(r=de._currentValue,n=n.parent!==r?{parent:r,pool:r}:n):n=jd(),c={baseLanes:c.baseLanes|l,cachePool:n}),a.memoizedState=c,a.childLanes=ku(e,u,l),t.memoizedState=Bu,La(e.child,a)):(Gt(t),l=e.child,e=l.sibling,l=Tt(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=l,t.memoizedState=null,l)}function ks(e,t){return t=Di({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Di(e,t){return e=Le(22,e,null,t),e.lanes=0,e}function qu(e,t,l){return Al(t,e.child,null,l),e=ks(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vo(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Ts(e.return,t,l)}function Yu(e,t,l,a,n,i){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=l,u.tailMode=n,u.treeForkCount=i)}function xm(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var u=se.current,c=(u&2)!==0;if(c?(u=u&1|2,t.flags|=128):u&=1,F(se,u),be(e,t,a,l),a=X?un:0,!c&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vo(e,l,t);else if(e.tag===19)vo(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&Mi(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),Yu(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Mi(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}Yu(t,!0,l,null,i,a);break;case"together":Yu(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Dt(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),cl|=t.lanes,!(l&t.childLanes))if(e!==null){if(pa(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,l=Tt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Tt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Jc(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Ai(e)))}function Zx(e,t,l){switch(t.tag){case 3:pi(t,t.stateNode.containerInfo),Yt(t,de,e.memoizedState.cache),Nl();break;case 27:case 5:ms(t);break;case 4:pi(t,t.stateNode.containerInfo);break;case 10:Yt(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ds(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Gt(t),t.flags|=128,null):l&t.child.childLanes?hm(e,t,l):(Gt(t),e=Dt(e,t,l),e!==null?e.sibling:null);Gt(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(pa(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return xm(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),F(se,se.current),a)break;return null;case 22:return t.lanes=0,mm(e,t,l,t.pendingProps);case 24:Yt(t,de,e.memoizedState.cache)}return Dt(e,t,l)}function ym(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)me=!0;else{if(!Jc(e,l)&&!(t.flags&128))return me=!1,Zx(e,t,l);me=!!(e.flags&131072)}else me=!1,X&&t.flags&1048576&&vd(t,un,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=yl(t.elementType),t.type=e,typeof e=="function")Tc(e)?(a=Cl(e,a),t.tag=1,t=go(null,t,e,a,l)):(t.tag=0,t=Ls(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===dc){t.tag=11,t=fo(null,t,e,a,l);break e}else if(n===mc){t.tag=14,t=mo(null,t,e,a,l);break e}}throw t=fs(e)||e,Error(j(306,t,""))}}return t;case 0:return Ls(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=Cl(a,t.pendingProps),go(e,t,a,n,l);case 3:e:{if(pi(t,t.stateNode.containerInfo),e===null)throw Error(j(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,zs(e,t),Ja(t,a,null,l);var u=t.memoizedState;if(a=u.cache,Yt(t,de,a),a!==i.cache&&Cs(t,[de],l,!0),Ka(),a=u.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=po(e,t,a,l);break e}else if(a!==n){n=Ie(Error(j(424)),t),sn(n),t=po(e,t,a,l);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(P=tt(e.firstChild),je=t,X=!0,Ft=null,Pe=!0,l=Ad(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Nl(),a===n){t=Dt(e,t,l);break e}be(e,t,a,l)}t=t.child}return t;case 26:return si(e,t),e===null?(l=ko(t.type,null,t.pendingProps,null))?t.memoizedState=l:X||(l=t.type,e=t.pendingProps,a=qi(Wt.current).createElement(l),a[Se]=t,a[Re]=e,Ee(a,l,e),pe(a),t.stateNode=a):t.memoizedState=ko(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ms(t),e===null&&X&&(a=t.stateNode=uh(t.type,t.pendingProps,Wt.current),je=t,Pe=!0,n=P,ol(t.type)?(Ps=n,P=tt(a.firstChild)):P=n),be(e,t,t.pendingProps.children,l),si(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&X&&((n=a=P)&&(a=jy(a,t.type,t.pendingProps,Pe),a!==null?(t.stateNode=a,je=t,P=tt(a.firstChild),Pe=!1,n=!0):n=!1),n||ul(t)),ms(t),n=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,a=i.children,$s(n,i)?a=null:u!==null&&$s(n,u)&&(t.flags|=32),t.memoizedState!==null&&(n=Uc(e,t,Bx,null,null,l),mn._currentValue=n),si(e,t),be(e,t,a,l),t.child;case 6:return e===null&&X&&((e=l=P)&&(l=Ny(l,t.pendingProps,Pe),l!==null?(t.stateNode=l,je=t,P=null,e=!0):e=!1),e||ul(t)),null;case 13:return hm(e,t,l);case 4:return pi(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Al(t,null,a,l):be(e,t,a,l),t.child;case 11:return fo(e,t,t.type,t.pendingProps,l);case 7:return be(e,t,t.pendingProps,l),t.child;case 8:return be(e,t,t.pendingProps.children,l),t.child;case 12:return be(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Yt(t,t.type,a.value),be(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,El(t),n=Ne(n),a=a(n),t.flags|=1,be(e,t,a,l),t.child;case 14:return mo(e,t,t.type,t.pendingProps,l);case 15:return dm(e,t,t.type,t.pendingProps,l);case 19:return xm(e,t,l);case 31:return Vx(e,t,l);case 22:return mm(e,t,l,t.pendingProps);case 24:return El(t),a=Ne(de),e===null?(n=wc(),n===null&&(n=W,i=zc(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},Dc(t),Yt(t,de,n)):(e.lanes&l&&(zs(e,t),Ja(t,null,null,l),Ka()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Yt(t,de,a)):(a=i.cache,Yt(t,de,a),a!==n.cache&&Cs(t,[de],l,!0))),be(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(j(156,t.tag))}function gt(e){e.flags|=4}function Gu(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(qm())e.flags|=8192;else throw Sl=Ti,Oc}else e.flags&=-16777217}function bo(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!rh(t))if(qm())e.flags|=8192;else throw Sl=Ti,Oc}function Vn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Yf():536870912,e.lanes|=t,ra|=t)}function wa(e,t){if(!X)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function I(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Kx(e,t,l){var a=t.pendingProps;switch(Mc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return I(t),null;case 1:return I(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ct(de),aa(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(_l(t)?gt(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_u())),I(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(gt(t),i!==null?(I(t),bo(t,i)):(I(t),Gu(t,n,null,a,l))):i?i!==e.memoizedState?(gt(t),I(t),bo(t,i)):(I(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&>(t),I(t),Gu(t,n,e,a,l)),null;case 27:if(vi(t),l=Wt.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&>(t);else{if(!a){if(t.stateNode===null)throw Error(j(166));return I(t),null}e=ot.current,_l(t)?Jr(t):(e=uh(n,a,l),t.stateNode=e,gt(t))}return I(t),null;case 5:if(vi(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&>(t);else{if(!a){if(t.stateNode===null)throw Error(j(166));return I(t),null}if(i=ot.current,_l(t))Jr(t);else{var u=qi(Wt.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?u.createElement(n,{is:a.is}):u.createElement(n)}}i[Se]=t,i[Re]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=i;e:switch(Ee(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&>(t)}}return I(t),Gu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&>(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(j(166));if(e=Wt.current,_l(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=je,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Se]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||lh(e.nodeValue,l)),e||ul(t,!0)}else e=qi(e).createTextNode(a),e[Se]=t,t.stateNode=e}return I(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=_l(t),l!==null){if(e===null){if(!a)throw Error(j(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(557));e[Se]=t}else Nl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;I(t),e=!1}else l=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Be(t),t):(Be(t),null);if(t.flags&128)throw Error(j(558))}return I(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=_l(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(j(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(j(317));n[Se]=t}else Nl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;I(t),n=!1}else n=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Be(t),t):(Be(t),null)}return Be(t),t.flags&128?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Vn(t,t.updateQueue),I(t),null);case 4:return aa(),e===null&&tr(t.stateNode.containerInfo),I(t),null;case 10:return Ct(t.type),I(t),null;case 19:if(ve(se),a=t.memoizedState,a===null)return I(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)wa(a,!1);else{if(ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Mi(e),i!==null){for(t.flags|=128,wa(a,!1),e=i.updateQueue,t.updateQueue=e,Vn(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)gd(l,e),l=l.sibling;return F(se,se.current&1|2),X&&St(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&qe()>Ri&&(t.flags|=128,n=!0,wa(a,!1),t.lanes=4194304)}else{if(!n)if(e=Mi(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Vn(t,e),wa(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!X)return I(t),null}else 2*qe()-a.renderingStartTime>Ri&&l!==536870912&&(t.flags|=128,n=!0,wa(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=qe(),e.sibling=null,l=se.current,F(se,n?l&1|2:l&1),X&&St(t,a.treeForkCount),e):(I(t),null);case 22:case 23:return Be(t),_c(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?l&536870912&&!(t.flags&128)&&(I(t),t.subtreeFlags&6&&(t.flags|=8192)):I(t),l=t.updateQueue,l!==null&&Vn(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&ve(bl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ct(de),I(t),null;case 25:return null;case 30:return null}throw Error(j(156,t.tag))}function Jx(e,t){switch(Mc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ct(de),aa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return vi(t),null;case 31:if(t.memoizedState!==null){if(Be(t),t.alternate===null)throw Error(j(340));Nl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Be(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Nl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(se),null;case 4:return aa(),null;case 10:return Ct(t.type),null;case 22:case 23:return Be(t),_c(),e!==null&&ve(bl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ct(de),null;case 25:return null;default:return null}}function gm(e,t){switch(Mc(t),t.tag){case 3:Ct(de),aa();break;case 26:case 27:case 5:vi(t);break;case 4:aa();break;case 31:t.memoizedState!==null&&Be(t);break;case 13:Be(t);break;case 19:ve(se);break;case 10:Ct(t.type);break;case 22:case 23:Be(t),_c(),e!==null&&ve(bl);break;case 24:Ct(de)}}function An(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,u=l.inst;a=i(),u.destroy=a}l=l.next}while(l!==n)}}catch(c){K(t,t.return,c)}}function sl(e,t,l){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){var u=a.inst,c=u.destroy;if(c!==void 0){u.destroy=void 0,n=t;var r=l,f=c;try{f()}catch(h){K(n,r,h)}}}a=a.next}while(a!==i)}}catch(h){K(t,t.return,h)}}function pm(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Cd(t,l)}catch(a){K(e,e.return,a)}}}function vm(e,t,l){l.props=Cl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){K(e,t,a)}}function Wa(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){K(e,t,n)}}function rt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){K(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){K(e,t,n)}else l.current=null}function bm(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){K(e,e.return,n)}}function Xu(e,t,l){try{var a=e.stateNode;yy(a,e.type,l,t),a[Re]=t}catch(n){K(e,e.return,n)}}function Sm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ol(e.type)||e.tag===4}function Qu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sm(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&&ol(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 qs(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Et));else if(a!==4&&(a===27&&ol(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(qs(e,t,l),e=e.sibling;e!==null;)qs(e,t,l),e=e.sibling}function _i(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&ol(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(_i(e,t,l),e=e.sibling;e!==null;)_i(e,t,l),e=e.sibling}function jm(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ee(t,a,l),t[Se]=e,t[Re]=l}catch(i){K(e,e.return,i)}}var jt=!1,fe=!1,Vu=!1,So=typeof WeakSet=="function"?WeakSet:Set,ge=null;function $x(e,t){if(e=e.containerInfo,Ks=Qi,e=rd(e),Nc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var u=0,c=-1,r=-1,f=0,h=0,m=e,d=null;t:for(;;){for(var x;m!==l||n!==0&&m.nodeType!==3||(c=u+n),m!==i||a!==0&&m.nodeType!==3||(r=u+a),m.nodeType===3&&(u+=m.nodeValue.length),(x=m.firstChild)!==null;)d=m,m=x;for(;;){if(m===e)break t;if(d===l&&++f===n&&(c=u),d===i&&++h===a&&(r=u),(x=m.nextSibling)!==null)break;m=d,d=m.parentNode}m=x}l=c===-1||r===-1?null:{start:c,end:r}}else l=null}l=l||{start:0,end:0}}else l=null;for(Js={focusedElem:e,selectionRange:l},Qi=!1,ge=t;ge!==null;)if(t=ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ge=e;else for(;ge!==null;){switch(t=ge,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var v=Cl(l.type,n);e=a.getSnapshotBeforeUpdate(v,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(S){K(l,l.return,S)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Ws(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ws(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(j(163))}if(e=t.sibling,e!==null){e.return=t.return,ge=e;break}ge=t.return}}function Nm(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:vt(e,l),a&4&&An(5,l);break;case 1:if(vt(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(u){K(l,l.return,u)}else{var n=Cl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){K(l,l.return,u)}}a&64&&pm(l),a&512&&Wa(l,l.return);break;case 3:if(vt(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Cd(e,t)}catch(u){K(l,l.return,u)}}break;case 27:t===null&&a&4&&jm(l);case 26:case 5:vt(e,l),t===null&&a&4&&bm(l),a&512&&Wa(l,l.return);break;case 12:vt(e,l);break;case 31:vt(e,l),a&4&&Tm(e,l);break;case 13:vt(e,l),a&4&&Cm(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=ny.bind(null,l),Ey(e,l))));break;case 22:if(a=l.memoizedState!==null||jt,!a){t=t!==null&&t.memoizedState!==null||fe,n=jt;var i=fe;jt=a,(fe=t)&&!i?bt(e,l,(l.subtreeFlags&8772)!==0):vt(e,l),jt=n,fe=i}break;case 30:break;default:vt(e,l)}}function Em(e){var t=e.alternate;t!==null&&(e.alternate=null,Em(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&gc(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 le=null,Oe=!1;function pt(e,t,l){for(l=l.child;l!==null;)Am(e,t,l),l=l.sibling}function Am(e,t,l){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(pn,l)}catch{}switch(l.tag){case 26:fe||rt(l,t),pt(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:fe||rt(l,t);var a=le,n=Oe;ol(l.type)&&(le=l.stateNode,Oe=!1),pt(e,t,l),en(l.stateNode),le=a,Oe=n;break;case 5:fe||rt(l,t);case 6:if(a=le,n=Oe,le=null,pt(e,t,l),le=a,Oe=n,le!==null)if(Oe)try{(le.nodeType===9?le.body:le.nodeName==="HTML"?le.ownerDocument.body:le).removeChild(l.stateNode)}catch(i){K(l,t,i)}else try{le.removeChild(l.stateNode)}catch(i){K(l,t,i)}break;case 18:le!==null&&(Oe?(e=le,Ro(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ma(e)):Ro(le,l.stateNode));break;case 4:a=le,n=Oe,le=l.stateNode.containerInfo,Oe=!0,pt(e,t,l),le=a,Oe=n;break;case 0:case 11:case 14:case 15:sl(2,l,t),fe||sl(4,l,t),pt(e,t,l);break;case 1:fe||(rt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&vm(l,t,a)),pt(e,t,l);break;case 21:pt(e,t,l);break;case 22:fe=(a=fe)||l.memoizedState!==null,pt(e,t,l),fe=a;break;default:pt(e,t,l)}}function Tm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ma(e)}catch(l){K(t,t.return,l)}}}function Cm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ma(e)}catch(l){K(t,t.return,l)}}function Wx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new So),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new So),t;default:throw Error(j(435,e.tag))}}function Zn(e,t){var l=Wx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=iy.bind(null,e,a);a.then(n,n)}})}function ze(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,u=t,c=u;e:for(;c!==null;){switch(c.tag){case 27:if(ol(c.type)){le=c.stateNode,Oe=!1;break e}break;case 5:le=c.stateNode,Oe=!1;break e;case 3:case 4:le=c.stateNode.containerInfo,Oe=!0;break e}c=c.return}if(le===null)throw Error(j(160));Am(i,u,n),le=null,Oe=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Mm(t,e),t=t.sibling}var it=null;function Mm(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ze(t,e),we(e),a&4&&(sl(3,e,e.return),An(3,e),sl(5,e,e.return));break;case 1:ze(t,e),we(e),a&512&&(fe||l===null||rt(l,l.return)),a&64&&jt&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=it;if(ze(t,e),we(e),a&512&&(fe||l===null||rt(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[Sn]||i[Se]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),Ee(i,a,l),i[Se]=e,pe(i),a=i;break e;case"link":var u=Yo("link","href",n).get(a+(l.href||""));if(u){for(var c=0;c<u.length;c++)if(i=u[c],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(c,1);break t}}i=n.createElement(a),Ee(i,a,l),n.head.appendChild(i);break;case"meta":if(u=Yo("meta","content",n).get(a+(l.content||""))){for(c=0;c<u.length;c++)if(i=u[c],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(c,1);break t}}i=n.createElement(a),Ee(i,a,l),n.head.appendChild(i);break;default:throw Error(j(468,a))}i[Se]=e,pe(i),a=i}e.stateNode=a}else Go(n,e.type,e.stateNode);else e.stateNode=qo(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Go(n,e.type,e.stateNode):qo(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Xu(e,e.memoizedProps,l.memoizedProps)}break;case 27:ze(t,e),we(e),a&512&&(fe||l===null||rt(l,l.return)),l!==null&&a&4&&Xu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(ze(t,e),we(e),a&512&&(fe||l===null||rt(l,l.return)),e.flags&32){n=e.stateNode;try{ia(n,"")}catch(v){K(e,e.return,v)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Xu(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Vu=!0);break;case 6:if(ze(t,e),we(e),a&4){if(e.stateNode===null)throw Error(j(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(v){K(e,e.return,v)}}break;case 3:if(oi=null,n=it,it=Yi(t.containerInfo),ze(t,e),it=n,we(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{ma(t.containerInfo)}catch(v){K(e,e.return,v)}Vu&&(Vu=!1,zm(e));break;case 4:a=it,it=Yi(e.stateNode.containerInfo),ze(t,e),we(e),it=a;break;case 12:ze(t,e),we(e);break;case 31:ze(t,e),we(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zn(e,a)));break;case 13:ze(t,e),we(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ru=qe()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zn(e,a)));break;case 22:n=e.memoizedState!==null;var r=l!==null&&l.memoizedState!==null,f=jt,h=fe;if(jt=f||n,fe=h||r,ze(t,e),fe=h,jt=f,we(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||r||jt||fe||gl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){r=l=t;try{if(i=r.stateNode,n)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{c=r.stateNode;var m=r.memoizedProps.style,d=m!=null&&m.hasOwnProperty("display")?m.display:null;c.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(v){K(r,r.return,v)}}}else if(t.tag===6){if(l===null){r=t;try{r.stateNode.nodeValue=n?"":r.memoizedProps}catch(v){K(r,r.return,v)}}}else if(t.tag===18){if(l===null){r=t;try{var x=r.stateNode;n?Uo(x,!0):Uo(r.stateNode,!1)}catch(v){K(r,r.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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Zn(e,l))));break;case 19:ze(t,e),we(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zn(e,a)));break;case 30:break;case 21:break;default:ze(t,e),we(e)}}function we(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Sm(a)){l=a;break}a=a.return}if(l==null)throw Error(j(160));switch(l.tag){case 27:var n=l.stateNode,i=Qu(e);_i(e,i,n);break;case 5:var u=l.stateNode;l.flags&32&&(ia(u,""),l.flags&=-33);var c=Qu(e);_i(e,c,u);break;case 3:case 4:var r=l.stateNode.containerInfo,f=Qu(e);qs(e,f,r);break;default:throw Error(j(161))}}catch(h){K(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vt(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Nm(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:sl(4,t,t.return),gl(t);break;case 1:rt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&vm(t,t.return,l),gl(t);break;case 27:en(t.stateNode);case 26:case 5:rt(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function bt(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,u=i.flags;switch(i.tag){case 0:case 11:case 15:bt(n,i,l),An(4,i);break;case 1:if(bt(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(f){K(a,a.return,f)}if(a=i,n=a.updateQueue,n!==null){var c=a.stateNode;try{var r=n.shared.hiddenCallbacks;if(r!==null)for(n.shared.hiddenCallbacks=null,n=0;n<r.length;n++)Td(r[n],c)}catch(f){K(a,a.return,f)}}l&&u&64&&pm(i),Wa(i,i.return);break;case 27:jm(i);case 26:case 5:bt(n,i,l),l&&a===null&&u&4&&bm(i),Wa(i,i.return);break;case 12:bt(n,i,l);break;case 31:bt(n,i,l),l&&u&4&&Tm(n,i);break;case 13:bt(n,i,l),l&&u&4&&Cm(n,i);break;case 22:i.memoizedState===null&&bt(n,i,l),Wa(i,i.return);break;case 30:break;default:bt(n,i,l)}t=t.sibling}}function $c(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Nn(l))}function Wc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nn(e))}function nt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wm(e,t,l,a),t=t.sibling}function wm(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:nt(e,t,l,a),n&2048&&An(9,t);break;case 1:nt(e,t,l,a);break;case 3:nt(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nn(e)));break;case 12:if(n&2048){nt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,u=i.id,c=i.onPostCommit;typeof c=="function"&&c(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(r){K(t,t.return,r)}}else nt(e,t,l,a);break;case 31:nt(e,t,l,a);break;case 13:nt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,u=t.alternate,t.memoizedState!==null?i._visibility&2?nt(e,t,l,a):Fa(e,t):i._visibility&2?nt(e,t,l,a):(i._visibility|=2,Hl(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&$c(u,t);break;case 24:nt(e,t,l,a),n&2048&&Wc(t.alternate,t);break;default:nt(e,t,l,a)}}function Hl(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,u=t,c=l,r=a,f=u.flags;switch(u.tag){case 0:case 11:case 15:Hl(i,u,c,r,n),An(8,u);break;case 23:break;case 22:var h=u.stateNode;u.memoizedState!==null?h._visibility&2?Hl(i,u,c,r,n):Fa(i,u):(h._visibility|=2,Hl(i,u,c,r,n)),n&&f&2048&&$c(u.alternate,u);break;case 24:Hl(i,u,c,r,n),n&&f&2048&&Wc(u.alternate,u);break;default:Hl(i,u,c,r,n)}t=t.sibling}}function Fa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:Fa(l,a),n&2048&&$c(a.alternate,a);break;case 24:Fa(l,a),n&2048&&Wc(a.alternate,a);break;default:Fa(l,a)}t=t.sibling}}var ka=8192;function Rl(e,t,l){if(e.subtreeFlags&ka)for(e=e.child;e!==null;)Om(e,t,l),e=e.sibling}function Om(e,t,l){switch(e.tag){case 26:Rl(e,t,l),e.flags&ka&&e.memoizedState!==null&&Hy(l,it,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,l);break;case 3:case 4:var a=it;it=Yi(e.stateNode.containerInfo),Rl(e,t,l),it=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=ka,ka=16777216,Rl(e,t,l),ka=a):Rl(e,t,l));break;default:Rl(e,t,l)}}function Dm(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 Oa(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];ge=a,Rm(a,e)}Dm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_m(e),e=e.sibling}function _m(e){switch(e.tag){case 0:case 11:case 15:Oa(e),e.flags&2048&&sl(9,e,e.return);break;case 3:Oa(e);break;case 12:Oa(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ci(e)):Oa(e);break;default:Oa(e)}}function ci(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];ge=a,Rm(a,e)}Dm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:sl(8,t,t.return),ci(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ci(t));break;default:ci(t)}e=e.sibling}}function Rm(e,t){for(;ge!==null;){var l=ge;switch(l.tag){case 0:case 11:case 15:sl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Nn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,ge=a;else e:for(l=e;ge!==null;){a=ge;var n=a.sibling,i=a.return;if(Em(a),a===l){ge=null;break e}if(n!==null){n.return=i,ge=n;break e}ge=i}}}var Fx={getCacheForType:function(e){var t=Ne(de),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Ne(de).controller.signal}},Ix=typeof WeakMap=="function"?WeakMap:Map,Q=0,W=null,Y=null,G=0,Z=0,He=null,Kt=!1,ba=!1,Fc=!1,_t=0,ie=0,cl=0,jl=0,Ic=0,ke=0,ra=0,Ia=null,De=null,Ys=!1,ru=0,Um=0,Ri=1/0,Ui=null,el=null,he=0,tl=null,oa=null,Mt=0,Gs=0,Xs=null,Hm=null,Pa=0,Qs=null;function Xe(){return Q&2&&G!==0?G&-G:D.T!==null?er():Vf()}function Bm(){if(ke===0)if(!(G&536870912)||X){var e=Ln;Ln<<=1,!(Ln&3932160)&&(Ln=262144),ke=e}else ke=536870912;return e=Ve.current,e!==null&&(e.flags|=32),ke}function _e(e,t,l){(e===W&&(Z===2||Z===9)||e.cancelPendingCommit!==null)&&(fa(e,0),Jt(e,G,ke,!1)),bn(e,l),(!(Q&2)||e!==W)&&(e===W&&(!(Q&2)&&(jl|=l),ie===4&&Jt(e,G,ke,!1)),ht(e))}function Lm(e,t,l){if(Q&6)throw Error(j(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||vn(e,t),n=a?ty(e,t):Zu(e,t,!0),i=a;do{if(n===0){ba&&!a&&Jt(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Px(l)){n=Zu(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var c=e;n=Ia;var r=c.current.memoizedState.isDehydrated;if(r&&(fa(c,u).flags|=256),u=Zu(c,u,!1),u!==2){if(Fc&&!r){c.errorRecoveryDisabledLanes|=i,jl|=i,n=4;break e}i=De,De=n,i!==null&&(De===null?De=i:De.push.apply(De,i))}n=u}if(i=!1,n!==2)continue}}if(n===1){fa(e,0),Jt(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(j(345));case 4:if((t&4194048)!==t)break;case 6:Jt(a,t,ke,!Kt);break e;case 2:De=null;break;case 3:case 5:break;default:throw Error(j(329))}if((t&62914560)===t&&(n=ru+300-qe(),10<n)){if(Jt(a,t,ke,!Kt),Ii(a,0,!0)!==0)break e;Mt=t,a.timeoutHandle=nh(jo.bind(null,a,l,De,Ui,Ys,t,ke,jl,ra,Kt,i,"Throttled",-0,0),n);break e}jo(a,l,De,Ui,Ys,t,ke,jl,ra,Kt,i,null,-0,0)}}break}while(!0);ht(e)}function jo(e,t,l,a,n,i,u,c,r,f,h,m,d,x){if(e.timeoutHandle=-1,m=t.subtreeFlags,m&8192||(m&16785408)===16785408){m={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Et},Om(t,i,m);var v=(i&62914560)===i?ru-qe():(i&4194048)===i?Um-qe():0;if(v=By(m,v),v!==null){Mt=i,e.cancelPendingCommit=v(Eo.bind(null,e,t,i,l,a,n,u,c,r,h,m,null,d,x)),Jt(e,i,u,!f);return}}Eo(e,t,i,l,a,n,u,c,r)}function Px(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!Qe(i(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Jt(e,t,l,a){t&=~Ic,t&=~jl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-Ge(n),u=1<<i;a[i]=-1,n&=~u}l!==0&&Gf(e,l,t)}function ou(){return Q&6?!0:(Tn(0),!1)}function Pc(){if(Y!==null){if(Z===0)var e=Y.return;else e=Y,At=Dl=null,Lc(e),ea=null,cn=0,e=Y;for(;e!==null;)gm(e.alternate,e),e=e.return;Y=null}}function fa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,vy(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Mt=0,Pc(),W=e,Y=l=Tt(e.current,null),G=t,Z=0,He=null,Kt=!1,ba=vn(e,t),Fc=!1,ra=ke=Ic=jl=cl=ie=0,De=Ia=null,Ys=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-Ge(a),i=1<<n;t|=e[n],a&=~i}return _t=t,lu(),l}function km(e,t){U=null,D.H=on,t===va||t===nu?(t=Pr(),Z=3):t===Oc?(t=Pr(),Z=4):Z=t===Kc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,He=t,Y===null&&(ie=1,Oi(e,Ie(t,e.current)))}function qm(){var e=Ve.current;return e===null?!0:(G&4194048)===G?et===null:(G&62914560)===G||G&536870912?e===et:!1}function Ym(){var e=D.H;return D.H=on,e===null?on:e}function Gm(){var e=D.A;return D.A=Fx,e}function Hi(){ie=4,Kt||(G&4194048)!==G&&Ve.current!==null||(ba=!0),!(cl&134217727)&&!(jl&134217727)||W===null||Jt(W,G,ke,!1)}function Zu(e,t,l){var a=Q;Q|=2;var n=Ym(),i=Gm();(W!==e||G!==t)&&(Ui=null,fa(e,t)),t=!1;var u=ie;e:do try{if(Z!==0&&Y!==null){var c=Y,r=He;switch(Z){case 8:Pc(),u=6;break e;case 3:case 2:case 9:case 6:Ve.current===null&&(t=!0);var f=Z;if(Z=0,He=null,$l(e,c,r,f),l&&ba){u=0;break e}break;default:f=Z,Z=0,He=null,$l(e,c,r,f)}}ey(),u=ie;break}catch(h){km(e,h)}while(!0);return t&&e.shellSuspendCounter++,At=Dl=null,Q=a,D.H=n,D.A=i,Y===null&&(W=null,G=0,lu()),u}function ey(){for(;Y!==null;)Xm(Y)}function ty(e,t){var l=Q;Q|=2;var a=Ym(),n=Gm();W!==e||G!==t?(Ui=null,Ri=qe()+500,fa(e,t)):ba=vn(e,t);e:do try{if(Z!==0&&Y!==null){t=Y;var i=He;t:switch(Z){case 1:Z=0,He=null,$l(e,t,i,1);break;case 2:case 9:if(Ir(i)){Z=0,He=null,No(t);break}t=function(){Z!==2&&Z!==9||W!==e||(Z=7),ht(e)},i.then(t,t);break e;case 3:Z=7;break e;case 4:Z=5;break e;case 7:Ir(i)?(Z=0,He=null,No(t)):(Z=0,He=null,$l(e,t,i,7));break;case 5:var u=null;switch(Y.tag){case 26:u=Y.memoizedState;case 5:case 27:var c=Y;if(u?rh(u):c.stateNode.complete){Z=0,He=null;var r=c.sibling;if(r!==null)Y=r;else{var f=c.return;f!==null?(Y=f,fu(f)):Y=null}break t}}Z=0,He=null,$l(e,t,i,5);break;case 6:Z=0,He=null,$l(e,t,i,6);break;case 8:Pc(),ie=6;break e;default:throw Error(j(462))}}ly();break}catch(h){km(e,h)}while(!0);return At=Dl=null,D.H=a,D.A=n,Q=l,Y!==null?0:(W=null,G=0,lu(),ie)}function ly(){for(;Y!==null&&!A0();)Xm(Y)}function Xm(e){var t=ym(e.alternate,e,_t);e.memoizedProps=e.pendingProps,t===null?fu(e):Y=t}function No(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=yo(l,t,t.pendingProps,t.type,void 0,G);break;case 11:t=yo(l,t,t.pendingProps,t.type.render,t.ref,G);break;case 5:Lc(t);default:gm(l,t),t=Y=gd(t,_t),t=ym(l,t,_t)}e.memoizedProps=e.pendingProps,t===null?fu(e):Y=t}function $l(e,t,l,a){At=Dl=null,Lc(t),ea=null,cn=0;var n=t.return;try{if(Qx(e,n,t,l,G)){ie=1,Oi(e,Ie(l,e.current)),Y=null;return}}catch(i){if(n!==null)throw Y=n,i;ie=1,Oi(e,Ie(l,e.current)),Y=null;return}t.flags&32768?(X||a===1?e=!0:ba||G&536870912?e=!1:(Kt=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ve.current,a!==null&&a.tag===13&&(a.flags|=16384))),Qm(t,e)):fu(t)}function fu(e){var t=e;do{if(t.flags&32768){Qm(t,Kt);return}e=t.return;var l=Kx(t.alternate,t,_t);if(l!==null){Y=l;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);ie===0&&(ie=5)}function Qm(e,t){do{var l=Jx(e.alternate,e);if(l!==null){l.flags&=32767,Y=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=l}while(e!==null);ie=6,Y=null}function Eo(e,t,l,a,n,i,u,c,r){e.cancelPendingCommit=null;do du();while(he!==0);if(Q&6)throw Error(j(327));if(t!==null){if(t===e.current)throw Error(j(177));if(i=t.lanes|t.childLanes,i|=Ec,U0(e,l,i,u,c,r),e===W&&(Y=W=null,G=0),oa=t,tl=e,Mt=l,Gs=i,Xs=n,Hm=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,uy(bi,function(){return $m(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=D.T,D.T=null,n=V.p,V.p=2,u=Q,Q|=4;try{$x(e,t,l)}finally{Q=u,V.p=n,D.T=a}}he=1,Vm(),Zm(),Km()}}function Vm(){if(he===1){he=0;var e=tl,t=oa,l=(t.flags&13878)!==0;if(t.subtreeFlags&13878||l){l=D.T,D.T=null;var a=V.p;V.p=2;var n=Q;Q|=4;try{Mm(t,e);var i=Js,u=rd(e.containerInfo),c=i.focusedElem,r=i.selectionRange;if(u!==c&&c&&c.ownerDocument&&cd(c.ownerDocument.documentElement,c)){if(r!==null&&Nc(c)){var f=r.start,h=r.end;if(h===void 0&&(h=f),"selectionStart"in c)c.selectionStart=f,c.selectionEnd=Math.min(h,c.value.length);else{var m=c.ownerDocument||document,d=m&&m.defaultView||window;if(d.getSelection){var x=d.getSelection(),v=c.textContent.length,S=Math.min(r.start,v),N=r.end===void 0?S:Math.min(r.end,v);!x.extend&&S>N&&(u=N,N=S,S=u);var y=Vr(c,S),o=Vr(c,N);if(y&&o&&(x.rangeCount!==1||x.anchorNode!==y.node||x.anchorOffset!==y.offset||x.focusNode!==o.node||x.focusOffset!==o.offset)){var g=m.createRange();g.setStart(y.node,y.offset),x.removeAllRanges(),S>N?(x.addRange(g),x.extend(o.node,o.offset)):(g.setEnd(o.node,o.offset),x.addRange(g))}}}}for(m=[],x=c;x=x.parentNode;)x.nodeType===1&&m.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<m.length;c++){var b=m[c];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Qi=!!Ks,Js=Ks=null}finally{Q=n,V.p=a,D.T=l}}e.current=t,he=2}}function Zm(){if(he===2){he=0;var e=tl,t=oa,l=(t.flags&8772)!==0;if(t.subtreeFlags&8772||l){l=D.T,D.T=null;var a=V.p;V.p=2;var n=Q;Q|=4;try{Nm(e,t.alternate,t)}finally{Q=n,V.p=a,D.T=l}}he=3}}function Km(){if(he===4||he===3){he=0,T0();var e=tl,t=oa,l=Mt,a=Hm;t.subtreeFlags&10256||t.flags&10256?he=5:(he=0,oa=tl=null,Jm(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(el=null),yc(l),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot=="function")try{Ye.onCommitFiberRoot(pn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=D.T,n=V.p,V.p=2,D.T=null;try{for(var i=e.onRecoverableError,u=0;u<a.length;u++){var c=a[u];i(c.value,{componentStack:c.stack})}}finally{D.T=t,V.p=n}}Mt&3&&du(),ht(e),n=e.pendingLanes,l&261930&&n&42?e===Qs?Pa++:(Pa=0,Qs=e):Pa=0,Tn(0)}}function Jm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Nn(t)))}function du(){return Vm(),Zm(),Km(),$m()}function $m(){if(he!==5)return!1;var e=tl,t=Gs;Gs=0;var l=yc(Mt),a=D.T,n=V.p;try{V.p=32>l?32:l,D.T=null,l=Xs,Xs=null;var i=tl,u=Mt;if(he=0,oa=tl=null,Mt=0,Q&6)throw Error(j(331));var c=Q;if(Q|=4,_m(i.current),wm(i,i.current,u,l),Q=c,Tn(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot=="function")try{Ye.onPostCommitFiberRoot(pn,i)}catch{}return!0}finally{V.p=n,D.T=a,Jm(e,t)}}function Ao(e,t,l){t=Ie(l,t),t=Bs(e.stateNode,t,2),e=Pt(e,t,2),e!==null&&(bn(e,2),ht(e))}function K(e,t,l){if(e.tag===3)Ao(e,e,l);else for(;t!==null;){if(t.tag===3){Ao(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(el===null||!el.has(a))){e=Ie(l,e),l=om(2),a=Pt(t,l,2),a!==null&&(fm(l,a,t,e),bn(a,2),ht(a));break}}t=t.return}}function Ku(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Ix;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Fc=!0,n.add(l),e=ay.bind(null,e,t,l),t.then(e,e))}function ay(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,W===e&&(G&l)===l&&(ie===4||ie===3&&(G&62914560)===G&&300>qe()-ru?!(Q&2)&&fa(e,0):Ic|=l,ra===G&&(ra=0)),ht(e)}function Wm(e,t){t===0&&(t=Yf()),e=Ol(e,t),e!==null&&(bn(e,t),ht(e))}function ny(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Wm(e,l)}function iy(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(j(314))}a!==null&&a.delete(t),Wm(e,l)}function uy(e,t){return hc(e,t)}var Bi=null,Bl=null,Vs=!1,Li=!1,Ju=!1,$t=0;function ht(e){e!==Bl&&e.next===null&&(Bl===null?Bi=Bl=e:Bl=Bl.next=e),Li=!0,Vs||(Vs=!0,cy())}function Tn(e,t){if(!Ju&&Li){Ju=!0;do for(var l=!1,a=Bi;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var u=a.suspendedLanes,c=a.pingedLanes;i=(1<<31-Ge(42|e)+1)-1,i&=n&~(u&~c),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,To(a,i))}else i=G,i=Ii(a,a===W?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(i&3)||vn(a,i)||(l=!0,To(a,i));a=a.next}while(l);Ju=!1}}function sy(){Fm()}function Fm(){Li=Vs=!1;var e=0;$t!==0&&py()&&(e=$t);for(var t=qe(),l=null,a=Bi;a!==null;){var n=a.next,i=Im(a,t);i===0?(a.next=null,l===null?Bi=n:l.next=n,n===null&&(Bl=l)):(l=a,(e!==0||i&3)&&(Li=!0)),a=n}he!==0&&he!==5||Tn(e),$t!==0&&($t=0)}function Im(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var u=31-Ge(i),c=1<<u,r=n[u];r===-1?(!(c&l)||c&a)&&(n[u]=R0(c,t)):r<=t&&(e.expiredLanes|=c),i&=~c}if(t=W,l=G,l=Ii(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Z===2||Z===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ju(a),e.callbackNode=null,e.callbackPriority=0;if(!(l&3)||vn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&ju(a),yc(l)){case 2:case 8:l=kf;break;case 32:l=bi;break;case 268435456:l=qf;break;default:l=bi}return a=Pm.bind(null,e),l=hc(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&ju(a),e.callbackPriority=2,e.callbackNode=null,2}function Pm(e,t){if(he!==0&&he!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(du()&&e.callbackNode!==l)return null;var a=G;return a=Ii(e,e===W?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Lm(e,a,t),Im(e,qe()),e.callbackNode!=null&&e.callbackNode===l?Pm.bind(null,e):null)}function To(e,t){if(du())return null;Lm(e,t,!0)}function cy(){by(function(){Q&6?hc(Lf,sy):Fm()})}function er(){if($t===0){var e=ua;e===0&&(e=Bn,Bn<<=1,!(Bn&261888)&&(Bn=256)),$t=e}return $t}function Co(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Pn(""+e)}function Mo(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function ry(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=Co((n[Re]||null).action),u=a.submitter;u&&(t=(t=u[Re]||null)?Co(t.formAction):u.getAttribute("formAction"),t!==null&&(i=t,u=null));var c=new Pi("action","action",null,a,n);e.push({event:c,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if($t!==0){var r=u?Mo(n,u):new FormData(n);Us(l,{pending:!0,data:r,method:n.method,action:i},null,r)}}else typeof i=="function"&&(c.preventDefault(),r=u?Mo(n,u):new FormData(n),Us(l,{pending:!0,data:r,method:n.method,action:i},i,r))},currentTarget:n}]})}}for(var $u=0;$u<Ns.length;$u++){var Wu=Ns[$u],oy=Wu.toLowerCase(),fy=Wu[0].toUpperCase()+Wu.slice(1);ut(oy,"on"+fy)}ut(fd,"onAnimationEnd");ut(dd,"onAnimationIteration");ut(md,"onAnimationStart");ut("dblclick","onDoubleClick");ut("focusin","onFocus");ut("focusout","onBlur");ut(Cx,"onTransitionRun");ut(Mx,"onTransitionStart");ut(zx,"onTransitionCancel");ut(hd,"onTransitionEnd");na("onMouseEnter",["mouseout","mouseover"]);na("onMouseLeave",["mouseout","mouseover"]);na("onPointerEnter",["pointerout","pointerover"]);na("onPointerLeave",["pointerout","pointerover"]);Ml("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ml("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ml("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ml("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ml("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ml("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fn="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(" "),dy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fn));function eh(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var u=a.length-1;0<=u;u--){var c=a[u],r=c.instance,f=c.currentTarget;if(c=c.listener,r!==i&&n.isPropagationStopped())break e;i=c,n.currentTarget=f;try{i(n)}catch(h){ji(h)}n.currentTarget=null,i=r}else for(u=0;u<a.length;u++){if(c=a[u],r=c.instance,f=c.currentTarget,c=c.listener,r!==i&&n.isPropagationStopped())break e;i=c,n.currentTarget=f;try{i(n)}catch(h){ji(h)}n.currentTarget=null,i=r}}}}function q(e,t){var l=t[xs];l===void 0&&(l=t[xs]=new Set);var a=e+"__bubble";l.has(a)||(th(t,e,2,!1),l.add(a))}function Fu(e,t,l){var a=0;t&&(a|=4),th(l,e,a,t)}var Kn="_reactListening"+Math.random().toString(36).slice(2);function tr(e){if(!e[Kn]){e[Kn]=!0,Zf.forEach(function(l){l!=="selectionchange"&&(dy.has(l)||Fu(l,!1,e),Fu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kn]||(t[Kn]=!0,Fu("selectionchange",!1,t))}}function th(e,t,l,a){switch(hh(t)){case 2:var n=qy;break;case 8:n=Yy;break;default:n=ir}l=n.bind(null,t,l,e),n=void 0,!bs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function Iu(e,t,l,a,n){var i=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var c=a.stateNode.containerInfo;if(c===n)break;if(u===4)for(u=a.return;u!==null;){var r=u.tag;if((r===3||r===4)&&u.stateNode.containerInfo===n)return;u=u.return}for(;c!==null;){if(u=ql(c),u===null)return;if(r=u.tag,r===5||r===6||r===26||r===27){a=i=u;continue e}c=c.parentNode}}a=a.return}ed(function(){var f=i,h=vc(l),m=[];e:{var d=xd.get(e);if(d!==void 0){var x=Pi,v=e;switch(e){case"keypress":if(ti(l)===0)break e;case"keydown":case"keyup":x=ix;break;case"focusin":v="focus",x=Cu;break;case"focusout":v="blur",x=Cu;break;case"beforeblur":case"afterblur":x=Cu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=Ur;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=K0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=cx;break;case fd:case dd:case md:x=W0;break;case hd:x=ox;break;case"scroll":case"scrollend":x=V0;break;case"wheel":x=dx;break;case"copy":case"cut":case"paste":x=I0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=Br;break;case"toggle":case"beforetoggle":x=hx}var S=(t&4)!==0,N=!S&&(e==="scroll"||e==="scrollend"),y=S?d!==null?d+"Capture":null:d;S=[];for(var o=f,g;o!==null;){var b=o;if(g=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||g===null||y===null||(b=ln(o,y),b!=null&&S.push(dn(o,b,g))),N)break;o=o.return}0<S.length&&(d=new x(d,v,null,l,h),m.push({event:d,listeners:S}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",d&&l!==vs&&(v=l.relatedTarget||l.fromElement)&&(ql(v)||v[ya]))break e;if((x||d)&&(d=h.window===h?h:(d=h.ownerDocument)?d.defaultView||d.parentWindow:window,x?(v=l.relatedTarget||l.toElement,x=f,v=v?ql(v):null,v!==null&&(N=gn(v),S=v.tag,v!==N||S!==5&&S!==27&&S!==6)&&(v=null)):(x=null,v=f),x!==v)){if(S=Ur,b="onMouseLeave",y="onMouseEnter",o="mouse",(e==="pointerout"||e==="pointerover")&&(S=Br,b="onPointerLeave",y="onPointerEnter",o="pointer"),N=x==null?d:Ba(x),g=v==null?d:Ba(v),d=new S(b,o+"leave",x,l,h),d.target=N,d.relatedTarget=g,b=null,ql(h)===f&&(S=new S(y,o+"enter",v,l,h),S.target=g,S.relatedTarget=N,b=S),N=b,x&&v)t:{for(S=my,y=x,o=v,g=0,b=y;b;b=S(b))g++;b=0;for(var A=o;A;A=S(A))b++;for(;0<g-b;)y=S(y),g--;for(;0<b-g;)o=S(o),b--;for(;g--;){if(y===o||o!==null&&y===o.alternate){S=y;break t}y=S(y),o=S(o)}S=null}else S=null;x!==null&&zo(m,d,x,S,!1),v!==null&&N!==null&&zo(m,N,v,S,!0)}}e:{if(d=f?Ba(f):window,x=d.nodeName&&d.nodeName.toLowerCase(),x==="select"||x==="input"&&d.type==="file")var z=Yr;else if(qr(d))if(ud)z=Ex;else{z=jx;var T=Sx}else x=d.nodeName,!x||x.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?f&&pc(f.elementType)&&(z=Yr):z=Nx;if(z&&(z=z(e,f))){id(m,z,l,h);break e}T&&T(e,d,f),e==="focusout"&&f&&d.type==="number"&&f.memoizedProps.value!=null&&ps(d,"number",d.value)}switch(T=f?Ba(f):window,e){case"focusin":(qr(T)||T.contentEditable==="true")&&(Xl=T,Ss=f,Qa=null);break;case"focusout":Qa=Ss=Xl=null;break;case"mousedown":js=!0;break;case"contextmenu":case"mouseup":case"dragend":js=!1,Zr(m,l,h);break;case"selectionchange":if(Tx)break;case"keydown":case"keyup":Zr(m,l,h)}var M;if(jc)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else Gl?ad(e,l)&&(O="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(O="onCompositionStart");O&&(ld&&l.locale!=="ko"&&(Gl||O!=="onCompositionStart"?O==="onCompositionEnd"&&Gl&&(M=td()):(Zt=h,bc="value"in Zt?Zt.value:Zt.textContent,Gl=!0)),T=ki(f,O),0<T.length&&(O=new Hr(O,e,null,l,h),m.push({event:O,listeners:T}),M?O.data=M:(M=nd(l),M!==null&&(O.data=M)))),(M=yx?gx(e,l):px(e,l))&&(O=ki(f,"onBeforeInput"),0<O.length&&(T=new Hr("onBeforeInput","beforeinput",null,l,h),m.push({event:T,listeners:O}),T.data=M)),ry(m,e,f,l,h)}eh(m,t)})}function dn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ki(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=ln(e,l),n!=null&&a.unshift(dn(e,n,i)),n=ln(e,t),n!=null&&a.push(dn(e,n,i))),e.tag===3)return a;e=e.return}return[]}function my(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zo(e,t,l,a,n){for(var i=t._reactName,u=[];l!==null&&l!==a;){var c=l,r=c.alternate,f=c.stateNode;if(c=c.tag,r!==null&&r===a)break;c!==5&&c!==26&&c!==27||f===null||(r=f,n?(f=ln(l,i),f!=null&&u.unshift(dn(l,f,r))):n||(f=ln(l,i),f!=null&&u.push(dn(l,f,r)))),l=l.return}u.length!==0&&e.push({event:t,listeners:u})}var hy=/\r\n?/g,xy=/\u0000|\uFFFD/g;function wo(e){return(typeof e=="string"?e:""+e).replace(hy,`
|
|
49
|
+
`).replace(xy,"")}function lh(e,t){return t=wo(t),wo(e)===t}function J(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ia(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ia(e,""+a);break;case"className":qn(e,"class",a);break;case"tabIndex":qn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":qn(e,l,a);break;case"style":Pf(e,a,i);break;case"data":if(t!=="object"){qn(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Pn(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(t!=="input"&&J(e,t,"name",n.name,n,null),J(e,t,"formEncType",n.formEncType,n,null),J(e,t,"formMethod",n.formMethod,n,null),J(e,t,"formTarget",n.formTarget,n,null)):(J(e,t,"encType",n.encType,n,null),J(e,t,"method",n.method,n,null),J(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Pn(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Et);break;case"onScroll":a!=null&&q("scroll",e);break;case"onScrollEnd":a!=null&&q("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(j(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(j(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Pn(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":q("beforetoggle",e),q("toggle",e),In(e,"popover",a);break;case"xlinkActuate":yt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":yt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":yt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":yt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":yt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":yt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":yt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":yt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":yt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":In(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=X0.get(l)||l,In(e,l,a))}}function Zs(e,t,l,a,n,i){switch(l){case"style":Pf(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(j(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(j(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ia(e,a):(typeof a=="number"||typeof a=="bigint")&&ia(e,""+a);break;case"onScroll":a!=null&&q("scroll",e);break;case"onScrollEnd":a!=null&&q("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Et);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kf.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[Re]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):In(e,l,a)}}}function Ee(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":q("error",e),q("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];if(u!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:J(e,t,i,u,l,null)}}n&&J(e,t,"srcSet",l.srcSet,l,null),a&&J(e,t,"src",l.src,l,null);return;case"input":q("invalid",e);var c=i=u=n=null,r=null,f=null;for(a in l)if(l.hasOwnProperty(a)){var h=l[a];if(h!=null)switch(a){case"name":n=h;break;case"type":u=h;break;case"checked":r=h;break;case"defaultChecked":f=h;break;case"value":i=h;break;case"defaultValue":c=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(j(137,t));break;default:J(e,t,a,h,l,null)}}Wf(e,i,c,r,f,u,n,!1);return;case"select":q("invalid",e),a=u=i=null;for(n in l)if(l.hasOwnProperty(n)&&(c=l[n],c!=null))switch(n){case"value":i=c;break;case"defaultValue":u=c;break;case"multiple":a=c;default:J(e,t,n,c,l,null)}t=i,l=u,e.multiple=!!a,t!=null?Fl(e,!!a,t,!1):l!=null&&Fl(e,!!a,l,!0);return;case"textarea":q("invalid",e),i=n=a=null;for(u in l)if(l.hasOwnProperty(u)&&(c=l[u],c!=null))switch(u){case"value":a=c;break;case"defaultValue":n=c;break;case"children":i=c;break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(j(91));break;default:J(e,t,u,c,l,null)}If(e,a,n,i);return;case"option":for(r in l)if(l.hasOwnProperty(r)&&(a=l[r],a!=null))switch(r){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:J(e,t,r,a,l,null)}return;case"dialog":q("beforetoggle",e),q("toggle",e),q("cancel",e),q("close",e);break;case"iframe":case"object":q("load",e);break;case"video":case"audio":for(a=0;a<fn.length;a++)q(fn[a],e);break;case"image":q("error",e),q("load",e);break;case"details":q("toggle",e);break;case"embed":case"source":case"link":q("error",e),q("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(f in l)if(l.hasOwnProperty(f)&&(a=l[f],a!=null))switch(f){case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:J(e,t,f,a,l,null)}return;default:if(pc(t)){for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!==void 0&&Zs(e,t,h,a,l,void 0));return}}for(c in l)l.hasOwnProperty(c)&&(a=l[c],a!=null&&J(e,t,c,a,l,null))}function yy(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,u=null,c=null,r=null,f=null,h=null;for(x in l){var m=l[x];if(l.hasOwnProperty(x)&&m!=null)switch(x){case"checked":break;case"value":break;case"defaultValue":r=m;default:a.hasOwnProperty(x)||J(e,t,x,null,a,m)}}for(var d in a){var x=a[d];if(m=l[d],a.hasOwnProperty(d)&&(x!=null||m!=null))switch(d){case"type":i=x;break;case"name":n=x;break;case"checked":f=x;break;case"defaultChecked":h=x;break;case"value":u=x;break;case"defaultValue":c=x;break;case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(j(137,t));break;default:x!==m&&J(e,t,d,x,a,m)}}gs(e,u,c,r,f,h,i,n);return;case"select":x=u=c=d=null;for(i in l)if(r=l[i],l.hasOwnProperty(i)&&r!=null)switch(i){case"value":break;case"multiple":x=r;default:a.hasOwnProperty(i)||J(e,t,i,null,a,r)}for(n in a)if(i=a[n],r=l[n],a.hasOwnProperty(n)&&(i!=null||r!=null))switch(n){case"value":d=i;break;case"defaultValue":c=i;break;case"multiple":u=i;default:i!==r&&J(e,t,n,i,a,r)}t=c,l=u,a=x,d!=null?Fl(e,!!l,d,!1):!!a!=!!l&&(t!=null?Fl(e,!!l,t,!0):Fl(e,!!l,l?[]:"",!1));return;case"textarea":x=d=null;for(c in l)if(n=l[c],l.hasOwnProperty(c)&&n!=null&&!a.hasOwnProperty(c))switch(c){case"value":break;case"children":break;default:J(e,t,c,null,a,n)}for(u in a)if(n=a[u],i=l[u],a.hasOwnProperty(u)&&(n!=null||i!=null))switch(u){case"value":d=n;break;case"defaultValue":x=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(j(91));break;default:n!==i&&J(e,t,u,n,a,i)}Ff(e,d,x);return;case"option":for(var v in l)if(d=l[v],l.hasOwnProperty(v)&&d!=null&&!a.hasOwnProperty(v))switch(v){case"selected":e.selected=!1;break;default:J(e,t,v,null,a,d)}for(r in a)if(d=a[r],x=l[r],a.hasOwnProperty(r)&&d!==x&&(d!=null||x!=null))switch(r){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:J(e,t,r,d,a,x)}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 S in l)d=l[S],l.hasOwnProperty(S)&&d!=null&&!a.hasOwnProperty(S)&&J(e,t,S,null,a,d);for(f in a)if(d=a[f],x=l[f],a.hasOwnProperty(f)&&d!==x&&(d!=null||x!=null))switch(f){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(j(137,t));break;default:J(e,t,f,d,a,x)}return;default:if(pc(t)){for(var N in l)d=l[N],l.hasOwnProperty(N)&&d!==void 0&&!a.hasOwnProperty(N)&&Zs(e,t,N,void 0,a,d);for(h in a)d=a[h],x=l[h],!a.hasOwnProperty(h)||d===x||d===void 0&&x===void 0||Zs(e,t,h,d,a,x);return}}for(var y in l)d=l[y],l.hasOwnProperty(y)&&d!=null&&!a.hasOwnProperty(y)&&J(e,t,y,null,a,d);for(m in a)d=a[m],x=l[m],!a.hasOwnProperty(m)||d===x||d==null&&x==null||J(e,t,m,d,a,x)}function Oo(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,u=n.initiatorType,c=n.duration;if(i&&c&&Oo(u)){for(u=0,c=n.responseEnd,a+=1;a<l.length;a++){var r=l[a],f=r.startTime;if(f>c)break;var h=r.transferSize,m=r.initiatorType;h&&Oo(m)&&(r=r.responseEnd,u+=h*(r<c?1:(c-f)/(r-f)))}if(--a,t+=8*(i+u)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ks=null,Js=null;function qi(e){return e.nodeType===9?e:e.ownerDocument}function Do(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 ah(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 $s(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 Pu=null;function py(){var e=window.event;return e&&e.type==="popstate"?e===Pu?!1:(Pu=e,!0):(Pu=null,!1)}var nh=typeof setTimeout=="function"?setTimeout:void 0,vy=typeof clearTimeout=="function"?clearTimeout:void 0,_o=typeof Promise=="function"?Promise:void 0,by=typeof queueMicrotask=="function"?queueMicrotask:typeof _o<"u"?function(e){return _o.resolve(null).then(e).catch(Sy)}:nh;function Sy(e){setTimeout(function(){throw e})}function ol(e){return e==="head"}function Ro(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),ma(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")en(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,en(l);for(var i=l.firstChild;i;){var u=i.nextSibling,c=i.nodeName;i[Sn]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&en(e.ownerDocument.body);l=n}while(l);ma(t)}function Uo(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Ws(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Ws(l),gc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function jy(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Sn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=tt(e.nextSibling),e===null)break}return null}function Ny(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=tt(e.nextSibling),e===null))return null;return e}function ih(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=tt(e.nextSibling),e===null))return null;return e}function Fs(e){return e.data==="$?"||e.data==="$~"}function Is(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ey(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function tt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ps=null;function Ho(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return tt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Bo(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function uh(e,t,l){switch(t=qi(l),e){case"html":if(e=t.documentElement,!e)throw Error(j(452));return e;case"head":if(e=t.head,!e)throw Error(j(453));return e;case"body":if(e=t.body,!e)throw Error(j(454));return e;default:throw Error(j(451))}}function en(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gc(e)}var lt=new Map,Lo=new Set;function Yi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ut=V.d;V.d={f:Ay,r:Ty,D:Cy,C:My,L:zy,m:wy,X:Dy,S:Oy,M:_y};function Ay(){var e=Ut.f(),t=ou();return e||t}function Ty(e){var t=ga(e);t!==null&&t.tag===5&&t.type==="form"?Pd(t):Ut.r(e)}var Sa=typeof document>"u"?null:document;function sh(e,t,l){var a=Sa;if(a&&typeof t=="string"&&t){var n=Fe(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Lo.has(n)||(Lo.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Ee(t,"link",e),pe(t),a.head.appendChild(t)))}}function Cy(e){Ut.D(e),sh("dns-prefetch",e,null)}function My(e,t){Ut.C(e,t),sh("preconnect",e,t)}function zy(e,t,l){Ut.L(e,t,l);var a=Sa;if(a&&e&&t){var n='link[rel="preload"][as="'+Fe(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Fe(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Fe(l.imageSizes)+'"]')):n+='[href="'+Fe(e)+'"]';var i=n;switch(t){case"style":i=da(e);break;case"script":i=ja(e)}lt.has(i)||(e=te({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),lt.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(Cn(i))||t==="script"&&a.querySelector(Mn(i))||(t=a.createElement("link"),Ee(t,"link",e),pe(t),a.head.appendChild(t)))}}function wy(e,t){Ut.m(e,t);var l=Sa;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Fe(a)+'"][href="'+Fe(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ja(e)}if(!lt.has(i)&&(e=te({rel:"modulepreload",href:e},t),lt.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Mn(i)))return}a=l.createElement("link"),Ee(a,"link",e),pe(a),l.head.appendChild(a)}}}function Oy(e,t,l){Ut.S(e,t,l);var a=Sa;if(a&&e){var n=Wl(a).hoistableStyles,i=da(e);t=t||"default";var u=n.get(i);if(!u){var c={loading:0,preload:null};if(u=a.querySelector(Cn(i)))c.loading=5;else{e=te({rel:"stylesheet",href:e,"data-precedence":t},l),(l=lt.get(i))&&lr(e,l);var r=u=a.createElement("link");pe(r),Ee(r,"link",e),r._p=new Promise(function(f,h){r.onload=f,r.onerror=h}),r.addEventListener("load",function(){c.loading|=1}),r.addEventListener("error",function(){c.loading|=2}),c.loading|=4,ri(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:c},n.set(i,u)}}}function Dy(e,t){Ut.X(e,t);var l=Sa;if(l&&e){var a=Wl(l).hoistableScripts,n=ja(e),i=a.get(n);i||(i=l.querySelector(Mn(n)),i||(e=te({src:e,async:!0},t),(t=lt.get(n))&&ar(e,t),i=l.createElement("script"),pe(i),Ee(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function _y(e,t){Ut.M(e,t);var l=Sa;if(l&&e){var a=Wl(l).hoistableScripts,n=ja(e),i=a.get(n);i||(i=l.querySelector(Mn(n)),i||(e=te({src:e,async:!0,type:"module"},t),(t=lt.get(n))&&ar(e,t),i=l.createElement("script"),pe(i),Ee(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function ko(e,t,l,a){var n=(n=Wt.current)?Yi(n):null;if(!n)throw Error(j(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=da(l.href),l=Wl(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=da(l.href);var i=Wl(n).hoistableStyles,u=i.get(e);if(u||(n=n.ownerDocument||n,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,u),(i=n.querySelector(Cn(e)))&&!i._p&&(u.instance=i,u.state.loading=5),lt.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},lt.set(e,l),i||Ry(n,e,l,u.state))),t&&a===null)throw Error(j(528,""));return u}if(t&&a!==null)throw Error(j(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ja(l),l=Wl(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(j(444,e))}}function da(e){return'href="'+Fe(e)+'"'}function Cn(e){return'link[rel="stylesheet"]['+e+"]"}function ch(e){return te({},e,{"data-precedence":e.precedence,precedence:null})}function Ry(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Ee(t,"link",l),pe(t),e.head.appendChild(t))}function ja(e){return'[src="'+Fe(e)+'"]'}function Mn(e){return"script[async]"+e}function qo(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Fe(l.href)+'"]');if(a)return t.instance=a,pe(a),a;var n=te({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),pe(a),Ee(a,"style",n),ri(a,l.precedence,e),t.instance=a;case"stylesheet":n=da(l.href);var i=e.querySelector(Cn(n));if(i)return t.state.loading|=4,t.instance=i,pe(i),i;a=ch(l),(n=lt.get(n))&&lr(a,n),i=(e.ownerDocument||e).createElement("link"),pe(i);var u=i;return u._p=new Promise(function(c,r){u.onload=c,u.onerror=r}),Ee(i,"link",a),t.state.loading|=4,ri(i,l.precedence,e),t.instance=i;case"script":return i=ja(l.src),(n=e.querySelector(Mn(i)))?(t.instance=n,pe(n),n):(a=l,(n=lt.get(i))&&(a=te({},l),ar(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),pe(n),Ee(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(j(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,ri(a,l.precedence,e));return t.instance}function ri(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,u=0;u<a.length;u++){var c=a[u];if(c.dataset.precedence===t)i=c;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function lr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ar(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var oi=null;function Yo(e,t,l){if(oi===null){var a=new Map,n=oi=new Map;n.set(l,a)}else n=oi,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[Sn]||i[Se]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(t)||"";u=e+u;var c=a.get(u);c?c.push(i):a.set(u,[i])}}return a}function Go(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Uy(e,t,l){if(l===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 rh(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function Hy(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(l.state.loading&4)){if(l.instance===null){var n=da(a.href),i=t.querySelector(Cn(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Gi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,pe(i);return}i=t.ownerDocument||t,a=ch(a),(n=lt.get(n))&&lr(a,n),i=i.createElement("link"),pe(i);var u=i;u._p=new Promise(function(c,r){u.onload=c,u.onerror=r}),Ee(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&!(l.state.loading&3)&&(e.count++,l=Gi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var es=0;function By(e,t){return e.stylesheets&&e.count===0&&fi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&fi(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&es===0&&(es=62500*gy());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&fi(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>es?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Gi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xi=null;function fi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xi=new Map,t.forEach(Ly,e),Xi=null,Gi.call(e))}function Ly(e,t){if(!(t.state.loading&4)){var l=Xi.get(e);if(l)var a=l.get(null);else{l=new Map,Xi.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var u=n[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),a=u)}a&&l.set(null,a)}n=t.instance,u=n.getAttribute("data-precedence"),i=l.get(u)||a,i===a&&l.set(null,n),l.set(u,n),this.count++,a=Gi.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var mn={$$typeof:Nt,Provider:null,Consumer:null,_currentValue:pl,_currentValue2:pl,_threadCount:0};function ky(e,t,l,a,n,i,u,c,r){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=Nu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nu(0),this.hiddenUpdates=Nu(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=r,this.incompleteTransitions=new Map}function oh(e,t,l,a,n,i,u,c,r,f,h,m){return e=new ky(e,t,l,u,r,f,h,m,c),t=1,i===!0&&(t|=24),i=Le(3,null,null,t),e.current=i,i.stateNode=e,t=zc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Dc(i),e}function fh(e){return e?(e=Zl,e):Zl}function dh(e,t,l,a,n,i){n=fh(n),a.context===null?a.context=n:a.pendingContext=n,a=It(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Pt(e,a,t),l!==null&&(_e(l,e,t),Za(l,e,t))}function Xo(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function nr(e,t){Xo(e,t),(e=e.alternate)&&Xo(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Ol(e,67108864);t!==null&&_e(t,e,67108864),nr(e,67108864)}}function Qo(e){if(e.tag===13||e.tag===31){var t=Xe();t=xc(t);var l=Ol(e,t);l!==null&&_e(l,e,t),nr(e,t)}}var Qi=!0;function qy(e,t,l,a){var n=D.T;D.T=null;var i=V.p;try{V.p=2,ir(e,t,l,a)}finally{V.p=i,D.T=n}}function Yy(e,t,l,a){var n=D.T;D.T=null;var i=V.p;try{V.p=8,ir(e,t,l,a)}finally{V.p=i,D.T=n}}function ir(e,t,l,a){if(Qi){var n=ec(a);if(n===null)Iu(e,t,a,Vi,l),Vo(e,a);else if(Xy(n,e,t,l,a))a.stopPropagation();else if(Vo(e,a),t&4&&-1<Gy.indexOf(e)){for(;n!==null;){var i=ga(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=xl(i.pendingLanes);if(u!==0){var c=i;for(c.pendingLanes|=2,c.entangledLanes|=2;u;){var r=1<<31-Ge(u);c.entanglements[1]|=r,u&=~r}ht(i),!(Q&6)&&(Ri=qe()+500,Tn(0))}}break;case 31:case 13:c=Ol(i,2),c!==null&&_e(c,i,2),ou(),nr(i,2)}if(i=ec(a),i===null&&Iu(e,t,a,Vi,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Iu(e,t,a,null,l)}}function ec(e){return e=vc(e),ur(e)}var Vi=null;function ur(e){if(Vi=null,e=ql(e),e!==null){var t=gn(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=_f(t),e!==null)return e;e=null}else if(l===31){if(e=Rf(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Vi=e,null}function hh(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(C0()){case Lf:return 2;case kf:return 8;case bi:case M0:return 32;case qf:return 268435456;default:return 32}default:return 32}}var tc=!1,ll=null,al=null,nl=null,hn=new Map,xn=new Map,Qt=[],Gy="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 Vo(e,t){switch(e){case"focusin":case"focusout":ll=null;break;case"dragenter":case"dragleave":al=null;break;case"mouseover":case"mouseout":nl=null;break;case"pointerover":case"pointerout":hn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xn.delete(t.pointerId)}}function Da(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=ga(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Xy(e,t,l,a,n){switch(t){case"focusin":return ll=Da(ll,e,t,l,a,n),!0;case"dragenter":return al=Da(al,e,t,l,a,n),!0;case"mouseover":return nl=Da(nl,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return hn.set(i,Da(hn.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,xn.set(i,Da(xn.get(i)||null,e,t,l,a,n)),!0}return!1}function xh(e){var t=ql(e.target);if(t!==null){var l=gn(t);if(l!==null){if(t=l.tag,t===13){if(t=_f(l),t!==null){e.blockedOn=t,Mr(e.priority,function(){Qo(l)});return}}else if(t===31){if(t=Rf(l),t!==null){e.blockedOn=t,Mr(e.priority,function(){Qo(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function di(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=ec(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);vs=a,l.target.dispatchEvent(a),vs=null}else return t=ga(l),t!==null&&mh(t),e.blockedOn=l,!1;t.shift()}return!0}function Zo(e,t,l){di(e)&&l.delete(t)}function Qy(){tc=!1,ll!==null&&di(ll)&&(ll=null),al!==null&&di(al)&&(al=null),nl!==null&&di(nl)&&(nl=null),hn.forEach(Zo),xn.forEach(Zo)}function Jn(e,t){e.blockedOn===t&&(e.blockedOn=null,tc||(tc=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,Qy)))}var $n=null;function Ko(e){$n!==e&&($n=e,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,function(){$n===e&&($n=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(ur(a||l)===null)continue;break}var i=ga(l);i!==null&&(e.splice(t,3),t-=3,Us(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function ma(e){function t(r){return Jn(r,e)}ll!==null&&Jn(ll,e),al!==null&&Jn(al,e),nl!==null&&Jn(nl,e),hn.forEach(t),xn.forEach(t);for(var l=0;l<Qt.length;l++){var a=Qt[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Qt.length&&(l=Qt[0],l.blockedOn===null);)xh(l),l.blockedOn===null&&Qt.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],u=n[Re]||null;if(typeof i=="function")u||Ko(l);else if(u){var c=null;if(i&&i.hasAttribute("formAction")){if(n=i,u=i[Re]||null)c=u.formAction;else if(ur(n)!==null)continue}else c=u.action;typeof c=="function"?l[a+1]=c:(l.splice(a,3),a-=3),Ko(l)}}}function yh(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return n=u})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function sr(e){this._internalRoot=e}mu.prototype.render=sr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));var l=t.current,a=Xe();dh(l,a,e,t,null,null)};mu.prototype.unmount=sr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),ou(),t[ya]=null}};function mu(e){this._internalRoot=e}mu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vf();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Qt.length&&t!==0&&t<Qt[l].priority;l++);Qt.splice(l,0,e),l===0&&xh(e)}};var Jo=Of.version;if(Jo!=="19.2.4")throw Error(j(527,Jo,"19.2.4"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=b0(t),e=e!==null?Uf(e):null,e=e===null?null:e.stateNode,e};var Vy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wn.isDisabled&&Wn.supportsFiber)try{pn=Wn.inject(Vy),Ye=Wn}catch{}}Wi.createRoot=function(e,t){if(!Df(e))throw Error(j(299));var l=!1,a="",n=sm,i=cm,u=rm;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=oh(e,1,!1,null,null,l,a,null,n,i,u,yh),e[ya]=t.current,tr(e),new sr(t)};Wi.hydrateRoot=function(e,t,l){if(!Df(e))throw Error(j(299));var a=!1,n="",i=sm,u=cm,c=rm,r=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(c=l.onRecoverableError),l.formState!==void 0&&(r=l.formState)),t=oh(e,1,!0,t,l??null,a,n,r,i,u,c,yh),t.context=fh(null),l=t.current,a=Xe(),a=xc(a),n=It(a),n.callback=null,Pt(l,n,a),l=a,t.current.lanes=l,bn(t,l),ht(t),e[ya]=t.current,tr(e),new mu(t)};Wi.version="19.2.4";function gh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gh)}catch(e){console.error(e)}}gh(),Af.exports=Wi;var Zy=Af.exports;const Ky=xf(Zy);/**
|
|
50
|
+
* react-router v7.13.2
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var $o="popstate";function Wo(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Jy(e={}){function t(a,n){var f;let i=(f=n.state)==null?void 0:f.masked,{pathname:u,search:c,hash:r}=i||a.location;return lc("",{pathname:u,search:c,hash:r},n.state&&n.state.usr||null,n.state&&n.state.key||"default",i?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function l(a,n){return typeof n=="string"?n:yn(n)}return Wy(t,l,null,e)}function ae(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $y(){return Math.random().toString(36).substring(2,10)}function Fo(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function lc(e,t,l=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Na(t):t,state:l,key:t&&t.key||a||$y(),unstable_mask:n}}function yn({pathname:e="/",search:t="",hash:l=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),l&&l!=="#"&&(e+=l.charAt(0)==="#"?l:"#"+l),e}function Na(e){let t={};if(e){let l=e.indexOf("#");l>=0&&(t.hash=e.substring(l),e=e.substring(0,l));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Wy(e,t,l,a={}){let{window:n=document.defaultView,v5Compat:i=!1}=a,u=n.history,c="POP",r=null,f=h();f==null&&(f=0,u.replaceState({...u.state,idx:f},""));function h(){return(u.state||{idx:null}).idx}function m(){c="POP";let N=h(),y=N==null?null:N-f;f=N,r&&r({action:c,location:S.location,delta:y})}function d(N,y){c="PUSH";let o=Wo(N)?N:lc(S.location,N,y);f=h()+1;let g=Fo(o,f),b=S.createHref(o.unstable_mask||o);try{u.pushState(g,"",b)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;n.location.assign(b)}i&&r&&r({action:c,location:S.location,delta:1})}function x(N,y){c="REPLACE";let o=Wo(N)?N:lc(S.location,N,y);f=h();let g=Fo(o,f),b=S.createHref(o.unstable_mask||o);u.replaceState(g,"",b),i&&r&&r({action:c,location:S.location,delta:0})}function v(N){return Fy(N)}let S={get action(){return c},get location(){return e(n,u)},listen(N){if(r)throw new Error("A history only accepts one active listener");return n.addEventListener($o,m),r=N,()=>{n.removeEventListener($o,m),r=null}},createHref(N){return t(n,N)},createURL:v,encodeLocation(N){let y=v(N);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:x,go(N){return u.go(N)}};return S}function Fy(e,t=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),ae(l,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:yn(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=l+a),new URL(a,l)}function ph(e,t,l="/"){return Iy(e,t,l,!1)}function Iy(e,t,l,a){let n=typeof t=="string"?Na(t):t,i=Rt(n.pathname||"/",l);if(i==null)return null;let u=vh(e);Py(u);let c=null;for(let r=0;c==null&&r<u.length;++r){let f=og(i);c=cg(u[r],f,a)}return c}function vh(e,t=[],l=[],a="",n=!1){let i=(u,c,r=n,f)=>{let h={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&r)return;ae(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let m=ft([a,h.relativePath]),d=l.concat(h);u.children&&u.children.length>0&&(ae(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),vh(u.children,t,d,m,r)),!(u.path==null&&!u.index)&&t.push({path:m,score:ug(m,u.index),routesMeta:d})};return e.forEach((u,c)=>{var r;if(u.path===""||!((r=u.path)!=null&&r.includes("?")))i(u,c);else for(let f of bh(u.path))i(u,c,!0,f)}),t}function bh(e){let t=e.split("/");if(t.length===0)return[];let[l,...a]=t,n=l.endsWith("?"),i=l.replace(/\?$/,"");if(a.length===0)return n?[i,""]:[i];let u=bh(a.join("/")),c=[];return c.push(...u.map(r=>r===""?i:[i,r].join("/"))),n&&c.push(...u),c.map(r=>e.startsWith("/")&&r===""?"/":r)}function Py(e){e.sort((t,l)=>t.score!==l.score?l.score-t.score:sg(t.routesMeta.map(a=>a.childrenIndex),l.routesMeta.map(a=>a.childrenIndex)))}var eg=/^:[\w-]+$/,tg=3,lg=2,ag=1,ng=10,ig=-2,Io=e=>e==="*";function ug(e,t){let l=e.split("/"),a=l.length;return l.some(Io)&&(a+=ig),t&&(a+=lg),l.filter(n=>!Io(n)).reduce((n,i)=>n+(eg.test(i)?tg:i===""?ag:ng),a)}function sg(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function cg(e,t,l=!1){let{routesMeta:a}=e,n={},i="/",u=[];for(let c=0;c<a.length;++c){let r=a[c],f=c===a.length-1,h=i==="/"?t:t.slice(i.length)||"/",m=Zi({path:r.relativePath,caseSensitive:r.caseSensitive,end:f},h),d=r.route;if(!m&&f&&l&&!a[a.length-1].route.index&&(m=Zi({path:r.relativePath,caseSensitive:r.caseSensitive,end:!1},h)),!m)return null;Object.assign(n,m.params),u.push({params:n,pathname:ft([i,m.pathname]),pathnameBase:hg(ft([i,m.pathnameBase])),route:d}),m.pathnameBase!=="/"&&(i=ft([i,m.pathnameBase]))}return u}function Zi(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[l,a]=rg(e.path,e.caseSensitive,e.end),n=t.match(l);if(!n)return null;let i=n[0],u=i.replace(/(.)\/+$/,"$1"),c=n.slice(1);return{params:a.reduce((f,{paramName:h,isOptional:m},d)=>{if(h==="*"){let v=c[d]||"";u=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const x=c[d];return m&&!x?f[h]=void 0:f[h]=(x||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:u,pattern:e}}function rg(e,t=!1,l=!0){dt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,c,r,f,h)=>{if(a.push({paramName:c,isOptional:r!=null}),r){let m=h.charAt(f+u.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function og(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Rt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let l=t.endsWith("/")?t.length-1:t.length,a=e.charAt(l);return a&&a!=="/"?null:e.slice(l)||"/"}var fg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function dg(e,t="/"){let{pathname:l,search:a="",hash:n=""}=typeof e=="string"?Na(e):e,i;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?i=Po(l.substring(1),"/"):i=Po(l,t)):i=t,{pathname:i,search:xg(a),hash:yg(n)}}function Po(e,t){let l=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?l.length>1&&l.pop():n!=="."&&l.push(n)}),l.length>1?l.join("/"):"/"}function ts(e,t,l,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mg(e){return e.filter((t,l)=>l===0||t.route.path&&t.route.path.length>0)}function Sh(e){let t=mg(e);return t.map((l,a)=>a===t.length-1?l.pathname:l.pathnameBase)}function cr(e,t,l,a=!1){let n;typeof e=="string"?n=Na(e):(n={...e},ae(!n.pathname||!n.pathname.includes("?"),ts("?","pathname","search",n)),ae(!n.pathname||!n.pathname.includes("#"),ts("#","pathname","hash",n)),ae(!n.search||!n.search.includes("#"),ts("#","search","hash",n)));let i=e===""||n.pathname==="",u=i?"/":n.pathname,c;if(u==null)c=l;else{let m=t.length-1;if(!a&&u.startsWith("..")){let d=u.split("/");for(;d[0]==="..";)d.shift(),m-=1;n.pathname=d.join("/")}c=m>=0?t[m]:"/"}let r=dg(n,c),f=u&&u!=="/"&&u.endsWith("/"),h=(i||u===".")&&l.endsWith("/");return!r.pathname.endsWith("/")&&(f||h)&&(r.pathname+="/"),r}var ft=e=>e.join("/").replace(/\/\/+/g,"/"),hg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xg=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,gg=class{constructor(e,t,l,a=!1){this.status=e,this.statusText=t||"",this.internal=a,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function pg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function vg(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var jh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nh(e,t){let l=e;if(typeof l!="string"||!fg.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let a=l,n=!1;if(jh)try{let i=new URL(window.location.href),u=l.startsWith("//")?new URL(i.protocol+l):new URL(l),c=Rt(u.pathname,t);u.origin===i.origin&&c!=null?l=c+u.search+u.hash:n=!0}catch{dt(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Eh=["POST","PUT","PATCH","DELETE"];new Set(Eh);var bg=["GET",...Eh];new Set(bg);var Ea=p.createContext(null);Ea.displayName="DataRouter";var hu=p.createContext(null);hu.displayName="DataRouterState";var Sg=p.createContext(!1),Ah=p.createContext({isTransitioning:!1});Ah.displayName="ViewTransition";var jg=p.createContext(new Map);jg.displayName="Fetchers";var Ng=p.createContext(null);Ng.displayName="Await";var at=p.createContext(null);at.displayName="Navigation";var zn=p.createContext(null);zn.displayName="Location";var xt=p.createContext({outlet:null,matches:[],isDataRoute:!1});xt.displayName="Route";var rr=p.createContext(null);rr.displayName="RouteError";var Th="REACT_ROUTER_ERROR",Eg="REDIRECT",Ag="ROUTE_ERROR_RESPONSE";function Tg(e){if(e.startsWith(`${Th}:${Eg}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Cg(e){if(e.startsWith(`${Th}:${Ag}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new gg(t.status,t.statusText,t.data)}catch{}}function Mg(e,{relative:t}={}){ae(wn(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:a}=p.useContext(at),{hash:n,pathname:i,search:u}=On(e,{relative:t}),c=i;return l!=="/"&&(c=i==="/"?l:ft([l,i])),a.createHref({pathname:c,search:u,hash:n})}function wn(){return p.useContext(zn)!=null}function Ht(){return ae(wn(),"useLocation() may be used only in the context of a <Router> component."),p.useContext(zn).location}var Ch="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Mh(e){p.useContext(at).static||p.useLayoutEffect(e)}function or(){let{isDataRoute:e}=p.useContext(xt);return e?Gg():zg()}function zg(){ae(wn(),"useNavigate() may be used only in the context of a <Router> component.");let e=p.useContext(Ea),{basename:t,navigator:l}=p.useContext(at),{matches:a}=p.useContext(xt),{pathname:n}=Ht(),i=JSON.stringify(Sh(a)),u=p.useRef(!1);return Mh(()=>{u.current=!0}),p.useCallback((r,f={})=>{if(dt(u.current,Ch),!u.current)return;if(typeof r=="number"){l.go(r);return}let h=cr(r,JSON.parse(i),n,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ft([t,h.pathname])),(f.replace?l.replace:l.push)(h,f.state,f)},[t,l,i,n,e])}p.createContext(null);function wg(){let{matches:e}=p.useContext(xt),t=e[e.length-1];return t?t.params:{}}function On(e,{relative:t}={}){let{matches:l}=p.useContext(xt),{pathname:a}=Ht(),n=JSON.stringify(Sh(l));return p.useMemo(()=>cr(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Og(e,t){return zh(e,t)}function zh(e,t,l){var N;ae(wn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=p.useContext(at),{matches:n}=p.useContext(xt),i=n[n.length-1],u=i?i.params:{},c=i?i.pathname:"/",r=i?i.pathnameBase:"/",f=i&&i.route;{let y=f&&f.path||"";Oh(c,!f||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let h=Ht(),m;if(t){let y=typeof t=="string"?Na(t):t;ae(r==="/"||((N=y.pathname)==null?void 0:N.startsWith(r)),`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 "${r}" but pathname "${y.pathname}" was given in the \`location\` prop.`),m=y}else m=h;let d=m.pathname||"/",x=d;if(r!=="/"){let y=r.replace(/^\//,"").split("/");x="/"+d.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=ph(e,{pathname:x});dt(f||v!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),dt(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.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 S=Hg(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},u,y.params),pathname:ft([r,a.encodeLocation?a.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?r:ft([r,a.encodeLocation?a.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),n,l);return t&&S?p.createElement(zn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},S):S}function Dg(){let e=Yg(),t=pg(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),l=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},i={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=p.createElement(p.Fragment,null,p.createElement("p",null,"๐ฟ Hey developer ๐"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:i},"ErrorBoundary")," or"," ",p.createElement("code",{style:i},"errorElement")," prop on your route.")),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),l?p.createElement("pre",{style:n},l):null,u)}var _g=p.createElement(Dg,null),wh=class extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const l=Cg(e.digest);l&&(e=l)}let t=e!==void 0?p.createElement(xt.Provider,{value:this.props.routeContext},p.createElement(rr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?p.createElement(Rg,{error:e},t):t}};wh.contextType=Sg;var ls=new WeakMap;function Rg({children:e,error:t}){let{basename:l}=p.useContext(at);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=Tg(t.digest);if(a){let n=ls.get(t);if(n)throw n;let i=Nh(a.location,l);if(jh&&!ls.get(t))if(i.isExternal||a.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:a.replace}));throw ls.set(t,u),u}return p.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ug({routeContext:e,match:t,children:l}){let a=p.useContext(Ea);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),p.createElement(xt.Provider,{value:e},l)}function Hg(e,t=[],l){let a=l==null?void 0:l.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,i=a==null?void 0:a.errors;if(i!=null){let h=n.findIndex(m=>m.route.id&&(i==null?void 0:i[m.route.id])!==void 0);ae(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),n=n.slice(0,Math.min(n.length,h+1))}let u=!1,c=-1;if(l&&a){u=a.renderFallback;for(let h=0;h<n.length;h++){let m=n[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(c=h),m.route.id){let{loaderData:d,errors:x}=a,v=m.route.loader&&!d.hasOwnProperty(m.route.id)&&(!x||x[m.route.id]===void 0);if(m.route.lazy||v){l.isStatic&&(u=!0),c>=0?n=n.slice(0,c+1):n=[n[0]];break}}}}let r=l==null?void 0:l.onError,f=a&&r?(h,m)=>{var d,x;r(h,{location:a.location,params:((x=(d=a.matches)==null?void 0:d[0])==null?void 0:x.params)??{},unstable_pattern:vg(a.matches),errorInfo:m})}:void 0;return n.reduceRight((h,m,d)=>{let x,v=!1,S=null,N=null;a&&(x=i&&m.route.id?i[m.route.id]:void 0,S=m.route.errorElement||_g,u&&(c<0&&d===0?(Oh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,N=null):c===d&&(v=!0,N=m.route.hydrateFallbackElement||null)));let y=t.concat(n.slice(0,d+1)),o=()=>{let g;return x?g=S:v?g=N:m.route.Component?g=p.createElement(m.route.Component,null):m.route.element?g=m.route.element:g=h,p.createElement(Ug,{match:m,routeContext:{outlet:h,matches:y,isDataRoute:a!=null},children:g})};return a&&(m.route.ErrorBoundary||m.route.errorElement||d===0)?p.createElement(wh,{location:a.location,revalidation:a.revalidation,component:S,error:x,children:o(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:f}):o()},null)}function fr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bg(e){let t=p.useContext(Ea);return ae(t,fr(e)),t}function Lg(e){let t=p.useContext(hu);return ae(t,fr(e)),t}function kg(e){let t=p.useContext(xt);return ae(t,fr(e)),t}function dr(e){let t=kg(e),l=t.matches[t.matches.length-1];return ae(l.route.id,`${e} can only be used on routes that contain a unique "id"`),l.route.id}function qg(){return dr("useRouteId")}function Yg(){var a;let e=p.useContext(rr),t=Lg("useRouteError"),l=dr("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[l]}function Gg(){let{router:e}=Bg("useNavigate"),t=dr("useNavigate"),l=p.useRef(!1);return Mh(()=>{l.current=!0}),p.useCallback(async(n,i={})=>{dt(l.current,Ch),l.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))},[e,t])}var ef={};function Oh(e,t,l){!t&&!ef[e]&&(ef[e]=!0,dt(!1,l))}p.memo(Xg);function Xg({routes:e,future:t,state:l,isStatic:a,onError:n}){return zh(e,void 0,{state:l,isStatic:a,onError:n})}function Ze(e){ae(!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 Qg({basename:e="/",children:t=null,location:l,navigationType:a="POP",navigator:n,static:i=!1,unstable_useTransitions:u}){ae(!wn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),r=p.useMemo(()=>({basename:c,navigator:n,static:i,unstable_useTransitions:u,future:{}}),[c,n,i,u]);typeof l=="string"&&(l=Na(l));let{pathname:f="/",search:h="",hash:m="",state:d=null,key:x="default",unstable_mask:v}=l,S=p.useMemo(()=>{let N=Rt(f,c);return N==null?null:{location:{pathname:N,search:h,hash:m,state:d,key:x,unstable_mask:v},navigationType:a}},[c,f,h,m,d,x,a,v]);return dt(S!=null,`<Router basename="${c}"> is not able to match the URL "${f}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:p.createElement(at.Provider,{value:r},p.createElement(zn.Provider,{children:t,value:S}))}function Vg({children:e,location:t}){return Og(ac(e),t)}function ac(e,t=[]){let l=[];return p.Children.forEach(e,(a,n)=>{if(!p.isValidElement(a))return;let i=[...t,n];if(a.type===p.Fragment){l.push.apply(l,ac(a.props.children,i));return}ae(a.type===Ze,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ae(!a.props.index||!a.props.children,"An index route cannot have child routes.");let u={id:a.props.id||i.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(u.children=ac(a.props.children,i)),l.push(u)}),l}var mi="get",hi="application/x-www-form-urlencoded";function xu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Zg(e){return xu(e)&&e.tagName.toLowerCase()==="button"}function Kg(e){return xu(e)&&e.tagName.toLowerCase()==="form"}function Jg(e){return xu(e)&&e.tagName.toLowerCase()==="input"}function $g(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wg(e,t){return e.button===0&&(!t||t==="_self")&&!$g(e)}var Fn=null;function Fg(){if(Fn===null)try{new FormData(document.createElement("form"),0),Fn=!1}catch{Fn=!0}return Fn}var Ig=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function as(e){return e!=null&&!Ig.has(e)?(dt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hi}"`),null):e}function Pg(e,t){let l,a,n,i,u;if(Kg(e)){let c=e.getAttribute("action");a=c?Rt(c,t):null,l=e.getAttribute("method")||mi,n=as(e.getAttribute("enctype"))||hi,i=new FormData(e)}else if(Zg(e)||Jg(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let r=e.getAttribute("formaction")||c.getAttribute("action");if(a=r?Rt(r,t):null,l=e.getAttribute("formmethod")||c.getAttribute("method")||mi,n=as(e.getAttribute("formenctype"))||as(c.getAttribute("enctype"))||hi,i=new FormData(c,e),!Fg()){let{name:f,type:h,value:m}=e;if(h==="image"){let d=f?`${f}.`:"";i.append(`${d}x`,"0"),i.append(`${d}y`,"0")}else f&&i.append(f,m)}}else{if(xu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=mi,a=null,n=hi,u=e}return i&&n==="text/plain"&&(u=i,i=void 0),{action:a,method:l.toLowerCase(),encType:n,formData:i,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function mr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ep(e,t,l,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return l?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&Rt(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${a}`,n}async function tp(e,t){if(e.id in t)return t[e.id];try{let l=await import(e.module);return t[e.id]=l,l}catch(l){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lp(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function ap(e,t,l){let a=await Promise.all(e.map(async n=>{let i=t.routes[n.route.id];if(i){let u=await tp(i,l);return u.links?u.links():[]}return[]}));return sp(a.flat(1).filter(lp).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function tf(e,t,l,a,n,i){let u=(r,f)=>l[f]?r.route.id!==l[f].route.id:!0,c=(r,f)=>{var h;return l[f].pathname!==r.pathname||((h=l[f].route.path)==null?void 0:h.endsWith("*"))&&l[f].params["*"]!==r.params["*"]};return i==="assets"?t.filter((r,f)=>u(r,f)||c(r,f)):i==="data"?t.filter((r,f)=>{var m;let h=a.routes[r.route.id];if(!h||!h.hasLoader)return!1;if(u(r,f)||c(r,f))return!0;if(r.route.shouldRevalidate){let d=r.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:((m=l[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:r.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function np(e,t,{includeHydrateFallback:l}={}){return ip(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let i=[n.module];return n.clientActionModule&&(i=i.concat(n.clientActionModule)),n.clientLoaderModule&&(i=i.concat(n.clientLoaderModule)),l&&n.hydrateFallbackModule&&(i=i.concat(n.hydrateFallbackModule)),n.imports&&(i=i.concat(n.imports)),i}).flat(1))}function ip(e){return[...new Set(e)]}function up(e){let t={},l=Object.keys(e).sort();for(let a of l)t[a]=e[a];return t}function sp(e,t){let l=new Set;return new Set(t),e.reduce((a,n)=>{let i=JSON.stringify(up(n));return l.has(i)||(l.add(i),a.push({key:i,link:n})),a},[])}function Dh(){let e=p.useContext(Ea);return mr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function cp(){let e=p.useContext(hu);return mr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var hr=p.createContext(void 0);hr.displayName="FrameworkContext";function _h(){let e=p.useContext(hr);return mr(e,"You must render this element inside a <HydratedRouter> element"),e}function rp(e,t){let l=p.useContext(hr),[a,n]=p.useState(!1),[i,u]=p.useState(!1),{onFocus:c,onBlur:r,onMouseEnter:f,onMouseLeave:h,onTouchStart:m}=t,d=p.useRef(null);p.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let S=y=>{y.forEach(o=>{u(o.isIntersecting)})},N=new IntersectionObserver(S,{threshold:.5});return d.current&&N.observe(d.current),()=>{N.disconnect()}}},[e]),p.useEffect(()=>{if(a){let S=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(S)}}},[a]);let x=()=>{n(!0)},v=()=>{n(!1),u(!1)};return l?e!=="intent"?[i,d,{}]:[i,d,{onFocus:_a(c,x),onBlur:_a(r,v),onMouseEnter:_a(f,x),onMouseLeave:_a(h,v),onTouchStart:_a(m,x)}]:[!1,d,{}]}function _a(e,t){return l=>{e&&e(l),l.defaultPrevented||t(l)}}function op({page:e,...t}){let{router:l}=Dh(),a=p.useMemo(()=>ph(l.routes,e,l.basename),[l.routes,e,l.basename]);return a?p.createElement(dp,{page:e,matches:a,...t}):null}function fp(e){let{manifest:t,routeModules:l}=_h(),[a,n]=p.useState([]);return p.useEffect(()=>{let i=!1;return ap(e,t,l).then(u=>{i||n(u)}),()=>{i=!0}},[e,t,l]),a}function dp({page:e,matches:t,...l}){let a=Ht(),{future:n,manifest:i,routeModules:u}=_h(),{basename:c}=Dh(),{loaderData:r,matches:f}=cp(),h=p.useMemo(()=>tf(e,t,f,i,a,"data"),[e,t,f,i,a]),m=p.useMemo(()=>tf(e,t,f,i,a,"assets"),[e,t,f,i,a]),d=p.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let S=new Set,N=!1;if(t.forEach(o=>{var b;let g=i.routes[o.route.id];!g||!g.hasLoader||(!h.some(A=>A.route.id===o.route.id)&&o.route.id in r&&((b=u[o.route.id])!=null&&b.shouldRevalidate)||g.hasClientLoader?N=!0:S.add(o.route.id))}),S.size===0)return[];let y=ep(e,c,n.unstable_trailingSlashAwareDataRequests,"data");return N&&S.size>0&&y.searchParams.set("_routes",t.filter(o=>S.has(o.route.id)).map(o=>o.route.id).join(",")),[y.pathname+y.search]},[c,n.unstable_trailingSlashAwareDataRequests,r,a,i,h,t,e,u]),x=p.useMemo(()=>np(m,i),[m,i]),v=fp(m);return p.createElement(p.Fragment,null,d.map(S=>p.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...l})),x.map(S=>p.createElement("link",{key:S,rel:"modulepreload",href:S,...l})),v.map(({key:S,link:N})=>p.createElement("link",{key:S,nonce:l.nonce,...N,crossOrigin:N.crossOrigin??l.crossOrigin})))}function mp(...e){return t=>{e.forEach(l=>{typeof l=="function"?l(t):l!=null&&(l.current=t)})}}var hp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hp&&(window.__reactRouterVersion="7.13.2")}catch{}function xp({basename:e,children:t,unstable_useTransitions:l,window:a}){let n=p.useRef();n.current==null&&(n.current=Jy({window:a,v5Compat:!0}));let i=n.current,[u,c]=p.useState({action:i.action,location:i.location}),r=p.useCallback(f=>{l===!1?c(f):p.startTransition(()=>c(f))},[l]);return p.useLayoutEffect(()=>i.listen(r),[i,r]),p.createElement(Qg,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:i,unstable_useTransitions:l})}var Rh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Uh=p.forwardRef(function({onClick:t,discover:l="render",prefetch:a="none",relative:n,reloadDocument:i,replace:u,unstable_mask:c,state:r,target:f,to:h,preventScrollReset:m,viewTransition:d,unstable_defaultShouldRevalidate:x,...v},S){let{basename:N,navigator:y,unstable_useTransitions:o}=p.useContext(at),g=typeof h=="string"&&Rh.test(h),b=Nh(h,N);h=b.to;let A=Mg(h,{relative:n}),z=Ht(),T=null;if(c){let Me=cr(c,[],z.unstable_mask?z.unstable_mask.pathname:"/",!0);N!=="/"&&(Me.pathname=Me.pathname==="/"?N:ft([N,Me.pathname])),T=y.createHref(Me)}let[M,O,H]=rp(a,v),E=pp(h,{replace:u,unstable_mask:c,state:r,target:f,preventScrollReset:m,relative:n,viewTransition:d,unstable_defaultShouldRevalidate:x,unstable_useTransitions:o});function re(Me){t&&t(Me),Me.defaultPrevented||E(Me)}let Bt=!(b.isExternal||i),fl=p.createElement("a",{...v,...H,href:(Bt?T:void 0)||b.absoluteURL||A,onClick:Bt?re:t,ref:mp(S,O),target:f,"data-discover":!g&&l==="render"?"true":void 0});return M&&!g?p.createElement(p.Fragment,null,fl,p.createElement(op,{page:A})):fl});Uh.displayName="Link";var Hh=p.forwardRef(function({"aria-current":t="page",caseSensitive:l=!1,className:a="",end:n=!1,style:i,to:u,viewTransition:c,children:r,...f},h){let m=On(u,{relative:f.relative}),d=Ht(),x=p.useContext(hu),{navigator:v,basename:S}=p.useContext(at),N=x!=null&&Np(m)&&c===!0,y=v.encodeLocation?v.encodeLocation(m).pathname:m.pathname,o=d.pathname,g=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;l||(o=o.toLowerCase(),g=g?g.toLowerCase():null,y=y.toLowerCase()),g&&S&&(g=Rt(g,S)||g);const b=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let A=o===y||!n&&o.startsWith(y)&&o.charAt(b)==="/",z=g!=null&&(g===y||!n&&g.startsWith(y)&&g.charAt(y.length)==="/"),T={isActive:A,isPending:z,isTransitioning:N},M=A?t:void 0,O;typeof a=="function"?O=a(T):O=[a,A?"active":null,z?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let H=typeof i=="function"?i(T):i;return p.createElement(Uh,{...f,"aria-current":M,className:O,ref:h,style:H,to:u,viewTransition:c},typeof r=="function"?r(T):r)});Hh.displayName="NavLink";var yp=p.forwardRef(({discover:e="render",fetcherKey:t,navigate:l,reloadDocument:a,replace:n,state:i,method:u=mi,action:c,onSubmit:r,relative:f,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:d,...x},v)=>{let{unstable_useTransitions:S}=p.useContext(at),N=Sp(),y=jp(c,{relative:f}),o=u.toLowerCase()==="get"?"get":"post",g=typeof c=="string"&&Rh.test(c),b=A=>{if(r&&r(A),A.defaultPrevented)return;A.preventDefault();let z=A.nativeEvent.submitter,T=(z==null?void 0:z.getAttribute("formmethod"))||u,M=()=>N(z||A.currentTarget,{fetcherKey:t,method:T,navigate:l,replace:n,state:i,relative:f,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:d});S&&l!==!1?p.startTransition(()=>M()):M()};return p.createElement("form",{ref:v,method:o,action:y,onSubmit:a?r:b,...x,"data-discover":!g&&e==="render"?"true":void 0})});yp.displayName="Form";function gp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bh(e){let t=p.useContext(Ea);return ae(t,gp(e)),t}function pp(e,{target:t,replace:l,unstable_mask:a,state:n,preventScrollReset:i,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:r,unstable_useTransitions:f}={}){let h=or(),m=Ht(),d=On(e,{relative:u});return p.useCallback(x=>{if(Wg(x,t)){x.preventDefault();let v=l!==void 0?l:yn(m)===yn(d),S=()=>h(e,{replace:v,unstable_mask:a,state:n,preventScrollReset:i,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:r});f?p.startTransition(()=>S()):S()}},[m,h,d,l,a,n,t,e,i,u,c,r,f])}var vp=0,bp=()=>`__${String(++vp)}__`;function Sp(){let{router:e}=Bh("useSubmit"),{basename:t}=p.useContext(at),l=qg(),a=e.fetch,n=e.navigate;return p.useCallback(async(i,u={})=>{let{action:c,method:r,encType:f,formData:h,body:m}=Pg(i,t);if(u.navigate===!1){let d=u.fetcherKey||bp();await a(d,l,u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:h,body:m,formMethod:u.method||r,formEncType:u.encType||f,flushSync:u.flushSync})}else await n(u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:h,body:m,formMethod:u.method||r,formEncType:u.encType||f,replace:u.replace,state:u.state,fromRouteId:l,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,n,t,l])}function jp(e,{relative:t}={}){let{basename:l}=p.useContext(at),a=p.useContext(xt);ae(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),i={...On(e||".",{relative:t})},u=Ht();if(e==null){i.search=u.search;let c=new URLSearchParams(i.search),r=c.getAll("index");if(r.some(h=>h==="")){c.delete("index"),r.filter(m=>m).forEach(m=>c.append("index",m));let h=c.toString();i.search=h?`?${h}`:""}}return(!e||e===".")&&n.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(i.pathname=i.pathname==="/"?l:ft([l,i.pathname])),yn(i)}function Np(e,{relative:t}={}){let l=p.useContext(Ah);ae(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Bh("useViewTransitionState"),n=On(e,{relative:t});if(!l.isTransitioning)return!1;let i=Rt(l.currentLocation.pathname,a)||l.currentLocation.pathname,u=Rt(l.nextLocation.pathname,a)||l.nextLocation.pathname;return Zi(n.pathname,u)!=null||Zi(n.pathname,i)!=null}const lf=e=>{let t;const l=new Set,a=(f,h)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const d=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),l.forEach(x=>x(t,d))}},n=()=>t,c={setState:a,getState:n,getInitialState:()=>r,subscribe:f=>(l.add(f),()=>l.delete(f))},r=t=e(a,n,c);return c},Ep=e=>e?lf(e):lf,Ap=e=>e;function Tp(e,t=Ap){const l=Ra.useSyncExternalStore(e.subscribe,Ra.useCallback(()=>t(e.getState()),[e,t]),Ra.useCallback(()=>t(e.getInitialState()),[e,t]));return Ra.useDebugValue(l),l}const af=e=>{const t=Ep(e),l=a=>Tp(t,a);return Object.assign(l,t),l},Lh=e=>e?af(e):af,xi="/api";async function B(e,t){const l=await fetch(`${xi}${e}`,{headers:{"Content-Type":"application/json",...t==null?void 0:t.headers},...t});if(!l.ok){const a=await l.json().catch(()=>({error:l.statusText}));throw new Error(a.error||`HTTP ${l.status}`)}return l.json()}const _={listConversations:()=>B("/conversations"),createConversation:e=>B("/conversations",{method:"POST",body:JSON.stringify({title:e})}),getConversation:e=>B(`/conversations/${e}`),deleteConversation:e=>B("/conversations/"+e,{method:"DELETE"}),updateConversationTitle:(e,t)=>B(`/conversations/${e}`,{method:"PATCH",body:JSON.stringify({title:t})}),sendMessage:(e,t)=>fetch(`${xi}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:e,message:t})}),streamMessage:async(e,t,l)=>{var c;const a=await fetch(`${xi}/chat/stream`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:e,message:t})});if(!a.ok){const r=await a.json().catch(()=>({error:a.statusText}));throw new Error(r.error||`HTTP ${a.status}`)}const n=(c=a.body)==null?void 0:c.getReader();if(!n)throw new Error("No response body");const i=new TextDecoder;let u="";for(;;){const{done:r,value:f}=await n.read();if(r)break;u+=i.decode(f,{stream:!0});const h=u.split(`
|
|
61
|
+
`);u=h.pop()||"";let m="message";for(const d of h)if(d.startsWith("event: "))m=d.slice(7).trim();else if(d.startsWith("data: "))try{const x=JSON.parse(d.slice(6));l(m,x)}catch{}else d===""&&(m="message")}},listTasks:e=>B(`/tasks${e?`?conversationId=${e}`:""}`),getTask:e=>B(`/tasks/${e}`),cancelTask:e=>B(`/tasks/${e}`,{method:"PATCH",body:JSON.stringify({status:"cancelled"})}),listCollections:()=>B("/knowledge/collections"),listDocuments:e=>B(`/knowledge/documents${e?`?collection=${e}`:""}`),uploadDocument:(e,t="default")=>{const l=new FormData;return l.append("file",e),l.append("collection",t),fetch(`${xi}/knowledge/upload`,{method:"POST",body:l}).then(a=>a.json())},searchKnowledge:(e,t)=>B("/knowledge/search",{method:"POST",body:JSON.stringify({query:e,collection:t})}),deleteDocument:e=>B(`/knowledge/documents/${e}`,{method:"DELETE"}),listAgents:()=>B("/agents"),listTools:()=>B("/agents/tools"),listMcpServers:()=>B("/mcp/servers"),getMcpSuggestions:()=>B("/mcp/suggestions"),addMcpServer:e=>B("/mcp/servers",{method:"POST",body:JSON.stringify(e)}),connectMcpServer:e=>B(`/mcp/servers/${e}/connect`,{method:"POST"}),disconnectMcpServer:e=>B(`/mcp/servers/${e}/disconnect`,{method:"POST"}),removeMcpServer:e=>B(`/mcp/servers/${e}`,{method:"DELETE"}),getSettings:()=>B("/settings"),updateSettings:e=>B("/settings",{method:"PATCH",body:JSON.stringify(e)}),addProvider:e=>B("/settings/providers",{method:"POST",body:JSON.stringify(e)}),deleteProvider:e=>B(`/settings/providers/${e}`,{method:"DELETE"}),getSystemStats:()=>B("/settings/system"),getAuditLog:(e=100,t=0)=>B(`/settings/audit?limit=${e}&offset=${t}`),clearAuditLog:()=>B("/settings/audit",{method:"DELETE"}),getMemory:()=>B("/memory"),getProfile:()=>B("/memory/profile"),searchMemory:e=>B(`/memory/search?q=${encodeURIComponent(e)}`),listSkills:()=>B("/skills"),getSkill:e=>B(`/skills/${e}`),createSkill:e=>B("/skills",{method:"POST",body:JSON.stringify(e)}),updateSkill:(e,t)=>B("/skills/"+e,{method:"PUT",body:JSON.stringify(t)}),deleteSkill:e=>B("/skills/"+e,{method:"DELETE"}),toggleSkill:e=>B(`/skills/${e}/toggle`,{method:"PATCH"}),getAppCatalog:()=>B("/apps/catalog"),listApps:e=>{const t=new URLSearchParams;e!=null&&e.search&&t.set("search",e.search),e!=null&&e.category&&t.set("category",e.category);const l=t.toString();return B(`/apps${l?`?${l}`:""}`)},getApp:e=>B(`/apps/${e}`),getAppCategories:()=>B("/apps/categories")},kh=Lh((e,t)=>({conversations:[],activeConversationId:null,messages:[],isStreaming:!1,streamingContent:"",activeAgent:null,error:null,loadConversations:async()=>{try{const l=await _.listConversations();e({conversations:l})}catch(l){console.error("Failed to load conversations:",l)}},selectConversation:async l=>{e({activeConversationId:l});const a=await _.getConversation(l);e({messages:a.messages||[]})},createConversation:async()=>{const{id:l}=await _.createConversation();return await t().loadConversations(),e({activeConversationId:l,messages:[]}),l},deleteConversation:async l=>{await _.deleteConversation(l),t().activeConversationId===l&&e({activeConversationId:null,messages:[]}),await t().loadConversations()},sendMessage:async l=>{let n=t().activeConversationId;const i={id:crypto.randomUUID(),role:"user",content:l,createdAt:new Date().toISOString()};e(u=>({messages:[...u.messages,i],error:null})),e({isStreaming:!0,streamingContent:"",activeAgent:null});try{let u="orchestrator",c="";await _.streamMessage(n,l,(f,h)=>{switch(f){case"conversation":h.conversationId&&(n=h.conversationId,e({activeConversationId:n}));break;case"agent_switch":u=h.agent||"orchestrator",e({activeAgent:u});break;case"text_delta":h.text&&(c+=h.text,e({streamingContent:c}));break;case"text":h.text&&(c=h.text,e({streamingContent:c}));break;case"tool_call":e(m=>({streamingContent:m.streamingContent+`
|
|
62
|
+
|
|
63
|
+
> Using tool: **${h.tool}**
|
|
64
|
+
`}));break;case"tool_result":break;case"task_update":break;case"done":h.content&&(c=h.content);break;case"error":throw new Error(h.message||"Unknown error")}});const r={id:crypto.randomUUID(),role:"assistant",content:c,agentName:u,createdAt:new Date().toISOString()};e(f=>({messages:[...f.messages,r],streamingContent:""})),await t().loadConversations()}catch(u){console.error("Chat error:",u),e({error:u.message||"Failed to get response"});const c={id:crypto.randomUUID(),role:"assistant",content:`Error: ${u.message||"Failed to get response from AI"}`,createdAt:new Date().toISOString()};e(r=>({messages:[...r.messages,c]}))}finally{e({isStreaming:!1,streamingContent:"",activeAgent:null})}}}));/**
|
|
65
|
+
* @license lucide-react v0.460.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const Cp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qh=(...e)=>e.filter((t,l,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===l).join(" ").trim();/**
|
|
70
|
+
* @license lucide-react v0.460.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/var Mp={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"};/**
|
|
75
|
+
* @license lucide-react v0.460.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const zp=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:l=2,absoluteStrokeWidth:a,className:n="",children:i,iconNode:u,...c},r)=>p.createElement("svg",{ref:r,...Mp,width:t,height:t,stroke:e,strokeWidth:a?Number(l)*24/Number(t):l,className:qh("lucide",n),...c},[...u.map(([f,h])=>p.createElement(f,h)),...Array.isArray(i)?i:[i]]));/**
|
|
80
|
+
* @license lucide-react v0.460.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const w=(e,t)=>{const l=p.forwardRef(({className:a,...n},i)=>p.createElement(zp,{ref:i,iconNode:t,className:qh(`lucide-${Cp(e)}`,a),...n}));return l.displayName=`${e}`,l};/**
|
|
85
|
+
* @license lucide-react v0.460.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const Yh=w("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
90
|
+
* @license lucide-react v0.460.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const nf=w("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
95
|
+
* @license lucide-react v0.460.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const wp=w("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
100
|
+
* @license lucide-react v0.460.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const Gh=w("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
|
|
105
|
+
* @license lucide-react v0.460.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const nc=w("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
110
|
+
* @license lucide-react v0.460.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const Xh=w("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
115
|
+
* @license lucide-react v0.460.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const yi=w("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
120
|
+
* @license lucide-react v0.460.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const Op=w("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
125
|
+
* @license lucide-react v0.460.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const Dp=w("CircleAlert",[["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"}]]);/**
|
|
130
|
+
* @license lucide-react v0.460.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const xr=w("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
135
|
+
* @license lucide-react v0.460.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const Qh=w("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
140
|
+
* @license lucide-react v0.460.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const yr=w("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
145
|
+
* @license lucide-react v0.460.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const gr=w("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
150
|
+
* @license lucide-react v0.460.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const _p=w("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
155
|
+
* @license lucide-react v0.460.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const qa=w("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
160
|
+
* @license lucide-react v0.460.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const Rp=w("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
165
|
+
* @license lucide-react v0.460.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const Up=w("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
170
|
+
* @license lucide-react v0.460.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const Hp=w("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
175
|
+
* @license lucide-react v0.460.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const Bp=w("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
|
180
|
+
* @license lucide-react v0.460.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const Vh=w("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
185
|
+
* @license lucide-react v0.460.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const Zh=w("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
|
|
190
|
+
* @license lucide-react v0.460.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const Kh=w("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
|
195
|
+
* @license lucide-react v0.460.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const Lp=w("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
200
|
+
* @license lucide-react v0.460.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const kp=w("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
205
|
+
* @license lucide-react v0.460.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const qp=w("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
|
210
|
+
* @license lucide-react v0.460.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const Yp=w("MemoryStick",[["path",{d:"M6 19v-3",key:"1nvgqn"}],["path",{d:"M10 19v-3",key:"iu8nkm"}],["path",{d:"M14 19v-3",key:"kcehxu"}],["path",{d:"M18 19v-3",key:"1vh91z"}],["path",{d:"M8 11V9",key:"63erz4"}],["path",{d:"M16 11V9",key:"fru6f3"}],["path",{d:"M12 11V9",key:"ha00sb"}],["path",{d:"M2 15h20",key:"16ne18"}],["path",{d:"M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z",key:"lhddv3"}]]);/**
|
|
215
|
+
* @license lucide-react v0.460.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const pr=w("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
220
|
+
* @license lucide-react v0.460.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const Gp=w("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
225
|
+
* @license lucide-react v0.460.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const Xp=w("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
230
|
+
* @license lucide-react v0.460.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const Qp=w("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
235
|
+
* @license lucide-react v0.460.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const ic=w("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
240
|
+
* @license lucide-react v0.460.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const Ki=w("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
245
|
+
* @license lucide-react v0.460.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const uf=w("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
250
|
+
* @license lucide-react v0.460.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const Vp=w("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
|
|
255
|
+
* @license lucide-react v0.460.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const sf=w("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
260
|
+
* @license lucide-react v0.460.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const Zp=w("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
265
|
+
* @license lucide-react v0.460.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const yu=w("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
270
|
+
* @license lucide-react v0.460.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const Kp=w("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
275
|
+
* @license lucide-react v0.460.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const Jp=w("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
280
|
+
* @license lucide-react v0.460.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const Ji=w("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
285
|
+
* @license lucide-react v0.460.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const vr=w("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
290
|
+
* @license lucide-react v0.460.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const ha=w("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
295
|
+
* @license lucide-react v0.460.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const $p=w("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
300
|
+
* @license lucide-react v0.460.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const Wp=w("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);/**
|
|
305
|
+
* @license lucide-react v0.460.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const Fp=w("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/**
|
|
310
|
+
* @license lucide-react v0.460.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const Ip=w("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]);/**
|
|
315
|
+
* @license lucide-react v0.460.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const Aa=w("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
320
|
+
* @license lucide-react v0.460.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const cf=w("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
325
|
+
* @license lucide-react v0.460.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const Pp=w("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
330
|
+
* @license lucide-react v0.460.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const rf=w("User",[["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"}]]);/**
|
|
335
|
+
* @license lucide-react v0.460.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const ev=w("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
340
|
+
* @license lucide-react v0.460.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const Jh=w("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),tv=[{path:"/",icon:pr,label:"Chat"},{path:"/tasks",icon:Lp,label:"Tasks"},{path:"/knowledge",icon:nc,label:"Knowledge"},{path:"/agents",icon:Xh,label:"Agents"},{path:"/mcp",icon:ic,label:"MCP Servers"},{path:"/memory",icon:yi,label:"Memory"},{path:"/skills",icon:ha,label:"Skills"},{path:"/audit",icon:Ji,label:"Audit Log"},{path:"/apps",icon:vr,label:"Apps"},{path:"/settings",icon:Jp,label:"Settings"}];function lv(){const e=Ht(),{conversations:t,activeConversationId:l,loadConversations:a,selectConversation:n,createConversation:i,deleteConversation:u}=kh(),[c,r]=p.useState(null),f=e.pathname==="/";p.useEffect(()=>{a()},[]),p.useEffect(()=>{const m=()=>{_.getSystemStats().then(r).catch(()=>{})};m();const d=setInterval(m,3e3);return()=>clearInterval(d)},[]);const h=m=>`${(m/1073741824).toFixed(1)} GB`;return s.jsxs("aside",{className:"w-64 h-screen bg-surface border-r border-border flex flex-col shrink-0",children:[s.jsxs("div",{className:"h-16 flex items-center gap-3 px-4 border-b border-border",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"avatar-agent wave-shape",children:s.jsx(Yh,{className:"w-5 h-5 text-white relative z-10"})}),s.jsx("div",{className:"ring-3d",style:{inset:"-6px"}}),s.jsx("div",{className:"ring-3d-reverse",style:{inset:"-10px"}})]}),s.jsx("span",{className:"font-semibold text-foreground",children:"Agent DJ"})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0",children:[s.jsx("nav",{className:"px-2 py-3 space-y-0.5",children:tv.map(({path:m,icon:d,label:x})=>s.jsxs(Hh,{to:m,className:({isActive:v})=>`flex items-center gap-2.5 px-3 py-2 rounded-lg text-sm transition-colors ${v?"bg-primary/10 text-primary font-medium":"text-foreground-secondary hover:bg-surface-hover hover:text-foreground"}`,children:[s.jsx(d,{className:"w-4 h-4"}),x]},m))}),f&&s.jsxs("div",{className:"border-t border-border mt-2",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[s.jsx("span",{className:"text-xs font-medium text-muted uppercase tracking-wider",children:"Chats"}),s.jsx("button",{onClick:()=>i(),className:"p-1 rounded hover:bg-surface-hover text-muted hover:text-foreground transition-colors",title:"New chat",children:s.jsx(Ki,{className:"w-3.5 h-3.5"})})]}),s.jsx("div",{className:"px-2 space-y-0.5",children:t.map(m=>s.jsxs("div",{className:`group flex items-center gap-2 px-3 py-2 rounded-lg text-sm cursor-pointer transition-colors ${l===m.id?"bg-surface-hover text-foreground":"text-foreground-secondary hover:bg-surface-hover"}`,onClick:()=>n(m.id),children:[s.jsx(pr,{className:"w-3.5 h-3.5 shrink-0"}),s.jsx("span",{className:"truncate flex-1",children:m.title}),s.jsx("button",{onClick:d=>{d.stopPropagation(),u(m.id)},className:"opacity-0 group-hover:opacity-100 p-0.5 rounded hover:bg-danger/10 text-muted hover:text-danger transition-all",children:s.jsx(Aa,{className:"w-3 h-3"})})]},m.id))})]})]}),s.jsx("div",{className:"mx-3 mb-3 shrink-0",children:s.jsxs("a",{href:"mailto:djumabaevb@gmail.com",className:"group relative block rounded-xl overflow-hidden p-[1px] transition-all duration-300 hover:scale-[1.02]",children:[s.jsx("div",{className:"absolute inset-0 rounded-xl bg-gradient-to-r from-indigo-500 via-cyan-400 to-indigo-500 opacity-40 group-hover:opacity-80 transition-opacity duration-300 animate-gradient-shift",style:{backgroundSize:"200% 200%"}}),s.jsxs("div",{className:"relative rounded-[11px] bg-surface p-3 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-7 h-7 rounded-lg bg-gradient-to-br from-indigo-500 to-cyan-400 flex items-center justify-center shrink-0",children:s.jsx(qp,{className:"w-3.5 h-3.5 text-white"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("span",{className:"text-[11px] font-semibold text-foreground block",children:"Let's Collaborate"}),s.jsx("span",{className:"text-[10px] text-muted block truncate",children:"djumabaevb@gmail.com"})]}),s.jsx(wp,{className:"w-3.5 h-3.5 text-muted group-hover:text-primary transition-colors shrink-0"})]}),s.jsx("p",{className:"text-[10px] text-muted leading-relaxed",children:"Interested in any of the apps? Let's build something great together."})]})]})}),c&&s.jsxs("div",{className:"border-t border-border p-3 space-y-3",children:[s.jsxs("div",{className:"flex gap-3",children:[s.jsxs("div",{className:"flex-1 bg-background rounded-lg p-2.5 text-center",children:[s.jsxs("div",{className:"relative w-12 h-12 mx-auto mb-1.5",children:[s.jsxs("svg",{className:"w-12 h-12 -rotate-90",viewBox:"0 0 48 48",children:[s.jsx("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"#27272a",strokeWidth:"3"}),s.jsx("circle",{cx:"24",cy:"24",r:"20",fill:"none",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:`${c.cpu.loadPercent*1.257} 125.7`,className:"transition-all duration-700",style:{stroke:c.cpu.loadPercent>80?"#ef4444":c.cpu.loadPercent>50?"#f59e0b":"#22c55e",filter:`drop-shadow(0 0 3px ${c.cpu.loadPercent>80?"#ef444440":c.cpu.loadPercent>50?"#f59e0b40":"#22c55e40"})`}})]}),s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-foreground",children:c.cpu.loadPercent})]}),s.jsx("span",{className:"text-[10px] font-medium text-muted uppercase tracking-wider",children:"CPU"})]}),s.jsxs("div",{className:"flex-1 bg-background rounded-lg p-2.5 text-center",children:[s.jsxs("div",{className:"relative w-12 h-12 mx-auto mb-1.5",children:[s.jsxs("svg",{className:"w-12 h-12 -rotate-90",viewBox:"0 0 48 48",children:[s.jsx("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"#27272a",strokeWidth:"3"}),s.jsx("circle",{cx:"24",cy:"24",r:"20",fill:"none",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:`${c.memory.usagePercent*1.257} 125.7`,className:"transition-all duration-700",style:{stroke:c.memory.usagePercent>85?"#ef4444":c.memory.usagePercent>60?"#f59e0b":"#22c55e",filter:`drop-shadow(0 0 3px ${c.memory.usagePercent>85?"#ef444440":c.memory.usagePercent>60?"#f59e0b40":"#22c55e40"})`}})]}),s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-foreground",children:c.memory.usagePercent})]}),s.jsx("span",{className:"text-[10px] font-medium text-muted uppercase tracking-wider",children:"RAM"})]})]}),s.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted px-0.5",children:[s.jsxs("span",{children:[h(c.memory.usedBytes)," / ",h(c.memory.totalBytes)]}),s.jsx("span",{children:c.uptime})]})]})]})}const $h=Lh(e=>({tasks:[],loadTasks:async t=>{const l=await _.listTasks(t);e({tasks:l})},cancelTask:async t=>{await _.cancelTask(t),e(l=>({tasks:l.tasks.map(a=>a.id===t?{...a,status:"cancelled"}:a)}))}})),of={orchestrator:"linear-gradient(135deg, #6366f1, #818cf8)",coder:"linear-gradient(135deg, #22d3ee, #06b6d4)",researcher:"linear-gradient(135deg, #f59e0b, #fbbf24)",writer:"linear-gradient(135deg, #22c55e, #4ade80)",system:"linear-gradient(135deg, #a1a1aa, #d4d4d8)",rag:"linear-gradient(135deg, #a855f7, #c084fc)"};function ns({role:e,content:t,agentName:l,isStreaming:a}){if(e==="user")return s.jsxs("div",{className:"flex gap-3 animate-slide-up-fade",children:[s.jsx("div",{className:"avatar-user",children:"U"}),s.jsx("div",{className:"flex-1 pt-1",children:s.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:t})})]});const n=l?of[l]:void 0;return s.jsxs("div",{className:"flex gap-3 animate-slide-up-fade",children:[s.jsxs("div",{className:`relative w-8 h-8 rounded-lg flex items-center justify-center shrink-0 ${a?"is-streaming":""}`,style:{background:n||"var(--gradient-brand)"},children:[a&&s.jsx("span",{className:"absolute inset-[-3px] rounded-lg animate-glow-pulse pointer-events-none",style:{boxShadow:n?void 0:"0 0 12px 3px rgba(99,102,241,0.4)"}}),s.jsx("span",{className:"text-xs font-bold text-white relative z-10 uppercase",children:l?l[0]:"A"})]}),s.jsxs("div",{className:"flex-1 pt-1 min-w-0",children:[l&&s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx("span",{className:"text-xs font-semibold capitalize",style:{background:of[l]||"var(--gradient-brand)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:l}),a&&s.jsxs("span",{className:"flex gap-1 items-center",children:[s.jsx("span",{className:"streaming-dot"}),s.jsx("span",{className:"streaming-dot [animation-delay:200ms]"}),s.jsx("span",{className:"streaming-dot [animation-delay:400ms]"})]})]}),s.jsx("div",{className:"prose text-sm",children:av(t)}),a&&!t&&s.jsxs("div",{className:"space-y-2.5 py-2 max-w-[320px]",children:[s.jsx("div",{className:"shimmer-block w-full h-3.5"}),s.jsx("div",{className:"shimmer-block w-4/5 h-3.5"}),s.jsx("div",{className:"shimmer-block w-3/5 h-3.5"})]})]})]})}function av(e){return e.split(/(```[\s\S]*?```)/g).map((l,a)=>{if(l.startsWith("```")){const i=l.slice(3,-3).split(`
|
|
345
|
+
`),u=i[0]||"",c=i.slice(1).join(`
|
|
346
|
+
`);return s.jsxs("pre",{className:"bg-background border border-border rounded-lg p-3 overflow-x-auto my-2",children:[u&&s.jsx("div",{className:"text-xs text-muted mb-2 font-mono",children:u}),s.jsx("code",{className:"text-sm font-mono text-foreground",children:c})]},a)}let n=l.replace(/\*\*(.*?)\*\*/g,'<strong class="text-foreground font-semibold">$1</strong>');return n=n.replace(/`([^`]+)`/g,'<code class="bg-surface px-1.5 py-0.5 rounded text-xs font-mono text-accent">$1</code>'),n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" class="text-primary hover:text-primary-hover underline" target="_blank" rel="noopener">$1</a>'),s.jsx("span",{dangerouslySetInnerHTML:{__html:n}},a)})}const ff={pending:{icon:gr,color:"text-muted",bg:"bg-muted/10",label:"Pending"},running:{icon:kp,color:"text-primary",bg:"bg-primary/10",label:"Running"},done:{icon:Qh,color:"text-success",bg:"bg-success/10",label:"Done"},failed:{icon:yr,color:"text-danger",bg:"bg-danger/10",label:"Failed"},cancelled:{icon:Gh,color:"text-warning",bg:"bg-warning/10",label:"Cancelled"}},nv={orchestrator:"border-primary/30",coder:"border-accent/30",researcher:"border-warning/30",writer:"border-success/30",system:"border-foreground-secondary/30",rag:"border-purple-400/30"};function is(e){if(!e)return null;const t=new Date(e);return isNaN(t.getTime())?null:t}function uc({task:e,index:t,onCancel:l}){const a=ff[e.status]||ff.pending,n=a.icon,i=nv[e.agentName]||"border-border",u=e,c=e.createdAt||u.created_at,r=e.startedAt||u.started_at,f=e.completedAt||u.completed_at,h=is(c),m=is(r),d=is(f),x=m?iv((d||new Date).getTime()-m.getTime()):null;return s.jsxs("div",{className:`card border-l-2 ${i} card-hover animate-stagger-in`,style:{animationDelay:`${(t??0)*50}ms`},children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsxs("span",{className:`badge ${a.bg} ${a.color}`,children:[s.jsx(n,{className:`w-3 h-3 ${e.status==="running"?"animate-spin":""}`}),a.label]}),s.jsxs("span",{className:"text-xs text-muted flex items-center gap-1",children:[s.jsx(Xh,{className:"w-3 h-3"}),e.agentName]})]}),s.jsx("h4",{className:"text-sm font-medium text-foreground truncate",children:e.title})]}),e.status==="running"&&l&&s.jsx("button",{onClick:()=>l(e.id),className:"btn-ghost btn-sm text-muted hover:text-danger",children:s.jsx(Gh,{className:"w-3 h-3"})})]}),e.status==="running"&&s.jsxs("div",{className:"mt-3",children:[s.jsx("div",{className:"h-1.5 bg-background rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full transition-all duration-500 progress-gradient",style:{width:`${Math.max(e.progress||0,5)}%`}})}),e.progress>0&&s.jsxs("span",{className:"text-xs text-muted mt-1",children:[e.progress,"%"]})]}),e.output&&e.status==="done"&&s.jsx("div",{className:"mt-2 p-2 bg-background rounded-lg",children:s.jsx("p",{className:"text-xs text-foreground-secondary font-mono line-clamp-3",children:e.output.slice(0,200)})}),e.error&&s.jsx("div",{className:"mt-2 p-2 bg-danger/5 rounded-lg border border-danger/20",children:s.jsx("p",{className:"text-xs text-danger font-mono",children:e.error})}),s.jsxs("div",{className:"flex items-center justify-between mt-2",children:[s.jsx("span",{className:"text-xs text-muted",children:h?h.toLocaleTimeString():""}),x&&s.jsx("span",{className:"text-xs text-muted",children:x})]})]})}function iv(e){if(e<1e3)return`${e}ms`;const t=Math.floor(e/1e3);if(t<60)return`${t}s`;const l=Math.floor(t/60),a=t%60;return`${l}m ${a}s`}function uv(){const{messages:e,activeConversationId:t,isStreaming:l,streamingContent:a,activeAgent:n,sendMessage:i,createConversation:u}=kh(),{tasks:c,loadTasks:r,cancelTask:f}=$h(),[h,m]=p.useState(""),d=p.useRef(null),x=p.useRef(null);p.useEffect(()=>{if(t){r(t);const o=setInterval(()=>r(t),2e3);return()=>clearInterval(o)}},[t]),p.useEffect(()=>{var o;(o=d.current)==null||o.scrollIntoView({behavior:"smooth"})},[e,a]);const v=async()=>{const o=h.trim();!o||l||(m(""),await i(o))},S=o=>{o.key==="Enter"&&!o.shiftKey&&(o.preventDefault(),v())},N=c.filter(o=>o.status==="running"||o.status==="pending"),y=c.filter(o=>o.status==="done"||o.status==="failed").slice(0,5);return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[s.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 space-y-6",children:[e.length===0&&!l&&s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[s.jsxs("div",{className:"relative mb-8",children:[s.jsx("div",{className:"morph-blob w-32 h-32 bg-primary/20",style:{top:"-16px",left:"-16px"}}),s.jsx("div",{className:"morph-blob w-24 h-24 bg-accent/15",style:{top:"8px",right:"-12px",animationDelay:"3s"}}),s.jsx("div",{className:"ring-3d",style:{inset:"-12px"}}),s.jsx("div",{className:"ring-3d-reverse",style:{inset:"-20px"}}),s.jsx("div",{className:"avatar-agent w-16 h-16 rounded-2xl wave-shape relative z-10",children:s.jsx(ha,{className:"w-8 h-8 text-white relative z-10"})})]}),s.jsx("h2",{className:"text-2xl font-bold text-gradient mb-2",children:"Agent DJ"}),s.jsx("p",{className:"text-sm text-foreground-secondary max-w-md leading-relaxed",children:"Your AI team is ready. Ask me to analyze code, research topics, write documents, manage files, or automate tasks."}),s.jsx("div",{className:"flex flex-wrap gap-2 mt-8 max-w-lg justify-center",children:["Analyze my project structure","Search the web for React best practices","List all large files on my system","Write a README for this project"].map((o,g)=>s.jsx("button",{onClick:()=>{var b;m(o),(b=x.current)==null||b.focus()},className:"btn-secondary btn-sm text-xs animate-stagger-in",style:{animationDelay:`${300+g*80}ms`},children:o},o))})]}),e.map(o=>s.jsx(ns,{role:o.role,content:o.content,agentName:o.agentName},o.id)),l&&a&&s.jsx(ns,{role:"assistant",content:a,agentName:n||void 0,isStreaming:!0}),l&&!a&&s.jsx(ns,{role:"assistant",content:"",agentName:n||void 0,isStreaming:!0}),s.jsx("div",{ref:d})]}),s.jsxs("div",{className:"border-t border-border px-6 py-4",children:[s.jsx("div",{className:"relative flex items-end gap-2 max-w-4xl mx-auto",children:s.jsxs("div",{className:"flex-1 relative",children:[s.jsx("textarea",{ref:x,value:h,onChange:o=>m(o.target.value),onKeyDown:S,placeholder:"Send a message...",rows:1,className:"input input-glow resize-none pr-12 min-h-[44px] max-h-[200px]",style:{height:"auto"},onInput:o=>{const g=o.target;g.style.height="auto",g.style.height=`${Math.min(g.scrollHeight,200)}px`},disabled:l}),s.jsx("button",{onClick:v,disabled:!h.trim()||l,className:"absolute right-2 bottom-2 p-1.5 rounded-lg bg-primary text-white hover:bg-primary-hover hover:scale-110 disabled:opacity-30 disabled:hover:bg-primary disabled:hover:scale-100 transition-all duration-150",children:s.jsx(Kp,{className:"w-4 h-4"})})]})}),s.jsx("p",{className:"text-xs text-muted text-center mt-2",children:"Press Enter to send, Shift+Enter for new line"})]})]}),s.jsx("div",{className:"w-80 border-l border-border bg-surface overflow-y-auto shrink-0 hidden lg:block",children:s.jsxs("div",{className:"p-4",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground mb-3",children:"Task Board"}),N.length===0&&y.length===0&&s.jsx("div",{className:"text-center py-8",children:s.jsx("p",{className:"text-xs text-muted",children:"Tasks will appear here when agents perform actions"})}),N.length>0&&s.jsxs("div",{className:"space-y-2 mb-4",children:[s.jsx("span",{className:"text-xs font-medium text-muted uppercase tracking-wider",children:"Active"}),N.map(o=>s.jsx(uc,{task:o,onCancel:f},o.id))]}),y.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("span",{className:"text-xs font-medium text-muted uppercase tracking-wider",children:"Recent"}),y.map(o=>s.jsx(uc,{task:o},o.id))]})]})})]})}function sv(){const{tasks:e,loadTasks:t,cancelTask:l}=$h();p.useEffect(()=>{t();const r=setInterval(()=>t(),3e3);return()=>clearInterval(r)},[]);const a=e.filter(r=>r.status==="pending"),n=e.filter(r=>r.status==="running"),i=e.filter(r=>r.status==="done"),u=e.filter(r=>r.status==="failed"||r.status==="cancelled"),c=[{title:"Pending",icon:gr,tasks:a,color:"text-muted"},{title:"Running",icon:Qp,tasks:n,color:"text-primary"},{title:"Done",icon:Qh,tasks:i,color:"text-success"},{title:"Failed",icon:yr,tasks:u,color:"text-danger"}];return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"border-b border-border px-6 py-4",children:[s.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Task Board"}),s.jsx("p",{className:"text-sm text-muted mt-0.5",children:"Track agent actions in real-time"})]}),s.jsx("div",{className:"flex-1 overflow-x-auto p-6",children:s.jsx("div",{className:"flex gap-4 min-w-max h-full",children:c.map(({title:r,icon:f,tasks:h,color:m})=>s.jsxs("div",{className:"w-80 flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 pb-3 border-b border-border",children:[s.jsx("div",{className:`w-6 h-6 rounded-md flex items-center justify-center ${r==="Running"?"bg-primary/10":r==="Done"?"bg-success/10":r==="Failed"?"bg-danger/10":"bg-surface"}`,children:s.jsx(f,{className:`w-3.5 h-3.5 ${m}`})}),s.jsx("h3",{className:"text-sm font-medium text-foreground",children:r}),s.jsx("span",{className:`text-xs font-medium px-1.5 py-0.5 rounded-full ${h.length>0?"bg-primary/10 text-primary":"bg-surface text-muted"}`,children:h.length})]}),s.jsxs("div",{className:"flex-1 space-y-2 overflow-y-auto",children:[h.map((d,x)=>s.jsx(uc,{task:d,index:x,onCancel:d.status==="running"?l:void 0},d.id)),h.length===0&&s.jsxs("div",{className:"card border-dashed text-center py-12",children:[s.jsx(f,{className:`w-6 h-6 ${m} mx-auto mb-2 opacity-30`}),s.jsxs("p",{className:"text-xs text-muted",children:["No ",r.toLowerCase()," tasks"]})]})]})]},r))})})]})}function cv(){const[e,t]=p.useState([]),[l,a]=p.useState([]),[n,i]=p.useState(null),[u,c]=p.useState(""),[r,f]=p.useState([]),[h,m]=p.useState(!1),d=p.useRef(null);p.useEffect(()=>{x()},[n]);const x=async()=>{const[o,g]=await Promise.all([_.listCollections(),_.listDocuments(n||void 0)]);t(o),a(g)},v=async o=>{const g=o.target.files;if(!(!g||g.length===0)){m(!0);try{for(const b of g)await _.uploadDocument(b,n||"default");await x()}catch(b){console.error("Upload error:",b)}finally{m(!1),d.current&&(d.current.value="")}}},S=async()=>{if(!u.trim())return;const o=await _.searchKnowledge(u,n||void 0);f(o)},N=async o=>{await _.deleteDocument(o),await x()},y=o=>o<1024?`${o} B`:o<1048576?`${(o/1024).toFixed(1)} KB`:`${(o/1048576).toFixed(1)} MB`;return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsx("div",{className:"border-b border-border px-6 py-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Knowledge Base"}),s.jsx("p",{className:"text-sm text-muted mt-0.5",children:"Upload documents for RAG search"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:()=>{var o;return(o=d.current)==null?void 0:o.click()},className:"btn-primary btn-sm",disabled:h,children:[s.jsx(Pp,{className:"w-3.5 h-3.5"}),h?"Uploading...":"Upload"]}),s.jsx("input",{ref:d,type:"file",multiple:!0,accept:".pdf,.docx,.txt,.md,.json,.yaml,.yml,.py,.ts,.js,.go,.rs,.java,.html,.css",className:"hidden",onChange:v})]})]})}),s.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[s.jsxs("div",{className:"w-56 border-r border-border p-4 overflow-y-auto",children:[s.jsx("h3",{className:"text-xs font-medium text-muted uppercase tracking-wider mb-2",children:"Collections"}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("button",{onClick:()=>i(null),className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-left transition-colors ${n?"text-foreground-secondary hover:bg-surface-hover":"bg-primary/10 text-primary"}`,children:[s.jsx(nc,{className:"w-3.5 h-3.5"}),"All Documents"]}),e.map(o=>s.jsxs("button",{onClick:()=>i(o.name),className:`w-full flex items-center justify-between gap-2 px-3 py-2 rounded-lg text-sm text-left transition-colors ${n===o.name?"bg-primary/10 text-primary":"text-foreground-secondary hover:bg-surface-hover"}`,children:[s.jsxs("span",{className:"flex items-center gap-2 truncate",children:[s.jsx(Vh,{className:"w-3.5 h-3.5 shrink-0"}),o.name]}),s.jsx("span",{className:"badge-muted",children:o.documentCount})]},o.name))]})]}),s.jsxs("div",{className:"flex-1 p-6 overflow-y-auto",children:[s.jsxs("div",{className:"flex gap-2 mb-6",children:[s.jsxs("div",{className:"flex-1 relative",children:[s.jsx(yu,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted"}),s.jsx("input",{type:"text",value:u,onChange:o=>c(o.target.value),onKeyDown:o=>o.key==="Enter"&&S(),placeholder:"Search knowledge base...",className:"input pl-10"})]}),s.jsx("button",{onClick:S,className:"btn-primary btn-sm",children:"Search"})]}),r.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsxs("h3",{className:"text-sm font-medium text-foreground mb-3",children:["Search Results (",r.length,")"]}),s.jsx("div",{className:"space-y-2",children:r.map((o,g)=>s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"badge-info",children:o.collection}),s.jsx("span",{className:"text-xs text-muted",children:o.filename}),s.jsxs("span",{className:"text-xs text-muted",children:["Score: ",o.score.toFixed(3)]})]}),s.jsx("p",{className:"text-sm text-foreground-secondary line-clamp-3",children:o.content})]},g))})]}),s.jsxs("h3",{className:"text-sm font-medium text-foreground mb-3",children:["Documents (",l.length,")"]}),l.length===0?s.jsxs("div",{className:"card border-dashed text-center py-12",children:[s.jsx(nc,{className:"w-8 h-8 text-muted mx-auto mb-3"}),s.jsx("p",{className:"text-sm text-muted",children:"No documents yet"}),s.jsx("p",{className:"text-xs text-muted mt-1",children:"Upload files to build your knowledge base"})]}):s.jsx("div",{className:"space-y-2",children:l.map(o=>s.jsxs("div",{className:"card flex items-center gap-3 group",children:[s.jsx(Hp,{className:"w-5 h-5 text-muted shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.filename}),s.jsxs("p",{className:"text-xs text-muted",children:[o.chunk_count," chunks ยท ",y(o.size_bytes)," ยท ",o.collection]})]}),s.jsx("span",{className:"text-xs text-muted",children:new Date(o.created_at).toLocaleDateString()}),s.jsx("button",{onClick:()=>N(o.id),className:"opacity-0 group-hover:opacity-100 p-1.5 rounded-lg hover:bg-danger/10 text-muted hover:text-danger transition-all",children:s.jsx(Aa,{className:"w-3.5 h-3.5"})})]},o.id))})]})]})]})}const rv={orchestrator:"linear-gradient(135deg, #6366f1, #818cf8)",coder:"linear-gradient(135deg, #22d3ee, #06b6d4)",researcher:"linear-gradient(135deg, #f59e0b, #fbbf24)",writer:"linear-gradient(135deg, #22c55e, #4ade80)",system:"linear-gradient(135deg, #a1a1aa, #d4d4d8)",rag:"linear-gradient(135deg, #a855f7, #c084fc)"},ov={orchestrator:"from-primary/8 to-transparent",coder:"from-accent/8 to-transparent",researcher:"from-warning/8 to-transparent",writer:"from-success/8 to-transparent",system:"from-foreground-secondary/5 to-transparent",rag:"from-purple-400/8 to-transparent"},fv={orchestrator:"#6366f1",coder:"#22d3ee",researcher:"#f59e0b",writer:"#22c55e",system:"#a1a1aa",rag:"#a855f7"};function dv(){const[e,t]=p.useState([]),[l,a]=p.useState([]);p.useEffect(()=>{Promise.all([_.listAgents(),_.listTools()]).then(([i,u])=>{t(i),a(u)})},[]);const n={};return l.forEach(i=>{const u=i.startsWith("mcp_")?i.split("_").slice(0,2).join("_"):"built-in";n[u]||(n[u]=[]),n[u].push(i)}),s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"border-b border-border px-6 py-4",children:[s.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Agents"}),s.jsx("p",{className:"text-sm text-muted mt-0.5",children:"Your AI team of specialized agents"})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4 mb-8",children:e.map((i,u)=>{const c=rv[i.name]||"linear-gradient(135deg, #71717a, #a1a1aa)",r=ov[i.name]||"from-muted/5 to-transparent",f=fv[i.name]||"#71717a";return s.jsxs("div",{className:"agent-card animate-stagger-in",style:{"--agent-gradient":c,animationDelay:`${u*60}ms`},children:[s.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${r} rounded-xl pointer-events-none`}),s.jsxs("div",{className:"relative",children:[s.jsx("h3",{className:"text-xl font-bold capitalize mb-1",style:{background:c,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:i.name}),s.jsx("p",{className:"text-sm text-foreground-secondary leading-relaxed",children:i.description}),s.jsxs("div",{className:"flex items-center justify-between mt-5",children:[s.jsx("span",{className:`badge ${i.status==="running"?"badge-warning":"badge-muted"}`,children:i.status||"idle"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:i.enabled?f:"#3f3f46",boxShadow:i.enabled?`0 0 6px ${f}50`:"none"}}),s.jsx("span",{className:"text-xs text-muted",children:i.enabled?"Active":"Off"})]})]})]})]},i.name)})}),s.jsxs("div",{children:[s.jsxs("div",{className:"mb-5",children:[s.jsx("h3",{className:"text-base font-semibold text-gradient",children:"Available Tools"}),s.jsxs("p",{className:"text-xs text-muted mt-0.5",children:[l.length," tools connected across all providers"]})]}),Object.entries(n).map(([i,u])=>s.jsxs("div",{className:"mb-4",children:[s.jsxs("p",{className:"text-xs font-medium text-foreground-secondary uppercase tracking-wider mb-2",children:[i==="built-in"?"Built-in":i.replace("mcp_",""),s.jsxs("span",{className:"text-muted ml-1.5",children:["(",u.length,")"]})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:u.map(c=>s.jsx("span",{className:"tool-chip",children:c.startsWith("mcp_")?c.split("_").slice(2).join("_"):c},c))})]},i))]})]})]})}function mv(){const[e,t]=p.useState([]),[l,a]=p.useState([]),[n,i]=p.useState(!1),[u,c]=p.useState({name:"",command:"",args:""}),[r,f]=p.useState(null),[h,m]=p.useState("all"),[d,x]=p.useState("");p.useEffect(()=>{v(),S()},[]);const v=async()=>{try{const E=await _.listMcpServers();t(E)}catch(E){console.error("Failed to load MCP servers:",E)}},S=async()=>{try{const E=await _.getMcpSuggestions();a(E)}catch(E){console.error("Failed to load suggested servers:",E)}},N=async()=>{if(!(!u.name||!u.command)){f("add");try{await _.addMcpServer({name:u.name,command:u.command,args:u.args.split(" ").filter(Boolean)}),c({name:"",command:"",args:""}),i(!1),await v()}finally{f(null)}}},y=async E=>{const re={},Bt=Object.entries(E.envHint);if(Bt.length>0)for(const[fl,Me]of Bt){const C=window.prompt(`${fl}
|
|
347
|
+
|
|
348
|
+
${Me}`);if(C===null)return;C.trim()&&(re[fl]=C.trim())}f(E.name);try{await _.addMcpServer({name:E.name,command:E.command,args:E.args,env:Object.keys(re).length>0?re:void 0}),await v()}finally{f(null)}},o=async E=>{f(E);try{await _.connectMcpServer(E),await v()}finally{f(null)}},g=async E=>{await _.disconnectMcpServer(E),await v()},b=async E=>{await _.removeMcpServer(E),await v()},A={connected:s.jsx(xr,{className:"w-4 h-4 text-success"}),disconnected:s.jsx(uf,{className:"w-4 h-4 text-muted"}),error:s.jsx(Dp,{className:"w-4 h-4 text-danger"})},z=new Set(e.map(E=>E.name)),T=["all",...Array.from(new Set(l.map(E=>E.category||"Other")))],M=l.filter(E=>!z.has(E.name)).filter(E=>h==="all"||(E.category||"Other")===h).filter(E=>!d||E.name.toLowerCase().includes(d.toLowerCase())||E.description.toLowerCase().includes(d.toLowerCase())),O=e.filter(E=>E.status==="connected").length,H=e.reduce((E,re)=>E+re.tools.length,0);return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsx("div",{className:"border-b border-border px-6 py-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"MCP Servers"}),s.jsx("p",{className:"text-sm text-muted mt-0.5",children:O>0?`${O} connected ยท ${H} tools available`:"Connect external tool servers via Model Context Protocol"})]}),s.jsxs("button",{onClick:()=>i(!n),className:"btn-primary btn-sm",children:[s.jsx(Ki,{className:"w-3.5 h-3.5"}),"Custom Server"]})]})}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[n&&s.jsxs("div",{className:"card mb-6 animate-slide-up",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground mb-3",children:"Add Custom MCP Server"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("input",{type:"text",placeholder:"Server name (e.g., My Custom Server)",value:u.name,onChange:E=>c({...u,name:E.target.value}),className:"input"}),s.jsx("input",{type:"text",placeholder:"Command (e.g., npx)",value:u.command,onChange:E=>c({...u,command:E.target.value}),className:"input"}),s.jsx("input",{type:"text",placeholder:"Arguments (e.g., -y @my-org/my-mcp-server)",value:u.args,onChange:E=>c({...u,args:E.target.value}),className:"input"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:N,disabled:r==="add",className:"btn-primary btn-sm",children:r==="add"?"Adding...":"Add & Connect"}),s.jsx("button",{onClick:()=>i(!1),className:"btn-secondary btn-sm",children:"Cancel"})]})]})]}),e.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground mb-3",children:"Your Servers"}),s.jsx("div",{className:"space-y-3",children:e.map(E=>s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-surface border border-border flex items-center justify-center",children:s.jsx(ic,{className:"w-5 h-5 text-foreground-secondary"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground",children:E.name}),A[E.status],s.jsx("span",{className:"text-xs text-muted capitalize",children:E.status})]}),s.jsxs("p",{className:"text-xs text-muted font-mono",children:[E.command," ",E.args.join(" ")]})]})]}),s.jsxs("div",{className:"flex gap-1",children:[E.status==="connected"?s.jsx("button",{onClick:()=>g(E.id),className:"btn-ghost btn-sm text-warning",title:"Disconnect",children:s.jsx(uf,{className:"w-3.5 h-3.5"})}):s.jsx("button",{onClick:()=>o(E.id),disabled:r===E.id,className:"btn-ghost btn-sm text-success",title:"Connect",children:s.jsx(Vp,{className:"w-3.5 h-3.5"})}),s.jsx("button",{onClick:()=>b(E.id),className:"btn-ghost btn-sm text-danger",title:"Remove",children:s.jsx(Aa,{className:"w-3.5 h-3.5"})})]})]}),E.error&&s.jsx("div",{className:"mt-2 p-2 bg-danger/5 rounded-lg border border-danger/20",children:s.jsx("p",{className:"text-xs text-danger",children:E.error})}),E.tools.length>0&&s.jsxs("div",{className:"mt-3",children:[s.jsxs("span",{className:"text-xs text-muted flex items-center gap-1 mb-2",children:[s.jsx(ev,{className:"w-3 h-3"}),E.tools.length," tools available"]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:E.tools.map(re=>s.jsx("span",{className:"badge bg-surface border border-border text-foreground-secondary",title:re.description,children:re.name},re.name))})]})]},E.id))})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("h3",{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[s.jsx(ha,{className:"w-4 h-4 text-primary"}),"Server Catalog"]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs("div",{className:"relative",children:[s.jsx(yu,{className:"w-3.5 h-3.5 text-muted absolute left-2.5 top-1/2 -translate-y-1/2"}),s.jsx("input",{type:"text",placeholder:"Search...",value:d,onChange:E=>x(E.target.value),className:"input pl-8 py-1.5 text-xs w-40"})]})})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5 mb-4",children:T.map(E=>s.jsx("button",{onClick:()=>m(E),className:`text-xs px-2.5 py-1 rounded-full transition-colors ${h===E?"bg-primary text-white":"bg-surface border border-border text-muted hover:text-foreground"}`,children:E==="all"?"All":E},E))}),M.length===0?s.jsx("div",{className:"card border-dashed text-center py-8",children:s.jsx("p",{className:"text-sm text-muted",children:z.size>0&&l.length>0?"All available servers are already added":"No servers match your search"})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:M.map(E=>s.jsxs("div",{className:"card border-dashed hover:border-primary/40 transition-colors group",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h4",{className:"text-sm font-medium text-foreground",children:E.name}),E.category&&s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-surface border border-border text-muted",children:E.category})]}),s.jsx("p",{className:"text-xs text-muted mt-0.5 line-clamp-2",children:E.description})]}),s.jsx("button",{onClick:()=>y(E),disabled:r===E.name,className:"btn-ghost btn-sm text-primary shrink-0 opacity-60 group-hover:opacity-100 transition-opacity",title:"Add & Connect",children:r===E.name?s.jsx("span",{className:"text-xs animate-pulse",children:"..."}):s.jsx(qa,{className:"w-3.5 h-3.5"})})]}),Object.keys(E.envHint).length>0&&s.jsxs("div",{className:"mt-2 flex items-center gap-1",children:[s.jsx(Kh,{className:"w-3 h-3 text-muted shrink-0"}),s.jsxs("span",{className:"text-[10px] text-muted truncate",children:["Requires: ",Object.keys(E.envHint).join(", ")]})]})]},E.name))})]}),e.length===0&&!n&&M.length===0&&l.length===0&&s.jsxs("div",{className:"card border-dashed text-center py-12",children:[s.jsx(ic,{className:"w-8 h-8 text-muted mx-auto mb-3"}),s.jsx("p",{className:"text-sm text-muted",children:"No MCP servers configured"}),s.jsx("p",{className:"text-xs text-muted mt-1",children:"Add servers to extend your agent's capabilities"})]})]})]})}function hv(){const[e,t]=p.useState(null),[l,a]=p.useState(null),[n,i]=p.useState(!1),[u,c]=p.useState({provider:"anthropic",apiKey:"",model:""}),[r,f]=p.useState(!1);p.useEffect(()=>{_.getSettings().then(t),_.getSystemStats().then(a);const x=setInterval(()=>_.getSystemStats().then(a),3e3);return()=>clearInterval(x)},[]);const h=async()=>{e&&(f(!0),await _.updateSettings({security:e.security,workspace:e.workspace}),f(!1))},m=async()=>{if(!u.apiKey)return;await _.addProvider(u),c({provider:"anthropic",apiKey:"",model:""});const x=await _.getSettings();t(x)},d=x=>`${(x/1073741824).toFixed(1)} GB`;return e?s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"border-b border-border px-6 py-4",children:[s.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Settings"}),s.jsx("p",{className:"text-sm text-muted mt-0.5",children:"Configure your Agent DJ instance"})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-6 max-w-3xl space-y-8",children:[l&&s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(Yh,{className:"w-4 h-4 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"System Resources"}),s.jsx("p",{className:"text-xs text-muted",children:"Real-time hardware monitoring"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"card hover:border-border-hover transition-colors duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("span",{className:"text-xs text-muted flex items-center gap-1.5",children:[s.jsx(_p,{className:"w-3.5 h-3.5"})," CPU"]}),s.jsxs("span",{className:`text-sm font-semibold ${l.cpu.loadPercent>80?"text-danger":l.cpu.loadPercent>50?"text-warning":"text-success"}`,children:[l.cpu.loadPercent,"%"]})]}),s.jsx("div",{className:"h-2 bg-background rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${l.cpu.loadPercent}%`,background:l.cpu.loadPercent>80?"linear-gradient(90deg, #ef4444, #f87171)":l.cpu.loadPercent>50?"linear-gradient(90deg, #f59e0b, #fbbf24)":"linear-gradient(90deg, #22c55e, #4ade80)"}})}),s.jsxs("p",{className:"text-xs text-muted mt-1",children:[l.cpu.cores," cores"]})]}),s.jsxs("div",{className:"card hover:border-border-hover transition-colors duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("span",{className:"text-xs text-muted flex items-center gap-1.5",children:[s.jsx(Yp,{className:"w-3.5 h-3.5"})," Memory"]}),s.jsxs("span",{className:`text-sm font-semibold ${l.memory.usagePercent>85?"text-danger":l.memory.usagePercent>60?"text-warning":"text-success"}`,children:[l.memory.usagePercent,"%"]})]}),s.jsx("div",{className:"h-2 bg-background rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${l.memory.usagePercent}%`,background:l.memory.usagePercent>85?"linear-gradient(90deg, #ef4444, #f87171)":l.memory.usagePercent>60?"linear-gradient(90deg, #f59e0b, #fbbf24)":"linear-gradient(90deg, #22c55e, #4ade80)"}})}),s.jsxs("p",{className:"text-xs text-muted mt-1",children:[d(l.memory.usedBytes)," / ",d(l.memory.totalBytes)]})]}),s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"flex items-center justify-between mb-2",children:s.jsxs("span",{className:"text-xs text-muted flex items-center gap-1.5",children:[s.jsx(Zh,{className:"w-3.5 h-3.5"})," Uptime"]})}),s.jsx("p",{className:"text-lg font-semibold text-foreground",children:l.uptime})]})]})]}),s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-warning/10 flex items-center justify-center",children:s.jsx(Kh,{className:"w-4 h-4 text-warning"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"API Keys"}),s.jsx("p",{className:"text-xs text-muted",children:"Manage LLM provider credentials"})]})]}),s.jsx("div",{className:"space-y-2 mb-4",children:e.providers.map(x=>s.jsxs("div",{className:"card flex items-center justify-between hover:border-border-hover transition-colors duration-200",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-foreground capitalize",children:x.provider}),s.jsx("span",{className:"text-xs text-muted ml-2 font-mono",children:n?x.apiKey:"****...****"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[x.provider===e.defaultProvider?s.jsx("span",{className:"badge-success",children:"default"}):s.jsx("button",{onClick:async()=>{await _.updateSettings({defaultProvider:x.provider});const v=await _.getSettings();t(v)},className:"btn-ghost btn-sm text-xs text-muted hover:text-foreground",children:"Set as default"}),s.jsx("button",{onClick:()=>i(!n),className:"btn-ghost btn-sm",children:n?s.jsx(Rp,{className:"w-3.5 h-3.5"}):s.jsx(Up,{className:"w-3.5 h-3.5"})}),x.provider!==e.defaultProvider&&s.jsx("button",{onClick:async()=>{if(!confirm(`Remove ${x.provider} provider?`))return;await _.deleteProvider(x.provider);const v=await _.getSettings();t(v)},className:"btn-ghost btn-sm text-muted hover:text-danger",title:"Remove provider",children:s.jsx(Aa,{className:"w-3.5 h-3.5"})})]})]},x.provider))}),s.jsxs("div",{className:"card",children:[s.jsx("h4",{className:"text-xs font-medium text-muted mb-2",children:"Add Provider"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("select",{value:u.provider,onChange:x=>c({...u,provider:x.target.value}),className:"input w-36",children:[s.jsx("option",{value:"anthropic",children:"Anthropic"}),s.jsx("option",{value:"openai",children:"OpenAI"}),s.jsx("option",{value:"google",children:"Google"}),s.jsx("option",{value:"groq",children:"Groq"}),s.jsx("option",{value:"ollama",children:"Ollama"}),s.jsx("option",{value:"deepseek",children:"DeepSeek"}),s.jsx("option",{value:"xai",children:"xAI (Grok)"}),s.jsx("option",{value:"mistral",children:"Mistral"})]}),s.jsx("input",{type:"password",placeholder:"API Key",value:u.apiKey,onChange:x=>c({...u,apiKey:x.target.value}),className:"input flex-1"}),s.jsx("button",{onClick:m,className:"btn-primary btn-sm",children:"Add"})]})]})]}),s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-success/10 flex items-center justify-center",children:s.jsx(Ji,{className:"w-4 h-4 text-success"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Security"}),s.jsx("p",{className:"text-xs text-muted",children:"Agent permission controls"})]})]}),s.jsxs("div",{className:"card",children:[s.jsx("label",{className:"text-xs text-muted block mb-2",children:"Permission Level"}),s.jsx("div",{className:"flex gap-2",children:["strict","balanced","permissive"].map(x=>s.jsx("button",{onClick:()=>t({...e,security:x}),className:`btn-sm rounded-lg capitalize transition-all duration-200 ${e.security===x?"bg-primary text-white shadow-md shadow-primary/20":"bg-surface border border-border text-foreground-secondary hover:bg-surface-hover hover:border-border-hover"}`,children:x},x))}),s.jsxs("p",{className:"text-xs text-muted mt-2",children:[e.security==="strict"&&"Ask before every file access and command execution",e.security==="balanced"&&"Auto-allow reads in workspace, ask for writes and commands",e.security==="permissive"&&"Only ask for destructive operations"]})]})]}),s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-accent/10 flex items-center justify-center",children:s.jsx(Vh,{className:"w-4 h-4 text-accent"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Workspace"}),s.jsx("p",{className:"text-xs text-muted",children:"Default working directory"})]})]}),s.jsxs("div",{className:"card",children:[s.jsx("input",{type:"text",value:e.workspace,onChange:x=>t({...e,workspace:x.target.value}),className:"input font-mono"}),s.jsx("p",{className:"text-xs text-muted mt-2",children:"Directory where agents operate by default"})]})]}),s.jsxs("button",{onClick:h,className:"btn-primary",disabled:r,children:[s.jsx(Zp,{className:"w-4 h-4"}),r?"Saving...":"Save Changes"]})]})]}):s.jsx("div",{className:"p-6 text-muted",children:"Loading..."})}function xv(){const[e,t]=p.useState([]),[l,a]=p.useState(""),[n,i]=p.useState(!1),[u,c]=p.useState(!1);p.useEffect(()=>{_.getAuditLog(200).then(t);const h=setInterval(()=>_.getAuditLog(200).then(t),5e3);return()=>clearInterval(h)},[]);const r=l?e.filter(h=>{var m,d,x;return h.action.toLowerCase().includes(l.toLowerCase())||((m=h.tool_name)==null?void 0:m.toLowerCase().includes(l.toLowerCase()))||((d=h.agent_name)==null?void 0:d.toLowerCase().includes(l.toLowerCase()))||((x=h.input)==null?void 0:x.toLowerCase().includes(l.toLowerCase()))}):e,f=h=>{switch(h){case"success":return s.jsx(xr,{className:"w-3.5 h-3.5 text-success"});case"error":return s.jsx(yr,{className:"w-3.5 h-3.5 text-danger"});case"denied":return s.jsx(cf,{className:"w-3.5 h-3.5 text-warning"});default:return s.jsx(Ji,{className:"w-3.5 h-3.5 text-muted"})}};return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"border-b border-border px-6 py-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Audit Log"}),s.jsx("p",{className:"text-sm text-muted mt-0.5",children:"History of all agent actions and tool executions"})]}),e.length>0&&s.jsxs("button",{onClick:()=>i(!0),className:"btn-ghost btn-sm text-muted hover:text-danger",children:[s.jsx(Aa,{className:"w-4 h-4"}),"Clear All"]})]}),s.jsx("div",{className:"px-6 py-3 border-b border-border",children:s.jsxs("div",{className:"relative max-w-md",children:[s.jsx(yu,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted"}),s.jsx("input",{type:"text",placeholder:"Filter by action, tool, agent...",value:l,onChange:h=>a(h.target.value),className:"input pl-10"})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto",children:r.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(Ji,{className:"w-8 h-8 text-muted mx-auto mb-3"}),s.jsx("p",{className:"text-sm text-muted",children:"No audit entries yet"})]}):s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border text-left",children:[s.jsx("th",{className:"px-6 py-3 text-xs font-medium text-muted",children:"Status"}),s.jsx("th",{className:"px-6 py-3 text-xs font-medium text-muted",children:"Time"}),s.jsx("th",{className:"px-6 py-3 text-xs font-medium text-muted",children:"Agent"}),s.jsx("th",{className:"px-6 py-3 text-xs font-medium text-muted",children:"Action"}),s.jsx("th",{className:"px-6 py-3 text-xs font-medium text-muted",children:"Input"}),s.jsx("th",{className:"px-6 py-3 text-xs font-medium text-muted",children:"Duration"})]})}),s.jsx("tbody",{children:r.map(h=>{var m;return s.jsxs("tr",{className:"border-b border-border hover:bg-surface-hover transition-colors",children:[s.jsx("td",{className:"px-6 py-3",children:f(h.status)}),s.jsx("td",{className:"px-6 py-3 text-xs text-muted font-mono",children:new Date(h.timestamp).toLocaleTimeString()}),s.jsx("td",{className:"px-6 py-3",children:s.jsx("span",{className:"text-xs font-medium text-foreground-secondary",children:h.agent_name||"-"})}),s.jsx("td",{className:"px-6 py-3",children:s.jsx("span",{className:"badge bg-surface border border-border text-foreground-secondary",children:h.action})}),s.jsx("td",{className:"px-6 py-3 max-w-xs",children:s.jsx("span",{className:"text-xs text-muted font-mono truncate block",children:((m=h.input)==null?void 0:m.slice(0,80))||"-"})}),s.jsx("td",{className:"px-6 py-3 text-xs text-muted",children:h.duration_ms?`${h.duration_ms}ms`:"-"})]},h.id)})})]})}),n&&s.jsx("div",{className:"modal-backdrop",onClick:()=>i(!1),children:s.jsx("div",{className:"modal-content w-full max-w-sm p-6",onClick:h=>h.stopPropagation(),children:s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-danger/10 flex items-center justify-center mb-4",children:s.jsx(cf,{className:"w-6 h-6 text-danger animate-pulse-slow"})}),s.jsx("h3",{className:"text-base font-semibold text-foreground mb-2",children:"Clear All Logs?"}),s.jsx("p",{className:"text-sm text-foreground-secondary mb-6",children:"This will permanently delete all audit log entries. This action cannot be undone."}),s.jsxs("div",{className:"flex gap-3 w-full",children:[s.jsx("button",{onClick:()=>i(!1),className:"btn-secondary flex-1",children:"Cancel"}),s.jsx("button",{onClick:async()=>{c(!0),await _.clearAuditLog(),t([]),c(!1),i(!1)},disabled:u,className:"btn-danger flex-1",children:u?"Clearing...":"Clear All"})]})]})})})]})}function yv(){const[e,t]=p.useState([]),[l,a]=p.useState(null),[n,i]=p.useState(!0),[u,c]=p.useState(null);p.useEffect(()=>{r()},[]);const r=async()=>{i(!0),c(null);try{const[d,x]=await Promise.all([_.getMemory().catch(()=>null),_.getProfile().catch(()=>null)]),v=[];if(d!=null&&d.categories){for(const[S,N]of Object.entries(d.categories))if(Array.isArray(N))for(const y of N)v.push({category:S,key:y,data:null})}t(v),a(x&&Object.keys(x).length>0?x:null)}catch(d){console.error("Failed to load memory:",d),c(d.message||"Failed to load memory")}finally{i(!1)}},f={user:s.jsx(rf,{className:"w-4 h-4"}),projects:s.jsx(Bp,{className:"w-4 h-4"}),feedback:s.jsx(pr,{className:"w-4 h-4"}),entities:s.jsx(Wp,{className:"w-4 h-4"})},h={user:"text-primary border-primary/20 bg-primary/10",projects:"text-success border-success/20 bg-success/10",feedback:"text-warning border-warning/20 bg-warning/10",entities:"text-accent border-accent/20 bg-accent/10"},m=e.reduce((d,x)=>(d[x.category]||(d[x.category]=[]),d[x.category].push(x),d),{});return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsx("div",{className:"border-b border-border px-6 py-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-lg font-semibold text-foreground flex items-center gap-2",children:[s.jsx(yi,{className:"w-5 h-5 text-primary"}),"Memory"]}),s.jsx("p",{className:"text-sm text-muted mt-0.5",children:"What Agent DJ remembers about you and your projects"})]}),s.jsxs("button",{onClick:r,className:"btn-secondary btn-sm",children:[s.jsx(sf,{className:`w-3.5 h-3.5 ${n?"animate-spin":""}`}),"Refresh"]})]})}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[n&&s.jsxs("div",{className:"text-center py-12",children:[s.jsx(sf,{className:"w-6 h-6 text-muted animate-spin mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted",children:"Loading memories..."})]}),u&&!n&&s.jsxs("div",{className:"card border-danger/20 bg-danger/5 text-center py-6",children:[s.jsx("p",{className:"text-sm text-danger",children:u}),s.jsx("button",{onClick:r,className:"btn-secondary btn-sm mt-3",children:"Try Again"})]}),!n&&l&&s.jsxs("div",{className:"card",children:[s.jsxs("h3",{className:"text-sm font-medium text-foreground flex items-center gap-2 mb-3",children:[s.jsx(rf,{className:"w-4 h-4 text-primary"}),"User Profile"]}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(l).map(([d,x])=>s.jsxs("div",{className:"text-xs",children:[s.jsxs("span",{className:"text-muted",children:[d,": "]}),s.jsx("span",{className:"text-foreground-secondary",children:typeof x=="object"?JSON.stringify(x):String(x)})]},d))})]}),!n&&Object.entries(m).map(([d,x])=>s.jsxs("div",{children:[s.jsxs("h3",{className:"text-sm font-medium text-foreground flex items-center gap-2 mb-3",children:[f[d]||s.jsx(yi,{className:"w-4 h-4"}),s.jsx("span",{className:"capitalize",children:d}),s.jsx("span",{className:"badge-muted",children:x.length})]}),s.jsx("div",{className:"space-y-2",children:x.map(v=>s.jsx("div",{className:`card border-l-2 ${h[d]||"border-border"}`,children:s.jsx("div",{className:"flex items-start justify-between",children:s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h4",{className:"text-sm font-medium text-foreground",children:v.key}),v.data&&s.jsx("pre",{className:"text-xs text-foreground-secondary mt-1 whitespace-pre-wrap break-words max-h-32 overflow-y-auto",children:typeof v.data=="object"?JSON.stringify(v.data,null,2):String(v.data)})]})})},`${v.category}-${v.key}`))})]},d)),!n&&!u&&e.length===0&&!l&&s.jsxs("div",{className:"card border-dashed text-center py-12",children:[s.jsx(yi,{className:"w-8 h-8 text-muted mx-auto mb-3"}),s.jsx("p",{className:"text-sm text-muted",children:"No memories stored yet"}),s.jsx("p",{className:"text-xs text-muted mt-1",children:"Agent DJ will remember things as you interact with it"})]})]})]})}const df={education:"bg-blue-500/20 text-blue-400",health:"bg-green-500/20 text-green-400",photography:"bg-purple-500/20 text-purple-400",utilities:"bg-yellow-500/20 text-yellow-400",entertainment:"bg-pink-500/20 text-pink-400",lifestyle:"bg-cyan-500/20 text-cyan-400",productivity:"bg-orange-500/20 text-orange-400",social:"bg-indigo-500/20 text-indigo-400",finance:"bg-emerald-500/20 text-emerald-400",developer:"bg-red-500/20 text-red-400",other:"bg-gray-500/20 text-gray-400"},mf={education:"๐",health:"๐ช",photography:"๐ธ",utilities:"๐ง",entertainment:"๐ฎ",lifestyle:"โจ",productivity:"โก",social:"๐ฌ",finance:"๐ฐ",developer:"๐จโ๐ป",other:"๐ฆ"};function gv(){const e=or(),[t,l]=p.useState([]),[a,n]=p.useState([]),[i,u]=p.useState(""),[c,r]=p.useState("all"),[f,h]=p.useState(!0);p.useEffect(()=>{m(),d()},[]),p.useEffect(()=>{m()},[i,c]);async function m(){try{const v={};i&&(v.search=i),c!=="all"&&(v.category=c);const S=await _.listApps(v);l(S)}catch(v){console.error("Failed to load apps:",v)}finally{h(!1)}}async function d(){try{const v=await _.getAppCategories();n(v)}catch(v){console.error("Failed to load categories:",v)}}const x=a.reduce((v,S)=>v+S.count,0);return s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsxs("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[s.jsx("div",{children:s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-xl flex items-center justify-center",children:s.jsx(vr,{className:"w-5 h-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Apps"}),s.jsxs("p",{className:"text-sm text-foreground-secondary",children:[x," iOS apps available for install"]})]})]})}),s.jsxs("div",{className:"relative",children:[s.jsx(yu,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted"}),s.jsx("input",{type:"text",placeholder:"Search apps...",value:i,onChange:v=>u(v.target.value),className:"input pl-10 w-full"})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs("button",{onClick:()=>r("all"),className:`px-3 py-1.5 rounded-full text-xs font-medium transition-colors ${c==="all"?"bg-primary text-white":"bg-surface-hover text-foreground-secondary hover:text-foreground"}`,children:["All (",x,")"]}),a.map(v=>s.jsxs("button",{onClick:()=>r(v.name),className:`px-3 py-1.5 rounded-full text-xs font-medium transition-colors ${c===v.name?"bg-primary text-white":"bg-surface-hover text-foreground-secondary hover:text-foreground"}`,children:[mf[v.name]||"๐ฆ"," ",v.name," (",v.count,")"]},v.name))]}),f?s.jsx("div",{className:"text-center py-12 text-muted",children:"Loading apps..."}):t.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(Gp,{className:"w-12 h-12 text-muted mx-auto mb-3"}),s.jsx("p",{className:"text-foreground-secondary",children:"No apps found"}),s.jsx("p",{className:"text-sm text-muted mt-1",children:"Try a different search or category"})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.map(v=>s.jsx("div",{onClick:()=>e(`/apps/${v.id}`),className:"card hover:border-primary/30 cursor-pointer transition-all group",children:s.jsxs("div",{className:"flex items-start gap-3",children:[v.iconUrl?s.jsx("img",{src:v.iconUrl,alt:v.name,className:"w-14 h-14 rounded-2xl shrink-0 object-cover bg-surface-hover",onError:S=>{var N;S.target.style.display="none",(N=S.target.nextElementSibling)==null||N.classList.remove("hidden")}}):null,s.jsx("div",{className:`w-14 h-14 rounded-2xl bg-gradient-to-br from-primary/20 to-accent/20 flex items-center justify-center shrink-0 text-2xl ${v.iconUrl?"hidden":""}`,children:mf[v.category]||"๐ฆ"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:"font-semibold text-foreground truncate",children:v.name}),v.status==="available"&&s.jsx(ha,{className:"w-3.5 h-3.5 text-accent shrink-0"})]}),s.jsx("p",{className:"text-xs text-foreground-secondary mt-0.5 line-clamp-2",children:v.shortDescription}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${df[v.category]||df.other}`,children:v.category}),s.jsxs("span",{className:"text-xs text-muted",children:["v",v.version]}),s.jsxs("span",{className:"text-xs text-muted",children:[v.sizeMb," MB"]})]})]}),s.jsx(Op,{className:"w-4 h-4 text-muted group-hover:text-primary transition-colors shrink-0 mt-1"})]})},v.id))})]})})}const hf={quick_install:{name:"Quick Install",icon:"๐ข",description:"Connect iPhone via USB with Developer Mode enabled. Agent signs and installs directly.",requirements:"Developer Mode ON, USB cable, Mac/PC",available:!0},altstore:{name:"AltStore",icon:"๐ต",description:"Install via AltStore on your device. Requires AltServer running on a computer.",requirements:"AltStore installed, AltServer on Mac/PC",available:!0},trollstore:{name:"TrollStore",icon:"๐ฃ",description:"Permanent sideloading with no resign. Only available on specific iOS versions.",requirements:"iOS 14.0-16.6.1 or 17.0, TrollStore installed",available:!0},testflight:{name:"TestFlight",icon:"๐ก",description:"Easiest option โ just tap a link. May take up to 24h for access.",requirements:"TestFlight app installed, email for invite",available:!0}},pv={education:"๐",health:"๐ช",photography:"๐ธ",utilities:"๐ง",entertainment:"๐ฎ",lifestyle:"โจ",productivity:"โก",social:"๐ฌ",finance:"๐ฐ",developer:"๐จโ๐ป",other:"๐ฆ"};function vv(){const{id:e}=wg(),t=or(),[l,a]=p.useState(null),[n,i]=p.useState(!0),[u,c]=p.useState(!1),[r,f]=p.useState(null);p.useEffect(()=>{e&&h(e)},[e]);async function h(m){try{const d=await _.getApp(m);a(d)}catch(d){console.error("Failed to load app:",d)}finally{i(!1)}}return n?s.jsx("div",{className:"h-full flex items-center justify-center text-muted",children:"Loading..."}):l?s.jsxs("div",{className:"h-full overflow-y-auto",children:[s.jsxs("div",{className:"max-w-4xl mx-auto p-6 space-y-6",children:[s.jsxs("button",{onClick:()=>t("/apps"),className:"flex items-center gap-1.5 text-sm text-foreground-secondary hover:text-foreground transition-colors",children:[s.jsx(nf,{className:"w-4 h-4"}),"Back to Apps"]}),s.jsx("div",{className:"card",children:s.jsxs("div",{className:"flex items-start gap-5",children:[l.iconUrl?s.jsx("img",{src:l.iconUrl,alt:l.name,className:"w-20 h-20 rounded-2xl shrink-0 object-cover bg-surface-hover",onError:m=>{var d;m.target.style.display="none",(d=m.target.nextElementSibling)==null||d.classList.remove("hidden")}}):null,s.jsx("div",{className:`w-20 h-20 rounded-2xl bg-gradient-to-br from-primary/20 to-accent/20 flex items-center justify-center shrink-0 text-4xl ${l.iconUrl?"hidden":""}`,children:pv[l.category]||"๐ฆ"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:l.name}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:l.shortDescription}),s.jsxs("p",{className:"text-xs text-muted mt-1",children:["by ",l.developer]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-4 mt-4 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-foreground-secondary",children:[s.jsx($p,{className:"w-3.5 h-3.5"}),"v",l.version]}),s.jsxs("div",{className:"flex items-center gap-1.5 text-foreground-secondary",children:[s.jsx(Zh,{className:"w-3.5 h-3.5"}),l.sizeMb," MB"]}),s.jsxs("div",{className:"flex items-center gap-1.5 text-foreground-secondary",children:[s.jsx(vr,{className:"w-3.5 h-3.5"}),"iOS ",l.minIosVersion,"+"]}),s.jsxs("div",{className:"flex items-center gap-1.5 text-foreground-secondary",children:[s.jsx(gr,{className:"w-3.5 h-3.5"}),"Updated ",new Date(l.lastUpdated).toLocaleDateString()]})]})]}),s.jsxs("button",{onClick:()=>c(!0),className:"btn btn-primary flex items-center gap-2 shrink-0",children:[s.jsx(qa,{className:"w-4 h-4"}),"Install"]})]})}),l.tags.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:l.tags.map(m=>s.jsx("span",{className:"badge badge-info text-xs",children:m},m))}),s.jsxs("div",{className:"card",children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:"About"}),s.jsx("p",{className:"text-foreground-secondary leading-relaxed",children:l.description})]}),l.changelog&&s.jsxs("div",{className:"card",children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:"What's New"}),s.jsx("p",{className:"text-foreground-secondary",children:l.changelog}),s.jsxs("p",{className:"text-xs text-muted mt-2",children:["Released ",new Date(l.releaseDate).toLocaleDateString()]})]}),s.jsxs("div",{className:"card",children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:"Install Methods"}),s.jsx("div",{className:"space-y-2",children:l.installMethods.map(m=>{const d=hf[m];return d?s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-surface-hover",children:[s.jsx("span",{className:"text-xl",children:d.icon}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:d.name}),s.jsx("p",{className:"text-xs text-muted",children:d.requirements})]}),s.jsx(xr,{className:"w-4 h-4 text-success"})]},m):null})})]})]}),u&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:s.jsxs("div",{className:"bg-surface border border-border rounded-2xl w-full max-w-lg mx-4 shadow-2xl",children:[s.jsxs("div",{className:"flex items-center justify-between p-5 border-b border-border",children:[s.jsxs("h2",{className:"text-lg font-semibold text-foreground",children:["Install ",l.name]}),s.jsx("button",{onClick:()=>c(!1),className:"p-1 rounded-lg hover:bg-surface-hover text-muted hover:text-foreground transition-colors",children:s.jsx(Jh,{className:"w-5 h-5"})})]}),s.jsx("div",{className:"p-5 space-y-3",children:r?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("button",{onClick:()=>f(null),className:"flex items-center gap-1.5 text-sm text-foreground-secondary hover:text-foreground transition-colors",children:[s.jsx(nf,{className:"w-3.5 h-3.5"}),"Back to methods"]}),r==="quick_install"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("h3",{className:"font-semibold text-foreground flex items-center gap-2",children:[s.jsx("span",{children:"๐ข"})," Quick Install Steps"]}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"1. Enable Developer Mode on iPhone"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:"Settings โ Privacy & Security โ Developer Mode โ ON โ Restart โ Confirm"})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"2. Connect iPhone via USB"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:'Plug your iPhone into this computer and tap "Trust" on your phone.'})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"3. Install device tools"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:s.jsx("code",{className:"text-xs bg-background px-1.5 py-0.5 rounded",children:"brew install libimobiledevice ideviceinstaller"})})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"4. Download & Install"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:"The agent will download the IPA, sign it with your Apple ID, and push it to your iPhone."})]})]}),l.downloadUrl&&s.jsxs("a",{href:l.downloadUrl,className:"btn btn-primary w-full flex items-center justify-center gap-2 mt-3",children:[s.jsx(qa,{className:"w-4 h-4"}),"Download IPA (",l.sizeMb," MB)"]})]}),r==="altstore"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("h3",{className:"font-semibold text-foreground flex items-center gap-2",children:[s.jsx("span",{children:"๐ต"})," AltStore Install Steps"]}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"1. Install AltServer on your Mac/PC"}),s.jsxs("p",{className:"text-foreground-secondary mt-1",children:["Download from ",s.jsx("span",{className:"text-primary",children:"altstore.io"})," and run AltServer."]})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"2. Install AltStore on your iPhone"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:"Connect iPhone via USB, click AltServer icon in menu bar โ Install AltStore โ select your phone."})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"3. Download the IPA"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:"Tap the download button below on your iPhone or AirDrop the file."})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"4. Open with AltStore"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:"Open the .ipa file โ share โ AltStore. It will sign and install automatically."})]})]}),s.jsx("p",{className:"text-xs text-muted",children:"Note: Free Apple ID allows max 3 sideloaded apps. Apps must be refreshed every 7 days."}),l.downloadUrl&&s.jsxs("a",{href:l.downloadUrl,className:"btn btn-primary w-full flex items-center justify-center gap-2 mt-3",children:[s.jsx(qa,{className:"w-4 h-4"}),"Download IPA (",l.sizeMb," MB)"]})]}),r==="trollstore"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("h3",{className:"font-semibold text-foreground flex items-center gap-2",children:[s.jsx("span",{children:"๐ฃ"})," TrollStore Install Steps"]}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"1. Check compatibility"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:"TrollStore works on iOS 14.0 - 16.6.1 and iOS 17.0 only. Check your version in Settings โ General โ About."})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"2. Install TrollStore"}),s.jsxs("p",{className:"text-foreground-secondary mt-1",children:["Follow the guide at ",s.jsx("span",{className:"text-primary",children:"ios.cfw.guide/installing-trollstore"})]})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"3. Download & open with TrollStore"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:"Download the IPA and open it with TrollStore. No resign needed, no 7-day limit."})]})]}),l.downloadUrl&&s.jsxs("a",{href:l.downloadUrl,className:"btn btn-primary w-full flex items-center justify-center gap-2 mt-3",children:[s.jsx(qa,{className:"w-4 h-4"}),"Download IPA (",l.sizeMb," MB)"]})]}),r==="testflight"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("h3",{className:"font-semibold text-foreground flex items-center gap-2",children:[s.jsx("span",{children:"๐ก"})," TestFlight Install"]}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"1. Install TestFlight from the App Store"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:`Search "TestFlight" in the App Store and install Apple's official beta testing app.`})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"2. Request access"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:"Tap the button below to request a TestFlight invite. You'll receive an email within 24 hours."})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-surface-hover",children:[s.jsx("p",{className:"font-medium text-foreground",children:"3. Accept invite & install"}),s.jsx("p",{className:"text-foreground-secondary mt-1",children:'Open the TestFlight email on your iPhone, tap "View in TestFlight", then tap "Install".'})]})]}),s.jsx("button",{className:"btn btn-primary w-full flex items-center justify-center gap-2 mt-3",children:"Request TestFlight Access"})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-sm text-foreground-secondary mb-4",children:"Choose how you'd like to install this app on your iPhone:"}),l.installMethods.map(m=>{const d=hf[m];return d?s.jsx("button",{className:"w-full text-left p-4 rounded-xl border border-border hover:border-primary/30 hover:bg-primary/5 transition-all",onClick:()=>f(m),children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{className:"text-2xl",children:d.icon}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-foreground",children:d.name}),s.jsx("p",{className:"text-sm text-foreground-secondary mt-0.5",children:d.description}),s.jsxs("p",{className:"text-xs text-muted mt-1",children:["Requires: ",d.requirements]})]})]})},m):null})]})})]})})]}):s.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-3",children:[s.jsx("p",{className:"text-foreground-secondary",children:"App not found"}),s.jsx("button",{onClick:()=>t("/apps"),className:"btn btn-primary",children:"Back to Apps"})]})}function bv(){const[e,t]=p.useState([]),[l,a]=p.useState(!1),[n,i]=p.useState(null),[u,c]=p.useState(""),[r,f]=p.useState(""),[h,m]=p.useState(""),[d,x]=p.useState(null),v=()=>{_.listSkills().then(t).catch(console.error)};p.useEffect(()=>{v()},[]);const S=()=>{i(null),c(""),f(""),m(""),a(!0)},N=b=>{i(b),c(b.name),f(b.description),m(b.content),a(!0)},y=async()=>{!u.trim()||!h.trim()||(n?await _.updateSkill(n.id,{name:u.trim(),description:r.trim(),content:h.trim()}):await _.createSkill({name:u.trim(),description:r.trim(),content:h.trim()}),a(!1),v())},o=async b=>{await _.toggleSkill(b),v()},g=async b=>{await _.deleteSkill(b),x(null),v()};return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"border-b border-border px-6 py-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Skills"}),s.jsx("p",{className:"text-sm text-muted mt-0.5",children:"Custom instructions injected into agent prompts"})]}),s.jsxs("button",{onClick:S,className:"flex items-center gap-2 px-3 py-1.5 bg-primary text-white text-sm rounded-lg hover:bg-primary/90 transition-colors",children:[s.jsx(Ki,{className:"w-4 h-4"}),"New Skill"]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:e.length===0&&!l?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[s.jsx(ha,{className:"w-12 h-12 text-muted mb-4 animate-float"}),s.jsx("h3",{className:"text-sm font-medium text-foreground mb-1",children:"No skills yet"}),s.jsx("p",{className:"text-xs text-muted mb-4 max-w-sm",children:"Skills are custom instructions that get injected into every agent's system prompt. They work across all providers (Claude, GPT, Gemini, Grok, etc.)"}),s.jsxs("button",{onClick:S,className:"flex items-center gap-2 px-3 py-1.5 bg-primary text-white text-sm rounded-lg hover:bg-primary/90 transition-colors",children:[s.jsx(Ki,{className:"w-4 h-4"}),"Create your first skill"]})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:e.map((b,A)=>s.jsx("div",{className:"card card-skill-hover animate-stagger-in",style:{animationDelay:`${A*60}ms`},children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center border ${b.enabled?"bg-primary/10 text-primary border-primary/20":"bg-surface text-muted border-border"}`,children:s.jsx(ha,{className:"w-5 h-5"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-sm font-semibold text-foreground truncate",children:b.name}),s.jsx("button",{onClick:()=>o(b.id),className:"ml-2 flex-shrink-0",title:b.enabled?"Disable":"Enable",children:b.enabled?s.jsx(Ip,{className:"w-6 h-6 text-primary"}):s.jsx(Fp,{className:"w-6 h-6 text-muted"})})]}),b.description&&s.jsx("p",{className:"text-xs text-foreground-secondary mt-1 truncate",children:b.description}),s.jsx("p",{className:"text-xs text-muted mt-2 line-clamp-3 font-mono whitespace-pre-wrap",children:b.content}),s.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[s.jsx("span",{className:`badge ${b.enabled?"badge-success":"badge-muted"}`,children:b.enabled?"Active":"Disabled"}),s.jsx("div",{className:"flex-1"}),s.jsx("button",{onClick:()=>N(b),className:"p-1 text-muted hover:text-foreground transition-colors",title:"Edit",children:s.jsx(Xp,{className:"w-3.5 h-3.5"})}),d===b.id?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>g(b.id),className:"text-xs text-red-400 hover:text-red-300",children:"Confirm"}),s.jsx("button",{onClick:()=>x(null),className:"text-xs text-muted hover:text-foreground",children:"Cancel"})]}):s.jsx("button",{onClick:()=>x(b.id),className:"p-1 text-muted hover:text-red-400 transition-colors",title:"Delete",children:s.jsx(Aa,{className:"w-3.5 h-3.5"})})]})]})]})},b.id))})}),l&&s.jsx("div",{className:"modal-backdrop p-4",onClick:()=>a(!1),children:s.jsxs("div",{className:"modal-content w-full max-w-lg max-h-[80vh] flex flex-col",onClick:b=>b.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[s.jsx("h2",{className:"text-sm font-semibold text-foreground",children:n?"Edit Skill":"New Skill"}),s.jsx("button",{onClick:()=>a(!1),className:"p-1 text-muted hover:text-foreground transition-colors",children:s.jsx(Jh,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-5 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-foreground-secondary mb-1.5 block",children:"Name"}),s.jsx("input",{type:"text",value:u,onChange:b=>c(b.target.value),placeholder:"e.g., Code Style Guide",className:"w-full px-3 py-2 bg-surface border border-border rounded-lg text-sm text-foreground placeholder:text-muted focus:outline-none focus:border-primary"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-foreground-secondary mb-1.5 block",children:"Description"}),s.jsx("input",{type:"text",value:r,onChange:b=>f(b.target.value),placeholder:"Brief description (optional)",className:"w-full px-3 py-2 bg-surface border border-border rounded-lg text-sm text-foreground placeholder:text-muted focus:outline-none focus:border-primary"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-foreground-secondary mb-1.5 block",children:"Instructions"}),s.jsx("textarea",{value:h,onChange:b=>m(b.target.value),placeholder:"Write the instructions that will be injected into agent prompts...",rows:10,className:"w-full px-3 py-2 bg-surface border border-border rounded-lg text-sm text-foreground placeholder:text-muted focus:outline-none focus:border-primary font-mono resize-y"})]})]}),s.jsxs("div",{className:"flex items-center justify-end gap-2 px-5 py-4 border-t border-border",children:[s.jsx("button",{onClick:()=>a(!1),className:"px-3 py-1.5 text-sm text-muted hover:text-foreground transition-colors",children:"Cancel"}),s.jsx("button",{onClick:y,disabled:!u.trim()||!h.trim(),className:"px-4 py-1.5 bg-primary text-white text-sm rounded-lg hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:n?"Save Changes":"Create Skill"})]})]})})]})}function Sv(){return s.jsxs("div",{className:"flex h-screen bg-background overflow-hidden",children:[s.jsx(lv,{}),s.jsx("main",{className:"flex-1 overflow-hidden",children:s.jsxs(Vg,{children:[s.jsx(Ze,{path:"/",element:s.jsx(uv,{})}),s.jsx(Ze,{path:"/tasks",element:s.jsx(sv,{})}),s.jsx(Ze,{path:"/knowledge",element:s.jsx(cv,{})}),s.jsx(Ze,{path:"/agents",element:s.jsx(dv,{})}),s.jsx(Ze,{path:"/mcp",element:s.jsx(mv,{})}),s.jsx(Ze,{path:"/settings",element:s.jsx(hv,{})}),s.jsx(Ze,{path:"/audit",element:s.jsx(xv,{})}),s.jsx(Ze,{path:"/memory",element:s.jsx(yv,{})}),s.jsx(Ze,{path:"/skills",element:s.jsx(bv,{})}),s.jsx(Ze,{path:"/apps",element:s.jsx(gv,{})}),s.jsx(Ze,{path:"/apps/:id",element:s.jsx(vv,{})})]})})]})}Ky.createRoot(document.getElementById("root")).render(s.jsx(Ra.StrictMode,{children:s.jsx(xp,{children:s.jsx(Sv,{})})}));
|