@ww-ai-lab/openclaw-office 0.2.0 → 0.3.0
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 +18 -3
- package/README.zh.md +18 -3
- package/dist/assets/{ActivityHeatmap-BBam6E0n.js → ActivityHeatmap-tMKuM1UM.js} +1 -1
- package/dist/assets/{CostPieChart-DAWcMLAM.js → CostPieChart-7a55pRVP.js} +1 -1
- package/dist/assets/{NetworkGraph-C7bId4Qo.js → NetworkGraph-Dh-5R6Yt.js} +1 -1
- package/dist/assets/{Scene3D-CUH0kBa1.js → Scene3D-Ds6Ko60O.js} +1 -1
- package/dist/assets/{TokenLineChart-CoV2eBb4.js → TokenLineChart-DY_YXiO5.js} +1 -1
- package/dist/assets/{generateCategoricalChart-3d0tNdH3.js → generateCategoricalChart-K9WHzrHy.js} +1 -1
- package/dist/assets/{index-DNKPM7x5.js → index-CsSAduQA.js} +99 -94
- package/dist/assets/index-Df0vkxXq.css +1 -0
- package/dist/assets/{ws-adapter-sYZJya-9.js → ws-adapter-LktCvqUH.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/index-CLdO2Rfn.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TokenLineChart-
|
|
2
|
-
var jS=Object.defineProperty;var
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TokenLineChart-DY_YXiO5.js","assets/generateCategoricalChart-K9WHzrHy.js","assets/CostPieChart-7a55pRVP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var jS=Object.defineProperty;var NS=(e,n,a)=>n in e?jS(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;var vt=(e,n,a)=>NS(e,typeof n!="symbol"?n+"":n,a);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function a(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function l(s){if(s.ep)return;s.ep=!0;const o=a(s);fetch(s.href,o)}})();var VR=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rd={exports:{}},di={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@ var jS=Object.defineProperty;var CS=(e,n,a)=>n in e?jS(e,n,{enumerable:!0,config
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var D0;function
|
|
10
|
+
*/var D0;function CS(){if(D0)return di;D0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:e,type:l,key:c,ref:s!==void 0?s:null,props:o}}return di.Fragment=n,di.jsx=a,di.jsxs=a,di}var R0;function ES(){return R0||(R0=1,Rd.exports=CS()),Rd.exports}var d=ES(),Od={exports:{}},Se={};/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react.production.js
|
|
13
13
|
*
|
|
@@ -15,7 +15,7 @@ var jS=Object.defineProperty;var CS=(e,n,a)=>n in e?jS(e,n,{enumerable:!0,config
|
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var
|
|
18
|
+
*/var O0;function AS(){if(O0)return Se;O0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=b&&D[b]||D["@@iterator"],typeof D=="function"?D:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,E={};function j(D,Y,A){this.props=D,this.context=Y,this.refs=E,this.updater=A||S}j.prototype.isReactComponent={},j.prototype.setState=function(D,Y){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,Y,"setState")},j.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function z(){}z.prototype=j.prototype;function T(D,Y,A){this.props=D,this.context=Y,this.refs=E,this.updater=A||S}var P=T.prototype=new z;P.constructor=T,N(P,j.prototype),P.isPureReactComponent=!0;var H=Array.isArray;function L(){}var V={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function G(D,Y,A){var se=A.ref;return{$$typeof:e,type:D,key:Y,ref:se!==void 0?se:null,props:A}}function R(D,Y){return G(D.type,Y,D.props)}function ae(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function F(D){var Y={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(A){return Y[A]})}var ie=/\/+/g;function ne(D,Y){return typeof D=="object"&&D!==null&&D.key!=null?F(""+D.key):Y.toString(36)}function W(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(L,L):(D.status="pending",D.then(function(Y){D.status==="pending"&&(D.status="fulfilled",D.value=Y)},function(Y){D.status==="pending"&&(D.status="rejected",D.reason=Y)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function B(D,Y,A,se,me){var ge=typeof D;(ge==="undefined"||ge==="boolean")&&(D=null);var Me=!1;if(D===null)Me=!0;else switch(ge){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(D.$$typeof){case e:case n:Me=!0;break;case x:return Me=D._init,B(Me(D._payload),Y,A,se,me)}}if(Me)return me=me(D),Me=se===""?"."+ne(D,0):se,H(me)?(A="",Me!=null&&(A=Me.replace(ie,"$&/")+"/"),B(me,Y,A,"",function(rn){return rn})):me!=null&&(ae(me)&&(me=R(me,A+(me.key==null||D&&D.key===me.key?"":(""+me.key).replace(ie,"$&/")+"/")+Me)),Y.push(me)),1;Me=0;var tt=se===""?".":se+":";if(H(D))for(var Ke=0;Ke<D.length;Ke++)se=D[Ke],ge=tt+ne(se,Ke),Me+=B(se,Y,A,ge,me);else if(Ke=v(D),typeof Ke=="function")for(D=Ke.call(D),Ke=0;!(se=D.next()).done;)se=se.value,ge=tt+ne(se,Ke++),Me+=B(se,Y,A,ge,me);else if(ge==="object"){if(typeof D.then=="function")return B(W(D),Y,A,se,me);throw Y=String(D),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Me}function te(D,Y,A){if(D==null)return D;var se=[],me=0;return B(D,se,"","",function(ge){return Y.call(A,ge,me++)}),se}function ce(D){if(D._status===-1){var Y=D._result;Y=Y(),Y.then(function(A){(D._status===0||D._status===-1)&&(D._status=1,D._result=A)},function(A){(D._status===0||D._status===-1)&&(D._status=2,D._result=A)}),D._status===-1&&(D._status=0,D._result=Y)}if(D._status===1)return D._result.default;throw D._result}var we=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},_={map:te,forEach:function(D,Y,A){te(D,function(){Y.apply(this,arguments)},A)},count:function(D){var Y=0;return te(D,function(){Y++}),Y},toArray:function(D){return te(D,function(Y){return Y})||[]},only:function(D){if(!ae(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Se.Activity=y,Se.Children=_,Se.Component=j,Se.Fragment=a,Se.Profiler=s,Se.PureComponent=T,Se.StrictMode=l,Se.Suspense=g,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,Se.__COMPILER_RUNTIME={__proto__:null,c:function(D){return V.H.useMemoCache(D)}},Se.cache=function(D){return function(){return D.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(D,Y,A){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var se=N({},D.props),me=D.key;if(Y!=null)for(ge in Y.key!==void 0&&(me=""+Y.key),Y)!ee.call(Y,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&Y.ref===void 0||(se[ge]=Y[ge]);var ge=arguments.length-2;if(ge===1)se.children=A;else if(1<ge){for(var Me=Array(ge),tt=0;tt<ge;tt++)Me[tt]=arguments[tt+2];se.children=Me}return G(D.type,me,se)},Se.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:o,_context:D},D},Se.createElement=function(D,Y,A){var se,me={},ge=null;if(Y!=null)for(se in Y.key!==void 0&&(ge=""+Y.key),Y)ee.call(Y,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(me[se]=Y[se]);var Me=arguments.length-2;if(Me===1)me.children=A;else if(1<Me){for(var tt=Array(Me),Ke=0;Ke<Me;Ke++)tt[Ke]=arguments[Ke+2];me.children=tt}if(D&&D.defaultProps)for(se in Me=D.defaultProps,Me)me[se]===void 0&&(me[se]=Me[se]);return G(D,ge,me)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(D){return{$$typeof:f,render:D}},Se.isValidElement=ae,Se.lazy=function(D){return{$$typeof:x,_payload:{_status:-1,_result:D},_init:ce}},Se.memo=function(D,Y){return{$$typeof:h,type:D,compare:Y===void 0?null:Y}},Se.startTransition=function(D){var Y=V.T,A={};V.T=A;try{var se=D(),me=V.S;me!==null&&me(A,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(L,we)}catch(ge){we(ge)}finally{Y!==null&&A.types!==null&&(Y.types=A.types),V.T=Y}},Se.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},Se.use=function(D){return V.H.use(D)},Se.useActionState=function(D,Y,A){return V.H.useActionState(D,Y,A)},Se.useCallback=function(D,Y){return V.H.useCallback(D,Y)},Se.useContext=function(D){return V.H.useContext(D)},Se.useDebugValue=function(){},Se.useDeferredValue=function(D,Y){return V.H.useDeferredValue(D,Y)},Se.useEffect=function(D,Y){return V.H.useEffect(D,Y)},Se.useEffectEvent=function(D){return V.H.useEffectEvent(D)},Se.useId=function(){return V.H.useId()},Se.useImperativeHandle=function(D,Y,A){return V.H.useImperativeHandle(D,Y,A)},Se.useInsertionEffect=function(D,Y){return V.H.useInsertionEffect(D,Y)},Se.useLayoutEffect=function(D,Y){return V.H.useLayoutEffect(D,Y)},Se.useMemo=function(D,Y){return V.H.useMemo(D,Y)},Se.useOptimistic=function(D,Y){return V.H.useOptimistic(D,Y)},Se.useReducer=function(D,Y,A){return V.H.useReducer(D,Y,A)},Se.useRef=function(D){return V.H.useRef(D)},Se.useState=function(D){return V.H.useState(D)},Se.useSyncExternalStore=function(D,Y,A){return V.H.useSyncExternalStore(D,Y,A)},Se.useTransition=function(){return V.H.useTransition()},Se.version="19.2.4",Se}var z0;function Qo(){return z0||(z0=1,Od.exports=AS()),Od.exports}var C=Qo();const sr=Zf(C);var zd={exports:{}},fi={},Ld={exports:{}},Ud={};/**
|
|
19
19
|
* @license React
|
|
20
20
|
* scheduler.production.js
|
|
21
21
|
*
|
|
@@ -23,7 +23,7 @@ var jS=Object.defineProperty;var CS=(e,n,a)=>n in e?jS(e,n,{enumerable:!0,config
|
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the MIT license found in the
|
|
25
25
|
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var
|
|
26
|
+
*/var L0;function TS(){return L0||(L0=1,(function(e){function n(B,te){var ce=B.length;B.push(te);e:for(;0<ce;){var we=ce-1>>>1,_=B[we];if(0<s(_,te))B[we]=te,B[ce]=_,ce=we;else break e}}function a(B){return B.length===0?null:B[0]}function l(B){if(B.length===0)return null;var te=B[0],ce=B.pop();if(ce!==te){B[0]=ce;e:for(var we=0,_=B.length,D=_>>>1;we<D;){var Y=2*(we+1)-1,A=B[Y],se=Y+1,me=B[se];if(0>s(A,ce))se<_&&0>s(me,A)?(B[we]=me,B[se]=ce,we=se):(B[we]=A,B[Y]=ce,we=Y);else if(se<_&&0>s(me,ce))B[we]=me,B[se]=ce,we=se;else break e}}return te}function s(B,te){var ce=B.sortIndex-te.sortIndex;return ce!==0?ce:B.id-te.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var g=[],h=[],x=1,y=null,b=3,v=!1,S=!1,N=!1,E=!1,j=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function P(B){for(var te=a(h);te!==null;){if(te.callback===null)l(h);else if(te.startTime<=B)l(h),te.sortIndex=te.expirationTime,n(g,te);else break;te=a(h)}}function H(B){if(N=!1,P(B),!S)if(a(g)!==null)S=!0,L||(L=!0,F());else{var te=a(h);te!==null&&W(H,te.startTime-B)}}var L=!1,V=-1,ee=5,G=-1;function R(){return E?!0:!(e.unstable_now()-G<ee)}function ae(){if(E=!1,L){var B=e.unstable_now();G=B;var te=!0;try{e:{S=!1,N&&(N=!1,z(V),V=-1),v=!0;var ce=b;try{t:{for(P(B),y=a(g);y!==null&&!(y.expirationTime>B&&R());){var we=y.callback;if(typeof we=="function"){y.callback=null,b=y.priorityLevel;var _=we(y.expirationTime<=B);if(B=e.unstable_now(),typeof _=="function"){y.callback=_,P(B),te=!0;break t}y===a(g)&&l(g),P(B)}else l(g);y=a(g)}if(y!==null)te=!0;else{var D=a(h);D!==null&&W(H,D.startTime-B),te=!1}}break e}finally{y=null,b=ce,v=!1}te=void 0}}finally{te?F():L=!1}}}var F;if(typeof T=="function")F=function(){T(ae)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ne=ie.port2;ie.port1.onmessage=ae,F=function(){ne.postMessage(null)}}else F=function(){j(ae,0)};function W(B,te){V=j(function(){B(e.unstable_now())},te)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var te=3;break;default:te=b}var ce=b;b=te;try{return B()}finally{b=ce}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(B,te){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ce=b;b=B;try{return te()}finally{b=ce}},e.unstable_scheduleCallback=function(B,te,ce){var we=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?we+ce:we):ce=we,B){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=ce+_,B={id:x++,callback:te,priorityLevel:B,startTime:ce,expirationTime:_,sortIndex:-1},ce>we?(B.sortIndex=ce,n(h,B),a(g)===null&&B===a(h)&&(N?(z(V),V=-1):N=!0,W(H,ce-we))):(B.sortIndex=_,n(g,B),S||v||(S=!0,L||(L=!0,F()))),B},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(B){var te=b;return function(){var ce=b;b=te;try{return B.apply(this,arguments)}finally{b=ce}}}})(Ud)),Ud}var U0;function _S(){return U0||(U0=1,Ld.exports=TS()),Ld.exports}var Hd={exports:{}},At={};/**
|
|
27
27
|
* @license React
|
|
28
28
|
* react-dom.production.js
|
|
29
29
|
*
|
|
@@ -31,7 +31,7 @@ var jS=Object.defineProperty;var CS=(e,n,a)=>n in e?jS(e,n,{enumerable:!0,config
|
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the MIT license found in the
|
|
33
33
|
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var
|
|
34
|
+
*/var H0;function MS(){if(H0)return At;H0=1;var e=Qo();function n(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)h+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(g,h,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:g,containerInfo:h,implementation:x}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,At.createPortal=function(g,h){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return o(g,h,null,x)},At.flushSync=function(g){var h=c.T,x=l.p;try{if(c.T=null,l.p=2,g)return g()}finally{c.T=h,l.p=x,l.d.f()}},At.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(g,h))},At.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},At.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var x=h.as,y=f(x,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;x==="style"?l.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:v}):x==="script"&&l.d.X(g,{crossOrigin:y,integrity:b,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},At.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var x=f(h.as,h.crossOrigin);l.d.M(g,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(g)},At.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var x=h.as,y=f(x,h.crossOrigin);l.d.L(g,x,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},At.preloadModule=function(g,h){if(typeof g=="string")if(h){var x=f(h.as,h.crossOrigin);l.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(g)},At.requestFormReset=function(g){l.d.r(g)},At.unstable_batchedUpdates=function(g,h){return g(h)},At.useFormState=function(g,h,x){return c.H.useFormState(g,h,x)},At.useFormStatus=function(){return c.H.useHostTransitionStatus()},At.version="19.2.4",At}var B0;function DS(){if(B0)return Hd.exports;B0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Hd.exports=MS(),Hd.exports}/**
|
|
35
35
|
* @license React
|
|
36
36
|
* react-dom-client.production.js
|
|
37
37
|
*
|
|
@@ -39,15 +39,15 @@ var jS=Object.defineProperty;var CS=(e,n,a)=>n in e?jS(e,n,{enumerable:!0,config
|
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the MIT license found in the
|
|
41
41
|
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var
|
|
42
|
+
*/var q0;function RS(){if(q0)return fi;q0=1;var e=_S(),n=Qo(),a=DS();function l(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var r=t,i=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(i=r.return),t=r.return;while(t)}return r.tag===3?i:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function g(t){if(o(t)!==t)throw Error(l(188))}function h(t){var r=t.alternate;if(!r){if(r=o(t),r===null)throw Error(l(188));return r!==t?null:t}for(var i=t,u=r;;){var p=i.return;if(p===null)break;var m=p.alternate;if(m===null){if(u=p.return,u!==null){i=u;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===i)return g(p),t;if(m===u)return g(p),r;m=m.sibling}throw Error(l(188))}if(i.return!==u.return)i=p,u=m;else{for(var k=!1,w=p.child;w;){if(w===i){k=!0,i=p,u=m;break}if(w===u){k=!0,u=p,i=m;break}w=w.sibling}if(!k){for(w=m.child;w;){if(w===i){k=!0,i=m,u=p;break}if(w===u){k=!0,u=m,i=p;break}w=w.sibling}if(!k)throw Error(l(189))}}if(i.alternate!==u)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?t:r}function x(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=x(t),r!==null)return r;t=t.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),T=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),R=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function F(t){return t===null||typeof t!="object"?null:(t=ae&&t[ae]||t["@@iterator"],typeof t=="function"?t:null)}var ie=Symbol.for("react.client.reference");function ne(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ie?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case N:return"Fragment";case j:return"Profiler";case E:return"StrictMode";case H:return"Suspense";case L:return"SuspenseList";case G:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case T:return t.displayName||"Context";case z:return(t._context.displayName||"Context")+".Consumer";case P:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return r=t.displayName||null,r!==null?r:ne(t.type)||"Memo";case ee:r=t._payload,t=t._init;try{return ne(t(r))}catch{}}return null}var W=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},we=[],_=-1;function D(t){return{current:t}}function Y(t){0>_||(t.current=we[_],we[_]=null,_--)}function A(t,r){_++,we[_]=t.current,t.current=r}var se=D(null),me=D(null),ge=D(null),Me=D(null);function tt(t,r){switch(A(ge,r),A(me,t),A(se,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?t0(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=t0(r),t=n0(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Y(se),A(se,t)}function Ke(){Y(se),Y(me),Y(ge)}function rn(t){t.memoizedState!==null&&A(Me,t);var r=se.current,i=n0(r,t.type);r!==i&&(A(me,t),A(se,i))}function Un(t){me.current===t&&(Y(se),Y(me)),Me.current===t&&(Y(Me),si._currentValue=ce)}var xl,es;function Hn(t){if(xl===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);xl=r&&r[1]||"",es=-1<i.stack.indexOf(`
|
|
43
43
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+xl+t+es}var pr=!1;function mr(t,r){if(!t||pr)return"";pr=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(K){var $=K}Reflect.construct(t,[],J)}else{try{J.call()}catch(K){$=K}t.call(J.prototype)}}else{try{throw Error()}catch(K){$=K}(J=t())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(K){if(K&&$&&typeof K.stack=="string")return[K.stack,$.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),k=m[0],w=m[1];if(k&&w){var
|
|
44
|
+
`+xl+t+es}var pr=!1;function mr(t,r){if(!t||pr)return"";pr=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(K){var $=K}Reflect.construct(t,[],J)}else{try{J.call()}catch(K){$=K}t.call(J.prototype)}}else{try{throw Error()}catch(K){$=K}(J=t())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(K){if(K&&$&&typeof K.stack=="string")return[K.stack,$.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),k=m[0],w=m[1];if(k&&w){var M=k.split(`
|
|
45
45
|
`),I=w.split(`
|
|
46
|
-
`);for(p=u=0;u<
|
|
47
|
-
`+
|
|
46
|
+
`);for(p=u=0;u<M.length&&!M[u].includes("DetermineComponentFrameRoot");)u++;for(;p<I.length&&!I[p].includes("DetermineComponentFrameRoot");)p++;if(u===M.length||p===I.length)for(u=M.length-1,p=I.length-1;1<=u&&0<=p&&M[u]!==I[p];)p--;for(;1<=u&&0<=p;u--,p--)if(M[u]!==I[p]){if(u!==1||p!==1)do if(u--,p--,0>p||M[u]!==I[p]){var Q=`
|
|
47
|
+
`+M[u].replace(" at new "," at ");return t.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",t.displayName)),Q}while(1<=u&&0<=p);break}}}finally{pr=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?Hn(i):""}function ts(t,r){switch(t.tag){case 26:case 27:case 5:return Hn(t.type);case 16:return Hn("Lazy");case 13:return t.child!==r&&r!==null?Hn("Suspense Fallback"):Hn("Suspense");case 19:return Hn("SuspenseList");case 0:case 15:return mr(t.type,!1);case 11:return mr(t.type.render,!1);case 1:return mr(t.type,!0);case 31:return Hn("Activity");default:return""}}function ns(t){try{var r="",i=null;do r+=ts(t,i),i=t,t=t.return;while(t);return r}catch(u){return`
|
|
48
48
|
Error generating stack: `+u.message+`
|
|
49
|
-
`+u.stack}}var yr=Object.prototype.hasOwnProperty,xr=e.unstable_scheduleCallback,bl=e.unstable_cancelCallback,mu=e.unstable_shouldYield,yu=e.unstable_requestPaint,Dt=e.unstable_now,xu=e.unstable_getCurrentPriorityLevel,X=e.unstable_ImmediatePriority,le=e.unstable_UserBlockingPriority,ve=e.unstable_NormalPriority,Ee=e.unstable_LowPriority,qe=e.unstable_IdlePriority,Yt=e.log,Bn=e.unstable_setDisableYieldValue,Mt=null,gt=null;function Lt(t){if(typeof Yt=="function"&&Bn(t),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Mt,t)}catch{}}var Ge=Math.clz32?Math.clz32:cv,ca=Math.log,bn=Math.LN2;function cv(t){return t>>>=0,t===0?32:31-(ca(t)/bn|0)|0}var as=256,rs=262144,ls=4194304;function Ia(t){var r=t&42;if(r!==0)return r;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function is(t,r,i){var u=t.pendingLanes;if(u===0)return 0;var p=0,m=t.suspendedLanes,k=t.pingedLanes;t=t.warmLanes;var w=u&134217727;return w!==0?(u=w&~m,u!==0?p=Ia(u):(k&=w,k!==0?p=Ia(k):i||(i=w&~t,i!==0&&(p=Ia(i))))):(w=u&~m,w!==0?p=Ia(w):k!==0?p=Ia(k):i||(i=u&~t,i!==0&&(p=Ia(i)))),p===0?0:r!==0&&r!==p&&(r&m)===0&&(m=p&-p,i=r&-r,m>=i||m===32&&(i&4194048)!==0)?r:p}function vl(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function dv(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 zh(){var t=ls;return ls<<=1,(ls&62914560)===0&&(ls=4194304),t}function bu(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function kl(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function fv(t,r,i,u,p,m){var k=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var w=t.entanglements,_=t.expirationTimes,I=t.hiddenUpdates;for(i=k&~i;0<i;){var Q=31-Ge(i),J=1<<Q;w[Q]=0,_[Q]=-1;var $=I[Q];if($!==null)for(I[Q]=null,Q=0;Q<$.length;Q++){var K=$[Q];K!==null&&(K.lane&=-536870913)}i&=~J}u!==0&&Lh(t,u,0),m!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=m&~(k&~r))}function Lh(t,r,i){t.pendingLanes|=r,t.suspendedLanes&=~r;var u=31-Ge(r);t.entangledLanes|=r,t.entanglements[u]=t.entanglements[u]|1073741824|i&261930}function Uh(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var u=31-Ge(i),p=1<<u;p&r|t[u]&r&&(t[u]|=r),i&=~p}}function Hh(t,r){var i=r&-r;return i=(i&42)!==0?1:vu(i),(i&(t.suspendedLanes|r))!==0?0:i}function vu(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ku(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Bh(){var t=te.p;return t!==0?t:(t=window.event,t===void 0?32:j0(t.type))}function qh(t,r){var i=te.p;try{return te.p=t,r()}finally{te.p=i}}var da=Math.random().toString(36).slice(2),St="__reactFiber$"+da,Ut="__reactProps$"+da,br="__reactContainer$"+da,Su="__reactEvents$"+da,hv="__reactListeners$"+da,gv="__reactHandles$"+da,Ih="__reactResources$"+da,Sl="__reactMarker$"+da;function wu(t){delete t[St],delete t[Ut],delete t[Su],delete t[hv],delete t[gv]}function vr(t){var r=t[St];if(r)return r;for(var i=t.parentNode;i;){if(r=i[br]||i[St]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=o0(t);t!==null;){if(i=t[St])return i;t=o0(t)}return r}t=i,i=t.parentNode}return null}function kr(t){if(t=t[St]||t[br]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function wl(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(l(33))}function Sr(t){var r=t[Ih];return r||(r=t[Ih]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function yt(t){t[Sl]=!0}var $h=new Set,Fh={};function $a(t,r){wr(t,r),wr(t+"Capture",r)}function wr(t,r){for(Fh[t]=r,t=0;t<r.length;t++)$h.add(r[t])}var pv=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]*$"),Kh={},Ph={};function mv(t){return yr.call(Ph,t)?!0:yr.call(Kh,t)?!1:pv.test(t)?Ph[t]=!0:(Kh[t]=!0,!1)}function ss(t,r,i){if(mv(r))if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+i)}}function os(t,r,i){if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+i)}}function qn(t,r,i,u){if(u===null)t.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(r,i,""+u)}}function ln(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Vh(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function yv(t,r,i){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,m=u.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(k){i=""+k,m.call(this,k)}}),Object.defineProperty(t,r,{enumerable:u.enumerable}),{getValue:function(){return i},setValue:function(k){i=""+k},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function ju(t){if(!t._valueTracker){var r=Vh(t)?"checked":"value";t._valueTracker=yv(t,r,""+t[r])}}function Yh(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),u="";return t&&(u=Vh(t)?t.checked?"true":"false":t.value),t=u,t!==i?(r.setValue(t),!0):!1}function us(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var xv=/[\n"\\]/g;function sn(t){return t.replace(xv,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Cu(t,r,i,u,p,m,k,w){t.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.type=k:t.removeAttribute("type"),r!=null?k==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+ln(r)):t.value!==""+ln(r)&&(t.value=""+ln(r)):k!=="submit"&&k!=="reset"||t.removeAttribute("value"),r!=null?Nu(t,k,ln(r)):i!=null?Nu(t,k,ln(i)):u!=null&&t.removeAttribute("value"),p==null&&m!=null&&(t.defaultChecked=!!m),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.name=""+ln(w):t.removeAttribute("name")}function Gh(t,r,i,u,p,m,k,w){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){ju(t);return}i=i!=null?""+ln(i):"",r=r!=null?""+ln(r):i,w||r===t.value||(t.value=r),t.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=w?t.checked:!!u,t.defaultChecked=!!u,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.name=k),ju(t)}function Nu(t,r,i){r==="number"&&us(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function jr(t,r,i,u){if(t=t.options,r){r={};for(var p=0;p<i.length;p++)r["$"+i[p]]=!0;for(i=0;i<t.length;i++)p=r.hasOwnProperty("$"+t[i].value),t[i].selected!==p&&(t[i].selected=p),p&&u&&(t[i].defaultSelected=!0)}else{for(i=""+ln(i),r=null,p=0;p<t.length;p++){if(t[p].value===i){t[p].selected=!0,u&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function Qh(t,r,i){if(r!=null&&(r=""+ln(r),r!==t.value&&(t.value=r),i==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=i!=null?""+ln(i):""}function Xh(t,r,i,u){if(r==null){if(u!=null){if(i!=null)throw Error(l(92));if(W(u)){if(1<u.length)throw Error(l(93));u=u[0]}i=u}i==null&&(i=""),r=i}i=ln(r),t.defaultValue=i,u=t.textContent,u===i&&u!==""&&u!==null&&(t.value=u),ju(t)}function Cr(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var bv=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 Zh(t,r,i){var u=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?u?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":u?t.setProperty(r,i):typeof i!="number"||i===0||bv.has(r)?r==="float"?t.cssFloat=i:t[r]=(""+i).trim():t[r]=i+"px"}function Jh(t,r,i){if(r!=null&&typeof r!="object")throw Error(l(62));if(t=t.style,i!=null){for(var u in i)!i.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var p in r)u=r[p],r.hasOwnProperty(p)&&i[p]!==u&&Zh(t,p,u)}else for(var m in r)r.hasOwnProperty(m)&&Zh(t,m,r[m])}function Eu(t){if(t.indexOf("-")===-1)return!1;switch(t){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 vv=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"]]),kv=/^[\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 cs(t){return kv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function In(){}var Au=null;function Tu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Nr=null,Er=null;function Wh(t){var r=kr(t);if(r&&(t=r.stateNode)){var i=t[Ut]||null;e:switch(t=r.stateNode,r.type){case"input":if(Cu(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+sn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var u=i[r];if(u!==t&&u.form===t.form){var p=u[Ut]||null;if(!p)throw Error(l(90));Cu(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<i.length;r++)u=i[r],u.form===t.form&&Yh(u)}break e;case"textarea":Qh(t,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&jr(t,!!i.multiple,r,!1)}}}var _u=!1;function eg(t,r,i){if(_u)return t(r,i);_u=!0;try{var u=t(r);return u}finally{if(_u=!1,(Nr!==null||Er!==null)&&(Zs(),Nr&&(r=Nr,t=Er,Er=Nr=null,Wh(r),t)))for(r=0;r<t.length;r++)Wh(t[r])}}function jl(t,r){var i=t.stateNode;if(i===null)return null;var u=i[Ut]||null;if(u===null)return null;i=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(l(231,r,typeof i));return i}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Du=!1;if($n)try{var Cl={};Object.defineProperty(Cl,"passive",{get:function(){Du=!0}}),window.addEventListener("test",Cl,Cl),window.removeEventListener("test",Cl,Cl)}catch{Du=!1}var fa=null,Mu=null,ds=null;function tg(){if(ds)return ds;var t,r=Mu,i=r.length,u,p="value"in fa?fa.value:fa.textContent,m=p.length;for(t=0;t<i&&r[t]===p[t];t++);var k=i-t;for(u=1;u<=k&&r[i-u]===p[m-u];u++);return ds=p.slice(t,1<u?1-u:void 0)}function fs(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function hs(){return!0}function ng(){return!1}function Ht(t){function r(i,u,p,m,k){this._reactName=i,this._targetInst=p,this.type=u,this.nativeEvent=m,this.target=k,this.currentTarget=null;for(var w in t)t.hasOwnProperty(w)&&(i=t[w],this[w]=i?i(m):m[w]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?hs:ng,this.isPropagationStopped=ng,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=hs)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=hs)},persist:function(){},isPersistent:hs}),r}var Fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gs=Ht(Fa),Nl=y({},Fa,{view:0,detail:0}),Sv=Ht(Nl),Ru,Ou,El,ps=y({},Nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==El&&(El&&t.type==="mousemove"?(Ru=t.screenX-El.screenX,Ou=t.screenY-El.screenY):Ou=Ru=0,El=t),Ru)},movementY:function(t){return"movementY"in t?t.movementY:Ou}}),ag=Ht(ps),wv=y({},ps,{dataTransfer:0}),jv=Ht(wv),Cv=y({},Nl,{relatedTarget:0}),zu=Ht(Cv),Nv=y({},Fa,{animationName:0,elapsedTime:0,pseudoElement:0}),Ev=Ht(Nv),Av=y({},Fa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Tv=Ht(Av),_v=y({},Fa,{data:0}),rg=Ht(_v),Dv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mv={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"},Rv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ov(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=Rv[t])?!!r[t]:!1}function Lu(){return Ov}var zv=y({},Nl,{key:function(t){if(t.key){var r=Dv[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=fs(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Mv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lu,charCode:function(t){return t.type==="keypress"?fs(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?fs(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Lv=Ht(zv),Uv=y({},ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lg=Ht(Uv),Hv=y({},Nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lu}),Bv=Ht(Hv),qv=y({},Fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Iv=Ht(qv),$v=y({},ps,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Fv=Ht($v),Kv=y({},Fa,{newState:0,oldState:0}),Pv=Ht(Kv),Vv=[9,13,27,32],Uu=$n&&"CompositionEvent"in window,Al=null;$n&&"documentMode"in document&&(Al=document.documentMode);var Yv=$n&&"TextEvent"in window&&!Al,ig=$n&&(!Uu||Al&&8<Al&&11>=Al),sg=" ",og=!1;function ug(t,r){switch(t){case"keyup":return Vv.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ar=!1;function Gv(t,r){switch(t){case"compositionend":return cg(r);case"keypress":return r.which!==32?null:(og=!0,sg);case"textInput":return t=r.data,t===sg&&og?null:t;default:return null}}function Qv(t,r){if(Ar)return t==="compositionend"||!Uu&&ug(t,r)?(t=tg(),ds=Mu=fa=null,Ar=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return ig&&r.locale!=="ko"?null:r.data;default:return null}}var Xv={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 dg(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!Xv[t.type]:r==="textarea"}function fg(t,r,i,u){Nr?Er?Er.push(u):Er=[u]:Nr=u,r=ro(r,"onChange"),0<r.length&&(i=new gs("onChange","change",null,i,u),t.push({event:i,listeners:r}))}var Tl=null,_l=null;function Zv(t){Gm(t,0)}function ms(t){var r=wl(t);if(Yh(r))return t}function hg(t,r){if(t==="change")return r}var gg=!1;if($n){var Hu;if($n){var Bu="oninput"in document;if(!Bu){var pg=document.createElement("div");pg.setAttribute("oninput","return;"),Bu=typeof pg.oninput=="function"}Hu=Bu}else Hu=!1;gg=Hu&&(!document.documentMode||9<document.documentMode)}function mg(){Tl&&(Tl.detachEvent("onpropertychange",yg),_l=Tl=null)}function yg(t){if(t.propertyName==="value"&&ms(_l)){var r=[];fg(r,_l,t,Tu(t)),eg(Zv,r)}}function Jv(t,r,i){t==="focusin"?(mg(),Tl=r,_l=i,Tl.attachEvent("onpropertychange",yg)):t==="focusout"&&mg()}function Wv(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ms(_l)}function ek(t,r){if(t==="click")return ms(r)}function tk(t,r){if(t==="input"||t==="change")return ms(r)}function nk(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Gt=typeof Object.is=="function"?Object.is:nk;function Dl(t,r){if(Gt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;for(u=0;u<i.length;u++){var p=i[u];if(!yr.call(r,p)||!Gt(t[p],r[p]))return!1}return!0}function xg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function bg(t,r){var i=xg(t);t=0;for(var u;i;){if(i.nodeType===3){if(u=t+i.textContent.length,t<=r&&u>=r)return{node:i,offset:r-t};t=u}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=xg(i)}}function vg(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?vg(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function kg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=us(t.document);r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=us(t.document)}return r}function qu(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var ak=$n&&"documentMode"in document&&11>=document.documentMode,Tr=null,Iu=null,Ml=null,$u=!1;function Sg(t,r,i){var u=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;$u||Tr==null||Tr!==us(u)||(u=Tr,"selectionStart"in u&&qu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ml&&Dl(Ml,u)||(Ml=u,u=ro(Iu,"onSelect"),0<u.length&&(r=new gs("onSelect","select",null,r,i),t.push({event:r,listeners:u}),r.target=Tr)))}function Ka(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var _r={animationend:Ka("Animation","AnimationEnd"),animationiteration:Ka("Animation","AnimationIteration"),animationstart:Ka("Animation","AnimationStart"),transitionrun:Ka("Transition","TransitionRun"),transitionstart:Ka("Transition","TransitionStart"),transitioncancel:Ka("Transition","TransitionCancel"),transitionend:Ka("Transition","TransitionEnd")},Fu={},wg={};$n&&(wg=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);function Pa(t){if(Fu[t])return Fu[t];if(!_r[t])return t;var r=_r[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in wg)return Fu[t]=r[i];return t}var jg=Pa("animationend"),Cg=Pa("animationiteration"),Ng=Pa("animationstart"),rk=Pa("transitionrun"),lk=Pa("transitionstart"),ik=Pa("transitioncancel"),Eg=Pa("transitionend"),Ag=new Map,Ku="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(" ");Ku.push("scrollEnd");function vn(t,r){Ag.set(t,r),$a(r,[t])}var ys=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},on=[],Dr=0,Pu=0;function xs(){for(var t=Dr,r=Pu=Dr=0;r<t;){var i=on[r];on[r++]=null;var u=on[r];on[r++]=null;var p=on[r];on[r++]=null;var m=on[r];if(on[r++]=null,u!==null&&p!==null){var k=u.pending;k===null?p.next=p:(p.next=k.next,k.next=p),u.pending=p}m!==0&&Tg(i,p,m)}}function bs(t,r,i,u){on[Dr++]=t,on[Dr++]=r,on[Dr++]=i,on[Dr++]=u,Pu|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function Vu(t,r,i,u){return bs(t,r,i,u),vs(t)}function Va(t,r){return bs(t,null,null,r),vs(t)}function Tg(t,r,i){t.lanes|=i;var u=t.alternate;u!==null&&(u.lanes|=i);for(var p=!1,m=t.return;m!==null;)m.childLanes|=i,u=m.alternate,u!==null&&(u.childLanes|=i),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(p=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,p&&r!==null&&(p=31-Ge(i),t=m.hiddenUpdates,u=t[p],u===null?t[p]=[r]:u.push(r),r.lane=i|536870912),m):null}function vs(t){if(50<ei)throw ei=0,td=null,Error(l(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Mr={};function sk(t,r,i,u){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(t,r,i,u){return new sk(t,r,i,u)}function Yu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Fn(t,r){var i=t.alternate;return i===null?(i=Qt(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function _g(t,r){t.flags&=65011714;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,r=i.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function ks(t,r,i,u,p,m){var k=0;if(u=t,typeof t=="function")Yu(t)&&(k=1);else if(typeof t=="string")k=fS(t,i,se.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case G:return t=Qt(31,i,r,p),t.elementType=G,t.lanes=m,t;case C:return Ya(i.children,p,m,r);case E:k=8,p|=24;break;case j:return t=Qt(12,i,r,p|2),t.elementType=j,t.lanes=m,t;case H:return t=Qt(13,i,r,p),t.elementType=H,t.lanes=m,t;case L:return t=Qt(19,i,r,p),t.elementType=L,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case D:k=10;break e;case z:k=9;break e;case Y:k=11;break e;case P:k=14;break e;case ee:k=16,u=null;break e}k=29,i=Error(l(130,t===null?"null":typeof t,"")),u=null}return r=Qt(k,i,r,p),r.elementType=t,r.type=u,r.lanes=m,r}function Ya(t,r,i,u){return t=Qt(7,t,u,r),t.lanes=i,t}function Gu(t,r,i){return t=Qt(6,t,null,r),t.lanes=i,t}function Dg(t){var r=Qt(18,null,null,0);return r.stateNode=t,r}function Qu(t,r,i){return r=Qt(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Mg=new WeakMap;function un(t,r){if(typeof t=="object"&&t!==null){var i=Mg.get(t);return i!==void 0?i:(r={value:t,source:r,stack:ns(r)},Mg.set(t,r),r)}return{value:t,source:r,stack:ns(r)}}var Rr=[],Or=0,Ss=null,Rl=0,cn=[],dn=0,ha=null,En=1,An="";function Kn(t,r){Rr[Or++]=Rl,Rr[Or++]=Ss,Ss=t,Rl=r}function Rg(t,r,i){cn[dn++]=En,cn[dn++]=An,cn[dn++]=ha,ha=t;var u=En;t=An;var p=32-Ge(u)-1;u&=~(1<<p),i+=1;var m=32-Ge(r)+p;if(30<m){var k=p-p%5;m=(u&(1<<k)-1).toString(32),u>>=k,p-=k,En=1<<32-Ge(r)+p|i<<p|u,An=m+t}else En=1<<m|i<<p|u,An=t}function Xu(t){t.return!==null&&(Kn(t,1),Rg(t,1,0))}function Zu(t){for(;t===Ss;)Ss=Rr[--Or],Rr[Or]=null,Rl=Rr[--Or],Rr[Or]=null;for(;t===ha;)ha=cn[--dn],cn[dn]=null,An=cn[--dn],cn[dn]=null,En=cn[--dn],cn[dn]=null}function Og(t,r){cn[dn++]=En,cn[dn++]=An,cn[dn++]=ha,En=r.id,An=r.overflow,ha=t}var wt=null,We=null,Oe=!1,ga=null,fn=!1,Ju=Error(l(519));function pa(t){var r=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ol(un(r,t)),Ju}function zg(t){var r=t.stateNode,i=t.type,u=t.memoizedProps;switch(r[St]=t,r[Ut]=u,i){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(i=0;i<ni.length;i++)Te(ni[i],r);break;case"source":Te("error",r);break;case"img":case"image":case"link":Te("error",r),Te("load",r);break;case"details":Te("toggle",r);break;case"input":Te("invalid",r),Gh(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Te("invalid",r);break;case"textarea":Te("invalid",r),Xh(r,u.value,u.defaultValue,u.children)}i=u.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||u.suppressHydrationWarning===!0||Jm(r.textContent,i)?(u.popover!=null&&(Te("beforetoggle",r),Te("toggle",r)),u.onScroll!=null&&Te("scroll",r),u.onScrollEnd!=null&&Te("scrollend",r),u.onClick!=null&&(r.onclick=In),r=!0):r=!1,r||pa(t,!0)}function Lg(t){for(wt=t.return;wt;)switch(wt.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:wt=wt.return}}function zr(t){if(t!==wt)return!1;if(!Oe)return Lg(t),Oe=!0,!1;var r=t.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||md(t.type,t.memoizedProps)),i=!i),i&&We&&pa(t),Lg(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));We=s0(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));We=s0(t)}else r===27?(r=We,Ta(t.type)?(t=kd,kd=null,We=t):We=r):We=wt?gn(t.stateNode.nextSibling):null;return!0}function Ga(){We=wt=null,Oe=!1}function Wu(){var t=ga;return t!==null&&($t===null?$t=t:$t.push.apply($t,t),ga=null),t}function Ol(t){ga===null?ga=[t]:ga.push(t)}var ec=M(null),Qa=null,Pn=null;function ma(t,r,i){A(ec,r._currentValue),r._currentValue=i}function Vn(t){t._currentValue=ec.current,V(ec)}function tc(t,r,i){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===i)break;t=t.return}}function nc(t,r,i,u){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var m=p.dependencies;if(m!==null){var k=p.child;m=m.firstContext;e:for(;m!==null;){var w=m;m=p;for(var _=0;_<r.length;_++)if(w.context===r[_]){m.lanes|=i,w=m.alternate,w!==null&&(w.lanes|=i),tc(m.return,i,t),u||(k=null);break e}m=w.next}}else if(p.tag===18){if(k=p.return,k===null)throw Error(l(341));k.lanes|=i,m=k.alternate,m!==null&&(m.lanes|=i),tc(k,i,t),k=null}else k=p.child;if(k!==null)k.return=p;else for(k=p;k!==null;){if(k===t){k=null;break}if(p=k.sibling,p!==null){p.return=k.return,k=p;break}k=k.return}p=k}}function Lr(t,r,i,u){t=null;for(var p=r,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var k=p.alternate;if(k===null)throw Error(l(387));if(k=k.memoizedProps,k!==null){var w=p.type;Gt(p.pendingProps.value,k.value)||(t!==null?t.push(w):t=[w])}}else if(p===De.current){if(k=p.alternate,k===null)throw Error(l(387));k.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(si):t=[si])}p=p.return}t!==null&&nc(r,t,i,u),r.flags|=262144}function ws(t){for(t=t.firstContext;t!==null;){if(!Gt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Xa(t){Qa=t,Pn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function jt(t){return Ug(Qa,t)}function js(t,r){return Qa===null&&Xa(t),Ug(t,r)}function Ug(t,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},Pn===null){if(t===null)throw Error(l(308));Pn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Pn=Pn.next=r;return i}var ok=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(i,u){t.push(u)}};this.abort=function(){r.aborted=!0,t.forEach(function(i){return i()})}},uk=e.unstable_scheduleCallback,ck=e.unstable_NormalPriority,ot={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ac(){return{controller:new ok,data:new Map,refCount:0}}function zl(t){t.refCount--,t.refCount===0&&uk(ck,function(){t.controller.abort()})}var Ll=null,rc=0,Ur=0,Hr=null;function dk(t,r){if(Ll===null){var i=Ll=[];rc=0,Ur=sd(),Hr={status:"pending",value:void 0,then:function(u){i.push(u)}}}return rc++,r.then(Hg,Hg),r}function Hg(){if(--rc===0&&Ll!==null){Hr!==null&&(Hr.status="fulfilled");var t=Ll;Ll=null,Ur=0,Hr=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function fk(t,r){var i=[],u={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return t.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<i.length;p++)(0,i[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),u}var Bg=B.S;B.S=function(t,r){Sm=Dt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&dk(t,r),Bg!==null&&Bg(t,r)};var Za=M(null);function lc(){var t=Za.current;return t!==null?t:Qe.pooledCache}function Cs(t,r){r===null?A(Za,Za.current):A(Za,r.pool)}function qg(){var t=lc();return t===null?null:{parent:ot._currentValue,pool:t}}var Br=Error(l(460)),ic=Error(l(474)),Ns=Error(l(542)),Es={then:function(){}};function Ig(t){return t=t.status,t==="fulfilled"||t==="rejected"}function $g(t,r,i){switch(i=t[i],i===void 0?t.push(r):i!==r&&(r.then(In,In),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Kg(t),t;default:if(typeof r.status=="string")r.then(In,In);else{if(t=Qe,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=r,t.status="pending",t.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Kg(t),t}throw Wa=r,Br}}function Ja(t){try{var r=t._init;return r(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Wa=i,Br):i}}var Wa=null;function Fg(){if(Wa===null)throw Error(l(459));var t=Wa;return Wa=null,t}function Kg(t){if(t===Br||t===Ns)throw Error(l(483))}var qr=null,Ul=0;function As(t){var r=Ul;return Ul+=1,qr===null&&(qr=[]),$g(qr,t,r)}function Hl(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Ts(t,r){throw r.$$typeof===b?Error(l(525)):(t=Object.prototype.toString.call(r),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Pg(t){function r(U,O){if(t){var q=U.deletions;q===null?(U.deletions=[O],U.flags|=16):q.push(O)}}function i(U,O){if(!t)return null;for(;O!==null;)r(U,O),O=O.sibling;return null}function u(U){for(var O=new Map;U!==null;)U.key!==null?O.set(U.key,U):O.set(U.index,U),U=U.sibling;return O}function p(U,O){return U=Fn(U,O),U.index=0,U.sibling=null,U}function m(U,O,q){return U.index=q,t?(q=U.alternate,q!==null?(q=q.index,q<O?(U.flags|=67108866,O):q):(U.flags|=67108866,O)):(U.flags|=1048576,O)}function k(U){return t&&U.alternate===null&&(U.flags|=67108866),U}function w(U,O,q,Z){return O===null||O.tag!==6?(O=Gu(q,U.mode,Z),O.return=U,O):(O=p(O,q),O.return=U,O)}function _(U,O,q,Z){var pe=q.type;return pe===C?Q(U,O,q.props.children,Z,q.key):O!==null&&(O.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===ee&&Ja(pe)===O.type)?(O=p(O,q.props),Hl(O,q),O.return=U,O):(O=ks(q.type,q.key,q.props,null,U.mode,Z),Hl(O,q),O.return=U,O)}function I(U,O,q,Z){return O===null||O.tag!==4||O.stateNode.containerInfo!==q.containerInfo||O.stateNode.implementation!==q.implementation?(O=Qu(q,U.mode,Z),O.return=U,O):(O=p(O,q.children||[]),O.return=U,O)}function Q(U,O,q,Z,pe){return O===null||O.tag!==7?(O=Ya(q,U.mode,Z,pe),O.return=U,O):(O=p(O,q),O.return=U,O)}function J(U,O,q){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Gu(""+O,U.mode,q),O.return=U,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case v:return q=ks(O.type,O.key,O.props,null,U.mode,q),Hl(q,O),q.return=U,q;case S:return O=Qu(O,U.mode,q),O.return=U,O;case ee:return O=Ja(O),J(U,O,q)}if(W(O)||F(O))return O=Ya(O,U.mode,q,null),O.return=U,O;if(typeof O.then=="function")return J(U,As(O),q);if(O.$$typeof===D)return J(U,js(U,O),q);Ts(U,O)}return null}function $(U,O,q,Z){var pe=O!==null?O.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return pe!==null?null:w(U,O,""+q,Z);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return q.key===pe?_(U,O,q,Z):null;case S:return q.key===pe?I(U,O,q,Z):null;case ee:return q=Ja(q),$(U,O,q,Z)}if(W(q)||F(q))return pe!==null?null:Q(U,O,q,Z,null);if(typeof q.then=="function")return $(U,O,As(q),Z);if(q.$$typeof===D)return $(U,O,js(U,q),Z);Ts(U,q)}return null}function K(U,O,q,Z,pe){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return U=U.get(q)||null,w(O,U,""+Z,pe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return U=U.get(Z.key===null?q:Z.key)||null,_(O,U,Z,pe);case S:return U=U.get(Z.key===null?q:Z.key)||null,I(O,U,Z,pe);case ee:return Z=Ja(Z),K(U,O,q,Z,pe)}if(W(Z)||F(Z))return U=U.get(q)||null,Q(O,U,Z,pe,null);if(typeof Z.then=="function")return K(U,O,q,As(Z),pe);if(Z.$$typeof===D)return K(U,O,q,js(O,Z),pe);Ts(O,Z)}return null}function de(U,O,q,Z){for(var pe=null,Ue=null,fe=O,Ce=O=0,Re=null;fe!==null&&Ce<q.length;Ce++){fe.index>Ce?(Re=fe,fe=null):Re=fe.sibling;var He=$(U,fe,q[Ce],Z);if(He===null){fe===null&&(fe=Re);break}t&&fe&&He.alternate===null&&r(U,fe),O=m(He,O,Ce),Ue===null?pe=He:Ue.sibling=He,Ue=He,fe=Re}if(Ce===q.length)return i(U,fe),Oe&&Kn(U,Ce),pe;if(fe===null){for(;Ce<q.length;Ce++)fe=J(U,q[Ce],Z),fe!==null&&(O=m(fe,O,Ce),Ue===null?pe=fe:Ue.sibling=fe,Ue=fe);return Oe&&Kn(U,Ce),pe}for(fe=u(fe);Ce<q.length;Ce++)Re=K(fe,U,Ce,q[Ce],Z),Re!==null&&(t&&Re.alternate!==null&&fe.delete(Re.key===null?Ce:Re.key),O=m(Re,O,Ce),Ue===null?pe=Re:Ue.sibling=Re,Ue=Re);return t&&fe.forEach(function(Oa){return r(U,Oa)}),Oe&&Kn(U,Ce),pe}function be(U,O,q,Z){if(q==null)throw Error(l(151));for(var pe=null,Ue=null,fe=O,Ce=O=0,Re=null,He=q.next();fe!==null&&!He.done;Ce++,He=q.next()){fe.index>Ce?(Re=fe,fe=null):Re=fe.sibling;var Oa=$(U,fe,He.value,Z);if(Oa===null){fe===null&&(fe=Re);break}t&&fe&&Oa.alternate===null&&r(U,fe),O=m(Oa,O,Ce),Ue===null?pe=Oa:Ue.sibling=Oa,Ue=Oa,fe=Re}if(He.done)return i(U,fe),Oe&&Kn(U,Ce),pe;if(fe===null){for(;!He.done;Ce++,He=q.next())He=J(U,He.value,Z),He!==null&&(O=m(He,O,Ce),Ue===null?pe=He:Ue.sibling=He,Ue=He);return Oe&&Kn(U,Ce),pe}for(fe=u(fe);!He.done;Ce++,He=q.next())He=K(fe,U,Ce,He.value,Z),He!==null&&(t&&He.alternate!==null&&fe.delete(He.key===null?Ce:He.key),O=m(He,O,Ce),Ue===null?pe=He:Ue.sibling=He,Ue=He);return t&&fe.forEach(function(wS){return r(U,wS)}),Oe&&Kn(U,Ce),pe}function Ye(U,O,q,Z){if(typeof q=="object"&&q!==null&&q.type===C&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case v:e:{for(var pe=q.key;O!==null;){if(O.key===pe){if(pe=q.type,pe===C){if(O.tag===7){i(U,O.sibling),Z=p(O,q.props.children),Z.return=U,U=Z;break e}}else if(O.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===ee&&Ja(pe)===O.type){i(U,O.sibling),Z=p(O,q.props),Hl(Z,q),Z.return=U,U=Z;break e}i(U,O);break}else r(U,O);O=O.sibling}q.type===C?(Z=Ya(q.props.children,U.mode,Z,q.key),Z.return=U,U=Z):(Z=ks(q.type,q.key,q.props,null,U.mode,Z),Hl(Z,q),Z.return=U,U=Z)}return k(U);case S:e:{for(pe=q.key;O!==null;){if(O.key===pe)if(O.tag===4&&O.stateNode.containerInfo===q.containerInfo&&O.stateNode.implementation===q.implementation){i(U,O.sibling),Z=p(O,q.children||[]),Z.return=U,U=Z;break e}else{i(U,O);break}else r(U,O);O=O.sibling}Z=Qu(q,U.mode,Z),Z.return=U,U=Z}return k(U);case ee:return q=Ja(q),Ye(U,O,q,Z)}if(W(q))return de(U,O,q,Z);if(F(q)){if(pe=F(q),typeof pe!="function")throw Error(l(150));return q=pe.call(q),be(U,O,q,Z)}if(typeof q.then=="function")return Ye(U,O,As(q),Z);if(q.$$typeof===D)return Ye(U,O,js(U,q),Z);Ts(U,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,O!==null&&O.tag===6?(i(U,O.sibling),Z=p(O,q),Z.return=U,U=Z):(i(U,O),Z=Gu(q,U.mode,Z),Z.return=U,U=Z),k(U)):i(U,O)}return function(U,O,q,Z){try{Ul=0;var pe=Ye(U,O,q,Z);return qr=null,pe}catch(fe){if(fe===Br||fe===Ns)throw fe;var Ue=Qt(29,fe,null,U.mode);return Ue.lanes=Z,Ue.return=U,Ue}finally{}}}var er=Pg(!0),Vg=Pg(!1),ya=!1;function sc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oc(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function xa(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ba(t,r,i){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Be&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=vs(t),Tg(t,null,i),r}return bs(t,u,r,i),vs(t)}function Bl(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var u=r.lanes;u&=t.pendingLanes,i|=u,r.lanes=i,Uh(t,i)}}function uc(t,r){var i=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,i===u)){var p=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var k={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?p=m=k:m=m.next=k,i=i.next}while(i!==null);m===null?p=m=r:m=m.next=r}else p=m=r;i={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}var cc=!1;function ql(){if(cc){var t=Hr;if(t!==null)throw t}}function Il(t,r,i,u){cc=!1;var p=t.updateQueue;ya=!1;var m=p.firstBaseUpdate,k=p.lastBaseUpdate,w=p.shared.pending;if(w!==null){p.shared.pending=null;var _=w,I=_.next;_.next=null,k===null?m=I:k.next=I,k=_;var Q=t.alternate;Q!==null&&(Q=Q.updateQueue,w=Q.lastBaseUpdate,w!==k&&(w===null?Q.firstBaseUpdate=I:w.next=I,Q.lastBaseUpdate=_))}if(m!==null){var J=p.baseState;k=0,Q=I=_=null,w=m;do{var $=w.lane&-536870913,K=$!==w.lane;if(K?(Me&$)===$:(u&$)===$){$!==0&&$===Ur&&(cc=!0),Q!==null&&(Q=Q.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var de=t,be=w;$=r;var Ye=i;switch(be.tag){case 1:if(de=be.payload,typeof de=="function"){J=de.call(Ye,J,$);break e}J=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=be.payload,$=typeof de=="function"?de.call(Ye,J,$):de,$==null)break e;J=y({},J,$);break e;case 2:ya=!0}}$=w.callback,$!==null&&(t.flags|=64,K&&(t.flags|=8192),K=p.callbacks,K===null?p.callbacks=[$]:K.push($))}else K={lane:$,tag:w.tag,payload:w.payload,callback:w.callback,next:null},Q===null?(I=Q=K,_=J):Q=Q.next=K,k|=$;if(w=w.next,w===null){if(w=p.shared.pending,w===null)break;K=w,w=K.next,K.next=null,p.lastBaseUpdate=K,p.shared.pending=null}}while(!0);Q===null&&(_=J),p.baseState=_,p.firstBaseUpdate=I,p.lastBaseUpdate=Q,m===null&&(p.shared.lanes=0),ja|=k,t.lanes=k,t.memoizedState=J}}function Yg(t,r){if(typeof t!="function")throw Error(l(191,t));t.call(r)}function Gg(t,r){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)Yg(i[t],r)}var Ir=M(null),_s=M(0);function Qg(t,r){t=ta,A(_s,t),A(Ir,r),ta=t|r.baseLanes}function dc(){A(_s,ta),A(Ir,Ir.current)}function fc(){ta=_s.current,V(Ir),V(_s)}var Xt=M(null),hn=null;function va(t){var r=t.alternate;A(it,it.current&1),A(Xt,t),hn===null&&(r===null||Ir.current!==null||r.memoizedState!==null)&&(hn=t)}function hc(t){A(it,it.current),A(Xt,t),hn===null&&(hn=t)}function Xg(t){t.tag===22?(A(it,it.current),A(Xt,t),hn===null&&(hn=t)):ka()}function ka(){A(it,it.current),A(Xt,Xt.current)}function Zt(t){V(Xt),hn===t&&(hn=null),V(it)}var it=M(0);function Ds(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||bd(i)||vd(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Yn=0,je=null,Pe=null,ut=null,Ms=!1,$r=!1,tr=!1,Rs=0,$l=0,Fr=null,hk=0;function rt(){throw Error(l(321))}function gc(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!Gt(t[i],r[i]))return!1;return!0}function pc(t,r,i,u,p,m){return Yn=m,je=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=t===null||t.memoizedState===null?Rp:_c,tr=!1,m=i(u,p),tr=!1,$r&&(m=Jg(r,i,u,p)),Zg(t),m}function Zg(t){B.H=Pl;var r=Pe!==null&&Pe.next!==null;if(Yn=0,ut=Pe=je=null,Ms=!1,$l=0,Fr=null,r)throw Error(l(300));t===null||ct||(t=t.dependencies,t!==null&&ws(t)&&(ct=!0))}function Jg(t,r,i,u){je=t;var p=0;do{if($r&&(Fr=null),$l=0,$r=!1,25<=p)throw Error(l(301));if(p+=1,ut=Pe=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}B.H=Op,m=r(i,u)}while($r);return m}function gk(){var t=B.H,r=t.useState()[0];return r=typeof r.then=="function"?Fl(r):r,t=t.useState()[0],(Pe!==null?Pe.memoizedState:null)!==t&&(je.flags|=1024),r}function mc(){var t=Rs!==0;return Rs=0,t}function yc(t,r,i){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~i}function xc(t){if(Ms){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Ms=!1}Yn=0,ut=Pe=je=null,$r=!1,$l=Rs=0,Fr=null}function Rt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?je.memoizedState=ut=t:ut=ut.next=t,ut}function st(){if(Pe===null){var t=je.alternate;t=t!==null?t.memoizedState:null}else t=Pe.next;var r=ut===null?je.memoizedState:ut.next;if(r!==null)ut=r,Pe=t;else{if(t===null)throw je.alternate===null?Error(l(467)):Error(l(310));Pe=t,t={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},ut===null?je.memoizedState=ut=t:ut=ut.next=t}return ut}function Os(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fl(t){var r=$l;return $l+=1,Fr===null&&(Fr=[]),t=$g(Fr,t,r),r=je,(ut===null?r.memoizedState:ut.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?Rp:_c),t}function zs(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Fl(t);if(t.$$typeof===D)return jt(t)}throw Error(l(438,String(t)))}function bc(t){var r=null,i=je.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var u=je.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Os(),je.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(t),u=0;u<t;u++)i[u]=R;return r.index++,i}function Gn(t,r){return typeof r=="function"?r(t):r}function Ls(t){var r=st();return vc(r,Pe,t)}function vc(t,r,i){var u=t.queue;if(u===null)throw Error(l(311));u.lastRenderedReducer=i;var p=t.baseQueue,m=u.pending;if(m!==null){if(p!==null){var k=p.next;p.next=m.next,m.next=k}r.baseQueue=p=m,u.pending=null}if(m=t.baseState,p===null)t.memoizedState=m;else{r=p.next;var w=k=null,_=null,I=r,Q=!1;do{var J=I.lane&-536870913;if(J!==I.lane?(Me&J)===J:(Yn&J)===J){var $=I.revertLane;if($===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),J===Ur&&(Q=!0);else if((Yn&$)===$){I=I.next,$===Ur&&(Q=!0);continue}else J={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},_===null?(w=_=J,k=m):_=_.next=J,je.lanes|=$,ja|=$;J=I.action,tr&&i(m,J),m=I.hasEagerState?I.eagerState:i(m,J)}else $={lane:J,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},_===null?(w=_=$,k=m):_=_.next=$,je.lanes|=J,ja|=J;I=I.next}while(I!==null&&I!==r);if(_===null?k=m:_.next=w,!Gt(m,t.memoizedState)&&(ct=!0,Q&&(i=Hr,i!==null)))throw i;t.memoizedState=m,t.baseState=k,t.baseQueue=_,u.lastRenderedState=m}return p===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function kc(t){var r=st(),i=r.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=t;var u=i.dispatch,p=i.pending,m=r.memoizedState;if(p!==null){i.pending=null;var k=p=p.next;do m=t(m,k.action),k=k.next;while(k!==p);Gt(m,r.memoizedState)||(ct=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),i.lastRenderedState=m}return[m,u]}function Wg(t,r,i){var u=je,p=st(),m=Oe;if(m){if(i===void 0)throw Error(l(407));i=i()}else i=r();var k=!Gt((Pe||p).memoizedState,i);if(k&&(p.memoizedState=i,ct=!0),p=p.queue,jc(np.bind(null,u,p,t),[t]),p.getSnapshot!==r||k||ut!==null&&ut.memoizedState.tag&1){if(u.flags|=2048,Kr(9,{destroy:void 0},tp.bind(null,u,p,i,r),null),Qe===null)throw Error(l(349));m||(Yn&127)!==0||ep(u,r,i)}return i}function ep(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=je.updateQueue,r===null?(r=Os(),je.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function tp(t,r,i,u){r.value=i,r.getSnapshot=u,ap(r)&&rp(t)}function np(t,r,i){return i(function(){ap(r)&&rp(t)})}function ap(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!Gt(t,i)}catch{return!0}}function rp(t){var r=Va(t,2);r!==null&&Ft(r,t,2)}function Sc(t){var r=Rt();if(typeof t=="function"){var i=t;if(t=i(),tr){Lt(!0);try{i()}finally{Lt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:t},r}function lp(t,r,i,u){return t.baseState=i,vc(t,Pe,typeof u=="function"?u:Gn)}function pk(t,r,i,u,p){if(Bs(t))throw Error(l(485));if(t=r.action,t!==null){var m={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){m.listeners.push(k)}};B.T!==null?i(!0):m.isTransition=!1,u(m),i=r.pending,i===null?(m.next=r.pending=m,ip(r,m)):(m.next=i.next,r.pending=i.next=m)}}function ip(t,r){var i=r.action,u=r.payload,p=t.state;if(r.isTransition){var m=B.T,k={};B.T=k;try{var w=i(p,u),_=B.S;_!==null&&_(k,w),sp(t,r,w)}catch(I){wc(t,r,I)}finally{m!==null&&k.types!==null&&(m.types=k.types),B.T=m}}else try{m=i(p,u),sp(t,r,m)}catch(I){wc(t,r,I)}}function sp(t,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(u){op(t,r,u)},function(u){return wc(t,r,u)}):op(t,r,i)}function op(t,r,i){r.status="fulfilled",r.value=i,up(r),t.state=i,r=t.pending,r!==null&&(i=r.next,i===r?t.pending=null:(i=i.next,r.next=i,ip(t,i)))}function wc(t,r,i){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=i,up(r),r=r.next;while(r!==u)}t.action=null}function up(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function cp(t,r){return r}function dp(t,r){if(Oe){var i=Qe.formState;if(i!==null){e:{var u=je;if(Oe){if(We){t:{for(var p=We,m=fn;p.nodeType!==8;){if(!m){p=null;break t}if(p=gn(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m==="F!"||m==="F"?p:null}if(p){We=gn(p.nextSibling),u=p.data==="F!";break e}}pa(u)}u=!1}u&&(r=i[0])}}return i=Rt(),i.memoizedState=i.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cp,lastRenderedState:r},i.queue=u,i=_p.bind(null,je,u),u.dispatch=i,u=Sc(!1),m=Tc.bind(null,je,!1,u.queue),u=Rt(),p={state:r,dispatch:null,action:t,pending:null},u.queue=p,i=pk.bind(null,je,p,m,i),p.dispatch=i,u.memoizedState=t,[r,i,!1]}function fp(t){var r=st();return hp(r,Pe,t)}function hp(t,r,i){if(r=vc(t,r,cp)[0],t=Ls(Gn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Fl(r)}catch(k){throw k===Br?Ns:k}else u=r;r=st();var p=r.queue,m=p.dispatch;return i!==r.memoizedState&&(je.flags|=2048,Kr(9,{destroy:void 0},mk.bind(null,p,i),null)),[u,m,t]}function mk(t,r){t.action=r}function gp(t){var r=st(),i=Pe;if(i!==null)return hp(r,i,t);st(),r=r.memoizedState,i=st();var u=i.queue.dispatch;return i.memoizedState=t,[r,u,!1]}function Kr(t,r,i,u){return t={tag:t,create:i,deps:u,inst:r,next:null},r=je.updateQueue,r===null&&(r=Os(),je.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=t.next=t:(u=i.next,i.next=t,t.next=u,r.lastEffect=t),t}function pp(){return st().memoizedState}function Us(t,r,i,u){var p=Rt();je.flags|=t,p.memoizedState=Kr(1|r,{destroy:void 0},i,u===void 0?null:u)}function Hs(t,r,i,u){var p=st();u=u===void 0?null:u;var m=p.memoizedState.inst;Pe!==null&&u!==null&&gc(u,Pe.memoizedState.deps)?p.memoizedState=Kr(r,m,i,u):(je.flags|=t,p.memoizedState=Kr(1|r,m,i,u))}function mp(t,r){Us(8390656,8,t,r)}function jc(t,r){Hs(2048,8,t,r)}function yk(t){je.flags|=4;var r=je.updateQueue;if(r===null)r=Os(),je.updateQueue=r,r.events=[t];else{var i=r.events;i===null?r.events=[t]:i.push(t)}}function yp(t){var r=st().memoizedState;return yk({ref:r,nextImpl:t}),function(){if((Be&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}function xp(t,r){return Hs(4,2,t,r)}function bp(t,r){return Hs(4,4,t,r)}function vp(t,r){if(typeof r=="function"){t=t();var i=r(t);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function kp(t,r,i){i=i!=null?i.concat([t]):null,Hs(4,4,vp.bind(null,r,t),i)}function Cc(){}function Sp(t,r){var i=st();r=r===void 0?null:r;var u=i.memoizedState;return r!==null&&gc(r,u[1])?u[0]:(i.memoizedState=[t,r],t)}function wp(t,r){var i=st();r=r===void 0?null:r;var u=i.memoizedState;if(r!==null&&gc(r,u[1]))return u[0];if(u=t(),tr){Lt(!0);try{t()}finally{Lt(!1)}}return i.memoizedState=[u,r],u}function Nc(t,r,i){return i===void 0||(Yn&1073741824)!==0&&(Me&261930)===0?t.memoizedState=r:(t.memoizedState=i,t=jm(),je.lanes|=t,ja|=t,i)}function jp(t,r,i,u){return Gt(i,r)?i:Ir.current!==null?(t=Nc(t,i,u),Gt(t,r)||(ct=!0),t):(Yn&42)===0||(Yn&1073741824)!==0&&(Me&261930)===0?(ct=!0,t.memoizedState=i):(t=jm(),je.lanes|=t,ja|=t,r)}function Cp(t,r,i,u,p){var m=te.p;te.p=m!==0&&8>m?m:8;var k=B.T,w={};B.T=w,Tc(t,!1,r,i);try{var _=p(),I=B.S;if(I!==null&&I(w,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var Q=fk(_,u);Kl(t,r,Q,en(t))}else Kl(t,r,u,en(t))}catch(J){Kl(t,r,{then:function(){},status:"rejected",reason:J},en())}finally{te.p=m,k!==null&&w.types!==null&&(k.types=w.types),B.T=k}}function xk(){}function Ec(t,r,i,u){if(t.tag!==5)throw Error(l(476));var p=Np(t).queue;Cp(t,p,r,ce,i===null?xk:function(){return Ep(t),i(u)})}function Np(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:ce},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:i},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function Ep(t){var r=Np(t);r.next===null&&(r=t.alternate.memoizedState),Kl(t,r.next.queue,{},en())}function Ac(){return jt(si)}function Ap(){return st().memoizedState}function Tp(){return st().memoizedState}function bk(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var i=en();t=xa(i);var u=ba(r,t,i);u!==null&&(Ft(u,r,i),Bl(u,r,i)),r={cache:ac()},t.payload=r;return}r=r.return}}function vk(t,r,i){var u=en();i={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Bs(t)?Dp(r,i):(i=Vu(t,r,i,u),i!==null&&(Ft(i,t,u),Mp(i,r,u)))}function _p(t,r,i){var u=en();Kl(t,r,i,u)}function Kl(t,r,i,u){var p={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Bs(t))Dp(r,p);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var k=r.lastRenderedState,w=m(k,i);if(p.hasEagerState=!0,p.eagerState=w,Gt(w,k))return bs(t,r,p,0),Qe===null&&xs(),!1}catch{}finally{}if(i=Vu(t,r,p,u),i!==null)return Ft(i,t,u),Mp(i,r,u),!0}return!1}function Tc(t,r,i,u){if(u={lane:2,revertLane:sd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Bs(t)){if(r)throw Error(l(479))}else r=Vu(t,i,u,2),r!==null&&Ft(r,t,2)}function Bs(t){var r=t.alternate;return t===je||r!==null&&r===je}function Dp(t,r){$r=Ms=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function Mp(t,r,i){if((i&4194048)!==0){var u=r.lanes;u&=t.pendingLanes,i|=u,r.lanes=i,Uh(t,i)}}var Pl={readContext:jt,use:zs,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt,useHostTransitionStatus:rt,useFormState:rt,useActionState:rt,useOptimistic:rt,useMemoCache:rt,useCacheRefresh:rt};Pl.useEffectEvent=rt;var Rp={readContext:jt,use:zs,useCallback:function(t,r){return Rt().memoizedState=[t,r===void 0?null:r],t},useContext:jt,useEffect:mp,useImperativeHandle:function(t,r,i){i=i!=null?i.concat([t]):null,Us(4194308,4,vp.bind(null,r,t),i)},useLayoutEffect:function(t,r){return Us(4194308,4,t,r)},useInsertionEffect:function(t,r){Us(4,2,t,r)},useMemo:function(t,r){var i=Rt();r=r===void 0?null:r;var u=t();if(tr){Lt(!0);try{t()}finally{Lt(!1)}}return i.memoizedState=[u,r],u},useReducer:function(t,r,i){var u=Rt();if(i!==void 0){var p=i(r);if(tr){Lt(!0);try{i(r)}finally{Lt(!1)}}}else p=r;return u.memoizedState=u.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},u.queue=t,t=t.dispatch=vk.bind(null,je,t),[u.memoizedState,t]},useRef:function(t){var r=Rt();return t={current:t},r.memoizedState=t},useState:function(t){t=Sc(t);var r=t.queue,i=_p.bind(null,je,r);return r.dispatch=i,[t.memoizedState,i]},useDebugValue:Cc,useDeferredValue:function(t,r){var i=Rt();return Nc(i,t,r)},useTransition:function(){var t=Sc(!1);return t=Cp.bind(null,je,t.queue,!0,!1),Rt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,i){var u=je,p=Rt();if(Oe){if(i===void 0)throw Error(l(407));i=i()}else{if(i=r(),Qe===null)throw Error(l(349));(Me&127)!==0||ep(u,r,i)}p.memoizedState=i;var m={value:i,getSnapshot:r};return p.queue=m,mp(np.bind(null,u,m,t),[t]),u.flags|=2048,Kr(9,{destroy:void 0},tp.bind(null,u,m,i,r),null),i},useId:function(){var t=Rt(),r=Qe.identifierPrefix;if(Oe){var i=An,u=En;i=(u&~(1<<32-Ge(u)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Rs++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=hk++,r="_"+r+"r_"+i.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:Ac,useFormState:dp,useActionState:dp,useOptimistic:function(t){var r=Rt();r.memoizedState=r.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Tc.bind(null,je,!0,i),i.dispatch=r,[t,r]},useMemoCache:bc,useCacheRefresh:function(){return Rt().memoizedState=bk.bind(null,je)},useEffectEvent:function(t){var r=Rt(),i={impl:t};return r.memoizedState=i,function(){if((Be&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},_c={readContext:jt,use:zs,useCallback:Sp,useContext:jt,useEffect:jc,useImperativeHandle:kp,useInsertionEffect:xp,useLayoutEffect:bp,useMemo:wp,useReducer:Ls,useRef:pp,useState:function(){return Ls(Gn)},useDebugValue:Cc,useDeferredValue:function(t,r){var i=st();return jp(i,Pe.memoizedState,t,r)},useTransition:function(){var t=Ls(Gn)[0],r=st().memoizedState;return[typeof t=="boolean"?t:Fl(t),r]},useSyncExternalStore:Wg,useId:Ap,useHostTransitionStatus:Ac,useFormState:fp,useActionState:fp,useOptimistic:function(t,r){var i=st();return lp(i,Pe,t,r)},useMemoCache:bc,useCacheRefresh:Tp};_c.useEffectEvent=yp;var Op={readContext:jt,use:zs,useCallback:Sp,useContext:jt,useEffect:jc,useImperativeHandle:kp,useInsertionEffect:xp,useLayoutEffect:bp,useMemo:wp,useReducer:kc,useRef:pp,useState:function(){return kc(Gn)},useDebugValue:Cc,useDeferredValue:function(t,r){var i=st();return Pe===null?Nc(i,t,r):jp(i,Pe.memoizedState,t,r)},useTransition:function(){var t=kc(Gn)[0],r=st().memoizedState;return[typeof t=="boolean"?t:Fl(t),r]},useSyncExternalStore:Wg,useId:Ap,useHostTransitionStatus:Ac,useFormState:gp,useActionState:gp,useOptimistic:function(t,r){var i=st();return Pe!==null?lp(i,Pe,t,r):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:bc,useCacheRefresh:Tp};Op.useEffectEvent=yp;function Dc(t,r,i,u){r=t.memoizedState,i=i(u,r),i=i==null?r:y({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Mc={enqueueSetState:function(t,r,i){t=t._reactInternals;var u=en(),p=xa(u);p.payload=r,i!=null&&(p.callback=i),r=ba(t,p,u),r!==null&&(Ft(r,t,u),Bl(r,t,u))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var u=en(),p=xa(u);p.tag=1,p.payload=r,i!=null&&(p.callback=i),r=ba(t,p,u),r!==null&&(Ft(r,t,u),Bl(r,t,u))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=en(),u=xa(i);u.tag=2,r!=null&&(u.callback=r),r=ba(t,u,i),r!==null&&(Ft(r,t,i),Bl(r,t,i))}};function zp(t,r,i,u,p,m,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,m,k):r.prototype&&r.prototype.isPureReactComponent?!Dl(i,u)||!Dl(p,m):!0}function Lp(t,r,i,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,u),r.state!==t&&Mc.enqueueReplaceState(r,r.state,null)}function nr(t,r){var i=r;if("ref"in r){i={};for(var u in r)u!=="ref"&&(i[u]=r[u])}if(t=t.defaultProps){i===r&&(i=y({},i));for(var p in t)i[p]===void 0&&(i[p]=t[p])}return i}function Up(t){ys(t)}function Hp(t){console.error(t)}function Bp(t){ys(t)}function qs(t,r){try{var i=t.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function qp(t,r,i){try{var u=t.onCaughtError;u(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Rc(t,r,i){return i=xa(i),i.tag=3,i.payload={element:null},i.callback=function(){qs(t,r)},i}function Ip(t){return t=xa(t),t.tag=3,t}function $p(t,r,i,u){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var m=u.value;t.payload=function(){return p(m)},t.callback=function(){qp(r,i,u)}}var k=i.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(t.callback=function(){qp(r,i,u),typeof p!="function"&&(Ca===null?Ca=new Set([this]):Ca.add(this));var w=u.stack;this.componentDidCatch(u.value,{componentStack:w!==null?w:""})})}function kk(t,r,i,u,p){if(i.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=i.alternate,r!==null&&Lr(r,i,p,!0),i=Xt.current,i!==null){switch(i.tag){case 31:case 13:return hn===null?Js():i.alternate===null&<===0&&(lt=3),i.flags&=-257,i.flags|=65536,i.lanes=p,u===Es?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([u]):r.add(u),rd(t,u,p)),!1;case 22:return i.flags|=65536,u===Es?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([u]):i.add(u)),rd(t,u,p)),!1}throw Error(l(435,i.tag))}return rd(t,u,p),Js(),!1}if(Oe)return r=Xt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==Ju&&(t=Error(l(422),{cause:u}),Ol(un(t,i)))):(u!==Ju&&(r=Error(l(423),{cause:u}),Ol(un(r,i))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,u=un(u,i),p=Rc(t.stateNode,u,p),uc(t,p),lt!==4&&(lt=2)),!1;var m=Error(l(520),{cause:u});if(m=un(m,i),Wl===null?Wl=[m]:Wl.push(m),lt!==4&&(lt=2),r===null)return!0;u=un(u,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,t=p&-p,i.lanes|=t,t=Rc(i.stateNode,u,t),uc(i,t),!1;case 1:if(r=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ca===null||!Ca.has(m))))return i.flags|=65536,p&=-p,i.lanes|=p,p=Ip(p),$p(p,t,i,u),uc(i,p),!1}i=i.return}while(i!==null);return!1}var Oc=Error(l(461)),ct=!1;function Ct(t,r,i,u){r.child=t===null?Vg(r,null,i,u):er(r,t.child,i,u)}function Fp(t,r,i,u,p){i=i.render;var m=r.ref;if("ref"in u){var k={};for(var w in u)w!=="ref"&&(k[w]=u[w])}else k=u;return Xa(r),u=pc(t,r,i,k,m,p),w=mc(),t!==null&&!ct?(yc(t,r,p),Qn(t,r,p)):(Oe&&w&&Xu(r),r.flags|=1,Ct(t,r,u,p),r.child)}function Kp(t,r,i,u,p){if(t===null){var m=i.type;return typeof m=="function"&&!Yu(m)&&m.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=m,Pp(t,r,m,u,p)):(t=ks(i.type,null,u,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!$c(t,p)){var k=m.memoizedProps;if(i=i.compare,i=i!==null?i:Dl,i(k,u)&&t.ref===r.ref)return Qn(t,r,p)}return r.flags|=1,t=Fn(m,u),t.ref=r.ref,t.return=r,r.child=t}function Pp(t,r,i,u,p){if(t!==null){var m=t.memoizedProps;if(Dl(m,u)&&t.ref===r.ref)if(ct=!1,r.pendingProps=u=m,$c(t,p))(t.flags&131072)!==0&&(ct=!0);else return r.lanes=t.lanes,Qn(t,r,p)}return zc(t,r,i,u,p)}function Vp(t,r,i,u){var p=u.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|i:i,t!==null){for(u=r.child=t.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~m}else u=0,r.child=null;return Yp(t,r,m,i,u)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Cs(r,m!==null?m.cachePool:null),m!==null?Qg(r,m):dc(),Xg(r);else return u=r.lanes=536870912,Yp(t,r,m!==null?m.baseLanes|i:i,i,u)}else m!==null?(Cs(r,m.cachePool),Qg(r,m),ka(),r.memoizedState=null):(t!==null&&Cs(r,null),dc(),ka());return Ct(t,r,p,i),r.child}function Vl(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Yp(t,r,i,u,p){var m=lc();return m=m===null?null:{parent:ot._currentValue,pool:m},r.memoizedState={baseLanes:i,cachePool:m},t!==null&&Cs(r,null),dc(),Xg(r),t!==null&&Lr(t,r,u,!0),r.childLanes=p,null}function Is(t,r){return r=Fs({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function Gp(t,r,i){return er(r,t.child,null,i),t=Is(r,r.pendingProps),t.flags|=2,Zt(r),r.memoizedState=null,t}function Sk(t,r,i){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Oe){if(u.mode==="hidden")return t=Is(r,u),r.lanes=536870912,Vl(null,t);if(hc(r),(t=We)?(t=i0(t,fn),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ha!==null?{id:En,overflow:An}:null,retryLane:536870912,hydrationErrors:null},i=Dg(t),i.return=r,r.child=i,wt=r,We=null)):t=null,t===null)throw pa(r);return r.lanes=536870912,null}return Is(r,u)}var m=t.memoizedState;if(m!==null){var k=m.dehydrated;if(hc(r),p)if(r.flags&256)r.flags&=-257,r=Gp(t,r,i);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(l(558));else if(ct||Lr(t,r,i,!1),p=(i&t.childLanes)!==0,ct||p){if(u=Qe,u!==null&&(k=Hh(u,i),k!==0&&k!==m.retryLane))throw m.retryLane=k,Va(t,k),Ft(u,t,k),Oc;Js(),r=Gp(t,r,i)}else t=m.treeContext,We=gn(k.nextSibling),wt=r,Oe=!0,ga=null,fn=!1,t!==null&&Og(r,t),r=Is(r,u),r.flags|=4096;return r}return t=Fn(t.child,{mode:u.mode,children:u.children}),t.ref=r.ref,r.child=t,t.return=r,t}function $s(t,r){var i=r.ref;if(i===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(t===null||t.ref!==i)&&(r.flags|=4194816)}}function zc(t,r,i,u,p){return Xa(r),i=pc(t,r,i,u,void 0,p),u=mc(),t!==null&&!ct?(yc(t,r,p),Qn(t,r,p)):(Oe&&u&&Xu(r),r.flags|=1,Ct(t,r,i,p),r.child)}function Qp(t,r,i,u,p,m){return Xa(r),r.updateQueue=null,i=Jg(r,u,i,p),Zg(t),u=mc(),t!==null&&!ct?(yc(t,r,m),Qn(t,r,m)):(Oe&&u&&Xu(r),r.flags|=1,Ct(t,r,i,m),r.child)}function Xp(t,r,i,u,p){if(Xa(r),r.stateNode===null){var m=Mr,k=i.contextType;typeof k=="object"&&k!==null&&(m=jt(k)),m=new i(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Mc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},sc(r),k=i.contextType,m.context=typeof k=="object"&&k!==null?jt(k):Mr,m.state=r.memoizedState,k=i.getDerivedStateFromProps,typeof k=="function"&&(Dc(r,i,k,u),m.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(k=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),k!==m.state&&Mc.enqueueReplaceState(m,m.state,null),Il(r,u,m,p),ql(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(t===null){m=r.stateNode;var w=r.memoizedProps,_=nr(i,w);m.props=_;var I=m.context,Q=i.contextType;k=Mr,typeof Q=="object"&&Q!==null&&(k=jt(Q));var J=i.getDerivedStateFromProps;Q=typeof J=="function"||typeof m.getSnapshotBeforeUpdate=="function",w=r.pendingProps!==w,Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(w||I!==k)&&Lp(r,m,u,k),ya=!1;var $=r.memoizedState;m.state=$,Il(r,u,m,p),ql(),I=r.memoizedState,w||$!==I||ya?(typeof J=="function"&&(Dc(r,i,J,u),I=r.memoizedState),(_=ya||zp(r,i,_,u,$,I,k))?(Q||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=I),m.props=u,m.state=I,m.context=k,u=_):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,oc(t,r),k=r.memoizedProps,Q=nr(i,k),m.props=Q,J=r.pendingProps,$=m.context,I=i.contextType,_=Mr,typeof I=="object"&&I!==null&&(_=jt(I)),w=i.getDerivedStateFromProps,(I=typeof w=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==J||$!==_)&&Lp(r,m,u,_),ya=!1,$=r.memoizedState,m.state=$,Il(r,u,m,p),ql();var K=r.memoizedState;k!==J||$!==K||ya||t!==null&&t.dependencies!==null&&ws(t.dependencies)?(typeof w=="function"&&(Dc(r,i,w,u),K=r.memoizedState),(Q=ya||zp(r,i,Q,u,$,K,_)||t!==null&&t.dependencies!==null&&ws(t.dependencies))?(I||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,K,_),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,K,_)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&$===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&$===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=K),m.props=u,m.state=K,m.context=_,u=Q):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&$===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&$===t.memoizedState||(r.flags|=1024),u=!1)}return m=u,$s(t,r),u=(r.flags&128)!==0,m||u?(m=r.stateNode,i=u&&typeof i.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&u?(r.child=er(r,t.child,null,p),r.child=er(r,null,i,p)):Ct(t,r,i,p),r.memoizedState=m.state,t=r.child):t=Qn(t,r,p),t}function Zp(t,r,i,u){return Ga(),r.flags|=256,Ct(t,r,i,u),r.child}var Lc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Uc(t){return{baseLanes:t,cachePool:qg()}}function Hc(t,r,i){return t=t!==null?t.childLanes&~i:0,r&&(t|=Wt),t}function Jp(t,r,i){var u=r.pendingProps,p=!1,m=(r.flags&128)!==0,k;if((k=m)||(k=t!==null&&t.memoizedState===null?!1:(it.current&2)!==0),k&&(p=!0,r.flags&=-129),k=(r.flags&32)!==0,r.flags&=-33,t===null){if(Oe){if(p?va(r):ka(),(t=We)?(t=i0(t,fn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ha!==null?{id:En,overflow:An}:null,retryLane:536870912,hydrationErrors:null},i=Dg(t),i.return=r,r.child=i,wt=r,We=null)):t=null,t===null)throw pa(r);return vd(t)?r.lanes=32:r.lanes=536870912,null}var w=u.children;return u=u.fallback,p?(ka(),p=r.mode,w=Fs({mode:"hidden",children:w},p),u=Ya(u,p,i,null),w.return=r,u.return=r,w.sibling=u,r.child=w,u=r.child,u.memoizedState=Uc(i),u.childLanes=Hc(t,k,i),r.memoizedState=Lc,Vl(null,u)):(va(r),Bc(r,w))}var _=t.memoizedState;if(_!==null&&(w=_.dehydrated,w!==null)){if(m)r.flags&256?(va(r),r.flags&=-257,r=qc(t,r,i)):r.memoizedState!==null?(ka(),r.child=t.child,r.flags|=128,r=null):(ka(),w=u.fallback,p=r.mode,u=Fs({mode:"visible",children:u.children},p),w=Ya(w,p,i,null),w.flags|=2,u.return=r,w.return=r,u.sibling=w,r.child=u,er(r,t.child,null,i),u=r.child,u.memoizedState=Uc(i),u.childLanes=Hc(t,k,i),r.memoizedState=Lc,r=Vl(null,u));else if(va(r),vd(w)){if(k=w.nextSibling&&w.nextSibling.dataset,k)var I=k.dgst;k=I,u=Error(l(419)),u.stack="",u.digest=k,Ol({value:u,source:null,stack:null}),r=qc(t,r,i)}else if(ct||Lr(t,r,i,!1),k=(i&t.childLanes)!==0,ct||k){if(k=Qe,k!==null&&(u=Hh(k,i),u!==0&&u!==_.retryLane))throw _.retryLane=u,Va(t,u),Ft(k,t,u),Oc;bd(w)||Js(),r=qc(t,r,i)}else bd(w)?(r.flags|=192,r.child=t.child,r=null):(t=_.treeContext,We=gn(w.nextSibling),wt=r,Oe=!0,ga=null,fn=!1,t!==null&&Og(r,t),r=Bc(r,u.children),r.flags|=4096);return r}return p?(ka(),w=u.fallback,p=r.mode,_=t.child,I=_.sibling,u=Fn(_,{mode:"hidden",children:u.children}),u.subtreeFlags=_.subtreeFlags&65011712,I!==null?w=Fn(I,w):(w=Ya(w,p,i,null),w.flags|=2),w.return=r,u.return=r,u.sibling=w,r.child=u,Vl(null,u),u=r.child,w=t.child.memoizedState,w===null?w=Uc(i):(p=w.cachePool,p!==null?(_=ot._currentValue,p=p.parent!==_?{parent:_,pool:_}:p):p=qg(),w={baseLanes:w.baseLanes|i,cachePool:p}),u.memoizedState=w,u.childLanes=Hc(t,k,i),r.memoizedState=Lc,Vl(t.child,u)):(va(r),i=t.child,t=i.sibling,i=Fn(i,{mode:"visible",children:u.children}),i.return=r,i.sibling=null,t!==null&&(k=r.deletions,k===null?(r.deletions=[t],r.flags|=16):k.push(t)),r.child=i,r.memoizedState=null,i)}function Bc(t,r){return r=Fs({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Fs(t,r){return t=Qt(22,t,null,r),t.lanes=0,t}function qc(t,r,i){return er(r,t.child,null,i),t=Bc(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Wp(t,r,i){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),tc(t.return,r,i)}function Ic(t,r,i,u,p,m){var k=t.memoizedState;k===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:i,tailMode:p,treeForkCount:m}:(k.isBackwards=r,k.rendering=null,k.renderingStartTime=0,k.last=u,k.tail=i,k.tailMode=p,k.treeForkCount=m)}function em(t,r,i){var u=r.pendingProps,p=u.revealOrder,m=u.tail;u=u.children;var k=it.current,w=(k&2)!==0;if(w?(k=k&1|2,r.flags|=128):k&=1,A(it,k),Ct(t,r,u,i),u=Oe?Rl:0,!w&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Wp(t,i,r);else if(t.tag===19)Wp(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(p){case"forwards":for(i=r.child,p=null;i!==null;)t=i.alternate,t!==null&&Ds(t)===null&&(p=i),i=i.sibling;i=p,i===null?(p=r.child,r.child=null):(p=i.sibling,i.sibling=null),Ic(r,!1,p,i,m,u);break;case"backwards":case"unstable_legacy-backwards":for(i=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&Ds(t)===null){r.child=p;break}t=p.sibling,p.sibling=i,i=p,p=t}Ic(r,!0,i,null,m,u);break;case"together":Ic(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Qn(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),ja|=r.lanes,(i&r.childLanes)===0)if(t!==null){if(Lr(t,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(l(153));if(r.child!==null){for(t=r.child,i=Fn(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=Fn(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function $c(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&ws(t)))}function wk(t,r,i){switch(r.tag){case 3:tt(r,r.stateNode.containerInfo),ma(r,ot,t.memoizedState.cache),Ga();break;case 27:case 5:rn(r);break;case 4:tt(r,r.stateNode.containerInfo);break;case 10:ma(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,hc(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(va(r),r.flags|=128,null):(i&r.child.childLanes)!==0?Jp(t,r,i):(va(r),t=Qn(t,r,i),t!==null?t.sibling:null);va(r);break;case 19:var p=(t.flags&128)!==0;if(u=(i&r.childLanes)!==0,u||(Lr(t,r,i,!1),u=(i&r.childLanes)!==0),p){if(u)return em(t,r,i);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),A(it,it.current),u)break;return null;case 22:return r.lanes=0,Vp(t,r,i,r.pendingProps);case 24:ma(r,ot,t.memoizedState.cache)}return Qn(t,r,i)}function tm(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps)ct=!0;else{if(!$c(t,i)&&(r.flags&128)===0)return ct=!1,wk(t,r,i);ct=(t.flags&131072)!==0}else ct=!1,Oe&&(r.flags&1048576)!==0&&Rg(r,Rl,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(t=Ja(r.elementType),r.type=t,typeof t=="function")Yu(t)?(u=nr(t,u),r.tag=1,r=Xp(null,r,t,u,i)):(r.tag=0,r=zc(null,r,t,u,i));else{if(t!=null){var p=t.$$typeof;if(p===Y){r.tag=11,r=Fp(null,r,t,u,i);break e}else if(p===P){r.tag=14,r=Kp(null,r,t,u,i);break e}}throw r=ne(t)||t,Error(l(306,r,""))}}return r;case 0:return zc(t,r,r.type,r.pendingProps,i);case 1:return u=r.type,p=nr(u,r.pendingProps),Xp(t,r,u,p,i);case 3:e:{if(tt(r,r.stateNode.containerInfo),t===null)throw Error(l(387));u=r.pendingProps;var m=r.memoizedState;p=m.element,oc(t,r),Il(r,u,null,i);var k=r.memoizedState;if(u=k.cache,ma(r,ot,u),u!==m.cache&&nc(r,[ot],i,!0),ql(),u=k.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:k.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=Zp(t,r,u,i);break e}else if(u!==p){p=un(Error(l(424)),r),Ol(p),r=Zp(t,r,u,i);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(We=gn(t.firstChild),wt=r,Oe=!0,ga=null,fn=!0,i=Vg(r,null,u,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ga(),u===p){r=Qn(t,r,i);break e}Ct(t,r,u,i)}r=r.child}return r;case 26:return $s(t,r),t===null?(i=f0(r.type,null,r.pendingProps,null))?r.memoizedState=i:Oe||(i=r.type,t=r.pendingProps,u=lo(ge.current).createElement(i),u[St]=r,u[Ut]=t,Nt(u,i,t),yt(u),r.stateNode=u):r.memoizedState=f0(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return rn(r),t===null&&Oe&&(u=r.stateNode=u0(r.type,r.pendingProps,ge.current),wt=r,fn=!0,p=We,Ta(r.type)?(kd=p,We=gn(u.firstChild)):We=p),Ct(t,r,r.pendingProps.children,i),$s(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Oe&&((p=u=We)&&(u=Wk(u,r.type,r.pendingProps,fn),u!==null?(r.stateNode=u,wt=r,We=gn(u.firstChild),fn=!1,p=!0):p=!1),p||pa(r)),rn(r),p=r.type,m=r.pendingProps,k=t!==null?t.memoizedProps:null,u=m.children,md(p,m)?u=null:k!==null&&md(p,k)&&(r.flags|=32),r.memoizedState!==null&&(p=pc(t,r,gk,null,null,i),si._currentValue=p),$s(t,r),Ct(t,r,u,i),r.child;case 6:return t===null&&Oe&&((t=i=We)&&(i=eS(i,r.pendingProps,fn),i!==null?(r.stateNode=i,wt=r,We=null,t=!0):t=!1),t||pa(r)),null;case 13:return Jp(t,r,i);case 4:return tt(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=er(r,null,u,i):Ct(t,r,u,i),r.child;case 11:return Fp(t,r,r.type,r.pendingProps,i);case 7:return Ct(t,r,r.pendingProps,i),r.child;case 8:return Ct(t,r,r.pendingProps.children,i),r.child;case 12:return Ct(t,r,r.pendingProps.children,i),r.child;case 10:return u=r.pendingProps,ma(r,r.type,u.value),Ct(t,r,u.children,i),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,Xa(r),p=jt(p),u=u(p),r.flags|=1,Ct(t,r,u,i),r.child;case 14:return Kp(t,r,r.type,r.pendingProps,i);case 15:return Pp(t,r,r.type,r.pendingProps,i);case 19:return em(t,r,i);case 31:return Sk(t,r,i);case 22:return Vp(t,r,i,r.pendingProps);case 24:return Xa(r),u=jt(ot),t===null?(p=lc(),p===null&&(p=Qe,m=ac(),p.pooledCache=m,m.refCount++,m!==null&&(p.pooledCacheLanes|=i),p=m),r.memoizedState={parent:u,cache:p},sc(r),ma(r,ot,p)):((t.lanes&i)!==0&&(oc(t,r),Il(r,null,null,i),ql()),p=t.memoizedState,m=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),ma(r,ot,u)):(u=m.cache,ma(r,ot,u),u!==p.cache&&nc(r,[ot],i,!0))),Ct(t,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(l(156,r.tag))}function Xn(t){t.flags|=4}function Fc(t,r,i,u,p){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(p&335544128)===p)if(t.stateNode.complete)t.flags|=8192;else if(Am())t.flags|=8192;else throw Wa=Es,ic}else t.flags&=-16777217}function nm(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!y0(r))if(Am())t.flags|=8192;else throw Wa=Es,ic}function Ks(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?zh():536870912,t.lanes|=r,Gr|=r)}function Yl(t,r){if(!Oe)switch(t.tailMode){case"hidden":r=t.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function et(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,u=0;if(r)for(var p=t.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=u,t.childLanes=i,r}function jk(t,r,i){var u=r.pendingProps;switch(Zu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(r),null;case 1:return et(r),null;case 3:return i=r.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Vn(ot),Ke(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(zr(r)?Xn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Wu())),et(r),null;case 26:var p=r.type,m=r.memoizedState;return t===null?(Xn(r),m!==null?(et(r),nm(r,m)):(et(r),Fc(r,p,null,u,i))):m?m!==t.memoizedState?(Xn(r),et(r),nm(r,m)):(et(r),r.flags&=-16777217):(t=t.memoizedProps,t!==u&&Xn(r),et(r),Fc(r,p,t,u,i)),null;case 27:if(Un(r),i=ge.current,p=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Xn(r);else{if(!u){if(r.stateNode===null)throw Error(l(166));return et(r),null}t=se.current,zr(r)?zg(r):(t=u0(p,u,i),r.stateNode=t,Xn(r))}return et(r),null;case 5:if(Un(r),p=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Xn(r);else{if(!u){if(r.stateNode===null)throw Error(l(166));return et(r),null}if(m=se.current,zr(r))zg(r);else{var k=lo(ge.current);switch(m){case 1:m=k.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:m=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":m=k.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":m=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":m=k.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?k.createElement("select",{is:u.is}):k.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?k.createElement(p,{is:u.is}):k.createElement(p)}}m[St]=r,m[Ut]=u;e:for(k=r.child;k!==null;){if(k.tag===5||k.tag===6)m.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===r)break e;for(;k.sibling===null;){if(k.return===null||k.return===r)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}r.stateNode=m;e:switch(Nt(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Xn(r)}}return et(r),Fc(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,i),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==u&&Xn(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(l(166));if(t=ge.current,zr(r)){if(t=r.stateNode,i=r.memoizedProps,u=null,p=wt,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}t[St]=r,t=!!(t.nodeValue===i||u!==null&&u.suppressHydrationWarning===!0||Jm(t.nodeValue,i)),t||pa(r,!0)}else t=lo(t).createTextNode(u),t[St]=r,r.stateNode=t}return et(r),null;case 31:if(i=r.memoizedState,t===null||t.memoizedState!==null){if(u=zr(r),i!==null){if(t===null){if(!u)throw Error(l(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[St]=r}else Ga(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;et(r),t=!1}else i=Wu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return r.flags&256?(Zt(r),r):(Zt(r),null);if((r.flags&128)!==0)throw Error(l(558))}return et(r),null;case 13:if(u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=zr(r),u!==null&&u.dehydrated!==null){if(t===null){if(!p)throw Error(l(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(l(317));p[St]=r}else Ga(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;et(r),p=!1}else p=Wu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(Zt(r),r):(Zt(r),null)}return Zt(r),(r.flags&128)!==0?(r.lanes=i,r):(i=u!==null,t=t!==null&&t.memoizedState!==null,i&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),i!==t&&i&&(r.child.flags|=8192),Ks(r,r.updateQueue),et(r),null);case 4:return Ke(),t===null&&dd(r.stateNode.containerInfo),et(r),null;case 10:return Vn(r.type),et(r),null;case 19:if(V(it),u=r.memoizedState,u===null)return et(r),null;if(p=(r.flags&128)!==0,m=u.rendering,m===null)if(p)Yl(u,!1);else{if(lt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=Ds(t),m!==null){for(r.flags|=128,Yl(u,!1),t=m.updateQueue,r.updateQueue=t,Ks(r,t),r.subtreeFlags=0,t=i,i=r.child;i!==null;)_g(i,t),i=i.sibling;return A(it,it.current&1|2),Oe&&Kn(r,u.treeForkCount),r.child}t=t.sibling}u.tail!==null&&Dt()>Qs&&(r.flags|=128,p=!0,Yl(u,!1),r.lanes=4194304)}else{if(!p)if(t=Ds(m),t!==null){if(r.flags|=128,p=!0,t=t.updateQueue,r.updateQueue=t,Ks(r,t),Yl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!Oe)return et(r),null}else 2*Dt()-u.renderingStartTime>Qs&&i!==536870912&&(r.flags|=128,p=!0,Yl(u,!1),r.lanes=4194304);u.isBackwards?(m.sibling=r.child,r.child=m):(t=u.last,t!==null?t.sibling=m:r.child=m,u.last=m)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Dt(),t.sibling=null,i=it.current,A(it,p?i&1|2:i&1),Oe&&Kn(r,u.treeForkCount),t):(et(r),null);case 22:case 23:return Zt(r),fc(),u=r.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(i&536870912)!==0&&(r.flags&128)===0&&(et(r),r.subtreeFlags&6&&(r.flags|=8192)):et(r),i=r.updateQueue,i!==null&&Ks(r,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==i&&(r.flags|=2048),t!==null&&V(Za),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),Vn(ot),et(r),null;case 25:return null;case 30:return null}throw Error(l(156,r.tag))}function Ck(t,r){switch(Zu(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Vn(ot),Ke(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return Un(r),null;case 31:if(r.memoizedState!==null){if(Zt(r),r.alternate===null)throw Error(l(340));Ga()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(Zt(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(l(340));Ga()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return V(it),null;case 4:return Ke(),null;case 10:return Vn(r.type),null;case 22:case 23:return Zt(r),fc(),t!==null&&V(Za),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Vn(ot),null;case 25:return null;default:return null}}function am(t,r){switch(Zu(r),r.tag){case 3:Vn(ot),Ke();break;case 26:case 27:case 5:Un(r);break;case 4:Ke();break;case 31:r.memoizedState!==null&&Zt(r);break;case 13:Zt(r);break;case 19:V(it);break;case 10:Vn(r.type);break;case 22:case 23:Zt(r),fc(),t!==null&&V(Za);break;case 24:Vn(ot)}}function Gl(t,r){try{var i=r.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var p=u.next;i=p;do{if((i.tag&t)===t){u=void 0;var m=i.create,k=i.inst;u=m(),k.destroy=u}i=i.next}while(i!==p)}}catch(w){Fe(r,r.return,w)}}function Sa(t,r,i){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&t)===t){var k=u.inst,w=k.destroy;if(w!==void 0){k.destroy=void 0,p=r;var _=i,I=w;try{I()}catch(Q){Fe(p,_,Q)}}}u=u.next}while(u!==m)}}catch(Q){Fe(r,r.return,Q)}}function rm(t){var r=t.updateQueue;if(r!==null){var i=t.stateNode;try{Gg(r,i)}catch(u){Fe(t,t.return,u)}}}function lm(t,r,i){i.props=nr(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(u){Fe(t,r,u)}}function Ql(t,r){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof i=="function"?t.refCleanup=i(u):i.current=u}}catch(p){Fe(t,r,p)}}function Tn(t,r){var i=t.ref,u=t.refCleanup;if(i!==null)if(typeof u=="function")try{u()}catch(p){Fe(t,r,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){Fe(t,r,p)}else i.current=null}function im(t){var r=t.type,i=t.memoizedProps,u=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&u.focus();break e;case"img":i.src?u.src=i.src:i.srcSet&&(u.srcset=i.srcSet)}}catch(p){Fe(t,t.return,p)}}function Kc(t,r,i){try{var u=t.stateNode;Yk(u,t.type,i,r),u[Ut]=r}catch(p){Fe(t,t.return,p)}}function sm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ta(t.type)||t.tag===4}function Pc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||sm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ta(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Vc(t,r,i){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(t),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=In));else if(u!==4&&(u===27&&Ta(t.type)&&(i=t.stateNode,r=null),t=t.child,t!==null))for(Vc(t,r,i),t=t.sibling;t!==null;)Vc(t,r,i),t=t.sibling}function Ps(t,r,i){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?i.insertBefore(t,r):i.appendChild(t);else if(u!==4&&(u===27&&Ta(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(Ps(t,r,i),t=t.sibling;t!==null;)Ps(t,r,i),t=t.sibling}function om(t){var r=t.stateNode,i=t.memoizedProps;try{for(var u=t.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);Nt(r,u,i),r[St]=t,r[Ut]=i}catch(m){Fe(t,t.return,m)}}var Zn=!1,dt=!1,Yc=!1,um=typeof WeakSet=="function"?WeakSet:Set,xt=null;function Nk(t,r){if(t=t.containerInfo,gd=ho,t=kg(t),qu(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var u=i.getSelection&&i.getSelection();if(u&&u.rangeCount!==0){i=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var k=0,w=-1,_=-1,I=0,Q=0,J=t,$=null;t:for(;;){for(var K;J!==i||p!==0&&J.nodeType!==3||(w=k+p),J!==m||u!==0&&J.nodeType!==3||(_=k+u),J.nodeType===3&&(k+=J.nodeValue.length),(K=J.firstChild)!==null;)$=J,J=K;for(;;){if(J===t)break t;if($===i&&++I===p&&(w=k),$===m&&++Q===u&&(_=k),(K=J.nextSibling)!==null)break;J=$,$=J.parentNode}J=K}i=w===-1||_===-1?null:{start:w,end:_}}else i=null}i=i||{start:0,end:0}}else i=null;for(pd={focusedElem:t,selectionRange:i},ho=!1,xt=r;xt!==null;)if(r=xt,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,xt=t;else for(;xt!==null;){switch(r=xt,m=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(i=0;i<t.length;i++)p=t[i],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,i=r,p=m.memoizedProps,m=m.memoizedState,u=i.stateNode;try{var de=nr(i.type,p);t=u.getSnapshotBeforeUpdate(de,m),u.__reactInternalSnapshotBeforeUpdate=t}catch(be){Fe(i,i.return,be)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,i=t.nodeType,i===9)xd(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":xd(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=r.sibling,t!==null){t.return=r.return,xt=t;break}xt=r.return}}function cm(t,r,i){var u=i.flags;switch(i.tag){case 0:case 11:case 15:Wn(t,i),u&4&&Gl(5,i);break;case 1:if(Wn(t,i),u&4)if(t=i.stateNode,r===null)try{t.componentDidMount()}catch(k){Fe(i,i.return,k)}else{var p=nr(i.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(p,r,t.__reactInternalSnapshotBeforeUpdate)}catch(k){Fe(i,i.return,k)}}u&64&&rm(i),u&512&&Ql(i,i.return);break;case 3:if(Wn(t,i),u&64&&(t=i.updateQueue,t!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{Gg(t,r)}catch(k){Fe(i,i.return,k)}}break;case 27:r===null&&u&4&&om(i);case 26:case 5:Wn(t,i),r===null&&u&4&&im(i),u&512&&Ql(i,i.return);break;case 12:Wn(t,i);break;case 31:Wn(t,i),u&4&&hm(t,i);break;case 13:Wn(t,i),u&4&&gm(t,i),u&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=zk.bind(null,i),tS(t,i))));break;case 22:if(u=i.memoizedState!==null||Zn,!u){r=r!==null&&r.memoizedState!==null||dt,p=Zn;var m=dt;Zn=u,(dt=r)&&!m?ea(t,i,(i.subtreeFlags&8772)!==0):Wn(t,i),Zn=p,dt=m}break;case 30:break;default:Wn(t,i)}}function dm(t){var r=t.alternate;r!==null&&(t.alternate=null,dm(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&wu(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var nt=null,Bt=!1;function Jn(t,r,i){for(i=i.child;i!==null;)fm(t,r,i),i=i.sibling}function fm(t,r,i){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Mt,i)}catch{}switch(i.tag){case 26:dt||Tn(i,r),Jn(t,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:dt||Tn(i,r);var u=nt,p=Bt;Ta(i.type)&&(nt=i.stateNode,Bt=!1),Jn(t,r,i),ri(i.stateNode),nt=u,Bt=p;break;case 5:dt||Tn(i,r);case 6:if(u=nt,p=Bt,nt=null,Jn(t,r,i),nt=u,Bt=p,nt!==null)if(Bt)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(i.stateNode)}catch(m){Fe(i,r,m)}else try{nt.removeChild(i.stateNode)}catch(m){Fe(i,r,m)}break;case 18:nt!==null&&(Bt?(t=nt,r0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),nl(t)):r0(nt,i.stateNode));break;case 4:u=nt,p=Bt,nt=i.stateNode.containerInfo,Bt=!0,Jn(t,r,i),nt=u,Bt=p;break;case 0:case 11:case 14:case 15:Sa(2,i,r),dt||Sa(4,i,r),Jn(t,r,i);break;case 1:dt||(Tn(i,r),u=i.stateNode,typeof u.componentWillUnmount=="function"&&lm(i,r,u)),Jn(t,r,i);break;case 21:Jn(t,r,i);break;case 22:dt=(u=dt)||i.memoizedState!==null,Jn(t,r,i),dt=u;break;default:Jn(t,r,i)}}function hm(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{nl(t)}catch(i){Fe(r,r.return,i)}}}function gm(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{nl(t)}catch(i){Fe(r,r.return,i)}}function Ek(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new um),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new um),r;default:throw Error(l(435,t.tag))}}function Vs(t,r){var i=Ek(t);r.forEach(function(u){if(!i.has(u)){i.add(u);var p=Lk.bind(null,t,u);u.then(p,p)}})}function qt(t,r){var i=r.deletions;if(i!==null)for(var u=0;u<i.length;u++){var p=i[u],m=t,k=r,w=k;e:for(;w!==null;){switch(w.tag){case 27:if(Ta(w.type)){nt=w.stateNode,Bt=!1;break e}break;case 5:nt=w.stateNode,Bt=!1;break e;case 3:case 4:nt=w.stateNode.containerInfo,Bt=!0;break e}w=w.return}if(nt===null)throw Error(l(160));fm(m,k,p),nt=null,Bt=!1,m=p.alternate,m!==null&&(m.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)pm(r,t),r=r.sibling}var kn=null;function pm(t,r){var i=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:qt(r,t),It(t),u&4&&(Sa(3,t,t.return),Gl(3,t),Sa(5,t,t.return));break;case 1:qt(r,t),It(t),u&512&&(dt||i===null||Tn(i,i.return)),u&64&&Zn&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?u:i.concat(u))));break;case 26:var p=kn;if(qt(r,t),It(t),u&512&&(dt||i===null||Tn(i,i.return)),u&4){var m=i!==null?i.memoizedState:null;if(u=t.memoizedState,i===null)if(u===null)if(t.stateNode===null){e:{u=t.type,i=t.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":m=p.getElementsByTagName("title")[0],(!m||m[Sl]||m[St]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=p.createElement(u),p.head.insertBefore(m,p.querySelector("head > title"))),Nt(m,u,i),m[St]=t,yt(m),u=m;break e;case"link":var k=p0("link","href",p).get(u+(i.href||""));if(k){for(var w=0;w<k.length;w++)if(m=k[w],m.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&m.getAttribute("rel")===(i.rel==null?null:i.rel)&&m.getAttribute("title")===(i.title==null?null:i.title)&&m.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){k.splice(w,1);break t}}m=p.createElement(u),Nt(m,u,i),p.head.appendChild(m);break;case"meta":if(k=p0("meta","content",p).get(u+(i.content||""))){for(w=0;w<k.length;w++)if(m=k[w],m.getAttribute("content")===(i.content==null?null:""+i.content)&&m.getAttribute("name")===(i.name==null?null:i.name)&&m.getAttribute("property")===(i.property==null?null:i.property)&&m.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&m.getAttribute("charset")===(i.charSet==null?null:i.charSet)){k.splice(w,1);break t}}m=p.createElement(u),Nt(m,u,i),p.head.appendChild(m);break;default:throw Error(l(468,u))}m[St]=t,yt(m),u=m}t.stateNode=u}else m0(p,t.type,t.stateNode);else t.stateNode=g0(p,u,t.memoizedProps);else m!==u?(m===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):m.count--,u===null?m0(p,t.type,t.stateNode):g0(p,u,t.memoizedProps)):u===null&&t.stateNode!==null&&Kc(t,t.memoizedProps,i.memoizedProps)}break;case 27:qt(r,t),It(t),u&512&&(dt||i===null||Tn(i,i.return)),i!==null&&u&4&&Kc(t,t.memoizedProps,i.memoizedProps);break;case 5:if(qt(r,t),It(t),u&512&&(dt||i===null||Tn(i,i.return)),t.flags&32){p=t.stateNode;try{Cr(p,"")}catch(de){Fe(t,t.return,de)}}u&4&&t.stateNode!=null&&(p=t.memoizedProps,Kc(t,p,i!==null?i.memoizedProps:p)),u&1024&&(Yc=!0);break;case 6:if(qt(r,t),It(t),u&4){if(t.stateNode===null)throw Error(l(162));u=t.memoizedProps,i=t.stateNode;try{i.nodeValue=u}catch(de){Fe(t,t.return,de)}}break;case 3:if(oo=null,p=kn,kn=io(r.containerInfo),qt(r,t),kn=p,It(t),u&4&&i!==null&&i.memoizedState.isDehydrated)try{nl(r.containerInfo)}catch(de){Fe(t,t.return,de)}Yc&&(Yc=!1,mm(t));break;case 4:u=kn,kn=io(t.stateNode.containerInfo),qt(r,t),It(t),kn=u;break;case 12:qt(r,t),It(t);break;case 31:qt(r,t),It(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Vs(t,u)));break;case 13:qt(r,t),It(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Gs=Dt()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Vs(t,u)));break;case 22:p=t.memoizedState!==null;var _=i!==null&&i.memoizedState!==null,I=Zn,Q=dt;if(Zn=I||p,dt=Q||_,qt(r,t),dt=Q,Zn=I,It(t),u&8192)e:for(r=t.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(i===null||_||Zn||dt||ar(t)),i=null,r=t;;){if(r.tag===5||r.tag===26){if(i===null){_=i=r;try{if(m=_.stateNode,p)k=m.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{w=_.stateNode;var J=_.memoizedProps.style,$=J!=null&&J.hasOwnProperty("display")?J.display:null;w.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(de){Fe(_,_.return,de)}}}else if(r.tag===6){if(i===null){_=r;try{_.stateNode.nodeValue=p?"":_.memoizedProps}catch(de){Fe(_,_.return,de)}}}else if(r.tag===18){if(i===null){_=r;try{var K=_.stateNode;p?l0(K,!0):l0(_.stateNode,!1)}catch(de){Fe(_,_.return,de)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=t.updateQueue,u!==null&&(i=u.retryQueue,i!==null&&(u.retryQueue=null,Vs(t,i))));break;case 19:qt(r,t),It(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Vs(t,u)));break;case 30:break;case 21:break;default:qt(r,t),It(t)}}function It(t){var r=t.flags;if(r&2){try{for(var i,u=t.return;u!==null;){if(sm(u)){i=u;break}u=u.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var p=i.stateNode,m=Pc(t);Ps(t,m,p);break;case 5:var k=i.stateNode;i.flags&32&&(Cr(k,""),i.flags&=-33);var w=Pc(t);Ps(t,w,k);break;case 3:case 4:var _=i.stateNode.containerInfo,I=Pc(t);Vc(t,I,_);break;default:throw Error(l(161))}}catch(Q){Fe(t,t.return,Q)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function mm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;mm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Wn(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)cm(t,r.alternate,r),r=r.sibling}function ar(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:Sa(4,r,r.return),ar(r);break;case 1:Tn(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&lm(r,r.return,i),ar(r);break;case 27:ri(r.stateNode);case 26:case 5:Tn(r,r.return),ar(r);break;case 22:r.memoizedState===null&&ar(r);break;case 30:ar(r);break;default:ar(r)}t=t.sibling}}function ea(t,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=t,m=r,k=m.flags;switch(m.tag){case 0:case 11:case 15:ea(p,m,i),Gl(4,m);break;case 1:if(ea(p,m,i),u=m,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(I){Fe(u,u.return,I)}if(u=m,p=u.updateQueue,p!==null){var w=u.stateNode;try{var _=p.shared.hiddenCallbacks;if(_!==null)for(p.shared.hiddenCallbacks=null,p=0;p<_.length;p++)Yg(_[p],w)}catch(I){Fe(u,u.return,I)}}i&&k&64&&rm(m),Ql(m,m.return);break;case 27:om(m);case 26:case 5:ea(p,m,i),i&&u===null&&k&4&&im(m),Ql(m,m.return);break;case 12:ea(p,m,i);break;case 31:ea(p,m,i),i&&k&4&&hm(p,m);break;case 13:ea(p,m,i),i&&k&4&&gm(p,m);break;case 22:m.memoizedState===null&&ea(p,m,i),Ql(m,m.return);break;case 30:break;default:ea(p,m,i)}r=r.sibling}}function Gc(t,r){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&zl(i))}function Qc(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&zl(t))}function Sn(t,r,i,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ym(t,r,i,u),r=r.sibling}function ym(t,r,i,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Sn(t,r,i,u),p&2048&&Gl(9,r);break;case 1:Sn(t,r,i,u);break;case 3:Sn(t,r,i,u),p&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&zl(t)));break;case 12:if(p&2048){Sn(t,r,i,u),t=r.stateNode;try{var m=r.memoizedProps,k=m.id,w=m.onPostCommit;typeof w=="function"&&w(k,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(_){Fe(r,r.return,_)}}else Sn(t,r,i,u);break;case 31:Sn(t,r,i,u);break;case 13:Sn(t,r,i,u);break;case 23:break;case 22:m=r.stateNode,k=r.alternate,r.memoizedState!==null?m._visibility&2?Sn(t,r,i,u):Xl(t,r):m._visibility&2?Sn(t,r,i,u):(m._visibility|=2,Pr(t,r,i,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&Gc(k,r);break;case 24:Sn(t,r,i,u),p&2048&&Qc(r.alternate,r);break;default:Sn(t,r,i,u)}}function Pr(t,r,i,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,k=r,w=i,_=u,I=k.flags;switch(k.tag){case 0:case 11:case 15:Pr(m,k,w,_,p),Gl(8,k);break;case 23:break;case 22:var Q=k.stateNode;k.memoizedState!==null?Q._visibility&2?Pr(m,k,w,_,p):Xl(m,k):(Q._visibility|=2,Pr(m,k,w,_,p)),p&&I&2048&&Gc(k.alternate,k);break;case 24:Pr(m,k,w,_,p),p&&I&2048&&Qc(k.alternate,k);break;default:Pr(m,k,w,_,p)}r=r.sibling}}function Xl(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=t,u=r,p=u.flags;switch(u.tag){case 22:Xl(i,u),p&2048&&Gc(u.alternate,u);break;case 24:Xl(i,u),p&2048&&Qc(u.alternate,u);break;default:Xl(i,u)}r=r.sibling}}var Zl=8192;function Vr(t,r,i){if(t.subtreeFlags&Zl)for(t=t.child;t!==null;)xm(t,r,i),t=t.sibling}function xm(t,r,i){switch(t.tag){case 26:Vr(t,r,i),t.flags&Zl&&t.memoizedState!==null&&hS(i,kn,t.memoizedState,t.memoizedProps);break;case 5:Vr(t,r,i);break;case 3:case 4:var u=kn;kn=io(t.stateNode.containerInfo),Vr(t,r,i),kn=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=Zl,Zl=16777216,Vr(t,r,i),Zl=u):Vr(t,r,i));break;default:Vr(t,r,i)}}function bm(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Jl(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var u=r[i];xt=u,km(u,t)}bm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vm(t),t=t.sibling}function vm(t){switch(t.tag){case 0:case 11:case 15:Jl(t),t.flags&2048&&Sa(9,t,t.return);break;case 3:Jl(t);break;case 12:Jl(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Ys(t)):Jl(t);break;default:Jl(t)}}function Ys(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var u=r[i];xt=u,km(u,t)}bm(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:Sa(8,r,r.return),Ys(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Ys(r));break;default:Ys(r)}t=t.sibling}}function km(t,r){for(;xt!==null;){var i=xt;switch(i.tag){case 0:case 11:case 15:Sa(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var u=i.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:zl(i.memoizedState.cache)}if(u=i.child,u!==null)u.return=i,xt=u;else e:for(i=t;xt!==null;){u=xt;var p=u.sibling,m=u.return;if(dm(u),u===i){xt=null;break e}if(p!==null){p.return=m,xt=p;break e}xt=m}}}var Ak={getCacheForType:function(t){var r=jt(ot),i=r.data.get(t);return i===void 0&&(i=t(),r.data.set(t,i)),i},cacheSignal:function(){return jt(ot).controller.signal}},Tk=typeof WeakMap=="function"?WeakMap:Map,Be=0,Qe=null,Ae=null,Me=0,$e=0,Jt=null,wa=!1,Yr=!1,Xc=!1,ta=0,lt=0,ja=0,rr=0,Zc=0,Wt=0,Gr=0,Wl=null,$t=null,Jc=!1,Gs=0,Sm=0,Qs=1/0,Xs=null,Ca=null,pt=0,Na=null,Qr=null,na=0,Wc=0,ed=null,wm=null,ei=0,td=null;function en(){return(Be&2)!==0&&Me!==0?Me&-Me:B.T!==null?sd():Bh()}function jm(){if(Wt===0)if((Me&536870912)===0||Oe){var t=rs;rs<<=1,(rs&3932160)===0&&(rs=262144),Wt=t}else Wt=536870912;return t=Xt.current,t!==null&&(t.flags|=32),Wt}function Ft(t,r,i){(t===Qe&&($e===2||$e===9)||t.cancelPendingCommit!==null)&&(Xr(t,0),Ea(t,Me,Wt,!1)),kl(t,i),((Be&2)===0||t!==Qe)&&(t===Qe&&((Be&2)===0&&(rr|=i),lt===4&&Ea(t,Me,Wt,!1)),_n(t))}function Cm(t,r,i){if((Be&6)!==0)throw Error(l(327));var u=!i&&(r&127)===0&&(r&t.expiredLanes)===0||vl(t,r),p=u?Mk(t,r):ad(t,r,!0),m=u;do{if(p===0){Yr&&!u&&Ea(t,r,0,!1);break}else{if(i=t.current.alternate,m&&!_k(i)){p=ad(t,r,!1),m=!1;continue}if(p===2){if(m=r,t.errorRecoveryDisabledLanes&m)var k=0;else k=t.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){r=k;e:{var w=t;p=Wl;var _=w.current.memoizedState.isDehydrated;if(_&&(Xr(w,k).flags|=256),k=ad(w,k,!1),k!==2){if(Xc&&!_){w.errorRecoveryDisabledLanes|=m,rr|=m,p=4;break e}m=$t,$t=p,m!==null&&($t===null?$t=m:$t.push.apply($t,m))}p=k}if(m=!1,p!==2)continue}}if(p===1){Xr(t,0),Ea(t,r,0,!0);break}e:{switch(u=t,m=p,m){case 0:case 1:throw Error(l(345));case 4:if((r&4194048)!==r)break;case 6:Ea(u,r,Wt,!wa);break e;case 2:$t=null;break;case 3:case 5:break;default:throw Error(l(329))}if((r&62914560)===r&&(p=Gs+300-Dt(),10<p)){if(Ea(u,r,Wt,!wa),is(u,0,!0)!==0)break e;na=r,u.timeoutHandle=n0(Nm.bind(null,u,i,$t,Xs,Jc,r,Wt,rr,Gr,wa,m,"Throttled",-0,0),p);break e}Nm(u,i,$t,Xs,Jc,r,Wt,rr,Gr,wa,m,null,-0,0)}}break}while(!0);_n(t)}function Nm(t,r,i,u,p,m,k,w,_,I,Q,J,$,K){if(t.timeoutHandle=-1,J=r.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},xm(r,m,J);var de=(m&62914560)===m?Gs-Dt():(m&4194048)===m?Sm-Dt():0;if(de=gS(J,de),de!==null){na=m,t.cancelPendingCommit=de(Om.bind(null,t,r,m,i,u,p,k,w,_,Q,J,null,$,K)),Ea(t,m,k,!I);return}}Om(t,r,m,i,u,p,k,w,_)}function _k(t){for(var r=t;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var u=0;u<i.length;u++){var p=i[u],m=p.getSnapshot;p=p.value;try{if(!Gt(m(),p))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ea(t,r,i,u){r&=~Zc,r&=~rr,t.suspendedLanes|=r,t.pingedLanes&=~r,u&&(t.warmLanes|=r),u=t.expirationTimes;for(var p=r;0<p;){var m=31-Ge(p),k=1<<m;u[m]=-1,p&=~k}i!==0&&Lh(t,i,r)}function Zs(){return(Be&6)===0?(ti(0),!1):!0}function nd(){if(Ae!==null){if($e===0)var t=Ae.return;else t=Ae,Pn=Qa=null,xc(t),qr=null,Ul=0,t=Ae;for(;t!==null;)am(t.alternate,t),t=t.return;Ae=null}}function Xr(t,r){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,Xk(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),na=0,nd(),Qe=t,Ae=i=Fn(t.current,null),Me=r,$e=0,Jt=null,wa=!1,Yr=vl(t,r),Xc=!1,Gr=Wt=Zc=rr=ja=lt=0,$t=Wl=null,Jc=!1,(r&8)!==0&&(r|=r&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=r;0<u;){var p=31-Ge(u),m=1<<p;r|=t[p],u&=~m}return ta=r,xs(),i}function Em(t,r){je=null,B.H=Pl,r===Br||r===Ns?(r=Fg(),$e=3):r===ic?(r=Fg(),$e=4):$e=r===Oc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Jt=r,Ae===null&&(lt=1,qs(t,un(r,t.current)))}function Am(){var t=Xt.current;return t===null?!0:(Me&4194048)===Me?hn===null:(Me&62914560)===Me||(Me&536870912)!==0?t===hn:!1}function Tm(){var t=B.H;return B.H=Pl,t===null?Pl:t}function _m(){var t=B.A;return B.A=Ak,t}function Js(){lt=4,wa||(Me&4194048)!==Me&&Xt.current!==null||(Yr=!0),(ja&134217727)===0&&(rr&134217727)===0||Qe===null||Ea(Qe,Me,Wt,!1)}function ad(t,r,i){var u=Be;Be|=2;var p=Tm(),m=_m();(Qe!==t||Me!==r)&&(Xs=null,Xr(t,r)),r=!1;var k=lt;e:do try{if($e!==0&&Ae!==null){var w=Ae,_=Jt;switch($e){case 8:nd(),k=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(r=!0);var I=$e;if($e=0,Jt=null,Zr(t,w,_,I),i&&Yr){k=0;break e}break;default:I=$e,$e=0,Jt=null,Zr(t,w,_,I)}}Dk(),k=lt;break}catch(Q){Em(t,Q)}while(!0);return r&&t.shellSuspendCounter++,Pn=Qa=null,Be=u,B.H=p,B.A=m,Ae===null&&(Qe=null,Me=0,xs()),k}function Dk(){for(;Ae!==null;)Dm(Ae)}function Mk(t,r){var i=Be;Be|=2;var u=Tm(),p=_m();Qe!==t||Me!==r?(Xs=null,Qs=Dt()+500,Xr(t,r)):Yr=vl(t,r);e:do try{if($e!==0&&Ae!==null){r=Ae;var m=Jt;t:switch($e){case 1:$e=0,Jt=null,Zr(t,r,m,1);break;case 2:case 9:if(Ig(m)){$e=0,Jt=null,Mm(r);break}r=function(){$e!==2&&$e!==9||Qe!==t||($e=7),_n(t)},m.then(r,r);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:Ig(m)?($e=0,Jt=null,Mm(r)):($e=0,Jt=null,Zr(t,r,m,7));break;case 5:var k=null;switch(Ae.tag){case 26:k=Ae.memoizedState;case 5:case 27:var w=Ae;if(k?y0(k):w.stateNode.complete){$e=0,Jt=null;var _=w.sibling;if(_!==null)Ae=_;else{var I=w.return;I!==null?(Ae=I,Ws(I)):Ae=null}break t}}$e=0,Jt=null,Zr(t,r,m,5);break;case 6:$e=0,Jt=null,Zr(t,r,m,6);break;case 8:nd(),lt=6;break e;default:throw Error(l(462))}}Rk();break}catch(Q){Em(t,Q)}while(!0);return Pn=Qa=null,B.H=u,B.A=p,Be=i,Ae!==null?0:(Qe=null,Me=0,xs(),lt)}function Rk(){for(;Ae!==null&&!mu();)Dm(Ae)}function Dm(t){var r=tm(t.alternate,t,ta);t.memoizedProps=t.pendingProps,r===null?Ws(t):Ae=r}function Mm(t){var r=t,i=r.alternate;switch(r.tag){case 15:case 0:r=Qp(i,r,r.pendingProps,r.type,void 0,Me);break;case 11:r=Qp(i,r,r.pendingProps,r.type.render,r.ref,Me);break;case 5:xc(r);default:am(i,r),r=Ae=_g(r,ta),r=tm(i,r,ta)}t.memoizedProps=t.pendingProps,r===null?Ws(t):Ae=r}function Zr(t,r,i,u){Pn=Qa=null,xc(r),qr=null,Ul=0;var p=r.return;try{if(kk(t,p,r,i,Me)){lt=1,qs(t,un(i,t.current)),Ae=null;return}}catch(m){if(p!==null)throw Ae=p,m;lt=1,qs(t,un(i,t.current)),Ae=null;return}r.flags&32768?(Oe||u===1?t=!0:Yr||(Me&536870912)!==0?t=!1:(wa=t=!0,(u===2||u===9||u===3||u===6)&&(u=Xt.current,u!==null&&u.tag===13&&(u.flags|=16384))),Rm(r,t)):Ws(r)}function Ws(t){var r=t;do{if((r.flags&32768)!==0){Rm(r,wa);return}t=r.return;var i=jk(r.alternate,r,ta);if(i!==null){Ae=i;return}if(r=r.sibling,r!==null){Ae=r;return}Ae=r=t}while(r!==null);lt===0&&(lt=5)}function Rm(t,r){do{var i=Ck(t.alternate,t);if(i!==null){i.flags&=32767,Ae=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(t=t.sibling,t!==null)){Ae=t;return}Ae=t=i}while(t!==null);lt=6,Ae=null}function Om(t,r,i,u,p,m,k,w,_){t.cancelPendingCommit=null;do eo();while(pt!==0);if((Be&6)!==0)throw Error(l(327));if(r!==null){if(r===t.current)throw Error(l(177));if(m=r.lanes|r.childLanes,m|=Pu,fv(t,i,m,k,w,_),t===Qe&&(Ae=Qe=null,Me=0),Qr=r,Na=t,na=i,Wc=m,ed=p,wm=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Uk(ve,function(){return Bm(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=B.T,B.T=null,p=te.p,te.p=2,k=Be,Be|=4;try{Nk(t,r,i)}finally{Be=k,te.p=p,B.T=u}}pt=1,zm(),Lm(),Um()}}function zm(){if(pt===1){pt=0;var t=Na,r=Qr,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var u=te.p;te.p=2;var p=Be;Be|=4;try{pm(r,t);var m=pd,k=kg(t.containerInfo),w=m.focusedElem,_=m.selectionRange;if(k!==w&&w&&w.ownerDocument&&vg(w.ownerDocument.documentElement,w)){if(_!==null&&qu(w)){var I=_.start,Q=_.end;if(Q===void 0&&(Q=I),"selectionStart"in w)w.selectionStart=I,w.selectionEnd=Math.min(Q,w.value.length);else{var J=w.ownerDocument||document,$=J&&J.defaultView||window;if($.getSelection){var K=$.getSelection(),de=w.textContent.length,be=Math.min(_.start,de),Ye=_.end===void 0?be:Math.min(_.end,de);!K.extend&&be>Ye&&(k=Ye,Ye=be,be=k);var U=bg(w,be),O=bg(w,Ye);if(U&&O&&(K.rangeCount!==1||K.anchorNode!==U.node||K.anchorOffset!==U.offset||K.focusNode!==O.node||K.focusOffset!==O.offset)){var q=J.createRange();q.setStart(U.node,U.offset),K.removeAllRanges(),be>Ye?(K.addRange(q),K.extend(O.node,O.offset)):(q.setEnd(O.node,O.offset),K.addRange(q))}}}}for(J=[],K=w;K=K.parentNode;)K.nodeType===1&&J.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<J.length;w++){var Z=J[w];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}ho=!!gd,pd=gd=null}finally{Be=p,te.p=u,B.T=i}}t.current=r,pt=2}}function Lm(){if(pt===2){pt=0;var t=Na,r=Qr,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var u=te.p;te.p=2;var p=Be;Be|=4;try{cm(t,r.alternate,r)}finally{Be=p,te.p=u,B.T=i}}pt=3}}function Um(){if(pt===4||pt===3){pt=0,yu();var t=Na,r=Qr,i=na,u=wm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?pt=5:(pt=0,Qr=Na=null,Hm(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(Ca=null),ku(i),r=r.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Mt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=B.T,p=te.p,te.p=2,B.T=null;try{for(var m=t.onRecoverableError,k=0;k<u.length;k++){var w=u[k];m(w.value,{componentStack:w.stack})}}finally{B.T=r,te.p=p}}(na&3)!==0&&eo(),_n(t),p=t.pendingLanes,(i&261930)!==0&&(p&42)!==0?t===td?ei++:(ei=0,td=t):ei=0,ti(0)}}function Hm(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,zl(r)))}function eo(){return zm(),Lm(),Um(),Bm()}function Bm(){if(pt!==5)return!1;var t=Na,r=Wc;Wc=0;var i=ku(na),u=B.T,p=te.p;try{te.p=32>i?32:i,B.T=null,i=ed,ed=null;var m=Na,k=na;if(pt=0,Qr=Na=null,na=0,(Be&6)!==0)throw Error(l(331));var w=Be;if(Be|=4,vm(m.current),ym(m,m.current,k,i),Be=w,ti(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Mt,m)}catch{}return!0}finally{te.p=p,B.T=u,Hm(t,r)}}function qm(t,r,i){r=un(i,r),r=Rc(t.stateNode,r,2),t=ba(t,r,2),t!==null&&(kl(t,2),_n(t))}function Fe(t,r,i){if(t.tag===3)qm(t,t,i);else for(;r!==null;){if(r.tag===3){qm(r,t,i);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ca===null||!Ca.has(u))){t=un(i,t),i=Ip(2),u=ba(r,i,2),u!==null&&($p(i,u,r,t),kl(u,2),_n(u));break}}r=r.return}}function rd(t,r,i){var u=t.pingCache;if(u===null){u=t.pingCache=new Tk;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(i)||(Xc=!0,p.add(i),t=Ok.bind(null,t,r,i),r.then(t,t))}function Ok(t,r,i){var u=t.pingCache;u!==null&&u.delete(r),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Qe===t&&(Me&i)===i&&(lt===4||lt===3&&(Me&62914560)===Me&&300>Dt()-Gs?(Be&2)===0&&Xr(t,0):Zc|=i,Gr===Me&&(Gr=0)),_n(t)}function Im(t,r){r===0&&(r=zh()),t=Va(t,r),t!==null&&(kl(t,r),_n(t))}function zk(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),Im(t,i)}function Lk(t,r){var i=0;switch(t.tag){case 31:case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(i=p.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(l(314))}u!==null&&u.delete(r),Im(t,i)}function Uk(t,r){return xr(t,r)}var to=null,Jr=null,ld=!1,no=!1,id=!1,Aa=0;function _n(t){t!==Jr&&t.next===null&&(Jr===null?to=Jr=t:Jr=Jr.next=t),no=!0,ld||(ld=!0,Bk())}function ti(t,r){if(!id&&no){id=!0;do for(var i=!1,u=to;u!==null;){if(t!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var k=u.suspendedLanes,w=u.pingedLanes;m=(1<<31-Ge(42|t)+1)-1,m&=p&~(k&~w),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,Pm(u,m))}else m=Me,m=is(u,u===Qe?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||vl(u,m)||(i=!0,Pm(u,m));u=u.next}while(i);id=!1}}function Hk(){$m()}function $m(){no=ld=!1;var t=0;Aa!==0&&Qk()&&(t=Aa);for(var r=Dt(),i=null,u=to;u!==null;){var p=u.next,m=Fm(u,r);m===0?(u.next=null,i===null?to=p:i.next=p,p===null&&(Jr=i)):(i=u,(t!==0||(m&3)!==0)&&(no=!0)),u=p}pt!==0&&pt!==5||ti(t),Aa!==0&&(Aa=0)}function Fm(t,r){for(var i=t.suspendedLanes,u=t.pingedLanes,p=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var k=31-Ge(m),w=1<<k,_=p[k];_===-1?((w&i)===0||(w&u)!==0)&&(p[k]=dv(w,r)):_<=r&&(t.expiredLanes|=w),m&=~w}if(r=Qe,i=Me,i=is(t,t===r?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,i===0||t===r&&($e===2||$e===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&bl(u),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||vl(t,i)){if(r=i&-i,r===t.callbackPriority)return r;switch(u!==null&&bl(u),ku(i)){case 2:case 8:i=le;break;case 32:i=ve;break;case 268435456:i=qe;break;default:i=ve}return u=Km.bind(null,t),i=xr(i,u),t.callbackPriority=r,t.callbackNode=i,r}return u!==null&&u!==null&&bl(u),t.callbackPriority=2,t.callbackNode=null,2}function Km(t,r){if(pt!==0&&pt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(eo()&&t.callbackNode!==i)return null;var u=Me;return u=is(t,t===Qe?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(Cm(t,u,r),Fm(t,Dt()),t.callbackNode!=null&&t.callbackNode===i?Km.bind(null,t):null)}function Pm(t,r){if(eo())return null;Cm(t,r,!0)}function Bk(){Zk(function(){(Be&6)!==0?xr(X,Hk):$m()})}function sd(){if(Aa===0){var t=Ur;t===0&&(t=as,as<<=1,(as&261888)===0&&(as=256)),Aa=t}return Aa}function Vm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:cs(""+t)}function Ym(t,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,t.id&&i.setAttribute("form",t.id),r.parentNode.insertBefore(i,r),t=new FormData(t),i.parentNode.removeChild(i),t}function qk(t,r,i,u,p){if(r==="submit"&&i&&i.stateNode===p){var m=Vm((p[Ut]||null).action),k=u.submitter;k&&(r=(r=k[Ut]||null)?Vm(r.formAction):k.getAttribute("formAction"),r!==null&&(m=r,k=null));var w=new gs("action","action",null,u,p);t.push({event:w,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Aa!==0){var _=k?Ym(p,k):new FormData(p);Ec(i,{pending:!0,data:_,method:p.method,action:m},null,_)}}else typeof m=="function"&&(w.preventDefault(),_=k?Ym(p,k):new FormData(p),Ec(i,{pending:!0,data:_,method:p.method,action:m},m,_))},currentTarget:p}]})}}for(var od=0;od<Ku.length;od++){var ud=Ku[od],Ik=ud.toLowerCase(),$k=ud[0].toUpperCase()+ud.slice(1);vn(Ik,"on"+$k)}vn(jg,"onAnimationEnd"),vn(Cg,"onAnimationIteration"),vn(Ng,"onAnimationStart"),vn("dblclick","onDoubleClick"),vn("focusin","onFocus"),vn("focusout","onBlur"),vn(rk,"onTransitionRun"),vn(lk,"onTransitionStart"),vn(ik,"onTransitionCancel"),vn(Eg,"onTransitionEnd"),wr("onMouseEnter",["mouseout","mouseover"]),wr("onMouseLeave",["mouseout","mouseover"]),wr("onPointerEnter",["pointerout","pointerover"]),wr("onPointerLeave",["pointerout","pointerover"]),$a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$a("onBeforeInput",["compositionend","keypress","textInput","paste"]),$a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ni="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(" "),Fk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ni));function Gm(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var u=t[i],p=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var k=u.length-1;0<=k;k--){var w=u[k],_=w.instance,I=w.currentTarget;if(w=w.listener,_!==m&&p.isPropagationStopped())break e;m=w,p.currentTarget=I;try{m(p)}catch(Q){ys(Q)}p.currentTarget=null,m=_}else for(k=0;k<u.length;k++){if(w=u[k],_=w.instance,I=w.currentTarget,w=w.listener,_!==m&&p.isPropagationStopped())break e;m=w,p.currentTarget=I;try{m(p)}catch(Q){ys(Q)}p.currentTarget=null,m=_}}}}function Te(t,r){var i=r[Su];i===void 0&&(i=r[Su]=new Set);var u=t+"__bubble";i.has(u)||(Qm(r,t,2,!1),i.add(u))}function cd(t,r,i){var u=0;r&&(u|=4),Qm(i,t,u,r)}var ao="_reactListening"+Math.random().toString(36).slice(2);function dd(t){if(!t[ao]){t[ao]=!0,$h.forEach(function(i){i!=="selectionchange"&&(Fk.has(i)||cd(i,!1,t),cd(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[ao]||(r[ao]=!0,cd("selectionchange",!1,r))}}function Qm(t,r,i,u){switch(j0(r)){case 2:var p=yS;break;case 8:p=xS;break;default:p=Nd}i=p.bind(null,r,i,t),p=void 0,!Du||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?t.addEventListener(r,i,{capture:!0,passive:p}):t.addEventListener(r,i,!0):p!==void 0?t.addEventListener(r,i,{passive:p}):t.addEventListener(r,i,!1)}function fd(t,r,i,u,p){var m=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var k=u.tag;if(k===3||k===4){var w=u.stateNode.containerInfo;if(w===p)break;if(k===4)for(k=u.return;k!==null;){var _=k.tag;if((_===3||_===4)&&k.stateNode.containerInfo===p)return;k=k.return}for(;w!==null;){if(k=vr(w),k===null)return;if(_=k.tag,_===5||_===6||_===26||_===27){u=m=k;continue e}w=w.parentNode}}u=u.return}eg(function(){var I=m,Q=Tu(i),J=[];e:{var $=Ag.get(t);if($!==void 0){var K=gs,de=t;switch(t){case"keypress":if(fs(i)===0)break e;case"keydown":case"keyup":K=Lv;break;case"focusin":de="focus",K=zu;break;case"focusout":de="blur",K=zu;break;case"beforeblur":case"afterblur":K=zu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=ag;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=jv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Bv;break;case jg:case Cg:case Ng:K=Ev;break;case Eg:K=Iv;break;case"scroll":case"scrollend":K=Sv;break;case"wheel":K=Fv;break;case"copy":case"cut":case"paste":K=Tv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=lg;break;case"toggle":case"beforetoggle":K=Pv}var be=(r&4)!==0,Ye=!be&&(t==="scroll"||t==="scrollend"),U=be?$!==null?$+"Capture":null:$;be=[];for(var O=I,q;O!==null;){var Z=O;if(q=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||q===null||U===null||(Z=jl(O,U),Z!=null&&be.push(ai(O,Z,q))),Ye)break;O=O.return}0<be.length&&($=new K($,de,null,i,Q),J.push({event:$,listeners:be}))}}if((r&7)===0){e:{if($=t==="mouseover"||t==="pointerover",K=t==="mouseout"||t==="pointerout",$&&i!==Au&&(de=i.relatedTarget||i.fromElement)&&(vr(de)||de[br]))break e;if((K||$)&&($=Q.window===Q?Q:($=Q.ownerDocument)?$.defaultView||$.parentWindow:window,K?(de=i.relatedTarget||i.toElement,K=I,de=de?vr(de):null,de!==null&&(Ye=o(de),be=de.tag,de!==Ye||be!==5&&be!==27&&be!==6)&&(de=null)):(K=null,de=I),K!==de)){if(be=ag,Z="onMouseLeave",U="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(be=lg,Z="onPointerLeave",U="onPointerEnter",O="pointer"),Ye=K==null?$:wl(K),q=de==null?$:wl(de),$=new be(Z,O+"leave",K,i,Q),$.target=Ye,$.relatedTarget=q,Z=null,vr(Q)===I&&(be=new be(U,O+"enter",de,i,Q),be.target=q,be.relatedTarget=Ye,Z=be),Ye=Z,K&&de)t:{for(be=Kk,U=K,O=de,q=0,Z=U;Z;Z=be(Z))q++;Z=0;for(var pe=O;pe;pe=be(pe))Z++;for(;0<q-Z;)U=be(U),q--;for(;0<Z-q;)O=be(O),Z--;for(;q--;){if(U===O||O!==null&&U===O.alternate){be=U;break t}U=be(U),O=be(O)}be=null}else be=null;K!==null&&Xm(J,$,K,be,!1),de!==null&&Ye!==null&&Xm(J,Ye,de,be,!0)}}e:{if($=I?wl(I):window,K=$.nodeName&&$.nodeName.toLowerCase(),K==="select"||K==="input"&&$.type==="file")var Ue=hg;else if(dg($))if(gg)Ue=tk;else{Ue=Wv;var fe=Jv}else K=$.nodeName,!K||K.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?I&&Eu(I.elementType)&&(Ue=hg):Ue=ek;if(Ue&&(Ue=Ue(t,I))){fg(J,Ue,i,Q);break e}fe&&fe(t,$,I),t==="focusout"&&I&&$.type==="number"&&I.memoizedProps.value!=null&&Nu($,"number",$.value)}switch(fe=I?wl(I):window,t){case"focusin":(dg(fe)||fe.contentEditable==="true")&&(Tr=fe,Iu=I,Ml=null);break;case"focusout":Ml=Iu=Tr=null;break;case"mousedown":$u=!0;break;case"contextmenu":case"mouseup":case"dragend":$u=!1,Sg(J,i,Q);break;case"selectionchange":if(ak)break;case"keydown":case"keyup":Sg(J,i,Q)}var Ce;if(Uu)e:{switch(t){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Ar?ug(t,i)&&(Re="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(Re="onCompositionStart");Re&&(ig&&i.locale!=="ko"&&(Ar||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Ar&&(Ce=tg()):(fa=Q,Mu="value"in fa?fa.value:fa.textContent,Ar=!0)),fe=ro(I,Re),0<fe.length&&(Re=new rg(Re,t,null,i,Q),J.push({event:Re,listeners:fe}),Ce?Re.data=Ce:(Ce=cg(i),Ce!==null&&(Re.data=Ce)))),(Ce=Yv?Gv(t,i):Qv(t,i))&&(Re=ro(I,"onBeforeInput"),0<Re.length&&(fe=new rg("onBeforeInput","beforeinput",null,i,Q),J.push({event:fe,listeners:Re}),fe.data=Ce)),qk(J,t,I,i,Q)}Gm(J,r)})}function ai(t,r,i){return{instance:t,listener:r,currentTarget:i}}function ro(t,r){for(var i=r+"Capture",u=[];t!==null;){var p=t,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=jl(t,i),p!=null&&u.unshift(ai(t,p,m)),p=jl(t,r),p!=null&&u.push(ai(t,p,m))),t.tag===3)return u;t=t.return}return[]}function Kk(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Xm(t,r,i,u,p){for(var m=r._reactName,k=[];i!==null&&i!==u;){var w=i,_=w.alternate,I=w.stateNode;if(w=w.tag,_!==null&&_===u)break;w!==5&&w!==26&&w!==27||I===null||(_=I,p?(I=jl(i,m),I!=null&&k.unshift(ai(i,I,_))):p||(I=jl(i,m),I!=null&&k.push(ai(i,I,_)))),i=i.return}k.length!==0&&t.push({event:r,listeners:k})}var Pk=/\r\n?/g,Vk=/\u0000|\uFFFD/g;function Zm(t){return(typeof t=="string"?t:""+t).replace(Pk,`
|
|
50
|
-
`).replace(Vk,"")}function Jm(t,r){return r=Zm(r),Zm(t)===r}function Ve(t,r,i,u,p,m){switch(i){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Cr(t,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Cr(t,""+u);break;case"className":os(t,"class",u);break;case"tabIndex":os(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":os(t,i,u);break;case"style":Jh(t,u,m);break;case"data":if(r!=="object"){os(t,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||i!=="href")){t.removeAttribute(i);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(i);break}u=cs(""+u),t.setAttribute(i,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(i,"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 m=="function"&&(i==="formAction"?(r!=="input"&&Ve(t,r,"name",p.name,p,null),Ve(t,r,"formEncType",p.formEncType,p,null),Ve(t,r,"formMethod",p.formMethod,p,null),Ve(t,r,"formTarget",p.formTarget,p,null)):(Ve(t,r,"encType",p.encType,p,null),Ve(t,r,"method",p.method,p,null),Ve(t,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(i);break}u=cs(""+u),t.setAttribute(i,u);break;case"onClick":u!=null&&(t.onclick=In);break;case"onScroll":u!=null&&Te("scroll",t);break;case"onScrollEnd":u!=null&&Te("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(i=u.__html,i!=null){if(p.children!=null)throw Error(l(60));t.innerHTML=i}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}i=cs(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(i,""+u):t.removeAttribute(i);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":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":u===!0?t.setAttribute(i,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(i,u):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(i,u):t.removeAttribute(i);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(i):t.setAttribute(i,u);break;case"popover":Te("beforetoggle",t),Te("toggle",t),ss(t,"popover",u);break;case"xlinkActuate":qn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":qn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":qn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":qn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":qn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":qn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":qn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":qn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":qn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":ss(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=vv.get(i)||i,ss(t,i,u))}}function hd(t,r,i,u,p,m){switch(i){case"style":Jh(t,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(i=u.__html,i!=null){if(p.children!=null)throw Error(l(60));t.innerHTML=i}}break;case"children":typeof u=="string"?Cr(t,u):(typeof u=="number"||typeof u=="bigint")&&Cr(t,""+u);break;case"onScroll":u!=null&&Te("scroll",t);break;case"onScrollEnd":u!=null&&Te("scrollend",t);break;case"onClick":u!=null&&(t.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),r=i.slice(2,p?i.length-7:void 0),m=t[Ut]||null,m=m!=null?m[i]:null,typeof m=="function"&&t.removeEventListener(r,m,p),typeof u=="function")){typeof m!="function"&&m!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(r,u,p);break e}i in t?t[i]=u:u===!0?t.setAttribute(i,""):ss(t,i,u)}}}function Nt(t,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",t),Te("load",t);var u=!1,p=!1,m;for(m in i)if(i.hasOwnProperty(m)){var k=i[m];if(k!=null)switch(m){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Ve(t,r,m,k,i,null)}}p&&Ve(t,r,"srcSet",i.srcSet,i,null),u&&Ve(t,r,"src",i.src,i,null);return;case"input":Te("invalid",t);var w=m=k=p=null,_=null,I=null;for(u in i)if(i.hasOwnProperty(u)){var Q=i[u];if(Q!=null)switch(u){case"name":p=Q;break;case"type":k=Q;break;case"checked":_=Q;break;case"defaultChecked":I=Q;break;case"value":m=Q;break;case"defaultValue":w=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(l(137,r));break;default:Ve(t,r,u,Q,i,null)}}Gh(t,m,w,_,I,k,p,!1);return;case"select":Te("invalid",t),u=k=m=null;for(p in i)if(i.hasOwnProperty(p)&&(w=i[p],w!=null))switch(p){case"value":m=w;break;case"defaultValue":k=w;break;case"multiple":u=w;default:Ve(t,r,p,w,i,null)}r=m,i=k,t.multiple=!!u,r!=null?jr(t,!!u,r,!1):i!=null&&jr(t,!!u,i,!0);return;case"textarea":Te("invalid",t),m=p=u=null;for(k in i)if(i.hasOwnProperty(k)&&(w=i[k],w!=null))switch(k){case"value":u=w;break;case"defaultValue":p=w;break;case"children":m=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(l(91));break;default:Ve(t,r,k,w,i,null)}Xh(t,u,p,m);return;case"option":for(_ in i)if(i.hasOwnProperty(_)&&(u=i[_],u!=null))switch(_){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Ve(t,r,_,u,i,null)}return;case"dialog":Te("beforetoggle",t),Te("toggle",t),Te("cancel",t),Te("close",t);break;case"iframe":case"object":Te("load",t);break;case"video":case"audio":for(u=0;u<ni.length;u++)Te(ni[u],t);break;case"image":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"embed":case"source":case"link":Te("error",t),Te("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in i)if(i.hasOwnProperty(I)&&(u=i[I],u!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Ve(t,r,I,u,i,null)}return;default:if(Eu(r)){for(Q in i)i.hasOwnProperty(Q)&&(u=i[Q],u!==void 0&&hd(t,r,Q,u,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(u=i[w],u!=null&&Ve(t,r,w,u,i,null))}function Yk(t,r,i,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,m=null,k=null,w=null,_=null,I=null,Q=null;for(K in i){var J=i[K];if(i.hasOwnProperty(K)&&J!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":_=J;default:u.hasOwnProperty(K)||Ve(t,r,K,null,u,J)}}for(var $ in u){var K=u[$];if(J=i[$],u.hasOwnProperty($)&&(K!=null||J!=null))switch($){case"type":m=K;break;case"name":p=K;break;case"checked":I=K;break;case"defaultChecked":Q=K;break;case"value":k=K;break;case"defaultValue":w=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(l(137,r));break;default:K!==J&&Ve(t,r,$,K,u,J)}}Cu(t,k,w,_,I,Q,m,p);return;case"select":K=k=w=$=null;for(m in i)if(_=i[m],i.hasOwnProperty(m)&&_!=null)switch(m){case"value":break;case"multiple":K=_;default:u.hasOwnProperty(m)||Ve(t,r,m,null,u,_)}for(p in u)if(m=u[p],_=i[p],u.hasOwnProperty(p)&&(m!=null||_!=null))switch(p){case"value":$=m;break;case"defaultValue":w=m;break;case"multiple":k=m;default:m!==_&&Ve(t,r,p,m,u,_)}r=w,i=k,u=K,$!=null?jr(t,!!i,$,!1):!!u!=!!i&&(r!=null?jr(t,!!i,r,!0):jr(t,!!i,i?[]:"",!1));return;case"textarea":K=$=null;for(w in i)if(p=i[w],i.hasOwnProperty(w)&&p!=null&&!u.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Ve(t,r,w,null,u,p)}for(k in u)if(p=u[k],m=i[k],u.hasOwnProperty(k)&&(p!=null||m!=null))switch(k){case"value":$=p;break;case"defaultValue":K=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(l(91));break;default:p!==m&&Ve(t,r,k,p,u,m)}Qh(t,$,K);return;case"option":for(var de in i)if($=i[de],i.hasOwnProperty(de)&&$!=null&&!u.hasOwnProperty(de))switch(de){case"selected":t.selected=!1;break;default:Ve(t,r,de,null,u,$)}for(_ in u)if($=u[_],K=i[_],u.hasOwnProperty(_)&&$!==K&&($!=null||K!=null))switch(_){case"selected":t.selected=$&&typeof $!="function"&&typeof $!="symbol";break;default:Ve(t,r,_,$,u,K)}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 be in i)$=i[be],i.hasOwnProperty(be)&&$!=null&&!u.hasOwnProperty(be)&&Ve(t,r,be,null,u,$);for(I in u)if($=u[I],K=i[I],u.hasOwnProperty(I)&&$!==K&&($!=null||K!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(l(137,r));break;default:Ve(t,r,I,$,u,K)}return;default:if(Eu(r)){for(var Ye in i)$=i[Ye],i.hasOwnProperty(Ye)&&$!==void 0&&!u.hasOwnProperty(Ye)&&hd(t,r,Ye,void 0,u,$);for(Q in u)$=u[Q],K=i[Q],!u.hasOwnProperty(Q)||$===K||$===void 0&&K===void 0||hd(t,r,Q,$,u,K);return}}for(var U in i)$=i[U],i.hasOwnProperty(U)&&$!=null&&!u.hasOwnProperty(U)&&Ve(t,r,U,null,u,$);for(J in u)$=u[J],K=i[J],!u.hasOwnProperty(J)||$===K||$==null&&K==null||Ve(t,r,J,$,u,K)}function Wm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gk(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,i=performance.getEntriesByType("resource"),u=0;u<i.length;u++){var p=i[u],m=p.transferSize,k=p.initiatorType,w=p.duration;if(m&&w&&Wm(k)){for(k=0,w=p.responseEnd,u+=1;u<i.length;u++){var _=i[u],I=_.startTime;if(I>w)break;var Q=_.transferSize,J=_.initiatorType;Q&&Wm(J)&&(_=_.responseEnd,k+=Q*(_<w?1:(w-I)/(_-I)))}if(--u,r+=8*(m+k)/(p.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var gd=null,pd=null;function lo(t){return t.nodeType===9?t:t.ownerDocument}function e0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function t0(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function md(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var yd=null;function Qk(){var t=window.event;return t&&t.type==="popstate"?t===yd?!1:(yd=t,!0):(yd=null,!1)}var n0=typeof setTimeout=="function"?setTimeout:void 0,Xk=typeof clearTimeout=="function"?clearTimeout:void 0,a0=typeof Promise=="function"?Promise:void 0,Zk=typeof queueMicrotask=="function"?queueMicrotask:typeof a0<"u"?function(t){return a0.resolve(null).then(t).catch(Jk)}:n0;function Jk(t){setTimeout(function(){throw t})}function Ta(t){return t==="head"}function r0(t,r){var i=r,u=0;do{var p=i.nextSibling;if(t.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"||i==="/&"){if(u===0){t.removeChild(p),nl(r);return}u--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")u++;else if(i==="html")ri(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,ri(i);for(var m=i.firstChild;m;){var k=m.nextSibling,w=m.nodeName;m[Sl]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=k}}else i==="body"&&ri(t.ownerDocument.body);i=p}while(i);nl(r)}function l0(t,r){var i=t;t=0;do{var u=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=u}while(i)}function xd(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":xd(i),wu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function Wk(t,r,i,u){for(;t.nodeType===1;){var p=i;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[Sl])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=gn(t.nextSibling),t===null)break}return null}function eS(t,r,i){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=gn(t.nextSibling),t===null))return null;return t}function i0(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=gn(t.nextSibling),t===null))return null;return t}function bd(t){return t.data==="$?"||t.data==="$~"}function vd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function tS(t,r){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||i.readyState!=="loading")r();else{var u=function(){r(),i.removeEventListener("DOMContentLoaded",u)};i.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function gn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var kd=null;function s0(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(r===0)return gn(t.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}t=t.nextSibling}return null}function o0(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return t;r--}else i!=="/$"&&i!=="/&"||r++}t=t.previousSibling}return null}function u0(t,r,i){switch(r=lo(i),t){case"html":if(t=r.documentElement,!t)throw Error(l(452));return t;case"head":if(t=r.head,!t)throw Error(l(453));return t;case"body":if(t=r.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function ri(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);wu(t)}var pn=new Map,c0=new Set;function io(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var aa=te.d;te.d={f:nS,r:aS,D:rS,C:lS,L:iS,m:sS,X:uS,S:oS,M:cS};function nS(){var t=aa.f(),r=Zs();return t||r}function aS(t){var r=kr(t);r!==null&&r.tag===5&&r.type==="form"?Ep(r):aa.r(t)}var Wr=typeof document>"u"?null:document;function d0(t,r,i){var u=Wr;if(u&&typeof r=="string"&&r){var p=sn(r);p='link[rel="'+t+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),c0.has(p)||(c0.add(p),t={rel:t,crossOrigin:i,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),Nt(r,"link",t),yt(r),u.head.appendChild(r)))}}function rS(t){aa.D(t),d0("dns-prefetch",t,null)}function lS(t,r){aa.C(t,r),d0("preconnect",t,r)}function iS(t,r,i){aa.L(t,r,i);var u=Wr;if(u&&t&&r){var p='link[rel="preload"][as="'+sn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+sn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+sn(i.imageSizes)+'"]')):p+='[href="'+sn(t)+'"]';var m=p;switch(r){case"style":m=el(t);break;case"script":m=tl(t)}pn.has(m)||(t=y({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:t,as:r},i),pn.set(m,t),u.querySelector(p)!==null||r==="style"&&u.querySelector(li(m))||r==="script"&&u.querySelector(ii(m))||(r=u.createElement("link"),Nt(r,"link",t),yt(r),u.head.appendChild(r)))}}function sS(t,r){aa.m(t,r);var i=Wr;if(i&&t){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+sn(u)+'"][href="'+sn(t)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=tl(t)}if(!pn.has(m)&&(t=y({rel:"modulepreload",href:t},r),pn.set(m,t),i.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ii(m)))return}u=i.createElement("link"),Nt(u,"link",t),yt(u),i.head.appendChild(u)}}}function oS(t,r,i){aa.S(t,r,i);var u=Wr;if(u&&t){var p=Sr(u).hoistableStyles,m=el(t);r=r||"default";var k=p.get(m);if(!k){var w={loading:0,preload:null};if(k=u.querySelector(li(m)))w.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":r},i),(i=pn.get(m))&&Sd(t,i);var _=k=u.createElement("link");yt(_),Nt(_,"link",t),_._p=new Promise(function(I,Q){_.onload=I,_.onerror=Q}),_.addEventListener("load",function(){w.loading|=1}),_.addEventListener("error",function(){w.loading|=2}),w.loading|=4,so(k,r,u)}k={type:"stylesheet",instance:k,count:1,state:w},p.set(m,k)}}}function uS(t,r){aa.X(t,r);var i=Wr;if(i&&t){var u=Sr(i).hoistableScripts,p=tl(t),m=u.get(p);m||(m=i.querySelector(ii(p)),m||(t=y({src:t,async:!0},r),(r=pn.get(p))&&wd(t,r),m=i.createElement("script"),yt(m),Nt(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function cS(t,r){aa.M(t,r);var i=Wr;if(i&&t){var u=Sr(i).hoistableScripts,p=tl(t),m=u.get(p);m||(m=i.querySelector(ii(p)),m||(t=y({src:t,async:!0,type:"module"},r),(r=pn.get(p))&&wd(t,r),m=i.createElement("script"),yt(m),Nt(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function f0(t,r,i,u){var p=(p=ge.current)?io(p):null;if(!p)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=el(i.href),i=Sr(p).hoistableStyles,u=i.get(r),u||(u={type:"style",instance:null,count:0,state:null},i.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=el(i.href);var m=Sr(p).hoistableStyles,k=m.get(t);if(k||(p=p.ownerDocument||p,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,k),(m=p.querySelector(li(t)))&&!m._p&&(k.instance=m,k.state.loading=5),pn.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},pn.set(t,i),m||dS(p,t,i,k.state))),r&&u===null)throw Error(l(528,""));return k}if(r&&u!==null)throw Error(l(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=tl(i),i=Sr(p).hoistableScripts,u=i.get(r),u||(u={type:"script",instance:null,count:0,state:null},i.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function el(t){return'href="'+sn(t)+'"'}function li(t){return'link[rel="stylesheet"]['+t+"]"}function h0(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function dS(t,r,i,u){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=t.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),Nt(r,"link",i),yt(r),t.head.appendChild(r))}function tl(t){return'[src="'+sn(t)+'"]'}function ii(t){return"script[async]"+t}function g0(t,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var u=t.querySelector('style[data-href~="'+sn(i.href)+'"]');if(u)return r.instance=u,yt(u),u;var p=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),yt(u),Nt(u,"style",p),so(u,i.precedence,t),r.instance=u;case"stylesheet":p=el(i.href);var m=t.querySelector(li(p));if(m)return r.state.loading|=4,r.instance=m,yt(m),m;u=h0(i),(p=pn.get(p))&&Sd(u,p),m=(t.ownerDocument||t).createElement("link"),yt(m);var k=m;return k._p=new Promise(function(w,_){k.onload=w,k.onerror=_}),Nt(m,"link",u),r.state.loading|=4,so(m,i.precedence,t),r.instance=m;case"script":return m=tl(i.src),(p=t.querySelector(ii(m)))?(r.instance=p,yt(p),p):(u=i,(p=pn.get(m))&&(u=y({},i),wd(u,p)),t=t.ownerDocument||t,p=t.createElement("script"),yt(p),Nt(p,"link",u),t.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(l(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,so(u,i.precedence,t));return r.instance}function so(t,r,i){for(var u=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,k=0;k<u.length;k++){var w=u[k];if(w.dataset.precedence===r)m=w;else if(m!==p)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(t,r.firstChild))}function Sd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function wd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var oo=null;function p0(t,r,i){if(oo===null){var u=new Map,p=oo=new Map;p.set(i,u)}else p=oo,u=p.get(i),u||(u=new Map,p.set(i,u));if(u.has(t))return u;for(u.set(t,null),i=i.getElementsByTagName(t),p=0;p<i.length;p++){var m=i[p];if(!(m[Sl]||m[St]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var k=m.getAttribute(r)||"";k=t+k;var w=u.get(k);w?w.push(m):u.set(k,[m])}}return u}function m0(t,r,i){t=t.ownerDocument||t,t.head.insertBefore(i,r==="title"?t.querySelector("head > title"):null)}function fS(t,r,i){if(i===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function y0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function hS(t,r,i,u){if(i.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var p=el(u.href),m=r.querySelector(li(p));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=uo.bind(t),r.then(t,t)),i.state.loading|=4,i.instance=m,yt(m);return}m=r.ownerDocument||r,u=h0(u),(p=pn.get(p))&&Sd(u,p),m=m.createElement("link"),yt(m);var k=m;k._p=new Promise(function(w,_){k.onload=w,k.onerror=_}),Nt(m,"link",u),i.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=uo.bind(t),r.addEventListener("load",i),r.addEventListener("error",i))}}var jd=0;function gS(t,r){return t.stylesheets&&t.count===0&&fo(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var u=setTimeout(function(){if(t.stylesheets&&fo(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&jd===0&&(jd=62500*Gk());var p=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&fo(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>jd?50:800)+r);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var co=null;function fo(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,co=new Map,r.forEach(pS,t),co=null,uo.call(t))}function pS(t,r){if(!(r.state.loading&4)){var i=co.get(t);if(i)var u=i.get(null);else{i=new Map,co.set(t,i);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var k=p[m];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(i.set(k.dataset.precedence,k),u=k)}u&&i.set(null,u)}p=r.instance,k=p.getAttribute("data-precedence"),m=i.get(k)||u,m===u&&i.set(null,p),i.set(k,p),this.count++,u=uo.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),m?m.parentNode.insertBefore(p,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),r.state.loading|=4}}var si={$$typeof:D,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function mS(t,r,i,u,p,m,k,w,_){this.tag=1,this.containerInfo=t,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=bu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bu(0),this.hiddenUpdates=bu(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=m,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function x0(t,r,i,u,p,m,k,w,_,I,Q,J){return t=new mS(t,r,i,k,_,I,Q,J,w),r=1,m===!0&&(r|=24),m=Qt(3,null,null,r),t.current=m,m.stateNode=t,r=ac(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:i,cache:r},sc(m),t}function b0(t){return t?(t=Mr,t):Mr}function v0(t,r,i,u,p,m){p=b0(p),u.context===null?u.context=p:u.pendingContext=p,u=xa(r),u.payload={element:i},m=m===void 0?null:m,m!==null&&(u.callback=m),i=ba(t,u,r),i!==null&&(Ft(i,t,r),Bl(i,t,r))}function k0(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function Cd(t,r){k0(t,r),(t=t.alternate)&&k0(t,r)}function S0(t){if(t.tag===13||t.tag===31){var r=Va(t,67108864);r!==null&&Ft(r,t,67108864),Cd(t,67108864)}}function w0(t){if(t.tag===13||t.tag===31){var r=en();r=vu(r);var i=Va(t,r);i!==null&&Ft(i,t,r),Cd(t,r)}}var ho=!0;function yS(t,r,i,u){var p=B.T;B.T=null;var m=te.p;try{te.p=2,Nd(t,r,i,u)}finally{te.p=m,B.T=p}}function xS(t,r,i,u){var p=B.T;B.T=null;var m=te.p;try{te.p=8,Nd(t,r,i,u)}finally{te.p=m,B.T=p}}function Nd(t,r,i,u){if(ho){var p=Ed(u);if(p===null)fd(t,r,u,go,i),C0(t,u);else if(vS(p,t,r,i,u))u.stopPropagation();else if(C0(t,u),r&4&&-1<bS.indexOf(t)){for(;p!==null;){var m=kr(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var k=Ia(m.pendingLanes);if(k!==0){var w=m;for(w.pendingLanes|=2,w.entangledLanes|=2;k;){var _=1<<31-Ge(k);w.entanglements[1]|=_,k&=~_}_n(m),(Be&6)===0&&(Qs=Dt()+500,ti(0))}}break;case 31:case 13:w=Va(m,2),w!==null&&Ft(w,m,2),Zs(),Cd(m,2)}if(m=Ed(u),m===null&&fd(t,r,u,go,i),m===p)break;p=m}p!==null&&u.stopPropagation()}else fd(t,r,u,null,i)}}function Ed(t){return t=Tu(t),Ad(t)}var go=null;function Ad(t){if(go=null,t=vr(t),t!==null){var r=o(t);if(r===null)t=null;else{var i=r.tag;if(i===13){if(t=c(r),t!==null)return t;t=null}else if(i===31){if(t=f(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return go=t,null}function j0(t){switch(t){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(xu()){case X:return 2;case le:return 8;case ve:case Ee:return 32;case qe:return 268435456;default:return 32}default:return 32}}var Td=!1,_a=null,Da=null,Ma=null,oi=new Map,ui=new Map,Ra=[],bS="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 C0(t,r){switch(t){case"focusin":case"focusout":_a=null;break;case"dragenter":case"dragleave":Da=null;break;case"mouseover":case"mouseout":Ma=null;break;case"pointerover":case"pointerout":oi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ui.delete(r.pointerId)}}function ci(t,r,i,u,p,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:i,eventSystemFlags:u,nativeEvent:m,targetContainers:[p]},r!==null&&(r=kr(r),r!==null&&S0(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function vS(t,r,i,u,p){switch(r){case"focusin":return _a=ci(_a,t,r,i,u,p),!0;case"dragenter":return Da=ci(Da,t,r,i,u,p),!0;case"mouseover":return Ma=ci(Ma,t,r,i,u,p),!0;case"pointerover":var m=p.pointerId;return oi.set(m,ci(oi.get(m)||null,t,r,i,u,p)),!0;case"gotpointercapture":return m=p.pointerId,ui.set(m,ci(ui.get(m)||null,t,r,i,u,p)),!0}return!1}function N0(t){var r=vr(t.target);if(r!==null){var i=o(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){t.blockedOn=r,qh(t.priority,function(){w0(i)});return}}else if(r===31){if(r=f(i),r!==null){t.blockedOn=r,qh(t.priority,function(){w0(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function po(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=Ed(t.nativeEvent);if(i===null){i=t.nativeEvent;var u=new i.constructor(i.type,i);Au=u,i.target.dispatchEvent(u),Au=null}else return r=kr(i),r!==null&&S0(r),t.blockedOn=i,!1;r.shift()}return!0}function E0(t,r,i){po(t)&&i.delete(r)}function kS(){Td=!1,_a!==null&&po(_a)&&(_a=null),Da!==null&&po(Da)&&(Da=null),Ma!==null&&po(Ma)&&(Ma=null),oi.forEach(E0),ui.forEach(E0)}function mo(t,r){t.blockedOn===r&&(t.blockedOn=null,Td||(Td=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,kS)))}var yo=null;function A0(t){yo!==t&&(yo=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){yo===t&&(yo=null);for(var r=0;r<t.length;r+=3){var i=t[r],u=t[r+1],p=t[r+2];if(typeof u!="function"){if(Ad(u||i)===null)continue;break}var m=kr(i);m!==null&&(t.splice(r,3),r-=3,Ec(m,{pending:!0,data:p,method:i.method,action:u},u,p))}}))}function nl(t){function r(_){return mo(_,t)}_a!==null&&mo(_a,t),Da!==null&&mo(Da,t),Ma!==null&&mo(Ma,t),oi.forEach(r),ui.forEach(r);for(var i=0;i<Ra.length;i++){var u=Ra[i];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Ra.length&&(i=Ra[0],i.blockedOn===null);)N0(i),i.blockedOn===null&&Ra.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(u=0;u<i.length;u+=3){var p=i[u],m=i[u+1],k=p[Ut]||null;if(typeof m=="function")k||A0(i);else if(k){var w=null;if(m&&m.hasAttribute("formAction")){if(p=m,k=m[Ut]||null)w=k.formAction;else if(Ad(p)!==null)continue}else w=k.action;typeof w=="function"?i[u+1]=w:(i.splice(u,3),u-=3),A0(i)}}}function T0(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(k){return p=k})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(i,20)}function i(){if(!u&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function _d(t){this._internalRoot=t}xo.prototype.render=_d.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(l(409));var i=r.current,u=en();v0(i,u,t,r,null,null)},xo.prototype.unmount=_d.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;v0(t.current,2,null,t,null,null),Zs(),r[br]=null}};function xo(t){this._internalRoot=t}xo.prototype.unstable_scheduleHydration=function(t){if(t){var r=Bh();t={blockedOn:null,target:t,priority:r};for(var i=0;i<Ra.length&&r!==0&&r<Ra[i].priority;i++);Ra.splice(i,0,t),i===0&&N0(t)}};var _0=n.version;if(_0!=="19.2.4")throw Error(l(527,_0,"19.2.4"));te.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=h(r),t=t!==null?x(t):null,t=t===null?null:t.stateNode,t};var SS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bo.isDisabled&&bo.supportsFiber)try{Mt=bo.inject(SS),gt=bo}catch{}}return fi.createRoot=function(t,r){if(!s(t))throw Error(l(299));var i=!1,u="",p=Up,m=Hp,k=Bp;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(k=r.onRecoverableError)),r=x0(t,1,!1,null,null,i,u,null,p,m,k,T0),t[br]=r.current,dd(t),new _d(r)},fi.hydrateRoot=function(t,r,i){if(!s(t))throw Error(l(299));var u=!1,p="",m=Up,k=Hp,w=Bp,_=null;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(k=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(_=i.formState)),r=x0(t,1,!0,r,i??null,u,p,_,m,k,w,T0),r.context=b0(null),i=r.current,u=en(),u=vu(u),p=xa(u),p.callback=null,ba(i,p,u),i=u,r.current.lanes=i,kl(r,i),_n(r),t[br]=r.current,dd(t),new xo(r)},fi.version="19.2.4",fi}var q0;function OS(){if(q0)return Rd.exports;q0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Rd.exports=RS(),Rd.exports}var zS=OS();/**
|
|
49
|
+
`+u.stack}}var yr=Object.prototype.hasOwnProperty,xr=e.unstable_scheduleCallback,bl=e.unstable_cancelCallback,xu=e.unstable_shouldYield,bu=e.unstable_requestPaint,Mt=e.unstable_now,vu=e.unstable_getCurrentPriorityLevel,X=e.unstable_ImmediatePriority,le=e.unstable_UserBlockingPriority,ve=e.unstable_NormalPriority,Ee=e.unstable_LowPriority,qe=e.unstable_IdlePriority,Yt=e.log,Bn=e.unstable_setDisableYieldValue,Dt=null,pt=null;function Lt(t){if(typeof Yt=="function"&&Bn(t),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Dt,t)}catch{}}var Ge=Math.clz32?Math.clz32:cv,ca=Math.log,bn=Math.LN2;function cv(t){return t>>>=0,t===0?32:31-(ca(t)/bn|0)|0}var as=256,rs=262144,ls=4194304;function Ia(t){var r=t&42;if(r!==0)return r;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function is(t,r,i){var u=t.pendingLanes;if(u===0)return 0;var p=0,m=t.suspendedLanes,k=t.pingedLanes;t=t.warmLanes;var w=u&134217727;return w!==0?(u=w&~m,u!==0?p=Ia(u):(k&=w,k!==0?p=Ia(k):i||(i=w&~t,i!==0&&(p=Ia(i))))):(w=u&~m,w!==0?p=Ia(w):k!==0?p=Ia(k):i||(i=u&~t,i!==0&&(p=Ia(i)))),p===0?0:r!==0&&r!==p&&(r&m)===0&&(m=p&-p,i=r&-r,m>=i||m===32&&(i&4194048)!==0)?r:p}function vl(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function dv(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Lh(){var t=ls;return ls<<=1,(ls&62914560)===0&&(ls=4194304),t}function ku(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function kl(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function fv(t,r,i,u,p,m){var k=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var w=t.entanglements,M=t.expirationTimes,I=t.hiddenUpdates;for(i=k&~i;0<i;){var Q=31-Ge(i),J=1<<Q;w[Q]=0,M[Q]=-1;var $=I[Q];if($!==null)for(I[Q]=null,Q=0;Q<$.length;Q++){var K=$[Q];K!==null&&(K.lane&=-536870913)}i&=~J}u!==0&&Uh(t,u,0),m!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=m&~(k&~r))}function Uh(t,r,i){t.pendingLanes|=r,t.suspendedLanes&=~r;var u=31-Ge(r);t.entangledLanes|=r,t.entanglements[u]=t.entanglements[u]|1073741824|i&261930}function Hh(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var u=31-Ge(i),p=1<<u;p&r|t[u]&r&&(t[u]|=r),i&=~p}}function Bh(t,r){var i=r&-r;return i=(i&42)!==0?1:Su(i),(i&(t.suspendedLanes|r))!==0?0:i}function Su(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function wu(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function qh(){var t=te.p;return t!==0?t:(t=window.event,t===void 0?32:N0(t.type))}function Ih(t,r){var i=te.p;try{return te.p=t,r()}finally{te.p=i}}var da=Math.random().toString(36).slice(2),St="__reactFiber$"+da,Ut="__reactProps$"+da,br="__reactContainer$"+da,ju="__reactEvents$"+da,hv="__reactListeners$"+da,gv="__reactHandles$"+da,$h="__reactResources$"+da,Sl="__reactMarker$"+da;function Nu(t){delete t[St],delete t[Ut],delete t[ju],delete t[hv],delete t[gv]}function vr(t){var r=t[St];if(r)return r;for(var i=t.parentNode;i;){if(r=i[br]||i[St]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=u0(t);t!==null;){if(i=t[St])return i;t=u0(t)}return r}t=i,i=t.parentNode}return null}function kr(t){if(t=t[St]||t[br]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function wl(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(l(33))}function Sr(t){var r=t[$h];return r||(r=t[$h]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function xt(t){t[Sl]=!0}var Fh=new Set,Kh={};function $a(t,r){wr(t,r),wr(t+"Capture",r)}function wr(t,r){for(Kh[t]=r,t=0;t<r.length;t++)Fh.add(r[t])}var pv=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]*$"),Ph={},Vh={};function mv(t){return yr.call(Vh,t)?!0:yr.call(Ph,t)?!1:pv.test(t)?Vh[t]=!0:(Ph[t]=!0,!1)}function ss(t,r,i){if(mv(r))if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+i)}}function os(t,r,i){if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+i)}}function qn(t,r,i,u){if(u===null)t.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(r,i,""+u)}}function ln(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Yh(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function yv(t,r,i){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,m=u.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(k){i=""+k,m.call(this,k)}}),Object.defineProperty(t,r,{enumerable:u.enumerable}),{getValue:function(){return i},setValue:function(k){i=""+k},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Cu(t){if(!t._valueTracker){var r=Yh(t)?"checked":"value";t._valueTracker=yv(t,r,""+t[r])}}function Gh(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),u="";return t&&(u=Yh(t)?t.checked?"true":"false":t.value),t=u,t!==i?(r.setValue(t),!0):!1}function us(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var xv=/[\n"\\]/g;function sn(t){return t.replace(xv,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Eu(t,r,i,u,p,m,k,w){t.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.type=k:t.removeAttribute("type"),r!=null?k==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+ln(r)):t.value!==""+ln(r)&&(t.value=""+ln(r)):k!=="submit"&&k!=="reset"||t.removeAttribute("value"),r!=null?Au(t,k,ln(r)):i!=null?Au(t,k,ln(i)):u!=null&&t.removeAttribute("value"),p==null&&m!=null&&(t.defaultChecked=!!m),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.name=""+ln(w):t.removeAttribute("name")}function Qh(t,r,i,u,p,m,k,w){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){Cu(t);return}i=i!=null?""+ln(i):"",r=r!=null?""+ln(r):i,w||r===t.value||(t.value=r),t.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=w?t.checked:!!u,t.defaultChecked=!!u,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.name=k),Cu(t)}function Au(t,r,i){r==="number"&&us(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function jr(t,r,i,u){if(t=t.options,r){r={};for(var p=0;p<i.length;p++)r["$"+i[p]]=!0;for(i=0;i<t.length;i++)p=r.hasOwnProperty("$"+t[i].value),t[i].selected!==p&&(t[i].selected=p),p&&u&&(t[i].defaultSelected=!0)}else{for(i=""+ln(i),r=null,p=0;p<t.length;p++){if(t[p].value===i){t[p].selected=!0,u&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function Xh(t,r,i){if(r!=null&&(r=""+ln(r),r!==t.value&&(t.value=r),i==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=i!=null?""+ln(i):""}function Zh(t,r,i,u){if(r==null){if(u!=null){if(i!=null)throw Error(l(92));if(W(u)){if(1<u.length)throw Error(l(93));u=u[0]}i=u}i==null&&(i=""),r=i}i=ln(r),t.defaultValue=i,u=t.textContent,u===i&&u!==""&&u!==null&&(t.value=u),Cu(t)}function Nr(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var bv=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 Jh(t,r,i){var u=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?u?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":u?t.setProperty(r,i):typeof i!="number"||i===0||bv.has(r)?r==="float"?t.cssFloat=i:t[r]=(""+i).trim():t[r]=i+"px"}function Wh(t,r,i){if(r!=null&&typeof r!="object")throw Error(l(62));if(t=t.style,i!=null){for(var u in i)!i.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var p in r)u=r[p],r.hasOwnProperty(p)&&i[p]!==u&&Jh(t,p,u)}else for(var m in r)r.hasOwnProperty(m)&&Jh(t,m,r[m])}function Tu(t){if(t.indexOf("-")===-1)return!1;switch(t){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 vv=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"]]),kv=/^[\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 cs(t){return kv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function In(){}var _u=null;function Mu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Cr=null,Er=null;function eg(t){var r=kr(t);if(r&&(t=r.stateNode)){var i=t[Ut]||null;e:switch(t=r.stateNode,r.type){case"input":if(Eu(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+sn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var u=i[r];if(u!==t&&u.form===t.form){var p=u[Ut]||null;if(!p)throw Error(l(90));Eu(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<i.length;r++)u=i[r],u.form===t.form&&Gh(u)}break e;case"textarea":Xh(t,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&jr(t,!!i.multiple,r,!1)}}}var Du=!1;function tg(t,r,i){if(Du)return t(r,i);Du=!0;try{var u=t(r);return u}finally{if(Du=!1,(Cr!==null||Er!==null)&&(Zs(),Cr&&(r=Cr,t=Er,Er=Cr=null,eg(r),t)))for(r=0;r<t.length;r++)eg(t[r])}}function jl(t,r){var i=t.stateNode;if(i===null)return null;var u=i[Ut]||null;if(u===null)return null;i=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(l(231,r,typeof i));return i}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ru=!1;if($n)try{var Nl={};Object.defineProperty(Nl,"passive",{get:function(){Ru=!0}}),window.addEventListener("test",Nl,Nl),window.removeEventListener("test",Nl,Nl)}catch{Ru=!1}var fa=null,Ou=null,ds=null;function ng(){if(ds)return ds;var t,r=Ou,i=r.length,u,p="value"in fa?fa.value:fa.textContent,m=p.length;for(t=0;t<i&&r[t]===p[t];t++);var k=i-t;for(u=1;u<=k&&r[i-u]===p[m-u];u++);return ds=p.slice(t,1<u?1-u:void 0)}function fs(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function hs(){return!0}function ag(){return!1}function Ht(t){function r(i,u,p,m,k){this._reactName=i,this._targetInst=p,this.type=u,this.nativeEvent=m,this.target=k,this.currentTarget=null;for(var w in t)t.hasOwnProperty(w)&&(i=t[w],this[w]=i?i(m):m[w]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?hs:ag,this.isPropagationStopped=ag,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=hs)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=hs)},persist:function(){},isPersistent:hs}),r}var Fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gs=Ht(Fa),Cl=y({},Fa,{view:0,detail:0}),Sv=Ht(Cl),zu,Lu,El,ps=y({},Cl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==El&&(El&&t.type==="mousemove"?(zu=t.screenX-El.screenX,Lu=t.screenY-El.screenY):Lu=zu=0,El=t),zu)},movementY:function(t){return"movementY"in t?t.movementY:Lu}}),rg=Ht(ps),wv=y({},ps,{dataTransfer:0}),jv=Ht(wv),Nv=y({},Cl,{relatedTarget:0}),Uu=Ht(Nv),Cv=y({},Fa,{animationName:0,elapsedTime:0,pseudoElement:0}),Ev=Ht(Cv),Av=y({},Fa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Tv=Ht(Av),_v=y({},Fa,{data:0}),lg=Ht(_v),Mv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dv={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"},Rv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ov(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=Rv[t])?!!r[t]:!1}function Hu(){return Ov}var zv=y({},Cl,{key:function(t){if(t.key){var r=Mv[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=fs(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Dv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hu,charCode:function(t){return t.type==="keypress"?fs(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?fs(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Lv=Ht(zv),Uv=y({},ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ig=Ht(Uv),Hv=y({},Cl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hu}),Bv=Ht(Hv),qv=y({},Fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Iv=Ht(qv),$v=y({},ps,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Fv=Ht($v),Kv=y({},Fa,{newState:0,oldState:0}),Pv=Ht(Kv),Vv=[9,13,27,32],Bu=$n&&"CompositionEvent"in window,Al=null;$n&&"documentMode"in document&&(Al=document.documentMode);var Yv=$n&&"TextEvent"in window&&!Al,sg=$n&&(!Bu||Al&&8<Al&&11>=Al),og=" ",ug=!1;function cg(t,r){switch(t){case"keyup":return Vv.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ar=!1;function Gv(t,r){switch(t){case"compositionend":return dg(r);case"keypress":return r.which!==32?null:(ug=!0,og);case"textInput":return t=r.data,t===og&&ug?null:t;default:return null}}function Qv(t,r){if(Ar)return t==="compositionend"||!Bu&&cg(t,r)?(t=ng(),ds=Ou=fa=null,Ar=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return sg&&r.locale!=="ko"?null:r.data;default:return null}}var Xv={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 fg(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!Xv[t.type]:r==="textarea"}function hg(t,r,i,u){Cr?Er?Er.push(u):Er=[u]:Cr=u,r=ro(r,"onChange"),0<r.length&&(i=new gs("onChange","change",null,i,u),t.push({event:i,listeners:r}))}var Tl=null,_l=null;function Zv(t){Qm(t,0)}function ms(t){var r=wl(t);if(Gh(r))return t}function gg(t,r){if(t==="change")return r}var pg=!1;if($n){var qu;if($n){var Iu="oninput"in document;if(!Iu){var mg=document.createElement("div");mg.setAttribute("oninput","return;"),Iu=typeof mg.oninput=="function"}qu=Iu}else qu=!1;pg=qu&&(!document.documentMode||9<document.documentMode)}function yg(){Tl&&(Tl.detachEvent("onpropertychange",xg),_l=Tl=null)}function xg(t){if(t.propertyName==="value"&&ms(_l)){var r=[];hg(r,_l,t,Mu(t)),tg(Zv,r)}}function Jv(t,r,i){t==="focusin"?(yg(),Tl=r,_l=i,Tl.attachEvent("onpropertychange",xg)):t==="focusout"&&yg()}function Wv(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ms(_l)}function ek(t,r){if(t==="click")return ms(r)}function tk(t,r){if(t==="input"||t==="change")return ms(r)}function nk(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Gt=typeof Object.is=="function"?Object.is:nk;function Ml(t,r){if(Gt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;for(u=0;u<i.length;u++){var p=i[u];if(!yr.call(r,p)||!Gt(t[p],r[p]))return!1}return!0}function bg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function vg(t,r){var i=bg(t);t=0;for(var u;i;){if(i.nodeType===3){if(u=t+i.textContent.length,t<=r&&u>=r)return{node:i,offset:r-t};t=u}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=bg(i)}}function kg(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?kg(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Sg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=us(t.document);r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=us(t.document)}return r}function $u(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var ak=$n&&"documentMode"in document&&11>=document.documentMode,Tr=null,Fu=null,Dl=null,Ku=!1;function wg(t,r,i){var u=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ku||Tr==null||Tr!==us(u)||(u=Tr,"selectionStart"in u&&$u(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Dl&&Ml(Dl,u)||(Dl=u,u=ro(Fu,"onSelect"),0<u.length&&(r=new gs("onSelect","select",null,r,i),t.push({event:r,listeners:u}),r.target=Tr)))}function Ka(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var _r={animationend:Ka("Animation","AnimationEnd"),animationiteration:Ka("Animation","AnimationIteration"),animationstart:Ka("Animation","AnimationStart"),transitionrun:Ka("Transition","TransitionRun"),transitionstart:Ka("Transition","TransitionStart"),transitioncancel:Ka("Transition","TransitionCancel"),transitionend:Ka("Transition","TransitionEnd")},Pu={},jg={};$n&&(jg=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);function Pa(t){if(Pu[t])return Pu[t];if(!_r[t])return t;var r=_r[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in jg)return Pu[t]=r[i];return t}var Ng=Pa("animationend"),Cg=Pa("animationiteration"),Eg=Pa("animationstart"),rk=Pa("transitionrun"),lk=Pa("transitionstart"),ik=Pa("transitioncancel"),Ag=Pa("transitionend"),Tg=new Map,Vu="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(" ");Vu.push("scrollEnd");function vn(t,r){Tg.set(t,r),$a(r,[t])}var ys=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},on=[],Mr=0,Yu=0;function xs(){for(var t=Mr,r=Yu=Mr=0;r<t;){var i=on[r];on[r++]=null;var u=on[r];on[r++]=null;var p=on[r];on[r++]=null;var m=on[r];if(on[r++]=null,u!==null&&p!==null){var k=u.pending;k===null?p.next=p:(p.next=k.next,k.next=p),u.pending=p}m!==0&&_g(i,p,m)}}function bs(t,r,i,u){on[Mr++]=t,on[Mr++]=r,on[Mr++]=i,on[Mr++]=u,Yu|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function Gu(t,r,i,u){return bs(t,r,i,u),vs(t)}function Va(t,r){return bs(t,null,null,r),vs(t)}function _g(t,r,i){t.lanes|=i;var u=t.alternate;u!==null&&(u.lanes|=i);for(var p=!1,m=t.return;m!==null;)m.childLanes|=i,u=m.alternate,u!==null&&(u.childLanes|=i),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(p=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,p&&r!==null&&(p=31-Ge(i),t=m.hiddenUpdates,u=t[p],u===null?t[p]=[r]:u.push(r),r.lane=i|536870912),m):null}function vs(t){if(50<ei)throw ei=0,ad=null,Error(l(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Dr={};function sk(t,r,i,u){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(t,r,i,u){return new sk(t,r,i,u)}function Qu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Fn(t,r){var i=t.alternate;return i===null?(i=Qt(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Mg(t,r){t.flags&=65011714;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,r=i.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function ks(t,r,i,u,p,m){var k=0;if(u=t,typeof t=="function")Qu(t)&&(k=1);else if(typeof t=="string")k=fS(t,i,se.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case G:return t=Qt(31,i,r,p),t.elementType=G,t.lanes=m,t;case N:return Ya(i.children,p,m,r);case E:k=8,p|=24;break;case j:return t=Qt(12,i,r,p|2),t.elementType=j,t.lanes=m,t;case H:return t=Qt(13,i,r,p),t.elementType=H,t.lanes=m,t;case L:return t=Qt(19,i,r,p),t.elementType=L,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case T:k=10;break e;case z:k=9;break e;case P:k=11;break e;case V:k=14;break e;case ee:k=16,u=null;break e}k=29,i=Error(l(130,t===null?"null":typeof t,"")),u=null}return r=Qt(k,i,r,p),r.elementType=t,r.type=u,r.lanes=m,r}function Ya(t,r,i,u){return t=Qt(7,t,u,r),t.lanes=i,t}function Xu(t,r,i){return t=Qt(6,t,null,r),t.lanes=i,t}function Dg(t){var r=Qt(18,null,null,0);return r.stateNode=t,r}function Zu(t,r,i){return r=Qt(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Rg=new WeakMap;function un(t,r){if(typeof t=="object"&&t!==null){var i=Rg.get(t);return i!==void 0?i:(r={value:t,source:r,stack:ns(r)},Rg.set(t,r),r)}return{value:t,source:r,stack:ns(r)}}var Rr=[],Or=0,Ss=null,Rl=0,cn=[],dn=0,ha=null,En=1,An="";function Kn(t,r){Rr[Or++]=Rl,Rr[Or++]=Ss,Ss=t,Rl=r}function Og(t,r,i){cn[dn++]=En,cn[dn++]=An,cn[dn++]=ha,ha=t;var u=En;t=An;var p=32-Ge(u)-1;u&=~(1<<p),i+=1;var m=32-Ge(r)+p;if(30<m){var k=p-p%5;m=(u&(1<<k)-1).toString(32),u>>=k,p-=k,En=1<<32-Ge(r)+p|i<<p|u,An=m+t}else En=1<<m|i<<p|u,An=t}function Ju(t){t.return!==null&&(Kn(t,1),Og(t,1,0))}function Wu(t){for(;t===Ss;)Ss=Rr[--Or],Rr[Or]=null,Rl=Rr[--Or],Rr[Or]=null;for(;t===ha;)ha=cn[--dn],cn[dn]=null,An=cn[--dn],cn[dn]=null,En=cn[--dn],cn[dn]=null}function zg(t,r){cn[dn++]=En,cn[dn++]=An,cn[dn++]=ha,En=r.id,An=r.overflow,ha=t}var wt=null,We=null,Oe=!1,ga=null,fn=!1,ec=Error(l(519));function pa(t){var r=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ol(un(r,t)),ec}function Lg(t){var r=t.stateNode,i=t.type,u=t.memoizedProps;switch(r[St]=t,r[Ut]=u,i){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(i=0;i<ni.length;i++)Te(ni[i],r);break;case"source":Te("error",r);break;case"img":case"image":case"link":Te("error",r),Te("load",r);break;case"details":Te("toggle",r);break;case"input":Te("invalid",r),Qh(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Te("invalid",r);break;case"textarea":Te("invalid",r),Zh(r,u.value,u.defaultValue,u.children)}i=u.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||u.suppressHydrationWarning===!0||Wm(r.textContent,i)?(u.popover!=null&&(Te("beforetoggle",r),Te("toggle",r)),u.onScroll!=null&&Te("scroll",r),u.onScrollEnd!=null&&Te("scrollend",r),u.onClick!=null&&(r.onclick=In),r=!0):r=!1,r||pa(t,!0)}function Ug(t){for(wt=t.return;wt;)switch(wt.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:wt=wt.return}}function zr(t){if(t!==wt)return!1;if(!Oe)return Ug(t),Oe=!0,!1;var r=t.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||xd(t.type,t.memoizedProps)),i=!i),i&&We&&pa(t),Ug(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));We=o0(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));We=o0(t)}else r===27?(r=We,Ta(t.type)?(t=wd,wd=null,We=t):We=r):We=wt?gn(t.stateNode.nextSibling):null;return!0}function Ga(){We=wt=null,Oe=!1}function tc(){var t=ga;return t!==null&&($t===null?$t=t:$t.push.apply($t,t),ga=null),t}function Ol(t){ga===null?ga=[t]:ga.push(t)}var nc=D(null),Qa=null,Pn=null;function ma(t,r,i){A(nc,r._currentValue),r._currentValue=i}function Vn(t){t._currentValue=nc.current,Y(nc)}function ac(t,r,i){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===i)break;t=t.return}}function rc(t,r,i,u){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var m=p.dependencies;if(m!==null){var k=p.child;m=m.firstContext;e:for(;m!==null;){var w=m;m=p;for(var M=0;M<r.length;M++)if(w.context===r[M]){m.lanes|=i,w=m.alternate,w!==null&&(w.lanes|=i),ac(m.return,i,t),u||(k=null);break e}m=w.next}}else if(p.tag===18){if(k=p.return,k===null)throw Error(l(341));k.lanes|=i,m=k.alternate,m!==null&&(m.lanes|=i),ac(k,i,t),k=null}else k=p.child;if(k!==null)k.return=p;else for(k=p;k!==null;){if(k===t){k=null;break}if(p=k.sibling,p!==null){p.return=k.return,k=p;break}k=k.return}p=k}}function Lr(t,r,i,u){t=null;for(var p=r,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var k=p.alternate;if(k===null)throw Error(l(387));if(k=k.memoizedProps,k!==null){var w=p.type;Gt(p.pendingProps.value,k.value)||(t!==null?t.push(w):t=[w])}}else if(p===Me.current){if(k=p.alternate,k===null)throw Error(l(387));k.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(si):t=[si])}p=p.return}t!==null&&rc(r,t,i,u),r.flags|=262144}function ws(t){for(t=t.firstContext;t!==null;){if(!Gt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Xa(t){Qa=t,Pn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function jt(t){return Hg(Qa,t)}function js(t,r){return Qa===null&&Xa(t),Hg(t,r)}function Hg(t,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},Pn===null){if(t===null)throw Error(l(308));Pn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Pn=Pn.next=r;return i}var ok=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(i,u){t.push(u)}};this.abort=function(){r.aborted=!0,t.forEach(function(i){return i()})}},uk=e.unstable_scheduleCallback,ck=e.unstable_NormalPriority,ut={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lc(){return{controller:new ok,data:new Map,refCount:0}}function zl(t){t.refCount--,t.refCount===0&&uk(ck,function(){t.controller.abort()})}var Ll=null,ic=0,Ur=0,Hr=null;function dk(t,r){if(Ll===null){var i=Ll=[];ic=0,Ur=ud(),Hr={status:"pending",value:void 0,then:function(u){i.push(u)}}}return ic++,r.then(Bg,Bg),r}function Bg(){if(--ic===0&&Ll!==null){Hr!==null&&(Hr.status="fulfilled");var t=Ll;Ll=null,Ur=0,Hr=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function fk(t,r){var i=[],u={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return t.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<i.length;p++)(0,i[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),u}var qg=B.S;B.S=function(t,r){wm=Mt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&dk(t,r),qg!==null&&qg(t,r)};var Za=D(null);function sc(){var t=Za.current;return t!==null?t:Qe.pooledCache}function Ns(t,r){r===null?A(Za,Za.current):A(Za,r.pool)}function Ig(){var t=sc();return t===null?null:{parent:ut._currentValue,pool:t}}var Br=Error(l(460)),oc=Error(l(474)),Cs=Error(l(542)),Es={then:function(){}};function $g(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Fg(t,r,i){switch(i=t[i],i===void 0?t.push(r):i!==r&&(r.then(In,In),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Pg(t),t;default:if(typeof r.status=="string")r.then(In,In);else{if(t=Qe,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=r,t.status="pending",t.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Pg(t),t}throw Wa=r,Br}}function Ja(t){try{var r=t._init;return r(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Wa=i,Br):i}}var Wa=null;function Kg(){if(Wa===null)throw Error(l(459));var t=Wa;return Wa=null,t}function Pg(t){if(t===Br||t===Cs)throw Error(l(483))}var qr=null,Ul=0;function As(t){var r=Ul;return Ul+=1,qr===null&&(qr=[]),Fg(qr,t,r)}function Hl(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Ts(t,r){throw r.$$typeof===b?Error(l(525)):(t=Object.prototype.toString.call(r),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Vg(t){function r(U,O){if(t){var q=U.deletions;q===null?(U.deletions=[O],U.flags|=16):q.push(O)}}function i(U,O){if(!t)return null;for(;O!==null;)r(U,O),O=O.sibling;return null}function u(U){for(var O=new Map;U!==null;)U.key!==null?O.set(U.key,U):O.set(U.index,U),U=U.sibling;return O}function p(U,O){return U=Fn(U,O),U.index=0,U.sibling=null,U}function m(U,O,q){return U.index=q,t?(q=U.alternate,q!==null?(q=q.index,q<O?(U.flags|=67108866,O):q):(U.flags|=67108866,O)):(U.flags|=1048576,O)}function k(U){return t&&U.alternate===null&&(U.flags|=67108866),U}function w(U,O,q,Z){return O===null||O.tag!==6?(O=Xu(q,U.mode,Z),O.return=U,O):(O=p(O,q),O.return=U,O)}function M(U,O,q,Z){var pe=q.type;return pe===N?Q(U,O,q.props.children,Z,q.key):O!==null&&(O.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===ee&&Ja(pe)===O.type)?(O=p(O,q.props),Hl(O,q),O.return=U,O):(O=ks(q.type,q.key,q.props,null,U.mode,Z),Hl(O,q),O.return=U,O)}function I(U,O,q,Z){return O===null||O.tag!==4||O.stateNode.containerInfo!==q.containerInfo||O.stateNode.implementation!==q.implementation?(O=Zu(q,U.mode,Z),O.return=U,O):(O=p(O,q.children||[]),O.return=U,O)}function Q(U,O,q,Z,pe){return O===null||O.tag!==7?(O=Ya(q,U.mode,Z,pe),O.return=U,O):(O=p(O,q),O.return=U,O)}function J(U,O,q){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Xu(""+O,U.mode,q),O.return=U,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case v:return q=ks(O.type,O.key,O.props,null,U.mode,q),Hl(q,O),q.return=U,q;case S:return O=Zu(O,U.mode,q),O.return=U,O;case ee:return O=Ja(O),J(U,O,q)}if(W(O)||F(O))return O=Ya(O,U.mode,q,null),O.return=U,O;if(typeof O.then=="function")return J(U,As(O),q);if(O.$$typeof===T)return J(U,js(U,O),q);Ts(U,O)}return null}function $(U,O,q,Z){var pe=O!==null?O.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return pe!==null?null:w(U,O,""+q,Z);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return q.key===pe?M(U,O,q,Z):null;case S:return q.key===pe?I(U,O,q,Z):null;case ee:return q=Ja(q),$(U,O,q,Z)}if(W(q)||F(q))return pe!==null?null:Q(U,O,q,Z,null);if(typeof q.then=="function")return $(U,O,As(q),Z);if(q.$$typeof===T)return $(U,O,js(U,q),Z);Ts(U,q)}return null}function K(U,O,q,Z,pe){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return U=U.get(q)||null,w(O,U,""+Z,pe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return U=U.get(Z.key===null?q:Z.key)||null,M(O,U,Z,pe);case S:return U=U.get(Z.key===null?q:Z.key)||null,I(O,U,Z,pe);case ee:return Z=Ja(Z),K(U,O,q,Z,pe)}if(W(Z)||F(Z))return U=U.get(q)||null,Q(O,U,Z,pe,null);if(typeof Z.then=="function")return K(U,O,q,As(Z),pe);if(Z.$$typeof===T)return K(U,O,q,js(O,Z),pe);Ts(O,Z)}return null}function de(U,O,q,Z){for(var pe=null,Ue=null,fe=O,Ne=O=0,Re=null;fe!==null&&Ne<q.length;Ne++){fe.index>Ne?(Re=fe,fe=null):Re=fe.sibling;var He=$(U,fe,q[Ne],Z);if(He===null){fe===null&&(fe=Re);break}t&&fe&&He.alternate===null&&r(U,fe),O=m(He,O,Ne),Ue===null?pe=He:Ue.sibling=He,Ue=He,fe=Re}if(Ne===q.length)return i(U,fe),Oe&&Kn(U,Ne),pe;if(fe===null){for(;Ne<q.length;Ne++)fe=J(U,q[Ne],Z),fe!==null&&(O=m(fe,O,Ne),Ue===null?pe=fe:Ue.sibling=fe,Ue=fe);return Oe&&Kn(U,Ne),pe}for(fe=u(fe);Ne<q.length;Ne++)Re=K(fe,U,Ne,q[Ne],Z),Re!==null&&(t&&Re.alternate!==null&&fe.delete(Re.key===null?Ne:Re.key),O=m(Re,O,Ne),Ue===null?pe=Re:Ue.sibling=Re,Ue=Re);return t&&fe.forEach(function(Oa){return r(U,Oa)}),Oe&&Kn(U,Ne),pe}function be(U,O,q,Z){if(q==null)throw Error(l(151));for(var pe=null,Ue=null,fe=O,Ne=O=0,Re=null,He=q.next();fe!==null&&!He.done;Ne++,He=q.next()){fe.index>Ne?(Re=fe,fe=null):Re=fe.sibling;var Oa=$(U,fe,He.value,Z);if(Oa===null){fe===null&&(fe=Re);break}t&&fe&&Oa.alternate===null&&r(U,fe),O=m(Oa,O,Ne),Ue===null?pe=Oa:Ue.sibling=Oa,Ue=Oa,fe=Re}if(He.done)return i(U,fe),Oe&&Kn(U,Ne),pe;if(fe===null){for(;!He.done;Ne++,He=q.next())He=J(U,He.value,Z),He!==null&&(O=m(He,O,Ne),Ue===null?pe=He:Ue.sibling=He,Ue=He);return Oe&&Kn(U,Ne),pe}for(fe=u(fe);!He.done;Ne++,He=q.next())He=K(fe,U,Ne,He.value,Z),He!==null&&(t&&He.alternate!==null&&fe.delete(He.key===null?Ne:He.key),O=m(He,O,Ne),Ue===null?pe=He:Ue.sibling=He,Ue=He);return t&&fe.forEach(function(wS){return r(U,wS)}),Oe&&Kn(U,Ne),pe}function Ye(U,O,q,Z){if(typeof q=="object"&&q!==null&&q.type===N&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case v:e:{for(var pe=q.key;O!==null;){if(O.key===pe){if(pe=q.type,pe===N){if(O.tag===7){i(U,O.sibling),Z=p(O,q.props.children),Z.return=U,U=Z;break e}}else if(O.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===ee&&Ja(pe)===O.type){i(U,O.sibling),Z=p(O,q.props),Hl(Z,q),Z.return=U,U=Z;break e}i(U,O);break}else r(U,O);O=O.sibling}q.type===N?(Z=Ya(q.props.children,U.mode,Z,q.key),Z.return=U,U=Z):(Z=ks(q.type,q.key,q.props,null,U.mode,Z),Hl(Z,q),Z.return=U,U=Z)}return k(U);case S:e:{for(pe=q.key;O!==null;){if(O.key===pe)if(O.tag===4&&O.stateNode.containerInfo===q.containerInfo&&O.stateNode.implementation===q.implementation){i(U,O.sibling),Z=p(O,q.children||[]),Z.return=U,U=Z;break e}else{i(U,O);break}else r(U,O);O=O.sibling}Z=Zu(q,U.mode,Z),Z.return=U,U=Z}return k(U);case ee:return q=Ja(q),Ye(U,O,q,Z)}if(W(q))return de(U,O,q,Z);if(F(q)){if(pe=F(q),typeof pe!="function")throw Error(l(150));return q=pe.call(q),be(U,O,q,Z)}if(typeof q.then=="function")return Ye(U,O,As(q),Z);if(q.$$typeof===T)return Ye(U,O,js(U,q),Z);Ts(U,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,O!==null&&O.tag===6?(i(U,O.sibling),Z=p(O,q),Z.return=U,U=Z):(i(U,O),Z=Xu(q,U.mode,Z),Z.return=U,U=Z),k(U)):i(U,O)}return function(U,O,q,Z){try{Ul=0;var pe=Ye(U,O,q,Z);return qr=null,pe}catch(fe){if(fe===Br||fe===Cs)throw fe;var Ue=Qt(29,fe,null,U.mode);return Ue.lanes=Z,Ue.return=U,Ue}finally{}}}var er=Vg(!0),Yg=Vg(!1),ya=!1;function uc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cc(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function xa(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ba(t,r,i){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Be&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=vs(t),_g(t,null,i),r}return bs(t,u,r,i),vs(t)}function Bl(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var u=r.lanes;u&=t.pendingLanes,i|=u,r.lanes=i,Hh(t,i)}}function dc(t,r){var i=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,i===u)){var p=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var k={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?p=m=k:m=m.next=k,i=i.next}while(i!==null);m===null?p=m=r:m=m.next=r}else p=m=r;i={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}var fc=!1;function ql(){if(fc){var t=Hr;if(t!==null)throw t}}function Il(t,r,i,u){fc=!1;var p=t.updateQueue;ya=!1;var m=p.firstBaseUpdate,k=p.lastBaseUpdate,w=p.shared.pending;if(w!==null){p.shared.pending=null;var M=w,I=M.next;M.next=null,k===null?m=I:k.next=I,k=M;var Q=t.alternate;Q!==null&&(Q=Q.updateQueue,w=Q.lastBaseUpdate,w!==k&&(w===null?Q.firstBaseUpdate=I:w.next=I,Q.lastBaseUpdate=M))}if(m!==null){var J=p.baseState;k=0,Q=I=M=null,w=m;do{var $=w.lane&-536870913,K=$!==w.lane;if(K?(De&$)===$:(u&$)===$){$!==0&&$===Ur&&(fc=!0),Q!==null&&(Q=Q.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var de=t,be=w;$=r;var Ye=i;switch(be.tag){case 1:if(de=be.payload,typeof de=="function"){J=de.call(Ye,J,$);break e}J=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=be.payload,$=typeof de=="function"?de.call(Ye,J,$):de,$==null)break e;J=y({},J,$);break e;case 2:ya=!0}}$=w.callback,$!==null&&(t.flags|=64,K&&(t.flags|=8192),K=p.callbacks,K===null?p.callbacks=[$]:K.push($))}else K={lane:$,tag:w.tag,payload:w.payload,callback:w.callback,next:null},Q===null?(I=Q=K,M=J):Q=Q.next=K,k|=$;if(w=w.next,w===null){if(w=p.shared.pending,w===null)break;K=w,w=K.next,K.next=null,p.lastBaseUpdate=K,p.shared.pending=null}}while(!0);Q===null&&(M=J),p.baseState=M,p.firstBaseUpdate=I,p.lastBaseUpdate=Q,m===null&&(p.shared.lanes=0),ja|=k,t.lanes=k,t.memoizedState=J}}function Gg(t,r){if(typeof t!="function")throw Error(l(191,t));t.call(r)}function Qg(t,r){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)Gg(i[t],r)}var Ir=D(null),_s=D(0);function Xg(t,r){t=ta,A(_s,t),A(Ir,r),ta=t|r.baseLanes}function hc(){A(_s,ta),A(Ir,Ir.current)}function gc(){ta=_s.current,Y(Ir),Y(_s)}var Xt=D(null),hn=null;function va(t){var r=t.alternate;A(it,it.current&1),A(Xt,t),hn===null&&(r===null||Ir.current!==null||r.memoizedState!==null)&&(hn=t)}function pc(t){A(it,it.current),A(Xt,t),hn===null&&(hn=t)}function Zg(t){t.tag===22?(A(it,it.current),A(Xt,t),hn===null&&(hn=t)):ka()}function ka(){A(it,it.current),A(Xt,Xt.current)}function Zt(t){Y(Xt),hn===t&&(hn=null),Y(it)}var it=D(0);function Ms(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||kd(i)||Sd(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Yn=0,je=null,Pe=null,ct=null,Ds=!1,$r=!1,tr=!1,Rs=0,$l=0,Fr=null,hk=0;function rt(){throw Error(l(321))}function mc(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!Gt(t[i],r[i]))return!1;return!0}function yc(t,r,i,u,p,m){return Yn=m,je=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=t===null||t.memoizedState===null?Op:Dc,tr=!1,m=i(u,p),tr=!1,$r&&(m=Wg(r,i,u,p)),Jg(t),m}function Jg(t){B.H=Pl;var r=Pe!==null&&Pe.next!==null;if(Yn=0,ct=Pe=je=null,Ds=!1,$l=0,Fr=null,r)throw Error(l(300));t===null||dt||(t=t.dependencies,t!==null&&ws(t)&&(dt=!0))}function Wg(t,r,i,u){je=t;var p=0;do{if($r&&(Fr=null),$l=0,$r=!1,25<=p)throw Error(l(301));if(p+=1,ct=Pe=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}B.H=zp,m=r(i,u)}while($r);return m}function gk(){var t=B.H,r=t.useState()[0];return r=typeof r.then=="function"?Fl(r):r,t=t.useState()[0],(Pe!==null?Pe.memoizedState:null)!==t&&(je.flags|=1024),r}function xc(){var t=Rs!==0;return Rs=0,t}function bc(t,r,i){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~i}function vc(t){if(Ds){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Ds=!1}Yn=0,ct=Pe=je=null,$r=!1,$l=Rs=0,Fr=null}function Rt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?je.memoizedState=ct=t:ct=ct.next=t,ct}function st(){if(Pe===null){var t=je.alternate;t=t!==null?t.memoizedState:null}else t=Pe.next;var r=ct===null?je.memoizedState:ct.next;if(r!==null)ct=r,Pe=t;else{if(t===null)throw je.alternate===null?Error(l(467)):Error(l(310));Pe=t,t={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},ct===null?je.memoizedState=ct=t:ct=ct.next=t}return ct}function Os(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fl(t){var r=$l;return $l+=1,Fr===null&&(Fr=[]),t=Fg(Fr,t,r),r=je,(ct===null?r.memoizedState:ct.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?Op:Dc),t}function zs(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Fl(t);if(t.$$typeof===T)return jt(t)}throw Error(l(438,String(t)))}function kc(t){var r=null,i=je.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var u=je.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Os(),je.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(t),u=0;u<t;u++)i[u]=R;return r.index++,i}function Gn(t,r){return typeof r=="function"?r(t):r}function Ls(t){var r=st();return Sc(r,Pe,t)}function Sc(t,r,i){var u=t.queue;if(u===null)throw Error(l(311));u.lastRenderedReducer=i;var p=t.baseQueue,m=u.pending;if(m!==null){if(p!==null){var k=p.next;p.next=m.next,m.next=k}r.baseQueue=p=m,u.pending=null}if(m=t.baseState,p===null)t.memoizedState=m;else{r=p.next;var w=k=null,M=null,I=r,Q=!1;do{var J=I.lane&-536870913;if(J!==I.lane?(De&J)===J:(Yn&J)===J){var $=I.revertLane;if($===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),J===Ur&&(Q=!0);else if((Yn&$)===$){I=I.next,$===Ur&&(Q=!0);continue}else J={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},M===null?(w=M=J,k=m):M=M.next=J,je.lanes|=$,ja|=$;J=I.action,tr&&i(m,J),m=I.hasEagerState?I.eagerState:i(m,J)}else $={lane:J,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},M===null?(w=M=$,k=m):M=M.next=$,je.lanes|=J,ja|=J;I=I.next}while(I!==null&&I!==r);if(M===null?k=m:M.next=w,!Gt(m,t.memoizedState)&&(dt=!0,Q&&(i=Hr,i!==null)))throw i;t.memoizedState=m,t.baseState=k,t.baseQueue=M,u.lastRenderedState=m}return p===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function wc(t){var r=st(),i=r.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=t;var u=i.dispatch,p=i.pending,m=r.memoizedState;if(p!==null){i.pending=null;var k=p=p.next;do m=t(m,k.action),k=k.next;while(k!==p);Gt(m,r.memoizedState)||(dt=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),i.lastRenderedState=m}return[m,u]}function ep(t,r,i){var u=je,p=st(),m=Oe;if(m){if(i===void 0)throw Error(l(407));i=i()}else i=r();var k=!Gt((Pe||p).memoizedState,i);if(k&&(p.memoizedState=i,dt=!0),p=p.queue,Cc(ap.bind(null,u,p,t),[t]),p.getSnapshot!==r||k||ct!==null&&ct.memoizedState.tag&1){if(u.flags|=2048,Kr(9,{destroy:void 0},np.bind(null,u,p,i,r),null),Qe===null)throw Error(l(349));m||(Yn&127)!==0||tp(u,r,i)}return i}function tp(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=je.updateQueue,r===null?(r=Os(),je.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function np(t,r,i,u){r.value=i,r.getSnapshot=u,rp(r)&&lp(t)}function ap(t,r,i){return i(function(){rp(r)&&lp(t)})}function rp(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!Gt(t,i)}catch{return!0}}function lp(t){var r=Va(t,2);r!==null&&Ft(r,t,2)}function jc(t){var r=Rt();if(typeof t=="function"){var i=t;if(t=i(),tr){Lt(!0);try{i()}finally{Lt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:t},r}function ip(t,r,i,u){return t.baseState=i,Sc(t,Pe,typeof u=="function"?u:Gn)}function pk(t,r,i,u,p){if(Bs(t))throw Error(l(485));if(t=r.action,t!==null){var m={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){m.listeners.push(k)}};B.T!==null?i(!0):m.isTransition=!1,u(m),i=r.pending,i===null?(m.next=r.pending=m,sp(r,m)):(m.next=i.next,r.pending=i.next=m)}}function sp(t,r){var i=r.action,u=r.payload,p=t.state;if(r.isTransition){var m=B.T,k={};B.T=k;try{var w=i(p,u),M=B.S;M!==null&&M(k,w),op(t,r,w)}catch(I){Nc(t,r,I)}finally{m!==null&&k.types!==null&&(m.types=k.types),B.T=m}}else try{m=i(p,u),op(t,r,m)}catch(I){Nc(t,r,I)}}function op(t,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(u){up(t,r,u)},function(u){return Nc(t,r,u)}):up(t,r,i)}function up(t,r,i){r.status="fulfilled",r.value=i,cp(r),t.state=i,r=t.pending,r!==null&&(i=r.next,i===r?t.pending=null:(i=i.next,r.next=i,sp(t,i)))}function Nc(t,r,i){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=i,cp(r),r=r.next;while(r!==u)}t.action=null}function cp(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function dp(t,r){return r}function fp(t,r){if(Oe){var i=Qe.formState;if(i!==null){e:{var u=je;if(Oe){if(We){t:{for(var p=We,m=fn;p.nodeType!==8;){if(!m){p=null;break t}if(p=gn(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m==="F!"||m==="F"?p:null}if(p){We=gn(p.nextSibling),u=p.data==="F!";break e}}pa(u)}u=!1}u&&(r=i[0])}}return i=Rt(),i.memoizedState=i.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dp,lastRenderedState:r},i.queue=u,i=Mp.bind(null,je,u),u.dispatch=i,u=jc(!1),m=Mc.bind(null,je,!1,u.queue),u=Rt(),p={state:r,dispatch:null,action:t,pending:null},u.queue=p,i=pk.bind(null,je,p,m,i),p.dispatch=i,u.memoizedState=t,[r,i,!1]}function hp(t){var r=st();return gp(r,Pe,t)}function gp(t,r,i){if(r=Sc(t,r,dp)[0],t=Ls(Gn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Fl(r)}catch(k){throw k===Br?Cs:k}else u=r;r=st();var p=r.queue,m=p.dispatch;return i!==r.memoizedState&&(je.flags|=2048,Kr(9,{destroy:void 0},mk.bind(null,p,i),null)),[u,m,t]}function mk(t,r){t.action=r}function pp(t){var r=st(),i=Pe;if(i!==null)return gp(r,i,t);st(),r=r.memoizedState,i=st();var u=i.queue.dispatch;return i.memoizedState=t,[r,u,!1]}function Kr(t,r,i,u){return t={tag:t,create:i,deps:u,inst:r,next:null},r=je.updateQueue,r===null&&(r=Os(),je.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=t.next=t:(u=i.next,i.next=t,t.next=u,r.lastEffect=t),t}function mp(){return st().memoizedState}function Us(t,r,i,u){var p=Rt();je.flags|=t,p.memoizedState=Kr(1|r,{destroy:void 0},i,u===void 0?null:u)}function Hs(t,r,i,u){var p=st();u=u===void 0?null:u;var m=p.memoizedState.inst;Pe!==null&&u!==null&&mc(u,Pe.memoizedState.deps)?p.memoizedState=Kr(r,m,i,u):(je.flags|=t,p.memoizedState=Kr(1|r,m,i,u))}function yp(t,r){Us(8390656,8,t,r)}function Cc(t,r){Hs(2048,8,t,r)}function yk(t){je.flags|=4;var r=je.updateQueue;if(r===null)r=Os(),je.updateQueue=r,r.events=[t];else{var i=r.events;i===null?r.events=[t]:i.push(t)}}function xp(t){var r=st().memoizedState;return yk({ref:r,nextImpl:t}),function(){if((Be&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}function bp(t,r){return Hs(4,2,t,r)}function vp(t,r){return Hs(4,4,t,r)}function kp(t,r){if(typeof r=="function"){t=t();var i=r(t);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Sp(t,r,i){i=i!=null?i.concat([t]):null,Hs(4,4,kp.bind(null,r,t),i)}function Ec(){}function wp(t,r){var i=st();r=r===void 0?null:r;var u=i.memoizedState;return r!==null&&mc(r,u[1])?u[0]:(i.memoizedState=[t,r],t)}function jp(t,r){var i=st();r=r===void 0?null:r;var u=i.memoizedState;if(r!==null&&mc(r,u[1]))return u[0];if(u=t(),tr){Lt(!0);try{t()}finally{Lt(!1)}}return i.memoizedState=[u,r],u}function Ac(t,r,i){return i===void 0||(Yn&1073741824)!==0&&(De&261930)===0?t.memoizedState=r:(t.memoizedState=i,t=Nm(),je.lanes|=t,ja|=t,i)}function Np(t,r,i,u){return Gt(i,r)?i:Ir.current!==null?(t=Ac(t,i,u),Gt(t,r)||(dt=!0),t):(Yn&42)===0||(Yn&1073741824)!==0&&(De&261930)===0?(dt=!0,t.memoizedState=i):(t=Nm(),je.lanes|=t,ja|=t,r)}function Cp(t,r,i,u,p){var m=te.p;te.p=m!==0&&8>m?m:8;var k=B.T,w={};B.T=w,Mc(t,!1,r,i);try{var M=p(),I=B.S;if(I!==null&&I(w,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var Q=fk(M,u);Kl(t,r,Q,en(t))}else Kl(t,r,u,en(t))}catch(J){Kl(t,r,{then:function(){},status:"rejected",reason:J},en())}finally{te.p=m,k!==null&&w.types!==null&&(k.types=w.types),B.T=k}}function xk(){}function Tc(t,r,i,u){if(t.tag!==5)throw Error(l(476));var p=Ep(t).queue;Cp(t,p,r,ce,i===null?xk:function(){return Ap(t),i(u)})}function Ep(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:ce},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:i},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function Ap(t){var r=Ep(t);r.next===null&&(r=t.alternate.memoizedState),Kl(t,r.next.queue,{},en())}function _c(){return jt(si)}function Tp(){return st().memoizedState}function _p(){return st().memoizedState}function bk(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var i=en();t=xa(i);var u=ba(r,t,i);u!==null&&(Ft(u,r,i),Bl(u,r,i)),r={cache:lc()},t.payload=r;return}r=r.return}}function vk(t,r,i){var u=en();i={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Bs(t)?Dp(r,i):(i=Gu(t,r,i,u),i!==null&&(Ft(i,t,u),Rp(i,r,u)))}function Mp(t,r,i){var u=en();Kl(t,r,i,u)}function Kl(t,r,i,u){var p={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Bs(t))Dp(r,p);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var k=r.lastRenderedState,w=m(k,i);if(p.hasEagerState=!0,p.eagerState=w,Gt(w,k))return bs(t,r,p,0),Qe===null&&xs(),!1}catch{}finally{}if(i=Gu(t,r,p,u),i!==null)return Ft(i,t,u),Rp(i,r,u),!0}return!1}function Mc(t,r,i,u){if(u={lane:2,revertLane:ud(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Bs(t)){if(r)throw Error(l(479))}else r=Gu(t,i,u,2),r!==null&&Ft(r,t,2)}function Bs(t){var r=t.alternate;return t===je||r!==null&&r===je}function Dp(t,r){$r=Ds=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function Rp(t,r,i){if((i&4194048)!==0){var u=r.lanes;u&=t.pendingLanes,i|=u,r.lanes=i,Hh(t,i)}}var Pl={readContext:jt,use:zs,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt,useHostTransitionStatus:rt,useFormState:rt,useActionState:rt,useOptimistic:rt,useMemoCache:rt,useCacheRefresh:rt};Pl.useEffectEvent=rt;var Op={readContext:jt,use:zs,useCallback:function(t,r){return Rt().memoizedState=[t,r===void 0?null:r],t},useContext:jt,useEffect:yp,useImperativeHandle:function(t,r,i){i=i!=null?i.concat([t]):null,Us(4194308,4,kp.bind(null,r,t),i)},useLayoutEffect:function(t,r){return Us(4194308,4,t,r)},useInsertionEffect:function(t,r){Us(4,2,t,r)},useMemo:function(t,r){var i=Rt();r=r===void 0?null:r;var u=t();if(tr){Lt(!0);try{t()}finally{Lt(!1)}}return i.memoizedState=[u,r],u},useReducer:function(t,r,i){var u=Rt();if(i!==void 0){var p=i(r);if(tr){Lt(!0);try{i(r)}finally{Lt(!1)}}}else p=r;return u.memoizedState=u.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},u.queue=t,t=t.dispatch=vk.bind(null,je,t),[u.memoizedState,t]},useRef:function(t){var r=Rt();return t={current:t},r.memoizedState=t},useState:function(t){t=jc(t);var r=t.queue,i=Mp.bind(null,je,r);return r.dispatch=i,[t.memoizedState,i]},useDebugValue:Ec,useDeferredValue:function(t,r){var i=Rt();return Ac(i,t,r)},useTransition:function(){var t=jc(!1);return t=Cp.bind(null,je,t.queue,!0,!1),Rt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,i){var u=je,p=Rt();if(Oe){if(i===void 0)throw Error(l(407));i=i()}else{if(i=r(),Qe===null)throw Error(l(349));(De&127)!==0||tp(u,r,i)}p.memoizedState=i;var m={value:i,getSnapshot:r};return p.queue=m,yp(ap.bind(null,u,m,t),[t]),u.flags|=2048,Kr(9,{destroy:void 0},np.bind(null,u,m,i,r),null),i},useId:function(){var t=Rt(),r=Qe.identifierPrefix;if(Oe){var i=An,u=En;i=(u&~(1<<32-Ge(u)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Rs++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=hk++,r="_"+r+"r_"+i.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:_c,useFormState:fp,useActionState:fp,useOptimistic:function(t){var r=Rt();r.memoizedState=r.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Mc.bind(null,je,!0,i),i.dispatch=r,[t,r]},useMemoCache:kc,useCacheRefresh:function(){return Rt().memoizedState=bk.bind(null,je)},useEffectEvent:function(t){var r=Rt(),i={impl:t};return r.memoizedState=i,function(){if((Be&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Dc={readContext:jt,use:zs,useCallback:wp,useContext:jt,useEffect:Cc,useImperativeHandle:Sp,useInsertionEffect:bp,useLayoutEffect:vp,useMemo:jp,useReducer:Ls,useRef:mp,useState:function(){return Ls(Gn)},useDebugValue:Ec,useDeferredValue:function(t,r){var i=st();return Np(i,Pe.memoizedState,t,r)},useTransition:function(){var t=Ls(Gn)[0],r=st().memoizedState;return[typeof t=="boolean"?t:Fl(t),r]},useSyncExternalStore:ep,useId:Tp,useHostTransitionStatus:_c,useFormState:hp,useActionState:hp,useOptimistic:function(t,r){var i=st();return ip(i,Pe,t,r)},useMemoCache:kc,useCacheRefresh:_p};Dc.useEffectEvent=xp;var zp={readContext:jt,use:zs,useCallback:wp,useContext:jt,useEffect:Cc,useImperativeHandle:Sp,useInsertionEffect:bp,useLayoutEffect:vp,useMemo:jp,useReducer:wc,useRef:mp,useState:function(){return wc(Gn)},useDebugValue:Ec,useDeferredValue:function(t,r){var i=st();return Pe===null?Ac(i,t,r):Np(i,Pe.memoizedState,t,r)},useTransition:function(){var t=wc(Gn)[0],r=st().memoizedState;return[typeof t=="boolean"?t:Fl(t),r]},useSyncExternalStore:ep,useId:Tp,useHostTransitionStatus:_c,useFormState:pp,useActionState:pp,useOptimistic:function(t,r){var i=st();return Pe!==null?ip(i,Pe,t,r):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:kc,useCacheRefresh:_p};zp.useEffectEvent=xp;function Rc(t,r,i,u){r=t.memoizedState,i=i(u,r),i=i==null?r:y({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Oc={enqueueSetState:function(t,r,i){t=t._reactInternals;var u=en(),p=xa(u);p.payload=r,i!=null&&(p.callback=i),r=ba(t,p,u),r!==null&&(Ft(r,t,u),Bl(r,t,u))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var u=en(),p=xa(u);p.tag=1,p.payload=r,i!=null&&(p.callback=i),r=ba(t,p,u),r!==null&&(Ft(r,t,u),Bl(r,t,u))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=en(),u=xa(i);u.tag=2,r!=null&&(u.callback=r),r=ba(t,u,i),r!==null&&(Ft(r,t,i),Bl(r,t,i))}};function Lp(t,r,i,u,p,m,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,m,k):r.prototype&&r.prototype.isPureReactComponent?!Ml(i,u)||!Ml(p,m):!0}function Up(t,r,i,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,u),r.state!==t&&Oc.enqueueReplaceState(r,r.state,null)}function nr(t,r){var i=r;if("ref"in r){i={};for(var u in r)u!=="ref"&&(i[u]=r[u])}if(t=t.defaultProps){i===r&&(i=y({},i));for(var p in t)i[p]===void 0&&(i[p]=t[p])}return i}function Hp(t){ys(t)}function Bp(t){console.error(t)}function qp(t){ys(t)}function qs(t,r){try{var i=t.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function Ip(t,r,i){try{var u=t.onCaughtError;u(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function zc(t,r,i){return i=xa(i),i.tag=3,i.payload={element:null},i.callback=function(){qs(t,r)},i}function $p(t){return t=xa(t),t.tag=3,t}function Fp(t,r,i,u){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var m=u.value;t.payload=function(){return p(m)},t.callback=function(){Ip(r,i,u)}}var k=i.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(t.callback=function(){Ip(r,i,u),typeof p!="function"&&(Na===null?Na=new Set([this]):Na.add(this));var w=u.stack;this.componentDidCatch(u.value,{componentStack:w!==null?w:""})})}function kk(t,r,i,u,p){if(i.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=i.alternate,r!==null&&Lr(r,i,p,!0),i=Xt.current,i!==null){switch(i.tag){case 31:case 13:return hn===null?Js():i.alternate===null&<===0&&(lt=3),i.flags&=-257,i.flags|=65536,i.lanes=p,u===Es?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([u]):r.add(u),id(t,u,p)),!1;case 22:return i.flags|=65536,u===Es?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([u]):i.add(u)),id(t,u,p)),!1}throw Error(l(435,i.tag))}return id(t,u,p),Js(),!1}if(Oe)return r=Xt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==ec&&(t=Error(l(422),{cause:u}),Ol(un(t,i)))):(u!==ec&&(r=Error(l(423),{cause:u}),Ol(un(r,i))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,u=un(u,i),p=zc(t.stateNode,u,p),dc(t,p),lt!==4&&(lt=2)),!1;var m=Error(l(520),{cause:u});if(m=un(m,i),Wl===null?Wl=[m]:Wl.push(m),lt!==4&&(lt=2),r===null)return!0;u=un(u,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,t=p&-p,i.lanes|=t,t=zc(i.stateNode,u,t),dc(i,t),!1;case 1:if(r=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Na===null||!Na.has(m))))return i.flags|=65536,p&=-p,i.lanes|=p,p=$p(p),Fp(p,t,i,u),dc(i,p),!1}i=i.return}while(i!==null);return!1}var Lc=Error(l(461)),dt=!1;function Nt(t,r,i,u){r.child=t===null?Yg(r,null,i,u):er(r,t.child,i,u)}function Kp(t,r,i,u,p){i=i.render;var m=r.ref;if("ref"in u){var k={};for(var w in u)w!=="ref"&&(k[w]=u[w])}else k=u;return Xa(r),u=yc(t,r,i,k,m,p),w=xc(),t!==null&&!dt?(bc(t,r,p),Qn(t,r,p)):(Oe&&w&&Ju(r),r.flags|=1,Nt(t,r,u,p),r.child)}function Pp(t,r,i,u,p){if(t===null){var m=i.type;return typeof m=="function"&&!Qu(m)&&m.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=m,Vp(t,r,m,u,p)):(t=ks(i.type,null,u,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!Kc(t,p)){var k=m.memoizedProps;if(i=i.compare,i=i!==null?i:Ml,i(k,u)&&t.ref===r.ref)return Qn(t,r,p)}return r.flags|=1,t=Fn(m,u),t.ref=r.ref,t.return=r,r.child=t}function Vp(t,r,i,u,p){if(t!==null){var m=t.memoizedProps;if(Ml(m,u)&&t.ref===r.ref)if(dt=!1,r.pendingProps=u=m,Kc(t,p))(t.flags&131072)!==0&&(dt=!0);else return r.lanes=t.lanes,Qn(t,r,p)}return Uc(t,r,i,u,p)}function Yp(t,r,i,u){var p=u.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|i:i,t!==null){for(u=r.child=t.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~m}else u=0,r.child=null;return Gp(t,r,m,i,u)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ns(r,m!==null?m.cachePool:null),m!==null?Xg(r,m):hc(),Zg(r);else return u=r.lanes=536870912,Gp(t,r,m!==null?m.baseLanes|i:i,i,u)}else m!==null?(Ns(r,m.cachePool),Xg(r,m),ka(),r.memoizedState=null):(t!==null&&Ns(r,null),hc(),ka());return Nt(t,r,p,i),r.child}function Vl(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Gp(t,r,i,u,p){var m=sc();return m=m===null?null:{parent:ut._currentValue,pool:m},r.memoizedState={baseLanes:i,cachePool:m},t!==null&&Ns(r,null),hc(),Zg(r),t!==null&&Lr(t,r,u,!0),r.childLanes=p,null}function Is(t,r){return r=Fs({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function Qp(t,r,i){return er(r,t.child,null,i),t=Is(r,r.pendingProps),t.flags|=2,Zt(r),r.memoizedState=null,t}function Sk(t,r,i){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Oe){if(u.mode==="hidden")return t=Is(r,u),r.lanes=536870912,Vl(null,t);if(pc(r),(t=We)?(t=s0(t,fn),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ha!==null?{id:En,overflow:An}:null,retryLane:536870912,hydrationErrors:null},i=Dg(t),i.return=r,r.child=i,wt=r,We=null)):t=null,t===null)throw pa(r);return r.lanes=536870912,null}return Is(r,u)}var m=t.memoizedState;if(m!==null){var k=m.dehydrated;if(pc(r),p)if(r.flags&256)r.flags&=-257,r=Qp(t,r,i);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(l(558));else if(dt||Lr(t,r,i,!1),p=(i&t.childLanes)!==0,dt||p){if(u=Qe,u!==null&&(k=Bh(u,i),k!==0&&k!==m.retryLane))throw m.retryLane=k,Va(t,k),Ft(u,t,k),Lc;Js(),r=Qp(t,r,i)}else t=m.treeContext,We=gn(k.nextSibling),wt=r,Oe=!0,ga=null,fn=!1,t!==null&&zg(r,t),r=Is(r,u),r.flags|=4096;return r}return t=Fn(t.child,{mode:u.mode,children:u.children}),t.ref=r.ref,r.child=t,t.return=r,t}function $s(t,r){var i=r.ref;if(i===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(t===null||t.ref!==i)&&(r.flags|=4194816)}}function Uc(t,r,i,u,p){return Xa(r),i=yc(t,r,i,u,void 0,p),u=xc(),t!==null&&!dt?(bc(t,r,p),Qn(t,r,p)):(Oe&&u&&Ju(r),r.flags|=1,Nt(t,r,i,p),r.child)}function Xp(t,r,i,u,p,m){return Xa(r),r.updateQueue=null,i=Wg(r,u,i,p),Jg(t),u=xc(),t!==null&&!dt?(bc(t,r,m),Qn(t,r,m)):(Oe&&u&&Ju(r),r.flags|=1,Nt(t,r,i,m),r.child)}function Zp(t,r,i,u,p){if(Xa(r),r.stateNode===null){var m=Dr,k=i.contextType;typeof k=="object"&&k!==null&&(m=jt(k)),m=new i(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Oc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},uc(r),k=i.contextType,m.context=typeof k=="object"&&k!==null?jt(k):Dr,m.state=r.memoizedState,k=i.getDerivedStateFromProps,typeof k=="function"&&(Rc(r,i,k,u),m.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(k=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),k!==m.state&&Oc.enqueueReplaceState(m,m.state,null),Il(r,u,m,p),ql(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(t===null){m=r.stateNode;var w=r.memoizedProps,M=nr(i,w);m.props=M;var I=m.context,Q=i.contextType;k=Dr,typeof Q=="object"&&Q!==null&&(k=jt(Q));var J=i.getDerivedStateFromProps;Q=typeof J=="function"||typeof m.getSnapshotBeforeUpdate=="function",w=r.pendingProps!==w,Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(w||I!==k)&&Up(r,m,u,k),ya=!1;var $=r.memoizedState;m.state=$,Il(r,u,m,p),ql(),I=r.memoizedState,w||$!==I||ya?(typeof J=="function"&&(Rc(r,i,J,u),I=r.memoizedState),(M=ya||Lp(r,i,M,u,$,I,k))?(Q||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=I),m.props=u,m.state=I,m.context=k,u=M):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,cc(t,r),k=r.memoizedProps,Q=nr(i,k),m.props=Q,J=r.pendingProps,$=m.context,I=i.contextType,M=Dr,typeof I=="object"&&I!==null&&(M=jt(I)),w=i.getDerivedStateFromProps,(I=typeof w=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==J||$!==M)&&Up(r,m,u,M),ya=!1,$=r.memoizedState,m.state=$,Il(r,u,m,p),ql();var K=r.memoizedState;k!==J||$!==K||ya||t!==null&&t.dependencies!==null&&ws(t.dependencies)?(typeof w=="function"&&(Rc(r,i,w,u),K=r.memoizedState),(Q=ya||Lp(r,i,Q,u,$,K,M)||t!==null&&t.dependencies!==null&&ws(t.dependencies))?(I||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,K,M),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,K,M)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&$===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&$===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=K),m.props=u,m.state=K,m.context=M,u=Q):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&$===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&$===t.memoizedState||(r.flags|=1024),u=!1)}return m=u,$s(t,r),u=(r.flags&128)!==0,m||u?(m=r.stateNode,i=u&&typeof i.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&u?(r.child=er(r,t.child,null,p),r.child=er(r,null,i,p)):Nt(t,r,i,p),r.memoizedState=m.state,t=r.child):t=Qn(t,r,p),t}function Jp(t,r,i,u){return Ga(),r.flags|=256,Nt(t,r,i,u),r.child}var Hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bc(t){return{baseLanes:t,cachePool:Ig()}}function qc(t,r,i){return t=t!==null?t.childLanes&~i:0,r&&(t|=Wt),t}function Wp(t,r,i){var u=r.pendingProps,p=!1,m=(r.flags&128)!==0,k;if((k=m)||(k=t!==null&&t.memoizedState===null?!1:(it.current&2)!==0),k&&(p=!0,r.flags&=-129),k=(r.flags&32)!==0,r.flags&=-33,t===null){if(Oe){if(p?va(r):ka(),(t=We)?(t=s0(t,fn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ha!==null?{id:En,overflow:An}:null,retryLane:536870912,hydrationErrors:null},i=Dg(t),i.return=r,r.child=i,wt=r,We=null)):t=null,t===null)throw pa(r);return Sd(t)?r.lanes=32:r.lanes=536870912,null}var w=u.children;return u=u.fallback,p?(ka(),p=r.mode,w=Fs({mode:"hidden",children:w},p),u=Ya(u,p,i,null),w.return=r,u.return=r,w.sibling=u,r.child=w,u=r.child,u.memoizedState=Bc(i),u.childLanes=qc(t,k,i),r.memoizedState=Hc,Vl(null,u)):(va(r),Ic(r,w))}var M=t.memoizedState;if(M!==null&&(w=M.dehydrated,w!==null)){if(m)r.flags&256?(va(r),r.flags&=-257,r=$c(t,r,i)):r.memoizedState!==null?(ka(),r.child=t.child,r.flags|=128,r=null):(ka(),w=u.fallback,p=r.mode,u=Fs({mode:"visible",children:u.children},p),w=Ya(w,p,i,null),w.flags|=2,u.return=r,w.return=r,u.sibling=w,r.child=u,er(r,t.child,null,i),u=r.child,u.memoizedState=Bc(i),u.childLanes=qc(t,k,i),r.memoizedState=Hc,r=Vl(null,u));else if(va(r),Sd(w)){if(k=w.nextSibling&&w.nextSibling.dataset,k)var I=k.dgst;k=I,u=Error(l(419)),u.stack="",u.digest=k,Ol({value:u,source:null,stack:null}),r=$c(t,r,i)}else if(dt||Lr(t,r,i,!1),k=(i&t.childLanes)!==0,dt||k){if(k=Qe,k!==null&&(u=Bh(k,i),u!==0&&u!==M.retryLane))throw M.retryLane=u,Va(t,u),Ft(k,t,u),Lc;kd(w)||Js(),r=$c(t,r,i)}else kd(w)?(r.flags|=192,r.child=t.child,r=null):(t=M.treeContext,We=gn(w.nextSibling),wt=r,Oe=!0,ga=null,fn=!1,t!==null&&zg(r,t),r=Ic(r,u.children),r.flags|=4096);return r}return p?(ka(),w=u.fallback,p=r.mode,M=t.child,I=M.sibling,u=Fn(M,{mode:"hidden",children:u.children}),u.subtreeFlags=M.subtreeFlags&65011712,I!==null?w=Fn(I,w):(w=Ya(w,p,i,null),w.flags|=2),w.return=r,u.return=r,u.sibling=w,r.child=u,Vl(null,u),u=r.child,w=t.child.memoizedState,w===null?w=Bc(i):(p=w.cachePool,p!==null?(M=ut._currentValue,p=p.parent!==M?{parent:M,pool:M}:p):p=Ig(),w={baseLanes:w.baseLanes|i,cachePool:p}),u.memoizedState=w,u.childLanes=qc(t,k,i),r.memoizedState=Hc,Vl(t.child,u)):(va(r),i=t.child,t=i.sibling,i=Fn(i,{mode:"visible",children:u.children}),i.return=r,i.sibling=null,t!==null&&(k=r.deletions,k===null?(r.deletions=[t],r.flags|=16):k.push(t)),r.child=i,r.memoizedState=null,i)}function Ic(t,r){return r=Fs({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Fs(t,r){return t=Qt(22,t,null,r),t.lanes=0,t}function $c(t,r,i){return er(r,t.child,null,i),t=Ic(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function em(t,r,i){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),ac(t.return,r,i)}function Fc(t,r,i,u,p,m){var k=t.memoizedState;k===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:i,tailMode:p,treeForkCount:m}:(k.isBackwards=r,k.rendering=null,k.renderingStartTime=0,k.last=u,k.tail=i,k.tailMode=p,k.treeForkCount=m)}function tm(t,r,i){var u=r.pendingProps,p=u.revealOrder,m=u.tail;u=u.children;var k=it.current,w=(k&2)!==0;if(w?(k=k&1|2,r.flags|=128):k&=1,A(it,k),Nt(t,r,u,i),u=Oe?Rl:0,!w&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&em(t,i,r);else if(t.tag===19)em(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(p){case"forwards":for(i=r.child,p=null;i!==null;)t=i.alternate,t!==null&&Ms(t)===null&&(p=i),i=i.sibling;i=p,i===null?(p=r.child,r.child=null):(p=i.sibling,i.sibling=null),Fc(r,!1,p,i,m,u);break;case"backwards":case"unstable_legacy-backwards":for(i=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&Ms(t)===null){r.child=p;break}t=p.sibling,p.sibling=i,i=p,p=t}Fc(r,!0,i,null,m,u);break;case"together":Fc(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Qn(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),ja|=r.lanes,(i&r.childLanes)===0)if(t!==null){if(Lr(t,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(l(153));if(r.child!==null){for(t=r.child,i=Fn(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=Fn(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function Kc(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&ws(t)))}function wk(t,r,i){switch(r.tag){case 3:tt(r,r.stateNode.containerInfo),ma(r,ut,t.memoizedState.cache),Ga();break;case 27:case 5:rn(r);break;case 4:tt(r,r.stateNode.containerInfo);break;case 10:ma(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,pc(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(va(r),r.flags|=128,null):(i&r.child.childLanes)!==0?Wp(t,r,i):(va(r),t=Qn(t,r,i),t!==null?t.sibling:null);va(r);break;case 19:var p=(t.flags&128)!==0;if(u=(i&r.childLanes)!==0,u||(Lr(t,r,i,!1),u=(i&r.childLanes)!==0),p){if(u)return tm(t,r,i);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),A(it,it.current),u)break;return null;case 22:return r.lanes=0,Yp(t,r,i,r.pendingProps);case 24:ma(r,ut,t.memoizedState.cache)}return Qn(t,r,i)}function nm(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps)dt=!0;else{if(!Kc(t,i)&&(r.flags&128)===0)return dt=!1,wk(t,r,i);dt=(t.flags&131072)!==0}else dt=!1,Oe&&(r.flags&1048576)!==0&&Og(r,Rl,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(t=Ja(r.elementType),r.type=t,typeof t=="function")Qu(t)?(u=nr(t,u),r.tag=1,r=Zp(null,r,t,u,i)):(r.tag=0,r=Uc(null,r,t,u,i));else{if(t!=null){var p=t.$$typeof;if(p===P){r.tag=11,r=Kp(null,r,t,u,i);break e}else if(p===V){r.tag=14,r=Pp(null,r,t,u,i);break e}}throw r=ne(t)||t,Error(l(306,r,""))}}return r;case 0:return Uc(t,r,r.type,r.pendingProps,i);case 1:return u=r.type,p=nr(u,r.pendingProps),Zp(t,r,u,p,i);case 3:e:{if(tt(r,r.stateNode.containerInfo),t===null)throw Error(l(387));u=r.pendingProps;var m=r.memoizedState;p=m.element,cc(t,r),Il(r,u,null,i);var k=r.memoizedState;if(u=k.cache,ma(r,ut,u),u!==m.cache&&rc(r,[ut],i,!0),ql(),u=k.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:k.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=Jp(t,r,u,i);break e}else if(u!==p){p=un(Error(l(424)),r),Ol(p),r=Jp(t,r,u,i);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(We=gn(t.firstChild),wt=r,Oe=!0,ga=null,fn=!0,i=Yg(r,null,u,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ga(),u===p){r=Qn(t,r,i);break e}Nt(t,r,u,i)}r=r.child}return r;case 26:return $s(t,r),t===null?(i=h0(r.type,null,r.pendingProps,null))?r.memoizedState=i:Oe||(i=r.type,t=r.pendingProps,u=lo(ge.current).createElement(i),u[St]=r,u[Ut]=t,Ct(u,i,t),xt(u),r.stateNode=u):r.memoizedState=h0(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return rn(r),t===null&&Oe&&(u=r.stateNode=c0(r.type,r.pendingProps,ge.current),wt=r,fn=!0,p=We,Ta(r.type)?(wd=p,We=gn(u.firstChild)):We=p),Nt(t,r,r.pendingProps.children,i),$s(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Oe&&((p=u=We)&&(u=Wk(u,r.type,r.pendingProps,fn),u!==null?(r.stateNode=u,wt=r,We=gn(u.firstChild),fn=!1,p=!0):p=!1),p||pa(r)),rn(r),p=r.type,m=r.pendingProps,k=t!==null?t.memoizedProps:null,u=m.children,xd(p,m)?u=null:k!==null&&xd(p,k)&&(r.flags|=32),r.memoizedState!==null&&(p=yc(t,r,gk,null,null,i),si._currentValue=p),$s(t,r),Nt(t,r,u,i),r.child;case 6:return t===null&&Oe&&((t=i=We)&&(i=eS(i,r.pendingProps,fn),i!==null?(r.stateNode=i,wt=r,We=null,t=!0):t=!1),t||pa(r)),null;case 13:return Wp(t,r,i);case 4:return tt(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=er(r,null,u,i):Nt(t,r,u,i),r.child;case 11:return Kp(t,r,r.type,r.pendingProps,i);case 7:return Nt(t,r,r.pendingProps,i),r.child;case 8:return Nt(t,r,r.pendingProps.children,i),r.child;case 12:return Nt(t,r,r.pendingProps.children,i),r.child;case 10:return u=r.pendingProps,ma(r,r.type,u.value),Nt(t,r,u.children,i),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,Xa(r),p=jt(p),u=u(p),r.flags|=1,Nt(t,r,u,i),r.child;case 14:return Pp(t,r,r.type,r.pendingProps,i);case 15:return Vp(t,r,r.type,r.pendingProps,i);case 19:return tm(t,r,i);case 31:return Sk(t,r,i);case 22:return Yp(t,r,i,r.pendingProps);case 24:return Xa(r),u=jt(ut),t===null?(p=sc(),p===null&&(p=Qe,m=lc(),p.pooledCache=m,m.refCount++,m!==null&&(p.pooledCacheLanes|=i),p=m),r.memoizedState={parent:u,cache:p},uc(r),ma(r,ut,p)):((t.lanes&i)!==0&&(cc(t,r),Il(r,null,null,i),ql()),p=t.memoizedState,m=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),ma(r,ut,u)):(u=m.cache,ma(r,ut,u),u!==p.cache&&rc(r,[ut],i,!0))),Nt(t,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(l(156,r.tag))}function Xn(t){t.flags|=4}function Pc(t,r,i,u,p){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(p&335544128)===p)if(t.stateNode.complete)t.flags|=8192;else if(Tm())t.flags|=8192;else throw Wa=Es,oc}else t.flags&=-16777217}function am(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!x0(r))if(Tm())t.flags|=8192;else throw Wa=Es,oc}function Ks(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?Lh():536870912,t.lanes|=r,Gr|=r)}function Yl(t,r){if(!Oe)switch(t.tailMode){case"hidden":r=t.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function et(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,u=0;if(r)for(var p=t.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=u,t.childLanes=i,r}function jk(t,r,i){var u=r.pendingProps;switch(Wu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(r),null;case 1:return et(r),null;case 3:return i=r.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Vn(ut),Ke(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(zr(r)?Xn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,tc())),et(r),null;case 26:var p=r.type,m=r.memoizedState;return t===null?(Xn(r),m!==null?(et(r),am(r,m)):(et(r),Pc(r,p,null,u,i))):m?m!==t.memoizedState?(Xn(r),et(r),am(r,m)):(et(r),r.flags&=-16777217):(t=t.memoizedProps,t!==u&&Xn(r),et(r),Pc(r,p,t,u,i)),null;case 27:if(Un(r),i=ge.current,p=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Xn(r);else{if(!u){if(r.stateNode===null)throw Error(l(166));return et(r),null}t=se.current,zr(r)?Lg(r):(t=c0(p,u,i),r.stateNode=t,Xn(r))}return et(r),null;case 5:if(Un(r),p=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Xn(r);else{if(!u){if(r.stateNode===null)throw Error(l(166));return et(r),null}if(m=se.current,zr(r))Lg(r);else{var k=lo(ge.current);switch(m){case 1:m=k.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:m=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":m=k.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":m=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":m=k.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?k.createElement("select",{is:u.is}):k.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?k.createElement(p,{is:u.is}):k.createElement(p)}}m[St]=r,m[Ut]=u;e:for(k=r.child;k!==null;){if(k.tag===5||k.tag===6)m.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===r)break e;for(;k.sibling===null;){if(k.return===null||k.return===r)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}r.stateNode=m;e:switch(Ct(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Xn(r)}}return et(r),Pc(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,i),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==u&&Xn(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(l(166));if(t=ge.current,zr(r)){if(t=r.stateNode,i=r.memoizedProps,u=null,p=wt,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}t[St]=r,t=!!(t.nodeValue===i||u!==null&&u.suppressHydrationWarning===!0||Wm(t.nodeValue,i)),t||pa(r,!0)}else t=lo(t).createTextNode(u),t[St]=r,r.stateNode=t}return et(r),null;case 31:if(i=r.memoizedState,t===null||t.memoizedState!==null){if(u=zr(r),i!==null){if(t===null){if(!u)throw Error(l(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[St]=r}else Ga(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;et(r),t=!1}else i=tc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return r.flags&256?(Zt(r),r):(Zt(r),null);if((r.flags&128)!==0)throw Error(l(558))}return et(r),null;case 13:if(u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=zr(r),u!==null&&u.dehydrated!==null){if(t===null){if(!p)throw Error(l(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(l(317));p[St]=r}else Ga(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;et(r),p=!1}else p=tc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(Zt(r),r):(Zt(r),null)}return Zt(r),(r.flags&128)!==0?(r.lanes=i,r):(i=u!==null,t=t!==null&&t.memoizedState!==null,i&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),i!==t&&i&&(r.child.flags|=8192),Ks(r,r.updateQueue),et(r),null);case 4:return Ke(),t===null&&hd(r.stateNode.containerInfo),et(r),null;case 10:return Vn(r.type),et(r),null;case 19:if(Y(it),u=r.memoizedState,u===null)return et(r),null;if(p=(r.flags&128)!==0,m=u.rendering,m===null)if(p)Yl(u,!1);else{if(lt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=Ms(t),m!==null){for(r.flags|=128,Yl(u,!1),t=m.updateQueue,r.updateQueue=t,Ks(r,t),r.subtreeFlags=0,t=i,i=r.child;i!==null;)Mg(i,t),i=i.sibling;return A(it,it.current&1|2),Oe&&Kn(r,u.treeForkCount),r.child}t=t.sibling}u.tail!==null&&Mt()>Qs&&(r.flags|=128,p=!0,Yl(u,!1),r.lanes=4194304)}else{if(!p)if(t=Ms(m),t!==null){if(r.flags|=128,p=!0,t=t.updateQueue,r.updateQueue=t,Ks(r,t),Yl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!Oe)return et(r),null}else 2*Mt()-u.renderingStartTime>Qs&&i!==536870912&&(r.flags|=128,p=!0,Yl(u,!1),r.lanes=4194304);u.isBackwards?(m.sibling=r.child,r.child=m):(t=u.last,t!==null?t.sibling=m:r.child=m,u.last=m)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Mt(),t.sibling=null,i=it.current,A(it,p?i&1|2:i&1),Oe&&Kn(r,u.treeForkCount),t):(et(r),null);case 22:case 23:return Zt(r),gc(),u=r.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(i&536870912)!==0&&(r.flags&128)===0&&(et(r),r.subtreeFlags&6&&(r.flags|=8192)):et(r),i=r.updateQueue,i!==null&&Ks(r,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==i&&(r.flags|=2048),t!==null&&Y(Za),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),Vn(ut),et(r),null;case 25:return null;case 30:return null}throw Error(l(156,r.tag))}function Nk(t,r){switch(Wu(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Vn(ut),Ke(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return Un(r),null;case 31:if(r.memoizedState!==null){if(Zt(r),r.alternate===null)throw Error(l(340));Ga()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(Zt(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(l(340));Ga()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Y(it),null;case 4:return Ke(),null;case 10:return Vn(r.type),null;case 22:case 23:return Zt(r),gc(),t!==null&&Y(Za),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Vn(ut),null;case 25:return null;default:return null}}function rm(t,r){switch(Wu(r),r.tag){case 3:Vn(ut),Ke();break;case 26:case 27:case 5:Un(r);break;case 4:Ke();break;case 31:r.memoizedState!==null&&Zt(r);break;case 13:Zt(r);break;case 19:Y(it);break;case 10:Vn(r.type);break;case 22:case 23:Zt(r),gc(),t!==null&&Y(Za);break;case 24:Vn(ut)}}function Gl(t,r){try{var i=r.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var p=u.next;i=p;do{if((i.tag&t)===t){u=void 0;var m=i.create,k=i.inst;u=m(),k.destroy=u}i=i.next}while(i!==p)}}catch(w){Fe(r,r.return,w)}}function Sa(t,r,i){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&t)===t){var k=u.inst,w=k.destroy;if(w!==void 0){k.destroy=void 0,p=r;var M=i,I=w;try{I()}catch(Q){Fe(p,M,Q)}}}u=u.next}while(u!==m)}}catch(Q){Fe(r,r.return,Q)}}function lm(t){var r=t.updateQueue;if(r!==null){var i=t.stateNode;try{Qg(r,i)}catch(u){Fe(t,t.return,u)}}}function im(t,r,i){i.props=nr(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(u){Fe(t,r,u)}}function Ql(t,r){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof i=="function"?t.refCleanup=i(u):i.current=u}}catch(p){Fe(t,r,p)}}function Tn(t,r){var i=t.ref,u=t.refCleanup;if(i!==null)if(typeof u=="function")try{u()}catch(p){Fe(t,r,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){Fe(t,r,p)}else i.current=null}function sm(t){var r=t.type,i=t.memoizedProps,u=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&u.focus();break e;case"img":i.src?u.src=i.src:i.srcSet&&(u.srcset=i.srcSet)}}catch(p){Fe(t,t.return,p)}}function Vc(t,r,i){try{var u=t.stateNode;Yk(u,t.type,i,r),u[Ut]=r}catch(p){Fe(t,t.return,p)}}function om(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ta(t.type)||t.tag===4}function Yc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||om(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ta(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Gc(t,r,i){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(t),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=In));else if(u!==4&&(u===27&&Ta(t.type)&&(i=t.stateNode,r=null),t=t.child,t!==null))for(Gc(t,r,i),t=t.sibling;t!==null;)Gc(t,r,i),t=t.sibling}function Ps(t,r,i){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?i.insertBefore(t,r):i.appendChild(t);else if(u!==4&&(u===27&&Ta(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(Ps(t,r,i),t=t.sibling;t!==null;)Ps(t,r,i),t=t.sibling}function um(t){var r=t.stateNode,i=t.memoizedProps;try{for(var u=t.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);Ct(r,u,i),r[St]=t,r[Ut]=i}catch(m){Fe(t,t.return,m)}}var Zn=!1,ft=!1,Qc=!1,cm=typeof WeakSet=="function"?WeakSet:Set,bt=null;function Ck(t,r){if(t=t.containerInfo,md=ho,t=Sg(t),$u(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var u=i.getSelection&&i.getSelection();if(u&&u.rangeCount!==0){i=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var k=0,w=-1,M=-1,I=0,Q=0,J=t,$=null;t:for(;;){for(var K;J!==i||p!==0&&J.nodeType!==3||(w=k+p),J!==m||u!==0&&J.nodeType!==3||(M=k+u),J.nodeType===3&&(k+=J.nodeValue.length),(K=J.firstChild)!==null;)$=J,J=K;for(;;){if(J===t)break t;if($===i&&++I===p&&(w=k),$===m&&++Q===u&&(M=k),(K=J.nextSibling)!==null)break;J=$,$=J.parentNode}J=K}i=w===-1||M===-1?null:{start:w,end:M}}else i=null}i=i||{start:0,end:0}}else i=null;for(yd={focusedElem:t,selectionRange:i},ho=!1,bt=r;bt!==null;)if(r=bt,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,bt=t;else for(;bt!==null;){switch(r=bt,m=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(i=0;i<t.length;i++)p=t[i],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,i=r,p=m.memoizedProps,m=m.memoizedState,u=i.stateNode;try{var de=nr(i.type,p);t=u.getSnapshotBeforeUpdate(de,m),u.__reactInternalSnapshotBeforeUpdate=t}catch(be){Fe(i,i.return,be)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,i=t.nodeType,i===9)vd(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":vd(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=r.sibling,t!==null){t.return=r.return,bt=t;break}bt=r.return}}function dm(t,r,i){var u=i.flags;switch(i.tag){case 0:case 11:case 15:Wn(t,i),u&4&&Gl(5,i);break;case 1:if(Wn(t,i),u&4)if(t=i.stateNode,r===null)try{t.componentDidMount()}catch(k){Fe(i,i.return,k)}else{var p=nr(i.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(p,r,t.__reactInternalSnapshotBeforeUpdate)}catch(k){Fe(i,i.return,k)}}u&64&&lm(i),u&512&&Ql(i,i.return);break;case 3:if(Wn(t,i),u&64&&(t=i.updateQueue,t!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{Qg(t,r)}catch(k){Fe(i,i.return,k)}}break;case 27:r===null&&u&4&&um(i);case 26:case 5:Wn(t,i),r===null&&u&4&&sm(i),u&512&&Ql(i,i.return);break;case 12:Wn(t,i);break;case 31:Wn(t,i),u&4&&gm(t,i);break;case 13:Wn(t,i),u&4&&pm(t,i),u&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=zk.bind(null,i),tS(t,i))));break;case 22:if(u=i.memoizedState!==null||Zn,!u){r=r!==null&&r.memoizedState!==null||ft,p=Zn;var m=ft;Zn=u,(ft=r)&&!m?ea(t,i,(i.subtreeFlags&8772)!==0):Wn(t,i),Zn=p,ft=m}break;case 30:break;default:Wn(t,i)}}function fm(t){var r=t.alternate;r!==null&&(t.alternate=null,fm(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Nu(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var nt=null,Bt=!1;function Jn(t,r,i){for(i=i.child;i!==null;)hm(t,r,i),i=i.sibling}function hm(t,r,i){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Dt,i)}catch{}switch(i.tag){case 26:ft||Tn(i,r),Jn(t,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ft||Tn(i,r);var u=nt,p=Bt;Ta(i.type)&&(nt=i.stateNode,Bt=!1),Jn(t,r,i),ri(i.stateNode),nt=u,Bt=p;break;case 5:ft||Tn(i,r);case 6:if(u=nt,p=Bt,nt=null,Jn(t,r,i),nt=u,Bt=p,nt!==null)if(Bt)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(i.stateNode)}catch(m){Fe(i,r,m)}else try{nt.removeChild(i.stateNode)}catch(m){Fe(i,r,m)}break;case 18:nt!==null&&(Bt?(t=nt,l0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),nl(t)):l0(nt,i.stateNode));break;case 4:u=nt,p=Bt,nt=i.stateNode.containerInfo,Bt=!0,Jn(t,r,i),nt=u,Bt=p;break;case 0:case 11:case 14:case 15:Sa(2,i,r),ft||Sa(4,i,r),Jn(t,r,i);break;case 1:ft||(Tn(i,r),u=i.stateNode,typeof u.componentWillUnmount=="function"&&im(i,r,u)),Jn(t,r,i);break;case 21:Jn(t,r,i);break;case 22:ft=(u=ft)||i.memoizedState!==null,Jn(t,r,i),ft=u;break;default:Jn(t,r,i)}}function gm(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{nl(t)}catch(i){Fe(r,r.return,i)}}}function pm(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{nl(t)}catch(i){Fe(r,r.return,i)}}function Ek(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new cm),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new cm),r;default:throw Error(l(435,t.tag))}}function Vs(t,r){var i=Ek(t);r.forEach(function(u){if(!i.has(u)){i.add(u);var p=Lk.bind(null,t,u);u.then(p,p)}})}function qt(t,r){var i=r.deletions;if(i!==null)for(var u=0;u<i.length;u++){var p=i[u],m=t,k=r,w=k;e:for(;w!==null;){switch(w.tag){case 27:if(Ta(w.type)){nt=w.stateNode,Bt=!1;break e}break;case 5:nt=w.stateNode,Bt=!1;break e;case 3:case 4:nt=w.stateNode.containerInfo,Bt=!0;break e}w=w.return}if(nt===null)throw Error(l(160));hm(m,k,p),nt=null,Bt=!1,m=p.alternate,m!==null&&(m.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)mm(r,t),r=r.sibling}var kn=null;function mm(t,r){var i=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:qt(r,t),It(t),u&4&&(Sa(3,t,t.return),Gl(3,t),Sa(5,t,t.return));break;case 1:qt(r,t),It(t),u&512&&(ft||i===null||Tn(i,i.return)),u&64&&Zn&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?u:i.concat(u))));break;case 26:var p=kn;if(qt(r,t),It(t),u&512&&(ft||i===null||Tn(i,i.return)),u&4){var m=i!==null?i.memoizedState:null;if(u=t.memoizedState,i===null)if(u===null)if(t.stateNode===null){e:{u=t.type,i=t.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":m=p.getElementsByTagName("title")[0],(!m||m[Sl]||m[St]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=p.createElement(u),p.head.insertBefore(m,p.querySelector("head > title"))),Ct(m,u,i),m[St]=t,xt(m),u=m;break e;case"link":var k=m0("link","href",p).get(u+(i.href||""));if(k){for(var w=0;w<k.length;w++)if(m=k[w],m.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&m.getAttribute("rel")===(i.rel==null?null:i.rel)&&m.getAttribute("title")===(i.title==null?null:i.title)&&m.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){k.splice(w,1);break t}}m=p.createElement(u),Ct(m,u,i),p.head.appendChild(m);break;case"meta":if(k=m0("meta","content",p).get(u+(i.content||""))){for(w=0;w<k.length;w++)if(m=k[w],m.getAttribute("content")===(i.content==null?null:""+i.content)&&m.getAttribute("name")===(i.name==null?null:i.name)&&m.getAttribute("property")===(i.property==null?null:i.property)&&m.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&m.getAttribute("charset")===(i.charSet==null?null:i.charSet)){k.splice(w,1);break t}}m=p.createElement(u),Ct(m,u,i),p.head.appendChild(m);break;default:throw Error(l(468,u))}m[St]=t,xt(m),u=m}t.stateNode=u}else y0(p,t.type,t.stateNode);else t.stateNode=p0(p,u,t.memoizedProps);else m!==u?(m===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):m.count--,u===null?y0(p,t.type,t.stateNode):p0(p,u,t.memoizedProps)):u===null&&t.stateNode!==null&&Vc(t,t.memoizedProps,i.memoizedProps)}break;case 27:qt(r,t),It(t),u&512&&(ft||i===null||Tn(i,i.return)),i!==null&&u&4&&Vc(t,t.memoizedProps,i.memoizedProps);break;case 5:if(qt(r,t),It(t),u&512&&(ft||i===null||Tn(i,i.return)),t.flags&32){p=t.stateNode;try{Nr(p,"")}catch(de){Fe(t,t.return,de)}}u&4&&t.stateNode!=null&&(p=t.memoizedProps,Vc(t,p,i!==null?i.memoizedProps:p)),u&1024&&(Qc=!0);break;case 6:if(qt(r,t),It(t),u&4){if(t.stateNode===null)throw Error(l(162));u=t.memoizedProps,i=t.stateNode;try{i.nodeValue=u}catch(de){Fe(t,t.return,de)}}break;case 3:if(oo=null,p=kn,kn=io(r.containerInfo),qt(r,t),kn=p,It(t),u&4&&i!==null&&i.memoizedState.isDehydrated)try{nl(r.containerInfo)}catch(de){Fe(t,t.return,de)}Qc&&(Qc=!1,ym(t));break;case 4:u=kn,kn=io(t.stateNode.containerInfo),qt(r,t),It(t),kn=u;break;case 12:qt(r,t),It(t);break;case 31:qt(r,t),It(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Vs(t,u)));break;case 13:qt(r,t),It(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Gs=Mt()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Vs(t,u)));break;case 22:p=t.memoizedState!==null;var M=i!==null&&i.memoizedState!==null,I=Zn,Q=ft;if(Zn=I||p,ft=Q||M,qt(r,t),ft=Q,Zn=I,It(t),u&8192)e:for(r=t.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(i===null||M||Zn||ft||ar(t)),i=null,r=t;;){if(r.tag===5||r.tag===26){if(i===null){M=i=r;try{if(m=M.stateNode,p)k=m.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{w=M.stateNode;var J=M.memoizedProps.style,$=J!=null&&J.hasOwnProperty("display")?J.display:null;w.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(de){Fe(M,M.return,de)}}}else if(r.tag===6){if(i===null){M=r;try{M.stateNode.nodeValue=p?"":M.memoizedProps}catch(de){Fe(M,M.return,de)}}}else if(r.tag===18){if(i===null){M=r;try{var K=M.stateNode;p?i0(K,!0):i0(M.stateNode,!1)}catch(de){Fe(M,M.return,de)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=t.updateQueue,u!==null&&(i=u.retryQueue,i!==null&&(u.retryQueue=null,Vs(t,i))));break;case 19:qt(r,t),It(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Vs(t,u)));break;case 30:break;case 21:break;default:qt(r,t),It(t)}}function It(t){var r=t.flags;if(r&2){try{for(var i,u=t.return;u!==null;){if(om(u)){i=u;break}u=u.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var p=i.stateNode,m=Yc(t);Ps(t,m,p);break;case 5:var k=i.stateNode;i.flags&32&&(Nr(k,""),i.flags&=-33);var w=Yc(t);Ps(t,w,k);break;case 3:case 4:var M=i.stateNode.containerInfo,I=Yc(t);Gc(t,I,M);break;default:throw Error(l(161))}}catch(Q){Fe(t,t.return,Q)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function ym(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;ym(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Wn(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)dm(t,r.alternate,r),r=r.sibling}function ar(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:Sa(4,r,r.return),ar(r);break;case 1:Tn(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&im(r,r.return,i),ar(r);break;case 27:ri(r.stateNode);case 26:case 5:Tn(r,r.return),ar(r);break;case 22:r.memoizedState===null&&ar(r);break;case 30:ar(r);break;default:ar(r)}t=t.sibling}}function ea(t,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=t,m=r,k=m.flags;switch(m.tag){case 0:case 11:case 15:ea(p,m,i),Gl(4,m);break;case 1:if(ea(p,m,i),u=m,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(I){Fe(u,u.return,I)}if(u=m,p=u.updateQueue,p!==null){var w=u.stateNode;try{var M=p.shared.hiddenCallbacks;if(M!==null)for(p.shared.hiddenCallbacks=null,p=0;p<M.length;p++)Gg(M[p],w)}catch(I){Fe(u,u.return,I)}}i&&k&64&&lm(m),Ql(m,m.return);break;case 27:um(m);case 26:case 5:ea(p,m,i),i&&u===null&&k&4&&sm(m),Ql(m,m.return);break;case 12:ea(p,m,i);break;case 31:ea(p,m,i),i&&k&4&&gm(p,m);break;case 13:ea(p,m,i),i&&k&4&&pm(p,m);break;case 22:m.memoizedState===null&&ea(p,m,i),Ql(m,m.return);break;case 30:break;default:ea(p,m,i)}r=r.sibling}}function Xc(t,r){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&zl(i))}function Zc(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&zl(t))}function Sn(t,r,i,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)xm(t,r,i,u),r=r.sibling}function xm(t,r,i,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Sn(t,r,i,u),p&2048&&Gl(9,r);break;case 1:Sn(t,r,i,u);break;case 3:Sn(t,r,i,u),p&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&zl(t)));break;case 12:if(p&2048){Sn(t,r,i,u),t=r.stateNode;try{var m=r.memoizedProps,k=m.id,w=m.onPostCommit;typeof w=="function"&&w(k,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(M){Fe(r,r.return,M)}}else Sn(t,r,i,u);break;case 31:Sn(t,r,i,u);break;case 13:Sn(t,r,i,u);break;case 23:break;case 22:m=r.stateNode,k=r.alternate,r.memoizedState!==null?m._visibility&2?Sn(t,r,i,u):Xl(t,r):m._visibility&2?Sn(t,r,i,u):(m._visibility|=2,Pr(t,r,i,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&Xc(k,r);break;case 24:Sn(t,r,i,u),p&2048&&Zc(r.alternate,r);break;default:Sn(t,r,i,u)}}function Pr(t,r,i,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,k=r,w=i,M=u,I=k.flags;switch(k.tag){case 0:case 11:case 15:Pr(m,k,w,M,p),Gl(8,k);break;case 23:break;case 22:var Q=k.stateNode;k.memoizedState!==null?Q._visibility&2?Pr(m,k,w,M,p):Xl(m,k):(Q._visibility|=2,Pr(m,k,w,M,p)),p&&I&2048&&Xc(k.alternate,k);break;case 24:Pr(m,k,w,M,p),p&&I&2048&&Zc(k.alternate,k);break;default:Pr(m,k,w,M,p)}r=r.sibling}}function Xl(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=t,u=r,p=u.flags;switch(u.tag){case 22:Xl(i,u),p&2048&&Xc(u.alternate,u);break;case 24:Xl(i,u),p&2048&&Zc(u.alternate,u);break;default:Xl(i,u)}r=r.sibling}}var Zl=8192;function Vr(t,r,i){if(t.subtreeFlags&Zl)for(t=t.child;t!==null;)bm(t,r,i),t=t.sibling}function bm(t,r,i){switch(t.tag){case 26:Vr(t,r,i),t.flags&Zl&&t.memoizedState!==null&&hS(i,kn,t.memoizedState,t.memoizedProps);break;case 5:Vr(t,r,i);break;case 3:case 4:var u=kn;kn=io(t.stateNode.containerInfo),Vr(t,r,i),kn=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=Zl,Zl=16777216,Vr(t,r,i),Zl=u):Vr(t,r,i));break;default:Vr(t,r,i)}}function vm(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Jl(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var u=r[i];bt=u,Sm(u,t)}vm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)km(t),t=t.sibling}function km(t){switch(t.tag){case 0:case 11:case 15:Jl(t),t.flags&2048&&Sa(9,t,t.return);break;case 3:Jl(t);break;case 12:Jl(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Ys(t)):Jl(t);break;default:Jl(t)}}function Ys(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var u=r[i];bt=u,Sm(u,t)}vm(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:Sa(8,r,r.return),Ys(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Ys(r));break;default:Ys(r)}t=t.sibling}}function Sm(t,r){for(;bt!==null;){var i=bt;switch(i.tag){case 0:case 11:case 15:Sa(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var u=i.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:zl(i.memoizedState.cache)}if(u=i.child,u!==null)u.return=i,bt=u;else e:for(i=t;bt!==null;){u=bt;var p=u.sibling,m=u.return;if(fm(u),u===i){bt=null;break e}if(p!==null){p.return=m,bt=p;break e}bt=m}}}var Ak={getCacheForType:function(t){var r=jt(ut),i=r.data.get(t);return i===void 0&&(i=t(),r.data.set(t,i)),i},cacheSignal:function(){return jt(ut).controller.signal}},Tk=typeof WeakMap=="function"?WeakMap:Map,Be=0,Qe=null,Ae=null,De=0,$e=0,Jt=null,wa=!1,Yr=!1,Jc=!1,ta=0,lt=0,ja=0,rr=0,Wc=0,Wt=0,Gr=0,Wl=null,$t=null,ed=!1,Gs=0,wm=0,Qs=1/0,Xs=null,Na=null,mt=0,Ca=null,Qr=null,na=0,td=0,nd=null,jm=null,ei=0,ad=null;function en(){return(Be&2)!==0&&De!==0?De&-De:B.T!==null?ud():qh()}function Nm(){if(Wt===0)if((De&536870912)===0||Oe){var t=rs;rs<<=1,(rs&3932160)===0&&(rs=262144),Wt=t}else Wt=536870912;return t=Xt.current,t!==null&&(t.flags|=32),Wt}function Ft(t,r,i){(t===Qe&&($e===2||$e===9)||t.cancelPendingCommit!==null)&&(Xr(t,0),Ea(t,De,Wt,!1)),kl(t,i),((Be&2)===0||t!==Qe)&&(t===Qe&&((Be&2)===0&&(rr|=i),lt===4&&Ea(t,De,Wt,!1)),_n(t))}function Cm(t,r,i){if((Be&6)!==0)throw Error(l(327));var u=!i&&(r&127)===0&&(r&t.expiredLanes)===0||vl(t,r),p=u?Dk(t,r):ld(t,r,!0),m=u;do{if(p===0){Yr&&!u&&Ea(t,r,0,!1);break}else{if(i=t.current.alternate,m&&!_k(i)){p=ld(t,r,!1),m=!1;continue}if(p===2){if(m=r,t.errorRecoveryDisabledLanes&m)var k=0;else k=t.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){r=k;e:{var w=t;p=Wl;var M=w.current.memoizedState.isDehydrated;if(M&&(Xr(w,k).flags|=256),k=ld(w,k,!1),k!==2){if(Jc&&!M){w.errorRecoveryDisabledLanes|=m,rr|=m,p=4;break e}m=$t,$t=p,m!==null&&($t===null?$t=m:$t.push.apply($t,m))}p=k}if(m=!1,p!==2)continue}}if(p===1){Xr(t,0),Ea(t,r,0,!0);break}e:{switch(u=t,m=p,m){case 0:case 1:throw Error(l(345));case 4:if((r&4194048)!==r)break;case 6:Ea(u,r,Wt,!wa);break e;case 2:$t=null;break;case 3:case 5:break;default:throw Error(l(329))}if((r&62914560)===r&&(p=Gs+300-Mt(),10<p)){if(Ea(u,r,Wt,!wa),is(u,0,!0)!==0)break e;na=r,u.timeoutHandle=a0(Em.bind(null,u,i,$t,Xs,ed,r,Wt,rr,Gr,wa,m,"Throttled",-0,0),p);break e}Em(u,i,$t,Xs,ed,r,Wt,rr,Gr,wa,m,null,-0,0)}}break}while(!0);_n(t)}function Em(t,r,i,u,p,m,k,w,M,I,Q,J,$,K){if(t.timeoutHandle=-1,J=r.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},bm(r,m,J);var de=(m&62914560)===m?Gs-Mt():(m&4194048)===m?wm-Mt():0;if(de=gS(J,de),de!==null){na=m,t.cancelPendingCommit=de(zm.bind(null,t,r,m,i,u,p,k,w,M,Q,J,null,$,K)),Ea(t,m,k,!I);return}}zm(t,r,m,i,u,p,k,w,M)}function _k(t){for(var r=t;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var u=0;u<i.length;u++){var p=i[u],m=p.getSnapshot;p=p.value;try{if(!Gt(m(),p))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ea(t,r,i,u){r&=~Wc,r&=~rr,t.suspendedLanes|=r,t.pingedLanes&=~r,u&&(t.warmLanes|=r),u=t.expirationTimes;for(var p=r;0<p;){var m=31-Ge(p),k=1<<m;u[m]=-1,p&=~k}i!==0&&Uh(t,i,r)}function Zs(){return(Be&6)===0?(ti(0),!1):!0}function rd(){if(Ae!==null){if($e===0)var t=Ae.return;else t=Ae,Pn=Qa=null,vc(t),qr=null,Ul=0,t=Ae;for(;t!==null;)rm(t.alternate,t),t=t.return;Ae=null}}function Xr(t,r){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,Xk(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),na=0,rd(),Qe=t,Ae=i=Fn(t.current,null),De=r,$e=0,Jt=null,wa=!1,Yr=vl(t,r),Jc=!1,Gr=Wt=Wc=rr=ja=lt=0,$t=Wl=null,ed=!1,(r&8)!==0&&(r|=r&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=r;0<u;){var p=31-Ge(u),m=1<<p;r|=t[p],u&=~m}return ta=r,xs(),i}function Am(t,r){je=null,B.H=Pl,r===Br||r===Cs?(r=Kg(),$e=3):r===oc?(r=Kg(),$e=4):$e=r===Lc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Jt=r,Ae===null&&(lt=1,qs(t,un(r,t.current)))}function Tm(){var t=Xt.current;return t===null?!0:(De&4194048)===De?hn===null:(De&62914560)===De||(De&536870912)!==0?t===hn:!1}function _m(){var t=B.H;return B.H=Pl,t===null?Pl:t}function Mm(){var t=B.A;return B.A=Ak,t}function Js(){lt=4,wa||(De&4194048)!==De&&Xt.current!==null||(Yr=!0),(ja&134217727)===0&&(rr&134217727)===0||Qe===null||Ea(Qe,De,Wt,!1)}function ld(t,r,i){var u=Be;Be|=2;var p=_m(),m=Mm();(Qe!==t||De!==r)&&(Xs=null,Xr(t,r)),r=!1;var k=lt;e:do try{if($e!==0&&Ae!==null){var w=Ae,M=Jt;switch($e){case 8:rd(),k=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(r=!0);var I=$e;if($e=0,Jt=null,Zr(t,w,M,I),i&&Yr){k=0;break e}break;default:I=$e,$e=0,Jt=null,Zr(t,w,M,I)}}Mk(),k=lt;break}catch(Q){Am(t,Q)}while(!0);return r&&t.shellSuspendCounter++,Pn=Qa=null,Be=u,B.H=p,B.A=m,Ae===null&&(Qe=null,De=0,xs()),k}function Mk(){for(;Ae!==null;)Dm(Ae)}function Dk(t,r){var i=Be;Be|=2;var u=_m(),p=Mm();Qe!==t||De!==r?(Xs=null,Qs=Mt()+500,Xr(t,r)):Yr=vl(t,r);e:do try{if($e!==0&&Ae!==null){r=Ae;var m=Jt;t:switch($e){case 1:$e=0,Jt=null,Zr(t,r,m,1);break;case 2:case 9:if($g(m)){$e=0,Jt=null,Rm(r);break}r=function(){$e!==2&&$e!==9||Qe!==t||($e=7),_n(t)},m.then(r,r);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:$g(m)?($e=0,Jt=null,Rm(r)):($e=0,Jt=null,Zr(t,r,m,7));break;case 5:var k=null;switch(Ae.tag){case 26:k=Ae.memoizedState;case 5:case 27:var w=Ae;if(k?x0(k):w.stateNode.complete){$e=0,Jt=null;var M=w.sibling;if(M!==null)Ae=M;else{var I=w.return;I!==null?(Ae=I,Ws(I)):Ae=null}break t}}$e=0,Jt=null,Zr(t,r,m,5);break;case 6:$e=0,Jt=null,Zr(t,r,m,6);break;case 8:rd(),lt=6;break e;default:throw Error(l(462))}}Rk();break}catch(Q){Am(t,Q)}while(!0);return Pn=Qa=null,B.H=u,B.A=p,Be=i,Ae!==null?0:(Qe=null,De=0,xs(),lt)}function Rk(){for(;Ae!==null&&!xu();)Dm(Ae)}function Dm(t){var r=nm(t.alternate,t,ta);t.memoizedProps=t.pendingProps,r===null?Ws(t):Ae=r}function Rm(t){var r=t,i=r.alternate;switch(r.tag){case 15:case 0:r=Xp(i,r,r.pendingProps,r.type,void 0,De);break;case 11:r=Xp(i,r,r.pendingProps,r.type.render,r.ref,De);break;case 5:vc(r);default:rm(i,r),r=Ae=Mg(r,ta),r=nm(i,r,ta)}t.memoizedProps=t.pendingProps,r===null?Ws(t):Ae=r}function Zr(t,r,i,u){Pn=Qa=null,vc(r),qr=null,Ul=0;var p=r.return;try{if(kk(t,p,r,i,De)){lt=1,qs(t,un(i,t.current)),Ae=null;return}}catch(m){if(p!==null)throw Ae=p,m;lt=1,qs(t,un(i,t.current)),Ae=null;return}r.flags&32768?(Oe||u===1?t=!0:Yr||(De&536870912)!==0?t=!1:(wa=t=!0,(u===2||u===9||u===3||u===6)&&(u=Xt.current,u!==null&&u.tag===13&&(u.flags|=16384))),Om(r,t)):Ws(r)}function Ws(t){var r=t;do{if((r.flags&32768)!==0){Om(r,wa);return}t=r.return;var i=jk(r.alternate,r,ta);if(i!==null){Ae=i;return}if(r=r.sibling,r!==null){Ae=r;return}Ae=r=t}while(r!==null);lt===0&&(lt=5)}function Om(t,r){do{var i=Nk(t.alternate,t);if(i!==null){i.flags&=32767,Ae=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(t=t.sibling,t!==null)){Ae=t;return}Ae=t=i}while(t!==null);lt=6,Ae=null}function zm(t,r,i,u,p,m,k,w,M){t.cancelPendingCommit=null;do eo();while(mt!==0);if((Be&6)!==0)throw Error(l(327));if(r!==null){if(r===t.current)throw Error(l(177));if(m=r.lanes|r.childLanes,m|=Yu,fv(t,i,m,k,w,M),t===Qe&&(Ae=Qe=null,De=0),Qr=r,Ca=t,na=i,td=m,nd=p,jm=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Uk(ve,function(){return qm(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=B.T,B.T=null,p=te.p,te.p=2,k=Be,Be|=4;try{Ck(t,r,i)}finally{Be=k,te.p=p,B.T=u}}mt=1,Lm(),Um(),Hm()}}function Lm(){if(mt===1){mt=0;var t=Ca,r=Qr,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var u=te.p;te.p=2;var p=Be;Be|=4;try{mm(r,t);var m=yd,k=Sg(t.containerInfo),w=m.focusedElem,M=m.selectionRange;if(k!==w&&w&&w.ownerDocument&&kg(w.ownerDocument.documentElement,w)){if(M!==null&&$u(w)){var I=M.start,Q=M.end;if(Q===void 0&&(Q=I),"selectionStart"in w)w.selectionStart=I,w.selectionEnd=Math.min(Q,w.value.length);else{var J=w.ownerDocument||document,$=J&&J.defaultView||window;if($.getSelection){var K=$.getSelection(),de=w.textContent.length,be=Math.min(M.start,de),Ye=M.end===void 0?be:Math.min(M.end,de);!K.extend&&be>Ye&&(k=Ye,Ye=be,be=k);var U=vg(w,be),O=vg(w,Ye);if(U&&O&&(K.rangeCount!==1||K.anchorNode!==U.node||K.anchorOffset!==U.offset||K.focusNode!==O.node||K.focusOffset!==O.offset)){var q=J.createRange();q.setStart(U.node,U.offset),K.removeAllRanges(),be>Ye?(K.addRange(q),K.extend(O.node,O.offset)):(q.setEnd(O.node,O.offset),K.addRange(q))}}}}for(J=[],K=w;K=K.parentNode;)K.nodeType===1&&J.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<J.length;w++){var Z=J[w];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}ho=!!md,yd=md=null}finally{Be=p,te.p=u,B.T=i}}t.current=r,mt=2}}function Um(){if(mt===2){mt=0;var t=Ca,r=Qr,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var u=te.p;te.p=2;var p=Be;Be|=4;try{dm(t,r.alternate,r)}finally{Be=p,te.p=u,B.T=i}}mt=3}}function Hm(){if(mt===4||mt===3){mt=0,bu();var t=Ca,r=Qr,i=na,u=jm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?mt=5:(mt=0,Qr=Ca=null,Bm(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(Na=null),wu(i),r=r.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Dt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=B.T,p=te.p,te.p=2,B.T=null;try{for(var m=t.onRecoverableError,k=0;k<u.length;k++){var w=u[k];m(w.value,{componentStack:w.stack})}}finally{B.T=r,te.p=p}}(na&3)!==0&&eo(),_n(t),p=t.pendingLanes,(i&261930)!==0&&(p&42)!==0?t===ad?ei++:(ei=0,ad=t):ei=0,ti(0)}}function Bm(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,zl(r)))}function eo(){return Lm(),Um(),Hm(),qm()}function qm(){if(mt!==5)return!1;var t=Ca,r=td;td=0;var i=wu(na),u=B.T,p=te.p;try{te.p=32>i?32:i,B.T=null,i=nd,nd=null;var m=Ca,k=na;if(mt=0,Qr=Ca=null,na=0,(Be&6)!==0)throw Error(l(331));var w=Be;if(Be|=4,km(m.current),xm(m,m.current,k,i),Be=w,ti(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Dt,m)}catch{}return!0}finally{te.p=p,B.T=u,Bm(t,r)}}function Im(t,r,i){r=un(i,r),r=zc(t.stateNode,r,2),t=ba(t,r,2),t!==null&&(kl(t,2),_n(t))}function Fe(t,r,i){if(t.tag===3)Im(t,t,i);else for(;r!==null;){if(r.tag===3){Im(r,t,i);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Na===null||!Na.has(u))){t=un(i,t),i=$p(2),u=ba(r,i,2),u!==null&&(Fp(i,u,r,t),kl(u,2),_n(u));break}}r=r.return}}function id(t,r,i){var u=t.pingCache;if(u===null){u=t.pingCache=new Tk;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(i)||(Jc=!0,p.add(i),t=Ok.bind(null,t,r,i),r.then(t,t))}function Ok(t,r,i){var u=t.pingCache;u!==null&&u.delete(r),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Qe===t&&(De&i)===i&&(lt===4||lt===3&&(De&62914560)===De&&300>Mt()-Gs?(Be&2)===0&&Xr(t,0):Wc|=i,Gr===De&&(Gr=0)),_n(t)}function $m(t,r){r===0&&(r=Lh()),t=Va(t,r),t!==null&&(kl(t,r),_n(t))}function zk(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),$m(t,i)}function Lk(t,r){var i=0;switch(t.tag){case 31:case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(i=p.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(l(314))}u!==null&&u.delete(r),$m(t,i)}function Uk(t,r){return xr(t,r)}var to=null,Jr=null,sd=!1,no=!1,od=!1,Aa=0;function _n(t){t!==Jr&&t.next===null&&(Jr===null?to=Jr=t:Jr=Jr.next=t),no=!0,sd||(sd=!0,Bk())}function ti(t,r){if(!od&&no){od=!0;do for(var i=!1,u=to;u!==null;){if(t!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var k=u.suspendedLanes,w=u.pingedLanes;m=(1<<31-Ge(42|t)+1)-1,m&=p&~(k&~w),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,Vm(u,m))}else m=De,m=is(u,u===Qe?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||vl(u,m)||(i=!0,Vm(u,m));u=u.next}while(i);od=!1}}function Hk(){Fm()}function Fm(){no=sd=!1;var t=0;Aa!==0&&Qk()&&(t=Aa);for(var r=Mt(),i=null,u=to;u!==null;){var p=u.next,m=Km(u,r);m===0?(u.next=null,i===null?to=p:i.next=p,p===null&&(Jr=i)):(i=u,(t!==0||(m&3)!==0)&&(no=!0)),u=p}mt!==0&&mt!==5||ti(t),Aa!==0&&(Aa=0)}function Km(t,r){for(var i=t.suspendedLanes,u=t.pingedLanes,p=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var k=31-Ge(m),w=1<<k,M=p[k];M===-1?((w&i)===0||(w&u)!==0)&&(p[k]=dv(w,r)):M<=r&&(t.expiredLanes|=w),m&=~w}if(r=Qe,i=De,i=is(t,t===r?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,i===0||t===r&&($e===2||$e===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&bl(u),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||vl(t,i)){if(r=i&-i,r===t.callbackPriority)return r;switch(u!==null&&bl(u),wu(i)){case 2:case 8:i=le;break;case 32:i=ve;break;case 268435456:i=qe;break;default:i=ve}return u=Pm.bind(null,t),i=xr(i,u),t.callbackPriority=r,t.callbackNode=i,r}return u!==null&&u!==null&&bl(u),t.callbackPriority=2,t.callbackNode=null,2}function Pm(t,r){if(mt!==0&&mt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(eo()&&t.callbackNode!==i)return null;var u=De;return u=is(t,t===Qe?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(Cm(t,u,r),Km(t,Mt()),t.callbackNode!=null&&t.callbackNode===i?Pm.bind(null,t):null)}function Vm(t,r){if(eo())return null;Cm(t,r,!0)}function Bk(){Zk(function(){(Be&6)!==0?xr(X,Hk):Fm()})}function ud(){if(Aa===0){var t=Ur;t===0&&(t=as,as<<=1,(as&261888)===0&&(as=256)),Aa=t}return Aa}function Ym(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:cs(""+t)}function Gm(t,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,t.id&&i.setAttribute("form",t.id),r.parentNode.insertBefore(i,r),t=new FormData(t),i.parentNode.removeChild(i),t}function qk(t,r,i,u,p){if(r==="submit"&&i&&i.stateNode===p){var m=Ym((p[Ut]||null).action),k=u.submitter;k&&(r=(r=k[Ut]||null)?Ym(r.formAction):k.getAttribute("formAction"),r!==null&&(m=r,k=null));var w=new gs("action","action",null,u,p);t.push({event:w,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Aa!==0){var M=k?Gm(p,k):new FormData(p);Tc(i,{pending:!0,data:M,method:p.method,action:m},null,M)}}else typeof m=="function"&&(w.preventDefault(),M=k?Gm(p,k):new FormData(p),Tc(i,{pending:!0,data:M,method:p.method,action:m},m,M))},currentTarget:p}]})}}for(var cd=0;cd<Vu.length;cd++){var dd=Vu[cd],Ik=dd.toLowerCase(),$k=dd[0].toUpperCase()+dd.slice(1);vn(Ik,"on"+$k)}vn(Ng,"onAnimationEnd"),vn(Cg,"onAnimationIteration"),vn(Eg,"onAnimationStart"),vn("dblclick","onDoubleClick"),vn("focusin","onFocus"),vn("focusout","onBlur"),vn(rk,"onTransitionRun"),vn(lk,"onTransitionStart"),vn(ik,"onTransitionCancel"),vn(Ag,"onTransitionEnd"),wr("onMouseEnter",["mouseout","mouseover"]),wr("onMouseLeave",["mouseout","mouseover"]),wr("onPointerEnter",["pointerout","pointerover"]),wr("onPointerLeave",["pointerout","pointerover"]),$a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$a("onBeforeInput",["compositionend","keypress","textInput","paste"]),$a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ni="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(" "),Fk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ni));function Qm(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var u=t[i],p=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var k=u.length-1;0<=k;k--){var w=u[k],M=w.instance,I=w.currentTarget;if(w=w.listener,M!==m&&p.isPropagationStopped())break e;m=w,p.currentTarget=I;try{m(p)}catch(Q){ys(Q)}p.currentTarget=null,m=M}else for(k=0;k<u.length;k++){if(w=u[k],M=w.instance,I=w.currentTarget,w=w.listener,M!==m&&p.isPropagationStopped())break e;m=w,p.currentTarget=I;try{m(p)}catch(Q){ys(Q)}p.currentTarget=null,m=M}}}}function Te(t,r){var i=r[ju];i===void 0&&(i=r[ju]=new Set);var u=t+"__bubble";i.has(u)||(Xm(r,t,2,!1),i.add(u))}function fd(t,r,i){var u=0;r&&(u|=4),Xm(i,t,u,r)}var ao="_reactListening"+Math.random().toString(36).slice(2);function hd(t){if(!t[ao]){t[ao]=!0,Fh.forEach(function(i){i!=="selectionchange"&&(Fk.has(i)||fd(i,!1,t),fd(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[ao]||(r[ao]=!0,fd("selectionchange",!1,r))}}function Xm(t,r,i,u){switch(N0(r)){case 2:var p=yS;break;case 8:p=xS;break;default:p=Ad}i=p.bind(null,r,i,t),p=void 0,!Ru||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?t.addEventListener(r,i,{capture:!0,passive:p}):t.addEventListener(r,i,!0):p!==void 0?t.addEventListener(r,i,{passive:p}):t.addEventListener(r,i,!1)}function gd(t,r,i,u,p){var m=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var k=u.tag;if(k===3||k===4){var w=u.stateNode.containerInfo;if(w===p)break;if(k===4)for(k=u.return;k!==null;){var M=k.tag;if((M===3||M===4)&&k.stateNode.containerInfo===p)return;k=k.return}for(;w!==null;){if(k=vr(w),k===null)return;if(M=k.tag,M===5||M===6||M===26||M===27){u=m=k;continue e}w=w.parentNode}}u=u.return}tg(function(){var I=m,Q=Mu(i),J=[];e:{var $=Tg.get(t);if($!==void 0){var K=gs,de=t;switch(t){case"keypress":if(fs(i)===0)break e;case"keydown":case"keyup":K=Lv;break;case"focusin":de="focus",K=Uu;break;case"focusout":de="blur",K=Uu;break;case"beforeblur":case"afterblur":K=Uu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=rg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=jv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Bv;break;case Ng:case Cg:case Eg:K=Ev;break;case Ag:K=Iv;break;case"scroll":case"scrollend":K=Sv;break;case"wheel":K=Fv;break;case"copy":case"cut":case"paste":K=Tv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=ig;break;case"toggle":case"beforetoggle":K=Pv}var be=(r&4)!==0,Ye=!be&&(t==="scroll"||t==="scrollend"),U=be?$!==null?$+"Capture":null:$;be=[];for(var O=I,q;O!==null;){var Z=O;if(q=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||q===null||U===null||(Z=jl(O,U),Z!=null&&be.push(ai(O,Z,q))),Ye)break;O=O.return}0<be.length&&($=new K($,de,null,i,Q),J.push({event:$,listeners:be}))}}if((r&7)===0){e:{if($=t==="mouseover"||t==="pointerover",K=t==="mouseout"||t==="pointerout",$&&i!==_u&&(de=i.relatedTarget||i.fromElement)&&(vr(de)||de[br]))break e;if((K||$)&&($=Q.window===Q?Q:($=Q.ownerDocument)?$.defaultView||$.parentWindow:window,K?(de=i.relatedTarget||i.toElement,K=I,de=de?vr(de):null,de!==null&&(Ye=o(de),be=de.tag,de!==Ye||be!==5&&be!==27&&be!==6)&&(de=null)):(K=null,de=I),K!==de)){if(be=rg,Z="onMouseLeave",U="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(be=ig,Z="onPointerLeave",U="onPointerEnter",O="pointer"),Ye=K==null?$:wl(K),q=de==null?$:wl(de),$=new be(Z,O+"leave",K,i,Q),$.target=Ye,$.relatedTarget=q,Z=null,vr(Q)===I&&(be=new be(U,O+"enter",de,i,Q),be.target=q,be.relatedTarget=Ye,Z=be),Ye=Z,K&&de)t:{for(be=Kk,U=K,O=de,q=0,Z=U;Z;Z=be(Z))q++;Z=0;for(var pe=O;pe;pe=be(pe))Z++;for(;0<q-Z;)U=be(U),q--;for(;0<Z-q;)O=be(O),Z--;for(;q--;){if(U===O||O!==null&&U===O.alternate){be=U;break t}U=be(U),O=be(O)}be=null}else be=null;K!==null&&Zm(J,$,K,be,!1),de!==null&&Ye!==null&&Zm(J,Ye,de,be,!0)}}e:{if($=I?wl(I):window,K=$.nodeName&&$.nodeName.toLowerCase(),K==="select"||K==="input"&&$.type==="file")var Ue=gg;else if(fg($))if(pg)Ue=tk;else{Ue=Wv;var fe=Jv}else K=$.nodeName,!K||K.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?I&&Tu(I.elementType)&&(Ue=gg):Ue=ek;if(Ue&&(Ue=Ue(t,I))){hg(J,Ue,i,Q);break e}fe&&fe(t,$,I),t==="focusout"&&I&&$.type==="number"&&I.memoizedProps.value!=null&&Au($,"number",$.value)}switch(fe=I?wl(I):window,t){case"focusin":(fg(fe)||fe.contentEditable==="true")&&(Tr=fe,Fu=I,Dl=null);break;case"focusout":Dl=Fu=Tr=null;break;case"mousedown":Ku=!0;break;case"contextmenu":case"mouseup":case"dragend":Ku=!1,wg(J,i,Q);break;case"selectionchange":if(ak)break;case"keydown":case"keyup":wg(J,i,Q)}var Ne;if(Bu)e:{switch(t){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Ar?cg(t,i)&&(Re="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(Re="onCompositionStart");Re&&(sg&&i.locale!=="ko"&&(Ar||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Ar&&(Ne=ng()):(fa=Q,Ou="value"in fa?fa.value:fa.textContent,Ar=!0)),fe=ro(I,Re),0<fe.length&&(Re=new lg(Re,t,null,i,Q),J.push({event:Re,listeners:fe}),Ne?Re.data=Ne:(Ne=dg(i),Ne!==null&&(Re.data=Ne)))),(Ne=Yv?Gv(t,i):Qv(t,i))&&(Re=ro(I,"onBeforeInput"),0<Re.length&&(fe=new lg("onBeforeInput","beforeinput",null,i,Q),J.push({event:fe,listeners:Re}),fe.data=Ne)),qk(J,t,I,i,Q)}Qm(J,r)})}function ai(t,r,i){return{instance:t,listener:r,currentTarget:i}}function ro(t,r){for(var i=r+"Capture",u=[];t!==null;){var p=t,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=jl(t,i),p!=null&&u.unshift(ai(t,p,m)),p=jl(t,r),p!=null&&u.push(ai(t,p,m))),t.tag===3)return u;t=t.return}return[]}function Kk(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Zm(t,r,i,u,p){for(var m=r._reactName,k=[];i!==null&&i!==u;){var w=i,M=w.alternate,I=w.stateNode;if(w=w.tag,M!==null&&M===u)break;w!==5&&w!==26&&w!==27||I===null||(M=I,p?(I=jl(i,m),I!=null&&k.unshift(ai(i,I,M))):p||(I=jl(i,m),I!=null&&k.push(ai(i,I,M)))),i=i.return}k.length!==0&&t.push({event:r,listeners:k})}var Pk=/\r\n?/g,Vk=/\u0000|\uFFFD/g;function Jm(t){return(typeof t=="string"?t:""+t).replace(Pk,`
|
|
50
|
+
`).replace(Vk,"")}function Wm(t,r){return r=Jm(r),Jm(t)===r}function Ve(t,r,i,u,p,m){switch(i){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Nr(t,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Nr(t,""+u);break;case"className":os(t,"class",u);break;case"tabIndex":os(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":os(t,i,u);break;case"style":Wh(t,u,m);break;case"data":if(r!=="object"){os(t,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||i!=="href")){t.removeAttribute(i);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(i);break}u=cs(""+u),t.setAttribute(i,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(i,"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 m=="function"&&(i==="formAction"?(r!=="input"&&Ve(t,r,"name",p.name,p,null),Ve(t,r,"formEncType",p.formEncType,p,null),Ve(t,r,"formMethod",p.formMethod,p,null),Ve(t,r,"formTarget",p.formTarget,p,null)):(Ve(t,r,"encType",p.encType,p,null),Ve(t,r,"method",p.method,p,null),Ve(t,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(i);break}u=cs(""+u),t.setAttribute(i,u);break;case"onClick":u!=null&&(t.onclick=In);break;case"onScroll":u!=null&&Te("scroll",t);break;case"onScrollEnd":u!=null&&Te("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(i=u.__html,i!=null){if(p.children!=null)throw Error(l(60));t.innerHTML=i}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}i=cs(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(i,""+u):t.removeAttribute(i);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":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":u===!0?t.setAttribute(i,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(i,u):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(i,u):t.removeAttribute(i);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(i):t.setAttribute(i,u);break;case"popover":Te("beforetoggle",t),Te("toggle",t),ss(t,"popover",u);break;case"xlinkActuate":qn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":qn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":qn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":qn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":qn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":qn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":qn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":qn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":qn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":ss(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=vv.get(i)||i,ss(t,i,u))}}function pd(t,r,i,u,p,m){switch(i){case"style":Wh(t,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(i=u.__html,i!=null){if(p.children!=null)throw Error(l(60));t.innerHTML=i}}break;case"children":typeof u=="string"?Nr(t,u):(typeof u=="number"||typeof u=="bigint")&&Nr(t,""+u);break;case"onScroll":u!=null&&Te("scroll",t);break;case"onScrollEnd":u!=null&&Te("scrollend",t);break;case"onClick":u!=null&&(t.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),r=i.slice(2,p?i.length-7:void 0),m=t[Ut]||null,m=m!=null?m[i]:null,typeof m=="function"&&t.removeEventListener(r,m,p),typeof u=="function")){typeof m!="function"&&m!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(r,u,p);break e}i in t?t[i]=u:u===!0?t.setAttribute(i,""):ss(t,i,u)}}}function Ct(t,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",t),Te("load",t);var u=!1,p=!1,m;for(m in i)if(i.hasOwnProperty(m)){var k=i[m];if(k!=null)switch(m){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Ve(t,r,m,k,i,null)}}p&&Ve(t,r,"srcSet",i.srcSet,i,null),u&&Ve(t,r,"src",i.src,i,null);return;case"input":Te("invalid",t);var w=m=k=p=null,M=null,I=null;for(u in i)if(i.hasOwnProperty(u)){var Q=i[u];if(Q!=null)switch(u){case"name":p=Q;break;case"type":k=Q;break;case"checked":M=Q;break;case"defaultChecked":I=Q;break;case"value":m=Q;break;case"defaultValue":w=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(l(137,r));break;default:Ve(t,r,u,Q,i,null)}}Qh(t,m,w,M,I,k,p,!1);return;case"select":Te("invalid",t),u=k=m=null;for(p in i)if(i.hasOwnProperty(p)&&(w=i[p],w!=null))switch(p){case"value":m=w;break;case"defaultValue":k=w;break;case"multiple":u=w;default:Ve(t,r,p,w,i,null)}r=m,i=k,t.multiple=!!u,r!=null?jr(t,!!u,r,!1):i!=null&&jr(t,!!u,i,!0);return;case"textarea":Te("invalid",t),m=p=u=null;for(k in i)if(i.hasOwnProperty(k)&&(w=i[k],w!=null))switch(k){case"value":u=w;break;case"defaultValue":p=w;break;case"children":m=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(l(91));break;default:Ve(t,r,k,w,i,null)}Zh(t,u,p,m);return;case"option":for(M in i)if(i.hasOwnProperty(M)&&(u=i[M],u!=null))switch(M){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Ve(t,r,M,u,i,null)}return;case"dialog":Te("beforetoggle",t),Te("toggle",t),Te("cancel",t),Te("close",t);break;case"iframe":case"object":Te("load",t);break;case"video":case"audio":for(u=0;u<ni.length;u++)Te(ni[u],t);break;case"image":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"embed":case"source":case"link":Te("error",t),Te("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in i)if(i.hasOwnProperty(I)&&(u=i[I],u!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Ve(t,r,I,u,i,null)}return;default:if(Tu(r)){for(Q in i)i.hasOwnProperty(Q)&&(u=i[Q],u!==void 0&&pd(t,r,Q,u,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(u=i[w],u!=null&&Ve(t,r,w,u,i,null))}function Yk(t,r,i,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,m=null,k=null,w=null,M=null,I=null,Q=null;for(K in i){var J=i[K];if(i.hasOwnProperty(K)&&J!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":M=J;default:u.hasOwnProperty(K)||Ve(t,r,K,null,u,J)}}for(var $ in u){var K=u[$];if(J=i[$],u.hasOwnProperty($)&&(K!=null||J!=null))switch($){case"type":m=K;break;case"name":p=K;break;case"checked":I=K;break;case"defaultChecked":Q=K;break;case"value":k=K;break;case"defaultValue":w=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(l(137,r));break;default:K!==J&&Ve(t,r,$,K,u,J)}}Eu(t,k,w,M,I,Q,m,p);return;case"select":K=k=w=$=null;for(m in i)if(M=i[m],i.hasOwnProperty(m)&&M!=null)switch(m){case"value":break;case"multiple":K=M;default:u.hasOwnProperty(m)||Ve(t,r,m,null,u,M)}for(p in u)if(m=u[p],M=i[p],u.hasOwnProperty(p)&&(m!=null||M!=null))switch(p){case"value":$=m;break;case"defaultValue":w=m;break;case"multiple":k=m;default:m!==M&&Ve(t,r,p,m,u,M)}r=w,i=k,u=K,$!=null?jr(t,!!i,$,!1):!!u!=!!i&&(r!=null?jr(t,!!i,r,!0):jr(t,!!i,i?[]:"",!1));return;case"textarea":K=$=null;for(w in i)if(p=i[w],i.hasOwnProperty(w)&&p!=null&&!u.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Ve(t,r,w,null,u,p)}for(k in u)if(p=u[k],m=i[k],u.hasOwnProperty(k)&&(p!=null||m!=null))switch(k){case"value":$=p;break;case"defaultValue":K=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(l(91));break;default:p!==m&&Ve(t,r,k,p,u,m)}Xh(t,$,K);return;case"option":for(var de in i)if($=i[de],i.hasOwnProperty(de)&&$!=null&&!u.hasOwnProperty(de))switch(de){case"selected":t.selected=!1;break;default:Ve(t,r,de,null,u,$)}for(M in u)if($=u[M],K=i[M],u.hasOwnProperty(M)&&$!==K&&($!=null||K!=null))switch(M){case"selected":t.selected=$&&typeof $!="function"&&typeof $!="symbol";break;default:Ve(t,r,M,$,u,K)}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 be in i)$=i[be],i.hasOwnProperty(be)&&$!=null&&!u.hasOwnProperty(be)&&Ve(t,r,be,null,u,$);for(I in u)if($=u[I],K=i[I],u.hasOwnProperty(I)&&$!==K&&($!=null||K!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(l(137,r));break;default:Ve(t,r,I,$,u,K)}return;default:if(Tu(r)){for(var Ye in i)$=i[Ye],i.hasOwnProperty(Ye)&&$!==void 0&&!u.hasOwnProperty(Ye)&&pd(t,r,Ye,void 0,u,$);for(Q in u)$=u[Q],K=i[Q],!u.hasOwnProperty(Q)||$===K||$===void 0&&K===void 0||pd(t,r,Q,$,u,K);return}}for(var U in i)$=i[U],i.hasOwnProperty(U)&&$!=null&&!u.hasOwnProperty(U)&&Ve(t,r,U,null,u,$);for(J in u)$=u[J],K=i[J],!u.hasOwnProperty(J)||$===K||$==null&&K==null||Ve(t,r,J,$,u,K)}function e0(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gk(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,i=performance.getEntriesByType("resource"),u=0;u<i.length;u++){var p=i[u],m=p.transferSize,k=p.initiatorType,w=p.duration;if(m&&w&&e0(k)){for(k=0,w=p.responseEnd,u+=1;u<i.length;u++){var M=i[u],I=M.startTime;if(I>w)break;var Q=M.transferSize,J=M.initiatorType;Q&&e0(J)&&(M=M.responseEnd,k+=Q*(M<w?1:(w-I)/(M-I)))}if(--u,r+=8*(m+k)/(p.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var md=null,yd=null;function lo(t){return t.nodeType===9?t:t.ownerDocument}function t0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function n0(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function xd(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var bd=null;function Qk(){var t=window.event;return t&&t.type==="popstate"?t===bd?!1:(bd=t,!0):(bd=null,!1)}var a0=typeof setTimeout=="function"?setTimeout:void 0,Xk=typeof clearTimeout=="function"?clearTimeout:void 0,r0=typeof Promise=="function"?Promise:void 0,Zk=typeof queueMicrotask=="function"?queueMicrotask:typeof r0<"u"?function(t){return r0.resolve(null).then(t).catch(Jk)}:a0;function Jk(t){setTimeout(function(){throw t})}function Ta(t){return t==="head"}function l0(t,r){var i=r,u=0;do{var p=i.nextSibling;if(t.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"||i==="/&"){if(u===0){t.removeChild(p),nl(r);return}u--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")u++;else if(i==="html")ri(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,ri(i);for(var m=i.firstChild;m;){var k=m.nextSibling,w=m.nodeName;m[Sl]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=k}}else i==="body"&&ri(t.ownerDocument.body);i=p}while(i);nl(r)}function i0(t,r){var i=t;t=0;do{var u=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=u}while(i)}function vd(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":vd(i),Nu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function Wk(t,r,i,u){for(;t.nodeType===1;){var p=i;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[Sl])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=gn(t.nextSibling),t===null)break}return null}function eS(t,r,i){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=gn(t.nextSibling),t===null))return null;return t}function s0(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=gn(t.nextSibling),t===null))return null;return t}function kd(t){return t.data==="$?"||t.data==="$~"}function Sd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function tS(t,r){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||i.readyState!=="loading")r();else{var u=function(){r(),i.removeEventListener("DOMContentLoaded",u)};i.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function gn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var wd=null;function o0(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(r===0)return gn(t.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}t=t.nextSibling}return null}function u0(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return t;r--}else i!=="/$"&&i!=="/&"||r++}t=t.previousSibling}return null}function c0(t,r,i){switch(r=lo(i),t){case"html":if(t=r.documentElement,!t)throw Error(l(452));return t;case"head":if(t=r.head,!t)throw Error(l(453));return t;case"body":if(t=r.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function ri(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Nu(t)}var pn=new Map,d0=new Set;function io(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var aa=te.d;te.d={f:nS,r:aS,D:rS,C:lS,L:iS,m:sS,X:uS,S:oS,M:cS};function nS(){var t=aa.f(),r=Zs();return t||r}function aS(t){var r=kr(t);r!==null&&r.tag===5&&r.type==="form"?Ap(r):aa.r(t)}var Wr=typeof document>"u"?null:document;function f0(t,r,i){var u=Wr;if(u&&typeof r=="string"&&r){var p=sn(r);p='link[rel="'+t+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),d0.has(p)||(d0.add(p),t={rel:t,crossOrigin:i,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),Ct(r,"link",t),xt(r),u.head.appendChild(r)))}}function rS(t){aa.D(t),f0("dns-prefetch",t,null)}function lS(t,r){aa.C(t,r),f0("preconnect",t,r)}function iS(t,r,i){aa.L(t,r,i);var u=Wr;if(u&&t&&r){var p='link[rel="preload"][as="'+sn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+sn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+sn(i.imageSizes)+'"]')):p+='[href="'+sn(t)+'"]';var m=p;switch(r){case"style":m=el(t);break;case"script":m=tl(t)}pn.has(m)||(t=y({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:t,as:r},i),pn.set(m,t),u.querySelector(p)!==null||r==="style"&&u.querySelector(li(m))||r==="script"&&u.querySelector(ii(m))||(r=u.createElement("link"),Ct(r,"link",t),xt(r),u.head.appendChild(r)))}}function sS(t,r){aa.m(t,r);var i=Wr;if(i&&t){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+sn(u)+'"][href="'+sn(t)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=tl(t)}if(!pn.has(m)&&(t=y({rel:"modulepreload",href:t},r),pn.set(m,t),i.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ii(m)))return}u=i.createElement("link"),Ct(u,"link",t),xt(u),i.head.appendChild(u)}}}function oS(t,r,i){aa.S(t,r,i);var u=Wr;if(u&&t){var p=Sr(u).hoistableStyles,m=el(t);r=r||"default";var k=p.get(m);if(!k){var w={loading:0,preload:null};if(k=u.querySelector(li(m)))w.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":r},i),(i=pn.get(m))&&jd(t,i);var M=k=u.createElement("link");xt(M),Ct(M,"link",t),M._p=new Promise(function(I,Q){M.onload=I,M.onerror=Q}),M.addEventListener("load",function(){w.loading|=1}),M.addEventListener("error",function(){w.loading|=2}),w.loading|=4,so(k,r,u)}k={type:"stylesheet",instance:k,count:1,state:w},p.set(m,k)}}}function uS(t,r){aa.X(t,r);var i=Wr;if(i&&t){var u=Sr(i).hoistableScripts,p=tl(t),m=u.get(p);m||(m=i.querySelector(ii(p)),m||(t=y({src:t,async:!0},r),(r=pn.get(p))&&Nd(t,r),m=i.createElement("script"),xt(m),Ct(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function cS(t,r){aa.M(t,r);var i=Wr;if(i&&t){var u=Sr(i).hoistableScripts,p=tl(t),m=u.get(p);m||(m=i.querySelector(ii(p)),m||(t=y({src:t,async:!0,type:"module"},r),(r=pn.get(p))&&Nd(t,r),m=i.createElement("script"),xt(m),Ct(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function h0(t,r,i,u){var p=(p=ge.current)?io(p):null;if(!p)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=el(i.href),i=Sr(p).hoistableStyles,u=i.get(r),u||(u={type:"style",instance:null,count:0,state:null},i.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=el(i.href);var m=Sr(p).hoistableStyles,k=m.get(t);if(k||(p=p.ownerDocument||p,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,k),(m=p.querySelector(li(t)))&&!m._p&&(k.instance=m,k.state.loading=5),pn.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},pn.set(t,i),m||dS(p,t,i,k.state))),r&&u===null)throw Error(l(528,""));return k}if(r&&u!==null)throw Error(l(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=tl(i),i=Sr(p).hoistableScripts,u=i.get(r),u||(u={type:"script",instance:null,count:0,state:null},i.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function el(t){return'href="'+sn(t)+'"'}function li(t){return'link[rel="stylesheet"]['+t+"]"}function g0(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function dS(t,r,i,u){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=t.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),Ct(r,"link",i),xt(r),t.head.appendChild(r))}function tl(t){return'[src="'+sn(t)+'"]'}function ii(t){return"script[async]"+t}function p0(t,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var u=t.querySelector('style[data-href~="'+sn(i.href)+'"]');if(u)return r.instance=u,xt(u),u;var p=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),xt(u),Ct(u,"style",p),so(u,i.precedence,t),r.instance=u;case"stylesheet":p=el(i.href);var m=t.querySelector(li(p));if(m)return r.state.loading|=4,r.instance=m,xt(m),m;u=g0(i),(p=pn.get(p))&&jd(u,p),m=(t.ownerDocument||t).createElement("link"),xt(m);var k=m;return k._p=new Promise(function(w,M){k.onload=w,k.onerror=M}),Ct(m,"link",u),r.state.loading|=4,so(m,i.precedence,t),r.instance=m;case"script":return m=tl(i.src),(p=t.querySelector(ii(m)))?(r.instance=p,xt(p),p):(u=i,(p=pn.get(m))&&(u=y({},i),Nd(u,p)),t=t.ownerDocument||t,p=t.createElement("script"),xt(p),Ct(p,"link",u),t.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(l(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,so(u,i.precedence,t));return r.instance}function so(t,r,i){for(var u=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,k=0;k<u.length;k++){var w=u[k];if(w.dataset.precedence===r)m=w;else if(m!==p)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(t,r.firstChild))}function jd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Nd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var oo=null;function m0(t,r,i){if(oo===null){var u=new Map,p=oo=new Map;p.set(i,u)}else p=oo,u=p.get(i),u||(u=new Map,p.set(i,u));if(u.has(t))return u;for(u.set(t,null),i=i.getElementsByTagName(t),p=0;p<i.length;p++){var m=i[p];if(!(m[Sl]||m[St]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var k=m.getAttribute(r)||"";k=t+k;var w=u.get(k);w?w.push(m):u.set(k,[m])}}return u}function y0(t,r,i){t=t.ownerDocument||t,t.head.insertBefore(i,r==="title"?t.querySelector("head > title"):null)}function fS(t,r,i){if(i===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function x0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function hS(t,r,i,u){if(i.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var p=el(u.href),m=r.querySelector(li(p));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=uo.bind(t),r.then(t,t)),i.state.loading|=4,i.instance=m,xt(m);return}m=r.ownerDocument||r,u=g0(u),(p=pn.get(p))&&jd(u,p),m=m.createElement("link"),xt(m);var k=m;k._p=new Promise(function(w,M){k.onload=w,k.onerror=M}),Ct(m,"link",u),i.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=uo.bind(t),r.addEventListener("load",i),r.addEventListener("error",i))}}var Cd=0;function gS(t,r){return t.stylesheets&&t.count===0&&fo(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var u=setTimeout(function(){if(t.stylesheets&&fo(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&Cd===0&&(Cd=62500*Gk());var p=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&fo(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Cd?50:800)+r);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var co=null;function fo(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,co=new Map,r.forEach(pS,t),co=null,uo.call(t))}function pS(t,r){if(!(r.state.loading&4)){var i=co.get(t);if(i)var u=i.get(null);else{i=new Map,co.set(t,i);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var k=p[m];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(i.set(k.dataset.precedence,k),u=k)}u&&i.set(null,u)}p=r.instance,k=p.getAttribute("data-precedence"),m=i.get(k)||u,m===u&&i.set(null,p),i.set(k,p),this.count++,u=uo.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),m?m.parentNode.insertBefore(p,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),r.state.loading|=4}}var si={$$typeof:T,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function mS(t,r,i,u,p,m,k,w,M){this.tag=1,this.containerInfo=t,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=ku(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ku(0),this.hiddenUpdates=ku(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=m,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function b0(t,r,i,u,p,m,k,w,M,I,Q,J){return t=new mS(t,r,i,k,M,I,Q,J,w),r=1,m===!0&&(r|=24),m=Qt(3,null,null,r),t.current=m,m.stateNode=t,r=lc(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:i,cache:r},uc(m),t}function v0(t){return t?(t=Dr,t):Dr}function k0(t,r,i,u,p,m){p=v0(p),u.context===null?u.context=p:u.pendingContext=p,u=xa(r),u.payload={element:i},m=m===void 0?null:m,m!==null&&(u.callback=m),i=ba(t,u,r),i!==null&&(Ft(i,t,r),Bl(i,t,r))}function S0(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function Ed(t,r){S0(t,r),(t=t.alternate)&&S0(t,r)}function w0(t){if(t.tag===13||t.tag===31){var r=Va(t,67108864);r!==null&&Ft(r,t,67108864),Ed(t,67108864)}}function j0(t){if(t.tag===13||t.tag===31){var r=en();r=Su(r);var i=Va(t,r);i!==null&&Ft(i,t,r),Ed(t,r)}}var ho=!0;function yS(t,r,i,u){var p=B.T;B.T=null;var m=te.p;try{te.p=2,Ad(t,r,i,u)}finally{te.p=m,B.T=p}}function xS(t,r,i,u){var p=B.T;B.T=null;var m=te.p;try{te.p=8,Ad(t,r,i,u)}finally{te.p=m,B.T=p}}function Ad(t,r,i,u){if(ho){var p=Td(u);if(p===null)gd(t,r,u,go,i),C0(t,u);else if(vS(p,t,r,i,u))u.stopPropagation();else if(C0(t,u),r&4&&-1<bS.indexOf(t)){for(;p!==null;){var m=kr(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var k=Ia(m.pendingLanes);if(k!==0){var w=m;for(w.pendingLanes|=2,w.entangledLanes|=2;k;){var M=1<<31-Ge(k);w.entanglements[1]|=M,k&=~M}_n(m),(Be&6)===0&&(Qs=Mt()+500,ti(0))}}break;case 31:case 13:w=Va(m,2),w!==null&&Ft(w,m,2),Zs(),Ed(m,2)}if(m=Td(u),m===null&&gd(t,r,u,go,i),m===p)break;p=m}p!==null&&u.stopPropagation()}else gd(t,r,u,null,i)}}function Td(t){return t=Mu(t),_d(t)}var go=null;function _d(t){if(go=null,t=vr(t),t!==null){var r=o(t);if(r===null)t=null;else{var i=r.tag;if(i===13){if(t=c(r),t!==null)return t;t=null}else if(i===31){if(t=f(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return go=t,null}function N0(t){switch(t){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(vu()){case X:return 2;case le:return 8;case ve:case Ee:return 32;case qe:return 268435456;default:return 32}default:return 32}}var Md=!1,_a=null,Ma=null,Da=null,oi=new Map,ui=new Map,Ra=[],bS="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 C0(t,r){switch(t){case"focusin":case"focusout":_a=null;break;case"dragenter":case"dragleave":Ma=null;break;case"mouseover":case"mouseout":Da=null;break;case"pointerover":case"pointerout":oi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ui.delete(r.pointerId)}}function ci(t,r,i,u,p,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:i,eventSystemFlags:u,nativeEvent:m,targetContainers:[p]},r!==null&&(r=kr(r),r!==null&&w0(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function vS(t,r,i,u,p){switch(r){case"focusin":return _a=ci(_a,t,r,i,u,p),!0;case"dragenter":return Ma=ci(Ma,t,r,i,u,p),!0;case"mouseover":return Da=ci(Da,t,r,i,u,p),!0;case"pointerover":var m=p.pointerId;return oi.set(m,ci(oi.get(m)||null,t,r,i,u,p)),!0;case"gotpointercapture":return m=p.pointerId,ui.set(m,ci(ui.get(m)||null,t,r,i,u,p)),!0}return!1}function E0(t){var r=vr(t.target);if(r!==null){var i=o(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){t.blockedOn=r,Ih(t.priority,function(){j0(i)});return}}else if(r===31){if(r=f(i),r!==null){t.blockedOn=r,Ih(t.priority,function(){j0(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function po(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=Td(t.nativeEvent);if(i===null){i=t.nativeEvent;var u=new i.constructor(i.type,i);_u=u,i.target.dispatchEvent(u),_u=null}else return r=kr(i),r!==null&&w0(r),t.blockedOn=i,!1;r.shift()}return!0}function A0(t,r,i){po(t)&&i.delete(r)}function kS(){Md=!1,_a!==null&&po(_a)&&(_a=null),Ma!==null&&po(Ma)&&(Ma=null),Da!==null&&po(Da)&&(Da=null),oi.forEach(A0),ui.forEach(A0)}function mo(t,r){t.blockedOn===r&&(t.blockedOn=null,Md||(Md=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,kS)))}var yo=null;function T0(t){yo!==t&&(yo=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){yo===t&&(yo=null);for(var r=0;r<t.length;r+=3){var i=t[r],u=t[r+1],p=t[r+2];if(typeof u!="function"){if(_d(u||i)===null)continue;break}var m=kr(i);m!==null&&(t.splice(r,3),r-=3,Tc(m,{pending:!0,data:p,method:i.method,action:u},u,p))}}))}function nl(t){function r(M){return mo(M,t)}_a!==null&&mo(_a,t),Ma!==null&&mo(Ma,t),Da!==null&&mo(Da,t),oi.forEach(r),ui.forEach(r);for(var i=0;i<Ra.length;i++){var u=Ra[i];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Ra.length&&(i=Ra[0],i.blockedOn===null);)E0(i),i.blockedOn===null&&Ra.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(u=0;u<i.length;u+=3){var p=i[u],m=i[u+1],k=p[Ut]||null;if(typeof m=="function")k||T0(i);else if(k){var w=null;if(m&&m.hasAttribute("formAction")){if(p=m,k=m[Ut]||null)w=k.formAction;else if(_d(p)!==null)continue}else w=k.action;typeof w=="function"?i[u+1]=w:(i.splice(u,3),u-=3),T0(i)}}}function _0(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(k){return p=k})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(i,20)}function i(){if(!u&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function Dd(t){this._internalRoot=t}xo.prototype.render=Dd.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(l(409));var i=r.current,u=en();k0(i,u,t,r,null,null)},xo.prototype.unmount=Dd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;k0(t.current,2,null,t,null,null),Zs(),r[br]=null}};function xo(t){this._internalRoot=t}xo.prototype.unstable_scheduleHydration=function(t){if(t){var r=qh();t={blockedOn:null,target:t,priority:r};for(var i=0;i<Ra.length&&r!==0&&r<Ra[i].priority;i++);Ra.splice(i,0,t),i===0&&E0(t)}};var M0=n.version;if(M0!=="19.2.4")throw Error(l(527,M0,"19.2.4"));te.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=h(r),t=t!==null?x(t):null,t=t===null?null:t.stateNode,t};var SS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bo.isDisabled&&bo.supportsFiber)try{Dt=bo.inject(SS),pt=bo}catch{}}return fi.createRoot=function(t,r){if(!s(t))throw Error(l(299));var i=!1,u="",p=Hp,m=Bp,k=qp;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(k=r.onRecoverableError)),r=b0(t,1,!1,null,null,i,u,null,p,m,k,_0),t[br]=r.current,hd(t),new Dd(r)},fi.hydrateRoot=function(t,r,i){if(!s(t))throw Error(l(299));var u=!1,p="",m=Hp,k=Bp,w=qp,M=null;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(k=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(M=i.formState)),r=b0(t,1,!0,r,i??null,u,p,M,m,k,w,_0),r.context=v0(null),i=r.current,u=en(),u=Su(u),p=xa(u),p.callback=null,ba(i,p,u),i=u,r.current.lanes=i,kl(r,i),_n(r),t[br]=r.current,hd(t),new xo(r)},fi.version="19.2.4",fi}var I0;function OS(){if(I0)return zd.exports;I0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),zd.exports=RS(),zd.exports}var zS=OS();/**
|
|
51
51
|
* react-router v7.13.1
|
|
52
52
|
*
|
|
53
53
|
* Copyright (c) Remix Software Inc.
|
|
@@ -56,9 +56,9 @@ Error generating stack: `+u.message+`
|
|
|
56
56
|
* LICENSE.md file in the root directory of this source tree.
|
|
57
57
|
*
|
|
58
58
|
* @license MIT
|
|
59
|
-
*/var I0="popstate";function $0(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function LS(e={}){function n(s,o){let{pathname:c="/",search:f="",hash:g=""}=dr(s.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),jf("",{pathname:c,search:f,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function a(s,o){let c=s.document.querySelector("base"),f="";if(c&&c.getAttribute("href")){let g=s.location.href,h=g.indexOf("#");f=h===-1?g:g.slice(0,h)}return f+"#"+(typeof o=="string"?o:_i(o))}function l(s,o){xn(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return HS(n,a,l,e)}function at(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function xn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function US(){return Math.random().toString(36).substring(2,10)}function F0(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function jf(e,n,a=null,l,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?dr(n):n,state:a,key:n&&n.key||l||US(),unstable_mask:s}}function _i({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function dr(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let l=e.indexOf("?");l>=0&&(n.search=e.substring(l),e=e.substring(0,l)),e&&(n.pathname=e)}return n}function HS(e,n,a,l={}){let{window:s=document.defaultView,v5Compat:o=!1}=l,c=s.history,f="POP",g=null,h=x();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function x(){return(c.state||{idx:null}).idx}function y(){f="POP";let E=x(),j=E==null?null:E-h;h=E,g&&g({action:f,location:C.location,delta:j})}function b(E,j){f="PUSH";let z=$0(E)?E:jf(C.location,E,j);a&&a(z,E),h=x()+1;let D=F0(z,h),Y=C.createHref(z.unstable_mask||z);try{c.pushState(D,"",Y)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;s.location.assign(Y)}o&&g&&g({action:f,location:C.location,delta:1})}function v(E,j){f="REPLACE";let z=$0(E)?E:jf(C.location,E,j);a&&a(z,E),h=x();let D=F0(z,h),Y=C.createHref(z.unstable_mask||z);c.replaceState(D,"",Y),o&&g&&g({action:f,location:C.location,delta:0})}function S(E){return BS(E)}let C={get action(){return f},get location(){return e(s,c)},listen(E){if(g)throw new Error("A history only accepts one active listener");return s.addEventListener(I0,y),g=E,()=>{s.removeEventListener(I0,y),g=null}},createHref(E){return n(s,E)},createURL:S,encodeLocation(E){let j=S(E);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:b,replace:v,go(E){return c.go(E)}};return C}function BS(e,n=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),at(a,"No window.location.(origin|href) available to create URL");let l=typeof e=="string"?e:_i(e);return l=l.replace(/ $/,"%20"),!n&&l.startsWith("//")&&(l=a+l),new URL(l,a)}function Qx(e,n,a="/"){return qS(e,n,a,!1)}function qS(e,n,a,l){let s=typeof n=="string"?dr(n):n,o=la(s.pathname||"/",a);if(o==null)return null;let c=Xx(e);IS(c);let f=null;for(let g=0;f==null&&g<c.length;++g){let h=JS(o);f=XS(c[g],h,l)}return f}function Xx(e,n=[],a=[],l="",s=!1){let o=(c,f,g=s,h)=>{let x={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(l)&&g)return;at(x.relativePath.startsWith(l),`Absolute route path "${x.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(l.length)}let y=zn([l,x.relativePath]),b=a.concat(x);c.children&&c.children.length>0&&(at(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Xx(c.children,n,b,y,g)),!(c.path==null&&!c.index)&&n.push({path:y,score:GS(y,c.index),routesMeta:b})};return e.forEach((c,f)=>{var g;if(c.path===""||!((g=c.path)!=null&&g.includes("?")))o(c,f);else for(let h of Zx(c.path))o(c,f,!0,h)}),n}function Zx(e){let n=e.split("/");if(n.length===0)return[];let[a,...l]=n,s=a.endsWith("?"),o=a.replace(/\?$/,"");if(l.length===0)return s?[o,""]:[o];let c=Zx(l.join("/")),f=[];return f.push(...c.map(g=>g===""?o:[o,g].join("/"))),s&&f.push(...c),f.map(g=>e.startsWith("/")&&g===""?"/":g)}function IS(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:QS(n.routesMeta.map(l=>l.childrenIndex),a.routesMeta.map(l=>l.childrenIndex)))}var $S=/^:[\w-]+$/,FS=3,KS=2,PS=1,VS=10,YS=-2,K0=e=>e==="*";function GS(e,n){let a=e.split("/"),l=a.length;return a.some(K0)&&(l+=YS),n&&(l+=KS),a.filter(s=>!K0(s)).reduce((s,o)=>s+($S.test(o)?FS:o===""?PS:VS),l)}function QS(e,n){return e.length===n.length&&e.slice(0,-1).every((l,s)=>l===n[s])?e[e.length-1]-n[n.length-1]:0}function XS(e,n,a=!1){let{routesMeta:l}=e,s={},o="/",c=[];for(let f=0;f<l.length;++f){let g=l[f],h=f===l.length-1,x=o==="/"?n:n.slice(o.length)||"/",y=Lo({path:g.relativePath,caseSensitive:g.caseSensitive,end:h},x),b=g.route;if(!y&&h&&a&&!l[l.length-1].route.index&&(y=Lo({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!y)return null;Object.assign(s,y.params),c.push({params:s,pathname:zn([o,y.pathname]),pathnameBase:nw(zn([o,y.pathnameBase])),route:b}),y.pathnameBase!=="/"&&(o=zn([o,y.pathnameBase]))}return c}function Lo(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,l]=ZS(e.path,e.caseSensitive,e.end),s=n.match(a);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:l.reduce((h,{paramName:x,isOptional:y},b)=>{if(x==="*"){let S=f[b]||"";c=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const v=f[b];return y&&!v?h[x]=void 0:h[x]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:e}}function ZS(e,n=!1,a=!0){xn(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 l=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,g,h,x)=>{if(l.push({paramName:f,isOptional:g!=null}),g){let y=x.charAt(h+c.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(l.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),l]}function JS(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return xn(!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 (${n}).`),e}}function la(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,l=e.charAt(a);return l&&l!=="/"?null:e.slice(a)||"/"}var WS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ew(e,n="/"){let{pathname:a,search:l="",hash:s=""}=typeof e=="string"?dr(e):e,o;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?o=P0(a.substring(1),"/"):o=P0(a,n)):o=n,{pathname:o,search:aw(l),hash:rw(s)}}function P0(e,n){let a=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function Ud(e,n,a,l){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function tw(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function Jf(e){let n=tw(e);return n.map((a,l)=>l===n.length-1?a.pathname:a.pathnameBase)}function Go(e,n,a,l=!1){let s;typeof e=="string"?s=dr(e):(s={...e},at(!s.pathname||!s.pathname.includes("?"),Ud("?","pathname","search",s)),at(!s.pathname||!s.pathname.includes("#"),Ud("#","pathname","hash",s)),at(!s.search||!s.search.includes("#"),Ud("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,f;if(c==null)f=a;else{let y=n.length-1;if(!l&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),y-=1;s.pathname=b.join("/")}f=y>=0?n[y]:"/"}let g=ew(s,f),h=c&&c!=="/"&&c.endsWith("/"),x=(o||c===".")&&a.endsWith("/");return!g.pathname.endsWith("/")&&(h||x)&&(g.pathname+="/"),g}var zn=e=>e.join("/").replace(/\/\/+/g,"/"),nw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),aw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,lw=class{constructor(e,n,a,l=!1){this.status=e,this.statusText=n||"",this.internal=l,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function iw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function sw(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Jx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wx(e,n){let a=e;if(typeof a!="string"||!WS.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let l=a,s=!1;if(Jx)try{let o=new URL(window.location.href),c=a.startsWith("//")?new URL(o.protocol+a):new URL(a),f=la(c.pathname,n);c.origin===o.origin&&f!=null?a=f+c.search+c.hash:s=!0}catch{xn(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:s,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var eb=["POST","PUT","PATCH","DELETE"];new Set(eb);var ow=["GET",...eb];new Set(ow);var gl=N.createContext(null);gl.displayName="DataRouter";var Qo=N.createContext(null);Qo.displayName="DataRouterState";var uw=N.createContext(!1),tb=N.createContext({isTransitioning:!1});tb.displayName="ViewTransition";var cw=N.createContext(new Map);cw.displayName="Fetchers";var dw=N.createContext(null);dw.displayName="Await";var an=N.createContext(null);an.displayName="Navigation";var Ki=N.createContext(null);Ki.displayName="Location";var Cn=N.createContext({outlet:null,matches:[],isDataRoute:!1});Cn.displayName="Route";var Wf=N.createContext(null);Wf.displayName="RouteError";var nb="REACT_ROUTER_ERROR",fw="REDIRECT",hw="ROUTE_ERROR_RESPONSE";function gw(e){if(e.startsWith(`${nb}:${fw}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function pw(e){if(e.startsWith(`${nb}:${hw}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new lw(n.status,n.statusText,n.data)}catch{}}function mw(e,{relative:n}={}){at(pl(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:l}=N.useContext(an),{hash:s,pathname:o,search:c}=Vi(e,{relative:n}),f=o;return a!=="/"&&(f=o==="/"?a:zn([a,o])),l.createHref({pathname:f,search:c,hash:s})}function pl(){return N.useContext(Ki)!=null}function Nn(){return at(pl(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(Ki).location}var ab="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function rb(e){N.useContext(an).static||N.useLayoutEffect(e)}function Pi(){let{isDataRoute:e}=N.useContext(Cn);return e?Dw():yw()}function yw(){at(pl(),"useNavigate() may be used only in the context of a <Router> component.");let e=N.useContext(gl),{basename:n,navigator:a}=N.useContext(an),{matches:l}=N.useContext(Cn),{pathname:s}=Nn(),o=JSON.stringify(Jf(l)),c=N.useRef(!1);return rb(()=>{c.current=!0}),N.useCallback((g,h={})=>{if(xn(c.current,ab),!c.current)return;if(typeof g=="number"){a.go(g);return}let x=Go(g,JSON.parse(o),s,h.relative==="path");e==null&&n!=="/"&&(x.pathname=x.pathname==="/"?n:zn([n,x.pathname])),(h.replace?a.replace:a.push)(x,h.state,h)},[n,a,o,s,e])}var xw=N.createContext(null);function bw(e){let n=N.useContext(Cn).outlet;return N.useMemo(()=>n&&N.createElement(xw.Provider,{value:e},n),[n,e])}function Vi(e,{relative:n}={}){let{matches:a}=N.useContext(Cn),{pathname:l}=Nn(),s=JSON.stringify(Jf(a));return N.useMemo(()=>Go(e,JSON.parse(s),l,n==="path"),[e,s,l,n])}function vw(e,n){return lb(e,n)}function lb(e,n,a){var E;at(pl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=N.useContext(an),{matches:s}=N.useContext(Cn),o=s[s.length-1],c=o?o.params:{},f=o?o.pathname:"/",g=o?o.pathnameBase:"/",h=o&&o.route;{let j=h&&h.path||"";sb(f,!h||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${j}">) 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
|
+
*/var $0="popstate";function F0(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function LS(e={}){function n(s,o){let{pathname:c="/",search:f="",hash:g=""}=dr(s.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),Cf("",{pathname:c,search:f,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function a(s,o){let c=s.document.querySelector("base"),f="";if(c&&c.getAttribute("href")){let g=s.location.href,h=g.indexOf("#");f=h===-1?g:g.slice(0,h)}return f+"#"+(typeof o=="string"?o:_i(o))}function l(s,o){xn(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return HS(n,a,l,e)}function at(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function xn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function US(){return Math.random().toString(36).substring(2,10)}function K0(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Cf(e,n,a=null,l,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?dr(n):n,state:a,key:n&&n.key||l||US(),unstable_mask:s}}function _i({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function dr(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let l=e.indexOf("?");l>=0&&(n.search=e.substring(l),e=e.substring(0,l)),e&&(n.pathname=e)}return n}function HS(e,n,a,l={}){let{window:s=document.defaultView,v5Compat:o=!1}=l,c=s.history,f="POP",g=null,h=x();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function x(){return(c.state||{idx:null}).idx}function y(){f="POP";let E=x(),j=E==null?null:E-h;h=E,g&&g({action:f,location:N.location,delta:j})}function b(E,j){f="PUSH";let z=F0(E)?E:Cf(N.location,E,j);a&&a(z,E),h=x()+1;let T=K0(z,h),P=N.createHref(z.unstable_mask||z);try{c.pushState(T,"",P)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;s.location.assign(P)}o&&g&&g({action:f,location:N.location,delta:1})}function v(E,j){f="REPLACE";let z=F0(E)?E:Cf(N.location,E,j);a&&a(z,E),h=x();let T=K0(z,h),P=N.createHref(z.unstable_mask||z);c.replaceState(T,"",P),o&&g&&g({action:f,location:N.location,delta:0})}function S(E){return BS(E)}let N={get action(){return f},get location(){return e(s,c)},listen(E){if(g)throw new Error("A history only accepts one active listener");return s.addEventListener($0,y),g=E,()=>{s.removeEventListener($0,y),g=null}},createHref(E){return n(s,E)},createURL:S,encodeLocation(E){let j=S(E);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:b,replace:v,go(E){return c.go(E)}};return N}function BS(e,n=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),at(a,"No window.location.(origin|href) available to create URL");let l=typeof e=="string"?e:_i(e);return l=l.replace(/ $/,"%20"),!n&&l.startsWith("//")&&(l=a+l),new URL(l,a)}function Xx(e,n,a="/"){return qS(e,n,a,!1)}function qS(e,n,a,l){let s=typeof n=="string"?dr(n):n,o=la(s.pathname||"/",a);if(o==null)return null;let c=Zx(e);IS(c);let f=null;for(let g=0;f==null&&g<c.length;++g){let h=JS(o);f=XS(c[g],h,l)}return f}function Zx(e,n=[],a=[],l="",s=!1){let o=(c,f,g=s,h)=>{let x={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(l)&&g)return;at(x.relativePath.startsWith(l),`Absolute route path "${x.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(l.length)}let y=zn([l,x.relativePath]),b=a.concat(x);c.children&&c.children.length>0&&(at(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Zx(c.children,n,b,y,g)),!(c.path==null&&!c.index)&&n.push({path:y,score:GS(y,c.index),routesMeta:b})};return e.forEach((c,f)=>{var g;if(c.path===""||!((g=c.path)!=null&&g.includes("?")))o(c,f);else for(let h of Jx(c.path))o(c,f,!0,h)}),n}function Jx(e){let n=e.split("/");if(n.length===0)return[];let[a,...l]=n,s=a.endsWith("?"),o=a.replace(/\?$/,"");if(l.length===0)return s?[o,""]:[o];let c=Jx(l.join("/")),f=[];return f.push(...c.map(g=>g===""?o:[o,g].join("/"))),s&&f.push(...c),f.map(g=>e.startsWith("/")&&g===""?"/":g)}function IS(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:QS(n.routesMeta.map(l=>l.childrenIndex),a.routesMeta.map(l=>l.childrenIndex)))}var $S=/^:[\w-]+$/,FS=3,KS=2,PS=1,VS=10,YS=-2,P0=e=>e==="*";function GS(e,n){let a=e.split("/"),l=a.length;return a.some(P0)&&(l+=YS),n&&(l+=KS),a.filter(s=>!P0(s)).reduce((s,o)=>s+($S.test(o)?FS:o===""?PS:VS),l)}function QS(e,n){return e.length===n.length&&e.slice(0,-1).every((l,s)=>l===n[s])?e[e.length-1]-n[n.length-1]:0}function XS(e,n,a=!1){let{routesMeta:l}=e,s={},o="/",c=[];for(let f=0;f<l.length;++f){let g=l[f],h=f===l.length-1,x=o==="/"?n:n.slice(o.length)||"/",y=Lo({path:g.relativePath,caseSensitive:g.caseSensitive,end:h},x),b=g.route;if(!y&&h&&a&&!l[l.length-1].route.index&&(y=Lo({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!y)return null;Object.assign(s,y.params),c.push({params:s,pathname:zn([o,y.pathname]),pathnameBase:nw(zn([o,y.pathnameBase])),route:b}),y.pathnameBase!=="/"&&(o=zn([o,y.pathnameBase]))}return c}function Lo(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,l]=ZS(e.path,e.caseSensitive,e.end),s=n.match(a);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:l.reduce((h,{paramName:x,isOptional:y},b)=>{if(x==="*"){let S=f[b]||"";c=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const v=f[b];return y&&!v?h[x]=void 0:h[x]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:e}}function ZS(e,n=!1,a=!0){xn(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 l=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,g,h,x)=>{if(l.push({paramName:f,isOptional:g!=null}),g){let y=x.charAt(h+c.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(l.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),l]}function JS(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return xn(!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 (${n}).`),e}}function la(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,l=e.charAt(a);return l&&l!=="/"?null:e.slice(a)||"/"}var WS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ew(e,n="/"){let{pathname:a,search:l="",hash:s=""}=typeof e=="string"?dr(e):e,o;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?o=V0(a.substring(1),"/"):o=V0(a,n)):o=n,{pathname:o,search:aw(l),hash:rw(s)}}function V0(e,n){let a=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function Bd(e,n,a,l){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function tw(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function Jf(e){let n=tw(e);return n.map((a,l)=>l===n.length-1?a.pathname:a.pathnameBase)}function Xo(e,n,a,l=!1){let s;typeof e=="string"?s=dr(e):(s={...e},at(!s.pathname||!s.pathname.includes("?"),Bd("?","pathname","search",s)),at(!s.pathname||!s.pathname.includes("#"),Bd("#","pathname","hash",s)),at(!s.search||!s.search.includes("#"),Bd("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,f;if(c==null)f=a;else{let y=n.length-1;if(!l&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),y-=1;s.pathname=b.join("/")}f=y>=0?n[y]:"/"}let g=ew(s,f),h=c&&c!=="/"&&c.endsWith("/"),x=(o||c===".")&&a.endsWith("/");return!g.pathname.endsWith("/")&&(h||x)&&(g.pathname+="/"),g}var zn=e=>e.join("/").replace(/\/\/+/g,"/"),nw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),aw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,lw=class{constructor(e,n,a,l=!1){this.status=e,this.statusText=n||"",this.internal=l,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function iw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function sw(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Wx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function eb(e,n){let a=e;if(typeof a!="string"||!WS.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let l=a,s=!1;if(Wx)try{let o=new URL(window.location.href),c=a.startsWith("//")?new URL(o.protocol+a):new URL(a),f=la(c.pathname,n);c.origin===o.origin&&f!=null?a=f+c.search+c.hash:s=!0}catch{xn(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:s,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var tb=["POST","PUT","PATCH","DELETE"];new Set(tb);var ow=["GET",...tb];new Set(ow);var gl=C.createContext(null);gl.displayName="DataRouter";var Zo=C.createContext(null);Zo.displayName="DataRouterState";var uw=C.createContext(!1),nb=C.createContext({isTransitioning:!1});nb.displayName="ViewTransition";var cw=C.createContext(new Map);cw.displayName="Fetchers";var dw=C.createContext(null);dw.displayName="Await";var an=C.createContext(null);an.displayName="Navigation";var Ki=C.createContext(null);Ki.displayName="Location";var Nn=C.createContext({outlet:null,matches:[],isDataRoute:!1});Nn.displayName="Route";var Wf=C.createContext(null);Wf.displayName="RouteError";var ab="REACT_ROUTER_ERROR",fw="REDIRECT",hw="ROUTE_ERROR_RESPONSE";function gw(e){if(e.startsWith(`${ab}:${fw}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function pw(e){if(e.startsWith(`${ab}:${hw}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new lw(n.status,n.statusText,n.data)}catch{}}function mw(e,{relative:n}={}){at(pl(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:l}=C.useContext(an),{hash:s,pathname:o,search:c}=Vi(e,{relative:n}),f=o;return a!=="/"&&(f=o==="/"?a:zn([a,o])),l.createHref({pathname:f,search:c,hash:s})}function pl(){return C.useContext(Ki)!=null}function Cn(){return at(pl(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(Ki).location}var rb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function lb(e){C.useContext(an).static||C.useLayoutEffect(e)}function Pi(){let{isDataRoute:e}=C.useContext(Nn);return e?Mw():yw()}function yw(){at(pl(),"useNavigate() may be used only in the context of a <Router> component.");let e=C.useContext(gl),{basename:n,navigator:a}=C.useContext(an),{matches:l}=C.useContext(Nn),{pathname:s}=Cn(),o=JSON.stringify(Jf(l)),c=C.useRef(!1);return lb(()=>{c.current=!0}),C.useCallback((g,h={})=>{if(xn(c.current,rb),!c.current)return;if(typeof g=="number"){a.go(g);return}let x=Xo(g,JSON.parse(o),s,h.relative==="path");e==null&&n!=="/"&&(x.pathname=x.pathname==="/"?n:zn([n,x.pathname])),(h.replace?a.replace:a.push)(x,h.state,h)},[n,a,o,s,e])}var xw=C.createContext(null);function bw(e){let n=C.useContext(Nn).outlet;return C.useMemo(()=>n&&C.createElement(xw.Provider,{value:e},n),[n,e])}function Vi(e,{relative:n}={}){let{matches:a}=C.useContext(Nn),{pathname:l}=Cn(),s=JSON.stringify(Jf(a));return C.useMemo(()=>Xo(e,JSON.parse(s),l,n==="path"),[e,s,l,n])}function vw(e,n){return ib(e,n)}function ib(e,n,a){var E;at(pl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=C.useContext(an),{matches:s}=C.useContext(Nn),o=s[s.length-1],c=o?o.params:{},f=o?o.pathname:"/",g=o?o.pathnameBase:"/",h=o&&o.route;{let j=h&&h.path||"";ob(f,!h||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${j}">) 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.
|
|
60
60
|
|
|
61
|
-
Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let x=Nn(),y;if(n){let j=typeof n=="string"?dr(n):n;at(g==="/"||((E=j.pathname)==null?void 0:E.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${j.pathname}" was given in the \`location\` prop.`),y=j}else y=x;let b=y.pathname||"/",v=b;if(g!=="/"){let j=g.replace(/^\//,"").split("/");v="/"+b.replace(/^\//,"").split("/").slice(j.length).join("/")}let S=Qx(e,{pathname:v});xn(h||S!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),xn(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=Cw(S&&S.map(j=>Object.assign({},j,{params:Object.assign({},c,j.params),pathname:zn([g,l.encodeLocation?l.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?g:zn([g,l.encodeLocation?l.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),s,a);return n&&C?N.createElement(Ki.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},C):C}function kw(){let e=_w(),n=iw(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,l="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:l},o={padding:"2px 4px",backgroundColor:l},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=N.createElement(N.Fragment,null,N.createElement("p",null,"💿 Hey developer 👋"),N.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",N.createElement("code",{style:o},"ErrorBoundary")," or"," ",N.createElement("code",{style:o},"errorElement")," prop on your route.")),N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},n),a?N.createElement("pre",{style:s},a):null,c)}var Sw=N.createElement(kw,null),ib=class extends N.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):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 a=pw(e.digest);a&&(e=a)}let n=e!==void 0?N.createElement(Cn.Provider,{value:this.props.routeContext},N.createElement(Wf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?N.createElement(ww,{error:e},n):n}};ib.contextType=uw;var Hd=new WeakMap;function ww({children:e,error:n}){let{basename:a}=N.useContext(an);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let l=gw(n.digest);if(l){let s=Hd.get(n);if(s)throw s;let o=Wx(l.location,a);if(Jx&&!Hd.get(n))if(o.isExternal||l.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:l.replace}));throw Hd.set(n,c),c}return N.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function jw({routeContext:e,match:n,children:a}){let l=N.useContext(gl);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(Cn.Provider,{value:e},a)}function Cw(e,n=[],a){let l=a==null?void 0:a.state;if(e==null){if(!l)return null;if(l.errors)e=l.matches;else if(n.length===0&&!l.initialized&&l.matches.length>0)e=l.matches;else return null}let s=e,o=l==null?void 0:l.errors;if(o!=null){let x=s.findIndex(y=>y.route.id&&(o==null?void 0:o[y.route.id])!==void 0);at(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,x+1))}let c=!1,f=-1;if(a&&l){c=l.renderFallback;for(let x=0;x<s.length;x++){let y=s[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(f=x),y.route.id){let{loaderData:b,errors:v}=l,S=y.route.loader&&!b.hasOwnProperty(y.route.id)&&(!v||v[y.route.id]===void 0);if(y.route.lazy||S){a.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let g=a==null?void 0:a.onError,h=l&&g?(x,y)=>{var b,v;g(x,{location:l.location,params:((v=(b=l.matches)==null?void 0:b[0])==null?void 0:v.params)??{},unstable_pattern:sw(l.matches),errorInfo:y})}:void 0;return s.reduceRight((x,y,b)=>{let v,S=!1,C=null,E=null;l&&(v=o&&y.route.id?o[y.route.id]:void 0,C=y.route.errorElement||Sw,c&&(f<0&&b===0?(sb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,E=null):f===b&&(S=!0,E=y.route.hydrateFallbackElement||null)));let j=n.concat(s.slice(0,b+1)),z=()=>{let D;return v?D=C:S?D=E:y.route.Component?D=N.createElement(y.route.Component,null):y.route.element?D=y.route.element:D=x,N.createElement(jw,{match:y,routeContext:{outlet:x,matches:j,isDataRoute:l!=null},children:D})};return l&&(y.route.ErrorBoundary||y.route.errorElement||b===0)?N.createElement(ib,{location:l.location,revalidation:l.revalidation,component:C,error:v,children:z(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:h}):z()},null)}function eh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Nw(e){let n=N.useContext(gl);return at(n,eh(e)),n}function Ew(e){let n=N.useContext(Qo);return at(n,eh(e)),n}function Aw(e){let n=N.useContext(Cn);return at(n,eh(e)),n}function th(e){let n=Aw(e),a=n.matches[n.matches.length-1];return at(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function Tw(){return th("useRouteId")}function _w(){var l;let e=N.useContext(Wf),n=Ew("useRouteError"),a=th("useRouteError");return e!==void 0?e:(l=n.errors)==null?void 0:l[a]}function Dw(){let{router:e}=Nw("useNavigate"),n=th("useNavigate"),a=N.useRef(!1);return rb(()=>{a.current=!0}),N.useCallback(async(s,o={})=>{xn(a.current,ab),a.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:n,...o}))},[e,n])}var V0={};function sb(e,n,a){!n&&!V0[e]&&(V0[e]=!0,xn(!1,a))}N.memo(Mw);function Mw({routes:e,future:n,state:a,isStatic:l,onError:s}){return lb(e,void 0,{state:a,isStatic:l,onError:s})}function Rw({to:e,replace:n,state:a,relative:l}){at(pl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=N.useContext(an);xn(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=N.useContext(Cn),{pathname:c}=Nn(),f=Pi(),g=Go(e,Jf(o),c,l==="path"),h=JSON.stringify(g);return N.useEffect(()=>{f(JSON.parse(h),{replace:n,state:a,relative:l})},[f,h,l,n,a]),null}function ob(e){return bw(e.context)}function wn(e){at(!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 Ow({basename:e="/",children:n=null,location:a,navigationType:l="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){at(!pl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),g=N.useMemo(()=>({basename:f,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[f,s,o,c]);typeof a=="string"&&(a=dr(a));let{pathname:h="/",search:x="",hash:y="",state:b=null,key:v="default",unstable_mask:S}=a,C=N.useMemo(()=>{let E=la(h,f);return E==null?null:{location:{pathname:E,search:x,hash:y,state:b,key:v,unstable_mask:S},navigationType:l}},[f,h,x,y,b,v,l,S]);return xn(C!=null,`<Router basename="${f}"> is not able to match the URL "${h}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:N.createElement(an.Provider,{value:g},N.createElement(Ki.Provider,{children:n,value:C}))}function zw({children:e,location:n}){return vw(Cf(e),n)}function Cf(e,n=[]){let a=[];return N.Children.forEach(e,(l,s)=>{if(!N.isValidElement(l))return;let o=[...n,s];if(l.type===N.Fragment){a.push.apply(a,Cf(l.props.children,o));return}at(l.type===wn,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),at(!l.props.index||!l.props.children,"An index route cannot have child routes.");let c={id:l.props.id||o.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(c.children=Cf(l.props.children,o)),a.push(c)}),a}var Mo="get",Ro="application/x-www-form-urlencoded";function Xo(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Lw(e){return Xo(e)&&e.tagName.toLowerCase()==="button"}function Uw(e){return Xo(e)&&e.tagName.toLowerCase()==="form"}function Hw(e){return Xo(e)&&e.tagName.toLowerCase()==="input"}function Bw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qw(e,n){return e.button===0&&(!n||n==="_self")&&!Bw(e)}var vo=null;function Iw(){if(vo===null)try{new FormData(document.createElement("form"),0),vo=!1}catch{vo=!0}return vo}var $w=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Bd(e){return e!=null&&!$w.has(e)?(xn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ro}"`),null):e}function Fw(e,n){let a,l,s,o,c;if(Uw(e)){let f=e.getAttribute("action");l=f?la(f,n):null,a=e.getAttribute("method")||Mo,s=Bd(e.getAttribute("enctype"))||Ro,o=new FormData(e)}else if(Lw(e)||Hw(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=e.getAttribute("formaction")||f.getAttribute("action");if(l=g?la(g,n):null,a=e.getAttribute("formmethod")||f.getAttribute("method")||Mo,s=Bd(e.getAttribute("formenctype"))||Bd(f.getAttribute("enctype"))||Ro,o=new FormData(f,e),!Iw()){let{name:h,type:x,value:y}=e;if(x==="image"){let b=h?`${h}.`:"";o.append(`${b}x`,"0"),o.append(`${b}y`,"0")}else h&&o.append(h,y)}}else{if(Xo(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Mo,l=null,s=Ro,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:l,method:a.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nh(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Kw(e,n,a,l){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${l}`:s.pathname=`${s.pathname}.${l}`:s.pathname==="/"?s.pathname=`_root.${l}`:n&&la(s.pathname,n)==="/"?s.pathname=`${n.replace(/\/$/,"")}/_root.${l}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${l}`,s}async function Pw(e,n){if(e.id in n)return n[e.id];try{let a=await import(e.module);return n[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Vw(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 Yw(e,n,a){let l=await Promise.all(e.map(async s=>{let o=n.routes[s.route.id];if(o){let c=await Pw(o,a);return c.links?c.links():[]}return[]}));return Zw(l.flat(1).filter(Vw).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Y0(e,n,a,l,s,o){let c=(g,h)=>a[h]?g.route.id!==a[h].route.id:!0,f=(g,h)=>{var x;return a[h].pathname!==g.pathname||((x=a[h].route.path)==null?void 0:x.endsWith("*"))&&a[h].params["*"]!==g.params["*"]};return o==="assets"?n.filter((g,h)=>c(g,h)||f(g,h)):o==="data"?n.filter((g,h)=>{var y;let x=l.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(c(g,h)||f(g,h))return!0;if(g.route.shouldRevalidate){let b=g.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((y=a[0])==null?void 0:y.params)||{},nextUrl:new URL(e,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function Gw(e,n,{includeHydrateFallback:a}={}){return Qw(e.map(l=>{let s=n.routes[l.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function Qw(e){return[...new Set(e)]}function Xw(e){let n={},a=Object.keys(e).sort();for(let l of a)n[l]=e[l];return n}function Zw(e,n){let a=new Set;return new Set(n),e.reduce((l,s)=>{let o=JSON.stringify(Xw(s));return a.has(o)||(a.add(o),l.push({key:o,link:s})),l},[])}function ub(){let e=N.useContext(gl);return nh(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Jw(){let e=N.useContext(Qo);return nh(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ah=N.createContext(void 0);ah.displayName="FrameworkContext";function cb(){let e=N.useContext(ah);return nh(e,"You must render this element inside a <HydratedRouter> element"),e}function Ww(e,n){let a=N.useContext(ah),[l,s]=N.useState(!1),[o,c]=N.useState(!1),{onFocus:f,onBlur:g,onMouseEnter:h,onMouseLeave:x,onTouchStart:y}=n,b=N.useRef(null);N.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=j=>{j.forEach(z=>{c(z.isIntersecting)})},E=new IntersectionObserver(C,{threshold:.5});return b.current&&E.observe(b.current),()=>{E.disconnect()}}},[e]),N.useEffect(()=>{if(l){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[l]);let v=()=>{s(!0)},S=()=>{s(!1),c(!1)};return a?e!=="intent"?[o,b,{}]:[o,b,{onFocus:hi(f,v),onBlur:hi(g,S),onMouseEnter:hi(h,v),onMouseLeave:hi(x,S),onTouchStart:hi(y,v)}]:[!1,b,{}]}function hi(e,n){return a=>{e&&e(a),a.defaultPrevented||n(a)}}function e2({page:e,...n}){let{router:a}=ub(),l=N.useMemo(()=>Qx(a.routes,e,a.basename),[a.routes,e,a.basename]);return l?N.createElement(n2,{page:e,matches:l,...n}):null}function t2(e){let{manifest:n,routeModules:a}=cb(),[l,s]=N.useState([]);return N.useEffect(()=>{let o=!1;return Yw(e,n,a).then(c=>{o||s(c)}),()=>{o=!0}},[e,n,a]),l}function n2({page:e,matches:n,...a}){let l=Nn(),{future:s,manifest:o,routeModules:c}=cb(),{basename:f}=ub(),{loaderData:g,matches:h}=Jw(),x=N.useMemo(()=>Y0(e,n,h,o,l,"data"),[e,n,h,o,l]),y=N.useMemo(()=>Y0(e,n,h,o,l,"assets"),[e,n,h,o,l]),b=N.useMemo(()=>{if(e===l.pathname+l.search+l.hash)return[];let C=new Set,E=!1;if(n.forEach(z=>{var Y;let D=o.routes[z.route.id];!D||!D.hasLoader||(!x.some(H=>H.route.id===z.route.id)&&z.route.id in g&&((Y=c[z.route.id])!=null&&Y.shouldRevalidate)||D.hasClientLoader?E=!0:C.add(z.route.id))}),C.size===0)return[];let j=Kw(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return E&&C.size>0&&j.searchParams.set("_routes",n.filter(z=>C.has(z.route.id)).map(z=>z.route.id).join(",")),[j.pathname+j.search]},[f,s.unstable_trailingSlashAwareDataRequests,g,l,o,x,n,e,c]),v=N.useMemo(()=>Gw(y,o),[y,o]),S=t2(y);return N.createElement(N.Fragment,null,b.map(C=>N.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...a})),v.map(C=>N.createElement("link",{key:C,rel:"modulepreload",href:C,...a})),S.map(({key:C,link:E})=>N.createElement("link",{key:C,nonce:a.nonce,...E,crossOrigin:E.crossOrigin??a.crossOrigin})))}function a2(...e){return n=>{e.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var r2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{r2&&(window.__reactRouterVersion="7.13.1")}catch{}function l2({basename:e,children:n,unstable_useTransitions:a,window:l}){let s=N.useRef();s.current==null&&(s.current=LS({window:l,v5Compat:!0}));let o=s.current,[c,f]=N.useState({action:o.action,location:o.location}),g=N.useCallback(h=>{a===!1?f(h):N.startTransition(()=>f(h))},[a]);return N.useLayoutEffect(()=>o.listen(g),[o,g]),N.createElement(Ow,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:a})}var db=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fb=N.forwardRef(function({onClick:n,discover:a="render",prefetch:l="none",relative:s,reloadDocument:o,replace:c,unstable_mask:f,state:g,target:h,to:x,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:v,...S},C){let{basename:E,navigator:j,unstable_useTransitions:z}=N.useContext(an),D=typeof x=="string"&&db.test(x),Y=Wx(x,E);x=Y.to;let H=mw(x,{relative:s}),L=Nn(),P=null;if(f){let W=Go(f,[],L.unstable_mask?L.unstable_mask.pathname:"/",!0);E!=="/"&&(W.pathname=W.pathname==="/"?E:zn([E,W.pathname])),P=j.createHref(W)}let[ee,G,R]=Ww(l,S),ae=u2(x,{replace:c,unstable_mask:f,state:g,target:h,preventScrollReset:y,relative:s,viewTransition:b,unstable_defaultShouldRevalidate:v,unstable_useTransitions:z});function F(W){n&&n(W),W.defaultPrevented||ae(W)}let ie=!(Y.isExternal||o),ne=N.createElement("a",{...S,...R,href:(ie?P:void 0)||Y.absoluteURL||H,onClick:ie?F:n,ref:a2(C,G),target:h,"data-discover":!D&&a==="render"?"true":void 0});return ee&&!D?N.createElement(N.Fragment,null,ne,N.createElement(e2,{page:H})):ne});fb.displayName="Link";var i2=N.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:l="",end:s=!1,style:o,to:c,viewTransition:f,children:g,...h},x){let y=Vi(c,{relative:h.relative}),b=Nn(),v=N.useContext(Qo),{navigator:S,basename:C}=N.useContext(an),E=v!=null&&g2(y)&&f===!0,j=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,z=b.pathname,D=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;a||(z=z.toLowerCase(),D=D?D.toLowerCase():null,j=j.toLowerCase()),D&&C&&(D=la(D,C)||D);const Y=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let H=z===j||!s&&z.startsWith(j)&&z.charAt(Y)==="/",L=D!=null&&(D===j||!s&&D.startsWith(j)&&D.charAt(j.length)==="/"),P={isActive:H,isPending:L,isTransitioning:E},ee=H?n:void 0,G;typeof l=="function"?G=l(P):G=[l,H?"active":null,L?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let R=typeof o=="function"?o(P):o;return N.createElement(fb,{...h,"aria-current":ee,className:G,ref:x,style:R,to:c,viewTransition:f},typeof g=="function"?g(P):g)});i2.displayName="NavLink";var s2=N.forwardRef(({discover:e="render",fetcherKey:n,navigate:a,reloadDocument:l,replace:s,state:o,method:c=Mo,action:f,onSubmit:g,relative:h,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:b,...v},S)=>{let{unstable_useTransitions:C}=N.useContext(an),E=f2(),j=h2(f,{relative:h}),z=c.toLowerCase()==="get"?"get":"post",D=typeof f=="string"&&db.test(f),Y=H=>{if(g&&g(H),H.defaultPrevented)return;H.preventDefault();let L=H.nativeEvent.submitter,P=(L==null?void 0:L.getAttribute("formmethod"))||c,ee=()=>E(L||H.currentTarget,{fetcherKey:n,method:P,navigate:a,replace:s,state:o,relative:h,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:b});C&&a!==!1?N.startTransition(()=>ee()):ee()};return N.createElement("form",{ref:S,method:z,action:j,onSubmit:l?g:Y,...v,"data-discover":!D&&e==="render"?"true":void 0})});s2.displayName="Form";function o2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hb(e){let n=N.useContext(gl);return at(n,o2(e)),n}function u2(e,{target:n,replace:a,unstable_mask:l,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:g,unstable_useTransitions:h}={}){let x=Pi(),y=Nn(),b=Vi(e,{relative:c});return N.useCallback(v=>{if(qw(v,n)){v.preventDefault();let S=a!==void 0?a:_i(y)===_i(b),C=()=>x(e,{replace:S,unstable_mask:l,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:g});h?N.startTransition(()=>C()):C()}},[y,x,b,a,l,s,n,e,o,c,f,g,h])}var c2=0,d2=()=>`__${String(++c2)}__`;function f2(){let{router:e}=hb("useSubmit"),{basename:n}=N.useContext(an),a=Tw(),l=e.fetch,s=e.navigate;return N.useCallback(async(o,c={})=>{let{action:f,method:g,encType:h,formData:x,body:y}=Fw(o,n);if(c.navigate===!1){let b=c.fetcherKey||d2();await l(b,a,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||g,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||g,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[l,s,n,a])}function h2(e,{relative:n}={}){let{basename:a}=N.useContext(an),l=N.useContext(Cn);at(l,"useFormAction must be used inside a RouteContext");let[s]=l.matches.slice(-1),o={...Vi(e||".",{relative:n})},c=Nn();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),g=f.getAll("index");if(g.some(x=>x==="")){f.delete("index"),g.filter(y=>y).forEach(y=>f.append("index",y));let x=f.toString();o.search=x?`?${x}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(o.pathname=o.pathname==="/"?a:zn([a,o.pathname])),_i(o)}function g2(e,{relative:n}={}){let a=N.useContext(tb);at(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=hb("useViewTransitionState"),s=Vi(e,{relative:n});if(!a.isTransitioning)return!1;let o=la(a.currentLocation.pathname,l)||a.currentLocation.pathname,c=la(a.nextLocation.pathname,l)||a.nextLocation.pathname;return Lo(s.pathname,c)!=null||Lo(s.pathname,o)!=null}const ke=e=>typeof e=="string",gi=()=>{let e,n;const a=new Promise((l,s)=>{e=l,n=s});return a.resolve=e,a.reject=n,a},G0=e=>e==null?"":""+e,p2=(e,n,a)=>{e.forEach(l=>{n[l]&&(a[l]=n[l])})},m2=/###/g,Q0=e=>e&&e.indexOf("###")>-1?e.replace(m2,"."):e,X0=e=>!e||ke(e),ji=(e,n,a)=>{const l=ke(n)?n.split("."):n;let s=0;for(;s<l.length-1;){if(X0(e))return{};const o=Q0(l[s]);!e[o]&&a&&(e[o]=new a),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return X0(e)?{}:{obj:e,k:Q0(l[s])}},Z0=(e,n,a)=>{const{obj:l,k:s}=ji(e,n,Object);if(l!==void 0||n.length===1){l[s]=a;return}let o=n[n.length-1],c=n.slice(0,n.length-1),f=ji(e,c,Object);for(;f.obj===void 0&&c.length;)o=`${c[c.length-1]}.${o}`,c=c.slice(0,c.length-1),f=ji(e,c,Object),f!=null&&f.obj&&typeof f.obj[`${f.k}.${o}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${o}`]=a},y2=(e,n,a,l)=>{const{obj:s,k:o}=ji(e,n,Object);s[o]=s[o]||[],s[o].push(a)},Uo=(e,n)=>{const{obj:a,k:l}=ji(e,n);if(a&&Object.prototype.hasOwnProperty.call(a,l))return a[l]},x2=(e,n,a)=>{const l=Uo(e,a);return l!==void 0?l:Uo(n,a)},gb=(e,n,a)=>{for(const l in n)l!=="__proto__"&&l!=="constructor"&&(l in e?ke(e[l])||e[l]instanceof String||ke(n[l])||n[l]instanceof String?a&&(e[l]=n[l]):gb(e[l],n[l],a):e[l]=n[l]);return e},lr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var b2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const v2=e=>ke(e)?e.replace(/[&<>"'\/]/g,n=>b2[n]):e;class k2{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const a=this.regExpMap.get(n);if(a!==void 0)return a;const l=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,l),this.regExpQueue.push(n),l}}const S2=[" ",",","?","!",";"],w2=new k2(20),j2=(e,n,a)=>{n=n||"",a=a||"";const l=S2.filter(c=>n.indexOf(c)<0&&a.indexOf(c)<0);if(l.length===0)return!0;const s=w2.getRegExp(`(${l.map(c=>c==="?"?"\\?":c).join("|")})`);let o=!s.test(e);if(!o){const c=e.indexOf(a);c>0&&!s.test(e.substring(0,c))&&(o=!0)}return o},Nf=(e,n,a=".")=>{if(!e)return;if(e[n])return Object.prototype.hasOwnProperty.call(e,n)?e[n]:void 0;const l=n.split(a);let s=e;for(let o=0;o<l.length;){if(!s||typeof s!="object")return;let c,f="";for(let g=o;g<l.length;++g)if(g!==o&&(f+=a),f+=l[g],c=s[f],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&g<l.length-1)continue;o+=g-o+1;break}s=c}return s},Di=e=>e==null?void 0:e.replace("_","-"),C2={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){var a,l;(l=(a=console==null?void 0:console[e])==null?void 0:a.apply)==null||l.call(a,console,n)}};class Ho{constructor(n,a={}){this.init(n,a)}init(n,a={}){this.prefix=a.prefix||"i18next:",this.logger=n||C2,this.options=a,this.debug=a.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,a,l,s){return s&&!this.debug?null:(ke(n[0])&&(n[0]=`${l}${this.prefix} ${n[0]}`),this.logger[a](n))}create(n){return new Ho(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Ho(this.logger,n)}}var On=new Ho;class Zo{constructor(){this.observers={}}on(n,a){return n.split(" ").forEach(l=>{this.observers[l]||(this.observers[l]=new Map);const s=this.observers[l].get(a)||0;this.observers[l].set(a,s+1)}),this}off(n,a){if(this.observers[n]){if(!a){delete this.observers[n];return}this.observers[n].delete(a)}}emit(n,...a){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([s,o])=>{for(let c=0;c<o;c++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,o])=>{for(let c=0;c<o;c++)s.apply(s,[n,...a])})}}class J0 extends Zo{constructor(n,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const a=this.options.ns.indexOf(n);a>-1&&this.options.ns.splice(a,1)}getResource(n,a,l,s={}){var h,x;const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;n.indexOf(".")>-1?f=n.split("."):(f=[n,a],l&&(Array.isArray(l)?f.push(...l):ke(l)&&o?f.push(...l.split(o)):f.push(l)));const g=Uo(this.data,f);return!g&&!a&&!l&&n.indexOf(".")>-1&&(n=f[0],a=f[1],l=f.slice(2).join(".")),g||!c||!ke(l)?g:Nf((x=(h=this.data)==null?void 0:h[n])==null?void 0:x[a],l,o)}addResource(n,a,l,s,o={silent:!1}){const c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let f=[n,a];l&&(f=f.concat(c?l.split(c):l)),n.indexOf(".")>-1&&(f=n.split("."),s=a,a=f[1]),this.addNamespaces(a),Z0(this.data,f,s),o.silent||this.emit("added",n,a,l,s)}addResources(n,a,l,s={silent:!1}){for(const o in l)(ke(l[o])||Array.isArray(l[o]))&&this.addResource(n,a,o,l[o],{silent:!0});s.silent||this.emit("added",n,a,l)}addResourceBundle(n,a,l,s,o,c={silent:!1,skipCopy:!1}){let f=[n,a];n.indexOf(".")>-1&&(f=n.split("."),s=l,l=a,a=f[1]),this.addNamespaces(a);let g=Uo(this.data,f)||{};c.skipCopy||(l=JSON.parse(JSON.stringify(l))),s?gb(g,l,o):g={...g,...l},Z0(this.data,f,g),c.silent||this.emit("added",n,a,l)}removeResourceBundle(n,a){this.hasResourceBundle(n,a)&&delete this.data[n][a],this.removeNamespaces(a),this.emit("removed",n,a)}hasResourceBundle(n,a){return this.getResource(n,a)!==void 0}getResourceBundle(n,a){return a||(a=this.options.defaultNS),this.getResource(n,a)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const a=this.getDataByLanguage(n);return!!(a&&Object.keys(a)||[]).find(s=>a[s]&&Object.keys(a[s]).length>0)}toJSON(){return this.data}}var pb={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,a,l,s){return e.forEach(o=>{var c;n=((c=this.processors[o])==null?void 0:c.process(n,a,l,s))??n}),n}};const mb=Symbol("i18next/PATH_KEY");function N2(){const e=[],n=Object.create(null);let a;return n.get=(l,s)=>{var o;return(o=a==null?void 0:a.revoke)==null||o.call(a),s===mb?e:(e.push(s),a=Proxy.revocable(l,n),a.proxy)},Proxy.revocable(Object.create(null),n).proxy}function Ef(e,n){const{[mb]:a}=e(N2());return a.join((n==null?void 0:n.keySeparator)??".")}const W0={},qd=e=>!ke(e)&&typeof e!="boolean"&&typeof e!="number";class Bo extends Zo{constructor(n,a={}){super(),p2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=On.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n,a={interpolation:{}}){const l={...a};if(n==null)return!1;const s=this.resolve(n,l);if((s==null?void 0:s.res)===void 0)return!1;const o=qd(s.res);return!(l.returnObjects===!1&&o)}extractFromKey(n,a){let l=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=a.ns||this.options.defaultNS||[];const c=l&&n.indexOf(l)>-1,f=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!j2(n,l,s);if(c&&!f){const g=n.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:n,namespaces:ke(o)?[o]:o};const h=n.split(l);(l!==s||l===s&&this.options.ns.indexOf(h[0])>-1)&&(o=h.shift()),n=h.join(s)}return{key:n,namespaces:ke(o)?[o]:o}}translate(n,a,l){let s=typeof a=="object"?{...a}:a;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),n==null)return"";typeof n=="function"&&(n=Ef(n,{...this.options,...s})),Array.isArray(n)||(n=[String(n)]);const o=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:f,namespaces:g}=this.extractFromKey(n[n.length-1],s),h=g[g.length-1];let x=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;x===void 0&&(x=":");const y=s.lng||this.language,b=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((y==null?void 0:y.toLowerCase())==="cimode")return b?o?{res:`${h}${x}${f}`,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${x}${f}`:o?{res:f,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:f;const v=this.resolve(n,s);let S=v==null?void 0:v.res;const C=(v==null?void 0:v.usedKey)||f,E=(v==null?void 0:v.exactUsedKey)||f,j=["[object Number]","[object Function]","[object RegExp]"],z=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject,Y=s.count!==void 0&&!ke(s.count),H=Bo.hasDefaultValue(s),L=Y?this.pluralResolver.getSuffix(y,s.count,s):"",P=s.ordinal&&Y?this.pluralResolver.getSuffix(y,s.count,{ordinal:!1}):"",ee=Y&&!s.ordinal&&s.count===0,G=ee&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${L}`]||s[`defaultValue${P}`]||s.defaultValue;let R=S;D&&!S&&H&&(R=G);const ae=qd(R),F=Object.prototype.toString.apply(R);if(D&&R&&ae&&j.indexOf(F)<0&&!(ke(z)&&Array.isArray(R))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ie=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,R,{...s,ns:g}):`key '${f} (${this.language})' returned an object instead of string.`;return o?(v.res=ie,v.usedParams=this.getUsedParamsDetails(s),v):ie}if(c){const ie=Array.isArray(R),ne=ie?[]:{},W=ie?E:C;for(const B in R)if(Object.prototype.hasOwnProperty.call(R,B)){const te=`${W}${c}${B}`;H&&!S?ne[B]=this.translate(te,{...s,defaultValue:qd(G)?G[B]:void 0,joinArrays:!1,ns:g}):ne[B]=this.translate(te,{...s,joinArrays:!1,ns:g}),ne[B]===te&&(ne[B]=R[B])}S=ne}}else if(D&&ke(z)&&Array.isArray(S))S=S.join(z),S&&(S=this.extendTranslation(S,n,s,l));else{let ie=!1,ne=!1;!this.isValidLookup(S)&&H&&(ie=!0,S=G),this.isValidLookup(S)||(ne=!0,S=f);const B=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ne?void 0:S,te=H&&G!==S&&this.options.updateMissing;if(ne||ie||te){if(this.logger.log(te?"updateKey":"missingKey",y,h,f,te?G:S),c){const M=this.resolve(f,{...s,keySeparator:!1});M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ce=[];const we=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&we&&we[0])for(let M=0;M<we.length;M++)ce.push(we[M]);else this.options.saveMissingTo==="all"?ce=this.languageUtils.toResolveHierarchy(s.lng||this.language):ce.push(s.lng||this.language);const T=(M,V,A)=>{var me;const se=H&&A!==S?A:B;this.options.missingKeyHandler?this.options.missingKeyHandler(M,h,V,se,te,s):(me=this.backendConnector)!=null&&me.saveMissing&&this.backendConnector.saveMissing(M,h,V,se,te,s),this.emit("missingKey",M,h,V,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&Y?ce.forEach(M=>{const V=this.pluralResolver.getSuffixes(M,s);ee&&s[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(A=>{T([M],f+A,s[`defaultValue${A}`]||G)})}):T(ce,f,G))}S=this.extendTranslation(S,n,s,v,l),ne&&S===f&&this.options.appendNamespaceToMissingKey&&(S=`${h}${x}${f}`),(ne||ie)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${x}${f}`:f,ie?S:void 0,s))}return o?(v.res=S,v.usedParams=this.getUsedParamsDetails(s),v):S}extendTranslation(n,a,l,s,o){var g,h;if((g=this.i18nFormat)!=null&&g.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...l},l.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!l.skipInterpolation){l.interpolation&&this.interpolator.init({...l,interpolation:{...this.options.interpolation,...l.interpolation}});const x=ke(n)&&(((h=l==null?void 0:l.interpolation)==null?void 0:h.skipOnVariables)!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(x){const v=n.match(this.interpolator.nestingRegexp);y=v&&v.length}let b=l.replace&&!ke(l.replace)?l.replace:l;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),n=this.interpolator.interpolate(n,b,l.lng||this.language||s.usedLng,l),x){const v=n.match(this.interpolator.nestingRegexp),S=v&&v.length;y<S&&(l.nest=!1)}!l.lng&&s&&s.res&&(l.lng=this.language||s.usedLng),l.nest!==!1&&(n=this.interpolator.nest(n,(...v)=>(o==null?void 0:o[0])===v[0]&&!l.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${a[0]}`),null):this.translate(...v,a),l)),l.interpolation&&this.interpolator.reset()}const c=l.postProcess||this.options.postProcess,f=ke(c)?[c]:c;return n!=null&&(f!=null&&f.length)&&l.applyPostProcessor!==!1&&(n=pb.handle(f,n,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(l)},...l}:l,this)),n}resolve(n,a={}){let l,s,o,c,f;return ke(n)&&(n=[n]),n.forEach(g=>{if(this.isValidLookup(l))return;const h=this.extractFromKey(g,a),x=h.key;s=x;let y=h.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const b=a.count!==void 0&&!ke(a.count),v=b&&!a.ordinal&&a.count===0,S=a.context!==void 0&&(ke(a.context)||typeof a.context=="number")&&a.context!=="",C=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);y.forEach(E=>{var j,z;this.isValidLookup(l)||(f=E,!W0[`${C[0]}-${E}`]&&((j=this.utils)!=null&&j.hasLoadedNamespace)&&!((z=this.utils)!=null&&z.hasLoadedNamespace(f))&&(W0[`${C[0]}-${E}`]=!0,this.logger.warn(`key "${s}" for languages "${C.join(", ")}" won't get resolved as namespace "${f}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(D=>{var L;if(this.isValidLookup(l))return;c=D;const Y=[x];if((L=this.i18nFormat)!=null&&L.addLookupKeys)this.i18nFormat.addLookupKeys(Y,x,D,E,a);else{let P;b&&(P=this.pluralResolver.getSuffix(D,a.count,a));const ee=`${this.options.pluralSeparator}zero`,G=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(a.ordinal&&P.indexOf(G)===0&&Y.push(x+P.replace(G,this.options.pluralSeparator)),Y.push(x+P),v&&Y.push(x+ee)),S){const R=`${x}${this.options.contextSeparator||"_"}${a.context}`;Y.push(R),b&&(a.ordinal&&P.indexOf(G)===0&&Y.push(R+P.replace(G,this.options.pluralSeparator)),Y.push(R+P),v&&Y.push(R+ee))}}let H;for(;H=Y.pop();)this.isValidLookup(l)||(o=H,l=this.getResource(D,E,H,a))}))})}),{res:l,usedKey:s,exactUsedKey:o,usedLng:c,usedNS:f}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,a,l,s={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(n,a,l,s):this.resourceStore.getResource(n,a,l,s)}getUsedParamsDetails(n={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],l=n.replace&&!ke(n.replace);let s=l?n.replace:n;if(l&&typeof n.count<"u"&&(s.count=n.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!l){s={...s};for(const o of a)delete s[o]}return s}static hasDefaultValue(n){const a="defaultValue";for(const l in n)if(Object.prototype.hasOwnProperty.call(n,l)&&a===l.substring(0,a.length)&&n[l]!==void 0)return!0;return!1}}class ey{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=On.create("languageUtils")}getScriptPartFromCode(n){if(n=Di(n),!n||n.indexOf("-")<0)return null;const a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(n){if(n=Di(n),!n||n.indexOf("-")<0)return n;const a=n.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(n){if(ke(n)&&n.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(n)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let a;return n.forEach(l=>{if(a)return;const s=this.formatLanguageCode(l);(!this.options.supportedLngs||this.isSupportedCode(s))&&(a=s)}),!a&&this.options.supportedLngs&&n.forEach(l=>{if(a)return;const s=this.getScriptPartFromCode(l);if(this.isSupportedCode(s))return a=s;const o=this.getLanguagePartFromCode(l);if(this.isSupportedCode(o))return a=o;a=this.options.supportedLngs.find(c=>{if(c===o)return c;if(!(c.indexOf("-")<0&&o.indexOf("-")<0)&&(c.indexOf("-")>0&&o.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===o||c.indexOf(o)===0&&o.length>1))return c})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),ke(n)&&(n=[n]),Array.isArray(n))return n;if(!a)return n.default||[];let l=n[a];return l||(l=n[this.getScriptPartFromCode(a)]),l||(l=n[this.formatLanguageCode(a)]),l||(l=n[this.getLanguagePartFromCode(a)]),l||(l=n.default),l||[]}toResolveHierarchy(n,a){const l=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],n),s=[],o=c=>{c&&(this.isSupportedCode(c)?s.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return ke(n)&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(n))):ke(n)&&o(this.formatLanguageCode(n)),l.forEach(c=>{s.indexOf(c)<0&&o(this.formatLanguageCode(c))}),s}}const ty={zero:0,one:1,two:2,few:3,many:4,other:5},ny={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class E2{constructor(n,a={}){this.languageUtils=n,this.options=a,this.logger=On.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(n,a={}){const l=Di(n==="dev"?"en":n),s=a.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:l,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let c;try{c=new Intl.PluralRules(l,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),ny;if(!n.match(/-|_/))return ny;const g=this.languageUtils.getLanguagePartFromCode(n);c=this.getRule(g,a)}return this.pluralRulesCache[o]=c,c}needsPlural(n,a={}){let l=this.getRule(n,a);return l||(l=this.getRule("dev",a)),(l==null?void 0:l.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(n,a,l={}){return this.getSuffixes(n,l).map(s=>`${a}${s}`)}getSuffixes(n,a={}){let l=this.getRule(n,a);return l||(l=this.getRule("dev",a)),l?l.resolvedOptions().pluralCategories.sort((s,o)=>ty[s]-ty[o]).map(s=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(n,a,l={}){const s=this.getRule(n,l);return s?`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${s.select(a)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",a,l))}}const ay=(e,n,a,l=".",s=!0)=>{let o=x2(e,n,a);return!o&&s&&ke(a)&&(o=Nf(e,a,l),o===void 0&&(o=Nf(n,a,l))),o},Id=e=>e.replace(/\$/g,"$$$$");class ry{constructor(n={}){var a;this.logger=On.create("interpolator"),this.options=n,this.format=((a=n==null?void 0:n.interpolation)==null?void 0:a.format)||(l=>l),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:a,escapeValue:l,useRawValueToEscape:s,prefix:o,prefixEscaped:c,suffix:f,suffixEscaped:g,formatSeparator:h,unescapeSuffix:x,unescapePrefix:y,nestingPrefix:b,nestingPrefixEscaped:v,nestingSuffix:S,nestingSuffixEscaped:C,nestingOptionsSeparator:E,maxReplaces:j,alwaysFormat:z}=n.interpolation;this.escape=a!==void 0?a:v2,this.escapeValue=l!==void 0?l:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?lr(o):c||"{{",this.suffix=f?lr(f):g||"}}",this.formatSeparator=h||",",this.unescapePrefix=x?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":x||"",this.nestingPrefix=b?lr(b):v||lr("$t("),this.nestingSuffix=S?lr(S):C||lr(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=j||1e3,this.alwaysFormat=z!==void 0?z:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(a,l)=>(a==null?void 0:a.source)===l?(a.lastIndex=0,a):new RegExp(l,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(n,a,l,s){var v;let o,c,f;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=S=>{if(S.indexOf(this.formatSeparator)<0){const z=ay(a,g,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(z,void 0,l,{...s,...a,interpolationkey:S}):z}const C=S.split(this.formatSeparator),E=C.shift().trim(),j=C.join(this.formatSeparator).trim();return this.format(ay(a,g,E,this.options.keySeparator,this.options.ignoreJSONStructure),j,l,{...s,...a,interpolationkey:E})};this.resetRegExp();const x=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,y=((v=s==null?void 0:s.interpolation)==null?void 0:v.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>Id(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Id(this.escape(S)):Id(S)}].forEach(S=>{for(f=0;o=S.regex.exec(n);){const C=o[1].trim();if(c=h(C),c===void 0)if(typeof x=="function"){const j=x(n,o,s);c=ke(j)?j:""}else if(s&&Object.prototype.hasOwnProperty.call(s,C))c="";else if(y){c=o[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${n}`),c="";else!ke(c)&&!this.useRawValueToEscape&&(c=G0(c));const E=S.safeValue(c);if(n=n.replace(o[0],E),y?(S.regex.lastIndex+=c.length,S.regex.lastIndex-=o[0].length):S.regex.lastIndex=0,f++,f>=this.maxReplaces)break}}),n}nest(n,a,l={}){let s,o,c;const f=(g,h)=>{const x=this.nestingOptionsSeparator;if(g.indexOf(x)<0)return g;const y=g.split(new RegExp(`${lr(x)}[ ]*{`));let b=`{${y[1]}`;g=y[0],b=this.interpolate(b,c);const v=b.match(/'/g),S=b.match(/"/g);(((v==null?void 0:v.length)??0)%2===0&&!S||((S==null?void 0:S.length)??0)%2!==0)&&(b=b.replace(/'/g,'"'));try{c=JSON.parse(b),h&&(c={...h,...c})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,C),`${g}${x}${b}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,g};for(;s=this.nestingRegexp.exec(n);){let g=[];c={...l},c=c.replace&&!ke(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(h!==-1&&(g=s[1].slice(h).split(this.formatSeparator).map(x=>x.trim()).filter(Boolean),s[1]=s[1].slice(0,h)),o=a(f.call(this,s[1].trim(),c),c),o&&s[0]===n&&!ke(o))return o;ke(o)||(o=G0(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${n}`),o=""),g.length&&(o=g.reduce((x,y)=>this.format(x,y,l.lng,{...l,interpolationkey:s[1].trim()}),o.trim())),n=n.replace(s[0],o),this.regexp.lastIndex=0}return n}}const A2=e=>{let n=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const l=e.split("(");n=l[0].toLowerCase().trim();const s=l[1].substring(0,l[1].length-1);n==="currency"&&s.indexOf(":")<0?a.currency||(a.currency=s.trim()):n==="relativetime"&&s.indexOf(":")<0?a.range||(a.range=s.trim()):s.split(";").forEach(c=>{if(c){const[f,...g]=c.split(":"),h=g.join(":").trim().replace(/^'+|'+$/g,""),x=f.trim();a[x]||(a[x]=h),h==="false"&&(a[x]=!1),h==="true"&&(a[x]=!0),isNaN(h)||(a[x]=parseInt(h,10))}})}return{formatName:n,formatOptions:a}},ly=e=>{const n={};return(a,l,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const c=l+JSON.stringify(o);let f=n[c];return f||(f=e(Di(l),s),n[c]=f),f(a)}},T2=e=>(n,a,l)=>e(Di(a),l)(n);class _2{constructor(n={}){this.logger=On.create("formatter"),this.options=n,this.init(n)}init(n,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const l=a.cacheInBuiltFormats?ly:T2;this.formats={number:l((s,o)=>{const c=new Intl.NumberFormat(s,{...o});return f=>c.format(f)}),currency:l((s,o)=>{const c=new Intl.NumberFormat(s,{...o,style:"currency"});return f=>c.format(f)}),datetime:l((s,o)=>{const c=new Intl.DateTimeFormat(s,{...o});return f=>c.format(f)}),relativetime:l((s,o)=>{const c=new Intl.RelativeTimeFormat(s,{...o});return f=>c.format(f,o.range||"day")}),list:l((s,o)=>{const c=new Intl.ListFormat(s,{...o});return f=>c.format(f)})}}add(n,a){this.formats[n.toLowerCase().trim()]=a}addCached(n,a){this.formats[n.toLowerCase().trim()]=ly(a)}format(n,a,l,s={}){const o=a.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(f=>f.indexOf(")")>-1)){const f=o.findIndex(g=>g.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,f)].join(this.formatSeparator)}return o.reduce((f,g)=>{var y;const{formatName:h,formatOptions:x}=A2(g);if(this.formats[h]){let b=f;try{const v=((y=s==null?void 0:s.formatParams)==null?void 0:y[s.interpolationkey])||{},S=v.locale||v.lng||s.locale||s.lng||l;b=this.formats[h](f,S,{...x,...s,...v})}catch(v){this.logger.warn(v)}return b}else this.logger.warn(`there was no format function for ${h}`);return f},n)}}const D2=(e,n)=>{e.pending[n]!==void 0&&(delete e.pending[n],e.pendingCount--)};class M2 extends Zo{constructor(n,a,l,s={}){var o,c;super(),this.backend=n,this.store=a,this.services=l,this.languageUtils=l.languageUtils,this.options=s,this.logger=On.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(c=(o=this.backend)==null?void 0:o.init)==null||c.call(o,l,s.backend,s)}queueLoad(n,a,l,s){const o={},c={},f={},g={};return n.forEach(h=>{let x=!0;a.forEach(y=>{const b=`${h}|${y}`;!l.reload&&this.store.hasResourceBundle(h,y)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?c[b]===void 0&&(c[b]=!0):(this.state[b]=1,x=!1,c[b]===void 0&&(c[b]=!0),o[b]===void 0&&(o[b]=!0),g[y]===void 0&&(g[y]=!0)))}),x||(f[h]=!0)}),(Object.keys(o).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(g)}}loaded(n,a,l){const s=n.split("|"),o=s[0],c=s[1];a&&this.emit("failedLoading",o,c,a),!a&&l&&this.store.addResourceBundle(o,c,l,void 0,void 0,{skipCopy:!0}),this.state[n]=a?-1:2,a&&l&&(this.state[n]=0);const f={};this.queue.forEach(g=>{y2(g.loaded,[o],c),D2(g,n),a&&g.errors.push(a),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(h=>{f[h]||(f[h]={});const x=g.loaded[h];x.length&&x.forEach(y=>{f[h][y]===void 0&&(f[h][y]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(g=>!g.done)}read(n,a,l,s=0,o=this.retryTimeout,c){if(!n.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:a,fcName:l,tried:s,wait:o,callback:c});return}this.readingCalls++;const f=(h,x)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(h&&x&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,n,a,l,s+1,o*2,c)},o);return}c(h,x)},g=this.backend[l].bind(this.backend);if(g.length===2){try{const h=g(n,a);h&&typeof h.then=="function"?h.then(x=>f(null,x)).catch(f):f(null,h)}catch(h){f(h)}return}return g(n,a,f)}prepareLoading(n,a,l={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();ke(n)&&(n=this.languageUtils.toResolveHierarchy(n)),ke(a)&&(a=[a]);const o=this.queueLoad(n,a,l,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(c=>{this.loadOne(c)})}load(n,a,l){this.prepareLoading(n,a,{},l)}reload(n,a,l){this.prepareLoading(n,a,{reload:!0},l)}loadOne(n,a=""){const l=n.split("|"),s=l[0],o=l[1];this.read(s,o,"read",void 0,void 0,(c,f)=>{c&&this.logger.warn(`${a}loading namespace ${o} for language ${s} failed`,c),!c&&f&&this.logger.log(`${a}loaded namespace ${o} for language ${s}`,f),this.loaded(n,c,f)})}saveMissing(n,a,l,s,o,c={},f=()=>{}){var g,h,x,y,b;if((h=(g=this.services)==null?void 0:g.utils)!=null&&h.hasLoadedNamespace&&!((y=(x=this.services)==null?void 0:x.utils)!=null&&y.hasLoadedNamespace(a))){this.logger.warn(`did not save key "${l}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(l==null||l==="")){if((b=this.backend)!=null&&b.create){const v={...c,isUpdate:o},S=this.backend.create.bind(this.backend);if(S.length<6)try{let C;S.length===5?C=S(n,a,l,s,v):C=S(n,a,l,s),C&&typeof C.then=="function"?C.then(E=>f(null,E)).catch(f):f(null,C)}catch(C){f(C)}else S(n,a,l,s,f,v)}!n||!n[0]||this.store.addResource(n[0],a,l,s)}}}const $d=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let n={};if(typeof e[1]=="object"&&(n=e[1]),ke(e[1])&&(n.defaultValue=e[1]),ke(e[2])&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(l=>{n[l]=a[l]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),iy=e=>{var n,a;return ke(e.ns)&&(e.ns=[e.ns]),ke(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ke(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((a=(n=e.supportedLngs)==null?void 0:n.indexOf)==null?void 0:a.call(n,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},ko=()=>{},R2=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})},yb="__i18next_supportNoticeShown",O2=()=>typeof globalThis<"u"&&!!globalThis[yb],z2=()=>{typeof globalThis<"u"&&(globalThis[yb]=!0)},L2=e=>{var n,a,l,s,o,c,f,g,h,x,y,b,v;return!!(((l=(a=(n=e==null?void 0:e.modules)==null?void 0:n.backend)==null?void 0:a.name)==null?void 0:l.indexOf("Locize"))>0||((f=(c=(o=(s=e==null?void 0:e.modules)==null?void 0:s.backend)==null?void 0:o.constructor)==null?void 0:c.name)==null?void 0:f.indexOf("Locize"))>0||(h=(g=e==null?void 0:e.options)==null?void 0:g.backend)!=null&&h.backends&&e.options.backend.backends.some(S=>{var C,E,j;return((C=S==null?void 0:S.name)==null?void 0:C.indexOf("Locize"))>0||((j=(E=S==null?void 0:S.constructor)==null?void 0:E.name)==null?void 0:j.indexOf("Locize"))>0})||(y=(x=e==null?void 0:e.options)==null?void 0:x.backend)!=null&&y.projectId||(v=(b=e==null?void 0:e.options)==null?void 0:b.backend)!=null&&v.backendOptions&&e.options.backend.backendOptions.some(S=>S==null?void 0:S.projectId))};class Ci extends Zo{constructor(n={},a){if(super(),this.options=iy(n),this.services={},this.logger=On,this.modules={external:[]},R2(this),a&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,a),this;setTimeout(()=>{this.init(n,a)},0)}}init(n={},a){this.isInitializing=!0,typeof n=="function"&&(a=n,n={}),n.defaultNS==null&&n.ns&&(ke(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const l=$d();this.options={...l,...this.options,...iy(n)},this.options.interpolation={...l.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=l.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!L2(this)&&!O2()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),z2());const s=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?On.init(s(this.modules.logger),this.options):On.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=_2;const x=new ey(this.options);this.store=new J0(this.options.resources,this.options);const y=this.services;y.logger=On,y.resourceStore=this.store,y.languageUtils=x,y.pluralResolver=new E2(x,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==l.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),h&&(!this.options.interpolation.format||this.options.interpolation.format===l.interpolation.format)&&(y.formatter=s(h),y.formatter.init&&y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new ry(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new M2(s(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",(v,...S)=>{this.emit(v,...S)}),this.modules.languageDetector&&(y.languageDetector=s(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=s(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new Bo(this.services,this.options),this.translator.on("*",(v,...S)=>{this.emit(v,...S)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,a||(a=ko),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=(...x)=>this.store[h](...x)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=(...x)=>(this.store[h](...x),this)});const f=gi(),g=()=>{const h=(x,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(y),a(x,y)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),f}loadResources(n,a=ko){var o,c;let l=a;const s=ke(n)?n:this.language;if(typeof n=="function"&&(l=n),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return l();const f=[],g=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(y=>{y!=="cimode"&&f.indexOf(y)<0&&f.push(y)})};s?g(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(x=>g(x)),(c=(o=this.options.preload)==null?void 0:o.forEach)==null||c.call(o,h=>g(h)),this.services.backendConnector.load(f,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),l(h)})}else l(null)}reloadResources(n,a,l){const s=gi();return typeof n=="function"&&(l=n,n=void 0),typeof a=="function"&&(l=a,a=void 0),n||(n=this.languages),a||(a=this.options.ns),l||(l=ko),this.services.backendConnector.reload(n,a,o=>{s.resolve(),l(o)}),s}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&pb.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1)){for(let a=0;a<this.languages.length;a++){const l=this.languages[a];if(!(["cimode","dev"].indexOf(l)>-1)&&this.store.hasLanguageSomeTranslations(l)){this.resolvedLanguage=l;break}}!this.resolvedLanguage&&this.languages.indexOf(n)<0&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,a){this.isLanguageChangingTo=n;const l=gi();this.emit("languageChanging",n);const s=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},o=(f,g)=>{g?this.isLanguageChangingTo===n&&(s(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,l.resolve((...h)=>this.t(...h)),a&&a(f,(...h)=>this.t(...h))},c=f=>{var x,y;!n&&!f&&this.services.languageDetector&&(f=[]);const g=ke(f)?f:f&&f[0],h=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(ke(f)?[f]:f);h&&(this.language||s(h),this.translator.language||this.translator.changeLanguage(h),(y=(x=this.services.languageDetector)==null?void 0:x.cacheUserLanguage)==null||y.call(x,h)),this.loadResources(h,b=>{o(b,h)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n),l}getFixedT(n,a,l){const s=(o,c,...f)=>{let g;typeof c!="object"?g=this.options.overloadTranslationOptionHandler([o,c].concat(f)):g={...c},g.lng=g.lng||s.lng,g.lngs=g.lngs||s.lngs,g.ns=g.ns||s.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||l||s.keyPrefix);const h=this.options.keySeparator||".";let x;return g.keyPrefix&&Array.isArray(o)?x=o.map(y=>(typeof y=="function"&&(y=Ef(y,{...this.options,...c})),`${g.keyPrefix}${h}${y}`)):(typeof o=="function"&&(o=Ef(o,{...this.options,...c})),x=g.keyPrefix?`${g.keyPrefix}${h}${o}`:o),this.t(x,g)};return ke(n)?s.lng=n:s.lngs=n,s.ns=a,s.keyPrefix=l,s}t(...n){var a;return(a=this.translator)==null?void 0:a.translate(...n)}exists(...n){var a;return(a=this.translator)==null?void 0:a.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,a={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const l=a.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(l.toLowerCase()==="cimode")return!0;const c=(f,g)=>{const h=this.services.backendConnector.state[`${f}|${g}`];return h===-1||h===0||h===2};if(a.precheck){const f=a.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(l,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(l,n)&&(!s||c(o,n)))}loadNamespaces(n,a){const l=gi();return this.options.ns?(ke(n)&&(n=[n]),n.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{l.resolve(),a&&a(s)}),l):(a&&a(),Promise.resolve())}loadLanguages(n,a){const l=gi();ke(n)&&(n=[n]);const s=this.options.preload||[],o=n.filter(c=>s.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return o.length?(this.options.preload=s.concat(o),this.loadResources(c=>{l.resolve(),a&&a(c)}),l):(a&&a(),Promise.resolve())}dir(n){var s,o;if(n||(n=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!n)return"rtl";try{const c=new Intl.Locale(n);if(c&&c.getTextInfo){const f=c.getTextInfo();if(f&&f.direction)return f.direction}}catch{}const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],l=((o=this.services)==null?void 0:o.languageUtils)||new ey($d());return n.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(l.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},a){const l=new Ci(n,a);return l.createInstance=Ci.createInstance,l}cloneInstance(n={},a=ko){const l=n.forkResourceStore;l&&delete n.forkResourceStore;const s={...this.options,...n,isClone:!0},o=new Ci(s);if((n.debug!==void 0||n.prefix!==void 0)&&(o.logger=o.logger.clone(n)),["store","services","language"].forEach(f=>{o[f]=this[f]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},l){const f=Object.keys(this.store.data).reduce((g,h)=>(g[h]={...this.store.data[h]},g[h]=Object.keys(g[h]).reduce((x,y)=>(x[y]={...g[h][y]},x),g[h]),g),{});o.store=new J0(f,s),o.services.resourceStore=o.store}if(n.interpolation){const g={...$d().interpolation,...this.options.interpolation,...n.interpolation},h={...s,interpolation:g};o.services.interpolator=new ry(h)}return o.translator=new Bo(o.services,s),o.translator.on("*",(f,...g)=>{o.emit(f,...g)}),o.init(s,a),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ze=Ci.createInstance();ze.createInstance;ze.dir;ze.init;ze.loadResources;ze.reloadResources;ze.use;ze.changeLanguage;ze.getFixedT;ze.t;ze.exists;ze.setDefaultNamespace;ze.hasLoadedNamespace;ze.loadNamespaces;ze.loadLanguages;const U2=(e,n,a,l)=>{var o,c,f,g;const s=[a,{code:n,...l||{}}];if((c=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&c.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);or(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(g=(f=e==null?void 0:e.services)==null?void 0:f.logger)!=null&&g.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},sy={},xb=(e,n,a,l)=>{or(a)&&sy[a]||(or(a)&&(sy[a]=new Date),U2(e,n,a,l))},bb=(e,n)=>()=>{if(e.isInitialized)n();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),n()};e.on("initialized",a)}},Af=(e,n,a)=>{e.loadNamespaces(n,bb(e,a))},oy=(e,n,a,l)=>{if(or(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(n)>-1)return Af(e,a,l);a.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(n,bb(e,l))},H2=(e,n,a={})=>!n.languages||!n.languages.length?(xb(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(e,{lng:a.lng,precheck:(l,s)=>{if(a.bindI18n&&a.bindI18n.indexOf("languageChanging")>-1&&l.services.backendConnector.backend&&l.isLanguageChangingTo&&!s(l.isLanguageChangingTo,e))return!1}}),or=e=>typeof e=="string",B2=e=>typeof e=="object"&&e!==null,q2=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,I2={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},$2=e=>I2[e],F2=e=>e.replace(q2,$2);let Tf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:F2,transDefaultProps:void 0};const K2=(e={})=>{Tf={...Tf,...e}},P2=()=>Tf;let vb;const V2=e=>{vb=e},Y2=()=>vb,G2={type:"3rdParty",init(e){K2(e.options.react),V2(e)}},Q2=N.createContext();class X2{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Fd={exports:{}},Kd={};/**
|
|
61
|
+
Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let x=Cn(),y;if(n){let j=typeof n=="string"?dr(n):n;at(g==="/"||((E=j.pathname)==null?void 0:E.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${j.pathname}" was given in the \`location\` prop.`),y=j}else y=x;let b=y.pathname||"/",v=b;if(g!=="/"){let j=g.replace(/^\//,"").split("/");v="/"+b.replace(/^\//,"").split("/").slice(j.length).join("/")}let S=Xx(e,{pathname:v});xn(h||S!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),xn(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let N=Nw(S&&S.map(j=>Object.assign({},j,{params:Object.assign({},c,j.params),pathname:zn([g,l.encodeLocation?l.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?g:zn([g,l.encodeLocation?l.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),s,a);return n&&N?C.createElement(Ki.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},N):N}function kw(){let e=_w(),n=iw(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,l="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:l},o={padding:"2px 4px",backgroundColor:l},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:o},"ErrorBoundary")," or"," ",C.createElement("code",{style:o},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},n),a?C.createElement("pre",{style:s},a):null,c)}var Sw=C.createElement(kw,null),sb=class extends C.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):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 a=pw(e.digest);a&&(e=a)}let n=e!==void 0?C.createElement(Nn.Provider,{value:this.props.routeContext},C.createElement(Wf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?C.createElement(ww,{error:e},n):n}};sb.contextType=uw;var qd=new WeakMap;function ww({children:e,error:n}){let{basename:a}=C.useContext(an);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let l=gw(n.digest);if(l){let s=qd.get(n);if(s)throw s;let o=eb(l.location,a);if(Wx&&!qd.get(n))if(o.isExternal||l.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:l.replace}));throw qd.set(n,c),c}return C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function jw({routeContext:e,match:n,children:a}){let l=C.useContext(gl);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(Nn.Provider,{value:e},a)}function Nw(e,n=[],a){let l=a==null?void 0:a.state;if(e==null){if(!l)return null;if(l.errors)e=l.matches;else if(n.length===0&&!l.initialized&&l.matches.length>0)e=l.matches;else return null}let s=e,o=l==null?void 0:l.errors;if(o!=null){let x=s.findIndex(y=>y.route.id&&(o==null?void 0:o[y.route.id])!==void 0);at(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,x+1))}let c=!1,f=-1;if(a&&l){c=l.renderFallback;for(let x=0;x<s.length;x++){let y=s[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(f=x),y.route.id){let{loaderData:b,errors:v}=l,S=y.route.loader&&!b.hasOwnProperty(y.route.id)&&(!v||v[y.route.id]===void 0);if(y.route.lazy||S){a.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let g=a==null?void 0:a.onError,h=l&&g?(x,y)=>{var b,v;g(x,{location:l.location,params:((v=(b=l.matches)==null?void 0:b[0])==null?void 0:v.params)??{},unstable_pattern:sw(l.matches),errorInfo:y})}:void 0;return s.reduceRight((x,y,b)=>{let v,S=!1,N=null,E=null;l&&(v=o&&y.route.id?o[y.route.id]:void 0,N=y.route.errorElement||Sw,c&&(f<0&&b===0?(ob("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,E=null):f===b&&(S=!0,E=y.route.hydrateFallbackElement||null)));let j=n.concat(s.slice(0,b+1)),z=()=>{let T;return v?T=N:S?T=E:y.route.Component?T=C.createElement(y.route.Component,null):y.route.element?T=y.route.element:T=x,C.createElement(jw,{match:y,routeContext:{outlet:x,matches:j,isDataRoute:l!=null},children:T})};return l&&(y.route.ErrorBoundary||y.route.errorElement||b===0)?C.createElement(sb,{location:l.location,revalidation:l.revalidation,component:N,error:v,children:z(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:h}):z()},null)}function eh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cw(e){let n=C.useContext(gl);return at(n,eh(e)),n}function Ew(e){let n=C.useContext(Zo);return at(n,eh(e)),n}function Aw(e){let n=C.useContext(Nn);return at(n,eh(e)),n}function th(e){let n=Aw(e),a=n.matches[n.matches.length-1];return at(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function Tw(){return th("useRouteId")}function _w(){var l;let e=C.useContext(Wf),n=Ew("useRouteError"),a=th("useRouteError");return e!==void 0?e:(l=n.errors)==null?void 0:l[a]}function Mw(){let{router:e}=Cw("useNavigate"),n=th("useNavigate"),a=C.useRef(!1);return lb(()=>{a.current=!0}),C.useCallback(async(s,o={})=>{xn(a.current,rb),a.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:n,...o}))},[e,n])}var Y0={};function ob(e,n,a){!n&&!Y0[e]&&(Y0[e]=!0,xn(!1,a))}C.memo(Dw);function Dw({routes:e,future:n,state:a,isStatic:l,onError:s}){return ib(e,void 0,{state:a,isStatic:l,onError:s})}function Rw({to:e,replace:n,state:a,relative:l}){at(pl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=C.useContext(an);xn(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=C.useContext(Nn),{pathname:c}=Cn(),f=Pi(),g=Xo(e,Jf(o),c,l==="path"),h=JSON.stringify(g);return C.useEffect(()=>{f(JSON.parse(h),{replace:n,state:a,relative:l})},[f,h,l,n,a]),null}function ub(e){return bw(e.context)}function wn(e){at(!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 Ow({basename:e="/",children:n=null,location:a,navigationType:l="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){at(!pl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),g=C.useMemo(()=>({basename:f,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[f,s,o,c]);typeof a=="string"&&(a=dr(a));let{pathname:h="/",search:x="",hash:y="",state:b=null,key:v="default",unstable_mask:S}=a,N=C.useMemo(()=>{let E=la(h,f);return E==null?null:{location:{pathname:E,search:x,hash:y,state:b,key:v,unstable_mask:S},navigationType:l}},[f,h,x,y,b,v,l,S]);return xn(N!=null,`<Router basename="${f}"> is not able to match the URL "${h}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:C.createElement(an.Provider,{value:g},C.createElement(Ki.Provider,{children:n,value:N}))}function zw({children:e,location:n}){return vw(Ef(e),n)}function Ef(e,n=[]){let a=[];return C.Children.forEach(e,(l,s)=>{if(!C.isValidElement(l))return;let o=[...n,s];if(l.type===C.Fragment){a.push.apply(a,Ef(l.props.children,o));return}at(l.type===wn,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),at(!l.props.index||!l.props.children,"An index route cannot have child routes.");let c={id:l.props.id||o.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(c.children=Ef(l.props.children,o)),a.push(c)}),a}var Do="get",Ro="application/x-www-form-urlencoded";function Jo(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Lw(e){return Jo(e)&&e.tagName.toLowerCase()==="button"}function Uw(e){return Jo(e)&&e.tagName.toLowerCase()==="form"}function Hw(e){return Jo(e)&&e.tagName.toLowerCase()==="input"}function Bw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qw(e,n){return e.button===0&&(!n||n==="_self")&&!Bw(e)}var vo=null;function Iw(){if(vo===null)try{new FormData(document.createElement("form"),0),vo=!1}catch{vo=!0}return vo}var $w=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Id(e){return e!=null&&!$w.has(e)?(xn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ro}"`),null):e}function Fw(e,n){let a,l,s,o,c;if(Uw(e)){let f=e.getAttribute("action");l=f?la(f,n):null,a=e.getAttribute("method")||Do,s=Id(e.getAttribute("enctype"))||Ro,o=new FormData(e)}else if(Lw(e)||Hw(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=e.getAttribute("formaction")||f.getAttribute("action");if(l=g?la(g,n):null,a=e.getAttribute("formmethod")||f.getAttribute("method")||Do,s=Id(e.getAttribute("formenctype"))||Id(f.getAttribute("enctype"))||Ro,o=new FormData(f,e),!Iw()){let{name:h,type:x,value:y}=e;if(x==="image"){let b=h?`${h}.`:"";o.append(`${b}x`,"0"),o.append(`${b}y`,"0")}else h&&o.append(h,y)}}else{if(Jo(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Do,l=null,s=Ro,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:l,method:a.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nh(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Kw(e,n,a,l){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${l}`:s.pathname=`${s.pathname}.${l}`:s.pathname==="/"?s.pathname=`_root.${l}`:n&&la(s.pathname,n)==="/"?s.pathname=`${n.replace(/\/$/,"")}/_root.${l}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${l}`,s}async function Pw(e,n){if(e.id in n)return n[e.id];try{let a=await import(e.module);return n[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Vw(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 Yw(e,n,a){let l=await Promise.all(e.map(async s=>{let o=n.routes[s.route.id];if(o){let c=await Pw(o,a);return c.links?c.links():[]}return[]}));return Zw(l.flat(1).filter(Vw).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function G0(e,n,a,l,s,o){let c=(g,h)=>a[h]?g.route.id!==a[h].route.id:!0,f=(g,h)=>{var x;return a[h].pathname!==g.pathname||((x=a[h].route.path)==null?void 0:x.endsWith("*"))&&a[h].params["*"]!==g.params["*"]};return o==="assets"?n.filter((g,h)=>c(g,h)||f(g,h)):o==="data"?n.filter((g,h)=>{var y;let x=l.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(c(g,h)||f(g,h))return!0;if(g.route.shouldRevalidate){let b=g.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((y=a[0])==null?void 0:y.params)||{},nextUrl:new URL(e,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function Gw(e,n,{includeHydrateFallback:a}={}){return Qw(e.map(l=>{let s=n.routes[l.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function Qw(e){return[...new Set(e)]}function Xw(e){let n={},a=Object.keys(e).sort();for(let l of a)n[l]=e[l];return n}function Zw(e,n){let a=new Set;return new Set(n),e.reduce((l,s)=>{let o=JSON.stringify(Xw(s));return a.has(o)||(a.add(o),l.push({key:o,link:s})),l},[])}function cb(){let e=C.useContext(gl);return nh(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Jw(){let e=C.useContext(Zo);return nh(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ah=C.createContext(void 0);ah.displayName="FrameworkContext";function db(){let e=C.useContext(ah);return nh(e,"You must render this element inside a <HydratedRouter> element"),e}function Ww(e,n){let a=C.useContext(ah),[l,s]=C.useState(!1),[o,c]=C.useState(!1),{onFocus:f,onBlur:g,onMouseEnter:h,onMouseLeave:x,onTouchStart:y}=n,b=C.useRef(null);C.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let N=j=>{j.forEach(z=>{c(z.isIntersecting)})},E=new IntersectionObserver(N,{threshold:.5});return b.current&&E.observe(b.current),()=>{E.disconnect()}}},[e]),C.useEffect(()=>{if(l){let N=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(N)}}},[l]);let v=()=>{s(!0)},S=()=>{s(!1),c(!1)};return a?e!=="intent"?[o,b,{}]:[o,b,{onFocus:hi(f,v),onBlur:hi(g,S),onMouseEnter:hi(h,v),onMouseLeave:hi(x,S),onTouchStart:hi(y,v)}]:[!1,b,{}]}function hi(e,n){return a=>{e&&e(a),a.defaultPrevented||n(a)}}function e2({page:e,...n}){let{router:a}=cb(),l=C.useMemo(()=>Xx(a.routes,e,a.basename),[a.routes,e,a.basename]);return l?C.createElement(n2,{page:e,matches:l,...n}):null}function t2(e){let{manifest:n,routeModules:a}=db(),[l,s]=C.useState([]);return C.useEffect(()=>{let o=!1;return Yw(e,n,a).then(c=>{o||s(c)}),()=>{o=!0}},[e,n,a]),l}function n2({page:e,matches:n,...a}){let l=Cn(),{future:s,manifest:o,routeModules:c}=db(),{basename:f}=cb(),{loaderData:g,matches:h}=Jw(),x=C.useMemo(()=>G0(e,n,h,o,l,"data"),[e,n,h,o,l]),y=C.useMemo(()=>G0(e,n,h,o,l,"assets"),[e,n,h,o,l]),b=C.useMemo(()=>{if(e===l.pathname+l.search+l.hash)return[];let N=new Set,E=!1;if(n.forEach(z=>{var P;let T=o.routes[z.route.id];!T||!T.hasLoader||(!x.some(H=>H.route.id===z.route.id)&&z.route.id in g&&((P=c[z.route.id])!=null&&P.shouldRevalidate)||T.hasClientLoader?E=!0:N.add(z.route.id))}),N.size===0)return[];let j=Kw(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return E&&N.size>0&&j.searchParams.set("_routes",n.filter(z=>N.has(z.route.id)).map(z=>z.route.id).join(",")),[j.pathname+j.search]},[f,s.unstable_trailingSlashAwareDataRequests,g,l,o,x,n,e,c]),v=C.useMemo(()=>Gw(y,o),[y,o]),S=t2(y);return C.createElement(C.Fragment,null,b.map(N=>C.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...a})),v.map(N=>C.createElement("link",{key:N,rel:"modulepreload",href:N,...a})),S.map(({key:N,link:E})=>C.createElement("link",{key:N,nonce:a.nonce,...E,crossOrigin:E.crossOrigin??a.crossOrigin})))}function a2(...e){return n=>{e.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var r2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{r2&&(window.__reactRouterVersion="7.13.1")}catch{}function l2({basename:e,children:n,unstable_useTransitions:a,window:l}){let s=C.useRef();s.current==null&&(s.current=LS({window:l,v5Compat:!0}));let o=s.current,[c,f]=C.useState({action:o.action,location:o.location}),g=C.useCallback(h=>{a===!1?f(h):C.startTransition(()=>f(h))},[a]);return C.useLayoutEffect(()=>o.listen(g),[o,g]),C.createElement(Ow,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:a})}var fb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hb=C.forwardRef(function({onClick:n,discover:a="render",prefetch:l="none",relative:s,reloadDocument:o,replace:c,unstable_mask:f,state:g,target:h,to:x,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:v,...S},N){let{basename:E,navigator:j,unstable_useTransitions:z}=C.useContext(an),T=typeof x=="string"&&fb.test(x),P=eb(x,E);x=P.to;let H=mw(x,{relative:s}),L=Cn(),V=null;if(f){let W=Xo(f,[],L.unstable_mask?L.unstable_mask.pathname:"/",!0);E!=="/"&&(W.pathname=W.pathname==="/"?E:zn([E,W.pathname])),V=j.createHref(W)}let[ee,G,R]=Ww(l,S),ae=u2(x,{replace:c,unstable_mask:f,state:g,target:h,preventScrollReset:y,relative:s,viewTransition:b,unstable_defaultShouldRevalidate:v,unstable_useTransitions:z});function F(W){n&&n(W),W.defaultPrevented||ae(W)}let ie=!(P.isExternal||o),ne=C.createElement("a",{...S,...R,href:(ie?V:void 0)||P.absoluteURL||H,onClick:ie?F:n,ref:a2(N,G),target:h,"data-discover":!T&&a==="render"?"true":void 0});return ee&&!T?C.createElement(C.Fragment,null,ne,C.createElement(e2,{page:H})):ne});hb.displayName="Link";var i2=C.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:l="",end:s=!1,style:o,to:c,viewTransition:f,children:g,...h},x){let y=Vi(c,{relative:h.relative}),b=Cn(),v=C.useContext(Zo),{navigator:S,basename:N}=C.useContext(an),E=v!=null&&g2(y)&&f===!0,j=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,z=b.pathname,T=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;a||(z=z.toLowerCase(),T=T?T.toLowerCase():null,j=j.toLowerCase()),T&&N&&(T=la(T,N)||T);const P=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let H=z===j||!s&&z.startsWith(j)&&z.charAt(P)==="/",L=T!=null&&(T===j||!s&&T.startsWith(j)&&T.charAt(j.length)==="/"),V={isActive:H,isPending:L,isTransitioning:E},ee=H?n:void 0,G;typeof l=="function"?G=l(V):G=[l,H?"active":null,L?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let R=typeof o=="function"?o(V):o;return C.createElement(hb,{...h,"aria-current":ee,className:G,ref:x,style:R,to:c,viewTransition:f},typeof g=="function"?g(V):g)});i2.displayName="NavLink";var s2=C.forwardRef(({discover:e="render",fetcherKey:n,navigate:a,reloadDocument:l,replace:s,state:o,method:c=Do,action:f,onSubmit:g,relative:h,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:b,...v},S)=>{let{unstable_useTransitions:N}=C.useContext(an),E=f2(),j=h2(f,{relative:h}),z=c.toLowerCase()==="get"?"get":"post",T=typeof f=="string"&&fb.test(f),P=H=>{if(g&&g(H),H.defaultPrevented)return;H.preventDefault();let L=H.nativeEvent.submitter,V=(L==null?void 0:L.getAttribute("formmethod"))||c,ee=()=>E(L||H.currentTarget,{fetcherKey:n,method:V,navigate:a,replace:s,state:o,relative:h,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:b});N&&a!==!1?C.startTransition(()=>ee()):ee()};return C.createElement("form",{ref:S,method:z,action:j,onSubmit:l?g:P,...v,"data-discover":!T&&e==="render"?"true":void 0})});s2.displayName="Form";function o2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gb(e){let n=C.useContext(gl);return at(n,o2(e)),n}function u2(e,{target:n,replace:a,unstable_mask:l,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:g,unstable_useTransitions:h}={}){let x=Pi(),y=Cn(),b=Vi(e,{relative:c});return C.useCallback(v=>{if(qw(v,n)){v.preventDefault();let S=a!==void 0?a:_i(y)===_i(b),N=()=>x(e,{replace:S,unstable_mask:l,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:g});h?C.startTransition(()=>N()):N()}},[y,x,b,a,l,s,n,e,o,c,f,g,h])}var c2=0,d2=()=>`__${String(++c2)}__`;function f2(){let{router:e}=gb("useSubmit"),{basename:n}=C.useContext(an),a=Tw(),l=e.fetch,s=e.navigate;return C.useCallback(async(o,c={})=>{let{action:f,method:g,encType:h,formData:x,body:y}=Fw(o,n);if(c.navigate===!1){let b=c.fetcherKey||d2();await l(b,a,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||g,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||g,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[l,s,n,a])}function h2(e,{relative:n}={}){let{basename:a}=C.useContext(an),l=C.useContext(Nn);at(l,"useFormAction must be used inside a RouteContext");let[s]=l.matches.slice(-1),o={...Vi(e||".",{relative:n})},c=Cn();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),g=f.getAll("index");if(g.some(x=>x==="")){f.delete("index"),g.filter(y=>y).forEach(y=>f.append("index",y));let x=f.toString();o.search=x?`?${x}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(o.pathname=o.pathname==="/"?a:zn([a,o.pathname])),_i(o)}function g2(e,{relative:n}={}){let a=C.useContext(nb);at(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=gb("useViewTransitionState"),s=Vi(e,{relative:n});if(!a.isTransitioning)return!1;let o=la(a.currentLocation.pathname,l)||a.currentLocation.pathname,c=la(a.nextLocation.pathname,l)||a.nextLocation.pathname;return Lo(s.pathname,c)!=null||Lo(s.pathname,o)!=null}const ke=e=>typeof e=="string",gi=()=>{let e,n;const a=new Promise((l,s)=>{e=l,n=s});return a.resolve=e,a.reject=n,a},Q0=e=>e==null?"":""+e,p2=(e,n,a)=>{e.forEach(l=>{n[l]&&(a[l]=n[l])})},m2=/###/g,X0=e=>e&&e.indexOf("###")>-1?e.replace(m2,"."):e,Z0=e=>!e||ke(e),ji=(e,n,a)=>{const l=ke(n)?n.split("."):n;let s=0;for(;s<l.length-1;){if(Z0(e))return{};const o=X0(l[s]);!e[o]&&a&&(e[o]=new a),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return Z0(e)?{}:{obj:e,k:X0(l[s])}},J0=(e,n,a)=>{const{obj:l,k:s}=ji(e,n,Object);if(l!==void 0||n.length===1){l[s]=a;return}let o=n[n.length-1],c=n.slice(0,n.length-1),f=ji(e,c,Object);for(;f.obj===void 0&&c.length;)o=`${c[c.length-1]}.${o}`,c=c.slice(0,c.length-1),f=ji(e,c,Object),f!=null&&f.obj&&typeof f.obj[`${f.k}.${o}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${o}`]=a},y2=(e,n,a,l)=>{const{obj:s,k:o}=ji(e,n,Object);s[o]=s[o]||[],s[o].push(a)},Uo=(e,n)=>{const{obj:a,k:l}=ji(e,n);if(a&&Object.prototype.hasOwnProperty.call(a,l))return a[l]},x2=(e,n,a)=>{const l=Uo(e,a);return l!==void 0?l:Uo(n,a)},pb=(e,n,a)=>{for(const l in n)l!=="__proto__"&&l!=="constructor"&&(l in e?ke(e[l])||e[l]instanceof String||ke(n[l])||n[l]instanceof String?a&&(e[l]=n[l]):pb(e[l],n[l],a):e[l]=n[l]);return e},lr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var b2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const v2=e=>ke(e)?e.replace(/[&<>"'\/]/g,n=>b2[n]):e;class k2{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const a=this.regExpMap.get(n);if(a!==void 0)return a;const l=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,l),this.regExpQueue.push(n),l}}const S2=[" ",",","?","!",";"],w2=new k2(20),j2=(e,n,a)=>{n=n||"",a=a||"";const l=S2.filter(c=>n.indexOf(c)<0&&a.indexOf(c)<0);if(l.length===0)return!0;const s=w2.getRegExp(`(${l.map(c=>c==="?"?"\\?":c).join("|")})`);let o=!s.test(e);if(!o){const c=e.indexOf(a);c>0&&!s.test(e.substring(0,c))&&(o=!0)}return o},Af=(e,n,a=".")=>{if(!e)return;if(e[n])return Object.prototype.hasOwnProperty.call(e,n)?e[n]:void 0;const l=n.split(a);let s=e;for(let o=0;o<l.length;){if(!s||typeof s!="object")return;let c,f="";for(let g=o;g<l.length;++g)if(g!==o&&(f+=a),f+=l[g],c=s[f],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&g<l.length-1)continue;o+=g-o+1;break}s=c}return s},Mi=e=>e==null?void 0:e.replace("_","-"),N2={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){var a,l;(l=(a=console==null?void 0:console[e])==null?void 0:a.apply)==null||l.call(a,console,n)}};class Ho{constructor(n,a={}){this.init(n,a)}init(n,a={}){this.prefix=a.prefix||"i18next:",this.logger=n||N2,this.options=a,this.debug=a.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,a,l,s){return s&&!this.debug?null:(ke(n[0])&&(n[0]=`${l}${this.prefix} ${n[0]}`),this.logger[a](n))}create(n){return new Ho(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Ho(this.logger,n)}}var On=new Ho;class Wo{constructor(){this.observers={}}on(n,a){return n.split(" ").forEach(l=>{this.observers[l]||(this.observers[l]=new Map);const s=this.observers[l].get(a)||0;this.observers[l].set(a,s+1)}),this}off(n,a){if(this.observers[n]){if(!a){delete this.observers[n];return}this.observers[n].delete(a)}}emit(n,...a){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([s,o])=>{for(let c=0;c<o;c++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,o])=>{for(let c=0;c<o;c++)s.apply(s,[n,...a])})}}class W0 extends Wo{constructor(n,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const a=this.options.ns.indexOf(n);a>-1&&this.options.ns.splice(a,1)}getResource(n,a,l,s={}){var h,x;const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;n.indexOf(".")>-1?f=n.split("."):(f=[n,a],l&&(Array.isArray(l)?f.push(...l):ke(l)&&o?f.push(...l.split(o)):f.push(l)));const g=Uo(this.data,f);return!g&&!a&&!l&&n.indexOf(".")>-1&&(n=f[0],a=f[1],l=f.slice(2).join(".")),g||!c||!ke(l)?g:Af((x=(h=this.data)==null?void 0:h[n])==null?void 0:x[a],l,o)}addResource(n,a,l,s,o={silent:!1}){const c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let f=[n,a];l&&(f=f.concat(c?l.split(c):l)),n.indexOf(".")>-1&&(f=n.split("."),s=a,a=f[1]),this.addNamespaces(a),J0(this.data,f,s),o.silent||this.emit("added",n,a,l,s)}addResources(n,a,l,s={silent:!1}){for(const o in l)(ke(l[o])||Array.isArray(l[o]))&&this.addResource(n,a,o,l[o],{silent:!0});s.silent||this.emit("added",n,a,l)}addResourceBundle(n,a,l,s,o,c={silent:!1,skipCopy:!1}){let f=[n,a];n.indexOf(".")>-1&&(f=n.split("."),s=l,l=a,a=f[1]),this.addNamespaces(a);let g=Uo(this.data,f)||{};c.skipCopy||(l=JSON.parse(JSON.stringify(l))),s?pb(g,l,o):g={...g,...l},J0(this.data,f,g),c.silent||this.emit("added",n,a,l)}removeResourceBundle(n,a){this.hasResourceBundle(n,a)&&delete this.data[n][a],this.removeNamespaces(a),this.emit("removed",n,a)}hasResourceBundle(n,a){return this.getResource(n,a)!==void 0}getResourceBundle(n,a){return a||(a=this.options.defaultNS),this.getResource(n,a)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const a=this.getDataByLanguage(n);return!!(a&&Object.keys(a)||[]).find(s=>a[s]&&Object.keys(a[s]).length>0)}toJSON(){return this.data}}var mb={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,a,l,s){return e.forEach(o=>{var c;n=((c=this.processors[o])==null?void 0:c.process(n,a,l,s))??n}),n}};const yb=Symbol("i18next/PATH_KEY");function C2(){const e=[],n=Object.create(null);let a;return n.get=(l,s)=>{var o;return(o=a==null?void 0:a.revoke)==null||o.call(a),s===yb?e:(e.push(s),a=Proxy.revocable(l,n),a.proxy)},Proxy.revocable(Object.create(null),n).proxy}function Tf(e,n){const{[yb]:a}=e(C2());return a.join((n==null?void 0:n.keySeparator)??".")}const ey={},$d=e=>!ke(e)&&typeof e!="boolean"&&typeof e!="number";class Bo extends Wo{constructor(n,a={}){super(),p2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=On.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n,a={interpolation:{}}){const l={...a};if(n==null)return!1;const s=this.resolve(n,l);if((s==null?void 0:s.res)===void 0)return!1;const o=$d(s.res);return!(l.returnObjects===!1&&o)}extractFromKey(n,a){let l=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=a.ns||this.options.defaultNS||[];const c=l&&n.indexOf(l)>-1,f=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!j2(n,l,s);if(c&&!f){const g=n.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:n,namespaces:ke(o)?[o]:o};const h=n.split(l);(l!==s||l===s&&this.options.ns.indexOf(h[0])>-1)&&(o=h.shift()),n=h.join(s)}return{key:n,namespaces:ke(o)?[o]:o}}translate(n,a,l){let s=typeof a=="object"?{...a}:a;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),n==null)return"";typeof n=="function"&&(n=Tf(n,{...this.options,...s})),Array.isArray(n)||(n=[String(n)]);const o=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:f,namespaces:g}=this.extractFromKey(n[n.length-1],s),h=g[g.length-1];let x=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;x===void 0&&(x=":");const y=s.lng||this.language,b=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((y==null?void 0:y.toLowerCase())==="cimode")return b?o?{res:`${h}${x}${f}`,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${x}${f}`:o?{res:f,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:f;const v=this.resolve(n,s);let S=v==null?void 0:v.res;const N=(v==null?void 0:v.usedKey)||f,E=(v==null?void 0:v.exactUsedKey)||f,j=["[object Number]","[object Function]","[object RegExp]"],z=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,P=s.count!==void 0&&!ke(s.count),H=Bo.hasDefaultValue(s),L=P?this.pluralResolver.getSuffix(y,s.count,s):"",V=s.ordinal&&P?this.pluralResolver.getSuffix(y,s.count,{ordinal:!1}):"",ee=P&&!s.ordinal&&s.count===0,G=ee&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${L}`]||s[`defaultValue${V}`]||s.defaultValue;let R=S;T&&!S&&H&&(R=G);const ae=$d(R),F=Object.prototype.toString.apply(R);if(T&&R&&ae&&j.indexOf(F)<0&&!(ke(z)&&Array.isArray(R))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ie=this.options.returnedObjectHandler?this.options.returnedObjectHandler(N,R,{...s,ns:g}):`key '${f} (${this.language})' returned an object instead of string.`;return o?(v.res=ie,v.usedParams=this.getUsedParamsDetails(s),v):ie}if(c){const ie=Array.isArray(R),ne=ie?[]:{},W=ie?E:N;for(const B in R)if(Object.prototype.hasOwnProperty.call(R,B)){const te=`${W}${c}${B}`;H&&!S?ne[B]=this.translate(te,{...s,defaultValue:$d(G)?G[B]:void 0,joinArrays:!1,ns:g}):ne[B]=this.translate(te,{...s,joinArrays:!1,ns:g}),ne[B]===te&&(ne[B]=R[B])}S=ne}}else if(T&&ke(z)&&Array.isArray(S))S=S.join(z),S&&(S=this.extendTranslation(S,n,s,l));else{let ie=!1,ne=!1;!this.isValidLookup(S)&&H&&(ie=!0,S=G),this.isValidLookup(S)||(ne=!0,S=f);const B=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ne?void 0:S,te=H&&G!==S&&this.options.updateMissing;if(ne||ie||te){if(this.logger.log(te?"updateKey":"missingKey",y,h,f,te?G:S),c){const D=this.resolve(f,{...s,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ce=[];const we=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&we&&we[0])for(let D=0;D<we.length;D++)ce.push(we[D]);else this.options.saveMissingTo==="all"?ce=this.languageUtils.toResolveHierarchy(s.lng||this.language):ce.push(s.lng||this.language);const _=(D,Y,A)=>{var me;const se=H&&A!==S?A:B;this.options.missingKeyHandler?this.options.missingKeyHandler(D,h,Y,se,te,s):(me=this.backendConnector)!=null&&me.saveMissing&&this.backendConnector.saveMissing(D,h,Y,se,te,s),this.emit("missingKey",D,h,Y,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?ce.forEach(D=>{const Y=this.pluralResolver.getSuffixes(D,s);ee&&s[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(A=>{_([D],f+A,s[`defaultValue${A}`]||G)})}):_(ce,f,G))}S=this.extendTranslation(S,n,s,v,l),ne&&S===f&&this.options.appendNamespaceToMissingKey&&(S=`${h}${x}${f}`),(ne||ie)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${x}${f}`:f,ie?S:void 0,s))}return o?(v.res=S,v.usedParams=this.getUsedParamsDetails(s),v):S}extendTranslation(n,a,l,s,o){var g,h;if((g=this.i18nFormat)!=null&&g.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...l},l.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!l.skipInterpolation){l.interpolation&&this.interpolator.init({...l,interpolation:{...this.options.interpolation,...l.interpolation}});const x=ke(n)&&(((h=l==null?void 0:l.interpolation)==null?void 0:h.skipOnVariables)!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(x){const v=n.match(this.interpolator.nestingRegexp);y=v&&v.length}let b=l.replace&&!ke(l.replace)?l.replace:l;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),n=this.interpolator.interpolate(n,b,l.lng||this.language||s.usedLng,l),x){const v=n.match(this.interpolator.nestingRegexp),S=v&&v.length;y<S&&(l.nest=!1)}!l.lng&&s&&s.res&&(l.lng=this.language||s.usedLng),l.nest!==!1&&(n=this.interpolator.nest(n,(...v)=>(o==null?void 0:o[0])===v[0]&&!l.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${a[0]}`),null):this.translate(...v,a),l)),l.interpolation&&this.interpolator.reset()}const c=l.postProcess||this.options.postProcess,f=ke(c)?[c]:c;return n!=null&&(f!=null&&f.length)&&l.applyPostProcessor!==!1&&(n=mb.handle(f,n,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(l)},...l}:l,this)),n}resolve(n,a={}){let l,s,o,c,f;return ke(n)&&(n=[n]),n.forEach(g=>{if(this.isValidLookup(l))return;const h=this.extractFromKey(g,a),x=h.key;s=x;let y=h.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const b=a.count!==void 0&&!ke(a.count),v=b&&!a.ordinal&&a.count===0,S=a.context!==void 0&&(ke(a.context)||typeof a.context=="number")&&a.context!=="",N=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);y.forEach(E=>{var j,z;this.isValidLookup(l)||(f=E,!ey[`${N[0]}-${E}`]&&((j=this.utils)!=null&&j.hasLoadedNamespace)&&!((z=this.utils)!=null&&z.hasLoadedNamespace(f))&&(ey[`${N[0]}-${E}`]=!0,this.logger.warn(`key "${s}" for languages "${N.join(", ")}" won't get resolved as namespace "${f}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),N.forEach(T=>{var L;if(this.isValidLookup(l))return;c=T;const P=[x];if((L=this.i18nFormat)!=null&&L.addLookupKeys)this.i18nFormat.addLookupKeys(P,x,T,E,a);else{let V;b&&(V=this.pluralResolver.getSuffix(T,a.count,a));const ee=`${this.options.pluralSeparator}zero`,G=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(a.ordinal&&V.indexOf(G)===0&&P.push(x+V.replace(G,this.options.pluralSeparator)),P.push(x+V),v&&P.push(x+ee)),S){const R=`${x}${this.options.contextSeparator||"_"}${a.context}`;P.push(R),b&&(a.ordinal&&V.indexOf(G)===0&&P.push(R+V.replace(G,this.options.pluralSeparator)),P.push(R+V),v&&P.push(R+ee))}}let H;for(;H=P.pop();)this.isValidLookup(l)||(o=H,l=this.getResource(T,E,H,a))}))})}),{res:l,usedKey:s,exactUsedKey:o,usedLng:c,usedNS:f}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,a,l,s={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(n,a,l,s):this.resourceStore.getResource(n,a,l,s)}getUsedParamsDetails(n={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],l=n.replace&&!ke(n.replace);let s=l?n.replace:n;if(l&&typeof n.count<"u"&&(s.count=n.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!l){s={...s};for(const o of a)delete s[o]}return s}static hasDefaultValue(n){const a="defaultValue";for(const l in n)if(Object.prototype.hasOwnProperty.call(n,l)&&a===l.substring(0,a.length)&&n[l]!==void 0)return!0;return!1}}class ty{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=On.create("languageUtils")}getScriptPartFromCode(n){if(n=Mi(n),!n||n.indexOf("-")<0)return null;const a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(n){if(n=Mi(n),!n||n.indexOf("-")<0)return n;const a=n.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(n){if(ke(n)&&n.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(n)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let a;return n.forEach(l=>{if(a)return;const s=this.formatLanguageCode(l);(!this.options.supportedLngs||this.isSupportedCode(s))&&(a=s)}),!a&&this.options.supportedLngs&&n.forEach(l=>{if(a)return;const s=this.getScriptPartFromCode(l);if(this.isSupportedCode(s))return a=s;const o=this.getLanguagePartFromCode(l);if(this.isSupportedCode(o))return a=o;a=this.options.supportedLngs.find(c=>{if(c===o)return c;if(!(c.indexOf("-")<0&&o.indexOf("-")<0)&&(c.indexOf("-")>0&&o.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===o||c.indexOf(o)===0&&o.length>1))return c})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),ke(n)&&(n=[n]),Array.isArray(n))return n;if(!a)return n.default||[];let l=n[a];return l||(l=n[this.getScriptPartFromCode(a)]),l||(l=n[this.formatLanguageCode(a)]),l||(l=n[this.getLanguagePartFromCode(a)]),l||(l=n.default),l||[]}toResolveHierarchy(n,a){const l=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],n),s=[],o=c=>{c&&(this.isSupportedCode(c)?s.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return ke(n)&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(n))):ke(n)&&o(this.formatLanguageCode(n)),l.forEach(c=>{s.indexOf(c)<0&&o(this.formatLanguageCode(c))}),s}}const ny={zero:0,one:1,two:2,few:3,many:4,other:5},ay={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class E2{constructor(n,a={}){this.languageUtils=n,this.options=a,this.logger=On.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(n,a={}){const l=Mi(n==="dev"?"en":n),s=a.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:l,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let c;try{c=new Intl.PluralRules(l,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),ay;if(!n.match(/-|_/))return ay;const g=this.languageUtils.getLanguagePartFromCode(n);c=this.getRule(g,a)}return this.pluralRulesCache[o]=c,c}needsPlural(n,a={}){let l=this.getRule(n,a);return l||(l=this.getRule("dev",a)),(l==null?void 0:l.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(n,a,l={}){return this.getSuffixes(n,l).map(s=>`${a}${s}`)}getSuffixes(n,a={}){let l=this.getRule(n,a);return l||(l=this.getRule("dev",a)),l?l.resolvedOptions().pluralCategories.sort((s,o)=>ny[s]-ny[o]).map(s=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(n,a,l={}){const s=this.getRule(n,l);return s?`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${s.select(a)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",a,l))}}const ry=(e,n,a,l=".",s=!0)=>{let o=x2(e,n,a);return!o&&s&&ke(a)&&(o=Af(e,a,l),o===void 0&&(o=Af(n,a,l))),o},Fd=e=>e.replace(/\$/g,"$$$$");class ly{constructor(n={}){var a;this.logger=On.create("interpolator"),this.options=n,this.format=((a=n==null?void 0:n.interpolation)==null?void 0:a.format)||(l=>l),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:a,escapeValue:l,useRawValueToEscape:s,prefix:o,prefixEscaped:c,suffix:f,suffixEscaped:g,formatSeparator:h,unescapeSuffix:x,unescapePrefix:y,nestingPrefix:b,nestingPrefixEscaped:v,nestingSuffix:S,nestingSuffixEscaped:N,nestingOptionsSeparator:E,maxReplaces:j,alwaysFormat:z}=n.interpolation;this.escape=a!==void 0?a:v2,this.escapeValue=l!==void 0?l:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?lr(o):c||"{{",this.suffix=f?lr(f):g||"}}",this.formatSeparator=h||",",this.unescapePrefix=x?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":x||"",this.nestingPrefix=b?lr(b):v||lr("$t("),this.nestingSuffix=S?lr(S):N||lr(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=j||1e3,this.alwaysFormat=z!==void 0?z:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(a,l)=>(a==null?void 0:a.source)===l?(a.lastIndex=0,a):new RegExp(l,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(n,a,l,s){var v;let o,c,f;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=S=>{if(S.indexOf(this.formatSeparator)<0){const z=ry(a,g,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(z,void 0,l,{...s,...a,interpolationkey:S}):z}const N=S.split(this.formatSeparator),E=N.shift().trim(),j=N.join(this.formatSeparator).trim();return this.format(ry(a,g,E,this.options.keySeparator,this.options.ignoreJSONStructure),j,l,{...s,...a,interpolationkey:E})};this.resetRegExp();const x=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,y=((v=s==null?void 0:s.interpolation)==null?void 0:v.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>Fd(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Fd(this.escape(S)):Fd(S)}].forEach(S=>{for(f=0;o=S.regex.exec(n);){const N=o[1].trim();if(c=h(N),c===void 0)if(typeof x=="function"){const j=x(n,o,s);c=ke(j)?j:""}else if(s&&Object.prototype.hasOwnProperty.call(s,N))c="";else if(y){c=o[0];continue}else this.logger.warn(`missed to pass in variable ${N} for interpolating ${n}`),c="";else!ke(c)&&!this.useRawValueToEscape&&(c=Q0(c));const E=S.safeValue(c);if(n=n.replace(o[0],E),y?(S.regex.lastIndex+=c.length,S.regex.lastIndex-=o[0].length):S.regex.lastIndex=0,f++,f>=this.maxReplaces)break}}),n}nest(n,a,l={}){let s,o,c;const f=(g,h)=>{const x=this.nestingOptionsSeparator;if(g.indexOf(x)<0)return g;const y=g.split(new RegExp(`${lr(x)}[ ]*{`));let b=`{${y[1]}`;g=y[0],b=this.interpolate(b,c);const v=b.match(/'/g),S=b.match(/"/g);(((v==null?void 0:v.length)??0)%2===0&&!S||((S==null?void 0:S.length)??0)%2!==0)&&(b=b.replace(/'/g,'"'));try{c=JSON.parse(b),h&&(c={...h,...c})}catch(N){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,N),`${g}${x}${b}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,g};for(;s=this.nestingRegexp.exec(n);){let g=[];c={...l},c=c.replace&&!ke(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(h!==-1&&(g=s[1].slice(h).split(this.formatSeparator).map(x=>x.trim()).filter(Boolean),s[1]=s[1].slice(0,h)),o=a(f.call(this,s[1].trim(),c),c),o&&s[0]===n&&!ke(o))return o;ke(o)||(o=Q0(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${n}`),o=""),g.length&&(o=g.reduce((x,y)=>this.format(x,y,l.lng,{...l,interpolationkey:s[1].trim()}),o.trim())),n=n.replace(s[0],o),this.regexp.lastIndex=0}return n}}const A2=e=>{let n=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const l=e.split("(");n=l[0].toLowerCase().trim();const s=l[1].substring(0,l[1].length-1);n==="currency"&&s.indexOf(":")<0?a.currency||(a.currency=s.trim()):n==="relativetime"&&s.indexOf(":")<0?a.range||(a.range=s.trim()):s.split(";").forEach(c=>{if(c){const[f,...g]=c.split(":"),h=g.join(":").trim().replace(/^'+|'+$/g,""),x=f.trim();a[x]||(a[x]=h),h==="false"&&(a[x]=!1),h==="true"&&(a[x]=!0),isNaN(h)||(a[x]=parseInt(h,10))}})}return{formatName:n,formatOptions:a}},iy=e=>{const n={};return(a,l,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const c=l+JSON.stringify(o);let f=n[c];return f||(f=e(Mi(l),s),n[c]=f),f(a)}},T2=e=>(n,a,l)=>e(Mi(a),l)(n);class _2{constructor(n={}){this.logger=On.create("formatter"),this.options=n,this.init(n)}init(n,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const l=a.cacheInBuiltFormats?iy:T2;this.formats={number:l((s,o)=>{const c=new Intl.NumberFormat(s,{...o});return f=>c.format(f)}),currency:l((s,o)=>{const c=new Intl.NumberFormat(s,{...o,style:"currency"});return f=>c.format(f)}),datetime:l((s,o)=>{const c=new Intl.DateTimeFormat(s,{...o});return f=>c.format(f)}),relativetime:l((s,o)=>{const c=new Intl.RelativeTimeFormat(s,{...o});return f=>c.format(f,o.range||"day")}),list:l((s,o)=>{const c=new Intl.ListFormat(s,{...o});return f=>c.format(f)})}}add(n,a){this.formats[n.toLowerCase().trim()]=a}addCached(n,a){this.formats[n.toLowerCase().trim()]=iy(a)}format(n,a,l,s={}){const o=a.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(f=>f.indexOf(")")>-1)){const f=o.findIndex(g=>g.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,f)].join(this.formatSeparator)}return o.reduce((f,g)=>{var y;const{formatName:h,formatOptions:x}=A2(g);if(this.formats[h]){let b=f;try{const v=((y=s==null?void 0:s.formatParams)==null?void 0:y[s.interpolationkey])||{},S=v.locale||v.lng||s.locale||s.lng||l;b=this.formats[h](f,S,{...x,...s,...v})}catch(v){this.logger.warn(v)}return b}else this.logger.warn(`there was no format function for ${h}`);return f},n)}}const M2=(e,n)=>{e.pending[n]!==void 0&&(delete e.pending[n],e.pendingCount--)};class D2 extends Wo{constructor(n,a,l,s={}){var o,c;super(),this.backend=n,this.store=a,this.services=l,this.languageUtils=l.languageUtils,this.options=s,this.logger=On.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(c=(o=this.backend)==null?void 0:o.init)==null||c.call(o,l,s.backend,s)}queueLoad(n,a,l,s){const o={},c={},f={},g={};return n.forEach(h=>{let x=!0;a.forEach(y=>{const b=`${h}|${y}`;!l.reload&&this.store.hasResourceBundle(h,y)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?c[b]===void 0&&(c[b]=!0):(this.state[b]=1,x=!1,c[b]===void 0&&(c[b]=!0),o[b]===void 0&&(o[b]=!0),g[y]===void 0&&(g[y]=!0)))}),x||(f[h]=!0)}),(Object.keys(o).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(g)}}loaded(n,a,l){const s=n.split("|"),o=s[0],c=s[1];a&&this.emit("failedLoading",o,c,a),!a&&l&&this.store.addResourceBundle(o,c,l,void 0,void 0,{skipCopy:!0}),this.state[n]=a?-1:2,a&&l&&(this.state[n]=0);const f={};this.queue.forEach(g=>{y2(g.loaded,[o],c),M2(g,n),a&&g.errors.push(a),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(h=>{f[h]||(f[h]={});const x=g.loaded[h];x.length&&x.forEach(y=>{f[h][y]===void 0&&(f[h][y]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(g=>!g.done)}read(n,a,l,s=0,o=this.retryTimeout,c){if(!n.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:a,fcName:l,tried:s,wait:o,callback:c});return}this.readingCalls++;const f=(h,x)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(h&&x&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,n,a,l,s+1,o*2,c)},o);return}c(h,x)},g=this.backend[l].bind(this.backend);if(g.length===2){try{const h=g(n,a);h&&typeof h.then=="function"?h.then(x=>f(null,x)).catch(f):f(null,h)}catch(h){f(h)}return}return g(n,a,f)}prepareLoading(n,a,l={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();ke(n)&&(n=this.languageUtils.toResolveHierarchy(n)),ke(a)&&(a=[a]);const o=this.queueLoad(n,a,l,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(c=>{this.loadOne(c)})}load(n,a,l){this.prepareLoading(n,a,{},l)}reload(n,a,l){this.prepareLoading(n,a,{reload:!0},l)}loadOne(n,a=""){const l=n.split("|"),s=l[0],o=l[1];this.read(s,o,"read",void 0,void 0,(c,f)=>{c&&this.logger.warn(`${a}loading namespace ${o} for language ${s} failed`,c),!c&&f&&this.logger.log(`${a}loaded namespace ${o} for language ${s}`,f),this.loaded(n,c,f)})}saveMissing(n,a,l,s,o,c={},f=()=>{}){var g,h,x,y,b;if((h=(g=this.services)==null?void 0:g.utils)!=null&&h.hasLoadedNamespace&&!((y=(x=this.services)==null?void 0:x.utils)!=null&&y.hasLoadedNamespace(a))){this.logger.warn(`did not save key "${l}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(l==null||l==="")){if((b=this.backend)!=null&&b.create){const v={...c,isUpdate:o},S=this.backend.create.bind(this.backend);if(S.length<6)try{let N;S.length===5?N=S(n,a,l,s,v):N=S(n,a,l,s),N&&typeof N.then=="function"?N.then(E=>f(null,E)).catch(f):f(null,N)}catch(N){f(N)}else S(n,a,l,s,f,v)}!n||!n[0]||this.store.addResource(n[0],a,l,s)}}}const Kd=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let n={};if(typeof e[1]=="object"&&(n=e[1]),ke(e[1])&&(n.defaultValue=e[1]),ke(e[2])&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(l=>{n[l]=a[l]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),sy=e=>{var n,a;return ke(e.ns)&&(e.ns=[e.ns]),ke(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ke(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((a=(n=e.supportedLngs)==null?void 0:n.indexOf)==null?void 0:a.call(n,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},ko=()=>{},R2=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})},xb="__i18next_supportNoticeShown",O2=()=>typeof globalThis<"u"&&!!globalThis[xb],z2=()=>{typeof globalThis<"u"&&(globalThis[xb]=!0)},L2=e=>{var n,a,l,s,o,c,f,g,h,x,y,b,v;return!!(((l=(a=(n=e==null?void 0:e.modules)==null?void 0:n.backend)==null?void 0:a.name)==null?void 0:l.indexOf("Locize"))>0||((f=(c=(o=(s=e==null?void 0:e.modules)==null?void 0:s.backend)==null?void 0:o.constructor)==null?void 0:c.name)==null?void 0:f.indexOf("Locize"))>0||(h=(g=e==null?void 0:e.options)==null?void 0:g.backend)!=null&&h.backends&&e.options.backend.backends.some(S=>{var N,E,j;return((N=S==null?void 0:S.name)==null?void 0:N.indexOf("Locize"))>0||((j=(E=S==null?void 0:S.constructor)==null?void 0:E.name)==null?void 0:j.indexOf("Locize"))>0})||(y=(x=e==null?void 0:e.options)==null?void 0:x.backend)!=null&&y.projectId||(v=(b=e==null?void 0:e.options)==null?void 0:b.backend)!=null&&v.backendOptions&&e.options.backend.backendOptions.some(S=>S==null?void 0:S.projectId))};class Ni extends Wo{constructor(n={},a){if(super(),this.options=sy(n),this.services={},this.logger=On,this.modules={external:[]},R2(this),a&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,a),this;setTimeout(()=>{this.init(n,a)},0)}}init(n={},a){this.isInitializing=!0,typeof n=="function"&&(a=n,n={}),n.defaultNS==null&&n.ns&&(ke(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const l=Kd();this.options={...l,...this.options,...sy(n)},this.options.interpolation={...l.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=l.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!L2(this)&&!O2()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),z2());const s=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?On.init(s(this.modules.logger),this.options):On.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=_2;const x=new ty(this.options);this.store=new W0(this.options.resources,this.options);const y=this.services;y.logger=On,y.resourceStore=this.store,y.languageUtils=x,y.pluralResolver=new E2(x,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==l.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),h&&(!this.options.interpolation.format||this.options.interpolation.format===l.interpolation.format)&&(y.formatter=s(h),y.formatter.init&&y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new ly(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new D2(s(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",(v,...S)=>{this.emit(v,...S)}),this.modules.languageDetector&&(y.languageDetector=s(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=s(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new Bo(this.services,this.options),this.translator.on("*",(v,...S)=>{this.emit(v,...S)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,a||(a=ko),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=(...x)=>this.store[h](...x)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=(...x)=>(this.store[h](...x),this)});const f=gi(),g=()=>{const h=(x,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(y),a(x,y)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),f}loadResources(n,a=ko){var o,c;let l=a;const s=ke(n)?n:this.language;if(typeof n=="function"&&(l=n),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return l();const f=[],g=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(y=>{y!=="cimode"&&f.indexOf(y)<0&&f.push(y)})};s?g(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(x=>g(x)),(c=(o=this.options.preload)==null?void 0:o.forEach)==null||c.call(o,h=>g(h)),this.services.backendConnector.load(f,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),l(h)})}else l(null)}reloadResources(n,a,l){const s=gi();return typeof n=="function"&&(l=n,n=void 0),typeof a=="function"&&(l=a,a=void 0),n||(n=this.languages),a||(a=this.options.ns),l||(l=ko),this.services.backendConnector.reload(n,a,o=>{s.resolve(),l(o)}),s}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&mb.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1)){for(let a=0;a<this.languages.length;a++){const l=this.languages[a];if(!(["cimode","dev"].indexOf(l)>-1)&&this.store.hasLanguageSomeTranslations(l)){this.resolvedLanguage=l;break}}!this.resolvedLanguage&&this.languages.indexOf(n)<0&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,a){this.isLanguageChangingTo=n;const l=gi();this.emit("languageChanging",n);const s=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},o=(f,g)=>{g?this.isLanguageChangingTo===n&&(s(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,l.resolve((...h)=>this.t(...h)),a&&a(f,(...h)=>this.t(...h))},c=f=>{var x,y;!n&&!f&&this.services.languageDetector&&(f=[]);const g=ke(f)?f:f&&f[0],h=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(ke(f)?[f]:f);h&&(this.language||s(h),this.translator.language||this.translator.changeLanguage(h),(y=(x=this.services.languageDetector)==null?void 0:x.cacheUserLanguage)==null||y.call(x,h)),this.loadResources(h,b=>{o(b,h)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n),l}getFixedT(n,a,l){const s=(o,c,...f)=>{let g;typeof c!="object"?g=this.options.overloadTranslationOptionHandler([o,c].concat(f)):g={...c},g.lng=g.lng||s.lng,g.lngs=g.lngs||s.lngs,g.ns=g.ns||s.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||l||s.keyPrefix);const h=this.options.keySeparator||".";let x;return g.keyPrefix&&Array.isArray(o)?x=o.map(y=>(typeof y=="function"&&(y=Tf(y,{...this.options,...c})),`${g.keyPrefix}${h}${y}`)):(typeof o=="function"&&(o=Tf(o,{...this.options,...c})),x=g.keyPrefix?`${g.keyPrefix}${h}${o}`:o),this.t(x,g)};return ke(n)?s.lng=n:s.lngs=n,s.ns=a,s.keyPrefix=l,s}t(...n){var a;return(a=this.translator)==null?void 0:a.translate(...n)}exists(...n){var a;return(a=this.translator)==null?void 0:a.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,a={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const l=a.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(l.toLowerCase()==="cimode")return!0;const c=(f,g)=>{const h=this.services.backendConnector.state[`${f}|${g}`];return h===-1||h===0||h===2};if(a.precheck){const f=a.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(l,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(l,n)&&(!s||c(o,n)))}loadNamespaces(n,a){const l=gi();return this.options.ns?(ke(n)&&(n=[n]),n.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{l.resolve(),a&&a(s)}),l):(a&&a(),Promise.resolve())}loadLanguages(n,a){const l=gi();ke(n)&&(n=[n]);const s=this.options.preload||[],o=n.filter(c=>s.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return o.length?(this.options.preload=s.concat(o),this.loadResources(c=>{l.resolve(),a&&a(c)}),l):(a&&a(),Promise.resolve())}dir(n){var s,o;if(n||(n=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!n)return"rtl";try{const c=new Intl.Locale(n);if(c&&c.getTextInfo){const f=c.getTextInfo();if(f&&f.direction)return f.direction}}catch{}const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],l=((o=this.services)==null?void 0:o.languageUtils)||new ty(Kd());return n.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(l.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},a){const l=new Ni(n,a);return l.createInstance=Ni.createInstance,l}cloneInstance(n={},a=ko){const l=n.forkResourceStore;l&&delete n.forkResourceStore;const s={...this.options,...n,isClone:!0},o=new Ni(s);if((n.debug!==void 0||n.prefix!==void 0)&&(o.logger=o.logger.clone(n)),["store","services","language"].forEach(f=>{o[f]=this[f]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},l){const f=Object.keys(this.store.data).reduce((g,h)=>(g[h]={...this.store.data[h]},g[h]=Object.keys(g[h]).reduce((x,y)=>(x[y]={...g[h][y]},x),g[h]),g),{});o.store=new W0(f,s),o.services.resourceStore=o.store}if(n.interpolation){const g={...Kd().interpolation,...this.options.interpolation,...n.interpolation},h={...s,interpolation:g};o.services.interpolator=new ly(h)}return o.translator=new Bo(o.services,s),o.translator.on("*",(f,...g)=>{o.emit(f,...g)}),o.init(s,a),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ze=Ni.createInstance();ze.createInstance;ze.dir;ze.init;ze.loadResources;ze.reloadResources;ze.use;ze.changeLanguage;ze.getFixedT;ze.t;ze.exists;ze.setDefaultNamespace;ze.hasLoadedNamespace;ze.loadNamespaces;ze.loadLanguages;const U2=(e,n,a,l)=>{var o,c,f,g;const s=[a,{code:n,...l||{}}];if((c=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&c.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);or(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(g=(f=e==null?void 0:e.services)==null?void 0:f.logger)!=null&&g.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},oy={},bb=(e,n,a,l)=>{or(a)&&oy[a]||(or(a)&&(oy[a]=new Date),U2(e,n,a,l))},vb=(e,n)=>()=>{if(e.isInitialized)n();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),n()};e.on("initialized",a)}},_f=(e,n,a)=>{e.loadNamespaces(n,vb(e,a))},uy=(e,n,a,l)=>{if(or(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(n)>-1)return _f(e,a,l);a.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(n,vb(e,l))},H2=(e,n,a={})=>!n.languages||!n.languages.length?(bb(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(e,{lng:a.lng,precheck:(l,s)=>{if(a.bindI18n&&a.bindI18n.indexOf("languageChanging")>-1&&l.services.backendConnector.backend&&l.isLanguageChangingTo&&!s(l.isLanguageChangingTo,e))return!1}}),or=e=>typeof e=="string",B2=e=>typeof e=="object"&&e!==null,q2=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,I2={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},$2=e=>I2[e],F2=e=>e.replace(q2,$2);let Mf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:F2,transDefaultProps:void 0};const K2=(e={})=>{Mf={...Mf,...e}},P2=()=>Mf;let kb;const V2=e=>{kb=e},Y2=()=>kb,G2={type:"3rdParty",init(e){K2(e.options.react),V2(e)}},Q2=C.createContext();class X2{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Pd={exports:{}},Vd={};/**
|
|
62
62
|
* @license React
|
|
63
63
|
* use-sync-external-store-shim.production.js
|
|
64
64
|
*
|
|
@@ -66,334 +66,339 @@ Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}
|
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the MIT license found in the
|
|
68
68
|
* LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/var uy;function Z2(){if(uy)return Kd;uy=1;var e=Yo();function n(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var a=typeof Object.is=="function"?Object.is:n,l=e.useState,s=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function f(y,b){var v=b(),S=l({inst:{value:v,getSnapshot:b}}),C=S[0].inst,E=S[1];return o(function(){C.value=v,C.getSnapshot=b,g(C)&&E({inst:C})},[y,v,b]),s(function(){return g(C)&&E({inst:C}),y(function(){g(C)&&E({inst:C})})},[y]),c(v),v}function g(y){var b=y.getSnapshot;y=y.value;try{var v=b();return!a(y,v)}catch{return!0}}function h(y,b){return b()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Kd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,Kd}var cy;function J2(){return cy||(cy=1,Fd.exports=Z2()),Fd.exports}var W2=J2();const ej=(e,n)=>or(n)?n:B2(n)&&or(n.defaultValue)?n.defaultValue:Array.isArray(e)?e[e.length-1]:e,tj={t:ej,ready:!1},nj=()=>()=>{},oe=(e,n={})=>{var G,R,ae;const{i18n:a}=n,{i18n:l,defaultNS:s}=N.useContext(Q2)||{},o=a||l||Y2();o&&!o.reportNamespaces&&(o.reportNamespaces=new X2),o||xb(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const c=N.useMemo(()=>{var F;return{...P2(),...(F=o==null?void 0:o.options)==null?void 0:F.react,...n}},[o,n]),{useSuspense:f,keyPrefix:g}=c,h=e||s||((G=o==null?void 0:o.options)==null?void 0:G.defaultNS),x=or(h)?[h]:h||["translation"],y=N.useMemo(()=>x,x);(ae=(R=o==null?void 0:o.reportNamespaces)==null?void 0:R.addUsedNamespaces)==null||ae.call(R,y);const b=N.useRef(0),v=N.useCallback(F=>{if(!o)return nj;const{bindI18n:ie,bindI18nStore:ne}=c,W=()=>{b.current+=1,F()};return ie&&o.on(ie,W),ne&&o.store.on(ne,W),()=>{ie&&ie.split(" ").forEach(B=>o.off(B,W)),ne&&ne.split(" ").forEach(B=>o.store.off(B,W))}},[o,c]),S=N.useRef(),C=N.useCallback(()=>{if(!o)return tj;const F=!!(o.isInitialized||o.initializedStoreOnce)&&y.every(ce=>H2(ce,o,c)),ie=n.lng||o.language,ne=b.current,W=S.current;if(W&&W.ready===F&&W.lng===ie&&W.keyPrefix===g&&W.revision===ne)return W;const te={t:o.getFixedT(ie,c.nsMode==="fallback"?y:y[0],g),ready:F,lng:ie,keyPrefix:g,revision:ne};return S.current=te,te},[o,y,g,c,n.lng]),[E,j]=N.useState(0),{t:z,ready:D}=W2.useSyncExternalStore(v,C,C);N.useEffect(()=>{if(o&&!D&&!f){const F=()=>j(ie=>ie+1);n.lng?oy(o,n.lng,y,F):Af(o,y,F)}},[o,n.lng,y,D,f,E]);const Y=o||{},H=N.useRef(null),L=N.useRef(),P=F=>{const ie=Object.getOwnPropertyDescriptors(F);ie.__original&&delete ie.__original;const ne=Object.create(Object.getPrototypeOf(F),ie);if(!Object.prototype.hasOwnProperty.call(ne,"__original"))try{Object.defineProperty(ne,"__original",{value:F,writable:!1,enumerable:!1,configurable:!1})}catch{}return ne},ee=N.useMemo(()=>{const F=Y,ie=F==null?void 0:F.language;let ne=F;F&&(H.current&&H.current.__original===F?L.current!==ie?(ne=P(F),H.current=ne,L.current=ie):ne=H.current:(ne=P(F),H.current=ne,L.current=ie));const W=[z,ne,D];return W.t=z,W.i18n=ne,W.ready=D,W},[z,Y,D,Y.resolvedLanguage,Y.language,Y.languages]);if(o&&f&&!D)throw new Promise(F=>{const ie=()=>F();n.lng?oy(o,n.lng,y,ie):Af(o,y,ie)});return ee},{slice:aj,forEach:rj}=[];function lj(e){return rj.call(aj.call(arguments,1),n=>{if(n)for(const a in n)e[a]===void 0&&(e[a]=n[a])}),e}function ij(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(a=>a.test(e))}const dy=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,sj=function(e,n){const l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(n);let o=`${e}=${s}`;if(l.maxAge>0){const c=l.maxAge-0;if(Number.isNaN(c))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(c)}`}if(l.domain){if(!dy.test(l.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${l.domain}`}if(l.path){if(!dy.test(l.path))throw new TypeError("option path is invalid");o+=`; Path=${l.path}`}if(l.expires){if(typeof l.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${l.expires.toUTCString()}`}if(l.httpOnly&&(o+="; HttpOnly"),l.secure&&(o+="; Secure"),l.sameSite)switch(typeof l.sameSite=="string"?l.sameSite.toLowerCase():l.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l.partitioned&&(o+="; Partitioned"),o},fy={create(e,n,a,l){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};a&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+a*60*1e3)),l&&(s.domain=l),document.cookie=sj(e,n,s)},read(e){const n=`${e}=`,a=document.cookie.split(";");for(let l=0;l<a.length;l++){let s=a[l];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(n)===0)return s.substring(n.length,s.length)}return null},remove(e,n){this.create(e,"",-1,n)}};var oj={name:"cookie",lookup(e){let{lookupCookie:n}=e;if(n&&typeof document<"u")return fy.read(n)||void 0},cacheUserLanguage(e,n){let{lookupCookie:a,cookieMinutes:l,cookieDomain:s,cookieOptions:o}=n;a&&typeof document<"u"&&fy.create(a,e,l,s,o)}},uj={name:"querystring",lookup(e){var l;let{lookupQuerystring:n}=e,a;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((l=window.location.hash)==null?void 0:l.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const c=s.substring(1).split("&");for(let f=0;f<c.length;f++){const g=c[f].indexOf("=");g>0&&c[f].substring(0,g)===n&&(a=c[f].substring(g+1))}}return a}},cj={name:"hash",lookup(e){var s;let{lookupHash:n,lookupFromHashIndex:a}=e,l;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const c=o.substring(1);if(n){const f=c.split("&");for(let g=0;g<f.length;g++){const h=f[g].indexOf("=");h>0&&f[g].substring(0,h)===n&&(l=f[g].substring(h+1))}}if(l)return l;if(!l&&a>-1){const f=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?(s=f[typeof a=="number"?a:0])==null?void 0:s.replace("/",""):void 0}}}return l}};let al=null;const hy=()=>{if(al!==null)return al;try{if(al=typeof window<"u"&&window.localStorage!==null,!al)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{al=!1}return al};var dj={name:"localStorage",lookup(e){let{lookupLocalStorage:n}=e;if(n&&hy())return window.localStorage.getItem(n)||void 0},cacheUserLanguage(e,n){let{lookupLocalStorage:a}=n;a&&hy()&&window.localStorage.setItem(a,e)}};let rl=null;const gy=()=>{if(rl!==null)return rl;try{if(rl=typeof window<"u"&&window.sessionStorage!==null,!rl)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{rl=!1}return rl};var fj={name:"sessionStorage",lookup(e){let{lookupSessionStorage:n}=e;if(n&&gy())return window.sessionStorage.getItem(n)||void 0},cacheUserLanguage(e,n){let{lookupSessionStorage:a}=n;a&&gy()&&window.sessionStorage.setItem(a,e)}},hj={name:"navigator",lookup(e){const n=[];if(typeof navigator<"u"){const{languages:a,userLanguage:l,language:s}=navigator;if(a)for(let o=0;o<a.length;o++)n.push(a[o]);l&&n.push(l),s&&n.push(s)}return n.length>0?n:void 0}},gj={name:"htmlTag",lookup(e){let{htmlTag:n}=e,a;const l=n||(typeof document<"u"?document.documentElement:null);return l&&typeof l.getAttribute=="function"&&(a=l.getAttribute("lang")),a}},pj={name:"path",lookup(e){var s;let{lookupFromPathIndex:n}=e;if(typeof window>"u")return;const a=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(s=a[typeof n=="number"?n:0])==null?void 0:s.replace("/",""):void 0}},mj={name:"subdomain",lookup(e){var s,o;let{lookupFromSubdomainIndex:n}=e;const a=typeof n=="number"?n+1:1,l=typeof window<"u"&&((o=(s=window.location)==null?void 0:s.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(l)return l[a]}};let kb=!1;try{document.cookie,kb=!0}catch{}const Sb=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];kb||Sb.splice(1,1);const yj=()=>({order:Sb,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class wb{constructor(n){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(n,a)}init(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=lj(a,this.options||{},yj()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=l,this.addDetector(oj),this.addDetector(uj),this.addDetector(dj),this.addDetector(fj),this.addDetector(hj),this.addDetector(gj),this.addDetector(pj),this.addDetector(mj),this.addDetector(cj)}addDetector(n){return this.detectors[n.name]=n,this}detect(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,a=[];return n.forEach(l=>{if(this.detectors[l]){let s=this.detectors[l].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(a=a.concat(s))}}),a=a.filter(l=>l!=null&&!ij(l)).map(l=>this.options.convertDetectedLanguage(l)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}cacheUserLanguage(n){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;a&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||a.forEach(l=>{this.detectors[l]&&this.detectors[l].cacheUserLanguage(n,this.options)}))}}wb.type="languageDetector";const xj={connecting:"连接中...",connected:"已连接",reconnecting:"重连中",disconnected:"未连接",error:"连接错误",active:"活跃",paused:"已暂停",ok:"正常",failed:"失败",running:"运行中",pending:"等待中",disabled:"已禁用"},bj={send:"发送",cancel:"取消",close:"关闭",confirm:"确定",stop:"停止",retry:"重试",save:"保存",delete:"删除",refresh:"刷新",create:"创建",edit:"编辑"},vj={justNow:"刚刚",secondsAgo:"{{count}}秒前",minutesAgo:"{{count}}分前",hoursAgo:"{{count}}时前",running:"运行 {{seconds}}s",runningMinutes:"运行 {{minutes}}m {{seconds}}s"},kj={noData:"暂无数据",noCostData:"暂无成本数据",noActivityData:"暂无活跃数据",noRelationData:"暂无 Agent 关系数据",noEvents:"暂无事件",noMatchingAgents:"无匹配 Agent",noSubAgents:"无 Sub-Agent",waitingUsageData:"暂无数据,等待 usage 数据..."},Sj={statusLabels:{idle:"空闲",thinking:"思考中",tool_calling:"工具调用",speaking:"回复中",spawning:"创建中",error:"错误",offline:"离线"}},wj={desk:"固定工位区",meeting:"会议区",hotDesk:"热工位区",lounge:"休息区"},jj={notConnected:"未连接到 Gateway",operationFailed:"操作失败",operationTimeout:"操作超时,Gateway 可能暂不支持此操作",adapterNotInitialized:"Gateway Adapter 未初始化",unknownError:"未知错误",errorOccurred:"发生错误"},Cj={startRunning:"开始运行",thinking:"思考中",runEnded:"运行结束",fallback:"降级处理",toolCall:"调用工具: {{name}}",toolDone:"工具完成: {{name}}",errorPrefix:"错误: {{message}}",unknownStream:"未知流: {{stream}}",lifecycleUnknown:"生命周期: {{phase}}"},Nj={status:xj,actions:bj,time:vj,empty:kj,agent:Sj,zones:wj,errors:jj,events:Cj},Ej={activeCount:"活跃 <strong>{{active}}/{{total}}</strong>",tokens:"Tokens <strong>{{count}}</strong>",activeCountText:"活跃",tokensLabel:"Tokens",console:"控制台",office:"办公室",pageTitles:{dashboard:"仪表盘",channels:"渠道",skills:"技能",cron:"定时任务",agents:"智能体管理",settings:"设置",fallback:"控制台"},viewMode:{switchTo:"切换到 {{mode}} 视图",mobileNotSupported:"小屏幕不支持 3D 模式",webglNotSupported:"当前浏览器不支持 3D 渲染"},theme:{switchToDark:"切换到暗色模式",switchToLight:"切换到亮色模式"},language:{switchToEn:"切换到英文",switchToZh:"切换到中文"}},Aj={agents:"智能体",expand:"展开侧栏",collapse:"折叠侧栏",closeSidebar:"关闭侧栏",expandSidebar:"展开侧栏",collapseSidebar:"收起侧栏",metricsTitle:"概览 / 趋势",agentList:"智能体 列表",subAgents:"子智能体",agentDetail:"智能体 详情",eventTimeline:"事件时间轴",searchPlaceholder:"搜索 Agent...",filters:{all:"全部",active:"活跃",idle:"空闲",error:"错误"}},Tj={dashboard:"仪表盘",agents:"智能体",channels:"渠道",skills:"技能",cron:"定时任务",settings:"设置"},_j={topbar:Ej,sidebar:Aj,consoleNav:Tj},Dj="加载 3D 场景...",Mj={desk:"固定工位区",meeting:"会议区",hotDesk:"热工位区",lounge:"休息区"},Rj={loading3D:Dj,zones:Mj},Oj={activeAgents:"活跃 Agent",totalTokens:"总 Tokens",collaboration:"协作度",tokenRate:"Token 速率",tokenRateUnit:"/min",tabs:{overview:"概览",trend:"趋势",topology:"拓扑",activity:"活跃"}},zj={deselect:"取消选择",toolCallHistory:"工具调用历史"},Lj={newEvents:"新事件 ↓"},Uj={total:"总:",totalLine:"总量"},Hj={eventsUnit:"events"},Bj={metrics:Oj,agentDetail:zj,eventTimeline:Lj,tokenChart:Uj,activityHeatmap:Hj},qj={collapseDock:"收起对话",expandDock:"展开对话",attachmentWip:"附件(开发中)",placeholder:"输入消息... (Enter 发送, Shift+Enter 换行)",startNewChat:"开始一段新的对话",thinkingStatus:"思考中..."},Ij={defaultLabel:"Agent"},$j={sendMessage:"发送消息",killConfirm:"终止确认",inputPlaceholder:"输入指令...",killWarning:"确定要终止 <strong>{{name}}</strong> 的当前运行吗?此操作不可撤销。",kill:"终止"},Fj={pause:"暂停",resume:"恢复",notSupported:"暂不支持",kill:"终止",sendMessage:"发送消息",viewDetail:"查看详情",operatorRequired:"需要 operator 权限"},Kj={dock:qj,agentSelector:Ij,dialog:$j,contextMenu:Fj},Pj={title:"仪表盘",description:"系统概览:Gateway 状态、渠道连接、技能启用情况",loading:"加载仪表盘数据...",stats:{channels:"渠道连接",skills:"启用技能",usage:"Provider 用量",uptime:"运行时间",uptimeOnline:"在线"},alerts:{gatewayDisconnected:"Gateway 未连接,数据可能不是最新",channelErrors:"{{count}} 个渠道连接异常"},quickNav:{title:"快捷导航"},channelOverview:{title:"已连接渠道",empty:"暂无已连接渠道"},skillOverview:{title:"活跃技能",empty:"暂无已启用技能"}},Vj={title:"渠道",description:"管理消息渠道:Telegram、Discord、飞书 等",stats:{total:"总计",connected:"已连接",errors:"错误"},card:{lastConnected:"最后连接:{{time}}",details:"详情",logout:"登出"},empty:{title:"暂无已配置渠道",description:"点击下方渠道类型开始配置"},available:{title:"可用渠道类型",configured:"已配置",add:"添加"},types:{telegram:"Telegram",discord:"Discord",whatsapp:"WhatsApp",signal:"Signal",feishu:"飞书",imessage:"iMessage",matrix:"Matrix",line:"LINE",msteams:"MS Teams",googlechat:"Google Chat",mattermost:"Mattermost"},fields:{botToken:"Bot Token",applicationId:"Application ID",phoneNumber:"手机号",appId:"App ID",appSecret:"App Secret",homeserver:"Homeserver URL",accessToken:"Access Token",channelAccessToken:"Channel Access Token",channelSecret:"Channel Secret",appPassword:"App Password",serviceAccount:"Service Account JSON",serverUrl:"Server URL"},placeholders:{botToken:"输入 Bot Token",applicationId:"输入 Application ID",phoneNumber:"+86...",appId:"输入 App ID",appSecret:"输入 App Secret",homeserver:"https://matrix.org",accessToken:"输入 Access Token",channelAccessToken:"输入 Channel Access Token",channelSecret:"输入 Channel Secret",appPassword:"输入 App Password",serviceAccount:"粘贴 Service Account JSON",serverUrl:"https://mattermost.example.com"},configDialog:{required:"此字段为必填项",cancel:"取消",save:"保存"},qr:{description:"使用 WhatsApp 手机应用扫描 QR 码以配对",startPairing:"开始配对",loading:"正在获取 QR 码...",scanPrompt:"请用手机扫描 QR 码",waitingScan:"等待扫码...",success:"配对成功!",error:"配对失败"},logout:{title:"登出渠道",description:"确认要登出「{{name}}」吗?登出后需要重新配对。"}},Yj={title:"技能",description:"管理技能与插件:安装、启停、配置",tabs:{installed:"已安装",marketplace:"市场"},installed:{searchPlaceholder:"搜索已安装技能..."},filters:{all:"全部 ({{count}})","built-in":"内置 ({{count}})",marketplace:"市场 ({{count}})"},source:{builtIn:"内置",marketplace:"市场"},card:{configure:"配置",install:"安装",installing:"安装中...",missingDeps:"缺少依赖",coreProtected:"核心技能不可禁用"},detail:{info:"信息",source:"来源",version:"版本",author:"作者",primaryEnv:"主环境变量",homepage:"主页",requirements:"依赖项",config:"配置",configChecks:"配置检查",noConfig:"此技能无需配置",apiKeyPlaceholder:"输入 API Key",envVars:"环境变量",addVariable:"添加变量",noEnvVars:"暂未配置环境变量",keyPlaceholder:"键名",valuePlaceholder:"值",enabled:"已启用",disabled:"已禁用",saving:"保存中..."},install:{title:"安装 {{name}}"},marketplace:{securityNote:"安装前请先审查技能来源、主页说明和依赖要求。当前 Web 端市场基于 Gateway 返回的可安装技能列表展示。",searchPlaceholder:"搜索市场技能...",searchButton:"搜索",emptyTitle:"市场暂无技能",emptyDescription:"当前 Gateway 未返回可展示的市场技能",noResults:"没有匹配的市场技能",installed:"已安装",version:"版本 {{version}}",author:"作者 {{author}}",learnMore:"详情"},empty:{title:"暂无技能",description:"切换 Tab 或修改筛选条件"}},Gj={title:"定时任务",description:"管理定时任务:创建、编辑、启停、立即执行",stats:{total:"总计",active:"运行中",paused:"已暂停",failed:"失败"},card:{lastRun:"上次运行",nextRun:"下次运行",runNow:"立即执行"},presets:{everyHour:"每小时",daily9am:"每天 9:00",daily6pm:"每天 18:00",weeklyMon:"每周一 9:00",monthlyFirst:"每月 1 日",every30min:"每 30 分钟"},dialog:{createTitle:"创建定时任务",editTitle:"编辑定时任务",name:"任务名称",namePlaceholder:"输入任务名称",description:"描述",descriptionPlaceholder:"可选的任务描述",schedule:"执行计划",cronHelp:"标准 cron 表达式:分 时 日 月 周",message:"消息内容",messagePlaceholder:"输入发送给 Agent 的消息",required:"此字段为必填项"},empty:{title:"暂无定时任务",createFirst:"创建第一个任务"},delete:{title:"删除定时任务",description:"确认要删除此定时任务吗?此操作不可撤销。"},run:{title:"立即执行",description:"确认要立即执行此定时任务吗?"}},Qj={title:"设置",description:"应用设置:主题、Provider、Gateway、更新",appearance:{title:"外观",theme:"主题",themeLight:"浅色",themeDark:"深色",themeSystem:"跟随系统",language:"语言",langZh:"中文",langEn:"英文"},providers:{title:"AI 提供方",description:"管理 AI 模型供应商配置",add:"添加提供方",empty:"尚未配置 AI 提供方",emptyHint:"点击上方按钮添加第一个 AI 提供方",apiKeyConfigured:"已配置",apiKeyNotConfigured:"未配置",modelCount:"{{count}} 个模型",deleteTitle:"删除提供方",deleteDescription:"确认要删除提供方「{{name}}」吗?删除后需要重新配置。",addDialog:{title:"添加提供方",selectType:"选择提供方类型",backToSelect:"返回选择类型",providerId:"提供方 ID",providerIdHint:"配置文件中的唯一标识",baseUrl:"基础 URL",apiKey:"API Key",apiType:"API 类型",idConflict:"该提供方 ID 已存在",cancel:"取消",save:"保存"},editDialog:{title:"编辑提供方",apiKeyPlaceholder:"留空保持不变",cancel:"取消",save:"保存"},models:{title:"模型列表",add:"添加模型",remove:"删除模型",empty:"暂未配置模型,点击上方按钮添加",untitled:"未命名模型",id:"模型 ID",name:"显示名称",reasoning:"推理能力",inputTypes:"输入类型",input_text:"文本",input_image:"图片",yes:"支持",no:"不支持",apiOverride:"API 覆盖",inheritProvider:"继承提供方",contextWindow:"上下文窗口",maxTokens:"最大输出 Token",cost:"计费($/百万 Token)",costHint:"单位为美元/百万 Token,0 表示免费",cost_input:"输入",cost_output:"输出",cost_cacheRead:"缓存读取",cost_cacheWrite:"缓存写入",showAdvanced:"高级兼容性选项",hideAdvanced:"收起高级选项",default:"默认",thinkingFormat:"思考格式",maxTokensField:"maxTokens 字段名",compat_supportsStore:"支持存储/记忆",compat_supportsDeveloperRole:"支持开发者角色",compat_supportsReasoningEffort:"支持推理强度",compat_supportsUsageInStreaming:"流式返回用量",compat_supportsStrictMode:"支持严格模式",compat_requiresToolResultName:"工具结果需含名称",compat_requiresAssistantAfterToolResult:"工具结果后需 assistant",compat_requiresThinkingAsText:"思考以文本返回",compat_requiresMistralToolIds:"Mistral 工具 ID"}},gateway:{title:"Gateway",description:"Gateway 运行状态",version:"版本",port:"端口",uptime:"运行时间",mode:"运行模式",nodeVersion:"Node.js",platform:"平台",refresh:"刷新",notConnected:"Gateway 未连接",notConnectedHint:"请确保 OpenClaw Gateway 正在运行",uptimeFormat:"{{hours}}h {{minutes}}m"},update:{title:"更新",currentVersion:"当前版本",channel:"更新通道",checkUpdate:"检查更新",updating:"正在更新...",confirmTitle:"确认更新",confirmDescription:"更新过程中 Gateway 将重启,连接将短暂中断。确定继续?",resultOk:"更新成功,版本从 {{before}} 升级到 {{after}},Gateway 正在重启",resultNoop:"已是最新版本",resultError:"更新失败:{{reason}}"},advanced:{title:"高级",devMode:"开发者模式",devModeHint:"启用后将显示开发者工具选项"},developer:{title:"开发者工具",gatewayToken:"Gateway Token",tokenConfigured:"已配置",tokenHint:"使用 CLI `openclaw config get gateway.auth.token` 查看完整 Token",configPath:"配置文件路径",rawConfig:"原始配置",showConfig:"展开",hideConfig:"收起",wsUrl:"WebSocket URL",connectionStatus:"连接状态",copied:"已复制"},about:{title:"关于",appName:"OpenClaw Office",tagline:"多 Agent 协作可视化监控",version:"版本",docs:"文档",github:"GitHub"},restartWarning:"保存配置后 Gateway 将自动重启,连接将短暂中断",configConflict:"配置已被其他客户端修改,已自动重新加载"},Xj={statusLabels:{connected:"已连接",disconnected:"未连接",connecting:"连接中",error:"错误"},taskStatus:{active:"活跃",paused:"已暂停"},schedule:{daily:"每天 {{time}}",weekly:"每周 {{day}} {{time}}",every:"每 {{minutes}}m",at:"于 {{time}}",unknown:"未知"},skillSource:{builtIn:"内置",marketplace:"市场"}},Zj={title:"智能体管理",description:"管理智能体配置、核心文件和模型设置",panelTitle:"智能体",detailDescription:"智能体 {{id}} 的工作空间与路由配置",configured:"已配置 {{count}} 个",refresh:"刷新",searchPlaceholder:"搜索智能体...",noAgents:"暂无智能体",noAgentsDesc:"尚未配置任何智能体",selectAgent:"选择一个智能体",selectAgentDesc:"从左侧列表中选择一个智能体查看详情",defaultBadge:"默认",addAgent:"添加智能体",tabs:{overview:"概览",files:"文件",tools:"工具",skills:"技能",channels:"渠道",cronJobs:"定时任务"},overview:{title:"基本信息",agentId:"智能体 ID",name:"名称",workspace:"工作空间",isDefault:"默认智能体",yes:"是",no:"否",modelConfig:"模型配置",primaryModel:"主模型",primaryModelPlaceholder:"选择主模型...",fallbackModels:"备选模型",fallbackPlaceholder:"选择备用模型...",addFallback:"添加备选模型",save:"保存",saving:"保存中...",saveSuccess:"保存成功",saveError:"保存失败",deleteAgent:"删除智能体",cannotDeleteDefault:"无法删除默认智能体"},files:{title:"核心文件",description:"引导式角色设定、身份信息与工具使用说明。",workspace:"工作空间",noFiles:"暂无文件",selectFile:"选择一个文件查看内容",content:"内容",reset:"重置",save:"保存",saving:"保存中...",saveSuccess:"文件已保存",saveError:"保存失败",unsavedChanges:"有未保存的更改",justNow:"刚刚",hoursAgo:"{{count}} 小时前",daysAgo:"{{count}} 天前"},tools:{title:"工具策略",profile:"策略配置",allowList:"允许列表",denyList:"禁止列表",noConfig:"该智能体未配置工具策略",all:"全部"},skills:{title:"技能配置",noRestriction:"无技能限制(使用所有已启用技能)",defaultConfig:"使用默认技能配置",allowedSkills:"允许的技能"},channels:{title:"频道路由",noBindings:"该智能体未绑定任何频道"},cronJobs:{title:"定时任务",noCronJobs:"该智能体无定时任务"},createDialog:{title:"添加新智能体",name:"名称",namePlaceholder:"输入智能体名称",nameRequired:"请输入名称",workspace:"工作空间路径",workspacePlaceholder:"例如: ~/.openclaw/workspace-myagent",workspaceRequired:"请输入工作空间路径",emoji:"表情",emojiPlaceholder:"例如: 🤖",cancel:"取消",create:"创建",creating:"创建中..."},deleteDialog:{title:"删除智能体",confirm:"确认要删除智能体「{{name}}」吗?此操作不可逆。",deleteFiles:"同时删除工作空间文件",cancel:"取消",delete:"删除",deleting:"删除中..."}},Jj={dashboard:Pj,channels:Vj,skills:Yj,cron:Gj,settings:Qj,viewModels:Xj,agents:Zj},Wj={connecting:"Connecting...",connected:"Connected",reconnecting:"Reconnecting",disconnected:"Disconnected",error:"Connection Error",active:"Active",paused:"Paused",ok:"OK",failed:"Failed",running:"Running",pending:"Pending",disabled:"Disabled"},eC={send:"Send",cancel:"Cancel",close:"Close",confirm:"Confirm",stop:"Stop",retry:"Retry",save:"Save",delete:"Delete",refresh:"Refresh",create:"Create",edit:"Edit"},tC={justNow:"just now",secondsAgo:"{{count}}s ago",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",running:"running {{seconds}}s",runningMinutes:"running {{minutes}}m {{seconds}}s"},nC={noData:"No data",noCostData:"No cost data yet",noActivityData:"No activity data yet",noRelationData:"No agent relation data yet",noEvents:"No events yet",noMatchingAgents:"No matching agents",noSubAgents:"No sub-agents",waitingUsageData:"No data, waiting for usage data..."},aC={statusLabels:{idle:"Idle",thinking:"Thinking",tool_calling:"Tool Call",speaking:"Speaking",spawning:"Spawning",error:"Error",offline:"Offline"}},rC={desk:"Desk Zone",meeting:"Meeting Zone",hotDesk:"Hot Desk Zone",lounge:"Lounge Zone"},lC={notConnected:"Not connected to Gateway",operationFailed:"Operation failed",operationTimeout:"Operation timed out, Gateway may not support this action",adapterNotInitialized:"Gateway Adapter not initialized",unknownError:"Unknown error",errorOccurred:"An error occurred"},iC={startRunning:"Started running",thinking:"Thinking",runEnded:"Run ended",fallback:"Fallback",toolCall:"Tool call: {{name}}",toolDone:"Tool done: {{name}}",errorPrefix:"Error: {{message}}",unknownStream:"unknown stream: {{stream}}",lifecycleUnknown:"lifecycle: {{phase}}"},sC={status:Wj,actions:eC,time:tC,empty:nC,agent:aC,zones:rC,errors:lC,events:iC},oC={activeCount:"Active <strong>{{active}}/{{total}}</strong>",tokens:"Tokens <strong>{{count}}</strong>",activeCountText:"Active",tokensLabel:"Tokens",console:"Console",office:"Office",pageTitles:{dashboard:"Dashboard",channels:"Channels",skills:"Skills",cron:"Cron Tasks",agents:"Agents",settings:"Settings",fallback:"Console"},viewMode:{switchTo:"Switch to {{mode}} view",mobileNotSupported:"3D mode not supported on small screens",webglNotSupported:"3D rendering not supported in this browser"},theme:{switchToDark:"Switch to dark mode",switchToLight:"Switch to light mode"},language:{switchToEn:"Switch to English",switchToZh:"Switch to Chinese"}},uC={agents:"Agents",expand:"Expand sidebar",collapse:"Collapse sidebar",closeSidebar:"Close sidebar",expandSidebar:"Expand sidebar",collapseSidebar:"Collapse sidebar",metricsTitle:"Overview / Trends",agentList:"Agent List",subAgents:"Sub-Agents",agentDetail:"Agent Detail",eventTimeline:"Event Timeline",searchPlaceholder:"Search agents...",filters:{all:"All",active:"Active",idle:"Idle",error:"Error"}},cC={dashboard:"Dashboard",agents:"Agents",channels:"Channels",skills:"Skills",cron:"Cron Tasks",settings:"Settings"},dC={topbar:oC,sidebar:uC,consoleNav:cC},fC="Loading 3D scene...",hC={desk:"Desk Zone",meeting:"Meeting Zone",hotDesk:"Hot Desk Zone",lounge:"Lounge Zone"},gC={loading3D:fC,zones:hC},pC={activeAgents:"Active Agents",totalTokens:"Total Tokens",collaboration:"Collaboration",tokenRate:"Token Rate",tokenRateUnit:"/min",tabs:{overview:"Overview",trend:"Trend",topology:"Topology",activity:"Activity"}},mC={deselect:"Deselect",toolCallHistory:"Tool Call History"},yC={newEvents:"New events ↓"},xC={total:"Total:",totalLine:"Total"},bC={eventsUnit:"events"},vC={metrics:pC,agentDetail:mC,eventTimeline:yC,tokenChart:xC,activityHeatmap:bC},kC={collapseDock:"Collapse chat",expandDock:"Expand chat",attachmentWip:"Attachments (coming soon)",placeholder:"Type a message... (Enter to send, Shift+Enter for new line)",startNewChat:"Start a new conversation",thinkingStatus:"Thinking..."},SC={defaultLabel:"Agent"},wC={sendMessage:"Send Message",killConfirm:"Kill Confirmation",inputPlaceholder:"Enter command...",killWarning:"Are you sure you want to kill <strong>{{name}}</strong>'s current run? This cannot be undone.",kill:"Kill"},jC={pause:"Pause",resume:"Resume",notSupported:"Not supported yet",kill:"Kill",sendMessage:"Send Message",viewDetail:"View Detail",operatorRequired:"Operator permission required"},CC={dock:kC,agentSelector:SC,dialog:wC,contextMenu:jC},NC={title:"Dashboard",description:"System overview: Gateway status, channel connections, skill status",loading:"Loading dashboard data...",stats:{channels:"Channels",skills:"Skills",usage:"Provider Usage",uptime:"Uptime",uptimeOnline:"Online"},alerts:{gatewayDisconnected:"Gateway disconnected, data may not be up to date",channelErrors:"{{count}} channel(s) with errors"},quickNav:{title:"Quick Navigation"},channelOverview:{title:"Connected Channels",empty:"No connected channels"},skillOverview:{title:"Active Skills",empty:"No enabled skills"}},EC={title:"Channels",description:"Manage messaging channels: Telegram, Discord, WhatsApp, etc.",stats:{total:"Total",connected:"Connected",errors:"Errors"},card:{lastConnected:"Last connected: {{time}}",details:"Details",logout:"Logout"},empty:{title:"No channels configured",description:"Select a channel type below to get started"},available:{title:"Available Channel Types",configured:"Configured",add:"Add"},types:{telegram:"Telegram",discord:"Discord",whatsapp:"WhatsApp",signal:"Signal",feishu:"Feishu",imessage:"iMessage",matrix:"Matrix",line:"LINE",msteams:"MS Teams",googlechat:"Google Chat",mattermost:"Mattermost"},fields:{botToken:"Bot Token",applicationId:"Application ID",phoneNumber:"Phone Number",appId:"App ID",appSecret:"App Secret",homeserver:"Homeserver URL",accessToken:"Access Token",channelAccessToken:"Channel Access Token",channelSecret:"Channel Secret",appPassword:"App Password",serviceAccount:"Service Account JSON",serverUrl:"Server URL"},placeholders:{botToken:"Enter Bot Token",applicationId:"Enter Application ID",phoneNumber:"+1...",appId:"Enter App ID",appSecret:"Enter App Secret",homeserver:"https://matrix.org",accessToken:"Enter Access Token",channelAccessToken:"Enter Channel Access Token",channelSecret:"Enter Channel Secret",appPassword:"Enter App Password",serviceAccount:"Paste Service Account JSON",serverUrl:"https://mattermost.example.com"},configDialog:{required:"This field is required",cancel:"Cancel",save:"Save"},qr:{description:"Scan the QR code with your WhatsApp mobile app to pair",startPairing:"Start Pairing",loading:"Generating QR code...",scanPrompt:"Scan QR code with your phone",waitingScan:"Waiting for scan...",success:"Paired successfully!",error:"Pairing failed"},logout:{title:"Logout Channel",description:'Are you sure you want to logout "{{name}}"? You will need to re-pair.'}},AC={title:"Skills",description:"Manage skills and plugins: install, enable/disable, configure",tabs:{installed:"Installed",marketplace:"Marketplace"},installed:{searchPlaceholder:"Search installed skills..."},filters:{all:"All ({{count}})","built-in":"Built-in ({{count}})",marketplace:"Marketplace ({{count}})"},source:{builtIn:"Built-in",marketplace:"Marketplace"},card:{configure:"Configure",install:"Install",installing:"Installing...",missingDeps:"Missing dependencies",coreProtected:"Core skill cannot be disabled"},detail:{info:"Info",source:"Source",version:"Version",author:"Author",primaryEnv:"Primary environment variable",homepage:"Homepage",requirements:"Requirements",config:"Configuration",configChecks:"Config Checks",noConfig:"This skill requires no configuration",apiKeyPlaceholder:"Enter API Key",envVars:"Environment Variables",addVariable:"Add Variable",noEnvVars:"No environment variables configured",keyPlaceholder:"Key",valuePlaceholder:"Value",enabled:"Enabled",disabled:"Disabled",saving:"Saving..."},install:{title:"Install {{name}}"},marketplace:{securityNote:"Review the skill source, homepage, and dependency requirements before installing. This web marketplace view is built from the installable skills returned by the Gateway.",searchPlaceholder:"Search marketplace skills...",searchButton:"Search",emptyTitle:"No marketplace skills",emptyDescription:"The current Gateway did not return any marketplace-ready skills",noResults:"No marketplace skills match your search",installed:"Installed",version:"Version {{version}}",author:"Author {{author}}",learnMore:"Details"},empty:{title:"No skills found",description:"Try switching tabs or adjusting filters"}},TC={title:"Cron Tasks",description:"Manage cron tasks: create, edit, enable/disable, run immediately",stats:{total:"Total",active:"Active",paused:"Paused",failed:"Failed"},card:{lastRun:"Last run",nextRun:"Next run",runNow:"Run now"},presets:{everyHour:"Every hour",daily9am:"Daily 9 AM",daily6pm:"Daily 6 PM",weeklyMon:"Weekly Monday 9 AM",monthlyFirst:"Monthly 1st",every30min:"Every 30 min"},dialog:{createTitle:"Create Cron Task",editTitle:"Edit Cron Task",name:"Task Name",namePlaceholder:"Enter task name",description:"Description",descriptionPlaceholder:"Optional task description",schedule:"Schedule",cronHelp:"Standard cron expression: min hour day month weekday",message:"Message",messagePlaceholder:"Enter message to send to the agent",required:"This field is required"},empty:{title:"No cron tasks",createFirst:"Create your first task"},delete:{title:"Delete Cron Task",description:"Are you sure you want to delete this cron task? This cannot be undone."},run:{title:"Run Now",description:"Are you sure you want to run this cron task immediately?"}},_C={title:"Settings",description:"App settings: theme, provider, gateway, updates",appearance:{title:"Appearance",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",language:"Language",langZh:"中文",langEn:"English"},providers:{title:"AI Providers",description:"Manage AI model provider configurations",add:"Add Provider",empty:"No AI Providers configured",emptyHint:"Click the button above to add your first provider",apiKeyConfigured:"Configured",apiKeyNotConfigured:"Not configured",modelCount:"{{count}} model(s)",deleteTitle:"Delete Provider",deleteDescription:'Are you sure you want to delete provider "{{name}}"? You will need to reconfigure it.',addDialog:{title:"Add Provider",selectType:"Select Provider Type",backToSelect:"Back to type selection",providerId:"Provider ID",providerIdHint:"Unique identifier in the config file",baseUrl:"Base URL",apiKey:"API Key",apiType:"API Type",idConflict:"This Provider ID already exists",cancel:"Cancel",save:"Save"},editDialog:{title:"Edit Provider",apiKeyPlaceholder:"Leave empty to keep unchanged",cancel:"Cancel",save:"Save"},models:{title:"Models",add:"Add Model",remove:"Remove Model",empty:"No models configured. Click above to add one.",untitled:"Untitled Model",id:"Model ID",name:"Display Name",reasoning:"Reasoning",inputTypes:"Input Types",input_text:"Text",input_image:"Image",yes:"Yes",no:"No",apiOverride:"API Override",inheritProvider:"Inherit from provider",contextWindow:"Context Window",maxTokens:"Max Output Tokens",cost:"Cost ($/M tokens)",costHint:"In USD per million tokens. 0 means free.",cost_input:"Input",cost_output:"Output",cost_cacheRead:"Cache Read",cost_cacheWrite:"Cache Write",showAdvanced:"Advanced compatibility options",hideAdvanced:"Hide advanced options",default:"Default",thinkingFormat:"Thinking Format",maxTokensField:"maxTokens Field Name",compat_supportsStore:"Supports store/memory",compat_supportsDeveloperRole:"Supports developer role",compat_supportsReasoningEffort:"Supports reasoning effort",compat_supportsUsageInStreaming:"Usage in streaming",compat_supportsStrictMode:"Supports strict mode",compat_requiresToolResultName:"Requires tool result name",compat_requiresAssistantAfterToolResult:"Requires assistant after tool result",compat_requiresThinkingAsText:"Thinking as text",compat_requiresMistralToolIds:"Mistral tool IDs"}},gateway:{title:"Gateway",description:"Gateway runtime status",version:"Version",port:"Port",uptime:"Uptime",mode:"Mode",nodeVersion:"Node.js",platform:"Platform",refresh:"Refresh",notConnected:"Gateway not connected",notConnectedHint:"Make sure OpenClaw Gateway is running",uptimeFormat:"{{hours}}h {{minutes}}m"},update:{title:"Updates",currentVersion:"Current Version",channel:"Update Channel",checkUpdate:"Check for Updates",updating:"Updating...",confirmTitle:"Confirm Update",confirmDescription:"The Gateway will restart during the update and the connection will be briefly interrupted. Continue?",resultOk:"Update successful, version upgraded from {{before}} to {{after}}, Gateway is restarting",resultNoop:"Already up to date",resultError:"Update failed: {{reason}}"},advanced:{title:"Advanced",devMode:"Developer Mode",devModeHint:"Enable to show developer tools"},developer:{title:"Developer Tools",gatewayToken:"Gateway Token",tokenConfigured:"Configured",tokenHint:"Use CLI `openclaw config get gateway.auth.token` to view the full token",configPath:"Config File Path",rawConfig:"Raw Configuration",showConfig:"Show",hideConfig:"Hide",wsUrl:"WebSocket URL",connectionStatus:"Connection Status",copied:"Copied"},about:{title:"About",appName:"OpenClaw Office",tagline:"Multi-Agent collaboration visual monitoring",version:"Version",docs:"Documentation",github:"GitHub"},restartWarning:"Gateway will automatically restart after saving configuration, connection will be briefly interrupted",configConflict:"Configuration was modified by another client, automatically reloaded"},DC={statusLabels:{connected:"Connected",disconnected:"Disconnected",connecting:"Connecting",error:"Error"},taskStatus:{active:"Active",paused:"Paused"},schedule:{daily:"Daily at {{time}}",weekly:"Weekly {{day}} at {{time}}",every:"every {{minutes}}m",at:"at {{time}}",unknown:"unknown"},skillSource:{builtIn:"built-in",marketplace:"marketplace"}},MC={title:"Agent Management",description:"Manage agent configuration, core files, and model settings",panelTitle:"Agents",detailDescription:"Workspace and routing for agent {{id}}",configured:"{{count}} configured.",refresh:"Refresh",searchPlaceholder:"Search agents...",noAgents:"No agents",noAgentsDesc:"No agents configured yet",selectAgent:"Select an agent",selectAgentDesc:"Select an agent from the list to view details",defaultBadge:"DEFAULT",addAgent:"Add Agent",tabs:{overview:"Overview",files:"Files",tools:"Tools",skills:"Skills",channels:"Channels",cronJobs:"Cron Jobs"},overview:{title:"Basic Info",agentId:"Agent ID",name:"Name",workspace:"Workspace",isDefault:"Default Agent",yes:"Yes",no:"No",modelConfig:"Model Configuration",primaryModel:"Primary Model",primaryModelPlaceholder:"Select primary model...",fallbackModels:"Fallback Models",fallbackPlaceholder:"Select fallback model...",addFallback:"Add Fallback",save:"Save",saving:"Saving...",saveSuccess:"Saved successfully",saveError:"Failed to save",deleteAgent:"Delete Agent",cannotDeleteDefault:"Cannot delete default agent"},files:{title:"Core Files",description:"Bootstrap persona, identity, and tool guidance.",workspace:"Workspace",noFiles:"No files",selectFile:"Select a file to view its content",content:"Content",reset:"Reset",save:"Save",saving:"Saving...",saveSuccess:"File saved",saveError:"Failed to save",unsavedChanges:"Unsaved changes",justNow:"just now",hoursAgo:"{{count}}h ago",daysAgo:"{{count}}d ago"},tools:{title:"Tool Policy",profile:"Profile",allowList:"Allow List",denyList:"Deny List",noConfig:"No tool policy configured for this agent",all:"All"},skills:{title:"Skills Configuration",noRestriction:"No skill restrictions (uses all enabled skills)",defaultConfig:"Uses default skill configuration",allowedSkills:"Allowed Skills"},channels:{title:"Channel Routing",noBindings:"No channels bound to this agent"},cronJobs:{title:"Cron Jobs",noCronJobs:"No cron jobs for this agent"},createDialog:{title:"Add New Agent",name:"Name",namePlaceholder:"Enter agent name",nameRequired:"Name is required",workspace:"Workspace Path",workspacePlaceholder:"e.g. ~/.openclaw/workspace-myagent",workspaceRequired:"Workspace path is required",emoji:"Emoji",emojiPlaceholder:"e.g. 🤖",cancel:"Cancel",create:"Create",creating:"Creating..."},deleteDialog:{title:"Delete Agent",confirm:'Are you sure you want to delete agent "{{name}}"? This action cannot be undone.',deleteFiles:"Also delete workspace files",cancel:"Cancel",delete:"Delete",deleting:"Deleting..."}},RC={dashboard:NC,channels:EC,skills:AC,cron:TC,settings:_C,viewModels:DC,agents:MC},OC=["zh","en"],zC=["common","layout","office","panels","chat","console"];ze.use(wb).use(G2).init({resources:{zh:{common:Nj,layout:_j,office:Rj,panels:Bj,chat:Kj,console:Jj},en:{common:sC,layout:dC,office:gC,panels:vC,chat:CC,console:RC}},supportedLngs:[...OC],fallbackLng:"zh",defaultNS:"common",ns:[...zC],interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"],lookupLocalStorage:"i18nextLng"}});const LC="modulepreload",UC=function(e){return"/"+e},py={},Ha=function(n,a,l){let s=Promise.resolve();if(a&&a.length>0){let c=function(h){return Promise.all(h.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),g=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));s=c(a.map(h=>{if(h=UC(h),h in py)return;py[h]=!0;const x=h.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const b=document.createElement("link");if(b.rel=x?"stylesheet":LC,x||(b.as="script"),b.crossOrigin="",b.href=h,g&&b.setAttribute("nonce",g),document.head.appendChild(b),x)return new Promise((v,S)=>{b.addEventListener("load",v),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return s.then(c=>{for(const f of c||[])f.status==="rejected"&&o(f.reason);return n().catch(o)})};/**
|
|
69
|
+
*/var cy;function Z2(){if(cy)return Vd;cy=1;var e=Qo();function n(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var a=typeof Object.is=="function"?Object.is:n,l=e.useState,s=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function f(y,b){var v=b(),S=l({inst:{value:v,getSnapshot:b}}),N=S[0].inst,E=S[1];return o(function(){N.value=v,N.getSnapshot=b,g(N)&&E({inst:N})},[y,v,b]),s(function(){return g(N)&&E({inst:N}),y(function(){g(N)&&E({inst:N})})},[y]),c(v),v}function g(y){var b=y.getSnapshot;y=y.value;try{var v=b();return!a(y,v)}catch{return!0}}function h(y,b){return b()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Vd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,Vd}var dy;function J2(){return dy||(dy=1,Pd.exports=Z2()),Pd.exports}var W2=J2();const ej=(e,n)=>or(n)?n:B2(n)&&or(n.defaultValue)?n.defaultValue:Array.isArray(e)?e[e.length-1]:e,tj={t:ej,ready:!1},nj=()=>()=>{},oe=(e,n={})=>{var G,R,ae;const{i18n:a}=n,{i18n:l,defaultNS:s}=C.useContext(Q2)||{},o=a||l||Y2();o&&!o.reportNamespaces&&(o.reportNamespaces=new X2),o||bb(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const c=C.useMemo(()=>{var F;return{...P2(),...(F=o==null?void 0:o.options)==null?void 0:F.react,...n}},[o,n]),{useSuspense:f,keyPrefix:g}=c,h=e||s||((G=o==null?void 0:o.options)==null?void 0:G.defaultNS),x=or(h)?[h]:h||["translation"],y=C.useMemo(()=>x,x);(ae=(R=o==null?void 0:o.reportNamespaces)==null?void 0:R.addUsedNamespaces)==null||ae.call(R,y);const b=C.useRef(0),v=C.useCallback(F=>{if(!o)return nj;const{bindI18n:ie,bindI18nStore:ne}=c,W=()=>{b.current+=1,F()};return ie&&o.on(ie,W),ne&&o.store.on(ne,W),()=>{ie&&ie.split(" ").forEach(B=>o.off(B,W)),ne&&ne.split(" ").forEach(B=>o.store.off(B,W))}},[o,c]),S=C.useRef(),N=C.useCallback(()=>{if(!o)return tj;const F=!!(o.isInitialized||o.initializedStoreOnce)&&y.every(ce=>H2(ce,o,c)),ie=n.lng||o.language,ne=b.current,W=S.current;if(W&&W.ready===F&&W.lng===ie&&W.keyPrefix===g&&W.revision===ne)return W;const te={t:o.getFixedT(ie,c.nsMode==="fallback"?y:y[0],g),ready:F,lng:ie,keyPrefix:g,revision:ne};return S.current=te,te},[o,y,g,c,n.lng]),[E,j]=C.useState(0),{t:z,ready:T}=W2.useSyncExternalStore(v,N,N);C.useEffect(()=>{if(o&&!T&&!f){const F=()=>j(ie=>ie+1);n.lng?uy(o,n.lng,y,F):_f(o,y,F)}},[o,n.lng,y,T,f,E]);const P=o||{},H=C.useRef(null),L=C.useRef(),V=F=>{const ie=Object.getOwnPropertyDescriptors(F);ie.__original&&delete ie.__original;const ne=Object.create(Object.getPrototypeOf(F),ie);if(!Object.prototype.hasOwnProperty.call(ne,"__original"))try{Object.defineProperty(ne,"__original",{value:F,writable:!1,enumerable:!1,configurable:!1})}catch{}return ne},ee=C.useMemo(()=>{const F=P,ie=F==null?void 0:F.language;let ne=F;F&&(H.current&&H.current.__original===F?L.current!==ie?(ne=V(F),H.current=ne,L.current=ie):ne=H.current:(ne=V(F),H.current=ne,L.current=ie));const W=[z,ne,T];return W.t=z,W.i18n=ne,W.ready=T,W},[z,P,T,P.resolvedLanguage,P.language,P.languages]);if(o&&f&&!T)throw new Promise(F=>{const ie=()=>F();n.lng?uy(o,n.lng,y,ie):_f(o,y,ie)});return ee},{slice:aj,forEach:rj}=[];function lj(e){return rj.call(aj.call(arguments,1),n=>{if(n)for(const a in n)e[a]===void 0&&(e[a]=n[a])}),e}function ij(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(a=>a.test(e))}const fy=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,sj=function(e,n){const l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(n);let o=`${e}=${s}`;if(l.maxAge>0){const c=l.maxAge-0;if(Number.isNaN(c))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(c)}`}if(l.domain){if(!fy.test(l.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${l.domain}`}if(l.path){if(!fy.test(l.path))throw new TypeError("option path is invalid");o+=`; Path=${l.path}`}if(l.expires){if(typeof l.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${l.expires.toUTCString()}`}if(l.httpOnly&&(o+="; HttpOnly"),l.secure&&(o+="; Secure"),l.sameSite)switch(typeof l.sameSite=="string"?l.sameSite.toLowerCase():l.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l.partitioned&&(o+="; Partitioned"),o},hy={create(e,n,a,l){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};a&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+a*60*1e3)),l&&(s.domain=l),document.cookie=sj(e,n,s)},read(e){const n=`${e}=`,a=document.cookie.split(";");for(let l=0;l<a.length;l++){let s=a[l];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(n)===0)return s.substring(n.length,s.length)}return null},remove(e,n){this.create(e,"",-1,n)}};var oj={name:"cookie",lookup(e){let{lookupCookie:n}=e;if(n&&typeof document<"u")return hy.read(n)||void 0},cacheUserLanguage(e,n){let{lookupCookie:a,cookieMinutes:l,cookieDomain:s,cookieOptions:o}=n;a&&typeof document<"u"&&hy.create(a,e,l,s,o)}},uj={name:"querystring",lookup(e){var l;let{lookupQuerystring:n}=e,a;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((l=window.location.hash)==null?void 0:l.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const c=s.substring(1).split("&");for(let f=0;f<c.length;f++){const g=c[f].indexOf("=");g>0&&c[f].substring(0,g)===n&&(a=c[f].substring(g+1))}}return a}},cj={name:"hash",lookup(e){var s;let{lookupHash:n,lookupFromHashIndex:a}=e,l;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const c=o.substring(1);if(n){const f=c.split("&");for(let g=0;g<f.length;g++){const h=f[g].indexOf("=");h>0&&f[g].substring(0,h)===n&&(l=f[g].substring(h+1))}}if(l)return l;if(!l&&a>-1){const f=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?(s=f[typeof a=="number"?a:0])==null?void 0:s.replace("/",""):void 0}}}return l}};let al=null;const gy=()=>{if(al!==null)return al;try{if(al=typeof window<"u"&&window.localStorage!==null,!al)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{al=!1}return al};var dj={name:"localStorage",lookup(e){let{lookupLocalStorage:n}=e;if(n&&gy())return window.localStorage.getItem(n)||void 0},cacheUserLanguage(e,n){let{lookupLocalStorage:a}=n;a&&gy()&&window.localStorage.setItem(a,e)}};let rl=null;const py=()=>{if(rl!==null)return rl;try{if(rl=typeof window<"u"&&window.sessionStorage!==null,!rl)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{rl=!1}return rl};var fj={name:"sessionStorage",lookup(e){let{lookupSessionStorage:n}=e;if(n&&py())return window.sessionStorage.getItem(n)||void 0},cacheUserLanguage(e,n){let{lookupSessionStorage:a}=n;a&&py()&&window.sessionStorage.setItem(a,e)}},hj={name:"navigator",lookup(e){const n=[];if(typeof navigator<"u"){const{languages:a,userLanguage:l,language:s}=navigator;if(a)for(let o=0;o<a.length;o++)n.push(a[o]);l&&n.push(l),s&&n.push(s)}return n.length>0?n:void 0}},gj={name:"htmlTag",lookup(e){let{htmlTag:n}=e,a;const l=n||(typeof document<"u"?document.documentElement:null);return l&&typeof l.getAttribute=="function"&&(a=l.getAttribute("lang")),a}},pj={name:"path",lookup(e){var s;let{lookupFromPathIndex:n}=e;if(typeof window>"u")return;const a=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(s=a[typeof n=="number"?n:0])==null?void 0:s.replace("/",""):void 0}},mj={name:"subdomain",lookup(e){var s,o;let{lookupFromSubdomainIndex:n}=e;const a=typeof n=="number"?n+1:1,l=typeof window<"u"&&((o=(s=window.location)==null?void 0:s.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(l)return l[a]}};let Sb=!1;try{document.cookie,Sb=!0}catch{}const wb=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Sb||wb.splice(1,1);const yj=()=>({order:wb,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class jb{constructor(n){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(n,a)}init(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=lj(a,this.options||{},yj()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=l,this.addDetector(oj),this.addDetector(uj),this.addDetector(dj),this.addDetector(fj),this.addDetector(hj),this.addDetector(gj),this.addDetector(pj),this.addDetector(mj),this.addDetector(cj)}addDetector(n){return this.detectors[n.name]=n,this}detect(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,a=[];return n.forEach(l=>{if(this.detectors[l]){let s=this.detectors[l].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(a=a.concat(s))}}),a=a.filter(l=>l!=null&&!ij(l)).map(l=>this.options.convertDetectedLanguage(l)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}cacheUserLanguage(n){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;a&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||a.forEach(l=>{this.detectors[l]&&this.detectors[l].cacheUserLanguage(n,this.options)}))}}jb.type="languageDetector";const xj={connecting:"连接中...",connected:"已连接",reconnecting:"重连中",disconnected:"未连接",error:"连接错误",active:"活跃",paused:"已暂停",ok:"正常",failed:"失败",running:"运行中",pending:"等待中",disabled:"已禁用"},bj={send:"发送",cancel:"取消",close:"关闭",confirm:"确定",stop:"停止",retry:"重试",save:"保存",delete:"删除",refresh:"刷新",create:"创建",edit:"编辑"},vj={justNow:"刚刚",secondsAgo:"{{count}}秒前",minutesAgo:"{{count}}分前",hoursAgo:"{{count}}时前",running:"运行 {{seconds}}s",runningMinutes:"运行 {{minutes}}m {{seconds}}s"},kj={noData:"暂无数据",noCostData:"暂无成本数据",noActivityData:"暂无活跃数据",noRelationData:"暂无 Agent 关系数据",noEvents:"暂无事件",noMatchingAgents:"无匹配 Agent",noSubAgents:"无 Sub-Agent",waitingUsageData:"暂无数据,等待 usage 数据..."},Sj={statusLabels:{idle:"空闲",thinking:"思考中",tool_calling:"工具调用",speaking:"回复中",spawning:"创建中",error:"错误",offline:"离线"}},wj={desk:"固定工位区",meeting:"会议区",hotDesk:"热工位区",lounge:"休息区"},jj={notConnected:"未连接到 Gateway",operationFailed:"操作失败",operationTimeout:"操作超时,Gateway 可能暂不支持此操作",adapterNotInitialized:"Gateway Adapter 未初始化",unknownError:"未知错误",errorOccurred:"发生错误"},Nj={startRunning:"开始运行",thinking:"思考中",runEnded:"运行结束",fallback:"降级处理",toolCall:"调用工具: {{name}}",toolDone:"工具完成: {{name}}",errorPrefix:"错误: {{message}}",unknownStream:"未知流: {{stream}}",lifecycleUnknown:"生命周期: {{phase}}"},Cj={status:xj,actions:bj,time:vj,empty:kj,agent:Sj,zones:wj,errors:jj,events:Nj},Ej={activeCount:"活跃 <strong>{{active}}/{{total}}</strong>",tokens:"Tokens <strong>{{count}}</strong>",activeCountText:"活跃",tokensLabel:"Tokens",console:"控制台",office:"办公室",pageTitles:{dashboard:"仪表盘",channels:"渠道",skills:"技能",cron:"定时任务",agents:"智能体管理",settings:"设置",fallback:"控制台"},viewMode:{switchTo:"切换到 {{mode}} 视图",mobileNotSupported:"小屏幕不支持 3D 模式",webglNotSupported:"当前浏览器不支持 3D 渲染"},theme:{switchToDark:"切换到暗色模式",switchToLight:"切换到亮色模式"},language:{switchToEn:"切换到英文",switchToZh:"切换到中文"}},Aj={agents:"智能体",expand:"展开侧栏",collapse:"折叠侧栏",closeSidebar:"关闭侧栏",expandSidebar:"展开侧栏",collapseSidebar:"收起侧栏",metricsTitle:"概览 / 趋势",agentList:"智能体 列表",subAgents:"子智能体",agentDetail:"智能体 详情",eventTimeline:"事件时间轴",searchPlaceholder:"搜索 Agent...",filters:{all:"全部",active:"活跃",idle:"空闲",error:"错误"}},Tj={dashboard:"仪表盘",agents:"智能体",channels:"渠道",skills:"技能",cron:"定时任务",settings:"设置"},_j={topbar:Ej,sidebar:Aj,consoleNav:Tj},Mj="加载 3D 场景...",Dj={desk:"固定工位区",meeting:"会议区",hotDesk:"热工位区",lounge:"休息区"},Rj={loading3D:Mj,zones:Dj},Oj={activeAgents:"活跃 Agent",totalTokens:"总 Tokens",collaboration:"协作度",tokenRate:"Token 速率",tokenRateUnit:"/min",tabs:{overview:"概览",trend:"趋势",topology:"拓扑",activity:"活跃"}},zj={deselect:"取消选择",toolCallHistory:"工具调用历史"},Lj={newEvents:"新事件 ↓"},Uj={total:"总:",totalLine:"总量"},Hj={eventsUnit:"events"},Bj={metrics:Oj,agentDetail:zj,eventTimeline:Lj,tokenChart:Uj,activityHeatmap:Hj},qj={collapseDock:"收起对话",expandDock:"展开对话",attachmentWip:"附件(开发中)",placeholder:"输入消息... (Enter 发送, Shift+Enter 换行)",startNewChat:"开始一段新的对话",thinkingStatus:"思考中..."},Ij={defaultLabel:"Agent"},$j={sendMessage:"发送消息",killConfirm:"终止确认",inputPlaceholder:"输入指令...",killWarning:"确定要终止 <strong>{{name}}</strong> 的当前运行吗?此操作不可撤销。",kill:"终止"},Fj={pause:"暂停",resume:"恢复",notSupported:"暂不支持",kill:"终止",sendMessage:"发送消息",viewDetail:"查看详情",operatorRequired:"需要 operator 权限"},Kj={dock:qj,agentSelector:Ij,dialog:$j,contextMenu:Fj},Pj={title:"仪表盘",description:"系统概览:Gateway 状态、渠道连接、技能启用情况",loading:"加载仪表盘数据...",stats:{channels:"渠道连接",skills:"启用技能",usage:"Provider 用量",uptime:"运行时间",uptimeOnline:"在线"},alerts:{gatewayDisconnected:"Gateway 未连接,数据可能不是最新",channelErrors:"{{count}} 个渠道连接异常"},quickNav:{title:"快捷导航"},channelOverview:{title:"已连接渠道",empty:"暂无已连接渠道"},skillOverview:{title:"活跃技能",empty:"暂无已启用技能"}},Vj={title:"渠道",description:"管理消息渠道:Telegram、Discord、飞书 等",stats:{total:"总计",connected:"已连接",errors:"错误"},card:{lastConnected:"最后连接:{{time}}",details:"详情",logout:"登出"},empty:{title:"暂无已配置渠道",description:"点击下方渠道类型开始配置"},available:{title:"可用渠道类型",configured:"已配置",add:"添加"},types:{telegram:"Telegram",discord:"Discord",whatsapp:"WhatsApp",signal:"Signal",feishu:"飞书",imessage:"iMessage",matrix:"Matrix",line:"LINE",msteams:"MS Teams",googlechat:"Google Chat",mattermost:"Mattermost"},fields:{botToken:"Bot Token",applicationId:"Application ID",phoneNumber:"手机号",appId:"App ID",appSecret:"App Secret",homeserver:"Homeserver URL",accessToken:"Access Token",channelAccessToken:"Channel Access Token",channelSecret:"Channel Secret",appPassword:"App Password",serviceAccount:"Service Account JSON",serverUrl:"Server URL"},placeholders:{botToken:"输入 Bot Token",applicationId:"输入 Application ID",phoneNumber:"+86...",appId:"输入 App ID",appSecret:"输入 App Secret",homeserver:"https://matrix.org",accessToken:"输入 Access Token",channelAccessToken:"输入 Channel Access Token",channelSecret:"输入 Channel Secret",appPassword:"输入 App Password",serviceAccount:"粘贴 Service Account JSON",serverUrl:"https://mattermost.example.com"},configDialog:{required:"此字段为必填项",cancel:"取消",save:"保存"},qr:{description:"使用 WhatsApp 手机应用扫描 QR 码以配对",startPairing:"开始配对",loading:"正在获取 QR 码...",scanPrompt:"请用手机扫描 QR 码",waitingScan:"等待扫码...",success:"配对成功!",error:"配对失败"},logout:{title:"登出渠道",description:"确认要登出「{{name}}」吗?登出后需要重新配对。"}},Yj={title:"技能",description:"管理技能与插件:安装、启停、配置",tabs:{installed:"已安装",marketplace:"市场"},installed:{searchPlaceholder:"搜索已安装技能..."},filters:{all:"全部 ({{count}})","built-in":"内置 ({{count}})",marketplace:"市场 ({{count}})"},source:{builtIn:"内置",marketplace:"市场"},card:{configure:"配置",install:"安装",installing:"安装中...",missingDeps:"缺少依赖",coreProtected:"核心技能不可禁用"},detail:{info:"信息",source:"来源",version:"版本",author:"作者",primaryEnv:"主环境变量",homepage:"主页",requirements:"依赖项",config:"配置",configChecks:"配置检查",noConfig:"此技能无需配置",apiKeyPlaceholder:"输入 API Key",envVars:"环境变量",addVariable:"添加变量",noEnvVars:"暂未配置环境变量",keyPlaceholder:"键名",valuePlaceholder:"值",enabled:"已启用",disabled:"已禁用",saving:"保存中..."},install:{title:"安装 {{name}}"},marketplace:{securityNote:"安装前请先审查技能来源、主页说明和依赖要求。当前 Web 端市场基于 Gateway 返回的可安装技能列表展示。",searchPlaceholder:"搜索市场技能...",searchButton:"搜索",emptyTitle:"市场暂无技能",emptyDescription:"当前 Gateway 未返回可展示的市场技能",noResults:"没有匹配的市场技能",installed:"已安装",version:"版本 {{version}}",author:"作者 {{author}}",learnMore:"详情"},empty:{title:"暂无技能",description:"切换 Tab 或修改筛选条件"}},Gj={title:"定时任务",description:"管理定时任务:创建、编辑、启停、立即执行",stats:{total:"总计",active:"运行中",paused:"已暂停",failed:"失败"},card:{lastRun:"上次运行",nextRun:"下次运行",runNow:"立即执行"},presets:{everyHour:"每小时",daily9am:"每天 9:00",daily6pm:"每天 18:00",weeklyMon:"每周一 9:00",monthlyFirst:"每月 1 日",every30min:"每 30 分钟"},dialog:{createTitle:"创建定时任务",editTitle:"编辑定时任务",name:"任务名称",namePlaceholder:"输入任务名称",description:"描述",descriptionPlaceholder:"可选的任务描述",schedule:"执行计划",cronHelp:"标准 cron 表达式:分 时 日 月 周",message:"消息内容",messagePlaceholder:"输入发送给 Agent 的消息",required:"此字段为必填项"},empty:{title:"暂无定时任务",createFirst:"创建第一个任务"},delete:{title:"删除定时任务",description:"确认要删除此定时任务吗?此操作不可撤销。"},run:{title:"立即执行",description:"确认要立即执行此定时任务吗?"}},Qj={title:"设置",description:"应用设置:主题、Provider、Gateway、更新",appearance:{title:"外观",theme:"主题",themeLight:"浅色",themeDark:"深色",themeSystem:"跟随系统",language:"语言",langZh:"中文",langEn:"英文"},providers:{title:"AI 提供方",description:"管理 AI 模型供应商配置",add:"添加提供方",empty:"尚未配置 AI 提供方",emptyHint:"点击上方按钮添加第一个 AI 提供方",apiKeyConfigured:"已配置",apiKeyNotConfigured:"未配置",systemDiscovered:"系统发现",modelCount:"{{count}} 个模型",deleteTitle:"删除提供方",deleteDescription:"确认要删除提供方「{{name}}」吗?删除后需要重新配置。",addDialog:{title:"添加提供方",selectType:"选择提供方类型",backToSelect:"返回选择类型",providerId:"提供方 ID",providerIdHint:"配置文件中的唯一标识",baseUrl:"基础 URL",apiKey:"API Key",apiType:"API 类型",idConflict:"该提供方 ID 已存在",cancel:"取消",save:"保存"},editDialog:{title:"编辑提供方",apiKeyPlaceholder:"留空保持不变",cancel:"取消",save:"保存"},models:{title:"模型列表",add:"添加模型",remove:"删除模型",empty:"暂未配置模型,点击上方按钮添加",untitled:"未命名模型",id:"模型 ID",name:"显示名称",reasoning:"推理能力",inputTypes:"输入类型",input_text:"文本",input_image:"图片",yes:"支持",no:"不支持",apiOverride:"API 覆盖",inheritProvider:"继承提供方",contextWindow:"上下文窗口",maxTokens:"最大输出 Token",cost:"计费($/百万 Token)",costHint:"单位为美元/百万 Token,0 表示免费",cost_input:"输入",cost_output:"输出",cost_cacheRead:"缓存读取",cost_cacheWrite:"缓存写入",showAdvanced:"高级兼容性选项",hideAdvanced:"收起高级选项",default:"默认",thinkingFormat:"思考格式",maxTokensField:"maxTokens 字段名",compat_supportsStore:"支持存储/记忆",compat_supportsDeveloperRole:"支持开发者角色",compat_supportsReasoningEffort:"支持推理强度",compat_supportsUsageInStreaming:"流式返回用量",compat_supportsStrictMode:"支持严格模式",compat_requiresToolResultName:"工具结果需含名称",compat_requiresAssistantAfterToolResult:"工具结果后需 assistant",compat_requiresThinkingAsText:"思考以文本返回",compat_requiresMistralToolIds:"Mistral 工具 ID"}},gateway:{title:"Gateway",description:"Gateway 运行状态",version:"版本",port:"端口",uptime:"运行时间",mode:"运行模式",nodeVersion:"Node.js",platform:"平台",refresh:"刷新",notConnected:"Gateway 未连接",notConnectedHint:"请确保 OpenClaw Gateway 正在运行",uptimeFormat:"{{hours}}h {{minutes}}m"},update:{title:"更新",currentVersion:"当前版本",channel:"更新通道",checkUpdate:"检查更新",updating:"正在更新...",confirmTitle:"确认更新",confirmDescription:"更新过程中 Gateway 将重启,连接将短暂中断。确定继续?",resultOk:"更新成功,版本从 {{before}} 升级到 {{after}},Gateway 正在重启",resultNoop:"已是最新版本",resultError:"更新失败:{{reason}}"},advanced:{title:"高级",devMode:"开发者模式",devModeHint:"启用后将显示开发者工具选项"},developer:{title:"开发者工具",gatewayToken:"Gateway Token",tokenConfigured:"已配置",tokenHint:"使用 CLI `openclaw config get gateway.auth.token` 查看完整 Token",configPath:"配置文件路径",rawConfig:"原始配置",showConfig:"展开",hideConfig:"收起",wsUrl:"WebSocket URL",connectionStatus:"连接状态",copied:"已复制"},about:{title:"关于",appName:"OpenClaw Office",tagline:"多 Agent 协作可视化监控",version:"版本",docs:"文档",github:"GitHub"},restartWarning:"保存配置后 Gateway 将自动重启,连接将短暂中断",configConflict:"配置已被其他客户端修改,已自动重新加载"},Xj={statusLabels:{connected:"已连接",disconnected:"未连接",connecting:"连接中",error:"错误"},taskStatus:{active:"活跃",paused:"已暂停"},schedule:{daily:"每天 {{time}}",weekly:"每周 {{day}} {{time}}",every:"每 {{minutes}}m",at:"于 {{time}}",unknown:"未知"},skillSource:{builtIn:"内置",marketplace:"市场"}},Zj={title:"智能体管理",description:"管理智能体配置、核心文件和模型设置",panelTitle:"智能体",detailDescription:"智能体 {{id}} 的工作空间与路由配置",configured:"已配置 {{count}} 个",refresh:"刷新",searchPlaceholder:"搜索智能体...",noAgents:"暂无智能体",noAgentsDesc:"尚未配置任何智能体",selectAgent:"选择一个智能体",selectAgentDesc:"从左侧列表中选择一个智能体查看详情",defaultBadge:"默认",addAgent:"添加智能体",tabs:{overview:"概览",files:"文件",tools:"工具",skills:"技能",channels:"渠道",cronJobs:"定时任务"},overview:{title:"基本信息",agentId:"智能体 ID",name:"名称",workspace:"工作空间",isDefault:"默认智能体",yes:"是",no:"否",modelConfig:"模型配置",primaryModel:"主模型",primaryModelPlaceholder:"选择主模型...",fallbackModels:"备选模型",fallbackPlaceholder:"选择备用模型...",addFallback:"添加备选模型",save:"保存",saving:"保存中...",saveSuccess:"保存成功",saveError:"保存失败",deleteAgent:"删除智能体",cannotDeleteDefault:"无法删除默认智能体"},files:{title:"核心文件",description:"引导式角色设定、身份信息与工具使用说明。",workspace:"工作空间",noFiles:"暂无文件",selectFile:"选择一个文件查看内容",content:"内容",reset:"重置",save:"保存",saving:"保存中...",saveSuccess:"文件已保存",saveError:"保存失败",unsavedChanges:"有未保存的更改",justNow:"刚刚",hoursAgo:"{{count}} 小时前",daysAgo:"{{count}} 天前"},tools:{title:"工具策略",profile:"策略配置",allowList:"允许列表",denyList:"禁止列表",noConfig:"该智能体未配置工具策略",all:"全部"},skills:{title:"技能配置",noRestriction:"无技能限制(使用所有已启用技能)",defaultConfig:"使用默认技能配置",allowedSkills:"允许的技能"},channels:{title:"频道路由",noBindings:"该智能体未绑定任何频道"},cronJobs:{title:"定时任务",noCronJobs:"该智能体无定时任务"},createDialog:{title:"添加新智能体",name:"名称",namePlaceholder:"输入智能体名称",nameRequired:"请输入名称",workspace:"工作空间路径",workspacePlaceholder:"例如: ~/.openclaw/workspace-myagent",workspaceRequired:"请输入工作空间路径",emoji:"表情",emojiPlaceholder:"例如: 🤖",cancel:"取消",create:"创建",creating:"创建中..."},deleteDialog:{title:"删除智能体",confirm:"确认要删除智能体「{{name}}」吗?此操作不可逆。",deleteFiles:"同时删除工作空间文件",cancel:"取消",delete:"删除",deleting:"删除中..."}},Jj={dashboard:Pj,channels:Vj,skills:Yj,cron:Gj,settings:Qj,viewModels:Xj,agents:Zj},Wj={connecting:"Connecting...",connected:"Connected",reconnecting:"Reconnecting",disconnected:"Disconnected",error:"Connection Error",active:"Active",paused:"Paused",ok:"OK",failed:"Failed",running:"Running",pending:"Pending",disabled:"Disabled"},eN={send:"Send",cancel:"Cancel",close:"Close",confirm:"Confirm",stop:"Stop",retry:"Retry",save:"Save",delete:"Delete",refresh:"Refresh",create:"Create",edit:"Edit"},tN={justNow:"just now",secondsAgo:"{{count}}s ago",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",running:"running {{seconds}}s",runningMinutes:"running {{minutes}}m {{seconds}}s"},nN={noData:"No data",noCostData:"No cost data yet",noActivityData:"No activity data yet",noRelationData:"No agent relation data yet",noEvents:"No events yet",noMatchingAgents:"No matching agents",noSubAgents:"No sub-agents",waitingUsageData:"No data, waiting for usage data..."},aN={statusLabels:{idle:"Idle",thinking:"Thinking",tool_calling:"Tool Call",speaking:"Speaking",spawning:"Spawning",error:"Error",offline:"Offline"}},rN={desk:"Desk Zone",meeting:"Meeting Zone",hotDesk:"Hot Desk Zone",lounge:"Lounge Zone"},lN={notConnected:"Not connected to Gateway",operationFailed:"Operation failed",operationTimeout:"Operation timed out, Gateway may not support this action",adapterNotInitialized:"Gateway Adapter not initialized",unknownError:"Unknown error",errorOccurred:"An error occurred"},iN={startRunning:"Started running",thinking:"Thinking",runEnded:"Run ended",fallback:"Fallback",toolCall:"Tool call: {{name}}",toolDone:"Tool done: {{name}}",errorPrefix:"Error: {{message}}",unknownStream:"unknown stream: {{stream}}",lifecycleUnknown:"lifecycle: {{phase}}"},sN={status:Wj,actions:eN,time:tN,empty:nN,agent:aN,zones:rN,errors:lN,events:iN},oN={activeCount:"Active <strong>{{active}}/{{total}}</strong>",tokens:"Tokens <strong>{{count}}</strong>",activeCountText:"Active",tokensLabel:"Tokens",console:"Console",office:"Office",pageTitles:{dashboard:"Dashboard",channels:"Channels",skills:"Skills",cron:"Cron Tasks",agents:"Agents",settings:"Settings",fallback:"Console"},viewMode:{switchTo:"Switch to {{mode}} view",mobileNotSupported:"3D mode not supported on small screens",webglNotSupported:"3D rendering not supported in this browser"},theme:{switchToDark:"Switch to dark mode",switchToLight:"Switch to light mode"},language:{switchToEn:"Switch to English",switchToZh:"Switch to Chinese"}},uN={agents:"Agents",expand:"Expand sidebar",collapse:"Collapse sidebar",closeSidebar:"Close sidebar",expandSidebar:"Expand sidebar",collapseSidebar:"Collapse sidebar",metricsTitle:"Overview / Trends",agentList:"Agent List",subAgents:"Sub-Agents",agentDetail:"Agent Detail",eventTimeline:"Event Timeline",searchPlaceholder:"Search agents...",filters:{all:"All",active:"Active",idle:"Idle",error:"Error"}},cN={dashboard:"Dashboard",agents:"Agents",channels:"Channels",skills:"Skills",cron:"Cron Tasks",settings:"Settings"},dN={topbar:oN,sidebar:uN,consoleNav:cN},fN="Loading 3D scene...",hN={desk:"Desk Zone",meeting:"Meeting Zone",hotDesk:"Hot Desk Zone",lounge:"Lounge Zone"},gN={loading3D:fN,zones:hN},pN={activeAgents:"Active Agents",totalTokens:"Total Tokens",collaboration:"Collaboration",tokenRate:"Token Rate",tokenRateUnit:"/min",tabs:{overview:"Overview",trend:"Trend",topology:"Topology",activity:"Activity"}},mN={deselect:"Deselect",toolCallHistory:"Tool Call History"},yN={newEvents:"New events ↓"},xN={total:"Total:",totalLine:"Total"},bN={eventsUnit:"events"},vN={metrics:pN,agentDetail:mN,eventTimeline:yN,tokenChart:xN,activityHeatmap:bN},kN={collapseDock:"Collapse chat",expandDock:"Expand chat",attachmentWip:"Attachments (coming soon)",placeholder:"Type a message... (Enter to send, Shift+Enter for new line)",startNewChat:"Start a new conversation",thinkingStatus:"Thinking..."},SN={defaultLabel:"Agent"},wN={sendMessage:"Send Message",killConfirm:"Kill Confirmation",inputPlaceholder:"Enter command...",killWarning:"Are you sure you want to kill <strong>{{name}}</strong>'s current run? This cannot be undone.",kill:"Kill"},jN={pause:"Pause",resume:"Resume",notSupported:"Not supported yet",kill:"Kill",sendMessage:"Send Message",viewDetail:"View Detail",operatorRequired:"Operator permission required"},NN={dock:kN,agentSelector:SN,dialog:wN,contextMenu:jN},CN={title:"Dashboard",description:"System overview: Gateway status, channel connections, skill status",loading:"Loading dashboard data...",stats:{channels:"Channels",skills:"Skills",usage:"Provider Usage",uptime:"Uptime",uptimeOnline:"Online"},alerts:{gatewayDisconnected:"Gateway disconnected, data may not be up to date",channelErrors:"{{count}} channel(s) with errors"},quickNav:{title:"Quick Navigation"},channelOverview:{title:"Connected Channels",empty:"No connected channels"},skillOverview:{title:"Active Skills",empty:"No enabled skills"}},EN={title:"Channels",description:"Manage messaging channels: Telegram, Discord, WhatsApp, etc.",stats:{total:"Total",connected:"Connected",errors:"Errors"},card:{lastConnected:"Last connected: {{time}}",details:"Details",logout:"Logout"},empty:{title:"No channels configured",description:"Select a channel type below to get started"},available:{title:"Available Channel Types",configured:"Configured",add:"Add"},types:{telegram:"Telegram",discord:"Discord",whatsapp:"WhatsApp",signal:"Signal",feishu:"Feishu",imessage:"iMessage",matrix:"Matrix",line:"LINE",msteams:"MS Teams",googlechat:"Google Chat",mattermost:"Mattermost"},fields:{botToken:"Bot Token",applicationId:"Application ID",phoneNumber:"Phone Number",appId:"App ID",appSecret:"App Secret",homeserver:"Homeserver URL",accessToken:"Access Token",channelAccessToken:"Channel Access Token",channelSecret:"Channel Secret",appPassword:"App Password",serviceAccount:"Service Account JSON",serverUrl:"Server URL"},placeholders:{botToken:"Enter Bot Token",applicationId:"Enter Application ID",phoneNumber:"+1...",appId:"Enter App ID",appSecret:"Enter App Secret",homeserver:"https://matrix.org",accessToken:"Enter Access Token",channelAccessToken:"Enter Channel Access Token",channelSecret:"Enter Channel Secret",appPassword:"Enter App Password",serviceAccount:"Paste Service Account JSON",serverUrl:"https://mattermost.example.com"},configDialog:{required:"This field is required",cancel:"Cancel",save:"Save"},qr:{description:"Scan the QR code with your WhatsApp mobile app to pair",startPairing:"Start Pairing",loading:"Generating QR code...",scanPrompt:"Scan QR code with your phone",waitingScan:"Waiting for scan...",success:"Paired successfully!",error:"Pairing failed"},logout:{title:"Logout Channel",description:'Are you sure you want to logout "{{name}}"? You will need to re-pair.'}},AN={title:"Skills",description:"Manage skills and plugins: install, enable/disable, configure",tabs:{installed:"Installed",marketplace:"Marketplace"},installed:{searchPlaceholder:"Search installed skills..."},filters:{all:"All ({{count}})","built-in":"Built-in ({{count}})",marketplace:"Marketplace ({{count}})"},source:{builtIn:"Built-in",marketplace:"Marketplace"},card:{configure:"Configure",install:"Install",installing:"Installing...",missingDeps:"Missing dependencies",coreProtected:"Core skill cannot be disabled"},detail:{info:"Info",source:"Source",version:"Version",author:"Author",primaryEnv:"Primary environment variable",homepage:"Homepage",requirements:"Requirements",config:"Configuration",configChecks:"Config Checks",noConfig:"This skill requires no configuration",apiKeyPlaceholder:"Enter API Key",envVars:"Environment Variables",addVariable:"Add Variable",noEnvVars:"No environment variables configured",keyPlaceholder:"Key",valuePlaceholder:"Value",enabled:"Enabled",disabled:"Disabled",saving:"Saving..."},install:{title:"Install {{name}}"},marketplace:{securityNote:"Review the skill source, homepage, and dependency requirements before installing. This web marketplace view is built from the installable skills returned by the Gateway.",searchPlaceholder:"Search marketplace skills...",searchButton:"Search",emptyTitle:"No marketplace skills",emptyDescription:"The current Gateway did not return any marketplace-ready skills",noResults:"No marketplace skills match your search",installed:"Installed",version:"Version {{version}}",author:"Author {{author}}",learnMore:"Details"},empty:{title:"No skills found",description:"Try switching tabs or adjusting filters"}},TN={title:"Cron Tasks",description:"Manage cron tasks: create, edit, enable/disable, run immediately",stats:{total:"Total",active:"Active",paused:"Paused",failed:"Failed"},card:{lastRun:"Last run",nextRun:"Next run",runNow:"Run now"},presets:{everyHour:"Every hour",daily9am:"Daily 9 AM",daily6pm:"Daily 6 PM",weeklyMon:"Weekly Monday 9 AM",monthlyFirst:"Monthly 1st",every30min:"Every 30 min"},dialog:{createTitle:"Create Cron Task",editTitle:"Edit Cron Task",name:"Task Name",namePlaceholder:"Enter task name",description:"Description",descriptionPlaceholder:"Optional task description",schedule:"Schedule",cronHelp:"Standard cron expression: min hour day month weekday",message:"Message",messagePlaceholder:"Enter message to send to the agent",required:"This field is required"},empty:{title:"No cron tasks",createFirst:"Create your first task"},delete:{title:"Delete Cron Task",description:"Are you sure you want to delete this cron task? This cannot be undone."},run:{title:"Run Now",description:"Are you sure you want to run this cron task immediately?"}},_N={title:"Settings",description:"App settings: theme, provider, gateway, updates",appearance:{title:"Appearance",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",language:"Language",langZh:"中文",langEn:"English"},providers:{title:"AI Providers",description:"Manage AI model provider configurations",add:"Add Provider",empty:"No AI Providers configured",emptyHint:"Click the button above to add your first provider",apiKeyConfigured:"Configured",apiKeyNotConfigured:"Not configured",systemDiscovered:"System",modelCount:"{{count}} model(s)",deleteTitle:"Delete Provider",deleteDescription:'Are you sure you want to delete provider "{{name}}"? You will need to reconfigure it.',addDialog:{title:"Add Provider",selectType:"Select Provider Type",backToSelect:"Back to type selection",providerId:"Provider ID",providerIdHint:"Unique identifier in the config file",baseUrl:"Base URL",apiKey:"API Key",apiType:"API Type",idConflict:"This Provider ID already exists",cancel:"Cancel",save:"Save"},editDialog:{title:"Edit Provider",apiKeyPlaceholder:"Leave empty to keep unchanged",cancel:"Cancel",save:"Save"},models:{title:"Models",add:"Add Model",remove:"Remove Model",empty:"No models configured. Click above to add one.",untitled:"Untitled Model",id:"Model ID",name:"Display Name",reasoning:"Reasoning",inputTypes:"Input Types",input_text:"Text",input_image:"Image",yes:"Yes",no:"No",apiOverride:"API Override",inheritProvider:"Inherit from provider",contextWindow:"Context Window",maxTokens:"Max Output Tokens",cost:"Cost ($/M tokens)",costHint:"In USD per million tokens. 0 means free.",cost_input:"Input",cost_output:"Output",cost_cacheRead:"Cache Read",cost_cacheWrite:"Cache Write",showAdvanced:"Advanced compatibility options",hideAdvanced:"Hide advanced options",default:"Default",thinkingFormat:"Thinking Format",maxTokensField:"maxTokens Field Name",compat_supportsStore:"Supports store/memory",compat_supportsDeveloperRole:"Supports developer role",compat_supportsReasoningEffort:"Supports reasoning effort",compat_supportsUsageInStreaming:"Usage in streaming",compat_supportsStrictMode:"Supports strict mode",compat_requiresToolResultName:"Requires tool result name",compat_requiresAssistantAfterToolResult:"Requires assistant after tool result",compat_requiresThinkingAsText:"Thinking as text",compat_requiresMistralToolIds:"Mistral tool IDs"}},gateway:{title:"Gateway",description:"Gateway runtime status",version:"Version",port:"Port",uptime:"Uptime",mode:"Mode",nodeVersion:"Node.js",platform:"Platform",refresh:"Refresh",notConnected:"Gateway not connected",notConnectedHint:"Make sure OpenClaw Gateway is running",uptimeFormat:"{{hours}}h {{minutes}}m"},update:{title:"Updates",currentVersion:"Current Version",channel:"Update Channel",checkUpdate:"Check for Updates",updating:"Updating...",confirmTitle:"Confirm Update",confirmDescription:"The Gateway will restart during the update and the connection will be briefly interrupted. Continue?",resultOk:"Update successful, version upgraded from {{before}} to {{after}}, Gateway is restarting",resultNoop:"Already up to date",resultError:"Update failed: {{reason}}"},advanced:{title:"Advanced",devMode:"Developer Mode",devModeHint:"Enable to show developer tools"},developer:{title:"Developer Tools",gatewayToken:"Gateway Token",tokenConfigured:"Configured",tokenHint:"Use CLI `openclaw config get gateway.auth.token` to view the full token",configPath:"Config File Path",rawConfig:"Raw Configuration",showConfig:"Show",hideConfig:"Hide",wsUrl:"WebSocket URL",connectionStatus:"Connection Status",copied:"Copied"},about:{title:"About",appName:"OpenClaw Office",tagline:"Multi-Agent collaboration visual monitoring",version:"Version",docs:"Documentation",github:"GitHub"},restartWarning:"Gateway will automatically restart after saving configuration, connection will be briefly interrupted",configConflict:"Configuration was modified by another client, automatically reloaded"},MN={statusLabels:{connected:"Connected",disconnected:"Disconnected",connecting:"Connecting",error:"Error"},taskStatus:{active:"Active",paused:"Paused"},schedule:{daily:"Daily at {{time}}",weekly:"Weekly {{day}} at {{time}}",every:"every {{minutes}}m",at:"at {{time}}",unknown:"unknown"},skillSource:{builtIn:"built-in",marketplace:"marketplace"}},DN={title:"Agent Management",description:"Manage agent configuration, core files, and model settings",panelTitle:"Agents",detailDescription:"Workspace and routing for agent {{id}}",configured:"{{count}} configured.",refresh:"Refresh",searchPlaceholder:"Search agents...",noAgents:"No agents",noAgentsDesc:"No agents configured yet",selectAgent:"Select an agent",selectAgentDesc:"Select an agent from the list to view details",defaultBadge:"DEFAULT",addAgent:"Add Agent",tabs:{overview:"Overview",files:"Files",tools:"Tools",skills:"Skills",channels:"Channels",cronJobs:"Cron Jobs"},overview:{title:"Basic Info",agentId:"Agent ID",name:"Name",workspace:"Workspace",isDefault:"Default Agent",yes:"Yes",no:"No",modelConfig:"Model Configuration",primaryModel:"Primary Model",primaryModelPlaceholder:"Select primary model...",fallbackModels:"Fallback Models",fallbackPlaceholder:"Select fallback model...",addFallback:"Add Fallback",save:"Save",saving:"Saving...",saveSuccess:"Saved successfully",saveError:"Failed to save",deleteAgent:"Delete Agent",cannotDeleteDefault:"Cannot delete default agent"},files:{title:"Core Files",description:"Bootstrap persona, identity, and tool guidance.",workspace:"Workspace",noFiles:"No files",selectFile:"Select a file to view its content",content:"Content",reset:"Reset",save:"Save",saving:"Saving...",saveSuccess:"File saved",saveError:"Failed to save",unsavedChanges:"Unsaved changes",justNow:"just now",hoursAgo:"{{count}}h ago",daysAgo:"{{count}}d ago"},tools:{title:"Tool Policy",profile:"Profile",allowList:"Allow List",denyList:"Deny List",noConfig:"No tool policy configured for this agent",all:"All"},skills:{title:"Skills Configuration",noRestriction:"No skill restrictions (uses all enabled skills)",defaultConfig:"Uses default skill configuration",allowedSkills:"Allowed Skills"},channels:{title:"Channel Routing",noBindings:"No channels bound to this agent"},cronJobs:{title:"Cron Jobs",noCronJobs:"No cron jobs for this agent"},createDialog:{title:"Add New Agent",name:"Name",namePlaceholder:"Enter agent name",nameRequired:"Name is required",workspace:"Workspace Path",workspacePlaceholder:"e.g. ~/.openclaw/workspace-myagent",workspaceRequired:"Workspace path is required",emoji:"Emoji",emojiPlaceholder:"e.g. 🤖",cancel:"Cancel",create:"Create",creating:"Creating..."},deleteDialog:{title:"Delete Agent",confirm:'Are you sure you want to delete agent "{{name}}"? This action cannot be undone.',deleteFiles:"Also delete workspace files",cancel:"Cancel",delete:"Delete",deleting:"Deleting..."}},RN={dashboard:CN,channels:EN,skills:AN,cron:TN,settings:_N,viewModels:MN,agents:DN},ON=["zh","en"],zN=["common","layout","office","panels","chat","console"];ze.use(jb).use(G2).init({resources:{zh:{common:Cj,layout:_j,office:Rj,panels:Bj,chat:Kj,console:Jj},en:{common:sN,layout:dN,office:gN,panels:vN,chat:NN,console:RN}},supportedLngs:[...ON],fallbackLng:"zh",defaultNS:"common",ns:[...zN],interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"],lookupLocalStorage:"i18nextLng"}});const LN="modulepreload",UN=function(e){return"/"+e},my={},Ha=function(n,a,l){let s=Promise.resolve();if(a&&a.length>0){let c=function(h){return Promise.all(h.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),g=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));s=c(a.map(h=>{if(h=UN(h),h in my)return;my[h]=!0;const x=h.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const b=document.createElement("link");if(b.rel=x?"stylesheet":LN,x||(b.as="script"),b.crossOrigin="",b.href=h,g&&b.setAttribute("nonce",g),document.head.appendChild(b),x)return new Promise((v,S)=>{b.addEventListener("load",v),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return s.then(c=>{for(const f of c||[])f.status==="rejected"&&o(f.reason);return n().catch(o)})};/**
|
|
70
70
|
* @license lucide-react v0.575.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/const
|
|
74
|
+
*/const Nb=(...e)=>e.filter((n,a,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===a).join(" ").trim();/**
|
|
75
75
|
* @license lucide-react v0.575.0 - ISC
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const
|
|
79
|
+
*/const HN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
80
80
|
* @license lucide-react v0.575.0 - ISC
|
|
81
81
|
*
|
|
82
82
|
* This source code is licensed under the ISC license.
|
|
83
83
|
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const
|
|
84
|
+
*/const BN=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,l)=>l?l.toUpperCase():a.toLowerCase());/**
|
|
85
85
|
* @license lucide-react v0.575.0 - ISC
|
|
86
86
|
*
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const
|
|
89
|
+
*/const yy=e=>{const n=BN(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
|
|
90
90
|
* @license lucide-react v0.575.0 - ISC
|
|
91
91
|
*
|
|
92
92
|
* This source code is licensed under the ISC license.
|
|
93
93
|
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
-
*/var
|
|
94
|
+
*/var qN={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"};/**
|
|
95
95
|
* @license lucide-react v0.575.0 - ISC
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the ISC license.
|
|
98
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const
|
|
99
|
+
*/const IN=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};/**
|
|
100
100
|
* @license lucide-react v0.575.0 - ISC
|
|
101
101
|
*
|
|
102
102
|
* This source code is licensed under the ISC license.
|
|
103
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const $C
|
|
104
|
+
*/const $N=C.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:s="",children:o,iconNode:c,...f},g)=>C.createElement("svg",{ref:g,...qN,width:n,height:n,stroke:e,strokeWidth:l?Number(a)*24/Number(n):a,className:Nb("lucide",s),...!o&&!IN(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,x])=>C.createElement(h,x)),...Array.isArray(o)?o:[o]]));/**
|
|
105
105
|
* @license lucide-react v0.575.0 - ISC
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/const
|
|
109
|
+
*/const ye=(e,n)=>{const a=C.forwardRef(({className:l,...s},o)=>C.createElement($N,{ref:o,iconNode:n,className:Nb(`lucide-${HN(yy(e))}`,`lucide-${e}`,l),...s}));return a.displayName=yy(e),a};/**
|
|
110
110
|
* @license lucide-react v0.575.0 - ISC
|
|
111
111
|
*
|
|
112
112
|
* This source code is licensed under the ISC license.
|
|
113
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/const
|
|
114
|
+
*/const FN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],KN=ye("arrow-down",FN);/**
|
|
115
115
|
* @license lucide-react v0.575.0 - ISC
|
|
116
116
|
*
|
|
117
117
|
* This source code is licensed under the ISC license.
|
|
118
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/const
|
|
119
|
+
*/const PN=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Cb=ye("arrow-left",PN);/**
|
|
120
120
|
* @license lucide-react v0.575.0 - ISC
|
|
121
121
|
*
|
|
122
122
|
* This source code is licensed under the ISC license.
|
|
123
123
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
-
*/const
|
|
124
|
+
*/const VN=[["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"}]],Eb=ye("bot",VN);/**
|
|
125
125
|
* @license lucide-react v0.575.0 - ISC
|
|
126
126
|
*
|
|
127
127
|
* This source code is licensed under the ISC license.
|
|
128
128
|
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/const
|
|
129
|
+
*/const YN=[["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:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["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:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],GN=ye("brain-circuit",YN);/**
|
|
130
130
|
* @license lucide-react v0.575.0 - ISC
|
|
131
131
|
*
|
|
132
132
|
* This source code is licensed under the ISC license.
|
|
133
133
|
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/const
|
|
134
|
+
*/const QN=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],qo=ye("brain",QN);/**
|
|
135
135
|
* @license lucide-react v0.575.0 - ISC
|
|
136
136
|
*
|
|
137
137
|
* This source code is licensed under the ISC license.
|
|
138
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/const
|
|
139
|
+
*/const XN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ul=ye("check",XN);/**
|
|
140
140
|
* @license lucide-react v0.575.0 - ISC
|
|
141
141
|
*
|
|
142
142
|
* This source code is licensed under the ISC license.
|
|
143
143
|
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/const
|
|
144
|
+
*/const ZN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sa=ye("chevron-down",ZN);/**
|
|
145
145
|
* @license lucide-react v0.575.0 - ISC
|
|
146
146
|
*
|
|
147
147
|
* This source code is licensed under the ISC license.
|
|
148
148
|
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*/const
|
|
149
|
+
*/const JN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],WN=ye("chevron-right",JN);/**
|
|
150
150
|
* @license lucide-react v0.575.0 - ISC
|
|
151
151
|
*
|
|
152
152
|
* This source code is licensed under the ISC license.
|
|
153
153
|
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/const
|
|
154
|
+
*/const eC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],rh=ye("chevron-up",eC);/**
|
|
155
155
|
* @license lucide-react v0.575.0 - ISC
|
|
156
156
|
*
|
|
157
157
|
* This source code is licensed under the ISC license.
|
|
158
158
|
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/const
|
|
159
|
+
*/const tC=[["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"}]],Ab=ye("circle-alert",tC);/**
|
|
160
160
|
* @license lucide-react v0.575.0 - ISC
|
|
161
161
|
*
|
|
162
162
|
* This source code is licensed under the ISC license.
|
|
163
163
|
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/const
|
|
164
|
+
*/const nC=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],lh=ye("circle-check-big",nC);/**
|
|
165
165
|
* @license lucide-react v0.575.0 - ISC
|
|
166
166
|
*
|
|
167
167
|
* This source code is licensed under the ISC license.
|
|
168
168
|
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const
|
|
169
|
+
*/const aC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],rC=ye("circle-check",aC);/**
|
|
170
170
|
* @license lucide-react v0.575.0 - ISC
|
|
171
171
|
*
|
|
172
172
|
* This source code is licensed under the ISC license.
|
|
173
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const
|
|
174
|
+
*/const lC=[["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"}]],eu=ye("circle-x",lC);/**
|
|
175
175
|
* @license lucide-react v0.575.0 - ISC
|
|
176
176
|
*
|
|
177
177
|
* This source code is licensed under the ISC license.
|
|
178
178
|
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/const
|
|
179
|
+
*/const iC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],tu=ye("clock",iC);/**
|
|
180
180
|
* @license lucide-react v0.575.0 - ISC
|
|
181
181
|
*
|
|
182
182
|
* This source code is licensed under the ISC license.
|
|
183
183
|
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/const
|
|
184
|
+
*/const sC=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],oC=ye("copy",sC);/**
|
|
185
185
|
* @license lucide-react v0.575.0 - ISC
|
|
186
186
|
*
|
|
187
187
|
* This source code is licensed under the ISC license.
|
|
188
188
|
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
-
*/const
|
|
189
|
+
*/const uC=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Tb=ye("download",uC);/**
|
|
190
190
|
* @license lucide-react v0.575.0 - ISC
|
|
191
191
|
*
|
|
192
192
|
* This source code is licensed under the ISC license.
|
|
193
193
|
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/const
|
|
194
|
+
*/const cC=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Di=ye("external-link",cC);/**
|
|
195
195
|
* @license lucide-react v0.575.0 - ISC
|
|
196
196
|
*
|
|
197
197
|
* This source code is licensed under the ISC license.
|
|
198
198
|
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
-
*/const
|
|
199
|
+
*/const dC=[["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"}]],nu=ye("eye-off",dC);/**
|
|
200
200
|
* @license lucide-react v0.575.0 - ISC
|
|
201
201
|
*
|
|
202
202
|
* This source code is licensed under the ISC license.
|
|
203
203
|
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
-
*/const
|
|
204
|
+
*/const fC=[["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"}]],au=ye("eye",fC);/**
|
|
205
205
|
* @license lucide-react v0.575.0 - ISC
|
|
206
206
|
*
|
|
207
207
|
* This source code is licensed under the ISC license.
|
|
208
208
|
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
-
*/const
|
|
209
|
+
*/const hC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],gC=ye("globe",hC);/**
|
|
210
210
|
* @license lucide-react v0.575.0 - ISC
|
|
211
211
|
*
|
|
212
212
|
* This source code is licensed under the ISC license.
|
|
213
213
|
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
-
*/const
|
|
214
|
+
*/const pC=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],mC=ye("house",pC);/**
|
|
215
215
|
* @license lucide-react v0.575.0 - ISC
|
|
216
216
|
*
|
|
217
217
|
* This source code is licensed under the ISC license.
|
|
218
218
|
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/const
|
|
219
|
+
*/const yC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Io=ye("image",yC);/**
|
|
220
220
|
* @license lucide-react v0.575.0 - ISC
|
|
221
221
|
*
|
|
222
222
|
* This source code is licensed under the ISC license.
|
|
223
223
|
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
-
*/const
|
|
224
|
+
*/const xC=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["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"}]],bC=ye("inbox",xC);/**
|
|
225
225
|
* @license lucide-react v0.575.0 - ISC
|
|
226
226
|
*
|
|
227
227
|
* This source code is licensed under the ISC license.
|
|
228
228
|
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
-
*/const
|
|
229
|
+
*/const vC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],_b=ye("info",vC);/**
|
|
230
230
|
* @license lucide-react v0.575.0 - ISC
|
|
231
231
|
*
|
|
232
232
|
* This source code is licensed under the ISC license.
|
|
233
233
|
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
-
*/const
|
|
234
|
+
*/const kC=[["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"}]],SC=ye("layout-dashboard",kC);/**
|
|
235
235
|
* @license lucide-react v0.575.0 - ISC
|
|
236
236
|
*
|
|
237
237
|
* This source code is licensed under the ISC license.
|
|
238
238
|
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
-
*/const
|
|
239
|
+
*/const wC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ri=ye("loader-circle",wC);/**
|
|
240
240
|
* @license lucide-react v0.575.0 - ISC
|
|
241
241
|
*
|
|
242
242
|
* This source code is licensed under the ISC license.
|
|
243
243
|
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
-
*/const
|
|
244
|
+
*/const jC=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Mb=ye("lock",jC);/**
|
|
245
245
|
* @license lucide-react v0.575.0 - ISC
|
|
246
246
|
*
|
|
247
247
|
* This source code is licensed under the ISC license.
|
|
248
248
|
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
-
*/const
|
|
249
|
+
*/const NC=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],CC=ye("log-out",NC);/**
|
|
250
250
|
* @license lucide-react v0.575.0 - ISC
|
|
251
251
|
*
|
|
252
252
|
* This source code is licensed under the ISC license.
|
|
253
253
|
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
-
*/const
|
|
254
|
+
*/const EC=[["path",{d:"M5 12h14",key:"1ays0h"}]],AC=ye("minus",EC);/**
|
|
255
255
|
* @license lucide-react v0.575.0 - ISC
|
|
256
256
|
*
|
|
257
257
|
* This source code is licensed under the ISC license.
|
|
258
258
|
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
-
*/const
|
|
259
|
+
*/const TC=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],_C=ye("monitor",TC);/**
|
|
260
260
|
* @license lucide-react v0.575.0 - ISC
|
|
261
261
|
*
|
|
262
262
|
* This source code is licensed under the ISC license.
|
|
263
263
|
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
-
*/const
|
|
264
|
+
*/const MC=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],DC=ye("moon",MC);/**
|
|
265
265
|
* @license lucide-react v0.575.0 - ISC
|
|
266
266
|
*
|
|
267
267
|
* This source code is licensed under the ISC license.
|
|
268
268
|
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
-
*/const
|
|
269
|
+
*/const RC=[["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"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],xy=ye("package",RC);/**
|
|
270
270
|
* @license lucide-react v0.575.0 - ISC
|
|
271
271
|
*
|
|
272
272
|
* This source code is licensed under the ISC license.
|
|
273
273
|
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
-
*/const
|
|
274
|
+
*/const OC=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],zC=ye("paperclip",OC);/**
|
|
275
275
|
* @license lucide-react v0.575.0 - ISC
|
|
276
276
|
*
|
|
277
277
|
* This source code is licensed under the ISC license.
|
|
278
278
|
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
-
*/const
|
|
279
|
+
*/const LC=[["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"}]],Db=ye("pencil",LC);/**
|
|
280
280
|
* @license lucide-react v0.575.0 - ISC
|
|
281
281
|
*
|
|
282
282
|
* This source code is licensed under the ISC license.
|
|
283
283
|
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
-
*/const
|
|
284
|
+
*/const UC=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],HC=ye("play",UC);/**
|
|
285
285
|
* @license lucide-react v0.575.0 - ISC
|
|
286
286
|
*
|
|
287
287
|
* This source code is licensed under the ISC license.
|
|
288
288
|
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
-
*/const
|
|
289
|
+
*/const BC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],fr=ye("plus",BC);/**
|
|
290
290
|
* @license lucide-react v0.575.0 - ISC
|
|
291
291
|
*
|
|
292
292
|
* This source code is licensed under the ISC license.
|
|
293
293
|
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
-
*/const
|
|
294
|
+
*/const qC=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Rb=ye("puzzle",qC);/**
|
|
295
295
|
* @license lucide-react v0.575.0 - ISC
|
|
296
296
|
*
|
|
297
297
|
* This source code is licensed under the ISC license.
|
|
298
298
|
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
-
*/const
|
|
299
|
+
*/const IC=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],ru=ye("radio",IC);/**
|
|
300
300
|
* @license lucide-react v0.575.0 - ISC
|
|
301
301
|
*
|
|
302
302
|
* This source code is licensed under the ISC license.
|
|
303
303
|
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
-
*/const $
|
|
304
|
+
*/const $C=[["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"}]],hr=ye("refresh-cw",$C);/**
|
|
305
305
|
* @license lucide-react v0.575.0 - ISC
|
|
306
306
|
*
|
|
307
307
|
* This source code is licensed under the ISC license.
|
|
308
308
|
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
-
*/const
|
|
309
|
+
*/const FC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Df=ye("search",FC);/**
|
|
310
310
|
* @license lucide-react v0.575.0 - ISC
|
|
311
311
|
*
|
|
312
312
|
* This source code is licensed under the ISC license.
|
|
313
313
|
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
-
*/const
|
|
314
|
+
*/const KC=[["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"}]],PC=ye("send",KC);/**
|
|
315
315
|
* @license lucide-react v0.575.0 - ISC
|
|
316
316
|
*
|
|
317
317
|
* This source code is licensed under the ISC license.
|
|
318
318
|
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
-
*/const
|
|
319
|
+
*/const VC=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ih=ye("settings",VC);/**
|
|
320
320
|
* @license lucide-react v0.575.0 - ISC
|
|
321
321
|
*
|
|
322
322
|
* This source code is licensed under the ISC license.
|
|
323
323
|
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
-
*/const
|
|
324
|
+
*/const YC=[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],GC=ye("shield-check",YC);/**
|
|
325
325
|
* @license lucide-react v0.575.0 - ISC
|
|
326
326
|
*
|
|
327
327
|
* This source code is licensed under the ISC license.
|
|
328
328
|
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
-
*/const
|
|
329
|
+
*/const QC=[["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"}]],XC=ye("shield",QC);/**
|
|
330
330
|
* @license lucide-react v0.575.0 - ISC
|
|
331
331
|
*
|
|
332
332
|
* This source code is licensed under the ISC license.
|
|
333
333
|
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
-
*/const
|
|
334
|
+
*/const ZC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],JC=ye("square",ZC);/**
|
|
335
335
|
* @license lucide-react v0.575.0 - ISC
|
|
336
336
|
*
|
|
337
337
|
* This source code is licensed under the ISC license.
|
|
338
338
|
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
-
*/const
|
|
339
|
+
*/const WC=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],e4=ye("sun",WC);/**
|
|
340
340
|
* @license lucide-react v0.575.0 - ISC
|
|
341
341
|
*
|
|
342
342
|
* This source code is licensed under the ISC license.
|
|
343
343
|
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
-
*/const
|
|
344
|
+
*/const t4=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Yi=ye("trash-2",t4);/**
|
|
345
345
|
* @license lucide-react v0.575.0 - ISC
|
|
346
346
|
*
|
|
347
347
|
* This source code is licensed under the ISC license.
|
|
348
348
|
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
-
*/const
|
|
349
|
+
*/const n4=[["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"}]],lu=ye("triangle-alert",n4);/**
|
|
350
350
|
* @license lucide-react v0.575.0 - ISC
|
|
351
351
|
*
|
|
352
352
|
* This source code is licensed under the ISC license.
|
|
353
353
|
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
-
*/const a4=[["path",{d:"M12
|
|
354
|
+
*/const a4=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],r4=ye("type",a4);/**
|
|
355
355
|
* @license lucide-react v0.575.0 - ISC
|
|
356
356
|
*
|
|
357
357
|
* This source code is licensed under the ISC license.
|
|
358
358
|
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
-
*/const l4=[["path",{d:"
|
|
359
|
+
*/const l4=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],i4=ye("wifi-off",l4);/**
|
|
360
360
|
* @license lucide-react v0.575.0 - ISC
|
|
361
361
|
*
|
|
362
362
|
* This source code is licensed under the ISC license.
|
|
363
363
|
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
-
*/const
|
|
364
|
+
*/const s4=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],sh=ye("wrench",s4);/**
|
|
365
365
|
* @license lucide-react v0.575.0 - ISC
|
|
366
366
|
*
|
|
367
367
|
* This source code is licensed under the ISC license.
|
|
368
368
|
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
-
*/const
|
|
370
|
-
`):""}const Et=oa((e,n)=>({messages:[],isStreaming:!1,currentSessionKey:"agent:main:main",dockExpanded:!1,targetAgentId:null,sessions:[],error:null,activeRunId:null,streamingMessage:null,sendMessage:async a=>{const l=a.trim();if(!l)return;const{currentSessionKey:s}=n(),o={id:Cy(),role:"user",content:l,timestamp:Date.now()};e(c=>({messages:[...c.messages,o],isStreaming:!0,error:null,streamingMessage:null}));try{let c;try{c=Xe()}catch(f){console.error("[ChatDock] Adapter not initialized:",f),e({error:ze.t("common:errors.adapterNotInitialized"),isStreaming:!1});return}console.log("[ChatDock] Sending chat.send:",{text:l,sessionKey:s}),await c.chatSend({text:l,sessionKey:s}),console.log("[ChatDock] chat.send completed")}catch(c){console.error("[ChatDock] chat.send error:",c),e({error:String(c),isStreaming:!1})}},abort:async()=>{const{currentSessionKey:a}=n();e({isStreaming:!1,streamingMessage:null});try{await Xe().chatAbort(a)}catch(l){e({error:String(l)})}},toggleDock:()=>{e(a=>({dockExpanded:!a.dockExpanded}))},setDockExpanded:a=>{e({dockExpanded:a})},switchSession:a=>{e({currentSessionKey:a,messages:[],streamingMessage:null,activeRunId:null,error:null,isStreaming:!1}),n().loadHistory()},newSession:()=>{const{targetAgentId:a}=n(),s=`agent:${a??"main"}:session-${Date.now()}`;e({currentSessionKey:s,messages:[],streamingMessage:null,activeRunId:null,error:null,isStreaming:!1})},loadSessions:async()=>{try{const l=await Xe().sessionsList();e({sessions:l})}catch{}},loadHistory:async()=>{const{currentSessionKey:a}=n();try{const o=(await Xe().chatHistory(a)).map(c=>({id:c.id,role:c.role==="user"?"user":"assistant",content:c.content,timestamp:c.timestamp}));e({messages:o})}catch{e({messages:[]})}},setTargetAgent:a=>{const l=T4(a);e({targetAgentId:a,currentSessionKey:l,messages:[],streamingMessage:null,activeRunId:null,error:null,isStreaming:!1}),n().loadHistory()},handleChatEvent:a=>{const l=String(a.state||""),s=String(a.runId||""),o=a.message;let c=l;switch(!c&&o&&(o.stopReason??o.stop_reason?c="final":(o.role||o.content)&&(c="delta")),c){case"delta":{o&&e({streamingMessage:o,activeRunId:s||n().activeRunId});break}case"final":{if(o){const f=_4(o.content);if(f){const g={id:o.id||Cy(),role:"assistant",content:f,timestamp:Date.now()};e(h=>({messages:[...h.messages,g],isStreaming:!1,streamingMessage:null,activeRunId:null}))}else e({isStreaming:!1,streamingMessage:null,activeRunId:null}),n().loadHistory()}else e({isStreaming:!1,streamingMessage:null,activeRunId:null}),n().loadHistory();break}case"error":{const f=String(a.errorMessage||ze.t("common:errors.errorOccurred"));e({error:f,isStreaming:!1,streamingMessage:null,activeRunId:null});break}case"aborted":{e({isStreaming:!1,streamingMessage:null,activeRunId:null});break}default:{n().isStreaming&&o&&e({streamingMessage:o});break}}},clearError:()=>e({error:null}),initEventListeners:a=>a?a.onEvent("chat",s=>{const o=s.payload;n().handleChatEvent(o)}):()=>{}}));var Ob=Symbol.for("immer-nothing"),Ny=Symbol.for("immer-draftable"),Ie=Symbol.for("immer-state");function yn(e,...n){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Oi=Object.getPrototypeOf;function dl(e){return!!e&&!!e[Ie]}function ia(e){var n;return e?zb(e)||Array.isArray(e)||!!e[Ny]||!!((n=e.constructor)!=null&&n[Ny])||Gi(e)||lu(e):!1}var D4=Object.prototype.constructor.toString(),Ey=new WeakMap;function zb(e){if(!e||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);if(n===null||n===Object.prototype)return!0;const a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;if(a===Object)return!0;if(typeof a!="function")return!1;let l=Ey.get(a);return l===void 0&&(l=Function.toString.call(a),Ey.set(a,l)),l===D4}function zi(e,n,a=!0){ru(e)===0?(a?Reflect.ownKeys(e):Object.keys(e)).forEach(s=>{n(s,e[s],e)}):e.forEach((l,s)=>n(s,l,e))}function ru(e){const n=e[Ie];return n?n.type_:Array.isArray(e)?1:Gi(e)?2:lu(e)?3:0}function Of(e,n){return ru(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function Lb(e,n,a){const l=ru(e);l===2?e.set(n,a):l===3?e.add(a):e[n]=a}function M4(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n}function Gi(e){return e instanceof Map}function lu(e){return e instanceof Set}function vt(e){return e.copy_||e.base_}function zf(e,n){if(Gi(e))return new Map(e);if(lu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const a=zb(e);if(n===!0||n==="class_only"&&!a){const l=Object.getOwnPropertyDescriptors(e);delete l[Ie];let s=Reflect.ownKeys(l);for(let o=0;o<s.length;o++){const c=s[o],f=l[c];f.writable===!1&&(f.writable=!0,f.configurable=!0),(f.get||f.set)&&(l[c]={configurable:!0,writable:!0,enumerable:f.enumerable,value:e[c]})}return Object.create(Oi(e),l)}else{const l=Oi(e);if(l!==null&&a)return{...e};const s=Object.create(l);return Object.assign(s,e)}}function uh(e,n=!1){return iu(e)||dl(e)||!ia(e)||(ru(e)>1&&Object.defineProperties(e,{set:So,add:So,clear:So,delete:So}),Object.freeze(e),n&&Object.values(e).forEach(a=>uh(a,!0))),e}function R4(){yn(2)}var So={value:R4};function iu(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Lf={};function ur(e){const n=Lf[e];return n||yn(0,e),n}function O4(e,n){Lf[e]||(Lf[e]=n)}var Li;function qo(){return Li}function z4(e,n){return{drafts_:[],parent_:e,immer_:n,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ay(e,n){n&&(ur("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=n)}function Uf(e){Hf(e),e.drafts_.forEach(L4),e.drafts_=null}function Hf(e){e===Li&&(Li=e.parent_)}function Ty(e){return Li=z4(Li,e)}function L4(e){const n=e[Ie];n.type_===0||n.type_===1?n.revoke_():n.revoked_=!0}function _y(e,n){n.unfinalizedDrafts_=n.drafts_.length;const a=n.drafts_[0];return e!==void 0&&e!==a?(a[Ie].modified_&&(Uf(n),yn(4)),ia(e)&&(e=Io(n,e),n.parent_||$o(n,e)),n.patches_&&ur("Patches").generateReplacementPatches_(a[Ie].base_,e,n.patches_,n.inversePatches_)):e=Io(n,a,[]),Uf(n),n.patches_&&n.patchListener_(n.patches_,n.inversePatches_),e!==Ob?e:void 0}function Io(e,n,a){if(iu(n))return n;const l=e.immer_.shouldUseStrictIteration(),s=n[Ie];if(!s)return zi(n,(o,c)=>Dy(e,s,n,o,c,a),l),n;if(s.scope_!==e)return n;if(!s.modified_)return $o(e,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const o=s.copy_;let c=o,f=!1;s.type_===3&&(c=new Set(o),o.clear(),f=!0),zi(c,(g,h)=>Dy(e,s,o,g,h,a,f),l),$o(e,o,!1),a&&e.patches_&&ur("Patches").generatePatches_(s,a,e.patches_,e.inversePatches_)}return s.copy_}function Dy(e,n,a,l,s,o,c){if(s==null||typeof s!="object"&&!c)return;const f=iu(s);if(!(f&&!c)){if(dl(s)){const g=o&&n&&n.type_!==3&&!Of(n.assigned_,l)?o.concat(l):void 0,h=Io(e,s,g);if(Lb(a,l,h),dl(h))e.canAutoFreeze_=!1;else return}else c&&a.add(s);if(ia(s)&&!f){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||n&&n.base_&&n.base_[l]===s&&f)return;Io(e,s),(!n||!n.scope_.parent_)&&typeof l!="symbol"&&(Gi(a)?a.has(l):Object.prototype.propertyIsEnumerable.call(a,l))&&$o(e,s)}}}function $o(e,n,a=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&uh(n,a)}function U4(e,n){const a=Array.isArray(e),l={type_:a?1:0,scope_:n?n.scope_:qo(),modified_:!1,finalized_:!1,assigned_:{},parent_:n,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=l,o=ch;a&&(s=[l],o=Ui);const{revoke:c,proxy:f}=Proxy.revocable(s,o);return l.draft_=f,l.revoke_=c,f}var ch={get(e,n){if(n===Ie)return e;const a=vt(e);if(!Of(a,n))return H4(e,a,n);const l=a[n];return e.finalized_||!ia(l)?l:l===Pd(e.base_,n)?(Vd(e),e.copy_[n]=Hi(l,e)):l},has(e,n){return n in vt(e)},ownKeys(e){return Reflect.ownKeys(vt(e))},set(e,n,a){const l=Ub(vt(e),n);if(l!=null&&l.set)return l.set.call(e.draft_,a),!0;if(!e.modified_){const s=Pd(vt(e),n),o=s==null?void 0:s[Ie];if(o&&o.base_===a)return e.copy_[n]=a,e.assigned_[n]=!1,!0;if(M4(a,s)&&(a!==void 0||Of(e.base_,n)))return!0;Vd(e),ra(e)}return e.copy_[n]===a&&(a!==void 0||n in e.copy_)||Number.isNaN(a)&&Number.isNaN(e.copy_[n])||(e.copy_[n]=a,e.assigned_[n]=!0),!0},deleteProperty(e,n){return Pd(e.base_,n)!==void 0||n in e.base_?(e.assigned_[n]=!1,Vd(e),ra(e)):delete e.assigned_[n],e.copy_&&delete e.copy_[n],!0},getOwnPropertyDescriptor(e,n){const a=vt(e),l=Reflect.getOwnPropertyDescriptor(a,n);return l&&{writable:!0,configurable:e.type_!==1||n!=="length",enumerable:l.enumerable,value:a[n]}},defineProperty(){yn(11)},getPrototypeOf(e){return Oi(e.base_)},setPrototypeOf(){yn(12)}},Ui={};zi(ch,(e,n)=>{Ui[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}});Ui.deleteProperty=function(e,n){return Ui.set.call(this,e,n,void 0)};Ui.set=function(e,n,a){return ch.set.call(this,e[0],n,a,e[0])};function Pd(e,n){const a=e[Ie];return(a?vt(a):e)[n]}function H4(e,n,a){var s;const l=Ub(n,a);return l?"value"in l?l.value:(s=l.get)==null?void 0:s.call(e.draft_):void 0}function Ub(e,n){if(!(n in e))return;let a=Oi(e);for(;a;){const l=Object.getOwnPropertyDescriptor(a,n);if(l)return l;a=Oi(a)}}function ra(e){e.modified_||(e.modified_=!0,e.parent_&&ra(e.parent_))}function Vd(e){e.copy_||(e.copy_=zf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var B4=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(n,a,l)=>{if(typeof n=="function"&&typeof a!="function"){const o=a;a=n;const c=this;return function(g=o,...h){return c.produce(g,x=>a.call(this,x,...h))}}typeof a!="function"&&yn(6),l!==void 0&&typeof l!="function"&&yn(7);let s;if(ia(n)){const o=Ty(this),c=Hi(n,void 0);let f=!0;try{s=a(c),f=!1}finally{f?Uf(o):Hf(o)}return Ay(o,l),_y(s,o)}else if(!n||typeof n!="object"){if(s=a(n),s===void 0&&(s=n),s===Ob&&(s=void 0),this.autoFreeze_&&uh(s,!0),l){const o=[],c=[];ur("Patches").generateReplacementPatches_(n,s,o,c),l(o,c)}return s}else yn(1,n)},this.produceWithPatches=(n,a)=>{if(typeof n=="function")return(c,...f)=>this.produceWithPatches(c,g=>n(g,...f));let l,s;return[this.produce(n,a,(c,f)=>{l=c,s=f}),l,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ia(e)||yn(8),dl(e)&&(e=q4(e));const n=Ty(this),a=Hi(e,void 0);return a[Ie].isManual_=!0,Hf(n),a}finishDraft(e,n){const a=e&&e[Ie];(!a||!a.isManual_)&&yn(9);const{scope_:l}=a;return Ay(l,n),_y(void 0,l)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,n){let a;for(a=n.length-1;a>=0;a--){const s=n[a];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}a>-1&&(n=n.slice(a+1));const l=ur("Patches").applyPatches_;return dl(e)?l(e,n):this.produce(e,s=>l(s,n))}};function Hi(e,n){const a=Gi(e)?ur("MapSet").proxyMap_(e,n):lu(e)?ur("MapSet").proxySet_(e,n):U4(e,n);return(n?n.scope_:qo()).drafts_.push(a),a}function q4(e){return dl(e)||yn(10,e),Hb(e)}function Hb(e){if(!ia(e)||iu(e))return e;const n=e[Ie];let a,l=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,a=zf(e,n.scope_.immer_.useStrictShallowCopy_),l=n.scope_.immer_.shouldUseStrictIteration()}else a=zf(e,!0);return zi(a,(s,o)=>{Lb(a,s,Hb(o))},l),n&&(n.finalized_=!1),a}function I4(){class e extends Map{constructor(g,h){super(),this[Ie]={type_:2,parent_:h,scope_:h?h.scope_:qo(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:g,draft_:this,isManual_:!1,revoked_:!1}}get size(){return vt(this[Ie]).size}has(g){return vt(this[Ie]).has(g)}set(g,h){const x=this[Ie];return c(x),(!vt(x).has(g)||vt(x).get(g)!==h)&&(a(x),ra(x),x.assigned_.set(g,!0),x.copy_.set(g,h),x.assigned_.set(g,!0)),this}delete(g){if(!this.has(g))return!1;const h=this[Ie];return c(h),a(h),ra(h),h.base_.has(g)?h.assigned_.set(g,!1):h.assigned_.delete(g),h.copy_.delete(g),!0}clear(){const g=this[Ie];c(g),vt(g).size&&(a(g),ra(g),g.assigned_=new Map,zi(g.base_,h=>{g.assigned_.set(h,!1)}),g.copy_.clear())}forEach(g,h){const x=this[Ie];vt(x).forEach((y,b,v)=>{g.call(h,this.get(b),b,this)})}get(g){const h=this[Ie];c(h);const x=vt(h).get(g);if(h.finalized_||!ia(x)||x!==h.base_.get(g))return x;const y=Hi(x,h);return a(h),h.copy_.set(g,y),y}keys(){return vt(this[Ie]).keys()}values(){const g=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const h=g.next();return h.done?h:{done:!1,value:this.get(h.value)}}}}entries(){const g=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const h=g.next();if(h.done)return h;const x=this.get(h.value);return{done:!1,value:[h.value,x]}}}}[Symbol.iterator](){return this.entries()}}function n(f,g){return new e(f,g)}function a(f){f.copy_||(f.assigned_=new Map,f.copy_=new Map(f.base_))}class l extends Set{constructor(g,h){super(),this[Ie]={type_:3,parent_:h,scope_:h?h.scope_:qo(),modified_:!1,finalized_:!1,copy_:void 0,base_:g,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return vt(this[Ie]).size}has(g){const h=this[Ie];return c(h),h.copy_?!!(h.copy_.has(g)||h.drafts_.has(g)&&h.copy_.has(h.drafts_.get(g))):h.base_.has(g)}add(g){const h=this[Ie];return c(h),this.has(g)||(o(h),ra(h),h.copy_.add(g)),this}delete(g){if(!this.has(g))return!1;const h=this[Ie];return c(h),o(h),ra(h),h.copy_.delete(g)||(h.drafts_.has(g)?h.copy_.delete(h.drafts_.get(g)):!1)}clear(){const g=this[Ie];c(g),vt(g).size&&(o(g),ra(g),g.copy_.clear())}values(){const g=this[Ie];return c(g),o(g),g.copy_.values()}entries(){const g=this[Ie];return c(g),o(g),g.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(g,h){const x=this.values();let y=x.next();for(;!y.done;)g.call(h,y.value,y.value,this),y=x.next()}}function s(f,g){return new l(f,g)}function o(f){f.copy_||(f.copy_=new Set,f.base_.forEach(g=>{if(ia(g)){const h=Hi(g,f);f.drafts_.set(g,h),f.copy_.add(h)}else f.copy_.add(g)}))}function c(f){f.revoked_&&yn(3,JSON.stringify(vt(f)))}O4("MapSet",{proxyMap_:n,proxySet_:s})}var $4=new B4,F4=$4.produce;const K4=e=>(n,a,l)=>(l.setState=(s,o,...c)=>{const f=typeof s=="function"?F4(s):s;return n(f,o,...c)},e(l.setState,a,l)),P4=K4;function V4(e){const n={runId:e.runId,sessionKey:e.sessionKey,status:"idle",currentTool:null,speechBubble:null,clearTool:!1,clearSpeech:!1,incrementToolCount:!1,toolRecord:null,summary:""};switch(e.stream){case"lifecycle":return Y4(n,e);case"tool":return G4(n,e);case"assistant":return Q4(n,e);case"error":return X4(n,e);default:return n.summary=ze.t("common:events.unknownStream",{stream:e.stream}),n}}function Y4(e,n){const a=n.data.phase;switch(a){case"start":case"thinking":e.status="thinking",e.summary=a==="start"?ze.t("common:events.startRunning"):ze.t("common:events.thinking");break;case"end":e.status="idle",e.clearTool=!0,e.clearSpeech=!0,e.summary=ze.t("common:events.runEnded");break;case"fallback":e.status="error",e.summary=ze.t("common:events.fallback");break;default:e.status="thinking",e.summary=ze.t("common:events.lifecycleUnknown",{phase:a??"unknown"})}return e}function G4(e,n){const a=n.data.phase,l=n.data.name??"unknown";return a==="start"?(e.status="tool_calling",e.currentTool={name:l,args:n.data.args,startedAt:n.ts},e.incrementToolCount=!0,e.toolRecord={name:l,timestamp:n.ts},e.summary=ze.t("common:events.toolCall",{name:l})):(e.status="thinking",e.clearTool=!0,e.summary=ze.t("common:events.toolDone",{name:l})),e}function Q4(e,n){const a=n.data.text??"";return e.status="speaking",e.speechBubble={text:a,timestamp:n.ts},e.summary=a.length>40?`${a.slice(0,40)}...`:a,e}function X4(e,n){const a=n.data.message??ze.t("common:errors.unknownError");return e.status="error",e.summary=ze.t("common:events.errorPrefix",{message:a}),e}const su=1200,ou=700,ue={x:30,y:20,width:su-60,height:ou-40,wallThickness:6,cornerRadius:18,corridorWidth:28},ki=(ue.width-ue.corridorWidth)/2,Si=(ue.height-ue.corridorWidth)/2,My=ue.x+ki+ue.corridorWidth,Ry=ue.y+Si+ue.corridorWidth,ht={desk:{x:ue.x,y:ue.y,width:ki,height:Si,label:"固定工位区"},meeting:{x:My,y:ue.y,width:ki,height:Si,label:"会议区"},hotDesk:{x:ue.x,y:Ry,width:ki,height:Si,label:"热工位区"},lounge:{x:My,y:Ry,width:ki,height:Si,label:"休息区"}},dh={desk:"#f4f6f9",meeting:"#eef3fa",hotDesk:"#f1f3f7",lounge:"#f3f1f7",corridor:"#e8ecf1",wall:"#8b9bb0"},fh={desk:"#1e293b",meeting:"#1a2744",hotDesk:"#1e2433",lounge:"#231e33",corridor:"#0f172a",wall:"#475569"},Qi={idle:"#22c55e",thinking:"#3b82f6",tool_calling:"#f97316",speaking:"#a855f7",spawning:"#06b6d4",error:"#ef4444",offline:"#6b7280"},Bb=4,qb=3,Yd=Bb*qb,Z4=4,J4=3,Oy={width:140,height:110},wi={radius:20,selectedRadius:24,strokeWidth:3,nameLabelMaxChars:12},W4=16/su,e3=12/ou;function Gd(e){let n=0;for(let a=0;a<e.length;a++){const l=e.charCodeAt(a);n=(n<<5)-n+l|0}return Math.abs(n)}function Ib(e,n,a){const l=[],s=e.width/(n+1),o=e.height/(a+1);for(let c=0;c<a;c++)for(let f=0;f<n;f++)l.push({x:Math.round(e.x+s*(f+1)),y:Math.round(e.y+o*(c+1))});return l}const t3=Ib(ht.desk,Bb,qb),n3=Ib(ht.hotDesk,Z4,J4);function zy(e){return`${e.x},${e.y}`}function a3(e,n,a){if(!n){const o=Gd(e)%Yd;for(let c=0;c<Yd;c++){const f=(o+c)%Yd,g=t3[f];if(!a.has(zy(g)))return g}}for(const s of n3)if(!a.has(zy(s)))return s;const l=n?ht.hotDesk:ht.desk;return{x:l.x+30+Gd(e)%(l.width-60),y:l.y+30+Gd(e)%(l.height-60)}}function FR(e){return[e.x*W4,0,e.y*e3]}function r3(e){return e<=8?2:e<=12?3:4}function Ly(e,n,a){const l=a??n;if(l===0)return[];const s=r3(n),o=Math.ceil(l/s),c=40,f=50,g=e.width-c*2,h=e.height-f*2,x=Math.min(Oy.width,g/s),y=Math.min(Oy.height,h/Math.max(o,1)),b=[];for(let v=0;v<l;v++){const S=v%s,C=Math.floor(v/s);b.push({unitX:Math.round(e.x+c+x*(S+.5)),unitY:Math.round(e.y+f+y*(C+.5))})}return b}function l3(e,n,a){return e===0?[]:Array.from({length:e},(l,s)=>{const o=2*Math.PI*s/e-Math.PI/2;return{x:Math.round(n.x+Math.cos(o)*a),y:Math.round(n.y+Math.sin(o)*a)}})}function i3(e,n){e.status=n.status,e.lastActiveAt=Date.now(),n.currentTool&&(e.currentTool=n.currentTool),n.clearTool&&(e.currentTool=null),n.speechBubble&&(e.speechBubble=n.speechBubble),n.clearSpeech&&(e.speechBubble=null),n.incrementToolCount&&e.toolCallCount++,n.toolRecord&&(e.toolCallHistory=[n.toolRecord,...e.toolCallHistory.slice(0,9)]),n.runId&&!e.runId&&(e.runId=n.runId)}function za(e,n){let a=0;for(const o of e.values())o.status!=="idle"&&o.status!=="offline"&&a++;const l=e.size,s=l>0?Math.min(a/l*100,100):0;return{activeAgents:a,totalAgents:l,totalTokens:n.totalTokens,tokenRate:n.tokenRate,collaborationHeat:s}}I4();const Uy=200,s3=6e4,$b="openclaw-theme",Fb="openclaw-chat-dock-height",Hy=300;function o3(){if(typeof window>"u")return Hy;const e=localStorage.getItem(Fb);if(e){const n=parseInt(e,10);if(!Number.isNaN(n)&&n>=150&&n<=800)return n}return Hy}function u3(){if(typeof window>"u")return"dark";const e=localStorage.getItem($b);return e==="light"||e==="dark"?e:"dark"}function c3(){return typeof window>"u"?!0:window.devicePixelRatio>=1.5}function Qd(e,n,a,l){const s=a3(e,a,l);return{id:e,name:n,status:"idle",position:s,currentTool:null,speechBubble:null,lastActiveAt:Date.now(),toolCallCount:0,toolCallHistory:[],runId:null,isSubAgent:a,parentAgentId:null,childAgentIds:[],zone:"desk",originalPosition:null}}function Xd(e){return`${e.x},${e.y}`}const he=oa()(P4(e=>({agents:new Map,links:[],globalMetrics:{activeAgents:0,totalAgents:0,totalTokens:0,tokenRate:0,collaborationHeat:0},connectionStatus:"disconnected",connectionError:null,selectedAgentId:null,viewMode:"2d",eventHistory:[],sidebarCollapsed:!1,lastSessionsSnapshot:null,theme:u3(),bloomEnabled:c3(),operatorScopes:[],tokenHistory:[],agentCosts:{},currentPage:"office",chatDockHeight:o3(),runIdMap:new Map,sessionKeyMap:new Map,addAgent:n=>{e(a=>{a.agents.set(n.id,n),a.globalMetrics=za(a.agents,a.globalMetrics)})},updateAgent:(n,a)=>{e(l=>{const s=l.agents.get(n);s&&(Object.assign(s,a),l.globalMetrics=za(l.agents,l.globalMetrics))})},removeAgent:n=>{e(a=>{a.agents.delete(n),a.selectedAgentId===n&&(a.selectedAgentId=null),a.globalMetrics=za(a.agents,a.globalMetrics)})},addSubAgent:(n,a)=>{e(l=>{const s=new Set;for(const f of l.agents.values())s.add(Xd(f.position));const o=Qd(a.agentId,a.label||`Sub-${a.agentId.slice(0,6)}`,!0,s);o.parentAgentId=n,o.zone="hotDesk",o.runId=a.sessionKey,l.agents.set(a.agentId,o);const c=l.agents.get(n);c&&c.childAgentIds.push(a.agentId),l.globalMetrics=za(l.agents,l.globalMetrics)})},removeSubAgent:n=>{e(a=>{const l=a.agents.get(n);if(l!=null&&l.parentAgentId){const s=a.agents.get(l.parentAgentId);s&&(s.childAgentIds=s.childAgentIds.filter(o=>o!==n))}a.agents.delete(n),a.selectedAgentId===n&&(a.selectedAgentId=null),a.globalMetrics=za(a.agents,a.globalMetrics)})},moveToMeeting:(n,a)=>{e(l=>{const s=l.agents.get(n);s&&(s.originalPosition={...s.position},s.position=a,s.zone="meeting")})},returnFromMeeting:n=>{e(a=>{const l=a.agents.get(n);l!=null&&l.originalPosition&&(l.position={...l.originalPosition},l.zone="desk",l.originalPosition=null)})},setSessionsSnapshot:n=>{e(a=>{a.lastSessionsSnapshot=n})},initAgents:n=>{e(a=>{var s;a.agents.clear(),a.runIdMap.clear(),a.sessionKeyMap.clear();const l=new Set;for(const o of n){const c=((s=o.identity)==null?void 0:s.name)??o.name??o.id,f=Qd(o.id,c,!1,l);l.add(Xd(f.position)),a.agents.set(o.id,f)}a.globalMetrics=za(a.agents,a.globalMetrics)})},processAgentEvent:n=>{e(a=>{const l=V4(n);let s=a.runIdMap.get(n.runId);if(!s&&n.sessionKey){const f=a.sessionKeyMap.get(n.sessionKey);f&&f.length>0&&(s=f[0])}if(!s&&(s=n.runId,!a.agents.has(s))){const f=new Set;for(const h of a.agents.values())f.add(Xd(h.position));const g=Qd(s,`Agent-${s.slice(0,6)}`,!0,f);g.runId=n.runId,a.agents.set(s,g)}if(a.runIdMap.set(n.runId,s),n.sessionKey){const f=a.sessionKeyMap.get(n.sessionKey)??[];f.includes(s)||(f.push(s),a.sessionKeyMap.set(n.sessionKey,f)),d3(a,n.sessionKey,s)}const o=a.agents.get(s);o&&i3(o,l);const c={timestamp:n.ts,agentId:s,agentName:(o==null?void 0:o.name)??s,stream:n.stream,summary:l.summary};a.eventHistory.push(c),a.eventHistory.length>Uy&&(a.eventHistory=a.eventHistory.slice(-Uy)),a.globalMetrics=za(a.agents,a.globalMetrics)})},selectAgent:n=>{e(a=>{a.selectedAgentId=a.selectedAgentId===n?null:n})},setViewMode:n=>{e(a=>{a.viewMode=n})},setConnectionStatus:(n,a)=>{e(l=>{l.connectionStatus=n,l.connectionError=a??null})},setSidebarCollapsed:n=>{e(a=>{a.sidebarCollapsed=n})},setTheme:n=>{e(a=>{a.theme=n});try{localStorage.setItem($b,n)}catch{}},setBloomEnabled:n=>{e(a=>{a.bloomEnabled=n})},setOperatorScopes:n=>{e(a=>{a.operatorScopes=n})},pushTokenSnapshot:n=>{e(a=>{a.tokenHistory.push(n),a.tokenHistory.length>30&&(a.tokenHistory=a.tokenHistory.slice(-30))})},setAgentCosts:n=>{e(a=>{a.agentCosts=n})},setCurrentPage:n=>{e(a=>{a.currentPage=n})},setChatDockHeight:n=>{e(a=>{a.chatDockHeight=n});try{localStorage.setItem(Fb,String(n))}catch{}},updateMetrics:()=>{e(n=>{n.globalMetrics=za(n.agents,n.globalMetrics)})}})));function d3(e,n,a){const l=e.sessionKeyMap.get(n);if(!l||l.length<2)return;const s=Date.now();for(const o of l){if(o===a)continue;const c=e.links.findIndex(f=>f.sessionKey===n&&(f.sourceId===a&&f.targetId===o||f.sourceId===o&&f.targetId===a));if(c>=0){const f=e.links[c];f.lastActivityAt=s,f.strength=Math.min(f.strength+.1,1)}else e.links.push({sourceId:a,targetId:o,sessionKey:n,strength:.3,lastActivityAt:s})}e.links=e.links.filter(o=>s-o.lastActivityAt<s3)}function f3(){const{t:e}=oe("chat"),[n,a]=N.useState(!1),l=N.useRef(null),s=he(h=>h.agents),o=Et(h=>h.targetAgentId),c=Et(h=>h.setTargetAgent),f=Array.from(s.values()),g=f.find(h=>h.id===o)??f[0];return N.useEffect(()=>{function h(x){l.current&&!l.current.contains(x.target)&&a(!1)}if(n)return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[n]),f.length===0?null:d.jsxs("div",{className:"relative",ref:l,children:[d.jsxs("button",{type:"button",onClick:()=>a(!n),className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800",children:[d.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{backgroundColor:By((g==null?void 0:g.id)??"")}}),d.jsx("span",{className:"max-w-[100px] truncate",children:(g==null?void 0:g.name)??e("agentSelector.defaultLabel")}),d.jsx(sa,{className:"h-3 w-3"})]}),n&&d.jsx("div",{className:"absolute bottom-full left-0 z-50 mb-1 min-w-[160px] rounded-lg border border-gray-200 bg-white py-1 shadow-lg dark:border-gray-700 dark:bg-gray-900",children:f.map(h=>d.jsxs("button",{type:"button",onClick:()=>{c(h.id),a(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs hover:bg-gray-50 dark:hover:bg-gray-800 ${h.id===o?"bg-blue-50 text-blue-700 dark:bg-blue-900/20 dark:text-blue-400":"text-gray-700 dark:text-gray-300"}`,children:[d.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{backgroundColor:By(h.id)}}),d.jsx("span",{className:"truncate",children:h.name})]},h.id))})]})}function By(e){const n=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"];let a=0;for(let l=0;l<e.length;l++)a=(a<<5)-a+e.charCodeAt(l)|0;return n[Math.abs(a)%n.length]}function h3(){const{t:e}=oe("chat"),[n,a]=N.useState(""),[l,s]=N.useState(!1),o=N.useRef(null),c=Et(E=>E.sendMessage),f=Et(E=>E.abort),g=Et(E=>E.isStreaming),h=Et(E=>E.dockExpanded),x=Et(E=>E.toggleDock),y=Et(E=>E.error),b=Et(E=>E.clearError),v=n.trim().length>0&&!g,S=N.useCallback(()=>{const E=n.trim();!E||g||(c(E),a(""))},[n,g,c]),C=N.useCallback(E=>{E.key==="Enter"&&!E.shiftKey&&!l&&(E.preventDefault(),S()),E.key==="Escape"&&h&&x()},[S,l,h,x]);return d.jsxs("div",{className:"border-t border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[y&&d.jsxs("div",{className:"flex items-center justify-between bg-red-50 px-3 py-1.5 text-xs text-red-600 dark:bg-red-900/20 dark:text-red-400",children:[d.jsx("span",{className:"truncate",children:y}),d.jsx("button",{type:"button",onClick:b,className:"ml-2 text-red-500 hover:text-red-700",children:"✕"})]}),d.jsxs("div",{className:"flex items-end gap-2 px-3 py-2",children:[d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(f3,{}),d.jsx("button",{type:"button",onClick:x,className:"rounded p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-800 dark:hover:text-gray-300",title:e(h?"dock.collapseDock":"dock.expandDock"),children:h?d.jsx(sa,{className:"h-4 w-4"}):d.jsx(rh,{className:"h-4 w-4"})})]}),d.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-800 dark:hover:text-gray-300",title:e("dock.attachmentWip"),onClick:()=>{},children:d.jsx(zN,{className:"h-4 w-4"})}),d.jsx(j4,{ref:o,value:n,onChange:E=>a(E.target.value),onKeyDown:C,onCompositionStart:()=>s(!0),onCompositionEnd:()=>s(!1),placeholder:e("dock.placeholder"),maxRows:4,className:"flex-1 resize-none rounded-lg border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm outline-none transition-colors placeholder:text-gray-400 focus:border-blue-400 focus:bg-white dark:border-gray-700 dark:bg-gray-800 dark:placeholder:text-gray-500 dark:focus:border-blue-500 dark:focus:bg-gray-900"}),g?d.jsx("button",{type:"button",onClick:()=>f(),className:"rounded-lg bg-red-500 p-1.5 text-white transition-colors hover:bg-red-600",title:e("common:actions.stop"),children:d.jsx(XN,{className:"h-4 w-4"})}):d.jsx("button",{type:"button",onClick:S,disabled:!v,className:`rounded-lg p-1.5 transition-colors ${v?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-200 text-gray-400 dark:bg-gray-700"}`,title:e("common:actions.send"),children:d.jsx(PN,{className:"h-4 w-4"})})]})]})}function g3(e,n){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const p3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,y3={};function qy(e,n){return(y3.jsx?m3:p3).test(e)}const x3=/[ \t\n\f\r]/g;function b3(e){return typeof e=="object"?e.type==="text"?Iy(e.value):!1:Iy(e)}function Iy(e){return e.replace(x3,"")===""}class Xi{constructor(n,a,l){this.normal=a,this.property=n,l&&(this.space=l)}}Xi.prototype.normal={};Xi.prototype.property={};Xi.prototype.space=void 0;function Kb(e,n){const a={},l={};for(const s of e)Object.assign(a,s.property),Object.assign(l,s.normal);return new Xi(a,l,n)}function Bf(e){return e.toLowerCase()}class Vt{constructor(n,a){this.attribute=a,this.property=n}}Vt.prototype.attribute="";Vt.prototype.booleanish=!1;Vt.prototype.boolean=!1;Vt.prototype.commaOrSpaceSeparated=!1;Vt.prototype.commaSeparated=!1;Vt.prototype.defined=!1;Vt.prototype.mustUseProperty=!1;Vt.prototype.number=!1;Vt.prototype.overloadedBoolean=!1;Vt.prototype.property="";Vt.prototype.spaceSeparated=!1;Vt.prototype.space=void 0;let v3=0;const Ne=gr(),ft=gr(),qf=gr(),re=gr(),Je=gr(),cl=gr(),tn=gr();function gr(){return 2**++v3}const If=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:ft,commaOrSpaceSeparated:tn,commaSeparated:cl,number:re,overloadedBoolean:qf,spaceSeparated:Je},Symbol.toStringTag,{value:"Module"})),Zd=Object.keys(If);class hh extends Vt{constructor(n,a,l,s){let o=-1;if(super(n,a),$y(this,"space",s),typeof l=="number")for(;++o<Zd.length;){const c=Zd[o];$y(this,Zd[o],(l&If[c])===If[c])}}}hh.prototype.defined=!0;function $y(e,n,a){a&&(e[n]=a)}function ml(e){const n={},a={};for(const[l,s]of Object.entries(e.properties)){const o=new hh(l,e.transform(e.attributes||{},l),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(o.mustUseProperty=!0),n[l]=o,a[Bf(l)]=l,a[Bf(o.attribute)]=l}return new Xi(n,a,e.space)}const Pb=ml({properties:{ariaActiveDescendant:null,ariaAtomic:ft,ariaAutoComplete:null,ariaBusy:ft,ariaChecked:ft,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Je,ariaCurrent:null,ariaDescribedBy:Je,ariaDetails:null,ariaDisabled:ft,ariaDropEffect:Je,ariaErrorMessage:null,ariaExpanded:ft,ariaFlowTo:Je,ariaGrabbed:ft,ariaHasPopup:null,ariaHidden:ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Je,ariaLevel:re,ariaLive:null,ariaModal:ft,ariaMultiLine:ft,ariaMultiSelectable:ft,ariaOrientation:null,ariaOwns:Je,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:ft,ariaReadOnly:ft,ariaRelevant:null,ariaRequired:ft,ariaRoleDescription:Je,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:ft,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Vb(e,n){return n in e?e[n]:n}function Yb(e,n){return Vb(e,n.toLowerCase())}const k3=ml({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cl,acceptCharset:Je,accessKey:Je,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:Je,autoFocus:Ne,autoPlay:Ne,blocking:Je,capture:null,charSet:null,checked:Ne,cite:null,className:Je,cols:re,colSpan:null,content:null,contentEditable:ft,controls:Ne,controlsList:Je,coords:re|cl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:qf,draggable:ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:Je,height:re,hidden:qf,high:re,href:null,hrefLang:null,htmlFor:Je,httpEquiv:Je,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:Je,itemRef:Je,itemScope:Ne,itemType:Je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ne,optimum:re,pattern:null,ping:Je,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:Je,required:Ne,reversed:Ne,rows:re,rowSpan:re,sandbox:Je,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:ft,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Je,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:ft,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ne,disableRemotePlayback:Ne,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:Yb}),S3=ml({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:tn,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:Je,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:cl,g2:cl,glyphName:cl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tn,rev:tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tn,requiredFeatures:tn,requiredFonts:tn,requiredFormats:tn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tn,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Vb}),Gb=ml({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Qb=ml({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Yb}),Xb=ml({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),w3={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},j3=/[A-Z]/g,Fy=/-[a-z]/g,C3=/^data[-\w.:]+$/i;function N3(e,n){const a=Bf(n);let l=n,s=Vt;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&C3.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Fy,A3);l="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Fy.test(o)){let c=o.replace(j3,E3);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}s=hh}return new s(l,n)}function E3(e){return"-"+e.toLowerCase()}function A3(e){return e.charAt(1).toUpperCase()}const T3=Kb([Pb,k3,Gb,Qb,Xb],"html"),gh=Kb([Pb,S3,Gb,Qb,Xb],"svg");function _3(e){return e.join(" ").trim()}var ll={},Jd,Ky;function D3(){if(Ky)return Jd;Ky=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,a=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,g=`
|
|
371
|
-
`,h="/",x="*",y="",b="comment",v="declaration";function S(E,j){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];j=j||{};var z=1,D=1;function Y(ne){var W=ne.match(n);W&&(z+=W.length);var B=ne.lastIndexOf(g);D=~B?ne.length-B:D+ne.length}function H(){var ne={line:z,column:D};return function(W){return W.position=new L(ne),G(),W}}function L(ne){this.start=ne,this.end={line:z,column:D},this.source=j.source}L.prototype.content=E;function P(ne){var W=new Error(j.source+":"+z+":"+D+": "+ne);if(W.reason=ne,W.filename=j.source,W.line=z,W.column=D,W.source=E,!j.silent)throw W}function ee(ne){var W=ne.exec(E);if(W){var B=W[0];return Y(B),E=E.slice(B.length),W}}function G(){ee(a)}function R(ne){var W;for(ne=ne||[];W=ae();)W!==!1&&ne.push(W);return ne}function ae(){var ne=H();if(!(h!=E.charAt(0)||x!=E.charAt(1))){for(var W=2;y!=E.charAt(W)&&(x!=E.charAt(W)||h!=E.charAt(W+1));)++W;if(W+=2,y===E.charAt(W-1))return P("End of comment missing");var B=E.slice(2,W-2);return D+=2,Y(B),E=E.slice(W),D+=2,ne({type:b,comment:B})}}function F(){var ne=H(),W=ee(l);if(W){if(ae(),!ee(s))return P("property missing ':'");var B=ee(o),te=ne({type:v,property:C(W[0].replace(e,y)),value:B?C(B[0].replace(e,y)):y});return ee(c),te}}function ie(){var ne=[];R(ne);for(var W;W=F();)W!==!1&&(ne.push(W),R(ne));return ne}return G(),ie()}function C(E){return E?E.replace(f,y):y}return Jd=S,Jd}var Py;function M3(){if(Py)return ll;Py=1;var e=ll&&ll.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ll,"__esModule",{value:!0}),ll.default=a;const n=e(D3());function a(l,s){let o=null;if(!l||typeof l!="string")return o;const c=(0,n.default)(l),f=typeof s=="function";return c.forEach(g=>{if(g.type!=="declaration")return;const{property:h,value:x}=g;f?s(h,x,g):x&&(o=o||{},o[h]=x)}),o}return ll}var pi={},Vy;function R3(){if(Vy)return pi;Vy=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,a=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||a.test(h)||e.test(h)},c=function(h,x){return x.toUpperCase()},f=function(h,x){return"".concat(x,"-")},g=function(h,x){return x===void 0&&(x={}),o(h)?h:(h=h.toLowerCase(),x.reactCompat?h=h.replace(s,f):h=h.replace(l,f),h.replace(n,c))};return pi.camelCase=g,pi}var mi,Yy;function O3(){if(Yy)return mi;Yy=1;var e=mi&&mi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(M3()),a=R3();function l(s,o){var c={};return!s||typeof s!="string"||(0,n.default)(s,function(f,g){f&&g&&(c[(0,a.camelCase)(f,o)]=g)}),c}return l.default=l,mi=l,mi}var z3=O3();const L3=Zf(z3),Zb=Jb("end"),ph=Jb("start");function Jb(e){return n;function n(a){const l=a&&a.position&&a.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function U3(e){const n=ph(e),a=Zb(e);if(n&&a)return{start:n,end:a}}function Ei(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Gy(e.position):"start"in e||"end"in e?Gy(e):"line"in e||"column"in e?$f(e):""}function $f(e){return Qy(e&&e.line)+":"+Qy(e&&e.column)}function Gy(e){return $f(e&&e.start)+"-"+$f(e&&e.end)}function Qy(e){return e&&typeof e=="number"?e:1}class _t extends Error{constructor(n,a,l){super(),typeof a=="string"&&(l=a,a=void 0);let s="",o={},c=!1;if(a&&("line"in a&&"column"in a?o={place:a}:"start"in a&&"end"in a?o={place:a}:"type"in a?o={ancestors:[a],place:a.position}:o={...a}),typeof n=="string"?s=n:!o.cause&&n&&(c=!0,s=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof l=="string"){const g=l.indexOf(":");g===-1?o.ruleId=l:(o.source=l.slice(0,g),o.ruleId=l.slice(g+1))}if(!o.place&&o.ancestors&&o.ancestors){const g=o.ancestors[o.ancestors.length-1];g&&(o.place=g.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Ei(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}_t.prototype.file="";_t.prototype.name="";_t.prototype.reason="";_t.prototype.message="";_t.prototype.stack="";_t.prototype.column=void 0;_t.prototype.line=void 0;_t.prototype.ancestors=void 0;_t.prototype.cause=void 0;_t.prototype.fatal=void 0;_t.prototype.place=void 0;_t.prototype.ruleId=void 0;_t.prototype.source=void 0;const mh={}.hasOwnProperty,H3=new Map,B3=/[A-Z]/g,q3=new Set(["table","tbody","thead","tfoot","tr"]),I3=new Set(["td","th"]),Wb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $3(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=X3(a,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=Q3(a,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?gh:T3,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=e1(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function e1(e,n,a){if(n.type==="element")return F3(e,n,a);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return K3(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return V3(e,n,a);if(n.type==="mdxjsEsm")return P3(e,n);if(n.type==="root")return Y3(e,n,a);if(n.type==="text")return G3(e,n)}function F3(e,n,a){const l=e.schema;let s=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(s=gh,e.schema=s),e.ancestors.push(n);const o=n1(e,n.tagName,!1),c=Z3(e,n);let f=xh(e,n);return q3.has(n.tagName)&&(f=f.filter(function(g){return typeof g=="string"?!b3(g):!0})),t1(e,c,o,n),yh(c,f),e.ancestors.pop(),e.schema=l,e.create(n,o,c,a)}function K3(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Bi(e,n.position)}function P3(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Bi(e,n.position)}function V3(e,n,a){const l=e.schema;let s=l;n.name==="svg"&&l.space==="html"&&(s=gh,e.schema=s),e.ancestors.push(n);const o=n.name===null?e.Fragment:n1(e,n.name,!0),c=J3(e,n),f=xh(e,n);return t1(e,c,o,n),yh(c,f),e.ancestors.pop(),e.schema=l,e.create(n,o,c,a)}function Y3(e,n,a){const l={};return yh(l,xh(e,n)),e.create(n,e.Fragment,l,a)}function G3(e,n){return n.value}function t1(e,n,a,l){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(n.node=l)}function yh(e,n){if(n.length>0){const a=n.length>1?n:n[0];a&&(e.children=a)}}function Q3(e,n,a){return l;function l(s,o,c,f){const h=Array.isArray(c.children)?a:n;return f?h(o,c,f):h(o,c)}}function X3(e,n){return a;function a(l,s,o,c){const f=Array.isArray(o.children),g=ph(l);return n(s,o,c,f,{columnNumber:g?g.column-1:void 0,fileName:e,lineNumber:g?g.line:void 0},void 0)}}function Z3(e,n){const a={};let l,s;for(s in n.properties)if(s!=="children"&&mh.call(n.properties,s)){const o=W3(e,s,n.properties[s]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&I3.has(n.tagName)?l=f:a[c]=f}}if(l){const o=a.style||(a.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return a}function J3(e,n){const a={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const o=l.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(a,e.evaluater.evaluateExpression(f.argument))}else Bi(e,n.position);else{const s=l.name;let o;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else Bi(e,n.position);else o=l.value===null?!0:l.value;a[s]=o}return a}function xh(e,n){const a=[];let l=-1;const s=e.passKeys?new Map:H3;for(;++l<n.children.length;){const o=n.children[l];let c;if(e.passKeys){const g=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(g){const h=s.get(g)||0;c=g+"-"+h,s.set(g,h+1)}}const f=e1(e,o,c);f!==void 0&&a.push(f)}return a}function W3(e,n,a){const l=N3(e.schema,n);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=l.commaSeparated?g3(a):_3(a)),l.property==="style"){let s=typeof a=="object"?a:e5(e,String(a));return e.stylePropertyNameCase==="css"&&(s=t5(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&l.space?w3[l.property]||l.property:l.attribute,a]}}function e5(e,n){try{return L3(n,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const l=a,s=new _t("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Wb+"#cannot-parse-style-attribute",s}}function n1(e,n,a){let l;if(!a)l={type:"Literal",value:n};else if(n.includes(".")){const s=n.split(".");let o=-1,c;for(;++o<s.length;){const f=qy(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}l=c}else l=qy(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const s=l.value;return mh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(l);Bi(e)}function Bi(e,n){const a=new _t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Wb+"#cannot-handle-mdx-estrees-without-createevaluater",a}function t5(e){const n={};let a;for(a in e)mh.call(e,a)&&(n[n5(a)]=e[a]);return n}function n5(e){let n=e.replace(B3,a5);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function a5(e){return"-"+e.toLowerCase()}const Wd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},r5={};function bh(e,n){const a=r5,l=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,s=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return a1(e,l,s)}function a1(e,n,a){if(l5(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Xy(e.children,n,a)}return Array.isArray(e)?Xy(e,n,a):""}function Xy(e,n,a){const l=[];let s=-1;for(;++s<e.length;)l[s]=a1(e[s],n,a);return l.join("")}function l5(e){return!!(e&&typeof e=="object")}const Zy=document.createElement("i");function vh(e){const n="&"+e+";";Zy.innerHTML=n;const a=Zy.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===n?!1:a}function nn(e,n,a,l){const s=e.length;let o=0,c;if(n<0?n=-n>s?0:s+n:n=n>s?s:n,a=a>0?a:0,l.length<1e4)c=Array.from(l),c.unshift(n,a),e.splice(...c);else for(a&&e.splice(n,a);o<l.length;)c=l.slice(o,o+1e4),c.unshift(n,0),e.splice(...c),o+=1e4,n+=1e4}function mn(e,n){return e.length>0?(nn(e,e.length,0,n),e):n}const Jy={}.hasOwnProperty;function r1(e){const n={};let a=-1;for(;++a<e.length;)i5(n,e[a]);return n}function i5(e,n){let a;for(a in n){const s=(Jy.call(e,a)?e[a]:void 0)||(e[a]={}),o=n[a];let c;if(o)for(c in o){Jy.call(s,c)||(s[c]=[]);const f=o[c];s5(s[c],Array.isArray(f)?f:f?[f]:[])}}}function s5(e,n){let a=-1;const l=[];for(;++a<n.length;)(n[a].add==="after"?e:l).push(n[a]);nn(e,0,0,l)}function l1(e,n){const a=Number.parseInt(e,n);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function jn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zt=Ba(/[A-Za-z]/),Tt=Ba(/[\dA-Za-z]/),o5=Ba(/[#-'*+\--9=?A-Z^-~]/);function Fo(e){return e!==null&&(e<32||e===127)}const Ff=Ba(/\d/),u5=Ba(/[\dA-Fa-f]/),c5=Ba(/[!-/:-@[-`{-~]/);function ye(e){return e!==null&&e<-2}function Ze(e){return e!==null&&(e<0||e===32)}function _e(e){return e===-2||e===-1||e===32}const uu=Ba(new RegExp("\\p{P}|\\p{S}","u")),cr=Ba(/\s/);function Ba(e){return n;function n(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function yl(e){const n=[];let a=-1,l=0,s=0;for(;++a<e.length;){const o=e.charCodeAt(a);let c="";if(o===37&&Tt(e.charCodeAt(a+1))&&Tt(e.charCodeAt(a+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(a+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),s=1):c="�"}else c=String.fromCharCode(o);c&&(n.push(e.slice(l,a),encodeURIComponent(c)),l=a+s+1,c=""),s&&(a+=s,s=0)}return n.join("")+e.slice(l)}function Le(e,n,a,l){const s=l?l-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(g){return _e(g)?(e.enter(a),f(g)):n(g)}function f(g){return _e(g)&&o++<s?(e.consume(g),f):(e.exit(a),n(g))}}const d5={tokenize:f5};function f5(e){const n=e.attempt(this.parser.constructs.contentInitial,l,s);let a;return n;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Le(e,n,"linePrefix")}function s(f){return e.enter("paragraph"),o(f)}function o(f){const g=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=g),a=g,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return ye(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const h5={tokenize:g5},Wy={tokenize:p5};function g5(e){const n=this,a=[];let l=0,s,o,c;return f;function f(D){if(l<a.length){const Y=a[l];return n.containerState=Y[1],e.attempt(Y[0].continuation,g,h)(D)}return h(D)}function g(D){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,s&&z();const Y=n.events.length;let H=Y,L;for(;H--;)if(n.events[H][0]==="exit"&&n.events[H][1].type==="chunkFlow"){L=n.events[H][1].end;break}j(l);let P=Y;for(;P<n.events.length;)n.events[P][1].end={...L},P++;return nn(n.events,H+1,0,n.events.slice(Y)),n.events.length=P,h(D)}return f(D)}function h(D){if(l===a.length){if(!s)return b(D);if(s.currentConstruct&&s.currentConstruct.concrete)return S(D);n.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Wy,x,y)(D)}function x(D){return s&&z(),j(l),b(D)}function y(D){return n.parser.lazy[n.now().line]=l!==a.length,c=n.now().offset,S(D)}function b(D){return n.containerState={},e.attempt(Wy,v,S)(D)}function v(D){return l++,a.push([n.currentConstruct,n.containerState]),b(D)}function S(D){if(D===null){s&&z(),j(0),e.consume(D);return}return s=s||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),C(D)}function C(D){if(D===null){E(e.exit("chunkFlow"),!0),j(0),e.consume(D);return}return ye(D)?(e.consume(D),E(e.exit("chunkFlow")),l=0,n.interrupt=void 0,f):(e.consume(D),C)}function E(D,Y){const H=n.sliceStream(D);if(Y&&H.push(null),D.previous=o,o&&(o.next=D),o=D,s.defineSkip(D.start),s.write(H),n.parser.lazy[D.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<c&&(!s.events[L][1].end||s.events[L][1].end.offset>c))return;const P=n.events.length;let ee=P,G,R;for(;ee--;)if(n.events[ee][0]==="exit"&&n.events[ee][1].type==="chunkFlow"){if(G){R=n.events[ee][1].end;break}G=!0}for(j(l),L=P;L<n.events.length;)n.events[L][1].end={...R},L++;nn(n.events,ee+1,0,n.events.slice(P)),n.events.length=L}}function j(D){let Y=a.length;for(;Y-- >D;){const H=a[Y];n.containerState=H[1],H[0].exit.call(n,e)}a.length=D}function z(){s.write([null]),o=void 0,s=void 0,n.containerState._closeFlow=void 0}}function p5(e,n,a){return Le(e,e.attempt(this.parser.constructs.document,n,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fl(e){if(e===null||Ze(e)||cr(e))return 1;if(uu(e))return 2}function cu(e,n,a){const l=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!l.includes(o)&&(n=o(n,a),l.push(o))}return n}const Kf={name:"attention",resolveAll:m5,tokenize:y5};function m5(e,n){let a=-1,l,s,o,c,f,g,h,x;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(l=a;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[l][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;g=e[l][1].end.offset-e[l][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const y={...e[l][1].end},b={...e[a][1].start};ex(y,-g),ex(b,g),c={type:g>1?"strongSequence":"emphasisSequence",start:y,end:{...e[l][1].end}},f={type:g>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:b},o={type:g>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[a][1].start}},s={type:g>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[l][1].end={...c.start},e[a][1].start={...f.end},h=[],e[l][1].end.offset-e[l][1].start.offset&&(h=mn(h,[["enter",e[l][1],n],["exit",e[l][1],n]])),h=mn(h,[["enter",s,n],["enter",c,n],["exit",c,n],["enter",o,n]]),h=mn(h,cu(n.parser.constructs.insideSpan.null,e.slice(l+1,a),n)),h=mn(h,[["exit",o,n],["enter",f,n],["exit",f,n],["exit",s,n]]),e[a][1].end.offset-e[a][1].start.offset?(x=2,h=mn(h,[["enter",e[a][1],n],["exit",e[a][1],n]])):x=0,nn(e,l-1,a-l+3,h),a=l+h.length-x-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function y5(e,n){const a=this.parser.constructs.attentionMarkers.null,l=this.previous,s=fl(l);let o;return c;function c(g){return o=g,e.enter("attentionSequence"),f(g)}function f(g){if(g===o)return e.consume(g),f;const h=e.exit("attentionSequence"),x=fl(g),y=!x||x===2&&s||a.includes(g),b=!s||s===2&&x||a.includes(l);return h._open=!!(o===42?y:y&&(s||!b)),h._close=!!(o===42?b:b&&(x||!y)),n(g)}}function ex(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const x5={name:"autolink",tokenize:b5};function b5(e,n,a){let l=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return zt(v)?(e.consume(v),c):v===64?a(v):h(v)}function c(v){return v===43||v===45||v===46||Tt(v)?(l=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),l=0,g):(v===43||v===45||v===46||Tt(v))&&l++<32?(e.consume(v),f):(l=0,h(v))}function g(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),n):v===null||v===32||v===60||Fo(v)?a(v):(e.consume(v),g)}function h(v){return v===64?(e.consume(v),x):o5(v)?(e.consume(v),h):a(v)}function x(v){return Tt(v)?y(v):a(v)}function y(v){return v===46?(e.consume(v),l=0,x):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),n):b(v)}function b(v){if((v===45||Tt(v))&&l++<63){const S=v===45?b:y;return e.consume(v),S}return a(v)}}const Zi={partial:!0,tokenize:v5};function v5(e,n,a){return l;function l(o){return _e(o)?Le(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||ye(o)?n(o):a(o)}}const i1={continuation:{tokenize:S5},exit:w5,name:"blockQuote",tokenize:k5};function k5(e,n,a){const l=this;return s;function s(c){if(c===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return a(c)}function o(c){return _e(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function S5(e,n,a){const l=this;return s;function s(c){return _e(c)?Le(e,o,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(i1,n,a)(c)}}function w5(e){e.exit("blockQuote")}const s1={name:"characterEscape",tokenize:j5};function j5(e,n,a){return l;function l(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return c5(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):a(o)}}const o1={name:"characterReference",tokenize:C5};function C5(e,n,a){const l=this;let s=0,o,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),g}function g(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,c=Tt,x(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=u5,x):(e.enter("characterReferenceValue"),o=7,c=Ff,x(y))}function x(y){if(y===59&&s){const b=e.exit("characterReferenceValue");return c===Tt&&!vh(l.sliceSerialize(b))?a(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(y)&&s++<o?(e.consume(y),x):a(y)}}const tx={partial:!0,tokenize:E5},nx={concrete:!0,name:"codeFenced",tokenize:N5};function N5(e,n,a){const l=this,s={partial:!0,tokenize:H};let o=0,c=0,f;return g;function g(L){return h(L)}function h(L){const P=l.events[l.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,f=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),x(L)}function x(L){return L===f?(c++,e.consume(L),x):c<3?a(L):(e.exit("codeFencedFenceSequence"),_e(L)?Le(e,y,"whitespace")(L):y(L))}function y(L){return L===null||ye(L)?(e.exit("codeFencedFence"),l.interrupt?n(L):e.check(tx,C,Y)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||ye(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(L)):_e(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Le(e,v,"whitespace")(L)):L===96&&L===f?a(L):(e.consume(L),b)}function v(L){return L===null||ye(L)?y(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(L))}function S(L){return L===null||ye(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(L)):L===96&&L===f?a(L):(e.consume(L),S)}function C(L){return e.attempt(s,Y,E)(L)}function E(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),j}function j(L){return o>0&&_e(L)?Le(e,z,"linePrefix",o+1)(L):z(L)}function z(L){return L===null||ye(L)?e.check(tx,C,Y)(L):(e.enter("codeFlowValue"),D(L))}function D(L){return L===null||ye(L)?(e.exit("codeFlowValue"),z(L)):(e.consume(L),D)}function Y(L){return e.exit("codeFenced"),n(L)}function H(L,P,ee){let G=0;return R;function R(W){return L.enter("lineEnding"),L.consume(W),L.exit("lineEnding"),ae}function ae(W){return L.enter("codeFencedFence"),_e(W)?Le(L,F,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):F(W)}function F(W){return W===f?(L.enter("codeFencedFenceSequence"),ie(W)):ee(W)}function ie(W){return W===f?(G++,L.consume(W),ie):G>=c?(L.exit("codeFencedFenceSequence"),_e(W)?Le(L,ne,"whitespace")(W):ne(W)):ee(W)}function ne(W){return W===null||ye(W)?(L.exit("codeFencedFence"),P(W)):ee(W)}}}function E5(e,n,a){const l=this;return s;function s(c){return c===null?a(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return l.parser.lazy[l.now().line]?a(c):n(c)}}const ef={name:"codeIndented",tokenize:T5},A5={partial:!0,tokenize:_5};function T5(e,n,a){const l=this;return s;function s(h){return e.enter("codeIndented"),Le(e,o,"linePrefix",5)(h)}function o(h){const x=l.events[l.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?c(h):a(h)}function c(h){return h===null?g(h):ye(h)?e.attempt(A5,c,g)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||ye(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function g(h){return e.exit("codeIndented"),n(h)}}function _5(e,n,a){const l=this;return s;function s(c){return l.parser.lazy[l.now().line]?a(c):ye(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):Le(e,o,"linePrefix",5)(c)}function o(c){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):ye(c)?s(c):a(c)}}const D5={name:"codeText",previous:R5,resolve:M5,tokenize:O5};function M5(e){let n=e.length-4,a=3,l,s;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=a;++l<n;)if(e[l][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[n][1].type="codeTextPadding",a+=2,n-=2;break}}for(l=a-1,n++;++l<=n;)s===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(s=l):(l===n||e[l][1].type==="lineEnding")&&(e[s][1].type="codeTextData",l!==s+2&&(e[s][1].end=e[l-1][1].end,e.splice(s+2,l-s-2),n-=l-s-2,l=s+2),s=void 0);return e}function R5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function O5(e,n,a){let l=0,s,o;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),l++,f):(e.exit("codeTextSequence"),g(y))}function g(y){return y===null?a(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),g):y===96?(o=e.enter("codeTextSequence"),s=0,x(y)):ye(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),g):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||ye(y)?(e.exit("codeTextData"),g(y)):(e.consume(y),h)}function x(y){return y===96?(e.consume(y),s++,x):s===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(o.type="codeTextData",h(y))}}class z5{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,a){const l=a??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,a,l){const s=a||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return l&&yi(this.left,l),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),yi(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),yi(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const a=this.left.splice(n,Number.POSITIVE_INFINITY);yi(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);yi(this.left,a.reverse())}}}function yi(e,n){let a=0;if(n.length<1e4)e.push(...n);else for(;a<n.length;)e.push(...n.slice(a,a+1e4)),a+=1e4}function u1(e){const n={};let a=-1,l,s,o,c,f,g,h;const x=new z5(e);for(;++a<x.length;){for(;a in n;)a=n[a];if(l=x.get(a),a&&l[1].type==="chunkFlow"&&x.get(a-1)[1].type==="listItemPrefix"&&(g=l[1]._tokenizer.events,o=0,o<g.length&&g[o][1].type==="lineEndingBlank"&&(o+=2),o<g.length&&g[o][1].type==="content"))for(;++o<g.length&&g[o][1].type!=="content";)g[o][1].type==="chunkText"&&(g[o][1]._isInFirstContentOfListItem=!0,o++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,L5(x,a)),a=n[a],h=!0);else if(l[1]._container){for(o=a,s=void 0;o--;)if(c=x.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(x.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(l[1].end={...x.get(s)[1].start},f=x.slice(s,a),f.unshift(l),x.splice(s,a-s+1,f))}}return nn(e,0,Number.POSITIVE_INFINITY,x.slice(0)),!h}function L5(e,n){const a=e.get(n)[1],l=e.get(n)[2];let s=n-1;const o=[];let c=a._tokenizer;c||(c=l.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,g=[],h={};let x,y,b=-1,v=a,S=0,C=0;const E=[C];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(x=l.sliceStream(v),v.next||x.push(null),y&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(x),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=a;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(C=b+1,E.push(C),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):E.pop(),b=E.length;b--;){const j=f.slice(E[b],E[b+1]),z=o.pop();g.push([z,z+j.length-1]),e.splice(z,2,j)}for(g.reverse(),b=-1;++b<g.length;)h[S+g[b][0]]=S+g[b][1],S+=g[b][1]-g[b][0]-1;return h}const U5={resolve:B5,tokenize:q5},H5={partial:!0,tokenize:I5};function B5(e){return u1(e),e}function q5(e,n){let a;return l;function l(f){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?o(f):ye(f)?e.check(H5,c,o)(f):(e.consume(f),s)}function o(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,s}}function I5(e,n,a){const l=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Le(e,o,"linePrefix")}function o(c){if(c===null||ye(c))return a(c);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(l.parser.constructs.flow,a,n)(c)}}function c1(e,n,a,l,s,o,c,f,g){const h=g||Number.POSITIVE_INFINITY;let x=0;return y;function y(j){return j===60?(e.enter(l),e.enter(s),e.enter(o),e.consume(j),e.exit(o),b):j===null||j===32||j===41||Fo(j)?a(j):(e.enter(l),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),C(j))}function b(j){return j===62?(e.enter(o),e.consume(j),e.exit(o),e.exit(s),e.exit(l),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===62?(e.exit("chunkString"),e.exit(f),b(j)):j===null||j===60||ye(j)?a(j):(e.consume(j),j===92?S:v)}function S(j){return j===60||j===62||j===92?(e.consume(j),v):v(j)}function C(j){return!x&&(j===null||j===41||Ze(j))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(l),n(j)):x<h&&j===40?(e.consume(j),x++,C):j===41?(e.consume(j),x--,C):j===null||j===32||j===40||Fo(j)?a(j):(e.consume(j),j===92?E:C)}function E(j){return j===40||j===41||j===92?(e.consume(j),C):C(j)}}function d1(e,n,a,l,s,o){const c=this;let f=0,g;return h;function h(v){return e.enter(l),e.enter(s),e.consume(v),e.exit(s),e.enter(o),x}function x(v){return f>999||v===null||v===91||v===93&&!g||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?a(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(l),n):ye(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),x):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||ye(v)||f++>999?(e.exit("chunkString"),x(v)):(e.consume(v),g||(g=!_e(v)),v===92?b:y)}function b(v){return v===91||v===92||v===93?(e.consume(v),f++,y):y(v)}}function f1(e,n,a,l,s,o){let c;return f;function f(b){return b===34||b===39||b===40?(e.enter(l),e.enter(s),e.consume(b),e.exit(s),c=b===40?41:b,g):a(b)}function g(b){return b===c?(e.enter(s),e.consume(b),e.exit(s),e.exit(l),n):(e.enter(o),h(b))}function h(b){return b===c?(e.exit(o),g(c)):b===null?a(b):ye(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Le(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===c||b===null||ye(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?y:x)}function y(b){return b===c||b===92?(e.consume(b),x):x(b)}}function Ai(e,n){let a;return l;function l(s){return ye(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a=!0,l):_e(s)?Le(e,l,a?"linePrefix":"lineSuffix")(s):n(s)}}const $5={name:"definition",tokenize:K5},F5={partial:!0,tokenize:P5};function K5(e,n,a){const l=this;let s;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return d1.call(l,e,f,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=jn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),g):a(v)}function g(v){return Ze(v)?Ai(e,h)(v):h(v)}function h(v){return c1(e,x,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function x(v){return e.attempt(F5,y,y)(v)}function y(v){return _e(v)?Le(e,b,"whitespace")(v):b(v)}function b(v){return v===null||ye(v)?(e.exit("definition"),l.parser.defined.push(s),n(v)):a(v)}}function P5(e,n,a){return l;function l(f){return Ze(f)?Ai(e,s)(f):a(f)}function s(f){return f1(e,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return _e(f)?Le(e,c,"whitespace")(f):c(f)}function c(f){return f===null||ye(f)?n(f):a(f)}}const V5={name:"hardBreakEscape",tokenize:Y5};function Y5(e,n,a){return l;function l(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return ye(o)?(e.exit("hardBreakEscape"),n(o)):a(o)}}const G5={name:"headingAtx",resolve:Q5,tokenize:X5};function Q5(e,n){let a=e.length-2,l=3,s,o;return e[l][1].type==="whitespace"&&(l+=2),a-2>l&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(l===a-1||a-4>l&&e[a-2][1].type==="whitespace")&&(a-=l+1===a?2:4),a>l&&(s={type:"atxHeadingText",start:e[l][1].start,end:e[a][1].end},o={type:"chunkText",start:e[l][1].start,end:e[a][1].end,contentType:"text"},nn(e,l,a-l+1,[["enter",s,n],["enter",o,n],["exit",o,n],["exit",s,n]])),e}function X5(e,n,a){let l=0;return s;function s(x){return e.enter("atxHeading"),o(x)}function o(x){return e.enter("atxHeadingSequence"),c(x)}function c(x){return x===35&&l++<6?(e.consume(x),c):x===null||Ze(x)?(e.exit("atxHeadingSequence"),f(x)):a(x)}function f(x){return x===35?(e.enter("atxHeadingSequence"),g(x)):x===null||ye(x)?(e.exit("atxHeading"),n(x)):_e(x)?Le(e,f,"whitespace")(x):(e.enter("atxHeadingText"),h(x))}function g(x){return x===35?(e.consume(x),g):(e.exit("atxHeadingSequence"),f(x))}function h(x){return x===null||x===35||Ze(x)?(e.exit("atxHeadingText"),f(x)):(e.consume(x),h)}}const Z5=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ax=["pre","script","style","textarea"],J5={concrete:!0,name:"htmlFlow",resolveTo:tE,tokenize:nE},W5={partial:!0,tokenize:rE},eE={partial:!0,tokenize:aE};function tE(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function nE(e,n,a){const l=this;let s,o,c,f,g;return h;function h(A){return x(A)}function x(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),y}function y(A){return A===33?(e.consume(A),b):A===47?(e.consume(A),o=!0,C):A===63?(e.consume(A),s=3,l.interrupt?n:T):zt(A)?(e.consume(A),c=String.fromCharCode(A),E):a(A)}function b(A){return A===45?(e.consume(A),s=2,v):A===91?(e.consume(A),s=5,f=0,S):zt(A)?(e.consume(A),s=4,l.interrupt?n:T):a(A)}function v(A){return A===45?(e.consume(A),l.interrupt?n:T):a(A)}function S(A){const se="CDATA[";return A===se.charCodeAt(f++)?(e.consume(A),f===se.length?l.interrupt?n:F:S):a(A)}function C(A){return zt(A)?(e.consume(A),c=String.fromCharCode(A),E):a(A)}function E(A){if(A===null||A===47||A===62||Ze(A)){const se=A===47,me=c.toLowerCase();return!se&&!o&&ax.includes(me)?(s=1,l.interrupt?n(A):F(A)):Z5.includes(c.toLowerCase())?(s=6,se?(e.consume(A),j):l.interrupt?n(A):F(A)):(s=7,l.interrupt&&!l.parser.lazy[l.now().line]?a(A):o?z(A):D(A))}return A===45||Tt(A)?(e.consume(A),c+=String.fromCharCode(A),E):a(A)}function j(A){return A===62?(e.consume(A),l.interrupt?n:F):a(A)}function z(A){return _e(A)?(e.consume(A),z):R(A)}function D(A){return A===47?(e.consume(A),R):A===58||A===95||zt(A)?(e.consume(A),Y):_e(A)?(e.consume(A),D):R(A)}function Y(A){return A===45||A===46||A===58||A===95||Tt(A)?(e.consume(A),Y):H(A)}function H(A){return A===61?(e.consume(A),L):_e(A)?(e.consume(A),H):D(A)}function L(A){return A===null||A===60||A===61||A===62||A===96?a(A):A===34||A===39?(e.consume(A),g=A,P):_e(A)?(e.consume(A),L):ee(A)}function P(A){return A===g?(e.consume(A),g=null,G):A===null||ye(A)?a(A):(e.consume(A),P)}function ee(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Ze(A)?H(A):(e.consume(A),ee)}function G(A){return A===47||A===62||_e(A)?D(A):a(A)}function R(A){return A===62?(e.consume(A),ae):a(A)}function ae(A){return A===null||ye(A)?F(A):_e(A)?(e.consume(A),ae):a(A)}function F(A){return A===45&&s===2?(e.consume(A),B):A===60&&s===1?(e.consume(A),te):A===62&&s===4?(e.consume(A),M):A===63&&s===3?(e.consume(A),T):A===93&&s===5?(e.consume(A),we):ye(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(W5,V,ie)(A)):A===null||ye(A)?(e.exit("htmlFlowData"),ie(A)):(e.consume(A),F)}function ie(A){return e.check(eE,ne,V)(A)}function ne(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),W}function W(A){return A===null||ye(A)?ie(A):(e.enter("htmlFlowData"),F(A))}function B(A){return A===45?(e.consume(A),T):F(A)}function te(A){return A===47?(e.consume(A),c="",ce):F(A)}function ce(A){if(A===62){const se=c.toLowerCase();return ax.includes(se)?(e.consume(A),M):F(A)}return zt(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),ce):F(A)}function we(A){return A===93?(e.consume(A),T):F(A)}function T(A){return A===62?(e.consume(A),M):A===45&&s===2?(e.consume(A),T):F(A)}function M(A){return A===null||ye(A)?(e.exit("htmlFlowData"),V(A)):(e.consume(A),M)}function V(A){return e.exit("htmlFlow"),n(A)}}function aE(e,n,a){const l=this;return s;function s(c){return ye(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):a(c)}function o(c){return l.parser.lazy[l.now().line]?a(c):n(c)}}function rE(e,n,a){return l;function l(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Zi,n,a)}}const lE={name:"htmlText",tokenize:iE};function iE(e,n,a){const l=this;let s,o,c;return f;function f(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),H):T===63?(e.consume(T),D):zt(T)?(e.consume(T),ee):a(T)}function h(T){return T===45?(e.consume(T),x):T===91?(e.consume(T),o=0,S):zt(T)?(e.consume(T),z):a(T)}function x(T){return T===45?(e.consume(T),v):a(T)}function y(T){return T===null?a(T):T===45?(e.consume(T),b):ye(T)?(c=y,te(T)):(e.consume(T),y)}function b(T){return T===45?(e.consume(T),v):y(T)}function v(T){return T===62?B(T):T===45?b(T):y(T)}function S(T){const M="CDATA[";return T===M.charCodeAt(o++)?(e.consume(T),o===M.length?C:S):a(T)}function C(T){return T===null?a(T):T===93?(e.consume(T),E):ye(T)?(c=C,te(T)):(e.consume(T),C)}function E(T){return T===93?(e.consume(T),j):C(T)}function j(T){return T===62?B(T):T===93?(e.consume(T),j):C(T)}function z(T){return T===null||T===62?B(T):ye(T)?(c=z,te(T)):(e.consume(T),z)}function D(T){return T===null?a(T):T===63?(e.consume(T),Y):ye(T)?(c=D,te(T)):(e.consume(T),D)}function Y(T){return T===62?B(T):D(T)}function H(T){return zt(T)?(e.consume(T),L):a(T)}function L(T){return T===45||Tt(T)?(e.consume(T),L):P(T)}function P(T){return ye(T)?(c=P,te(T)):_e(T)?(e.consume(T),P):B(T)}function ee(T){return T===45||Tt(T)?(e.consume(T),ee):T===47||T===62||Ze(T)?G(T):a(T)}function G(T){return T===47?(e.consume(T),B):T===58||T===95||zt(T)?(e.consume(T),R):ye(T)?(c=G,te(T)):_e(T)?(e.consume(T),G):B(T)}function R(T){return T===45||T===46||T===58||T===95||Tt(T)?(e.consume(T),R):ae(T)}function ae(T){return T===61?(e.consume(T),F):ye(T)?(c=ae,te(T)):_e(T)?(e.consume(T),ae):G(T)}function F(T){return T===null||T===60||T===61||T===62||T===96?a(T):T===34||T===39?(e.consume(T),s=T,ie):ye(T)?(c=F,te(T)):_e(T)?(e.consume(T),F):(e.consume(T),ne)}function ie(T){return T===s?(e.consume(T),s=void 0,W):T===null?a(T):ye(T)?(c=ie,te(T)):(e.consume(T),ie)}function ne(T){return T===null||T===34||T===39||T===60||T===61||T===96?a(T):T===47||T===62||Ze(T)?G(T):(e.consume(T),ne)}function W(T){return T===47||T===62||Ze(T)?G(T):a(T)}function B(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),n):a(T)}function te(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),ce}function ce(T){return _e(T)?Le(e,we,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):we(T)}function we(T){return e.enter("htmlTextData"),c(T)}}const kh={name:"labelEnd",resolveAll:cE,resolveTo:dE,tokenize:fE},sE={tokenize:hE},oE={tokenize:gE},uE={tokenize:pE};function cE(e){let n=-1;const a=[];for(;++n<e.length;){const l=e[n][1];if(a.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const s=l.type==="labelImage"?4:2;l.type="data",n+=s}}return e.length!==a.length&&nn(e,0,e.length,a),e}function dE(e,n){let a=e.length,l=0,s,o,c,f;for(;a--;)if(s=e[a][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[a][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[a][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=a,s.type!=="labelLink")){l=2;break}}else s.type==="labelEnd"&&(c=a);const g={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},x={type:"labelText",start:{...e[o+l+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",g,n],["enter",h,n]],f=mn(f,e.slice(o+1,o+l+3)),f=mn(f,[["enter",x,n]]),f=mn(f,cu(n.parser.constructs.insideSpan.null,e.slice(o+l+4,c-3),n)),f=mn(f,[["exit",x,n],e[c-2],e[c-1],["exit",h,n]]),f=mn(f,e.slice(c+1)),f=mn(f,[["exit",g,n]]),nn(e,o,e.length,f),e}function fE(e,n,a){const l=this;let s=l.events.length,o,c;for(;s--;)if((l.events[s][1].type==="labelImage"||l.events[s][1].type==="labelLink")&&!l.events[s][1]._balanced){o=l.events[s][1];break}return f;function f(b){return o?o._inactive?y(b):(c=l.parser.defined.includes(jn(l.sliceSerialize({start:o.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),g):a(b)}function g(b){return b===40?e.attempt(sE,x,c?x:y)(b):b===91?e.attempt(oE,x,c?h:y)(b):c?x(b):y(b)}function h(b){return e.attempt(uE,x,y)(b)}function x(b){return n(b)}function y(b){return o._balanced=!0,a(b)}}function hE(e,n,a){return l;function l(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),s}function s(y){return Ze(y)?Ai(e,o)(y):o(y)}function o(y){return y===41?x(y):c1(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Ze(y)?Ai(e,g)(y):x(y)}function f(y){return a(y)}function g(y){return y===34||y===39||y===40?f1(e,h,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):x(y)}function h(y){return Ze(y)?Ai(e,x)(y):x(y)}function x(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):a(y)}}function gE(e,n,a){const l=this;return s;function s(f){return d1.call(l,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return l.parser.defined.includes(jn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(f):a(f)}function c(f){return a(f)}}function pE(e,n,a){return l;function l(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):a(o)}}const mE={name:"labelStartImage",resolveAll:kh.resolveAll,tokenize:yE};function yE(e,n,a){const l=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):a(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(f):n(f)}}const xE={name:"labelStartLink",resolveAll:kh.resolveAll,tokenize:bE};function bE(e,n,a){const l=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(c):n(c)}}const tf={name:"lineEnding",tokenize:vE};function vE(e,n){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Le(e,n,"linePrefix")}}const Oo={name:"thematicBreak",tokenize:kE};function kE(e,n,a){let l=0,s;return o;function o(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,f(h)}function f(h){return h===s?(e.enter("thematicBreakSequence"),g(h)):l>=3&&(h===null||ye(h))?(e.exit("thematicBreak"),n(h)):a(h)}function g(h){return h===s?(e.consume(h),l++,g):(e.exit("thematicBreakSequence"),_e(h)?Le(e,f,"whitespace")(h):f(h))}}const Kt={continuation:{tokenize:CE},exit:EE,name:"list",tokenize:jE},SE={partial:!0,tokenize:AE},wE={partial:!0,tokenize:NE};function jE(e,n,a){const l=this,s=l.events[l.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(v){const S=l.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!l.containerState.marker||v===l.containerState.marker:Ff(v)){if(l.containerState.type||(l.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Oo,a,h)(v):h(v);if(!l.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),g(v)}return a(v)}function g(v){return Ff(v)&&++c<10?(e.consume(v),g):(!l.interrupt||c<2)&&(l.containerState.marker?v===l.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):a(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||v,e.check(Zi,l.interrupt?a:x,e.attempt(SE,b,y))}function x(v){return l.containerState.initialBlankLine=!0,o++,b(v)}function y(v){return _e(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):a(v)}function b(v){return l.containerState.size=o+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function CE(e,n,a){const l=this;return l.containerState._closeFlow=void 0,e.check(Zi,s,o);function s(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Le(e,n,"listItemIndent",l.containerState.size+1)(f)}function o(f){return l.containerState.furtherBlankLines||!_e(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(wE,n,c)(f))}function c(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Le(e,e.attempt(Kt,n,a),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function NE(e,n,a){const l=this;return Le(e,s,"listItemIndent",l.containerState.size+1);function s(o){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?n(o):a(o)}}function EE(e){e.exit(this.containerState.type)}function AE(e,n,a){const l=this;return Le(e,s,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=l.events[l.events.length-1];return!_e(o)&&c&&c[1].type==="listItemPrefixWhitespace"?n(o):a(o)}}const rx={name:"setextUnderline",resolveTo:TE,tokenize:_E};function TE(e,n){let a=e.length,l,s,o;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){l=a;break}e[a][1].type==="paragraph"&&(s=a)}else e[a][1].type==="content"&&e.splice(a,1),!o&&e[a][1].type==="definition"&&(o=a);const c={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,n]),e.splice(o+1,0,["exit",e[l][1],n]),e[l][1].end={...e[o][1].end}):e[l][1]=c,e.push(["exit",c,n]),e}function _E(e,n,a){const l=this;let s;return o;function o(h){let x=l.events.length,y;for(;x--;)if(l.events[x][1].type!=="lineEnding"&&l.events[x][1].type!=="linePrefix"&&l.events[x][1].type!=="content"){y=l.events[x][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||y)?(e.enter("setextHeadingLine"),s=h,c(h)):a(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===s?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),_e(h)?Le(e,g,"lineSuffix")(h):g(h))}function g(h){return h===null||ye(h)?(e.exit("setextHeadingLine"),n(h)):a(h)}}const DE={tokenize:ME};function ME(e){const n=this,a=e.attempt(Zi,l,e.attempt(this.parser.constructs.flowInitial,s,Le(e,e.attempt(this.parser.constructs.flow,s,e.attempt(U5,s)),"linePrefix")));return a;function l(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,a}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,a}}const RE={resolveAll:g1()},OE=h1("string"),zE=h1("text");function h1(e){return{resolveAll:g1(e==="text"?LE:void 0),tokenize:n};function n(a){const l=this,s=this.parser.constructs[e],o=a.attempt(s,c,f);return c;function c(x){return h(x)?o(x):f(x)}function f(x){if(x===null){a.consume(x);return}return a.enter("data"),a.consume(x),g}function g(x){return h(x)?(a.exit("data"),o(x)):(a.consume(x),g)}function h(x){if(x===null)return!0;const y=s[x];let b=-1;if(y)for(;++b<y.length;){const v=y[b];if(!v.previous||v.previous.call(l,l.previous))return!0}return!1}}}function g1(e){return n;function n(a,l){let s=-1,o;for(;++s<=a.length;)o===void 0?a[s]&&a[s][1].type==="data"&&(o=s,s++):(!a[s]||a[s][1].type!=="data")&&(s!==o+2&&(a[o][1].end=a[s-1][1].end,a.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(a,l):a}}function LE(e,n){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const l=e[a-1][1],s=n.sliceStream(l);let o=s.length,c=-1,f=0,g;for(;o--;){const h=s[o];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)g=!0,f++;else if(h!==-1){o++;break}}if(n._contentTypeTextTrailing&&a===e.length&&(f=0),f){const h={type:a===e.length||g||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:l.start._bufferIndex+c,_index:l.start._index+o,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(e.splice(a,0,["enter",h,n],["exit",h,n]),a+=2)}a++}return e}const UE={42:Kt,43:Kt,45:Kt,48:Kt,49:Kt,50:Kt,51:Kt,52:Kt,53:Kt,54:Kt,55:Kt,56:Kt,57:Kt,62:i1},HE={91:$5},BE={[-2]:ef,[-1]:ef,32:ef},qE={35:G5,42:Oo,45:[rx,Oo],60:J5,61:rx,95:Oo,96:nx,126:nx},IE={38:o1,92:s1},$E={[-5]:tf,[-4]:tf,[-3]:tf,33:mE,38:o1,42:Kf,60:[x5,lE],91:xE,92:[V5,s1],93:kh,95:Kf,96:D5},FE={null:[Kf,RE]},KE={null:[42,95]},PE={null:[]},VE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:KE,contentInitial:HE,disable:PE,document:UE,flow:qE,flowInitial:BE,insideSpan:FE,string:IE,text:$E},Symbol.toStringTag,{value:"Module"}));function YE(e,n,a){let l={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const s={},o=[];let c=[],f=[];const g={attempt:P(H),check:P(L),consume:z,enter:D,exit:Y,interrupt:P(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:C,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:y};let x=n.tokenize.call(h,g);return n.resolveAll&&o.push(n),h;function y(ae){return c=mn(c,ae),E(),c[c.length-1]!==null?[]:(ee(n,0),h.events=cu(o,h.events,h),h.events)}function b(ae,F){return QE(v(ae),F)}function v(ae){return GE(c,ae)}function S(){const{_bufferIndex:ae,_index:F,line:ie,column:ne,offset:W}=l;return{_bufferIndex:ae,_index:F,line:ie,column:ne,offset:W}}function C(ae){s[ae.line]=ae.column,R()}function E(){let ae;for(;l._index<c.length;){const F=c[l._index];if(typeof F=="string")for(ae=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===ae&&l._bufferIndex<F.length;)j(F.charCodeAt(l._bufferIndex));else j(F)}}function j(ae){x=x(ae)}function z(ae){ye(ae)?(l.line++,l.column=1,l.offset+=ae===-3?2:1,R()):ae!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=ae}function D(ae,F){const ie=F||{};return ie.type=ae,ie.start=S(),h.events.push(["enter",ie,h]),f.push(ie),ie}function Y(ae){const F=f.pop();return F.end=S(),h.events.push(["exit",F,h]),F}function H(ae,F){ee(ae,F.from)}function L(ae,F){F.restore()}function P(ae,F){return ie;function ie(ne,W,B){let te,ce,we,T;return Array.isArray(ne)?V(ne):"tokenize"in ne?V([ne]):M(ne);function M(ge){return De;function De(tt){const Ke=tt!==null&&ge[tt],rn=tt!==null&&ge.null,Un=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(rn)?rn:rn?[rn]:[]];return V(Un)(tt)}}function V(ge){return te=ge,ce=0,ge.length===0?B:A(ge[ce])}function A(ge){return De;function De(tt){return T=G(),we=ge,ge.partial||(h.currentConstruct=ge),ge.name&&h.parser.constructs.disable.null.includes(ge.name)?me():ge.tokenize.call(F?Object.assign(Object.create(h),F):h,g,se,me)(tt)}}function se(ge){return ae(we,T),W}function me(ge){return T.restore(),++ce<te.length?A(te[ce]):B}}}function ee(ae,F){ae.resolveAll&&!o.includes(ae)&&o.push(ae),ae.resolve&&nn(h.events,F,h.events.length-F,ae.resolve(h.events.slice(F),h)),ae.resolveTo&&(h.events=ae.resolveTo(h.events,h))}function G(){const ae=S(),F=h.previous,ie=h.currentConstruct,ne=h.events.length,W=Array.from(f);return{from:ne,restore:B};function B(){l=ae,h.previous=F,h.currentConstruct=ie,h.events.length=ne,f=W,R()}}function R(){l.line in s&&l.column<2&&(l.column=s[l.line],l.offset+=s[l.line]-1)}}function GE(e,n){const a=n.start._index,l=n.start._bufferIndex,s=n.end._index,o=n.end._bufferIndex;let c;if(a===s)c=[e[a].slice(l,o)];else{if(c=e.slice(a,s),l>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(l):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function QE(e,n){let a=-1;const l=[];let s;for(;++a<e.length;){const o=e[a];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
369
|
+
*/const o4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ua=ye("x",o4);/**
|
|
370
|
+
* @license lucide-react v0.575.0 - ISC
|
|
371
|
+
*
|
|
372
|
+
* This source code is licensed under the ISC license.
|
|
373
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
374
|
+
*/const u4=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ob=ye("zap",u4);function Rf(){return Rf=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},Rf.apply(null,arguments)}function c4(e,n){if(e==null)return{};var a={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(n.indexOf(l)!==-1)continue;a[l]=e[l]}return a}var d4=C.useLayoutEffect,f4=function(n){var a=sr.useRef(n);return d4(function(){a.current=n}),a},by=function(n,a){if(typeof n=="function"){n(a);return}n.current=a},h4=function(n,a){var l=sr.useRef();return sr.useCallback(function(s){n.current=s,l.current&&by(l.current,null),l.current=a,a&&by(a,s)},[a])},vy={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},g4=function(n){Object.keys(vy).forEach(function(a){n.style.setProperty(a,vy[a],"important")})},ky=g4,Ot=null,Sy=function(n,a){var l=n.scrollHeight;return a.sizingStyle.boxSizing==="border-box"?l+a.borderSize:l-a.paddingSize};function p4(e,n,a,l){a===void 0&&(a=1),l===void 0&&(l=1/0),Ot||(Ot=document.createElement("textarea"),Ot.setAttribute("tabindex","-1"),Ot.setAttribute("aria-hidden","true"),ky(Ot)),Ot.parentNode===null&&document.body.appendChild(Ot);var s=e.paddingSize,o=e.borderSize,c=e.sizingStyle,f=c.boxSizing;Object.keys(c).forEach(function(b){var v=b;Ot.style[v]=c[v]}),ky(Ot),Ot.value=n;var g=Sy(Ot,e);Ot.value=n,g=Sy(Ot,e),Ot.value="x";var h=Ot.scrollHeight-s,x=h*a;f==="border-box"&&(x=x+s+o),g=Math.max(x,g);var y=h*l;return f==="border-box"&&(y=y+s+o),g=Math.min(y,g),[g,h]}var wy=function(){},m4=function(n,a){return n.reduce(function(l,s){return l[s]=a[s],l},{})},y4=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],x4=!!document.documentElement.currentStyle,b4=function(n){var a=window.getComputedStyle(n);if(a===null)return null;var l=m4(y4,a),s=l.boxSizing;if(s==="")return null;x4&&s==="border-box"&&(l.width=parseFloat(l.width)+parseFloat(l.borderRightWidth)+parseFloat(l.borderLeftWidth)+parseFloat(l.paddingRight)+parseFloat(l.paddingLeft)+"px");var o=parseFloat(l.paddingBottom)+parseFloat(l.paddingTop),c=parseFloat(l.borderBottomWidth)+parseFloat(l.borderTopWidth);return{sizingStyle:l,paddingSize:o,borderSize:c}},v4=b4;function oh(e,n,a){var l=f4(a);C.useLayoutEffect(function(){var s=function(c){return l.current(c)};if(e)return e.addEventListener(n,s),function(){return e.removeEventListener(n,s)}},[])}var k4=function(n,a){oh(document.body,"reset",function(l){n.current.form===l.target&&a(l)})},S4=function(n){oh(window,"resize",n)},w4=function(n){oh(document.fonts,"loadingdone",n)},j4=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],N4=function(n,a){var l=n.cacheMeasurements,s=n.maxRows,o=n.minRows,c=n.onChange,f=c===void 0?wy:c,g=n.onHeightChange,h=g===void 0?wy:g,x=c4(n,j4),y=x.value!==void 0,b=C.useRef(null),v=h4(b,a),S=C.useRef(0),N=C.useRef(),E=function(){var T=b.current,P=l&&N.current?N.current:v4(T);if(P){N.current=P;var H=p4(P,T.value||T.placeholder||"x",o,s),L=H[0],V=H[1];S.current!==L&&(S.current=L,T.style.setProperty("height",L+"px","important"),h(L,{rowHeight:V}))}},j=function(T){y||E(),f(T)};return C.useLayoutEffect(E),k4(b,function(){if(!y){var z=b.current.value;requestAnimationFrame(function(){var T=b.current;T&&z!==T.value&&E()})}}),S4(E),w4(E),C.createElement("textarea",Rf({},x,{onChange:j,ref:v}))},C4=C.forwardRef(N4);const jy=e=>{let n;const a=new Set,l=(h,x)=>{const y=typeof h=="function"?h(n):h;if(!Object.is(y,n)){const b=n;n=x??(typeof y!="object"||y===null)?y:Object.assign({},n,y),a.forEach(v=>v(n,b))}},s=()=>n,f={setState:l,getState:s,getInitialState:()=>g,subscribe:h=>(a.add(h),()=>a.delete(h))},g=n=e(l,s,f);return f},E4=(e=>e?jy(e):jy),A4=e=>e;function T4(e,n=A4){const a=sr.useSyncExternalStore(e.subscribe,sr.useCallback(()=>n(e.getState()),[e,n]),sr.useCallback(()=>n(e.getInitialState()),[e,n]));return sr.useDebugValue(a),a}const Ny=e=>{const n=E4(e),a=l=>T4(n,l);return Object.assign(a,n),a},oa=(e=>e?Ny(e):Ny);let Rn=null,Ci=[];function Xe(){if(Rn)return Rn;throw new Error("GatewayAdapter not initialized. Call initAdapter() first.")}function yt(e=15e3){return Rn?Promise.resolve(Rn):new Promise((n,a)=>{const l=setTimeout(()=>{Ci=Ci.filter(o=>o!==n),a(new Error("Adapter initialization timed out"))},e),s=o=>{clearTimeout(l),n(o)};Ci.push(s)})}async function _4(e,n){if(Rn)return Rn;{if(!n)throw new Error("WsAdapter requires wsClient and rpcClient");const{WsAdapter:a}=await Ha(async()=>{const{WsAdapter:o}=await import("./ws-adapter-LktCvqUH.js");return{WsAdapter:o}},[]),{GatewayWsClient:l}=await Ha(async()=>{const{GatewayWsClient:o}=await Promise.resolve().then(()=>SR);return{GatewayWsClient:o}},void 0),{GatewayRpcClient:s}=await Ha(async()=>{const{GatewayRpcClient:o}=await Promise.resolve().then(()=>yR);return{GatewayRpcClient:o}},void 0);if(!(n.wsClient instanceof l))throw new Error("Invalid wsClient");if(!(n.rpcClient instanceof s))throw new Error("Invalid rpcClient");Rn=new a(n.wsClient,n.rpcClient)}await Rn.connect();for(const a of Ci)a(Rn);return Ci=[],Rn}function Cy(){const e=Date.now(),n=Math.random().toString(36).slice(2,8);return`msg-${e}-${n}`}function M4(e){return`agent:${e}:main`}function D4(e){return typeof e=="string"?e:Array.isArray(e)?e.filter(n=>n.type==="text"&&n.text).map(n=>n.text).join(`
|
|
375
|
+
`):""}const Et=oa((e,n)=>({messages:[],isStreaming:!1,currentSessionKey:"agent:main:main",dockExpanded:!1,targetAgentId:null,sessions:[],error:null,activeRunId:null,streamingMessage:null,sendMessage:async a=>{const l=a.trim();if(!l)return;const{currentSessionKey:s}=n(),o={id:Cy(),role:"user",content:l,timestamp:Date.now()};e(c=>({messages:[...c.messages,o],isStreaming:!0,error:null,streamingMessage:null}));try{let c;try{c=Xe()}catch(f){console.error("[ChatDock] Adapter not initialized:",f),e({error:ze.t("common:errors.adapterNotInitialized"),isStreaming:!1});return}console.log("[ChatDock] Sending chat.send:",{text:l,sessionKey:s}),await c.chatSend({text:l,sessionKey:s}),console.log("[ChatDock] chat.send completed")}catch(c){console.error("[ChatDock] chat.send error:",c),e({error:String(c),isStreaming:!1})}},abort:async()=>{const{currentSessionKey:a}=n();e({isStreaming:!1,streamingMessage:null});try{await Xe().chatAbort(a)}catch(l){e({error:String(l)})}},toggleDock:()=>{e(a=>({dockExpanded:!a.dockExpanded}))},setDockExpanded:a=>{e({dockExpanded:a})},switchSession:a=>{e({currentSessionKey:a,messages:[],streamingMessage:null,activeRunId:null,error:null,isStreaming:!1}),n().loadHistory()},newSession:()=>{const{targetAgentId:a}=n(),s=`agent:${a??"main"}:session-${Date.now()}`;e({currentSessionKey:s,messages:[],streamingMessage:null,activeRunId:null,error:null,isStreaming:!1})},loadSessions:async()=>{try{const l=await Xe().sessionsList();e({sessions:l})}catch{}},loadHistory:async()=>{const{currentSessionKey:a}=n();try{const o=(await Xe().chatHistory(a)).map(c=>({id:c.id,role:c.role==="user"?"user":"assistant",content:c.content,timestamp:c.timestamp}));e({messages:o})}catch{e({messages:[]})}},setTargetAgent:a=>{const l=M4(a);e({targetAgentId:a,currentSessionKey:l,messages:[],streamingMessage:null,activeRunId:null,error:null,isStreaming:!1}),n().loadHistory()},handleChatEvent:a=>{const l=String(a.state||""),s=String(a.runId||""),o=a.message;let c=l;switch(!c&&o&&(o.stopReason??o.stop_reason?c="final":(o.role||o.content)&&(c="delta")),c){case"delta":{o&&e({streamingMessage:o,activeRunId:s||n().activeRunId});break}case"final":{if(o){const f=D4(o.content);if(f){const g={id:o.id||Cy(),role:"assistant",content:f,timestamp:Date.now()};e(h=>({messages:[...h.messages,g],isStreaming:!1,streamingMessage:null,activeRunId:null}))}else e({isStreaming:!1,streamingMessage:null,activeRunId:null}),n().loadHistory()}else e({isStreaming:!1,streamingMessage:null,activeRunId:null}),n().loadHistory();break}case"error":{const f=String(a.errorMessage||ze.t("common:errors.errorOccurred"));e({error:f,isStreaming:!1,streamingMessage:null,activeRunId:null});break}case"aborted":{e({isStreaming:!1,streamingMessage:null,activeRunId:null});break}default:{n().isStreaming&&o&&e({streamingMessage:o});break}}},clearError:()=>e({error:null}),initEventListeners:a=>a?a.onEvent("chat",s=>{const o=s.payload;n().handleChatEvent(o)}):()=>{}}));var zb=Symbol.for("immer-nothing"),Ey=Symbol.for("immer-draftable"),Ie=Symbol.for("immer-state");function yn(e,...n){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Oi=Object.getPrototypeOf;function dl(e){return!!e&&!!e[Ie]}function ia(e){var n;return e?Lb(e)||Array.isArray(e)||!!e[Ey]||!!((n=e.constructor)!=null&&n[Ey])||Gi(e)||su(e):!1}var R4=Object.prototype.constructor.toString(),Ay=new WeakMap;function Lb(e){if(!e||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);if(n===null||n===Object.prototype)return!0;const a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;if(a===Object)return!0;if(typeof a!="function")return!1;let l=Ay.get(a);return l===void 0&&(l=Function.toString.call(a),Ay.set(a,l)),l===R4}function zi(e,n,a=!0){iu(e)===0?(a?Reflect.ownKeys(e):Object.keys(e)).forEach(s=>{n(s,e[s],e)}):e.forEach((l,s)=>n(s,l,e))}function iu(e){const n=e[Ie];return n?n.type_:Array.isArray(e)?1:Gi(e)?2:su(e)?3:0}function Of(e,n){return iu(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function Ub(e,n,a){const l=iu(e);l===2?e.set(n,a):l===3?e.add(a):e[n]=a}function O4(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n}function Gi(e){return e instanceof Map}function su(e){return e instanceof Set}function kt(e){return e.copy_||e.base_}function zf(e,n){if(Gi(e))return new Map(e);if(su(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const a=Lb(e);if(n===!0||n==="class_only"&&!a){const l=Object.getOwnPropertyDescriptors(e);delete l[Ie];let s=Reflect.ownKeys(l);for(let o=0;o<s.length;o++){const c=s[o],f=l[c];f.writable===!1&&(f.writable=!0,f.configurable=!0),(f.get||f.set)&&(l[c]={configurable:!0,writable:!0,enumerable:f.enumerable,value:e[c]})}return Object.create(Oi(e),l)}else{const l=Oi(e);if(l!==null&&a)return{...e};const s=Object.create(l);return Object.assign(s,e)}}function uh(e,n=!1){return ou(e)||dl(e)||!ia(e)||(iu(e)>1&&Object.defineProperties(e,{set:So,add:So,clear:So,delete:So}),Object.freeze(e),n&&Object.values(e).forEach(a=>uh(a,!0))),e}function z4(){yn(2)}var So={value:z4};function ou(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Lf={};function ur(e){const n=Lf[e];return n||yn(0,e),n}function L4(e,n){Lf[e]||(Lf[e]=n)}var Li;function $o(){return Li}function U4(e,n){return{drafts_:[],parent_:e,immer_:n,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ty(e,n){n&&(ur("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=n)}function Uf(e){Hf(e),e.drafts_.forEach(H4),e.drafts_=null}function Hf(e){e===Li&&(Li=e.parent_)}function _y(e){return Li=U4(Li,e)}function H4(e){const n=e[Ie];n.type_===0||n.type_===1?n.revoke_():n.revoked_=!0}function My(e,n){n.unfinalizedDrafts_=n.drafts_.length;const a=n.drafts_[0];return e!==void 0&&e!==a?(a[Ie].modified_&&(Uf(n),yn(4)),ia(e)&&(e=Fo(n,e),n.parent_||Ko(n,e)),n.patches_&&ur("Patches").generateReplacementPatches_(a[Ie].base_,e,n.patches_,n.inversePatches_)):e=Fo(n,a,[]),Uf(n),n.patches_&&n.patchListener_(n.patches_,n.inversePatches_),e!==zb?e:void 0}function Fo(e,n,a){if(ou(n))return n;const l=e.immer_.shouldUseStrictIteration(),s=n[Ie];if(!s)return zi(n,(o,c)=>Dy(e,s,n,o,c,a),l),n;if(s.scope_!==e)return n;if(!s.modified_)return Ko(e,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const o=s.copy_;let c=o,f=!1;s.type_===3&&(c=new Set(o),o.clear(),f=!0),zi(c,(g,h)=>Dy(e,s,o,g,h,a,f),l),Ko(e,o,!1),a&&e.patches_&&ur("Patches").generatePatches_(s,a,e.patches_,e.inversePatches_)}return s.copy_}function Dy(e,n,a,l,s,o,c){if(s==null||typeof s!="object"&&!c)return;const f=ou(s);if(!(f&&!c)){if(dl(s)){const g=o&&n&&n.type_!==3&&!Of(n.assigned_,l)?o.concat(l):void 0,h=Fo(e,s,g);if(Ub(a,l,h),dl(h))e.canAutoFreeze_=!1;else return}else c&&a.add(s);if(ia(s)&&!f){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||n&&n.base_&&n.base_[l]===s&&f)return;Fo(e,s),(!n||!n.scope_.parent_)&&typeof l!="symbol"&&(Gi(a)?a.has(l):Object.prototype.propertyIsEnumerable.call(a,l))&&Ko(e,s)}}}function Ko(e,n,a=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&uh(n,a)}function B4(e,n){const a=Array.isArray(e),l={type_:a?1:0,scope_:n?n.scope_:$o(),modified_:!1,finalized_:!1,assigned_:{},parent_:n,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=l,o=ch;a&&(s=[l],o=Ui);const{revoke:c,proxy:f}=Proxy.revocable(s,o);return l.draft_=f,l.revoke_=c,f}var ch={get(e,n){if(n===Ie)return e;const a=kt(e);if(!Of(a,n))return q4(e,a,n);const l=a[n];return e.finalized_||!ia(l)?l:l===Yd(e.base_,n)?(Gd(e),e.copy_[n]=Hi(l,e)):l},has(e,n){return n in kt(e)},ownKeys(e){return Reflect.ownKeys(kt(e))},set(e,n,a){const l=Hb(kt(e),n);if(l!=null&&l.set)return l.set.call(e.draft_,a),!0;if(!e.modified_){const s=Yd(kt(e),n),o=s==null?void 0:s[Ie];if(o&&o.base_===a)return e.copy_[n]=a,e.assigned_[n]=!1,!0;if(O4(a,s)&&(a!==void 0||Of(e.base_,n)))return!0;Gd(e),ra(e)}return e.copy_[n]===a&&(a!==void 0||n in e.copy_)||Number.isNaN(a)&&Number.isNaN(e.copy_[n])||(e.copy_[n]=a,e.assigned_[n]=!0),!0},deleteProperty(e,n){return Yd(e.base_,n)!==void 0||n in e.base_?(e.assigned_[n]=!1,Gd(e),ra(e)):delete e.assigned_[n],e.copy_&&delete e.copy_[n],!0},getOwnPropertyDescriptor(e,n){const a=kt(e),l=Reflect.getOwnPropertyDescriptor(a,n);return l&&{writable:!0,configurable:e.type_!==1||n!=="length",enumerable:l.enumerable,value:a[n]}},defineProperty(){yn(11)},getPrototypeOf(e){return Oi(e.base_)},setPrototypeOf(){yn(12)}},Ui={};zi(ch,(e,n)=>{Ui[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}});Ui.deleteProperty=function(e,n){return Ui.set.call(this,e,n,void 0)};Ui.set=function(e,n,a){return ch.set.call(this,e[0],n,a,e[0])};function Yd(e,n){const a=e[Ie];return(a?kt(a):e)[n]}function q4(e,n,a){var s;const l=Hb(n,a);return l?"value"in l?l.value:(s=l.get)==null?void 0:s.call(e.draft_):void 0}function Hb(e,n){if(!(n in e))return;let a=Oi(e);for(;a;){const l=Object.getOwnPropertyDescriptor(a,n);if(l)return l;a=Oi(a)}}function ra(e){e.modified_||(e.modified_=!0,e.parent_&&ra(e.parent_))}function Gd(e){e.copy_||(e.copy_=zf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var I4=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(n,a,l)=>{if(typeof n=="function"&&typeof a!="function"){const o=a;a=n;const c=this;return function(g=o,...h){return c.produce(g,x=>a.call(this,x,...h))}}typeof a!="function"&&yn(6),l!==void 0&&typeof l!="function"&&yn(7);let s;if(ia(n)){const o=_y(this),c=Hi(n,void 0);let f=!0;try{s=a(c),f=!1}finally{f?Uf(o):Hf(o)}return Ty(o,l),My(s,o)}else if(!n||typeof n!="object"){if(s=a(n),s===void 0&&(s=n),s===zb&&(s=void 0),this.autoFreeze_&&uh(s,!0),l){const o=[],c=[];ur("Patches").generateReplacementPatches_(n,s,o,c),l(o,c)}return s}else yn(1,n)},this.produceWithPatches=(n,a)=>{if(typeof n=="function")return(c,...f)=>this.produceWithPatches(c,g=>n(g,...f));let l,s;return[this.produce(n,a,(c,f)=>{l=c,s=f}),l,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ia(e)||yn(8),dl(e)&&(e=$4(e));const n=_y(this),a=Hi(e,void 0);return a[Ie].isManual_=!0,Hf(n),a}finishDraft(e,n){const a=e&&e[Ie];(!a||!a.isManual_)&&yn(9);const{scope_:l}=a;return Ty(l,n),My(void 0,l)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,n){let a;for(a=n.length-1;a>=0;a--){const s=n[a];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}a>-1&&(n=n.slice(a+1));const l=ur("Patches").applyPatches_;return dl(e)?l(e,n):this.produce(e,s=>l(s,n))}};function Hi(e,n){const a=Gi(e)?ur("MapSet").proxyMap_(e,n):su(e)?ur("MapSet").proxySet_(e,n):B4(e,n);return(n?n.scope_:$o()).drafts_.push(a),a}function $4(e){return dl(e)||yn(10,e),Bb(e)}function Bb(e){if(!ia(e)||ou(e))return e;const n=e[Ie];let a,l=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,a=zf(e,n.scope_.immer_.useStrictShallowCopy_),l=n.scope_.immer_.shouldUseStrictIteration()}else a=zf(e,!0);return zi(a,(s,o)=>{Ub(a,s,Bb(o))},l),n&&(n.finalized_=!1),a}function F4(){class e extends Map{constructor(g,h){super(),this[Ie]={type_:2,parent_:h,scope_:h?h.scope_:$o(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:g,draft_:this,isManual_:!1,revoked_:!1}}get size(){return kt(this[Ie]).size}has(g){return kt(this[Ie]).has(g)}set(g,h){const x=this[Ie];return c(x),(!kt(x).has(g)||kt(x).get(g)!==h)&&(a(x),ra(x),x.assigned_.set(g,!0),x.copy_.set(g,h),x.assigned_.set(g,!0)),this}delete(g){if(!this.has(g))return!1;const h=this[Ie];return c(h),a(h),ra(h),h.base_.has(g)?h.assigned_.set(g,!1):h.assigned_.delete(g),h.copy_.delete(g),!0}clear(){const g=this[Ie];c(g),kt(g).size&&(a(g),ra(g),g.assigned_=new Map,zi(g.base_,h=>{g.assigned_.set(h,!1)}),g.copy_.clear())}forEach(g,h){const x=this[Ie];kt(x).forEach((y,b,v)=>{g.call(h,this.get(b),b,this)})}get(g){const h=this[Ie];c(h);const x=kt(h).get(g);if(h.finalized_||!ia(x)||x!==h.base_.get(g))return x;const y=Hi(x,h);return a(h),h.copy_.set(g,y),y}keys(){return kt(this[Ie]).keys()}values(){const g=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const h=g.next();return h.done?h:{done:!1,value:this.get(h.value)}}}}entries(){const g=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const h=g.next();if(h.done)return h;const x=this.get(h.value);return{done:!1,value:[h.value,x]}}}}[Symbol.iterator](){return this.entries()}}function n(f,g){return new e(f,g)}function a(f){f.copy_||(f.assigned_=new Map,f.copy_=new Map(f.base_))}class l extends Set{constructor(g,h){super(),this[Ie]={type_:3,parent_:h,scope_:h?h.scope_:$o(),modified_:!1,finalized_:!1,copy_:void 0,base_:g,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return kt(this[Ie]).size}has(g){const h=this[Ie];return c(h),h.copy_?!!(h.copy_.has(g)||h.drafts_.has(g)&&h.copy_.has(h.drafts_.get(g))):h.base_.has(g)}add(g){const h=this[Ie];return c(h),this.has(g)||(o(h),ra(h),h.copy_.add(g)),this}delete(g){if(!this.has(g))return!1;const h=this[Ie];return c(h),o(h),ra(h),h.copy_.delete(g)||(h.drafts_.has(g)?h.copy_.delete(h.drafts_.get(g)):!1)}clear(){const g=this[Ie];c(g),kt(g).size&&(o(g),ra(g),g.copy_.clear())}values(){const g=this[Ie];return c(g),o(g),g.copy_.values()}entries(){const g=this[Ie];return c(g),o(g),g.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(g,h){const x=this.values();let y=x.next();for(;!y.done;)g.call(h,y.value,y.value,this),y=x.next()}}function s(f,g){return new l(f,g)}function o(f){f.copy_||(f.copy_=new Set,f.base_.forEach(g=>{if(ia(g)){const h=Hi(g,f);f.drafts_.set(g,h),f.copy_.add(h)}else f.copy_.add(g)}))}function c(f){f.revoked_&&yn(3,JSON.stringify(kt(f)))}L4("MapSet",{proxyMap_:n,proxySet_:s})}var K4=new I4,P4=K4.produce;const V4=e=>(n,a,l)=>(l.setState=(s,o,...c)=>{const f=typeof s=="function"?P4(s):s;return n(f,o,...c)},e(l.setState,a,l)),Y4=V4;function G4(e){const n={runId:e.runId,sessionKey:e.sessionKey,status:"idle",currentTool:null,speechBubble:null,clearTool:!1,clearSpeech:!1,incrementToolCount:!1,toolRecord:null,summary:""};switch(e.stream){case"lifecycle":return Q4(n,e);case"tool":return X4(n,e);case"assistant":return Z4(n,e);case"error":return J4(n,e);default:return n.summary=ze.t("common:events.unknownStream",{stream:e.stream}),n}}function Q4(e,n){const a=n.data.phase;switch(a){case"start":case"thinking":e.status="thinking",e.summary=a==="start"?ze.t("common:events.startRunning"):ze.t("common:events.thinking");break;case"end":e.status="idle",e.clearTool=!0,e.clearSpeech=!0,e.summary=ze.t("common:events.runEnded");break;case"fallback":e.status="error",e.summary=ze.t("common:events.fallback");break;default:e.status="thinking",e.summary=ze.t("common:events.lifecycleUnknown",{phase:a??"unknown"})}return e}function X4(e,n){const a=n.data.phase,l=n.data.name??"unknown";return a==="start"?(e.status="tool_calling",e.currentTool={name:l,args:n.data.args,startedAt:n.ts},e.incrementToolCount=!0,e.toolRecord={name:l,timestamp:n.ts},e.summary=ze.t("common:events.toolCall",{name:l})):(e.status="thinking",e.clearTool=!0,e.summary=ze.t("common:events.toolDone",{name:l})),e}function Z4(e,n){const a=n.data.text??"";return e.status="speaking",e.speechBubble={text:a,timestamp:n.ts},e.summary=a.length>40?`${a.slice(0,40)}...`:a,e}function J4(e,n){const a=n.data.message??ze.t("common:errors.unknownError");return e.status="error",e.summary=ze.t("common:events.errorPrefix",{message:a}),e}const uu=1200,cu=700,ue={x:30,y:20,width:uu-60,height:cu-40,wallThickness:6,cornerRadius:18,corridorWidth:28},ki=(ue.width-ue.corridorWidth)/2,Si=(ue.height-ue.corridorWidth)/2,Ry=ue.x+ki+ue.corridorWidth,Oy=ue.y+Si+ue.corridorWidth,gt={desk:{x:ue.x,y:ue.y,width:ki,height:Si,label:"固定工位区"},meeting:{x:Ry,y:ue.y,width:ki,height:Si,label:"会议区"},hotDesk:{x:ue.x,y:Oy,width:ki,height:Si,label:"热工位区"},lounge:{x:Ry,y:Oy,width:ki,height:Si,label:"休息区"}},dh={desk:"#f4f6f9",meeting:"#eef3fa",hotDesk:"#f1f3f7",lounge:"#f3f1f7",corridor:"#e8ecf1",wall:"#8b9bb0"},fh={desk:"#1e293b",meeting:"#1a2744",hotDesk:"#1e2433",lounge:"#231e33",corridor:"#0f172a",wall:"#475569"},Qi={idle:"#22c55e",thinking:"#3b82f6",tool_calling:"#f97316",speaking:"#a855f7",spawning:"#06b6d4",error:"#ef4444",offline:"#6b7280"},qb=4,Ib=3,Qd=qb*Ib,W4=4,e3=3,zy={width:140,height:110},wi={radius:20,selectedRadius:24,strokeWidth:3,nameLabelMaxChars:12},t3=16/uu,n3=12/cu;function Xd(e){let n=0;for(let a=0;a<e.length;a++){const l=e.charCodeAt(a);n=(n<<5)-n+l|0}return Math.abs(n)}function $b(e,n,a){const l=[],s=e.width/(n+1),o=e.height/(a+1);for(let c=0;c<a;c++)for(let f=0;f<n;f++)l.push({x:Math.round(e.x+s*(f+1)),y:Math.round(e.y+o*(c+1))});return l}const a3=$b(gt.desk,qb,Ib),r3=$b(gt.hotDesk,W4,e3);function Ly(e){return`${e.x},${e.y}`}function l3(e,n,a){if(!n){const o=Xd(e)%Qd;for(let c=0;c<Qd;c++){const f=(o+c)%Qd,g=a3[f];if(!a.has(Ly(g)))return g}}for(const s of r3)if(!a.has(Ly(s)))return s;const l=n?gt.hotDesk:gt.desk;return{x:l.x+30+Xd(e)%(l.width-60),y:l.y+30+Xd(e)%(l.height-60)}}function YR(e){return[e.x*t3,0,e.y*n3]}function i3(e){return e<=8?2:e<=12?3:4}function Uy(e,n,a){const l=a??n;if(l===0)return[];const s=i3(n),o=Math.ceil(l/s),c=40,f=50,g=e.width-c*2,h=e.height-f*2,x=Math.min(zy.width,g/s),y=Math.min(zy.height,h/Math.max(o,1)),b=[];for(let v=0;v<l;v++){const S=v%s,N=Math.floor(v/s);b.push({unitX:Math.round(e.x+c+x*(S+.5)),unitY:Math.round(e.y+f+y*(N+.5))})}return b}function s3(e,n,a){return e===0?[]:Array.from({length:e},(l,s)=>{const o=2*Math.PI*s/e-Math.PI/2;return{x:Math.round(n.x+Math.cos(o)*a),y:Math.round(n.y+Math.sin(o)*a)}})}function o3(e,n){e.status=n.status,e.lastActiveAt=Date.now(),n.currentTool&&(e.currentTool=n.currentTool),n.clearTool&&(e.currentTool=null),n.speechBubble&&(e.speechBubble=n.speechBubble),n.clearSpeech&&(e.speechBubble=null),n.incrementToolCount&&e.toolCallCount++,n.toolRecord&&(e.toolCallHistory=[n.toolRecord,...e.toolCallHistory.slice(0,9)]),n.runId&&!e.runId&&(e.runId=n.runId)}function za(e,n){let a=0;for(const o of e.values())o.status!=="idle"&&o.status!=="offline"&&a++;const l=e.size,s=l>0?Math.min(a/l*100,100):0;return{activeAgents:a,totalAgents:l,totalTokens:n.totalTokens,tokenRate:n.tokenRate,collaborationHeat:s}}F4();const Hy=200,u3=6e4,Fb="openclaw-theme",Kb="openclaw-chat-dock-height",By=300;function c3(){if(typeof window>"u")return By;const e=localStorage.getItem(Kb);if(e){const n=parseInt(e,10);if(!Number.isNaN(n)&&n>=150&&n<=800)return n}return By}function d3(){if(typeof window>"u")return"dark";const e=localStorage.getItem(Fb);return e==="light"||e==="dark"?e:"dark"}function f3(){return typeof window>"u"?!0:window.devicePixelRatio>=1.5}function Zd(e,n,a,l){const s=l3(e,a,l);return{id:e,name:n,status:"idle",position:s,currentTool:null,speechBubble:null,lastActiveAt:Date.now(),toolCallCount:0,toolCallHistory:[],runId:null,isSubAgent:a,parentAgentId:null,childAgentIds:[],zone:"desk",originalPosition:null}}function Jd(e){return`${e.x},${e.y}`}const he=oa()(Y4(e=>({agents:new Map,links:[],globalMetrics:{activeAgents:0,totalAgents:0,totalTokens:0,tokenRate:0,collaborationHeat:0},connectionStatus:"disconnected",connectionError:null,selectedAgentId:null,viewMode:"2d",eventHistory:[],sidebarCollapsed:!1,lastSessionsSnapshot:null,theme:d3(),bloomEnabled:f3(),operatorScopes:[],tokenHistory:[],agentCosts:{},currentPage:"office",chatDockHeight:c3(),runIdMap:new Map,sessionKeyMap:new Map,addAgent:n=>{e(a=>{a.agents.set(n.id,n),a.globalMetrics=za(a.agents,a.globalMetrics)})},updateAgent:(n,a)=>{e(l=>{const s=l.agents.get(n);s&&(Object.assign(s,a),l.globalMetrics=za(l.agents,l.globalMetrics))})},removeAgent:n=>{e(a=>{a.agents.delete(n),a.selectedAgentId===n&&(a.selectedAgentId=null),a.globalMetrics=za(a.agents,a.globalMetrics)})},addSubAgent:(n,a)=>{e(l=>{const s=new Set;for(const f of l.agents.values())s.add(Jd(f.position));const o=Zd(a.agentId,a.label||`Sub-${a.agentId.slice(0,6)}`,!0,s);o.parentAgentId=n,o.zone="hotDesk",o.runId=a.sessionKey,l.agents.set(a.agentId,o);const c=l.agents.get(n);c&&c.childAgentIds.push(a.agentId),l.globalMetrics=za(l.agents,l.globalMetrics)})},removeSubAgent:n=>{e(a=>{const l=a.agents.get(n);if(l!=null&&l.parentAgentId){const s=a.agents.get(l.parentAgentId);s&&(s.childAgentIds=s.childAgentIds.filter(o=>o!==n))}a.agents.delete(n),a.selectedAgentId===n&&(a.selectedAgentId=null),a.globalMetrics=za(a.agents,a.globalMetrics)})},moveToMeeting:(n,a)=>{e(l=>{const s=l.agents.get(n);s&&(s.originalPosition={...s.position},s.position=a,s.zone="meeting")})},returnFromMeeting:n=>{e(a=>{const l=a.agents.get(n);l!=null&&l.originalPosition&&(l.position={...l.originalPosition},l.zone="desk",l.originalPosition=null)})},setSessionsSnapshot:n=>{e(a=>{a.lastSessionsSnapshot=n})},initAgents:n=>{e(a=>{var s;a.agents.clear(),a.runIdMap.clear(),a.sessionKeyMap.clear();const l=new Set;for(const o of n){const c=((s=o.identity)==null?void 0:s.name)??o.name??o.id,f=Zd(o.id,c,!1,l);l.add(Jd(f.position)),a.agents.set(o.id,f)}a.globalMetrics=za(a.agents,a.globalMetrics)})},processAgentEvent:n=>{e(a=>{const l=G4(n);let s=a.runIdMap.get(n.runId);if(!s&&n.sessionKey){const f=a.sessionKeyMap.get(n.sessionKey);f&&f.length>0&&(s=f[0])}if(!s&&(s=n.runId,!a.agents.has(s))){const f=new Set;for(const h of a.agents.values())f.add(Jd(h.position));const g=Zd(s,`Agent-${s.slice(0,6)}`,!0,f);g.runId=n.runId,a.agents.set(s,g)}if(a.runIdMap.set(n.runId,s),n.sessionKey){const f=a.sessionKeyMap.get(n.sessionKey)??[];f.includes(s)||(f.push(s),a.sessionKeyMap.set(n.sessionKey,f)),h3(a,n.sessionKey,s)}const o=a.agents.get(s);o&&o3(o,l);const c={timestamp:n.ts,agentId:s,agentName:(o==null?void 0:o.name)??s,stream:n.stream,summary:l.summary};a.eventHistory.push(c),a.eventHistory.length>Hy&&(a.eventHistory=a.eventHistory.slice(-Hy)),a.globalMetrics=za(a.agents,a.globalMetrics)})},selectAgent:n=>{e(a=>{a.selectedAgentId=a.selectedAgentId===n?null:n})},setViewMode:n=>{e(a=>{a.viewMode=n})},setConnectionStatus:(n,a)=>{e(l=>{l.connectionStatus=n,l.connectionError=a??null})},setSidebarCollapsed:n=>{e(a=>{a.sidebarCollapsed=n})},setTheme:n=>{e(a=>{a.theme=n});try{localStorage.setItem(Fb,n)}catch{}},setBloomEnabled:n=>{e(a=>{a.bloomEnabled=n})},setOperatorScopes:n=>{e(a=>{a.operatorScopes=n})},pushTokenSnapshot:n=>{e(a=>{a.tokenHistory.push(n),a.tokenHistory.length>30&&(a.tokenHistory=a.tokenHistory.slice(-30))})},setAgentCosts:n=>{e(a=>{a.agentCosts=n})},setCurrentPage:n=>{e(a=>{a.currentPage=n})},setChatDockHeight:n=>{e(a=>{a.chatDockHeight=n});try{localStorage.setItem(Kb,String(n))}catch{}},updateMetrics:()=>{e(n=>{n.globalMetrics=za(n.agents,n.globalMetrics)})}})));function h3(e,n,a){const l=e.sessionKeyMap.get(n);if(!l||l.length<2)return;const s=Date.now();for(const o of l){if(o===a)continue;const c=e.links.findIndex(f=>f.sessionKey===n&&(f.sourceId===a&&f.targetId===o||f.sourceId===o&&f.targetId===a));if(c>=0){const f=e.links[c];f.lastActivityAt=s,f.strength=Math.min(f.strength+.1,1)}else e.links.push({sourceId:a,targetId:o,sessionKey:n,strength:.3,lastActivityAt:s})}e.links=e.links.filter(o=>s-o.lastActivityAt<u3)}function g3(){const{t:e}=oe("chat"),[n,a]=C.useState(!1),l=C.useRef(null),s=he(h=>h.agents),o=Et(h=>h.targetAgentId),c=Et(h=>h.setTargetAgent),f=Array.from(s.values()),g=f.find(h=>h.id===o)??f[0];return C.useEffect(()=>{function h(x){l.current&&!l.current.contains(x.target)&&a(!1)}if(n)return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[n]),f.length===0?null:d.jsxs("div",{className:"relative",ref:l,children:[d.jsxs("button",{type:"button",onClick:()=>a(!n),className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800",children:[d.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{backgroundColor:qy((g==null?void 0:g.id)??"")}}),d.jsx("span",{className:"max-w-[100px] truncate",children:(g==null?void 0:g.name)??e("agentSelector.defaultLabel")}),d.jsx(sa,{className:"h-3 w-3"})]}),n&&d.jsx("div",{className:"absolute bottom-full left-0 z-50 mb-1 min-w-[160px] rounded-lg border border-gray-200 bg-white py-1 shadow-lg dark:border-gray-700 dark:bg-gray-900",children:f.map(h=>d.jsxs("button",{type:"button",onClick:()=>{c(h.id),a(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs hover:bg-gray-50 dark:hover:bg-gray-800 ${h.id===o?"bg-blue-50 text-blue-700 dark:bg-blue-900/20 dark:text-blue-400":"text-gray-700 dark:text-gray-300"}`,children:[d.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{backgroundColor:qy(h.id)}}),d.jsx("span",{className:"truncate",children:h.name})]},h.id))})]})}function qy(e){const n=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"];let a=0;for(let l=0;l<e.length;l++)a=(a<<5)-a+e.charCodeAt(l)|0;return n[Math.abs(a)%n.length]}function p3(){const{t:e}=oe("chat"),[n,a]=C.useState(""),[l,s]=C.useState(!1),o=C.useRef(null),c=Et(E=>E.sendMessage),f=Et(E=>E.abort),g=Et(E=>E.isStreaming),h=Et(E=>E.dockExpanded),x=Et(E=>E.toggleDock),y=Et(E=>E.error),b=Et(E=>E.clearError),v=n.trim().length>0&&!g,S=C.useCallback(()=>{const E=n.trim();!E||g||(c(E),a(""))},[n,g,c]),N=C.useCallback(E=>{E.key==="Enter"&&!E.shiftKey&&!l&&(E.preventDefault(),S()),E.key==="Escape"&&h&&x()},[S,l,h,x]);return d.jsxs("div",{className:"border-t border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[y&&d.jsxs("div",{className:"flex items-center justify-between bg-red-50 px-3 py-1.5 text-xs text-red-600 dark:bg-red-900/20 dark:text-red-400",children:[d.jsx("span",{className:"truncate",children:y}),d.jsx("button",{type:"button",onClick:b,className:"ml-2 text-red-500 hover:text-red-700",children:"✕"})]}),d.jsxs("div",{className:"flex items-end gap-2 px-3 py-2",children:[d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(g3,{}),d.jsx("button",{type:"button",onClick:x,className:"rounded p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-800 dark:hover:text-gray-300",title:e(h?"dock.collapseDock":"dock.expandDock"),children:h?d.jsx(sa,{className:"h-4 w-4"}):d.jsx(rh,{className:"h-4 w-4"})})]}),d.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-800 dark:hover:text-gray-300",title:e("dock.attachmentWip"),onClick:()=>{},children:d.jsx(zC,{className:"h-4 w-4"})}),d.jsx(C4,{ref:o,value:n,onChange:E=>a(E.target.value),onKeyDown:N,onCompositionStart:()=>s(!0),onCompositionEnd:()=>s(!1),placeholder:e("dock.placeholder"),maxRows:4,className:"flex-1 resize-none rounded-lg border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm outline-none transition-colors placeholder:text-gray-400 focus:border-blue-400 focus:bg-white dark:border-gray-700 dark:bg-gray-800 dark:placeholder:text-gray-500 dark:focus:border-blue-500 dark:focus:bg-gray-900"}),g?d.jsx("button",{type:"button",onClick:()=>f(),className:"rounded-lg bg-red-500 p-1.5 text-white transition-colors hover:bg-red-600",title:e("common:actions.stop"),children:d.jsx(JC,{className:"h-4 w-4"})}):d.jsx("button",{type:"button",onClick:S,disabled:!v,className:`rounded-lg p-1.5 transition-colors ${v?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-200 text-gray-400 dark:bg-gray-700"}`,title:e("common:actions.send"),children:d.jsx(PC,{className:"h-4 w-4"})})]})]})}function m3(e,n){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const y3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,x3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b3={};function Iy(e,n){return(b3.jsx?x3:y3).test(e)}const v3=/[ \t\n\f\r]/g;function k3(e){return typeof e=="object"?e.type==="text"?$y(e.value):!1:$y(e)}function $y(e){return e.replace(v3,"")===""}class Xi{constructor(n,a,l){this.normal=a,this.property=n,l&&(this.space=l)}}Xi.prototype.normal={};Xi.prototype.property={};Xi.prototype.space=void 0;function Pb(e,n){const a={},l={};for(const s of e)Object.assign(a,s.property),Object.assign(l,s.normal);return new Xi(a,l,n)}function Bf(e){return e.toLowerCase()}class Vt{constructor(n,a){this.attribute=a,this.property=n}}Vt.prototype.attribute="";Vt.prototype.booleanish=!1;Vt.prototype.boolean=!1;Vt.prototype.commaOrSpaceSeparated=!1;Vt.prototype.commaSeparated=!1;Vt.prototype.defined=!1;Vt.prototype.mustUseProperty=!1;Vt.prototype.number=!1;Vt.prototype.overloadedBoolean=!1;Vt.prototype.property="";Vt.prototype.spaceSeparated=!1;Vt.prototype.space=void 0;let S3=0;const Ce=gr(),ht=gr(),qf=gr(),re=gr(),Je=gr(),cl=gr(),tn=gr();function gr(){return 2**++S3}const If=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ce,booleanish:ht,commaOrSpaceSeparated:tn,commaSeparated:cl,number:re,overloadedBoolean:qf,spaceSeparated:Je},Symbol.toStringTag,{value:"Module"})),Wd=Object.keys(If);class hh extends Vt{constructor(n,a,l,s){let o=-1;if(super(n,a),Fy(this,"space",s),typeof l=="number")for(;++o<Wd.length;){const c=Wd[o];Fy(this,Wd[o],(l&If[c])===If[c])}}}hh.prototype.defined=!0;function Fy(e,n,a){a&&(e[n]=a)}function ml(e){const n={},a={};for(const[l,s]of Object.entries(e.properties)){const o=new hh(l,e.transform(e.attributes||{},l),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(o.mustUseProperty=!0),n[l]=o,a[Bf(l)]=l,a[Bf(o.attribute)]=l}return new Xi(n,a,e.space)}const Vb=ml({properties:{ariaActiveDescendant:null,ariaAtomic:ht,ariaAutoComplete:null,ariaBusy:ht,ariaChecked:ht,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Je,ariaCurrent:null,ariaDescribedBy:Je,ariaDetails:null,ariaDisabled:ht,ariaDropEffect:Je,ariaErrorMessage:null,ariaExpanded:ht,ariaFlowTo:Je,ariaGrabbed:ht,ariaHasPopup:null,ariaHidden:ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Je,ariaLevel:re,ariaLive:null,ariaModal:ht,ariaMultiLine:ht,ariaMultiSelectable:ht,ariaOrientation:null,ariaOwns:Je,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:ht,ariaReadOnly:ht,ariaRelevant:null,ariaRequired:ht,ariaRoleDescription:Je,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:ht,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Yb(e,n){return n in e?e[n]:n}function Gb(e,n){return Yb(e,n.toLowerCase())}const w3=ml({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cl,acceptCharset:Je,accessKey:Je,action:null,allow:null,allowFullScreen:Ce,allowPaymentRequest:Ce,allowUserMedia:Ce,alt:null,as:null,async:Ce,autoCapitalize:null,autoComplete:Je,autoFocus:Ce,autoPlay:Ce,blocking:Je,capture:null,charSet:null,checked:Ce,cite:null,className:Je,cols:re,colSpan:null,content:null,contentEditable:ht,controls:Ce,controlsList:Je,coords:re|cl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ce,defer:Ce,dir:null,dirName:null,disabled:Ce,download:qf,draggable:ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ce,formTarget:null,headers:Je,height:re,hidden:qf,high:re,href:null,hrefLang:null,htmlFor:Je,httpEquiv:Je,id:null,imageSizes:null,imageSrcSet:null,inert:Ce,inputMode:null,integrity:null,is:null,isMap:Ce,itemId:null,itemProp:Je,itemRef:Je,itemScope:Ce,itemType:Je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ce,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ce,muted:Ce,name:null,nonce:null,noModule:Ce,noValidate:Ce,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ce,optimum:re,pattern:null,ping:Je,placeholder:null,playsInline:Ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ce,referrerPolicy:null,rel:Je,required:Ce,reversed:Ce,rows:re,rowSpan:re,sandbox:Je,scope:null,scoped:Ce,seamless:Ce,selected:Ce,shadowRootClonable:Ce,shadowRootDelegatesFocus:Ce,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ce,useMap:null,value:ht,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Je,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ce,declare:Ce,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ce,noHref:Ce,noShade:Ce,noWrap:Ce,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:ht,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ce,disableRemotePlayback:Ce,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:Gb}),j3=ml({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:tn,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:Je,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:cl,g2:cl,glyphName:cl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tn,rev:tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tn,requiredFeatures:tn,requiredFonts:tn,requiredFormats:tn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tn,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Yb}),Qb=ml({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Xb=ml({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Gb}),Zb=ml({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),N3={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},C3=/[A-Z]/g,Ky=/-[a-z]/g,E3=/^data[-\w.:]+$/i;function A3(e,n){const a=Bf(n);let l=n,s=Vt;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&E3.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Ky,_3);l="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Ky.test(o)){let c=o.replace(C3,T3);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}s=hh}return new s(l,n)}function T3(e){return"-"+e.toLowerCase()}function _3(e){return e.charAt(1).toUpperCase()}const M3=Pb([Vb,w3,Qb,Xb,Zb],"html"),gh=Pb([Vb,j3,Qb,Xb,Zb],"svg");function D3(e){return e.join(" ").trim()}var ll={},ef,Py;function R3(){if(Py)return ef;Py=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,a=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,g=`
|
|
376
|
+
`,h="/",x="*",y="",b="comment",v="declaration";function S(E,j){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];j=j||{};var z=1,T=1;function P(ne){var W=ne.match(n);W&&(z+=W.length);var B=ne.lastIndexOf(g);T=~B?ne.length-B:T+ne.length}function H(){var ne={line:z,column:T};return function(W){return W.position=new L(ne),G(),W}}function L(ne){this.start=ne,this.end={line:z,column:T},this.source=j.source}L.prototype.content=E;function V(ne){var W=new Error(j.source+":"+z+":"+T+": "+ne);if(W.reason=ne,W.filename=j.source,W.line=z,W.column=T,W.source=E,!j.silent)throw W}function ee(ne){var W=ne.exec(E);if(W){var B=W[0];return P(B),E=E.slice(B.length),W}}function G(){ee(a)}function R(ne){var W;for(ne=ne||[];W=ae();)W!==!1&&ne.push(W);return ne}function ae(){var ne=H();if(!(h!=E.charAt(0)||x!=E.charAt(1))){for(var W=2;y!=E.charAt(W)&&(x!=E.charAt(W)||h!=E.charAt(W+1));)++W;if(W+=2,y===E.charAt(W-1))return V("End of comment missing");var B=E.slice(2,W-2);return T+=2,P(B),E=E.slice(W),T+=2,ne({type:b,comment:B})}}function F(){var ne=H(),W=ee(l);if(W){if(ae(),!ee(s))return V("property missing ':'");var B=ee(o),te=ne({type:v,property:N(W[0].replace(e,y)),value:B?N(B[0].replace(e,y)):y});return ee(c),te}}function ie(){var ne=[];R(ne);for(var W;W=F();)W!==!1&&(ne.push(W),R(ne));return ne}return G(),ie()}function N(E){return E?E.replace(f,y):y}return ef=S,ef}var Vy;function O3(){if(Vy)return ll;Vy=1;var e=ll&&ll.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ll,"__esModule",{value:!0}),ll.default=a;const n=e(R3());function a(l,s){let o=null;if(!l||typeof l!="string")return o;const c=(0,n.default)(l),f=typeof s=="function";return c.forEach(g=>{if(g.type!=="declaration")return;const{property:h,value:x}=g;f?s(h,x,g):x&&(o=o||{},o[h]=x)}),o}return ll}var pi={},Yy;function z3(){if(Yy)return pi;Yy=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,a=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||a.test(h)||e.test(h)},c=function(h,x){return x.toUpperCase()},f=function(h,x){return"".concat(x,"-")},g=function(h,x){return x===void 0&&(x={}),o(h)?h:(h=h.toLowerCase(),x.reactCompat?h=h.replace(s,f):h=h.replace(l,f),h.replace(n,c))};return pi.camelCase=g,pi}var mi,Gy;function L3(){if(Gy)return mi;Gy=1;var e=mi&&mi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(O3()),a=z3();function l(s,o){var c={};return!s||typeof s!="string"||(0,n.default)(s,function(f,g){f&&g&&(c[(0,a.camelCase)(f,o)]=g)}),c}return l.default=l,mi=l,mi}var U3=L3();const H3=Zf(U3),Jb=Wb("end"),ph=Wb("start");function Wb(e){return n;function n(a){const l=a&&a.position&&a.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function B3(e){const n=ph(e),a=Jb(e);if(n&&a)return{start:n,end:a}}function Ei(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qy(e.position):"start"in e||"end"in e?Qy(e):"line"in e||"column"in e?$f(e):""}function $f(e){return Xy(e&&e.line)+":"+Xy(e&&e.column)}function Qy(e){return $f(e&&e.start)+"-"+$f(e&&e.end)}function Xy(e){return e&&typeof e=="number"?e:1}class _t extends Error{constructor(n,a,l){super(),typeof a=="string"&&(l=a,a=void 0);let s="",o={},c=!1;if(a&&("line"in a&&"column"in a?o={place:a}:"start"in a&&"end"in a?o={place:a}:"type"in a?o={ancestors:[a],place:a.position}:o={...a}),typeof n=="string"?s=n:!o.cause&&n&&(c=!0,s=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof l=="string"){const g=l.indexOf(":");g===-1?o.ruleId=l:(o.source=l.slice(0,g),o.ruleId=l.slice(g+1))}if(!o.place&&o.ancestors&&o.ancestors){const g=o.ancestors[o.ancestors.length-1];g&&(o.place=g.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Ei(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}_t.prototype.file="";_t.prototype.name="";_t.prototype.reason="";_t.prototype.message="";_t.prototype.stack="";_t.prototype.column=void 0;_t.prototype.line=void 0;_t.prototype.ancestors=void 0;_t.prototype.cause=void 0;_t.prototype.fatal=void 0;_t.prototype.place=void 0;_t.prototype.ruleId=void 0;_t.prototype.source=void 0;const mh={}.hasOwnProperty,q3=new Map,I3=/[A-Z]/g,$3=new Set(["table","tbody","thead","tfoot","tr"]),F3=new Set(["td","th"]),e1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function K3(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=J3(a,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=Z3(a,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?gh:M3,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=t1(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function t1(e,n,a){if(n.type==="element")return P3(e,n,a);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return V3(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return G3(e,n,a);if(n.type==="mdxjsEsm")return Y3(e,n);if(n.type==="root")return Q3(e,n,a);if(n.type==="text")return X3(e,n)}function P3(e,n,a){const l=e.schema;let s=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(s=gh,e.schema=s),e.ancestors.push(n);const o=a1(e,n.tagName,!1),c=W3(e,n);let f=xh(e,n);return $3.has(n.tagName)&&(f=f.filter(function(g){return typeof g=="string"?!k3(g):!0})),n1(e,c,o,n),yh(c,f),e.ancestors.pop(),e.schema=l,e.create(n,o,c,a)}function V3(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Bi(e,n.position)}function Y3(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Bi(e,n.position)}function G3(e,n,a){const l=e.schema;let s=l;n.name==="svg"&&l.space==="html"&&(s=gh,e.schema=s),e.ancestors.push(n);const o=n.name===null?e.Fragment:a1(e,n.name,!0),c=e5(e,n),f=xh(e,n);return n1(e,c,o,n),yh(c,f),e.ancestors.pop(),e.schema=l,e.create(n,o,c,a)}function Q3(e,n,a){const l={};return yh(l,xh(e,n)),e.create(n,e.Fragment,l,a)}function X3(e,n){return n.value}function n1(e,n,a,l){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(n.node=l)}function yh(e,n){if(n.length>0){const a=n.length>1?n:n[0];a&&(e.children=a)}}function Z3(e,n,a){return l;function l(s,o,c,f){const h=Array.isArray(c.children)?a:n;return f?h(o,c,f):h(o,c)}}function J3(e,n){return a;function a(l,s,o,c){const f=Array.isArray(o.children),g=ph(l);return n(s,o,c,f,{columnNumber:g?g.column-1:void 0,fileName:e,lineNumber:g?g.line:void 0},void 0)}}function W3(e,n){const a={};let l,s;for(s in n.properties)if(s!=="children"&&mh.call(n.properties,s)){const o=t5(e,s,n.properties[s]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&F3.has(n.tagName)?l=f:a[c]=f}}if(l){const o=a.style||(a.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return a}function e5(e,n){const a={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const o=l.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(a,e.evaluater.evaluateExpression(f.argument))}else Bi(e,n.position);else{const s=l.name;let o;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else Bi(e,n.position);else o=l.value===null?!0:l.value;a[s]=o}return a}function xh(e,n){const a=[];let l=-1;const s=e.passKeys?new Map:q3;for(;++l<n.children.length;){const o=n.children[l];let c;if(e.passKeys){const g=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(g){const h=s.get(g)||0;c=g+"-"+h,s.set(g,h+1)}}const f=t1(e,o,c);f!==void 0&&a.push(f)}return a}function t5(e,n,a){const l=A3(e.schema,n);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=l.commaSeparated?m3(a):D3(a)),l.property==="style"){let s=typeof a=="object"?a:n5(e,String(a));return e.stylePropertyNameCase==="css"&&(s=a5(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&l.space?N3[l.property]||l.property:l.attribute,a]}}function n5(e,n){try{return H3(n,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const l=a,s=new _t("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=e1+"#cannot-parse-style-attribute",s}}function a1(e,n,a){let l;if(!a)l={type:"Literal",value:n};else if(n.includes(".")){const s=n.split(".");let o=-1,c;for(;++o<s.length;){const f=Iy(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}l=c}else l=Iy(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const s=l.value;return mh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(l);Bi(e)}function Bi(e,n){const a=new _t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=e1+"#cannot-handle-mdx-estrees-without-createevaluater",a}function a5(e){const n={};let a;for(a in e)mh.call(e,a)&&(n[r5(a)]=e[a]);return n}function r5(e){let n=e.replace(I3,l5);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function l5(e){return"-"+e.toLowerCase()}const tf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},i5={};function bh(e,n){const a=i5,l=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,s=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return r1(e,l,s)}function r1(e,n,a){if(s5(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Zy(e.children,n,a)}return Array.isArray(e)?Zy(e,n,a):""}function Zy(e,n,a){const l=[];let s=-1;for(;++s<e.length;)l[s]=r1(e[s],n,a);return l.join("")}function s5(e){return!!(e&&typeof e=="object")}const Jy=document.createElement("i");function vh(e){const n="&"+e+";";Jy.innerHTML=n;const a=Jy.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===n?!1:a}function nn(e,n,a,l){const s=e.length;let o=0,c;if(n<0?n=-n>s?0:s+n:n=n>s?s:n,a=a>0?a:0,l.length<1e4)c=Array.from(l),c.unshift(n,a),e.splice(...c);else for(a&&e.splice(n,a);o<l.length;)c=l.slice(o,o+1e4),c.unshift(n,0),e.splice(...c),o+=1e4,n+=1e4}function mn(e,n){return e.length>0?(nn(e,e.length,0,n),e):n}const Wy={}.hasOwnProperty;function l1(e){const n={};let a=-1;for(;++a<e.length;)o5(n,e[a]);return n}function o5(e,n){let a;for(a in n){const s=(Wy.call(e,a)?e[a]:void 0)||(e[a]={}),o=n[a];let c;if(o)for(c in o){Wy.call(s,c)||(s[c]=[]);const f=o[c];u5(s[c],Array.isArray(f)?f:f?[f]:[])}}}function u5(e,n){let a=-1;const l=[];for(;++a<n.length;)(n[a].add==="after"?e:l).push(n[a]);nn(e,0,0,l)}function i1(e,n){const a=Number.parseInt(e,n);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function jn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zt=Ba(/[A-Za-z]/),Tt=Ba(/[\dA-Za-z]/),c5=Ba(/[#-'*+\--9=?A-Z^-~]/);function Po(e){return e!==null&&(e<32||e===127)}const Ff=Ba(/\d/),d5=Ba(/[\dA-Fa-f]/),f5=Ba(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function Ze(e){return e!==null&&(e<0||e===32)}function _e(e){return e===-2||e===-1||e===32}const du=Ba(new RegExp("\\p{P}|\\p{S}","u")),cr=Ba(/\s/);function Ba(e){return n;function n(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function yl(e){const n=[];let a=-1,l=0,s=0;for(;++a<e.length;){const o=e.charCodeAt(a);let c="";if(o===37&&Tt(e.charCodeAt(a+1))&&Tt(e.charCodeAt(a+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(a+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),s=1):c="�"}else c=String.fromCharCode(o);c&&(n.push(e.slice(l,a),encodeURIComponent(c)),l=a+s+1,c=""),s&&(a+=s,s=0)}return n.join("")+e.slice(l)}function Le(e,n,a,l){const s=l?l-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(g){return _e(g)?(e.enter(a),f(g)):n(g)}function f(g){return _e(g)&&o++<s?(e.consume(g),f):(e.exit(a),n(g))}}const h5={tokenize:g5};function g5(e){const n=e.attempt(this.parser.constructs.contentInitial,l,s);let a;return n;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Le(e,n,"linePrefix")}function s(f){return e.enter("paragraph"),o(f)}function o(f){const g=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=g),a=g,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return xe(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const p5={tokenize:m5},ex={tokenize:y5};function m5(e){const n=this,a=[];let l=0,s,o,c;return f;function f(T){if(l<a.length){const P=a[l];return n.containerState=P[1],e.attempt(P[0].continuation,g,h)(T)}return h(T)}function g(T){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,s&&z();const P=n.events.length;let H=P,L;for(;H--;)if(n.events[H][0]==="exit"&&n.events[H][1].type==="chunkFlow"){L=n.events[H][1].end;break}j(l);let V=P;for(;V<n.events.length;)n.events[V][1].end={...L},V++;return nn(n.events,H+1,0,n.events.slice(P)),n.events.length=V,h(T)}return f(T)}function h(T){if(l===a.length){if(!s)return b(T);if(s.currentConstruct&&s.currentConstruct.concrete)return S(T);n.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(ex,x,y)(T)}function x(T){return s&&z(),j(l),b(T)}function y(T){return n.parser.lazy[n.now().line]=l!==a.length,c=n.now().offset,S(T)}function b(T){return n.containerState={},e.attempt(ex,v,S)(T)}function v(T){return l++,a.push([n.currentConstruct,n.containerState]),b(T)}function S(T){if(T===null){s&&z(),j(0),e.consume(T);return}return s=s||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),N(T)}function N(T){if(T===null){E(e.exit("chunkFlow"),!0),j(0),e.consume(T);return}return xe(T)?(e.consume(T),E(e.exit("chunkFlow")),l=0,n.interrupt=void 0,f):(e.consume(T),N)}function E(T,P){const H=n.sliceStream(T);if(P&&H.push(null),T.previous=o,o&&(o.next=T),o=T,s.defineSkip(T.start),s.write(H),n.parser.lazy[T.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<c&&(!s.events[L][1].end||s.events[L][1].end.offset>c))return;const V=n.events.length;let ee=V,G,R;for(;ee--;)if(n.events[ee][0]==="exit"&&n.events[ee][1].type==="chunkFlow"){if(G){R=n.events[ee][1].end;break}G=!0}for(j(l),L=V;L<n.events.length;)n.events[L][1].end={...R},L++;nn(n.events,ee+1,0,n.events.slice(V)),n.events.length=L}}function j(T){let P=a.length;for(;P-- >T;){const H=a[P];n.containerState=H[1],H[0].exit.call(n,e)}a.length=T}function z(){s.write([null]),o=void 0,s=void 0,n.containerState._closeFlow=void 0}}function y5(e,n,a){return Le(e,e.attempt(this.parser.constructs.document,n,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fl(e){if(e===null||Ze(e)||cr(e))return 1;if(du(e))return 2}function fu(e,n,a){const l=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!l.includes(o)&&(n=o(n,a),l.push(o))}return n}const Kf={name:"attention",resolveAll:x5,tokenize:b5};function x5(e,n){let a=-1,l,s,o,c,f,g,h,x;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(l=a;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[l][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;g=e[l][1].end.offset-e[l][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const y={...e[l][1].end},b={...e[a][1].start};tx(y,-g),tx(b,g),c={type:g>1?"strongSequence":"emphasisSequence",start:y,end:{...e[l][1].end}},f={type:g>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:b},o={type:g>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[a][1].start}},s={type:g>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[l][1].end={...c.start},e[a][1].start={...f.end},h=[],e[l][1].end.offset-e[l][1].start.offset&&(h=mn(h,[["enter",e[l][1],n],["exit",e[l][1],n]])),h=mn(h,[["enter",s,n],["enter",c,n],["exit",c,n],["enter",o,n]]),h=mn(h,fu(n.parser.constructs.insideSpan.null,e.slice(l+1,a),n)),h=mn(h,[["exit",o,n],["enter",f,n],["exit",f,n],["exit",s,n]]),e[a][1].end.offset-e[a][1].start.offset?(x=2,h=mn(h,[["enter",e[a][1],n],["exit",e[a][1],n]])):x=0,nn(e,l-1,a-l+3,h),a=l+h.length-x-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function b5(e,n){const a=this.parser.constructs.attentionMarkers.null,l=this.previous,s=fl(l);let o;return c;function c(g){return o=g,e.enter("attentionSequence"),f(g)}function f(g){if(g===o)return e.consume(g),f;const h=e.exit("attentionSequence"),x=fl(g),y=!x||x===2&&s||a.includes(g),b=!s||s===2&&x||a.includes(l);return h._open=!!(o===42?y:y&&(s||!b)),h._close=!!(o===42?b:b&&(x||!y)),n(g)}}function tx(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const v5={name:"autolink",tokenize:k5};function k5(e,n,a){let l=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return zt(v)?(e.consume(v),c):v===64?a(v):h(v)}function c(v){return v===43||v===45||v===46||Tt(v)?(l=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),l=0,g):(v===43||v===45||v===46||Tt(v))&&l++<32?(e.consume(v),f):(l=0,h(v))}function g(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),n):v===null||v===32||v===60||Po(v)?a(v):(e.consume(v),g)}function h(v){return v===64?(e.consume(v),x):c5(v)?(e.consume(v),h):a(v)}function x(v){return Tt(v)?y(v):a(v)}function y(v){return v===46?(e.consume(v),l=0,x):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),n):b(v)}function b(v){if((v===45||Tt(v))&&l++<63){const S=v===45?b:y;return e.consume(v),S}return a(v)}}const Zi={partial:!0,tokenize:S5};function S5(e,n,a){return l;function l(o){return _e(o)?Le(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||xe(o)?n(o):a(o)}}const s1={continuation:{tokenize:j5},exit:N5,name:"blockQuote",tokenize:w5};function w5(e,n,a){const l=this;return s;function s(c){if(c===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return a(c)}function o(c){return _e(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function j5(e,n,a){const l=this;return s;function s(c){return _e(c)?Le(e,o,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(s1,n,a)(c)}}function N5(e){e.exit("blockQuote")}const o1={name:"characterEscape",tokenize:C5};function C5(e,n,a){return l;function l(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return f5(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):a(o)}}const u1={name:"characterReference",tokenize:E5};function E5(e,n,a){const l=this;let s=0,o,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),g}function g(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,c=Tt,x(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=d5,x):(e.enter("characterReferenceValue"),o=7,c=Ff,x(y))}function x(y){if(y===59&&s){const b=e.exit("characterReferenceValue");return c===Tt&&!vh(l.sliceSerialize(b))?a(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(y)&&s++<o?(e.consume(y),x):a(y)}}const nx={partial:!0,tokenize:T5},ax={concrete:!0,name:"codeFenced",tokenize:A5};function A5(e,n,a){const l=this,s={partial:!0,tokenize:H};let o=0,c=0,f;return g;function g(L){return h(L)}function h(L){const V=l.events[l.events.length-1];return o=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,f=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),x(L)}function x(L){return L===f?(c++,e.consume(L),x):c<3?a(L):(e.exit("codeFencedFenceSequence"),_e(L)?Le(e,y,"whitespace")(L):y(L))}function y(L){return L===null||xe(L)?(e.exit("codeFencedFence"),l.interrupt?n(L):e.check(nx,N,P)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||xe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(L)):_e(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Le(e,v,"whitespace")(L)):L===96&&L===f?a(L):(e.consume(L),b)}function v(L){return L===null||xe(L)?y(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(L))}function S(L){return L===null||xe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(L)):L===96&&L===f?a(L):(e.consume(L),S)}function N(L){return e.attempt(s,P,E)(L)}function E(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),j}function j(L){return o>0&&_e(L)?Le(e,z,"linePrefix",o+1)(L):z(L)}function z(L){return L===null||xe(L)?e.check(nx,N,P)(L):(e.enter("codeFlowValue"),T(L))}function T(L){return L===null||xe(L)?(e.exit("codeFlowValue"),z(L)):(e.consume(L),T)}function P(L){return e.exit("codeFenced"),n(L)}function H(L,V,ee){let G=0;return R;function R(W){return L.enter("lineEnding"),L.consume(W),L.exit("lineEnding"),ae}function ae(W){return L.enter("codeFencedFence"),_e(W)?Le(L,F,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):F(W)}function F(W){return W===f?(L.enter("codeFencedFenceSequence"),ie(W)):ee(W)}function ie(W){return W===f?(G++,L.consume(W),ie):G>=c?(L.exit("codeFencedFenceSequence"),_e(W)?Le(L,ne,"whitespace")(W):ne(W)):ee(W)}function ne(W){return W===null||xe(W)?(L.exit("codeFencedFence"),V(W)):ee(W)}}}function T5(e,n,a){const l=this;return s;function s(c){return c===null?a(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return l.parser.lazy[l.now().line]?a(c):n(c)}}const nf={name:"codeIndented",tokenize:M5},_5={partial:!0,tokenize:D5};function M5(e,n,a){const l=this;return s;function s(h){return e.enter("codeIndented"),Le(e,o,"linePrefix",5)(h)}function o(h){const x=l.events[l.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?c(h):a(h)}function c(h){return h===null?g(h):xe(h)?e.attempt(_5,c,g)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||xe(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function g(h){return e.exit("codeIndented"),n(h)}}function D5(e,n,a){const l=this;return s;function s(c){return l.parser.lazy[l.now().line]?a(c):xe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):Le(e,o,"linePrefix",5)(c)}function o(c){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):xe(c)?s(c):a(c)}}const R5={name:"codeText",previous:z5,resolve:O5,tokenize:L5};function O5(e){let n=e.length-4,a=3,l,s;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=a;++l<n;)if(e[l][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[n][1].type="codeTextPadding",a+=2,n-=2;break}}for(l=a-1,n++;++l<=n;)s===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(s=l):(l===n||e[l][1].type==="lineEnding")&&(e[s][1].type="codeTextData",l!==s+2&&(e[s][1].end=e[l-1][1].end,e.splice(s+2,l-s-2),n-=l-s-2,l=s+2),s=void 0);return e}function z5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function L5(e,n,a){let l=0,s,o;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),l++,f):(e.exit("codeTextSequence"),g(y))}function g(y){return y===null?a(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),g):y===96?(o=e.enter("codeTextSequence"),s=0,x(y)):xe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),g):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||xe(y)?(e.exit("codeTextData"),g(y)):(e.consume(y),h)}function x(y){return y===96?(e.consume(y),s++,x):s===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(o.type="codeTextData",h(y))}}class U5{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,a){const l=a??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,a,l){const s=a||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return l&&yi(this.left,l),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),yi(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),yi(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const a=this.left.splice(n,Number.POSITIVE_INFINITY);yi(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);yi(this.left,a.reverse())}}}function yi(e,n){let a=0;if(n.length<1e4)e.push(...n);else for(;a<n.length;)e.push(...n.slice(a,a+1e4)),a+=1e4}function c1(e){const n={};let a=-1,l,s,o,c,f,g,h;const x=new U5(e);for(;++a<x.length;){for(;a in n;)a=n[a];if(l=x.get(a),a&&l[1].type==="chunkFlow"&&x.get(a-1)[1].type==="listItemPrefix"&&(g=l[1]._tokenizer.events,o=0,o<g.length&&g[o][1].type==="lineEndingBlank"&&(o+=2),o<g.length&&g[o][1].type==="content"))for(;++o<g.length&&g[o][1].type!=="content";)g[o][1].type==="chunkText"&&(g[o][1]._isInFirstContentOfListItem=!0,o++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,H5(x,a)),a=n[a],h=!0);else if(l[1]._container){for(o=a,s=void 0;o--;)if(c=x.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(x.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(l[1].end={...x.get(s)[1].start},f=x.slice(s,a),f.unshift(l),x.splice(s,a-s+1,f))}}return nn(e,0,Number.POSITIVE_INFINITY,x.slice(0)),!h}function H5(e,n){const a=e.get(n)[1],l=e.get(n)[2];let s=n-1;const o=[];let c=a._tokenizer;c||(c=l.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,g=[],h={};let x,y,b=-1,v=a,S=0,N=0;const E=[N];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(x=l.sliceStream(v),v.next||x.push(null),y&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(x),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=a;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(N=b+1,E.push(N),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):E.pop(),b=E.length;b--;){const j=f.slice(E[b],E[b+1]),z=o.pop();g.push([z,z+j.length-1]),e.splice(z,2,j)}for(g.reverse(),b=-1;++b<g.length;)h[S+g[b][0]]=S+g[b][1],S+=g[b][1]-g[b][0]-1;return h}const B5={resolve:I5,tokenize:$5},q5={partial:!0,tokenize:F5};function I5(e){return c1(e),e}function $5(e,n){let a;return l;function l(f){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?o(f):xe(f)?e.check(q5,c,o)(f):(e.consume(f),s)}function o(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,s}}function F5(e,n,a){const l=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Le(e,o,"linePrefix")}function o(c){if(c===null||xe(c))return a(c);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(l.parser.constructs.flow,a,n)(c)}}function d1(e,n,a,l,s,o,c,f,g){const h=g||Number.POSITIVE_INFINITY;let x=0;return y;function y(j){return j===60?(e.enter(l),e.enter(s),e.enter(o),e.consume(j),e.exit(o),b):j===null||j===32||j===41||Po(j)?a(j):(e.enter(l),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),N(j))}function b(j){return j===62?(e.enter(o),e.consume(j),e.exit(o),e.exit(s),e.exit(l),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===62?(e.exit("chunkString"),e.exit(f),b(j)):j===null||j===60||xe(j)?a(j):(e.consume(j),j===92?S:v)}function S(j){return j===60||j===62||j===92?(e.consume(j),v):v(j)}function N(j){return!x&&(j===null||j===41||Ze(j))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(l),n(j)):x<h&&j===40?(e.consume(j),x++,N):j===41?(e.consume(j),x--,N):j===null||j===32||j===40||Po(j)?a(j):(e.consume(j),j===92?E:N)}function E(j){return j===40||j===41||j===92?(e.consume(j),N):N(j)}}function f1(e,n,a,l,s,o){const c=this;let f=0,g;return h;function h(v){return e.enter(l),e.enter(s),e.consume(v),e.exit(s),e.enter(o),x}function x(v){return f>999||v===null||v===91||v===93&&!g||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?a(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(l),n):xe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),x):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||xe(v)||f++>999?(e.exit("chunkString"),x(v)):(e.consume(v),g||(g=!_e(v)),v===92?b:y)}function b(v){return v===91||v===92||v===93?(e.consume(v),f++,y):y(v)}}function h1(e,n,a,l,s,o){let c;return f;function f(b){return b===34||b===39||b===40?(e.enter(l),e.enter(s),e.consume(b),e.exit(s),c=b===40?41:b,g):a(b)}function g(b){return b===c?(e.enter(s),e.consume(b),e.exit(s),e.exit(l),n):(e.enter(o),h(b))}function h(b){return b===c?(e.exit(o),g(c)):b===null?a(b):xe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Le(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===c||b===null||xe(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?y:x)}function y(b){return b===c||b===92?(e.consume(b),x):x(b)}}function Ai(e,n){let a;return l;function l(s){return xe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a=!0,l):_e(s)?Le(e,l,a?"linePrefix":"lineSuffix")(s):n(s)}}const K5={name:"definition",tokenize:V5},P5={partial:!0,tokenize:Y5};function V5(e,n,a){const l=this;let s;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return f1.call(l,e,f,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=jn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),g):a(v)}function g(v){return Ze(v)?Ai(e,h)(v):h(v)}function h(v){return d1(e,x,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function x(v){return e.attempt(P5,y,y)(v)}function y(v){return _e(v)?Le(e,b,"whitespace")(v):b(v)}function b(v){return v===null||xe(v)?(e.exit("definition"),l.parser.defined.push(s),n(v)):a(v)}}function Y5(e,n,a){return l;function l(f){return Ze(f)?Ai(e,s)(f):a(f)}function s(f){return h1(e,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return _e(f)?Le(e,c,"whitespace")(f):c(f)}function c(f){return f===null||xe(f)?n(f):a(f)}}const G5={name:"hardBreakEscape",tokenize:Q5};function Q5(e,n,a){return l;function l(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return xe(o)?(e.exit("hardBreakEscape"),n(o)):a(o)}}const X5={name:"headingAtx",resolve:Z5,tokenize:J5};function Z5(e,n){let a=e.length-2,l=3,s,o;return e[l][1].type==="whitespace"&&(l+=2),a-2>l&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(l===a-1||a-4>l&&e[a-2][1].type==="whitespace")&&(a-=l+1===a?2:4),a>l&&(s={type:"atxHeadingText",start:e[l][1].start,end:e[a][1].end},o={type:"chunkText",start:e[l][1].start,end:e[a][1].end,contentType:"text"},nn(e,l,a-l+1,[["enter",s,n],["enter",o,n],["exit",o,n],["exit",s,n]])),e}function J5(e,n,a){let l=0;return s;function s(x){return e.enter("atxHeading"),o(x)}function o(x){return e.enter("atxHeadingSequence"),c(x)}function c(x){return x===35&&l++<6?(e.consume(x),c):x===null||Ze(x)?(e.exit("atxHeadingSequence"),f(x)):a(x)}function f(x){return x===35?(e.enter("atxHeadingSequence"),g(x)):x===null||xe(x)?(e.exit("atxHeading"),n(x)):_e(x)?Le(e,f,"whitespace")(x):(e.enter("atxHeadingText"),h(x))}function g(x){return x===35?(e.consume(x),g):(e.exit("atxHeadingSequence"),f(x))}function h(x){return x===null||x===35||Ze(x)?(e.exit("atxHeadingText"),f(x)):(e.consume(x),h)}}const W5=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],rx=["pre","script","style","textarea"],eE={concrete:!0,name:"htmlFlow",resolveTo:aE,tokenize:rE},tE={partial:!0,tokenize:iE},nE={partial:!0,tokenize:lE};function aE(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function rE(e,n,a){const l=this;let s,o,c,f,g;return h;function h(A){return x(A)}function x(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),y}function y(A){return A===33?(e.consume(A),b):A===47?(e.consume(A),o=!0,N):A===63?(e.consume(A),s=3,l.interrupt?n:_):zt(A)?(e.consume(A),c=String.fromCharCode(A),E):a(A)}function b(A){return A===45?(e.consume(A),s=2,v):A===91?(e.consume(A),s=5,f=0,S):zt(A)?(e.consume(A),s=4,l.interrupt?n:_):a(A)}function v(A){return A===45?(e.consume(A),l.interrupt?n:_):a(A)}function S(A){const se="CDATA[";return A===se.charCodeAt(f++)?(e.consume(A),f===se.length?l.interrupt?n:F:S):a(A)}function N(A){return zt(A)?(e.consume(A),c=String.fromCharCode(A),E):a(A)}function E(A){if(A===null||A===47||A===62||Ze(A)){const se=A===47,me=c.toLowerCase();return!se&&!o&&rx.includes(me)?(s=1,l.interrupt?n(A):F(A)):W5.includes(c.toLowerCase())?(s=6,se?(e.consume(A),j):l.interrupt?n(A):F(A)):(s=7,l.interrupt&&!l.parser.lazy[l.now().line]?a(A):o?z(A):T(A))}return A===45||Tt(A)?(e.consume(A),c+=String.fromCharCode(A),E):a(A)}function j(A){return A===62?(e.consume(A),l.interrupt?n:F):a(A)}function z(A){return _e(A)?(e.consume(A),z):R(A)}function T(A){return A===47?(e.consume(A),R):A===58||A===95||zt(A)?(e.consume(A),P):_e(A)?(e.consume(A),T):R(A)}function P(A){return A===45||A===46||A===58||A===95||Tt(A)?(e.consume(A),P):H(A)}function H(A){return A===61?(e.consume(A),L):_e(A)?(e.consume(A),H):T(A)}function L(A){return A===null||A===60||A===61||A===62||A===96?a(A):A===34||A===39?(e.consume(A),g=A,V):_e(A)?(e.consume(A),L):ee(A)}function V(A){return A===g?(e.consume(A),g=null,G):A===null||xe(A)?a(A):(e.consume(A),V)}function ee(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Ze(A)?H(A):(e.consume(A),ee)}function G(A){return A===47||A===62||_e(A)?T(A):a(A)}function R(A){return A===62?(e.consume(A),ae):a(A)}function ae(A){return A===null||xe(A)?F(A):_e(A)?(e.consume(A),ae):a(A)}function F(A){return A===45&&s===2?(e.consume(A),B):A===60&&s===1?(e.consume(A),te):A===62&&s===4?(e.consume(A),D):A===63&&s===3?(e.consume(A),_):A===93&&s===5?(e.consume(A),we):xe(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(tE,Y,ie)(A)):A===null||xe(A)?(e.exit("htmlFlowData"),ie(A)):(e.consume(A),F)}function ie(A){return e.check(nE,ne,Y)(A)}function ne(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),W}function W(A){return A===null||xe(A)?ie(A):(e.enter("htmlFlowData"),F(A))}function B(A){return A===45?(e.consume(A),_):F(A)}function te(A){return A===47?(e.consume(A),c="",ce):F(A)}function ce(A){if(A===62){const se=c.toLowerCase();return rx.includes(se)?(e.consume(A),D):F(A)}return zt(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),ce):F(A)}function we(A){return A===93?(e.consume(A),_):F(A)}function _(A){return A===62?(e.consume(A),D):A===45&&s===2?(e.consume(A),_):F(A)}function D(A){return A===null||xe(A)?(e.exit("htmlFlowData"),Y(A)):(e.consume(A),D)}function Y(A){return e.exit("htmlFlow"),n(A)}}function lE(e,n,a){const l=this;return s;function s(c){return xe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):a(c)}function o(c){return l.parser.lazy[l.now().line]?a(c):n(c)}}function iE(e,n,a){return l;function l(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Zi,n,a)}}const sE={name:"htmlText",tokenize:oE};function oE(e,n,a){const l=this;let s,o,c;return f;function f(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),g}function g(_){return _===33?(e.consume(_),h):_===47?(e.consume(_),H):_===63?(e.consume(_),T):zt(_)?(e.consume(_),ee):a(_)}function h(_){return _===45?(e.consume(_),x):_===91?(e.consume(_),o=0,S):zt(_)?(e.consume(_),z):a(_)}function x(_){return _===45?(e.consume(_),v):a(_)}function y(_){return _===null?a(_):_===45?(e.consume(_),b):xe(_)?(c=y,te(_)):(e.consume(_),y)}function b(_){return _===45?(e.consume(_),v):y(_)}function v(_){return _===62?B(_):_===45?b(_):y(_)}function S(_){const D="CDATA[";return _===D.charCodeAt(o++)?(e.consume(_),o===D.length?N:S):a(_)}function N(_){return _===null?a(_):_===93?(e.consume(_),E):xe(_)?(c=N,te(_)):(e.consume(_),N)}function E(_){return _===93?(e.consume(_),j):N(_)}function j(_){return _===62?B(_):_===93?(e.consume(_),j):N(_)}function z(_){return _===null||_===62?B(_):xe(_)?(c=z,te(_)):(e.consume(_),z)}function T(_){return _===null?a(_):_===63?(e.consume(_),P):xe(_)?(c=T,te(_)):(e.consume(_),T)}function P(_){return _===62?B(_):T(_)}function H(_){return zt(_)?(e.consume(_),L):a(_)}function L(_){return _===45||Tt(_)?(e.consume(_),L):V(_)}function V(_){return xe(_)?(c=V,te(_)):_e(_)?(e.consume(_),V):B(_)}function ee(_){return _===45||Tt(_)?(e.consume(_),ee):_===47||_===62||Ze(_)?G(_):a(_)}function G(_){return _===47?(e.consume(_),B):_===58||_===95||zt(_)?(e.consume(_),R):xe(_)?(c=G,te(_)):_e(_)?(e.consume(_),G):B(_)}function R(_){return _===45||_===46||_===58||_===95||Tt(_)?(e.consume(_),R):ae(_)}function ae(_){return _===61?(e.consume(_),F):xe(_)?(c=ae,te(_)):_e(_)?(e.consume(_),ae):G(_)}function F(_){return _===null||_===60||_===61||_===62||_===96?a(_):_===34||_===39?(e.consume(_),s=_,ie):xe(_)?(c=F,te(_)):_e(_)?(e.consume(_),F):(e.consume(_),ne)}function ie(_){return _===s?(e.consume(_),s=void 0,W):_===null?a(_):xe(_)?(c=ie,te(_)):(e.consume(_),ie)}function ne(_){return _===null||_===34||_===39||_===60||_===61||_===96?a(_):_===47||_===62||Ze(_)?G(_):(e.consume(_),ne)}function W(_){return _===47||_===62||Ze(_)?G(_):a(_)}function B(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),n):a(_)}function te(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),ce}function ce(_){return _e(_)?Le(e,we,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):we(_)}function we(_){return e.enter("htmlTextData"),c(_)}}const kh={name:"labelEnd",resolveAll:fE,resolveTo:hE,tokenize:gE},uE={tokenize:pE},cE={tokenize:mE},dE={tokenize:yE};function fE(e){let n=-1;const a=[];for(;++n<e.length;){const l=e[n][1];if(a.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const s=l.type==="labelImage"?4:2;l.type="data",n+=s}}return e.length!==a.length&&nn(e,0,e.length,a),e}function hE(e,n){let a=e.length,l=0,s,o,c,f;for(;a--;)if(s=e[a][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[a][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[a][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=a,s.type!=="labelLink")){l=2;break}}else s.type==="labelEnd"&&(c=a);const g={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},x={type:"labelText",start:{...e[o+l+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",g,n],["enter",h,n]],f=mn(f,e.slice(o+1,o+l+3)),f=mn(f,[["enter",x,n]]),f=mn(f,fu(n.parser.constructs.insideSpan.null,e.slice(o+l+4,c-3),n)),f=mn(f,[["exit",x,n],e[c-2],e[c-1],["exit",h,n]]),f=mn(f,e.slice(c+1)),f=mn(f,[["exit",g,n]]),nn(e,o,e.length,f),e}function gE(e,n,a){const l=this;let s=l.events.length,o,c;for(;s--;)if((l.events[s][1].type==="labelImage"||l.events[s][1].type==="labelLink")&&!l.events[s][1]._balanced){o=l.events[s][1];break}return f;function f(b){return o?o._inactive?y(b):(c=l.parser.defined.includes(jn(l.sliceSerialize({start:o.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),g):a(b)}function g(b){return b===40?e.attempt(uE,x,c?x:y)(b):b===91?e.attempt(cE,x,c?h:y)(b):c?x(b):y(b)}function h(b){return e.attempt(dE,x,y)(b)}function x(b){return n(b)}function y(b){return o._balanced=!0,a(b)}}function pE(e,n,a){return l;function l(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),s}function s(y){return Ze(y)?Ai(e,o)(y):o(y)}function o(y){return y===41?x(y):d1(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Ze(y)?Ai(e,g)(y):x(y)}function f(y){return a(y)}function g(y){return y===34||y===39||y===40?h1(e,h,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):x(y)}function h(y){return Ze(y)?Ai(e,x)(y):x(y)}function x(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):a(y)}}function mE(e,n,a){const l=this;return s;function s(f){return f1.call(l,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return l.parser.defined.includes(jn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(f):a(f)}function c(f){return a(f)}}function yE(e,n,a){return l;function l(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):a(o)}}const xE={name:"labelStartImage",resolveAll:kh.resolveAll,tokenize:bE};function bE(e,n,a){const l=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):a(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(f):n(f)}}const vE={name:"labelStartLink",resolveAll:kh.resolveAll,tokenize:kE};function kE(e,n,a){const l=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(c):n(c)}}const af={name:"lineEnding",tokenize:SE};function SE(e,n){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Le(e,n,"linePrefix")}}const Oo={name:"thematicBreak",tokenize:wE};function wE(e,n,a){let l=0,s;return o;function o(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,f(h)}function f(h){return h===s?(e.enter("thematicBreakSequence"),g(h)):l>=3&&(h===null||xe(h))?(e.exit("thematicBreak"),n(h)):a(h)}function g(h){return h===s?(e.consume(h),l++,g):(e.exit("thematicBreakSequence"),_e(h)?Le(e,f,"whitespace")(h):f(h))}}const Kt={continuation:{tokenize:EE},exit:TE,name:"list",tokenize:CE},jE={partial:!0,tokenize:_E},NE={partial:!0,tokenize:AE};function CE(e,n,a){const l=this,s=l.events[l.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(v){const S=l.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!l.containerState.marker||v===l.containerState.marker:Ff(v)){if(l.containerState.type||(l.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Oo,a,h)(v):h(v);if(!l.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),g(v)}return a(v)}function g(v){return Ff(v)&&++c<10?(e.consume(v),g):(!l.interrupt||c<2)&&(l.containerState.marker?v===l.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):a(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||v,e.check(Zi,l.interrupt?a:x,e.attempt(jE,b,y))}function x(v){return l.containerState.initialBlankLine=!0,o++,b(v)}function y(v){return _e(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):a(v)}function b(v){return l.containerState.size=o+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function EE(e,n,a){const l=this;return l.containerState._closeFlow=void 0,e.check(Zi,s,o);function s(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Le(e,n,"listItemIndent",l.containerState.size+1)(f)}function o(f){return l.containerState.furtherBlankLines||!_e(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(NE,n,c)(f))}function c(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Le(e,e.attempt(Kt,n,a),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function AE(e,n,a){const l=this;return Le(e,s,"listItemIndent",l.containerState.size+1);function s(o){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?n(o):a(o)}}function TE(e){e.exit(this.containerState.type)}function _E(e,n,a){const l=this;return Le(e,s,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=l.events[l.events.length-1];return!_e(o)&&c&&c[1].type==="listItemPrefixWhitespace"?n(o):a(o)}}const lx={name:"setextUnderline",resolveTo:ME,tokenize:DE};function ME(e,n){let a=e.length,l,s,o;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){l=a;break}e[a][1].type==="paragraph"&&(s=a)}else e[a][1].type==="content"&&e.splice(a,1),!o&&e[a][1].type==="definition"&&(o=a);const c={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,n]),e.splice(o+1,0,["exit",e[l][1],n]),e[l][1].end={...e[o][1].end}):e[l][1]=c,e.push(["exit",c,n]),e}function DE(e,n,a){const l=this;let s;return o;function o(h){let x=l.events.length,y;for(;x--;)if(l.events[x][1].type!=="lineEnding"&&l.events[x][1].type!=="linePrefix"&&l.events[x][1].type!=="content"){y=l.events[x][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||y)?(e.enter("setextHeadingLine"),s=h,c(h)):a(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===s?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),_e(h)?Le(e,g,"lineSuffix")(h):g(h))}function g(h){return h===null||xe(h)?(e.exit("setextHeadingLine"),n(h)):a(h)}}const RE={tokenize:OE};function OE(e){const n=this,a=e.attempt(Zi,l,e.attempt(this.parser.constructs.flowInitial,s,Le(e,e.attempt(this.parser.constructs.flow,s,e.attempt(B5,s)),"linePrefix")));return a;function l(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,a}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,a}}const zE={resolveAll:p1()},LE=g1("string"),UE=g1("text");function g1(e){return{resolveAll:p1(e==="text"?HE:void 0),tokenize:n};function n(a){const l=this,s=this.parser.constructs[e],o=a.attempt(s,c,f);return c;function c(x){return h(x)?o(x):f(x)}function f(x){if(x===null){a.consume(x);return}return a.enter("data"),a.consume(x),g}function g(x){return h(x)?(a.exit("data"),o(x)):(a.consume(x),g)}function h(x){if(x===null)return!0;const y=s[x];let b=-1;if(y)for(;++b<y.length;){const v=y[b];if(!v.previous||v.previous.call(l,l.previous))return!0}return!1}}}function p1(e){return n;function n(a,l){let s=-1,o;for(;++s<=a.length;)o===void 0?a[s]&&a[s][1].type==="data"&&(o=s,s++):(!a[s]||a[s][1].type!=="data")&&(s!==o+2&&(a[o][1].end=a[s-1][1].end,a.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(a,l):a}}function HE(e,n){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const l=e[a-1][1],s=n.sliceStream(l);let o=s.length,c=-1,f=0,g;for(;o--;){const h=s[o];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)g=!0,f++;else if(h!==-1){o++;break}}if(n._contentTypeTextTrailing&&a===e.length&&(f=0),f){const h={type:a===e.length||g||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:l.start._bufferIndex+c,_index:l.start._index+o,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(e.splice(a,0,["enter",h,n],["exit",h,n]),a+=2)}a++}return e}const BE={42:Kt,43:Kt,45:Kt,48:Kt,49:Kt,50:Kt,51:Kt,52:Kt,53:Kt,54:Kt,55:Kt,56:Kt,57:Kt,62:s1},qE={91:K5},IE={[-2]:nf,[-1]:nf,32:nf},$E={35:X5,42:Oo,45:[lx,Oo],60:eE,61:lx,95:Oo,96:ax,126:ax},FE={38:u1,92:o1},KE={[-5]:af,[-4]:af,[-3]:af,33:xE,38:u1,42:Kf,60:[v5,sE],91:vE,92:[G5,o1],93:kh,95:Kf,96:R5},PE={null:[Kf,zE]},VE={null:[42,95]},YE={null:[]},GE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:VE,contentInitial:qE,disable:YE,document:BE,flow:$E,flowInitial:IE,insideSpan:PE,string:FE,text:KE},Symbol.toStringTag,{value:"Module"}));function QE(e,n,a){let l={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const s={},o=[];let c=[],f=[];const g={attempt:V(H),check:V(L),consume:z,enter:T,exit:P,interrupt:V(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:N,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:y};let x=n.tokenize.call(h,g);return n.resolveAll&&o.push(n),h;function y(ae){return c=mn(c,ae),E(),c[c.length-1]!==null?[]:(ee(n,0),h.events=fu(o,h.events,h),h.events)}function b(ae,F){return ZE(v(ae),F)}function v(ae){return XE(c,ae)}function S(){const{_bufferIndex:ae,_index:F,line:ie,column:ne,offset:W}=l;return{_bufferIndex:ae,_index:F,line:ie,column:ne,offset:W}}function N(ae){s[ae.line]=ae.column,R()}function E(){let ae;for(;l._index<c.length;){const F=c[l._index];if(typeof F=="string")for(ae=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===ae&&l._bufferIndex<F.length;)j(F.charCodeAt(l._bufferIndex));else j(F)}}function j(ae){x=x(ae)}function z(ae){xe(ae)?(l.line++,l.column=1,l.offset+=ae===-3?2:1,R()):ae!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=ae}function T(ae,F){const ie=F||{};return ie.type=ae,ie.start=S(),h.events.push(["enter",ie,h]),f.push(ie),ie}function P(ae){const F=f.pop();return F.end=S(),h.events.push(["exit",F,h]),F}function H(ae,F){ee(ae,F.from)}function L(ae,F){F.restore()}function V(ae,F){return ie;function ie(ne,W,B){let te,ce,we,_;return Array.isArray(ne)?Y(ne):"tokenize"in ne?Y([ne]):D(ne);function D(ge){return Me;function Me(tt){const Ke=tt!==null&&ge[tt],rn=tt!==null&&ge.null,Un=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(rn)?rn:rn?[rn]:[]];return Y(Un)(tt)}}function Y(ge){return te=ge,ce=0,ge.length===0?B:A(ge[ce])}function A(ge){return Me;function Me(tt){return _=G(),we=ge,ge.partial||(h.currentConstruct=ge),ge.name&&h.parser.constructs.disable.null.includes(ge.name)?me():ge.tokenize.call(F?Object.assign(Object.create(h),F):h,g,se,me)(tt)}}function se(ge){return ae(we,_),W}function me(ge){return _.restore(),++ce<te.length?A(te[ce]):B}}}function ee(ae,F){ae.resolveAll&&!o.includes(ae)&&o.push(ae),ae.resolve&&nn(h.events,F,h.events.length-F,ae.resolve(h.events.slice(F),h)),ae.resolveTo&&(h.events=ae.resolveTo(h.events,h))}function G(){const ae=S(),F=h.previous,ie=h.currentConstruct,ne=h.events.length,W=Array.from(f);return{from:ne,restore:B};function B(){l=ae,h.previous=F,h.currentConstruct=ie,h.events.length=ne,f=W,R()}}function R(){l.line in s&&l.column<2&&(l.column=s[l.line],l.offset+=s[l.line]-1)}}function XE(e,n){const a=n.start._index,l=n.start._bufferIndex,s=n.end._index,o=n.end._bufferIndex;let c;if(a===s)c=[e[a].slice(l,o)];else{if(c=e.slice(a,s),l>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(l):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function ZE(e,n){let a=-1;const l=[];let s;for(;++a<e.length;){const o=e[a];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
372
377
|
`;break}case-3:{c=`\r
|
|
373
|
-
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,l.push(c)}return l.join("")}function XE(e){const l={constructs:r1([VE,...(e||{}).extensions||[]]),content:s(d5),defined:[],document:s(h5),flow:s(DE),lazy:{},string:s(OE),text:s(zE)};return l;function s(o){return c;function c(f){return YE(l,o,f)}}}function ZE(e){for(;!u1(e););return e}const lx=/[\0\t\n\r]/g;function JE(){let e=1,n="",a=!0,l;return s;function s(o,c,f){const g=[];let h,x,y,b,v;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),y=0,n="",a&&(o.charCodeAt(0)===65279&&y++,a=void 0);y<o.length;){if(lx.lastIndex=y,h=lx.exec(o),b=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(b),!h){n=o.slice(y);break}if(v===10&&y===b&&l)g.push(-3),l=void 0;else switch(l&&(g.push(-5),l=void 0),y<b&&(g.push(o.slice(y,b)),e+=b-y),v){case 0:{g.push(65533),e++;break}case 9:{for(x=Math.ceil(e/4)*4,g.push(-2);e++<x;)g.push(-1);break}case 10:{g.push(-4),e=1;break}default:l=!0,e=1}y=b+1}return f&&(l&&g.push(-5),n&&g.push(n),g.push(null)),g}}const WE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function eA(e){return e.replace(WE,tA)}function tA(e,n,a){if(n)return n;if(a.charCodeAt(0)===35){const s=a.charCodeAt(1),o=s===120||s===88;return l1(a.slice(o?2:1),o?16:10)}return vh(a)||e}const p1={}.hasOwnProperty;function nA(e,n,a){return n&&typeof n=="object"&&(a=n,n=void 0),aA(a)(ZE(XE(a).document().write(JE()(e,n,!0))))}function aA(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(yr),autolinkProtocol:G,autolinkEmail:G,atxHeading:o(pr),blockQuote:o(rn),characterEscape:G,characterReference:G,codeFenced:o(Un),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Un,c),codeText:o(xl,c),codeTextData:G,data:G,codeFlowValue:G,definition:o(es),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Hn),hardBreakEscape:o(mr),hardBreakTrailing:o(mr),htmlFlow:o(ts,c),htmlFlowData:G,htmlText:o(ts,c),htmlTextData:G,image:o(ns),label:c,link:o(yr),listItem:o(bl),listItemValue:b,listOrdered:o(xr,y),listUnordered:o(xr),paragraph:o(mu),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(pr),strong:o(yu),thematicBreak:o(xu)},exit:{atxHeading:g(),atxHeadingSequence:H,autolink:g(),autolinkEmail:Ke,autolinkProtocol:tt,blockQuote:g(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:ge,characterReference:De,codeFenced:g(E),codeFencedFence:C,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:R,codeIndented:g(j),codeText:g(W),codeTextData:R,data:R,definition:g(),definitionDestinationString:Y,definitionLabelString:z,definitionTitleString:D,emphasis:g(),hardBreakEscape:g(F),hardBreakTrailing:g(F),htmlFlow:g(ie),htmlFlowData:R,htmlText:g(ne),htmlTextData:R,image:g(te),label:we,labelText:ce,lineEnding:ae,link:g(B),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:se,resourceDestinationString:T,resourceTitleString:M,resource:V,setextHeading:g(ee),setextHeadingLineSequence:P,setextHeadingText:L,strong:g(),thematicBreak:g()}};m1(n,(e||{}).mdastExtensions||[]);const a={};return l;function l(X){let le={type:"root",children:[]};const ve={stack:[le],tokenStack:[],config:n,enter:f,exit:h,buffer:c,resume:x,data:a},Ee=[];let qe=-1;for(;++qe<X.length;)if(X[qe][1].type==="listOrdered"||X[qe][1].type==="listUnordered")if(X[qe][0]==="enter")Ee.push(qe);else{const Yt=Ee.pop();qe=s(X,Yt,qe)}for(qe=-1;++qe<X.length;){const Yt=n[X[qe][0]];p1.call(Yt,X[qe][1].type)&&Yt[X[qe][1].type].call(Object.assign({sliceSerialize:X[qe][2].sliceSerialize},ve),X[qe][1])}if(ve.tokenStack.length>0){const Yt=ve.tokenStack[ve.tokenStack.length-1];(Yt[1]||ix).call(ve,void 0,Yt[0])}for(le.position={start:La(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:La(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<n.transforms.length;)le=n.transforms[qe](le)||le;return le}function s(X,le,ve){let Ee=le-1,qe=-1,Yt=!1,Bn,Mt,gt,Lt;for(;++Ee<=ve;){const Ge=X[Ee];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?qe++:qe--,Lt=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Bn&&!Lt&&!qe&&!gt&&(gt=Ee),Lt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Lt=void 0}if(!qe&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||qe===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Bn){let ca=Ee;for(Mt=void 0;ca--;){const bn=X[ca];if(bn[1].type==="lineEnding"||bn[1].type==="lineEndingBlank"){if(bn[0]==="exit")continue;Mt&&(X[Mt][1].type="lineEndingBlank",Yt=!0),bn[1].type="lineEnding",Mt=ca}else if(!(bn[1].type==="linePrefix"||bn[1].type==="blockQuotePrefix"||bn[1].type==="blockQuotePrefixWhitespace"||bn[1].type==="blockQuoteMarker"||bn[1].type==="listItemIndent"))break}gt&&(!Mt||gt<Mt)&&(Bn._spread=!0),Bn.end=Object.assign({},Mt?X[Mt][1].start:Ge[1].end),X.splice(Mt||Ee,0,["exit",Bn,Ge[2]]),Ee++,ve++}if(Ge[1].type==="listItemPrefix"){const ca={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Bn=ca,X.splice(Ee,0,["enter",ca,Ge[2]]),Ee++,ve++,gt=void 0,Lt=!0}}}return X[le][1]._spread=Yt,ve}function o(X,le){return ve;function ve(Ee){f.call(this,X(Ee),Ee),le&&le.call(this,Ee)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(X,le,ve){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([le,ve||void 0]),X.position={start:La(le.start),end:void 0}}function g(X){return le;function le(ve){X&&X.call(this,ve),h.call(this,ve)}}function h(X,le){const ve=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==X.type&&(le?le.call(this,X,Ee[0]):(Ee[1]||ix).call(this,X,Ee[0]));else throw new Error("Cannot close `"+X.type+"` ("+Ei({start:X.start,end:X.end})+"): it’s not open");ve.position.end=La(X.end)}function x(){return bh(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(X){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function v(){const X=this.resume(),le=this.stack[this.stack.length-1];le.lang=X}function S(){const X=this.resume(),le=this.stack[this.stack.length-1];le.meta=X}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X.replace(/(\r?\n|\r)$/g,"")}function z(X){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.label=le,ve.identifier=jn(this.sliceSerialize(X)).toLowerCase()}function D(){const X=this.resume(),le=this.stack[this.stack.length-1];le.title=X}function Y(){const X=this.resume(),le=this.stack[this.stack.length-1];le.url=X}function H(X){const le=this.stack[this.stack.length-1];if(!le.depth){const ve=this.sliceSerialize(X).length;le.depth=ve}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function P(X){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function G(X){const ve=this.stack[this.stack.length-1].children;let Ee=ve[ve.length-1];(!Ee||Ee.type!=="text")&&(Ee=Dt(),Ee.position={start:La(X.start),end:void 0},ve.push(Ee)),this.stack.push(Ee)}function R(X){const le=this.stack.pop();le.value+=this.sliceSerialize(X),le.position.end=La(X.end)}function ae(X){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=le.children[le.children.length-1];ve.position.end=La(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(le.type)&&(G.call(this,X),R.call(this,X))}function F(){this.data.atHardBreak=!0}function ie(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X}function ne(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X}function W(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X}function B(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=le,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function te(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=le,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function ce(X){const le=this.sliceSerialize(X),ve=this.stack[this.stack.length-2];ve.label=eA(le),ve.identifier=jn(le).toLowerCase()}function we(){const X=this.stack[this.stack.length-1],le=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const Ee=X.children;ve.children=Ee}else ve.alt=le}function T(){const X=this.resume(),le=this.stack[this.stack.length-1];le.url=X}function M(){const X=this.resume(),le=this.stack[this.stack.length-1];le.title=X}function V(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function se(X){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.label=le,ve.identifier=jn(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function me(X){this.data.characterReferenceType=X.type}function ge(X){const le=this.sliceSerialize(X),ve=this.data.characterReferenceType;let Ee;ve?(Ee=l1(le,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=vh(le);const qe=this.stack[this.stack.length-1];qe.value+=Ee}function De(X){const le=this.stack.pop();le.position.end=La(X.end)}function tt(X){R.call(this,X);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(X)}function Ke(X){R.call(this,X);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(X)}function rn(){return{type:"blockquote",children:[]}}function Un(){return{type:"code",lang:null,meta:null,value:""}}function xl(){return{type:"inlineCode",value:""}}function es(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Hn(){return{type:"emphasis",children:[]}}function pr(){return{type:"heading",depth:0,children:[]}}function mr(){return{type:"break"}}function ts(){return{type:"html",value:""}}function ns(){return{type:"image",title:null,url:"",alt:null}}function yr(){return{type:"link",title:null,url:"",children:[]}}function xr(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function bl(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function mu(){return{type:"paragraph",children:[]}}function yu(){return{type:"strong",children:[]}}function Dt(){return{type:"text",value:""}}function xu(){return{type:"thematicBreak"}}}function La(e){return{line:e.line,column:e.column,offset:e.offset}}function m1(e,n){let a=-1;for(;++a<n.length;){const l=n[a];Array.isArray(l)?m1(e,l):rA(e,l)}}function rA(e,n){let a;for(a in n)if(p1.call(n,a))switch(a){case"canContainEols":{const l=n[a];l&&e[a].push(...l);break}case"transforms":{const l=n[a];l&&e[a].push(...l);break}case"enter":case"exit":{const l=n[a];l&&Object.assign(e[a],l);break}}}function ix(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ei({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ei({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ei({start:n.start,end:n.end})+") is still open")}function lA(e){const n=this;n.parser=a;function a(l){return nA(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function iA(e,n){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,a),e.applyData(n,a)}function sA(e,n){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,a),[e.applyData(n,a),{type:"text",value:`
|
|
374
|
-
`}]}function
|
|
375
|
-
`:"",l={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(l.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:l,children:[{type:"text",value:a}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function
|
|
378
|
+
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,l.push(c)}return l.join("")}function JE(e){const l={constructs:l1([GE,...(e||{}).extensions||[]]),content:s(h5),defined:[],document:s(p5),flow:s(RE),lazy:{},string:s(LE),text:s(UE)};return l;function s(o){return c;function c(f){return QE(l,o,f)}}}function WE(e){for(;!c1(e););return e}const ix=/[\0\t\n\r]/g;function eA(){let e=1,n="",a=!0,l;return s;function s(o,c,f){const g=[];let h,x,y,b,v;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),y=0,n="",a&&(o.charCodeAt(0)===65279&&y++,a=void 0);y<o.length;){if(ix.lastIndex=y,h=ix.exec(o),b=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(b),!h){n=o.slice(y);break}if(v===10&&y===b&&l)g.push(-3),l=void 0;else switch(l&&(g.push(-5),l=void 0),y<b&&(g.push(o.slice(y,b)),e+=b-y),v){case 0:{g.push(65533),e++;break}case 9:{for(x=Math.ceil(e/4)*4,g.push(-2);e++<x;)g.push(-1);break}case 10:{g.push(-4),e=1;break}default:l=!0,e=1}y=b+1}return f&&(l&&g.push(-5),n&&g.push(n),g.push(null)),g}}const tA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nA(e){return e.replace(tA,aA)}function aA(e,n,a){if(n)return n;if(a.charCodeAt(0)===35){const s=a.charCodeAt(1),o=s===120||s===88;return i1(a.slice(o?2:1),o?16:10)}return vh(a)||e}const m1={}.hasOwnProperty;function rA(e,n,a){return n&&typeof n=="object"&&(a=n,n=void 0),lA(a)(WE(JE(a).document().write(eA()(e,n,!0))))}function lA(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(yr),autolinkProtocol:G,autolinkEmail:G,atxHeading:o(pr),blockQuote:o(rn),characterEscape:G,characterReference:G,codeFenced:o(Un),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Un,c),codeText:o(xl,c),codeTextData:G,data:G,codeFlowValue:G,definition:o(es),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Hn),hardBreakEscape:o(mr),hardBreakTrailing:o(mr),htmlFlow:o(ts,c),htmlFlowData:G,htmlText:o(ts,c),htmlTextData:G,image:o(ns),label:c,link:o(yr),listItem:o(bl),listItemValue:b,listOrdered:o(xr,y),listUnordered:o(xr),paragraph:o(xu),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(pr),strong:o(bu),thematicBreak:o(vu)},exit:{atxHeading:g(),atxHeadingSequence:H,autolink:g(),autolinkEmail:Ke,autolinkProtocol:tt,blockQuote:g(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:ge,characterReference:Me,codeFenced:g(E),codeFencedFence:N,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:R,codeIndented:g(j),codeText:g(W),codeTextData:R,data:R,definition:g(),definitionDestinationString:P,definitionLabelString:z,definitionTitleString:T,emphasis:g(),hardBreakEscape:g(F),hardBreakTrailing:g(F),htmlFlow:g(ie),htmlFlowData:R,htmlText:g(ne),htmlTextData:R,image:g(te),label:we,labelText:ce,lineEnding:ae,link:g(B),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:se,resourceDestinationString:_,resourceTitleString:D,resource:Y,setextHeading:g(ee),setextHeadingLineSequence:V,setextHeadingText:L,strong:g(),thematicBreak:g()}};y1(n,(e||{}).mdastExtensions||[]);const a={};return l;function l(X){let le={type:"root",children:[]};const ve={stack:[le],tokenStack:[],config:n,enter:f,exit:h,buffer:c,resume:x,data:a},Ee=[];let qe=-1;for(;++qe<X.length;)if(X[qe][1].type==="listOrdered"||X[qe][1].type==="listUnordered")if(X[qe][0]==="enter")Ee.push(qe);else{const Yt=Ee.pop();qe=s(X,Yt,qe)}for(qe=-1;++qe<X.length;){const Yt=n[X[qe][0]];m1.call(Yt,X[qe][1].type)&&Yt[X[qe][1].type].call(Object.assign({sliceSerialize:X[qe][2].sliceSerialize},ve),X[qe][1])}if(ve.tokenStack.length>0){const Yt=ve.tokenStack[ve.tokenStack.length-1];(Yt[1]||sx).call(ve,void 0,Yt[0])}for(le.position={start:La(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:La(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<n.transforms.length;)le=n.transforms[qe](le)||le;return le}function s(X,le,ve){let Ee=le-1,qe=-1,Yt=!1,Bn,Dt,pt,Lt;for(;++Ee<=ve;){const Ge=X[Ee];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?qe++:qe--,Lt=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Bn&&!Lt&&!qe&&!pt&&(pt=Ee),Lt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Lt=void 0}if(!qe&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||qe===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Bn){let ca=Ee;for(Dt=void 0;ca--;){const bn=X[ca];if(bn[1].type==="lineEnding"||bn[1].type==="lineEndingBlank"){if(bn[0]==="exit")continue;Dt&&(X[Dt][1].type="lineEndingBlank",Yt=!0),bn[1].type="lineEnding",Dt=ca}else if(!(bn[1].type==="linePrefix"||bn[1].type==="blockQuotePrefix"||bn[1].type==="blockQuotePrefixWhitespace"||bn[1].type==="blockQuoteMarker"||bn[1].type==="listItemIndent"))break}pt&&(!Dt||pt<Dt)&&(Bn._spread=!0),Bn.end=Object.assign({},Dt?X[Dt][1].start:Ge[1].end),X.splice(Dt||Ee,0,["exit",Bn,Ge[2]]),Ee++,ve++}if(Ge[1].type==="listItemPrefix"){const ca={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Bn=ca,X.splice(Ee,0,["enter",ca,Ge[2]]),Ee++,ve++,pt=void 0,Lt=!0}}}return X[le][1]._spread=Yt,ve}function o(X,le){return ve;function ve(Ee){f.call(this,X(Ee),Ee),le&&le.call(this,Ee)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(X,le,ve){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([le,ve||void 0]),X.position={start:La(le.start),end:void 0}}function g(X){return le;function le(ve){X&&X.call(this,ve),h.call(this,ve)}}function h(X,le){const ve=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==X.type&&(le?le.call(this,X,Ee[0]):(Ee[1]||sx).call(this,X,Ee[0]));else throw new Error("Cannot close `"+X.type+"` ("+Ei({start:X.start,end:X.end})+"): it’s not open");ve.position.end=La(X.end)}function x(){return bh(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(X){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function v(){const X=this.resume(),le=this.stack[this.stack.length-1];le.lang=X}function S(){const X=this.resume(),le=this.stack[this.stack.length-1];le.meta=X}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X.replace(/(\r?\n|\r)$/g,"")}function z(X){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.label=le,ve.identifier=jn(this.sliceSerialize(X)).toLowerCase()}function T(){const X=this.resume(),le=this.stack[this.stack.length-1];le.title=X}function P(){const X=this.resume(),le=this.stack[this.stack.length-1];le.url=X}function H(X){const le=this.stack[this.stack.length-1];if(!le.depth){const ve=this.sliceSerialize(X).length;le.depth=ve}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function V(X){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function G(X){const ve=this.stack[this.stack.length-1].children;let Ee=ve[ve.length-1];(!Ee||Ee.type!=="text")&&(Ee=Mt(),Ee.position={start:La(X.start),end:void 0},ve.push(Ee)),this.stack.push(Ee)}function R(X){const le=this.stack.pop();le.value+=this.sliceSerialize(X),le.position.end=La(X.end)}function ae(X){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=le.children[le.children.length-1];ve.position.end=La(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(le.type)&&(G.call(this,X),R.call(this,X))}function F(){this.data.atHardBreak=!0}function ie(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X}function ne(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X}function W(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X}function B(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=le,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function te(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=le,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function ce(X){const le=this.sliceSerialize(X),ve=this.stack[this.stack.length-2];ve.label=nA(le),ve.identifier=jn(le).toLowerCase()}function we(){const X=this.stack[this.stack.length-1],le=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const Ee=X.children;ve.children=Ee}else ve.alt=le}function _(){const X=this.resume(),le=this.stack[this.stack.length-1];le.url=X}function D(){const X=this.resume(),le=this.stack[this.stack.length-1];le.title=X}function Y(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function se(X){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.label=le,ve.identifier=jn(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function me(X){this.data.characterReferenceType=X.type}function ge(X){const le=this.sliceSerialize(X),ve=this.data.characterReferenceType;let Ee;ve?(Ee=i1(le,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=vh(le);const qe=this.stack[this.stack.length-1];qe.value+=Ee}function Me(X){const le=this.stack.pop();le.position.end=La(X.end)}function tt(X){R.call(this,X);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(X)}function Ke(X){R.call(this,X);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(X)}function rn(){return{type:"blockquote",children:[]}}function Un(){return{type:"code",lang:null,meta:null,value:""}}function xl(){return{type:"inlineCode",value:""}}function es(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Hn(){return{type:"emphasis",children:[]}}function pr(){return{type:"heading",depth:0,children:[]}}function mr(){return{type:"break"}}function ts(){return{type:"html",value:""}}function ns(){return{type:"image",title:null,url:"",alt:null}}function yr(){return{type:"link",title:null,url:"",children:[]}}function xr(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function bl(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function xu(){return{type:"paragraph",children:[]}}function bu(){return{type:"strong",children:[]}}function Mt(){return{type:"text",value:""}}function vu(){return{type:"thematicBreak"}}}function La(e){return{line:e.line,column:e.column,offset:e.offset}}function y1(e,n){let a=-1;for(;++a<n.length;){const l=n[a];Array.isArray(l)?y1(e,l):iA(e,l)}}function iA(e,n){let a;for(a in n)if(m1.call(n,a))switch(a){case"canContainEols":{const l=n[a];l&&e[a].push(...l);break}case"transforms":{const l=n[a];l&&e[a].push(...l);break}case"enter":case"exit":{const l=n[a];l&&Object.assign(e[a],l);break}}}function sx(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ei({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ei({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ei({start:n.start,end:n.end})+") is still open")}function sA(e){const n=this;n.parser=a;function a(l){return rA(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function oA(e,n){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,a),e.applyData(n,a)}function uA(e,n){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,a),[e.applyData(n,a),{type:"text",value:`
|
|
379
|
+
`}]}function cA(e,n){const a=n.value?n.value+`
|
|
380
|
+
`:"",l={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(l.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:l,children:[{type:"text",value:a}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function dA(e,n){const a={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function fA(e,n){const a={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function hA(e,n){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),s=yl(l.toLowerCase()),o=e.footnoteOrder.indexOf(l);let c,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(l,f);const g={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+s,id:a+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,g);const h={type:"element",tagName:"sup",properties:{},children:[g]};return e.patch(n,h),e.applyData(n,h)}function gA(e,n){const a={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function pA(e,n){if(e.options.allowDangerousHtml){const a={type:"raw",value:n.value};return e.patch(n,a),e.applyData(n,a)}}function x1(e,n){const a=n.referenceType;let l="]";if(a==="collapsed"?l+="[]":a==="full"&&(l+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+l}];const s=e.all(n),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=l:s.push({type:"text",value:l}),s}function mA(e,n){const a=String(n.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return x1(e,n);const s={src:yl(l.url||""),alt:n.alt};l.title!==null&&l.title!==void 0&&(s.title=l.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,o),e.applyData(n,o)}function yA(e,n){const a={src:yl(n.url)};n.alt!==null&&n.alt!==void 0&&(a.alt=n.alt),n.title!==null&&n.title!==void 0&&(a.title=n.title);const l={type:"element",tagName:"img",properties:a,children:[]};return e.patch(n,l),e.applyData(n,l)}function xA(e,n){const a={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,a);const l={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(n,l),e.applyData(n,l)}function bA(e,n){const a=String(n.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return x1(e,n);const s={href:yl(l.url||"")};l.title!==null&&l.title!==void 0&&(s.title=l.title);const o={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function vA(e,n){const a={href:yl(n.url)};n.title!==null&&n.title!==void 0&&(a.title=n.title);const l={type:"element",tagName:"a",properties:a,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function kA(e,n,a){const l=e.all(n),s=a?SA(a):b1(n),o={},c=[];if(typeof n.checked=="boolean"){const x=l[0];let y;x&&x.type==="element"&&x.tagName==="p"?y=x:(y={type:"element",tagName:"p",properties:{},children:[]},l.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const x=l[f];(s||f!==0||x.type!=="element"||x.tagName!=="p")&&c.push({type:"text",value:`
|
|
376
381
|
`}),x.type==="element"&&x.tagName==="p"&&!s?c.push(...x.children):c.push(x)}const g=l[l.length-1];g&&(s||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
377
|
-
`});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(n,h),e.applyData(n,h)}function
|
|
382
|
+
`});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(n,h),e.applyData(n,h)}function SA(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const a=e.children;let l=-1;for(;!n&&++l<a.length;)n=b1(a[l])}return n}function b1(e){const n=e.spread;return n??e.children.length>1}function wA(e,n){const a={},l=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(a.start=n.start);++s<l.length;){const c=l[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:a,children:e.wrap(l,!0)};return e.patch(n,o),e.applyData(n,o)}function jA(e,n){const a={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function NA(e,n){const a={type:"root",children:e.wrap(e.all(n))};return e.patch(n,a),e.applyData(n,a)}function CA(e,n){const a={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function EA(e,n){const a=e.all(n),l=a.shift(),s=[];if(l){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],c),s.push(c)}if(a.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},f=ph(n.children[1]),g=Jb(n.children[n.children.length-1]);f&&g&&(c.position={start:f,end:g}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,o),e.applyData(n,o)}function AA(e,n,a){const l=a?a.children:void 0,o=(l?l.indexOf(n):1)===0?"th":"td",c=a&&a.type==="table"?a.align:void 0,f=c?c.length:n.children.length;let g=-1;const h=[];for(;++g<f;){const y=n.children[g],b={},v=c?c[g]:void 0;v&&(b.align=v);let S={type:"element",tagName:o,properties:b,children:[]};y&&(S.children=e.all(y),e.patch(y,S),S=e.applyData(y,S)),h.push(S)}const x={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,x),e.applyData(n,x)}function TA(e,n){const a={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}const ox=9,ux=32;function _A(e){const n=String(e),a=/\r?\n|\r/g;let l=a.exec(n),s=0;const o=[];for(;l;)o.push(cx(n.slice(s,l.index),s>0,!0),l[0]),s=l.index+l[0].length,l=a.exec(n);return o.push(cx(n.slice(s),s>0,!1)),o.join("")}function cx(e,n,a){let l=0,s=e.length;if(n){let o=e.codePointAt(l);for(;o===ox||o===ux;)l++,o=e.codePointAt(l)}if(a){let o=e.codePointAt(s-1);for(;o===ox||o===ux;)s--,o=e.codePointAt(s-1)}return s>l?e.slice(l,s):""}function MA(e,n){const a={type:"text",value:_A(String(n.value))};return e.patch(n,a),e.applyData(n,a)}function DA(e,n){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,a),e.applyData(n,a)}const RA={blockquote:oA,break:uA,code:cA,delete:dA,emphasis:fA,footnoteReference:hA,heading:gA,html:pA,imageReference:mA,image:yA,inlineCode:xA,linkReference:bA,link:vA,listItem:kA,list:wA,paragraph:jA,root:NA,strong:CA,table:EA,tableCell:TA,tableRow:AA,text:MA,thematicBreak:DA,toml:wo,yaml:wo,definition:wo,footnoteDefinition:wo};function wo(){}const v1=-1,hu=0,Ti=1,Vo=2,Sh=3,wh=4,jh=5,Nh=6,k1=7,S1=8,dx=typeof self=="object"?self:globalThis,OA=(e,n)=>{const a=(s,o)=>(e.set(o,s),s),l=s=>{if(e.has(s))return e.get(s);const[o,c]=n[s];switch(o){case hu:case v1:return a(c,s);case Ti:{const f=a([],s);for(const g of c)f.push(l(g));return f}case Vo:{const f=a({},s);for(const[g,h]of c)f[l(g)]=l(h);return f}case Sh:return a(new Date(c),s);case wh:{const{source:f,flags:g}=c;return a(new RegExp(f,g),s)}case jh:{const f=a(new Map,s);for(const[g,h]of c)f.set(l(g),l(h));return f}case Nh:{const f=a(new Set,s);for(const g of c)f.add(l(g));return f}case k1:{const{name:f,message:g}=c;return a(new dx[f](g),s)}case S1:return a(BigInt(c),s);case"BigInt":return a(Object(BigInt(c)),s);case"ArrayBuffer":return a(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return a(new DataView(f),c)}}return a(new dx[o](c),s)};return l},fx=e=>OA(new Map,e)(0),il="",{toString:zA}={},{keys:LA}=Object,xi=e=>{const n=typeof e;if(n!=="object"||!e)return[hu,n];const a=zA.call(e).slice(8,-1);switch(a){case"Array":return[Ti,il];case"Object":return[Vo,il];case"Date":return[Sh,il];case"RegExp":return[wh,il];case"Map":return[jh,il];case"Set":return[Nh,il];case"DataView":return[Ti,a]}return a.includes("Array")?[Ti,a]:a.includes("Error")?[k1,a]:[Vo,a]},jo=([e,n])=>e===hu&&(n==="function"||n==="symbol"),UA=(e,n,a,l)=>{const s=(c,f)=>{const g=l.push(c)-1;return a.set(f,g),g},o=c=>{if(a.has(c))return a.get(c);let[f,g]=xi(c);switch(f){case hu:{let x=c;switch(g){case"bigint":f=S1,x=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+g);x=null;break;case"undefined":return s([v1],c)}return s([f,x],c)}case Ti:{if(g){let b=c;return g==="DataView"?b=new Uint8Array(c.buffer):g==="ArrayBuffer"&&(b=new Uint8Array(c)),s([g,[...b]],c)}const x=[],y=s([f,x],c);for(const b of c)x.push(o(b));return y}case Vo:{if(g)switch(g){case"BigInt":return s([g,c.toString()],c);case"Boolean":case"Number":case"String":return s([g,c.valueOf()],c)}if(n&&"toJSON"in c)return o(c.toJSON());const x=[],y=s([f,x],c);for(const b of LA(c))(e||!jo(xi(c[b])))&&x.push([o(b),o(c[b])]);return y}case Sh:return s([f,c.toISOString()],c);case wh:{const{source:x,flags:y}=c;return s([f,{source:x,flags:y}],c)}case jh:{const x=[],y=s([f,x],c);for(const[b,v]of c)(e||!(jo(xi(b))||jo(xi(v))))&&x.push([o(b),o(v)]);return y}case Nh:{const x=[],y=s([f,x],c);for(const b of c)(e||!jo(xi(b)))&&x.push(o(b));return y}}const{message:h}=c;return s([f,{name:g,message:h}],c)};return o},hx=(e,{json:n,lossy:a}={})=>{const l=[];return UA(!(n||a),!!n,new Map,l)(e),l},Yo=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?fx(hx(e,n)):structuredClone(e):(e,n)=>fx(hx(e,n));function HA(e,n){const a=[{type:"text",value:"↩"}];return n>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),a}function BA(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function qA(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||HA,l=e.options.footnoteBackLabel||BA,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let g=-1;for(;++g<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[g]);if(!h)continue;const x=e.all(h),y=String(h.identifier).toUpperCase(),b=yl(y.toLowerCase());let v=0;const S=[],N=e.footnoteCounts.get(y);for(;N!==void 0&&++v<=N;){S.length>0&&S.push({type:"text",value:" "});let z=typeof a=="string"?a:a(g,v);typeof z=="string"&&(z={type:"text",value:z}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(g,v),className:["data-footnote-backref"]},children:Array.isArray(z)?z:[z]})}const E=x[x.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const z=E.children[E.children.length-1];z&&z.type==="text"?z.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...S)}else x.push(...S);const j={type:"element",tagName:"li",properties:{id:n+"fn-"+b},children:e.wrap(x,!0)};e.patch(h,j),f.push(j)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Yo(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
378
383
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
379
|
-
`}]}}const
|
|
384
|
+
`}]}}const gu=(function(e){if(e==null)return KA;if(typeof e=="function")return pu(e);if(typeof e=="object")return Array.isArray(e)?IA(e):$A(e);if(typeof e=="string")return FA(e);throw new Error("Expected function, string, or object as test")});function IA(e){const n=[];let a=-1;for(;++a<e.length;)n[a]=gu(e[a]);return pu(l);function l(...s){let o=-1;for(;++o<n.length;)if(n[o].apply(this,s))return!0;return!1}}function $A(e){const n=e;return pu(a);function a(l){const s=l;let o;for(o in e)if(s[o]!==n[o])return!1;return!0}}function FA(e){return pu(n);function n(a){return a&&a.type===e}}function pu(e){return n;function n(a,l,s){return!!(PA(a)&&e.call(this,a,typeof l=="number"?l:void 0,s||void 0))}}function KA(){return!0}function PA(e){return e!==null&&typeof e=="object"&&"type"in e}const w1=[],VA=!0,Pf=!1,YA="skip";function j1(e,n,a,l){let s;typeof n=="function"&&typeof a!="function"?(l=a,a=n):s=n;const o=gu(s),c=l?-1:1;f(e,void 0,[])();function f(g,h,x){const y=g&&typeof g=="object"?g:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(g.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=w1,S,N,E;if((!n||o(g,h,x[x.length-1]||void 0))&&(v=GA(a(g,x)),v[0]===Pf))return v;if("children"in g&&g.children){const j=g;if(j.children&&v[0]!==YA)for(N=(l?j.children.length:-1)+c,E=x.concat(j);N>-1&&N<j.children.length;){const z=j.children[N];if(S=f(z,N,E)(),S[0]===Pf)return S;N=typeof S[1]=="number"?S[1]:N+c}}return v}}}function GA(e){return Array.isArray(e)?e:typeof e=="number"?[VA,e]:e==null?w1:[e]}function Ch(e,n,a,l){let s,o,c;typeof n=="function"&&typeof a!="function"?(o=void 0,c=n,s=a):(o=n,c=a,s=l),j1(e,o,f,s);function f(g,h){const x=h[h.length-1],y=x?x.children.indexOf(g):void 0;return c(g,y,x)}}const Vf={}.hasOwnProperty,QA={};function XA(e,n){const a=n||QA,l=new Map,s=new Map,o=new Map,c={...RA,...a.handlers},f={all:h,applyData:JA,definitionById:l,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:g,options:a,patch:ZA,wrap:eT};return Ch(e,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const y=x.type==="definition"?l:s,b=String(x.identifier).toUpperCase();y.has(b)||y.set(b,x)}}),f;function g(x,y){const b=x.type,v=f.handlers[b];if(Vf.call(f.handlers,b)&&v)return v(f,x,y);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in x){const{children:N,...E}=x,j=Yo(E);return j.children=f.all(x),j}return Yo(x)}return(f.options.unknownHandler||WA)(f,x,y)}function h(x){const y=[];if("children"in x){const b=x.children;let v=-1;for(;++v<b.length;){const S=f.one(b[v],x);if(S){if(v&&b[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=gx(S.value)),!Array.isArray(S)&&S.type==="element")){const N=S.children[0];N&&N.type==="text"&&(N.value=gx(N.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function ZA(e,n){e.position&&(n.position=B3(e))}function JA(e,n){let a=n;if(e&&e.data){const l=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof l=="string")if(a.type==="element")a.tagName=l;else{const c="children"in a?a.children:[a];a={type:"element",tagName:l,properties:{},children:c}}a.type==="element"&&o&&Object.assign(a.properties,Yo(o)),"children"in a&&a.children&&s!==null&&s!==void 0&&(a.children=s)}return a}function WA(e,n){const a=n.data||{},l="value"in n&&!(Vf.call(a,"hProperties")||Vf.call(a,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function eT(e,n){const a=[];let l=-1;for(n&&a.push({type:"text",value:`
|
|
380
385
|
`});++l<e.length;)l&&a.push({type:"text",value:`
|
|
381
386
|
`}),a.push(e[l]);return n&&e.length>0&&a.push({type:"text",value:`
|
|
382
|
-
`}),a}function
|
|
383
|
-
`},s),o}function WA(e,n){return e&&"run"in e?async function(a,l){const s=gx(a,{file:l,...n});await e.run(s,l)}:function(a,l){return gx(a,{file:l,...e||n})}}function px(e){if(e)throw e}var nf,mx;function eT(){if(mx)return nf;mx=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},o=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var x=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!x&&!y)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},c=function(h,x){a&&x.name==="__proto__"?a(h,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):h[x.name]=x.newValue},f=function(h,x){if(x==="__proto__")if(e.call(h,x)){if(l)return l(h,x).value}else return;return h[x]};return nf=function g(){var h,x,y,b,v,S,C=arguments[0],E=1,j=arguments.length,z=!1;for(typeof C=="boolean"&&(z=C,C=arguments[1]||{},E=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});E<j;++E)if(h=arguments[E],h!=null)for(x in h)y=f(C,x),b=f(h,x),C!==b&&(z&&b&&(o(b)||(v=s(b)))?(v?(v=!1,S=y&&s(y)?y:[]):S=y&&o(y)?y:{},c(C,{name:x,newValue:g(z,S,b)})):typeof b<"u"&&c(C,{name:x,newValue:b}));return C},nf}var tT=eT();const af=Zf(tT);function Yf(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function nT(){const e=[],n={run:a,use:l};return n;function a(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(g,...h){const x=e[++o];let y=-1;if(g){c(g);return}for(;++y<s.length;)(h[y]===null||h[y]===void 0)&&(h[y]=s[y]);s=h,x?aT(x,f)(...h):c(null,...h)}}function l(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),n}}function aT(e,n){let a;return l;function l(...c){const f=e.length>c.length;let g;f&&c.push(s);try{g=e.apply(this,c)}catch(h){const x=h;if(f&&a)throw x;return s(x)}f||(g&&g.then&&typeof g.then=="function"?g.then(o,s):g instanceof Error?s(g):o(g))}function s(c,...f){a||(a=!0,n(c,...f))}function o(c){s(null,c)}}const Mn={basename:rT,dirname:lT,extname:iT,join:sT,sep:"/"};function rT(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ji(e);let a=0,l=-1,s=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){a=s+1;break}}else l<0&&(o=!0,l=s+1);return l<0?"":e.slice(a,l)}if(n===e)return"";let c=-1,f=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){a=s+1;break}}else c<0&&(o=!0,c=s+1),f>-1&&(e.codePointAt(s)===n.codePointAt(f--)?f<0&&(l=s):(f=-1,l=c));return a===l?l=c:l<0&&(l=e.length),e.slice(a,l)}function lT(e){if(Ji(e),e.length===0)return".";let n=-1,a=e.length,l;for(;--a;)if(e.codePointAt(a)===47){if(l){n=a;break}}else l||(l=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function iT(e){Ji(e);let n=e.length,a=-1,l=0,s=-1,o=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){l=n+1;break}continue}a<0&&(c=!0,a=n+1),f===46?s<0?s=n:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||a<0||o===0||o===1&&s===a-1&&s===l+1?"":e.slice(s,a)}function sT(...e){let n=-1,a;for(;++n<e.length;)Ji(e[n]),e[n]&&(a=a===void 0?e[n]:a+"/"+e[n]);return a===void 0?".":oT(a)}function oT(e){Ji(e);const n=e.codePointAt(0)===47;let a=uT(e,!n);return a.length===0&&!n&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),n?"/"+a:a}function uT(e,n){let a="",l=0,s=-1,o=0,c=-1,f,g;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(a.length<2||l!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(g=a.lastIndexOf("/"),g!==a.length-1){g<0?(a="",l=0):(a=a.slice(0,g),l=a.length-1-a.lastIndexOf("/")),s=c,o=0;continue}}else if(a.length>0){a="",l=0,s=c,o=0;continue}}n&&(a=a.length>0?a+"/..":"..",l=2)}else a.length>0?a+="/"+e.slice(s+1,c):a=e.slice(s+1,c),l=c-s-1;s=c,o=0}else f===46&&o>-1?o++:o=-1}return a}function Ji(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cT={cwd:dT};function dT(){return"/"}function Gf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function fT(e){if(typeof e=="string")e=new URL(e);else if(!Gf(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return hT(e)}function hT(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const n=e.pathname;let a=-1;for(;++a<n.length;)if(n.codePointAt(a)===37&&n.codePointAt(a+1)===50){const l=n.codePointAt(a+2);if(l===70||l===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(n)}const rf=["history","path","basename","stem","extname","dirname"];class j1{constructor(n){let a;n?Gf(n)?a={path:n}:typeof n=="string"||gT(n)?a={value:n}:a=n:a={},this.cwd="cwd"in a?"":cT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<rf.length;){const o=rf[l];o in a&&a[o]!==void 0&&a[o]!==null&&(this[o]=o==="history"?[...a[o]]:a[o])}let s;for(s in a)rf.includes(s)||(this[s]=a[s])}get basename(){return typeof this.path=="string"?Mn.basename(this.path):void 0}set basename(n){sf(n,"basename"),lf(n,"basename"),this.path=Mn.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Mn.dirname(this.path):void 0}set dirname(n){yx(this.basename,"dirname"),this.path=Mn.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Mn.extname(this.path):void 0}set extname(n){if(lf(n,"extname"),yx(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mn.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Gf(n)&&(n=fT(n)),sf(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Mn.basename(this.path,this.extname):void 0}set stem(n){sf(n,"stem"),lf(n,"stem"),this.path=Mn.join(this.dirname||"",n+(this.extname||""))}fail(n,a,l){const s=this.message(n,a,l);throw s.fatal=!0,s}info(n,a,l){const s=this.message(n,a,l);return s.fatal=void 0,s}message(n,a,l){const s=new _t(n,a,l);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function lf(e,n){if(e&&e.includes(Mn.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Mn.sep+"`")}function sf(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function yx(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function gT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pT=(function(e){const l=this.constructor.prototype,s=l[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,l),o}),mT={}.hasOwnProperty;class Eh extends pT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=nT()}copy(){const n=new Eh;let a=-1;for(;++a<this.attachers.length;){const l=this.attachers[a];n.use(...l)}return n.data(af(!0,{},this.namespace)),n}data(n,a){return typeof n=="string"?arguments.length===2?(cf("data",this.frozen),this.namespace[n]=a,this):mT.call(this.namespace,n)&&this.namespace[n]||void 0:n?(cf("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const s=a.call(n,...l);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const a=Co(n),l=this.parser||this.Parser;return of("parse",l),l(String(a),a)}process(n,a){const l=this;return this.freeze(),of("process",this.parser||this.Parser),uf("process",this.compiler||this.Compiler),a?s(void 0,a):new Promise(s);function s(o,c){const f=Co(n),g=l.parse(f);l.run(g,f,function(x,y,b){if(x||!y||!b)return h(x);const v=y,S=l.stringify(v,b);bT(S)?b.value=S:b.result=S,h(x,b)});function h(x,y){x||!y?c(x):o?o(y):a(void 0,y)}}}processSync(n){let a=!1,l;return this.freeze(),of("processSync",this.parser||this.Parser),uf("processSync",this.compiler||this.Compiler),this.process(n,s),bx("processSync","process",a),l;function s(o,c){a=!0,px(o),l=c}}run(n,a,l){xx(n),this.freeze();const s=this.transformers;return!l&&typeof a=="function"&&(l=a,a=void 0),l?o(void 0,l):new Promise(o);function o(c,f){const g=Co(a);s.run(n,g,h);function h(x,y,b){const v=y||n;x?f(x):c?c(v):l(void 0,v,b)}}}runSync(n,a){let l=!1,s;return this.run(n,a,o),bx("runSync","run",l),s;function o(c,f){px(c),s=f,l=!0}}stringify(n,a){this.freeze();const l=Co(a),s=this.compiler||this.Compiler;return uf("stringify",s),xx(n),s(n,l)}use(n,...a){const l=this.attachers,s=this.namespace;if(cf("use",this.frozen),n!=null)if(typeof n=="function")g(n,a);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(h){if(typeof h=="function")g(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[x,...y]=h;g(x,y)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(s.settings=af(!0,s.settings,h.settings))}function f(h){let x=-1;if(h!=null)if(Array.isArray(h))for(;++x<h.length;){const y=h[x];o(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function g(h,x){let y=-1,b=-1;for(;++y<l.length;)if(l[y][0]===h){b=y;break}if(b===-1)l.push([h,...x]);else if(x.length>0){let[v,...S]=x;const C=l[b][1];Yf(C)&&Yf(v)&&(v=af(!0,C,v)),l[b]=[h,v,...S]}}}}const yT=new Eh().freeze();function of(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uf(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function cf(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xx(e){if(!Yf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bx(e,n,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Co(e){return xT(e)?e:new j1(e)}function xT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function bT(e){return typeof e=="string"||vT(e)}function vT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vx=[],kx={allowDangerousHtml:!0},ST=/^(https?|ircs?|mailto|xmpp)$/i,wT=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ah(e){const n=jT(e),a=CT(e);return NT(n.runSync(n.parse(a),a),e)}function jT(e){const n=e.rehypePlugins||vx,a=e.remarkPlugins||vx,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...kx}:kx;return yT().use(lA).use(a).use(WA,l).use(n)}function CT(e){const n=e.children||"",a=new j1;return typeof n=="string"&&(a.value=n),a}function NT(e,n){const a=n.allowedElements,l=n.allowElement,s=n.components,o=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,g=n.urlTransform||ET;for(const x of wT)Object.hasOwn(n,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+kT+x.id,void 0);return Nh(e,h),$3(e,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function h(x,y,b){if(x.type==="raw"&&b&&typeof y=="number")return c?b.children.splice(y,1):b.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let v;for(v in Wd)if(Object.hasOwn(Wd,v)&&Object.hasOwn(x.properties,v)){const S=x.properties[v],C=Wd[v];(C===null||C.includes(x.tagName))&&(x.properties[v]=g(String(S||""),v,x))}}if(x.type==="element"){let v=a?!a.includes(x.tagName):o?o.includes(x.tagName):!1;if(!v&&l&&typeof y=="number"&&(v=!l(x,y,b)),v&&b&&typeof y=="number")return f&&x.children?b.children.splice(y,1,...x.children):b.children.splice(y,1),y}}}function ET(e){const n=e.indexOf(":"),a=e.indexOf("?"),l=e.indexOf("#"),s=e.indexOf("/");return n===-1||s!==-1&&n>s||a!==-1&&n>a||l!==-1&&n>l||ST.test(e.slice(0,n))?e:""}function Sx(e,n){const a=String(e);if(typeof n!="string")throw new TypeError("Expected character");let l=0,s=a.indexOf(n);for(;s!==-1;)l++,s=a.indexOf(n,s+n.length);return l}function AT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function TT(e,n,a){const s=fu((a||{}).ignore||[]),o=_T(n);let c=-1;for(;++c<o.length;)w1(e,"text",f);function f(h,x){let y=-1,b;for(;++y<x.length;){const v=x[y],S=b?b.children:void 0;if(s(v,S?S.indexOf(v):void 0,b))return;b=v}if(b)return g(h,x)}function g(h,x){const y=x[x.length-1],b=o[c][0],v=o[c][1];let S=0;const E=y.children.indexOf(h);let j=!1,z=[];b.lastIndex=0;let D=b.exec(h.value);for(;D;){const Y=D.index,H={index:D.index,input:D.input,stack:[...x,h]};let L=v(...D,H);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?b.lastIndex=Y+1:(S!==Y&&z.push({type:"text",value:h.value.slice(S,Y)}),Array.isArray(L)?z.push(...L):L&&z.push(L),S=Y+D[0].length,j=!0),!b.global)break;D=b.exec(h.value)}return j?(S<h.value.length&&z.push({type:"text",value:h.value.slice(S)}),y.children.splice(E,1,...z)):z=[h],E+z.length}}function _T(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<a.length;){const s=a[l];n.push([DT(s[0]),MT(s[1])])}return n}function DT(e){return typeof e=="string"?new RegExp(AT(e),"g"):e}function MT(e){return typeof e=="function"?e:function(){return e}}const df="phrasing",ff=["autolink","link","image","label"];function RT(){return{transforms:[qT],enter:{literalAutolink:zT,literalAutolinkEmail:hf,literalAutolinkHttp:hf,literalAutolinkWww:hf},exit:{literalAutolink:BT,literalAutolinkEmail:HT,literalAutolinkHttp:LT,literalAutolinkWww:UT}}}function OT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:df,notInConstruct:ff},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:df,notInConstruct:ff},{character:":",before:"[ps]",after:"\\/",inConstruct:df,notInConstruct:ff}]}}function zT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hf(e){this.config.enter.autolinkProtocol.call(this,e)}function LT(e){this.config.exit.autolinkProtocol.call(this,e)}function UT(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function HT(e){this.config.exit.autolinkEmail.call(this,e)}function BT(e){this.exit(e)}function qT(e){TT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,IT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),$T]],{ignore:["link","linkReference"]})}function IT(e,n,a,l,s){let o="";if(!C1(s)||(/^w/i.test(n)&&(a=n+a,n="",o="http://"),!FT(a)))return!1;const c=KT(a+l);if(!c[0])return!1;const f={type:"link",title:null,url:o+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function $T(e,n,a,l){return!C1(l,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+a,children:[{type:"text",value:n+"@"+a}]}}function FT(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function KT(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let a=n[0],l=a.indexOf(")");const s=Sx(e,"(");let o=Sx(e,")");for(;l!==-1&&s>o;)e+=a.slice(0,l+1),a=a.slice(l+1),l=a.indexOf(")"),o++;return[e,a]}function C1(e,n){const a=e.input.charCodeAt(e.index-1);return(e.index===0||cr(a)||uu(a))&&(!n||a!==47)}N1.peek=WT;function PT(){this.buffer()}function VT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function YT(){this.buffer()}function GT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function QT(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=jn(this.sliceSerialize(e)).toLowerCase(),a.label=n}function XT(e){this.exit(e)}function ZT(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=jn(this.sliceSerialize(e)).toLowerCase(),a.label=n}function JT(e){this.exit(e)}function WT(){return"["}function N1(e,n,a,l){const s=a.createTracker(l);let o=s.move("[^");const c=a.enter("footnoteReference"),f=a.enter("reference");return o+=s.move(a.safe(a.associationId(e),{after:"]",before:o})),f(),c(),o+=s.move("]"),o}function e6(){return{enter:{gfmFootnoteCallString:PT,gfmFootnoteCall:VT,gfmFootnoteDefinitionLabelString:YT,gfmFootnoteDefinition:GT},exit:{gfmFootnoteCallString:QT,gfmFootnoteCall:XT,gfmFootnoteDefinitionLabelString:ZT,gfmFootnoteDefinition:JT}}}function t6(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:a,footnoteReference:N1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(l,s,o,c){const f=o.createTracker(c);let g=f.move("[^");const h=o.enter("footnoteDefinition"),x=o.enter("label");return g+=f.move(o.safe(o.associationId(l),{before:g,after:"]"})),x(),g+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),g+=f.move((n?`
|
|
384
|
-
`:" ")+o.indentLines(o.containerFlow(l,f.current()),n?
|
|
385
|
-
`)}function
|
|
386
|
-
`&&
|
|
387
|
-
`}function
|
|
387
|
+
`}),a}function gx(e){let n=0,a=e.charCodeAt(n);for(;a===9||a===32;)n++,a=e.charCodeAt(n);return e.slice(n)}function px(e,n){const a=XA(e,n),l=a.one(e,void 0),s=qA(a),o=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
|
|
388
|
+
`},s),o}function tT(e,n){return e&&"run"in e?async function(a,l){const s=px(a,{file:l,...n});await e.run(s,l)}:function(a,l){return px(a,{file:l,...e||n})}}function mx(e){if(e)throw e}var rf,yx;function nT(){if(yx)return rf;yx=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},o=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var x=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!x&&!y)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},c=function(h,x){a&&x.name==="__proto__"?a(h,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):h[x.name]=x.newValue},f=function(h,x){if(x==="__proto__")if(e.call(h,x)){if(l)return l(h,x).value}else return;return h[x]};return rf=function g(){var h,x,y,b,v,S,N=arguments[0],E=1,j=arguments.length,z=!1;for(typeof N=="boolean"&&(z=N,N=arguments[1]||{},E=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});E<j;++E)if(h=arguments[E],h!=null)for(x in h)y=f(N,x),b=f(h,x),N!==b&&(z&&b&&(o(b)||(v=s(b)))?(v?(v=!1,S=y&&s(y)?y:[]):S=y&&o(y)?y:{},c(N,{name:x,newValue:g(z,S,b)})):typeof b<"u"&&c(N,{name:x,newValue:b}));return N},rf}var aT=nT();const lf=Zf(aT);function Yf(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function rT(){const e=[],n={run:a,use:l};return n;function a(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(g,...h){const x=e[++o];let y=-1;if(g){c(g);return}for(;++y<s.length;)(h[y]===null||h[y]===void 0)&&(h[y]=s[y]);s=h,x?lT(x,f)(...h):c(null,...h)}}function l(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),n}}function lT(e,n){let a;return l;function l(...c){const f=e.length>c.length;let g;f&&c.push(s);try{g=e.apply(this,c)}catch(h){const x=h;if(f&&a)throw x;return s(x)}f||(g&&g.then&&typeof g.then=="function"?g.then(o,s):g instanceof Error?s(g):o(g))}function s(c,...f){a||(a=!0,n(c,...f))}function o(c){s(null,c)}}const Dn={basename:iT,dirname:sT,extname:oT,join:uT,sep:"/"};function iT(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ji(e);let a=0,l=-1,s=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){a=s+1;break}}else l<0&&(o=!0,l=s+1);return l<0?"":e.slice(a,l)}if(n===e)return"";let c=-1,f=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){a=s+1;break}}else c<0&&(o=!0,c=s+1),f>-1&&(e.codePointAt(s)===n.codePointAt(f--)?f<0&&(l=s):(f=-1,l=c));return a===l?l=c:l<0&&(l=e.length),e.slice(a,l)}function sT(e){if(Ji(e),e.length===0)return".";let n=-1,a=e.length,l;for(;--a;)if(e.codePointAt(a)===47){if(l){n=a;break}}else l||(l=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function oT(e){Ji(e);let n=e.length,a=-1,l=0,s=-1,o=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){l=n+1;break}continue}a<0&&(c=!0,a=n+1),f===46?s<0?s=n:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||a<0||o===0||o===1&&s===a-1&&s===l+1?"":e.slice(s,a)}function uT(...e){let n=-1,a;for(;++n<e.length;)Ji(e[n]),e[n]&&(a=a===void 0?e[n]:a+"/"+e[n]);return a===void 0?".":cT(a)}function cT(e){Ji(e);const n=e.codePointAt(0)===47;let a=dT(e,!n);return a.length===0&&!n&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),n?"/"+a:a}function dT(e,n){let a="",l=0,s=-1,o=0,c=-1,f,g;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(a.length<2||l!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(g=a.lastIndexOf("/"),g!==a.length-1){g<0?(a="",l=0):(a=a.slice(0,g),l=a.length-1-a.lastIndexOf("/")),s=c,o=0;continue}}else if(a.length>0){a="",l=0,s=c,o=0;continue}}n&&(a=a.length>0?a+"/..":"..",l=2)}else a.length>0?a+="/"+e.slice(s+1,c):a=e.slice(s+1,c),l=c-s-1;s=c,o=0}else f===46&&o>-1?o++:o=-1}return a}function Ji(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const fT={cwd:hT};function hT(){return"/"}function Gf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function gT(e){if(typeof e=="string")e=new URL(e);else if(!Gf(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return pT(e)}function pT(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const n=e.pathname;let a=-1;for(;++a<n.length;)if(n.codePointAt(a)===37&&n.codePointAt(a+1)===50){const l=n.codePointAt(a+2);if(l===70||l===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(n)}const sf=["history","path","basename","stem","extname","dirname"];class N1{constructor(n){let a;n?Gf(n)?a={path:n}:typeof n=="string"||mT(n)?a={value:n}:a=n:a={},this.cwd="cwd"in a?"":fT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<sf.length;){const o=sf[l];o in a&&a[o]!==void 0&&a[o]!==null&&(this[o]=o==="history"?[...a[o]]:a[o])}let s;for(s in a)sf.includes(s)||(this[s]=a[s])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(n){uf(n,"basename"),of(n,"basename"),this.path=Dn.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Dn.dirname(this.path):void 0}set dirname(n){xx(this.basename,"dirname"),this.path=Dn.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Dn.extname(this.path):void 0}set extname(n){if(of(n,"extname"),xx(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dn.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Gf(n)&&(n=gT(n)),uf(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Dn.basename(this.path,this.extname):void 0}set stem(n){uf(n,"stem"),of(n,"stem"),this.path=Dn.join(this.dirname||"",n+(this.extname||""))}fail(n,a,l){const s=this.message(n,a,l);throw s.fatal=!0,s}info(n,a,l){const s=this.message(n,a,l);return s.fatal=void 0,s}message(n,a,l){const s=new _t(n,a,l);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function of(e,n){if(e&&e.includes(Dn.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Dn.sep+"`")}function uf(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function xx(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function mT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yT=(function(e){const l=this.constructor.prototype,s=l[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,l),o}),xT={}.hasOwnProperty;class Eh extends yT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=rT()}copy(){const n=new Eh;let a=-1;for(;++a<this.attachers.length;){const l=this.attachers[a];n.use(...l)}return n.data(lf(!0,{},this.namespace)),n}data(n,a){return typeof n=="string"?arguments.length===2?(ff("data",this.frozen),this.namespace[n]=a,this):xT.call(this.namespace,n)&&this.namespace[n]||void 0:n?(ff("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const s=a.call(n,...l);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const a=No(n),l=this.parser||this.Parser;return cf("parse",l),l(String(a),a)}process(n,a){const l=this;return this.freeze(),cf("process",this.parser||this.Parser),df("process",this.compiler||this.Compiler),a?s(void 0,a):new Promise(s);function s(o,c){const f=No(n),g=l.parse(f);l.run(g,f,function(x,y,b){if(x||!y||!b)return h(x);const v=y,S=l.stringify(v,b);kT(S)?b.value=S:b.result=S,h(x,b)});function h(x,y){x||!y?c(x):o?o(y):a(void 0,y)}}}processSync(n){let a=!1,l;return this.freeze(),cf("processSync",this.parser||this.Parser),df("processSync",this.compiler||this.Compiler),this.process(n,s),vx("processSync","process",a),l;function s(o,c){a=!0,mx(o),l=c}}run(n,a,l){bx(n),this.freeze();const s=this.transformers;return!l&&typeof a=="function"&&(l=a,a=void 0),l?o(void 0,l):new Promise(o);function o(c,f){const g=No(a);s.run(n,g,h);function h(x,y,b){const v=y||n;x?f(x):c?c(v):l(void 0,v,b)}}}runSync(n,a){let l=!1,s;return this.run(n,a,o),vx("runSync","run",l),s;function o(c,f){mx(c),s=f,l=!0}}stringify(n,a){this.freeze();const l=No(a),s=this.compiler||this.Compiler;return df("stringify",s),bx(n),s(n,l)}use(n,...a){const l=this.attachers,s=this.namespace;if(ff("use",this.frozen),n!=null)if(typeof n=="function")g(n,a);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(h){if(typeof h=="function")g(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[x,...y]=h;g(x,y)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(s.settings=lf(!0,s.settings,h.settings))}function f(h){let x=-1;if(h!=null)if(Array.isArray(h))for(;++x<h.length;){const y=h[x];o(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function g(h,x){let y=-1,b=-1;for(;++y<l.length;)if(l[y][0]===h){b=y;break}if(b===-1)l.push([h,...x]);else if(x.length>0){let[v,...S]=x;const N=l[b][1];Yf(N)&&Yf(v)&&(v=lf(!0,N,v)),l[b]=[h,v,...S]}}}}const bT=new Eh().freeze();function cf(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function df(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ff(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bx(e){if(!Yf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vx(e,n,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function No(e){return vT(e)?e:new N1(e)}function vT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function kT(e){return typeof e=="string"||ST(e)}function ST(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const wT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",kx=[],Sx={allowDangerousHtml:!0},jT=/^(https?|ircs?|mailto|xmpp)$/i,NT=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ah(e){const n=CT(e),a=ET(e);return AT(n.runSync(n.parse(a),a),e)}function CT(e){const n=e.rehypePlugins||kx,a=e.remarkPlugins||kx,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Sx}:Sx;return bT().use(sA).use(a).use(tT,l).use(n)}function ET(e){const n=e.children||"",a=new N1;return typeof n=="string"&&(a.value=n),a}function AT(e,n){const a=n.allowedElements,l=n.allowElement,s=n.components,o=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,g=n.urlTransform||TT;for(const x of NT)Object.hasOwn(n,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+wT+x.id,void 0);return Ch(e,h),K3(e,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function h(x,y,b){if(x.type==="raw"&&b&&typeof y=="number")return c?b.children.splice(y,1):b.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let v;for(v in tf)if(Object.hasOwn(tf,v)&&Object.hasOwn(x.properties,v)){const S=x.properties[v],N=tf[v];(N===null||N.includes(x.tagName))&&(x.properties[v]=g(String(S||""),v,x))}}if(x.type==="element"){let v=a?!a.includes(x.tagName):o?o.includes(x.tagName):!1;if(!v&&l&&typeof y=="number"&&(v=!l(x,y,b)),v&&b&&typeof y=="number")return f&&x.children?b.children.splice(y,1,...x.children):b.children.splice(y,1),y}}}function TT(e){const n=e.indexOf(":"),a=e.indexOf("?"),l=e.indexOf("#"),s=e.indexOf("/");return n===-1||s!==-1&&n>s||a!==-1&&n>a||l!==-1&&n>l||jT.test(e.slice(0,n))?e:""}function wx(e,n){const a=String(e);if(typeof n!="string")throw new TypeError("Expected character");let l=0,s=a.indexOf(n);for(;s!==-1;)l++,s=a.indexOf(n,s+n.length);return l}function _T(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function MT(e,n,a){const s=gu((a||{}).ignore||[]),o=DT(n);let c=-1;for(;++c<o.length;)j1(e,"text",f);function f(h,x){let y=-1,b;for(;++y<x.length;){const v=x[y],S=b?b.children:void 0;if(s(v,S?S.indexOf(v):void 0,b))return;b=v}if(b)return g(h,x)}function g(h,x){const y=x[x.length-1],b=o[c][0],v=o[c][1];let S=0;const E=y.children.indexOf(h);let j=!1,z=[];b.lastIndex=0;let T=b.exec(h.value);for(;T;){const P=T.index,H={index:T.index,input:T.input,stack:[...x,h]};let L=v(...T,H);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?b.lastIndex=P+1:(S!==P&&z.push({type:"text",value:h.value.slice(S,P)}),Array.isArray(L)?z.push(...L):L&&z.push(L),S=P+T[0].length,j=!0),!b.global)break;T=b.exec(h.value)}return j?(S<h.value.length&&z.push({type:"text",value:h.value.slice(S)}),y.children.splice(E,1,...z)):z=[h],E+z.length}}function DT(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<a.length;){const s=a[l];n.push([RT(s[0]),OT(s[1])])}return n}function RT(e){return typeof e=="string"?new RegExp(_T(e),"g"):e}function OT(e){return typeof e=="function"?e:function(){return e}}const hf="phrasing",gf=["autolink","link","image","label"];function zT(){return{transforms:[$T],enter:{literalAutolink:UT,literalAutolinkEmail:pf,literalAutolinkHttp:pf,literalAutolinkWww:pf},exit:{literalAutolink:IT,literalAutolinkEmail:qT,literalAutolinkHttp:HT,literalAutolinkWww:BT}}}function LT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hf,notInConstruct:gf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hf,notInConstruct:gf},{character:":",before:"[ps]",after:"\\/",inConstruct:hf,notInConstruct:gf}]}}function UT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function pf(e){this.config.enter.autolinkProtocol.call(this,e)}function HT(e){this.config.exit.autolinkProtocol.call(this,e)}function BT(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function qT(e){this.config.exit.autolinkEmail.call(this,e)}function IT(e){this.exit(e)}function $T(e){MT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,FT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),KT]],{ignore:["link","linkReference"]})}function FT(e,n,a,l,s){let o="";if(!C1(s)||(/^w/i.test(n)&&(a=n+a,n="",o="http://"),!PT(a)))return!1;const c=VT(a+l);if(!c[0])return!1;const f={type:"link",title:null,url:o+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function KT(e,n,a,l){return!C1(l,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+a,children:[{type:"text",value:n+"@"+a}]}}function PT(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function VT(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let a=n[0],l=a.indexOf(")");const s=wx(e,"(");let o=wx(e,")");for(;l!==-1&&s>o;)e+=a.slice(0,l+1),a=a.slice(l+1),l=a.indexOf(")"),o++;return[e,a]}function C1(e,n){const a=e.input.charCodeAt(e.index-1);return(e.index===0||cr(a)||du(a))&&(!n||a!==47)}E1.peek=t6;function YT(){this.buffer()}function GT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function QT(){this.buffer()}function XT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ZT(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=jn(this.sliceSerialize(e)).toLowerCase(),a.label=n}function JT(e){this.exit(e)}function WT(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=jn(this.sliceSerialize(e)).toLowerCase(),a.label=n}function e6(e){this.exit(e)}function t6(){return"["}function E1(e,n,a,l){const s=a.createTracker(l);let o=s.move("[^");const c=a.enter("footnoteReference"),f=a.enter("reference");return o+=s.move(a.safe(a.associationId(e),{after:"]",before:o})),f(),c(),o+=s.move("]"),o}function n6(){return{enter:{gfmFootnoteCallString:YT,gfmFootnoteCall:GT,gfmFootnoteDefinitionLabelString:QT,gfmFootnoteDefinition:XT},exit:{gfmFootnoteCallString:ZT,gfmFootnoteCall:JT,gfmFootnoteDefinitionLabelString:WT,gfmFootnoteDefinition:e6}}}function a6(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:a,footnoteReference:E1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(l,s,o,c){const f=o.createTracker(c);let g=f.move("[^");const h=o.enter("footnoteDefinition"),x=o.enter("label");return g+=f.move(o.safe(o.associationId(l),{before:g,after:"]"})),x(),g+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),g+=f.move((n?`
|
|
389
|
+
`:" ")+o.indentLines(o.containerFlow(l,f.current()),n?A1:r6))),h(),g}}function r6(e,n,a){return n===0?e:A1(e,n,a)}function A1(e,n,a){return(a?"":" ")+e}const l6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];T1.peek=c6;function i6(){return{canContainEols:["delete"],enter:{strikethrough:o6},exit:{strikethrough:u6}}}function s6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:l6}],handlers:{delete:T1}}}function o6(e){this.enter({type:"delete",children:[]},e)}function u6(e){this.exit(e)}function T1(e,n,a,l){const s=a.createTracker(l),o=a.enter("strikethrough");let c=s.move("~~");return c+=a.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function c6(){return"~"}function d6(e){return e.length}function f6(e,n){const a=n||{},l=(a.align||[]).concat(),s=a.stringLength||d6,o=[],c=[],f=[],g=[];let h=0,x=-1;for(;++x<e.length;){const N=[],E=[];let j=-1;for(e[x].length>h&&(h=e[x].length);++j<e[x].length;){const z=h6(e[x][j]);if(a.alignDelimiters!==!1){const T=s(z);E[j]=T,(g[j]===void 0||T>g[j])&&(g[j]=T)}N.push(z)}c[x]=N,f[x]=E}let y=-1;if(typeof l=="object"&&"length"in l)for(;++y<h;)o[y]=jx(l[y]);else{const N=jx(l);for(;++y<h;)o[y]=N}y=-1;const b=[],v=[];for(;++y<h;){const N=o[y];let E="",j="";N===99?(E=":",j=":"):N===108?E=":":N===114&&(j=":");let z=a.alignDelimiters===!1?1:Math.max(1,g[y]-E.length-j.length);const T=E+"-".repeat(z)+j;a.alignDelimiters!==!1&&(z=E.length+z+j.length,z>g[y]&&(g[y]=z),v[y]=z),b[y]=T}c.splice(1,0,b),f.splice(1,0,v),x=-1;const S=[];for(;++x<c.length;){const N=c[x],E=f[x];y=-1;const j=[];for(;++y<h;){const z=N[y]||"";let T="",P="";if(a.alignDelimiters!==!1){const H=g[y]-(E[y]||0),L=o[y];L===114?T=" ".repeat(H):L===99?H%2?(T=" ".repeat(H/2+.5),P=" ".repeat(H/2-.5)):(T=" ".repeat(H/2),P=T):P=" ".repeat(H)}a.delimiterStart!==!1&&!y&&j.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&z==="")&&(a.delimiterStart!==!1||y)&&j.push(" "),a.alignDelimiters!==!1&&j.push(T),j.push(z),a.alignDelimiters!==!1&&j.push(P),a.padding!==!1&&j.push(" "),(a.delimiterEnd!==!1||y!==h-1)&&j.push("|")}S.push(a.delimiterEnd===!1?j.join("").replace(/ +$/,""):j.join(""))}return S.join(`
|
|
390
|
+
`)}function h6(e){return e==null?"":String(e)}function jx(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function g6(e,n,a,l){const s=a.enter("blockquote"),o=a.createTracker(l);o.move("> "),o.shift(2);const c=a.indentLines(a.containerFlow(e,o.current()),p6);return s(),c}function p6(e,n,a){return">"+(a?"":" ")+e}function m6(e,n){return Nx(e,n.inConstruct,!0)&&!Nx(e,n.notInConstruct,!1)}function Nx(e,n,a){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return a;let l=-1;for(;++l<n.length;)if(e.includes(n[l]))return!0;return!1}function Cx(e,n,a,l){let s=-1;for(;++s<a.unsafe.length;)if(a.unsafe[s].character===`
|
|
391
|
+
`&&m6(a.stack,a.unsafe[s]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
392
|
+
`}function y6(e,n){const a=String(e);let l=a.indexOf(n),s=l,o=0,c=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===s?++o>c&&(c=o):o=1,s=l+n.length,l=a.indexOf(n,s);return c}function x6(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function b6(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function v6(e,n,a,l){const s=b6(a),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(x6(e,a)){const y=a.enter("codeIndented"),b=a.indentLines(o,k6);return y(),b}const f=a.createTracker(l),g=s.repeat(Math.max(y6(o,s)+1,3)),h=a.enter("codeFenced");let x=f.move(g);if(e.lang){const y=a.enter(`codeFencedLang${c}`);x+=f.move(a.safe(e.lang,{before:x,after:" ",encode:["`"],...f.current()})),y()}if(e.lang&&e.meta){const y=a.enter(`codeFencedMeta${c}`);x+=f.move(" "),x+=f.move(a.safe(e.meta,{before:x,after:`
|
|
388
393
|
`,encode:["`"],...f.current()})),y()}return x+=f.move(`
|
|
389
394
|
`),o&&(x+=f.move(o+`
|
|
390
|
-
`)),x+=f.move(g),h(),x}function
|
|
391
|
-
`,...g.current()}))),f(),e.title&&(f=a.enter(`title${o}`),h+=g.move(" "+s),h+=g.move(a.safe(e.title,{before:h,after:s,...g.current()})),h+=g.move(s),f()),c(),h}function
|
|
395
|
+
`)),x+=f.move(g),h(),x}function k6(e,n,a){return(a?"":" ")+e}function Th(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function S6(e,n,a,l){const s=Th(a),o=s==='"'?"Quote":"Apostrophe",c=a.enter("definition");let f=a.enter("label");const g=a.createTracker(l);let h=g.move("[");return h+=g.move(a.safe(a.associationId(e),{before:h,after:"]",...g.current()})),h+=g.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),h+=g.move("<"),h+=g.move(a.safe(e.url,{before:h,after:">",...g.current()})),h+=g.move(">")):(f=a.enter("destinationRaw"),h+=g.move(a.safe(e.url,{before:h,after:e.title?" ":`
|
|
396
|
+
`,...g.current()}))),f(),e.title&&(f=a.enter(`title${o}`),h+=g.move(" "+s),h+=g.move(a.safe(e.title,{before:h,after:s,...g.current()})),h+=g.move(s),f()),c(),h}function w6(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function qi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Go(e,n,a){const l=fl(e),s=fl(n);return l===void 0?s===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}_1.peek=j6;function _1(e,n,a,l){const s=w6(a),o=a.enter("emphasis"),c=a.createTracker(l),f=c.move(s);let g=c.move(a.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=g.charCodeAt(0),x=Go(l.before.charCodeAt(l.before.length-1),h,s);x.inside&&(g=qi(h)+g.slice(1));const y=g.charCodeAt(g.length-1),b=Go(l.after.charCodeAt(0),y,s);b.inside&&(g=g.slice(0,-1)+qi(y));const v=c.move(s);return o(),a.attentionEncodeSurroundingInfo={after:b.outside,before:x.outside},f+g+v}function j6(e,n,a){return a.options.emphasis||"*"}function N6(e,n){let a=!1;return Ch(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return a=!0,Pf}),!!((!e.depth||e.depth<3)&&bh(e)&&(n.options.setext||a))}function C6(e,n,a,l){const s=Math.max(Math.min(6,e.depth||1),1),o=a.createTracker(l);if(N6(e,a)){const x=a.enter("headingSetext"),y=a.enter("phrasing"),b=a.containerPhrasing(e,{...o.current(),before:`
|
|
392
397
|
`,after:`
|
|
393
398
|
`});return y(),x(),b+`
|
|
394
399
|
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
395
400
|
`))+1))}const c="#".repeat(s),f=a.enter("headingAtx"),g=a.enter("phrasing");o.move(c+" ");let h=a.containerPhrasing(e,{before:"# ",after:`
|
|
396
|
-
`,...o.current()});return/^[\t ]/.test(h)&&(h=qi(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,a.options.closeAtx&&(h+=" "+c),g(),f(),h}
|
|
397
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:g,tableRow:f}};function c(v,S,
|
|
398
|
-
`))}function g(v,S,C,E){const j=C.enter("tableCell"),z=C.enter("phrasing"),D=C.containerPhrasing(v,{...E,before:o,after:o});return z(),j(),D}function h(v,S){return c6(v,{align:S,alignDelimiters:l,padding:a,stringLength:s})}function x(v,S,C){const E=v.children;let j=-1;const z=[],D=S.enter("table");for(;++j<E.length;)z[j]=y(E[j],S,C);return D(),z}function y(v,S,C){const E=v.children;let j=-1;const z=[],D=S.enter("tableRow");for(;++j<E.length;)z[j]=g(E[j],v,S,C);return D(),z}function b(v,S,C){let E=B1.inlineCode(v,S,C);return C.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function Z6(){return{exit:{taskListCheckValueChecked:Ex,taskListCheckValueUnchecked:Ex,paragraph:W6}}}function J6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:e_}}}function Ex(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function W6(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const l=a.children[0];if(l&&l.type==="text"){const s=n.children;let o=-1,c;for(;++o<s.length;){const f=s[o];if(f.type==="paragraph"){c=f;break}}c===a&&(l.value=l.value.slice(1),l.value.length===0?a.children.shift():a.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,a.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function e_(e,n,a,l){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=a.createTracker(l);o&&f.move(c);let g=B1.listItem(e,n,a,{...l,...f.current()});return o&&(g=g.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),g;function h(x){return x+c}}function t_(){return[RT(),e6(),r6(),K6(),Z6()]}function n_(e){return{extensions:[OT(),t6(e),l6(),X6(e),J6()]}}const a_={tokenize:u_,partial:!0},q1={tokenize:c_,partial:!0},I1={tokenize:d_,partial:!0},$1={tokenize:f_,partial:!0},r_={tokenize:h_,partial:!0},F1={name:"wwwAutolink",tokenize:s_,previous:P1},K1={name:"protocolAutolink",tokenize:o_,previous:V1},ua={name:"emailAutolink",tokenize:i_,previous:Y1},Ln={};function l_(){return{text:Ln}}let ir=48;for(;ir<123;)Ln[ir]=ua,ir++,ir===58?ir=65:ir===91&&(ir=97);Ln[43]=ua;Ln[45]=ua;Ln[46]=ua;Ln[95]=ua;Ln[72]=[ua,K1];Ln[104]=[ua,K1];Ln[87]=[ua,F1];Ln[119]=[ua,F1];function i_(e,n,a){const l=this;let s,o;return c;function c(y){return!Qf(y)||!Y1.call(l,l.previous)||Dh(l.events)?a(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return Qf(y)?(e.consume(y),f):y===64?(e.consume(y),g):a(y)}function g(y){return y===46?e.check(r_,x,h)(y):y===45||y===95||Tt(y)?(o=!0,e.consume(y),g):x(y)}function h(y){return e.consume(y),s=!0,g}function x(y){return o&&s&&zt(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(y)):a(y)}}function s_(e,n,a){const l=this;return s;function s(c){return c!==87&&c!==119||!P1.call(l,l.previous)||Dh(l.events)?a(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(a_,e.attempt(q1,e.attempt(I1,o),a),a)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function o_(e,n,a){const l=this;let s="",o=!1;return c;function c(y){return(y===72||y===104)&&V1.call(l,l.previous)&&!Dh(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),e.consume(y),f):a(y)}function f(y){if(zt(y)&&s.length<5)return s+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(y),g}return a(y)}function g(y){return y===47?(e.consume(y),o?h:(o=!0,g)):a(y)}function h(y){return y===null||Fo(y)||Ze(y)||cr(y)||uu(y)?a(y):e.attempt(q1,e.attempt(I1,x),a)(y)}function x(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(y)}}function u_(e,n,a){let l=0;return s;function s(c){return(c===87||c===119)&&l<3?(l++,e.consume(c),s):c===46&&l===3?(e.consume(c),o):a(c)}function o(c){return c===null?a(c):n(c)}}function c_(e,n,a){let l,s,o;return c;function c(h){return h===46||h===95?e.check($1,g,f)(h):h===null||Ze(h)||cr(h)||h!==45&&uu(h)?g(h):(o=!0,e.consume(h),c)}function f(h){return h===95?l=!0:(s=l,l=void 0),e.consume(h),c}function g(h){return s||l||!o?a(h):n(h)}}function d_(e,n){let a=0,l=0;return s;function s(c){return c===40?(a++,e.consume(c),s):c===41&&l<a?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check($1,n,o)(c):c===null||Ze(c)||cr(c)?n(c):(e.consume(c),s)}function o(c){return c===41&&l++,e.consume(c),s}}function f_(e,n,a){return l;function l(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),l):f===38?(e.consume(f),o):f===93?(e.consume(f),s):f===60||f===null||Ze(f)||cr(f)?n(f):a(f)}function s(f){return f===null||f===40||f===91||Ze(f)||cr(f)?n(f):l(f)}function o(f){return zt(f)?c(f):a(f)}function c(f){return f===59?(e.consume(f),l):zt(f)?(e.consume(f),c):a(f)}}function h_(e,n,a){return l;function l(o){return e.consume(o),s}function s(o){return Tt(o)?a(o):n(o)}}function P1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ze(e)}function V1(e){return!zt(e)}function Y1(e){return!(e===47||Qf(e))}function Qf(e){return e===43||e===45||e===46||e===95||Tt(e)}function Dh(e){let n=e.length,a=!1;for(;n--;){const l=e[n][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){a=!0;break}if(l._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const g_={tokenize:S_,partial:!0};function p_(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:b_,continuation:{tokenize:v_},exit:k_}},text:{91:{name:"gfmFootnoteCall",tokenize:x_},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:m_,resolveTo:y_}}}}function m_(e,n,a){const l=this;let s=l.events.length;const o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c;for(;s--;){const g=l.events[s][1];if(g.type==="labelImage"){c=g;break}if(g.type==="gfmFootnoteCall"||g.type==="labelLink"||g.type==="label"||g.type==="image"||g.type==="link")break}return f;function f(g){if(!c||!c._balanced)return a(g);const h=jn(l.sliceSerialize({start:c.end,end:l.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?a(g):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),n(g))}}function y_(e,n){let a=e.length;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[a+1],e[a+2],["enter",l,n],e[a+3],e[a+4],["enter",s,n],["exit",s,n],["enter",o,n],["enter",c,n],["exit",c,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(a,e.length-a+1,...f),e}function x_(e,n,a){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o=0,c;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),g}function g(y){return y!==94?a(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(o>999||y===93&&!c||y===null||y===91||Ze(y))return a(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(jn(l.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):a(y)}return Ze(y)||(c=!0),o++,e.consume(y),y===92?x:h}function x(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}}function b_(e,n,a){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o,c=0,f;return g;function g(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",x):a(S)}function x(S){if(c>999||S===93&&!f||S===null||S===91||Ze(S))return a(S);if(S===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return o=jn(l.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Ze(S)||(f=!0),c++,e.consume(S),S===92?y:x}function y(S){return S===91||S===92||S===93?(e.consume(S),c++,x):x(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(o)||s.push(o),Le(e,v,"gfmFootnoteDefinitionWhitespace")):a(S)}function v(S){return n(S)}}function v_(e,n,a){return e.check(Zi,n,e.attempt(g_,n,a))}function k_(e){e.exit("gfmFootnoteDefinition")}function S_(e,n,a){const l=this;return Le(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=l.events[l.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(o):a(o)}}function w_(e){let a=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:o,resolveAll:s};return a==null&&(a=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function s(c,f){let g=-1;for(;++g<c.length;)if(c[g][0]==="enter"&&c[g][1].type==="strikethroughSequenceTemporary"&&c[g][1]._close){let h=g;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[g][1].end.offset-c[g][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[g][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[g][1].end)},y={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[g][1].start)},b=[["enter",x,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",y,f]],v=f.parser.constructs.insideSpan.null;v&&nn(b,b.length,0,cu(v,c.slice(h+1,g),f)),nn(b,b.length,0,[["exit",y,f],["enter",c[g][1],f],["exit",c[g][1],f],["exit",x,f]]),nn(c,h-1,g-h+3,b),g=h+b.length-2;break}}for(g=-1;++g<c.length;)c[g][1].type==="strikethroughSequenceTemporary"&&(c[g][1].type="data");return c}function o(c,f,g){const h=this.previous,x=this.events;let y=0;return b;function b(S){return h===126&&x[x.length-1][1].type!=="characterEscape"?g(S):(c.enter("strikethroughSequenceTemporary"),v(S))}function v(S){const C=fl(h);if(S===126)return y>1?g(S):(c.consume(S),y++,v);if(y<2&&!a)return g(S);const E=c.exit("strikethroughSequenceTemporary"),j=fl(S);return E._open=!j||j===2&&!!C,E._close=!C||C===2&&!!j,f(S)}}}class j_{constructor(){this.map=[]}add(n,a,l){C_(this,n,a,l)}consume(n){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let a=this.map.length;const l=[];for(;a>0;)a-=1,l.push(n.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),n.length=this.map[a][0];l.push(n.slice()),n.length=0;let s=l.pop();for(;s;){for(const o of s)n.push(o);s=l.pop()}this.map.length=0}}function C_(e,n,a,l){let s=0;if(!(a===0&&l.length===0)){for(;s<e.map.length;){if(e.map[s][0]===n){e.map[s][1]+=a,e.map[s][2].push(...l);return}s+=1}e.map.push([n,a,l])}}function N_(e,n){let a=!1;const l=[];for(;n<e.length;){const s=e[n];if(a){if(s[0]==="enter")s[1].type==="tableContent"&&l.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=l.length-1;l[o]=l[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(a=!0);n+=1}return l}function E_(){return{flow:{null:{name:"table",tokenize:A_,resolveAll:T_}}}}function A_(e,n,a){const l=this;let s=0,o=0,c;return f;function f(R){let ae=l.events.length-1;for(;ae>-1;){const ne=l.events[ae][1].type;if(ne==="lineEnding"||ne==="linePrefix")ae--;else break}const F=ae>-1?l.events[ae][1].type:null,ie=F==="tableHead"||F==="tableRow"?L:g;return ie===L&&l.parser.lazy[l.now().line]?a(R):ie(R)}function g(R){return e.enter("tableHead"),e.enter("tableRow"),h(R)}function h(R){return R===124||(c=!0,o+=1),x(R)}function x(R){return R===null?a(R):ye(R)?o>1?(o=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):a(R):_e(R)?Le(e,x,"whitespace")(R):(o+=1,c&&(c=!1,s+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),c=!0,x):(e.enter("data"),y(R)))}function y(R){return R===null||R===124||Ze(R)?(e.exit("data"),x(R)):(e.consume(R),R===92?b:y)}function b(R){return R===92||R===124?(e.consume(R),y):y(R)}function v(R){return l.interrupt=!1,l.parser.lazy[l.now().line]?a(R):(e.enter("tableDelimiterRow"),c=!1,_e(R)?Le(e,S,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):S(R))}function S(R){return R===45||R===58?E(R):R===124?(c=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),C):H(R)}function C(R){return _e(R)?Le(e,E,"whitespace")(R):E(R)}function E(R){return R===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),j):R===45?(o+=1,j(R)):R===null||ye(R)?Y(R):H(R)}function j(R){return R===45?(e.enter("tableDelimiterFiller"),z(R)):H(R)}function z(R){return R===45?(e.consume(R),z):R===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(R))}function D(R){return _e(R)?Le(e,Y,"whitespace")(R):Y(R)}function Y(R){return R===124?S(R):R===null||ye(R)?!c||s!==o?H(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):H(R)}function H(R){return a(R)}function L(R){return e.enter("tableRow"),P(R)}function P(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),P):R===null||ye(R)?(e.exit("tableRow"),n(R)):_e(R)?Le(e,P,"whitespace")(R):(e.enter("data"),ee(R))}function ee(R){return R===null||R===124||Ze(R)?(e.exit("data"),P(R)):(e.consume(R),R===92?G:ee)}function G(R){return R===92||R===124?(e.consume(R),ee):ee(R)}}function T_(e,n){let a=-1,l=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,g=0,h,x,y;const b=new j_;for(;++a<e.length;){const v=e[a],S=v[1];v[0]==="enter"?S.type==="tableHead"?(f=!1,g!==0&&(Ax(b,n,g,h,x),x=void 0,g=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(a,0,[["enter",h,n]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(l=!0,y=void 0,o=[0,0,0,0],c=[0,a+1,0,0],f&&(f=!1,x={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(a,0,[["enter",x,n]])),s=S.type==="tableDelimiterRow"?2:x?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(l=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],y=No(b,n,o,s,void 0,y),o=[0,0,0,0]),c[2]=a)):S.type==="tableCellDivider"&&(l?l=!1:(o[1]!==0&&(c[0]=c[1],y=No(b,n,o,s,void 0,y)),o=c,c=[o[1],a,0,0])):S.type==="tableHead"?(f=!0,g=a):S.type==="tableRow"||S.type==="tableDelimiterRow"?(g=a,o[1]!==0?(c[0]=c[1],y=No(b,n,o,s,a,y)):c[1]!==0&&(y=No(b,n,c,s,a,y)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=a)}for(g!==0&&Ax(b,n,g,h,x),b.consume(n.events),a=-1;++a<n.events.length;){const v=n.events[a];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=N_(n.events,a))}return e}function No(e,n,a,l,s,o){const c=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";a[0]!==0&&(o.end=Object.assign({},ol(n.events,a[0])),e.add(a[0],0,[["exit",o,n]]));const g=ol(n.events,a[1]);if(o={type:c,start:Object.assign({},g),end:Object.assign({},g)},e.add(a[1],0,[["enter",o,n]]),a[2]!==0){const h=ol(n.events,a[2]),x=ol(n.events,a[3]),y={type:f,start:Object.assign({},h),end:Object.assign({},x)};if(e.add(a[2],0,[["enter",y,n]]),l!==2){const b=n.events[a[2]],v=n.events[a[3]];if(b[1].end=Object.assign({},v[1].end),b[1].type="chunkText",b[1].contentType="text",a[3]>a[2]+1){const S=a[2]+1,C=a[3]-a[2]-1;e.add(S,C,[])}}e.add(a[3]+1,0,[["exit",y,n]])}return s!==void 0&&(o.end=Object.assign({},ol(n.events,s)),e.add(s,0,[["exit",o,n]]),o=void 0),o}function Ax(e,n,a,l,s){const o=[],c=ol(n.events,a);s&&(s.end=Object.assign({},c),o.push(["exit",s,n])),l.end=Object.assign({},c),o.push(["exit",l,n]),e.add(a+1,0,o)}function ol(e,n){const a=e[n],l=a[0]==="enter"?"start":"end";return a[1][l]}const __={name:"tasklistCheck",tokenize:M_};function D_(){return{text:{91:__}}}function M_(e,n,a){const l=this;return s;function s(g){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?a(g):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(g),e.exit("taskListCheckMarker"),o)}function o(g){return Ze(g)?(e.enter("taskListCheckValueUnchecked"),e.consume(g),e.exit("taskListCheckValueUnchecked"),c):g===88||g===120?(e.enter("taskListCheckValueChecked"),e.consume(g),e.exit("taskListCheckValueChecked"),c):a(g)}function c(g){return g===93?(e.enter("taskListCheckMarker"),e.consume(g),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):a(g)}function f(g){return ye(g)?n(g):_e(g)?e.check({tokenize:R_},n,a)(g):a(g)}}function R_(e,n,a){return Le(e,l,"whitespace");function l(s){return s===null?a(s):n(s)}}function O_(e){return r1([l_(),p_(),w_(e),E_(),D_()])}const z_={};function L_(e){const n=this,a=e||z_,l=n.data(),s=l.micromarkExtensions||(l.micromarkExtensions=[]),o=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),c=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);s.push(O_(a)),o.push(t_()),c.push(n_(a))}const G1=N.memo(function({content:n}){return d.jsx("div",{className:"prose prose-sm max-w-none break-words dark:prose-invert prose-p:my-1 prose-pre:my-2 prose-ul:my-1 prose-ol:my-1 prose-li:my-0",children:d.jsx(Ah,{remarkPlugins:[L_],components:{pre:({children:a,...l})=>d.jsx("pre",{className:"overflow-x-auto rounded bg-gray-100 p-2 text-xs dark:bg-gray-800",...l,children:a}),code:({children:a,className:l,...s})=>l?d.jsx("code",{className:l,...s,children:a}):d.jsx("code",{className:"rounded bg-gray-100 px-1 py-0.5 text-xs dark:bg-gray-800",...s,children:a}),a:({children:a,...l})=>d.jsx("a",{className:"text-blue-600 underline dark:text-blue-400",target:"_blank",rel:"noopener noreferrer",...l,children:a})},children:n})})});function Q1(){return d.jsx("span",{className:"ml-0.5 inline-block h-4 w-1.5 animate-pulse rounded-sm bg-blue-500 align-middle"})}const U_=N.memo(function({message:n}){const a=n.role==="user";return d.jsx("div",{className:`flex ${a?"justify-end":"justify-start"} mb-3`,children:d.jsx("div",{className:`max-w-[80%] rounded-lg px-3 py-2 text-sm ${a?"bg-blue-600 text-white":"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-gray-100"}`,children:a?d.jsx("p",{className:"whitespace-pre-wrap",children:n.content}):d.jsxs(d.Fragment,{children:[d.jsx(G1,{content:n.content}),n.isStreaming&&d.jsx(Q1,{})]})})})});function H_(e){if(!e)return"";const n=e.content;return typeof n=="string"?n:Array.isArray(n)?n.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
|
|
399
|
-
`):""}function B_({height:e,onHeightChange:n}){const{t:a}=oe("chat"),l=Et(D=>D.dockExpanded),s=Et(D=>D.messages),o=Et(D=>D.isStreaming),c=Et(D=>D.streamingMessage),f=N.useRef(null),[g,h]=N.useState(!0),[x,y]=N.useState(!1),b=N.useRef(0),v=N.useRef(0),S=H_(c);N.useEffect(()=>{g&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[s,S,g]);const C=N.useCallback(()=>{if(!f.current)return;const{scrollTop:D,scrollHeight:Y,clientHeight:H}=f.current,L=Y-D-H<40;h(L)},[]),E=N.useCallback(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight,h(!0))},[]),j=N.useCallback(D=>{D.preventDefault(),y(!0),b.current=D.clientY,v.current=e},[e]);if(N.useEffect(()=>{if(!x)return;const D=H=>{const L=b.current-H.clientY,P=Math.max(150,Math.min(window.innerHeight*.4,v.current+L));n(P)},Y=()=>{y(!1)};return document.addEventListener("mousemove",D),document.addEventListener("mouseup",Y),()=>{document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",Y)}},[x,n]),!l)return null;const z=[...s];return d.jsxs("div",{className:"flex flex-col border-t border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",style:{height:`${e}px`,transition:x?"none":"height 200ms ease-out"},children:[d.jsx("div",{className:"flex h-3 cursor-ns-resize items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800",onMouseDown:j,children:d.jsx("div",{className:"h-0.5 w-8 rounded-full bg-gray-300 dark:bg-gray-600"})}),d.jsx("div",{ref:f,onScroll:C,className:"flex-1 overflow-y-auto px-4 py-2",children:z.length===0&&!o?d.jsx("div",{className:"flex h-full items-center justify-center text-sm text-gray-400",children:a("dock.startNewChat")}):d.jsxs(d.Fragment,{children:[z.map(D=>d.jsx(U_,{message:D},D.id)),o&&S&&d.jsx("div",{className:"mb-3 flex justify-start",children:d.jsxs("div",{className:"max-w-[80%] rounded-lg bg-gray-100 px-3 py-2 text-sm text-gray-900 dark:bg-gray-800 dark:text-gray-100",children:[d.jsx(G1,{content:S}),d.jsx(Q1,{})]})}),o&&!S&&d.jsx("div",{className:"mb-3 flex justify-start",children:d.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-gray-100 px-3 py-2 text-sm text-gray-400 dark:bg-gray-800",children:[d.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"}),d.jsx("span",{children:a("dock.thinkingStatus")})]})})]})}),!g&&d.jsx("button",{type:"button",onClick:E,className:"absolute bottom-14 right-6 z-10 flex h-8 w-8 items-center justify-center rounded-full border border-gray-200 bg-white shadow-md hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",children:d.jsx(KC,{className:"h-4 w-4 text-gray-500"})})]})}const hl=["#ef4444","#f97316","#f59e0b","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#ec4899"];function Mh(e){let n=0;for(let a=0;a<e.length;a++){const l=e.charCodeAt(a);n=(n<<5)-n+l|0}return Math.abs(n)}function q_(e){const n=parseInt(e.slice(1,3),16)/255,a=parseInt(e.slice(3,5),16)/255,l=parseInt(e.slice(5,7),16)/255;return .299*n+.587*a+.114*l}function I_(e,n){const a=Mh(e),l=hl[a%hl.length],s=q_(l)>.5?"#000000":"#ffffff",c=(n??e).charAt(0).toUpperCase()||"?";return{backgroundColor:l,textColor:s,initial:c}}function KR(e){const n=Mh(e);return hl[n%hl.length]}const Tx=["round","square","oval"],_x=["short","spiky","side-part","curly","buzz"],Dx=["dot","line","wide"],Mx=["#fde2c8","#f5c5a0","#d4956b","#a0714f","#6b4226","#ffe0bd"],Rx=["#2c1b0e","#5a3214","#c2884a","#e8c068"];function X1(e){const n=Mh(e),a=(l,s)=>(n>>>l)%s;return{faceShape:Tx[a(0,Tx.length)],hairStyle:_x[a(3,_x.length)],eyeStyle:Dx[a(6,Dx.length)],skinColor:Mx[a(8,Mx.length)],hairColor:Rx[a(11,Rx.length)],shirtColor:hl[n%hl.length]}}function $_({shape:e,color:n}){switch(e){case"round":return d.jsx("circle",{cx:"24",cy:"20",r:"12",fill:n});case"square":return d.jsx("rect",{x:"12",y:"8",width:"24",height:"24",rx:"4",fill:n});case"oval":return d.jsx("ellipse",{cx:"24",cy:"20",rx:"11",ry:"14",fill:n})}}function F_({style:e,color:n}){switch(e){case"short":return d.jsx("path",{d:"M12 16 Q12 6 24 6 Q36 6 36 16 L36 12 Q36 4 24 4 Q12 4 12 12 Z",fill:n});case"spiky":return d.jsx("path",{d:"M14 14 L16 4 L20 12 L24 2 L28 12 L32 4 L34 14 Q34 6 24 6 Q14 6 14 14 Z",fill:n});case"side-part":return d.jsx("path",{d:"M12 16 Q12 5 24 5 Q36 5 36 16 L36 11 Q36 3 24 3 Q14 3 10 10 Z",fill:n});case"curly":return d.jsx("path",{d:"M12 18 Q10 8 16 5 Q20 2 24 4 Q28 2 32 5 Q38 8 36 18 L36 12 Q36 4 24 4 Q12 4 12 12 Z",fill:n});case"buzz":return d.jsx("path",{d:"M13 15 Q13 6 24 6 Q35 6 35 15 L35 13 Q35 5 24 5 Q13 5 13 13 Z",fill:n})}}function K_({style:e}){switch(e){case"dot":return d.jsxs(d.Fragment,{children:[d.jsx("circle",{cx:"19",cy:"19",r:"1.5",fill:"#333"}),d.jsx("circle",{cx:"29",cy:"19",r:"1.5",fill:"#333"})]});case"line":return d.jsxs(d.Fragment,{children:[d.jsx("line",{x1:"17",y1:"19",x2:"21",y2:"19",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round"}),d.jsx("line",{x1:"27",y1:"19",x2:"31",y2:"19",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round"})]});case"wide":return d.jsxs(d.Fragment,{children:[d.jsx("ellipse",{cx:"19",cy:"19",rx:"2.5",ry:"2",fill:"white"}),d.jsx("circle",{cx:"19",cy:"19",r:"1.2",fill:"#333"}),d.jsx("ellipse",{cx:"29",cy:"19",rx:"2.5",ry:"2",fill:"white"}),d.jsx("circle",{cx:"29",cy:"19",r:"1.2",fill:"#333"})]})}}function Z1({agentId:e,size:n=40,className:a}){const l=X1(e);return d.jsxs("svg",{viewBox:"0 0 48 48",width:n,height:n,className:a,style:{borderRadius:"50%",overflow:"hidden"},children:[d.jsx("rect",{width:"48",height:"48",fill:l.shirtColor,rx:"24"}),d.jsx("path",{d:"M8 42 Q8 34 24 34 Q40 34 40 42 L40 48 L8 48 Z",fill:l.shirtColor}),d.jsx($_,{shape:l.faceShape,color:l.skinColor}),d.jsx(F_,{style:l.hairStyle,color:l.hairColor}),d.jsx(K_,{style:l.eyeStyle}),d.jsx("path",{d:"M21 24 Q24 26 27 24",stroke:"#333",strokeWidth:"0.8",fill:"none",strokeLinecap:"round"})]})}function P_(){const{t:e}=oe("panels"),n=he(o=>o.selectedAgentId),a=he(o=>o.agents),l=he(o=>o.selectAgent);if(!n)return null;const s=a.get(n);return s?d.jsxs("div",{className:"px-3 py-2",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(Z1,{agentId:s.id,size:32}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("div",{className:"truncate text-sm font-medium text-gray-800 dark:text-gray-200",children:s.name}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("span",{className:"inline-block h-2 w-2 rounded-full",style:{backgroundColor:Qi[s.status]}}),d.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:e(`common:agent.statusLabels.${s.status}`)})]})]}),d.jsx("button",{onClick:()=>l(null),className:"shrink-0 text-xs text-gray-400 hover:text-gray-600 dark:hover:text-gray-200",title:e("agentDetail.deselect"),children:"✕"})]}),s.currentTool&&d.jsx("div",{className:"mb-2 rounded bg-orange-50 px-2 py-1.5 text-xs dark:bg-orange-950/50",children:d.jsxs("div",{className:"text-orange-600 dark:text-orange-400",children:["🔧 ",s.currentTool.name]})}),s.speechBubble&&d.jsx("div",{className:"mb-2 rounded bg-white px-2 py-1.5 text-xs leading-relaxed text-gray-700 shadow-sm dark:bg-gray-800 dark:text-gray-300",children:d.jsx(Ah,{children:s.speechBubble.text})}),s.toolCallHistory.length>0&&d.jsxs("div",{className:"mt-2",children:[d.jsx("div",{className:"mb-1 text-xs font-medium text-gray-400 dark:text-gray-500",children:e("agentDetail.toolCallHistory")}),s.toolCallHistory.map((o,c)=>d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-100 py-1 text-xs text-gray-500 dark:border-gray-700 dark:text-gray-400",children:[d.jsx("span",{children:o.name}),d.jsx("span",{className:"text-gray-400",children:new Date(o.timestamp).toLocaleTimeString()})]},`${o.name}-${o.timestamp}-${c}`))]})]}):null}const V_={lifecycle:"●",tool:"🔧",assistant:"💬",error:"⚠"};function Y_(){const{t:e}=oe("panels"),n=he(h=>h.eventHistory),a=he(h=>h.selectAgent),l=N.useRef(null),[s,o]=N.useState(!0),c=N.useRef(0),f=n.slice(-50);N.useEffect(()=>{s&&l.current&&n.length>c.current&&(l.current.scrollTop=l.current.scrollHeight),c.current=n.length},[n.length,s]);const g=()=>{if(!l.current)return;const{scrollTop:h,scrollHeight:x,clientHeight:y}=l.current,b=x-h-y<30;o(b)};return d.jsxs("div",{ref:l,onScroll:g,className:"flex-1 overflow-y-auto",children:[!s&&n.length>0&&d.jsx("div",{className:"sticky top-0 z-10 flex justify-end bg-white/80 px-2 py-0.5 backdrop-blur-sm dark:bg-gray-900/80",children:d.jsx("button",{onClick:()=>{o(!0),l.current&&(l.current.scrollTop=l.current.scrollHeight)},className:"rounded bg-blue-600 px-1.5 py-0.5 text-[10px] text-white",children:e("eventTimeline.newEvents")})}),f.map((h,x)=>d.jsxs("button",{onClick:()=>a(h.agentId),className:"flex w-full items-start gap-1.5 border-b border-gray-100 px-3 py-1 text-left text-xs hover:bg-gray-50 dark:border-gray-800 dark:hover:bg-gray-800",children:[d.jsx("span",{className:"mt-0.5 shrink-0 text-gray-400",children:new Date(h.timestamp).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}),d.jsx("span",{className:"shrink-0",children:V_[h.stream]??"·"}),d.jsx("span",{className:"shrink-0 font-medium",style:{color:Qi[h.stream==="error"?"error":"thinking"]},children:h.agentName}),d.jsx("span",{className:"min-w-0 truncate text-gray-500 dark:text-gray-400",children:h.summary})]},`${h.timestamp}-${h.agentId}-${x}`)),f.length===0&&d.jsx("div",{className:"py-3 text-center text-xs text-gray-400 dark:text-gray-500",children:e("common:empty.noEvents")})]})}const G_=N.lazy(()=>Ha(()=>import("./TokenLineChart-CoV2eBb4.js"),__vite__mapDeps([0,1])).then(e=>({default:e.TokenLineChart}))),Q_=N.lazy(()=>Ha(()=>import("./CostPieChart-DAWcMLAM.js"),__vite__mapDeps([2,1])).then(e=>({default:e.CostPieChart}))),X_=N.lazy(()=>Ha(()=>import("./NetworkGraph-C7bId4Qo.js"),[]).then(e=>({default:e.NetworkGraph}))),Z_=N.lazy(()=>Ha(()=>import("./ActivityHeatmap-BBam6E0n.js"),[]).then(e=>({default:e.ActivityHeatmap})));function Eo(){return d.jsx("div",{className:"flex min-h-[140px] items-center justify-center",children:d.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"})})}function J_(){const{t:e}=oe("panels"),[n,a]=N.useState("overview"),l=he(c=>c.globalMetrics),s=[{id:"overview",label:e("metrics.tabs.overview")},{id:"trend",label:e("metrics.tabs.trend")},{id:"topology",label:e("metrics.tabs.topology")},{id:"activity",label:e("metrics.tabs.activity")}],o=[{label:e("metrics.activeAgents"),value:`${l.activeAgents}/${l.totalAgents}`,color:"#3b82f6"},{label:e("metrics.totalTokens"),value:W_(l.totalTokens),color:"#22c55e"},{label:e("metrics.collaboration"),value:`${Math.round(l.collaborationHeat)}%`,color:"#f97316"},{label:e("metrics.tokenRate"),value:`${l.tokenRate.toFixed(0)}${e("metrics.tokenRateUnit")}`,color:"#a855f7"}];return d.jsxs("div",{className:"flex flex-col",children:[d.jsx("div",{className:"grid grid-cols-4 gap-1 p-2",children:o.map(c=>d.jsxs("div",{className:"rounded-lg bg-gray-50 px-1 py-1 text-center dark:bg-gray-800",children:[d.jsx("div",{className:"text-xs font-bold leading-tight",style:{color:c.color},children:c.value}),d.jsx("div",{className:"text-[8px] text-gray-500 dark:text-gray-400",children:c.label})]},c.label))}),d.jsx("div",{className:"flex gap-1 border-t border-gray-100 px-2 py-1 dark:border-gray-800",children:s.map(c=>d.jsx("button",{type:"button",onClick:()=>a(c.id),className:`rounded px-2 py-0.5 text-[10px] ${n===c.id?"bg-gray-200 font-medium dark:bg-gray-700 dark:text-gray-200":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800"}`,children:c.label},c.id))}),d.jsxs("div",{className:"p-2",children:[n==="overview"&&d.jsx(N.Suspense,{fallback:d.jsx(Eo,{}),children:d.jsx(Q_,{})}),n==="trend"&&d.jsx(N.Suspense,{fallback:d.jsx(Eo,{}),children:d.jsx(G_,{})}),n==="topology"&&d.jsx(N.Suspense,{fallback:d.jsx(Eo,{}),children:d.jsx(X_,{})}),n==="activity"&&d.jsx(N.Suspense,{fallback:d.jsx(Eo,{}),children:d.jsx(Z_,{})})]})]})}function W_(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function eD({agentId:e,agentName:n,size:a=32}){const{backgroundColor:l,textColor:s,initial:o}=I_(e,n);return d.jsx("div",{className:"flex shrink-0 items-center justify-center rounded-full font-bold",style:{width:a,height:a,backgroundColor:l,color:s,fontSize:a*.45},children:o})}function tD(){const{t:e}=oe(),n=he(s=>s.agents),a=he(s=>s.selectAgent),l=Array.from(n.values()).filter(s=>s.isSubAgent);return l.length===0?d.jsx("div",{className:"py-2 text-center text-xs text-gray-400 dark:text-gray-500",children:e("empty.noSubAgents")}):d.jsx("div",{children:l.map(s=>{const o=s.parentAgentId?n.get(s.parentAgentId):null,c=nD(s.lastActiveAt,e);return d.jsxs("button",{onClick:()=>a(s.id),className:"flex w-full items-start gap-2 border-b border-gray-50 px-3 py-2 text-left transition-colors hover:bg-blue-50 dark:border-gray-800 dark:hover:bg-blue-950",children:[d.jsx(eD,{agentId:s.id,agentName:s.name,size:24}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"truncate text-xs font-medium text-gray-800 dark:text-gray-200",children:s.name}),d.jsx("span",{className:"inline-flex items-center rounded px-1 py-0.5 text-[9px] font-medium text-white",style:{backgroundColor:Qi[s.status]},children:e(`agent.statusLabels.${s.status}`)})]}),o&&d.jsxs("span",{role:"link",tabIndex:0,onClick:f=>{f.stopPropagation(),a(o.id)},onKeyDown:f=>{f.key==="Enter"&&(f.stopPropagation(),a(o.id))},className:"cursor-pointer text-[10px] text-blue-500 hover:underline",children:["← ",o.name]}),s.speechBubble&&d.jsx("div",{className:"mt-0.5 truncate text-[10px] text-gray-400",children:s.speechBubble.text.slice(0,80)}),d.jsx("div",{className:"text-[10px] text-gray-400",children:c})]})]},s.id)})})}function nD(e,n){const a=Math.max(0,Math.floor((Date.now()-e)/1e3));if(a<60)return n("time.running",{seconds:a});const l=Math.floor(a/60),s=a%60;return n("time.runningMinutes",{minutes:l,seconds:s})}function bi({title:e,collapsed:n,onToggle:a,height:l,onHeightChange:s,minHeight:o=60,maxHeight:c=600,headerExtra:f,children:g,flex:h=!1,badge:x}){const y=N.useRef(null),b=N.useRef(null),v=n?0:l??o,S=N.useCallback(C=>{var D;if(n)return;C.preventDefault();const E=((D=y.current)==null?void 0:D.offsetHeight)??v;b.current={startY:C.clientY,startHeight:E};const j=Y=>{if(!b.current)return;const H=Y.clientY-b.current.startY,L=Math.max(o,Math.min(c,b.current.startHeight+H));s(L)},z=()=>{b.current=null,document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",z),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="ns-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",j),document.addEventListener("mouseup",z)},[n,v,o,c,s]);return N.useEffect(()=>()=>{document.body.style.cursor="",document.body.style.userSelect=""},[]),d.jsxs("div",{className:`flex flex-col ${h&&!n?"min-h-0 flex-1":""}`,style:!n&&!h?{flexShrink:0}:void 0,children:[d.jsxs("button",{type:"button",onClick:a,className:"flex h-6 w-full items-center gap-1 border-b border-gray-200 bg-gray-50 px-2 text-[11px] font-semibold uppercase tracking-wide text-gray-600 hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800/70 dark:text-gray-400 dark:hover:bg-gray-800",children:[d.jsx("span",{className:"inline-block text-[9px] transition-transform duration-150",style:{transform:n?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),d.jsx("span",{className:"select-none",children:e}),x!==void 0&&d.jsx("span",{className:"ml-1 rounded-sm bg-gray-200 px-1 text-[10px] font-normal text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:x}),f&&d.jsx("span",{className:"ml-auto flex items-center",onClick:C=>C.stopPropagation(),children:f})]}),!n&&d.jsx("div",{ref:y,className:`overflow-y-auto overflow-x-hidden ${h?"min-h-0 flex-1":""}`,style:h?{minHeight:o}:{height:v},children:g}),!n&&d.jsx("div",{onMouseDown:S,className:"group relative z-10 h-1 shrink-0 cursor-ns-resize",children:d.jsx("div",{className:"absolute inset-x-0 -top-0.5 bottom-0 transition-colors group-hover:bg-blue-500/30 group-active:bg-blue-500/50"})})]})}const J1="openclaw-sidebar-layout",Ox={metrics:{collapsed:!0,height:null},agents:{collapsed:!1,height:null},subAgents:{collapsed:!1,height:null},detail:{collapsed:!1,height:null},timeline:{collapsed:!1,height:null}};function aD(){try{const e=localStorage.getItem(J1);if(e){const n=JSON.parse(e);return{...Ox,...n}}}catch{}return{...Ox}}function rD(e){try{localStorage.setItem(J1,JSON.stringify(e))}catch{}}function lD(){const[e,n]=N.useState(aD),a=N.useRef(e);a.current=e,N.useEffect(()=>{rD(e)},[e]);const l=N.useCallback(c=>{n(f=>{var g;return{...f,[c]:{...f[c],collapsed:!((g=f[c])!=null&&g.collapsed)}}})},[]),s=N.useCallback((c,f)=>{n(g=>({...g,[c]:{...g[c],height:f}}))},[]),o=N.useCallback(c=>e[c]??{collapsed:!1,height:null},[e]);return{layout:e,toggleSection:l,setSectionHeight:s,getSection:o}}function zx(){const{t:e}=oe("layout"),n=he(H=>H.agents),a=he(H=>H.selectedAgentId),l=he(H=>H.selectAgent),s=he(H=>H.sidebarCollapsed),o=he(H=>H.setSidebarCollapsed),{getSection:c,toggleSection:f,setSectionHeight:g}=lD(),[h,x]=N.useState(""),[y,b]=N.useState("all"),v=N.useMemo(()=>{let H=Array.from(n.values());if(h){const L=h.toLowerCase();H=H.filter(P=>P.name.toLowerCase().includes(L))}return y==="active"?H=H.filter(L=>L.status!=="idle"&&L.status!=="offline"):y==="idle"?H=H.filter(L=>L.status==="idle"):y==="error"&&(H=H.filter(L=>L.status==="error")),H},[n,h,y]),S=N.useMemo(()=>Array.from(n.values()).filter(H=>H.isSubAgent),[n]),C=[{key:"all",label:e("sidebar.filters.all")},{key:"active",label:e("sidebar.filters.active")},{key:"idle",label:e("sidebar.filters.idle")},{key:"error",label:e("sidebar.filters.error")}];if(s)return d.jsx("aside",{className:"flex w-12 flex-col items-center border-l border-gray-200 bg-white py-3 dark:border-gray-700 dark:bg-gray-900",children:d.jsx("button",{onClick:()=>o(!1),className:"text-gray-400 hover:text-gray-700 dark:hover:text-gray-200",title:e("sidebar.expand"),children:"◀"})});const E=c("metrics"),j=c("agents"),z=c("subAgents"),D=c("detail"),Y=c("timeline");return d.jsxs("aside",{className:"flex w-80 flex-col border-l border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[d.jsxs("div",{className:"flex h-8 shrink-0 items-center justify-between border-b border-gray-200 px-3 dark:border-gray-700",children:[d.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400",children:e("sidebar.agents")}),d.jsx("button",{onClick:()=>o(!0),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-200",title:e("sidebar.collapse"),children:"▶"})]}),d.jsx(bi,{id:"metrics",title:e("sidebar.metricsTitle"),collapsed:E.collapsed,onToggle:()=>f("metrics"),height:E.height,onHeightChange:H=>g("metrics",H),minHeight:120,maxHeight:400,children:d.jsx(J_,{})}),d.jsxs(bi,{id:"agents",title:e("sidebar.agentList"),collapsed:j.collapsed,onToggle:()=>f("agents"),height:j.height,onHeightChange:H=>g("agents",H),minHeight:100,maxHeight:600,flex:!0,badge:v.length,headerExtra:d.jsx(iD,{filter:y,filterTags:C}),children:[d.jsxs("div",{className:"border-b border-gray-100 px-3 py-1.5 dark:border-gray-800",children:[d.jsx("input",{type:"text",placeholder:e("sidebar.searchPlaceholder"),value:h,onChange:H=>x(H.target.value),className:"w-full rounded border border-gray-200 bg-gray-50 px-2 py-1 text-sm text-gray-800 placeholder-gray-400 outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-400 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:placeholder-gray-500"}),d.jsx("div",{className:"mt-1.5 flex gap-1",children:C.map(H=>d.jsx("button",{onClick:()=>b(H.key),className:`rounded px-2 py-0.5 text-xs transition-colors ${y===H.key?"bg-blue-600 text-white":"bg-gray-100 text-gray-500 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700"}`,children:H.label},H.key))})]}),d.jsxs("div",{children:[v.map(H=>d.jsxs("button",{onClick:()=>l(H.id),className:`flex w-full items-center gap-3 border-b border-gray-50 px-3 py-2 text-left transition-colors hover:bg-gray-50 dark:border-gray-800 dark:hover:bg-gray-800 ${a===H.id?"bg-blue-50 dark:bg-blue-950":""}`,children:[d.jsx(Z1,{agentId:H.id,size:24}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("div",{className:"truncate text-xs font-medium text-gray-800 dark:text-gray-200",children:H.name}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full",style:{backgroundColor:Qi[H.status]}}),d.jsx("span",{className:"text-[10px] text-gray-500 dark:text-gray-400",children:e(`common:agent.statusLabels.${H.status}`)}),d.jsxs("span",{className:"text-[10px] text-gray-400 dark:text-gray-500",children:["· ",sD(e,H.lastActiveAt)]})]})]})]},H.id)),v.length===0&&d.jsx("div",{className:"px-3 py-4 text-center text-xs text-gray-400 dark:text-gray-500",children:e("common:empty.noMatchingAgents")})]})]}),S.length>0&&d.jsx(bi,{id:"subAgents",title:e("sidebar.subAgents"),collapsed:z.collapsed,onToggle:()=>f("subAgents"),height:z.height,onHeightChange:H=>g("subAgents",H),minHeight:60,maxHeight:300,badge:S.length,children:d.jsx(tD,{})}),a&&d.jsx(bi,{id:"detail",title:e("sidebar.agentDetail"),collapsed:D.collapsed,onToggle:()=>f("detail"),height:D.height,onHeightChange:H=>g("detail",H),minHeight:80,maxHeight:400,children:d.jsx(P_,{})}),d.jsx(bi,{id:"timeline",title:e("sidebar.eventTimeline"),collapsed:Y.collapsed,onToggle:()=>f("timeline"),height:Y.height,onHeightChange:H=>g("timeline",H),minHeight:60,maxHeight:400,children:d.jsx(Y_,{})})]})}function iD({filter:e,filterTags:n}){var l;if(e==="all")return null;const a=((l=n.find(s=>s.key===e))==null?void 0:l.label)??e;return d.jsx("span",{className:"rounded bg-blue-100 px-1 text-[9px] text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",children:a})}function sD(e,n){const a=Math.max(0,Math.floor((Date.now()-n)/1e3));return a<5?e("common:time.justNow"):a<60?e("common:time.secondsAgo",{count:a}):a<3600?e("common:time.minutesAgo",{count:Math.floor(a/60)}):e("common:time.hoursAgo",{count:Math.floor(a/3600)})}function oD(){try{const e=document.createElement("canvas");return(e.getContext("webgl2")??e.getContext("webgl"))!==null}catch{return!1}}function uD(){var c;const{i18n:e,t:n}=oe("layout"),a=(c=e.language)==null?void 0:c.startsWith("zh"),l=a?"中文":"EN",s=n(a?"topbar.language.switchToEn":"topbar.language.switchToZh"),o=()=>{e.changeLanguage(a?"en":"zh")};return d.jsx("button",{onClick:o,"aria-label":s,title:s,className:"ml-1 flex h-7 w-7 items-center justify-center rounded-md text-xs font-semibold transition-colors hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400",children:l})}function cD(e){return{connecting:{color:"#eab308",pulse:!0,label:e("common:status.connecting")},connected:{color:"#22c55e",pulse:!1,label:e("common:status.connected")},reconnecting:{color:"#f97316",pulse:!0,label:e("common:status.reconnecting")},disconnected:{color:"#6b7280",pulse:!1,label:e("common:status.disconnected")},error:{color:"#ef4444",pulse:!1,label:e("common:status.error")}}}function W1({isMobile:e=!1}){const{t:n}=oe("layout"),a=he(v=>v.connectionStatus),l=he(v=>v.connectionError),s=he(v=>v.globalMetrics),o=he(v=>v.viewMode),c=he(v=>v.setViewMode),f=he(v=>v.theme),g=he(v=>v.setTheme),h=he(v=>v.currentPage),x=N.useMemo(()=>oD(),[]),y=cD(n)[a],b=h==="office";return d.jsxs("header",{className:"flex h-12 shrink-0 items-center border-b border-gray-200 bg-white px-4 shadow-sm dark:border-gray-700 dark:bg-gray-900",children:[b?d.jsx(dD,{viewMode:o,setViewMode:c,metrics:s,webglAvailable:x,isMobile:e}):d.jsx(fD,{currentPage:h}),d.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[d.jsx(hD,{currentPage:h}),d.jsx(mD,{theme:f,setTheme:g}),d.jsx(uD,{}),d.jsx(gD,{statusCfg:y,connectionError:l,connectionStatus:a})]})]})}function dD({viewMode:e,setViewMode:n,metrics:a,webglAvailable:l,isMobile:s}){const{t:o}=oe("layout");return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("h1",{className:"text-lg font-semibold tracking-tight text-gray-800 dark:text-gray-100",children:"OpenClaw Office"}),d.jsx("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-xs text-gray-500 dark:bg-gray-800 dark:text-gray-400",children:"v0.1.0"})]}),d.jsx(pD,{viewMode:e,setViewMode:n,webglAvailable:l,isMobile:s}),d.jsxs("div",{className:"mx-8 flex items-center gap-6 text-sm text-gray-500 dark:text-gray-400",children:[d.jsxs("span",{children:[o("topbar.activeCountText")," ",d.jsxs("strong",{className:"text-gray-800 dark:text-gray-200",children:[a.activeAgents,"/",a.totalAgents]})]}),d.jsxs("span",{children:[o("topbar.tokensLabel")," ",d.jsx("strong",{className:"text-gray-800 dark:text-gray-200",children:yD(a.totalTokens)})]})]})]})}function fD({currentPage:e}){const{t:n}=oe("layout");return d.jsx("div",{className:"flex items-center gap-3",children:d.jsx("h1",{className:"text-lg font-semibold text-gray-800 dark:text-gray-100",children:n(`topbar.pageTitles.${e}`,{defaultValue:n("topbar.pageTitles.fallback")})})})}function hD({currentPage:e}){const{t:n}=oe("layout"),a=Pi(),l=e!=="office";return d.jsx("button",{onClick:()=>a(l?"/":"/dashboard"),className:`flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors ${l?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800"}`,children:l?d.jsxs(d.Fragment,{children:[d.jsx(Cb,{className:"h-4 w-4"}),d.jsx("span",{className:"hidden sm:inline",children:n("topbar.office")})]}):d.jsxs(d.Fragment,{children:[d.jsx(SN,{className:"h-4 w-4"}),d.jsx("span",{className:"hidden sm:inline",children:n("topbar.console")})]})})}function gD({statusCfg:e,connectionError:n,connectionStatus:a}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:e.color,animation:e.pulse?"pulse 1.5s ease-in-out infinite":"none"}}),d.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:n&&a==="error"?n:e.label})]})}function pD({viewMode:e,setViewMode:n,webglAvailable:a,isMobile:l}){const{t:s}=oe("layout"),o=[{key:"2d",label:"2D"},{key:"3d",label:"3D"}];return d.jsx("div",{className:"ml-6 flex items-center rounded-md bg-gray-100 p-0.5 dark:bg-gray-800",children:o.map(({key:c,label:f})=>{const g=e===c,h=c==="3d"&&(!a||l),x=h?s(l?"topbar.viewMode.mobileNotSupported":"topbar.viewMode.webglNotSupported"):s("topbar.viewMode.switchTo",{mode:f});return d.jsx("button",{onClick:()=>!h&&n(c),disabled:h,title:x,className:`rounded px-3 py-1 text-xs font-medium transition-colors ${g?"bg-blue-600 text-white shadow-sm":h?"cursor-not-allowed text-gray-300 dark:text-gray-600":"text-gray-500 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"}`,children:f},c)})})}function mD({theme:e,setTheme:n}){const{t:a}=oe("layout");return d.jsx("button",{onClick:()=>n(e==="light"?"dark":"light"),title:a(e==="light"?"topbar.theme.switchToDark":"topbar.theme.switchToLight"),className:"ml-2 flex h-7 w-7 items-center justify-center rounded-md text-base transition-colors hover:bg-gray-200 dark:hover:bg-gray-700",children:e==="light"?"🌙":"☀️"})}function yD(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function xD({children:e,wsClient:n,isMobile:a=!1}){const{t:l}=oe("layout"),s=he(S=>S.sidebarCollapsed),o=he(S=>S.setSidebarCollapsed),c=he(S=>S.chatDockHeight),f=he(S=>S.setChatDockHeight),g=Et(S=>S.initEventListeners),h=Et(S=>S.setTargetAgent),x=he(S=>S.connectionStatus),y=he(S=>S.agents),b=he(S=>S.selectedAgentId);N.useEffect(()=>{a&&o(!0)},[a,o]),N.useEffect(()=>{if(x!=="connected")return;const S=(n==null?void 0:n.current)??null;return S?g(S):void 0},[x,n,g]),N.useEffect(()=>{if(x==="connected"&&y.size>0&&!Et.getState().targetAgentId){const C=Array.from(y.values()).find(E=>!E.isSubAgent);C&&h(C.id)}},[x,y,h]),N.useEffect(()=>{if(!b)return;const S=y.get(b);if(!S||S.isSubAgent)return;Et.getState().targetAgentId!==b&&h(b)},[b,y,h]);const v=e??d.jsx(ob,{});return d.jsxs("div",{className:"flex h-screen w-screen flex-col bg-gray-50 text-gray-900 dark:bg-gray-950 dark:text-gray-100",children:[d.jsx(W1,{isMobile:a}),d.jsxs("div",{className:"relative flex flex-1 overflow-hidden",children:[d.jsxs("main",{className:"relative flex flex-1 flex-col overflow-hidden",children:[d.jsx("div",{className:"relative flex-1 overflow-hidden",children:v}),d.jsx(B_,{height:c,onHeightChange:f}),d.jsx(h3,{})]}),a?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>o(!s),className:"fixed bottom-0 left-1/2 z-20 flex h-10 w-full max-w-xs -translate-x-1/2 items-center justify-center border-t border-gray-200 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-900","aria-label":l(s?"sidebar.expandSidebar":"sidebar.collapseSidebar"),children:d.jsx("div",{className:"h-1 w-12 rounded-full bg-gray-300 dark:bg-gray-600"})}),!s&&d.jsxs(d.Fragment,{children:[d.jsx("div",{role:"button",tabIndex:0,onClick:()=>o(!0),onKeyDown:S=>S.key==="Escape"&&o(!0),className:"fixed inset-0 z-30 bg-black/30","aria-label":l("sidebar.closeSidebar")}),d.jsx("aside",{className:"fixed inset-x-0 bottom-10 top-12 z-40 overflow-hidden rounded-t-xl border-t border-gray-200 bg-white shadow-xl dark:border-gray-700 dark:bg-gray-900",children:d.jsx(zx,{})})]})]}):d.jsx(zx,{})]})]})}function bD(){const{t:e}=oe("layout"),n=Nn(),a=Pi(),l=[{path:"/dashboard",labelKey:"consoleNav.dashboard",icon:mN},{path:"/agents",labelKey:"consoleNav.agents",icon:Nb},{path:"/channels",labelKey:"consoleNav.channels",icon:nu},{path:"/skills",labelKey:"consoleNav.skills",icon:Mb},{path:"/cron",labelKey:"consoleNav.cron",icon:Wo},{path:"/settings",labelKey:"consoleNav.settings",icon:ih}];return d.jsxs("div",{className:"flex h-screen w-screen flex-col bg-gray-50 text-gray-900 dark:bg-gray-950 dark:text-gray-100",children:[d.jsx(W1,{}),d.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[d.jsx("nav",{className:"flex w-52 shrink-0 flex-col border-r border-gray-200 bg-white py-3 dark:border-gray-700 dark:bg-gray-900",children:l.map(s=>{const o=n.pathname===s.path,c=s.icon;return d.jsxs("button",{onClick:()=>a(s.path),className:`mx-2 flex items-center gap-2.5 rounded-md px-3 py-2 text-sm transition-colors ${o?"bg-blue-50 font-medium text-blue-600 dark:bg-blue-900/30 dark:text-blue-400":"text-gray-600 hover:bg-gray-100 hover:text-gray-800 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:[d.jsx(c,{className:"h-4 w-4"}),d.jsx("span",{children:e(s.labelKey)})]},s.path)})}),d.jsx("main",{className:"flex-1 overflow-auto",children:d.jsx("div",{className:"mx-auto max-w-6xl p-6",children:d.jsx(ob,{})})})]})]})}function vD({agent:e}){const[n,a]=N.useState(!0),l=N.useRef(null);if(N.useEffect(()=>{if(e.status!=="speaking"){const x=setTimeout(()=>a(!1),5e3);return()=>clearTimeout(x)}a(!0)},[e.status]),!e.speechBubble||!n)return null;const s=e.position.x/su*100,o=e.position.y/ou*100,c=s<25,f=s>75;let g="-50%",h="center";return c?(g="-10%",h="left"):f&&(g="-90%",h="right"),d.jsxs("div",{ref:l,className:"pointer-events-none absolute",style:{left:`${s}%`,top:`${o}%`,transform:`translate(${g}, -100%) translateY(-52px)`,opacity:e.status==="speaking"?1:0,transition:"opacity 500ms ease",zIndex:20},children:[d.jsx("div",{className:"pointer-events-auto max-h-[200px] w-[260px] max-w-[320px] overflow-y-auto rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm leading-relaxed text-gray-800 shadow-lg dark:border-gray-700 dark:bg-gray-900 dark:text-gray-200",children:d.jsx(Ah,{children:e.speechBubble.text})}),d.jsx("div",{className:"h-0 w-0 border-l-[6px] border-r-[6px] border-t-[8px] border-l-transparent border-r-transparent border-t-gray-200 dark:border-t-gray-700",style:{marginLeft:h==="left"?"16px":"auto",marginRight:h==="right"?"16px":h==="center"?"auto":void 0,...h==="center"?{margin:"0 auto"}:{}}})]})}const ev=N.memo(function({agent:n}){const{t:a}=oe("common"),l=he(C=>C.selectedAgentId),s=he(C=>C.selectAgent),o=he(C=>C.theme),[c,f]=N.useState(!1),g=l===n.id,h=g?wi.selectedRadius:wi.radius,x=Qi[n.status],y=o==="dark",b=X1(n.id),v=`avatar-clip-${n.id}`,S=n.name.length>wi.nameLabelMaxChars?`${n.name.slice(0,wi.nameLabelMaxChars)}…`:n.name;return d.jsxs("g",{transform:`translate(${n.position.x}, ${n.position.y})`,style:{cursor:"pointer",transition:"transform 400ms ease"},onClick:()=>s(n.id),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[g&&d.jsx("circle",{r:h+8,fill:x,opacity:.18,style:{filter:`drop-shadow(0 0 10px ${x})`}}),d.jsx(kD,{status:n.status,r:h,color:x}),d.jsx("defs",{children:d.jsx("clipPath",{id:v,children:d.jsx("circle",{r:h-2})})}),d.jsx("circle",{r:h-2,fill:y?"#1e293b":"#f8fafc"}),d.jsx("g",{clipPath:`url(#${v})`,children:d.jsx(jD,{data:b,size:h*2-4})}),n.isSubAgent&&d.jsxs("g",{transform:`translate(${h*.6}, ${h*.5})`,children:[d.jsx("circle",{r:7,fill:y?"#1e293b":"#fff",stroke:x,strokeWidth:1.2}),d.jsx("text",{textAnchor:"middle",dy:"3.5",fontSize:"9",fill:x,fontWeight:"bold",children:"S"})]}),n.status==="thinking"&&d.jsx(wD,{r:h}),n.status==="error"&&d.jsxs("g",{transform:`translate(${h*.65}, ${-h*.65})`,children:[d.jsx("circle",{r:7,fill:"#ef4444"}),d.jsx("text",{textAnchor:"middle",dy:"4",fontSize:"10",fill:"#fff",fontWeight:"bold",children:"!"})]}),n.status==="speaking"&&d.jsx("g",{transform:`translate(${h*.7}, ${-h*.55})`,children:d.jsx("circle",{r:5,fill:"#a855f7",opacity:.8,children:d.jsx("animate",{attributeName:"r",values:"4;6;4",dur:"1s",repeatCount:"indefinite"})})}),n.status==="tool_calling"&&n.currentTool&&d.jsx("foreignObject",{x:-50,y:h+2,width:100,height:20,style:{pointerEvents:"none"},children:d.jsx("div",{style:{display:"flex",justifyContent:"center"},children:d.jsx("span",{style:{fontSize:"9px",fontWeight:600,color:"#fff",backgroundColor:"#f97316",borderRadius:"4px",padding:"1px 6px",whiteSpace:"nowrap",maxWidth:"90px",overflow:"hidden",textOverflow:"ellipsis"},children:n.currentTool.name})})}),d.jsx("foreignObject",{x:-60,y:h+(n.status==="tool_calling"&&n.currentTool?18:4),width:120,height:22,style:{pointerEvents:"none"},children:d.jsx("div",{style:{display:"flex",justifyContent:"center"},children:d.jsx("span",{title:n.name,style:{fontSize:"11px",fontWeight:500,color:y?"#cbd5e1":"#475569",backgroundColor:y?"rgba(30,41,59,0.7)":"rgba(255,255,255,0.75)",backdropFilter:"blur(6px)",borderRadius:"6px",padding:"1px 8px",whiteSpace:"nowrap",border:`1px solid ${y?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)"}`},children:S})})}),c&&d.jsx("foreignObject",{x:-80,y:-h-38,width:160,height:32,style:{pointerEvents:"none"},children:d.jsx("div",{style:{display:"flex",justifyContent:"center"},children:d.jsxs("span",{style:{fontSize:"11px",fontWeight:500,color:y?"#e2e8f0":"#374151",backgroundColor:y?"rgba(30,41,59,0.85)":"rgba(255,255,255,0.9)",backdropFilter:"blur(8px)",borderRadius:"8px",padding:"4px 10px",whiteSpace:"nowrap",boxShadow:y?"0 4px 8px rgba(0,0,0,0.3)":"0 4px 8px rgba(0,0,0,0.1)",border:`1px solid ${y?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"}`},children:[n.name," · ",a(`agent.statusLabels.${n.status}`)]})})})]})});function kD({status:e,r:n,color:a}){const l=SD(e);return d.jsx("circle",{r:n,fill:"none",stroke:a,strokeWidth:wi.strokeWidth,style:{transition:"stroke 300ms ease",...l}})}function SD(e){switch(e){case"thinking":return{animation:"agent-pulse 1.5s ease-in-out infinite"};case"tool_calling":return{animation:"agent-pulse 2s ease-in-out infinite",strokeDasharray:"6 3"};case"speaking":return{animation:"agent-pulse 1s ease-in-out infinite"};case"error":return{animation:"agent-blink 0.8s ease-in-out infinite"};case"spawning":return{animation:"agent-spawn 0.5s ease-out forwards"};default:return{}}}function wD({r:e}){return d.jsx("g",{transform:`translate(${e*.55}, ${-e*.7})`,children:[0,1,2].map(n=>d.jsx("circle",{cx:n*5,cy:0,r:2,fill:"#3b82f6",style:{animation:`thinking-dots 1.2s ease-in-out ${n*.15}s infinite`}},n))})}function jD({data:e,size:n}){const a=n/2,l=e.faceShape==="round"?a*.8:e.faceShape==="oval"?a*.7:a*.75,s=e.faceShape==="oval"?a*.9:l;return d.jsxs("g",{children:[d.jsx("rect",{x:-a,y:a*.4,width:n,height:a*1.2,fill:e.shirtColor}),d.jsx("ellipse",{cx:0,cy:-a*.05,rx:l,ry:s,fill:e.skinColor}),d.jsx(CD,{style:e.hairStyle,color:e.hairColor,s:a,faceRx:l}),d.jsx(ND,{style:e.eyeStyle,s:a})]})}function CD({style:e,color:n,s:a,faceRx:l}){switch(e){case"short":return d.jsx("ellipse",{cx:0,cy:-a*.55,rx:l*.95,ry:a*.45,fill:n});case"spiky":return d.jsxs("g",{children:[d.jsx("ellipse",{cx:0,cy:-a*.55,rx:l*.9,ry:a*.4,fill:n}),[-.4,-.15,.1,.35].map(s=>d.jsx("polygon",{points:`${s*a*2},-${a*.85} ${s*a*2-3},-${a*.5} ${s*a*2+3},-${a*.5}`,fill:n},s))]});case"side-part":return d.jsxs("g",{children:[d.jsx("ellipse",{cx:-a*.1,cy:-a*.55,rx:l,ry:a*.45,fill:n}),d.jsx("rect",{x:l*.3,y:-a*.9,width:l*.5,height:a*.3,rx:3,fill:n})]});case"curly":return d.jsx("g",{children:[[-.35,-.7],[0,-.78],[.35,-.7],[-.5,-.45],[.5,-.45]].map(([s,o],c)=>d.jsx("circle",{cx:s*a,cy:o*a,r:a*.22,fill:n},c))});case"buzz":return d.jsx("ellipse",{cx:0,cy:-a*.45,rx:l*.85,ry:a*.35,fill:n,opacity:.7});default:return null}}function ND({style:e,s:n}){const a=-n*.08,l=n*.28;switch(e){case"dot":return d.jsxs("g",{children:[d.jsx("circle",{cx:-l,cy:a,r:2,fill:"#333"}),d.jsx("circle",{cx:l,cy:a,r:2,fill:"#333"})]});case"line":return d.jsxs("g",{children:[d.jsx("line",{x1:-l-3,y1:a,x2:-l+3,y2:a,stroke:"#333",strokeWidth:1.5,strokeLinecap:"round"}),d.jsx("line",{x1:l-3,y1:a,x2:l+3,y2:a,stroke:"#333",strokeWidth:1.5,strokeLinecap:"round"})]});case"wide":return d.jsxs("g",{children:[d.jsx("ellipse",{cx:-l,cy:a,rx:3,ry:2.5,fill:"#fff",stroke:"#333",strokeWidth:.8}),d.jsx("circle",{cx:-l,cy:a,r:1.2,fill:"#333"}),d.jsx("ellipse",{cx:l,cy:a,rx:3,ry:2.5,fill:"#fff",stroke:"#333",strokeWidth:.8}),d.jsx("circle",{cx:l,cy:a,r:1.2,fill:"#333"})]});default:return null}}function ED({x1:e,y1:n,x2:a,y2:l,strength:s}){const o=(e+a)/2,c=(n+l)/2,f=a-e,g=l-n,h=Math.sqrt(f*f+g*g),x=Math.min(h*.2,50),y=o-g/h*x,b=c+f/h*x,v=`M ${e} ${n} Q ${y} ${b} ${a} ${l}`,S=s>=.5,C=S?3:1.5,E=Math.max(.2,s);return d.jsxs("g",{children:[d.jsx("path",{d:v,fill:"none",stroke:"#60a5fa",strokeWidth:C+2,opacity:Math.max(.03,s*.15),style:{filter:"blur(3px)"}}),d.jsx("path",{d:v,fill:"none",stroke:"#60a5fa",strokeWidth:C,strokeDasharray:S?"12,6":"6,4",opacity:E,style:{animation:S?"connection-pulse 0.8s linear infinite":"dash-flow 1.5s linear infinite",filter:S?"drop-shadow(0 0 4px rgba(96,165,250,0.8))":void 0}})]})}function AD({zone:e,zoneKey:n}){const{t:a}=oe("common"),o=he(c=>c.theme)==="dark"?"#64748b":"#94a3b8";return d.jsx("text",{x:e.x+14,y:e.y+22,fill:o,fontSize:11,fontWeight:600,fontFamily:"system-ui, sans-serif",letterSpacing:"0.05em",children:a(`zones.${n}`)})}const TD=N.memo(function({x:n,y:a,isDark:l=!1}){const s=l?"#334155":"#dfe5ed",o=l?"#283548":"#c8d0dc",c=l?"#1e293b":"#f1f5f9",f=l?"#475569":"#94a3b8";return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("rect",{x:-50,y:-6,width:100,height:60,rx:6,fill:s,stroke:o,strokeWidth:1}),d.jsx("path",{d:"M -50 54 L -50 60 Q -50 66 -44 66 L 44 66 Q 50 66 50 60 L 50 54",fill:o,opacity:.6}),d.jsx("rect",{x:-20,y:4,width:40,height:26,rx:3,fill:c,stroke:f,strokeWidth:.8}),d.jsx("rect",{x:-16,y:36,width:32,height:12,rx:2,fill:l?"#475569":"#cbd5e1",opacity:.6})]})}),Xf=N.memo(function({x:n,y:a,isDark:l=!1}){const s=l?"#475569":"#94a3b8",o=l?"#334155":"#7c8ba0";return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("path",{d:"M -12 -14 Q 0 -20 12 -14",fill:"none",stroke:o,strokeWidth:4,strokeLinecap:"round"}),d.jsx("circle",{r:14,fill:s,opacity:.85})]})}),_D=N.memo(function({x:n,y:a,radius:l=80,isDark:s=!1}){const o=`mt-grad-${n}-${a}`,c=s?"#334155":"#bfcbda",f=s?"#3d4f66":"#dbe4ef";return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("defs",{children:d.jsxs("radialGradient",{id:o,children:[d.jsx("stop",{offset:"0%",stopColor:f}),d.jsx("stop",{offset:"100%",stopColor:c})]})}),d.jsx("circle",{r:l,fill:`url(#${o})`,stroke:s?"#475569":"#94a3b8",strokeWidth:1.5,style:{filter:"drop-shadow(0 3px 6px rgba(0,0,0,0.10))"}})]})}),Ao=N.memo(function({x:n,y:a,rotation:l=0,isDark:s=!1}){const o=s?"#475569":"#a5b4c8",c=s?"#334155":"#8494a7",f=s?"#5b6b80":"#c8d5e3";return d.jsxs("g",{transform:`translate(${n}, ${a}) rotate(${l})`,children:[d.jsx("rect",{x:-55,y:-22,width:110,height:44,rx:10,fill:c}),d.jsx("rect",{x:-48,y:-16,width:96,height:32,rx:6,fill:o}),d.jsx("circle",{cx:-30,cy:0,r:8,fill:f,opacity:.7}),d.jsx("circle",{cx:30,cy:0,r:8,fill:f,opacity:.7}),d.jsx("rect",{x:-52,y:-25,width:104,height:8,rx:4,fill:c,opacity:.7})]})}),To=N.memo(function({x:n,y:a}){return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("path",{d:"M -8 6 L -10 18 Q -10 22 -6 22 L 6 22 Q 10 22 10 18 L 8 6 Z",fill:"#a07050"}),d.jsx("ellipse",{cx:0,cy:-2,rx:12,ry:10,fill:"#4ade80",opacity:.85}),d.jsx("ellipse",{cx:-6,cy:-8,rx:8,ry:6,fill:"#22c55e",opacity:.7}),d.jsx("ellipse",{cx:6,cy:-6,rx:7,ry:5,fill:"#16a34a",opacity:.6})]})}),Lx=N.memo(function({x:n,y:a}){return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("ellipse",{cx:0,cy:4,rx:9,ry:3,fill:"#d1d5db",opacity:.5}),d.jsx("rect",{x:-5,y:-4,width:10,height:10,rx:2,fill:"#f5f5f4",stroke:"#d1d5db",strokeWidth:.6}),d.jsx("ellipse",{cx:0,cy:-2,rx:4,ry:1.5,fill:"#92400e",opacity:.7}),d.jsx("path",{d:"M 5 -1 Q 9 -1 9 3 Q 9 6 5 6",fill:"none",stroke:"#d1d5db",strokeWidth:1}),d.jsx("path",{d:"M -1 -7 Q 0 -10 1 -7",fill:"none",stroke:"#94a3b8",strokeWidth:.5,opacity:.4})]})}),tv=N.memo(function({x:n,y:a,agent:l}){const s=he(o=>o.theme)==="dark";return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx(TD,{x:0,y:30,isDark:s}),d.jsx(Xf,{x:0,y:-12,isDark:s}),l&&d.jsx(ev,{agent:{...l,position:{x:0,y:-12}}})]})},(e,n)=>{var a,l,s,o;return e.x!==n.x||e.y!==n.y?!1:e.agent===null&&n.agent===null?!0:e.agent===null||n.agent===null?!1:e.agent.id===n.agent.id&&e.agent.status===n.agent.status&&e.agent.name===n.agent.name&&((a=e.agent.currentTool)==null?void 0:a.name)===((l=n.agent.currentTool)==null?void 0:l.name)&&e.agent.isSubAgent===n.agent.isSubAgent&&((s=e.agent.speechBubble)==null?void 0:s.text)===((o=n.agent.speechBubble)==null?void 0:o.text)});function DD(){const e=he(S=>S.agents),n=he(S=>S.links),a=he(S=>S.theme),l=Array.from(e.values()),s=a==="dark",o=s?fh:dh,c=N.useMemo(()=>l.filter(S=>S.zone==="desk"&&!S.isSubAgent),[l]),f=N.useMemo(()=>l.filter(S=>S.zone==="hotDesk"||S.isSubAgent),[l]),g=N.useMemo(()=>l.filter(S=>S.zone==="meeting"),[l]),h=N.useMemo(()=>Ly(ht.desk,c.length,Math.max(c.length,4)),[c.length]),x=N.useMemo(()=>Ly(ht.hotDesk,f.length,Math.max(f.length,2)),[f.length]),y={x:ht.meeting.x+ht.meeting.width/2,y:ht.meeting.y+ht.meeting.height/2},b=Math.min(60+g.length*8,Math.min(ht.meeting.width,ht.meeting.height)/2-40),v=N.useMemo(()=>l3(g.length,y,b+36),[g.length,y.x,y.y,b]);return d.jsxs("div",{className:"relative h-full w-full bg-gray-100 dark:bg-gray-950",children:[d.jsxs("svg",{viewBox:`0 0 ${su} ${ou}`,className:"h-full w-full",preserveAspectRatio:"xMidYMid meet",children:[d.jsxs("defs",{children:[d.jsx("filter",{id:"building-shadow",x:"-3%",y:"-3%",width:"106%",height:"106%",children:d.jsx("feDropShadow",{dx:"0",dy:"3",stdDeviation:"6",floodOpacity:s?.5:.12})}),d.jsxs("pattern",{id:"corridor-tiles",width:"28",height:"28",patternUnits:"userSpaceOnUse",children:[d.jsx("rect",{width:"28",height:"28",fill:o.corridor}),d.jsx("rect",{x:"0.5",y:"0.5",width:"27",height:"27",fill:"none",stroke:s?"#1f2937":"#d5dbe3",strokeWidth:"0.3",rx:"1"})]}),d.jsxs("pattern",{id:"lounge-carpet",width:"6",height:"6",patternUnits:"userSpaceOnUse",children:[d.jsx("rect",{width:"6",height:"6",fill:o.lounge}),d.jsx("circle",{cx:"3",cy:"3",r:"0.5",fill:s?"#2d2540":"#e5e0ed",opacity:"0.4"})]})]}),d.jsx("rect",{x:ue.x,y:ue.y,width:ue.width,height:ue.height,rx:ue.cornerRadius,fill:o.corridor,stroke:o.wall,strokeWidth:ue.wallThickness,filter:"url(#building-shadow)"}),d.jsx(MD,{isDark:s}),Object.entries(ht).map(([S,C])=>d.jsx("rect",{x:C.x,y:C.y,width:C.width,height:C.height,fill:S==="lounge"?"url(#lounge-carpet)":o[S]},`floor-${S}`)),d.jsx(RD,{isDark:s}),d.jsx(OD,{isDark:s}),Object.entries(ht).map(([S,C])=>d.jsx(AD,{zone:C,zoneKey:S},`label-${S}`)),d.jsx(zD,{deskSlots:h,deskAgents:c}),d.jsx(_D,{x:y.x,y:y.y,radius:b,isDark:s}),d.jsx(UD,{seats:v,meetingAgentCount:g.length,isDark:s}),d.jsx(LD,{slots:x,agents:f}),d.jsx(HD,{isDark:s}),d.jsx(BD,{isDark:s}),n.map(S=>{const C=e.get(S.sourceId),E=e.get(S.targetId);return!C||!E?null:d.jsx(ED,{x1:C.position.x,y1:C.position.y,x2:E.position.x,y2:E.position.y,strength:S.strength},`${S.sourceId}-${S.targetId}`)}),g.map((S,C)=>{const E=v[C];return E?d.jsx(ev,{agent:{...S,position:E}},S.id):null})]}),l.filter(S=>S.speechBubble).map(S=>d.jsx(vD,{agent:S},`bubble-${S.id}`))]})}function MD({isDark:e}){const n=ue.corridorWidth,a=ue.x,l=ue.y+(ue.height-n)/2,s=ue.x+(ue.width-n)/2,o=ue.y;return d.jsxs("g",{children:[d.jsx("rect",{x:a,y:l,width:ue.width,height:n,fill:"url(#corridor-tiles)"}),d.jsx("rect",{x:s,y:o,width:n,height:ue.height,fill:"url(#corridor-tiles)"}),d.jsx("line",{x1:a,y1:l+n/2,x2:a+ue.width,y2:l+n/2,stroke:e?"#334155":"#c8d0dc",strokeWidth:.5,strokeDasharray:"8 6",opacity:.6}),d.jsx("line",{x1:s+n/2,y1:o,x2:s+n/2,y2:o+ue.height,stroke:e?"#334155":"#c8d0dc",strokeWidth:.5,strokeDasharray:"8 6",opacity:.6})]})}function RD({isDark:e}){const n=e?"#475569":"#8b9bb0",a=e?"#334155":"#c8d0dc",l=4,s=ue.corridorWidth,o=ue.x+(ue.width-s)/2,c=ue.y+(ue.height-s)/2,f=[{x:o-l/2,y:ue.y,w:l,h:c-ue.y},{x:o-l/2,y:c+s,w:l,h:ue.y+ue.height-c-s},{x:o+s-l/2,y:ue.y,w:l,h:c-ue.y},{x:o+s-l/2,y:c+s,w:l,h:ue.y+ue.height-c-s},{x:ue.x,y:c-l/2,w:o-ue.x,h:l},{x:o+s,y:c-l/2,w:ue.x+ue.width-o-s,h:l},{x:ue.x,y:c+s-l/2,w:o-ue.x,h:l},{x:o+s,y:c+s-l/2,w:ue.x+ue.width-o-s,h:l}];return d.jsx("g",{children:f.map((g,h)=>d.jsx("rect",{x:g.x,y:g.y,width:g.w,height:g.h,fill:a,stroke:n,strokeWidth:.5},`wall-${h}`))})}function OD({isDark:e}){const n=ue.corridorWidth,a=ue.x+(ue.width-n)/2,l=ue.y+(ue.height-n)/2,s=40,o=e?fh.corridor:dh.corridor,c=e?"#64748b":"#94a3b8",f=[{cx:(ue.x+a)/2,cy:l,horizontal:!0},{cx:(a+n+ue.x+ue.width)/2,cy:l,horizontal:!0},{cx:(ue.x+a)/2,cy:l+n,horizontal:!0},{cx:(a+n+ue.x+ue.width)/2,cy:l+n,horizontal:!0},{cx:a,cy:(ue.y+l)/2,horizontal:!1},{cx:a+n,cy:(ue.y+l)/2,horizontal:!1},{cx:a,cy:(l+n+ue.y+ue.height)/2,horizontal:!1},{cx:a+n,cy:(l+n+ue.y+ue.height)/2,horizontal:!1}];return d.jsx("g",{children:f.map((g,h)=>{const x=s/2;return g.horizontal?d.jsxs("g",{children:[d.jsx("rect",{x:g.cx-x,y:g.cy-3,width:s,height:6,fill:o}),d.jsx("path",{d:`M ${g.cx-x} ${g.cy} A ${x} ${x} 0 0 1 ${g.cx+x} ${g.cy}`,fill:"none",stroke:c,strokeWidth:.8,strokeDasharray:"3 2",opacity:.5})]},`door-${h}`):d.jsxs("g",{children:[d.jsx("rect",{x:g.cx-3,y:g.cy-x,width:6,height:s,fill:o}),d.jsx("path",{d:`M ${g.cx} ${g.cy-x} A ${x} ${x} 0 0 1 ${g.cx} ${g.cy+x}`,fill:"none",stroke:c,strokeWidth:.8,strokeDasharray:"3 2",opacity:.5})]},`door-${h}`)})})}function zD({deskSlots:e,deskAgents:n}){const a=N.useMemo(()=>{const l=new Map;for(const s of n){let o=0;for(let g=0;g<s.id.length;g++)o=(o<<5)-o+s.id.charCodeAt(g)|0;let f=Math.abs(o)%e.length;for(;l.has(f);)f=(f+1)%e.length;l.set(f,s)}return l},[n,e.length]);return d.jsx("g",{children:e.map((l,s)=>d.jsx(tv,{x:l.unitX,y:l.unitY,agent:a.get(s)??null},`desk-${s}`))})}function LD({slots:e,agents:n}){return d.jsx("g",{children:e.map((a,l)=>d.jsx(tv,{x:a.unitX,y:a.unitY,agent:n[l]??null},`hotdesk-${l}`))})}function UD({seats:e,meetingAgentCount:n,isDark:a}){const l={x:ht.meeting.x+ht.meeting.width/2,y:ht.meeting.y+ht.meeting.height/2};if(n>0)return d.jsx("g",{children:e.map((c,f)=>d.jsx(Xf,{x:c.x,y:c.y,isDark:a},`mc-${f}`))});const s=6,o=100;return d.jsx("g",{children:Array.from({length:s},(c,f)=>{const g=2*Math.PI*f/s-Math.PI/2;return d.jsx(Xf,{x:Math.round(l.x+Math.cos(g)*o),y:Math.round(l.y+Math.sin(g)*o),isDark:a},`mc-empty-${f}`)})})}function HD({isDark:e}){const n=ht.lounge,a=n.x+n.width/2,l=e?"#334155":"#5a6878",s=e?"#475569":"#8494a7",o=e?"#64748b":"#a5b4c8",c=e?"#94a3b8":"#ffffff",f=e?"#1e293b":"#3b4f6b",g=200,h=36,x=n.y+n.height*.52,y=160,b=24,v=x+h+14;return d.jsxs("g",{children:[d.jsx(Ao,{x:n.x+100,y:n.y+60,rotation:0,isDark:e}),d.jsx(Ao,{x:n.x+280,y:n.y+60,rotation:0,isDark:e}),d.jsx(Ao,{x:n.x+100,y:n.y+140,rotation:180,isDark:e}),d.jsx(Lx,{x:n.x+190,y:n.y+100}),d.jsx(Lx,{x:n.x+100,y:n.y+100}),d.jsx(Ao,{x:n.x+440,y:n.y+100,rotation:90,isDark:e}),d.jsx("rect",{x:a-g/2,y:x,width:g,height:h,rx:4,fill:f}),d.jsx("rect",{x:a-g/2,y:x,width:g,height:3,rx:1.5,fill:e?"#64748b":"#7a9bc0"}),d.jsx("text",{x:a,y:x+h/2+5,textAnchor:"middle",fill:c,fontSize:14,fontWeight:700,fontFamily:"system-ui, sans-serif",letterSpacing:"0.12em",children:"OpenClaw"}),d.jsx("rect",{x:a-y/2,y:v,width:y,height:b,rx:12,fill:s,stroke:l,strokeWidth:1}),d.jsx("rect",{x:a-y/2+4,y:v+3,width:y-8,height:b-6,rx:9,fill:o,opacity:.5}),d.jsx(To,{x:a-g/2-30,y:x+h/2}),d.jsx(To,{x:a+g/2+30,y:x+h/2}),d.jsx(To,{x:n.x+40,y:n.y+n.height-50}),d.jsx(To,{x:n.x+n.width-40,y:n.y+n.height-50})]})}function BD({isDark:e}){const n=ht.lounge,a=n.x+n.width/2,l=ue.y+ue.height,s=70,o=s/2,c=e?fh.lounge:dh.lounge,f=e?"#64748b":"#8b9bb0",g=e?"#374151":"#b0a090",h=e?"#64748b":"#94a3b8";return d.jsxs("g",{children:[d.jsx("rect",{x:a-o-2,y:l-ue.wallThickness-1,width:s+4,height:ue.wallThickness+4,fill:c}),d.jsx("rect",{x:a-o-3,y:l-10,width:3,height:12,rx:1,fill:f}),d.jsx("rect",{x:a+o,y:l-10,width:3,height:12,rx:1,fill:f}),d.jsx("path",{d:`M ${a-o} ${l} A ${o} ${o} 0 0 0 ${a} ${l-o}`,fill:"none",stroke:f,strokeWidth:.8,strokeDasharray:"4 3",opacity:.5}),d.jsx("path",{d:`M ${a+o} ${l} A ${o} ${o} 0 0 1 ${a} ${l-o}`,fill:"none",stroke:f,strokeWidth:.8,strokeDasharray:"4 3",opacity:.5}),d.jsx("rect",{x:a-30,y:l-18,width:60,height:12,rx:3,fill:g,opacity:.5}),d.jsx("text",{x:a,y:l+14,textAnchor:"middle",fill:h,fontSize:9,fontWeight:600,fontFamily:"system-ui, sans-serif",letterSpacing:"0.15em",children:"ENTRANCE"})]})}const qD=oa(e=>({channelsSummary:[],skillsSummary:[],usage:null,uptime:0,isLoading:!1,error:null,refresh:async()=>{e({isLoading:!0,error:null});try{const n=await kt(),a=await Promise.allSettled([n.channelsStatus(),n.skillsStatus(),n.usageStatus()]),l=a[0].status==="fulfilled"?a[0].value:[],s=a[1].status==="fulfilled"?a[1].value:[],o=a[2].status==="fulfilled"?a[2].value:null,c=[];a[0].status==="rejected"&&c.push(`channels: ${a[0].reason}`),a[1].status==="rejected"&&c.push(`skills: ${a[1].reason}`),a[2].status==="rejected"&&c.push(`usage: ${a[2].reason}`),e({channelsSummary:l,skillsSummary:s,usage:o,isLoading:!1,error:c.length>0?c.join("; "):null})}catch(n){e({error:String(n),isLoading:!1})}}}));function Wi({message:e}){return d.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[d.jsx(Ri,{className:"mb-3 h-8 w-8 animate-spin text-blue-500"}),e&&d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e})]})}function gu({message:e,onRetry:n}){const{t:a}=oe("common");return d.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[d.jsx(Eb,{className:"mb-3 h-10 w-10 text-red-500"}),d.jsx("p",{className:"mb-4 text-sm text-red-600 dark:text-red-400",children:e}),n&&d.jsx("button",{type:"button",onClick:n,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-medium text-red-600 hover:bg-red-50 dark:border-red-700 dark:text-red-400 dark:hover:bg-red-900/20 transition-colors",children:a("actions.retry")})]})}function _o({icon:e,title:n,value:a,subtitle:l,progress:s,color:o="text-blue-500"}){return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(e,{className:`h-5 w-5 ${o}`}),d.jsx("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400",children:n})]}),d.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:a}),l&&d.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:l}),s!=null&&d.jsx("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700",children:d.jsx("div",{className:"h-full rounded-full bg-blue-500 transition-all",style:{width:`${Math.min(100,Math.max(0,s))}%`}})})]})}const ID={warning:"border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-700 dark:bg-amber-900/20 dark:text-amber-300",error:"border-red-300 bg-red-50 text-red-800 dark:border-red-700 dark:bg-red-900/20 dark:text-red-300"};function Ux({variant:e,message:n,actionLabel:a,onAction:l}){const s=e==="warning"?au:Jo;return d.jsxs("div",{className:`flex items-center gap-3 rounded-lg border px-4 py-3 text-sm ${ID[e]}`,children:[d.jsx(s,{className:"h-4 w-4 flex-shrink-0"}),d.jsx("span",{className:"flex-1",children:n}),a&&l&&d.jsx("button",{type:"button",onClick:l,className:"text-xs font-medium underline hover:no-underline",children:a})]})}const $D=[{path:"/channels",icon:nu,titleKey:"console:channels.title",descKey:"console:channels.description"},{path:"/skills",icon:sh,titleKey:"console:skills.title",descKey:"console:skills.description"},{path:"/cron",icon:Wo,titleKey:"console:cron.title",descKey:"console:cron.description"},{path:"/settings",icon:ih,titleKey:"console:settings.title",descKey:"console:settings.description"}];function FD(){const e=Pi(),{t:n}=oe();return d.jsx("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:$D.map(a=>d.jsxs("button",{type:"button",onClick:()=>e(a.path),className:"flex flex-col items-start gap-2 rounded-lg border border-gray-200 bg-white p-4 text-left transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-600 dark:hover:bg-blue-900/10",children:[d.jsx(a.icon,{className:"h-5 w-5 text-gray-500 dark:text-gray-400"}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:n(a.titleKey)}),d.jsx("div",{className:"mt-0.5 text-xs text-gray-500 dark:text-gray-400 line-clamp-2",children:n(a.descKey)})]})]},a.path))})}const KD={connected:"bg-green-500",active:"bg-green-500",ok:"bg-green-500",disconnected:"bg-gray-400",paused:"bg-gray-400",disabled:"bg-gray-400",connecting:"bg-yellow-500",pending:"bg-yellow-500",running:"bg-yellow-500",error:"bg-red-500",failed:"bg-red-500"};function nv({status:e,className:n=""}){const{t:a}=oe("common"),l=KD[e]??"bg-gray-400",s=a(`status.${e}`,{defaultValue:e});return d.jsxs("span",{className:`inline-flex items-center gap-1.5 text-xs ${n}`,children:[d.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${l}`}),d.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:s})]})}const PD={whatsapp:"📱",telegram:"✈️",discord:"🎮",signal:"🔒",feishu:"🐦",imessage:"💬",matrix:"🔗",line:"🟢",msteams:"👔",googlechat:"💭",mattermost:"💠"};function VD({channels:e}){const{t:n}=oe("console"),a=e.filter(l=>l.status==="connected");return a.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:n("dashboard.channelOverview.title")}),d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[d.jsx(nu,{className:"h-4 w-4"}),d.jsx("span",{children:n("dashboard.channelOverview.empty")})]})]}):d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:n("dashboard.channelOverview.title")}),d.jsx("div",{className:"flex flex-wrap gap-3",children:a.map(l=>d.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-gray-50 px-3 py-1.5 dark:bg-gray-700/50",children:[d.jsx("span",{className:"text-base",children:PD[l.type]??"📡"}),d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l.name}),d.jsx(nv,{status:l.status})]},l.id))})]})}function YD({skills:e}){const{t:n}=oe("console"),a=e.filter(l=>l.enabled);return a.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:n("dashboard.skillOverview.title")}),d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[d.jsx(sh,{className:"h-4 w-4"}),d.jsx("span",{children:n("dashboard.skillOverview.empty")})]})]}):d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:n("dashboard.skillOverview.title")}),d.jsx("div",{className:"flex flex-wrap gap-3",children:a.map(l=>d.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-gray-50 px-3 py-1.5 dark:bg-gray-700/50",children:[d.jsx("span",{className:"text-base",children:l.icon||"📦"}),d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l.name})]},l.id))})]})}function GD(){const{t:e}=oe("console"),{channelsSummary:n,skillsSummary:a,usage:l,isLoading:s,error:o,refresh:c}=qD(),f=he(S=>S.connectionStatus);if(N.useEffect(()=>{c()},[c]),s&&n.length===0)return d.jsxs("div",{className:"space-y-6",children:[d.jsx(pf,{title:e("dashboard.title"),description:e("dashboard.description"),onRefresh:c}),d.jsx(Wi,{message:e("dashboard.loading")})]});if(o&&n.length===0&&a.length===0)return d.jsxs("div",{className:"space-y-6",children:[d.jsx(pf,{title:e("dashboard.title"),description:e("dashboard.description"),onRefresh:c}),d.jsx(gu,{message:o,onRetry:c})]});const g=n.filter(S=>S.status==="connected").length,h=n.filter(S=>S.status==="error").length,x=a.filter(S=>S.enabled).length,y=l==null?void 0:l.providers[0],b=y==null?void 0:y.windows[0],v=y?`${y.displayName}: ${(b==null?void 0:b.usedPercent)??0}%`:"—";return d.jsxs("div",{className:"space-y-6",children:[d.jsx(pf,{title:e("dashboard.title"),description:e("dashboard.description"),onRefresh:c,loading:s}),f!=="connected"&&d.jsx(Ux,{variant:"warning",message:e("dashboard.alerts.gatewayDisconnected")}),h>0&&d.jsx(Ux,{variant:"error",message:e("dashboard.alerts.channelErrors",{count:h})}),d.jsxs("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-4",children:[d.jsx(_o,{icon:nu,title:e("dashboard.stats.channels"),value:`${g} / ${n.length}`,color:"text-green-500"}),d.jsx(_o,{icon:sh,title:e("dashboard.stats.skills"),value:`${x} / ${a.length}`,color:"text-purple-500"}),d.jsx(_o,{icon:Rb,title:e("dashboard.stats.usage"),value:v,progress:b==null?void 0:b.usedPercent,color:"text-blue-500"}),d.jsx(_o,{icon:Wo,title:e("dashboard.stats.uptime"),value:f==="connected"?e("dashboard.stats.uptimeOnline"):"—",color:"text-amber-500"})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:e("dashboard.quickNav.title")}),d.jsx(FD,{})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsx(VD,{channels:n}),d.jsx(YD,{skills:a})]})]})}function pf({title:e,description:n,onRefresh:a,loading:l}){const{t:s}=oe("common");return d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:n})]}),d.jsxs("button",{type:"button",onClick:a,disabled:l,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),s("actions.refresh")]})]})}const av=oa((e,n)=>({channels:[],isLoading:!1,error:null,selectedChannel:null,configDialogOpen:!1,configDialogChannelType:null,qrState:"idle",qrDataUrl:null,qrError:null,fetchChannels:async()=>{e({isLoading:!0,error:null});try{await kt();const a=await Xe().channelsStatus();e({channels:a,isLoading:!1})}catch(a){e({error:String(a),isLoading:!1})}},logoutChannel:async(a,l)=>{try{await Xe().channelsLogout(a,l),await n().fetchChannels()}catch(s){e({error:String(s)})}},openConfigDialog:(a,l)=>{e({configDialogOpen:!0,configDialogChannelType:a,selectedChannel:l??null,qrState:"idle",qrDataUrl:null,qrError:null})},closeConfigDialog:()=>{e({configDialogOpen:!1,configDialogChannelType:null,selectedChannel:null,qrState:"idle",qrDataUrl:null,qrError:null})},startQrPairing:async()=>{e({qrState:"loading",qrError:null});try{const a=await Xe().webLoginStart(!0);e({qrState:"qr",qrDataUrl:a.qrDataUrl??null}),e({qrState:"scanning"});const l=await Xe().webLoginWait();l.connected?(e({qrState:"success"}),await n().fetchChannels()):e({qrState:"error",qrError:l.message})}catch(a){e({qrState:"error",qrError:String(a)})}},cancelQrPairing:()=>{e({qrState:"idle",qrDataUrl:null,qrError:null})}}));function Ii({icon:e,title:n,description:a,action:l}){return d.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[d.jsx(e,{className:"mb-4 h-12 w-12 text-gray-300 dark:text-gray-600",strokeWidth:1.5}),d.jsx("h3",{className:"mb-1 text-base font-medium text-gray-700 dark:text-gray-300",children:n}),a&&d.jsx("p",{className:"mb-4 max-w-sm text-sm text-gray-500 dark:text-gray-400",children:a}),l&&d.jsx("button",{type:"button",onClick:l.onClick,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:l.label})]})}function $i({open:e,title:n,description:a,confirmLabel:l,onConfirm:s,onCancel:o,variant:c="default"}){const{t:f}=oe("common"),g=N.useRef(null);N.useEffect(()=>{const x=g.current;x&&(e&&!x.open?x.showModal():!e&&x.open&&x.close())},[e]);const h=c==="danger"?"bg-red-600 hover:bg-red-700 text-white":"bg-blue-600 hover:bg-blue-700 text-white";return d.jsx("dialog",{ref:g,onClose:o,className:"fixed inset-0 z-50 m-auto max-w-md rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-6",children:[d.jsx("h3",{className:"mb-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:n}),d.jsx("p",{className:"mb-6 text-sm text-gray-600 dark:text-gray-400",children:a}),d.jsxs("div",{className:"flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:o,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:f("actions.cancel")}),d.jsx("button",{type:"button",onClick:s,className:`rounded-md px-4 py-2 text-sm font-medium transition-colors ${h}`,children:l??f("actions.confirm")})]})]})})}function QD({channels:e}){const{t:n}=oe("console"),a=e.filter(s=>s.status==="connected").length,l=e.filter(s=>s.status==="error").length;return d.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[n("channels.stats.total")," ",d.jsx("strong",{className:"text-gray-900 dark:text-gray-100",children:e.length})]}),d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-green-600 dark:text-green-400",children:[n("channels.stats.connected")," ",d.jsx("strong",{children:a})]}),l>0&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-red-600 dark:text-red-400",children:[n("channels.stats.errors")," ",d.jsx("strong",{children:l})]})]})]})}const pu={telegram:{type:"telegram",nameKey:"console:channels.types.telegram",icon:"✈️",fields:[{key:"botToken",labelKey:"console:channels.fields.botToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.botToken"}]},discord:{type:"discord",nameKey:"console:channels.types.discord",icon:"🎮",fields:[{key:"botToken",labelKey:"console:channels.fields.botToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.botToken"},{key:"applicationId",labelKey:"console:channels.fields.applicationId",type:"text",required:!0,placeholderKey:"console:channels.placeholders.applicationId"}]},whatsapp:{type:"whatsapp",nameKey:"console:channels.types.whatsapp",icon:"📱",fields:[],hasQrFlow:!0},signal:{type:"signal",nameKey:"console:channels.types.signal",icon:"🔒",fields:[{key:"phoneNumber",labelKey:"console:channels.fields.phoneNumber",type:"text",required:!0,placeholderKey:"console:channels.placeholders.phoneNumber"}]},feishu:{type:"feishu",nameKey:"console:channels.types.feishu",icon:"🐦",fields:[{key:"appId",labelKey:"console:channels.fields.appId",type:"text",required:!0,placeholderKey:"console:channels.placeholders.appId"},{key:"appSecret",labelKey:"console:channels.fields.appSecret",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.appSecret"}]},imessage:{type:"imessage",nameKey:"console:channels.types.imessage",icon:"💬",fields:[]},matrix:{type:"matrix",nameKey:"console:channels.types.matrix",icon:"🔗",fields:[{key:"homeserver",labelKey:"console:channels.fields.homeserver",type:"text",required:!0,placeholderKey:"console:channels.placeholders.homeserver"},{key:"accessToken",labelKey:"console:channels.fields.accessToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.accessToken"}]},line:{type:"line",nameKey:"console:channels.types.line",icon:"🟢",fields:[{key:"channelAccessToken",labelKey:"console:channels.fields.channelAccessToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.channelAccessToken"},{key:"channelSecret",labelKey:"console:channels.fields.channelSecret",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.channelSecret"}]},msteams:{type:"msteams",nameKey:"console:channels.types.msteams",icon:"👔",fields:[{key:"appId",labelKey:"console:channels.fields.appId",type:"text",required:!0,placeholderKey:"console:channels.placeholders.appId"},{key:"appPassword",labelKey:"console:channels.fields.appPassword",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.appPassword"}]},googlechat:{type:"googlechat",nameKey:"console:channels.types.googlechat",icon:"💭",fields:[{key:"serviceAccountJson",labelKey:"console:channels.fields.serviceAccount",type:"textarea",required:!0,placeholderKey:"console:channels.placeholders.serviceAccount"}]},mattermost:{type:"mattermost",nameKey:"console:channels.types.mattermost",icon:"💠",fields:[{key:"serverUrl",labelKey:"console:channels.fields.serverUrl",type:"text",required:!0,placeholderKey:"console:channels.placeholders.serverUrl"},{key:"botToken",labelKey:"console:channels.fields.botToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.botToken"}]}},XD=Object.keys(pu),ZD={connected:"border-l-green-500",error:"border-l-red-500",connecting:"border-l-yellow-500",disconnected:"border-l-gray-300 dark:border-l-gray-600"};function JD({channel:e,onLogout:n,onDetail:a}){const{t:l}=oe("console"),s=pu[e.type],o=ZD[e.status]??"border-l-gray-300",c=e.lastConnectedAt?new Date(e.lastConnectedAt).toLocaleString():null;return d.jsxs("div",{className:`flex items-center justify-between rounded-lg border border-l-4 bg-white p-4 dark:bg-gray-800 ${o} border-gray-200 dark:border-gray-700`,children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"text-2xl",children:(s==null?void 0:s.icon)??"📡"}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:e.name}),d.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:e.type})]}),d.jsxs("div",{className:"mt-1 flex items-center gap-3",children:[d.jsx(nv,{status:e.status}),c&&d.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:l("channels.card.lastConnected",{time:c})})]}),e.error&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:e.error})]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>a(e),className:"rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300 transition-colors",title:l("channels.card.details"),children:d.jsx(Tb,{className:"h-4 w-4"})}),e.status==="connected"&&d.jsx("button",{type:"button",onClick:()=>n(e),className:"rounded p-1.5 text-gray-400 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20 dark:hover:text-red-400 transition-colors",title:l("channels.card.logout"),children:d.jsx(NN,{className:"h-4 w-4"})})]})]})}function WD({channels:e,onSelect:n}){const{t:a}=oe("console"),l=new Set(e.map(s=>s.type));return d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:a("channels.available.title")}),d.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4",children:XD.map(s=>{const o=pu[s],c=l.has(s);return d.jsxs("button",{type:"button",onClick:()=>n(s),className:"flex flex-col items-center gap-2 rounded-lg border border-gray-200 bg-white p-4 transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-600 dark:hover:bg-blue-900/10",children:[d.jsx("span",{className:"text-2xl",children:o.icon}),d.jsx("span",{className:"text-xs font-medium text-gray-700 dark:text-gray-300",children:a(o.nameKey)}),c?d.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-[10px] font-medium text-green-700 dark:bg-green-900/30 dark:text-green-400",children:[d.jsx(ul,{className:"h-3 w-3"}),a("channels.available.configured")]}):d.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:[d.jsx(fr,{className:"h-3 w-3"}),a("channels.available.add")]})]},s)})})]})}function eM({onClose:e}){const{t:n}=oe("console"),{qrState:a,qrDataUrl:l,qrError:s,startQrPairing:o,cancelQrPairing:c}=av();return a==="idle"||a==="cancel"?d.jsxs("div",{className:"flex flex-col items-center gap-4 py-6",children:[d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("channels.qr.description")}),d.jsx("button",{type:"button",onClick:o,className:"rounded-md bg-green-600 px-6 py-2 text-sm font-medium text-white hover:bg-green-700 transition-colors",children:n("channels.qr.startPairing")})]}):a==="loading"?d.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[d.jsx(Ri,{className:"h-8 w-8 animate-spin text-green-500"}),d.jsx("p",{className:"text-sm text-gray-500",children:n("channels.qr.loading")})]}):a==="qr"||a==="scanning"?d.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[l&&d.jsx("img",{src:l,alt:"WhatsApp QR Code",className:"h-48 w-48 rounded-lg border border-gray-200 dark:border-gray-700"}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n(a==="scanning"?"channels.qr.waitingScan":"channels.qr.scanPrompt")}),a==="scanning"&&d.jsx(Ri,{className:"h-5 w-5 animate-spin text-green-500"}),d.jsx("button",{type:"button",onClick:c,className:"text-xs text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",children:n("common:actions.cancel")})]}):a==="success"?d.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[d.jsx(lh,{className:"h-10 w-10 text-green-500"}),d.jsx("p",{className:"font-medium text-green-600",children:n("channels.qr.success")}),d.jsx("button",{type:"button",onClick:e,className:"rounded-md border border-gray-300 px-4 py-1.5 text-sm text-gray-600 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:n("common:actions.close")})]}):d.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[d.jsx(Jo,{className:"h-10 w-10 text-red-500"}),d.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:s??n("channels.qr.error")}),d.jsx("button",{type:"button",onClick:o,className:"rounded-md border border-red-300 px-4 py-1.5 text-sm text-red-600 hover:bg-red-50 dark:border-red-700 dark:text-red-400 dark:hover:bg-red-900/20 transition-colors",children:n("common:actions.retry")})]})}function tM({open:e,channelType:n,onClose:a}){const{t:l}=oe("console"),s=N.useRef(null),[o,c]=N.useState({}),[f,g]=N.useState({}),[h,x]=N.useState(new Set),y=n?pu[n]:null;if(N.useEffect(()=>{const S=s.current;S&&(e&&!S.open?(c({}),g({}),x(new Set),S.showModal()):!e&&S.open&&S.close())},[e]),!y)return null;if(y.hasQrFlow)return d.jsx("dialog",{ref:s,onClose:a,className:"fixed inset-0 z-50 m-auto max-w-md rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-6",children:[d.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[d.jsx("span",{className:"text-xl",children:y.icon}),d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:l(y.nameKey)})]}),d.jsx(eM,{onClose:a})]})});const b=()=>{var E;const S={};let C=!1;for(const j of y.fields)j.required&&!((E=o[j.key])!=null&&E.trim())&&(S[j.key]=!0,C=!0);g(S),C||a()},v=S=>{x(C=>{const E=new Set(C);return E.has(S)?E.delete(S):E.add(S),E})};return d.jsx("dialog",{ref:s,onClose:a,className:"fixed inset-0 z-50 m-auto max-w-md rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-6",children:[d.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[d.jsx("span",{className:"text-xl",children:y.icon}),d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:l(y.nameKey)})]}),d.jsx("div",{className:"space-y-4",children:y.fields.map(S=>d.jsx(nM,{field:S,value:o[S.key]??"",onChange:C=>c(E=>({...E,[S.key]:C})),hasError:f[S.key]??!1,isSecretVisible:h.has(S.key),onToggleSecret:()=>v(S.key)},S.key))}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:a,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:l("channels.configDialog.cancel",{defaultValue:l("common:actions.cancel")})}),d.jsx("button",{type:"button",onClick:b,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:l("channels.configDialog.save",{defaultValue:l("common:actions.save")})})]})]})})}function nM({field:e,value:n,onChange:a,hasError:l,isSecretVisible:s,onToggleSecret:o}){const{t:c}=oe("console"),f=l?"border-red-500":"border-gray-300 dark:border-gray-600";return e.type==="textarea"?d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[c(e.labelKey)," ",e.required&&d.jsx("span",{className:"text-red-500",children:"*"})]}),d.jsx("textarea",{value:n,onChange:g=>a(g.target.value),placeholder:c(e.placeholderKey),rows:4,className:`w-full rounded-md border bg-white px-3 py-2 text-sm dark:bg-gray-700 dark:text-gray-100 ${f}`}),l&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:c("channels.configDialog.required")})]}):d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[c(e.labelKey)," ",e.required&&d.jsx("span",{className:"text-red-500",children:"*"})]}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:e.type==="secret"&&!s?"password":"text",value:n,onChange:g=>a(g.target.value),placeholder:c(e.placeholderKey),className:`w-full rounded-md border bg-white px-3 py-2 text-sm dark:bg-gray-700 dark:text-gray-100 ${f} ${e.type==="secret"?"pr-10":""}`}),e.type==="secret"&&d.jsx("button",{type:"button",onClick:o,className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:s?d.jsx(eu,{className:"h-4 w-4"}):d.jsx(tu,{className:"h-4 w-4"})})]}),l&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:c("channels.configDialog.required")})]})}function aM(){const{t:e}=oe("console"),{channels:n,isLoading:a,error:l,fetchChannels:s,logoutChannel:o,configDialogOpen:c,configDialogChannelType:f,openConfigDialog:g,closeConfigDialog:h}=av(),[x,y]=N.useState(null);N.useEffect(()=>{s()},[s]);const b=async()=>{x&&(await o(x.type,x.accountId),y(null))};return a&&n.length===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(mf,{title:e("channels.title"),description:e("channels.description"),onRefresh:s}),d.jsx(Wi,{})]}):l&&n.length===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(mf,{title:e("channels.title"),description:e("channels.description"),onRefresh:s}),d.jsx(gu,{message:l,onRetry:s})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsx(mf,{title:e("channels.title"),description:e("channels.description"),onRefresh:s,loading:a}),d.jsx(QD,{channels:n}),n.length===0?d.jsx(Ii,{icon:bN,title:e("channels.empty.title"),description:e("channels.empty.description")}):d.jsx("div",{className:"space-y-3",children:n.map(v=>d.jsx(JD,{channel:v,onLogout:y,onDetail:S=>g(S.type,S)},v.id))}),d.jsx(WD,{channels:n,onSelect:v=>g(v)}),d.jsx(tM,{open:c,channelType:f,onClose:h}),d.jsx($i,{open:x!==null,title:e("channels.logout.title"),description:e("channels.logout.description",{name:(x==null?void 0:x.name)??""}),onConfirm:b,onCancel:()=>y(null),variant:"danger"})]})}function mf({title:e,description:n,onRefresh:a,loading:l}){const{t:s}=oe("common");return d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:n})]}),d.jsxs("button",{type:"button",onClick:a,disabled:l,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),s("actions.refresh")]})]})}function rM(e,n){return e.enabled&&!n.enabled?-1:!e.enabled&&n.enabled?1:e.isCore&&!n.isCore?-1:!e.isCore&&n.isCore?1:e.name.localeCompare(n.name)}function lM(e){return new Set(e.map(n=>n.id))}function iM(e,n,a){const l=n.trim().toLowerCase();return e.filter(s=>s.isBundled||s.eligible).filter(s=>l?[s.name,s.description,s.slug,s.source].filter(Boolean).join(" ").toLowerCase().includes(l):!0).filter(s=>a==="built-in"?!!s.isBundled:a==="marketplace"?!s.isBundled:!0).sort(rM)}function sM(e,n){const a=n.trim().toLowerCase();return e.filter(l=>!l.isBundled).filter(l=>a?[l.name,l.description,l.slug,l.author,l.source].filter(Boolean).join(" ").toLowerCase().includes(a):!0).sort((l,s)=>l.name.localeCompare(s.name))}const oM=oa((e,n)=>({skills:[],isLoading:!1,error:null,activeTab:"installed",sourceFilter:"all",selectedSkill:null,detailDialogOpen:!1,installing:new Set,fetchSkills:async()=>{e({isLoading:!0,error:null});try{await kt();const a=await Xe().skillsStatus();e({skills:a,isLoading:!1})}catch(a){e({error:String(a),isLoading:!1})}},setTab:a=>e({activeTab:a}),setSourceFilter:a=>e({sourceFilter:a}),openDetail:a=>e({selectedSkill:a,detailDialogOpen:!0}),closeDetail:()=>e({selectedSkill:null,detailDialogOpen:!1}),toggleSkill:async(a,l)=>{try{(await Xe().skillsUpdate(a,{enabled:l})).ok&&e(o=>({skills:o.skills.map(c=>c.id===a?{...c,enabled:l}:c)}))}catch(s){e({error:String(s)})}},installSkill:async(a,l)=>{const s=new Set(n().installing);s.add(a),e({installing:s});try{const o=await Xe().skillsInstall(a,l);return o.ok&&await n().fetchSkills(),o}catch(o){return{ok:!1,message:String(o)}}finally{const o=new Set(n().installing);o.delete(a),e({installing:o})}}})),uM=["installed","marketplace"];function cM({activeTab:e,onTabChange:n}){const{t:a}=oe("console");return d.jsx("div",{className:"flex gap-1 rounded-xl bg-gray-100 p-1 dark:bg-gray-800",children:uM.map(l=>d.jsx("button",{type:"button",onClick:()=>n(l),className:`rounded-lg px-5 py-2 text-sm font-semibold transition-colors ${e===l?"bg-white text-gray-900 shadow-sm dark:bg-gray-700 dark:text-gray-100":"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:a(`skills.tabs.${l}`)},l))})}function dM({skill:e,onToggle:n,onConfigure:a,isInstalling:l,onInstall:s}){var h,x,y,b;const{t:o}=oe("console"),c=e.isCore&&e.always,f=((x=(h=e.missing)==null?void 0:h.bins)==null?void 0:x.length)||((b=(y=e.missing)==null?void 0:y.env)==null?void 0:b.length),g=e.isBundled?o("skills.source.builtIn"):o("skills.source.marketplace");return d.jsx("div",{className:`rounded-2xl border p-4 transition-colors dark:bg-gray-800 ${e.enabled?"border-blue-200 bg-blue-50/40 dark:border-blue-900/40":"border-gray-200 bg-white opacity-75 dark:border-gray-700"}`,children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("button",{type:"button",onClick:()=>a(e),className:"flex min-w-0 flex-1 items-start gap-3 text-left",children:[d.jsx("span",{className:"text-2xl",children:e.icon||"📦"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"font-semibold text-gray-900 dark:text-gray-100",children:e.name}),d.jsx("span",{className:`rounded-md px-2 py-0.5 text-[10px] font-medium ${e.isBundled?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"}`,children:g}),e.isCore?d.jsx(_b,{className:"h-3.5 w-3.5 text-gray-400"}):e.isBundled?d.jsx(Mb,{className:"h-3.5 w-3.5 text-blue-500/70"}):d.jsx(gN,{className:"h-3.5 w-3.5 text-purple-500/70"}),e.version&&d.jsxs("span",{className:"text-[10px] text-gray-400",children:["v",e.version]})]}),d.jsx("p",{className:"mt-2 line-clamp-2 text-sm text-gray-500 dark:text-gray-400",children:e.description}),f&&d.jsxs("div",{className:"mt-2 flex items-center gap-1 text-xs text-amber-600 dark:text-amber-400",children:[d.jsx(au,{className:"h-3.5 w-3.5"}),o("skills.card.missingDeps")]})]})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>a(e),className:"rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300 transition-colors",title:o("skills.card.configure"),children:d.jsx(ih,{className:"h-4 w-4"})}),!e.eligible&&s&&d.jsx("button",{type:"button",onClick:()=>s(e),disabled:l,className:"rounded-xl bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-blue-700 disabled:opacity-50 transition-colors",children:o(l?"skills.card.installing":"skills.card.install")}),d.jsxs("label",{className:"relative inline-flex cursor-pointer items-center",title:c?o("skills.card.coreProtected"):void 0,children:[d.jsx("input",{type:"checkbox",checked:e.enabled,onChange:()=>n(e.id,!e.enabled),disabled:c,className:"peer sr-only"}),d.jsx("div",{className:"peer h-5 w-9 rounded-full bg-gray-200 after:absolute after:left-[2px] after:top-[2px] after:h-4 after:w-4 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white peer-disabled:cursor-not-allowed peer-disabled:opacity-50 dark:bg-gray-700 dark:peer-checked:bg-blue-500"})]})]})]})})}function fM({skill:e,isInstalled:n,isInstalling:a,onInstall:l,onOpenDetail:s}){var c;const{t:o}=oe("console");return d.jsx("div",{className:"rounded-2xl border border-gray-200 bg-white p-5 shadow-sm transition-colors hover:border-blue-300 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-700",children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("button",{type:"button",onClick:()=>s(e),className:"flex min-w-0 flex-1 items-start gap-4 text-left",children:[d.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-blue-50 text-2xl dark:bg-blue-900/20",children:e.icon||"📦"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e.name}),d.jsx("span",{className:"rounded-md bg-purple-100 px-2 py-0.5 text-xs font-medium text-purple-700 dark:bg-purple-900/30 dark:text-purple-300",children:o("skills.source.marketplace")})]}),d.jsx("p",{className:"mt-2 line-clamp-2 text-sm text-gray-500 dark:text-gray-400",children:e.description}),d.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-gray-400 dark:text-gray-500",children:[d.jsx("span",{children:o("skills.marketplace.version",{version:e.version||"—"})}),e.author&&d.jsx("span",{children:o("skills.marketplace.author",{author:e.author})}),e.homepage&&d.jsxs("span",{className:"inline-flex items-center gap-1 text-blue-600 dark:text-blue-400",children:[d.jsx(Mi,{className:"h-3.5 w-3.5"}),o("skills.marketplace.learnMore")]})]})]})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[d.jsx("button",{type:"button",onClick:()=>s(e),className:"rounded-full p-2 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",title:o("skills.card.configure"),children:d.jsx(Mi,{className:"h-4 w-4"})}),n?d.jsxs("div",{className:"inline-flex items-center gap-1 rounded-full bg-green-100 px-3 py-1.5 text-sm font-medium text-green-700 dark:bg-green-900/30 dark:text-green-300",children:[d.jsx(rN,{className:"h-4 w-4"}),o("skills.marketplace.installed")]}):d.jsx("button",{type:"button",onClick:()=>l(e),disabled:a||!((c=e.installOptions)!=null&&c.length),className:"inline-flex min-w-24 items-center justify-center gap-1 rounded-xl bg-blue-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-50",children:a?d.jsxs(d.Fragment,{children:[d.jsx(Ri,{className:"h-4 w-4 animate-spin"}),o("skills.card.installing")]}):d.jsxs(d.Fragment,{children:[d.jsx(Ab,{className:"h-4 w-4"}),o("skills.card.install")]})})]})]})})}function hM({open:e,skill:n,onClose:a,onSaved:l}){var ee;const{t:s}=oe("console"),o=N.useRef(null),[c,f]=N.useState(""),[g,h]=N.useState(!1),[x,y]=N.useState([]),[b,v]=N.useState("info"),[S,C]=N.useState(!0),[E,j]=N.useState(!1);if(N.useEffect(()=>{const G=o.current;G&&(e&&!G.open?(v("info"),h(!1),G.showModal()):!e&&G.open&&G.close())},[e]),N.useEffect(()=>{var R,ae;if(!n)return;f(typeof((R=n.config)==null?void 0:R.apiKey)=="string"?n.config.apiKey:"");const G=(ae=n.config)==null?void 0:ae.env;y(G&&typeof G=="object"?Object.entries(G).map(([F,ie])=>({key:F,value:String(ie)})):[])},[n]),!n)return null;const z=n.primaryEnv||n.configChecks&&n.configChecks.length>0,D=n.isCore&&n.always,Y=async()=>{j(!0);try{const G=x.reduce((R,ae)=>{const F=ae.key.trim();return F&&(R[F]=ae.value.trim()),R},{});await Xe().skillsUpdate(n.id,{apiKey:c||void 0,env:Object.keys(G).length>0?G:void 0}),l(),a()}catch{}finally{j(!1)}},H=()=>y(G=>[...G,{key:"",value:""}]),L=G=>{y(R=>R.filter((ae,F)=>F!==G))},P=(G,R,ae)=>{y(F=>F.map((ie,ne)=>ne===G?{...ie,[R]:ae}:ie))};return d.jsx("dialog",{ref:o,onClose:a,className:"fixed inset-0 z-50 m-auto max-h-[90vh] w-[min(760px,calc(100vw-2rem))] rounded-xl border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"flex max-h-[90vh] flex-col",children:[d.jsx("div",{className:"border-b border-gray-200 p-6 dark:border-gray-700",children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"flex items-start gap-4",children:[d.jsx("span",{className:"text-3xl",children:n.icon||"📦"}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:n.name}),D&&d.jsx(_b,{className:"h-4 w-4 text-gray-400"})]}),d.jsxs("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:[n.version||"—"," · ",n.author??"—"]}),d.jsxs("div",{className:"mt-3 flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>v("info"),className:`rounded-lg px-3 py-1.5 text-sm font-medium ${b==="info"?"bg-gray-900 text-white dark:bg-gray-100 dark:text-gray-900":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"}`,children:s("skills.detail.info")}),d.jsx("button",{type:"button",onClick:()=>v("config"),disabled:!z,className:`rounded-lg px-3 py-1.5 text-sm font-medium ${b==="config"?"bg-gray-900 text-white dark:bg-gray-100 dark:text-gray-900":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"} disabled:cursor-not-allowed disabled:opacity-50`,children:s("skills.detail.config")})]})]})]}),d.jsx("button",{type:"button",onClick:a,className:"rounded-full p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700",children:d.jsx(Ua,{className:"h-4 w-4"})})]})}),d.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:b==="info"?d.jsxs("div",{className:"space-y-5",children:[d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n.description}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsx(Do,{label:s("skills.detail.source"),value:n.source??"—"}),d.jsx(Do,{label:s("skills.detail.version"),value:n.version||"—"}),d.jsx(Do,{label:s("skills.detail.author"),value:n.author??"—"}),d.jsx(Do,{label:s("skills.detail.primaryEnv"),value:n.primaryEnv??"—"})]}),n.homepage&&d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[s("skills.detail.homepage"),":"]}),d.jsxs("a",{href:n.homepage,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-600 hover:underline dark:text-blue-400",children:[n.homepage,d.jsx(Mi,{className:"h-3 w-3"})]})]}),n.requirements&&d.jsxs("div",{children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:s("skills.detail.requirements")}),d.jsx("div",{className:"space-y-2",children:(ee=n.requirements.bins)==null?void 0:ee.map(G=>{var ae,F;const R=(F=(ae=n.missing)==null?void 0:ae.bins)==null?void 0:F.includes(G);return d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[R?d.jsx(Ua,{className:"h-4 w-4 text-red-500"}):d.jsx(ul,{className:"h-4 w-4 text-green-500"}),d.jsx("code",{className:"text-xs",children:G})]},G)})})]})]}):z?d.jsxs("div",{className:"space-y-5",children:[n.primaryEnv&&d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-xs text-gray-500 dark:text-gray-400",children:["API Key (",n.primaryEnv,")"]}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:g?"text":"password",value:c,onChange:G=>f(G.target.value),placeholder:s("skills.detail.apiKeyPlaceholder"),className:"w-full rounded-md border border-gray-300 bg-white px-3 py-2 pr-10 text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100"}),d.jsx("button",{type:"button",onClick:()=>h(!g),className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:g?d.jsx(eu,{className:"h-4 w-4"}):d.jsx(tu,{className:"h-4 w-4"})})]})]}),d.jsxs("div",{className:"rounded-xl border border-gray-200 p-4 dark:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("button",{type:"button",onClick:()=>C(G=>!G),className:"flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:[S?d.jsx(sa,{className:"h-4 w-4"}):d.jsx(WC,{className:"h-4 w-4"}),s("skills.detail.envVars")]}),d.jsxs("button",{type:"button",onClick:H,className:"inline-flex items-center gap-1 rounded-md border border-gray-300 px-2 py-1 text-xs font-medium text-gray-600 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700",children:[d.jsx(fr,{className:"h-3 w-3"}),s("skills.detail.addVariable")]})]}),S&&d.jsx("div",{className:"mt-4 space-y-3",children:x.length===0?d.jsx("p",{className:"text-xs italic text-gray-400",children:s("skills.detail.noEnvVars")}):x.map((G,R)=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{value:G.key,onChange:ae=>P(R,"key",ae.target.value),className:"w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-xs font-mono dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100",placeholder:s("skills.detail.keyPlaceholder")}),d.jsx("span",{className:"text-gray-400",children:"="}),d.jsx("input",{value:G.value,onChange:ae=>P(R,"value",ae.target.value),className:"w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-xs font-mono dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100",placeholder:s("skills.detail.valuePlaceholder")}),d.jsx("button",{type:"button",onClick:()=>L(R),className:"rounded-md p-2 text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20",children:d.jsx(Yi,{className:"h-4 w-4"})})]},`${G.key}-${R}`))})]}),n.configChecks&&n.configChecks.length>0&&d.jsxs("div",{children:[d.jsx("label",{className:"mb-2 block text-xs text-gray-500 dark:text-gray-400",children:s("skills.detail.configChecks")}),d.jsx("div",{className:"space-y-1",children:n.configChecks.map(G=>d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[G.satisfied?d.jsx(ul,{className:"h-4 w-4 text-green-500"}):d.jsx(Ua,{className:"h-4 w-4 text-red-500"}),d.jsx("code",{className:"text-xs",children:G.path})]},G.path))})]}),d.jsx("div",{className:"flex justify-end",children:d.jsx("button",{type:"button",onClick:Y,disabled:E,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50 transition-colors",children:s(E?"skills.detail.saving":"common:actions.save")})})]}):d.jsx("p",{className:"text-sm text-gray-400",children:s("skills.detail.noConfig")})}),d.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 px-6 py-4 dark:border-gray-700",children:[d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[n.enabled?d.jsx(ul,{className:"h-4 w-4 text-green-500"}):d.jsx(Ua,{className:"h-4 w-4 text-gray-400"}),d.jsx("span",{className:n.enabled?"text-green-600 dark:text-green-400":"text-gray-500 dark:text-gray-400",children:n.enabled?s("skills.detail.enabled"):s("skills.detail.disabled")})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:a,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:s("common:actions.close")}),d.jsxs("label",{className:"relative inline-flex cursor-pointer items-center",title:D?s("skills.card.coreProtected"):void 0,children:[d.jsx("input",{type:"checkbox",checked:n.enabled,onChange:()=>Xe().skillsUpdate(n.id,{enabled:!n.enabled}).then(l),disabled:D,className:"peer sr-only"}),d.jsx("div",{className:"peer h-5 w-9 rounded-full bg-gray-200 after:absolute after:left-[2px] after:top-[2px] after:h-4 after:w-4 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white peer-disabled:cursor-not-allowed peer-disabled:opacity-50 dark:bg-gray-700 dark:peer-checked:bg-blue-500"})]})]})]})]})})}function Do({label:e,value:n}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[e,":"]}),d.jsx("span",{className:"text-gray-900 dark:text-gray-100",children:n})]})}function gM({open:e,skillName:n,options:a,onSelect:l,onCancel:s}){const{t:o}=oe("console"),c=N.useRef(null);return N.useEffect(()=>{const f=c.current;f&&(e&&!f.open?f.showModal():!e&&f.open&&f.close())},[e]),d.jsx("dialog",{ref:c,onClose:s,className:"fixed inset-0 z-50 m-auto max-w-sm rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-6",children:[d.jsx("h3",{className:"mb-4 text-lg font-semibold text-gray-900 dark:text-gray-100",children:o("skills.install.title",{name:n})}),d.jsx("div",{className:"space-y-2",children:a.map(f=>d.jsxs("button",{type:"button",onClick:()=>l(f.id),className:"flex w-full items-center gap-3 rounded-lg border border-gray-200 p-3 text-left transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-gray-700 dark:hover:border-blue-600 dark:hover:bg-blue-900/10",children:[d.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:f.label}),d.jsxs("span",{className:"text-xs text-gray-400",children:["(",f.kind,")"]})]},f.id))}),d.jsx("div",{className:"mt-4 flex justify-end",children:d.jsx("button",{type:"button",onClick:s,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:o("common:actions.cancel")})})]})})}function pM(){const{t:e}=oe("console"),{skills:n,isLoading:a,error:l,activeTab:s,sourceFilter:o,selectedSkill:c,detailDialogOpen:f,installing:g,fetchSkills:h,setTab:x,setSourceFilter:y,openDetail:b,closeDetail:v,toggleSkill:S,installSkill:C}=oM(),[E,j]=N.useState(null),[z,D]=N.useState(""),[Y,H]=N.useState("");N.useEffect(()=>{h()},[h]);const L=N.useMemo(()=>iM(n,z,o),[n,z,o]),P=N.useMemo(()=>sM(n,Y),[n,Y]),ee=N.useMemo(()=>lM(n),[n]),G=N.useMemo(()=>({all:n.filter(F=>F.isBundled||F.eligible).length,"built-in":n.filter(F=>F.isBundled).length,marketplace:n.filter(F=>!F.isBundled).length}),[n]),R=F=>{F.installOptions&&F.installOptions.length>1?j(F):F.installOptions&&F.installOptions.length===1&&C(F.id,F.installOptions[0].id)},ae=async F=>{E&&(await C(E.id,F),j(null))};return a&&n.length===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(yf,{title:e("skills.title"),description:e("skills.description"),onRefresh:h}),d.jsx(Wi,{})]}):l&&n.length===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(yf,{title:e("skills.title"),description:e("skills.description"),onRefresh:h}),d.jsx(gu,{message:l,onRetry:h})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsx(yf,{title:e("skills.title"),description:e("skills.description"),onRefresh:h,loading:a}),d.jsx(cM,{activeTab:s,onTabChange:x}),s==="installed"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[d.jsxs("div",{className:"relative w-full lg:max-w-md",children:[d.jsx(Mf,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),d.jsx("input",{value:z,onChange:F=>D(F.target.value),placeholder:e("skills.installed.searchPlaceholder"),className:"w-full rounded-xl border border-gray-300 bg-white py-2 pl-10 pr-4 text-sm text-gray-700 outline-none transition-colors focus:border-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200"})]}),d.jsx("div",{className:"flex flex-wrap gap-2",children:["all","built-in","marketplace"].map(F=>d.jsx("button",{type:"button",onClick:()=>y(F),className:`rounded-xl px-3 py-2 text-sm font-medium transition-colors ${o===F?"bg-blue-600 text-white":"border border-gray-300 bg-white text-gray-600 hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700"}`,children:e(`skills.filters.${F}`,{count:G[F]})},F))})]}),L.length===0?d.jsx(Ii,{icon:yy,title:e("skills.empty.title"),description:e("skills.empty.description")}):d.jsx("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:L.map(F=>d.jsx(dM,{skill:F,onToggle:S,onConfigure:b,isInstalling:g.has(F.id)},F.id))})]}):d.jsxs("div",{className:"space-y-5",children:[d.jsx("div",{className:"rounded-2xl border border-gray-200 bg-gray-50/80 p-4 dark:border-gray-700 dark:bg-gray-800/60",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(GN,{className:"mt-0.5 h-5 w-5 text-gray-500"}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:e("skills.marketplace.securityNote")})]})}),d.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(Mf,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),d.jsx("input",{value:Y,onChange:F=>H(F.target.value),placeholder:e("skills.marketplace.searchPlaceholder"),className:"w-full rounded-xl border border-gray-300 bg-white py-2 pl-10 pr-10 text-sm text-gray-700 outline-none transition-colors focus:border-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200"}),Y&&d.jsx("button",{type:"button",onClick:()=>H(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:d.jsx(Ua,{className:"h-4 w-4"})})]}),d.jsx("button",{type:"button",className:"rounded-xl bg-blue-600 px-4 py-2 text-sm font-semibold text-white hover:bg-blue-700",children:e("skills.marketplace.searchButton")})]}),l&&d.jsx("div",{className:"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-600 dark:border-red-900/50 dark:bg-red-900/10 dark:text-red-400",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Eb,{className:"h-4 w-4"}),l]})}),P.length===0?d.jsx(Ii,{icon:yy,title:e("skills.marketplace.emptyTitle"),description:e(Y?"skills.marketplace.noResults":"skills.marketplace.emptyDescription")}):d.jsx("div",{className:"space-y-4",children:P.map(F=>d.jsx(fM,{skill:F,isInstalled:ee.has(F.id)&&!!F.eligible,isInstalling:g.has(F.id),onInstall:R,onOpenDetail:b},F.id))})]}),d.jsx(hM,{open:f,skill:c,onClose:v,onSaved:h}),d.jsx(gM,{open:E!==null,skillName:(E==null?void 0:E.name)??"",options:(E==null?void 0:E.installOptions)??[],onSelect:ae,onCancel:()=>j(null)})]})}function yf({title:e,description:n,onRefresh:a,loading:l}){const{t:s}=oe("common");return d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:n})]}),d.jsxs("button",{type:"button",onClick:a,disabled:l,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),s("actions.refresh")]})]})}const mM=oa((e,n)=>({tasks:[],isLoading:!1,error:null,dialogOpen:!1,editingTask:null,fetchTasks:async()=>{e({isLoading:!0,error:null});try{await kt();const a=await Xe().cronList();e({tasks:a,isLoading:!1})}catch(a){e({error:String(a),isLoading:!1})}},addTask:async a=>{try{const l=await Xe().cronAdd(a);e(s=>({tasks:[...s.tasks,l],dialogOpen:!1,editingTask:null}))}catch(l){e({error:String(l)})}},updateTask:async(a,l)=>{try{const s=await Xe().cronUpdate(a,l);e(o=>({tasks:o.tasks.map(c=>c.id===a?s:c),dialogOpen:!1,editingTask:null}))}catch(s){e({error:String(s)})}},removeTask:async a=>{try{await Xe().cronRemove(a),e(l=>({tasks:l.tasks.filter(s=>s.id!==a)}))}catch(l){e({error:String(l)})}},runTask:async a=>{try{await Xe().cronRun(a)}catch(l){e({error:String(l)})}},openDialog:a=>e({dialogOpen:!0,editingTask:a??null}),closeDialog:()=>e({dialogOpen:!1,editingTask:null}),handleCronEvent:a=>{!a.jobId||!a.state||e(l=>({tasks:l.tasks.map(s=>s.id===a.jobId?{...s,state:{...s.state,...a.state}}:s)}))},initEventListeners:()=>{const a=(o,c)=>{o==="cron"&&n().handleCronEvent(c)};let l=!1,s=()=>{};return kt().then(()=>{l||(s=Xe().onEvent(a))}).catch(()=>{s=()=>{}}),()=>{l=!0,s()}}}));function yM({tasks:e}){const{t:n}=oe("console"),a=e.filter(o=>o.enabled&&o.state.lastRunStatus!=="error").length,l=e.filter(o=>!o.enabled).length,s=e.filter(o=>o.state.lastRunStatus==="error").length;return d.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[n("cron.stats.total")," ",d.jsx("strong",{className:"text-gray-900 dark:text-gray-100",children:e.length})]}),d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-green-600 dark:text-green-400",children:[n("cron.stats.active")," ",d.jsx("strong",{children:a})]}),d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[n("cron.stats.paused")," ",d.jsx("strong",{children:l})]}),s>0&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-red-600 dark:text-red-400",children:[n("cron.stats.failed")," ",d.jsx("strong",{children:s})]})]})]})}function xM(e){const n=bM(e.schedule),a=e.payload.kind==="agentTurn"?e.payload.message:e.payload.kind==="systemEvent"?e.payload.text:"";return{id:e.id,name:e.name,schedule:n,scheduleLabel:vM(n),enabled:e.enabled,lastRunAt:e.state.lastRunAtMs??null,nextRunAt:e.state.nextRunAtMs??null,lastRunStatus:e.state.lastRunStatus??null,message:a,statusLabel:e.enabled?ze.t("console:viewModels.taskStatus.active"):ze.t("console:viewModels.taskStatus.paused")}}function bM(e){return e.kind==="cron"&&e.expr?e.expr:e.kind==="every"&&e.everyMs?ze.t("console:viewModels.schedule.every",{minutes:Math.round(e.everyMs/6e4)}):e.kind==="at"&&e.at?ze.t("console:viewModels.schedule.at",{time:e.at}):ze.t("console:viewModels.schedule.unknown")}function vM(e){const n=e.split(" ");if(n.length!==5)return e;const[a,l,s,o,c]=n;return s==="*"&&c==="*"&&l!=="*"&&a!=="*"?ze.t("console:viewModels.schedule.daily",{time:`${l}:${a.padStart(2,"0")}`}):c!=="*"&&s==="*"?ze.t("console:viewModels.schedule.weekly",{day:c,time:`${l}:${a.padStart(2,"0")}`}):e}const kM={ok:d.jsx(ul,{className:"h-3.5 w-3.5 text-green-500"}),error:d.jsx(Jo,{className:"h-3.5 w-3.5 text-red-500"}),skipped:d.jsx(AN,{className:"h-3.5 w-3.5 text-gray-400"})};function SM({task:e,onToggle:n,onRun:a,onEdit:l,onDelete:s}){const{t:o}=oe("console"),c=xM(e),f=e.payload.kind==="agentTurn"?e.payload.message:e.payload.kind==="systemEvent"?e.payload.text:"",g=c.lastRunAt?new Date(c.lastRunAt).toLocaleString():"—",h=c.nextRunAt?new Date(c.nextRunAt).toLocaleString():"—";return d.jsx("div",{className:`rounded-lg border border-gray-200 bg-white p-4 transition-opacity dark:border-gray-700 dark:bg-gray-800 ${e.enabled?"":"opacity-60"}`,children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsxs("label",{className:"relative mt-0.5 inline-flex cursor-pointer items-center",children:[d.jsx("input",{type:"checkbox",checked:e.enabled,onChange:()=>n(e.id,!e.enabled),className:"peer sr-only"}),d.jsx("div",{className:"peer h-5 w-9 rounded-full bg-gray-200 after:absolute after:left-[2px] after:top-[2px] after:h-4 after:w-4 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white dark:bg-gray-700 dark:peer-checked:bg-blue-500"})]}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:e.name}),d.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-[10px] text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:c.scheduleLabel})]}),f&&d.jsx("p",{className:"mt-1 line-clamp-1 text-sm text-gray-500 dark:text-gray-400",children:f}),d.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-gray-400 dark:text-gray-500",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[o("cron.card.lastRun"),": ",g,e.state.lastRunStatus&&d.jsx("span",{className:"ml-1",children:kM[e.state.lastRunStatus]??null})]}),d.jsxs("span",{children:[o("cron.card.nextRun"),": ",h]})]}),e.state.lastError&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:e.state.lastError})]})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("button",{type:"button",onClick:()=>a(e.id),className:"rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300 transition-colors",title:o("cron.card.runNow"),children:d.jsx(HN,{className:"h-4 w-4"})}),d.jsx("button",{type:"button",onClick:()=>l(e),className:"rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300 transition-colors",title:o("common:actions.edit"),children:d.jsx(Db,{className:"h-4 w-4"})}),d.jsx("button",{type:"button",onClick:()=>s(e.id),className:"rounded p-1.5 text-gray-400 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20 dark:hover:text-red-400 transition-colors",title:o("common:actions.delete"),children:d.jsx(Yi,{className:"h-4 w-4"})})]})]})})}const Hx=[{labelKey:"console:cron.presets.everyHour",schedule:{kind:"cron",expr:"0 * * * *"}},{labelKey:"console:cron.presets.daily9am",schedule:{kind:"cron",expr:"0 9 * * *"}},{labelKey:"console:cron.presets.daily6pm",schedule:{kind:"cron",expr:"0 18 * * *"}},{labelKey:"console:cron.presets.weeklyMon",schedule:{kind:"cron",expr:"0 9 * * 1"}},{labelKey:"console:cron.presets.monthlyFirst",schedule:{kind:"cron",expr:"0 9 1 * *"}},{labelKey:"console:cron.presets.every30min",schedule:{kind:"every",everyMs:18e5}}];function Bx(e){return e.kind==="cron"?e.expr:e.kind==="every"?`every ${Math.round(e.everyMs/6e4)}m`:e.kind==="at"?`at ${e.at}`:""}function wM(e){const n=e.payloadKind??"agentTurn",a=n==="systemEvent"?{kind:"systemEvent",text:e.message.trim()}:{kind:"agentTurn",message:e.message.trim()};return{name:e.name.trim(),description:e.description.trim()||void 0,schedule:e.schedule,sessionTarget:n==="systemEvent"?"main":"isolated",wakeMode:"now",payload:a}}function jM({open:e,editingTask:n,onSave:a,onUpdate:l,onClose:s}){const{t:o}=oe("console"),c=N.useRef(null),[f,g]=N.useState(""),[h,x]=N.useState(""),[y,b]=N.useState({kind:"cron",expr:"0 18 * * *"}),[v,S]=N.useState("0 18 * * *"),[C,E]=N.useState(""),[j,z]=N.useState(null),[D,Y]=N.useState({});N.useEffect(()=>{const ee=c.current;ee&&(e&&!ee.open?(n?(g(n.name),x(n.description??""),b(n.schedule),S(Bx(n.schedule)),E(n.payload.kind==="agentTurn"?n.payload.message:n.payload.kind==="systemEvent"?n.payload.text:""),z(null)):(g(""),x(""),b({kind:"cron",expr:"0 18 * * *"}),S("0 18 * * *"),E(""),z(null)),Y({}),ee.showModal()):!e&&ee.open&&ee.close())},[e,n]);const H=ee=>{const G=Hx[ee];z(ee),b(G.schedule),S(Bx(G.schedule))},L=ee=>{S(ee),z(null),b({kind:"cron",expr:ee})},P=()=>{const ee={};if(f.trim()||(ee.name=!0),C.trim()||(ee.message=!0),v.trim()||(ee.cronExpr=!0),Y(ee),Object.keys(ee).length>0)return;const G=wM({name:f,description:h,schedule:y,message:C,payloadKind:(n==null?void 0:n.payload.kind)==="systemEvent"?"systemEvent":"agentTurn"});n?l(n.id,G):a(G)};return d.jsx("dialog",{ref:c,onClose:s,className:"fixed inset-0 z-50 m-auto max-w-lg rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"max-h-[80vh] overflow-y-auto p-6",children:[d.jsx("h3",{className:"mb-4 text-lg font-semibold text-gray-900 dark:text-gray-100",children:o(n?"cron.dialog.editTitle":"cron.dialog.createTitle")}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[o("cron.dialog.name")," ",d.jsx("span",{className:"text-red-500",children:"*"})]}),d.jsx("input",{type:"text",value:f,onChange:ee=>g(ee.target.value),placeholder:o("cron.dialog.namePlaceholder"),className:`w-full rounded-md border bg-white px-3 py-2 text-sm dark:bg-gray-700 dark:text-gray-100 ${D.name?"border-red-500":"border-gray-300 dark:border-gray-600"}`}),D.name&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:o("cron.dialog.required")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("cron.dialog.description")}),d.jsx("input",{type:"text",value:h,onChange:ee=>x(ee.target.value),placeholder:o("cron.dialog.descriptionPlaceholder"),className:"w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("cron.dialog.schedule")}),d.jsx("div",{className:"mb-3 flex flex-wrap gap-2",children:Hx.map((ee,G)=>d.jsx("button",{type:"button",onClick:()=>H(G),className:`rounded-md border px-3 py-1.5 text-xs font-medium transition-colors ${j===G?"border-blue-500 bg-blue-50 text-blue-700 dark:border-blue-400 dark:bg-blue-900/20 dark:text-blue-400":"border-gray-300 text-gray-600 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700"}`,children:o(ee.labelKey)},G))}),d.jsx("input",{type:"text",value:v,onChange:ee=>L(ee.target.value),placeholder:"0 * * * *",className:`w-full rounded-md border bg-white px-3 py-2 text-sm font-mono dark:bg-gray-700 dark:text-gray-100 ${D.cronExpr?"border-red-500":"border-gray-300 dark:border-gray-600"}`}),d.jsx("p",{className:"mt-1 text-xs text-gray-400",children:o("cron.dialog.cronHelp")})]}),d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[o("cron.dialog.message")," ",d.jsx("span",{className:"text-red-500",children:"*"})]}),d.jsx("textarea",{value:C,onChange:ee=>E(ee.target.value),placeholder:o("cron.dialog.messagePlaceholder"),rows:3,className:`w-full rounded-md border bg-white px-3 py-2 text-sm dark:bg-gray-700 dark:text-gray-100 ${D.message?"border-red-500":"border-gray-300 dark:border-gray-600"}`}),D.message&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:o("cron.dialog.required")})]})]}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:s,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:o("common:actions.cancel")}),d.jsx("button",{type:"button",onClick:P,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:o(n?"common:actions.save":"common:actions.create")})]})]})})}function CM(){const{t:e}=oe("console"),{tasks:n,isLoading:a,error:l,dialogOpen:s,editingTask:o,fetchTasks:c,addTask:f,updateTask:g,removeTask:h,runTask:x,openDialog:y,closeDialog:b,initEventListeners:v}=mM(),[S,C]=N.useState(null),[E,j]=N.useState(null);N.useEffect(()=>(c(),v()),[c,v]);const z=(L,P)=>{g(L,{enabled:P})},D=async()=>{S&&(await h(S),C(null))},Y=async()=>{E&&(await x(E),j(null),await c())};if(a&&n.length===0)return d.jsxs("div",{className:"space-y-6",children:[d.jsx(xf,{title:e("cron.title"),description:e("cron.description"),onRefresh:c,onCreate:()=>y()}),d.jsx(Wi,{})]});if(l&&n.length===0)return d.jsxs("div",{className:"space-y-6",children:[d.jsx(xf,{title:e("cron.title"),description:e("cron.description"),onRefresh:c,onCreate:()=>y()}),d.jsx(gu,{message:l,onRetry:c})]});const H=[...n].sort((L,P)=>{const ee=L.state.nextRunAtMs??1/0,G=P.state.nextRunAtMs??1/0;return ee-G});return d.jsxs("div",{className:"space-y-6",children:[d.jsx(xf,{title:e("cron.title"),description:e("cron.description"),onRefresh:c,loading:a,onCreate:()=>y()}),d.jsx(yM,{tasks:n}),n.length===0?d.jsx(Ii,{icon:Wo,title:e("cron.empty.title"),action:{label:e("cron.empty.createFirst"),onClick:()=>y()}}):d.jsx("div",{className:"space-y-3",children:H.map(L=>d.jsx(SM,{task:L,onToggle:z,onRun:j,onEdit:y,onDelete:C},L.id))}),d.jsx(jM,{open:s,editingTask:o,onSave:f,onUpdate:g,onClose:b}),d.jsx($i,{open:S!==null,title:e("cron.delete.title"),description:e("cron.delete.description"),onConfirm:D,onCancel:()=>C(null),variant:"danger"}),d.jsx($i,{open:E!==null,title:e("cron.run.title"),description:e("cron.run.description"),onConfirm:Y,onCancel:()=>j(null)})]})}function xf({title:e,description:n,onRefresh:a,loading:l,onCreate:s}){const{t:o}=oe("common");return d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:n})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-blue-700 transition-colors",children:[d.jsx(fr,{className:"h-3.5 w-3.5"}),o("actions.create")]}),d.jsxs("button",{type:"button",onClick:a,disabled:l,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),o("actions.refresh")]})]})]})}const mt=oa((e,n)=>({config:null,hash:null,configPath:null,configRaw:null,configValid:!0,loading:!1,error:null,schemaHints:null,status:null,statusLoading:!1,statusError:null,updateResult:null,updateLoading:!1,fetchConfig:async()=>{e({loading:!0,error:null});try{const l=await(await kt()).configGet();e({config:l.config,hash:l.hash??null,configPath:l.path??null,configRaw:l.raw??null,configValid:l.valid,loading:!1})}catch(a){e({loading:!1,error:String(a)})}},patchConfig:async a=>{const{hash:l}=n();try{const s=await kt(),o=JSON.stringify(a),c=await s.configPatch(o,l??void 0);if(c.ok)e({config:c.config,error:null}),await n().fetchConfig();else{const f=c.error??"config patch failed";e({error:f}),f.includes("config changed")&&await n().fetchConfig()}return c}catch(s){const o=String(s);return e({error:o}),{ok:!1,config:n().config??{},error:o}}},fetchSchema:async()=>{try{const l=await(await kt()).configSchema();e({schemaHints:l})}catch{}},fetchStatus:async()=>{e({statusLoading:!0,statusError:null});try{const l=await(await kt()).statusSummary();e({status:l,statusLoading:!1})}catch(a){e({statusLoading:!1,statusError:String(a)})}},runUpdate:async a=>{e({updateLoading:!0,updateResult:null});try{const s=await(await kt()).updateRun(a);return e({updateResult:s,updateLoading:!1}),s}catch(l){const s={ok:!1,result:{status:"error",mode:"unknown",reason:String(l),steps:[],durationMs:0},restart:null};return e({updateResult:s,updateLoading:!1}),s}}})),qx="openclaw-console-theme",Ix="openclaw-console-lang",$x="openclaw-console-dev-mode";function Fx(e,n){return typeof window>"u"?n:localStorage.getItem(e)??n}function NM(e,n){if(typeof window>"u")return n;const a=localStorage.getItem(e);return a===null?n:a==="true"}const Fi=oa(e=>({theme:Fx(qx,"system"),language:Fx(Ix,"zh"),devModeUnlocked:NM($x,!1),setTheme:n=>{localStorage.setItem(qx,n),e({theme:n})},setLanguage:n=>{localStorage.setItem(Ix,n),e({language:n})},setDevModeUnlocked:n=>{localStorage.setItem($x,String(n)),e({devModeUnlocked:n})}})),EM=[{value:"light",icon:JN,labelKey:"settings.appearance.themeLight"},{value:"dark",icon:MN,labelKey:"settings.appearance.themeDark"},{value:"system",icon:_N,labelKey:"settings.appearance.themeSystem"}],AM=[{value:"zh",labelKey:"settings.appearance.langZh"},{value:"en",labelKey:"settings.appearance.langEn"}];function TM(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function _M(){const{t:e,i18n:n}=oe("console"),a=Fi(c=>c.theme),l=Fi(c=>c.setTheme),s=he(c=>c.setTheme),o=c=>{l(c);const f=c==="system"?TM():c;s(f)};return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.appearance.title")}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.appearance.theme")}),d.jsx("div",{className:"flex gap-1 rounded-lg border border-gray-200 p-1 dark:border-gray-600",children:EM.map(({value:c,icon:f,labelKey:g})=>d.jsxs("button",{type:"button",onClick:()=>o(c),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${a===c?"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700"}`,children:[d.jsx(f,{className:"h-3.5 w-3.5"}),e(g)]},c))})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.appearance.language")}),d.jsx("div",{className:"flex gap-1 rounded-lg border border-gray-200 p-1 dark:border-gray-600",children:AM.map(({value:c,labelKey:f})=>d.jsx("button",{type:"button",onClick:()=>n.changeLanguage(c),className:`rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${n.language===c?"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700"}`,children:e(f)},c))})]})]})]})}const Rh=["openai-completions","openai-responses","openai-codex-responses","anthropic-messages","google-generative-ai","github-copilot","bedrock-converse-stream","ollama"],DM=["text","image"],MM=["openai","zai","qwen"],RM=["max_completion_tokens","max_tokens"];function OM(){return{id:"",name:"",reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192}}const Pt=[{id:"anthropic",name:"Anthropic",icon:"🤖",defaultBaseUrl:"https://api.anthropic.com",defaultApi:"anthropic-messages",requiresApiKey:!0,placeholder:"sk-ant-..."},{id:"openai",name:"OpenAI",icon:"🧠",defaultBaseUrl:"https://api.openai.com/v1",defaultApi:"openai-responses",requiresApiKey:!0,placeholder:"sk-..."},{id:"google",name:"Google AI",icon:"🔮",defaultBaseUrl:"https://generativelanguage.googleapis.com",defaultApi:"google-generative-ai",requiresApiKey:!0},{id:"openrouter",name:"OpenRouter",icon:"🔀",defaultBaseUrl:"https://openrouter.ai/api/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-or-..."},{id:"deepseek",name:"DeepSeek",icon:"🔍",defaultBaseUrl:"https://api.deepseek.com/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-..."},{id:"moonshot",name:"Moonshot (CN)",icon:"🌙",defaultBaseUrl:"https://api.moonshot.cn/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-..."},{id:"qwen",name:"通义千问 (CN)",icon:"🌐",defaultBaseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-..."},{id:"siliconflow",name:"SiliconFlow (CN)",icon:"⚡",defaultBaseUrl:"https://api.siliconflow.cn/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-..."},{id:"ollama",name:"Ollama",icon:"🦙",defaultBaseUrl:"http://localhost:11434",defaultApi:"ollama",requiresApiKey:!1},{id:"bedrock",name:"AWS Bedrock",icon:"☁️",defaultBaseUrl:"",defaultApi:"bedrock-converse-stream",requiresApiKey:!1},{id:"github-copilot",name:"GitHub Copilot",icon:"🐙",defaultBaseUrl:"",defaultApi:"github-copilot",requiresApiKey:!1},{id:"custom",name:"Custom",icon:"⚙️",defaultBaseUrl:"",defaultApi:"openai-completions",requiresApiKey:!0}];function rv(e,n,a){const l=Pt.find(s=>s.id===e);if(l)return l;if(n){const s=Pt.find(o=>o.defaultApi===n);if(s)return s}if(a){if(a.includes("anthropic.com"))return Pt[0];if(a.includes("openai.com"))return Pt[1];if(a.includes("googleapis.com"))return Pt[2];if(a.includes("openrouter.ai"))return Pt[3];if(a.includes("deepseek.com"))return Pt[4];if(a.includes("moonshot.cn"))return Pt[5];if(a.includes("dashscope.aliyuncs.com"))return Pt[6];if(a.includes("siliconflow.cn"))return Pt[7];if(a.includes("localhost:11434"))return Pt[8]}return Pt[Pt.length-1]}const Oh="__OPENCLAW_REDACTED__";function zM(e){return Array.isArray(e)?e.map(n=>({id:String(n.id??""),name:String(n.name??""),api:n.api,reasoning:n.reasoning===!0,input:Array.isArray(n.input)?n.input:["text"],cost:n.cost?{input:Number(n.cost.input??0),output:Number(n.cost.output??0),cacheRead:Number(n.cost.cacheRead??0),cacheWrite:Number(n.cost.cacheWrite??0)}:void 0,contextWindow:typeof n.contextWindow=="number"?n.contextWindow:void 0,maxTokens:typeof n.maxTokens=="number"?n.maxTokens:void 0,compat:n.compat})):[]}function lv(e){const n={id:e.id,name:e.name,reasoning:e.reasoning??!1,input:e.input??["text"]};return e.api&&(n.api=e.api),e.cost&&(n.cost=e.cost),e.contextWindow&&(n.contextWindow=e.contextWindow),e.maxTokens&&(n.maxTokens=e.maxTokens),e.compat&&(n.compat=e.compat),e.headers&&(n.headers=e.headers),n}function LM({providerId:e,config:n,onEdit:a,onDelete:l}){const{t:s}=oe("console"),o=rv(e,n.api,n.baseUrl),f=typeof n.auth=="string"&&n.auth.length>0||n.apiKey===Oh||typeof n.apiKey=="string"&&n.apiKey.length>0,g=Array.isArray(n.models)?n.models:[],h=g.filter(y=>y.reasoning===!0).length,x=g.filter(y=>Array.isArray(y.input)&&y.input.includes("image")).length;return d.jsx("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-3 dark:border-gray-600 dark:bg-gray-700/50",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d.jsx("span",{className:"text-xl",title:o.name,children:o.icon}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:e}),o.id!==e&&d.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",o.name,")"]})]}),d.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-500 dark:text-gray-400",children:[typeof n.baseUrl=="string"&&n.baseUrl&&d.jsx("span",{className:"truncate max-w-48",title:n.baseUrl,children:n.baseUrl}),typeof n.api=="string"&&d.jsx("span",{children:n.api})]})]})]}),d.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[g.length>0&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:s("settings.providers.modelCount",{count:g.length})}),h>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-purple-600 dark:text-purple-400",title:s("settings.providers.models.reasoning"),children:[d.jsx(_f,{className:"h-3 w-3"}),h]}),x>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-green-600 dark:text-green-400",title:s("settings.providers.models.input_image"),children:[d.jsx(Df,{className:"h-3 w-3"}),x]})]}),o.requiresApiKey&&d.jsx("span",{className:"flex items-center gap-1 text-xs",children:f?d.jsxs(d.Fragment,{children:[d.jsx(lh,{className:"h-3.5 w-3.5 text-green-500"}),d.jsx("span",{className:"text-green-600 dark:text-green-400",children:s("settings.providers.apiKeyConfigured")})]}):d.jsxs(d.Fragment,{children:[d.jsx(Jo,{className:"h-3.5 w-3.5 text-amber-500"}),d.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:s("settings.providers.apiKeyNotConfigured")})]})}),d.jsx("button",{type:"button",onClick:a,className:"rounded p-1.5 text-gray-500 hover:bg-gray-200 hover:text-gray-700 dark:hover:bg-gray-600 dark:hover:text-gray-300 transition-colors",title:"Edit",children:d.jsx(Db,{className:"h-4 w-4"})}),d.jsx("button",{type:"button",onClick:l,className:"rounded p-1.5 text-gray-500 hover:bg-red-100 hover:text-red-600 dark:hover:bg-red-900/30 dark:hover:text-red-400 transition-colors",title:"Delete",children:d.jsx(Yi,{className:"h-4 w-4"})})]})]})})}function UM({model:e,onChange:n,onRemove:a,defaultCollapsed:l=!1}){var S,C,E;const{t:s}=oe("console"),[o,c]=N.useState(l),[f,g]=N.useState(!1),h=j=>n({...e,...j}),x=(j,z)=>{const D=e.cost??{input:0,output:0,cacheRead:0,cacheWrite:0};n({...e,cost:{...D,[j]:z}})},y=j=>{const z=e.input??["text"],D=z.includes(j)?z.filter(Y=>Y!==j):[...z,j];D.length!==0&&h({input:D})},b=j=>{n({...e,compat:{...e.compat??{},...j}})},v=e.name||e.id||s("settings.providers.models.untitled");return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-gray-50/50 dark:border-gray-600 dark:bg-gray-700/30",children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[d.jsxs("button",{type:"button",onClick:()=>c(!o),className:"flex items-center gap-2 text-sm font-medium text-gray-800 dark:text-gray-200",children:[o?d.jsx(sa,{className:"h-4 w-4"}):d.jsx(rh,{className:"h-4 w-4"}),d.jsx("span",{className:"truncate max-w-xs",children:v}),e.reasoning&&d.jsx("span",{title:"reasoning",children:d.jsx(_f,{className:"h-3.5 w-3.5 text-purple-500"})}),((S=e.input)==null?void 0:S.includes("image"))&&d.jsx("span",{title:"image",children:d.jsx(Df,{className:"h-3.5 w-3.5 text-green-500"})})]}),d.jsx("button",{type:"button",onClick:a,className:"rounded p-1 text-gray-400 hover:bg-red-100 hover:text-red-500 dark:hover:bg-red-900/30 transition-colors",title:s("settings.providers.models.remove"),children:d.jsx(Yi,{className:"h-4 w-4"})})]}),!o&&d.jsxs("div",{className:"space-y-4 border-t border-gray-200 px-4 py-4 dark:border-gray-600",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(Dn,{label:s("settings.providers.models.id"),children:d.jsx("input",{type:"text",value:e.id,onChange:j=>h({id:j.target.value}),className:vi,placeholder:"gpt-4o"})}),d.jsx(Dn,{label:s("settings.providers.models.name"),children:d.jsx("input",{type:"text",value:e.name,onChange:j=>h({name:j.target.value}),className:vi,placeholder:"GPT-4o"})})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(Dn,{label:s("settings.providers.models.reasoning"),children:d.jsx(Kx,{active:e.reasoning===!0,onClick:()=>h({reasoning:!e.reasoning}),icon:d.jsx(_f,{className:"h-4 w-4"}),label:e.reasoning?s("settings.providers.models.yes"):s("settings.providers.models.no")})}),d.jsx(Dn,{label:s("settings.providers.models.inputTypes"),children:d.jsx("div",{className:"flex gap-2",children:DM.map(j=>d.jsx(Kx,{active:(e.input??["text"]).includes(j),onClick:()=>y(j),icon:j==="text"?d.jsx(n4,{className:"h-4 w-4"}):d.jsx(Df,{className:"h-4 w-4"}),label:s(`settings.providers.models.input_${j}`)},j))})})]}),d.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[d.jsx(Dn,{label:s("settings.providers.models.apiOverride"),children:d.jsxs("div",{className:"relative",children:[d.jsxs("select",{value:e.api??"",onChange:j=>h({api:j.target.value?j.target.value:void 0}),className:bf,"aria-label":s("settings.providers.models.apiOverride"),children:[d.jsx("option",{value:"",children:s("settings.providers.models.inheritProvider")}),Rh.map(j=>d.jsx("option",{value:j,children:j},j))]}),d.jsx(vf,{})]})}),d.jsx(Dn,{label:s("settings.providers.models.contextWindow"),children:d.jsx("input",{type:"number",value:e.contextWindow??"",onChange:j=>h({contextWindow:j.target.value?Number(j.target.value):void 0}),className:vi,placeholder:"128000",min:1})}),d.jsx(Dn,{label:s("settings.providers.models.maxTokens"),children:d.jsx("input",{type:"number",value:e.maxTokens??"",onChange:j=>h({maxTokens:j.target.value?Number(j.target.value):void 0}),className:vi,placeholder:"8192",min:1})})]}),d.jsxs(Dn,{label:s("settings.providers.models.cost"),children:[d.jsx("p",{className:"mb-2 text-xs text-gray-500 dark:text-gray-400",children:s("settings.providers.models.costHint")}),d.jsx("div",{className:"grid grid-cols-4 gap-3",children:["input","output","cacheRead","cacheWrite"].map(j=>{var z;return d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs text-gray-500 dark:text-gray-400",children:s(`settings.providers.models.cost_${j}`)}),d.jsx("input",{type:"number",value:((z=e.cost)==null?void 0:z[j])??"",onChange:D=>x(j,D.target.value?Number(D.target.value):0),className:vi,placeholder:"0",min:0,step:"0.01"})]},j)})})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>g(!f),className:"flex items-center gap-1 text-xs text-blue-600 hover:underline dark:text-blue-400",children:[d.jsx(Rb,{className:"h-3 w-3"}),s(f?"settings.providers.models.hideAdvanced":"settings.providers.models.showAdvanced")]}),f&&d.jsxs("div",{className:"mt-3 space-y-3 rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-600 dark:bg-gray-800",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(Dn,{label:s("settings.providers.models.thinkingFormat"),children:d.jsxs("div",{className:"relative",children:[d.jsxs("select",{value:((C=e.compat)==null?void 0:C.thinkingFormat)??"",onChange:j=>b({thinkingFormat:j.target.value?j.target.value:void 0}),className:bf,"aria-label":s("settings.providers.models.thinkingFormat"),children:[d.jsx("option",{value:"",children:s("settings.providers.models.default")}),MM.map(j=>d.jsx("option",{value:j,children:j},j))]}),d.jsx(vf,{})]})}),d.jsx(Dn,{label:s("settings.providers.models.maxTokensField"),children:d.jsxs("div",{className:"relative",children:[d.jsxs("select",{value:((E=e.compat)==null?void 0:E.maxTokensField)??"",onChange:j=>b({maxTokensField:j.target.value?j.target.value:void 0}),className:bf,"aria-label":s("settings.providers.models.maxTokensField"),children:[d.jsx("option",{value:"",children:s("settings.providers.models.default")}),RM.map(j=>d.jsx("option",{value:j,children:j},j))]}),d.jsx(vf,{})]})})]}),d.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2",children:["supportsStore","supportsDeveloperRole","supportsReasoningEffort","supportsUsageInStreaming","supportsStrictMode","requiresToolResultName","requiresAssistantAfterToolResult","requiresThinkingAsText","requiresMistralToolIds"].map(j=>{var z;return d.jsxs("label",{className:"flex items-center gap-2 text-xs text-gray-700 dark:text-gray-300",children:[d.jsx("input",{type:"checkbox",checked:((z=e.compat)==null?void 0:z[j])===!0,onChange:D=>b({[j]:D.target.checked||void 0}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),s(`settings.providers.models.compat_${j}`)]},j)})})]})]})]})]})}function iv({models:e,onChange:n}){const{t:a}=oe("console"),l=()=>{n([...e,OM()])},s=(c,f)=>{const g=[...e];g[c]=f,n(g)},o=c=>{n(e.filter((f,g)=>g!==c))};return d.jsxs("div",{children:[d.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[d.jsxs("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[a("settings.providers.models.title")," (",e.length,")"]}),d.jsxs("button",{type:"button",onClick:l,className:"flex items-center gap-1 rounded-lg border border-dashed border-gray-300 px-3 py-1.5 text-xs text-gray-600 hover:border-blue-400 hover:text-blue-600 dark:border-gray-500 dark:text-gray-400 dark:hover:border-blue-400 dark:hover:text-blue-400 transition-colors",children:[d.jsx(fr,{className:"h-3.5 w-3.5"}),a("settings.providers.models.add")]})]}),e.length===0?d.jsx("div",{className:"rounded-lg border border-dashed border-gray-300 px-4 py-6 text-center text-sm text-gray-400 dark:border-gray-600",children:a("settings.providers.models.empty")}):d.jsx("div",{className:"space-y-2",children:e.map((c,f)=>d.jsx(UM,{model:c,onChange:g=>s(f,g),onRemove:()=>o(f),defaultCollapsed:c.id.length>0},f))})]})}const vi="w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors",bf="w-full appearance-none rounded-lg border border-gray-300 bg-white px-3 py-2 pr-8 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors";function vf(){return d.jsx(sa,{className:"pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"})}function Dn({label:e,children:n}){return d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-gray-600 dark:text-gray-400",children:e}),n]})}function Kx({active:e,onClick:n,icon:a,label:l}){return d.jsxs("button",{type:"button",onClick:n,className:`flex items-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors ${e?"border-blue-500 bg-blue-50 text-blue-700 dark:border-blue-400 dark:bg-blue-900/30 dark:text-blue-300":"border-gray-300 bg-white text-gray-500 hover:border-gray-400 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-400"}`,children:[a,l]})}function HM({open:e,existingIds:n,onSave:a,onCancel:l}){const{t:s}=oe("console"),o=N.useRef(null),[c,f]=N.useState(1),[g,h]=N.useState(null),[x,y]=N.useState(""),[b,v]=N.useState(""),[S,C]=N.useState(""),[E,j]=N.useState("openai-completions"),[z,D]=N.useState(!1),[Y,H]=N.useState([]);N.useEffect(()=>{const R=o.current;R&&(e&&!R.open?(R.showModal(),f(1),h(null),y(""),v(""),C(""),j("openai-completions"),D(!1),H([])):!e&&R.open&&R.close())},[e]);const L=R=>{h(R),y(R.id==="custom"?"":R.id),v(R.defaultBaseUrl),j(R.defaultApi),f(2)},P=n.includes(x),ee=x.length>0&&!P,G=()=>{if(!ee)return;const R={baseUrl:b,api:E,models:Y.filter(ae=>ae.id.length>0).map(lv)};S&&(R.apiKey=S),a(x,R)};return d.jsx("dialog",{ref:o,onClose:l,className:"fixed inset-0 z-50 m-auto w-[92vw] max-w-3xl max-h-[90vh] overflow-y-auto rounded-xl border border-gray-200 bg-white p-0 shadow-2xl backdrop:bg-black/50 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-8",children:[c===1&&d.jsxs("div",{children:[d.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:s("settings.providers.addDialog.title")}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:s("settings.providers.addDialog.selectType")}),d.jsx("div",{className:"mt-6 grid grid-cols-3 gap-3 sm:grid-cols-4",children:Pt.map(R=>d.jsxs("button",{type:"button",onClick:()=>L(R),className:"flex flex-col items-center gap-2 rounded-xl border border-gray-200 px-4 py-5 text-center hover:border-blue-400 hover:bg-blue-50/80 dark:border-gray-600 dark:hover:border-blue-500 dark:hover:bg-blue-900/20 transition-all",children:[d.jsx("span",{className:"text-2xl",children:R.icon}),d.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-gray-200",children:R.name})]},R.id))}),d.jsx("div",{className:"mt-6 flex justify-end",children:d.jsx("button",{type:"button",onClick:l,className:"rounded-lg border border-gray-300 px-5 py-2.5 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:s("settings.providers.addDialog.cancel")})})]}),c===2&&g&&d.jsxs("div",{children:[d.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:()=>f(1),className:"rounded-lg p-2 text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:d.jsx(Cb,{className:"h-5 w-5"})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-2xl",children:g.icon}),d.jsxs("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:[s("settings.providers.addDialog.title")," — ",g.name]})]})]}),d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:s("settings.providers.addDialog.providerId")}),d.jsx("input",{type:"text",value:x,onChange:R=>y(R.target.value.replace(/\s/g,"-").toLowerCase()),className:kf,placeholder:g.id}),d.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:s("settings.providers.addDialog.providerIdHint")}),P&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:s("settings.providers.addDialog.idConflict")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:s("settings.providers.addDialog.apiType")}),d.jsxs("div",{className:"relative",children:[d.jsx("select",{value:E,onChange:R=>j(R.target.value),className:BM,children:Rh.map(R=>d.jsx("option",{value:R,children:R},R))}),d.jsx(sa,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"})]})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:s("settings.providers.addDialog.baseUrl")}),d.jsx("input",{type:"text",value:b,onChange:R=>v(R.target.value),className:kf,placeholder:"https://api.example.com/v1"})]}),g.requiresApiKey&&d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:s("settings.providers.addDialog.apiKey")}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:z?"text":"password",value:S,onChange:R=>C(R.target.value),className:`${kf} pr-11`,placeholder:g.placeholder??"sk-..."}),d.jsx("button",{type:"button",onClick:()=>D(!z),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",children:z?d.jsx(eu,{className:"h-4 w-4"}):d.jsx(tu,{className:"h-4 w-4"})})]})]}),d.jsx("hr",{className:"border-gray-200 dark:border-gray-600"}),d.jsx(iv,{models:Y,onChange:H})]}),d.jsxs("div",{className:"mt-8 flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:l,className:"rounded-lg border border-gray-300 px-5 py-2.5 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:s("settings.providers.addDialog.cancel")}),d.jsx("button",{type:"button",onClick:G,disabled:!ee,className:"rounded-lg bg-blue-600 px-5 py-2.5 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:s("settings.providers.addDialog.save")})]})]})]})})}const kf="w-full rounded-lg border border-gray-300 bg-white px-4 py-2.5 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors",BM="w-full appearance-none rounded-lg border border-gray-300 bg-white px-4 py-2.5 pr-10 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors";function qM({open:e,providerId:n,config:a,onSave:l,onCancel:s}){const{t:o}=oe("console"),c=N.useRef(null),f=rv(n,a.api,a.baseUrl),[g,h]=N.useState(String(a.baseUrl??"")),[x,y]=N.useState(""),[b,v]=N.useState(a.api??"openai-completions"),[S,C]=N.useState(!1),[E,j]=N.useState(()=>zM(a.models));N.useEffect(()=>{const H=c.current;H&&(e&&!H.open?H.showModal():!e&&H.open&&H.close())},[e]);const z=()=>{const H={baseUrl:g,api:b,models:E.filter(L=>L.id.length>0).map(lv)};x.length>0&&(H.apiKey=x),l(H)},Y=typeof a.auth=="string"&&a.auth.length>0||a.apiKey===Oh||typeof a.apiKey=="string"&&a.apiKey.length>0;return d.jsx("dialog",{ref:c,onClose:s,className:"fixed inset-0 z-50 m-auto w-[92vw] max-w-3xl max-h-[90vh] overflow-y-auto rounded-xl border border-gray-200 bg-white p-0 shadow-2xl backdrop:bg-black/50 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-8",children:[d.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[d.jsx("span",{className:"text-2xl",children:f.icon}),d.jsxs("div",{children:[d.jsxs("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:[o("settings.providers.editDialog.title")," — ",n]}),f.id!==n&&d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:f.name})]})]}),d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("settings.providers.addDialog.apiType")}),d.jsxs("div",{className:"relative",children:[d.jsx("select",{value:b,onChange:H=>v(H.target.value),className:IM,children:Rh.map(H=>d.jsx("option",{value:H,children:H},H))}),d.jsx(sa,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("settings.providers.addDialog.baseUrl")}),d.jsx("input",{type:"text",value:g,onChange:H=>h(H.target.value),className:Px})]})]}),f.requiresApiKey&&d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("settings.providers.addDialog.apiKey")}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:S?"text":"password",value:x,onChange:H=>y(H.target.value),className:`${Px} pr-11`,placeholder:Y?o("settings.providers.editDialog.apiKeyPlaceholder"):f.placeholder}),d.jsx("button",{type:"button",onClick:()=>C(!S),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",children:S?d.jsx(eu,{className:"h-4 w-4"}):d.jsx(tu,{className:"h-4 w-4"})})]}),Y&&!x&&d.jsx("p",{className:"mt-1 text-xs text-green-600 dark:text-green-400",children:o("settings.providers.apiKeyConfigured")})]}),d.jsx("hr",{className:"border-gray-200 dark:border-gray-600"}),d.jsx(iv,{models:E,onChange:j})]}),d.jsxs("div",{className:"mt-8 flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:s,className:"rounded-lg border border-gray-300 px-5 py-2.5 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:o("settings.providers.editDialog.cancel")}),d.jsx("button",{type:"button",onClick:z,className:"rounded-lg bg-blue-600 px-5 py-2.5 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:o("settings.providers.editDialog.save")})]})]})})}const Px="w-full rounded-lg border border-gray-300 bg-white px-4 py-2.5 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors",IM="w-full appearance-none rounded-lg border border-gray-300 bg-white px-4 py-2.5 pr-10 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors";function $M(e){if(!e)return{};const n=e.models;return(n==null?void 0:n.providers)??{}}function FM(){const{t:e}=oe("console"),n=mt(S=>S.config),a=mt(S=>S.patchConfig),[l,s]=N.useState(!1),[o,c]=N.useState(null),[f,g]=N.useState(null),h=$M(n),x=Object.entries(h),y=async(S,C)=>{await a({models:{providers:{[S]:C}}}),s(!1)},b=async S=>{o&&(await a({models:{providers:{[o.id]:S}}}),c(null))},v=async()=>{f&&(await a({models:{providers:{[f]:null}}}),g(null))};return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.providers.title")}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e("settings.providers.description")})]}),d.jsxs("button",{type:"button",onClick:()=>s(!0),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:[d.jsx(fr,{className:"h-4 w-4"}),e("settings.providers.add")]})]}),x.length===0?d.jsx(Ii,{icon:GC,title:e("settings.providers.empty"),description:e("settings.providers.emptyHint")}):d.jsx("div",{className:"space-y-2",children:x.map(([S,C])=>d.jsx(LM,{providerId:S,config:C,onEdit:()=>c({id:S,config:C}),onDelete:()=>g(S)},S))}),d.jsx(HM,{open:l,existingIds:Object.keys(h),onSave:y,onCancel:()=>s(!1)}),o&&d.jsx(qM,{open:!!o,providerId:o.id,config:o.config,onSave:b,onCancel:()=>c(null)},o.id),d.jsx($i,{open:!!f,title:e("settings.providers.deleteTitle"),description:e("settings.providers.deleteDescription",{name:f??""}),variant:"danger",onConfirm:v,onCancel:()=>g(null)})]})}function KM(){const{t:e}=oe("console"),n=mt(f=>f.status),a=mt(f=>f.statusLoading),l=mt(f=>f.statusError),s=mt(f=>f.fetchStatus),o=n!=null&&n.uptime?Math.floor(n.uptime/3600):0,c=n!=null&&n.uptime?Math.floor(n.uptime%3600/60):0;return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[d.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.gateway.title")}),d.jsxs("button",{type:"button",onClick:s,disabled:a,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${a?"animate-spin":""}`}),e("settings.gateway.refresh")]})]}),l?d.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-amber-50 px-4 py-3 dark:bg-amber-900/20",children:[d.jsx(r4,{className:"h-5 w-5 text-amber-500 shrink-0"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-300",children:e("settings.gateway.notConnected")}),d.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:e("settings.gateway.notConnectedHint")})]})]}):n?d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[d.jsx(sl,{label:e("settings.gateway.version"),value:n.version??"—"}),d.jsx(sl,{label:e("settings.gateway.port"),value:n.port!=null?String(n.port):"—"}),d.jsx(sl,{label:e("settings.gateway.uptime"),value:n.uptime!=null?e("settings.gateway.uptimeFormat",{hours:o,minutes:c}):"—"}),d.jsx(sl,{label:e("settings.gateway.mode"),value:n.mode??"—"}),d.jsx(sl,{label:e("settings.gateway.nodeVersion"),value:n.nodeVersion??"—"}),d.jsx(sl,{label:e("settings.gateway.platform"),value:n.platform??"—"})]}):null]})}function sl({label:e,value:n}){return d.jsxs("div",{className:"rounded-md bg-gray-50 px-3 py-2 dark:bg-gray-700/50",children:[d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e}),d.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:n})]})}function PM(){var x;const{t:e}=oe("console"),n=mt(y=>y.status),a=mt(y=>y.config),l=mt(y=>y.updateResult),s=mt(y=>y.updateLoading),o=mt(y=>y.runUpdate),[c,f]=N.useState(!1),g=(x=a==null?void 0:a.update)==null?void 0:x.channel,h=async()=>{f(!1),await o({restartDelayMs:3e3})};return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.update.title")}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.update.currentVersion")}),d.jsx("span",{className:"text-sm font-mono font-medium text-gray-900 dark:text-gray-100",children:(n==null?void 0:n.version)??"—"})]}),g&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.update.channel")}),d.jsx("span",{className:"rounded-full bg-gray-100 px-2.5 py-0.5 text-xs font-medium text-gray-700 dark:bg-gray-700 dark:text-gray-300",children:g})]}),d.jsx("div",{className:"pt-2",children:d.jsx("button",{type:"button",onClick:()=>f(!0),disabled:s,className:"flex items-center gap-2 rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50 transition-colors",children:s?d.jsxs(d.Fragment,{children:[d.jsx(Ri,{className:"h-4 w-4 animate-spin"}),e("settings.update.updating")]}):d.jsxs(d.Fragment,{children:[d.jsx(Ab,{className:"h-4 w-4"}),e("settings.update.checkUpdate")]})})}),l&&d.jsxs("div",{className:`mt-3 flex items-start gap-2 rounded-lg px-4 py-3 text-sm ${l.result.status==="ok"?"bg-green-50 text-green-800 dark:bg-green-900/20 dark:text-green-300":l.result.status==="noop"?"bg-blue-50 text-blue-800 dark:bg-blue-900/20 dark:text-blue-300":"bg-red-50 text-red-800 dark:bg-red-900/20 dark:text-red-300"}`,children:[l.result.status==="ok"&&d.jsx(lh,{className:"mt-0.5 h-4 w-4 shrink-0"}),l.result.status==="noop"&&d.jsx(Tb,{className:"mt-0.5 h-4 w-4 shrink-0"}),l.result.status==="error"&&d.jsx(au,{className:"mt-0.5 h-4 w-4 shrink-0"}),d.jsxs("span",{children:[l.result.status==="ok"&&e("settings.update.resultOk",{before:l.result.before??"?",after:l.result.after??"?"}),l.result.status==="noop"&&e("settings.update.resultNoop"),l.result.status==="error"&&e("settings.update.resultError",{reason:l.result.reason??"Unknown error"})]})]})]}),d.jsx($i,{open:c,title:e("settings.update.confirmTitle"),description:e("settings.update.confirmDescription"),onConfirm:h,onCancel:()=>f(!1)})]})}function VM(){const{t:e}=oe("console"),n=Fi(l=>l.devModeUnlocked),a=Fi(l=>l.setDevModeUnlocked);return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.advanced.title")}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.advanced.devMode")}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e("settings.advanced.devModeHint")})]}),d.jsx("button",{type:"button",role:"switch","aria-checked":n,onClick:()=>a(!n),className:`relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors ${n?"bg-blue-600":"bg-gray-300 dark:bg-gray-600"}`,children:d.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${n?"translate-x-6":"translate-x-1"}`})})]})]})}function YM(){var S;const{t:e}=oe("console"),n=mt(C=>C.config),a=mt(C=>C.configPath),l=mt(C=>C.status),s=mt(C=>C.configRaw),o=(l==null?void 0:l.configPath)??a,[c,f]=N.useState(!1),[g,h]=N.useState(null),x=(S=n==null?void 0:n.gateway)==null?void 0:S.auth,y=(x==null?void 0:x.token)===Oh,b="ws://localhost:18789",v=(C,E)=>{navigator.clipboard.writeText(C),h(E),setTimeout(()=>h(null),2e3)};return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.developer.title")}),d.jsxs("div",{className:"space-y-3",children:[d.jsx(Sf,{label:e("settings.developer.gatewayToken"),value:y?e("settings.developer.tokenConfigured"):"—",hint:e("settings.developer.tokenHint")}),d.jsx(Sf,{label:e("settings.developer.configPath"),value:o??"—",copyable:!0,onCopy:()=>o&&v(o,"path"),copied:g==="path",copiedLabel:e("settings.developer.copied")}),d.jsx(Sf,{label:e("settings.developer.wsUrl"),value:b,copyable:!0,onCopy:()=>v(b,"ws"),copied:g==="ws",copiedLabel:e("settings.developer.copied")}),s&&d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>f(!c),className:"flex items-center gap-1.5 text-sm text-blue-600 hover:underline dark:text-blue-400",children:[c?d.jsx(rh,{className:"h-4 w-4"}):d.jsx(sa,{className:"h-4 w-4"}),e(c?"settings.developer.hideConfig":"settings.developer.showConfig")," ",e("settings.developer.rawConfig")]}),c&&d.jsx("pre",{className:"mt-2 max-h-64 overflow-auto rounded-md bg-gray-100 p-3 text-xs text-gray-800 dark:bg-gray-900 dark:text-gray-300",children:s})]})]})]})}function Sf({label:e,value:n,hint:a,copyable:l,onCopy:s,copied:o,copiedLabel:c}){return d.jsxs("div",{className:"flex items-center justify-between rounded-md bg-gray-50 px-3 py-2 dark:bg-gray-700/50",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e}),d.jsx("p",{className:"text-sm font-mono text-gray-900 dark:text-gray-100 truncate",children:n}),a&&d.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500 mt-0.5",children:a})]}),l&&s&&d.jsx("button",{type:"button",onClick:s,className:"shrink-0 rounded p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",title:c,children:o?d.jsx(ul,{className:"h-4 w-4 text-green-500"}):d.jsx(oN,{className:"h-4 w-4"})})]})}function GM(){const{t:e}=oe("console"),n=mt(a=>a.status);return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.about.title")}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"text-center py-2",children:[d.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-gray-100",children:e("settings.about.appName")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("settings.about.tagline")}),(n==null?void 0:n.version)&&d.jsxs("p",{className:"mt-1 text-xs text-gray-400 dark:text-gray-500",children:[e("settings.about.version"),": ",n.version]})]}),d.jsxs("div",{className:"flex justify-center gap-4 pt-2",children:[d.jsxs("a",{href:"https://docs.openclaw.ai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-sm text-blue-600 hover:underline dark:text-blue-400",children:[d.jsx(Mi,{className:"h-3.5 w-3.5"}),e("settings.about.docs")]}),d.jsxs("a",{href:"https://github.com/openclaw/openclaw",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-sm text-blue-600 hover:underline dark:text-blue-400",children:[d.jsx(Mi,{className:"h-3.5 w-3.5"}),e("settings.about.github")]})]})]})]})}function QM(){const{t:e}=oe("console"),n=mt(o=>o.loading),a=mt(o=>o.fetchConfig),l=mt(o=>o.fetchStatus),s=Fi(o=>o.devModeUnlocked);return N.useEffect(()=>{a(),l()},[a,l]),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e("settings.title")}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:e("settings.description")})]}),n?d.jsx(Wi,{}):d.jsxs("div",{className:"space-y-4",children:[d.jsx(_M,{}),d.jsx(FM,{}),d.jsx(KM,{}),d.jsx(PM,{}),d.jsx(VM,{}),s&&d.jsx(YM,{}),d.jsx(GM,{})]})]})}const qa=oa((e,n)=>({agents:[],defaultAgentId:"",selectedAgentId:null,activeTab:"overview",isLoading:!1,error:null,searchQuery:"",files:[],filesLoading:!1,selectedFileName:null,fileContent:null,originalFileContent:null,isFileDirty:!1,fileSaving:!1,createDialogOpen:!1,deleteDialogOpen:!1,systemModels:[],agentModelConfigs:{},fetchSystemModels:async()=>{var a;try{await kt();const s=(await Xe().configGet()).config,o=s==null?void 0:s.models,c=o==null?void 0:o.providers,f=[];if(c)for(const[x,y]of Object.entries(c)){const b=y.models;if(b)for(const v of b)f.push({id:`${x}/${v.id}`,label:v.name??v.id,provider:x})}const g={},h=(a=s==null?void 0:s.agents)==null?void 0:a.list;if(h)for(const x of h){const y=x.id;if(!y)continue;const b=x.model;if(typeof b=="string")g[y]={primary:b,fallbacks:[]};else if(b&&typeof b=="object"&&!Array.isArray(b)){const v=b;g[y]={primary:v.primary??"",fallbacks:v.fallbacks??[]}}}e({systemModels:f,agentModelConfigs:g})}catch{}},fetchAgents:async()=>{e({isLoading:!0,error:null});try{await kt();const a=await Xe().agentsList(),l=a.agents.map(c=>({...c,default:c.id===a.defaultId})),{selectedAgentId:s}=n(),o=s??a.defaultId;e({agents:l,defaultAgentId:a.defaultId,selectedAgentId:o,isLoading:!1})}catch(a){e({error:String(a),isLoading:!1})}},selectAgent:a=>{e({selectedAgentId:a,activeTab:"overview",files:[],selectedFileName:null,fileContent:null,originalFileContent:null,isFileDirty:!1})},setActiveTab:a=>e({activeTab:a}),setSearchQuery:a=>e({searchQuery:a}),fetchFiles:async a=>{e({filesLoading:!0,files:[]});try{await kt();const l=await Xe().agentsFilesList(a);e({files:l.files,filesLoading:!1})}catch{e({filesLoading:!1})}},fetchFileContent:async(a,l)=>{e({selectedFileName:l,fileContent:null,originalFileContent:null,isFileDirty:!1});try{await kt();const s=await Xe().agentsFilesGet(a,l);e({fileContent:s.file.content,originalFileContent:s.file.content,isFileDirty:!1})}catch{e({fileContent:"",originalFileContent:""})}},setFileContent:a=>{const{originalFileContent:l}=n();e({fileContent:a,isFileDirty:a!==l})},resetFileContent:()=>{const{originalFileContent:a}=n();e({fileContent:a,isFileDirty:!1})},saveFileContent:async(a,l,s)=>{e({fileSaving:!0});try{return await kt(),await Xe().agentsFilesSet(a,l,s),e({fileSaving:!1,originalFileContent:s,isFileDirty:!1}),!0}catch{return e({fileSaving:!1}),!1}},createAgent:async a=>{try{await kt();const l=await Xe().agentsCreate(a);return l.ok?(await n().fetchAgents(),l.agentId):null}catch{return null}},updateAgentModel:async(a,l)=>{try{return await kt(),(await Xe().agentsUpdate({agentId:a,model:l})).ok}catch{return!1}},deleteAgent:async(a,l)=>{try{return await kt(),(await Xe().agentsDelete({agentId:a,deleteFiles:l})).ok?(e({selectedAgentId:null}),await n().fetchAgents(),!0):!1}catch{return!1}},setCreateDialogOpen:a=>e({createDialogOpen:a}),setDeleteDialogOpen:a=>e({deleteDialogOpen:a})}));function XM({agent:e,isSelected:n,isDefault:a,onSelect:l}){var g,h,x;const{t:s}=oe("console"),o=((g=e.identity)==null?void 0:g.name)??e.name??e.id,c=(h=e.identity)==null?void 0:h.emoji,f=(x=e.identity)==null?void 0:x.avatarUrl;return d.jsxs("button",{onClick:l,className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-colors ${n?"border-l-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20":"hover:bg-gray-50 dark:hover:bg-gray-800"}`,children:[d.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gray-100 text-lg dark:bg-gray-800",children:f?d.jsx("img",{src:f,alt:o,className:"h-9 w-9 rounded-lg object-cover"}):d.jsx("span",{children:c??o.charAt(0).toLowerCase()})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-900 dark:text-gray-100",children:o}),a&&d.jsx("span",{className:"shrink-0 rounded-md bg-gray-200 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-gray-600 dark:bg-gray-700 dark:text-gray-300",children:s("agents.defaultBadge")})]}),d.jsx("p",{className:"truncate text-xs text-gray-500 dark:text-gray-400",children:e.id})]})]})}function ZM(){const{t:e}=oe("console"),{agents:n,isLoading:a,selectedAgentId:l,searchQuery:s,defaultAgentId:o,fetchAgents:c,selectAgent:f,setSearchQuery:g,setCreateDialogOpen:h}=qa(),x=n.filter(y=>{var S;if(!s)return!0;const b=s.toLowerCase();return(((S=y.identity)==null?void 0:S.name)??y.name??y.id).toLowerCase().includes(b)||y.id.toLowerCase().includes(b)});return d.jsxs("div",{className:"flex w-72 shrink-0 flex-col rounded-2xl border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 px-4 py-3 dark:border-gray-700",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.panelTitle")}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e("agents.configured",{count:n.length})})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("button",{onClick:()=>h(!0),className:"rounded-md p-1.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",title:e("agents.addAgent"),children:d.jsx(fr,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>c(),disabled:a,className:"rounded-md p-1.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:opacity-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",title:e("agents.refresh"),children:d.jsx(hr,{className:`h-4 w-4 ${a?"animate-spin":""}`})})]})]}),d.jsx("div",{className:"px-3 py-2",children:d.jsxs("div",{className:"relative",children:[d.jsx(Mf,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-gray-400"}),d.jsx("input",{type:"text",value:s,onChange:y=>g(y.target.value),placeholder:e("agents.searchPlaceholder"),className:"w-full rounded-lg border border-gray-200 bg-gray-50 py-1.5 pl-8 pr-3 text-xs text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:placeholder:text-gray-500"})]})}),d.jsx("div",{className:"flex-1 overflow-auto px-2 pb-2",children:x.length===0?d.jsx("div",{className:"flex flex-col items-center py-8 text-center",children:d.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:e("agents.noAgents")})}):d.jsx("div",{className:"space-y-1",children:x.map(y=>d.jsx(XM,{agent:y,isSelected:l===y.id,isDefault:y.id===o,onSelect:()=>f(y.id)},y.id))})})]})}function JM({agent:e}){var f,g,h;const{t:n}=oe("console"),a=qa(x=>x.defaultAgentId),l=((f=e.identity)==null?void 0:f.name)??e.name??e.id,s=(g=e.identity)==null?void 0:g.emoji,o=(h=e.identity)==null?void 0:h.avatarUrl,c=e.id===a;return d.jsxs("div",{className:"flex items-start gap-4 rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-700 dark:bg-gray-900",children:[d.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-xl bg-gray-100 text-2xl dark:bg-gray-800",children:o?d.jsx("img",{src:o,alt:l,className:"h-14 w-14 rounded-xl object-cover"}):d.jsx("span",{children:s??l.charAt(0).toLowerCase()})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("div",{className:"flex items-center gap-2",children:d.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-gray-100",children:l})}),d.jsx("p",{className:"mt-0.5 text-sm text-gray-500 dark:text-gray-400",children:n("agents.detailDescription",{id:e.id})})]}),d.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[d.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:e.id}),c&&d.jsx("span",{className:"rounded-md bg-gray-200 px-2 py-0.5 text-xs font-semibold uppercase text-gray-600 dark:bg-gray-700 dark:text-gray-300",children:n("agents.defaultBadge")})]})]})}function WM({agent:e}){var L;const{t:n}=oe("console"),{defaultAgentId:a,updateAgentModel:l,setDeleteDialogOpen:s,systemModels:o,fetchSystemModels:c,agentModelConfigs:f}=qa(),g=e.id===a,h=f[e.id],[x,y]=N.useState((h==null?void 0:h.primary)??""),[b,v]=N.useState((h==null?void 0:h.fallbacks)??[]),[S,C]=N.useState(!1),[E,j]=N.useState("idle");N.useEffect(()=>{o.length===0&&c()},[o.length,c]),N.useEffect(()=>{const P=f[e.id];y((P==null?void 0:P.primary)??""),v((P==null?void 0:P.fallbacks)??[]),j("idle")},[e.id,f]);const z=async()=>{C(!0),j("idle");const P=b.filter(R=>R.length>0),ee=P.length>0?{primary:x||void 0,fallbacks:P}:x||"",G=await l(e.id,ee);C(!1),j(G?"success":"error"),G&&(await c(),setTimeout(()=>j("idle"),2e3))},D=()=>v([...b,""]),Y=P=>v(b.filter((ee,G)=>G!==P)),H=(P,ee)=>{const G=[...b];G[P]=ee,v(G)};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-semibold text-gray-900 dark:text-gray-100",children:n("agents.overview.title")}),d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(wf,{label:n("agents.overview.agentId"),value:e.id,mono:!0}),d.jsx(wf,{label:n("agents.overview.name"),value:((L=e.identity)==null?void 0:L.name)??e.name??e.id}),d.jsx(wf,{label:n("agents.overview.isDefault"),value:n(g?"agents.overview.yes":"agents.overview.no")})]})]}),d.jsxs("div",{className:"border-t border-gray-200 pt-5 dark:border-gray-700",children:[d.jsx("h3",{className:"mb-3 text-sm font-semibold text-gray-900 dark:text-gray-100",children:n("agents.overview.modelConfig")}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-600 dark:text-gray-400",children:n("agents.overview.primaryModel")}),d.jsx(Vx,{value:x,onChange:y,models:o,placeholder:n("agents.overview.primaryModelPlaceholder")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-600 dark:text-gray-400",children:n("agents.overview.fallbackModels")}),b.map((P,ee)=>d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(Vx,{value:P,onChange:G=>H(ee,G),models:o,placeholder:n("agents.overview.fallbackPlaceholder")}),d.jsx("button",{onClick:()=>Y(ee),className:"shrink-0 rounded-md p-1.5 text-gray-400 hover:bg-gray-100 hover:text-red-500 dark:hover:bg-gray-800",children:d.jsx(Ua,{className:"h-4 w-4"})})]},ee)),d.jsxs("button",{onClick:D,className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-700 dark:text-blue-400",children:[d.jsx(fr,{className:"h-3 w-3"}),n("agents.overview.addFallback")]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:z,disabled:S,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:n(S?"agents.overview.saving":"agents.overview.save")}),E==="success"&&d.jsx("span",{className:"text-xs text-green-600",children:n("agents.overview.saveSuccess")}),E==="error"&&d.jsx("span",{className:"text-xs text-red-600",children:n("agents.overview.saveError")})]})]})]}),d.jsxs("div",{className:"border-t border-gray-200 pt-5 dark:border-gray-700",children:[d.jsxs("button",{onClick:()=>s(!0),disabled:g,className:"flex items-center gap-2 rounded-lg border border-red-200 px-4 py-2 text-sm font-medium text-red-600 transition-colors hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-red-800 dark:text-red-400 dark:hover:bg-red-900/20",title:g?n("agents.overview.cannotDeleteDefault"):void 0,children:[d.jsx(Yi,{className:"h-4 w-4"}),n("agents.overview.deleteAgent")]}),g&&d.jsx("p",{className:"mt-1 text-xs text-gray-400",children:n("agents.overview.cannotDeleteDefault")})]})]})}function wf({label:e,value:n,mono:a}){return d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium text-gray-500 dark:text-gray-400",children:e}),d.jsx("dd",{className:`mt-0.5 text-sm text-gray-900 dark:text-gray-100 ${a?"font-mono":""}`,children:n})]})}function Vx({value:e,onChange:n,models:a,placeholder:l}){const s=[...new Set(a.map(c=>c.provider))],o=a.some(c=>c.id===e);return d.jsxs("div",{className:"relative w-full",children:[d.jsxs("select",{value:o?e:"",onChange:c=>n(c.target.value),className:"w-full appearance-none rounded-lg border border-gray-300 bg-white px-3 py-2 pr-8 text-sm text-gray-900 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200",children:[d.jsx("option",{value:"",children:l}),!o&&e&&d.jsx("option",{value:e,children:e}),s.map(c=>d.jsx("optgroup",{label:c,children:a.filter(f=>f.provider===c).map(f=>d.jsxs("option",{value:f.id,children:[f.label," (",f.id,")"]},f.id))},c))]}),d.jsx(sa,{className:"pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"})]})}function eR(e){return e<1024?`${e} B`:`${(e/1024).toFixed(1)} KB`}function tR(e,n){const a=typeof e=="number"?e:new Date(e).getTime();if(Number.isNaN(a)||a===0)return"—";const l=Date.now()-a;if(l<0)return n("agents.files.justNow");const s=Math.floor(l/36e5);if(s<1)return n("agents.files.justNow");if(s<24)return n("agents.files.hoursAgo",{count:s});const o=Math.floor(s/24);return n("agents.files.daysAgo",{count:o})}function nR({agent:e}){const{t:n}=oe("console"),{files:a,filesLoading:l,selectedFileName:s,fileContent:o,isFileDirty:c,fileSaving:f,fetchFiles:g,fetchFileContent:h,setFileContent:x,resetFileContent:y,saveFileContent:b}=qa();N.useEffect(()=>{g(e.id)},[e.id,g]);const v=a.find(C=>C.name===s),S=async()=>{s&&o!=null&&await b(e.id,s,o)};return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:n("agents.files.title")}),d.jsx("p",{className:"mt-0.5 text-xs text-gray-500 dark:text-gray-400",children:n("agents.files.description")})]}),d.jsx("button",{onClick:()=>g(e.id),disabled:l,className:"rounded-md p-1.5 text-gray-500 transition-colors hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800",children:d.jsx(hr,{className:`h-4 w-4 ${l?"animate-spin":""}`})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx("div",{className:"w-56 shrink-0 space-y-2",children:a.map(C=>d.jsxs("button",{onClick:()=>h(e.id,C.name),className:`w-full rounded-xl border px-3 py-2.5 text-left transition-colors ${s===C.name?"border-red-400 bg-red-50 dark:border-red-600 dark:bg-red-900/20":"border-gray-200 hover:border-gray-300 hover:bg-gray-50 dark:border-gray-700 dark:hover:border-gray-600 dark:hover:bg-gray-800"}`,children:[d.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:C.name}),d.jsxs("p",{className:"mt-0.5 text-xs text-gray-500 dark:text-gray-400",children:[eR(C.size)," · ",tR(C.modifiedAt,n)]})]},C.name))}),d.jsx("div",{className:"min-w-0 flex-1",children:v&&o!=null?d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("div",{children:d.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:v.name})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:y,disabled:!c,className:"rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-800",children:n("agents.files.reset")}),d.jsx("button",{onClick:S,disabled:!c||f,className:"rounded-md bg-red-500 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-red-600 disabled:opacity-50",children:n(f?"agents.files.saving":"agents.files.save")})]})]}),d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium text-gray-500 dark:text-gray-400",children:n("agents.files.content")}),d.jsx("textarea",{value:o,onChange:C=>x(C.target.value),className:"h-80 w-full resize-y rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-900 focus:border-blue-500 focus:outline-none dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200"})]})]}):d.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-gray-400 dark:text-gray-500",children:n("agents.files.selectFile")})})]})]})}function aR(){const{t:e}=oe("console");return d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.tools.title")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("agents.tools.noConfig")})]})}function rR(){const{t:e}=oe("console");return d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.skills.title")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("agents.skills.defaultConfig")})]})}function lR(){const{t:e}=oe("console");return d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.channels.title")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("agents.channels.noBindings")})]})}function iR(){const{t:e}=oe("console");return d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.cronJobs.title")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("agents.cronJobs.noCronJobs")})]})}const sR=["overview","files","tools","skills","channels","cronJobs"];function oR({agent:e}){const{t:n}=oe("console"),{activeTab:a,setActiveTab:l}=qa();return d.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[d.jsx("div",{className:"flex border-b border-gray-200 px-4 dark:border-gray-700",children:sR.map(s=>d.jsxs("button",{onClick:()=>l(s),className:`relative px-4 py-3 text-sm font-medium transition-colors ${a===s?"text-red-600 dark:text-red-400":"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"}`,children:[n(`agents.tabs.${s}`),a===s&&d.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 rounded-full bg-red-500"})]},s))}),d.jsxs("div",{className:"p-5",children:[a==="overview"&&d.jsx(WM,{agent:e},e.id),a==="files"&&d.jsx(nR,{agent:e},e.id),a==="tools"&&d.jsx(aR,{}),a==="skills"&&d.jsx(rR,{}),a==="channels"&&d.jsx(lR,{}),a==="cronJobs"&&d.jsx(iR,{})]})]})}function uR(){const{t:e}=oe("console"),{createDialogOpen:n,setCreateDialogOpen:a,createAgent:l,selectAgent:s}=qa(),[o,c]=N.useState(""),[f,g]=N.useState(""),[h,x]=N.useState(""),[y,b]=N.useState(!1),[v,S]=N.useState("");if(!n)return null;const C=()=>{a(!1),c(""),g(""),x(""),S("")},E=async()=>{if(!o.trim()){S(e("agents.createDialog.nameRequired"));return}const j=f.trim()||`~/.openclaw/workspace-${o.trim().toLowerCase().replace(/\s+/g,"-")}`;b(!0),S("");const z=await l({name:o.trim(),workspace:j,emoji:h.trim()||void 0});b(!1),z?(s(z),C()):S(e("agents.overview.saveError"))};return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:d.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-gray-200 bg-white p-6 shadow-xl dark:border-gray-700 dark:bg-gray-900",children:[d.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e("agents.createDialog.title")}),d.jsx("button",{onClick:C,className:"rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-800",children:d.jsx(Ua,{className:"h-5 w-5"})})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[e("agents.createDialog.name")," *"]}),d.jsx("input",{type:"text",value:o,onChange:j=>c(j.target.value),placeholder:e("agents.createDialog.namePlaceholder"),className:"w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200",autoFocus:!0})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:e("agents.createDialog.workspace")}),d.jsx("input",{type:"text",value:f,onChange:j=>g(j.target.value),placeholder:e("agents.createDialog.workspacePlaceholder"),className:"w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:e("agents.createDialog.emoji")}),d.jsx("input",{type:"text",value:h,onChange:j=>x(j.target.value),placeholder:e("agents.createDialog.emojiPlaceholder"),className:"w-24 rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200"})]}),v&&d.jsx("p",{className:"text-sm text-red-600",children:v}),d.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[d.jsx("button",{onClick:C,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",children:e("agents.createDialog.cancel")}),d.jsx("button",{onClick:E,disabled:y,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:e(y?"agents.createDialog.creating":"agents.createDialog.create")})]})]})]})})}function cR(){var S;const{t:e}=oe("console"),{deleteDialogOpen:n,setDeleteDialogOpen:a,selectedAgentId:l,agents:s,deleteAgent:o}=qa(),[c,f]=N.useState(!1),[g,h]=N.useState(!1),x=s.find(C=>C.id===l);if(!n||!x)return null;const y=((S=x.identity)==null?void 0:S.name)??x.name??x.id,b=()=>{a(!1),f(!1)},v=async()=>{h(!0),await o(x.id,c),h(!1),b()};return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:d.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-gray-200 bg-white p-6 shadow-xl dark:border-gray-700 dark:bg-gray-900",children:[d.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(au,{className:"h-5 w-5 text-red-500"}),d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e("agents.deleteDialog.title")})]}),d.jsx("button",{onClick:b,className:"rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-800",children:d.jsx(Ua,{className:"h-5 w-5"})})]}),d.jsx("p",{className:"mb-4 text-sm text-gray-600 dark:text-gray-400",children:e("agents.deleteDialog.confirm",{name:y})}),d.jsxs("label",{className:"mb-4 flex items-center gap-2 text-sm text-gray-700 dark:text-gray-300",children:[d.jsx("input",{type:"checkbox",checked:c,onChange:C=>f(C.target.checked),className:"rounded border-gray-300 text-red-600 focus:ring-red-500"}),e("agents.deleteDialog.deleteFiles")]}),d.jsxs("div",{className:"flex justify-end gap-3",children:[d.jsx("button",{onClick:b,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",children:e("agents.deleteDialog.cancel")}),d.jsx("button",{onClick:v,disabled:g,className:"rounded-lg bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700 disabled:opacity-50",children:e(g?"agents.deleteDialog.deleting":"agents.deleteDialog.delete")})]})]})})}function dR(){const{t:e}=oe("console"),{selectedAgentId:n,agents:a,fetchAgents:l}=qa(),s=a.find(o=>o.id===n)??null;return N.useEffect(()=>{l()},[l]),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e("agents.title")}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:e("agents.description")})]}),d.jsxs("div",{className:"flex gap-6",children:[d.jsx(ZM,{}),d.jsx("div",{className:"min-w-0 flex-1",children:s?d.jsxs("div",{className:"space-y-4",children:[d.jsx(JM,{agent:s}),d.jsx(oR,{agent:s})]}):d.jsxs("div",{className:"flex h-96 flex-col items-center justify-center rounded-2xl border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[d.jsx(Nb,{className:"mb-3 h-12 w-12 text-gray-300 dark:text-gray-600"}),d.jsx("p",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:e("agents.selectAgent")}),d.jsx("p",{className:"mt-1 text-xs text-gray-400 dark:text-gray-500",children:e("agents.selectAgentDesc")})]})})]}),d.jsx(uR,{}),d.jsx(cR,{})]})}const fR=1e4;class zo extends Error{constructor(n,a){super(a),this.code=n,this.name="RpcError"}}class sv{constructor(n){this.wsClient=n}request(n,a={},l=fR){return new Promise((s,o)=>{if(!this.wsClient.isConnected()){o(new zo("NOT_CONNECTED","WebSocket is not connected"));return}const c=crypto.randomUUID();let f=null;const g=()=>{f&&(clearTimeout(f),f=null)};this.wsClient.onResponse(c,h=>{g(),h.ok?s(h.payload):o(new zo(h.error.code,h.error.message))}),f=setTimeout(()=>{o(new zo("TIMEOUT",`RPC request timed out: ${n}`))},l),this.wsClient.send({type:"req",id:c,method:n,params:a})})}}const hR=Object.freeze(Object.defineProperty({__proto__:null,GatewayRpcClient:sv,RpcError:zo},Symbol.toStringTag,{value:"Module"})),gR=20,pR=1e3,mR=3e4,yR=1e3;class ov{constructor(){bt(this,"ws",null);bt(this,"url","");bt(this,"token","");bt(this,"status","disconnected");bt(this,"reconnectAttempt",0);bt(this,"reconnectTimer",null);bt(this,"shutdownReceived",!1);bt(this,"eventHandlers",new Map);bt(this,"statusHandlers",new Set);bt(this,"responseHandlers",new Map);bt(this,"snapshot",null);bt(this,"serverInfo",null);bt(this,"handleClose",()=>{})}getStatus(){return this.status}getSnapshot(){return this.snapshot}getServerInfo(){return this.serverInfo}isConnected(){var n;return this.status==="connected"&&((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN}connect(n,a){this.url=n,this.token=a,this.shutdownReceived=!1,this.reconnectAttempt=0,this.doConnect()}disconnect(){this.shutdownReceived=!0,this.clearReconnectTimer(),this.ws&&(this.ws.removeEventListener("close",this.handleClose),this.ws.close(),this.ws=null),this.setStatus("disconnected")}onEvent(n,a){let l=this.eventHandlers.get(n);return l||(l=new Set,this.eventHandlers.set(n,l)),l.add(a),()=>l.delete(a)}onStatusChange(n){return this.statusHandlers.add(n),()=>this.statusHandlers.delete(n)}onResponse(n,a){this.responseHandlers.set(n,a)}send(n){var a;((a=this.ws)==null?void 0:a.readyState)===WebSocket.OPEN&&this.ws.send(JSON.stringify(n))}doConnect(){this.setStatus(this.reconnectAttempt>0?"reconnecting":"connecting");try{this.ws=new WebSocket(this.url)}catch{this.scheduleReconnect();return}this.handleClose=()=>{this.shutdownReceived||this.scheduleReconnect()},this.ws.addEventListener("open",()=>{}),this.ws.addEventListener("message",n=>{this.handleMessage(n)}),this.ws.addEventListener("close",this.handleClose),this.ws.addEventListener("error",()=>{})}handleMessage(n){let a;try{a=JSON.parse(n.data)}catch{return}if(a.type==="event"){const l=a;this.handleEvent(l)}else if(a.type==="res"){const l=a;this.handleResponse(l)}}handleEvent(n){if(n.event==="connect.challenge"){this.sendConnect();return}n.event==="shutdown"&&(this.shutdownReceived=!0,this.clearReconnectTimer(),this.setStatus("disconnected"));const a=this.eventHandlers.get(n.event);if(a)for(const s of a)s(n);const l=this.eventHandlers.get("*");if(l)for(const s of l)s(n)}handleResponse(n){var l;const a=this.responseHandlers.get(n.id);if(a){this.responseHandlers.delete(n.id),a(n);return}n.ok&&((l=n.payload)==null?void 0:l.type)==="hello-ok"?this.handleConnectSuccess(n.payload):n.ok||this.setStatus("error",n.error.message)}sendConnect(){const n={minProtocol:1,maxProtocol:3,client:{id:"openclaw-control-ui",version:"0.1.0",platform:"web",mode:"ui"},caps:["tool-events"],scopes:["operator.admin"]};this.token&&(n.auth={token:this.token}),this.send({type:"req",id:crypto.randomUUID(),method:"connect",params:n})}handleConnectSuccess(n){this.snapshot=n.snapshot??null,this.serverInfo=n.server??null,this.reconnectAttempt=0,this.setStatus("connected")}scheduleReconnect(){if(this.shutdownReceived)return;if(this.reconnectAttempt>=gR){this.setStatus("disconnected");return}this.setStatus("reconnecting");const n=Math.min(pR*Math.pow(2,this.reconnectAttempt),mR)+Math.random()*yR;this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.doConnect()},n)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}setStatus(n,a){this.status=n;for(const l of this.statusHandlers)l(n,a)}}const xR=Object.freeze(Object.defineProperty({__proto__:null,GatewayWsClient:ov},Symbol.toStringTag,{value:"Module"})),bR=500,Yx=200;function vR(e){if(e.stream==="error")return!0;if(e.stream==="lifecycle"){const n=e.data.phase;return n==="start"||n==="end"}return!1}class kR{constructor(){bt(this,"queue",[]);bt(this,"rafId",null);bt(this,"handler",null);bt(this,"immediateHandler",null)}onBatch(n){this.handler=n}onImmediate(n){this.immediateHandler=n}push(n){var a;if(vR(n)){(a=this.immediateHandler)==null||a.call(this,n);return}this.queue.push(n),this.queue.length>bR&&(console.warn(`[EventThrottle] Queue overflow: ${this.queue.length} events, trimming to ${Yx}`),this.queue=this.queue.slice(-Yx)),this.scheduleFlush()}scheduleFlush(){this.rafId===null&&(this.rafId=requestAnimationFrame(()=>{this.flush()}))}flush(){var a;if(this.rafId=null,this.queue.length===0)return;const n=this.queue;this.queue=[],(a=this.handler)==null||a.call(this,n)}destroy(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.queue=[]}}const SR=3e3;function wR(e,n){const a=new Set(e.map(c=>c.sessionKey)),l=new Set(n.map(c=>c.sessionKey)),s=n.filter(c=>!a.has(c.sessionKey)),o=e.filter(c=>!l.has(c.sessionKey));return{added:s,removed:o}}function jR(e){return e.filter(n=>n.requesterSessionKey).map(n=>({sessionKey:n.sessionKey,agentId:n.agentId,label:n.label??n.agentId,task:n.task??"",requesterSessionKey:n.requesterSessionKey,startedAt:n.startedAt??Date.now()}))}function CR(e){const n=N.useRef(null),a=he(h=>h.connectionStatus),l=he(h=>h.lastSessionsSnapshot),s=he(h=>h.setSessionsSnapshot),o=he(h=>h.addSubAgent),c=he(h=>h.agents),f=he(h=>h.removeSubAgent);N.useEffect(()=>{if(a!=="connected"||!e.current){n.current&&(clearInterval(n.current),n.current=null);return}const h=async()=>{const x=e.current;if(x)try{const y=await x.request("sessions.list"),b=jR(y.sessions??[]),v=(l==null?void 0:l.sessions)??[],{added:S,removed:C}=wR(v,b);for(const E of S){const j=g(E.requesterSessionKey);j&&o(j,E)}for(const E of C)c.has(E.agentId)&&f(E.agentId);s({sessions:b,fetchedAt:Date.now()})}catch{}};return n.current=setInterval(h,SR),h(),()=>{n.current&&(clearInterval(n.current),n.current=null)}},[a]);function g(h){const y=he.getState().sessionKeyMap.get(h);if(y&&y.length>0)return y[0];for(const[b,v]of he.getState().agents)if(!v.isSubAgent)return b;return null}}const NR=6e4,ER=3;function AR(e){const n=N.useRef(null),a=N.useRef(0),l=he(c=>c.connectionStatus),s=he(c=>c.pushTokenSnapshot),o=he(c=>c.setAgentCosts);N.useEffect(()=>{if(l!=="connected"||!e.current){n.current&&(clearInterval(n.current),n.current=null);return}const c=async()=>{const f=e.current;if(f)try{const[g,h]=await Promise.all([f.request("usage.status"),f.request("usage.cost").catch(()=>null)]);a.current=0;const x=Date.now(),y=typeof(g==null?void 0:g.total)=="number"?g.total:TR((g==null?void 0:g.byAgent)??{}),b=(g==null?void 0:g.byAgent)??{};s({timestamp:x,total:y,byAgent:b});const v=(h==null?void 0:h.byAgent)??(h==null?void 0:h.costs)??{};Object.keys(v).length>0&&o(v)}catch{if(a.current+=1,a.current>=ER){const g=he.getState().eventHistory,h=_R(g);h&&s(h)}}};return n.current=setInterval(c,NR),c(),()=>{n.current&&(clearInterval(n.current),n.current=null)}},[l,s,o])}function TR(e){let n=0;for(const a of Object.values(e))typeof a=="number"&&(n+=a);return n}function _R(e){const n={};let a=0;for(const l of e){if(l.stream!=="tool")continue;const s=100;n[l.agentId]=(n[l.agentId]??0)+s,a+=s}return a===0?null:{timestamp:Date.now(),total:a,byAgent:n}}function DR({url:e,token:n}){const a=N.useRef(null),l=N.useRef(null),s=N.useRef(null),o=he(h=>h.setConnectionStatus),c=he(h=>h.initAgents),f=he(h=>h.processAgentEvent),g=he(h=>h.setOperatorScopes);return N.useEffect(()=>{const h=new ov,x=new sv(h),y=new kR;return a.current=h,l.current=x,s.current=y,y.onBatch(b=>{for(const v of b)f(v)}),y.onImmediate(b=>{f(b)}),h.onStatusChange((b,v)=>{if(o(b,v),b==="connected"){MR(h,c);const S=h.getSnapshot(),C=S==null?void 0:S.scopes;g(Array.isArray(C)?C:["operator"]),A4("ws",{wsClient:h,rpcClient:x})}}),h.onEvent("agent",b=>{y.push(b.payload)}),h.onEvent("health",b=>{const v=b.payload;if(v!=null&&v.agents){const S=uv(v);c(S)}}),h.connect(e,n),()=>{y.destroy(),h.disconnect(),a.current=null,l.current=null,s.current=null}},[e,n,o,c,f,g]),CR(l),AR(l),{wsClient:a,rpcClient:l}}function uv(e){return e.agents?e.agents.map(n=>({id:n.agentId,name:n.agentId})):[]}function MR(e,n){const a=e.getSnapshot(),l=a==null?void 0:a.health;l!=null&&l.agents&&n(uv(l))}function RR(){const[e,n]=N.useState(()=>Gx());return N.useEffect(()=>{const a=matchMedia("(max-width: 767px)"),l=matchMedia("(min-width: 768px) and (max-width: 1023px)");function s(){n(Gx())}return a.addEventListener("change",s),l.addEventListener("change",s),()=>{a.removeEventListener("change",s),l.removeEventListener("change",s)}},[]),e}function Gx(){if(typeof window>"u")return{isMobile:!1,isTablet:!1,isDesktop:!0};const e=window.innerWidth;return{isMobile:e<768,isTablet:e>=768&&e<1024,isDesktop:e>=1024}}const OR=N.lazy(()=>Ha(()=>import("./Scene3D-CUH0kBa1.js"),[]));function zR(){const{t:e}=oe("office");return d.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-950",children:d.jsxs("div",{className:"flex flex-col items-center gap-3",children:[d.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"}),d.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("loading3D")})]})})}function LR(){const e=he(o=>o.viewMode),[n,a]=N.useState(!1),[l,s]=N.useState(e);return N.useEffect(()=>{if(e!==l){a(!0);const o=setTimeout(()=>{s(e),a(!1)},150);return()=>clearTimeout(o)}},[e,l]),d.jsx("div",{className:"h-full w-full transition-opacity duration-300",style:{opacity:n?0:1},children:l==="2d"?d.jsx(DD,{}):d.jsx(N.Suspense,{fallback:d.jsx(zR,{}),children:d.jsx(OR,{})})})}function UR(){const e=he(n=>n.theme);return N.useEffect(()=>{document.documentElement.setAttribute("data-theme",e),e==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[e]),null}const HR={"/":"office","/dashboard":"dashboard","/agents":"agents","/channels":"channels","/skills":"skills","/cron":"cron","/settings":"settings"};function BR(){const e=Nn(),n=he(a=>a.setCurrentPage);return N.useEffect(()=>{const a=HR[e.pathname]??"office";n(a)},[e.pathname,n]),null}function qR(){const e=window.__OPENCLAW_CONFIG__,n=(e==null?void 0:e.gatewayUrl)||"ws://localhost:18789",a=(e==null?void 0:e.gatewayToken)||"mvAc4W5TsoF71Fi8gIH9_tP58jn72acLsf1BYOiuem4",{isMobile:l}=RR(),s=he(c=>c.setViewMode),{wsClient:o}=DR({url:n,token:a});return N.useEffect(()=>{l&&s("2d")},[l,s]),d.jsxs(d.Fragment,{children:[d.jsx(UR,{}),d.jsx(BR,{}),d.jsxs(zw,{children:[d.jsx(wn,{element:d.jsx(xD,{wsClient:o,isMobile:l}),children:d.jsx(wn,{path:"/",element:d.jsx(LR,{})})}),d.jsxs(wn,{element:d.jsx(bD,{}),children:[d.jsx(wn,{path:"/dashboard",element:d.jsx(GD,{})}),d.jsx(wn,{path:"/agents",element:d.jsx(dR,{})}),d.jsx(wn,{path:"/channels",element:d.jsx(aM,{})}),d.jsx(wn,{path:"/skills",element:d.jsx(pM,{})}),d.jsx(wn,{path:"/cron",element:d.jsx(CM,{})}),d.jsx(wn,{path:"/settings",element:d.jsx(QM,{})})]}),d.jsx(wn,{path:"*",element:d.jsx(Rw,{to:"/",replace:!0})})]})]})}zS.createRoot(document.getElementById("root")).render(d.jsx(N.StrictMode,{children:d.jsx(l2,{children:d.jsx(qR,{})})}));export{Ah as M,hl as P,Qi as S,ht as Z,Rf as _,J2 as a,_S as b,C4 as c,N as d,sr as e,zS as f,Zf as g,he as h,KR as i,d as j,$R as k,FR as p,Yo as r,oe as u};
|
|
401
|
+
`,...o.current()});return/^[\t ]/.test(h)&&(h=qi(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,a.options.closeAtx&&(h+=" "+c),g(),f(),h}M1.peek=E6;function M1(e){return e.value||""}function E6(){return"<"}D1.peek=A6;function D1(e,n,a,l){const s=Th(a),o=s==='"'?"Quote":"Apostrophe",c=a.enter("image");let f=a.enter("label");const g=a.createTracker(l);let h=g.move("![");return h+=g.move(a.safe(e.alt,{before:h,after:"]",...g.current()})),h+=g.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),h+=g.move("<"),h+=g.move(a.safe(e.url,{before:h,after:">",...g.current()})),h+=g.move(">")):(f=a.enter("destinationRaw"),h+=g.move(a.safe(e.url,{before:h,after:e.title?" ":")",...g.current()}))),f(),e.title&&(f=a.enter(`title${o}`),h+=g.move(" "+s),h+=g.move(a.safe(e.title,{before:h,after:s,...g.current()})),h+=g.move(s),f()),h+=g.move(")"),c(),h}function A6(){return"!"}R1.peek=T6;function R1(e,n,a,l){const s=e.referenceType,o=a.enter("imageReference");let c=a.enter("label");const f=a.createTracker(l);let g=f.move("![");const h=a.safe(e.alt,{before:g,after:"]",...f.current()});g+=f.move(h+"]["),c();const x=a.stack;a.stack=[],c=a.enter("reference");const y=a.safe(a.associationId(e),{before:g,after:"]",...f.current()});return c(),a.stack=x,o(),s==="full"||!h||h!==y?g+=f.move(y+"]"):s==="shortcut"?g=g.slice(0,-1):g+=f.move("]"),g}function T6(){return"!"}O1.peek=_6;function O1(e,n,a){let l=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(l);)s+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++o<a.unsafe.length;){const c=a.unsafe[o],f=a.compilePattern(c);let g;if(c.atBreak)for(;g=f.exec(l);){let h=g.index;l.charCodeAt(h)===10&&l.charCodeAt(h-1)===13&&h--,l=l.slice(0,h)+" "+l.slice(g.index+1)}}return s+l+s}function _6(){return"`"}function z1(e,n){const a=bh(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}L1.peek=M6;function L1(e,n,a,l){const s=Th(a),o=s==='"'?"Quote":"Apostrophe",c=a.createTracker(l);let f,g;if(z1(e,a)){const x=a.stack;a.stack=[],f=a.enter("autolink");let y=c.move("<");return y+=c.move(a.containerPhrasing(e,{before:y,after:">",...c.current()})),y+=c.move(">"),f(),a.stack=x,y}f=a.enter("link"),g=a.enter("label");let h=c.move("[");return h+=c.move(a.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),g(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(g=a.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(a.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(g=a.enter("destinationRaw"),h+=c.move(a.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),g(),e.title&&(g=a.enter(`title${o}`),h+=c.move(" "+s),h+=c.move(a.safe(e.title,{before:h,after:s,...c.current()})),h+=c.move(s),g()),h+=c.move(")"),f(),h}function M6(e,n,a){return z1(e,a)?"<":"["}U1.peek=D6;function U1(e,n,a,l){const s=e.referenceType,o=a.enter("linkReference");let c=a.enter("label");const f=a.createTracker(l);let g=f.move("[");const h=a.containerPhrasing(e,{before:g,after:"]",...f.current()});g+=f.move(h+"]["),c();const x=a.stack;a.stack=[],c=a.enter("reference");const y=a.safe(a.associationId(e),{before:g,after:"]",...f.current()});return c(),a.stack=x,o(),s==="full"||!h||h!==y?g+=f.move(y+"]"):s==="shortcut"?g=g.slice(0,-1):g+=f.move("]"),g}function D6(){return"["}function _h(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function R6(e){const n=_h(e),a=e.options.bulletOther;if(!a)return n==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+a+"`) to be different");return a}function O6(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function H1(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function z6(e,n,a,l){const s=a.enter("list"),o=a.bulletCurrent;let c=e.ordered?O6(a):_h(a);const f=e.ordered?c==="."?")":".":R6(a);let g=n&&a.bulletLastUsed?c===a.bulletLastUsed:!1;if(!e.ordered){const x=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&x&&(!x.children||!x.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(g=!0),H1(a)===c&&x){let y=-1;for(;++y<e.children.length;){const b=e.children[y];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){g=!0;break}}}}g&&(c=f),a.bulletCurrent=c;const h=a.containerFlow(e,l);return a.bulletLastUsed=c,a.bulletCurrent=o,s(),h}function L6(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function U6(e,n,a,l){const s=L6(a);let o=a.bulletCurrent||_h(a);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(a.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=a.createTracker(l);f.move(o+" ".repeat(c-o.length)),f.shift(c);const g=a.enter("listItem"),h=a.indentLines(a.containerFlow(e,f.current()),x);return g(),h;function x(y,b,v){return b?(v?"":" ".repeat(c))+y:(v?o:o+" ".repeat(c-o.length))+y}}function H6(e,n,a,l){const s=a.enter("paragraph"),o=a.enter("phrasing"),c=a.containerPhrasing(e,l);return o(),s(),c}const B6=gu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function q6(e,n,a,l){return(e.children.some(function(c){return B6(c)})?a.containerPhrasing:a.containerFlow).call(a,e,l)}function I6(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}B1.peek=$6;function B1(e,n,a,l){const s=I6(a),o=a.enter("strong"),c=a.createTracker(l),f=c.move(s+s);let g=c.move(a.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=g.charCodeAt(0),x=Go(l.before.charCodeAt(l.before.length-1),h,s);x.inside&&(g=qi(h)+g.slice(1));const y=g.charCodeAt(g.length-1),b=Go(l.after.charCodeAt(0),y,s);b.inside&&(g=g.slice(0,-1)+qi(y));const v=c.move(s+s);return o(),a.attentionEncodeSurroundingInfo={after:b.outside,before:x.outside},f+g+v}function $6(e,n,a){return a.options.strong||"*"}function F6(e,n,a,l){return a.safe(e.value,l)}function K6(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function P6(e,n,a){const l=(H1(a)+(a.options.ruleSpaces?" ":"")).repeat(K6(a));return a.options.ruleSpaces?l.slice(0,-1):l}const q1={blockquote:g6,break:Cx,code:v6,definition:S6,emphasis:_1,hardBreak:Cx,heading:C6,html:M1,image:D1,imageReference:R1,inlineCode:O1,link:L1,linkReference:U1,list:z6,listItem:U6,paragraph:H6,root:q6,strong:B1,text:F6,thematicBreak:P6};function V6(){return{enter:{table:Y6,tableData:Ex,tableHeader:Ex,tableRow:Q6},exit:{codeText:X6,table:G6,tableData:mf,tableHeader:mf,tableRow:mf}}}function Y6(e){const n=e._align;this.enter({type:"table",align:n.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function G6(e){this.exit(e),this.data.inTable=void 0}function Q6(e){this.enter({type:"tableRow",children:[]},e)}function mf(e){this.exit(e)}function Ex(e){this.enter({type:"tableCell",children:[]},e)}function X6(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Z6));const a=this.stack[this.stack.length-1];a.type,a.value=n,this.exit(e)}function Z6(e,n){return n==="|"?n:e}function J6(e){const n=e||{},a=n.tableCellPadding,l=n.tablePipeAlign,s=n.stringLength,o=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
402
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:g,tableRow:f}};function c(v,S,N,E){return h(x(v,N,E),v.align)}function f(v,S,N,E){const j=y(v,N,E),z=h([j]);return z.slice(0,z.indexOf(`
|
|
403
|
+
`))}function g(v,S,N,E){const j=N.enter("tableCell"),z=N.enter("phrasing"),T=N.containerPhrasing(v,{...E,before:o,after:o});return z(),j(),T}function h(v,S){return f6(v,{align:S,alignDelimiters:l,padding:a,stringLength:s})}function x(v,S,N){const E=v.children;let j=-1;const z=[],T=S.enter("table");for(;++j<E.length;)z[j]=y(E[j],S,N);return T(),z}function y(v,S,N){const E=v.children;let j=-1;const z=[],T=S.enter("tableRow");for(;++j<E.length;)z[j]=g(E[j],v,S,N);return T(),z}function b(v,S,N){let E=q1.inlineCode(v,S,N);return N.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function W6(){return{exit:{taskListCheckValueChecked:Ax,taskListCheckValueUnchecked:Ax,paragraph:t_}}}function e_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:n_}}}function Ax(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function t_(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const l=a.children[0];if(l&&l.type==="text"){const s=n.children;let o=-1,c;for(;++o<s.length;){const f=s[o];if(f.type==="paragraph"){c=f;break}}c===a&&(l.value=l.value.slice(1),l.value.length===0?a.children.shift():a.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,a.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function n_(e,n,a,l){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=a.createTracker(l);o&&f.move(c);let g=q1.listItem(e,n,a,{...l,...f.current()});return o&&(g=g.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),g;function h(x){return x+c}}function a_(){return[zT(),n6(),i6(),V6(),W6()]}function r_(e){return{extensions:[LT(),a6(e),s6(),J6(e),e_()]}}const l_={tokenize:d_,partial:!0},I1={tokenize:f_,partial:!0},$1={tokenize:h_,partial:!0},F1={tokenize:g_,partial:!0},i_={tokenize:p_,partial:!0},K1={name:"wwwAutolink",tokenize:u_,previous:V1},P1={name:"protocolAutolink",tokenize:c_,previous:Y1},ua={name:"emailAutolink",tokenize:o_,previous:G1},Ln={};function s_(){return{text:Ln}}let ir=48;for(;ir<123;)Ln[ir]=ua,ir++,ir===58?ir=65:ir===91&&(ir=97);Ln[43]=ua;Ln[45]=ua;Ln[46]=ua;Ln[95]=ua;Ln[72]=[ua,P1];Ln[104]=[ua,P1];Ln[87]=[ua,K1];Ln[119]=[ua,K1];function o_(e,n,a){const l=this;let s,o;return c;function c(y){return!Qf(y)||!G1.call(l,l.previous)||Mh(l.events)?a(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return Qf(y)?(e.consume(y),f):y===64?(e.consume(y),g):a(y)}function g(y){return y===46?e.check(i_,x,h)(y):y===45||y===95||Tt(y)?(o=!0,e.consume(y),g):x(y)}function h(y){return e.consume(y),s=!0,g}function x(y){return o&&s&&zt(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(y)):a(y)}}function u_(e,n,a){const l=this;return s;function s(c){return c!==87&&c!==119||!V1.call(l,l.previous)||Mh(l.events)?a(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(l_,e.attempt(I1,e.attempt($1,o),a),a)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function c_(e,n,a){const l=this;let s="",o=!1;return c;function c(y){return(y===72||y===104)&&Y1.call(l,l.previous)&&!Mh(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),e.consume(y),f):a(y)}function f(y){if(zt(y)&&s.length<5)return s+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(y),g}return a(y)}function g(y){return y===47?(e.consume(y),o?h:(o=!0,g)):a(y)}function h(y){return y===null||Po(y)||Ze(y)||cr(y)||du(y)?a(y):e.attempt(I1,e.attempt($1,x),a)(y)}function x(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(y)}}function d_(e,n,a){let l=0;return s;function s(c){return(c===87||c===119)&&l<3?(l++,e.consume(c),s):c===46&&l===3?(e.consume(c),o):a(c)}function o(c){return c===null?a(c):n(c)}}function f_(e,n,a){let l,s,o;return c;function c(h){return h===46||h===95?e.check(F1,g,f)(h):h===null||Ze(h)||cr(h)||h!==45&&du(h)?g(h):(o=!0,e.consume(h),c)}function f(h){return h===95?l=!0:(s=l,l=void 0),e.consume(h),c}function g(h){return s||l||!o?a(h):n(h)}}function h_(e,n){let a=0,l=0;return s;function s(c){return c===40?(a++,e.consume(c),s):c===41&&l<a?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(F1,n,o)(c):c===null||Ze(c)||cr(c)?n(c):(e.consume(c),s)}function o(c){return c===41&&l++,e.consume(c),s}}function g_(e,n,a){return l;function l(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),l):f===38?(e.consume(f),o):f===93?(e.consume(f),s):f===60||f===null||Ze(f)||cr(f)?n(f):a(f)}function s(f){return f===null||f===40||f===91||Ze(f)||cr(f)?n(f):l(f)}function o(f){return zt(f)?c(f):a(f)}function c(f){return f===59?(e.consume(f),l):zt(f)?(e.consume(f),c):a(f)}}function p_(e,n,a){return l;function l(o){return e.consume(o),s}function s(o){return Tt(o)?a(o):n(o)}}function V1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ze(e)}function Y1(e){return!zt(e)}function G1(e){return!(e===47||Qf(e))}function Qf(e){return e===43||e===45||e===46||e===95||Tt(e)}function Mh(e){let n=e.length,a=!1;for(;n--;){const l=e[n][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){a=!0;break}if(l._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const m_={tokenize:j_,partial:!0};function y_(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:k_,continuation:{tokenize:S_},exit:w_}},text:{91:{name:"gfmFootnoteCall",tokenize:v_},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:x_,resolveTo:b_}}}}function x_(e,n,a){const l=this;let s=l.events.length;const o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c;for(;s--;){const g=l.events[s][1];if(g.type==="labelImage"){c=g;break}if(g.type==="gfmFootnoteCall"||g.type==="labelLink"||g.type==="label"||g.type==="image"||g.type==="link")break}return f;function f(g){if(!c||!c._balanced)return a(g);const h=jn(l.sliceSerialize({start:c.end,end:l.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?a(g):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),n(g))}}function b_(e,n){let a=e.length;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[a+1],e[a+2],["enter",l,n],e[a+3],e[a+4],["enter",s,n],["exit",s,n],["enter",o,n],["enter",c,n],["exit",c,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(a,e.length-a+1,...f),e}function v_(e,n,a){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o=0,c;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),g}function g(y){return y!==94?a(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(o>999||y===93&&!c||y===null||y===91||Ze(y))return a(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(jn(l.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):a(y)}return Ze(y)||(c=!0),o++,e.consume(y),y===92?x:h}function x(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}}function k_(e,n,a){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o,c=0,f;return g;function g(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",x):a(S)}function x(S){if(c>999||S===93&&!f||S===null||S===91||Ze(S))return a(S);if(S===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return o=jn(l.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Ze(S)||(f=!0),c++,e.consume(S),S===92?y:x}function y(S){return S===91||S===92||S===93?(e.consume(S),c++,x):x(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(o)||s.push(o),Le(e,v,"gfmFootnoteDefinitionWhitespace")):a(S)}function v(S){return n(S)}}function S_(e,n,a){return e.check(Zi,n,e.attempt(m_,n,a))}function w_(e){e.exit("gfmFootnoteDefinition")}function j_(e,n,a){const l=this;return Le(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=l.events[l.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(o):a(o)}}function N_(e){let a=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:o,resolveAll:s};return a==null&&(a=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function s(c,f){let g=-1;for(;++g<c.length;)if(c[g][0]==="enter"&&c[g][1].type==="strikethroughSequenceTemporary"&&c[g][1]._close){let h=g;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[g][1].end.offset-c[g][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[g][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[g][1].end)},y={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[g][1].start)},b=[["enter",x,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",y,f]],v=f.parser.constructs.insideSpan.null;v&&nn(b,b.length,0,fu(v,c.slice(h+1,g),f)),nn(b,b.length,0,[["exit",y,f],["enter",c[g][1],f],["exit",c[g][1],f],["exit",x,f]]),nn(c,h-1,g-h+3,b),g=h+b.length-2;break}}for(g=-1;++g<c.length;)c[g][1].type==="strikethroughSequenceTemporary"&&(c[g][1].type="data");return c}function o(c,f,g){const h=this.previous,x=this.events;let y=0;return b;function b(S){return h===126&&x[x.length-1][1].type!=="characterEscape"?g(S):(c.enter("strikethroughSequenceTemporary"),v(S))}function v(S){const N=fl(h);if(S===126)return y>1?g(S):(c.consume(S),y++,v);if(y<2&&!a)return g(S);const E=c.exit("strikethroughSequenceTemporary"),j=fl(S);return E._open=!j||j===2&&!!N,E._close=!N||N===2&&!!j,f(S)}}}class C_{constructor(){this.map=[]}add(n,a,l){E_(this,n,a,l)}consume(n){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let a=this.map.length;const l=[];for(;a>0;)a-=1,l.push(n.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),n.length=this.map[a][0];l.push(n.slice()),n.length=0;let s=l.pop();for(;s;){for(const o of s)n.push(o);s=l.pop()}this.map.length=0}}function E_(e,n,a,l){let s=0;if(!(a===0&&l.length===0)){for(;s<e.map.length;){if(e.map[s][0]===n){e.map[s][1]+=a,e.map[s][2].push(...l);return}s+=1}e.map.push([n,a,l])}}function A_(e,n){let a=!1;const l=[];for(;n<e.length;){const s=e[n];if(a){if(s[0]==="enter")s[1].type==="tableContent"&&l.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=l.length-1;l[o]=l[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(a=!0);n+=1}return l}function T_(){return{flow:{null:{name:"table",tokenize:__,resolveAll:M_}}}}function __(e,n,a){const l=this;let s=0,o=0,c;return f;function f(R){let ae=l.events.length-1;for(;ae>-1;){const ne=l.events[ae][1].type;if(ne==="lineEnding"||ne==="linePrefix")ae--;else break}const F=ae>-1?l.events[ae][1].type:null,ie=F==="tableHead"||F==="tableRow"?L:g;return ie===L&&l.parser.lazy[l.now().line]?a(R):ie(R)}function g(R){return e.enter("tableHead"),e.enter("tableRow"),h(R)}function h(R){return R===124||(c=!0,o+=1),x(R)}function x(R){return R===null?a(R):xe(R)?o>1?(o=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):a(R):_e(R)?Le(e,x,"whitespace")(R):(o+=1,c&&(c=!1,s+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),c=!0,x):(e.enter("data"),y(R)))}function y(R){return R===null||R===124||Ze(R)?(e.exit("data"),x(R)):(e.consume(R),R===92?b:y)}function b(R){return R===92||R===124?(e.consume(R),y):y(R)}function v(R){return l.interrupt=!1,l.parser.lazy[l.now().line]?a(R):(e.enter("tableDelimiterRow"),c=!1,_e(R)?Le(e,S,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):S(R))}function S(R){return R===45||R===58?E(R):R===124?(c=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),N):H(R)}function N(R){return _e(R)?Le(e,E,"whitespace")(R):E(R)}function E(R){return R===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),j):R===45?(o+=1,j(R)):R===null||xe(R)?P(R):H(R)}function j(R){return R===45?(e.enter("tableDelimiterFiller"),z(R)):H(R)}function z(R){return R===45?(e.consume(R),z):R===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(R))}function T(R){return _e(R)?Le(e,P,"whitespace")(R):P(R)}function P(R){return R===124?S(R):R===null||xe(R)?!c||s!==o?H(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):H(R)}function H(R){return a(R)}function L(R){return e.enter("tableRow"),V(R)}function V(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),V):R===null||xe(R)?(e.exit("tableRow"),n(R)):_e(R)?Le(e,V,"whitespace")(R):(e.enter("data"),ee(R))}function ee(R){return R===null||R===124||Ze(R)?(e.exit("data"),V(R)):(e.consume(R),R===92?G:ee)}function G(R){return R===92||R===124?(e.consume(R),ee):ee(R)}}function M_(e,n){let a=-1,l=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,g=0,h,x,y;const b=new C_;for(;++a<e.length;){const v=e[a],S=v[1];v[0]==="enter"?S.type==="tableHead"?(f=!1,g!==0&&(Tx(b,n,g,h,x),x=void 0,g=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(a,0,[["enter",h,n]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(l=!0,y=void 0,o=[0,0,0,0],c=[0,a+1,0,0],f&&(f=!1,x={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(a,0,[["enter",x,n]])),s=S.type==="tableDelimiterRow"?2:x?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(l=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],y=Co(b,n,o,s,void 0,y),o=[0,0,0,0]),c[2]=a)):S.type==="tableCellDivider"&&(l?l=!1:(o[1]!==0&&(c[0]=c[1],y=Co(b,n,o,s,void 0,y)),o=c,c=[o[1],a,0,0])):S.type==="tableHead"?(f=!0,g=a):S.type==="tableRow"||S.type==="tableDelimiterRow"?(g=a,o[1]!==0?(c[0]=c[1],y=Co(b,n,o,s,a,y)):c[1]!==0&&(y=Co(b,n,c,s,a,y)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=a)}for(g!==0&&Tx(b,n,g,h,x),b.consume(n.events),a=-1;++a<n.events.length;){const v=n.events[a];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=A_(n.events,a))}return e}function Co(e,n,a,l,s,o){const c=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";a[0]!==0&&(o.end=Object.assign({},ol(n.events,a[0])),e.add(a[0],0,[["exit",o,n]]));const g=ol(n.events,a[1]);if(o={type:c,start:Object.assign({},g),end:Object.assign({},g)},e.add(a[1],0,[["enter",o,n]]),a[2]!==0){const h=ol(n.events,a[2]),x=ol(n.events,a[3]),y={type:f,start:Object.assign({},h),end:Object.assign({},x)};if(e.add(a[2],0,[["enter",y,n]]),l!==2){const b=n.events[a[2]],v=n.events[a[3]];if(b[1].end=Object.assign({},v[1].end),b[1].type="chunkText",b[1].contentType="text",a[3]>a[2]+1){const S=a[2]+1,N=a[3]-a[2]-1;e.add(S,N,[])}}e.add(a[3]+1,0,[["exit",y,n]])}return s!==void 0&&(o.end=Object.assign({},ol(n.events,s)),e.add(s,0,[["exit",o,n]]),o=void 0),o}function Tx(e,n,a,l,s){const o=[],c=ol(n.events,a);s&&(s.end=Object.assign({},c),o.push(["exit",s,n])),l.end=Object.assign({},c),o.push(["exit",l,n]),e.add(a+1,0,o)}function ol(e,n){const a=e[n],l=a[0]==="enter"?"start":"end";return a[1][l]}const D_={name:"tasklistCheck",tokenize:O_};function R_(){return{text:{91:D_}}}function O_(e,n,a){const l=this;return s;function s(g){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?a(g):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(g),e.exit("taskListCheckMarker"),o)}function o(g){return Ze(g)?(e.enter("taskListCheckValueUnchecked"),e.consume(g),e.exit("taskListCheckValueUnchecked"),c):g===88||g===120?(e.enter("taskListCheckValueChecked"),e.consume(g),e.exit("taskListCheckValueChecked"),c):a(g)}function c(g){return g===93?(e.enter("taskListCheckMarker"),e.consume(g),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):a(g)}function f(g){return xe(g)?n(g):_e(g)?e.check({tokenize:z_},n,a)(g):a(g)}}function z_(e,n,a){return Le(e,l,"whitespace");function l(s){return s===null?a(s):n(s)}}function L_(e){return l1([s_(),y_(),N_(e),T_(),R_()])}const U_={};function H_(e){const n=this,a=e||U_,l=n.data(),s=l.micromarkExtensions||(l.micromarkExtensions=[]),o=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),c=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);s.push(L_(a)),o.push(a_()),c.push(r_(a))}const Q1=C.memo(function({content:n}){return d.jsx("div",{className:"prose prose-sm max-w-none break-words dark:prose-invert prose-p:my-1 prose-pre:my-2 prose-ul:my-1 prose-ol:my-1 prose-li:my-0",children:d.jsx(Ah,{remarkPlugins:[H_],components:{pre:({children:a,...l})=>d.jsx("pre",{className:"overflow-x-auto rounded bg-gray-100 p-2 text-xs dark:bg-gray-800",...l,children:a}),code:({children:a,className:l,...s})=>l?d.jsx("code",{className:l,...s,children:a}):d.jsx("code",{className:"rounded bg-gray-100 px-1 py-0.5 text-xs dark:bg-gray-800",...s,children:a}),a:({children:a,...l})=>d.jsx("a",{className:"text-blue-600 underline dark:text-blue-400",target:"_blank",rel:"noopener noreferrer",...l,children:a})},children:n})})});function X1(){return d.jsx("span",{className:"ml-0.5 inline-block h-4 w-1.5 animate-pulse rounded-sm bg-blue-500 align-middle"})}const B_=C.memo(function({message:n}){const a=n.role==="user";return d.jsx("div",{className:`flex ${a?"justify-end":"justify-start"} mb-3`,children:d.jsx("div",{className:`max-w-[80%] rounded-lg px-3 py-2 text-sm ${a?"bg-blue-600 text-white":"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-gray-100"}`,children:a?d.jsx("p",{className:"whitespace-pre-wrap",children:n.content}):d.jsxs(d.Fragment,{children:[d.jsx(Q1,{content:n.content}),n.isStreaming&&d.jsx(X1,{})]})})})});function q_(e){if(!e)return"";const n=e.content;return typeof n=="string"?n:Array.isArray(n)?n.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
|
|
404
|
+
`):""}function I_({height:e,onHeightChange:n}){const{t:a}=oe("chat"),l=Et(T=>T.dockExpanded),s=Et(T=>T.messages),o=Et(T=>T.isStreaming),c=Et(T=>T.streamingMessage),f=C.useRef(null),[g,h]=C.useState(!0),[x,y]=C.useState(!1),b=C.useRef(0),v=C.useRef(0),S=q_(c);C.useEffect(()=>{g&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[s,S,g]);const N=C.useCallback(()=>{if(!f.current)return;const{scrollTop:T,scrollHeight:P,clientHeight:H}=f.current,L=P-T-H<40;h(L)},[]),E=C.useCallback(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight,h(!0))},[]),j=C.useCallback(T=>{T.preventDefault(),y(!0),b.current=T.clientY,v.current=e},[e]);if(C.useEffect(()=>{if(!x)return;const T=H=>{const L=b.current-H.clientY,V=Math.max(150,Math.min(window.innerHeight*.4,v.current+L));n(V)},P=()=>{y(!1)};return document.addEventListener("mousemove",T),document.addEventListener("mouseup",P),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",P)}},[x,n]),!l)return null;const z=[...s];return d.jsxs("div",{className:"flex flex-col border-t border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",style:{height:`${e}px`,transition:x?"none":"height 200ms ease-out"},children:[d.jsx("div",{className:"flex h-3 cursor-ns-resize items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800",onMouseDown:j,children:d.jsx("div",{className:"h-0.5 w-8 rounded-full bg-gray-300 dark:bg-gray-600"})}),d.jsx("div",{ref:f,onScroll:N,className:"flex-1 overflow-y-auto px-4 py-2",children:z.length===0&&!o?d.jsx("div",{className:"flex h-full items-center justify-center text-sm text-gray-400",children:a("dock.startNewChat")}):d.jsxs(d.Fragment,{children:[z.map(T=>d.jsx(B_,{message:T},T.id)),o&&S&&d.jsx("div",{className:"mb-3 flex justify-start",children:d.jsxs("div",{className:"max-w-[80%] rounded-lg bg-gray-100 px-3 py-2 text-sm text-gray-900 dark:bg-gray-800 dark:text-gray-100",children:[d.jsx(Q1,{content:S}),d.jsx(X1,{})]})}),o&&!S&&d.jsx("div",{className:"mb-3 flex justify-start",children:d.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-gray-100 px-3 py-2 text-sm text-gray-400 dark:bg-gray-800",children:[d.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"}),d.jsx("span",{children:a("dock.thinkingStatus")})]})})]})}),!g&&d.jsx("button",{type:"button",onClick:E,className:"absolute bottom-14 right-6 z-10 flex h-8 w-8 items-center justify-center rounded-full border border-gray-200 bg-white shadow-md hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",children:d.jsx(KN,{className:"h-4 w-4 text-gray-500"})})]})}const hl=["#ef4444","#f97316","#f59e0b","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#ec4899"];function Dh(e){let n=0;for(let a=0;a<e.length;a++){const l=e.charCodeAt(a);n=(n<<5)-n+l|0}return Math.abs(n)}function $_(e){const n=parseInt(e.slice(1,3),16)/255,a=parseInt(e.slice(3,5),16)/255,l=parseInt(e.slice(5,7),16)/255;return .299*n+.587*a+.114*l}function F_(e,n){const a=Dh(e),l=hl[a%hl.length],s=$_(l)>.5?"#000000":"#ffffff",c=(n??e).charAt(0).toUpperCase()||"?";return{backgroundColor:l,textColor:s,initial:c}}function GR(e){const n=Dh(e);return hl[n%hl.length]}const _x=["round","square","oval"],Mx=["short","spiky","side-part","curly","buzz"],Dx=["dot","line","wide"],Rx=["#fde2c8","#f5c5a0","#d4956b","#a0714f","#6b4226","#ffe0bd"],Ox=["#2c1b0e","#5a3214","#c2884a","#e8c068"];function Z1(e){const n=Dh(e),a=(l,s)=>(n>>>l)%s;return{faceShape:_x[a(0,_x.length)],hairStyle:Mx[a(3,Mx.length)],eyeStyle:Dx[a(6,Dx.length)],skinColor:Rx[a(8,Rx.length)],hairColor:Ox[a(11,Ox.length)],shirtColor:hl[n%hl.length]}}function K_({shape:e,color:n}){switch(e){case"round":return d.jsx("circle",{cx:"24",cy:"20",r:"12",fill:n});case"square":return d.jsx("rect",{x:"12",y:"8",width:"24",height:"24",rx:"4",fill:n});case"oval":return d.jsx("ellipse",{cx:"24",cy:"20",rx:"11",ry:"14",fill:n})}}function P_({style:e,color:n}){switch(e){case"short":return d.jsx("path",{d:"M12 16 Q12 6 24 6 Q36 6 36 16 L36 12 Q36 4 24 4 Q12 4 12 12 Z",fill:n});case"spiky":return d.jsx("path",{d:"M14 14 L16 4 L20 12 L24 2 L28 12 L32 4 L34 14 Q34 6 24 6 Q14 6 14 14 Z",fill:n});case"side-part":return d.jsx("path",{d:"M12 16 Q12 5 24 5 Q36 5 36 16 L36 11 Q36 3 24 3 Q14 3 10 10 Z",fill:n});case"curly":return d.jsx("path",{d:"M12 18 Q10 8 16 5 Q20 2 24 4 Q28 2 32 5 Q38 8 36 18 L36 12 Q36 4 24 4 Q12 4 12 12 Z",fill:n});case"buzz":return d.jsx("path",{d:"M13 15 Q13 6 24 6 Q35 6 35 15 L35 13 Q35 5 24 5 Q13 5 13 13 Z",fill:n})}}function V_({style:e}){switch(e){case"dot":return d.jsxs(d.Fragment,{children:[d.jsx("circle",{cx:"19",cy:"19",r:"1.5",fill:"#333"}),d.jsx("circle",{cx:"29",cy:"19",r:"1.5",fill:"#333"})]});case"line":return d.jsxs(d.Fragment,{children:[d.jsx("line",{x1:"17",y1:"19",x2:"21",y2:"19",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round"}),d.jsx("line",{x1:"27",y1:"19",x2:"31",y2:"19",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round"})]});case"wide":return d.jsxs(d.Fragment,{children:[d.jsx("ellipse",{cx:"19",cy:"19",rx:"2.5",ry:"2",fill:"white"}),d.jsx("circle",{cx:"19",cy:"19",r:"1.2",fill:"#333"}),d.jsx("ellipse",{cx:"29",cy:"19",rx:"2.5",ry:"2",fill:"white"}),d.jsx("circle",{cx:"29",cy:"19",r:"1.2",fill:"#333"})]})}}function J1({agentId:e,size:n=40,className:a}){const l=Z1(e);return d.jsxs("svg",{viewBox:"0 0 48 48",width:n,height:n,className:a,style:{borderRadius:"50%",overflow:"hidden"},children:[d.jsx("rect",{width:"48",height:"48",fill:l.shirtColor,rx:"24"}),d.jsx("path",{d:"M8 42 Q8 34 24 34 Q40 34 40 42 L40 48 L8 48 Z",fill:l.shirtColor}),d.jsx(K_,{shape:l.faceShape,color:l.skinColor}),d.jsx(P_,{style:l.hairStyle,color:l.hairColor}),d.jsx(V_,{style:l.eyeStyle}),d.jsx("path",{d:"M21 24 Q24 26 27 24",stroke:"#333",strokeWidth:"0.8",fill:"none",strokeLinecap:"round"})]})}function Y_(){const{t:e}=oe("panels"),n=he(o=>o.selectedAgentId),a=he(o=>o.agents),l=he(o=>o.selectAgent);if(!n)return null;const s=a.get(n);return s?d.jsxs("div",{className:"px-3 py-2",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(J1,{agentId:s.id,size:32}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("div",{className:"truncate text-sm font-medium text-gray-800 dark:text-gray-200",children:s.name}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("span",{className:"inline-block h-2 w-2 rounded-full",style:{backgroundColor:Qi[s.status]}}),d.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:e(`common:agent.statusLabels.${s.status}`)})]})]}),d.jsx("button",{onClick:()=>l(null),className:"shrink-0 text-xs text-gray-400 hover:text-gray-600 dark:hover:text-gray-200",title:e("agentDetail.deselect"),children:"✕"})]}),s.currentTool&&d.jsx("div",{className:"mb-2 rounded bg-orange-50 px-2 py-1.5 text-xs dark:bg-orange-950/50",children:d.jsxs("div",{className:"text-orange-600 dark:text-orange-400",children:["🔧 ",s.currentTool.name]})}),s.speechBubble&&d.jsx("div",{className:"mb-2 rounded bg-white px-2 py-1.5 text-xs leading-relaxed text-gray-700 shadow-sm dark:bg-gray-800 dark:text-gray-300",children:d.jsx(Ah,{children:s.speechBubble.text})}),s.toolCallHistory.length>0&&d.jsxs("div",{className:"mt-2",children:[d.jsx("div",{className:"mb-1 text-xs font-medium text-gray-400 dark:text-gray-500",children:e("agentDetail.toolCallHistory")}),s.toolCallHistory.map((o,c)=>d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-100 py-1 text-xs text-gray-500 dark:border-gray-700 dark:text-gray-400",children:[d.jsx("span",{children:o.name}),d.jsx("span",{className:"text-gray-400",children:new Date(o.timestamp).toLocaleTimeString()})]},`${o.name}-${o.timestamp}-${c}`))]})]}):null}const G_={lifecycle:"●",tool:"🔧",assistant:"💬",error:"⚠"};function Q_(){const{t:e}=oe("panels"),n=he(h=>h.eventHistory),a=he(h=>h.selectAgent),l=C.useRef(null),[s,o]=C.useState(!0),c=C.useRef(0),f=n.slice(-50);C.useEffect(()=>{s&&l.current&&n.length>c.current&&(l.current.scrollTop=l.current.scrollHeight),c.current=n.length},[n.length,s]);const g=()=>{if(!l.current)return;const{scrollTop:h,scrollHeight:x,clientHeight:y}=l.current,b=x-h-y<30;o(b)};return d.jsxs("div",{ref:l,onScroll:g,className:"flex-1 overflow-y-auto",children:[!s&&n.length>0&&d.jsx("div",{className:"sticky top-0 z-10 flex justify-end bg-white/80 px-2 py-0.5 backdrop-blur-sm dark:bg-gray-900/80",children:d.jsx("button",{onClick:()=>{o(!0),l.current&&(l.current.scrollTop=l.current.scrollHeight)},className:"rounded bg-blue-600 px-1.5 py-0.5 text-[10px] text-white",children:e("eventTimeline.newEvents")})}),f.map((h,x)=>d.jsxs("button",{onClick:()=>a(h.agentId),className:"flex w-full items-start gap-1.5 border-b border-gray-100 px-3 py-1 text-left text-xs hover:bg-gray-50 dark:border-gray-800 dark:hover:bg-gray-800",children:[d.jsx("span",{className:"mt-0.5 shrink-0 text-gray-400",children:new Date(h.timestamp).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}),d.jsx("span",{className:"shrink-0",children:G_[h.stream]??"·"}),d.jsx("span",{className:"shrink-0 font-medium",style:{color:Qi[h.stream==="error"?"error":"thinking"]},children:h.agentName}),d.jsx("span",{className:"min-w-0 truncate text-gray-500 dark:text-gray-400",children:h.summary})]},`${h.timestamp}-${h.agentId}-${x}`)),f.length===0&&d.jsx("div",{className:"py-3 text-center text-xs text-gray-400 dark:text-gray-500",children:e("common:empty.noEvents")})]})}const X_=C.lazy(()=>Ha(()=>import("./TokenLineChart-DY_YXiO5.js"),__vite__mapDeps([0,1])).then(e=>({default:e.TokenLineChart}))),Z_=C.lazy(()=>Ha(()=>import("./CostPieChart-7a55pRVP.js"),__vite__mapDeps([2,1])).then(e=>({default:e.CostPieChart}))),J_=C.lazy(()=>Ha(()=>import("./NetworkGraph-Dh-5R6Yt.js"),[]).then(e=>({default:e.NetworkGraph}))),W_=C.lazy(()=>Ha(()=>import("./ActivityHeatmap-tMKuM1UM.js"),[]).then(e=>({default:e.ActivityHeatmap})));function Eo(){return d.jsx("div",{className:"flex min-h-[140px] items-center justify-center",children:d.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"})})}function eM(){const{t:e}=oe("panels"),[n,a]=C.useState("overview"),l=he(c=>c.globalMetrics),s=[{id:"overview",label:e("metrics.tabs.overview")},{id:"trend",label:e("metrics.tabs.trend")},{id:"topology",label:e("metrics.tabs.topology")},{id:"activity",label:e("metrics.tabs.activity")}],o=[{label:e("metrics.activeAgents"),value:`${l.activeAgents}/${l.totalAgents}`,color:"#3b82f6"},{label:e("metrics.totalTokens"),value:tM(l.totalTokens),color:"#22c55e"},{label:e("metrics.collaboration"),value:`${Math.round(l.collaborationHeat)}%`,color:"#f97316"},{label:e("metrics.tokenRate"),value:`${l.tokenRate.toFixed(0)}${e("metrics.tokenRateUnit")}`,color:"#a855f7"}];return d.jsxs("div",{className:"flex flex-col",children:[d.jsx("div",{className:"grid grid-cols-4 gap-1 p-2",children:o.map(c=>d.jsxs("div",{className:"rounded-lg bg-gray-50 px-1 py-1 text-center dark:bg-gray-800",children:[d.jsx("div",{className:"text-xs font-bold leading-tight",style:{color:c.color},children:c.value}),d.jsx("div",{className:"text-[8px] text-gray-500 dark:text-gray-400",children:c.label})]},c.label))}),d.jsx("div",{className:"flex gap-1 border-t border-gray-100 px-2 py-1 dark:border-gray-800",children:s.map(c=>d.jsx("button",{type:"button",onClick:()=>a(c.id),className:`rounded px-2 py-0.5 text-[10px] ${n===c.id?"bg-gray-200 font-medium dark:bg-gray-700 dark:text-gray-200":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800"}`,children:c.label},c.id))}),d.jsxs("div",{className:"p-2",children:[n==="overview"&&d.jsx(C.Suspense,{fallback:d.jsx(Eo,{}),children:d.jsx(Z_,{})}),n==="trend"&&d.jsx(C.Suspense,{fallback:d.jsx(Eo,{}),children:d.jsx(X_,{})}),n==="topology"&&d.jsx(C.Suspense,{fallback:d.jsx(Eo,{}),children:d.jsx(J_,{})}),n==="activity"&&d.jsx(C.Suspense,{fallback:d.jsx(Eo,{}),children:d.jsx(W_,{})})]})]})}function tM(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function nM({agentId:e,agentName:n,size:a=32}){const{backgroundColor:l,textColor:s,initial:o}=F_(e,n);return d.jsx("div",{className:"flex shrink-0 items-center justify-center rounded-full font-bold",style:{width:a,height:a,backgroundColor:l,color:s,fontSize:a*.45},children:o})}function aM(){const{t:e}=oe(),n=he(s=>s.agents),a=he(s=>s.selectAgent),l=Array.from(n.values()).filter(s=>s.isSubAgent);return l.length===0?d.jsx("div",{className:"py-2 text-center text-xs text-gray-400 dark:text-gray-500",children:e("empty.noSubAgents")}):d.jsx("div",{children:l.map(s=>{const o=s.parentAgentId?n.get(s.parentAgentId):null,c=rM(s.lastActiveAt,e);return d.jsxs("button",{onClick:()=>a(s.id),className:"flex w-full items-start gap-2 border-b border-gray-50 px-3 py-2 text-left transition-colors hover:bg-blue-50 dark:border-gray-800 dark:hover:bg-blue-950",children:[d.jsx(nM,{agentId:s.id,agentName:s.name,size:24}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"truncate text-xs font-medium text-gray-800 dark:text-gray-200",children:s.name}),d.jsx("span",{className:"inline-flex items-center rounded px-1 py-0.5 text-[9px] font-medium text-white",style:{backgroundColor:Qi[s.status]},children:e(`agent.statusLabels.${s.status}`)})]}),o&&d.jsxs("span",{role:"link",tabIndex:0,onClick:f=>{f.stopPropagation(),a(o.id)},onKeyDown:f=>{f.key==="Enter"&&(f.stopPropagation(),a(o.id))},className:"cursor-pointer text-[10px] text-blue-500 hover:underline",children:["← ",o.name]}),s.speechBubble&&d.jsx("div",{className:"mt-0.5 truncate text-[10px] text-gray-400",children:s.speechBubble.text.slice(0,80)}),d.jsx("div",{className:"text-[10px] text-gray-400",children:c})]})]},s.id)})})}function rM(e,n){const a=Math.max(0,Math.floor((Date.now()-e)/1e3));if(a<60)return n("time.running",{seconds:a});const l=Math.floor(a/60),s=a%60;return n("time.runningMinutes",{minutes:l,seconds:s})}function bi({title:e,collapsed:n,onToggle:a,height:l,onHeightChange:s,minHeight:o=60,maxHeight:c=600,headerExtra:f,children:g,flex:h=!1,badge:x}){const y=C.useRef(null),b=C.useRef(null),v=n?0:l??o,S=C.useCallback(N=>{var T;if(n)return;N.preventDefault();const E=((T=y.current)==null?void 0:T.offsetHeight)??v;b.current={startY:N.clientY,startHeight:E};const j=P=>{if(!b.current)return;const H=P.clientY-b.current.startY,L=Math.max(o,Math.min(c,b.current.startHeight+H));s(L)},z=()=>{b.current=null,document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",z),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="ns-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",j),document.addEventListener("mouseup",z)},[n,v,o,c,s]);return C.useEffect(()=>()=>{document.body.style.cursor="",document.body.style.userSelect=""},[]),d.jsxs("div",{className:`flex flex-col ${h&&!n?"min-h-0 flex-1":""}`,style:!n&&!h?{flexShrink:0}:void 0,children:[d.jsxs("button",{type:"button",onClick:a,className:"flex h-6 w-full items-center gap-1 border-b border-gray-200 bg-gray-50 px-2 text-[11px] font-semibold uppercase tracking-wide text-gray-600 hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800/70 dark:text-gray-400 dark:hover:bg-gray-800",children:[d.jsx("span",{className:"inline-block text-[9px] transition-transform duration-150",style:{transform:n?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),d.jsx("span",{className:"select-none",children:e}),x!==void 0&&d.jsx("span",{className:"ml-1 rounded-sm bg-gray-200 px-1 text-[10px] font-normal text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:x}),f&&d.jsx("span",{className:"ml-auto flex items-center",onClick:N=>N.stopPropagation(),children:f})]}),!n&&d.jsx("div",{ref:y,className:`overflow-y-auto overflow-x-hidden ${h?"min-h-0 flex-1":""}`,style:h?{minHeight:o}:{height:v},children:g}),!n&&d.jsx("div",{onMouseDown:S,className:"group relative z-10 h-1 shrink-0 cursor-ns-resize",children:d.jsx("div",{className:"absolute inset-x-0 -top-0.5 bottom-0 transition-colors group-hover:bg-blue-500/30 group-active:bg-blue-500/50"})})]})}const W1="openclaw-sidebar-layout",zx={metrics:{collapsed:!0,height:null},agents:{collapsed:!1,height:null},subAgents:{collapsed:!1,height:null},detail:{collapsed:!1,height:null},timeline:{collapsed:!1,height:null}};function lM(){try{const e=localStorage.getItem(W1);if(e){const n=JSON.parse(e);return{...zx,...n}}}catch{}return{...zx}}function iM(e){try{localStorage.setItem(W1,JSON.stringify(e))}catch{}}function sM(){const[e,n]=C.useState(lM),a=C.useRef(e);a.current=e,C.useEffect(()=>{iM(e)},[e]);const l=C.useCallback(c=>{n(f=>{var g;return{...f,[c]:{...f[c],collapsed:!((g=f[c])!=null&&g.collapsed)}}})},[]),s=C.useCallback((c,f)=>{n(g=>({...g,[c]:{...g[c],height:f}}))},[]),o=C.useCallback(c=>e[c]??{collapsed:!1,height:null},[e]);return{layout:e,toggleSection:l,setSectionHeight:s,getSection:o}}function Lx(){const{t:e}=oe("layout"),n=he(H=>H.agents),a=he(H=>H.selectedAgentId),l=he(H=>H.selectAgent),s=he(H=>H.sidebarCollapsed),o=he(H=>H.setSidebarCollapsed),{getSection:c,toggleSection:f,setSectionHeight:g}=sM(),[h,x]=C.useState(""),[y,b]=C.useState("all"),v=C.useMemo(()=>{let H=Array.from(n.values());if(h){const L=h.toLowerCase();H=H.filter(V=>V.name.toLowerCase().includes(L))}return y==="active"?H=H.filter(L=>L.status!=="idle"&&L.status!=="offline"):y==="idle"?H=H.filter(L=>L.status==="idle"):y==="error"&&(H=H.filter(L=>L.status==="error")),H},[n,h,y]),S=C.useMemo(()=>Array.from(n.values()).filter(H=>H.isSubAgent),[n]),N=[{key:"all",label:e("sidebar.filters.all")},{key:"active",label:e("sidebar.filters.active")},{key:"idle",label:e("sidebar.filters.idle")},{key:"error",label:e("sidebar.filters.error")}];if(s)return d.jsx("aside",{className:"flex w-12 flex-col items-center border-l border-gray-200 bg-white py-3 dark:border-gray-700 dark:bg-gray-900",children:d.jsx("button",{onClick:()=>o(!1),className:"text-gray-400 hover:text-gray-700 dark:hover:text-gray-200",title:e("sidebar.expand"),children:"◀"})});const E=c("metrics"),j=c("agents"),z=c("subAgents"),T=c("detail"),P=c("timeline");return d.jsxs("aside",{className:"flex w-80 flex-col border-l border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[d.jsxs("div",{className:"flex h-8 shrink-0 items-center justify-between border-b border-gray-200 px-3 dark:border-gray-700",children:[d.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400",children:e("sidebar.agents")}),d.jsx("button",{onClick:()=>o(!0),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-200",title:e("sidebar.collapse"),children:"▶"})]}),d.jsx(bi,{id:"metrics",title:e("sidebar.metricsTitle"),collapsed:E.collapsed,onToggle:()=>f("metrics"),height:E.height,onHeightChange:H=>g("metrics",H),minHeight:120,maxHeight:400,children:d.jsx(eM,{})}),d.jsxs(bi,{id:"agents",title:e("sidebar.agentList"),collapsed:j.collapsed,onToggle:()=>f("agents"),height:j.height,onHeightChange:H=>g("agents",H),minHeight:100,maxHeight:600,flex:!0,badge:v.length,headerExtra:d.jsx(oM,{filter:y,filterTags:N}),children:[d.jsxs("div",{className:"border-b border-gray-100 px-3 py-1.5 dark:border-gray-800",children:[d.jsx("input",{type:"text",placeholder:e("sidebar.searchPlaceholder"),value:h,onChange:H=>x(H.target.value),className:"w-full rounded border border-gray-200 bg-gray-50 px-2 py-1 text-sm text-gray-800 placeholder-gray-400 outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-400 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:placeholder-gray-500"}),d.jsx("div",{className:"mt-1.5 flex gap-1",children:N.map(H=>d.jsx("button",{onClick:()=>b(H.key),className:`rounded px-2 py-0.5 text-xs transition-colors ${y===H.key?"bg-blue-600 text-white":"bg-gray-100 text-gray-500 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700"}`,children:H.label},H.key))})]}),d.jsxs("div",{children:[v.map(H=>d.jsxs("button",{onClick:()=>l(H.id),className:`flex w-full items-center gap-3 border-b border-gray-50 px-3 py-2 text-left transition-colors hover:bg-gray-50 dark:border-gray-800 dark:hover:bg-gray-800 ${a===H.id?"bg-blue-50 dark:bg-blue-950":""}`,children:[d.jsx(J1,{agentId:H.id,size:24}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("div",{className:"truncate text-xs font-medium text-gray-800 dark:text-gray-200",children:H.name}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full",style:{backgroundColor:Qi[H.status]}}),d.jsx("span",{className:"text-[10px] text-gray-500 dark:text-gray-400",children:e(`common:agent.statusLabels.${H.status}`)}),d.jsxs("span",{className:"text-[10px] text-gray-400 dark:text-gray-500",children:["· ",uM(e,H.lastActiveAt)]})]})]})]},H.id)),v.length===0&&d.jsx("div",{className:"px-3 py-4 text-center text-xs text-gray-400 dark:text-gray-500",children:e("common:empty.noMatchingAgents")})]})]}),S.length>0&&d.jsx(bi,{id:"subAgents",title:e("sidebar.subAgents"),collapsed:z.collapsed,onToggle:()=>f("subAgents"),height:z.height,onHeightChange:H=>g("subAgents",H),minHeight:60,maxHeight:300,badge:S.length,children:d.jsx(aM,{})}),a&&d.jsx(bi,{id:"detail",title:e("sidebar.agentDetail"),collapsed:T.collapsed,onToggle:()=>f("detail"),height:T.height,onHeightChange:H=>g("detail",H),minHeight:80,maxHeight:400,children:d.jsx(Y_,{})}),d.jsx(bi,{id:"timeline",title:e("sidebar.eventTimeline"),collapsed:P.collapsed,onToggle:()=>f("timeline"),height:P.height,onHeightChange:H=>g("timeline",H),minHeight:60,maxHeight:400,children:d.jsx(Q_,{})})]})}function oM({filter:e,filterTags:n}){var l;if(e==="all")return null;const a=((l=n.find(s=>s.key===e))==null?void 0:l.label)??e;return d.jsx("span",{className:"rounded bg-blue-100 px-1 text-[9px] text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",children:a})}function uM(e,n){const a=Math.max(0,Math.floor((Date.now()-n)/1e3));return a<5?e("common:time.justNow"):a<60?e("common:time.secondsAgo",{count:a}):a<3600?e("common:time.minutesAgo",{count:Math.floor(a/60)}):e("common:time.hoursAgo",{count:Math.floor(a/3600)})}function cM(){try{const e=document.createElement("canvas");return(e.getContext("webgl2")??e.getContext("webgl"))!==null}catch{return!1}}function dM(){var c;const{i18n:e,t:n}=oe("layout"),a=(c=e.language)==null?void 0:c.startsWith("zh"),l=a?"中文":"EN",s=n(a?"topbar.language.switchToEn":"topbar.language.switchToZh"),o=()=>{e.changeLanguage(a?"en":"zh")};return d.jsx("button",{onClick:o,"aria-label":s,title:s,className:"ml-1 flex h-7 w-7 items-center justify-center rounded-md text-xs font-semibold transition-colors hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400",children:l})}function fM(e){return{connecting:{color:"#eab308",pulse:!0,label:e("common:status.connecting")},connected:{color:"#22c55e",pulse:!1,label:e("common:status.connected")},reconnecting:{color:"#f97316",pulse:!0,label:e("common:status.reconnecting")},disconnected:{color:"#6b7280",pulse:!1,label:e("common:status.disconnected")},error:{color:"#ef4444",pulse:!1,label:e("common:status.error")}}}function ev({isMobile:e=!1}){const{t:n}=oe("layout"),a=he(v=>v.connectionStatus),l=he(v=>v.connectionError),s=he(v=>v.globalMetrics),o=he(v=>v.viewMode),c=he(v=>v.setViewMode),f=he(v=>v.theme),g=he(v=>v.setTheme),h=he(v=>v.currentPage),x=C.useMemo(()=>cM(),[]),y=fM(n)[a],b=h==="office";return d.jsxs("header",{className:"flex h-12 shrink-0 items-center border-b border-gray-200 bg-white px-4 shadow-sm dark:border-gray-700 dark:bg-gray-900",children:[b?d.jsx(hM,{viewMode:o,setViewMode:c,metrics:s,webglAvailable:x,isMobile:e}):d.jsx(gM,{currentPage:h}),d.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[d.jsx(pM,{currentPage:h}),d.jsx(xM,{theme:f,setTheme:g}),d.jsx(dM,{}),d.jsx(mM,{statusCfg:y,connectionError:l,connectionStatus:a})]})]})}function hM({viewMode:e,setViewMode:n,metrics:a,webglAvailable:l,isMobile:s}){const{t:o}=oe("layout");return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("h1",{className:"text-lg font-semibold tracking-tight text-gray-800 dark:text-gray-100",children:"OpenClaw Office"}),d.jsx("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-xs text-gray-500 dark:bg-gray-800 dark:text-gray-400",children:"v0.1.0"})]}),d.jsx(yM,{viewMode:e,setViewMode:n,webglAvailable:l,isMobile:s}),d.jsxs("div",{className:"mx-8 flex items-center gap-6 text-sm text-gray-500 dark:text-gray-400",children:[d.jsxs("span",{children:[o("topbar.activeCountText")," ",d.jsxs("strong",{className:"text-gray-800 dark:text-gray-200",children:[a.activeAgents,"/",a.totalAgents]})]}),d.jsxs("span",{children:[o("topbar.tokensLabel")," ",d.jsx("strong",{className:"text-gray-800 dark:text-gray-200",children:bM(a.totalTokens)})]})]})]})}function gM({currentPage:e}){const{t:n}=oe("layout");return d.jsx("div",{className:"flex items-center gap-3",children:d.jsx("h1",{className:"text-lg font-semibold text-gray-800 dark:text-gray-100",children:n(`topbar.pageTitles.${e}`,{defaultValue:n("topbar.pageTitles.fallback")})})})}function pM({currentPage:e}){const{t:n}=oe("layout"),a=Pi(),l=e!=="office";return d.jsx("button",{onClick:()=>a(l?"/":"/dashboard"),className:`flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors ${l?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800"}`,children:l?d.jsxs(d.Fragment,{children:[d.jsx(Cb,{className:"h-4 w-4"}),d.jsx("span",{className:"hidden sm:inline",children:n("topbar.office")})]}):d.jsxs(d.Fragment,{children:[d.jsx(SC,{className:"h-4 w-4"}),d.jsx("span",{className:"hidden sm:inline",children:n("topbar.console")})]})})}function mM({statusCfg:e,connectionError:n,connectionStatus:a}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:e.color,animation:e.pulse?"pulse 1.5s ease-in-out infinite":"none"}}),d.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:n&&a==="error"?n:e.label})]})}function yM({viewMode:e,setViewMode:n,webglAvailable:a,isMobile:l}){const{t:s}=oe("layout"),o=[{key:"2d",label:"2D"},{key:"3d",label:"3D"}];return d.jsx("div",{className:"ml-6 flex items-center rounded-md bg-gray-100 p-0.5 dark:bg-gray-800",children:o.map(({key:c,label:f})=>{const g=e===c,h=c==="3d"&&(!a||l),x=h?s(l?"topbar.viewMode.mobileNotSupported":"topbar.viewMode.webglNotSupported"):s("topbar.viewMode.switchTo",{mode:f});return d.jsx("button",{onClick:()=>!h&&n(c),disabled:h,title:x,className:`rounded px-3 py-1 text-xs font-medium transition-colors ${g?"bg-blue-600 text-white shadow-sm":h?"cursor-not-allowed text-gray-300 dark:text-gray-600":"text-gray-500 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"}`,children:f},c)})})}function xM({theme:e,setTheme:n}){const{t:a}=oe("layout");return d.jsx("button",{onClick:()=>n(e==="light"?"dark":"light"),title:a(e==="light"?"topbar.theme.switchToDark":"topbar.theme.switchToLight"),className:"ml-2 flex h-7 w-7 items-center justify-center rounded-md text-base transition-colors hover:bg-gray-200 dark:hover:bg-gray-700",children:e==="light"?"🌙":"☀️"})}function bM(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function vM({children:e,wsClient:n,isMobile:a=!1}){const{t:l}=oe("layout"),s=he(S=>S.sidebarCollapsed),o=he(S=>S.setSidebarCollapsed),c=he(S=>S.chatDockHeight),f=he(S=>S.setChatDockHeight),g=Et(S=>S.initEventListeners),h=Et(S=>S.setTargetAgent),x=he(S=>S.connectionStatus),y=he(S=>S.agents),b=he(S=>S.selectedAgentId);C.useEffect(()=>{a&&o(!0)},[a,o]),C.useEffect(()=>{if(x!=="connected")return;const S=(n==null?void 0:n.current)??null;return S?g(S):void 0},[x,n,g]),C.useEffect(()=>{if(x==="connected"&&y.size>0&&!Et.getState().targetAgentId){const N=Array.from(y.values()).find(E=>!E.isSubAgent);N&&h(N.id)}},[x,y,h]),C.useEffect(()=>{if(!b)return;const S=y.get(b);if(!S||S.isSubAgent)return;Et.getState().targetAgentId!==b&&h(b)},[b,y,h]);const v=e??d.jsx(ub,{});return d.jsxs("div",{className:"flex h-screen w-screen flex-col bg-gray-50 text-gray-900 dark:bg-gray-950 dark:text-gray-100",children:[d.jsx(ev,{isMobile:a}),d.jsxs("div",{className:"relative flex flex-1 overflow-hidden",children:[d.jsxs("main",{className:"relative flex flex-1 flex-col overflow-hidden",children:[d.jsx("div",{className:"relative flex-1 overflow-hidden",children:v}),d.jsx(I_,{height:c,onHeightChange:f}),d.jsx(p3,{})]}),a?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>o(!s),className:"fixed bottom-0 left-1/2 z-20 flex h-10 w-full max-w-xs -translate-x-1/2 items-center justify-center border-t border-gray-200 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-900","aria-label":l(s?"sidebar.expandSidebar":"sidebar.collapseSidebar"),children:d.jsx("div",{className:"h-1 w-12 rounded-full bg-gray-300 dark:bg-gray-600"})}),!s&&d.jsxs(d.Fragment,{children:[d.jsx("div",{role:"button",tabIndex:0,onClick:()=>o(!0),onKeyDown:S=>S.key==="Escape"&&o(!0),className:"fixed inset-0 z-30 bg-black/30","aria-label":l("sidebar.closeSidebar")}),d.jsx("aside",{className:"fixed inset-x-0 bottom-10 top-12 z-40 overflow-hidden rounded-t-xl border-t border-gray-200 bg-white shadow-xl dark:border-gray-700 dark:bg-gray-900",children:d.jsx(Lx,{})})]})]}):d.jsx(Lx,{})]})]})}function kM(){const{t:e}=oe("layout"),n=Cn(),a=Pi(),l=[{path:"/dashboard",labelKey:"consoleNav.dashboard",icon:mC},{path:"/agents",labelKey:"consoleNav.agents",icon:Eb},{path:"/channels",labelKey:"consoleNav.channels",icon:ru},{path:"/skills",labelKey:"consoleNav.skills",icon:Rb},{path:"/cron",labelKey:"consoleNav.cron",icon:tu},{path:"/settings",labelKey:"consoleNav.settings",icon:ih}];return d.jsxs("div",{className:"flex h-screen w-screen flex-col bg-gray-50 text-gray-900 dark:bg-gray-950 dark:text-gray-100",children:[d.jsx(ev,{}),d.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[d.jsx("nav",{className:"flex w-52 shrink-0 flex-col border-r border-gray-200 bg-white py-3 dark:border-gray-700 dark:bg-gray-900",children:l.map(s=>{const o=n.pathname===s.path,c=s.icon;return d.jsxs("button",{onClick:()=>a(s.path),className:`mx-2 flex items-center gap-2.5 rounded-md px-3 py-2 text-sm transition-colors ${o?"bg-blue-50 font-medium text-blue-600 dark:bg-blue-900/30 dark:text-blue-400":"text-gray-600 hover:bg-gray-100 hover:text-gray-800 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:[d.jsx(c,{className:"h-4 w-4"}),d.jsx("span",{children:e(s.labelKey)})]},s.path)})}),d.jsx("main",{className:"flex-1 overflow-auto",children:d.jsx("div",{className:"mx-auto max-w-6xl p-6",children:d.jsx(ub,{})})})]})]})}function SM({agent:e}){const[n,a]=C.useState(!0),l=C.useRef(null);if(C.useEffect(()=>{if(e.status!=="speaking"){const x=setTimeout(()=>a(!1),5e3);return()=>clearTimeout(x)}a(!0)},[e.status]),!e.speechBubble||!n)return null;const s=e.position.x/uu*100,o=e.position.y/cu*100,c=s<25,f=s>75;let g="-50%",h="center";return c?(g="-10%",h="left"):f&&(g="-90%",h="right"),d.jsxs("div",{ref:l,className:"pointer-events-none absolute",style:{left:`${s}%`,top:`${o}%`,transform:`translate(${g}, -100%) translateY(-52px)`,opacity:e.status==="speaking"?1:0,transition:"opacity 500ms ease",zIndex:20},children:[d.jsx("div",{className:"pointer-events-auto max-h-[200px] w-[260px] max-w-[320px] overflow-y-auto rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm leading-relaxed text-gray-800 shadow-lg dark:border-gray-700 dark:bg-gray-900 dark:text-gray-200",children:d.jsx(Ah,{children:e.speechBubble.text})}),d.jsx("div",{className:"h-0 w-0 border-l-[6px] border-r-[6px] border-t-[8px] border-l-transparent border-r-transparent border-t-gray-200 dark:border-t-gray-700",style:{marginLeft:h==="left"?"16px":"auto",marginRight:h==="right"?"16px":h==="center"?"auto":void 0,...h==="center"?{margin:"0 auto"}:{}}})]})}const tv=C.memo(function({agent:n}){const{t:a}=oe("common"),l=he(N=>N.selectedAgentId),s=he(N=>N.selectAgent),o=he(N=>N.theme),[c,f]=C.useState(!1),g=l===n.id,h=g?wi.selectedRadius:wi.radius,x=Qi[n.status],y=o==="dark",b=Z1(n.id),v=`avatar-clip-${n.id}`,S=n.name.length>wi.nameLabelMaxChars?`${n.name.slice(0,wi.nameLabelMaxChars)}…`:n.name;return d.jsxs("g",{transform:`translate(${n.position.x}, ${n.position.y})`,style:{cursor:"pointer",transition:"transform 400ms ease"},onClick:()=>s(n.id),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[g&&d.jsx("circle",{r:h+8,fill:x,opacity:.18,style:{filter:`drop-shadow(0 0 10px ${x})`}}),d.jsx(wM,{status:n.status,r:h,color:x}),d.jsx("defs",{children:d.jsx("clipPath",{id:v,children:d.jsx("circle",{r:h-2})})}),d.jsx("circle",{r:h-2,fill:y?"#1e293b":"#f8fafc"}),d.jsx("g",{clipPath:`url(#${v})`,children:d.jsx(CM,{data:b,size:h*2-4})}),n.isSubAgent&&d.jsxs("g",{transform:`translate(${h*.6}, ${h*.5})`,children:[d.jsx("circle",{r:7,fill:y?"#1e293b":"#fff",stroke:x,strokeWidth:1.2}),d.jsx("text",{textAnchor:"middle",dy:"3.5",fontSize:"9",fill:x,fontWeight:"bold",children:"S"})]}),n.status==="thinking"&&d.jsx(NM,{r:h}),n.status==="error"&&d.jsxs("g",{transform:`translate(${h*.65}, ${-h*.65})`,children:[d.jsx("circle",{r:7,fill:"#ef4444"}),d.jsx("text",{textAnchor:"middle",dy:"4",fontSize:"10",fill:"#fff",fontWeight:"bold",children:"!"})]}),n.status==="speaking"&&d.jsx("g",{transform:`translate(${h*.7}, ${-h*.55})`,children:d.jsx("circle",{r:5,fill:"#a855f7",opacity:.8,children:d.jsx("animate",{attributeName:"r",values:"4;6;4",dur:"1s",repeatCount:"indefinite"})})}),n.status==="tool_calling"&&n.currentTool&&d.jsx("foreignObject",{x:-50,y:h+2,width:100,height:20,style:{pointerEvents:"none"},children:d.jsx("div",{style:{display:"flex",justifyContent:"center"},children:d.jsx("span",{style:{fontSize:"9px",fontWeight:600,color:"#fff",backgroundColor:"#f97316",borderRadius:"4px",padding:"1px 6px",whiteSpace:"nowrap",maxWidth:"90px",overflow:"hidden",textOverflow:"ellipsis"},children:n.currentTool.name})})}),d.jsx("foreignObject",{x:-60,y:h+(n.status==="tool_calling"&&n.currentTool?18:4),width:120,height:22,style:{pointerEvents:"none"},children:d.jsx("div",{style:{display:"flex",justifyContent:"center"},children:d.jsx("span",{title:n.name,style:{fontSize:"11px",fontWeight:500,color:y?"#cbd5e1":"#475569",backgroundColor:y?"rgba(30,41,59,0.7)":"rgba(255,255,255,0.75)",backdropFilter:"blur(6px)",borderRadius:"6px",padding:"1px 8px",whiteSpace:"nowrap",border:`1px solid ${y?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)"}`},children:S})})}),c&&d.jsx("foreignObject",{x:-80,y:-h-38,width:160,height:32,style:{pointerEvents:"none"},children:d.jsx("div",{style:{display:"flex",justifyContent:"center"},children:d.jsxs("span",{style:{fontSize:"11px",fontWeight:500,color:y?"#e2e8f0":"#374151",backgroundColor:y?"rgba(30,41,59,0.85)":"rgba(255,255,255,0.9)",backdropFilter:"blur(8px)",borderRadius:"8px",padding:"4px 10px",whiteSpace:"nowrap",boxShadow:y?"0 4px 8px rgba(0,0,0,0.3)":"0 4px 8px rgba(0,0,0,0.1)",border:`1px solid ${y?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"}`},children:[n.name," · ",a(`agent.statusLabels.${n.status}`)]})})})]})});function wM({status:e,r:n,color:a}){const l=jM(e);return d.jsx("circle",{r:n,fill:"none",stroke:a,strokeWidth:wi.strokeWidth,style:{transition:"stroke 300ms ease",...l}})}function jM(e){switch(e){case"thinking":return{animation:"agent-pulse 1.5s ease-in-out infinite"};case"tool_calling":return{animation:"agent-pulse 2s ease-in-out infinite",strokeDasharray:"6 3"};case"speaking":return{animation:"agent-pulse 1s ease-in-out infinite"};case"error":return{animation:"agent-blink 0.8s ease-in-out infinite"};case"spawning":return{animation:"agent-spawn 0.5s ease-out forwards"};default:return{}}}function NM({r:e}){return d.jsx("g",{transform:`translate(${e*.55}, ${-e*.7})`,children:[0,1,2].map(n=>d.jsx("circle",{cx:n*5,cy:0,r:2,fill:"#3b82f6",style:{animation:`thinking-dots 1.2s ease-in-out ${n*.15}s infinite`}},n))})}function CM({data:e,size:n}){const a=n/2,l=e.faceShape==="round"?a*.8:e.faceShape==="oval"?a*.7:a*.75,s=e.faceShape==="oval"?a*.9:l;return d.jsxs("g",{children:[d.jsx("rect",{x:-a,y:a*.4,width:n,height:a*1.2,fill:e.shirtColor}),d.jsx("ellipse",{cx:0,cy:-a*.05,rx:l,ry:s,fill:e.skinColor}),d.jsx(EM,{style:e.hairStyle,color:e.hairColor,s:a,faceRx:l}),d.jsx(AM,{style:e.eyeStyle,s:a})]})}function EM({style:e,color:n,s:a,faceRx:l}){switch(e){case"short":return d.jsx("ellipse",{cx:0,cy:-a*.55,rx:l*.95,ry:a*.45,fill:n});case"spiky":return d.jsxs("g",{children:[d.jsx("ellipse",{cx:0,cy:-a*.55,rx:l*.9,ry:a*.4,fill:n}),[-.4,-.15,.1,.35].map(s=>d.jsx("polygon",{points:`${s*a*2},-${a*.85} ${s*a*2-3},-${a*.5} ${s*a*2+3},-${a*.5}`,fill:n},s))]});case"side-part":return d.jsxs("g",{children:[d.jsx("ellipse",{cx:-a*.1,cy:-a*.55,rx:l,ry:a*.45,fill:n}),d.jsx("rect",{x:l*.3,y:-a*.9,width:l*.5,height:a*.3,rx:3,fill:n})]});case"curly":return d.jsx("g",{children:[[-.35,-.7],[0,-.78],[.35,-.7],[-.5,-.45],[.5,-.45]].map(([s,o],c)=>d.jsx("circle",{cx:s*a,cy:o*a,r:a*.22,fill:n},c))});case"buzz":return d.jsx("ellipse",{cx:0,cy:-a*.45,rx:l*.85,ry:a*.35,fill:n,opacity:.7});default:return null}}function AM({style:e,s:n}){const a=-n*.08,l=n*.28;switch(e){case"dot":return d.jsxs("g",{children:[d.jsx("circle",{cx:-l,cy:a,r:2,fill:"#333"}),d.jsx("circle",{cx:l,cy:a,r:2,fill:"#333"})]});case"line":return d.jsxs("g",{children:[d.jsx("line",{x1:-l-3,y1:a,x2:-l+3,y2:a,stroke:"#333",strokeWidth:1.5,strokeLinecap:"round"}),d.jsx("line",{x1:l-3,y1:a,x2:l+3,y2:a,stroke:"#333",strokeWidth:1.5,strokeLinecap:"round"})]});case"wide":return d.jsxs("g",{children:[d.jsx("ellipse",{cx:-l,cy:a,rx:3,ry:2.5,fill:"#fff",stroke:"#333",strokeWidth:.8}),d.jsx("circle",{cx:-l,cy:a,r:1.2,fill:"#333"}),d.jsx("ellipse",{cx:l,cy:a,rx:3,ry:2.5,fill:"#fff",stroke:"#333",strokeWidth:.8}),d.jsx("circle",{cx:l,cy:a,r:1.2,fill:"#333"})]});default:return null}}function TM({x1:e,y1:n,x2:a,y2:l,strength:s}){const o=(e+a)/2,c=(n+l)/2,f=a-e,g=l-n,h=Math.sqrt(f*f+g*g),x=Math.min(h*.2,50),y=o-g/h*x,b=c+f/h*x,v=`M ${e} ${n} Q ${y} ${b} ${a} ${l}`,S=s>=.5,N=S?3:1.5,E=Math.max(.2,s);return d.jsxs("g",{children:[d.jsx("path",{d:v,fill:"none",stroke:"#60a5fa",strokeWidth:N+2,opacity:Math.max(.03,s*.15),style:{filter:"blur(3px)"}}),d.jsx("path",{d:v,fill:"none",stroke:"#60a5fa",strokeWidth:N,strokeDasharray:S?"12,6":"6,4",opacity:E,style:{animation:S?"connection-pulse 0.8s linear infinite":"dash-flow 1.5s linear infinite",filter:S?"drop-shadow(0 0 4px rgba(96,165,250,0.8))":void 0}})]})}function _M({zone:e,zoneKey:n}){const{t:a}=oe("common"),o=he(c=>c.theme)==="dark"?"#64748b":"#94a3b8";return d.jsx("text",{x:e.x+14,y:e.y+22,fill:o,fontSize:11,fontWeight:600,fontFamily:"system-ui, sans-serif",letterSpacing:"0.05em",children:a(`zones.${n}`)})}const MM=C.memo(function({x:n,y:a,isDark:l=!1}){const s=l?"#334155":"#dfe5ed",o=l?"#283548":"#c8d0dc",c=l?"#1e293b":"#f1f5f9",f=l?"#475569":"#94a3b8";return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("rect",{x:-50,y:-6,width:100,height:60,rx:6,fill:s,stroke:o,strokeWidth:1}),d.jsx("path",{d:"M -50 54 L -50 60 Q -50 66 -44 66 L 44 66 Q 50 66 50 60 L 50 54",fill:o,opacity:.6}),d.jsx("rect",{x:-20,y:4,width:40,height:26,rx:3,fill:c,stroke:f,strokeWidth:.8}),d.jsx("rect",{x:-16,y:36,width:32,height:12,rx:2,fill:l?"#475569":"#cbd5e1",opacity:.6})]})}),Xf=C.memo(function({x:n,y:a,isDark:l=!1}){const s=l?"#475569":"#94a3b8",o=l?"#334155":"#7c8ba0";return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("path",{d:"M -12 -14 Q 0 -20 12 -14",fill:"none",stroke:o,strokeWidth:4,strokeLinecap:"round"}),d.jsx("circle",{r:14,fill:s,opacity:.85})]})}),DM=C.memo(function({x:n,y:a,radius:l=80,isDark:s=!1}){const o=`mt-grad-${n}-${a}`,c=s?"#334155":"#bfcbda",f=s?"#3d4f66":"#dbe4ef";return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("defs",{children:d.jsxs("radialGradient",{id:o,children:[d.jsx("stop",{offset:"0%",stopColor:f}),d.jsx("stop",{offset:"100%",stopColor:c})]})}),d.jsx("circle",{r:l,fill:`url(#${o})`,stroke:s?"#475569":"#94a3b8",strokeWidth:1.5,style:{filter:"drop-shadow(0 3px 6px rgba(0,0,0,0.10))"}})]})}),Ao=C.memo(function({x:n,y:a,rotation:l=0,isDark:s=!1}){const o=s?"#475569":"#a5b4c8",c=s?"#334155":"#8494a7",f=s?"#5b6b80":"#c8d5e3";return d.jsxs("g",{transform:`translate(${n}, ${a}) rotate(${l})`,children:[d.jsx("rect",{x:-55,y:-22,width:110,height:44,rx:10,fill:c}),d.jsx("rect",{x:-48,y:-16,width:96,height:32,rx:6,fill:o}),d.jsx("circle",{cx:-30,cy:0,r:8,fill:f,opacity:.7}),d.jsx("circle",{cx:30,cy:0,r:8,fill:f,opacity:.7}),d.jsx("rect",{x:-52,y:-25,width:104,height:8,rx:4,fill:c,opacity:.7})]})}),To=C.memo(function({x:n,y:a}){return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("path",{d:"M -8 6 L -10 18 Q -10 22 -6 22 L 6 22 Q 10 22 10 18 L 8 6 Z",fill:"#a07050"}),d.jsx("ellipse",{cx:0,cy:-2,rx:12,ry:10,fill:"#4ade80",opacity:.85}),d.jsx("ellipse",{cx:-6,cy:-8,rx:8,ry:6,fill:"#22c55e",opacity:.7}),d.jsx("ellipse",{cx:6,cy:-6,rx:7,ry:5,fill:"#16a34a",opacity:.6})]})}),Ux=C.memo(function({x:n,y:a}){return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx("ellipse",{cx:0,cy:4,rx:9,ry:3,fill:"#d1d5db",opacity:.5}),d.jsx("rect",{x:-5,y:-4,width:10,height:10,rx:2,fill:"#f5f5f4",stroke:"#d1d5db",strokeWidth:.6}),d.jsx("ellipse",{cx:0,cy:-2,rx:4,ry:1.5,fill:"#92400e",opacity:.7}),d.jsx("path",{d:"M 5 -1 Q 9 -1 9 3 Q 9 6 5 6",fill:"none",stroke:"#d1d5db",strokeWidth:1}),d.jsx("path",{d:"M -1 -7 Q 0 -10 1 -7",fill:"none",stroke:"#94a3b8",strokeWidth:.5,opacity:.4})]})}),nv=C.memo(function({x:n,y:a,agent:l}){const s=he(o=>o.theme)==="dark";return d.jsxs("g",{transform:`translate(${n}, ${a})`,children:[d.jsx(MM,{x:0,y:30,isDark:s}),d.jsx(Xf,{x:0,y:-12,isDark:s}),l&&d.jsx(tv,{agent:{...l,position:{x:0,y:-12}}})]})},(e,n)=>{var a,l,s,o;return e.x!==n.x||e.y!==n.y?!1:e.agent===null&&n.agent===null?!0:e.agent===null||n.agent===null?!1:e.agent.id===n.agent.id&&e.agent.status===n.agent.status&&e.agent.name===n.agent.name&&((a=e.agent.currentTool)==null?void 0:a.name)===((l=n.agent.currentTool)==null?void 0:l.name)&&e.agent.isSubAgent===n.agent.isSubAgent&&((s=e.agent.speechBubble)==null?void 0:s.text)===((o=n.agent.speechBubble)==null?void 0:o.text)});function RM(){const e=he(S=>S.agents),n=he(S=>S.links),a=he(S=>S.theme),l=Array.from(e.values()),s=a==="dark",o=s?fh:dh,c=C.useMemo(()=>l.filter(S=>S.zone==="desk"&&!S.isSubAgent),[l]),f=C.useMemo(()=>l.filter(S=>S.zone==="hotDesk"||S.isSubAgent),[l]),g=C.useMemo(()=>l.filter(S=>S.zone==="meeting"),[l]),h=C.useMemo(()=>Uy(gt.desk,c.length,Math.max(c.length,4)),[c.length]),x=C.useMemo(()=>Uy(gt.hotDesk,f.length,Math.max(f.length,2)),[f.length]),y={x:gt.meeting.x+gt.meeting.width/2,y:gt.meeting.y+gt.meeting.height/2},b=Math.min(60+g.length*8,Math.min(gt.meeting.width,gt.meeting.height)/2-40),v=C.useMemo(()=>s3(g.length,y,b+36),[g.length,y.x,y.y,b]);return d.jsxs("div",{className:"relative h-full w-full bg-gray-100 dark:bg-gray-950",children:[d.jsxs("svg",{viewBox:`0 0 ${uu} ${cu}`,className:"h-full w-full",preserveAspectRatio:"xMidYMid meet",children:[d.jsxs("defs",{children:[d.jsx("filter",{id:"building-shadow",x:"-3%",y:"-3%",width:"106%",height:"106%",children:d.jsx("feDropShadow",{dx:"0",dy:"3",stdDeviation:"6",floodOpacity:s?.5:.12})}),d.jsxs("pattern",{id:"corridor-tiles",width:"28",height:"28",patternUnits:"userSpaceOnUse",children:[d.jsx("rect",{width:"28",height:"28",fill:o.corridor}),d.jsx("rect",{x:"0.5",y:"0.5",width:"27",height:"27",fill:"none",stroke:s?"#1f2937":"#d5dbe3",strokeWidth:"0.3",rx:"1"})]}),d.jsxs("pattern",{id:"lounge-carpet",width:"6",height:"6",patternUnits:"userSpaceOnUse",children:[d.jsx("rect",{width:"6",height:"6",fill:o.lounge}),d.jsx("circle",{cx:"3",cy:"3",r:"0.5",fill:s?"#2d2540":"#e5e0ed",opacity:"0.4"})]})]}),d.jsx("rect",{x:ue.x,y:ue.y,width:ue.width,height:ue.height,rx:ue.cornerRadius,fill:o.corridor,stroke:o.wall,strokeWidth:ue.wallThickness,filter:"url(#building-shadow)"}),d.jsx(OM,{isDark:s}),Object.entries(gt).map(([S,N])=>d.jsx("rect",{x:N.x,y:N.y,width:N.width,height:N.height,fill:S==="lounge"?"url(#lounge-carpet)":o[S]},`floor-${S}`)),d.jsx(zM,{isDark:s}),d.jsx(LM,{isDark:s}),Object.entries(gt).map(([S,N])=>d.jsx(_M,{zone:N,zoneKey:S},`label-${S}`)),d.jsx(UM,{deskSlots:h,deskAgents:c}),d.jsx(DM,{x:y.x,y:y.y,radius:b,isDark:s}),d.jsx(BM,{seats:v,meetingAgentCount:g.length,isDark:s}),d.jsx(HM,{slots:x,agents:f}),d.jsx(qM,{isDark:s}),d.jsx(IM,{isDark:s}),n.map(S=>{const N=e.get(S.sourceId),E=e.get(S.targetId);return!N||!E?null:d.jsx(TM,{x1:N.position.x,y1:N.position.y,x2:E.position.x,y2:E.position.y,strength:S.strength},`${S.sourceId}-${S.targetId}`)}),g.map((S,N)=>{const E=v[N];return E?d.jsx(tv,{agent:{...S,position:E}},S.id):null})]}),l.filter(S=>S.speechBubble).map(S=>d.jsx(SM,{agent:S},`bubble-${S.id}`))]})}function OM({isDark:e}){const n=ue.corridorWidth,a=ue.x,l=ue.y+(ue.height-n)/2,s=ue.x+(ue.width-n)/2,o=ue.y;return d.jsxs("g",{children:[d.jsx("rect",{x:a,y:l,width:ue.width,height:n,fill:"url(#corridor-tiles)"}),d.jsx("rect",{x:s,y:o,width:n,height:ue.height,fill:"url(#corridor-tiles)"}),d.jsx("line",{x1:a,y1:l+n/2,x2:a+ue.width,y2:l+n/2,stroke:e?"#334155":"#c8d0dc",strokeWidth:.5,strokeDasharray:"8 6",opacity:.6}),d.jsx("line",{x1:s+n/2,y1:o,x2:s+n/2,y2:o+ue.height,stroke:e?"#334155":"#c8d0dc",strokeWidth:.5,strokeDasharray:"8 6",opacity:.6})]})}function zM({isDark:e}){const n=e?"#475569":"#8b9bb0",a=e?"#334155":"#c8d0dc",l=4,s=ue.corridorWidth,o=ue.x+(ue.width-s)/2,c=ue.y+(ue.height-s)/2,f=[{x:o-l/2,y:ue.y,w:l,h:c-ue.y},{x:o-l/2,y:c+s,w:l,h:ue.y+ue.height-c-s},{x:o+s-l/2,y:ue.y,w:l,h:c-ue.y},{x:o+s-l/2,y:c+s,w:l,h:ue.y+ue.height-c-s},{x:ue.x,y:c-l/2,w:o-ue.x,h:l},{x:o+s,y:c-l/2,w:ue.x+ue.width-o-s,h:l},{x:ue.x,y:c+s-l/2,w:o-ue.x,h:l},{x:o+s,y:c+s-l/2,w:ue.x+ue.width-o-s,h:l}];return d.jsx("g",{children:f.map((g,h)=>d.jsx("rect",{x:g.x,y:g.y,width:g.w,height:g.h,fill:a,stroke:n,strokeWidth:.5},`wall-${h}`))})}function LM({isDark:e}){const n=ue.corridorWidth,a=ue.x+(ue.width-n)/2,l=ue.y+(ue.height-n)/2,s=40,o=e?fh.corridor:dh.corridor,c=e?"#64748b":"#94a3b8",f=[{cx:(ue.x+a)/2,cy:l,horizontal:!0},{cx:(a+n+ue.x+ue.width)/2,cy:l,horizontal:!0},{cx:(ue.x+a)/2,cy:l+n,horizontal:!0},{cx:(a+n+ue.x+ue.width)/2,cy:l+n,horizontal:!0},{cx:a,cy:(ue.y+l)/2,horizontal:!1},{cx:a+n,cy:(ue.y+l)/2,horizontal:!1},{cx:a,cy:(l+n+ue.y+ue.height)/2,horizontal:!1},{cx:a+n,cy:(l+n+ue.y+ue.height)/2,horizontal:!1}];return d.jsx("g",{children:f.map((g,h)=>{const x=s/2;return g.horizontal?d.jsxs("g",{children:[d.jsx("rect",{x:g.cx-x,y:g.cy-3,width:s,height:6,fill:o}),d.jsx("path",{d:`M ${g.cx-x} ${g.cy} A ${x} ${x} 0 0 1 ${g.cx+x} ${g.cy}`,fill:"none",stroke:c,strokeWidth:.8,strokeDasharray:"3 2",opacity:.5})]},`door-${h}`):d.jsxs("g",{children:[d.jsx("rect",{x:g.cx-3,y:g.cy-x,width:6,height:s,fill:o}),d.jsx("path",{d:`M ${g.cx} ${g.cy-x} A ${x} ${x} 0 0 1 ${g.cx} ${g.cy+x}`,fill:"none",stroke:c,strokeWidth:.8,strokeDasharray:"3 2",opacity:.5})]},`door-${h}`)})})}function UM({deskSlots:e,deskAgents:n}){const a=C.useMemo(()=>{const l=new Map;for(const s of n){let o=0;for(let g=0;g<s.id.length;g++)o=(o<<5)-o+s.id.charCodeAt(g)|0;let f=Math.abs(o)%e.length;for(;l.has(f);)f=(f+1)%e.length;l.set(f,s)}return l},[n,e.length]);return d.jsx("g",{children:e.map((l,s)=>d.jsx(nv,{x:l.unitX,y:l.unitY,agent:a.get(s)??null},`desk-${s}`))})}function HM({slots:e,agents:n}){return d.jsx("g",{children:e.map((a,l)=>d.jsx(nv,{x:a.unitX,y:a.unitY,agent:n[l]??null},`hotdesk-${l}`))})}function BM({seats:e,meetingAgentCount:n,isDark:a}){const l={x:gt.meeting.x+gt.meeting.width/2,y:gt.meeting.y+gt.meeting.height/2};if(n>0)return d.jsx("g",{children:e.map((c,f)=>d.jsx(Xf,{x:c.x,y:c.y,isDark:a},`mc-${f}`))});const s=6,o=100;return d.jsx("g",{children:Array.from({length:s},(c,f)=>{const g=2*Math.PI*f/s-Math.PI/2;return d.jsx(Xf,{x:Math.round(l.x+Math.cos(g)*o),y:Math.round(l.y+Math.sin(g)*o),isDark:a},`mc-empty-${f}`)})})}function qM({isDark:e}){const n=gt.lounge,a=n.x+n.width/2,l=e?"#334155":"#5a6878",s=e?"#475569":"#8494a7",o=e?"#64748b":"#a5b4c8",c=e?"#94a3b8":"#ffffff",f=e?"#1e293b":"#3b4f6b",g=200,h=36,x=n.y+n.height*.52,y=160,b=24,v=x+h+14;return d.jsxs("g",{children:[d.jsx(Ao,{x:n.x+100,y:n.y+60,rotation:0,isDark:e}),d.jsx(Ao,{x:n.x+280,y:n.y+60,rotation:0,isDark:e}),d.jsx(Ao,{x:n.x+100,y:n.y+140,rotation:180,isDark:e}),d.jsx(Ux,{x:n.x+190,y:n.y+100}),d.jsx(Ux,{x:n.x+100,y:n.y+100}),d.jsx(Ao,{x:n.x+440,y:n.y+100,rotation:90,isDark:e}),d.jsx("rect",{x:a-g/2,y:x,width:g,height:h,rx:4,fill:f}),d.jsx("rect",{x:a-g/2,y:x,width:g,height:3,rx:1.5,fill:e?"#64748b":"#7a9bc0"}),d.jsx("text",{x:a,y:x+h/2+5,textAnchor:"middle",fill:c,fontSize:14,fontWeight:700,fontFamily:"system-ui, sans-serif",letterSpacing:"0.12em",children:"OpenClaw"}),d.jsx("rect",{x:a-y/2,y:v,width:y,height:b,rx:12,fill:s,stroke:l,strokeWidth:1}),d.jsx("rect",{x:a-y/2+4,y:v+3,width:y-8,height:b-6,rx:9,fill:o,opacity:.5}),d.jsx(To,{x:a-g/2-30,y:x+h/2}),d.jsx(To,{x:a+g/2+30,y:x+h/2}),d.jsx(To,{x:n.x+40,y:n.y+n.height-50}),d.jsx(To,{x:n.x+n.width-40,y:n.y+n.height-50})]})}function IM({isDark:e}){const n=gt.lounge,a=n.x+n.width/2,l=ue.y+ue.height,s=70,o=s/2,c=e?fh.lounge:dh.lounge,f=e?"#64748b":"#8b9bb0",g=e?"#374151":"#b0a090",h=e?"#64748b":"#94a3b8";return d.jsxs("g",{children:[d.jsx("rect",{x:a-o-2,y:l-ue.wallThickness-1,width:s+4,height:ue.wallThickness+4,fill:c}),d.jsx("rect",{x:a-o-3,y:l-10,width:3,height:12,rx:1,fill:f}),d.jsx("rect",{x:a+o,y:l-10,width:3,height:12,rx:1,fill:f}),d.jsx("path",{d:`M ${a-o} ${l} A ${o} ${o} 0 0 0 ${a} ${l-o}`,fill:"none",stroke:f,strokeWidth:.8,strokeDasharray:"4 3",opacity:.5}),d.jsx("path",{d:`M ${a+o} ${l} A ${o} ${o} 0 0 1 ${a} ${l-o}`,fill:"none",stroke:f,strokeWidth:.8,strokeDasharray:"4 3",opacity:.5}),d.jsx("rect",{x:a-30,y:l-18,width:60,height:12,rx:3,fill:g,opacity:.5}),d.jsx("text",{x:a,y:l+14,textAnchor:"middle",fill:h,fontSize:9,fontWeight:600,fontFamily:"system-ui, sans-serif",letterSpacing:"0.15em",children:"ENTRANCE"})]})}const $M=oa(e=>({channelsSummary:[],skillsSummary:[],usage:null,uptime:0,isLoading:!1,error:null,refresh:async()=>{e({isLoading:!0,error:null});try{const n=await yt(),a=await Promise.allSettled([n.channelsStatus(),n.skillsStatus(),n.usageStatus()]),l=a[0].status==="fulfilled"?a[0].value:[],s=a[1].status==="fulfilled"?a[1].value:[],o=a[2].status==="fulfilled"?a[2].value:null,c=[];a[0].status==="rejected"&&c.push(`channels: ${a[0].reason}`),a[1].status==="rejected"&&c.push(`skills: ${a[1].reason}`),a[2].status==="rejected"&&c.push(`usage: ${a[2].reason}`),e({channelsSummary:l,skillsSummary:s,usage:o,isLoading:!1,error:c.length>0?c.join("; "):null})}catch(n){e({error:String(n),isLoading:!1})}}}));function Wi({message:e}){return d.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[d.jsx(Ri,{className:"mb-3 h-8 w-8 animate-spin text-blue-500"}),e&&d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e})]})}function mu({message:e,onRetry:n}){const{t:a}=oe("common");return d.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[d.jsx(Ab,{className:"mb-3 h-10 w-10 text-red-500"}),d.jsx("p",{className:"mb-4 text-sm text-red-600 dark:text-red-400",children:e}),n&&d.jsx("button",{type:"button",onClick:n,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-medium text-red-600 hover:bg-red-50 dark:border-red-700 dark:text-red-400 dark:hover:bg-red-900/20 transition-colors",children:a("actions.retry")})]})}function _o({icon:e,title:n,value:a,subtitle:l,progress:s,color:o="text-blue-500"}){return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(e,{className:`h-5 w-5 ${o}`}),d.jsx("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400",children:n})]}),d.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:a}),l&&d.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:l}),s!=null&&d.jsx("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700",children:d.jsx("div",{className:"h-full rounded-full bg-blue-500 transition-all",style:{width:`${Math.min(100,Math.max(0,s))}%`}})})]})}const FM={warning:"border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-700 dark:bg-amber-900/20 dark:text-amber-300",error:"border-red-300 bg-red-50 text-red-800 dark:border-red-700 dark:bg-red-900/20 dark:text-red-300"};function Hx({variant:e,message:n,actionLabel:a,onAction:l}){const s=e==="warning"?lu:eu;return d.jsxs("div",{className:`flex items-center gap-3 rounded-lg border px-4 py-3 text-sm ${FM[e]}`,children:[d.jsx(s,{className:"h-4 w-4 flex-shrink-0"}),d.jsx("span",{className:"flex-1",children:n}),a&&l&&d.jsx("button",{type:"button",onClick:l,className:"text-xs font-medium underline hover:no-underline",children:a})]})}const KM=[{path:"/channels",icon:ru,titleKey:"console:channels.title",descKey:"console:channels.description"},{path:"/skills",icon:sh,titleKey:"console:skills.title",descKey:"console:skills.description"},{path:"/cron",icon:tu,titleKey:"console:cron.title",descKey:"console:cron.description"},{path:"/settings",icon:ih,titleKey:"console:settings.title",descKey:"console:settings.description"}];function PM(){const e=Pi(),{t:n}=oe();return d.jsx("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:KM.map(a=>d.jsxs("button",{type:"button",onClick:()=>e(a.path),className:"flex flex-col items-start gap-2 rounded-lg border border-gray-200 bg-white p-4 text-left transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-600 dark:hover:bg-blue-900/10",children:[d.jsx(a.icon,{className:"h-5 w-5 text-gray-500 dark:text-gray-400"}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:n(a.titleKey)}),d.jsx("div",{className:"mt-0.5 text-xs text-gray-500 dark:text-gray-400 line-clamp-2",children:n(a.descKey)})]})]},a.path))})}const VM={connected:"bg-green-500",active:"bg-green-500",ok:"bg-green-500",disconnected:"bg-gray-400",paused:"bg-gray-400",disabled:"bg-gray-400",connecting:"bg-yellow-500",pending:"bg-yellow-500",running:"bg-yellow-500",error:"bg-red-500",failed:"bg-red-500"};function av({status:e,className:n=""}){const{t:a}=oe("common"),l=VM[e]??"bg-gray-400",s=a(`status.${e}`,{defaultValue:e});return d.jsxs("span",{className:`inline-flex items-center gap-1.5 text-xs ${n}`,children:[d.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${l}`}),d.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:s})]})}const YM={whatsapp:"📱",telegram:"✈️",discord:"🎮",signal:"🔒",feishu:"🐦",imessage:"💬",matrix:"🔗",line:"🟢",msteams:"👔",googlechat:"💭",mattermost:"💠"};function GM({channels:e}){const{t:n}=oe("console"),a=e.filter(l=>l.status==="connected");return a.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:n("dashboard.channelOverview.title")}),d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[d.jsx(ru,{className:"h-4 w-4"}),d.jsx("span",{children:n("dashboard.channelOverview.empty")})]})]}):d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:n("dashboard.channelOverview.title")}),d.jsx("div",{className:"flex flex-wrap gap-3",children:a.map(l=>d.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-gray-50 px-3 py-1.5 dark:bg-gray-700/50",children:[d.jsx("span",{className:"text-base",children:YM[l.type]??"📡"}),d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l.name}),d.jsx(av,{status:l.status})]},l.id))})]})}function QM({skills:e}){const{t:n}=oe("console"),a=e.filter(l=>l.enabled);return a.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:n("dashboard.skillOverview.title")}),d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[d.jsx(sh,{className:"h-4 w-4"}),d.jsx("span",{children:n("dashboard.skillOverview.empty")})]})]}):d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:n("dashboard.skillOverview.title")}),d.jsx("div",{className:"flex flex-wrap gap-3",children:a.map(l=>d.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-gray-50 px-3 py-1.5 dark:bg-gray-700/50",children:[d.jsx("span",{className:"text-base",children:l.icon||"📦"}),d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l.name})]},l.id))})]})}function XM(){const{t:e}=oe("console"),{channelsSummary:n,skillsSummary:a,usage:l,isLoading:s,error:o,refresh:c}=$M(),f=he(S=>S.connectionStatus);if(C.useEffect(()=>{c()},[c]),s&&n.length===0)return d.jsxs("div",{className:"space-y-6",children:[d.jsx(yf,{title:e("dashboard.title"),description:e("dashboard.description"),onRefresh:c}),d.jsx(Wi,{message:e("dashboard.loading")})]});if(o&&n.length===0&&a.length===0)return d.jsxs("div",{className:"space-y-6",children:[d.jsx(yf,{title:e("dashboard.title"),description:e("dashboard.description"),onRefresh:c}),d.jsx(mu,{message:o,onRetry:c})]});const g=n.filter(S=>S.status==="connected").length,h=n.filter(S=>S.status==="error").length,x=a.filter(S=>S.enabled).length,y=l==null?void 0:l.providers[0],b=y==null?void 0:y.windows[0],v=y?`${y.displayName}: ${(b==null?void 0:b.usedPercent)??0}%`:"—";return d.jsxs("div",{className:"space-y-6",children:[d.jsx(yf,{title:e("dashboard.title"),description:e("dashboard.description"),onRefresh:c,loading:s}),f!=="connected"&&d.jsx(Hx,{variant:"warning",message:e("dashboard.alerts.gatewayDisconnected")}),h>0&&d.jsx(Hx,{variant:"error",message:e("dashboard.alerts.channelErrors",{count:h})}),d.jsxs("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-4",children:[d.jsx(_o,{icon:ru,title:e("dashboard.stats.channels"),value:`${g} / ${n.length}`,color:"text-green-500"}),d.jsx(_o,{icon:sh,title:e("dashboard.stats.skills"),value:`${x} / ${a.length}`,color:"text-purple-500"}),d.jsx(_o,{icon:Ob,title:e("dashboard.stats.usage"),value:v,progress:b==null?void 0:b.usedPercent,color:"text-blue-500"}),d.jsx(_o,{icon:tu,title:e("dashboard.stats.uptime"),value:f==="connected"?e("dashboard.stats.uptimeOnline"):"—",color:"text-amber-500"})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:e("dashboard.quickNav.title")}),d.jsx(PM,{})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsx(GM,{channels:n}),d.jsx(QM,{skills:a})]})]})}function yf({title:e,description:n,onRefresh:a,loading:l}){const{t:s}=oe("common");return d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:n})]}),d.jsxs("button",{type:"button",onClick:a,disabled:l,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),s("actions.refresh")]})]})}const rv=oa((e,n)=>({channels:[],isLoading:!1,error:null,selectedChannel:null,configDialogOpen:!1,configDialogChannelType:null,qrState:"idle",qrDataUrl:null,qrError:null,fetchChannels:async()=>{e({isLoading:!0,error:null});try{await yt();const a=await Xe().channelsStatus();e({channels:a,isLoading:!1})}catch(a){e({error:String(a),isLoading:!1})}},logoutChannel:async(a,l)=>{try{await Xe().channelsLogout(a,l),await n().fetchChannels()}catch(s){e({error:String(s)})}},openConfigDialog:(a,l)=>{e({configDialogOpen:!0,configDialogChannelType:a,selectedChannel:l??null,qrState:"idle",qrDataUrl:null,qrError:null})},closeConfigDialog:()=>{e({configDialogOpen:!1,configDialogChannelType:null,selectedChannel:null,qrState:"idle",qrDataUrl:null,qrError:null})},startQrPairing:async()=>{e({qrState:"loading",qrError:null});try{const a=await Xe().webLoginStart(!0);e({qrState:"qr",qrDataUrl:a.qrDataUrl??null}),e({qrState:"scanning"});const l=await Xe().webLoginWait();l.connected?(e({qrState:"success"}),await n().fetchChannels()):e({qrState:"error",qrError:l.message})}catch(a){e({qrState:"error",qrError:String(a)})}},cancelQrPairing:()=>{e({qrState:"idle",qrDataUrl:null,qrError:null})}}));function Ii({icon:e,title:n,description:a,action:l}){return d.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[d.jsx(e,{className:"mb-4 h-12 w-12 text-gray-300 dark:text-gray-600",strokeWidth:1.5}),d.jsx("h3",{className:"mb-1 text-base font-medium text-gray-700 dark:text-gray-300",children:n}),a&&d.jsx("p",{className:"mb-4 max-w-sm text-sm text-gray-500 dark:text-gray-400",children:a}),l&&d.jsx("button",{type:"button",onClick:l.onClick,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:l.label})]})}function $i({open:e,title:n,description:a,confirmLabel:l,onConfirm:s,onCancel:o,variant:c="default"}){const{t:f}=oe("common"),g=C.useRef(null);C.useEffect(()=>{const x=g.current;x&&(e&&!x.open?x.showModal():!e&&x.open&&x.close())},[e]);const h=c==="danger"?"bg-red-600 hover:bg-red-700 text-white":"bg-blue-600 hover:bg-blue-700 text-white";return d.jsx("dialog",{ref:g,onClose:o,className:"fixed inset-0 z-50 m-auto max-w-md rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-6",children:[d.jsx("h3",{className:"mb-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:n}),d.jsx("p",{className:"mb-6 text-sm text-gray-600 dark:text-gray-400",children:a}),d.jsxs("div",{className:"flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:o,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:f("actions.cancel")}),d.jsx("button",{type:"button",onClick:s,className:`rounded-md px-4 py-2 text-sm font-medium transition-colors ${h}`,children:l??f("actions.confirm")})]})]})})}function ZM({channels:e}){const{t:n}=oe("console"),a=e.filter(s=>s.status==="connected").length,l=e.filter(s=>s.status==="error").length;return d.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[n("channels.stats.total")," ",d.jsx("strong",{className:"text-gray-900 dark:text-gray-100",children:e.length})]}),d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-green-600 dark:text-green-400",children:[n("channels.stats.connected")," ",d.jsx("strong",{children:a})]}),l>0&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-red-600 dark:text-red-400",children:[n("channels.stats.errors")," ",d.jsx("strong",{children:l})]})]})]})}const yu={telegram:{type:"telegram",nameKey:"console:channels.types.telegram",icon:"✈️",fields:[{key:"botToken",labelKey:"console:channels.fields.botToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.botToken"}]},discord:{type:"discord",nameKey:"console:channels.types.discord",icon:"🎮",fields:[{key:"botToken",labelKey:"console:channels.fields.botToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.botToken"},{key:"applicationId",labelKey:"console:channels.fields.applicationId",type:"text",required:!0,placeholderKey:"console:channels.placeholders.applicationId"}]},whatsapp:{type:"whatsapp",nameKey:"console:channels.types.whatsapp",icon:"📱",fields:[],hasQrFlow:!0},signal:{type:"signal",nameKey:"console:channels.types.signal",icon:"🔒",fields:[{key:"phoneNumber",labelKey:"console:channels.fields.phoneNumber",type:"text",required:!0,placeholderKey:"console:channels.placeholders.phoneNumber"}]},feishu:{type:"feishu",nameKey:"console:channels.types.feishu",icon:"🐦",fields:[{key:"appId",labelKey:"console:channels.fields.appId",type:"text",required:!0,placeholderKey:"console:channels.placeholders.appId"},{key:"appSecret",labelKey:"console:channels.fields.appSecret",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.appSecret"}]},imessage:{type:"imessage",nameKey:"console:channels.types.imessage",icon:"💬",fields:[]},matrix:{type:"matrix",nameKey:"console:channels.types.matrix",icon:"🔗",fields:[{key:"homeserver",labelKey:"console:channels.fields.homeserver",type:"text",required:!0,placeholderKey:"console:channels.placeholders.homeserver"},{key:"accessToken",labelKey:"console:channels.fields.accessToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.accessToken"}]},line:{type:"line",nameKey:"console:channels.types.line",icon:"🟢",fields:[{key:"channelAccessToken",labelKey:"console:channels.fields.channelAccessToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.channelAccessToken"},{key:"channelSecret",labelKey:"console:channels.fields.channelSecret",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.channelSecret"}]},msteams:{type:"msteams",nameKey:"console:channels.types.msteams",icon:"👔",fields:[{key:"appId",labelKey:"console:channels.fields.appId",type:"text",required:!0,placeholderKey:"console:channels.placeholders.appId"},{key:"appPassword",labelKey:"console:channels.fields.appPassword",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.appPassword"}]},googlechat:{type:"googlechat",nameKey:"console:channels.types.googlechat",icon:"💭",fields:[{key:"serviceAccountJson",labelKey:"console:channels.fields.serviceAccount",type:"textarea",required:!0,placeholderKey:"console:channels.placeholders.serviceAccount"}]},mattermost:{type:"mattermost",nameKey:"console:channels.types.mattermost",icon:"💠",fields:[{key:"serverUrl",labelKey:"console:channels.fields.serverUrl",type:"text",required:!0,placeholderKey:"console:channels.placeholders.serverUrl"},{key:"botToken",labelKey:"console:channels.fields.botToken",type:"secret",required:!0,placeholderKey:"console:channels.placeholders.botToken"}]}},JM=Object.keys(yu),WM={connected:"border-l-green-500",error:"border-l-red-500",connecting:"border-l-yellow-500",disconnected:"border-l-gray-300 dark:border-l-gray-600"};function eD({channel:e,onLogout:n,onDetail:a}){const{t:l}=oe("console"),s=yu[e.type],o=WM[e.status]??"border-l-gray-300",c=e.lastConnectedAt?new Date(e.lastConnectedAt).toLocaleString():null;return d.jsxs("div",{className:`flex items-center justify-between rounded-lg border border-l-4 bg-white p-4 dark:bg-gray-800 ${o} border-gray-200 dark:border-gray-700`,children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"text-2xl",children:(s==null?void 0:s.icon)??"📡"}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:e.name}),d.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:e.type})]}),d.jsxs("div",{className:"mt-1 flex items-center gap-3",children:[d.jsx(av,{status:e.status}),c&&d.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:l("channels.card.lastConnected",{time:c})})]}),e.error&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:e.error})]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>a(e),className:"rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300 transition-colors",title:l("channels.card.details"),children:d.jsx(_b,{className:"h-4 w-4"})}),e.status==="connected"&&d.jsx("button",{type:"button",onClick:()=>n(e),className:"rounded p-1.5 text-gray-400 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20 dark:hover:text-red-400 transition-colors",title:l("channels.card.logout"),children:d.jsx(CC,{className:"h-4 w-4"})})]})]})}function tD({channels:e,onSelect:n}){const{t:a}=oe("console"),l=new Set(e.map(s=>s.type));return d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-gray-300",children:a("channels.available.title")}),d.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4",children:JM.map(s=>{const o=yu[s],c=l.has(s);return d.jsxs("button",{type:"button",onClick:()=>n(s),className:"flex flex-col items-center gap-2 rounded-lg border border-gray-200 bg-white p-4 transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-600 dark:hover:bg-blue-900/10",children:[d.jsx("span",{className:"text-2xl",children:o.icon}),d.jsx("span",{className:"text-xs font-medium text-gray-700 dark:text-gray-300",children:a(o.nameKey)}),c?d.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-[10px] font-medium text-green-700 dark:bg-green-900/30 dark:text-green-400",children:[d.jsx(ul,{className:"h-3 w-3"}),a("channels.available.configured")]}):d.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:[d.jsx(fr,{className:"h-3 w-3"}),a("channels.available.add")]})]},s)})})]})}function nD({onClose:e}){const{t:n}=oe("console"),{qrState:a,qrDataUrl:l,qrError:s,startQrPairing:o,cancelQrPairing:c}=rv();return a==="idle"||a==="cancel"?d.jsxs("div",{className:"flex flex-col items-center gap-4 py-6",children:[d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("channels.qr.description")}),d.jsx("button",{type:"button",onClick:o,className:"rounded-md bg-green-600 px-6 py-2 text-sm font-medium text-white hover:bg-green-700 transition-colors",children:n("channels.qr.startPairing")})]}):a==="loading"?d.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[d.jsx(Ri,{className:"h-8 w-8 animate-spin text-green-500"}),d.jsx("p",{className:"text-sm text-gray-500",children:n("channels.qr.loading")})]}):a==="qr"||a==="scanning"?d.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[l&&d.jsx("img",{src:l,alt:"WhatsApp QR Code",className:"h-48 w-48 rounded-lg border border-gray-200 dark:border-gray-700"}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n(a==="scanning"?"channels.qr.waitingScan":"channels.qr.scanPrompt")}),a==="scanning"&&d.jsx(Ri,{className:"h-5 w-5 animate-spin text-green-500"}),d.jsx("button",{type:"button",onClick:c,className:"text-xs text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",children:n("common:actions.cancel")})]}):a==="success"?d.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[d.jsx(lh,{className:"h-10 w-10 text-green-500"}),d.jsx("p",{className:"font-medium text-green-600",children:n("channels.qr.success")}),d.jsx("button",{type:"button",onClick:e,className:"rounded-md border border-gray-300 px-4 py-1.5 text-sm text-gray-600 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:n("common:actions.close")})]}):d.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[d.jsx(eu,{className:"h-10 w-10 text-red-500"}),d.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:s??n("channels.qr.error")}),d.jsx("button",{type:"button",onClick:o,className:"rounded-md border border-red-300 px-4 py-1.5 text-sm text-red-600 hover:bg-red-50 dark:border-red-700 dark:text-red-400 dark:hover:bg-red-900/20 transition-colors",children:n("common:actions.retry")})]})}function aD({open:e,channelType:n,onClose:a}){const{t:l}=oe("console"),s=C.useRef(null),[o,c]=C.useState({}),[f,g]=C.useState({}),[h,x]=C.useState(new Set),y=n?yu[n]:null;if(C.useEffect(()=>{const S=s.current;S&&(e&&!S.open?(c({}),g({}),x(new Set),S.showModal()):!e&&S.open&&S.close())},[e]),!y)return null;if(y.hasQrFlow)return d.jsx("dialog",{ref:s,onClose:a,className:"fixed inset-0 z-50 m-auto max-w-md rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-6",children:[d.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[d.jsx("span",{className:"text-xl",children:y.icon}),d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:l(y.nameKey)})]}),d.jsx(nD,{onClose:a})]})});const b=()=>{var E;const S={};let N=!1;for(const j of y.fields)j.required&&!((E=o[j.key])!=null&&E.trim())&&(S[j.key]=!0,N=!0);g(S),N||a()},v=S=>{x(N=>{const E=new Set(N);return E.has(S)?E.delete(S):E.add(S),E})};return d.jsx("dialog",{ref:s,onClose:a,className:"fixed inset-0 z-50 m-auto max-w-md rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-6",children:[d.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[d.jsx("span",{className:"text-xl",children:y.icon}),d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:l(y.nameKey)})]}),d.jsx("div",{className:"space-y-4",children:y.fields.map(S=>d.jsx(rD,{field:S,value:o[S.key]??"",onChange:N=>c(E=>({...E,[S.key]:N})),hasError:f[S.key]??!1,isSecretVisible:h.has(S.key),onToggleSecret:()=>v(S.key)},S.key))}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:a,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:l("channels.configDialog.cancel",{defaultValue:l("common:actions.cancel")})}),d.jsx("button",{type:"button",onClick:b,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:l("channels.configDialog.save",{defaultValue:l("common:actions.save")})})]})]})})}function rD({field:e,value:n,onChange:a,hasError:l,isSecretVisible:s,onToggleSecret:o}){const{t:c}=oe("console"),f=l?"border-red-500":"border-gray-300 dark:border-gray-600";return e.type==="textarea"?d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[c(e.labelKey)," ",e.required&&d.jsx("span",{className:"text-red-500",children:"*"})]}),d.jsx("textarea",{value:n,onChange:g=>a(g.target.value),placeholder:c(e.placeholderKey),rows:4,className:`w-full rounded-md border bg-white px-3 py-2 text-sm dark:bg-gray-700 dark:text-gray-100 ${f}`}),l&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:c("channels.configDialog.required")})]}):d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[c(e.labelKey)," ",e.required&&d.jsx("span",{className:"text-red-500",children:"*"})]}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:e.type==="secret"&&!s?"password":"text",value:n,onChange:g=>a(g.target.value),placeholder:c(e.placeholderKey),className:`w-full rounded-md border bg-white px-3 py-2 text-sm dark:bg-gray-700 dark:text-gray-100 ${f} ${e.type==="secret"?"pr-10":""}`}),e.type==="secret"&&d.jsx("button",{type:"button",onClick:o,className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:s?d.jsx(nu,{className:"h-4 w-4"}):d.jsx(au,{className:"h-4 w-4"})})]}),l&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:c("channels.configDialog.required")})]})}function lD(){const{t:e}=oe("console"),{channels:n,isLoading:a,error:l,fetchChannels:s,logoutChannel:o,configDialogOpen:c,configDialogChannelType:f,openConfigDialog:g,closeConfigDialog:h}=rv(),[x,y]=C.useState(null);C.useEffect(()=>{s()},[s]);const b=async()=>{x&&(await o(x.type,x.accountId),y(null))};return a&&n.length===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(xf,{title:e("channels.title"),description:e("channels.description"),onRefresh:s}),d.jsx(Wi,{})]}):l&&n.length===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(xf,{title:e("channels.title"),description:e("channels.description"),onRefresh:s}),d.jsx(mu,{message:l,onRetry:s})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsx(xf,{title:e("channels.title"),description:e("channels.description"),onRefresh:s,loading:a}),d.jsx(ZM,{channels:n}),n.length===0?d.jsx(Ii,{icon:bC,title:e("channels.empty.title"),description:e("channels.empty.description")}):d.jsx("div",{className:"space-y-3",children:n.map(v=>d.jsx(eD,{channel:v,onLogout:y,onDetail:S=>g(S.type,S)},v.id))}),d.jsx(tD,{channels:n,onSelect:v=>g(v)}),d.jsx(aD,{open:c,channelType:f,onClose:h}),d.jsx($i,{open:x!==null,title:e("channels.logout.title"),description:e("channels.logout.description",{name:(x==null?void 0:x.name)??""}),onConfirm:b,onCancel:()=>y(null),variant:"danger"})]})}function xf({title:e,description:n,onRefresh:a,loading:l}){const{t:s}=oe("common");return d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:n})]}),d.jsxs("button",{type:"button",onClick:a,disabled:l,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),s("actions.refresh")]})]})}function iD(e,n){return e.enabled&&!n.enabled?-1:!e.enabled&&n.enabled?1:e.isCore&&!n.isCore?-1:!e.isCore&&n.isCore?1:e.name.localeCompare(n.name)}function sD(e){return new Set(e.map(n=>n.id))}function oD(e,n,a){const l=n.trim().toLowerCase();return e.filter(s=>s.isBundled||s.eligible).filter(s=>l?[s.name,s.description,s.slug,s.source].filter(Boolean).join(" ").toLowerCase().includes(l):!0).filter(s=>a==="built-in"?!!s.isBundled:a==="marketplace"?!s.isBundled:!0).sort(iD)}function uD(e,n){const a=n.trim().toLowerCase();return e.filter(l=>!l.isBundled).filter(l=>a?[l.name,l.description,l.slug,l.author,l.source].filter(Boolean).join(" ").toLowerCase().includes(a):!0).sort((l,s)=>l.name.localeCompare(s.name))}const cD=oa((e,n)=>({skills:[],isLoading:!1,error:null,activeTab:"installed",sourceFilter:"all",selectedSkill:null,detailDialogOpen:!1,installing:new Set,fetchSkills:async()=>{e({isLoading:!0,error:null});try{await yt();const a=await Xe().skillsStatus();e({skills:a,isLoading:!1})}catch(a){e({error:String(a),isLoading:!1})}},setTab:a=>e({activeTab:a}),setSourceFilter:a=>e({sourceFilter:a}),openDetail:a=>e({selectedSkill:a,detailDialogOpen:!0}),closeDetail:()=>e({selectedSkill:null,detailDialogOpen:!1}),toggleSkill:async(a,l)=>{try{(await Xe().skillsUpdate(a,{enabled:l})).ok&&e(o=>({skills:o.skills.map(c=>c.id===a?{...c,enabled:l}:c)}))}catch(s){e({error:String(s)})}},installSkill:async(a,l)=>{const s=new Set(n().installing);s.add(a),e({installing:s});try{const o=await Xe().skillsInstall(a,l);return o.ok&&await n().fetchSkills(),o}catch(o){return{ok:!1,message:String(o)}}finally{const o=new Set(n().installing);o.delete(a),e({installing:o})}}})),dD=["installed","marketplace"];function fD({activeTab:e,onTabChange:n}){const{t:a}=oe("console");return d.jsx("div",{className:"flex gap-1 rounded-xl bg-gray-100 p-1 dark:bg-gray-800",children:dD.map(l=>d.jsx("button",{type:"button",onClick:()=>n(l),className:`rounded-lg px-5 py-2 text-sm font-semibold transition-colors ${e===l?"bg-white text-gray-900 shadow-sm dark:bg-gray-700 dark:text-gray-100":"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:a(`skills.tabs.${l}`)},l))})}function hD({skill:e,onToggle:n,onConfigure:a,isInstalling:l,onInstall:s}){var h,x,y,b;const{t:o}=oe("console"),c=e.isCore&&e.always,f=((x=(h=e.missing)==null?void 0:h.bins)==null?void 0:x.length)||((b=(y=e.missing)==null?void 0:y.env)==null?void 0:b.length),g=e.isBundled?o("skills.source.builtIn"):o("skills.source.marketplace");return d.jsx("div",{className:`rounded-2xl border p-4 transition-colors dark:bg-gray-800 ${e.enabled?"border-blue-200 bg-blue-50/40 dark:border-blue-900/40":"border-gray-200 bg-white opacity-75 dark:border-gray-700"}`,children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("button",{type:"button",onClick:()=>a(e),className:"flex min-w-0 flex-1 items-start gap-3 text-left",children:[d.jsx("span",{className:"text-2xl",children:e.icon||"📦"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"font-semibold text-gray-900 dark:text-gray-100",children:e.name}),d.jsx("span",{className:`rounded-md px-2 py-0.5 text-[10px] font-medium ${e.isBundled?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"}`,children:g}),e.isCore?d.jsx(Mb,{className:"h-3.5 w-3.5 text-gray-400"}):e.isBundled?d.jsx(Rb,{className:"h-3.5 w-3.5 text-blue-500/70"}):d.jsx(gC,{className:"h-3.5 w-3.5 text-purple-500/70"}),e.version&&d.jsxs("span",{className:"text-[10px] text-gray-400",children:["v",e.version]})]}),d.jsx("p",{className:"mt-2 line-clamp-2 text-sm text-gray-500 dark:text-gray-400",children:e.description}),f&&d.jsxs("div",{className:"mt-2 flex items-center gap-1 text-xs text-amber-600 dark:text-amber-400",children:[d.jsx(lu,{className:"h-3.5 w-3.5"}),o("skills.card.missingDeps")]})]})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>a(e),className:"rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300 transition-colors",title:o("skills.card.configure"),children:d.jsx(ih,{className:"h-4 w-4"})}),!e.eligible&&s&&d.jsx("button",{type:"button",onClick:()=>s(e),disabled:l,className:"rounded-xl bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-blue-700 disabled:opacity-50 transition-colors",children:o(l?"skills.card.installing":"skills.card.install")}),d.jsxs("label",{className:"relative inline-flex cursor-pointer items-center",title:c?o("skills.card.coreProtected"):void 0,children:[d.jsx("input",{type:"checkbox",checked:e.enabled,onChange:()=>n(e.id,!e.enabled),disabled:c,className:"peer sr-only"}),d.jsx("div",{className:"peer h-5 w-9 rounded-full bg-gray-200 after:absolute after:left-[2px] after:top-[2px] after:h-4 after:w-4 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white peer-disabled:cursor-not-allowed peer-disabled:opacity-50 dark:bg-gray-700 dark:peer-checked:bg-blue-500"})]})]})]})})}function gD({skill:e,isInstalled:n,isInstalling:a,onInstall:l,onOpenDetail:s}){var c;const{t:o}=oe("console");return d.jsx("div",{className:"rounded-2xl border border-gray-200 bg-white p-5 shadow-sm transition-colors hover:border-blue-300 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-700",children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("button",{type:"button",onClick:()=>s(e),className:"flex min-w-0 flex-1 items-start gap-4 text-left",children:[d.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-blue-50 text-2xl dark:bg-blue-900/20",children:e.icon||"📦"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e.name}),d.jsx("span",{className:"rounded-md bg-purple-100 px-2 py-0.5 text-xs font-medium text-purple-700 dark:bg-purple-900/30 dark:text-purple-300",children:o("skills.source.marketplace")})]}),d.jsx("p",{className:"mt-2 line-clamp-2 text-sm text-gray-500 dark:text-gray-400",children:e.description}),d.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-gray-400 dark:text-gray-500",children:[d.jsx("span",{children:o("skills.marketplace.version",{version:e.version||"—"})}),e.author&&d.jsx("span",{children:o("skills.marketplace.author",{author:e.author})}),e.homepage&&d.jsxs("span",{className:"inline-flex items-center gap-1 text-blue-600 dark:text-blue-400",children:[d.jsx(Di,{className:"h-3.5 w-3.5"}),o("skills.marketplace.learnMore")]})]})]})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[d.jsx("button",{type:"button",onClick:()=>s(e),className:"rounded-full p-2 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",title:o("skills.card.configure"),children:d.jsx(Di,{className:"h-4 w-4"})}),n?d.jsxs("div",{className:"inline-flex items-center gap-1 rounded-full bg-green-100 px-3 py-1.5 text-sm font-medium text-green-700 dark:bg-green-900/30 dark:text-green-300",children:[d.jsx(rC,{className:"h-4 w-4"}),o("skills.marketplace.installed")]}):d.jsx("button",{type:"button",onClick:()=>l(e),disabled:a||!((c=e.installOptions)!=null&&c.length),className:"inline-flex min-w-24 items-center justify-center gap-1 rounded-xl bg-blue-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-50",children:a?d.jsxs(d.Fragment,{children:[d.jsx(Ri,{className:"h-4 w-4 animate-spin"}),o("skills.card.installing")]}):d.jsxs(d.Fragment,{children:[d.jsx(Tb,{className:"h-4 w-4"}),o("skills.card.install")]})})]})]})})}function pD({open:e,skill:n,onClose:a,onSaved:l}){var ee;const{t:s}=oe("console"),o=C.useRef(null),[c,f]=C.useState(""),[g,h]=C.useState(!1),[x,y]=C.useState([]),[b,v]=C.useState("info"),[S,N]=C.useState(!0),[E,j]=C.useState(!1);if(C.useEffect(()=>{const G=o.current;G&&(e&&!G.open?(v("info"),h(!1),G.showModal()):!e&&G.open&&G.close())},[e]),C.useEffect(()=>{var R,ae;if(!n)return;f(typeof((R=n.config)==null?void 0:R.apiKey)=="string"?n.config.apiKey:"");const G=(ae=n.config)==null?void 0:ae.env;y(G&&typeof G=="object"?Object.entries(G).map(([F,ie])=>({key:F,value:String(ie)})):[])},[n]),!n)return null;const z=n.primaryEnv||n.configChecks&&n.configChecks.length>0,T=n.isCore&&n.always,P=async()=>{j(!0);try{const G=x.reduce((R,ae)=>{const F=ae.key.trim();return F&&(R[F]=ae.value.trim()),R},{});await Xe().skillsUpdate(n.id,{apiKey:c||void 0,env:Object.keys(G).length>0?G:void 0}),l(),a()}catch{}finally{j(!1)}},H=()=>y(G=>[...G,{key:"",value:""}]),L=G=>{y(R=>R.filter((ae,F)=>F!==G))},V=(G,R,ae)=>{y(F=>F.map((ie,ne)=>ne===G?{...ie,[R]:ae}:ie))};return d.jsx("dialog",{ref:o,onClose:a,className:"fixed inset-0 z-50 m-auto max-h-[90vh] w-[min(760px,calc(100vw-2rem))] rounded-xl border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"flex max-h-[90vh] flex-col",children:[d.jsx("div",{className:"border-b border-gray-200 p-6 dark:border-gray-700",children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"flex items-start gap-4",children:[d.jsx("span",{className:"text-3xl",children:n.icon||"📦"}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:n.name}),T&&d.jsx(Mb,{className:"h-4 w-4 text-gray-400"})]}),d.jsxs("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:[n.version||"—"," · ",n.author??"—"]}),d.jsxs("div",{className:"mt-3 flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>v("info"),className:`rounded-lg px-3 py-1.5 text-sm font-medium ${b==="info"?"bg-gray-900 text-white dark:bg-gray-100 dark:text-gray-900":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"}`,children:s("skills.detail.info")}),d.jsx("button",{type:"button",onClick:()=>v("config"),disabled:!z,className:`rounded-lg px-3 py-1.5 text-sm font-medium ${b==="config"?"bg-gray-900 text-white dark:bg-gray-100 dark:text-gray-900":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"} disabled:cursor-not-allowed disabled:opacity-50`,children:s("skills.detail.config")})]})]})]}),d.jsx("button",{type:"button",onClick:a,className:"rounded-full p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700",children:d.jsx(Ua,{className:"h-4 w-4"})})]})}),d.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:b==="info"?d.jsxs("div",{className:"space-y-5",children:[d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n.description}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsx(Mo,{label:s("skills.detail.source"),value:n.source??"—"}),d.jsx(Mo,{label:s("skills.detail.version"),value:n.version||"—"}),d.jsx(Mo,{label:s("skills.detail.author"),value:n.author??"—"}),d.jsx(Mo,{label:s("skills.detail.primaryEnv"),value:n.primaryEnv??"—"})]}),n.homepage&&d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[s("skills.detail.homepage"),":"]}),d.jsxs("a",{href:n.homepage,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-600 hover:underline dark:text-blue-400",children:[n.homepage,d.jsx(Di,{className:"h-3 w-3"})]})]}),n.requirements&&d.jsxs("div",{children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:s("skills.detail.requirements")}),d.jsx("div",{className:"space-y-2",children:(ee=n.requirements.bins)==null?void 0:ee.map(G=>{var ae,F;const R=(F=(ae=n.missing)==null?void 0:ae.bins)==null?void 0:F.includes(G);return d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[R?d.jsx(Ua,{className:"h-4 w-4 text-red-500"}):d.jsx(ul,{className:"h-4 w-4 text-green-500"}),d.jsx("code",{className:"text-xs",children:G})]},G)})})]})]}):z?d.jsxs("div",{className:"space-y-5",children:[n.primaryEnv&&d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-xs text-gray-500 dark:text-gray-400",children:["API Key (",n.primaryEnv,")"]}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:g?"text":"password",value:c,onChange:G=>f(G.target.value),placeholder:s("skills.detail.apiKeyPlaceholder"),className:"w-full rounded-md border border-gray-300 bg-white px-3 py-2 pr-10 text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100"}),d.jsx("button",{type:"button",onClick:()=>h(!g),className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:g?d.jsx(nu,{className:"h-4 w-4"}):d.jsx(au,{className:"h-4 w-4"})})]})]}),d.jsxs("div",{className:"rounded-xl border border-gray-200 p-4 dark:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("button",{type:"button",onClick:()=>N(G=>!G),className:"flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:[S?d.jsx(sa,{className:"h-4 w-4"}):d.jsx(WN,{className:"h-4 w-4"}),s("skills.detail.envVars")]}),d.jsxs("button",{type:"button",onClick:H,className:"inline-flex items-center gap-1 rounded-md border border-gray-300 px-2 py-1 text-xs font-medium text-gray-600 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700",children:[d.jsx(fr,{className:"h-3 w-3"}),s("skills.detail.addVariable")]})]}),S&&d.jsx("div",{className:"mt-4 space-y-3",children:x.length===0?d.jsx("p",{className:"text-xs italic text-gray-400",children:s("skills.detail.noEnvVars")}):x.map((G,R)=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{value:G.key,onChange:ae=>V(R,"key",ae.target.value),className:"w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-xs font-mono dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100",placeholder:s("skills.detail.keyPlaceholder")}),d.jsx("span",{className:"text-gray-400",children:"="}),d.jsx("input",{value:G.value,onChange:ae=>V(R,"value",ae.target.value),className:"w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-xs font-mono dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100",placeholder:s("skills.detail.valuePlaceholder")}),d.jsx("button",{type:"button",onClick:()=>L(R),className:"rounded-md p-2 text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20",children:d.jsx(Yi,{className:"h-4 w-4"})})]},`${G.key}-${R}`))})]}),n.configChecks&&n.configChecks.length>0&&d.jsxs("div",{children:[d.jsx("label",{className:"mb-2 block text-xs text-gray-500 dark:text-gray-400",children:s("skills.detail.configChecks")}),d.jsx("div",{className:"space-y-1",children:n.configChecks.map(G=>d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[G.satisfied?d.jsx(ul,{className:"h-4 w-4 text-green-500"}):d.jsx(Ua,{className:"h-4 w-4 text-red-500"}),d.jsx("code",{className:"text-xs",children:G.path})]},G.path))})]}),d.jsx("div",{className:"flex justify-end",children:d.jsx("button",{type:"button",onClick:P,disabled:E,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50 transition-colors",children:s(E?"skills.detail.saving":"common:actions.save")})})]}):d.jsx("p",{className:"text-sm text-gray-400",children:s("skills.detail.noConfig")})}),d.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 px-6 py-4 dark:border-gray-700",children:[d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[n.enabled?d.jsx(ul,{className:"h-4 w-4 text-green-500"}):d.jsx(Ua,{className:"h-4 w-4 text-gray-400"}),d.jsx("span",{className:n.enabled?"text-green-600 dark:text-green-400":"text-gray-500 dark:text-gray-400",children:n.enabled?s("skills.detail.enabled"):s("skills.detail.disabled")})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:a,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:s("common:actions.close")}),d.jsxs("label",{className:"relative inline-flex cursor-pointer items-center",title:T?s("skills.card.coreProtected"):void 0,children:[d.jsx("input",{type:"checkbox",checked:n.enabled,onChange:()=>Xe().skillsUpdate(n.id,{enabled:!n.enabled}).then(l),disabled:T,className:"peer sr-only"}),d.jsx("div",{className:"peer h-5 w-9 rounded-full bg-gray-200 after:absolute after:left-[2px] after:top-[2px] after:h-4 after:w-4 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white peer-disabled:cursor-not-allowed peer-disabled:opacity-50 dark:bg-gray-700 dark:peer-checked:bg-blue-500"})]})]})]})]})})}function Mo({label:e,value:n}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[e,":"]}),d.jsx("span",{className:"text-gray-900 dark:text-gray-100",children:n})]})}function mD({open:e,skillName:n,options:a,onSelect:l,onCancel:s}){const{t:o}=oe("console"),c=C.useRef(null);return C.useEffect(()=>{const f=c.current;f&&(e&&!f.open?f.showModal():!e&&f.open&&f.close())},[e]),d.jsx("dialog",{ref:c,onClose:s,className:"fixed inset-0 z-50 m-auto max-w-sm rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-6",children:[d.jsx("h3",{className:"mb-4 text-lg font-semibold text-gray-900 dark:text-gray-100",children:o("skills.install.title",{name:n})}),d.jsx("div",{className:"space-y-2",children:a.map(f=>d.jsxs("button",{type:"button",onClick:()=>l(f.id),className:"flex w-full items-center gap-3 rounded-lg border border-gray-200 p-3 text-left transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-gray-700 dark:hover:border-blue-600 dark:hover:bg-blue-900/10",children:[d.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:f.label}),d.jsxs("span",{className:"text-xs text-gray-400",children:["(",f.kind,")"]})]},f.id))}),d.jsx("div",{className:"mt-4 flex justify-end",children:d.jsx("button",{type:"button",onClick:s,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:o("common:actions.cancel")})})]})})}function yD(){const{t:e}=oe("console"),{skills:n,isLoading:a,error:l,activeTab:s,sourceFilter:o,selectedSkill:c,detailDialogOpen:f,installing:g,fetchSkills:h,setTab:x,setSourceFilter:y,openDetail:b,closeDetail:v,toggleSkill:S,installSkill:N}=cD(),[E,j]=C.useState(null),[z,T]=C.useState(""),[P,H]=C.useState("");C.useEffect(()=>{h()},[h]);const L=C.useMemo(()=>oD(n,z,o),[n,z,o]),V=C.useMemo(()=>uD(n,P),[n,P]),ee=C.useMemo(()=>sD(n),[n]),G=C.useMemo(()=>({all:n.filter(F=>F.isBundled||F.eligible).length,"built-in":n.filter(F=>F.isBundled).length,marketplace:n.filter(F=>!F.isBundled).length}),[n]),R=F=>{F.installOptions&&F.installOptions.length>1?j(F):F.installOptions&&F.installOptions.length===1&&N(F.id,F.installOptions[0].id)},ae=async F=>{E&&(await N(E.id,F),j(null))};return a&&n.length===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(bf,{title:e("skills.title"),description:e("skills.description"),onRefresh:h}),d.jsx(Wi,{})]}):l&&n.length===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(bf,{title:e("skills.title"),description:e("skills.description"),onRefresh:h}),d.jsx(mu,{message:l,onRetry:h})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsx(bf,{title:e("skills.title"),description:e("skills.description"),onRefresh:h,loading:a}),d.jsx(fD,{activeTab:s,onTabChange:x}),s==="installed"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[d.jsxs("div",{className:"relative w-full lg:max-w-md",children:[d.jsx(Df,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),d.jsx("input",{value:z,onChange:F=>T(F.target.value),placeholder:e("skills.installed.searchPlaceholder"),className:"w-full rounded-xl border border-gray-300 bg-white py-2 pl-10 pr-4 text-sm text-gray-700 outline-none transition-colors focus:border-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200"})]}),d.jsx("div",{className:"flex flex-wrap gap-2",children:["all","built-in","marketplace"].map(F=>d.jsx("button",{type:"button",onClick:()=>y(F),className:`rounded-xl px-3 py-2 text-sm font-medium transition-colors ${o===F?"bg-blue-600 text-white":"border border-gray-300 bg-white text-gray-600 hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700"}`,children:e(`skills.filters.${F}`,{count:G[F]})},F))})]}),L.length===0?d.jsx(Ii,{icon:xy,title:e("skills.empty.title"),description:e("skills.empty.description")}):d.jsx("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:L.map(F=>d.jsx(hD,{skill:F,onToggle:S,onConfigure:b,isInstalling:g.has(F.id)},F.id))})]}):d.jsxs("div",{className:"space-y-5",children:[d.jsx("div",{className:"rounded-2xl border border-gray-200 bg-gray-50/80 p-4 dark:border-gray-700 dark:bg-gray-800/60",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(GC,{className:"mt-0.5 h-5 w-5 text-gray-500"}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:e("skills.marketplace.securityNote")})]})}),d.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(Df,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),d.jsx("input",{value:P,onChange:F=>H(F.target.value),placeholder:e("skills.marketplace.searchPlaceholder"),className:"w-full rounded-xl border border-gray-300 bg-white py-2 pl-10 pr-10 text-sm text-gray-700 outline-none transition-colors focus:border-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200"}),P&&d.jsx("button",{type:"button",onClick:()=>H(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:d.jsx(Ua,{className:"h-4 w-4"})})]}),d.jsx("button",{type:"button",className:"rounded-xl bg-blue-600 px-4 py-2 text-sm font-semibold text-white hover:bg-blue-700",children:e("skills.marketplace.searchButton")})]}),l&&d.jsx("div",{className:"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-600 dark:border-red-900/50 dark:bg-red-900/10 dark:text-red-400",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ab,{className:"h-4 w-4"}),l]})}),V.length===0?d.jsx(Ii,{icon:xy,title:e("skills.marketplace.emptyTitle"),description:e(P?"skills.marketplace.noResults":"skills.marketplace.emptyDescription")}):d.jsx("div",{className:"space-y-4",children:V.map(F=>d.jsx(gD,{skill:F,isInstalled:ee.has(F.id)&&!!F.eligible,isInstalling:g.has(F.id),onInstall:R,onOpenDetail:b},F.id))})]}),d.jsx(pD,{open:f,skill:c,onClose:v,onSaved:h}),d.jsx(mD,{open:E!==null,skillName:(E==null?void 0:E.name)??"",options:(E==null?void 0:E.installOptions)??[],onSelect:ae,onCancel:()=>j(null)})]})}function bf({title:e,description:n,onRefresh:a,loading:l}){const{t:s}=oe("common");return d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:n})]}),d.jsxs("button",{type:"button",onClick:a,disabled:l,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),s("actions.refresh")]})]})}const xD=oa((e,n)=>({tasks:[],isLoading:!1,error:null,dialogOpen:!1,editingTask:null,fetchTasks:async()=>{e({isLoading:!0,error:null});try{await yt();const a=await Xe().cronList();e({tasks:a,isLoading:!1})}catch(a){e({error:String(a),isLoading:!1})}},addTask:async a=>{try{const l=await Xe().cronAdd(a);e(s=>({tasks:[...s.tasks,l],dialogOpen:!1,editingTask:null}))}catch(l){e({error:String(l)})}},updateTask:async(a,l)=>{try{const s=await Xe().cronUpdate(a,l);e(o=>({tasks:o.tasks.map(c=>c.id===a?s:c),dialogOpen:!1,editingTask:null}))}catch(s){e({error:String(s)})}},removeTask:async a=>{try{await Xe().cronRemove(a),e(l=>({tasks:l.tasks.filter(s=>s.id!==a)}))}catch(l){e({error:String(l)})}},runTask:async a=>{try{await Xe().cronRun(a)}catch(l){e({error:String(l)})}},openDialog:a=>e({dialogOpen:!0,editingTask:a??null}),closeDialog:()=>e({dialogOpen:!1,editingTask:null}),handleCronEvent:a=>{!a.jobId||!a.state||e(l=>({tasks:l.tasks.map(s=>s.id===a.jobId?{...s,state:{...s.state,...a.state}}:s)}))},initEventListeners:()=>{const a=(o,c)=>{o==="cron"&&n().handleCronEvent(c)};let l=!1,s=()=>{};return yt().then(()=>{l||(s=Xe().onEvent(a))}).catch(()=>{s=()=>{}}),()=>{l=!0,s()}}}));function bD({tasks:e}){const{t:n}=oe("console"),a=e.filter(o=>o.enabled&&o.state.lastRunStatus!=="error").length,l=e.filter(o=>!o.enabled).length,s=e.filter(o=>o.state.lastRunStatus==="error").length;return d.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[n("cron.stats.total")," ",d.jsx("strong",{className:"text-gray-900 dark:text-gray-100",children:e.length})]}),d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-green-600 dark:text-green-400",children:[n("cron.stats.active")," ",d.jsx("strong",{children:a})]}),d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[n("cron.stats.paused")," ",d.jsx("strong",{children:l})]}),s>0&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"·"}),d.jsxs("span",{className:"text-red-600 dark:text-red-400",children:[n("cron.stats.failed")," ",d.jsx("strong",{children:s})]})]})]})}function vD(e){const n=kD(e.schedule),a=e.payload.kind==="agentTurn"?e.payload.message:e.payload.kind==="systemEvent"?e.payload.text:"";return{id:e.id,name:e.name,schedule:n,scheduleLabel:SD(n),enabled:e.enabled,lastRunAt:e.state.lastRunAtMs??null,nextRunAt:e.state.nextRunAtMs??null,lastRunStatus:e.state.lastRunStatus??null,message:a,statusLabel:e.enabled?ze.t("console:viewModels.taskStatus.active"):ze.t("console:viewModels.taskStatus.paused")}}function kD(e){return e.kind==="cron"&&e.expr?e.expr:e.kind==="every"&&e.everyMs?ze.t("console:viewModels.schedule.every",{minutes:Math.round(e.everyMs/6e4)}):e.kind==="at"&&e.at?ze.t("console:viewModels.schedule.at",{time:e.at}):ze.t("console:viewModels.schedule.unknown")}function SD(e){const n=e.split(" ");if(n.length!==5)return e;const[a,l,s,o,c]=n;return s==="*"&&c==="*"&&l!=="*"&&a!=="*"?ze.t("console:viewModels.schedule.daily",{time:`${l}:${a.padStart(2,"0")}`}):c!=="*"&&s==="*"?ze.t("console:viewModels.schedule.weekly",{day:c,time:`${l}:${a.padStart(2,"0")}`}):e}const wD={ok:d.jsx(ul,{className:"h-3.5 w-3.5 text-green-500"}),error:d.jsx(eu,{className:"h-3.5 w-3.5 text-red-500"}),skipped:d.jsx(AC,{className:"h-3.5 w-3.5 text-gray-400"})};function jD({task:e,onToggle:n,onRun:a,onEdit:l,onDelete:s}){const{t:o}=oe("console"),c=vD(e),f=e.payload.kind==="agentTurn"?e.payload.message:e.payload.kind==="systemEvent"?e.payload.text:"",g=c.lastRunAt?new Date(c.lastRunAt).toLocaleString():"—",h=c.nextRunAt?new Date(c.nextRunAt).toLocaleString():"—";return d.jsx("div",{className:`rounded-lg border border-gray-200 bg-white p-4 transition-opacity dark:border-gray-700 dark:bg-gray-800 ${e.enabled?"":"opacity-60"}`,children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsxs("label",{className:"relative mt-0.5 inline-flex cursor-pointer items-center",children:[d.jsx("input",{type:"checkbox",checked:e.enabled,onChange:()=>n(e.id,!e.enabled),className:"peer sr-only"}),d.jsx("div",{className:"peer h-5 w-9 rounded-full bg-gray-200 after:absolute after:left-[2px] after:top-[2px] after:h-4 after:w-4 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white dark:bg-gray-700 dark:peer-checked:bg-blue-500"})]}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:e.name}),d.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-[10px] text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:c.scheduleLabel})]}),f&&d.jsx("p",{className:"mt-1 line-clamp-1 text-sm text-gray-500 dark:text-gray-400",children:f}),d.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-gray-400 dark:text-gray-500",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[o("cron.card.lastRun"),": ",g,e.state.lastRunStatus&&d.jsx("span",{className:"ml-1",children:wD[e.state.lastRunStatus]??null})]}),d.jsxs("span",{children:[o("cron.card.nextRun"),": ",h]})]}),e.state.lastError&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:e.state.lastError})]})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("button",{type:"button",onClick:()=>a(e.id),className:"rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300 transition-colors",title:o("cron.card.runNow"),children:d.jsx(HC,{className:"h-4 w-4"})}),d.jsx("button",{type:"button",onClick:()=>l(e),className:"rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300 transition-colors",title:o("common:actions.edit"),children:d.jsx(Db,{className:"h-4 w-4"})}),d.jsx("button",{type:"button",onClick:()=>s(e.id),className:"rounded p-1.5 text-gray-400 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20 dark:hover:text-red-400 transition-colors",title:o("common:actions.delete"),children:d.jsx(Yi,{className:"h-4 w-4"})})]})]})})}const Bx=[{labelKey:"console:cron.presets.everyHour",schedule:{kind:"cron",expr:"0 * * * *"}},{labelKey:"console:cron.presets.daily9am",schedule:{kind:"cron",expr:"0 9 * * *"}},{labelKey:"console:cron.presets.daily6pm",schedule:{kind:"cron",expr:"0 18 * * *"}},{labelKey:"console:cron.presets.weeklyMon",schedule:{kind:"cron",expr:"0 9 * * 1"}},{labelKey:"console:cron.presets.monthlyFirst",schedule:{kind:"cron",expr:"0 9 1 * *"}},{labelKey:"console:cron.presets.every30min",schedule:{kind:"every",everyMs:18e5}}];function qx(e){return e.kind==="cron"?e.expr:e.kind==="every"?`every ${Math.round(e.everyMs/6e4)}m`:e.kind==="at"?`at ${e.at}`:""}function ND(e){const n=e.payloadKind??"agentTurn",a=n==="systemEvent"?{kind:"systemEvent",text:e.message.trim()}:{kind:"agentTurn",message:e.message.trim()};return{name:e.name.trim(),description:e.description.trim()||void 0,schedule:e.schedule,sessionTarget:n==="systemEvent"?"main":"isolated",wakeMode:"now",payload:a}}function CD({open:e,editingTask:n,onSave:a,onUpdate:l,onClose:s}){const{t:o}=oe("console"),c=C.useRef(null),[f,g]=C.useState(""),[h,x]=C.useState(""),[y,b]=C.useState({kind:"cron",expr:"0 18 * * *"}),[v,S]=C.useState("0 18 * * *"),[N,E]=C.useState(""),[j,z]=C.useState(null),[T,P]=C.useState({});C.useEffect(()=>{const ee=c.current;ee&&(e&&!ee.open?(n?(g(n.name),x(n.description??""),b(n.schedule),S(qx(n.schedule)),E(n.payload.kind==="agentTurn"?n.payload.message:n.payload.kind==="systemEvent"?n.payload.text:""),z(null)):(g(""),x(""),b({kind:"cron",expr:"0 18 * * *"}),S("0 18 * * *"),E(""),z(null)),P({}),ee.showModal()):!e&&ee.open&&ee.close())},[e,n]);const H=ee=>{const G=Bx[ee];z(ee),b(G.schedule),S(qx(G.schedule))},L=ee=>{S(ee),z(null),b({kind:"cron",expr:ee})},V=()=>{const ee={};if(f.trim()||(ee.name=!0),N.trim()||(ee.message=!0),v.trim()||(ee.cronExpr=!0),P(ee),Object.keys(ee).length>0)return;const G=ND({name:f,description:h,schedule:y,message:N,payloadKind:(n==null?void 0:n.payload.kind)==="systemEvent"?"systemEvent":"agentTurn"});n?l(n.id,G):a(G)};return d.jsx("dialog",{ref:c,onClose:s,className:"fixed inset-0 z-50 m-auto max-w-lg rounded-lg border border-gray-200 bg-white p-0 shadow-xl backdrop:bg-black/40 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"max-h-[80vh] overflow-y-auto p-6",children:[d.jsx("h3",{className:"mb-4 text-lg font-semibold text-gray-900 dark:text-gray-100",children:o(n?"cron.dialog.editTitle":"cron.dialog.createTitle")}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[o("cron.dialog.name")," ",d.jsx("span",{className:"text-red-500",children:"*"})]}),d.jsx("input",{type:"text",value:f,onChange:ee=>g(ee.target.value),placeholder:o("cron.dialog.namePlaceholder"),className:`w-full rounded-md border bg-white px-3 py-2 text-sm dark:bg-gray-700 dark:text-gray-100 ${T.name?"border-red-500":"border-gray-300 dark:border-gray-600"}`}),T.name&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:o("cron.dialog.required")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("cron.dialog.description")}),d.jsx("input",{type:"text",value:h,onChange:ee=>x(ee.target.value),placeholder:o("cron.dialog.descriptionPlaceholder"),className:"w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("cron.dialog.schedule")}),d.jsx("div",{className:"mb-3 flex flex-wrap gap-2",children:Bx.map((ee,G)=>d.jsx("button",{type:"button",onClick:()=>H(G),className:`rounded-md border px-3 py-1.5 text-xs font-medium transition-colors ${j===G?"border-blue-500 bg-blue-50 text-blue-700 dark:border-blue-400 dark:bg-blue-900/20 dark:text-blue-400":"border-gray-300 text-gray-600 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700"}`,children:o(ee.labelKey)},G))}),d.jsx("input",{type:"text",value:v,onChange:ee=>L(ee.target.value),placeholder:"0 * * * *",className:`w-full rounded-md border bg-white px-3 py-2 text-sm font-mono dark:bg-gray-700 dark:text-gray-100 ${T.cronExpr?"border-red-500":"border-gray-300 dark:border-gray-600"}`}),d.jsx("p",{className:"mt-1 text-xs text-gray-400",children:o("cron.dialog.cronHelp")})]}),d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[o("cron.dialog.message")," ",d.jsx("span",{className:"text-red-500",children:"*"})]}),d.jsx("textarea",{value:N,onChange:ee=>E(ee.target.value),placeholder:o("cron.dialog.messagePlaceholder"),rows:3,className:`w-full rounded-md border bg-white px-3 py-2 text-sm dark:bg-gray-700 dark:text-gray-100 ${T.message?"border-red-500":"border-gray-300 dark:border-gray-600"}`}),T.message&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:o("cron.dialog.required")})]})]}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:s,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:o("common:actions.cancel")}),d.jsx("button",{type:"button",onClick:V,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:o(n?"common:actions.save":"common:actions.create")})]})]})})}function ED(){const{t:e}=oe("console"),{tasks:n,isLoading:a,error:l,dialogOpen:s,editingTask:o,fetchTasks:c,addTask:f,updateTask:g,removeTask:h,runTask:x,openDialog:y,closeDialog:b,initEventListeners:v}=xD(),[S,N]=C.useState(null),[E,j]=C.useState(null);C.useEffect(()=>(c(),v()),[c,v]);const z=(L,V)=>{g(L,{enabled:V})},T=async()=>{S&&(await h(S),N(null))},P=async()=>{E&&(await x(E),j(null),await c())};if(a&&n.length===0)return d.jsxs("div",{className:"space-y-6",children:[d.jsx(vf,{title:e("cron.title"),description:e("cron.description"),onRefresh:c,onCreate:()=>y()}),d.jsx(Wi,{})]});if(l&&n.length===0)return d.jsxs("div",{className:"space-y-6",children:[d.jsx(vf,{title:e("cron.title"),description:e("cron.description"),onRefresh:c,onCreate:()=>y()}),d.jsx(mu,{message:l,onRetry:c})]});const H=[...n].sort((L,V)=>{const ee=L.state.nextRunAtMs??1/0,G=V.state.nextRunAtMs??1/0;return ee-G});return d.jsxs("div",{className:"space-y-6",children:[d.jsx(vf,{title:e("cron.title"),description:e("cron.description"),onRefresh:c,loading:a,onCreate:()=>y()}),d.jsx(bD,{tasks:n}),n.length===0?d.jsx(Ii,{icon:tu,title:e("cron.empty.title"),action:{label:e("cron.empty.createFirst"),onClick:()=>y()}}):d.jsx("div",{className:"space-y-3",children:H.map(L=>d.jsx(jD,{task:L,onToggle:z,onRun:j,onEdit:y,onDelete:N},L.id))}),d.jsx(CD,{open:s,editingTask:o,onSave:f,onUpdate:g,onClose:b}),d.jsx($i,{open:S!==null,title:e("cron.delete.title"),description:e("cron.delete.description"),onConfirm:T,onCancel:()=>N(null),variant:"danger"}),d.jsx($i,{open:E!==null,title:e("cron.run.title"),description:e("cron.run.description"),onConfirm:P,onCancel:()=>j(null)})]})}function vf({title:e,description:n,onRefresh:a,loading:l,onCreate:s}){const{t:o}=oe("common");return d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:n})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-blue-700 transition-colors",children:[d.jsx(fr,{className:"h-3.5 w-3.5"}),o("actions.create")]}),d.jsxs("button",{type:"button",onClick:a,disabled:l,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),o("actions.refresh")]})]})]})}const ot=oa((e,n)=>({config:null,hash:null,configPath:null,configRaw:null,configValid:!0,loading:!1,error:null,schemaHints:null,status:null,statusLoading:!1,statusError:null,updateResult:null,updateLoading:!1,catalogModels:[],catalogLoading:!1,fetchConfig:async()=>{e({loading:!0,error:null});try{const l=await(await yt()).configGet();e({config:l.config,hash:l.hash??null,configPath:l.path??null,configRaw:l.raw??null,configValid:l.valid,loading:!1})}catch(a){e({loading:!1,error:String(a)})}},patchConfig:async a=>{const{hash:l}=n();try{const s=await yt(),o=JSON.stringify(a),c=await s.configPatch(o,l??void 0);if(c.ok)e({config:c.config,error:null}),await n().fetchConfig();else{const f=c.error??"config patch failed";e({error:f}),f.includes("config changed")&&await n().fetchConfig()}return c}catch(s){const o=String(s);return e({error:o}),{ok:!1,config:n().config??{},error:o}}},fetchSchema:async()=>{try{const l=await(await yt()).configSchema();e({schemaHints:l})}catch{}},fetchStatus:async()=>{e({statusLoading:!0,statusError:null});try{const l=await(await yt()).statusSummary();e({status:l,statusLoading:!1})}catch(a){e({statusLoading:!1,statusError:String(a)})}},fetchCatalogModels:async()=>{e({catalogLoading:!0});try{const l=await(await yt()).modelsList();e({catalogModels:l,catalogLoading:!1})}catch{e({catalogLoading:!1})}},runUpdate:async a=>{e({updateLoading:!0,updateResult:null});try{const s=await(await yt()).updateRun(a);return e({updateResult:s,updateLoading:!1}),s}catch(l){const s={ok:!1,result:{status:"error",mode:"unknown",reason:String(l),steps:[],durationMs:0},restart:null};return e({updateResult:s,updateLoading:!1}),s}}})),Ix="openclaw-console-theme",$x="openclaw-console-lang",Fx="openclaw-console-dev-mode";function Kx(e,n){return typeof window>"u"?n:localStorage.getItem(e)??n}function AD(e,n){if(typeof window>"u")return n;const a=localStorage.getItem(e);return a===null?n:a==="true"}const Fi=oa(e=>({theme:Kx(Ix,"system"),language:Kx($x,"zh"),devModeUnlocked:AD(Fx,!1),setTheme:n=>{localStorage.setItem(Ix,n),e({theme:n})},setLanguage:n=>{localStorage.setItem($x,n),e({language:n})},setDevModeUnlocked:n=>{localStorage.setItem(Fx,String(n)),e({devModeUnlocked:n})}})),TD=[{value:"light",icon:e4,labelKey:"settings.appearance.themeLight"},{value:"dark",icon:DC,labelKey:"settings.appearance.themeDark"},{value:"system",icon:_C,labelKey:"settings.appearance.themeSystem"}],_D=[{value:"zh",labelKey:"settings.appearance.langZh"},{value:"en",labelKey:"settings.appearance.langEn"}];function MD(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function DD(){const{t:e,i18n:n}=oe("console"),a=Fi(c=>c.theme),l=Fi(c=>c.setTheme),s=he(c=>c.setTheme),o=c=>{l(c);const f=c==="system"?MD():c;s(f)};return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.appearance.title")}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.appearance.theme")}),d.jsx("div",{className:"flex gap-1 rounded-lg border border-gray-200 p-1 dark:border-gray-600",children:TD.map(({value:c,icon:f,labelKey:g})=>d.jsxs("button",{type:"button",onClick:()=>o(c),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${a===c?"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700"}`,children:[d.jsx(f,{className:"h-3.5 w-3.5"}),e(g)]},c))})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.appearance.language")}),d.jsx("div",{className:"flex gap-1 rounded-lg border border-gray-200 p-1 dark:border-gray-600",children:_D.map(({value:c,labelKey:f})=>d.jsx("button",{type:"button",onClick:()=>n.changeLanguage(c),className:`rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${n.language===c?"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700"}`,children:e(f)},c))})]})]})]})}const Rh=["openai-completions","openai-responses","openai-codex-responses","anthropic-messages","google-generative-ai","github-copilot","bedrock-converse-stream","ollama"],RD=["text","image"],OD=["openai","zai","qwen"],zD=["max_completion_tokens","max_tokens"];function LD(){return{id:"",name:"",reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192}}const Pt=[{id:"anthropic",name:"Anthropic",icon:"🤖",defaultBaseUrl:"https://api.anthropic.com",defaultApi:"anthropic-messages",requiresApiKey:!0,placeholder:"sk-ant-..."},{id:"openai",name:"OpenAI",icon:"🧠",defaultBaseUrl:"https://api.openai.com/v1",defaultApi:"openai-responses",requiresApiKey:!0,placeholder:"sk-..."},{id:"openai-codex",name:"OpenAI Codex",icon:"🧬",defaultBaseUrl:"https://api.openai.com/v1",defaultApi:"openai-codex-responses",requiresApiKey:!1},{id:"google",name:"Google AI",icon:"🔮",defaultBaseUrl:"https://generativelanguage.googleapis.com",defaultApi:"google-generative-ai",requiresApiKey:!0},{id:"openrouter",name:"OpenRouter",icon:"🔀",defaultBaseUrl:"https://openrouter.ai/api/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-or-..."},{id:"deepseek",name:"DeepSeek",icon:"🔍",defaultBaseUrl:"https://api.deepseek.com/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-..."},{id:"moonshot",name:"Moonshot (CN)",icon:"🌙",defaultBaseUrl:"https://api.moonshot.cn/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-..."},{id:"qwen",name:"通义千问 (CN)",icon:"🌐",defaultBaseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-..."},{id:"siliconflow",name:"SiliconFlow (CN)",icon:"⚡",defaultBaseUrl:"https://api.siliconflow.cn/v1",defaultApi:"openai-completions",requiresApiKey:!0,placeholder:"sk-..."},{id:"ollama",name:"Ollama",icon:"🦙",defaultBaseUrl:"http://localhost:11434",defaultApi:"ollama",requiresApiKey:!1},{id:"bedrock",name:"AWS Bedrock",icon:"☁️",defaultBaseUrl:"",defaultApi:"bedrock-converse-stream",requiresApiKey:!1},{id:"github-copilot",name:"GitHub Copilot",icon:"🐙",defaultBaseUrl:"",defaultApi:"github-copilot",requiresApiKey:!1},{id:"custom",name:"Custom",icon:"⚙️",defaultBaseUrl:"",defaultApi:"openai-completions",requiresApiKey:!0}];function Oh(e,n,a){const l=Pt.find(s=>s.id===e);if(l)return l;if(n){const s=Pt.find(o=>o.defaultApi===n);if(s)return s}if(a){if(a.includes("anthropic.com"))return Pt[0];if(a.includes("openai.com"))return Pt[1];if(a.includes("googleapis.com"))return Pt[2];if(a.includes("openrouter.ai"))return Pt[3];if(a.includes("deepseek.com"))return Pt[4];if(a.includes("moonshot.cn"))return Pt[5];if(a.includes("dashscope.aliyuncs.com"))return Pt[6];if(a.includes("siliconflow.cn"))return Pt[7];if(a.includes("localhost:11434"))return Pt[8]}return Pt[Pt.length-1]}const zh="__OPENCLAW_REDACTED__";function UD(e){return Array.isArray(e)?e.map(n=>({id:String(n.id??""),name:String(n.name??""),api:n.api,reasoning:n.reasoning===!0,input:Array.isArray(n.input)?n.input:["text"],cost:n.cost?{input:Number(n.cost.input??0),output:Number(n.cost.output??0),cacheRead:Number(n.cost.cacheRead??0),cacheWrite:Number(n.cost.cacheWrite??0)}:void 0,contextWindow:typeof n.contextWindow=="number"?n.contextWindow:void 0,maxTokens:typeof n.maxTokens=="number"?n.maxTokens:void 0,compat:n.compat})):[]}function lv(e){const n={id:e.id,name:e.name,reasoning:e.reasoning??!1,input:e.input??["text"]};return e.api&&(n.api=e.api),e.cost&&(n.cost=e.cost),e.contextWindow&&(n.contextWindow=e.contextWindow),e.maxTokens&&(n.maxTokens=e.maxTokens),e.compat&&(n.compat=e.compat),e.headers&&(n.headers=e.headers),n}function HD({providerId:e,config:n,onEdit:a,onDelete:l}){const{t:s}=oe("console"),o=Oh(e,n.api,n.baseUrl),f=typeof n.auth=="string"&&n.auth.length>0||n.apiKey===zh||typeof n.apiKey=="string"&&n.apiKey.length>0,g=Array.isArray(n.models)?n.models:[],h=g.filter(y=>y.reasoning===!0).length,x=g.filter(y=>Array.isArray(y.input)&&y.input.includes("image")).length;return d.jsx("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-3 dark:border-gray-600 dark:bg-gray-700/50",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d.jsx("span",{className:"text-xl",title:o.name,children:o.icon}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:e}),o.id!==e&&d.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",o.name,")"]})]}),d.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-500 dark:text-gray-400",children:[typeof n.baseUrl=="string"&&n.baseUrl&&d.jsx("span",{className:"truncate max-w-48",title:n.baseUrl,children:n.baseUrl}),typeof n.api=="string"&&d.jsx("span",{children:n.api})]})]})]}),d.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[g.length>0&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:s("settings.providers.modelCount",{count:g.length})}),h>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-purple-600 dark:text-purple-400",title:s("settings.providers.models.reasoning"),children:[d.jsx(qo,{className:"h-3 w-3"}),h]}),x>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-green-600 dark:text-green-400",title:s("settings.providers.models.input_image"),children:[d.jsx(Io,{className:"h-3 w-3"}),x]})]}),o.requiresApiKey&&d.jsx("span",{className:"flex items-center gap-1 text-xs",children:f?d.jsxs(d.Fragment,{children:[d.jsx(lh,{className:"h-3.5 w-3.5 text-green-500"}),d.jsx("span",{className:"text-green-600 dark:text-green-400",children:s("settings.providers.apiKeyConfigured")})]}):d.jsxs(d.Fragment,{children:[d.jsx(eu,{className:"h-3.5 w-3.5 text-amber-500"}),d.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:s("settings.providers.apiKeyNotConfigured")})]})}),d.jsx("button",{type:"button",onClick:a,className:"rounded p-1.5 text-gray-500 hover:bg-gray-200 hover:text-gray-700 dark:hover:bg-gray-600 dark:hover:text-gray-300 transition-colors",title:"Edit",children:d.jsx(Db,{className:"h-4 w-4"})}),d.jsx("button",{type:"button",onClick:l,className:"rounded p-1.5 text-gray-500 hover:bg-red-100 hover:text-red-600 dark:hover:bg-red-900/30 dark:hover:text-red-400 transition-colors",title:"Delete",children:d.jsx(Yi,{className:"h-4 w-4"})})]})]})})}function BD({providerId:e,models:n}){const{t:a}=oe("console"),l=Oh(e),s=n.filter(c=>c.reasoning===!0).length,o=n.filter(c=>{var f;return(f=c.input)==null?void 0:f.includes("image")}).length;return d.jsx("div",{className:"rounded-lg border border-dashed border-emerald-300 bg-emerald-50/50 px-4 py-3 dark:border-emerald-700 dark:bg-emerald-900/10",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d.jsx("span",{className:"text-xl",title:l.name,children:l.icon}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:e}),l.id!==e&&d.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",l.name,")"]}),d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-100 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:bg-emerald-800/40 dark:text-emerald-300",children:[d.jsx(XC,{className:"h-3 w-3"}),a("settings.providers.systemDiscovered")]})]}),d.jsx("div",{className:"mt-0.5 flex flex-wrap gap-1.5",children:n.map(c=>d.jsx("span",{className:"inline-block rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-600 dark:bg-gray-700 dark:text-gray-300",title:`${e}/${c.id}`,children:c.name||c.id},c.id))})]})]}),d.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[n.length>0&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:a("settings.providers.modelCount",{count:n.length})}),s>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-purple-600 dark:text-purple-400",title:a("settings.providers.models.reasoning"),children:[d.jsx(qo,{className:"h-3 w-3"}),s]}),o>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-green-600 dark:text-green-400",title:a("settings.providers.models.input_image"),children:[d.jsx(Io,{className:"h-3 w-3"}),o]})]}),d.jsx("span",{className:"flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400",children:l.requiresApiKey?"OAuth":a("settings.providers.apiKeyConfigured")})]})]})})}function qD({model:e,onChange:n,onRemove:a,defaultCollapsed:l=!1}){var S,N,E;const{t:s}=oe("console"),[o,c]=C.useState(l),[f,g]=C.useState(!1),h=j=>n({...e,...j}),x=(j,z)=>{const T=e.cost??{input:0,output:0,cacheRead:0,cacheWrite:0};n({...e,cost:{...T,[j]:z}})},y=j=>{const z=e.input??["text"],T=z.includes(j)?z.filter(P=>P!==j):[...z,j];T.length!==0&&h({input:T})},b=j=>{n({...e,compat:{...e.compat??{},...j}})},v=e.name||e.id||s("settings.providers.models.untitled");return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-gray-50/50 dark:border-gray-600 dark:bg-gray-700/30",children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[d.jsxs("button",{type:"button",onClick:()=>c(!o),className:"flex items-center gap-2 text-sm font-medium text-gray-800 dark:text-gray-200",children:[o?d.jsx(sa,{className:"h-4 w-4"}):d.jsx(rh,{className:"h-4 w-4"}),d.jsx("span",{className:"truncate max-w-xs",children:v}),e.reasoning&&d.jsx("span",{title:"reasoning",children:d.jsx(qo,{className:"h-3.5 w-3.5 text-purple-500"})}),((S=e.input)==null?void 0:S.includes("image"))&&d.jsx("span",{title:"image",children:d.jsx(Io,{className:"h-3.5 w-3.5 text-green-500"})})]}),d.jsx("button",{type:"button",onClick:a,className:"rounded p-1 text-gray-400 hover:bg-red-100 hover:text-red-500 dark:hover:bg-red-900/30 transition-colors",title:s("settings.providers.models.remove"),children:d.jsx(Yi,{className:"h-4 w-4"})})]}),!o&&d.jsxs("div",{className:"space-y-4 border-t border-gray-200 px-4 py-4 dark:border-gray-600",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(Mn,{label:s("settings.providers.models.id"),children:d.jsx("input",{type:"text",value:e.id,onChange:j=>h({id:j.target.value}),className:vi,placeholder:"gpt-4o"})}),d.jsx(Mn,{label:s("settings.providers.models.name"),children:d.jsx("input",{type:"text",value:e.name,onChange:j=>h({name:j.target.value}),className:vi,placeholder:"GPT-4o"})})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(Mn,{label:s("settings.providers.models.reasoning"),children:d.jsx(Px,{active:e.reasoning===!0,onClick:()=>h({reasoning:!e.reasoning}),icon:d.jsx(qo,{className:"h-4 w-4"}),label:e.reasoning?s("settings.providers.models.yes"):s("settings.providers.models.no")})}),d.jsx(Mn,{label:s("settings.providers.models.inputTypes"),children:d.jsx("div",{className:"flex gap-2",children:RD.map(j=>d.jsx(Px,{active:(e.input??["text"]).includes(j),onClick:()=>y(j),icon:j==="text"?d.jsx(r4,{className:"h-4 w-4"}):d.jsx(Io,{className:"h-4 w-4"}),label:s(`settings.providers.models.input_${j}`)},j))})})]}),d.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[d.jsx(Mn,{label:s("settings.providers.models.apiOverride"),children:d.jsxs("div",{className:"relative",children:[d.jsxs("select",{value:e.api??"",onChange:j=>h({api:j.target.value?j.target.value:void 0}),className:kf,"aria-label":s("settings.providers.models.apiOverride"),children:[d.jsx("option",{value:"",children:s("settings.providers.models.inheritProvider")}),Rh.map(j=>d.jsx("option",{value:j,children:j},j))]}),d.jsx(Sf,{})]})}),d.jsx(Mn,{label:s("settings.providers.models.contextWindow"),children:d.jsx("input",{type:"number",value:e.contextWindow??"",onChange:j=>h({contextWindow:j.target.value?Number(j.target.value):void 0}),className:vi,placeholder:"128000",min:1})}),d.jsx(Mn,{label:s("settings.providers.models.maxTokens"),children:d.jsx("input",{type:"number",value:e.maxTokens??"",onChange:j=>h({maxTokens:j.target.value?Number(j.target.value):void 0}),className:vi,placeholder:"8192",min:1})})]}),d.jsxs(Mn,{label:s("settings.providers.models.cost"),children:[d.jsx("p",{className:"mb-2 text-xs text-gray-500 dark:text-gray-400",children:s("settings.providers.models.costHint")}),d.jsx("div",{className:"grid grid-cols-4 gap-3",children:["input","output","cacheRead","cacheWrite"].map(j=>{var z;return d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs text-gray-500 dark:text-gray-400",children:s(`settings.providers.models.cost_${j}`)}),d.jsx("input",{type:"number",value:((z=e.cost)==null?void 0:z[j])??"",onChange:T=>x(j,T.target.value?Number(T.target.value):0),className:vi,placeholder:"0",min:0,step:"0.01"})]},j)})})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>g(!f),className:"flex items-center gap-1 text-xs text-blue-600 hover:underline dark:text-blue-400",children:[d.jsx(Ob,{className:"h-3 w-3"}),s(f?"settings.providers.models.hideAdvanced":"settings.providers.models.showAdvanced")]}),f&&d.jsxs("div",{className:"mt-3 space-y-3 rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-600 dark:bg-gray-800",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(Mn,{label:s("settings.providers.models.thinkingFormat"),children:d.jsxs("div",{className:"relative",children:[d.jsxs("select",{value:((N=e.compat)==null?void 0:N.thinkingFormat)??"",onChange:j=>b({thinkingFormat:j.target.value?j.target.value:void 0}),className:kf,"aria-label":s("settings.providers.models.thinkingFormat"),children:[d.jsx("option",{value:"",children:s("settings.providers.models.default")}),OD.map(j=>d.jsx("option",{value:j,children:j},j))]}),d.jsx(Sf,{})]})}),d.jsx(Mn,{label:s("settings.providers.models.maxTokensField"),children:d.jsxs("div",{className:"relative",children:[d.jsxs("select",{value:((E=e.compat)==null?void 0:E.maxTokensField)??"",onChange:j=>b({maxTokensField:j.target.value?j.target.value:void 0}),className:kf,"aria-label":s("settings.providers.models.maxTokensField"),children:[d.jsx("option",{value:"",children:s("settings.providers.models.default")}),zD.map(j=>d.jsx("option",{value:j,children:j},j))]}),d.jsx(Sf,{})]})})]}),d.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2",children:["supportsStore","supportsDeveloperRole","supportsReasoningEffort","supportsUsageInStreaming","supportsStrictMode","requiresToolResultName","requiresAssistantAfterToolResult","requiresThinkingAsText","requiresMistralToolIds"].map(j=>{var z;return d.jsxs("label",{className:"flex items-center gap-2 text-xs text-gray-700 dark:text-gray-300",children:[d.jsx("input",{type:"checkbox",checked:((z=e.compat)==null?void 0:z[j])===!0,onChange:T=>b({[j]:T.target.checked||void 0}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),s(`settings.providers.models.compat_${j}`)]},j)})})]})]})]})]})}function iv({models:e,onChange:n}){const{t:a}=oe("console"),l=()=>{n([...e,LD()])},s=(c,f)=>{const g=[...e];g[c]=f,n(g)},o=c=>{n(e.filter((f,g)=>g!==c))};return d.jsxs("div",{children:[d.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[d.jsxs("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[a("settings.providers.models.title")," (",e.length,")"]}),d.jsxs("button",{type:"button",onClick:l,className:"flex items-center gap-1 rounded-lg border border-dashed border-gray-300 px-3 py-1.5 text-xs text-gray-600 hover:border-blue-400 hover:text-blue-600 dark:border-gray-500 dark:text-gray-400 dark:hover:border-blue-400 dark:hover:text-blue-400 transition-colors",children:[d.jsx(fr,{className:"h-3.5 w-3.5"}),a("settings.providers.models.add")]})]}),e.length===0?d.jsx("div",{className:"rounded-lg border border-dashed border-gray-300 px-4 py-6 text-center text-sm text-gray-400 dark:border-gray-600",children:a("settings.providers.models.empty")}):d.jsx("div",{className:"space-y-2",children:e.map((c,f)=>d.jsx(qD,{model:c,onChange:g=>s(f,g),onRemove:()=>o(f),defaultCollapsed:c.id.length>0},f))})]})}const vi="w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors",kf="w-full appearance-none rounded-lg border border-gray-300 bg-white px-3 py-2 pr-8 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors";function Sf(){return d.jsx(sa,{className:"pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"})}function Mn({label:e,children:n}){return d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-gray-600 dark:text-gray-400",children:e}),n]})}function Px({active:e,onClick:n,icon:a,label:l}){return d.jsxs("button",{type:"button",onClick:n,className:`flex items-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors ${e?"border-blue-500 bg-blue-50 text-blue-700 dark:border-blue-400 dark:bg-blue-900/30 dark:text-blue-300":"border-gray-300 bg-white text-gray-500 hover:border-gray-400 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-400"}`,children:[a,l]})}function ID({open:e,existingIds:n,onSave:a,onCancel:l}){const{t:s}=oe("console"),o=C.useRef(null),[c,f]=C.useState(1),[g,h]=C.useState(null),[x,y]=C.useState(""),[b,v]=C.useState(""),[S,N]=C.useState(""),[E,j]=C.useState("openai-completions"),[z,T]=C.useState(!1),[P,H]=C.useState([]);C.useEffect(()=>{const R=o.current;R&&(e&&!R.open?(R.showModal(),f(1),h(null),y(""),v(""),N(""),j("openai-completions"),T(!1),H([])):!e&&R.open&&R.close())},[e]);const L=R=>{h(R),y(R.id==="custom"?"":R.id),v(R.defaultBaseUrl),j(R.defaultApi),f(2)},V=n.includes(x),ee=x.length>0&&!V,G=()=>{if(!ee)return;const R={baseUrl:b,api:E,models:P.filter(ae=>ae.id.length>0).map(lv)};S&&(R.apiKey=S),a(x,R)};return d.jsx("dialog",{ref:o,onClose:l,className:"fixed inset-0 z-50 m-auto w-[92vw] max-w-3xl max-h-[90vh] overflow-y-auto rounded-xl border border-gray-200 bg-white p-0 shadow-2xl backdrop:bg-black/50 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-8",children:[c===1&&d.jsxs("div",{children:[d.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:s("settings.providers.addDialog.title")}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:s("settings.providers.addDialog.selectType")}),d.jsx("div",{className:"mt-6 grid grid-cols-3 gap-3 sm:grid-cols-4",children:Pt.map(R=>d.jsxs("button",{type:"button",onClick:()=>L(R),className:"flex flex-col items-center gap-2 rounded-xl border border-gray-200 px-4 py-5 text-center hover:border-blue-400 hover:bg-blue-50/80 dark:border-gray-600 dark:hover:border-blue-500 dark:hover:bg-blue-900/20 transition-all",children:[d.jsx("span",{className:"text-2xl",children:R.icon}),d.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-gray-200",children:R.name})]},R.id))}),d.jsx("div",{className:"mt-6 flex justify-end",children:d.jsx("button",{type:"button",onClick:l,className:"rounded-lg border border-gray-300 px-5 py-2.5 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:s("settings.providers.addDialog.cancel")})})]}),c===2&&g&&d.jsxs("div",{children:[d.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:()=>f(1),className:"rounded-lg p-2 text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:d.jsx(Cb,{className:"h-5 w-5"})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-2xl",children:g.icon}),d.jsxs("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:[s("settings.providers.addDialog.title")," — ",g.name]})]})]}),d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:s("settings.providers.addDialog.providerId")}),d.jsx("input",{type:"text",value:x,onChange:R=>y(R.target.value.replace(/\s/g,"-").toLowerCase()),className:wf,placeholder:g.id}),d.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:s("settings.providers.addDialog.providerIdHint")}),V&&d.jsx("p",{className:"mt-1 text-xs text-red-500",children:s("settings.providers.addDialog.idConflict")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:s("settings.providers.addDialog.apiType")}),d.jsxs("div",{className:"relative",children:[d.jsx("select",{value:E,onChange:R=>j(R.target.value),className:$D,children:Rh.map(R=>d.jsx("option",{value:R,children:R},R))}),d.jsx(sa,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"})]})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:s("settings.providers.addDialog.baseUrl")}),d.jsx("input",{type:"text",value:b,onChange:R=>v(R.target.value),className:wf,placeholder:"https://api.example.com/v1"})]}),g.requiresApiKey&&d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:s("settings.providers.addDialog.apiKey")}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:z?"text":"password",value:S,onChange:R=>N(R.target.value),className:`${wf} pr-11`,placeholder:g.placeholder??"sk-..."}),d.jsx("button",{type:"button",onClick:()=>T(!z),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",children:z?d.jsx(nu,{className:"h-4 w-4"}):d.jsx(au,{className:"h-4 w-4"})})]})]}),d.jsx("hr",{className:"border-gray-200 dark:border-gray-600"}),d.jsx(iv,{models:P,onChange:H})]}),d.jsxs("div",{className:"mt-8 flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:l,className:"rounded-lg border border-gray-300 px-5 py-2.5 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:s("settings.providers.addDialog.cancel")}),d.jsx("button",{type:"button",onClick:G,disabled:!ee,className:"rounded-lg bg-blue-600 px-5 py-2.5 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:s("settings.providers.addDialog.save")})]})]})]})})}const wf="w-full rounded-lg border border-gray-300 bg-white px-4 py-2.5 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors",$D="w-full appearance-none rounded-lg border border-gray-300 bg-white px-4 py-2.5 pr-10 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors";function FD({open:e,providerId:n,config:a,onSave:l,onCancel:s}){const{t:o}=oe("console"),c=C.useRef(null),f=Oh(n,a.api,a.baseUrl),[g,h]=C.useState(String(a.baseUrl??"")),[x,y]=C.useState(""),[b,v]=C.useState(a.api??"openai-completions"),[S,N]=C.useState(!1),[E,j]=C.useState(()=>UD(a.models));C.useEffect(()=>{const H=c.current;H&&(e&&!H.open?H.showModal():!e&&H.open&&H.close())},[e]);const z=()=>{const H={baseUrl:g,api:b,models:E.filter(L=>L.id.length>0).map(lv)};x.length>0&&(H.apiKey=x),l(H)},P=typeof a.auth=="string"&&a.auth.length>0||a.apiKey===zh||typeof a.apiKey=="string"&&a.apiKey.length>0;return d.jsx("dialog",{ref:c,onClose:s,className:"fixed inset-0 z-50 m-auto w-[92vw] max-w-3xl max-h-[90vh] overflow-y-auto rounded-xl border border-gray-200 bg-white p-0 shadow-2xl backdrop:bg-black/50 dark:border-gray-700 dark:bg-gray-800",children:d.jsxs("div",{className:"p-8",children:[d.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[d.jsx("span",{className:"text-2xl",children:f.icon}),d.jsxs("div",{children:[d.jsxs("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:[o("settings.providers.editDialog.title")," — ",n]}),f.id!==n&&d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:f.name})]})]}),d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("settings.providers.addDialog.apiType")}),d.jsxs("div",{className:"relative",children:[d.jsx("select",{value:b,onChange:H=>v(H.target.value),className:KD,children:Rh.map(H=>d.jsx("option",{value:H,children:H},H))}),d.jsx(sa,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("settings.providers.addDialog.baseUrl")}),d.jsx("input",{type:"text",value:g,onChange:H=>h(H.target.value),className:Vx})]})]}),f.requiresApiKey&&d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-300",children:o("settings.providers.addDialog.apiKey")}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:S?"text":"password",value:x,onChange:H=>y(H.target.value),className:`${Vx} pr-11`,placeholder:P?o("settings.providers.editDialog.apiKeyPlaceholder"):f.placeholder}),d.jsx("button",{type:"button",onClick:()=>N(!S),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",children:S?d.jsx(nu,{className:"h-4 w-4"}):d.jsx(au,{className:"h-4 w-4"})})]}),P&&!x&&d.jsx("p",{className:"mt-1 text-xs text-green-600 dark:text-green-400",children:o("settings.providers.apiKeyConfigured")})]}),d.jsx("hr",{className:"border-gray-200 dark:border-gray-600"}),d.jsx(iv,{models:E,onChange:j})]}),d.jsxs("div",{className:"mt-8 flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:s,className:"rounded-lg border border-gray-300 px-5 py-2.5 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",children:o("settings.providers.editDialog.cancel")}),d.jsx("button",{type:"button",onClick:z,className:"rounded-lg bg-blue-600 px-5 py-2.5 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:o("settings.providers.editDialog.save")})]})]})})}const Vx="w-full rounded-lg border border-gray-300 bg-white px-4 py-2.5 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors",KD="w-full appearance-none rounded-lg border border-gray-300 bg-white px-4 py-2.5 pr-10 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 transition-colors";function PD(e){if(!e)return{};const n=e.models;return(n==null?void 0:n.providers)??{}}function VD(e,n){const a=new Map;for(const l of e)n.has(l.provider)||(a.has(l.provider)||a.set(l.provider,[]),a.get(l.provider).push(l));return a}function YD(){const{t:e}=oe("console"),n=ot(T=>T.config),a=ot(T=>T.patchConfig),l=ot(T=>T.catalogModels),s=ot(T=>T.fetchCatalogModels),[o,c]=C.useState(!1),[f,g]=C.useState(null),[h,x]=C.useState(null);C.useEffect(()=>{l.length===0&&s()},[l.length,s]);const y=PD(n),b=Object.entries(y),v=new Set(Object.keys(y)),S=VD(l,v),N=async(T,P)=>{await a({models:{providers:{[T]:P}}}),c(!1)},E=async T=>{f&&(await a({models:{providers:{[f.id]:T}}}),g(null))},j=async()=>{h&&(await a({models:{providers:{[h]:null}}}),x(null))},z=b.length>0||S.size>0;return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.providers.title")}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e("settings.providers.description")})]}),d.jsxs("button",{type:"button",onClick:()=>c(!0),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:[d.jsx(fr,{className:"h-4 w-4"}),e("settings.providers.add")]})]}),z?d.jsxs("div",{className:"space-y-2",children:[b.map(([T,P])=>d.jsx(HD,{providerId:T,config:P,onEdit:()=>g({id:T,config:P}),onDelete:()=>x(T)},T)),Array.from(S.entries()).map(([T,P])=>d.jsx(BD,{providerId:T,models:P},`catalog-${T}`))]}):d.jsx(Ii,{icon:GN,title:e("settings.providers.empty"),description:e("settings.providers.emptyHint")}),d.jsx(ID,{open:o,existingIds:Object.keys(y),onSave:N,onCancel:()=>c(!1)}),f&&d.jsx(FD,{open:!!f,providerId:f.id,config:f.config,onSave:E,onCancel:()=>g(null)},f.id),d.jsx($i,{open:!!h,title:e("settings.providers.deleteTitle"),description:e("settings.providers.deleteDescription",{name:h??""}),variant:"danger",onConfirm:j,onCancel:()=>x(null)})]})}function GD(){const{t:e}=oe("console"),n=ot(f=>f.status),a=ot(f=>f.statusLoading),l=ot(f=>f.statusError),s=ot(f=>f.fetchStatus),o=n!=null&&n.uptime?Math.floor(n.uptime/3600):0,c=n!=null&&n.uptime?Math.floor(n.uptime%3600/60):0;return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[d.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.gateway.title")}),d.jsxs("button",{type:"button",onClick:s,disabled:a,className:"flex items-center gap-1.5 rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors",children:[d.jsx(hr,{className:`h-3.5 w-3.5 ${a?"animate-spin":""}`}),e("settings.gateway.refresh")]})]}),l?d.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-amber-50 px-4 py-3 dark:bg-amber-900/20",children:[d.jsx(i4,{className:"h-5 w-5 text-amber-500 shrink-0"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-300",children:e("settings.gateway.notConnected")}),d.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:e("settings.gateway.notConnectedHint")})]})]}):n?d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[d.jsx(sl,{label:e("settings.gateway.version"),value:n.version??"—"}),d.jsx(sl,{label:e("settings.gateway.port"),value:n.port!=null?String(n.port):"—"}),d.jsx(sl,{label:e("settings.gateway.uptime"),value:n.uptime!=null?e("settings.gateway.uptimeFormat",{hours:o,minutes:c}):"—"}),d.jsx(sl,{label:e("settings.gateway.mode"),value:n.mode??"—"}),d.jsx(sl,{label:e("settings.gateway.nodeVersion"),value:n.nodeVersion??"—"}),d.jsx(sl,{label:e("settings.gateway.platform"),value:n.platform??"—"})]}):null]})}function sl({label:e,value:n}){return d.jsxs("div",{className:"rounded-md bg-gray-50 px-3 py-2 dark:bg-gray-700/50",children:[d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e}),d.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:n})]})}function QD(){var x;const{t:e}=oe("console"),n=ot(y=>y.status),a=ot(y=>y.config),l=ot(y=>y.updateResult),s=ot(y=>y.updateLoading),o=ot(y=>y.runUpdate),[c,f]=C.useState(!1),g=(x=a==null?void 0:a.update)==null?void 0:x.channel,h=async()=>{f(!1),await o({restartDelayMs:3e3})};return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.update.title")}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.update.currentVersion")}),d.jsx("span",{className:"text-sm font-mono font-medium text-gray-900 dark:text-gray-100",children:(n==null?void 0:n.version)??"—"})]}),g&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.update.channel")}),d.jsx("span",{className:"rounded-full bg-gray-100 px-2.5 py-0.5 text-xs font-medium text-gray-700 dark:bg-gray-700 dark:text-gray-300",children:g})]}),d.jsx("div",{className:"pt-2",children:d.jsx("button",{type:"button",onClick:()=>f(!0),disabled:s,className:"flex items-center gap-2 rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50 transition-colors",children:s?d.jsxs(d.Fragment,{children:[d.jsx(Ri,{className:"h-4 w-4 animate-spin"}),e("settings.update.updating")]}):d.jsxs(d.Fragment,{children:[d.jsx(Tb,{className:"h-4 w-4"}),e("settings.update.checkUpdate")]})})}),l&&d.jsxs("div",{className:`mt-3 flex items-start gap-2 rounded-lg px-4 py-3 text-sm ${l.result.status==="ok"?"bg-green-50 text-green-800 dark:bg-green-900/20 dark:text-green-300":l.result.status==="noop"?"bg-blue-50 text-blue-800 dark:bg-blue-900/20 dark:text-blue-300":"bg-red-50 text-red-800 dark:bg-red-900/20 dark:text-red-300"}`,children:[l.result.status==="ok"&&d.jsx(lh,{className:"mt-0.5 h-4 w-4 shrink-0"}),l.result.status==="noop"&&d.jsx(_b,{className:"mt-0.5 h-4 w-4 shrink-0"}),l.result.status==="error"&&d.jsx(lu,{className:"mt-0.5 h-4 w-4 shrink-0"}),d.jsxs("span",{children:[l.result.status==="ok"&&e("settings.update.resultOk",{before:l.result.before??"?",after:l.result.after??"?"}),l.result.status==="noop"&&e("settings.update.resultNoop"),l.result.status==="error"&&e("settings.update.resultError",{reason:l.result.reason??"Unknown error"})]})]})]}),d.jsx($i,{open:c,title:e("settings.update.confirmTitle"),description:e("settings.update.confirmDescription"),onConfirm:h,onCancel:()=>f(!1)})]})}function XD(){const{t:e}=oe("console"),n=Fi(l=>l.devModeUnlocked),a=Fi(l=>l.setDevModeUnlocked);return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.advanced.title")}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:e("settings.advanced.devMode")}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e("settings.advanced.devModeHint")})]}),d.jsx("button",{type:"button",role:"switch","aria-checked":n,onClick:()=>a(!n),className:`relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors ${n?"bg-blue-600":"bg-gray-300 dark:bg-gray-600"}`,children:d.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${n?"translate-x-6":"translate-x-1"}`})})]})]})}function ZD(){var S;const{t:e}=oe("console"),n=ot(N=>N.config),a=ot(N=>N.configPath),l=ot(N=>N.status),s=ot(N=>N.configRaw),o=(l==null?void 0:l.configPath)??a,[c,f]=C.useState(!1),[g,h]=C.useState(null),x=(S=n==null?void 0:n.gateway)==null?void 0:S.auth,y=(x==null?void 0:x.token)===zh,b="ws://localhost:18789",v=(N,E)=>{navigator.clipboard.writeText(N),h(E),setTimeout(()=>h(null),2e3)};return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.developer.title")}),d.jsxs("div",{className:"space-y-3",children:[d.jsx(jf,{label:e("settings.developer.gatewayToken"),value:y?e("settings.developer.tokenConfigured"):"—",hint:e("settings.developer.tokenHint")}),d.jsx(jf,{label:e("settings.developer.configPath"),value:o??"—",copyable:!0,onCopy:()=>o&&v(o,"path"),copied:g==="path",copiedLabel:e("settings.developer.copied")}),d.jsx(jf,{label:e("settings.developer.wsUrl"),value:b,copyable:!0,onCopy:()=>v(b,"ws"),copied:g==="ws",copiedLabel:e("settings.developer.copied")}),s&&d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>f(!c),className:"flex items-center gap-1.5 text-sm text-blue-600 hover:underline dark:text-blue-400",children:[c?d.jsx(rh,{className:"h-4 w-4"}):d.jsx(sa,{className:"h-4 w-4"}),e(c?"settings.developer.hideConfig":"settings.developer.showConfig")," ",e("settings.developer.rawConfig")]}),c&&d.jsx("pre",{className:"mt-2 max-h-64 overflow-auto rounded-md bg-gray-100 p-3 text-xs text-gray-800 dark:bg-gray-900 dark:text-gray-300",children:s})]})]})]})}function jf({label:e,value:n,hint:a,copyable:l,onCopy:s,copied:o,copiedLabel:c}){return d.jsxs("div",{className:"flex items-center justify-between rounded-md bg-gray-50 px-3 py-2 dark:bg-gray-700/50",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e}),d.jsx("p",{className:"text-sm font-mono text-gray-900 dark:text-gray-100 truncate",children:n}),a&&d.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500 mt-0.5",children:a})]}),l&&s&&d.jsx("button",{type:"button",onClick:s,className:"shrink-0 rounded p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",title:c,children:o?d.jsx(ul,{className:"h-4 w-4 text-green-500"}):d.jsx(oC,{className:"h-4 w-4"})})]})}function JD(){const{t:e}=oe("console"),n=ot(a=>a.status);return d.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",children:[d.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-900 dark:text-gray-100",children:e("settings.about.title")}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"text-center py-2",children:[d.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-gray-100",children:e("settings.about.appName")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("settings.about.tagline")}),(n==null?void 0:n.version)&&d.jsxs("p",{className:"mt-1 text-xs text-gray-400 dark:text-gray-500",children:[e("settings.about.version"),": ",n.version]})]}),d.jsxs("div",{className:"flex justify-center gap-4 pt-2",children:[d.jsxs("a",{href:"https://docs.openclaw.ai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-sm text-blue-600 hover:underline dark:text-blue-400",children:[d.jsx(Di,{className:"h-3.5 w-3.5"}),e("settings.about.docs")]}),d.jsxs("a",{href:"https://github.com/openclaw/openclaw",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-sm text-blue-600 hover:underline dark:text-blue-400",children:[d.jsx(Di,{className:"h-3.5 w-3.5"}),e("settings.about.github")]})]})]})]})}function WD(){const{t:e}=oe("console"),n=ot(o=>o.loading),a=ot(o=>o.fetchConfig),l=ot(o=>o.fetchStatus),s=Fi(o=>o.devModeUnlocked);return C.useEffect(()=>{a(),l()},[a,l]),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e("settings.title")}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:e("settings.description")})]}),n?d.jsx(Wi,{}):d.jsxs("div",{className:"space-y-4",children:[d.jsx(DD,{}),d.jsx(YD,{}),d.jsx(GD,{}),d.jsx(QD,{}),d.jsx(XD,{}),s&&d.jsx(ZD,{}),d.jsx(JD,{})]})]})}const qa=oa((e,n)=>({agents:[],defaultAgentId:"",selectedAgentId:null,activeTab:"overview",isLoading:!1,error:null,searchQuery:"",files:[],filesLoading:!1,selectedFileName:null,fileContent:null,originalFileContent:null,isFileDirty:!1,fileSaving:!1,createDialogOpen:!1,deleteDialogOpen:!1,systemModels:[],agentModelConfigs:{},fetchSystemModels:async()=>{var a;try{await yt();const l=Xe(),[s,o]=await Promise.all([l.configGet(),l.modelsList().catch(()=>[])]),c=s.config,f=new Set,g=[],h=new Map;for(const S of o){const N=`${S.provider}/${S.id}`;f.has(N)||(f.add(N),g.push({id:N,label:S.name??S.id,provider:S.provider}),h.has(S.provider)||h.set(S.provider,[]),h.get(S.provider).push(S))}const x=c==null?void 0:c.models,y=x==null?void 0:x.providers;if(y)for(const[S,N]of Object.entries(y)){const E=N.models;if(E)for(const j of E){const z=`${S}/${j.id}`;f.has(z)||(f.add(z),g.push({id:z,label:j.name??j.id,provider:S}))}}const b={},v=(a=c==null?void 0:c.agents)==null?void 0:a.list;if(v)for(const S of v){const N=S.id;if(!N)continue;const E=S.model;if(typeof E=="string")b[N]={primary:E,fallbacks:[]};else if(E&&typeof E=="object"&&!Array.isArray(E)){const j=E;b[N]={primary:j.primary??"",fallbacks:j.fallbacks??[]}}}e({systemModels:g,agentModelConfigs:b})}catch{}},fetchAgents:async()=>{e({isLoading:!0,error:null});try{await yt();const a=await Xe().agentsList(),l=a.agents.map(c=>({...c,default:c.id===a.defaultId})),{selectedAgentId:s}=n(),o=s??a.defaultId;e({agents:l,defaultAgentId:a.defaultId,selectedAgentId:o,isLoading:!1})}catch(a){e({error:String(a),isLoading:!1})}},selectAgent:a=>{e({selectedAgentId:a,activeTab:"overview",files:[],selectedFileName:null,fileContent:null,originalFileContent:null,isFileDirty:!1})},setActiveTab:a=>e({activeTab:a}),setSearchQuery:a=>e({searchQuery:a}),fetchFiles:async a=>{e({filesLoading:!0,files:[]});try{await yt();const l=await Xe().agentsFilesList(a);e({files:l.files,filesLoading:!1})}catch{e({filesLoading:!1})}},fetchFileContent:async(a,l)=>{e({selectedFileName:l,fileContent:null,originalFileContent:null,isFileDirty:!1});try{await yt();const s=await Xe().agentsFilesGet(a,l);e({fileContent:s.file.content,originalFileContent:s.file.content,isFileDirty:!1})}catch{e({fileContent:"",originalFileContent:""})}},setFileContent:a=>{const{originalFileContent:l}=n();e({fileContent:a,isFileDirty:a!==l})},resetFileContent:()=>{const{originalFileContent:a}=n();e({fileContent:a,isFileDirty:!1})},saveFileContent:async(a,l,s)=>{e({fileSaving:!0});try{return await yt(),await Xe().agentsFilesSet(a,l,s),e({fileSaving:!1,originalFileContent:s,isFileDirty:!1}),!0}catch{return e({fileSaving:!1}),!1}},createAgent:async a=>{try{await yt();const l=await Xe().agentsCreate(a);return l.ok?(await n().fetchAgents(),l.agentId):null}catch{return null}},updateAgentModel:async(a,l)=>{try{return await yt(),(await Xe().agentsUpdate({agentId:a,model:l})).ok}catch{return!1}},deleteAgent:async(a,l)=>{try{return await yt(),(await Xe().agentsDelete({agentId:a,deleteFiles:l})).ok?(e({selectedAgentId:null}),await n().fetchAgents(),!0):!1}catch{return!1}},setCreateDialogOpen:a=>e({createDialogOpen:a}),setDeleteDialogOpen:a=>e({deleteDialogOpen:a})}));function eR({agent:e,isSelected:n,isDefault:a,onSelect:l}){var g,h,x;const{t:s}=oe("console"),o=((g=e.identity)==null?void 0:g.name)??e.name??e.id,c=(h=e.identity)==null?void 0:h.emoji,f=(x=e.identity)==null?void 0:x.avatarUrl;return d.jsxs("button",{onClick:l,className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-colors ${n?"border-l-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20":"hover:bg-gray-50 dark:hover:bg-gray-800"}`,children:[d.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gray-100 text-lg dark:bg-gray-800",children:f?d.jsx("img",{src:f,alt:o,className:"h-9 w-9 rounded-lg object-cover"}):d.jsx("span",{children:c??o.charAt(0).toLowerCase()})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-900 dark:text-gray-100",children:o}),a&&d.jsx("span",{className:"shrink-0 rounded-md bg-gray-200 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-gray-600 dark:bg-gray-700 dark:text-gray-300",children:s("agents.defaultBadge")})]}),d.jsx("p",{className:"truncate text-xs text-gray-500 dark:text-gray-400",children:e.id})]})]})}function tR(){const{t:e}=oe("console"),{agents:n,isLoading:a,selectedAgentId:l,searchQuery:s,defaultAgentId:o,fetchAgents:c,selectAgent:f,setSearchQuery:g,setCreateDialogOpen:h}=qa(),x=n.filter(y=>{var S;if(!s)return!0;const b=s.toLowerCase();return(((S=y.identity)==null?void 0:S.name)??y.name??y.id).toLowerCase().includes(b)||y.id.toLowerCase().includes(b)});return d.jsxs("div",{className:"flex w-72 shrink-0 flex-col rounded-2xl border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 px-4 py-3 dark:border-gray-700",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.panelTitle")}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e("agents.configured",{count:n.length})})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("button",{onClick:()=>h(!0),className:"rounded-md p-1.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",title:e("agents.addAgent"),children:d.jsx(fr,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>c(),disabled:a,className:"rounded-md p-1.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:opacity-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",title:e("agents.refresh"),children:d.jsx(hr,{className:`h-4 w-4 ${a?"animate-spin":""}`})})]})]}),d.jsx("div",{className:"px-3 py-2",children:d.jsxs("div",{className:"relative",children:[d.jsx(Df,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-gray-400"}),d.jsx("input",{type:"text",value:s,onChange:y=>g(y.target.value),placeholder:e("agents.searchPlaceholder"),className:"w-full rounded-lg border border-gray-200 bg-gray-50 py-1.5 pl-8 pr-3 text-xs text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:placeholder:text-gray-500"})]})}),d.jsx("div",{className:"flex-1 overflow-auto px-2 pb-2",children:x.length===0?d.jsx("div",{className:"flex flex-col items-center py-8 text-center",children:d.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:e("agents.noAgents")})}):d.jsx("div",{className:"space-y-1",children:x.map(y=>d.jsx(eR,{agent:y,isSelected:l===y.id,isDefault:y.id===o,onSelect:()=>f(y.id)},y.id))})})]})}function nR({agent:e}){var f,g,h;const{t:n}=oe("console"),a=qa(x=>x.defaultAgentId),l=((f=e.identity)==null?void 0:f.name)??e.name??e.id,s=(g=e.identity)==null?void 0:g.emoji,o=(h=e.identity)==null?void 0:h.avatarUrl,c=e.id===a;return d.jsxs("div",{className:"flex items-start gap-4 rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-700 dark:bg-gray-900",children:[d.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-xl bg-gray-100 text-2xl dark:bg-gray-800",children:o?d.jsx("img",{src:o,alt:l,className:"h-14 w-14 rounded-xl object-cover"}):d.jsx("span",{children:s??l.charAt(0).toLowerCase()})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("div",{className:"flex items-center gap-2",children:d.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-gray-100",children:l})}),d.jsx("p",{className:"mt-0.5 text-sm text-gray-500 dark:text-gray-400",children:n("agents.detailDescription",{id:e.id})})]}),d.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[d.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:e.id}),c&&d.jsx("span",{className:"rounded-md bg-gray-200 px-2 py-0.5 text-xs font-semibold uppercase text-gray-600 dark:bg-gray-700 dark:text-gray-300",children:n("agents.defaultBadge")})]})]})}function aR({agent:e}){var L;const{t:n}=oe("console"),{defaultAgentId:a,updateAgentModel:l,setDeleteDialogOpen:s,systemModels:o,fetchSystemModels:c,agentModelConfigs:f}=qa(),g=e.id===a,h=f[e.id],[x,y]=C.useState((h==null?void 0:h.primary)??""),[b,v]=C.useState((h==null?void 0:h.fallbacks)??[]),[S,N]=C.useState(!1),[E,j]=C.useState("idle");C.useEffect(()=>{o.length===0&&c()},[o.length,c]),C.useEffect(()=>{const V=f[e.id];y((V==null?void 0:V.primary)??""),v((V==null?void 0:V.fallbacks)??[]),j("idle")},[e.id,f]);const z=async()=>{N(!0),j("idle");const V=b.filter(R=>R.length>0),ee=V.length>0?{primary:x||void 0,fallbacks:V}:x||"",G=await l(e.id,ee);N(!1),j(G?"success":"error"),G&&(await c(),setTimeout(()=>j("idle"),2e3))},T=()=>v([...b,""]),P=V=>v(b.filter((ee,G)=>G!==V)),H=(V,ee)=>{const G=[...b];G[V]=ee,v(G)};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-semibold text-gray-900 dark:text-gray-100",children:n("agents.overview.title")}),d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(Nf,{label:n("agents.overview.agentId"),value:e.id,mono:!0}),d.jsx(Nf,{label:n("agents.overview.name"),value:((L=e.identity)==null?void 0:L.name)??e.name??e.id}),d.jsx(Nf,{label:n("agents.overview.isDefault"),value:n(g?"agents.overview.yes":"agents.overview.no")})]})]}),d.jsxs("div",{className:"border-t border-gray-200 pt-5 dark:border-gray-700",children:[d.jsx("h3",{className:"mb-3 text-sm font-semibold text-gray-900 dark:text-gray-100",children:n("agents.overview.modelConfig")}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-600 dark:text-gray-400",children:n("agents.overview.primaryModel")}),d.jsx(Yx,{value:x,onChange:y,models:o,placeholder:n("agents.overview.primaryModelPlaceholder")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-600 dark:text-gray-400",children:n("agents.overview.fallbackModels")}),b.map((V,ee)=>d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(Yx,{value:V,onChange:G=>H(ee,G),models:o,placeholder:n("agents.overview.fallbackPlaceholder")}),d.jsx("button",{onClick:()=>P(ee),className:"shrink-0 rounded-md p-1.5 text-gray-400 hover:bg-gray-100 hover:text-red-500 dark:hover:bg-gray-800",children:d.jsx(Ua,{className:"h-4 w-4"})})]},ee)),d.jsxs("button",{onClick:T,className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-700 dark:text-blue-400",children:[d.jsx(fr,{className:"h-3 w-3"}),n("agents.overview.addFallback")]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:z,disabled:S,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:n(S?"agents.overview.saving":"agents.overview.save")}),E==="success"&&d.jsx("span",{className:"text-xs text-green-600",children:n("agents.overview.saveSuccess")}),E==="error"&&d.jsx("span",{className:"text-xs text-red-600",children:n("agents.overview.saveError")})]})]})]}),d.jsxs("div",{className:"border-t border-gray-200 pt-5 dark:border-gray-700",children:[d.jsxs("button",{onClick:()=>s(!0),disabled:g,className:"flex items-center gap-2 rounded-lg border border-red-200 px-4 py-2 text-sm font-medium text-red-600 transition-colors hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-red-800 dark:text-red-400 dark:hover:bg-red-900/20",title:g?n("agents.overview.cannotDeleteDefault"):void 0,children:[d.jsx(Yi,{className:"h-4 w-4"}),n("agents.overview.deleteAgent")]}),g&&d.jsx("p",{className:"mt-1 text-xs text-gray-400",children:n("agents.overview.cannotDeleteDefault")})]})]})}function Nf({label:e,value:n,mono:a}){return d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium text-gray-500 dark:text-gray-400",children:e}),d.jsx("dd",{className:`mt-0.5 text-sm text-gray-900 dark:text-gray-100 ${a?"font-mono":""}`,children:n})]})}function Yx({value:e,onChange:n,models:a,placeholder:l}){const s=[...new Set(a.map(c=>c.provider))],o=a.some(c=>c.id===e);return d.jsxs("div",{className:"relative w-full",children:[d.jsxs("select",{value:o?e:"",onChange:c=>n(c.target.value),className:"w-full appearance-none rounded-lg border border-gray-300 bg-white px-3 py-2 pr-8 text-sm text-gray-900 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200",children:[d.jsx("option",{value:"",children:l}),!o&&e&&d.jsx("option",{value:e,children:e}),s.map(c=>d.jsx("optgroup",{label:c,children:a.filter(f=>f.provider===c).map(f=>d.jsxs("option",{value:f.id,children:[f.label," (",f.id,")"]},f.id))},c))]}),d.jsx(sa,{className:"pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"})]})}function rR(e){return e<1024?`${e} B`:`${(e/1024).toFixed(1)} KB`}function lR(e,n){const a=typeof e=="number"?e:new Date(e).getTime();if(Number.isNaN(a)||a===0)return"—";const l=Date.now()-a;if(l<0)return n("agents.files.justNow");const s=Math.floor(l/36e5);if(s<1)return n("agents.files.justNow");if(s<24)return n("agents.files.hoursAgo",{count:s});const o=Math.floor(s/24);return n("agents.files.daysAgo",{count:o})}function iR({agent:e}){const{t:n}=oe("console"),{files:a,filesLoading:l,selectedFileName:s,fileContent:o,isFileDirty:c,fileSaving:f,fetchFiles:g,fetchFileContent:h,setFileContent:x,resetFileContent:y,saveFileContent:b}=qa();C.useEffect(()=>{g(e.id)},[e.id,g]);const v=a.find(N=>N.name===s),S=async()=>{s&&o!=null&&await b(e.id,s,o)};return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:n("agents.files.title")}),d.jsx("p",{className:"mt-0.5 text-xs text-gray-500 dark:text-gray-400",children:n("agents.files.description")})]}),d.jsx("button",{onClick:()=>g(e.id),disabled:l,className:"rounded-md p-1.5 text-gray-500 transition-colors hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800",children:d.jsx(hr,{className:`h-4 w-4 ${l?"animate-spin":""}`})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx("div",{className:"w-56 shrink-0 space-y-2",children:a.map(N=>d.jsxs("button",{onClick:()=>h(e.id,N.name),className:`w-full rounded-xl border px-3 py-2.5 text-left transition-colors ${s===N.name?"border-red-400 bg-red-50 dark:border-red-600 dark:bg-red-900/20":"border-gray-200 hover:border-gray-300 hover:bg-gray-50 dark:border-gray-700 dark:hover:border-gray-600 dark:hover:bg-gray-800"}`,children:[d.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:N.name}),d.jsxs("p",{className:"mt-0.5 text-xs text-gray-500 dark:text-gray-400",children:[rR(N.size)," · ",lR(N.modifiedAt,n)]})]},N.name))}),d.jsx("div",{className:"min-w-0 flex-1",children:v&&o!=null?d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("div",{children:d.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:v.name})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:y,disabled:!c,className:"rounded-md border border-gray-300 px-3 py-1.5 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-800",children:n("agents.files.reset")}),d.jsx("button",{onClick:S,disabled:!c||f,className:"rounded-md bg-red-500 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-red-600 disabled:opacity-50",children:n(f?"agents.files.saving":"agents.files.save")})]})]}),d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium text-gray-500 dark:text-gray-400",children:n("agents.files.content")}),d.jsx("textarea",{value:o,onChange:N=>x(N.target.value),className:"h-80 w-full resize-y rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-900 focus:border-blue-500 focus:outline-none dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200"})]})]}):d.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-gray-400 dark:text-gray-500",children:n("agents.files.selectFile")})})]})]})}function sR(){const{t:e}=oe("console");return d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.tools.title")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("agents.tools.noConfig")})]})}function oR(){const{t:e}=oe("console");return d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.skills.title")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("agents.skills.defaultConfig")})]})}function uR(){const{t:e}=oe("console");return d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.channels.title")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("agents.channels.noBindings")})]})}function cR(){const{t:e}=oe("console");return d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:e("agents.cronJobs.title")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("agents.cronJobs.noCronJobs")})]})}const dR=["overview","files","tools","skills","channels","cronJobs"];function fR({agent:e}){const{t:n}=oe("console"),{activeTab:a,setActiveTab:l}=qa();return d.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[d.jsx("div",{className:"flex border-b border-gray-200 px-4 dark:border-gray-700",children:dR.map(s=>d.jsxs("button",{onClick:()=>l(s),className:`relative px-4 py-3 text-sm font-medium transition-colors ${a===s?"text-red-600 dark:text-red-400":"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"}`,children:[n(`agents.tabs.${s}`),a===s&&d.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 rounded-full bg-red-500"})]},s))}),d.jsxs("div",{className:"p-5",children:[a==="overview"&&d.jsx(aR,{agent:e},e.id),a==="files"&&d.jsx(iR,{agent:e},e.id),a==="tools"&&d.jsx(sR,{}),a==="skills"&&d.jsx(oR,{}),a==="channels"&&d.jsx(uR,{}),a==="cronJobs"&&d.jsx(cR,{})]})]})}function hR(){const{t:e}=oe("console"),{createDialogOpen:n,setCreateDialogOpen:a,createAgent:l,selectAgent:s}=qa(),[o,c]=C.useState(""),[f,g]=C.useState(""),[h,x]=C.useState(""),[y,b]=C.useState(!1),[v,S]=C.useState("");if(!n)return null;const N=()=>{a(!1),c(""),g(""),x(""),S("")},E=async()=>{if(!o.trim()){S(e("agents.createDialog.nameRequired"));return}const j=f.trim()||`~/.openclaw/workspace-${o.trim().toLowerCase().replace(/\s+/g,"-")}`;b(!0),S("");const z=await l({name:o.trim(),workspace:j,emoji:h.trim()||void 0});b(!1),z?(s(z),N()):S(e("agents.overview.saveError"))};return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:d.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-gray-200 bg-white p-6 shadow-xl dark:border-gray-700 dark:bg-gray-900",children:[d.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e("agents.createDialog.title")}),d.jsx("button",{onClick:N,className:"rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-800",children:d.jsx(Ua,{className:"h-5 w-5"})})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:[e("agents.createDialog.name")," *"]}),d.jsx("input",{type:"text",value:o,onChange:j=>c(j.target.value),placeholder:e("agents.createDialog.namePlaceholder"),className:"w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200",autoFocus:!0})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:e("agents.createDialog.workspace")}),d.jsx("input",{type:"text",value:f,onChange:j=>g(j.target.value),placeholder:e("agents.createDialog.workspacePlaceholder"),className:"w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300",children:e("agents.createDialog.emoji")}),d.jsx("input",{type:"text",value:h,onChange:j=>x(j.target.value),placeholder:e("agents.createDialog.emojiPlaceholder"),className:"w-24 rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200"})]}),v&&d.jsx("p",{className:"text-sm text-red-600",children:v}),d.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[d.jsx("button",{onClick:N,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",children:e("agents.createDialog.cancel")}),d.jsx("button",{onClick:E,disabled:y,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:e(y?"agents.createDialog.creating":"agents.createDialog.create")})]})]})]})})}function gR(){var S;const{t:e}=oe("console"),{deleteDialogOpen:n,setDeleteDialogOpen:a,selectedAgentId:l,agents:s,deleteAgent:o}=qa(),[c,f]=C.useState(!1),[g,h]=C.useState(!1),x=s.find(N=>N.id===l);if(!n||!x)return null;const y=((S=x.identity)==null?void 0:S.name)??x.name??x.id,b=()=>{a(!1),f(!1)},v=async()=>{h(!0),await o(x.id,c),h(!1),b()};return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:d.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-gray-200 bg-white p-6 shadow-xl dark:border-gray-700 dark:bg-gray-900",children:[d.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(lu,{className:"h-5 w-5 text-red-500"}),d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e("agents.deleteDialog.title")})]}),d.jsx("button",{onClick:b,className:"rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-800",children:d.jsx(Ua,{className:"h-5 w-5"})})]}),d.jsx("p",{className:"mb-4 text-sm text-gray-600 dark:text-gray-400",children:e("agents.deleteDialog.confirm",{name:y})}),d.jsxs("label",{className:"mb-4 flex items-center gap-2 text-sm text-gray-700 dark:text-gray-300",children:[d.jsx("input",{type:"checkbox",checked:c,onChange:N=>f(N.target.checked),className:"rounded border-gray-300 text-red-600 focus:ring-red-500"}),e("agents.deleteDialog.deleteFiles")]}),d.jsxs("div",{className:"flex justify-end gap-3",children:[d.jsx("button",{onClick:b,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",children:e("agents.deleteDialog.cancel")}),d.jsx("button",{onClick:v,disabled:g,className:"rounded-lg bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700 disabled:opacity-50",children:e(g?"agents.deleteDialog.deleting":"agents.deleteDialog.delete")})]})]})})}function pR(){const{t:e}=oe("console"),{selectedAgentId:n,agents:a,fetchAgents:l}=qa(),s=a.find(o=>o.id===n)??null;return C.useEffect(()=>{l()},[l]),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e("agents.title")}),d.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:e("agents.description")})]}),d.jsxs("div",{className:"flex gap-6",children:[d.jsx(tR,{}),d.jsx("div",{className:"min-w-0 flex-1",children:s?d.jsxs("div",{className:"space-y-4",children:[d.jsx(nR,{agent:s}),d.jsx(fR,{agent:s})]}):d.jsxs("div",{className:"flex h-96 flex-col items-center justify-center rounded-2xl border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[d.jsx(Eb,{className:"mb-3 h-12 w-12 text-gray-300 dark:text-gray-600"}),d.jsx("p",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:e("agents.selectAgent")}),d.jsx("p",{className:"mt-1 text-xs text-gray-400 dark:text-gray-500",children:e("agents.selectAgentDesc")})]})})]}),d.jsx(hR,{}),d.jsx(gR,{})]})}const mR=1e4;class zo extends Error{constructor(n,a){super(a),this.code=n,this.name="RpcError"}}class sv{constructor(n){this.wsClient=n}request(n,a={},l=mR){return new Promise((s,o)=>{if(!this.wsClient.isConnected()){o(new zo("NOT_CONNECTED","WebSocket is not connected"));return}const c=crypto.randomUUID();let f=null;const g=()=>{f&&(clearTimeout(f),f=null)};this.wsClient.onResponse(c,h=>{g(),h.ok?s(h.payload):o(new zo(h.error.code,h.error.message))}),f=setTimeout(()=>{o(new zo("TIMEOUT",`RPC request timed out: ${n}`))},l),this.wsClient.send({type:"req",id:c,method:n,params:a})})}}const yR=Object.freeze(Object.defineProperty({__proto__:null,GatewayRpcClient:sv,RpcError:zo},Symbol.toStringTag,{value:"Module"})),xR=20,bR=1e3,vR=3e4,kR=1e3;class ov{constructor(){vt(this,"ws",null);vt(this,"url","");vt(this,"token","");vt(this,"status","disconnected");vt(this,"reconnectAttempt",0);vt(this,"reconnectTimer",null);vt(this,"shutdownReceived",!1);vt(this,"eventHandlers",new Map);vt(this,"statusHandlers",new Set);vt(this,"responseHandlers",new Map);vt(this,"snapshot",null);vt(this,"serverInfo",null);vt(this,"handleClose",()=>{})}getStatus(){return this.status}getSnapshot(){return this.snapshot}getServerInfo(){return this.serverInfo}isConnected(){var n;return this.status==="connected"&&((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN}connect(n,a){this.url=n,this.token=a,this.shutdownReceived=!1,this.reconnectAttempt=0,this.doConnect()}disconnect(){this.shutdownReceived=!0,this.clearReconnectTimer(),this.ws&&(this.ws.removeEventListener("close",this.handleClose),this.ws.close(),this.ws=null),this.setStatus("disconnected")}onEvent(n,a){let l=this.eventHandlers.get(n);return l||(l=new Set,this.eventHandlers.set(n,l)),l.add(a),()=>l.delete(a)}onStatusChange(n){return this.statusHandlers.add(n),()=>this.statusHandlers.delete(n)}onResponse(n,a){this.responseHandlers.set(n,a)}send(n){var a;((a=this.ws)==null?void 0:a.readyState)===WebSocket.OPEN&&this.ws.send(JSON.stringify(n))}doConnect(){this.setStatus(this.reconnectAttempt>0?"reconnecting":"connecting");try{this.ws=new WebSocket(this.url)}catch{this.scheduleReconnect();return}this.handleClose=()=>{this.shutdownReceived||this.scheduleReconnect()},this.ws.addEventListener("open",()=>{}),this.ws.addEventListener("message",n=>{this.handleMessage(n)}),this.ws.addEventListener("close",this.handleClose),this.ws.addEventListener("error",()=>{})}handleMessage(n){let a;try{a=JSON.parse(n.data)}catch{return}if(a.type==="event"){const l=a;this.handleEvent(l)}else if(a.type==="res"){const l=a;this.handleResponse(l)}}handleEvent(n){if(n.event==="connect.challenge"){this.sendConnect();return}n.event==="shutdown"&&(this.shutdownReceived=!0,this.clearReconnectTimer(),this.setStatus("disconnected"));const a=this.eventHandlers.get(n.event);if(a)for(const s of a)s(n);const l=this.eventHandlers.get("*");if(l)for(const s of l)s(n)}handleResponse(n){var l;const a=this.responseHandlers.get(n.id);if(a){this.responseHandlers.delete(n.id),a(n);return}n.ok&&((l=n.payload)==null?void 0:l.type)==="hello-ok"?this.handleConnectSuccess(n.payload):n.ok||this.setStatus("error",n.error.message)}sendConnect(){const n={minProtocol:1,maxProtocol:3,client:{id:"openclaw-control-ui",version:"0.1.0",platform:"web",mode:"ui"},caps:["tool-events"],scopes:["operator.admin"]};this.token&&(n.auth={token:this.token}),this.send({type:"req",id:crypto.randomUUID(),method:"connect",params:n})}handleConnectSuccess(n){this.snapshot=n.snapshot??null,this.serverInfo=n.server??null,this.reconnectAttempt=0,this.setStatus("connected")}scheduleReconnect(){if(this.shutdownReceived)return;if(this.reconnectAttempt>=xR){this.setStatus("disconnected");return}this.setStatus("reconnecting");const n=Math.min(bR*Math.pow(2,this.reconnectAttempt),vR)+Math.random()*kR;this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.doConnect()},n)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}setStatus(n,a){this.status=n;for(const l of this.statusHandlers)l(n,a)}}const SR=Object.freeze(Object.defineProperty({__proto__:null,GatewayWsClient:ov},Symbol.toStringTag,{value:"Module"})),wR=500,Gx=200;function jR(e){if(e.stream==="error")return!0;if(e.stream==="lifecycle"){const n=e.data.phase;return n==="start"||n==="end"}return!1}class NR{constructor(){vt(this,"queue",[]);vt(this,"rafId",null);vt(this,"handler",null);vt(this,"immediateHandler",null)}onBatch(n){this.handler=n}onImmediate(n){this.immediateHandler=n}push(n){var a;if(jR(n)){(a=this.immediateHandler)==null||a.call(this,n);return}this.queue.push(n),this.queue.length>wR&&(console.warn(`[EventThrottle] Queue overflow: ${this.queue.length} events, trimming to ${Gx}`),this.queue=this.queue.slice(-Gx)),this.scheduleFlush()}scheduleFlush(){this.rafId===null&&(this.rafId=requestAnimationFrame(()=>{this.flush()}))}flush(){var a;if(this.rafId=null,this.queue.length===0)return;const n=this.queue;this.queue=[],(a=this.handler)==null||a.call(this,n)}destroy(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.queue=[]}}const CR=3e3;function ER(e,n){const a=new Set(e.map(c=>c.sessionKey)),l=new Set(n.map(c=>c.sessionKey)),s=n.filter(c=>!a.has(c.sessionKey)),o=e.filter(c=>!l.has(c.sessionKey));return{added:s,removed:o}}function AR(e){return e.filter(n=>n.requesterSessionKey).map(n=>({sessionKey:n.sessionKey,agentId:n.agentId,label:n.label??n.agentId,task:n.task??"",requesterSessionKey:n.requesterSessionKey,startedAt:n.startedAt??Date.now()}))}function TR(e){const n=C.useRef(null),a=he(h=>h.connectionStatus),l=he(h=>h.lastSessionsSnapshot),s=he(h=>h.setSessionsSnapshot),o=he(h=>h.addSubAgent),c=he(h=>h.agents),f=he(h=>h.removeSubAgent);C.useEffect(()=>{if(a!=="connected"||!e.current){n.current&&(clearInterval(n.current),n.current=null);return}const h=async()=>{const x=e.current;if(x)try{const y=await x.request("sessions.list"),b=AR(y.sessions??[]),v=(l==null?void 0:l.sessions)??[],{added:S,removed:N}=ER(v,b);for(const E of S){const j=g(E.requesterSessionKey);j&&o(j,E)}for(const E of N)c.has(E.agentId)&&f(E.agentId);s({sessions:b,fetchedAt:Date.now()})}catch{}};return n.current=setInterval(h,CR),h(),()=>{n.current&&(clearInterval(n.current),n.current=null)}},[a]);function g(h){const y=he.getState().sessionKeyMap.get(h);if(y&&y.length>0)return y[0];for(const[b,v]of he.getState().agents)if(!v.isSubAgent)return b;return null}}const _R=6e4,MR=3;function DR(e){const n=C.useRef(null),a=C.useRef(0),l=he(c=>c.connectionStatus),s=he(c=>c.pushTokenSnapshot),o=he(c=>c.setAgentCosts);C.useEffect(()=>{if(l!=="connected"||!e.current){n.current&&(clearInterval(n.current),n.current=null);return}const c=async()=>{const f=e.current;if(f)try{const[g,h]=await Promise.all([f.request("usage.status"),f.request("usage.cost").catch(()=>null)]);a.current=0;const x=Date.now(),y=typeof(g==null?void 0:g.total)=="number"?g.total:RR((g==null?void 0:g.byAgent)??{}),b=(g==null?void 0:g.byAgent)??{};s({timestamp:x,total:y,byAgent:b});const v=(h==null?void 0:h.byAgent)??(h==null?void 0:h.costs)??{};Object.keys(v).length>0&&o(v)}catch{if(a.current+=1,a.current>=MR){const g=he.getState().eventHistory,h=OR(g);h&&s(h)}}};return n.current=setInterval(c,_R),c(),()=>{n.current&&(clearInterval(n.current),n.current=null)}},[l,s,o])}function RR(e){let n=0;for(const a of Object.values(e))typeof a=="number"&&(n+=a);return n}function OR(e){const n={};let a=0;for(const l of e){if(l.stream!=="tool")continue;const s=100;n[l.agentId]=(n[l.agentId]??0)+s,a+=s}return a===0?null:{timestamp:Date.now(),total:a,byAgent:n}}function zR({url:e,token:n}){const a=C.useRef(null),l=C.useRef(null),s=C.useRef(null),o=he(h=>h.setConnectionStatus),c=he(h=>h.initAgents),f=he(h=>h.processAgentEvent),g=he(h=>h.setOperatorScopes);return C.useEffect(()=>{const h=new ov,x=new sv(h),y=new NR;return a.current=h,l.current=x,s.current=y,y.onBatch(b=>{for(const v of b)f(v)}),y.onImmediate(b=>{f(b)}),h.onStatusChange((b,v)=>{if(o(b,v),b==="connected"){LR(h,c);const S=h.getSnapshot(),N=S==null?void 0:S.scopes;g(Array.isArray(N)?N:["operator"]),_4("ws",{wsClient:h,rpcClient:x})}}),h.onEvent("agent",b=>{y.push(b.payload)}),h.onEvent("health",b=>{const v=b.payload;if(v!=null&&v.agents){const S=uv(v);c(S)}}),h.connect(e,n),()=>{y.destroy(),h.disconnect(),a.current=null,l.current=null,s.current=null}},[e,n,o,c,f,g]),TR(l),DR(l),{wsClient:a,rpcClient:l}}function uv(e){return e.agents?e.agents.map(n=>({id:n.agentId,name:n.agentId})):[]}function LR(e,n){const a=e.getSnapshot(),l=a==null?void 0:a.health;l!=null&&l.agents&&n(uv(l))}function UR(){const[e,n]=C.useState(()=>Qx());return C.useEffect(()=>{const a=matchMedia("(max-width: 767px)"),l=matchMedia("(min-width: 768px) and (max-width: 1023px)");function s(){n(Qx())}return a.addEventListener("change",s),l.addEventListener("change",s),()=>{a.removeEventListener("change",s),l.removeEventListener("change",s)}},[]),e}function Qx(){if(typeof window>"u")return{isMobile:!1,isTablet:!1,isDesktop:!0};const e=window.innerWidth;return{isMobile:e<768,isTablet:e>=768&&e<1024,isDesktop:e>=1024}}const HR=C.lazy(()=>Ha(()=>import("./Scene3D-Ds6Ko60O.js"),[]));function BR(){const{t:e}=oe("office");return d.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-950",children:d.jsxs("div",{className:"flex flex-col items-center gap-3",children:[d.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"}),d.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("loading3D")})]})})}function qR(){const e=he(o=>o.viewMode),[n,a]=C.useState(!1),[l,s]=C.useState(e);return C.useEffect(()=>{if(e!==l){a(!0);const o=setTimeout(()=>{s(e),a(!1)},150);return()=>clearTimeout(o)}},[e,l]),d.jsx("div",{className:"h-full w-full transition-opacity duration-300",style:{opacity:n?0:1},children:l==="2d"?d.jsx(RM,{}):d.jsx(C.Suspense,{fallback:d.jsx(BR,{}),children:d.jsx(HR,{})})})}function IR(){const e=he(n=>n.theme);return C.useEffect(()=>{document.documentElement.setAttribute("data-theme",e),e==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[e]),null}const $R={"/":"office","/dashboard":"dashboard","/agents":"agents","/channels":"channels","/skills":"skills","/cron":"cron","/settings":"settings"};function FR(){const e=Cn(),n=he(a=>a.setCurrentPage);return C.useEffect(()=>{const a=$R[e.pathname]??"office";n(a)},[e.pathname,n]),null}function KR(){const e=window.__OPENCLAW_CONFIG__,n=(e==null?void 0:e.gatewayUrl)||"ws://localhost:18789",a=(e==null?void 0:e.gatewayToken)||"mvAc4W5TsoF71Fi8gIH9_tP58jn72acLsf1BYOiuem4",{isMobile:l}=UR(),s=he(c=>c.setViewMode),{wsClient:o}=zR({url:n,token:a});return C.useEffect(()=>{l&&s("2d")},[l,s]),d.jsxs(d.Fragment,{children:[d.jsx(IR,{}),d.jsx(FR,{}),d.jsxs(zw,{children:[d.jsx(wn,{element:d.jsx(vM,{wsClient:o,isMobile:l}),children:d.jsx(wn,{path:"/",element:d.jsx(qR,{})})}),d.jsxs(wn,{element:d.jsx(kM,{}),children:[d.jsx(wn,{path:"/dashboard",element:d.jsx(XM,{})}),d.jsx(wn,{path:"/agents",element:d.jsx(pR,{})}),d.jsx(wn,{path:"/channels",element:d.jsx(lD,{})}),d.jsx(wn,{path:"/skills",element:d.jsx(yD,{})}),d.jsx(wn,{path:"/cron",element:d.jsx(ED,{})}),d.jsx(wn,{path:"/settings",element:d.jsx(WD,{})})]}),d.jsx(wn,{path:"*",element:d.jsx(Rw,{to:"/",replace:!0})})]})]})}zS.createRoot(document.getElementById("root")).render(d.jsx(C.StrictMode,{children:d.jsx(l2,{children:d.jsx(KR,{})})}));export{Ah as M,hl as P,Qi as S,gt as Z,Rf as _,J2 as a,_S as b,E4 as c,C as d,sr as e,zS as f,Zf as g,he as h,GR as i,d as j,VR as k,YR as p,Qo as r,oe as u};
|