@wrongstack/webui 0.1.8 → 0.1.10

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.
@@ -0,0 +1,609 @@
1
+ var LS=Object.defineProperty;var US=(t,r,l)=>r in t?LS(t,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[r]=l;var en=(t,r,l)=>US(t,typeof r!="symbol"?r+"":r,l);function BS(t,r){for(var l=0;l<r.length;l++){const i=r[l];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in t)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(t,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function l(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=l(s);fetch(s.href,u)}})();function Ri(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jc={exports:{}},mi={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Yg;function HS(){if(Yg)return mi;Yg=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(i,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:t,type:i,key:c,ref:s!==void 0?s:null,props:u}}return mi.Fragment=r,mi.jsx=l,mi.jsxs=l,mi}var Gg;function qS(){return Gg||(Gg=1,Jc.exports=HS()),Jc.exports}var h=qS(),Wc={exports:{}},Me={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Pg;function IS(){if(Pg)return Me;Pg=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function S(A){return A===null||typeof A!="object"?null:(A=b&&A[b]||A["@@iterator"],typeof A=="function"?A:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,T={};function j(A,L,E){this.props=A,this.context=L,this.refs=T,this.updater=E||k}j.prototype.isReactComponent={},j.prototype.setState=function(A,L){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,L,"setState")},j.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function M(){}M.prototype=j.prototype;function z(A,L,E){this.props=A,this.context=L,this.refs=T,this.updater=E||k}var F=z.prototype=new M;F.constructor=z,N(F,j.prototype),F.isPureReactComponent=!0;var P=Array.isArray;function U(){}var G={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function se(A,L,E){var O=E.ref;return{$$typeof:t,type:A,key:L,ref:O!==void 0?O:null,props:E}}function B(A,L){return se(A.type,L,A.props)}function X(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function Q(A){var L={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(E){return L[E]})}var de=/\/+/g;function oe(A,L){return typeof A=="object"&&A!==null&&A.key!=null?Q(""+A.key):L.toString(36)}function q(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(U,U):(A.status="pending",A.then(function(L){A.status==="pending"&&(A.status="fulfilled",A.value=L)},function(L){A.status==="pending"&&(A.status="rejected",A.reason=L)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function H(A,L,E,O,ee){var ne=typeof A;(ne==="undefined"||ne==="boolean")&&(A=null);var J=!1;if(A===null)J=!0;else switch(ne){case"bigint":case"string":case"number":J=!0;break;case"object":switch(A.$$typeof){case t:case r:J=!0;break;case x:return J=A._init,H(J(A._payload),L,E,O,ee)}}if(J)return ee=ee(A),J=O===""?"."+oe(A,0):O,P(ee)?(E="",J!=null&&(E=J.replace(de,"$&/")+"/"),H(ee,L,E,"",function(Ae){return Ae})):ee!=null&&(X(ee)&&(ee=B(ee,E+(ee.key==null||A&&A.key===ee.key?"":(""+ee.key).replace(de,"$&/")+"/")+J)),L.push(ee)),1;J=0;var ye=O===""?".":O+":";if(P(A))for(var ke=0;ke<A.length;ke++)O=A[ke],ne=ye+oe(O,ke),J+=H(O,L,E,ne,ee);else if(ke=S(A),typeof ke=="function")for(A=ke.call(A),ke=0;!(O=A.next()).done;)O=O.value,ne=ye+oe(O,ke++),J+=H(O,L,E,ne,ee);else if(ne==="object"){if(typeof A.then=="function")return H(q(A),L,E,O,ee);throw L=String(A),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return J}function te(A,L,E){if(A==null)return A;var O=[],ee=0;return H(A,O,"","",function(ne){return L.call(E,ne,ee++)}),O}function ae(A){if(A._status===-1){var L=A._result;L=L(),L.then(function(E){(A._status===0||A._status===-1)&&(A._status=1,A._result=E)},function(E){(A._status===0||A._status===-1)&&(A._status=2,A._result=E)}),A._status===-1&&(A._status=0,A._result=L)}if(A._status===1)return A._result.default;throw A._result}var Se=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},D={map:te,forEach:function(A,L,E){te(A,function(){L.apply(this,arguments)},E)},count:function(A){var L=0;return te(A,function(){L++}),L},toArray:function(A){return te(A,function(L){return L})||[]},only:function(A){if(!X(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Me.Activity=y,Me.Children=D,Me.Component=j,Me.Fragment=l,Me.Profiler=s,Me.PureComponent=z,Me.StrictMode=i,Me.Suspense=p,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Me.__COMPILER_RUNTIME={__proto__:null,c:function(A){return G.H.useMemoCache(A)}},Me.cache=function(A){return function(){return A.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(A,L,E){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var O=N({},A.props),ee=A.key;if(L!=null)for(ne in L.key!==void 0&&(ee=""+L.key),L)!le.call(L,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&L.ref===void 0||(O[ne]=L[ne]);var ne=arguments.length-2;if(ne===1)O.children=E;else if(1<ne){for(var J=Array(ne),ye=0;ye<ne;ye++)J[ye]=arguments[ye+2];O.children=J}return se(A.type,ee,O)},Me.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:u,_context:A},A},Me.createElement=function(A,L,E){var O,ee={},ne=null;if(L!=null)for(O in L.key!==void 0&&(ne=""+L.key),L)le.call(L,O)&&O!=="key"&&O!=="__self"&&O!=="__source"&&(ee[O]=L[O]);var J=arguments.length-2;if(J===1)ee.children=E;else if(1<J){for(var ye=Array(J),ke=0;ke<J;ke++)ye[ke]=arguments[ke+2];ee.children=ye}if(A&&A.defaultProps)for(O in J=A.defaultProps,J)ee[O]===void 0&&(ee[O]=J[O]);return se(A,ne,ee)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(A){return{$$typeof:d,render:A}},Me.isValidElement=X,Me.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:ae}},Me.memo=function(A,L){return{$$typeof:m,type:A,compare:L===void 0?null:L}},Me.startTransition=function(A){var L=G.T,E={};G.T=E;try{var O=A(),ee=G.S;ee!==null&&ee(E,O),typeof O=="object"&&O!==null&&typeof O.then=="function"&&O.then(U,Se)}catch(ne){Se(ne)}finally{L!==null&&E.types!==null&&(L.types=E.types),G.T=L}},Me.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Me.use=function(A){return G.H.use(A)},Me.useActionState=function(A,L,E){return G.H.useActionState(A,L,E)},Me.useCallback=function(A,L){return G.H.useCallback(A,L)},Me.useContext=function(A){return G.H.useContext(A)},Me.useDebugValue=function(){},Me.useDeferredValue=function(A,L){return G.H.useDeferredValue(A,L)},Me.useEffect=function(A,L){return G.H.useEffect(A,L)},Me.useEffectEvent=function(A){return G.H.useEffectEvent(A)},Me.useId=function(){return G.H.useId()},Me.useImperativeHandle=function(A,L,E){return G.H.useImperativeHandle(A,L,E)},Me.useInsertionEffect=function(A,L){return G.H.useInsertionEffect(A,L)},Me.useLayoutEffect=function(A,L){return G.H.useLayoutEffect(A,L)},Me.useMemo=function(A,L){return G.H.useMemo(A,L)},Me.useOptimistic=function(A,L){return G.H.useOptimistic(A,L)},Me.useReducer=function(A,L,E){return G.H.useReducer(A,L,E)},Me.useRef=function(A){return G.H.useRef(A)},Me.useState=function(A){return G.H.useState(A)},Me.useSyncExternalStore=function(A,L,E){return G.H.useSyncExternalStore(A,L,E)},Me.useTransition=function(){return G.H.useTransition()},Me.version="19.2.6",Me}var Xg;function id(){return Xg||(Xg=1,Wc.exports=IS()),Wc.exports}var w=id();const dn=Ri(w),od=BS({__proto__:null,default:dn},[w]);var ef={exports:{}},pi={},tf={exports:{}},nf={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Qg;function VS(){return Qg||(Qg=1,(function(t){function r(H,te){var ae=H.length;H.push(te);e:for(;0<ae;){var Se=ae-1>>>1,D=H[Se];if(0<s(D,te))H[Se]=te,H[ae]=D,ae=Se;else break e}}function l(H){return H.length===0?null:H[0]}function i(H){if(H.length===0)return null;var te=H[0],ae=H.pop();if(ae!==te){H[0]=ae;e:for(var Se=0,D=H.length,A=D>>>1;Se<A;){var L=2*(Se+1)-1,E=H[L],O=L+1,ee=H[O];if(0>s(E,ae))O<D&&0>s(ee,E)?(H[Se]=ee,H[O]=ae,Se=O):(H[Se]=E,H[L]=ae,Se=L);else if(O<D&&0>s(ee,ae))H[Se]=ee,H[O]=ae,Se=O;else break e}}return te}function s(H,te){var ae=H.sortIndex-te.sortIndex;return ae!==0?ae:H.id-te.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var p=[],m=[],x=1,y=null,b=3,S=!1,k=!1,N=!1,T=!1,j=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function F(H){for(var te=l(m);te!==null;){if(te.callback===null)i(m);else if(te.startTime<=H)i(m),te.sortIndex=te.expirationTime,r(p,te);else break;te=l(m)}}function P(H){if(N=!1,F(H),!k)if(l(p)!==null)k=!0,U||(U=!0,Q());else{var te=l(m);te!==null&&q(P,te.startTime-H)}}var U=!1,G=-1,le=5,se=-1;function B(){return T?!0:!(t.unstable_now()-se<le)}function X(){if(T=!1,U){var H=t.unstable_now();se=H;var te=!0;try{e:{k=!1,N&&(N=!1,M(G),G=-1),S=!0;var ae=b;try{t:{for(F(H),y=l(p);y!==null&&!(y.expirationTime>H&&B());){var Se=y.callback;if(typeof Se=="function"){y.callback=null,b=y.priorityLevel;var D=Se(y.expirationTime<=H);if(H=t.unstable_now(),typeof D=="function"){y.callback=D,F(H),te=!0;break t}y===l(p)&&i(p),F(H)}else i(p);y=l(p)}if(y!==null)te=!0;else{var A=l(m);A!==null&&q(P,A.startTime-H),te=!1}}break e}finally{y=null,b=ae,S=!1}te=void 0}}finally{te?Q():U=!1}}}var Q;if(typeof z=="function")Q=function(){z(X)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,oe=de.port2;de.port1.onmessage=X,Q=function(){oe.postMessage(null)}}else Q=function(){j(X,0)};function q(H,te){G=j(function(){H(t.unstable_now())},te)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(H){switch(b){case 1:case 2:case 3:var te=3;break;default:te=b}var ae=b;b=te;try{return H()}finally{b=ae}},t.unstable_requestPaint=function(){T=!0},t.unstable_runWithPriority=function(H,te){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ae=b;b=H;try{return te()}finally{b=ae}},t.unstable_scheduleCallback=function(H,te,ae){var Se=t.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Se+ae:Se):ae=Se,H){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=ae+D,H={id:x++,callback:te,priorityLevel:H,startTime:ae,expirationTime:D,sortIndex:-1},ae>Se?(H.sortIndex=ae,r(m,H),l(p)===null&&H===l(m)&&(N?(M(G),G=-1):N=!0,q(P,ae-Se))):(H.sortIndex=D,r(p,H),k||S||(k=!0,U||(U=!0,Q()))),H},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(H){var te=b;return function(){var ae=b;b=te;try{return H.apply(this,arguments)}finally{b=ae}}}})(nf)),nf}var Kg;function $S(){return Kg||(Kg=1,tf.exports=VS()),tf.exports}var rf={exports:{}},qt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Zg;function FS(){if(Zg)return qt;Zg=1;var t=id();function r(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)m+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var i={d:{f:l,r:function(){throw Error(r(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(p,m,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:m,implementation:x}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,qt.createPortal=function(p,m){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(r(299));return u(p,m,null,x)},qt.flushSync=function(p){var m=c.T,x=i.p;try{if(c.T=null,i.p=2,p)return p()}finally{c.T=m,i.p=x,i.d.f()}},qt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(p,m))},qt.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},qt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var x=m.as,y=d(x,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;x==="style"?i.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:S}):x==="script"&&i.d.X(p,{crossOrigin:y,integrity:b,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},qt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var x=d(m.as,m.crossOrigin);i.d.M(p,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(p)},qt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var x=m.as,y=d(x,m.crossOrigin);i.d.L(p,x,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},qt.preloadModule=function(p,m){if(typeof p=="string")if(m){var x=d(m.as,m.crossOrigin);i.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(p)},qt.requestFormReset=function(p){i.d.r(p)},qt.unstable_batchedUpdates=function(p,m){return p(m)},qt.useFormState=function(p,m,x){return c.H.useFormState(p,m,x)},qt.useFormStatus=function(){return c.H.useHostTransitionStatus()},qt.version="19.2.6",qt}var Jg;function vx(){if(Jg)return rf.exports;Jg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),rf.exports=FS(),rf.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Wg;function YS(){if(Wg)return pi;Wg=1;var t=$S(),r=id(),l=vx();function i(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function d(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(u(e)!==e)throw Error(i(188))}function m(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(i(188));return n!==e?null:e}for(var a=e,o=n;;){var f=a.return;if(f===null)break;var g=f.alternate;if(g===null){if(o=f.return,o!==null){a=o;continue}break}if(f.child===g.child){for(g=f.child;g;){if(g===a)return p(f),e;if(g===o)return p(f),n;g=g.sibling}throw Error(i(188))}if(a.return!==o.return)a=f,o=g;else{for(var v=!1,C=f.child;C;){if(C===a){v=!0,a=f,o=g;break}if(C===o){v=!0,o=f,a=g;break}C=C.sibling}if(!v){for(C=g.child;C;){if(C===a){v=!0,a=g,o=f;break}if(C===o){v=!0,o=g,a=f;break}C=C.sibling}if(!v)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),z=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function Q(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case j:return"Profiler";case T:return"StrictMode";case P:return"Suspense";case U:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case z:return e.displayName||"Context";case M:return(e._context.displayName||"Context")+".Consumer";case F:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return n=e.displayName||null,n!==null?n:oe(e.type)||"Memo";case le:n=e._payload,e=e._init;try{return oe(e(n))}catch{}}return null}var q=Array.isArray,H=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Se=[],D=-1;function A(e){return{current:e}}function L(e){0>D||(e.current=Se[D],Se[D]=null,D--)}function E(e,n){D++,Se[D]=e.current,e.current=n}var O=A(null),ee=A(null),ne=A(null),J=A(null);function ye(e,n){switch(E(ne,n),E(ee,e),E(O,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?mg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=mg(n),e=pg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(O),E(O,e)}function ke(){L(O),L(ee),L(ne)}function Ae(e){e.memoizedState!==null&&E(J,e);var n=O.current,a=pg(n,e.type);n!==a&&(E(ee,e),E(O,a))}function ht(e){ee.current===e&&(L(O),L(ee)),J.current===e&&(L(J),ci._currentValue=ae)}var yt,Le;function ge(e){if(yt===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);yt=n&&n[1]||"",Le=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+yt+e+Le}var ve=!1;function $e(e,n){if(!e||ve)return"";ve=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(Z){var Y=Z}Reflect.construct(e,[],ie)}else{try{ie.call()}catch(Z){Y=Z}e.call(ie.prototype)}}else{try{throw Error()}catch(Z){Y=Z}(ie=e())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(Z){if(Z&&Y&&typeof Z.stack=="string")return[Z.stack,Y.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=o.DetermineComponentFrameRoot(),v=g[0],C=g[1];if(v&&C){var R=v.split(`
44
+ `),$=C.split(`
45
+ `);for(f=o=0;o<R.length&&!R[o].includes("DetermineComponentFrameRoot");)o++;for(;f<$.length&&!$[f].includes("DetermineComponentFrameRoot");)f++;if(o===R.length||f===$.length)for(o=R.length-1,f=$.length-1;1<=o&&0<=f&&R[o]!==$[f];)f--;for(;1<=o&&0<=f;o--,f--)if(R[o]!==$[f]){if(o!==1||f!==1)do if(o--,f--,0>f||R[o]!==$[f]){var W=`
46
+ `+R[o].replace(" at new "," at ");return e.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",e.displayName)),W}while(1<=o&&0<=f);break}}}finally{ve=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ge(a):""}function nt(e,n){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge("Lazy");case 13:return e.child!==n&&n!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return $e(e.type,!1);case 11:return $e(e.type.render,!1);case 1:return $e(e.type,!0);case 31:return ge("Activity");default:return""}}function Ft(e){try{var n="",a=null;do n+=nt(e,a),a=e,e=e.return;while(e);return n}catch(o){return`
47
+ Error generating stack: `+o.message+`
48
+ `+o.stack}}var Qe=Object.prototype.hasOwnProperty,Mt=t.unstable_scheduleCallback,pn=t.unstable_cancelCallback,Gr=t.unstable_shouldYield,fr=t.unstable_requestPaint,ue=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,K=t.unstable_ImmediatePriority,fe=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,Re=t.unstable_LowPriority,Ye=t.unstable_IdlePriority,Ot=t.log,vt=t.unstable_setDisableYieldValue,gt=null,st=null;function Dt(e){if(typeof Ot=="function"&&vt(e),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(gt,e)}catch{}}var We=Math.clz32?Math.clz32:wb,dr=Math.log,Tn=Math.LN2;function wb(e){return e>>>=0,e===0?32:31-(dr(e)/Tn|0)|0}var Hi=256,qi=262144,Ii=4194304;function Pr(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Vi(e,n,a){var o=e.pendingLanes;if(o===0)return 0;var f=0,g=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var C=o&134217727;return C!==0?(o=C&~g,o!==0?f=Pr(o):(v&=C,v!==0?f=Pr(v):a||(a=C&~e,a!==0&&(f=Pr(a))))):(C=o&~g,C!==0?f=Pr(C):v!==0?f=Pr(v):a||(a=o&~e,a!==0&&(f=Pr(a)))),f===0?0:n!==0&&n!==f&&(n&g)===0&&(g=f&-f,a=n&-n,g>=a||g===32&&(a&4194048)!==0)?n:f}function ka(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function kb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 Qd(){var e=Ii;return Ii<<=1,(Ii&62914560)===0&&(Ii=4194304),e}function qs(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Ca(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Cb(e,n,a,o,f,g){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,R=e.expirationTimes,$=e.hiddenUpdates;for(a=v&~a;0<a;){var W=31-We(a),ie=1<<W;C[W]=0,R[W]=-1;var Y=$[W];if(Y!==null)for($[W]=null,W=0;W<Y.length;W++){var Z=Y[W];Z!==null&&(Z.lane&=-536870913)}a&=~ie}o!==0&&Kd(e,o,0),g!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=g&~(v&~n))}function Kd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-We(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|a&261930}function Zd(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var o=31-We(a),f=1<<o;f&n|e[o]&n&&(e[o]|=n),a&=~f}}function Jd(e,n){var a=n&-n;return a=(a&42)!==0?1:Is(a),(a&(e.suspendedLanes|n))!==0?0:a}function Is(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Vs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wd(){var e=te.p;return e!==0?e:(e=window.event,e===void 0?32:Bg(e.type))}function eh(e,n){var a=te.p;try{return te.p=e,n()}finally{te.p=a}}var hr=Math.random().toString(36).slice(2),_t="__reactFiber$"+hr,Pt="__reactProps$"+hr,vl="__reactContainer$"+hr,$s="__reactEvents$"+hr,Nb="__reactListeners$"+hr,Eb="__reactHandles$"+hr,th="__reactResources$"+hr,Na="__reactMarker$"+hr;function Fs(e){delete e[_t],delete e[Pt],delete e[$s],delete e[Nb],delete e[Eb]}function Sl(e){var n=e[_t];if(n)return n;for(var a=e.parentNode;a;){if(n=a[vl]||a[_t]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=wg(e);e!==null;){if(a=e[_t])return a;e=wg(e)}return n}e=a,a=e.parentNode}return null}function wl(e){if(e=e[_t]||e[vl]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ea(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(i(33))}function kl(e){var n=e[th];return n||(n=e[th]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Rt(e){e[Na]=!0}var nh=new Set,rh={};function Xr(e,n){Cl(e,n),Cl(e+"Capture",n)}function Cl(e,n){for(rh[e]=n,e=0;e<n.length;e++)nh.add(n[e])}var jb=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]*$"),lh={},ah={};function Tb(e){return Qe.call(ah,e)?!0:Qe.call(lh,e)?!1:jb.test(e)?ah[e]=!0:(lh[e]=!0,!1)}function $i(e,n,a){if(Tb(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Fi(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function Fn(e,n,a,o){if(o===null)e.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+o)}}function gn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ih(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ab(e,n,a){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,g=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(v){a=""+v,g.call(this,v)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ys(e){if(!e._valueTracker){var n=ih(e)?"checked":"value";e._valueTracker=Ab(e,n,""+e[n])}}function oh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return e&&(o=ih(e)?e.checked?"true":"false":e.value),e=o,e!==a?(n.setValue(e),!0):!1}function Yi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Mb=/[\n"\\]/g;function yn(e){return e.replace(Mb,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Gs(e,n,a,o,f,g,v,C){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+gn(n)):e.value!==""+gn(n)&&(e.value=""+gn(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?Ps(e,v,gn(n)):a!=null?Ps(e,v,gn(a)):o!=null&&e.removeAttribute("value"),f==null&&g!=null&&(e.defaultChecked=!!g),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.name=""+gn(C):e.removeAttribute("name")}function sh(e,n,a,o,f,g,v,C){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.type=g),n!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){Ys(e);return}a=a!=null?""+gn(a):"",n=n!=null?""+gn(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=C?e.checked:!!o,e.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Ys(e)}function Ps(e,n,a){n==="number"&&Yi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Nl(e,n,a,o){if(e=e.options,n){n={};for(var f=0;f<a.length;f++)n["$"+a[f]]=!0;for(a=0;a<e.length;a++)f=n.hasOwnProperty("$"+e[a].value),e[a].selected!==f&&(e[a].selected=f),f&&o&&(e[a].defaultSelected=!0)}else{for(a=""+gn(a),n=null,f=0;f<e.length;f++){if(e[f].value===a){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function uh(e,n,a){if(n!=null&&(n=""+gn(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+gn(a):""}function ch(e,n,a,o){if(n==null){if(o!=null){if(a!=null)throw Error(i(92));if(q(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),n=a}a=gn(n),e.defaultValue=a,o=e.textContent,o===a&&o!==""&&o!==null&&(e.value=o),Ys(e)}function El(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var Db=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 fh(e,n,a){var o=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,a):typeof a!="number"||a===0||Db.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function dh(e,n,a){if(n!=null&&typeof n!="object")throw Error(i(62));if(e=e.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&a[f]!==o&&fh(e,f,o)}else for(var g in n)n.hasOwnProperty(g)&&fh(e,g,n[g])}function Xs(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rb=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"]]),zb=/^[\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 Gi(e){return zb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Yn(){}var Qs=null;function Ks(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jl=null,Tl=null;function hh(e){var n=wl(e);if(n&&(e=n.stateNode)){var a=e[Pt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Gs(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+yn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==e&&o.form===e.form){var f=o[Pt]||null;if(!f)throw Error(i(90));Gs(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<a.length;n++)o=a[n],o.form===e.form&&oh(o)}break e;case"textarea":uh(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Nl(e,!!a.multiple,n,!1)}}}var Zs=!1;function mh(e,n,a){if(Zs)return e(n,a);Zs=!0;try{var o=e(n);return o}finally{if(Zs=!1,(jl!==null||Tl!==null)&&(Oo(),jl&&(n=jl,e=Tl,Tl=jl=null,hh(n),e)))for(n=0;n<e.length;n++)hh(e[n])}}function ja(e,n){var a=e.stateNode;if(a===null)return null;var o=a[Pt]||null;if(o===null)return null;a=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,n,typeof a));return a}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Js=!1;if(Gn)try{var Ta={};Object.defineProperty(Ta,"passive",{get:function(){Js=!0}}),window.addEventListener("test",Ta,Ta),window.removeEventListener("test",Ta,Ta)}catch{Js=!1}var mr=null,Ws=null,Pi=null;function ph(){if(Pi)return Pi;var e,n=Ws,a=n.length,o,f="value"in mr?mr.value:mr.textContent,g=f.length;for(e=0;e<a&&n[e]===f[e];e++);var v=a-e;for(o=1;o<=v&&n[a-o]===f[g-o];o++);return Pi=f.slice(e,1<o?1-o:void 0)}function Xi(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Qi(){return!0}function gh(){return!1}function Xt(e){function n(a,o,f,g,v){this._reactName=a,this._targetInst=f,this.type=o,this.nativeEvent=g,this.target=v,this.currentTarget=null;for(var C in e)e.hasOwnProperty(C)&&(a=e[C],this[C]=a?a(g):g[C]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Qi:gh,this.isPropagationStopped=gh,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Qi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Qi)},persist:function(){},isPersistent:Qi}),n}var Qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ki=Xt(Qr),Aa=y({},Qr,{view:0,detail:0}),Ob=Xt(Aa),eu,tu,Ma,Zi=y({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ma&&(Ma&&e.type==="mousemove"?(eu=e.screenX-Ma.screenX,tu=e.screenY-Ma.screenY):tu=eu=0,Ma=e),eu)},movementY:function(e){return"movementY"in e?e.movementY:tu}}),yh=Xt(Zi),_b=y({},Zi,{dataTransfer:0}),Lb=Xt(_b),Ub=y({},Aa,{relatedTarget:0}),nu=Xt(Ub),Bb=y({},Qr,{animationName:0,elapsedTime:0,pseudoElement:0}),Hb=Xt(Bb),qb=y({},Qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ib=Xt(qb),Vb=y({},Qr,{data:0}),xh=Xt(Vb),$b={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fb={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"},Yb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gb(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Yb[e])?!!n[e]:!1}function ru(){return Gb}var Pb=y({},Aa,{key:function(e){if(e.key){var n=$b[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Xi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Fb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(e){return e.type==="keypress"?Xi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Xb=Xt(Pb),Qb=y({},Zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bh=Xt(Qb),Kb=y({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),Zb=Xt(Kb),Jb=y({},Qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wb=Xt(Jb),ev=y({},Zi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),tv=Xt(ev),nv=y({},Qr,{newState:0,oldState:0}),rv=Xt(nv),lv=[9,13,27,32],lu=Gn&&"CompositionEvent"in window,Da=null;Gn&&"documentMode"in document&&(Da=document.documentMode);var av=Gn&&"TextEvent"in window&&!Da,vh=Gn&&(!lu||Da&&8<Da&&11>=Da),Sh=" ",wh=!1;function kh(e,n){switch(e){case"keyup":return lv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ch(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Al=!1;function iv(e,n){switch(e){case"compositionend":return Ch(n);case"keypress":return n.which!==32?null:(wh=!0,Sh);case"textInput":return e=n.data,e===Sh&&wh?null:e;default:return null}}function ov(e,n){if(Al)return e==="compositionend"||!lu&&kh(e,n)?(e=ph(),Pi=Ws=mr=null,Al=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return vh&&n.locale!=="ko"?null:n.data;default:return null}}var sv={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 Nh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!sv[e.type]:n==="textarea"}function Eh(e,n,a,o){jl?Tl?Tl.push(o):Tl=[o]:jl=o,n=Io(n,"onChange"),0<n.length&&(a=new Ki("onChange","change",null,a,o),e.push({event:a,listeners:n}))}var Ra=null,za=null;function uv(e){sg(e,0)}function Ji(e){var n=Ea(e);if(oh(n))return e}function jh(e,n){if(e==="change")return n}var Th=!1;if(Gn){var au;if(Gn){var iu="oninput"in document;if(!iu){var Ah=document.createElement("div");Ah.setAttribute("oninput","return;"),iu=typeof Ah.oninput=="function"}au=iu}else au=!1;Th=au&&(!document.documentMode||9<document.documentMode)}function Mh(){Ra&&(Ra.detachEvent("onpropertychange",Dh),za=Ra=null)}function Dh(e){if(e.propertyName==="value"&&Ji(za)){var n=[];Eh(n,za,e,Ks(e)),mh(uv,n)}}function cv(e,n,a){e==="focusin"?(Mh(),Ra=n,za=a,Ra.attachEvent("onpropertychange",Dh)):e==="focusout"&&Mh()}function fv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ji(za)}function dv(e,n){if(e==="click")return Ji(n)}function hv(e,n){if(e==="input"||e==="change")return Ji(n)}function mv(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var rn=typeof Object.is=="function"?Object.is:mv;function Oa(e,n){if(rn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var f=a[o];if(!Qe.call(n,f)||!rn(e[f],n[f]))return!1}return!0}function Rh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zh(e,n){var a=Rh(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=n&&o>=n)return{node:a,offset:n-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Rh(a)}}function Oh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Oh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function _h(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Yi(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Yi(e.document)}return n}function ou(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var pv=Gn&&"documentMode"in document&&11>=document.documentMode,Ml=null,su=null,_a=null,uu=!1;function Lh(e,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;uu||Ml==null||Ml!==Yi(o)||(o=Ml,"selectionStart"in o&&ou(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),_a&&Oa(_a,o)||(_a=o,o=Io(su,"onSelect"),0<o.length&&(n=new Ki("onSelect","select",null,n,a),e.push({event:n,listeners:o}),n.target=Ml)))}function Kr(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Dl={animationend:Kr("Animation","AnimationEnd"),animationiteration:Kr("Animation","AnimationIteration"),animationstart:Kr("Animation","AnimationStart"),transitionrun:Kr("Transition","TransitionRun"),transitionstart:Kr("Transition","TransitionStart"),transitioncancel:Kr("Transition","TransitionCancel"),transitionend:Kr("Transition","TransitionEnd")},cu={},Uh={};Gn&&(Uh=document.createElement("div").style,"AnimationEvent"in window||(delete Dl.animationend.animation,delete Dl.animationiteration.animation,delete Dl.animationstart.animation),"TransitionEvent"in window||delete Dl.transitionend.transition);function Zr(e){if(cu[e])return cu[e];if(!Dl[e])return e;var n=Dl[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Uh)return cu[e]=n[a];return e}var Bh=Zr("animationend"),Hh=Zr("animationiteration"),qh=Zr("animationstart"),gv=Zr("transitionrun"),yv=Zr("transitionstart"),xv=Zr("transitioncancel"),Ih=Zr("transitionend"),Vh=new Map,fu="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(" ");fu.push("scrollEnd");function An(e,n){Vh.set(e,n),Xr(n,[e])}var Wi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},xn=[],Rl=0,du=0;function eo(){for(var e=Rl,n=du=Rl=0;n<e;){var a=xn[n];xn[n++]=null;var o=xn[n];xn[n++]=null;var f=xn[n];xn[n++]=null;var g=xn[n];if(xn[n++]=null,o!==null&&f!==null){var v=o.pending;v===null?f.next=f:(f.next=v.next,v.next=f),o.pending=f}g!==0&&$h(a,f,g)}}function to(e,n,a,o){xn[Rl++]=e,xn[Rl++]=n,xn[Rl++]=a,xn[Rl++]=o,du|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function hu(e,n,a,o){return to(e,n,a,o),no(e)}function Jr(e,n){return to(e,null,null,n),no(e)}function $h(e,n,a){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a);for(var f=!1,g=e.return;g!==null;)g.childLanes|=a,o=g.alternate,o!==null&&(o.childLanes|=a),g.tag===22&&(e=g.stateNode,e===null||e._visibility&1||(f=!0)),e=g,g=g.return;return e.tag===3?(g=e.stateNode,f&&n!==null&&(f=31-We(a),e=g.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=a|536870912),g):null}function no(e){if(50<ri)throw ri=0,wc=null,Error(i(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var zl={};function bv(e,n,a,o){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,n,a,o){return new bv(e,n,a,o)}function mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pn(e,n){var a=e.alternate;return a===null?(a=ln(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Fh(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function ro(e,n,a,o,f,g){var v=0;if(o=e,typeof e=="function")mu(e)&&(v=1);else if(typeof e=="string")v=CS(e,a,O.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case se:return e=ln(31,a,n,f),e.elementType=se,e.lanes=g,e;case N:return Wr(a.children,f,g,n);case T:v=8,f|=24;break;case j:return e=ln(12,a,n,f|2),e.elementType=j,e.lanes=g,e;case P:return e=ln(13,a,n,f),e.elementType=P,e.lanes=g,e;case U:return e=ln(19,a,n,f),e.elementType=U,e.lanes=g,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:v=10;break e;case M:v=9;break e;case F:v=11;break e;case G:v=14;break e;case le:v=16,o=null;break e}v=29,a=Error(i(130,e===null?"null":typeof e,"")),o=null}return n=ln(v,a,n,f),n.elementType=e,n.type=o,n.lanes=g,n}function Wr(e,n,a,o){return e=ln(7,e,o,n),e.lanes=a,e}function pu(e,n,a){return e=ln(6,e,null,n),e.lanes=a,e}function Yh(e){var n=ln(18,null,null,0);return n.stateNode=e,n}function gu(e,n,a){return n=ln(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Gh=new WeakMap;function bn(e,n){if(typeof e=="object"&&e!==null){var a=Gh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Ft(n)},Gh.set(e,n),n)}return{value:e,source:n,stack:Ft(n)}}var Ol=[],_l=0,lo=null,La=0,vn=[],Sn=0,pr=null,On=1,_n="";function Xn(e,n){Ol[_l++]=La,Ol[_l++]=lo,lo=e,La=n}function Ph(e,n,a){vn[Sn++]=On,vn[Sn++]=_n,vn[Sn++]=pr,pr=e;var o=On;e=_n;var f=32-We(o)-1;o&=~(1<<f),a+=1;var g=32-We(n)+f;if(30<g){var v=f-f%5;g=(o&(1<<v)-1).toString(32),o>>=v,f-=v,On=1<<32-We(n)+f|a<<f|o,_n=g+e}else On=1<<g|a<<f|o,_n=e}function yu(e){e.return!==null&&(Xn(e,1),Ph(e,1,0))}function xu(e){for(;e===lo;)lo=Ol[--_l],Ol[_l]=null,La=Ol[--_l],Ol[_l]=null;for(;e===pr;)pr=vn[--Sn],vn[Sn]=null,_n=vn[--Sn],vn[Sn]=null,On=vn[--Sn],vn[Sn]=null}function Xh(e,n){vn[Sn++]=On,vn[Sn++]=_n,vn[Sn++]=pr,On=n.id,_n=n.overflow,pr=e}var Lt=null,ct=null,Fe=!1,gr=null,wn=!1,bu=Error(i(519));function yr(e){var n=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ua(bn(n,e)),bu}function Qh(e){var n=e.stateNode,a=e.type,o=e.memoizedProps;switch(n[_t]=e,n[Pt]=o,a){case"dialog":Be("cancel",n),Be("close",n);break;case"iframe":case"object":case"embed":Be("load",n);break;case"video":case"audio":for(a=0;a<ai.length;a++)Be(ai[a],n);break;case"source":Be("error",n);break;case"img":case"image":case"link":Be("error",n),Be("load",n);break;case"details":Be("toggle",n);break;case"input":Be("invalid",n),sh(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Be("invalid",n);break;case"textarea":Be("invalid",n),ch(n,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||o.suppressHydrationWarning===!0||dg(n.textContent,a)?(o.popover!=null&&(Be("beforetoggle",n),Be("toggle",n)),o.onScroll!=null&&Be("scroll",n),o.onScrollEnd!=null&&Be("scrollend",n),o.onClick!=null&&(n.onclick=Yn),n=!0):n=!1,n||yr(e,!0)}function Kh(e){for(Lt=e.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:wn=!1;return;case 27:case 3:wn=!0;return;default:Lt=Lt.return}}function Ll(e){if(e!==Lt)return!1;if(!Fe)return Kh(e),Fe=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Uc(e.type,e.memoizedProps)),a=!a),a&&ct&&yr(e),Kh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=Sg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=Sg(e)}else n===27?(n=ct,Dr(e.type)?(e=Vc,Vc=null,ct=e):ct=n):ct=Lt?Cn(e.stateNode.nextSibling):null;return!0}function el(){ct=Lt=null,Fe=!1}function vu(){var e=gr;return e!==null&&(Jt===null?Jt=e:Jt.push.apply(Jt,e),gr=null),e}function Ua(e){gr===null?gr=[e]:gr.push(e)}var Su=A(null),tl=null,Qn=null;function xr(e,n,a){E(Su,n._currentValue),n._currentValue=a}function Kn(e){e._currentValue=Su.current,L(Su)}function wu(e,n,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===a)break;e=e.return}}function ku(e,n,a,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var g=f.dependencies;if(g!==null){var v=f.child;g=g.firstContext;e:for(;g!==null;){var C=g;g=f;for(var R=0;R<n.length;R++)if(C.context===n[R]){g.lanes|=a,C=g.alternate,C!==null&&(C.lanes|=a),wu(g.return,a,e),o||(v=null);break e}g=C.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(i(341));v.lanes|=a,g=v.alternate,g!==null&&(g.lanes|=a),wu(v,a,e),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===e){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function Ul(e,n,a,o){e=null;for(var f=n,g=!1;f!==null;){if(!g){if((f.flags&524288)!==0)g=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(i(387));if(v=v.memoizedProps,v!==null){var C=f.type;rn(f.pendingProps.value,v.value)||(e!==null?e.push(C):e=[C])}}else if(f===J.current){if(v=f.alternate,v===null)throw Error(i(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(ci):e=[ci])}f=f.return}e!==null&&ku(n,e,a,o),n.flags|=262144}function ao(e){for(e=e.firstContext;e!==null;){if(!rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function nl(e){tl=e,Qn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ut(e){return Zh(tl,e)}function io(e,n){return tl===null&&nl(e),Zh(e,n)}function Zh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Qn===null){if(e===null)throw Error(i(308));Qn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Qn=Qn.next=n;return a}var vv=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},Sv=t.unstable_scheduleCallback,wv=t.unstable_NormalPriority,kt={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new vv,data:new Map,refCount:0}}function Ba(e){e.refCount--,e.refCount===0&&Sv(wv,function(){e.controller.abort()})}var Ha=null,Nu=0,Bl=0,Hl=null;function kv(e,n){if(Ha===null){var a=Ha=[];Nu=0,Bl=Tc(),Hl={status:"pending",value:void 0,then:function(o){a.push(o)}}}return Nu++,n.then(Jh,Jh),n}function Jh(){if(--Nu===0&&Ha!==null){Hl!==null&&(Hl.status="fulfilled");var e=Ha;Ha=null,Bl=0,Hl=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Cv(e,n){var a=[],o={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<a.length;f++)(0,a[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),o}var Wh=H.S;H.S=function(e,n){Lp=ue(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&kv(e,n),Wh!==null&&Wh(e,n)};var rl=A(null);function Eu(){var e=rl.current;return e!==null?e:it.pooledCache}function oo(e,n){n===null?E(rl,rl.current):E(rl,n.pool)}function em(){var e=Eu();return e===null?null:{parent:kt._currentValue,pool:e}}var ql=Error(i(460)),ju=Error(i(474)),so=Error(i(542)),uo={then:function(){}};function tm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nm(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(Yn,Yn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,lm(e),e;default:if(typeof n.status=="string")n.then(Yn,Yn);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,lm(e),e}throw al=n,ql}}function ll(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(al=a,ql):a}}var al=null;function rm(){if(al===null)throw Error(i(459));var e=al;return al=null,e}function lm(e){if(e===ql||e===so)throw Error(i(483))}var Il=null,qa=0;function co(e){var n=qa;return qa+=1,Il===null&&(Il=[]),nm(Il,e,n)}function Ia(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function fo(e,n){throw n.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(n),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function am(e){function n(I,_){if(e){var V=I.deletions;V===null?(I.deletions=[_],I.flags|=16):V.push(_)}}function a(I,_){if(!e)return null;for(;_!==null;)n(I,_),_=_.sibling;return null}function o(I){for(var _=new Map;I!==null;)I.key!==null?_.set(I.key,I):_.set(I.index,I),I=I.sibling;return _}function f(I,_){return I=Pn(I,_),I.index=0,I.sibling=null,I}function g(I,_,V){return I.index=V,e?(V=I.alternate,V!==null?(V=V.index,V<_?(I.flags|=67108866,_):V):(I.flags|=67108866,_)):(I.flags|=1048576,_)}function v(I){return e&&I.alternate===null&&(I.flags|=67108866),I}function C(I,_,V,re){return _===null||_.tag!==6?(_=pu(V,I.mode,re),_.return=I,_):(_=f(_,V),_.return=I,_)}function R(I,_,V,re){var we=V.type;return we===N?W(I,_,V.props.children,re,V.key):_!==null&&(_.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===le&&ll(we)===_.type)?(_=f(_,V.props),Ia(_,V),_.return=I,_):(_=ro(V.type,V.key,V.props,null,I.mode,re),Ia(_,V),_.return=I,_)}function $(I,_,V,re){return _===null||_.tag!==4||_.stateNode.containerInfo!==V.containerInfo||_.stateNode.implementation!==V.implementation?(_=gu(V,I.mode,re),_.return=I,_):(_=f(_,V.children||[]),_.return=I,_)}function W(I,_,V,re,we){return _===null||_.tag!==7?(_=Wr(V,I.mode,re,we),_.return=I,_):(_=f(_,V),_.return=I,_)}function ie(I,_,V){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=pu(""+_,I.mode,V),_.return=I,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case S:return V=ro(_.type,_.key,_.props,null,I.mode,V),Ia(V,_),V.return=I,V;case k:return _=gu(_,I.mode,V),_.return=I,_;case le:return _=ll(_),ie(I,_,V)}if(q(_)||Q(_))return _=Wr(_,I.mode,V,null),_.return=I,_;if(typeof _.then=="function")return ie(I,co(_),V);if(_.$$typeof===z)return ie(I,io(I,_),V);fo(I,_)}return null}function Y(I,_,V,re){var we=_!==null?_.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return we!==null?null:C(I,_,""+V,re);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case S:return V.key===we?R(I,_,V,re):null;case k:return V.key===we?$(I,_,V,re):null;case le:return V=ll(V),Y(I,_,V,re)}if(q(V)||Q(V))return we!==null?null:W(I,_,V,re,null);if(typeof V.then=="function")return Y(I,_,co(V),re);if(V.$$typeof===z)return Y(I,_,io(I,V),re);fo(I,V)}return null}function Z(I,_,V,re,we){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return I=I.get(V)||null,C(_,I,""+re,we);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case S:return I=I.get(re.key===null?V:re.key)||null,R(_,I,re,we);case k:return I=I.get(re.key===null?V:re.key)||null,$(_,I,re,we);case le:return re=ll(re),Z(I,_,V,re,we)}if(q(re)||Q(re))return I=I.get(V)||null,W(_,I,re,we,null);if(typeof re.then=="function")return Z(I,_,V,co(re),we);if(re.$$typeof===z)return Z(I,_,V,io(_,re),we);fo(_,re)}return null}function xe(I,_,V,re){for(var we=null,Ke=null,be=_,ze=_=0,Ie=null;be!==null&&ze<V.length;ze++){be.index>ze?(Ie=be,be=null):Ie=be.sibling;var Ze=Y(I,be,V[ze],re);if(Ze===null){be===null&&(be=Ie);break}e&&be&&Ze.alternate===null&&n(I,be),_=g(Ze,_,ze),Ke===null?we=Ze:Ke.sibling=Ze,Ke=Ze,be=Ie}if(ze===V.length)return a(I,be),Fe&&Xn(I,ze),we;if(be===null){for(;ze<V.length;ze++)be=ie(I,V[ze],re),be!==null&&(_=g(be,_,ze),Ke===null?we=be:Ke.sibling=be,Ke=be);return Fe&&Xn(I,ze),we}for(be=o(be);ze<V.length;ze++)Ie=Z(be,I,ze,V[ze],re),Ie!==null&&(e&&Ie.alternate!==null&&be.delete(Ie.key===null?ze:Ie.key),_=g(Ie,_,ze),Ke===null?we=Ie:Ke.sibling=Ie,Ke=Ie);return e&&be.forEach(function(Lr){return n(I,Lr)}),Fe&&Xn(I,ze),we}function je(I,_,V,re){if(V==null)throw Error(i(151));for(var we=null,Ke=null,be=_,ze=_=0,Ie=null,Ze=V.next();be!==null&&!Ze.done;ze++,Ze=V.next()){be.index>ze?(Ie=be,be=null):Ie=be.sibling;var Lr=Y(I,be,Ze.value,re);if(Lr===null){be===null&&(be=Ie);break}e&&be&&Lr.alternate===null&&n(I,be),_=g(Lr,_,ze),Ke===null?we=Lr:Ke.sibling=Lr,Ke=Lr,be=Ie}if(Ze.done)return a(I,be),Fe&&Xn(I,ze),we;if(be===null){for(;!Ze.done;ze++,Ze=V.next())Ze=ie(I,Ze.value,re),Ze!==null&&(_=g(Ze,_,ze),Ke===null?we=Ze:Ke.sibling=Ze,Ke=Ze);return Fe&&Xn(I,ze),we}for(be=o(be);!Ze.done;ze++,Ze=V.next())Ze=Z(be,I,ze,Ze.value,re),Ze!==null&&(e&&Ze.alternate!==null&&be.delete(Ze.key===null?ze:Ze.key),_=g(Ze,_,ze),Ke===null?we=Ze:Ke.sibling=Ze,Ke=Ze);return e&&be.forEach(function(_S){return n(I,_S)}),Fe&&Xn(I,ze),we}function at(I,_,V,re){if(typeof V=="object"&&V!==null&&V.type===N&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case S:e:{for(var we=V.key;_!==null;){if(_.key===we){if(we=V.type,we===N){if(_.tag===7){a(I,_.sibling),re=f(_,V.props.children),re.return=I,I=re;break e}}else if(_.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===le&&ll(we)===_.type){a(I,_.sibling),re=f(_,V.props),Ia(re,V),re.return=I,I=re;break e}a(I,_);break}else n(I,_);_=_.sibling}V.type===N?(re=Wr(V.props.children,I.mode,re,V.key),re.return=I,I=re):(re=ro(V.type,V.key,V.props,null,I.mode,re),Ia(re,V),re.return=I,I=re)}return v(I);case k:e:{for(we=V.key;_!==null;){if(_.key===we)if(_.tag===4&&_.stateNode.containerInfo===V.containerInfo&&_.stateNode.implementation===V.implementation){a(I,_.sibling),re=f(_,V.children||[]),re.return=I,I=re;break e}else{a(I,_);break}else n(I,_);_=_.sibling}re=gu(V,I.mode,re),re.return=I,I=re}return v(I);case le:return V=ll(V),at(I,_,V,re)}if(q(V))return xe(I,_,V,re);if(Q(V)){if(we=Q(V),typeof we!="function")throw Error(i(150));return V=we.call(V),je(I,_,V,re)}if(typeof V.then=="function")return at(I,_,co(V),re);if(V.$$typeof===z)return at(I,_,io(I,V),re);fo(I,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,_!==null&&_.tag===6?(a(I,_.sibling),re=f(_,V),re.return=I,I=re):(a(I,_),re=pu(V,I.mode,re),re.return=I,I=re),v(I)):a(I,_)}return function(I,_,V,re){try{qa=0;var we=at(I,_,V,re);return Il=null,we}catch(be){if(be===ql||be===so)throw be;var Ke=ln(29,be,null,I.mode);return Ke.lanes=re,Ke.return=I,Ke}finally{}}}var il=am(!0),im=am(!1),br=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Au(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sr(e,n,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Je&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=no(e),$h(e,null,a),n}return to(e,o,n,a),no(e)}function Va(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,Zd(e,a)}}function Mu(e,n){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var f=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};g===null?f=g=v:g=g.next=v,a=a.next}while(a!==null);g===null?f=g=n:g=g.next=n}else f=g=n;a={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:g,shared:o.shared,callbacks:o.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Du=!1;function $a(){if(Du){var e=Hl;if(e!==null)throw e}}function Fa(e,n,a,o){Du=!1;var f=e.updateQueue;br=!1;var g=f.firstBaseUpdate,v=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var R=C,$=R.next;R.next=null,v===null?g=$:v.next=$,v=R;var W=e.alternate;W!==null&&(W=W.updateQueue,C=W.lastBaseUpdate,C!==v&&(C===null?W.firstBaseUpdate=$:C.next=$,W.lastBaseUpdate=R))}if(g!==null){var ie=f.baseState;v=0,W=$=R=null,C=g;do{var Y=C.lane&-536870913,Z=Y!==C.lane;if(Z?(qe&Y)===Y:(o&Y)===Y){Y!==0&&Y===Bl&&(Du=!0),W!==null&&(W=W.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var xe=e,je=C;Y=n;var at=a;switch(je.tag){case 1:if(xe=je.payload,typeof xe=="function"){ie=xe.call(at,ie,Y);break e}ie=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=je.payload,Y=typeof xe=="function"?xe.call(at,ie,Y):xe,Y==null)break e;ie=y({},ie,Y);break e;case 2:br=!0}}Y=C.callback,Y!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=f.callbacks,Z===null?f.callbacks=[Y]:Z.push(Y))}else Z={lane:Y,tag:C.tag,payload:C.payload,callback:C.callback,next:null},W===null?($=W=Z,R=ie):W=W.next=Z,v|=Y;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;Z=C,C=Z.next,Z.next=null,f.lastBaseUpdate=Z,f.shared.pending=null}}while(!0);W===null&&(R=ie),f.baseState=R,f.firstBaseUpdate=$,f.lastBaseUpdate=W,g===null&&(f.shared.lanes=0),Er|=v,e.lanes=v,e.memoizedState=ie}}function om(e,n){if(typeof e!="function")throw Error(i(191,e));e.call(n)}function sm(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)om(a[e],n)}var Vl=A(null),ho=A(0);function um(e,n){e=ar,E(ho,e),E(Vl,n),ar=e|n.baseLanes}function Ru(){E(ho,ar),E(Vl,Vl.current)}function zu(){ar=ho.current,L(Vl),L(ho)}var an=A(null),kn=null;function wr(e){var n=e.alternate;E(St,St.current&1),E(an,e),kn===null&&(n===null||Vl.current!==null||n.memoizedState!==null)&&(kn=e)}function Ou(e){E(St,St.current),E(an,e),kn===null&&(kn=e)}function cm(e){e.tag===22?(E(St,St.current),E(an,e),kn===null&&(kn=e)):kr()}function kr(){E(St,St.current),E(an,an.current)}function on(e){L(an),kn===e&&(kn=null),L(St)}var St=A(0);function mo(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||qc(a)||Ic(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Zn=0,De=null,rt=null,Ct=null,po=!1,$l=!1,ol=!1,go=0,Ya=0,Fl=null,Nv=0;function xt(){throw Error(i(321))}function _u(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!rn(e[a],n[a]))return!1;return!0}function Lu(e,n,a,o,f,g){return Zn=g,De=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,H.H=e===null||e.memoizedState===null?Pm:Zu,ol=!1,g=a(o,f),ol=!1,$l&&(g=dm(n,a,o,f)),fm(e),g}function fm(e){H.H=Xa;var n=rt!==null&&rt.next!==null;if(Zn=0,Ct=rt=De=null,po=!1,Ya=0,Fl=null,n)throw Error(i(300));e===null||Nt||(e=e.dependencies,e!==null&&ao(e)&&(Nt=!0))}function dm(e,n,a,o){De=e;var f=0;do{if($l&&(Fl=null),Ya=0,$l=!1,25<=f)throw Error(i(301));if(f+=1,Ct=rt=null,e.updateQueue!=null){var g=e.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}H.H=Xm,g=n(a,o)}while($l);return g}function Ev(){var e=H.H,n=e.useState()[0];return n=typeof n.then=="function"?Ga(n):n,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(De.flags|=1024),n}function Uu(){var e=go!==0;return go=0,e}function Bu(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Hu(e){if(po){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}po=!1}Zn=0,Ct=rt=De=null,$l=!1,Ya=go=0,Fl=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?De.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function wt(){if(rt===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var n=Ct===null?De.memoizedState:Ct.next;if(n!==null)Ct=n,rt=e;else{if(e===null)throw De.alternate===null?Error(i(467)):Error(i(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Ct===null?De.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function yo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ga(e){var n=Ya;return Ya+=1,Fl===null&&(Fl=[]),e=nm(Fl,e,n),n=De,(Ct===null?n.memoizedState:Ct.next)===null&&(n=n.alternate,H.H=n===null||n.memoizedState===null?Pm:Zu),e}function xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ga(e);if(e.$$typeof===z)return Ut(e)}throw Error(i(438,String(e)))}function qu(e){var n=null,a=De.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var o=De.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=yo(),De.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),o=0;o<e;o++)a[o]=B;return n.index++,a}function Jn(e,n){return typeof n=="function"?n(e):n}function bo(e){var n=wt();return Iu(n,rt,e)}function Iu(e,n,a){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var f=e.baseQueue,g=o.pending;if(g!==null){if(f!==null){var v=f.next;f.next=g.next,g.next=v}n.baseQueue=f=g,o.pending=null}if(g=e.baseState,f===null)e.memoizedState=g;else{n=f.next;var C=v=null,R=null,$=n,W=!1;do{var ie=$.lane&-536870913;if(ie!==$.lane?(qe&ie)===ie:(Zn&ie)===ie){var Y=$.revertLane;if(Y===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),ie===Bl&&(W=!0);else if((Zn&Y)===Y){$=$.next,Y===Bl&&(W=!0);continue}else ie={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},R===null?(C=R=ie,v=g):R=R.next=ie,De.lanes|=Y,Er|=Y;ie=$.action,ol&&a(g,ie),g=$.hasEagerState?$.eagerState:a(g,ie)}else Y={lane:ie,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},R===null?(C=R=Y,v=g):R=R.next=Y,De.lanes|=ie,Er|=ie;$=$.next}while($!==null&&$!==n);if(R===null?v=g:R.next=C,!rn(g,e.memoizedState)&&(Nt=!0,W&&(a=Hl,a!==null)))throw a;e.memoizedState=g,e.baseState=v,e.baseQueue=R,o.lastRenderedState=g}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Vu(e){var n=wt(),a=n.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var o=a.dispatch,f=a.pending,g=n.memoizedState;if(f!==null){a.pending=null;var v=f=f.next;do g=e(g,v.action),v=v.next;while(v!==f);rn(g,n.memoizedState)||(Nt=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),a.lastRenderedState=g}return[g,o]}function hm(e,n,a){var o=De,f=wt(),g=Fe;if(g){if(a===void 0)throw Error(i(407));a=a()}else a=n();var v=!rn((rt||f).memoizedState,a);if(v&&(f.memoizedState=a,Nt=!0),f=f.queue,Yu(gm.bind(null,o,f,e),[e]),f.getSnapshot!==n||v||Ct!==null&&Ct.memoizedState.tag&1){if(o.flags|=2048,Yl(9,{destroy:void 0},pm.bind(null,o,f,a,n),null),it===null)throw Error(i(349));g||(Zn&127)!==0||mm(o,n,a)}return a}function mm(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=De.updateQueue,n===null?(n=yo(),De.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function pm(e,n,a,o){n.value=a,n.getSnapshot=o,ym(n)&&xm(e)}function gm(e,n,a){return a(function(){ym(n)&&xm(e)})}function ym(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!rn(e,a)}catch{return!0}}function xm(e){var n=Jr(e,2);n!==null&&Wt(n,e,2)}function $u(e){var n=Yt();if(typeof e=="function"){var a=e;if(e=a(),ol){Dt(!0);try{a()}finally{Dt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:e},n}function bm(e,n,a,o){return e.baseState=a,Iu(e,rt,typeof o=="function"?o:Jn)}function jv(e,n,a,o,f){if(wo(e))throw Error(i(485));if(e=n.action,e!==null){var g={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){g.listeners.push(v)}};H.T!==null?a(!0):g.isTransition=!1,o(g),a=n.pending,a===null?(g.next=n.pending=g,vm(n,g)):(g.next=a.next,n.pending=a.next=g)}}function vm(e,n){var a=n.action,o=n.payload,f=e.state;if(n.isTransition){var g=H.T,v={};H.T=v;try{var C=a(f,o),R=H.S;R!==null&&R(v,C),Sm(e,n,C)}catch($){Fu(e,n,$)}finally{g!==null&&v.types!==null&&(g.types=v.types),H.T=g}}else try{g=a(f,o),Sm(e,n,g)}catch($){Fu(e,n,$)}}function Sm(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){wm(e,n,o)},function(o){return Fu(e,n,o)}):wm(e,n,a)}function wm(e,n,a){n.status="fulfilled",n.value=a,km(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,vm(e,a)))}function Fu(e,n,a){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=a,km(n),n=n.next;while(n!==o)}e.action=null}function km(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Cm(e,n){return n}function Nm(e,n){if(Fe){var a=it.formState;if(a!==null){e:{var o=De;if(Fe){if(ct){t:{for(var f=ct,g=wn;f.nodeType!==8;){if(!g){f=null;break t}if(f=Cn(f.nextSibling),f===null){f=null;break t}}g=f.data,f=g==="F!"||g==="F"?f:null}if(f){ct=Cn(f.nextSibling),o=f.data==="F!";break e}}yr(o)}o=!1}o&&(n=a[0])}}return a=Yt(),a.memoizedState=a.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cm,lastRenderedState:n},a.queue=o,a=Fm.bind(null,De,o),o.dispatch=a,o=$u(!1),g=Ku.bind(null,De,!1,o.queue),o=Yt(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,a=jv.bind(null,De,f,g,a),f.dispatch=a,o.memoizedState=e,[n,a,!1]}function Em(e){var n=wt();return jm(n,rt,e)}function jm(e,n,a){if(n=Iu(e,n,Cm)[0],e=bo(Jn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=Ga(n)}catch(v){throw v===ql?so:v}else o=n;n=wt();var f=n.queue,g=f.dispatch;return a!==n.memoizedState&&(De.flags|=2048,Yl(9,{destroy:void 0},Tv.bind(null,f,a),null)),[o,g,e]}function Tv(e,n){e.action=n}function Tm(e){var n=wt(),a=rt;if(a!==null)return jm(n,a,e);wt(),n=n.memoizedState,a=wt();var o=a.queue.dispatch;return a.memoizedState=e,[n,o,!1]}function Yl(e,n,a,o){return e={tag:e,create:a,deps:o,inst:n,next:null},n=De.updateQueue,n===null&&(n=yo(),De.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,n.lastEffect=e),e}function Am(){return wt().memoizedState}function vo(e,n,a,o){var f=Yt();De.flags|=e,f.memoizedState=Yl(1|n,{destroy:void 0},a,o===void 0?null:o)}function So(e,n,a,o){var f=wt();o=o===void 0?null:o;var g=f.memoizedState.inst;rt!==null&&o!==null&&_u(o,rt.memoizedState.deps)?f.memoizedState=Yl(n,g,a,o):(De.flags|=e,f.memoizedState=Yl(1|n,g,a,o))}function Mm(e,n){vo(8390656,8,e,n)}function Yu(e,n){So(2048,8,e,n)}function Av(e){De.flags|=4;var n=De.updateQueue;if(n===null)n=yo(),De.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Dm(e){var n=wt().memoizedState;return Av({ref:n,nextImpl:e}),function(){if((Je&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}function Rm(e,n){return So(4,2,e,n)}function zm(e,n){return So(4,4,e,n)}function Om(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function _m(e,n,a){a=a!=null?a.concat([e]):null,So(4,4,Om.bind(null,n,e),a)}function Gu(){}function Lm(e,n){var a=wt();n=n===void 0?null:n;var o=a.memoizedState;return n!==null&&_u(n,o[1])?o[0]:(a.memoizedState=[e,n],e)}function Um(e,n){var a=wt();n=n===void 0?null:n;var o=a.memoizedState;if(n!==null&&_u(n,o[1]))return o[0];if(o=e(),ol){Dt(!0);try{e()}finally{Dt(!1)}}return a.memoizedState=[o,n],o}function Pu(e,n,a){return a===void 0||(Zn&1073741824)!==0&&(qe&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Bp(),De.lanes|=e,Er|=e,a)}function Bm(e,n,a,o){return rn(a,n)?a:Vl.current!==null?(e=Pu(e,a,o),rn(e,n)||(Nt=!0),e):(Zn&42)===0||(Zn&1073741824)!==0&&(qe&261930)===0?(Nt=!0,e.memoizedState=a):(e=Bp(),De.lanes|=e,Er|=e,n)}function Hm(e,n,a,o,f){var g=te.p;te.p=g!==0&&8>g?g:8;var v=H.T,C={};H.T=C,Ku(e,!1,n,a);try{var R=f(),$=H.S;if($!==null&&$(C,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var W=Cv(R,o);Pa(e,n,W,cn(e))}else Pa(e,n,o,cn(e))}catch(ie){Pa(e,n,{then:function(){},status:"rejected",reason:ie},cn())}finally{te.p=g,v!==null&&C.types!==null&&(v.types=C.types),H.T=v}}function Mv(){}function Xu(e,n,a,o){if(e.tag!==5)throw Error(i(476));var f=qm(e).queue;Hm(e,f,n,ae,a===null?Mv:function(){return Im(e),a(o)})}function qm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:ae},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Im(e){var n=qm(e);n.next===null&&(n=e.alternate.memoizedState),Pa(e,n.next.queue,{},cn())}function Qu(){return Ut(ci)}function Vm(){return wt().memoizedState}function $m(){return wt().memoizedState}function Dv(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=cn();e=vr(a);var o=Sr(n,e,a);o!==null&&(Wt(o,n,a),Va(o,n,a)),n={cache:Cu()},e.payload=n;return}n=n.return}}function Rv(e,n,a){var o=cn();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},wo(e)?Ym(n,a):(a=hu(e,n,a,o),a!==null&&(Wt(a,e,o),Gm(a,n,o)))}function Fm(e,n,a){var o=cn();Pa(e,n,a,o)}function Pa(e,n,a,o){var f={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(wo(e))Ym(n,f);else{var g=e.alternate;if(e.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var v=n.lastRenderedState,C=g(v,a);if(f.hasEagerState=!0,f.eagerState=C,rn(C,v))return to(e,n,f,0),it===null&&eo(),!1}catch{}finally{}if(a=hu(e,n,f,o),a!==null)return Wt(a,e,o),Gm(a,n,o),!0}return!1}function Ku(e,n,a,o){if(o={lane:2,revertLane:Tc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},wo(e)){if(n)throw Error(i(479))}else n=hu(e,a,o,2),n!==null&&Wt(n,e,2)}function wo(e){var n=e.alternate;return e===De||n!==null&&n===De}function Ym(e,n){$l=po=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Gm(e,n,a){if((a&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,Zd(e,a)}}var Xa={readContext:Ut,use:xo,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};Xa.useEffectEvent=xt;var Pm={readContext:Ut,use:xo,useCallback:function(e,n){return Yt().memoizedState=[e,n===void 0?null:n],e},useContext:Ut,useEffect:Mm,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,vo(4194308,4,Om.bind(null,n,e),a)},useLayoutEffect:function(e,n){return vo(4194308,4,e,n)},useInsertionEffect:function(e,n){vo(4,2,e,n)},useMemo:function(e,n){var a=Yt();n=n===void 0?null:n;var o=e();if(ol){Dt(!0);try{e()}finally{Dt(!1)}}return a.memoizedState=[o,n],o},useReducer:function(e,n,a){var o=Yt();if(a!==void 0){var f=a(n);if(ol){Dt(!0);try{a(n)}finally{Dt(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=Rv.bind(null,De,e),[o.memoizedState,e]},useRef:function(e){var n=Yt();return e={current:e},n.memoizedState=e},useState:function(e){e=$u(e);var n=e.queue,a=Fm.bind(null,De,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Gu,useDeferredValue:function(e,n){var a=Yt();return Pu(a,e,n)},useTransition:function(){var e=$u(!1);return e=Hm.bind(null,De,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var o=De,f=Yt();if(Fe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=n(),it===null)throw Error(i(349));(qe&127)!==0||mm(o,n,a)}f.memoizedState=a;var g={value:a,getSnapshot:n};return f.queue=g,Mm(gm.bind(null,o,g,e),[e]),o.flags|=2048,Yl(9,{destroy:void 0},pm.bind(null,o,g,a,n),null),a},useId:function(){var e=Yt(),n=it.identifierPrefix;if(Fe){var a=_n,o=On;a=(o&~(1<<32-We(o)-1)).toString(32)+a,n="_"+n+"R_"+a,a=go++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=Nv++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Qu,useFormState:Nm,useActionState:Nm,useOptimistic:function(e){var n=Yt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Ku.bind(null,De,!0,a),a.dispatch=n,[e,n]},useMemoCache:qu,useCacheRefresh:function(){return Yt().memoizedState=Dv.bind(null,De)},useEffectEvent:function(e){var n=Yt(),a={impl:e};return n.memoizedState=a,function(){if((Je&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Zu={readContext:Ut,use:xo,useCallback:Lm,useContext:Ut,useEffect:Yu,useImperativeHandle:_m,useInsertionEffect:Rm,useLayoutEffect:zm,useMemo:Um,useReducer:bo,useRef:Am,useState:function(){return bo(Jn)},useDebugValue:Gu,useDeferredValue:function(e,n){var a=wt();return Bm(a,rt.memoizedState,e,n)},useTransition:function(){var e=bo(Jn)[0],n=wt().memoizedState;return[typeof e=="boolean"?e:Ga(e),n]},useSyncExternalStore:hm,useId:Vm,useHostTransitionStatus:Qu,useFormState:Em,useActionState:Em,useOptimistic:function(e,n){var a=wt();return bm(a,rt,e,n)},useMemoCache:qu,useCacheRefresh:$m};Zu.useEffectEvent=Dm;var Xm={readContext:Ut,use:xo,useCallback:Lm,useContext:Ut,useEffect:Yu,useImperativeHandle:_m,useInsertionEffect:Rm,useLayoutEffect:zm,useMemo:Um,useReducer:Vu,useRef:Am,useState:function(){return Vu(Jn)},useDebugValue:Gu,useDeferredValue:function(e,n){var a=wt();return rt===null?Pu(a,e,n):Bm(a,rt.memoizedState,e,n)},useTransition:function(){var e=Vu(Jn)[0],n=wt().memoizedState;return[typeof e=="boolean"?e:Ga(e),n]},useSyncExternalStore:hm,useId:Vm,useHostTransitionStatus:Qu,useFormState:Tm,useActionState:Tm,useOptimistic:function(e,n){var a=wt();return rt!==null?bm(a,rt,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:qu,useCacheRefresh:$m};Xm.useEffectEvent=Dm;function Ju(e,n,a,o){n=e.memoizedState,a=a(o,n),a=a==null?n:y({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Wu={enqueueSetState:function(e,n,a){e=e._reactInternals;var o=cn(),f=vr(o);f.payload=n,a!=null&&(f.callback=a),n=Sr(e,f,o),n!==null&&(Wt(n,e,o),Va(n,e,o))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var o=cn(),f=vr(o);f.tag=1,f.payload=n,a!=null&&(f.callback=a),n=Sr(e,f,o),n!==null&&(Wt(n,e,o),Va(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=cn(),o=vr(a);o.tag=2,n!=null&&(o.callback=n),n=Sr(e,o,a),n!==null&&(Wt(n,e,a),Va(n,e,a))}};function Qm(e,n,a,o,f,g,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,g,v):n.prototype&&n.prototype.isPureReactComponent?!Oa(a,o)||!Oa(f,g):!0}function Km(e,n,a,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==e&&Wu.enqueueReplaceState(n,n.state,null)}function sl(e,n){var a=n;if("ref"in n){a={};for(var o in n)o!=="ref"&&(a[o]=n[o])}if(e=e.defaultProps){a===n&&(a=y({},a));for(var f in e)a[f]===void 0&&(a[f]=e[f])}return a}function Zm(e){Wi(e)}function Jm(e){console.error(e)}function Wm(e){Wi(e)}function ko(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function ep(e,n,a){try{var o=e.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function ec(e,n,a){return a=vr(a),a.tag=3,a.payload={element:null},a.callback=function(){ko(e,n)},a}function tp(e){return e=vr(e),e.tag=3,e}function np(e,n,a,o){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var g=o.value;e.payload=function(){return f(g)},e.callback=function(){ep(n,a,o)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){ep(n,a,o),typeof f!="function"&&(jr===null?jr=new Set([this]):jr.add(this));var C=o.stack;this.componentDidCatch(o.value,{componentStack:C!==null?C:""})})}function zv(e,n,a,o,f){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=a.alternate,n!==null&&Ul(n,a,f,!0),a=an.current,a!==null){switch(a.tag){case 31:case 13:return kn===null?_o():a.alternate===null&&bt===0&&(bt=3),a.flags&=-257,a.flags|=65536,a.lanes=f,o===uo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([o]):n.add(o),Nc(e,o,f)),!1;case 22:return a.flags|=65536,o===uo?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([o]):a.add(o)),Nc(e,o,f)),!1}throw Error(i(435,a.tag))}return Nc(e,o,f),_o(),!1}if(Fe)return n=an.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==bu&&(e=Error(i(422),{cause:o}),Ua(bn(e,a)))):(o!==bu&&(n=Error(i(423),{cause:o}),Ua(bn(n,a))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=bn(o,a),f=ec(e.stateNode,o,f),Mu(e,f),bt!==4&&(bt=2)),!1;var g=Error(i(520),{cause:o});if(g=bn(g,a),ni===null?ni=[g]:ni.push(g),bt!==4&&(bt=2),n===null)return!0;o=bn(o,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=f&-f,a.lanes|=e,e=ec(a.stateNode,o,e),Mu(a,e),!1;case 1:if(n=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(jr===null||!jr.has(g))))return a.flags|=65536,f&=-f,a.lanes|=f,f=tp(f),np(f,e,a,o),Mu(a,f),!1}a=a.return}while(a!==null);return!1}var tc=Error(i(461)),Nt=!1;function Bt(e,n,a,o){n.child=e===null?im(n,null,a,o):il(n,e.child,a,o)}function rp(e,n,a,o,f){a=a.render;var g=n.ref;if("ref"in o){var v={};for(var C in o)C!=="ref"&&(v[C]=o[C])}else v=o;return nl(n),o=Lu(e,n,a,v,g,f),C=Uu(),e!==null&&!Nt?(Bu(e,n,f),Wn(e,n,f)):(Fe&&C&&yu(n),n.flags|=1,Bt(e,n,o,f),n.child)}function lp(e,n,a,o,f){if(e===null){var g=a.type;return typeof g=="function"&&!mu(g)&&g.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=g,ap(e,n,g,o,f)):(e=ro(a.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(g=e.child,!uc(e,f)){var v=g.memoizedProps;if(a=a.compare,a=a!==null?a:Oa,a(v,o)&&e.ref===n.ref)return Wn(e,n,f)}return n.flags|=1,e=Pn(g,o),e.ref=n.ref,e.return=n,n.child=e}function ap(e,n,a,o,f){if(e!==null){var g=e.memoizedProps;if(Oa(g,o)&&e.ref===n.ref)if(Nt=!1,n.pendingProps=o=g,uc(e,f))(e.flags&131072)!==0&&(Nt=!0);else return n.lanes=e.lanes,Wn(e,n,f)}return nc(e,n,a,o,f)}function ip(e,n,a,o){var f=o.children,g=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|a:a,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~g}else o=0,n.child=null;return op(e,n,g,a,o)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&oo(n,g!==null?g.cachePool:null),g!==null?um(n,g):Ru(),cm(n);else return o=n.lanes=536870912,op(e,n,g!==null?g.baseLanes|a:a,a,o)}else g!==null?(oo(n,g.cachePool),um(n,g),kr(),n.memoizedState=null):(e!==null&&oo(n,null),Ru(),kr());return Bt(e,n,f,a),n.child}function Qa(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function op(e,n,a,o,f){var g=Eu();return g=g===null?null:{parent:kt._currentValue,pool:g},n.memoizedState={baseLanes:a,cachePool:g},e!==null&&oo(n,null),Ru(),cm(n),e!==null&&Ul(e,n,o,!0),n.childLanes=f,null}function Co(e,n){return n=Eo({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function sp(e,n,a){return il(n,e.child,null,a),e=Co(n,n.pendingProps),e.flags|=2,on(n),n.memoizedState=null,e}function Ov(e,n,a){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Fe){if(o.mode==="hidden")return e=Co(n,o),n.lanes=536870912,Qa(null,e);if(Ou(n),(e=ct)?(e=vg(e,wn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:pr!==null?{id:On,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},a=Yh(e),a.return=n,n.child=a,Lt=n,ct=null)):e=null,e===null)throw yr(n);return n.lanes=536870912,null}return Co(n,o)}var g=e.memoizedState;if(g!==null){var v=g.dehydrated;if(Ou(n),f)if(n.flags&256)n.flags&=-257,n=sp(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(i(558));else if(Nt||Ul(e,n,a,!1),f=(a&e.childLanes)!==0,Nt||f){if(o=it,o!==null&&(v=Jd(o,a),v!==0&&v!==g.retryLane))throw g.retryLane=v,Jr(e,v),Wt(o,e,v),tc;_o(),n=sp(e,n,a)}else e=g.treeContext,ct=Cn(v.nextSibling),Lt=n,Fe=!0,gr=null,wn=!1,e!==null&&Xh(n,e),n=Co(n,o),n.flags|=4096;return n}return e=Pn(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function No(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function nc(e,n,a,o,f){return nl(n),a=Lu(e,n,a,o,void 0,f),o=Uu(),e!==null&&!Nt?(Bu(e,n,f),Wn(e,n,f)):(Fe&&o&&yu(n),n.flags|=1,Bt(e,n,a,f),n.child)}function up(e,n,a,o,f,g){return nl(n),n.updateQueue=null,a=dm(n,o,a,f),fm(e),o=Uu(),e!==null&&!Nt?(Bu(e,n,g),Wn(e,n,g)):(Fe&&o&&yu(n),n.flags|=1,Bt(e,n,a,g),n.child)}function cp(e,n,a,o,f){if(nl(n),n.stateNode===null){var g=zl,v=a.contextType;typeof v=="object"&&v!==null&&(g=Ut(v)),g=new a(o,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Wu,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=o,g.state=n.memoizedState,g.refs={},Tu(n),v=a.contextType,g.context=typeof v=="object"&&v!==null?Ut(v):zl,g.state=n.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Ju(n,a,v,o),g.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(v=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),v!==g.state&&Wu.enqueueReplaceState(g,g.state,null),Fa(n,o,g,f),$a(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){g=n.stateNode;var C=n.memoizedProps,R=sl(a,C);g.props=R;var $=g.context,W=a.contextType;v=zl,typeof W=="object"&&W!==null&&(v=Ut(W));var ie=a.getDerivedStateFromProps;W=typeof ie=="function"||typeof g.getSnapshotBeforeUpdate=="function",C=n.pendingProps!==C,W||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(C||$!==v)&&Km(n,g,o,v),br=!1;var Y=n.memoizedState;g.state=Y,Fa(n,o,g,f),$a(),$=n.memoizedState,C||Y!==$||br?(typeof ie=="function"&&(Ju(n,a,ie,o),$=n.memoizedState),(R=br||Qm(n,a,R,o,Y,$,v))?(W||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=$),g.props=o,g.state=$,g.context=v,o=R):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{g=n.stateNode,Au(e,n),v=n.memoizedProps,W=sl(a,v),g.props=W,ie=n.pendingProps,Y=g.context,$=a.contextType,R=zl,typeof $=="object"&&$!==null&&(R=Ut($)),C=a.getDerivedStateFromProps,($=typeof C=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(v!==ie||Y!==R)&&Km(n,g,o,R),br=!1,Y=n.memoizedState,g.state=Y,Fa(n,o,g,f),$a();var Z=n.memoizedState;v!==ie||Y!==Z||br||e!==null&&e.dependencies!==null&&ao(e.dependencies)?(typeof C=="function"&&(Ju(n,a,C,o),Z=n.memoizedState),(W=br||Qm(n,a,W,o,Y,Z,R)||e!==null&&e.dependencies!==null&&ao(e.dependencies))?($||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(o,Z,R),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(o,Z,R)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=Z),g.props=o,g.state=Z,g.context=R,o=W):(typeof g.componentDidUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(n.flags|=1024),o=!1)}return g=o,No(e,n),o=(n.flags&128)!==0,g||o?(g=n.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,e!==null&&o?(n.child=il(n,e.child,null,f),n.child=il(n,null,a,f)):Bt(e,n,a,f),n.memoizedState=g.state,e=n.child):e=Wn(e,n,f),e}function fp(e,n,a,o){return el(),n.flags|=256,Bt(e,n,a,o),n.child}var rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lc(e){return{baseLanes:e,cachePool:em()}}function ac(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=un),e}function dp(e,n,a){var o=n.pendingProps,f=!1,g=(n.flags&128)!==0,v;if((v=g)||(v=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),v&&(f=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(Fe){if(f?wr(n):kr(),(e=ct)?(e=vg(e,wn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:pr!==null?{id:On,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},a=Yh(e),a.return=n,n.child=a,Lt=n,ct=null)):e=null,e===null)throw yr(n);return Ic(e)?n.lanes=32:n.lanes=536870912,null}var C=o.children;return o=o.fallback,f?(kr(),f=n.mode,C=Eo({mode:"hidden",children:C},f),o=Wr(o,f,a,null),C.return=n,o.return=n,C.sibling=o,n.child=C,o=n.child,o.memoizedState=lc(a),o.childLanes=ac(e,v,a),n.memoizedState=rc,Qa(null,o)):(wr(n),ic(n,C))}var R=e.memoizedState;if(R!==null&&(C=R.dehydrated,C!==null)){if(g)n.flags&256?(wr(n),n.flags&=-257,n=oc(e,n,a)):n.memoizedState!==null?(kr(),n.child=e.child,n.flags|=128,n=null):(kr(),C=o.fallback,f=n.mode,o=Eo({mode:"visible",children:o.children},f),C=Wr(C,f,a,null),C.flags|=2,o.return=n,C.return=n,o.sibling=C,n.child=o,il(n,e.child,null,a),o=n.child,o.memoizedState=lc(a),o.childLanes=ac(e,v,a),n.memoizedState=rc,n=Qa(null,o));else if(wr(n),Ic(C)){if(v=C.nextSibling&&C.nextSibling.dataset,v)var $=v.dgst;v=$,o=Error(i(419)),o.stack="",o.digest=v,Ua({value:o,source:null,stack:null}),n=oc(e,n,a)}else if(Nt||Ul(e,n,a,!1),v=(a&e.childLanes)!==0,Nt||v){if(v=it,v!==null&&(o=Jd(v,a),o!==0&&o!==R.retryLane))throw R.retryLane=o,Jr(e,o),Wt(v,e,o),tc;qc(C)||_o(),n=oc(e,n,a)}else qc(C)?(n.flags|=192,n.child=e.child,n=null):(e=R.treeContext,ct=Cn(C.nextSibling),Lt=n,Fe=!0,gr=null,wn=!1,e!==null&&Xh(n,e),n=ic(n,o.children),n.flags|=4096);return n}return f?(kr(),C=o.fallback,f=n.mode,R=e.child,$=R.sibling,o=Pn(R,{mode:"hidden",children:o.children}),o.subtreeFlags=R.subtreeFlags&65011712,$!==null?C=Pn($,C):(C=Wr(C,f,a,null),C.flags|=2),C.return=n,o.return=n,o.sibling=C,n.child=o,Qa(null,o),o=n.child,C=e.child.memoizedState,C===null?C=lc(a):(f=C.cachePool,f!==null?(R=kt._currentValue,f=f.parent!==R?{parent:R,pool:R}:f):f=em(),C={baseLanes:C.baseLanes|a,cachePool:f}),o.memoizedState=C,o.childLanes=ac(e,v,a),n.memoizedState=rc,Qa(e.child,o)):(wr(n),a=e.child,e=a.sibling,a=Pn(a,{mode:"visible",children:o.children}),a.return=n,a.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=a,n.memoizedState=null,a)}function ic(e,n){return n=Eo({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Eo(e,n){return e=ln(22,e,null,n),e.lanes=0,e}function oc(e,n,a){return il(n,e.child,null,a),e=ic(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function hp(e,n,a){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),wu(e.return,n,a)}function sc(e,n,a,o,f,g){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:f,treeForkCount:g}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=a,v.tailMode=f,v.treeForkCount=g)}function mp(e,n,a){var o=n.pendingProps,f=o.revealOrder,g=o.tail;o=o.children;var v=St.current,C=(v&2)!==0;if(C?(v=v&1|2,n.flags|=128):v&=1,E(St,v),Bt(e,n,o,a),o=Fe?La:0,!C&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hp(e,a,n);else if(e.tag===19)hp(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(a=n.child,f=null;a!==null;)e=a.alternate,e!==null&&mo(e)===null&&(f=a),a=a.sibling;a=f,a===null?(f=n.child,n.child=null):(f=a.sibling,a.sibling=null),sc(n,!1,f,a,g,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&mo(e)===null){n.child=f;break}e=f.sibling,f.sibling=a,a=f,f=e}sc(n,!0,a,null,g,o);break;case"together":sc(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Wn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Er|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Ul(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,a=Pn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Pn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function uc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&ao(e)))}function _v(e,n,a){switch(n.tag){case 3:ye(n,n.stateNode.containerInfo),xr(n,kt,e.memoizedState.cache),el();break;case 27:case 5:Ae(n);break;case 4:ye(n,n.stateNode.containerInfo);break;case 10:xr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Ou(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(wr(n),n.flags|=128,null):(a&n.child.childLanes)!==0?dp(e,n,a):(wr(n),e=Wn(e,n,a),e!==null?e.sibling:null);wr(n);break;case 19:var f=(e.flags&128)!==0;if(o=(a&n.childLanes)!==0,o||(Ul(e,n,a,!1),o=(a&n.childLanes)!==0),f){if(o)return mp(e,n,a);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),E(St,St.current),o)break;return null;case 22:return n.lanes=0,ip(e,n,a,n.pendingProps);case 24:xr(n,kt,e.memoizedState.cache)}return Wn(e,n,a)}function pp(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)Nt=!0;else{if(!uc(e,a)&&(n.flags&128)===0)return Nt=!1,_v(e,n,a);Nt=(e.flags&131072)!==0}else Nt=!1,Fe&&(n.flags&1048576)!==0&&Ph(n,La,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=ll(n.elementType),n.type=e,typeof e=="function")mu(e)?(o=sl(e,o),n.tag=1,n=cp(null,n,e,o,a)):(n.tag=0,n=nc(null,n,e,o,a));else{if(e!=null){var f=e.$$typeof;if(f===F){n.tag=11,n=rp(null,n,e,o,a);break e}else if(f===G){n.tag=14,n=lp(null,n,e,o,a);break e}}throw n=oe(e)||e,Error(i(306,n,""))}}return n;case 0:return nc(e,n,n.type,n.pendingProps,a);case 1:return o=n.type,f=sl(o,n.pendingProps),cp(e,n,o,f,a);case 3:e:{if(ye(n,n.stateNode.containerInfo),e===null)throw Error(i(387));o=n.pendingProps;var g=n.memoizedState;f=g.element,Au(e,n),Fa(n,o,null,a);var v=n.memoizedState;if(o=v.cache,xr(n,kt,o),o!==g.cache&&ku(n,[kt],a,!0),$a(),o=v.element,g.isDehydrated)if(g={element:o,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=fp(e,n,o,a);break e}else if(o!==f){f=bn(Error(i(424)),n),Ua(f),n=fp(e,n,o,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ct=Cn(e.firstChild),Lt=n,Fe=!0,gr=null,wn=!0,a=im(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(el(),o===f){n=Wn(e,n,a);break e}Bt(e,n,o,a)}n=n.child}return n;case 26:return No(e,n),e===null?(a=Eg(n.type,null,n.pendingProps,null))?n.memoizedState=a:Fe||(a=n.type,e=n.pendingProps,o=Vo(ne.current).createElement(a),o[_t]=n,o[Pt]=e,Ht(o,a,e),Rt(o),n.stateNode=o):n.memoizedState=Eg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ae(n),e===null&&Fe&&(o=n.stateNode=kg(n.type,n.pendingProps,ne.current),Lt=n,wn=!0,f=ct,Dr(n.type)?(Vc=f,ct=Cn(o.firstChild)):ct=f),Bt(e,n,n.pendingProps.children,a),No(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Fe&&((f=o=ct)&&(o=fS(o,n.type,n.pendingProps,wn),o!==null?(n.stateNode=o,Lt=n,ct=Cn(o.firstChild),wn=!1,f=!0):f=!1),f||yr(n)),Ae(n),f=n.type,g=n.pendingProps,v=e!==null?e.memoizedProps:null,o=g.children,Uc(f,g)?o=null:v!==null&&Uc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=Lu(e,n,Ev,null,null,a),ci._currentValue=f),No(e,n),Bt(e,n,o,a),n.child;case 6:return e===null&&Fe&&((e=a=ct)&&(a=dS(a,n.pendingProps,wn),a!==null?(n.stateNode=a,Lt=n,ct=null,e=!0):e=!1),e||yr(n)),null;case 13:return dp(e,n,a);case 4:return ye(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=il(n,null,o,a):Bt(e,n,o,a),n.child;case 11:return rp(e,n,n.type,n.pendingProps,a);case 7:return Bt(e,n,n.pendingProps,a),n.child;case 8:return Bt(e,n,n.pendingProps.children,a),n.child;case 12:return Bt(e,n,n.pendingProps.children,a),n.child;case 10:return o=n.pendingProps,xr(n,n.type,o.value),Bt(e,n,o.children,a),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,nl(n),f=Ut(f),o=o(f),n.flags|=1,Bt(e,n,o,a),n.child;case 14:return lp(e,n,n.type,n.pendingProps,a);case 15:return ap(e,n,n.type,n.pendingProps,a);case 19:return mp(e,n,a);case 31:return Ov(e,n,a);case 22:return ip(e,n,a,n.pendingProps);case 24:return nl(n),o=Ut(kt),e===null?(f=Eu(),f===null&&(f=it,g=Cu(),f.pooledCache=g,g.refCount++,g!==null&&(f.pooledCacheLanes|=a),f=g),n.memoizedState={parent:o,cache:f},Tu(n),xr(n,kt,f)):((e.lanes&a)!==0&&(Au(e,n),Fa(n,null,null,a),$a()),f=e.memoizedState,g=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),xr(n,kt,o)):(o=g.cache,xr(n,kt,o),o!==f.cache&&ku(n,[kt],a,!0))),Bt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function er(e){e.flags|=4}function cc(e,n,a,o,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Vp())e.flags|=8192;else throw al=uo,ju}else e.flags&=-16777217}function gp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Dg(n))if(Vp())e.flags|=8192;else throw al=uo,ju}function jo(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Qd():536870912,e.lanes|=n,Ql|=n)}function Ka(e,n){if(!Fe)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ft(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(n)for(var f=e.child;f!==null;)a|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)a|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=a,n}function Lv(e,n,a){var o=n.pendingProps;switch(xu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(n),null;case 1:return ft(n),null;case 3:return a=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Kn(kt),ke(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ll(n)?er(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,vu())),ft(n),null;case 26:var f=n.type,g=n.memoizedState;return e===null?(er(n),g!==null?(ft(n),gp(n,g)):(ft(n),cc(n,f,null,o,a))):g?g!==e.memoizedState?(er(n),ft(n),gp(n,g)):(ft(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&er(n),ft(n),cc(n,f,e,o,a)),null;case 27:if(ht(n),a=ne.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&er(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return ft(n),null}e=O.current,Ll(n)?Qh(n):(e=kg(f,o,a),n.stateNode=e,er(n))}return ft(n),null;case 5:if(ht(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&er(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return ft(n),null}if(g=O.current,Ll(n))Qh(n);else{var v=Vo(ne.current);switch(g){case 1:g=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:g=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":g=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":g=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":g=v.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?g.multiple=!0:o.size&&(g.size=o.size);break;default:g=typeof o.is=="string"?v.createElement(f,{is:o.is}):v.createElement(f)}}g[_t]=n,g[Pt]=o;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)g.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=g;e:switch(Ht(g,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&er(n)}}return ft(n),cc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&er(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(i(166));if(e=ne.current,Ll(n)){if(e=n.stateNode,a=n.memoizedProps,o=null,f=Lt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[_t]=n,e=!!(e.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||dg(e.nodeValue,a)),e||yr(n,!0)}else e=Vo(e).createTextNode(o),e[_t]=n,n.stateNode=e}return ft(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(o=Ll(n),a!==null){if(e===null){if(!o)throw Error(i(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[_t]=n}else el(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ft(n),e=!1}else a=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(on(n),n):(on(n),null);if((n.flags&128)!==0)throw Error(i(558))}return ft(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Ll(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(i(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(i(317));f[_t]=n}else el(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ft(n),f=!1}else f=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(on(n),n):(on(n),null)}return on(n),(n.flags&128)!==0?(n.lanes=a,n):(a=o!==null,e=e!==null&&e.memoizedState!==null,a&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),g=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(g=o.memoizedState.cachePool.pool),g!==f&&(o.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),jo(n,n.updateQueue),ft(n),null);case 4:return ke(),e===null&&Rc(n.stateNode.containerInfo),ft(n),null;case 10:return Kn(n.type),ft(n),null;case 19:if(L(St),o=n.memoizedState,o===null)return ft(n),null;if(f=(n.flags&128)!==0,g=o.rendering,g===null)if(f)Ka(o,!1);else{if(bt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(g=mo(e),g!==null){for(n.flags|=128,Ka(o,!1),e=g.updateQueue,n.updateQueue=e,jo(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Fh(a,e),a=a.sibling;return E(St,St.current&1|2),Fe&&Xn(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&ue()>Ro&&(n.flags|=128,f=!0,Ka(o,!1),n.lanes=4194304)}else{if(!f)if(e=mo(g),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,jo(n,e),Ka(o,!0),o.tail===null&&o.tailMode==="hidden"&&!g.alternate&&!Fe)return ft(n),null}else 2*ue()-o.renderingStartTime>Ro&&a!==536870912&&(n.flags|=128,f=!0,Ka(o,!1),n.lanes=4194304);o.isBackwards?(g.sibling=n.child,n.child=g):(e=o.last,e!==null?e.sibling=g:n.child=g,o.last=g)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=ue(),e.sibling=null,a=St.current,E(St,f?a&1|2:a&1),Fe&&Xn(n,o.treeForkCount),e):(ft(n),null);case 22:case 23:return on(n),zu(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(ft(n),n.subtreeFlags&6&&(n.flags|=8192)):ft(n),a=n.updateQueue,a!==null&&jo(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),e!==null&&L(rl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Kn(kt),ft(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function Uv(e,n){switch(xu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Kn(kt),ke(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return ht(n),null;case 31:if(n.memoizedState!==null){if(on(n),n.alternate===null)throw Error(i(340));el()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(on(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));el()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return L(St),null;case 4:return ke(),null;case 10:return Kn(n.type),null;case 22:case 23:return on(n),zu(),e!==null&&L(rl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Kn(kt),null;case 25:return null;default:return null}}function yp(e,n){switch(xu(n),n.tag){case 3:Kn(kt),ke();break;case 26:case 27:case 5:ht(n);break;case 4:ke();break;case 31:n.memoizedState!==null&&on(n);break;case 13:on(n);break;case 19:L(St);break;case 10:Kn(n.type);break;case 22:case 23:on(n),zu(),e!==null&&L(rl);break;case 24:Kn(kt)}}function Za(e,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var f=o.next;a=f;do{if((a.tag&e)===e){o=void 0;var g=a.create,v=a.inst;o=g(),v.destroy=o}a=a.next}while(a!==f)}}catch(C){tt(n,n.return,C)}}function Cr(e,n,a){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var g=f.next;o=g;do{if((o.tag&e)===e){var v=o.inst,C=v.destroy;if(C!==void 0){v.destroy=void 0,f=n;var R=a,$=C;try{$()}catch(W){tt(f,R,W)}}}o=o.next}while(o!==g)}}catch(W){tt(n,n.return,W)}}function xp(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{sm(n,a)}catch(o){tt(e,e.return,o)}}}function bp(e,n,a){a.props=sl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(o){tt(e,n,o)}}function Ja(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof a=="function"?e.refCleanup=a(o):a.current=o}}catch(f){tt(e,n,f)}}function Ln(e,n){var a=e.ref,o=e.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(f){tt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){tt(e,n,f)}else a.current=null}function vp(e){var n=e.type,a=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(f){tt(e,e.return,f)}}function fc(e,n,a){try{var o=e.stateNode;aS(o,e.type,a,n),o[Pt]=n}catch(f){tt(e,e.return,f)}}function Sp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dr(e.type)||e.tag===4}function dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Dr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function hc(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Yn));else if(o!==4&&(o===27&&Dr(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(hc(e,n,a),e=e.sibling;e!==null;)hc(e,n,a),e=e.sibling}function To(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(o!==4&&(o===27&&Dr(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(To(e,n,a),e=e.sibling;e!==null;)To(e,n,a),e=e.sibling}function wp(e){var n=e.stateNode,a=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Ht(n,o,a),n[_t]=e,n[Pt]=a}catch(g){tt(e,e.return,g)}}var tr=!1,Et=!1,mc=!1,kp=typeof WeakSet=="function"?WeakSet:Set,zt=null;function Bv(e,n){if(e=e.containerInfo,_c=Qo,e=_h(e),ou(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var f=o.anchorOffset,g=o.focusNode;o=o.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var v=0,C=-1,R=-1,$=0,W=0,ie=e,Y=null;t:for(;;){for(var Z;ie!==a||f!==0&&ie.nodeType!==3||(C=v+f),ie!==g||o!==0&&ie.nodeType!==3||(R=v+o),ie.nodeType===3&&(v+=ie.nodeValue.length),(Z=ie.firstChild)!==null;)Y=ie,ie=Z;for(;;){if(ie===e)break t;if(Y===a&&++$===f&&(C=v),Y===g&&++W===o&&(R=v),(Z=ie.nextSibling)!==null)break;ie=Y,Y=ie.parentNode}ie=Z}a=C===-1||R===-1?null:{start:C,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Lc={focusedElem:e,selectionRange:a},Qo=!1,zt=n;zt!==null;)if(n=zt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,zt=e;else for(;zt!==null;){switch(n=zt,g=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)f=e[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&g!==null){e=void 0,a=n,f=g.memoizedProps,g=g.memoizedState,o=a.stateNode;try{var xe=sl(a.type,f);e=o.getSnapshotBeforeUpdate(xe,g),o.__reactInternalSnapshotBeforeUpdate=e}catch(je){tt(a,a.return,je)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Hc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=n.sibling,e!==null){e.return=n.return,zt=e;break}zt=n.return}}function Cp(e,n,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:rr(e,a),o&4&&Za(5,a);break;case 1:if(rr(e,a),o&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(v){tt(a,a.return,v)}else{var f=sl(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){tt(a,a.return,v)}}o&64&&xp(a),o&512&&Ja(a,a.return);break;case 3:if(rr(e,a),o&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{sm(e,n)}catch(v){tt(a,a.return,v)}}break;case 27:n===null&&o&4&&wp(a);case 26:case 5:rr(e,a),n===null&&o&4&&vp(a),o&512&&Ja(a,a.return);break;case 12:rr(e,a);break;case 31:rr(e,a),o&4&&jp(e,a);break;case 13:rr(e,a),o&4&&Tp(e,a),o&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Pv.bind(null,a),hS(e,a))));break;case 22:if(o=a.memoizedState!==null||tr,!o){n=n!==null&&n.memoizedState!==null||Et,f=tr;var g=Et;tr=o,(Et=n)&&!g?lr(e,a,(a.subtreeFlags&8772)!==0):rr(e,a),tr=f,Et=g}break;case 30:break;default:rr(e,a)}}function Np(e){var n=e.alternate;n!==null&&(e.alternate=null,Np(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Fs(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mt=null,Qt=!1;function nr(e,n,a){for(a=a.child;a!==null;)Ep(e,n,a),a=a.sibling}function Ep(e,n,a){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(gt,a)}catch{}switch(a.tag){case 26:Et||Ln(a,n),nr(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Et||Ln(a,n);var o=mt,f=Qt;Dr(a.type)&&(mt=a.stateNode,Qt=!1),nr(e,n,a),oi(a.stateNode),mt=o,Qt=f;break;case 5:Et||Ln(a,n);case 6:if(o=mt,f=Qt,mt=null,nr(e,n,a),mt=o,Qt=f,mt!==null)if(Qt)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(g){tt(a,n,g)}else try{mt.removeChild(a.stateNode)}catch(g){tt(a,n,g)}break;case 18:mt!==null&&(Qt?(e=mt,xg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ra(e)):xg(mt,a.stateNode));break;case 4:o=mt,f=Qt,mt=a.stateNode.containerInfo,Qt=!0,nr(e,n,a),mt=o,Qt=f;break;case 0:case 11:case 14:case 15:Cr(2,a,n),Et||Cr(4,a,n),nr(e,n,a);break;case 1:Et||(Ln(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"&&bp(a,n,o)),nr(e,n,a);break;case 21:nr(e,n,a);break;case 22:Et=(o=Et)||a.memoizedState!==null,nr(e,n,a),Et=o;break;default:nr(e,n,a)}}function jp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ra(e)}catch(a){tt(n,n.return,a)}}}function Tp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ra(e)}catch(a){tt(n,n.return,a)}}function Hv(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new kp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new kp),n;default:throw Error(i(435,e.tag))}}function Ao(e,n){var a=Hv(e);n.forEach(function(o){if(!a.has(o)){a.add(o);var f=Xv.bind(null,e,o);o.then(f,f)}})}function Kt(e,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var f=a[o],g=e,v=n,C=v;e:for(;C!==null;){switch(C.tag){case 27:if(Dr(C.type)){mt=C.stateNode,Qt=!1;break e}break;case 5:mt=C.stateNode,Qt=!1;break e;case 3:case 4:mt=C.stateNode.containerInfo,Qt=!0;break e}C=C.return}if(mt===null)throw Error(i(160));Ep(g,v,f),mt=null,Qt=!1,g=f.alternate,g!==null&&(g.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Ap(n,e),n=n.sibling}var Mn=null;function Ap(e,n){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kt(n,e),Zt(e),o&4&&(Cr(3,e,e.return),Za(3,e),Cr(5,e,e.return));break;case 1:Kt(n,e),Zt(e),o&512&&(Et||a===null||Ln(a,a.return)),o&64&&tr&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var f=Mn;if(Kt(n,e),Zt(e),o&512&&(Et||a===null||Ln(a,a.return)),o&4){var g=a!==null?a.memoizedState:null;if(o=e.memoizedState,a===null)if(o===null)if(e.stateNode===null){e:{o=e.type,a=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":g=f.getElementsByTagName("title")[0],(!g||g[Na]||g[_t]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=f.createElement(o),f.head.insertBefore(g,f.querySelector("head > title"))),Ht(g,o,a),g[_t]=e,Rt(g),o=g;break e;case"link":var v=Ag("link","href",f).get(o+(a.href||""));if(v){for(var C=0;C<v.length;C++)if(g=v[C],g.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&g.getAttribute("rel")===(a.rel==null?null:a.rel)&&g.getAttribute("title")===(a.title==null?null:a.title)&&g.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(C,1);break t}}g=f.createElement(o),Ht(g,o,a),f.head.appendChild(g);break;case"meta":if(v=Ag("meta","content",f).get(o+(a.content||""))){for(C=0;C<v.length;C++)if(g=v[C],g.getAttribute("content")===(a.content==null?null:""+a.content)&&g.getAttribute("name")===(a.name==null?null:a.name)&&g.getAttribute("property")===(a.property==null?null:a.property)&&g.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&g.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(C,1);break t}}g=f.createElement(o),Ht(g,o,a),f.head.appendChild(g);break;default:throw Error(i(468,o))}g[_t]=e,Rt(g),o=g}e.stateNode=o}else Mg(f,e.type,e.stateNode);else e.stateNode=Tg(f,o,e.memoizedProps);else g!==o?(g===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):g.count--,o===null?Mg(f,e.type,e.stateNode):Tg(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&fc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Kt(n,e),Zt(e),o&512&&(Et||a===null||Ln(a,a.return)),a!==null&&o&4&&fc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Kt(n,e),Zt(e),o&512&&(Et||a===null||Ln(a,a.return)),e.flags&32){f=e.stateNode;try{El(f,"")}catch(xe){tt(e,e.return,xe)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,fc(e,f,a!==null?a.memoizedProps:f)),o&1024&&(mc=!0);break;case 6:if(Kt(n,e),Zt(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,a=e.stateNode;try{a.nodeValue=o}catch(xe){tt(e,e.return,xe)}}break;case 3:if(Yo=null,f=Mn,Mn=$o(n.containerInfo),Kt(n,e),Mn=f,Zt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{ra(n.containerInfo)}catch(xe){tt(e,e.return,xe)}mc&&(mc=!1,Mp(e));break;case 4:o=Mn,Mn=$o(e.stateNode.containerInfo),Kt(n,e),Zt(e),Mn=o;break;case 12:Kt(n,e),Zt(e);break;case 31:Kt(n,e),Zt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ao(e,o)));break;case 13:Kt(n,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Do=ue()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ao(e,o)));break;case 22:f=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,$=tr,W=Et;if(tr=$||f,Et=W||R,Kt(n,e),Et=W,tr=$,Zt(e),o&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(a===null||R||tr||Et||ul(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){R=a=n;try{if(g=R.stateNode,f)v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{C=R.stateNode;var ie=R.memoizedProps.style,Y=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;C.style.display=Y==null||typeof Y=="boolean"?"":(""+Y).trim()}}catch(xe){tt(R,R.return,xe)}}}else if(n.tag===6){if(a===null){R=n;try{R.stateNode.nodeValue=f?"":R.memoizedProps}catch(xe){tt(R,R.return,xe)}}}else if(n.tag===18){if(a===null){R=n;try{var Z=R.stateNode;f?bg(Z,!0):bg(R.stateNode,!1)}catch(xe){tt(R,R.return,xe)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Ao(e,a))));break;case 19:Kt(n,e),Zt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ao(e,o)));break;case 30:break;case 21:break;default:Kt(n,e),Zt(e)}}function Zt(e){var n=e.flags;if(n&2){try{for(var a,o=e.return;o!==null;){if(Sp(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var f=a.stateNode,g=dc(e);To(e,g,f);break;case 5:var v=a.stateNode;a.flags&32&&(El(v,""),a.flags&=-33);var C=dc(e);To(e,C,v);break;case 3:case 4:var R=a.stateNode.containerInfo,$=dc(e);hc(e,$,R);break;default:throw Error(i(161))}}catch(W){tt(e,e.return,W)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Mp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Mp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function rr(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Cp(e,n.alternate,n),n=n.sibling}function ul(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Cr(4,n,n.return),ul(n);break;case 1:Ln(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&bp(n,n.return,a),ul(n);break;case 27:oi(n.stateNode);case 26:case 5:Ln(n,n.return),ul(n);break;case 22:n.memoizedState===null&&ul(n);break;case 30:ul(n);break;default:ul(n)}e=e.sibling}}function lr(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,g=n,v=g.flags;switch(g.tag){case 0:case 11:case 15:lr(f,g,a),Za(4,g);break;case 1:if(lr(f,g,a),o=g,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch($){tt(o,o.return,$)}if(o=g,f=o.updateQueue,f!==null){var C=o.stateNode;try{var R=f.shared.hiddenCallbacks;if(R!==null)for(f.shared.hiddenCallbacks=null,f=0;f<R.length;f++)om(R[f],C)}catch($){tt(o,o.return,$)}}a&&v&64&&xp(g),Ja(g,g.return);break;case 27:wp(g);case 26:case 5:lr(f,g,a),a&&o===null&&v&4&&vp(g),Ja(g,g.return);break;case 12:lr(f,g,a);break;case 31:lr(f,g,a),a&&v&4&&jp(f,g);break;case 13:lr(f,g,a),a&&v&4&&Tp(f,g);break;case 22:g.memoizedState===null&&lr(f,g,a),Ja(g,g.return);break;case 30:break;default:lr(f,g,a)}n=n.sibling}}function pc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ba(a))}function gc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ba(e))}function Dn(e,n,a,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Dp(e,n,a,o),n=n.sibling}function Dp(e,n,a,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Dn(e,n,a,o),f&2048&&Za(9,n);break;case 1:Dn(e,n,a,o);break;case 3:Dn(e,n,a,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ba(e)));break;case 12:if(f&2048){Dn(e,n,a,o),e=n.stateNode;try{var g=n.memoizedProps,v=g.id,C=g.onPostCommit;typeof C=="function"&&C(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){tt(n,n.return,R)}}else Dn(e,n,a,o);break;case 31:Dn(e,n,a,o);break;case 13:Dn(e,n,a,o);break;case 23:break;case 22:g=n.stateNode,v=n.alternate,n.memoizedState!==null?g._visibility&2?Dn(e,n,a,o):Wa(e,n):g._visibility&2?Dn(e,n,a,o):(g._visibility|=2,Gl(e,n,a,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&pc(v,n);break;case 24:Dn(e,n,a,o),f&2048&&gc(n.alternate,n);break;default:Dn(e,n,a,o)}}function Gl(e,n,a,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=e,v=n,C=a,R=o,$=v.flags;switch(v.tag){case 0:case 11:case 15:Gl(g,v,C,R,f),Za(8,v);break;case 23:break;case 22:var W=v.stateNode;v.memoizedState!==null?W._visibility&2?Gl(g,v,C,R,f):Wa(g,v):(W._visibility|=2,Gl(g,v,C,R,f)),f&&$&2048&&pc(v.alternate,v);break;case 24:Gl(g,v,C,R,f),f&&$&2048&&gc(v.alternate,v);break;default:Gl(g,v,C,R,f)}n=n.sibling}}function Wa(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,o=n,f=o.flags;switch(o.tag){case 22:Wa(a,o),f&2048&&pc(o.alternate,o);break;case 24:Wa(a,o),f&2048&&gc(o.alternate,o);break;default:Wa(a,o)}n=n.sibling}}var ei=8192;function Pl(e,n,a){if(e.subtreeFlags&ei)for(e=e.child;e!==null;)Rp(e,n,a),e=e.sibling}function Rp(e,n,a){switch(e.tag){case 26:Pl(e,n,a),e.flags&ei&&e.memoizedState!==null&&NS(a,Mn,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,n,a);break;case 3:case 4:var o=Mn;Mn=$o(e.stateNode.containerInfo),Pl(e,n,a),Mn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=ei,ei=16777216,Pl(e,n,a),ei=o):Pl(e,n,a));break;default:Pl(e,n,a)}}function zp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function ti(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];zt=o,_p(o,e)}zp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Op(e),e=e.sibling}function Op(e){switch(e.tag){case 0:case 11:case 15:ti(e),e.flags&2048&&Cr(9,e,e.return);break;case 3:ti(e);break;case 12:ti(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Mo(e)):ti(e);break;default:ti(e)}}function Mo(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];zt=o,_p(o,e)}zp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Cr(8,n,n.return),Mo(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Mo(n));break;default:Mo(n)}e=e.sibling}}function _p(e,n){for(;zt!==null;){var a=zt;switch(a.tag){case 0:case 11:case 15:Cr(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Ba(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,zt=o;else e:for(a=e;zt!==null;){o=zt;var f=o.sibling,g=o.return;if(Np(o),o===a){zt=null;break e}if(f!==null){f.return=g,zt=f;break e}zt=g}}}var qv={getCacheForType:function(e){var n=Ut(kt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return Ut(kt).controller.signal}},Iv=typeof WeakMap=="function"?WeakMap:Map,Je=0,it=null,Ue=null,qe=0,et=0,sn=null,Nr=!1,Xl=!1,yc=!1,ar=0,bt=0,Er=0,cl=0,xc=0,un=0,Ql=0,ni=null,Jt=null,bc=!1,Do=0,Lp=0,Ro=1/0,zo=null,jr=null,At=0,Tr=null,Kl=null,ir=0,vc=0,Sc=null,Up=null,ri=0,wc=null;function cn(){return(Je&2)!==0&&qe!==0?qe&-qe:H.T!==null?Tc():Wd()}function Bp(){if(un===0)if((qe&536870912)===0||Fe){var e=qi;qi<<=1,(qi&3932160)===0&&(qi=262144),un=e}else un=536870912;return e=an.current,e!==null&&(e.flags|=32),un}function Wt(e,n,a){(e===it&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(Zl(e,0),Ar(e,qe,un,!1)),Ca(e,a),((Je&2)===0||e!==it)&&(e===it&&((Je&2)===0&&(cl|=a),bt===4&&Ar(e,qe,un,!1)),Un(e))}function Hp(e,n,a){if((Je&6)!==0)throw Error(i(327));var o=!a&&(n&127)===0&&(n&e.expiredLanes)===0||ka(e,n),f=o?Fv(e,n):Cc(e,n,!0),g=o;do{if(f===0){Xl&&!o&&Ar(e,n,0,!1);break}else{if(a=e.current.alternate,g&&!Vv(a)){f=Cc(e,n,!1),g=!1;continue}if(f===2){if(g=n,e.errorRecoveryDisabledLanes&g)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var C=e;f=ni;var R=C.current.memoizedState.isDehydrated;if(R&&(Zl(C,v).flags|=256),v=Cc(C,v,!1),v!==2){if(yc&&!R){C.errorRecoveryDisabledLanes|=g,cl|=g,f=4;break e}g=Jt,Jt=f,g!==null&&(Jt===null?Jt=g:Jt.push.apply(Jt,g))}f=v}if(g=!1,f!==2)continue}}if(f===1){Zl(e,0),Ar(e,n,0,!0);break}e:{switch(o=e,g=f,g){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:Ar(o,n,un,!Nr);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(f=Do+300-ue(),10<f)){if(Ar(o,n,un,!Nr),Vi(o,0,!0)!==0)break e;ir=n,o.timeoutHandle=gg(qp.bind(null,o,a,Jt,zo,bc,n,un,cl,Ql,Nr,g,"Throttled",-0,0),f);break e}qp(o,a,Jt,zo,bc,n,un,cl,Ql,Nr,g,null,-0,0)}}break}while(!0);Un(e)}function qp(e,n,a,o,f,g,v,C,R,$,W,ie,Y,Z){if(e.timeoutHandle=-1,ie=n.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},Rp(n,g,ie);var xe=(g&62914560)===g?Do-ue():(g&4194048)===g?Lp-ue():0;if(xe=ES(ie,xe),xe!==null){ir=g,e.cancelPendingCommit=xe(Xp.bind(null,e,n,g,a,o,f,v,C,R,W,ie,null,Y,Z)),Ar(e,g,v,!$);return}}Xp(e,n,g,a,o,f,v,C,R)}function Vv(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var f=a[o],g=f.getSnapshot;f=f.value;try{if(!rn(g(),f))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ar(e,n,a,o){n&=~xc,n&=~cl,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var g=31-We(f),v=1<<g;o[g]=-1,f&=~v}a!==0&&Kd(e,a,n)}function Oo(){return(Je&6)===0?(li(0),!1):!0}function kc(){if(Ue!==null){if(et===0)var e=Ue.return;else e=Ue,Qn=tl=null,Hu(e),Il=null,qa=0,e=Ue;for(;e!==null;)yp(e.alternate,e),e=e.return;Ue=null}}function Zl(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,sS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ir=0,kc(),it=e,Ue=a=Pn(e.current,null),qe=n,et=0,sn=null,Nr=!1,Xl=ka(e,n),yc=!1,Ql=un=xc=cl=Er=bt=0,Jt=ni=null,bc=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-We(o),g=1<<f;n|=e[f],o&=~g}return ar=n,eo(),a}function Ip(e,n){De=null,H.H=Xa,n===ql||n===so?(n=rm(),et=3):n===ju?(n=rm(),et=4):et=n===tc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,sn=n,Ue===null&&(bt=1,ko(e,bn(n,e.current)))}function Vp(){var e=an.current;return e===null?!0:(qe&4194048)===qe?kn===null:(qe&62914560)===qe||(qe&536870912)!==0?e===kn:!1}function $p(){var e=H.H;return H.H=Xa,e===null?Xa:e}function Fp(){var e=H.A;return H.A=qv,e}function _o(){bt=4,Nr||(qe&4194048)!==qe&&an.current!==null||(Xl=!0),(Er&134217727)===0&&(cl&134217727)===0||it===null||Ar(it,qe,un,!1)}function Cc(e,n,a){var o=Je;Je|=2;var f=$p(),g=Fp();(it!==e||qe!==n)&&(zo=null,Zl(e,n)),n=!1;var v=bt;e:do try{if(et!==0&&Ue!==null){var C=Ue,R=sn;switch(et){case 8:kc(),v=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(n=!0);var $=et;if(et=0,sn=null,Jl(e,C,R,$),a&&Xl){v=0;break e}break;default:$=et,et=0,sn=null,Jl(e,C,R,$)}}$v(),v=bt;break}catch(W){Ip(e,W)}while(!0);return n&&e.shellSuspendCounter++,Qn=tl=null,Je=o,H.H=f,H.A=g,Ue===null&&(it=null,qe=0,eo()),v}function $v(){for(;Ue!==null;)Yp(Ue)}function Fv(e,n){var a=Je;Je|=2;var o=$p(),f=Fp();it!==e||qe!==n?(zo=null,Ro=ue()+500,Zl(e,n)):Xl=ka(e,n);e:do try{if(et!==0&&Ue!==null){n=Ue;var g=sn;t:switch(et){case 1:et=0,sn=null,Jl(e,n,g,1);break;case 2:case 9:if(tm(g)){et=0,sn=null,Gp(n);break}n=function(){et!==2&&et!==9||it!==e||(et=7),Un(e)},g.then(n,n);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:tm(g)?(et=0,sn=null,Gp(n)):(et=0,sn=null,Jl(e,n,g,7));break;case 5:var v=null;switch(Ue.tag){case 26:v=Ue.memoizedState;case 5:case 27:var C=Ue;if(v?Dg(v):C.stateNode.complete){et=0,sn=null;var R=C.sibling;if(R!==null)Ue=R;else{var $=C.return;$!==null?(Ue=$,Lo($)):Ue=null}break t}}et=0,sn=null,Jl(e,n,g,5);break;case 6:et=0,sn=null,Jl(e,n,g,6);break;case 8:kc(),bt=6;break e;default:throw Error(i(462))}}Yv();break}catch(W){Ip(e,W)}while(!0);return Qn=tl=null,H.H=o,H.A=f,Je=a,Ue!==null?0:(it=null,qe=0,eo(),bt)}function Yv(){for(;Ue!==null&&!Gr();)Yp(Ue)}function Yp(e){var n=pp(e.alternate,e,ar);e.memoizedProps=e.pendingProps,n===null?Lo(e):Ue=n}function Gp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=up(a,n,n.pendingProps,n.type,void 0,qe);break;case 11:n=up(a,n,n.pendingProps,n.type.render,n.ref,qe);break;case 5:Hu(n);default:yp(a,n),n=Ue=Fh(n,ar),n=pp(a,n,ar)}e.memoizedProps=e.pendingProps,n===null?Lo(e):Ue=n}function Jl(e,n,a,o){Qn=tl=null,Hu(n),Il=null,qa=0;var f=n.return;try{if(zv(e,f,n,a,qe)){bt=1,ko(e,bn(a,e.current)),Ue=null;return}}catch(g){if(f!==null)throw Ue=f,g;bt=1,ko(e,bn(a,e.current)),Ue=null;return}n.flags&32768?(Fe||o===1?e=!0:Xl||(qe&536870912)!==0?e=!1:(Nr=e=!0,(o===2||o===9||o===3||o===6)&&(o=an.current,o!==null&&o.tag===13&&(o.flags|=16384))),Pp(n,e)):Lo(n)}function Lo(e){var n=e;do{if((n.flags&32768)!==0){Pp(n,Nr);return}e=n.return;var a=Lv(n.alternate,n,ar);if(a!==null){Ue=a;return}if(n=n.sibling,n!==null){Ue=n;return}Ue=n=e}while(n!==null);bt===0&&(bt=5)}function Pp(e,n){do{var a=Uv(e.alternate,e);if(a!==null){a.flags&=32767,Ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=a}while(e!==null);bt=6,Ue=null}function Xp(e,n,a,o,f,g,v,C,R){e.cancelPendingCommit=null;do Uo();while(At!==0);if((Je&6)!==0)throw Error(i(327));if(n!==null){if(n===e.current)throw Error(i(177));if(g=n.lanes|n.childLanes,g|=du,Cb(e,a,g,v,C,R),e===it&&(Ue=it=null,qe=0),Kl=n,Tr=e,ir=a,vc=g,Sc=f,Up=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Qv(Ce,function(){return Wp(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=H.T,H.T=null,f=te.p,te.p=2,v=Je,Je|=4;try{Bv(e,n,a)}finally{Je=v,te.p=f,H.T=o}}At=1,Qp(),Kp(),Zp()}}function Qp(){if(At===1){At=0;var e=Tr,n=Kl,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var o=te.p;te.p=2;var f=Je;Je|=4;try{Ap(n,e);var g=Lc,v=_h(e.containerInfo),C=g.focusedElem,R=g.selectionRange;if(v!==C&&C&&C.ownerDocument&&Oh(C.ownerDocument.documentElement,C)){if(R!==null&&ou(C)){var $=R.start,W=R.end;if(W===void 0&&(W=$),"selectionStart"in C)C.selectionStart=$,C.selectionEnd=Math.min(W,C.value.length);else{var ie=C.ownerDocument||document,Y=ie&&ie.defaultView||window;if(Y.getSelection){var Z=Y.getSelection(),xe=C.textContent.length,je=Math.min(R.start,xe),at=R.end===void 0?je:Math.min(R.end,xe);!Z.extend&&je>at&&(v=at,at=je,je=v);var I=zh(C,je),_=zh(C,at);if(I&&_&&(Z.rangeCount!==1||Z.anchorNode!==I.node||Z.anchorOffset!==I.offset||Z.focusNode!==_.node||Z.focusOffset!==_.offset)){var V=ie.createRange();V.setStart(I.node,I.offset),Z.removeAllRanges(),je>at?(Z.addRange(V),Z.extend(_.node,_.offset)):(V.setEnd(_.node,_.offset),Z.addRange(V))}}}}for(ie=[],Z=C;Z=Z.parentNode;)Z.nodeType===1&&ie.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<ie.length;C++){var re=ie[C];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Qo=!!_c,Lc=_c=null}finally{Je=f,te.p=o,H.T=a}}e.current=n,At=2}}function Kp(){if(At===2){At=0;var e=Tr,n=Kl,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var o=te.p;te.p=2;var f=Je;Je|=4;try{Cp(e,n.alternate,n)}finally{Je=f,te.p=o,H.T=a}}At=3}}function Zp(){if(At===4||At===3){At=0,fr();var e=Tr,n=Kl,a=ir,o=Up;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?At=5:(At=0,Kl=Tr=null,Jp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(jr=null),Vs(a),n=n.stateNode,st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(gt,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=H.T,f=te.p,te.p=2,H.T=null;try{for(var g=e.onRecoverableError,v=0;v<o.length;v++){var C=o[v];g(C.value,{componentStack:C.stack})}}finally{H.T=n,te.p=f}}(ir&3)!==0&&Uo(),Un(e),f=e.pendingLanes,(a&261930)!==0&&(f&42)!==0?e===wc?ri++:(ri=0,wc=e):ri=0,li(0)}}function Jp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ba(n)))}function Uo(){return Qp(),Kp(),Zp(),Wp()}function Wp(){if(At!==5)return!1;var e=Tr,n=vc;vc=0;var a=Vs(ir),o=H.T,f=te.p;try{te.p=32>a?32:a,H.T=null,a=Sc,Sc=null;var g=Tr,v=ir;if(At=0,Kl=Tr=null,ir=0,(Je&6)!==0)throw Error(i(331));var C=Je;if(Je|=4,Op(g.current),Dp(g,g.current,v,a),Je=C,li(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(gt,g)}catch{}return!0}finally{te.p=f,H.T=o,Jp(e,n)}}function eg(e,n,a){n=bn(a,n),n=ec(e.stateNode,n,2),e=Sr(e,n,2),e!==null&&(Ca(e,2),Un(e))}function tt(e,n,a){if(e.tag===3)eg(e,e,a);else for(;n!==null;){if(n.tag===3){eg(n,e,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(jr===null||!jr.has(o))){e=bn(a,e),a=tp(2),o=Sr(n,a,2),o!==null&&(np(a,o,n,e),Ca(o,2),Un(o));break}}n=n.return}}function Nc(e,n,a){var o=e.pingCache;if(o===null){o=e.pingCache=new Iv;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(a)||(yc=!0,f.add(a),e=Gv.bind(null,e,n,a),n.then(e,e))}function Gv(e,n,a){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,it===e&&(qe&a)===a&&(bt===4||bt===3&&(qe&62914560)===qe&&300>ue()-Do?(Je&2)===0&&Zl(e,0):xc|=a,Ql===qe&&(Ql=0)),Un(e)}function tg(e,n){n===0&&(n=Qd()),e=Jr(e,n),e!==null&&(Ca(e,n),Un(e))}function Pv(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),tg(e,a)}function Xv(e,n){var a=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(n),tg(e,a)}function Qv(e,n){return Mt(e,n)}var Bo=null,Wl=null,Ec=!1,Ho=!1,jc=!1,Mr=0;function Un(e){e!==Wl&&e.next===null&&(Wl===null?Bo=Wl=e:Wl=Wl.next=e),Ho=!0,Ec||(Ec=!0,Zv())}function li(e,n){if(!jc&&Ho){jc=!0;do for(var a=!1,o=Bo;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var g=0;else{var v=o.suspendedLanes,C=o.pingedLanes;g=(1<<31-We(42|e)+1)-1,g&=f&~(v&~C),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(a=!0,ag(o,g))}else g=qe,g=Vi(o,o===it?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(g&3)===0||ka(o,g)||(a=!0,ag(o,g));o=o.next}while(a);jc=!1}}function Kv(){ng()}function ng(){Ho=Ec=!1;var e=0;Mr!==0&&oS()&&(e=Mr);for(var n=ue(),a=null,o=Bo;o!==null;){var f=o.next,g=rg(o,n);g===0?(o.next=null,a===null?Bo=f:a.next=f,f===null&&(Wl=a)):(a=o,(e!==0||(g&3)!==0)&&(Ho=!0)),o=f}At!==0&&At!==5||li(e),Mr!==0&&(Mr=0)}function rg(e,n){for(var a=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,g=e.pendingLanes&-62914561;0<g;){var v=31-We(g),C=1<<v,R=f[v];R===-1?((C&a)===0||(C&o)!==0)&&(f[v]=kb(C,n)):R<=n&&(e.expiredLanes|=C),g&=~C}if(n=it,a=qe,a=Vi(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,a===0||e===n&&(et===2||et===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&pn(o),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ka(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(o!==null&&pn(o),Vs(a)){case 2:case 8:a=fe;break;case 32:a=Ce;break;case 268435456:a=Ye;break;default:a=Ce}return o=lg.bind(null,e),a=Mt(a,o),e.callbackPriority=n,e.callbackNode=a,n}return o!==null&&o!==null&&pn(o),e.callbackPriority=2,e.callbackNode=null,2}function lg(e,n){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Uo()&&e.callbackNode!==a)return null;var o=qe;return o=Vi(e,e===it?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Hp(e,o,n),rg(e,ue()),e.callbackNode!=null&&e.callbackNode===a?lg.bind(null,e):null)}function ag(e,n){if(Uo())return null;Hp(e,n,!0)}function Zv(){uS(function(){(Je&6)!==0?Mt(K,Kv):ng()})}function Tc(){if(Mr===0){var e=Bl;e===0&&(e=Hi,Hi<<=1,(Hi&261888)===0&&(Hi=256)),Mr=e}return Mr}function ig(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Gi(""+e)}function og(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function Jv(e,n,a,o,f){if(n==="submit"&&a&&a.stateNode===f){var g=ig((f[Pt]||null).action),v=o.submitter;v&&(n=(n=v[Pt]||null)?ig(n.formAction):v.getAttribute("formAction"),n!==null&&(g=n,v=null));var C=new Ki("action","action",null,o,f);e.push({event:C,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Mr!==0){var R=v?og(f,v):new FormData(f);Xu(a,{pending:!0,data:R,method:f.method,action:g},null,R)}}else typeof g=="function"&&(C.preventDefault(),R=v?og(f,v):new FormData(f),Xu(a,{pending:!0,data:R,method:f.method,action:g},g,R))},currentTarget:f}]})}}for(var Ac=0;Ac<fu.length;Ac++){var Mc=fu[Ac],Wv=Mc.toLowerCase(),eS=Mc[0].toUpperCase()+Mc.slice(1);An(Wv,"on"+eS)}An(Bh,"onAnimationEnd"),An(Hh,"onAnimationIteration"),An(qh,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(gv,"onTransitionRun"),An(yv,"onTransitionStart"),An(xv,"onTransitionCancel"),An(Ih,"onTransitionEnd"),Cl("onMouseEnter",["mouseout","mouseover"]),Cl("onMouseLeave",["mouseout","mouseover"]),Cl("onPointerEnter",["pointerout","pointerover"]),Cl("onPointerLeave",["pointerout","pointerover"]),Xr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ai="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(" "),tS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ai));function sg(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],f=o.event;o=o.listeners;e:{var g=void 0;if(n)for(var v=o.length-1;0<=v;v--){var C=o[v],R=C.instance,$=C.currentTarget;if(C=C.listener,R!==g&&f.isPropagationStopped())break e;g=C,f.currentTarget=$;try{g(f)}catch(W){Wi(W)}f.currentTarget=null,g=R}else for(v=0;v<o.length;v++){if(C=o[v],R=C.instance,$=C.currentTarget,C=C.listener,R!==g&&f.isPropagationStopped())break e;g=C,f.currentTarget=$;try{g(f)}catch(W){Wi(W)}f.currentTarget=null,g=R}}}}function Be(e,n){var a=n[$s];a===void 0&&(a=n[$s]=new Set);var o=e+"__bubble";a.has(o)||(ug(n,e,2,!1),a.add(o))}function Dc(e,n,a){var o=0;n&&(o|=4),ug(a,e,o,n)}var qo="_reactListening"+Math.random().toString(36).slice(2);function Rc(e){if(!e[qo]){e[qo]=!0,nh.forEach(function(a){a!=="selectionchange"&&(tS.has(a)||Dc(a,!1,e),Dc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[qo]||(n[qo]=!0,Dc("selectionchange",!1,n))}}function ug(e,n,a,o){switch(Bg(n)){case 2:var f=AS;break;case 8:f=MS;break;default:f=Pc}a=f.bind(null,n,a,e),f=void 0,!Js||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,a,{capture:!0,passive:f}):e.addEventListener(n,a,!0):f!==void 0?e.addEventListener(n,a,{passive:f}):e.addEventListener(n,a,!1)}function zc(e,n,a,o,f){var g=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var C=o.stateNode.containerInfo;if(C===f)break;if(v===4)for(v=o.return;v!==null;){var R=v.tag;if((R===3||R===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;C!==null;){if(v=Sl(C),v===null)return;if(R=v.tag,R===5||R===6||R===26||R===27){o=g=v;continue e}C=C.parentNode}}o=o.return}mh(function(){var $=g,W=Ks(a),ie=[];e:{var Y=Vh.get(e);if(Y!==void 0){var Z=Ki,xe=e;switch(e){case"keypress":if(Xi(a)===0)break e;case"keydown":case"keyup":Z=Xb;break;case"focusin":xe="focus",Z=nu;break;case"focusout":xe="blur",Z=nu;break;case"beforeblur":case"afterblur":Z=nu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=yh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=Lb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Zb;break;case Bh:case Hh:case qh:Z=Hb;break;case Ih:Z=Wb;break;case"scroll":case"scrollend":Z=Ob;break;case"wheel":Z=tv;break;case"copy":case"cut":case"paste":Z=Ib;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=bh;break;case"toggle":case"beforetoggle":Z=rv}var je=(n&4)!==0,at=!je&&(e==="scroll"||e==="scrollend"),I=je?Y!==null?Y+"Capture":null:Y;je=[];for(var _=$,V;_!==null;){var re=_;if(V=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||V===null||I===null||(re=ja(_,I),re!=null&&je.push(ii(_,re,V))),at)break;_=_.return}0<je.length&&(Y=new Z(Y,xe,null,a,W),ie.push({event:Y,listeners:je}))}}if((n&7)===0){e:{if(Y=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",Y&&a!==Qs&&(xe=a.relatedTarget||a.fromElement)&&(Sl(xe)||xe[vl]))break e;if((Z||Y)&&(Y=W.window===W?W:(Y=W.ownerDocument)?Y.defaultView||Y.parentWindow:window,Z?(xe=a.relatedTarget||a.toElement,Z=$,xe=xe?Sl(xe):null,xe!==null&&(at=u(xe),je=xe.tag,xe!==at||je!==5&&je!==27&&je!==6)&&(xe=null)):(Z=null,xe=$),Z!==xe)){if(je=yh,re="onMouseLeave",I="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(je=bh,re="onPointerLeave",I="onPointerEnter",_="pointer"),at=Z==null?Y:Ea(Z),V=xe==null?Y:Ea(xe),Y=new je(re,_+"leave",Z,a,W),Y.target=at,Y.relatedTarget=V,re=null,Sl(W)===$&&(je=new je(I,_+"enter",xe,a,W),je.target=V,je.relatedTarget=at,re=je),at=re,Z&&xe)t:{for(je=nS,I=Z,_=xe,V=0,re=I;re;re=je(re))V++;re=0;for(var we=_;we;we=je(we))re++;for(;0<V-re;)I=je(I),V--;for(;0<re-V;)_=je(_),re--;for(;V--;){if(I===_||_!==null&&I===_.alternate){je=I;break t}I=je(I),_=je(_)}je=null}else je=null;Z!==null&&cg(ie,Y,Z,je,!1),xe!==null&&at!==null&&cg(ie,at,xe,je,!0)}}e:{if(Y=$?Ea($):window,Z=Y.nodeName&&Y.nodeName.toLowerCase(),Z==="select"||Z==="input"&&Y.type==="file")var Ke=jh;else if(Nh(Y))if(Th)Ke=hv;else{Ke=fv;var be=cv}else Z=Y.nodeName,!Z||Z.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?$&&Xs($.elementType)&&(Ke=jh):Ke=dv;if(Ke&&(Ke=Ke(e,$))){Eh(ie,Ke,a,W);break e}be&&be(e,Y,$),e==="focusout"&&$&&Y.type==="number"&&$.memoizedProps.value!=null&&Ps(Y,"number",Y.value)}switch(be=$?Ea($):window,e){case"focusin":(Nh(be)||be.contentEditable==="true")&&(Ml=be,su=$,_a=null);break;case"focusout":_a=su=Ml=null;break;case"mousedown":uu=!0;break;case"contextmenu":case"mouseup":case"dragend":uu=!1,Lh(ie,a,W);break;case"selectionchange":if(pv)break;case"keydown":case"keyup":Lh(ie,a,W)}var ze;if(lu)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Al?kh(e,a)&&(Ie="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ie="onCompositionStart");Ie&&(vh&&a.locale!=="ko"&&(Al||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Al&&(ze=ph()):(mr=W,Ws="value"in mr?mr.value:mr.textContent,Al=!0)),be=Io($,Ie),0<be.length&&(Ie=new xh(Ie,e,null,a,W),ie.push({event:Ie,listeners:be}),ze?Ie.data=ze:(ze=Ch(a),ze!==null&&(Ie.data=ze)))),(ze=av?iv(e,a):ov(e,a))&&(Ie=Io($,"onBeforeInput"),0<Ie.length&&(be=new xh("onBeforeInput","beforeinput",null,a,W),ie.push({event:be,listeners:Ie}),be.data=ze)),Jv(ie,e,$,a,W)}sg(ie,n)})}function ii(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Io(e,n){for(var a=n+"Capture",o=[];e!==null;){var f=e,g=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||g===null||(f=ja(e,a),f!=null&&o.unshift(ii(e,f,g)),f=ja(e,n),f!=null&&o.push(ii(e,f,g))),e.tag===3)return o;e=e.return}return[]}function nS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cg(e,n,a,o,f){for(var g=n._reactName,v=[];a!==null&&a!==o;){var C=a,R=C.alternate,$=C.stateNode;if(C=C.tag,R!==null&&R===o)break;C!==5&&C!==26&&C!==27||$===null||(R=$,f?($=ja(a,g),$!=null&&v.unshift(ii(a,$,R))):f||($=ja(a,g),$!=null&&v.push(ii(a,$,R)))),a=a.return}v.length!==0&&e.push({event:n,listeners:v})}var rS=/\r\n?/g,lS=/\u0000|\uFFFD/g;function fg(e){return(typeof e=="string"?e:""+e).replace(rS,`
49
+ `).replace(lS,"")}function dg(e,n){return n=fg(n),fg(e)===n}function lt(e,n,a,o,f,g){switch(a){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||El(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&El(e,""+o);break;case"className":Fi(e,"class",o);break;case"tabIndex":Fi(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Fi(e,a,o);break;case"style":dh(e,o,g);break;case"data":if(n!=="object"){Fi(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=Gi(""+o),e.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(a==="formAction"?(n!=="input"&&lt(e,n,"name",f.name,f,null),lt(e,n,"formEncType",f.formEncType,f,null),lt(e,n,"formMethod",f.formMethod,f,null),lt(e,n,"formTarget",f.formTarget,f,null)):(lt(e,n,"encType",f.encType,f,null),lt(e,n,"method",f.method,f,null),lt(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=Gi(""+o),e.setAttribute(a,o);break;case"onClick":o!=null&&(e.onclick=Yn);break;case"onScroll":o!=null&&Be("scroll",e);break;case"onScrollEnd":o!=null&&Be("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(f.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}a=Gi(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""+o):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":o===!0?e.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(a,o):e.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(a):e.setAttribute(a,o);break;case"popover":Be("beforetoggle",e),Be("toggle",e),$i(e,"popover",o);break;case"xlinkActuate":Fn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Fn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Fn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Fn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Fn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Fn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":$i(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Rb.get(a)||a,$i(e,a,o))}}function Oc(e,n,a,o,f,g){switch(a){case"style":dh(e,o,g);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(f.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof o=="string"?El(e,o):(typeof o=="number"||typeof o=="bigint")&&El(e,""+o);break;case"onScroll":o!=null&&Be("scroll",e);break;case"onScrollEnd":o!=null&&Be("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rh.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),n=a.slice(2,f?a.length-7:void 0),g=e[Pt]||null,g=g!=null?g[a]:null,typeof g=="function"&&e.removeEventListener(n,g,f),typeof o=="function")){typeof g!="function"&&g!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,o,f);break e}a in e?e[a]=o:o===!0?e.setAttribute(a,""):$i(e,a,o)}}}function Ht(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var o=!1,f=!1,g;for(g in a)if(a.hasOwnProperty(g)){var v=a[g];if(v!=null)switch(g){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:lt(e,n,g,v,a,null)}}f&&lt(e,n,"srcSet",a.srcSet,a,null),o&&lt(e,n,"src",a.src,a,null);return;case"input":Be("invalid",e);var C=g=v=f=null,R=null,$=null;for(o in a)if(a.hasOwnProperty(o)){var W=a[o];if(W!=null)switch(o){case"name":f=W;break;case"type":v=W;break;case"checked":R=W;break;case"defaultChecked":$=W;break;case"value":g=W;break;case"defaultValue":C=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(i(137,n));break;default:lt(e,n,o,W,a,null)}}sh(e,g,C,R,$,v,f,!1);return;case"select":Be("invalid",e),o=v=g=null;for(f in a)if(a.hasOwnProperty(f)&&(C=a[f],C!=null))switch(f){case"value":g=C;break;case"defaultValue":v=C;break;case"multiple":o=C;default:lt(e,n,f,C,a,null)}n=g,a=v,e.multiple=!!o,n!=null?Nl(e,!!o,n,!1):a!=null&&Nl(e,!!o,a,!0);return;case"textarea":Be("invalid",e),g=f=o=null;for(v in a)if(a.hasOwnProperty(v)&&(C=a[v],C!=null))switch(v){case"value":o=C;break;case"defaultValue":f=C;break;case"children":g=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(i(91));break;default:lt(e,n,v,C,a,null)}ch(e,o,f,g);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(o=a[R],o!=null))switch(R){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:lt(e,n,R,o,a,null)}return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(o=0;o<ai.length;o++)Be(ai[o],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in a)if(a.hasOwnProperty($)&&(o=a[$],o!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:lt(e,n,$,o,a,null)}return;default:if(Xs(n)){for(W in a)a.hasOwnProperty(W)&&(o=a[W],o!==void 0&&Oc(e,n,W,o,a,void 0));return}}for(C in a)a.hasOwnProperty(C)&&(o=a[C],o!=null&&lt(e,n,C,o,a,null))}function aS(e,n,a,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,g=null,v=null,C=null,R=null,$=null,W=null;for(Z in a){var ie=a[Z];if(a.hasOwnProperty(Z)&&ie!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":R=ie;default:o.hasOwnProperty(Z)||lt(e,n,Z,null,o,ie)}}for(var Y in o){var Z=o[Y];if(ie=a[Y],o.hasOwnProperty(Y)&&(Z!=null||ie!=null))switch(Y){case"type":g=Z;break;case"name":f=Z;break;case"checked":$=Z;break;case"defaultChecked":W=Z;break;case"value":v=Z;break;case"defaultValue":C=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(i(137,n));break;default:Z!==ie&&lt(e,n,Y,Z,o,ie)}}Gs(e,v,C,R,$,W,g,f);return;case"select":Z=v=C=Y=null;for(g in a)if(R=a[g],a.hasOwnProperty(g)&&R!=null)switch(g){case"value":break;case"multiple":Z=R;default:o.hasOwnProperty(g)||lt(e,n,g,null,o,R)}for(f in o)if(g=o[f],R=a[f],o.hasOwnProperty(f)&&(g!=null||R!=null))switch(f){case"value":Y=g;break;case"defaultValue":C=g;break;case"multiple":v=g;default:g!==R&&lt(e,n,f,g,o,R)}n=C,a=v,o=Z,Y!=null?Nl(e,!!a,Y,!1):!!o!=!!a&&(n!=null?Nl(e,!!a,n,!0):Nl(e,!!a,a?[]:"",!1));return;case"textarea":Z=Y=null;for(C in a)if(f=a[C],a.hasOwnProperty(C)&&f!=null&&!o.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:lt(e,n,C,null,o,f)}for(v in o)if(f=o[v],g=a[v],o.hasOwnProperty(v)&&(f!=null||g!=null))switch(v){case"value":Y=f;break;case"defaultValue":Z=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(i(91));break;default:f!==g&&lt(e,n,v,f,o,g)}uh(e,Y,Z);return;case"option":for(var xe in a)if(Y=a[xe],a.hasOwnProperty(xe)&&Y!=null&&!o.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:lt(e,n,xe,null,o,Y)}for(R in o)if(Y=o[R],Z=a[R],o.hasOwnProperty(R)&&Y!==Z&&(Y!=null||Z!=null))switch(R){case"selected":e.selected=Y&&typeof Y!="function"&&typeof Y!="symbol";break;default:lt(e,n,R,Y,o,Z)}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 je in a)Y=a[je],a.hasOwnProperty(je)&&Y!=null&&!o.hasOwnProperty(je)&&lt(e,n,je,null,o,Y);for($ in o)if(Y=o[$],Z=a[$],o.hasOwnProperty($)&&Y!==Z&&(Y!=null||Z!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,n));break;default:lt(e,n,$,Y,o,Z)}return;default:if(Xs(n)){for(var at in a)Y=a[at],a.hasOwnProperty(at)&&Y!==void 0&&!o.hasOwnProperty(at)&&Oc(e,n,at,void 0,o,Y);for(W in o)Y=o[W],Z=a[W],!o.hasOwnProperty(W)||Y===Z||Y===void 0&&Z===void 0||Oc(e,n,W,Y,o,Z);return}}for(var I in a)Y=a[I],a.hasOwnProperty(I)&&Y!=null&&!o.hasOwnProperty(I)&&lt(e,n,I,null,o,Y);for(ie in o)Y=o[ie],Z=a[ie],!o.hasOwnProperty(ie)||Y===Z||Y==null&&Z==null||lt(e,n,ie,Y,o,Z)}function hg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var f=a[o],g=f.transferSize,v=f.initiatorType,C=f.duration;if(g&&C&&hg(v)){for(v=0,C=f.responseEnd,o+=1;o<a.length;o++){var R=a[o],$=R.startTime;if($>C)break;var W=R.transferSize,ie=R.initiatorType;W&&hg(ie)&&(R=R.responseEnd,v+=W*(R<C?1:(C-$)/(R-$)))}if(--o,n+=8*(g+v)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _c=null,Lc=null;function Vo(e){return e.nodeType===9?e:e.ownerDocument}function mg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function pg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Uc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Bc=null;function oS(){var e=window.event;return e&&e.type==="popstate"?e===Bc?!1:(Bc=e,!0):(Bc=null,!1)}var gg=typeof setTimeout=="function"?setTimeout:void 0,sS=typeof clearTimeout=="function"?clearTimeout:void 0,yg=typeof Promise=="function"?Promise:void 0,uS=typeof queueMicrotask=="function"?queueMicrotask:typeof yg<"u"?function(e){return yg.resolve(null).then(e).catch(cS)}:gg;function cS(e){setTimeout(function(){throw e})}function Dr(e){return e==="head"}function xg(e,n){var a=n,o=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(o===0){e.removeChild(f),ra(n);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")oi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,oi(a);for(var g=a.firstChild;g;){var v=g.nextSibling,C=g.nodeName;g[Na]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&g.rel.toLowerCase()==="stylesheet"||a.removeChild(g),g=v}}else a==="body"&&oi(e.ownerDocument.body);a=f}while(a);ra(n)}function bg(e,n){var a=e;e=0;do{var o=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=o}while(a)}function Hc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Hc(a),Fs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function fS(e,n,a,o){for(;e.nodeType===1;){var f=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Na])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(g=e.getAttribute("rel"),g==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(g!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(g=e.getAttribute("src"),(g!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&g&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var g=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===g)return e}else return e;if(e=Cn(e.nextSibling),e===null)break}return null}function dS(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Cn(e.nextSibling),e===null))return null;return e}function vg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Cn(e.nextSibling),e===null))return null;return e}function qc(e){return e.data==="$?"||e.data==="$~"}function Ic(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function hS(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var o=function(){n(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Cn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Vc=null;function Sg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return Cn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function wg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function kg(e,n,a){switch(n=Vo(a),e){case"html":if(e=n.documentElement,!e)throw Error(i(452));return e;case"head":if(e=n.head,!e)throw Error(i(453));return e;case"body":if(e=n.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function oi(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Fs(e)}var Nn=new Map,Cg=new Set;function $o(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var or=te.d;te.d={f:mS,r:pS,D:gS,C:yS,L:xS,m:bS,X:SS,S:vS,M:wS};function mS(){var e=or.f(),n=Oo();return e||n}function pS(e){var n=wl(e);n!==null&&n.tag===5&&n.type==="form"?Im(n):or.r(e)}var ea=typeof document>"u"?null:document;function Ng(e,n,a){var o=ea;if(o&&typeof n=="string"&&n){var f=yn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),Cg.has(f)||(Cg.add(f),e={rel:e,crossOrigin:a,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),Ht(n,"link",e),Rt(n),o.head.appendChild(n)))}}function gS(e){or.D(e),Ng("dns-prefetch",e,null)}function yS(e,n){or.C(e,n),Ng("preconnect",e,n)}function xS(e,n,a){or.L(e,n,a);var o=ea;if(o&&e&&n){var f='link[rel="preload"][as="'+yn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+yn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+yn(a.imageSizes)+'"]')):f+='[href="'+yn(e)+'"]';var g=f;switch(n){case"style":g=ta(e);break;case"script":g=na(e)}Nn.has(g)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Nn.set(g,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(si(g))||n==="script"&&o.querySelector(ui(g))||(n=o.createElement("link"),Ht(n,"link",e),Rt(n),o.head.appendChild(n)))}}function bS(e,n){or.m(e,n);var a=ea;if(a&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+yn(o)+'"][href="'+yn(e)+'"]',g=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=na(e)}if(!Nn.has(g)&&(e=y({rel:"modulepreload",href:e},n),Nn.set(g,e),a.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ui(g)))return}o=a.createElement("link"),Ht(o,"link",e),Rt(o),a.head.appendChild(o)}}}function vS(e,n,a){or.S(e,n,a);var o=ea;if(o&&e){var f=kl(o).hoistableStyles,g=ta(e);n=n||"default";var v=f.get(g);if(!v){var C={loading:0,preload:null};if(v=o.querySelector(si(g)))C.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Nn.get(g))&&$c(e,a);var R=v=o.createElement("link");Rt(R),Ht(R,"link",e),R._p=new Promise(function($,W){R.onload=$,R.onerror=W}),R.addEventListener("load",function(){C.loading|=1}),R.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Fo(v,n,o)}v={type:"stylesheet",instance:v,count:1,state:C},f.set(g,v)}}}function SS(e,n){or.X(e,n);var a=ea;if(a&&e){var o=kl(a).hoistableScripts,f=na(e),g=o.get(f);g||(g=a.querySelector(ui(f)),g||(e=y({src:e,async:!0},n),(n=Nn.get(f))&&Fc(e,n),g=a.createElement("script"),Rt(g),Ht(g,"link",e),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(f,g))}}function wS(e,n){or.M(e,n);var a=ea;if(a&&e){var o=kl(a).hoistableScripts,f=na(e),g=o.get(f);g||(g=a.querySelector(ui(f)),g||(e=y({src:e,async:!0,type:"module"},n),(n=Nn.get(f))&&Fc(e,n),g=a.createElement("script"),Rt(g),Ht(g,"link",e),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(f,g))}}function Eg(e,n,a,o){var f=(f=ne.current)?$o(f):null;if(!f)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=ta(a.href),a=kl(f).hoistableStyles,o=a.get(n),o||(o={type:"style",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ta(a.href);var g=kl(f).hoistableStyles,v=g.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(e,v),(g=f.querySelector(si(e)))&&!g._p&&(v.instance=g,v.state.loading=5),Nn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Nn.set(e,a),g||kS(f,e,a,v.state))),n&&o===null)throw Error(i(528,""));return v}if(n&&o!==null)throw Error(i(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=na(a),a=kl(f).hoistableScripts,o=a.get(n),o||(o={type:"script",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function ta(e){return'href="'+yn(e)+'"'}function si(e){return'link[rel="stylesheet"]['+e+"]"}function jg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function kS(e,n,a,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),Ht(n,"link",a),Rt(n),e.head.appendChild(n))}function na(e){return'[src="'+yn(e)+'"]'}function ui(e){return"script[async]"+e}function Tg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+yn(a.href)+'"]');if(o)return n.instance=o,Rt(o),o;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Rt(o),Ht(o,"style",f),Fo(o,a.precedence,e),n.instance=o;case"stylesheet":f=ta(a.href);var g=e.querySelector(si(f));if(g)return n.state.loading|=4,n.instance=g,Rt(g),g;o=jg(a),(f=Nn.get(f))&&$c(o,f),g=(e.ownerDocument||e).createElement("link"),Rt(g);var v=g;return v._p=new Promise(function(C,R){v.onload=C,v.onerror=R}),Ht(g,"link",o),n.state.loading|=4,Fo(g,a.precedence,e),n.instance=g;case"script":return g=na(a.src),(f=e.querySelector(ui(g)))?(n.instance=f,Rt(f),f):(o=a,(f=Nn.get(g))&&(o=y({},a),Fc(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),Rt(f),Ht(f,"link",o),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Fo(o,a.precedence,e));return n.instance}function Fo(e,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,g=f,v=0;v<o.length;v++){var C=o[v];if(C.dataset.precedence===n)g=C;else if(g!==f)break}g?g.parentNode.insertBefore(e,g.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function $c(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Fc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Yo=null;function Ag(e,n,a){if(Yo===null){var o=new Map,f=Yo=new Map;f.set(a,o)}else f=Yo,o=f.get(a),o||(o=new Map,f.set(a,o));if(o.has(e))return o;for(o.set(e,null),a=a.getElementsByTagName(e),f=0;f<a.length;f++){var g=a[f];if(!(g[Na]||g[_t]||e==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var v=g.getAttribute(n)||"";v=e+v;var C=o.get(v);C?C.push(g):o.set(v,[g])}}return o}function Mg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function CS(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Dg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function NS(e,n,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=ta(o.href),g=n.querySelector(si(f));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Go.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=g,Rt(g);return}g=n.ownerDocument||n,o=jg(o),(f=Nn.get(f))&&$c(o,f),g=g.createElement("link"),Rt(g);var v=g;v._p=new Promise(function(C,R){v.onload=C,v.onerror=R}),Ht(g,"link",o),a.instance=g}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Go.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Yc=0;function ES(e,n){return e.stylesheets&&e.count===0&&Xo(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var o=setTimeout(function(){if(e.stylesheets&&Xo(e,e.stylesheets),e.unsuspend){var g=e.unsuspend;e.unsuspend=null,g()}},6e4+n);0<e.imgBytes&&Yc===0&&(Yc=62500*iS());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xo(e,e.stylesheets),e.unsuspend)){var g=e.unsuspend;e.unsuspend=null,g()}},(e.imgBytes>Yc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Go(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Po=null;function Xo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Po=new Map,n.forEach(jS,e),Po=null,Go.call(e))}function jS(e,n){if(!(n.state.loading&4)){var a=Po.get(e);if(a)var o=a.get(null);else{a=new Map,Po.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<f.length;g++){var v=f[g];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),o=v)}o&&a.set(null,o)}f=n.instance,v=f.getAttribute("data-precedence"),g=a.get(v)||o,g===o&&a.set(null,f),a.set(v,f),this.count++,o=Go.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),g?g.parentNode.insertBefore(f,g.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var ci={$$typeof:z,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function TS(e,n,a,o,f,g,v,C,R){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qs(0),this.hiddenUpdates=qs(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=g,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Rg(e,n,a,o,f,g,v,C,R,$,W,ie){return e=new TS(e,n,a,v,R,$,W,ie,C),n=1,g===!0&&(n|=24),g=ln(3,null,null,n),e.current=g,g.stateNode=e,n=Cu(),n.refCount++,e.pooledCache=n,n.refCount++,g.memoizedState={element:o,isDehydrated:a,cache:n},Tu(g),e}function zg(e){return e?(e=zl,e):zl}function Og(e,n,a,o,f,g){f=zg(f),o.context===null?o.context=f:o.pendingContext=f,o=vr(n),o.payload={element:a},g=g===void 0?null:g,g!==null&&(o.callback=g),a=Sr(e,o,n),a!==null&&(Wt(a,e,n),Va(a,e,n))}function _g(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Gc(e,n){_g(e,n),(e=e.alternate)&&_g(e,n)}function Lg(e){if(e.tag===13||e.tag===31){var n=Jr(e,67108864);n!==null&&Wt(n,e,67108864),Gc(e,67108864)}}function Ug(e){if(e.tag===13||e.tag===31){var n=cn();n=Is(n);var a=Jr(e,n);a!==null&&Wt(a,e,n),Gc(e,n)}}var Qo=!0;function AS(e,n,a,o){var f=H.T;H.T=null;var g=te.p;try{te.p=2,Pc(e,n,a,o)}finally{te.p=g,H.T=f}}function MS(e,n,a,o){var f=H.T;H.T=null;var g=te.p;try{te.p=8,Pc(e,n,a,o)}finally{te.p=g,H.T=f}}function Pc(e,n,a,o){if(Qo){var f=Xc(o);if(f===null)zc(e,n,o,Ko,a),Hg(e,o);else if(RS(f,e,n,a,o))o.stopPropagation();else if(Hg(e,o),n&4&&-1<DS.indexOf(e)){for(;f!==null;){var g=wl(f);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var v=Pr(g.pendingLanes);if(v!==0){var C=g;for(C.pendingLanes|=2,C.entangledLanes|=2;v;){var R=1<<31-We(v);C.entanglements[1]|=R,v&=~R}Un(g),(Je&6)===0&&(Ro=ue()+500,li(0))}}break;case 31:case 13:C=Jr(g,2),C!==null&&Wt(C,g,2),Oo(),Gc(g,2)}if(g=Xc(o),g===null&&zc(e,n,o,Ko,a),g===f)break;f=g}f!==null&&o.stopPropagation()}else zc(e,n,o,null,a)}}function Xc(e){return e=Ks(e),Qc(e)}var Ko=null;function Qc(e){if(Ko=null,e=Sl(e),e!==null){var n=u(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=c(n),e!==null)return e;e=null}else if(a===31){if(e=d(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Ko=e,null}function Bg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Te()){case K:return 2;case fe:return 8;case Ce:case Re:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var Kc=!1,Rr=null,zr=null,Or=null,fi=new Map,di=new Map,_r=[],DS="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 Hg(e,n){switch(e){case"focusin":case"focusout":Rr=null;break;case"dragenter":case"dragleave":zr=null;break;case"mouseover":case"mouseout":Or=null;break;case"pointerover":case"pointerout":fi.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":di.delete(n.pointerId)}}function hi(e,n,a,o,f,g){return e===null||e.nativeEvent!==g?(e={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:g,targetContainers:[f]},n!==null&&(n=wl(n),n!==null&&Lg(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function RS(e,n,a,o,f){switch(n){case"focusin":return Rr=hi(Rr,e,n,a,o,f),!0;case"dragenter":return zr=hi(zr,e,n,a,o,f),!0;case"mouseover":return Or=hi(Or,e,n,a,o,f),!0;case"pointerover":var g=f.pointerId;return fi.set(g,hi(fi.get(g)||null,e,n,a,o,f)),!0;case"gotpointercapture":return g=f.pointerId,di.set(g,hi(di.get(g)||null,e,n,a,o,f)),!0}return!1}function qg(e){var n=Sl(e.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){e.blockedOn=n,eh(e.priority,function(){Ug(a)});return}}else if(n===31){if(n=d(a),n!==null){e.blockedOn=n,eh(e.priority,function(){Ug(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zo(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Xc(e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);Qs=o,a.target.dispatchEvent(o),Qs=null}else return n=wl(a),n!==null&&Lg(n),e.blockedOn=a,!1;n.shift()}return!0}function Ig(e,n,a){Zo(e)&&a.delete(n)}function zS(){Kc=!1,Rr!==null&&Zo(Rr)&&(Rr=null),zr!==null&&Zo(zr)&&(zr=null),Or!==null&&Zo(Or)&&(Or=null),fi.forEach(Ig),di.forEach(Ig)}function Jo(e,n){e.blockedOn===n&&(e.blockedOn=null,Kc||(Kc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zS)))}var Wo=null;function Vg(e){Wo!==e&&(Wo=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wo===e&&(Wo=null);for(var n=0;n<e.length;n+=3){var a=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(Qc(o||a)===null)continue;break}var g=wl(a);g!==null&&(e.splice(n,3),n-=3,Xu(g,{pending:!0,data:f,method:a.method,action:o},o,f))}}))}function ra(e){function n(R){return Jo(R,e)}Rr!==null&&Jo(Rr,e),zr!==null&&Jo(zr,e),Or!==null&&Jo(Or,e),fi.forEach(n),di.forEach(n);for(var a=0;a<_r.length;a++){var o=_r[a];o.blockedOn===e&&(o.blockedOn=null)}for(;0<_r.length&&(a=_r[0],a.blockedOn===null);)qg(a),a.blockedOn===null&&_r.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var f=a[o],g=a[o+1],v=f[Pt]||null;if(typeof g=="function")v||Vg(a);else if(v){var C=null;if(g&&g.hasAttribute("formAction")){if(f=g,v=g[Pt]||null)C=v.formAction;else if(Qc(f)!==null)continue}else C=v.action;typeof C=="function"?a[o+1]=C:(a.splice(o,3),o-=3),Vg(a)}}}function $g(){function e(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function Zc(e){this._internalRoot=e}es.prototype.render=Zc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));var a=n.current,o=cn();Og(a,o,e,n,null,null)},es.prototype.unmount=Zc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Og(e.current,2,null,e,null,null),Oo(),n[vl]=null}};function es(e){this._internalRoot=e}es.prototype.unstable_scheduleHydration=function(e){if(e){var n=Wd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<_r.length&&n!==0&&n<_r[a].priority;a++);_r.splice(a,0,e),a===0&&qg(e)}};var Fg=r.version;if(Fg!=="19.2.6")throw Error(i(527,Fg,"19.2.6"));te.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=m(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var OS={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ts=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ts.isDisabled&&ts.supportsFiber)try{gt=ts.inject(OS),st=ts}catch{}}return pi.createRoot=function(e,n){if(!s(e))throw Error(i(299));var a=!1,o="",f=Zm,g=Jm,v=Wm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=Rg(e,1,!1,null,null,a,o,null,f,g,v,$g),e[vl]=n.current,Rc(e),new Zc(n)},pi.hydrateRoot=function(e,n,a){if(!s(e))throw Error(i(299));var o=!1,f="",g=Zm,v=Jm,C=Wm,R=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),n=Rg(e,1,!0,n,a??null,o,f,R,g,v,C,$g),n.context=zg(null),a=n.current,o=cn(),o=Is(o),f=vr(o),f.callback=null,Sr(a,f,o),a=o,n.current.lanes=a,Ca(n,a),Un(n),e[vl]=n.current,Rc(e),new es(n)},pi.version="19.2.6",pi}var ey;function GS(){if(ey)return ef.exports;ey=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),ef.exports=YS(),ef.exports}var PS=GS();const XS=Ri(PS);function Sx(t){var r,l,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(l=Sx(t[r]))&&(i&&(i+=" "),i+=l)}else for(l in t)t[l]&&(i&&(i+=" "),i+=l);return i}function wx(){for(var t,r,l=0,i="",s=arguments.length;l<s;l++)(t=arguments[l])&&(r=Sx(t))&&(i&&(i+=" "),i+=r);return i}const sd="-",QS=t=>{const r=ZS(t),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:c=>{const d=c.split(sd);return d[0]===""&&d.length!==1&&d.shift(),kx(d,r)||KS(c)},getConflictingClassGroupIds:(c,d)=>{const p=l[c]||[];return d&&i[c]?[...p,...i[c]]:p}}},kx=(t,r)=>{var c;if(t.length===0)return r.classGroupId;const l=t[0],i=r.nextPart.get(l),s=i?kx(t.slice(1),i):void 0;if(s)return s;if(r.validators.length===0)return;const u=t.join(sd);return(c=r.validators.find(({validator:d})=>d(u)))==null?void 0:c.classGroupId},ty=/^\[(.+)\]$/,KS=t=>{if(ty.test(t)){const r=ty.exec(t)[1],l=r==null?void 0:r.substring(0,r.indexOf(":"));if(l)return"arbitrary.."+l}},ZS=t=>{const{theme:r,prefix:l}=t,i={nextPart:new Map,validators:[]};return WS(Object.entries(t.classGroups),l).forEach(([u,c])=>{Uf(c,i,u,r)}),i},Uf=(t,r,l,i)=>{t.forEach(s=>{if(typeof s=="string"){const u=s===""?r:ny(r,s);u.classGroupId=l;return}if(typeof s=="function"){if(JS(s)){Uf(s(i),r,l,i);return}r.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([u,c])=>{Uf(c,ny(r,u),l,i)})})},ny=(t,r)=>{let l=t;return r.split(sd).forEach(i=>{l.nextPart.has(i)||l.nextPart.set(i,{nextPart:new Map,validators:[]}),l=l.nextPart.get(i)}),l},JS=t=>t.isThemeGetter,WS=(t,r)=>r?t.map(([l,i])=>{const s=i.map(u=>typeof u=="string"?r+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([c,d])=>[r+c,d])):u);return[l,s]}):t,ew=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,l=new Map,i=new Map;const s=(u,c)=>{l.set(u,c),r++,r>t&&(r=0,i=l,l=new Map)};return{get(u){let c=l.get(u);if(c!==void 0)return c;if((c=i.get(u))!==void 0)return s(u,c),c},set(u,c){l.has(u)?l.set(u,c):s(u,c)}}},Cx="!",tw=t=>{const{separator:r,experimentalParseClassName:l}=t,i=r.length===1,s=r[0],u=r.length,c=d=>{const p=[];let m=0,x=0,y;for(let T=0;T<d.length;T++){let j=d[T];if(m===0){if(j===s&&(i||d.slice(T,T+u)===r)){p.push(d.slice(x,T)),x=T+u;continue}if(j==="/"){y=T;continue}}j==="["?m++:j==="]"&&m--}const b=p.length===0?d:d.substring(x),S=b.startsWith(Cx),k=S?b.substring(1):b,N=y&&y>x?y-x:void 0;return{modifiers:p,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:N}};return l?d=>l({className:d,parseClassName:c}):c},nw=t=>{if(t.length<=1)return t;const r=[];let l=[];return t.forEach(i=>{i[0]==="["?(r.push(...l.sort(),i),l=[]):l.push(i)}),r.push(...l.sort()),r},rw=t=>({cache:ew(t.cacheSize),parseClassName:tw(t),...QS(t)}),lw=/\s+/,aw=(t,r)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:s}=r,u=[],c=t.trim().split(lw);let d="";for(let p=c.length-1;p>=0;p-=1){const m=c[p],{modifiers:x,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:S}=l(m);let k=!!S,N=i(k?b.substring(0,S):b);if(!N){if(!k){d=m+(d.length>0?" "+d:d);continue}if(N=i(b),!N){d=m+(d.length>0?" "+d:d);continue}k=!1}const T=nw(x).join(":"),j=y?T+Cx:T,M=j+N;if(u.includes(M))continue;u.push(M);const z=s(N,k);for(let F=0;F<z.length;++F){const P=z[F];u.push(j+P)}d=m+(d.length>0?" "+d:d)}return d};function iw(){let t=0,r,l,i="";for(;t<arguments.length;)(r=arguments[t++])&&(l=Nx(r))&&(i&&(i+=" "),i+=l);return i}const Nx=t=>{if(typeof t=="string")return t;let r,l="";for(let i=0;i<t.length;i++)t[i]&&(r=Nx(t[i]))&&(l&&(l+=" "),l+=r);return l};function ow(t,...r){let l,i,s,u=c;function c(p){const m=r.reduce((x,y)=>y(x),t());return l=rw(m),i=l.cache.get,s=l.cache.set,u=d,d(p)}function d(p){const m=i(p);if(m)return m;const x=aw(p,l);return s(p,x),x}return function(){return u(iw.apply(null,arguments))}}const dt=t=>{const r=l=>l[t]||[];return r.isThemeGetter=!0,r},Ex=/^\[(?:([a-z-]+):)?(.+)\]$/i,sw=/^\d+\/\d+$/,uw=new Set(["px","full","screen"]),cw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=t=>ca(t)||uw.has(t)||sw.test(t),Ur=t=>ba(t,"length",ww),ca=t=>!!t&&!Number.isNaN(Number(t)),lf=t=>ba(t,"number",ca),gi=t=>!!t&&Number.isInteger(Number(t)),pw=t=>t.endsWith("%")&&ca(t.slice(0,-1)),Oe=t=>Ex.test(t),Br=t=>cw.test(t),gw=new Set(["length","size","percentage"]),yw=t=>ba(t,gw,jx),xw=t=>ba(t,"position",jx),bw=new Set(["image","url"]),vw=t=>ba(t,bw,Cw),Sw=t=>ba(t,"",kw),yi=()=>!0,ba=(t,r,l)=>{const i=Ex.exec(t);return i?i[1]?typeof r=="string"?i[1]===r:r.has(i[1]):l(i[2]):!1},ww=t=>fw.test(t)&&!dw.test(t),jx=()=>!1,kw=t=>hw.test(t),Cw=t=>mw.test(t),Nw=()=>{const t=dt("colors"),r=dt("spacing"),l=dt("blur"),i=dt("brightness"),s=dt("borderColor"),u=dt("borderRadius"),c=dt("borderSpacing"),d=dt("borderWidth"),p=dt("contrast"),m=dt("grayscale"),x=dt("hueRotate"),y=dt("invert"),b=dt("gap"),S=dt("gradientColorStops"),k=dt("gradientColorStopPositions"),N=dt("inset"),T=dt("margin"),j=dt("opacity"),M=dt("padding"),z=dt("saturate"),F=dt("scale"),P=dt("sepia"),U=dt("skew"),G=dt("space"),le=dt("translate"),se=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",Oe,r],Q=()=>[Oe,r],de=()=>["",sr,Ur],oe=()=>["auto",ca,Oe],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>["start","end","center","between","around","evenly","stretch"],Se=()=>["","0",Oe],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>[ca,Oe];return{cacheSize:500,separator:":",theme:{colors:[yi],spacing:[sr,Ur],blur:["none","",Br,Oe],brightness:A(),borderColor:[t],borderRadius:["none","","full",Br,Oe],borderSpacing:Q(),borderWidth:de(),contrast:A(),grayscale:Se(),hueRotate:A(),invert:Se(),gap:Q(),gradientColorStops:[t],gradientColorStopPositions:[pw,Ur],inset:X(),margin:X(),opacity:A(),padding:Q(),saturate:A(),scale:A(),sepia:Se(),skew:A(),space:Q(),translate:Q()},classGroups:{aspect:[{aspect:["auto","square","video",Oe]}],container:["container"],columns:[{columns:[Br]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...q(),Oe]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:se()}],"overscroll-x":[{"overscroll-x":se()}],"overscroll-y":[{"overscroll-y":se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-x":[{"inset-x":[N]}],"inset-y":[{"inset-y":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",gi,Oe]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Oe]}],grow:[{grow:Se()}],shrink:[{shrink:Se()}],order:[{order:["first","last","none",gi,Oe]}],"grid-cols":[{"grid-cols":[yi]}],"col-start-end":[{col:["auto",{span:["full",gi,Oe]},Oe]}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":[yi]}],"row-start-end":[{row:["auto",{span:[gi,Oe]},Oe]}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Oe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Oe]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...ae()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ae(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ae(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[T]}],mx:[{mx:[T]}],my:[{my:[T]}],ms:[{ms:[T]}],me:[{me:[T]}],mt:[{mt:[T]}],mr:[{mr:[T]}],mb:[{mb:[T]}],ml:[{ml:[T]}],"space-x":[{"space-x":[G]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[G]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Oe,r]}],"min-w":[{"min-w":[Oe,r,"min","max","fit"]}],"max-w":[{"max-w":[Oe,r,"none","full","min","max","fit","prose",{screen:[Br]},Br]}],h:[{h:[Oe,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Oe,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Oe,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Oe,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Br,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lf]}],"font-family":[{font:[yi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Oe]}],"line-clamp":[{"line-clamp":["none",ca,lf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sr,Oe]}],"list-image":[{"list-image":["none",Oe]}],"list-style-type":[{list:["none","disc","decimal",Oe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[j]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[j]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sr,Ur]}],"underline-offset":[{"underline-offset":["auto",sr,Oe]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[j]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),xw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vw]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[j]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[j]}],"divide-style":[{divide:H()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[sr,Oe]}],"outline-w":[{outline:[sr,Ur]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[j]}],"ring-offset-w":[{"ring-offset":[sr,Ur]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Br,Sw]}],"shadow-color":[{shadow:[yi]}],opacity:[{opacity:[j]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none"]}],blur:[{blur:[l]}],brightness:[{brightness:[i]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",Br,Oe]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[y]}],saturate:[{saturate:[z]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[l]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[j]}],"backdrop-saturate":[{"backdrop-saturate":[z]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Oe]}],duration:[{duration:A()}],ease:[{ease:["linear","in","out","in-out",Oe]}],delay:[{delay:A()}],animate:[{animate:["none","spin","ping","pulse","bounce",Oe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[F]}],"scale-x":[{"scale-x":[F]}],"scale-y":[{"scale-y":[F]}],rotate:[{rotate:[gi,Oe]}],"translate-x":[{"translate-x":[le]}],"translate-y":[{"translate-y":[le]}],"skew-x":[{"skew-x":[U]}],"skew-y":[{"skew-y":[U]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Oe]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oe]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Oe]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[sr,Ur,lf]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Ew=ow(Nw);function me(...t){return Ew(wx(t))}/**
50
+ * @license lucide-react v0.469.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */const jw=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Tx=(...t)=>t.filter((r,l,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===l).join(" ").trim();/**
55
+ * @license lucide-react v0.469.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */var Tw={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"};/**
60
+ * @license lucide-react v0.469.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const Aw=w.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:s="",children:u,iconNode:c,...d},p)=>w.createElement("svg",{ref:p,...Tw,width:r,height:r,stroke:t,strokeWidth:i?Number(l)*24/Number(r):l,className:Tx("lucide",s),...d},[...c.map(([m,x])=>w.createElement(m,x)),...Array.isArray(u)?u:[u]]));/**
65
+ * @license lucide-react v0.469.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const pe=(t,r)=>{const l=w.forwardRef(({className:i,...s},u)=>w.createElement(Aw,{ref:u,iconNode:r,className:Tx(`lucide-${jw(t)}`,i),...s}));return l.displayName=`${t}`,l};/**
70
+ * @license lucide-react v0.469.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const Mw=pe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
75
+ * @license lucide-react v0.469.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const Ax=pe("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);/**
80
+ * @license lucide-react v0.469.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const Mx=pe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
85
+ * @license lucide-react v0.469.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */const Dx=pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
90
+ * @license lucide-react v0.469.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const Rx=pe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
95
+ * @license lucide-react v0.469.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */const zx=pe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
100
+ * @license lucide-react v0.469.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const Ox=pe("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
105
+ * @license lucide-react v0.469.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const Dw=pe("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
110
+ * @license lucide-react v0.469.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const Rw=pe("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
115
+ * @license lucide-react v0.469.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const _x=pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
120
+ * @license lucide-react v0.469.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const js=pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
125
+ * @license lucide-react v0.469.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const ud=pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
130
+ * @license lucide-react v0.469.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const zw=pe("ChevronsDown",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]);/**
135
+ * @license lucide-react v0.469.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const Ow=pe("ChevronsUp",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]);/**
140
+ * @license lucide-react v0.469.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const _w=pe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
145
+ * @license lucide-react v0.469.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const pl=pe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
150
+ * @license lucide-react v0.469.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const Lw=pe("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
155
+ * @license lucide-react v0.469.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const cd=pe("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
160
+ * @license lucide-react v0.469.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const Uw=pe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
165
+ * @license lucide-react v0.469.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const Lx=pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
170
+ * @license lucide-react v0.469.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const Bw=pe("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
175
+ * @license lucide-react v0.469.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const Hw=pe("Copy",[["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"}]]);/**
180
+ * @license lucide-react v0.469.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const Ti=pe("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
185
+ * @license lucide-react v0.469.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const Bf=pe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
190
+ * @license lucide-react v0.469.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const Hf=pe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
195
+ * @license lucide-react v0.469.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const qw=pe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
200
+ * @license lucide-react v0.469.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const Iw=pe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
205
+ * @license lucide-react v0.469.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const Vw=pe("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
210
+ * @license lucide-react v0.469.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const $w=pe("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
215
+ * @license lucide-react v0.469.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const Fw=pe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
220
+ * @license lucide-react v0.469.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const Yw=pe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
225
+ * @license lucide-react v0.469.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const Gw=pe("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
230
+ * @license lucide-react v0.469.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const ki=pe("Globe",[["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"}]]);/**
235
+ * @license lucide-react v0.469.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const Pw=pe("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
240
+ * @license lucide-react v0.469.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const qf=pe("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
245
+ * @license lucide-react v0.469.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const Xw=pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
250
+ * @license lucide-react v0.469.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const Qw=pe("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
255
+ * @license lucide-react v0.469.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const af=pe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
260
+ * @license lucide-react v0.469.0 - ISC
261
+ *
262
+ * This source code is licensed under the ISC license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const Ux=pe("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
265
+ * @license lucide-react v0.469.0 - ISC
266
+ *
267
+ * This source code is licensed under the ISC license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */const Kw=pe("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
270
+ * @license lucide-react v0.469.0 - ISC
271
+ *
272
+ * This source code is licensed under the ISC license.
273
+ * See the LICENSE file in the root directory of this source tree.
274
+ */const Fr=pe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
275
+ * @license lucide-react v0.469.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */const Zw=pe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
280
+ * @license lucide-react v0.469.0 - ISC
281
+ *
282
+ * This source code is licensed under the ISC license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */const Jw=pe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
285
+ * @license lucide-react v0.469.0 - ISC
286
+ *
287
+ * This source code is licensed under the ISC license.
288
+ * See the LICENSE file in the root directory of this source tree.
289
+ */const fd=pe("Monitor",[["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"}]]);/**
290
+ * @license lucide-react v0.469.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */const dd=pe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
295
+ * @license lucide-react v0.469.0 - ISC
296
+ *
297
+ * This source code is licensed under the ISC license.
298
+ * See the LICENSE file in the root directory of this source tree.
299
+ */const Ww=pe("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
300
+ * @license lucide-react v0.469.0 - ISC
301
+ *
302
+ * This source code is licensed under the ISC license.
303
+ * See the LICENSE file in the root directory of this source tree.
304
+ */const e2=pe("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
305
+ * @license lucide-react v0.469.0 - ISC
306
+ *
307
+ * This source code is licensed under the ISC license.
308
+ * See the LICENSE file in the root directory of this source tree.
309
+ */const t2=pe("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
310
+ * @license lucide-react v0.469.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */const n2=pe("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
315
+ * @license lucide-react v0.469.0 - ISC
316
+ *
317
+ * This source code is licensed under the ISC license.
318
+ * See the LICENSE file in the root directory of this source tree.
319
+ */const Bx=pe("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
320
+ * @license lucide-react v0.469.0 - ISC
321
+ *
322
+ * This source code is licensed under the ISC license.
323
+ * See the LICENSE file in the root directory of this source tree.
324
+ */const r2=pe("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/**
325
+ * @license lucide-react v0.469.0 - ISC
326
+ *
327
+ * This source code is licensed under the ISC license.
328
+ * See the LICENSE file in the root directory of this source tree.
329
+ */const Hx=pe("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
330
+ * @license lucide-react v0.469.0 - ISC
331
+ *
332
+ * This source code is licensed under the ISC license.
333
+ * See the LICENSE file in the root directory of this source tree.
334
+ */const ry=pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
335
+ * @license lucide-react v0.469.0 - ISC
336
+ *
337
+ * This source code is licensed under the ISC license.
338
+ * See the LICENSE file in the root directory of this source tree.
339
+ */const qx=pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
340
+ * @license lucide-react v0.469.0 - ISC
341
+ *
342
+ * This source code is licensed under the ISC license.
343
+ * See the LICENSE file in the root directory of this source tree.
344
+ */const zi=pe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
345
+ * @license lucide-react v0.469.0 - ISC
346
+ *
347
+ * This source code is licensed under the ISC license.
348
+ * See the LICENSE file in the root directory of this source tree.
349
+ */const ha=pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
350
+ * @license lucide-react v0.469.0 - ISC
351
+ *
352
+ * This source code is licensed under the ISC license.
353
+ * See the LICENSE file in the root directory of this source tree.
354
+ */const l2=pe("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
355
+ * @license lucide-react v0.469.0 - ISC
356
+ *
357
+ * This source code is licensed under the ISC license.
358
+ * See the LICENSE file in the root directory of this source tree.
359
+ */const hd=pe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
360
+ * @license lucide-react v0.469.0 - ISC
361
+ *
362
+ * This source code is licensed under the ISC license.
363
+ * See the LICENSE file in the root directory of this source tree.
364
+ */const a2=pe("ShieldAlert",[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
365
+ * @license lucide-react v0.469.0 - ISC
366
+ *
367
+ * This source code is licensed under the ISC license.
368
+ * See the LICENSE file in the root directory of this source tree.
369
+ */const Ix=pe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
370
+ * @license lucide-react v0.469.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 i2=pe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
375
+ * @license lucide-react v0.469.0 - ISC
376
+ *
377
+ * This source code is licensed under the ISC license.
378
+ * See the LICENSE file in the root directory of this source tree.
379
+ */const ly=pe("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
380
+ * @license lucide-react v0.469.0 - ISC
381
+ *
382
+ * This source code is licensed under the ISC license.
383
+ * See the LICENSE file in the root directory of this source tree.
384
+ */const o2=pe("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/**
385
+ * @license lucide-react v0.469.0 - ISC
386
+ *
387
+ * This source code is licensed under the ISC license.
388
+ * See the LICENSE file in the root directory of this source tree.
389
+ */const md=pe("Sun",[["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"}]]);/**
390
+ * @license lucide-react v0.469.0 - ISC
391
+ *
392
+ * This source code is licensed under the ISC license.
393
+ * See the LICENSE file in the root directory of this source tree.
394
+ */const ma=pe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
395
+ * @license lucide-react v0.469.0 - ISC
396
+ *
397
+ * This source code is licensed under the ISC license.
398
+ * See the LICENSE file in the root directory of this source tree.
399
+ */const Ai=pe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
400
+ * @license lucide-react v0.469.0 - ISC
401
+ *
402
+ * This source code is licensed under the ISC license.
403
+ * See the LICENSE file in the root directory of this source tree.
404
+ */const Vx=pe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
405
+ * @license lucide-react v0.469.0 - ISC
406
+ *
407
+ * This source code is licensed under the ISC license.
408
+ * See the LICENSE file in the root directory of this source tree.
409
+ */const s2=pe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
410
+ * @license lucide-react v0.469.0 - ISC
411
+ *
412
+ * This source code is licensed under the ISC license.
413
+ * See the LICENSE file in the root directory of this source tree.
414
+ */const u2=pe("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
415
+ * @license lucide-react v0.469.0 - ISC
416
+ *
417
+ * This source code is licensed under the ISC license.
418
+ * See the LICENSE file in the root directory of this source tree.
419
+ */const c2=pe("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
420
+ * @license lucide-react v0.469.0 - ISC
421
+ *
422
+ * This source code is licensed under the ISC license.
423
+ * See the LICENSE file in the root directory of this source tree.
424
+ */const pd=pe("WifiOff",[["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"}]]);/**
425
+ * @license lucide-react v0.469.0 - ISC
426
+ *
427
+ * This source code is licensed under the ISC license.
428
+ * See the LICENSE file in the root directory of this source tree.
429
+ */const $x=pe("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
430
+ * @license lucide-react v0.469.0 - ISC
431
+ *
432
+ * This source code is licensed under the ISC license.
433
+ * See the LICENSE file in the root directory of this source tree.
434
+ */const gd=pe("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
435
+ * @license lucide-react v0.469.0 - ISC
436
+ *
437
+ * This source code is licensed under the ISC license.
438
+ * See the LICENSE file in the root directory of this source tree.
439
+ */const xl=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
440
+ * @license lucide-react v0.469.0 - ISC
441
+ *
442
+ * This source code is licensed under the ISC license.
443
+ * See the LICENSE file in the root directory of this source tree.
444
+ */const yd=pe("Zap",[["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"}]]),ay=t=>{let r;const l=new Set,i=(m,x)=>{const y=typeof m=="function"?m(r):m;if(!Object.is(y,r)){const b=r;r=x??(typeof y!="object"||y===null)?y:Object.assign({},r,y),l.forEach(S=>S(r,b))}},s=()=>r,d={setState:i,getState:s,getInitialState:()=>p,subscribe:m=>(l.add(m),()=>l.delete(m))},p=r=t(i,s,d);return d},f2=(t=>t?ay(t):ay),d2=t=>t;function h2(t,r=d2){const l=dn.useSyncExternalStore(t.subscribe,dn.useCallback(()=>r(t.getState()),[t,r]),dn.useCallback(()=>r(t.getInitialState()),[t,r]));return dn.useDebugValue(l),l}const iy=t=>{const r=f2(t),l=i=>h2(r,i);return Object.assign(l,r),l},va=(t=>t?iy(t):iy),dl=va(t=>({toasts:[],push:r=>{const l=`toast_${Date.now()}_${Math.random().toString(36).slice(2,7)}`;return t(i=>({toasts:[...i.toasts,{...r,id:l}]})),l},dismiss:r=>t(l=>({toasts:l.toasts.filter(i=>i.id!==r)}))})),ns={success:(t,r=3500)=>dl.getState().push({message:t,variant:"success",ttl:r}),error:(t,r=6e3)=>dl.getState().push({message:t,variant:"error",ttl:r}),warn:(t,r=4500)=>dl.getState().push({message:t,variant:"warn",ttl:r}),info:(t,r=3500)=>dl.getState().push({message:t,variant:"info",ttl:r}),dismiss:t=>dl.getState().dismiss(t)};function m2({variant:t}){return t==="success"?h.jsx(pl,{className:"h-4 w-4 text-green-500"}):t==="error"?h.jsx(cd,{className:"h-4 w-4 text-destructive"}):t==="warn"?h.jsx(Vx,{className:"h-4 w-4 text-amber-500"}):h.jsx(Xw,{className:"h-4 w-4 text-blue-500"})}function p2({entry:t}){const r=dl(l=>l.dismiss);return w.useEffect(()=>{const l=setTimeout(()=>r(t.id),t.ttl);return()=>clearTimeout(l)},[t.id,t.ttl,r]),h.jsxs("div",{className:me("flex items-start gap-2 rounded-lg border bg-popover shadow-lg px-3 py-2 text-sm max-w-sm","animate-message",t.variant==="error"&&"border-destructive/40",t.variant==="warn"&&"border-amber-500/40",t.variant==="success"&&"border-green-500/40"),children:[h.jsx(m2,{variant:t.variant}),h.jsx("div",{className:"flex-1 min-w-0 whitespace-pre-wrap break-words leading-snug",children:t.message}),h.jsx("button",{type:"button",onClick:()=>r(t.id),className:"text-muted-foreground hover:text-foreground",title:"Dismiss",children:h.jsx(xl,{className:"h-3.5 w-3.5"})})]})}function g2(){const t=dl(r=>r.toasts);return t.length===0?null:h.jsx("div",{className:"fixed bottom-4 right-4 z-[60] flex flex-col gap-2 pointer-events-auto",children:t.map(r=>h.jsx(p2,{entry:r},r.id))})}let rs=null;function y2(){if(typeof window>"u")return null;if(rs)return rs;const t=window.AudioContext||window.webkitAudioContext;if(!t)return null;try{rs=new t}catch{return null}return rs}function oy(t,r,l){const i=y2();if(!i)return;const s=i.currentTime+r,u=i.createOscillator(),c=i.createGain();u.type="sine",u.frequency.value=t,c.gain.setValueAtTime(0,s),c.gain.linearRampToValueAtTime(.18,s+.01),c.gain.exponentialRampToValueAtTime(1e-4,s+l),u.connect(c).connect(i.destination),u.start(s),u.stop(s+l+.02)}function Fx(){oy(659.25,0,.18),oy(880,.12,.24)}const Yx=Object.freeze(Object.defineProperty({__proto__:null,playCompletionChime:Fx},Symbol.toStringTag,{value:"Module"})),x2="#4f46e5";function b2(t){return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
445
+ <rect x="2" y="2" width="60" height="60" rx="14" fill="${x2}" />
446
+ <text x="32" y="44" text-anchor="middle" font-family="-apple-system,Segoe UI,Roboto,sans-serif" font-size="38" font-weight="700" fill="#fff">W</text>
447
+ ${t==="ready"?'<circle cx="50" cy="14" r="14" fill="#22c55e" stroke="#fff" stroke-width="3" />':t==="error"?'<circle cx="50" cy="14" r="14" fill="#ef4444" stroke="#fff" stroke-width="3" />':t==="running"?'<circle cx="50" cy="14" r="14" fill="#f59e0b" stroke="#fff" stroke-width="3" />':""}
448
+ </svg>`}function v2(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function S2(){if(typeof document>"u")return null;let t=document.querySelector('link[rel="icon"]');return t||(t=document.createElement("link"),t.rel="icon",t.type="image/svg+xml",document.head.appendChild(t)),t}let If="idle";function hs(t){If=t;const r=S2();r&&(r.href=v2(b2(t)))}let sy=!1;function w2(){sy||typeof document>"u"||(sy=!0,document.addEventListener("visibilitychange",()=>{!document.hidden&&(If==="ready"||If==="error")&&hs("idle")}))}let $r="default";typeof window<"u"&&"Notification"in window?$r=Notification.permission:$r="unsupported";async function k2(){if($r==="unsupported"||$r==="granted"||$r==="denied")return $r;try{const t=await Notification.requestPermission();return $r=t,t}catch{return"denied"}}function uy(t,r){if(!(typeof document>"u"||!document.hidden)&&$r==="granted")try{const l=new Notification(t,{body:r,icon:"/favicon.ico",tag:"wrongstack-run"});l.onclick=()=>{window.focus(),l.close()}}catch{}}class C2{constructor(r){en(this,"ws",null);en(this,"url");en(this,"handlers",new Map);en(this,"reconnectAttempts",0);en(this,"maxReconnectAttempts",10);en(this,"reconnectDelay",1e3);en(this,"shouldReconnect",!0);en(this,"messageQueue",[]);en(this,"pendingConfirms",new Map);en(this,"sessionId",null);en(this,"lastErrorText");en(this,"statusListeners",new Set);en(this,"currentStatus",{state:"connecting"});this.url=r??N2()}onStatus(r){return this.statusListeners.add(r),r(this.currentStatus),()=>this.statusListeners.delete(r)}get status(){return this.currentStatus}setStatus(r){this.currentStatus=r;for(const l of this.statusListeners)try{l(r)}catch{}}async connect(){return new Promise((r,l)=>{var i;if(((i=this.ws)==null?void 0:i.readyState)===WebSocket.OPEN){r();return}this.setStatus({state:"connecting"});try{this.ws=new WebSocket(this.url),this.ws.binaryType="arraybuffer";const s=setTimeout(()=>{l(new Error("Connection timeout"))},1e4);this.ws.onopen=()=>{clearTimeout(s),console.log("[WS Client] Connected"),this.reconnectAttempts=0,this.lastErrorText=void 0,this.setStatus({state:"open"}),this.flushMessageQueue(),r()},this.ws.onmessage=u=>{try{const c=JSON.parse(u.data);this.handleMessage(c)}catch(c){console.error("[WS Client] Failed to parse message",c)}},this.ws.onerror=u=>{console.error("[WS Client] Error",u),this.lastErrorText="Connection error (see browser devtools)"},this.ws.onclose=u=>{console.log("[WS Client] Disconnected",u.code,u.reason),u.reason&&!this.lastErrorText?this.lastErrorText=`${u.reason} (code ${u.code})`:!this.lastErrorText&&u.code!==1e3&&(this.lastErrorText=`Closed with code ${u.code}`),this.attemptReconnect()}}catch(s){clearTimeout(globalThis.connectTimeout),this.lastErrorText=s instanceof Error?s.message:String(s),this.setStatus({state:"closed",error:this.lastErrorText}),l(s)}})}attemptReconnect(){if(!this.shouldReconnect||this.reconnectAttempts>=this.maxReconnectAttempts){console.log("[WS Client] Not reconnecting"),this.setStatus({state:"closed",error:this.lastErrorText??"Disconnected"});return}this.reconnectAttempts++;const r=Math.min(this.reconnectDelay*2**(this.reconnectAttempts-1),3e4),l=Date.now()+r;console.log(`[WS Client] Reconnecting in ${r}ms (attempt ${this.reconnectAttempts})`),this.setStatus({state:"reconnecting",attempt:this.reconnectAttempts,nextRetryAt:l,lastError:this.lastErrorText}),setTimeout(async()=>{if(this.shouldReconnect)try{await this.connect()}catch(i){console.error("[WS Client] Reconnect failed",i)}},r)}retryNow(){this.currentStatus.state!=="open"&&(this.reconnectAttempts=0,this.connect().catch(()=>{}))}flushMessageQueue(){for(;this.messageQueue.length>0;){const r=this.messageQueue.shift();r&&this.send(r)}}handleMessage(r){if(r.type==="tool.confirm_needed"){const l=r.payload;this.pendingConfirms.set(l.id,{resolve:l.resolve});const i={...r,payload:{...l,resolve:()=>{}}};this.emit(i);return}if(r.type==="session.start"){const l=r.payload;this.sessionId=l.sessionId}this.emit(r)}emit(r){const l=this.handlers.get(r.type);if(l)for(const i of l)try{i(r)}catch(s){console.error(`[WS Client] Handler error for ${r.type}`,s)}}send(r){var l;((l=this.ws)==null?void 0:l.readyState)===WebSocket.OPEN?this.ws.send(JSON.stringify(r)):this.messageQueue.push(r)}on(r,l){let i=this.handlers.get(r);return i||(i=new Set,this.handlers.set(r,i)),i.add(l),()=>i==null?void 0:i.delete(l)}off(r,l){var i;(i=this.handlers.get(r))==null||i.delete(l)}sendMessage(r){const l=`msg_${Date.now()}_${crypto.randomUUID().slice(0,8)}`;return this.send({type:"user_message",payload:{id:l,content:r,timestamp:Date.now()}}),l}sendAbort(){this.send({type:"abort",payload:{}})}sendConfirm(r,l){const i=this.pendingConfirms.get(r);i&&(i.resolve(l),this.pendingConfirms.delete(r)),this.send({type:"tool.confirm_result",payload:{id:r,decision:l}})}switchModel(r,l){this.send({type:"model.switch",payload:{provider:r,model:l}})}listProviders(){this.send({type:"providers.list"})}listProviderModels(r){this.send({type:"provider.models",payload:{providerId:r}})}listSavedProviders(){this.send({type:"providers.saved"})}addKey(r,l,i){this.send({type:"key.add",payload:{providerId:r,label:l,apiKey:i}})}updateKey(r,l,i){this.send({type:"key.update",payload:{providerId:r,label:l,apiKey:i}})}deleteKey(r,l){this.send({type:"key.delete",payload:{providerId:r,label:l}})}setActiveKey(r,l){this.send({type:"key.set_active",payload:{providerId:r,label:l}})}addProvider(r,l,i,s){this.send({type:"provider.add",payload:{id:r,family:l,baseUrl:i,apiKey:s}})}removeProvider(r){this.send({type:"provider.remove",payload:{providerId:r}})}newSession(){this.send({type:"session.new"})}clearContext(){this.send({type:"context.clear"})}compactContext(r=!1){this.send({type:"context.compact",payload:{aggressive:r}})}debugContext(){this.send({type:"context.debug"})}listTools(){this.send({type:"tools.list"})}listMemory(){this.send({type:"memory.list"})}remember(r,l){this.send({type:"memory.remember",payload:{text:r,scope:l}})}forget(r,l){this.send({type:"memory.forget",payload:{text:r,scope:l}})}listSkills(){this.send({type:"skills.list"})}getDiag(){this.send({type:"diag.get"})}getStats(){this.send({type:"stats.get"})}saveSession(){this.send({type:"session.save"})}resumeSessionById(r){this.send({type:"session.resume",payload:{id:r}})}listModes(){this.send({type:"modes.list"})}switchMode(r){this.send({type:"mode.switch",payload:{id:r}})}listFiles(r,l){this.send({type:"files.list",payload:{query:r,limit:l}})}getTodos(){this.send({type:"todos.get"})}clearTodos(){this.send({type:"todos.clear"})}listSessions(r=50){this.send({type:"sessions.list",payload:{limit:r}})}deleteSession(r){this.send({type:"session.delete",payload:{id:r}})}resumeSession(r){this.send({type:"session.resume",payload:{id:r}})}ping(){this.send({type:"ping"})}disconnect(){var r;this.shouldReconnect=!1,(r=this.ws)==null||r.close(),this.ws=null}get isConnected(){var r;return((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN}get currentSessionId(){return this.sessionId}}let of=null;function N2(){var l;if(typeof window>"u"||!((l=window.location)!=null&&l.hostname))return"ws://127.0.0.1:3457";const r=window.location.hostname.toLowerCase();return r==="localhost"||r==="127.0.0.1"||r==="[::1]"||r==="::1"?"ws://127.0.0.1:3457":`ws://${window.location.hostname}:3457`}function qn(t){return of||(of=new C2(t)),of}function E2(t,r){let l;try{l=t()}catch{return}return{getItem:s=>{var u;const c=p=>p===null?null:JSON.parse(p,void 0),d=(u=l.getItem(s))!=null?u:null;return d instanceof Promise?d.then(c):c(d)},setItem:(s,u)=>l.setItem(s,JSON.stringify(u,void 0)),removeItem:s=>l.removeItem(s)}}const Vf=t=>r=>{try{const l=t(r);return l instanceof Promise?l:{then(i){return Vf(i)(l)},catch(i){return this}}}catch(l){return{then(i){return this},catch(i){return Vf(i)(l)}}}},j2=(t,r)=>(l,i,s)=>{let u={storage:E2(()=>window.localStorage),partialize:T=>T,version:0,merge:(T,j)=>({...j,...T}),...r},c=!1,d=0;const p=new Set,m=new Set;let x=u.storage;if(!x)return t((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),l(...T)},i,s);const y=()=>{const T=u.partialize({...i()});return x.setItem(u.name,{state:T,version:u.version})},b=s.setState;s.setState=(T,j)=>(b(T,j),y());const S=t((...T)=>(l(...T),y()),i,s);s.getInitialState=()=>S;let k;const N=()=>{var T,j;if(!x)return;const M=++d;c=!1,p.forEach(F=>{var P;return F((P=i())!=null?P:S)});const z=((j=u.onRehydrateStorage)==null?void 0:j.call(u,(T=i())!=null?T:S))||void 0;return Vf(x.getItem.bind(x))(u.name).then(F=>{if(F)if(typeof F.version=="number"&&F.version!==u.version){if(u.migrate){const P=u.migrate(F.state,F.version);return P instanceof Promise?P.then(U=>[!0,U]):[!0,P]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,F.state];return[!1,void 0]}).then(F=>{var P;if(M!==d)return;const[U,G]=F;if(k=u.merge(G,(P=i())!=null?P:S),l(k,!0),U)return y()}).then(()=>{M===d&&(z==null||z(i(),void 0),k=i(),c=!0,m.forEach(F=>F(k)))}).catch(F=>{M===d&&(z==null||z(void 0,F))})};return s.persist={setOptions:T=>{u={...u,...T},T.storage&&(x=T.storage)},clearStorage:()=>{x==null||x.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>N(),hasHydrated:()=>c,onHydrate:T=>(p.add(T),()=>{p.delete(T)}),onFinishHydration:T=>(m.add(T),()=>{m.delete(T)})},u.skipHydration||N(),k||S},Ts=j2;function T2(t){if(!t)return t;const r=t.split(/\n{2,}/),l=[];for(const s of r)l.length>0&&l[l.length-1].trim()===s.trim()||l.push(s);return l.map(s=>{const u=s.split(`
449
+ `),c=[];for(const d of u)c.length>0&&d.trim().length>0&&c[c.length-1].trim()===d.trim()||c.push(d);return c.join(`
450
+ `)}).join(`
451
+
452
+ `)}const he=va()(Ts((t,r)=>({messages:[],currentAssistantMessageId:null,currentToolId:null,isLoading:!1,abortController:null,executions:new Map,queue:[],runStart:null,thinkingBuffer:"",thinkingStartedAt:null,addMessage:l=>{const i=`msg_${Date.now()}_${crypto.randomUUID().slice(0,8)}`,s={...l,id:i,timestamp:Date.now()};return t(u=>({messages:[...u.messages,s],currentAssistantMessageId:l.role==="assistant"?i:u.currentAssistantMessageId})),i},updateMessage:(l,i)=>{t(s=>({messages:s.messages.map(u=>u.id===l?{...u,...i}:u)}))},appendToMessage:(l,i)=>{t(s=>({messages:s.messages.map(u=>u.id===l?{...u,content:u.content+i}:u)}))},finalizeMessage:l=>{t(i=>({messages:i.messages.map(s=>s.id===l?{...s,content:T2(s.content),streaming:!1}:s)}))},setToolResult:(l,i,s)=>{t(u=>({messages:u.messages.map(c=>c.id===l?{...c,toolResult:i,isError:!s,progressLines:void 0}:c)}))},appendToolProgress:(l,i)=>{t(s=>({messages:s.messages.map(u=>{if(u.id!==l)return u;const d=[...u.progressLines??[],i],p=d.length>30?d.slice(d.length-30):d;return{...u,progressLines:p}})}))},setLoading:l=>t({isLoading:l}),setAbortController:l=>t({abortController:l}),clearMessages:()=>t({messages:[],currentAssistantMessageId:null,currentToolId:null,executions:new Map}),setCurrentAssistantMessage:l=>t({currentAssistantMessageId:l}),setCurrentToolId:l=>t({currentToolId:l}),truncateAfter:l=>t(i=>{const s=i.messages.findIndex(u=>u.id===l);return s===-1?i:{messages:i.messages.slice(0,s),currentAssistantMessageId:null,currentToolId:null}}),addExecution:l=>{t(i=>{const s=new Map(i.executions);return s.set(l.id,l),{executions:s}})},updateExecution:(l,i)=>{t(s=>{const u=new Map(s.executions),c=u.get(l);return c&&u.set(l,{...c,...i}),{executions:u}})},enqueue:l=>t(i=>({queue:[...i.queue,l]})),dequeue:()=>{const l=r().queue;if(l.length===0)return null;const[i,...s]=l;return t({queue:s}),i},removeQueued:l=>t(i=>({queue:i.queue.filter((s,u)=>u!==l)})),clearQueue:()=>t({queue:[]}),setRunStart:l=>t({runStart:l}),appendThinking:l=>t(i=>({thinkingBuffer:i.thinkingBuffer+l,thinkingStartedAt:i.thinkingStartedAt??Date.now()})),clearThinking:()=>t({thinkingBuffer:"",thinkingStartedAt:null})}),{name:"wrongstack-chat",partialize:()=>({})})),Pe=va()(Ts(t=>({provider:"anthropic",model:"claude-sonnet-4-20250514",wsUrl:(()=>{var l;if(typeof window>"u"||!((l=window.location)!=null&&l.hostname))return"ws://127.0.0.1:3457";const r=window.location.hostname.toLowerCase();return r==="localhost"||r==="127.0.0.1"||r==="[::1]"||r==="::1"?"ws://127.0.0.1:3457":`ws://${window.location.hostname}:3457`})(),wsConnected:!1,wsStatus:{state:"connecting"},theme:"system",autoConnect:!0,soundOnComplete:!1,setProvider:r=>t({provider:r}),setModel:r=>t({model:r}),setConfig:r=>t(r),setTheme:r=>t({theme:r}),setWsConnected:r=>t({wsConnected:r}),setWsStatus:r=>t({wsStatus:r,wsConnected:r.state==="open"}),setSoundOnComplete:r=>t({soundOnComplete:r})}),{name:"wrongstack-config"})),Ge=va()(Ts(t=>({session:null,totalTokens:{input:0,output:0,cacheRead:0,cacheWrite:0},lastInputTokens:0,cost:0,startTime:null,maxContext:0,inputCost:0,outputCost:0,cacheReadCost:0,projectName:"",mode:"default",modes:[],iteration:null,todos:[],setSession:r=>t({session:r}),updateUsage:r=>t(l=>{const i=(r.input??0)+(r.cacheRead??0)+(r.cacheWrite??0);return{totalTokens:{input:l.totalTokens.input+r.input,output:l.totalTokens.output+r.output,cacheRead:(l.totalTokens.cacheRead??0)+(r.cacheRead??0),cacheWrite:(l.totalTokens.cacheWrite??0)+(r.cacheWrite??0)},lastInputTokens:i||l.lastInputTokens}}),addCost:r=>t(l=>({cost:l.cost+r})),startSession:r=>t({session:r,startTime:Date.now(),iteration:null,lastInputTokens:0,totalTokens:{input:0,output:0,cacheRead:0,cacheWrite:0},cost:0}),endSession:()=>t({session:null,startTime:null,iteration:null}),setEnv:r=>t(l=>({maxContext:r.maxContext??l.maxContext,projectName:r.projectName??l.projectName,mode:r.mode??l.mode,inputCost:r.inputCost??l.inputCost,outputCost:r.outputCost??l.outputCost,cacheReadCost:r.cacheReadCost??l.cacheReadCost})),setIteration:r=>t({iteration:r}),setModes:r=>t({modes:r}),setTodos:r=>t({todos:r})}),{name:"wrongstack-session",partialize:()=>({})})),Ne=va()(Ts(t=>({sidebarOpen:!0,settingsOpen:!1,currentView:"chat",showConfirmDialog:!1,confirmInfo:null,paletteOpen:!1,shortcutsOpen:!1,searchOpen:!1,searchQuery:"",promptHistory:[],sidebarWidth:288,pinnedIds:[],compactMode:!1,modelSwitcherOpen:!1,favoriteSessionIds:[],sessionNicknames:{},toggleSidebar:()=>t(r=>({sidebarOpen:!r.sidebarOpen})),setSidebarOpen:r=>t({sidebarOpen:r}),setSettingsOpen:r=>t({settingsOpen:r}),setCurrentView:r=>t({currentView:r}),showConfirm:r=>t({showConfirmDialog:!0,confirmInfo:r}),hideConfirm:()=>t({showConfirmDialog:!1,confirmInfo:null}),setPaletteOpen:r=>t({paletteOpen:r}),setShortcutsOpen:r=>t({shortcutsOpen:r}),setSearchOpen:r=>t({searchOpen:r,searchQuery:""}),setSearchQuery:r=>t({searchQuery:r}),pushPrompt:r=>t(l=>{const i=r.trim();if(!i)return l;const s=l.promptHistory.filter(u=>u!==i);return{promptHistory:[i,...s].slice(0,50)}}),setSidebarWidth:r=>t({sidebarWidth:Math.max(200,Math.min(480,Math.round(r)))}),togglePin:r=>t(l=>({pinnedIds:l.pinnedIds.includes(r)?l.pinnedIds.filter(s=>s!==r):[...l.pinnedIds,r]})),unpinAll:()=>t({pinnedIds:[]}),toggleCompactMode:()=>t(r=>({compactMode:!r.compactMode})),setModelSwitcherOpen:r=>t({modelSwitcherOpen:r}),toggleFavoriteSession:r=>t(l=>({favoriteSessionIds:l.favoriteSessionIds.includes(r)?l.favoriteSessionIds.filter(s=>s!==r):[...l.favoriteSessionIds,r]})),setSessionNickname:(r,l)=>t(i=>{const s=l.trim(),u={...i.sessionNicknames};return s?u[r]=s:delete u[r],{sessionNicknames:u}})}),{name:"wrongstack-ui",partialize:t=>({sidebarOpen:t.sidebarOpen,sidebarWidth:t.sidebarWidth,promptHistory:t.promptHistory,pinnedIds:t.pinnedIds,compactMode:t.compactMode,favoriteSessionIds:t.favoriteSessionIds,sessionNicknames:t.sessionNicknames})})),pa=va()(t=>({entries:[],loading:!1,error:null,setEntries:(r,l=null)=>t({entries:r,error:l,loading:!1}),setLoading:r=>t({loading:r}),removeEntry:r=>t(l=>({entries:l.entries.filter(i=>i.id!==r)})),clearHistory:()=>t({entries:[]})}));function A2(t){const r=[],l=(i,s)=>{r.push(t.on(i,s))};return l("session.start",i=>{var p;const s=i.payload,u=(p=Ge.getState().session)==null?void 0:p.id,c=!u||u!==s.sessionId;Ge.getState().startSession({id:s.sessionId,startedAt:Date.now(),model:s.model,provider:s.provider}),Ge.getState().setEnv({maxContext:s.maxContext,projectName:s.projectName,mode:s.mode,inputCost:s.inputCost,outputCost:s.outputCost,cacheReadCost:s.cacheReadCost}),Pe.getState().setConfig({provider:s.provider,model:s.model}),(c||s.reset)&&he.getState().clearMessages();const d=s.replayMessages;if(d&&d.length>0){const m=he.getState();for(const x of d)if(x.role==="user"||x.role==="assistant"||x.role==="system"){let y="";if(typeof x.content=="string")y=x.content;else if(Array.isArray(x.content)){for(const b of x.content)if(b.type==="text"&&typeof b.text=="string")y+=(y?`
453
+ `:"")+b.text;else if(b.type==="tool_use")m.addMessage({role:"tool",content:"",toolName:String(b.name??"tool"),toolInput:b.input,toolUseId:String(b.id??"")}),y="";else if(b.type==="tool_result"){const S=he.getState().messages;let k;for(let N=S.length-1;N>=0;N--)if(S[N].toolUseId===String(b.tool_use_id??"")){k=S[N];break}k&&m.setToolResult(k.id,typeof b.content=="string"?b.content:JSON.stringify(b.content),!b.is_error)}}y&&m.addMessage({role:x.role,content:y})}}}),l("context.debug",i=>{const s=i.payload,u=m=>m.toLocaleString(),c=[...s.tools.breakdown].sort((m,x)=>x.tokens-m.tokens).slice(0,8),d=[...s.messages.breakdown].sort((m,x)=>x.tokens-m.tokens).slice(0,8),p=["📊 **Context breakdown** (heuristic — 4 chars/token)","",`**Total estimate:** ${u(s.total)} tokens`,`• System prompt: ${u(s.systemPrompt)}`,`• Tool schemas: ${u(s.tools.total)} (${s.tools.count} tools)`,`• Messages: ${u(s.messages.total)} (${s.messages.count} messages)`,"","**Top tool schemas:**",...c.map(m=>` · ${m.name}: ${u(m.tokens)}`),"","**Top messages:**",...d.map(m=>` · #${m.index} ${m.role}: ${u(m.tokens)} — ${m.preview||"(empty)"}`)];he.getState().addMessage({role:"assistant",content:p.join(`
454
+ `)})}),l("key.operation_result",i=>{const s=i.payload;s.success?ns.success(s.message):ns.error(s.message)}),l("context.compacted",i=>{const s=i.payload,u=s.reductions.length?s.reductions.map(c=>`${c.phase}: ${c.saved}`).join(", "):"no-op";he.getState().addMessage({role:"assistant",content:`🗜️ Context compacted: ${s.before} → ${s.after} tokens (saved ~${s.saved}). ${u}`}),Ge.setState({lastInputTokens:s.after})}),l("session.end",()=>{Pe.getState().setWsConnected(!1)}),l("iteration.started",i=>{const s=i.payload;Ge.getState().setIteration({index:s.index,max:s.maxIterations??0}),he.getState().setLoading(!0),typeof document<"u"&&document.hidden&&hs("running"),he.getState().runStart===null&&he.getState().setRunStart({at:Date.now(),cost:Ge.getState().cost}),he.getState().setCurrentAssistantMessage(null)}),l("provider.text_delta",i=>{const s=i.payload;he.getState().clearThinking();let u=he.getState().currentAssistantMessageId;u||(u=he.getState().addMessage({role:"assistant",content:"",streaming:!0}),he.getState().setCurrentAssistantMessage(u)),he.getState().appendToMessage(u,s.text)}),l("provider.thinking_delta",i=>{const s=i.payload;s.text&&he.getState().appendThinking(s.text)}),l("tool.started",i=>{const s=i.payload,u=he.getState().messages.find(d=>d.toolUseId===s.id);if(u){he.getState().setCurrentToolId(u.id);return}he.getState().clearThinking(),he.getState().setCurrentAssistantMessage(null);const c=he.getState().addMessage({role:"tool",content:"",toolName:s.name,toolInput:s.input,toolUseId:s.id});he.getState().setCurrentToolId(c),he.getState().addExecution({id:s.id,name:s.name,input:s.input,ok:!0,startedAt:Date.now()})}),l("tool.progress",i=>{const s=i.payload,u=(s.text??"").trim();if(!u)return;const d=he.getState().messages.find(m=>m.toolUseId===s.id);if(!d)return;const p=s.eventType==="warning"?"⚠ ":"";he.getState().appendToolProgress(d.id,p+u)}),l("tool.executed",i=>{const s=i.payload,{messages:u,currentToolId:c}=he.getState(),d=s.id?u.find(p=>p.toolUseId===s.id):c?u.find(p=>p.id===c):void 0;d&&(he.getState().setToolResult(d.id,s.output??"",s.ok),he.getState().updateMessage(d.id,{toolDurationMs:s.durationMs})),s.id&&he.getState().updateExecution(s.id,{completedAt:Date.now(),durationMs:s.durationMs,output:s.output,ok:s.ok}),c&&d&&d.id===c&&he.getState().setCurrentToolId(null)}),l("provider.response",i=>{const s=i.payload;Ge.getState().updateUsage(s.usage);const{inputCost:u,outputCost:c,cacheReadCost:d}=Ge.getState(),p=(s.usage.input*u+s.usage.output*c+(s.usage.cacheRead??0)*d)/1e6;p>0&&Ge.getState().addCost(p),s.stopReason!=="tool_use"&&s.stopReason!=="tool_call"&&he.getState().setLoading(!1);const m=he.getState().currentAssistantMessageId;m&&(he.getState().finalizeMessage(m),s.usage.output>0&&he.getState().updateMessage(m,{usage:s.usage})),he.getState().setCurrentAssistantMessage(null),he.getState().clearThinking()}),l("tool.confirm_needed",i=>{const s=i.payload;Ne.getState().showConfirm({id:s.id,toolName:s.toolName,input:s.input,suggestedPattern:s.suggestedPattern})}),l("run.result",i=>{const s=i.payload;Ge.getState().setIteration(null),he.getState().setLoading(!1),he.getState().setCurrentAssistantMessage(null),he.getState().clearThinking();const u=he.getState().runStart;if(u&&s.status==="done"){const d=he.getState().messages;let p=-1,m=0;for(let x=d.length-1;x>=0;x--){const y=d[x];if(y.role==="assistant"&&p===-1&&y.content&&(p=x),y.role==="tool"&&y.timestamp>=u.at&&(m+=1),y.role==="user"&&y.timestamp<=u.at)break}if(p!==-1){const x=Ge.getState().cost;he.getState().updateMessage(d[p].id,{runSummary:{iterations:s.iterations,tools:m,durationMs:Date.now()-u.at,costDelta:Math.max(0,x-u.cost)}})}}if(he.getState().setRunStart(null),s.status!=="done"&&s.error)he.getState().addMessage({role:"assistant",content:`Error: ${s.error.message}`,isError:!0}),ns.error(`Run ended: ${s.error.message}`),uy("WrongStack run failed",s.error.message),typeof document<"u"&&document.hidden&&hs("error");else if(s.status==="done"&&(typeof document<"u"&&document.hidden&&(ns.success(`Run completed in ${s.iterations} iteration${s.iterations===1?"":"s"}`),uy("WrongStack run finished",`Completed in ${s.iterations} iteration${s.iterations===1?"":"s"}.`),hs("ready")),k2(),Pe.getState().soundOnComplete))try{Fx()}catch{}const c=he.getState().dequeue();if(c){const d=qn(Pe.getState().wsUrl);he.getState().addMessage({role:"user",content:c}),he.getState().setLoading(!0),d.sendMessage(c)}}),l("tools.list",i=>{const s=i.payload,u=[`🛠️ **Registered tools** (${s.tools.length})`,"",...s.tools.map(c=>`• \`${c.name}\`${c.params.length?` (${c.params.join(", ")})`:""} — ${c.description||"_no description_"}`)];he.getState().addMessage({role:"assistant",content:u.join(`
455
+ `)})}),l("memory.list",i=>{var c;const s=i.payload,u=(c=s.text)==null?void 0:c.trim();he.getState().addMessage({role:"assistant",content:s.error?`Memory read failed: ${s.error}`:u?`🧠 **Memory**
456
+
457
+ ${u}`:`🧠 **Memory**
458
+
459
+ _empty — nothing remembered yet_`})}),l("skills.list",i=>{const s=i.payload;if(!s.enabled){he.getState().addMessage({role:"assistant",content:`🎯 **Skills**
460
+
461
+ _disabled (config.features.skills = false)_`});return}const u=[`🎯 **Skills** (${s.skills.length})`,"",...s.skills.length===0?["_none registered_"]:s.skills.map(c=>`• \`${c.name}\`${c.version?` v${c.version}`:""} _(${c.source})_ — ${c.description||c.trigger||"_no description_"}`)];s.error&&u.push("",`⚠ ${s.error}`),he.getState().addMessage({role:"assistant",content:u.join(`
462
+ `)})}),l("diag.get",i=>{const s=i.payload,u=["🩺 **Runtime diagnostics**","",`**Provider:** \`${s.provider}\` / \`${s.model}\``,`**Mode:** \`${s.mode}\``,`**Session:** \`${s.sessionId}\``,`**CWD:** \`${s.cwd}\``,"",`**Tools:** ${s.tools.count}`,`**Messages:** ${s.messages} · **Todos:** ${s.todos}`,`**Usage:** ${s.usage.input.toLocaleString()} in · ${s.usage.output.toLocaleString()} out${s.usage.cacheRead?` · ${s.usage.cacheRead.toLocaleString()} cache`:""}`,"",`**Features:** memory=${s.features.memory?"✓":"✗"} · skills=${s.features.skills?"✓":"✗"} · modelsRegistry=${s.features.modelsRegistry?"✓":"✗"}`];he.getState().addMessage({role:"assistant",content:u.join(`
463
+ `)})}),l("stats.get",i=>{const s=i.payload,u=Math.floor(s.elapsedMs/1e3),c=u<60?`${u}s`:u<3600?`${Math.floor(u/60)}m ${u%60}s`:`${Math.floor(u/3600)}h ${Math.floor(u%3600/60)}m`,d=["📈 **Session stats**","",`**Session:** \`${s.sessionId}\``,`**Provider/Model:** \`${s.provider}\` / \`${s.model}\``,`**Elapsed:** ${c}`,"",`**Usage:** ${s.usage.input.toLocaleString()} in · ${s.usage.output.toLocaleString()} out`,...s.cache&&s.cache.readTokens>0?[`**Cache:** ${s.cache.readTokens.toLocaleString()} read · ${s.cache.writeTokens.toLocaleString()} write · hit ratio ${(s.cache.hitRatio*100).toFixed(1)}%`]:[],`**Cost:** $${s.cost.toFixed(4)}`,"",`**Messages:** ${s.messages} · **Files read:** ${s.readFiles} · **Tools available:** ${s.tools}`];he.getState().addMessage({role:"assistant",content:d.join(`
464
+ `)})}),l("todos.updated",i=>{const s=i.payload;Ge.getState().setTodos(s.todos??[])}),l("modes.list",i=>{const s=i.payload;Ge.getState().setModes(s.modes.map(u=>({id:u.id,name:u.name,description:u.description}))),Ge.getState().setEnv({mode:s.activeId})}),l("sessions.list",i=>{const s=i.payload;pa.getState().setEntries(s.sessions??[],s.error??null)}),l("error",i=>{const s=i.payload;he.getState().addMessage({role:"assistant",content:`[${s.phase}] ${s.message}`,isError:!0}),he.getState().setLoading(!1)}),()=>{for(const i of r)i()}}function M2(){const{autoConnect:t,wsUrl:r}=Pe(),l=Pe(s=>s.setWsStatus),i=w.useRef(!1);w.useEffect(()=>{if(!t)return;w2();const s=qn(r),u=s.onStatus(d=>l(d));if(s.connect().catch(d=>{console.error("[WS] Connection failed:",d)}),i.current)return()=>{u()};i.current=!0;const c=A2(s);return()=>{c(),u(),i.current=!1}},[t,r,l])}function In(){const{wsUrl:t}=Pe(),r=qn(t),l=w.useCallback(X=>r.isConnected?r.sendMessage(X):null,[r]),i=w.useCallback(()=>r.sendAbort(),[r]),{hideConfirm:s}=Ne(),u=w.useCallback((X,Q)=>{r.sendConfirm(X,Q),s()},[r,s]),c=w.useCallback((X,Q)=>r.switchModel(X,Q),[r]),d=w.useCallback(()=>r.listProviders(),[r]),p=w.useCallback(X=>r.listProviderModels(X),[r]),m=w.useCallback(()=>r.listSavedProviders(),[r]),x=w.useCallback((X,Q,de)=>r.addKey(X,Q,de),[r]),y=w.useCallback((X,Q,de)=>r.updateKey(X,Q,de),[r]),b=w.useCallback((X,Q)=>r.deleteKey(X,Q),[r]),S=w.useCallback((X,Q)=>r.setActiveKey(X,Q),[r]),k=w.useCallback((X,Q,de,oe)=>r.addProvider(X,Q,de,oe),[r]),N=w.useCallback(X=>r.removeProvider(X),[r]),T=w.useCallback(X=>{pa.getState().setLoading(!0),r.listSessions(X)},[r]),j=w.useCallback(X=>{pa.getState().removeEntry(X),r.deleteSession(X)},[r]),M=w.useCallback(X=>r.resumeSessionById(X),[r]),z=w.useCallback(()=>r.saveSession(),[r]),F=w.useCallback(()=>r.listTools(),[r]),P=w.useCallback(()=>r.listMemory(),[r]),U=w.useCallback(()=>r.listSkills(),[r]),G=w.useCallback(()=>r.getDiag(),[r]),le=w.useCallback(()=>r.getStats(),[r]),se=w.useCallback(()=>r.listModes(),[r]),B=w.useCallback(X=>r.switchMode(X),[r]);return{client:r,sendMessage:l,sendAbort:i,sendConfirm:u,switchModel:c,listProviders:d,listProviderModels:p,listSavedProviders:m,addKey:x,updateKey:y,deleteKey:b,setActiveKey:S,addProvider:k,removeProvider:N,listSessions:T,deleteSession:j,resumeSession:M,saveSession:z,listTools:F,listMemory:P,listSkills:U,getDiag:G,getStats:le,listModes:se,switchMode:B}}const D2="modulepreload",R2=function(t){return"/"+t},cy={},Gx=function(r,l,i){let s=Promise.resolve();if(l&&l.length>0){let c=function(m){return Promise.all(m.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));s=c(l.map(m=>{if(m=R2(m),m in cy)return;cy[m]=!0;const x=m.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${y}`))return;const b=document.createElement("link");if(b.rel=x?"stylesheet":D2,x||(b.as="script"),b.crossOrigin="",b.href=m,p&&b.setAttribute("nonce",p),document.head.appendChild(b),x)return new Promise((S,k)=>{b.addEventListener("load",S),b.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return s.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return r().catch(u)})};function z2(){const t=Ne(T=>T.paletteOpen),r=Ne(T=>T.setPaletteOpen),l=Ne(T=>T.setCurrentView),i=Pe(T=>T.setTheme),{entries:s}=pa(),{addMessage:u,clearMessages:c}=he(),d=In(),[p,m]=w.useState(""),[x,y]=w.useState(0),b=w.useRef(null);w.useEffect(()=>{t&&(m(""),y(0),requestAnimationFrame(()=>{var T;return(T=b.current)==null?void 0:T.focus()}))},[t]),w.useEffect(()=>{const T=j=>{if((j.ctrlKey||j.metaKey)&&j.key.toLowerCase()==="k"){j.preventDefault(),r(!Ne.getState().paletteOpen);return}j.key==="Escape"&&Ne.getState().paletteOpen&&(j.preventDefault(),r(!1))};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[r]);const S=w.useMemo(()=>{const T=[{id:"help",category:"Command",label:"Show slash commands",icon:Pw,keywords:["help","commands","?"],run:()=>{u({role:"assistant",content:"Type `/` in the message box to see every slash command."})}},{id:"tools",category:"Command",label:"List tools",icon:gd,keywords:["tools","list"],run:()=>d.listTools()},{id:"memory",category:"Command",label:"Show memory",icon:Ox,keywords:["memory","remember","notes"],run:()=>d.listMemory()},{id:"skills",category:"Command",label:"List skills",icon:Ix,keywords:["skills"],run:()=>d.listSkills()},{id:"diag",category:"Command",label:"Runtime diagnostics",icon:o2,keywords:["diag","diagnostics","debug"],run:()=>d.getDiag()},{id:"stats",category:"Command",label:"Session stats (tokens, cache, cost)",icon:Rw,keywords:["stats","tokens","cost","cache"],run:()=>d.getStats()},{id:"clear",category:"Session",label:"Clear context",hint:"Wipe in-memory context, keep session id",icon:Ai,keywords:["clear","reset","wipe"],run:()=>{var j,M;c(),(M=(j=d.client)==null?void 0:j.clearContext)==null||M.call(j)}},{id:"new",category:"Session",label:"New session",hint:"Brand-new on disk + memory",icon:zi,keywords:["new","fresh","session"],run:()=>{var j,M;return(M=(j=d.client)==null?void 0:j.newSession)==null?void 0:M.call(j)}},{id:"compact",category:"Session",label:"Compact context",icon:Bf,keywords:["compact","shrink","context"],run:()=>{var j,M;return(M=(j=d.client)==null?void 0:j.compactContext)==null?void 0:M.call(j)}},{id:"export",category:"Session",label:"Export chat as markdown",icon:Hf,keywords:["export","save","markdown","download"],run:()=>xd()},{id:"export-html",category:"Session",label:"Export chat as HTML",hint:"Self-contained, opens in any browser",icon:Hf,keywords:["export","html","download","archive"],run:()=>_2()},{id:"history",category:"Command",label:"Open history",icon:qf,keywords:["history","sessions"],run:()=>l("history")},{id:"settings",category:"Command",label:"Open settings",icon:hd,keywords:["settings","config"],run:()=>l("settings")},{id:"model",category:"Command",label:"Change provider/model",icon:Ti,keywords:["model","provider","change"],run:()=>l("settings")},{id:"theme-light",category:"Theme",label:"Theme: Light",icon:md,keywords:["theme","light","mode"],run:()=>i("light")},{id:"theme-dark",category:"Theme",label:"Theme: Dark",icon:dd,keywords:["theme","dark","mode"],run:()=>i("dark")},{id:"theme-system",category:"Theme",label:"Theme: Follow system",icon:fd,keywords:["theme","system","auto"],run:()=>i("system")},{id:"compact-toggle",category:"Command",label:"Toggle compact density",icon:Zw,hint:"Ctrl+Shift+D",keywords:["compact","dense","density","size"],run:()=>Ne.getState().toggleCompactMode()},{id:"sound-toggle",category:"Command",label:Pe.getState().soundOnComplete?"Sound on completion: ON — turn off":"Sound on completion: OFF — turn on",icon:Pe.getState().soundOnComplete?u2:c2,hint:"Chime when a run finishes",keywords:["sound","audio","chime","notify","beep"],run:()=>{const j=!Pe.getState().soundOnComplete;Pe.getState().setSoundOnComplete(j),j&&Gx(()=>Promise.resolve().then(()=>Yx),void 0).then(M=>M.playCompletionChime()).catch(()=>{})}}];for(const j of s.slice(0,10))j.isCurrent||T.push({id:`resume-${j.id}`,category:"Session",label:`Resume: ${j.title||"(empty)"}`,hint:`${j.provider}/${j.model}`,icon:Ax,keywords:["resume",j.title,j.id,j.provider,j.model],run:()=>d.resumeSession(j.id)});return T},[s,d,l,i,u,c]),k=w.useMemo(()=>{const T=p.toLowerCase().trim();return T?S.filter(j=>[j.label,j.hint??"",j.category,...j.keywords??[]].join(" ").toLowerCase().includes(T)):S},[S,p]);if(w.useEffect(()=>{x>=k.length&&y(0)},[k.length,x]),!t)return null;const N=T=>{T&&(r(!1),T.run())};return h.jsx("div",{className:"fixed inset-0 z-50 bg-background/60 backdrop-blur-sm flex items-start justify-center pt-[14vh] px-4",onClick:()=>r(!1),onKeyDown:T=>{T.key==="Escape"&&r(!1)},children:h.jsxs("div",{onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),className:"w-full max-w-2xl rounded-xl border bg-popover shadow-2xl overflow-hidden flex flex-col",children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b",children:[h.jsx(ha,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("input",{ref:b,value:p,onChange:T=>m(T.target.value),placeholder:"Search commands, sessions, settings…",className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground",onKeyDown:T=>{T.key==="ArrowDown"?(T.preventDefault(),y(j=>(j+1)%Math.max(1,k.length))):T.key==="ArrowUp"?(T.preventDefault(),y(j=>(j-1+Math.max(1,k.length))%Math.max(1,k.length))):T.key==="Enter"&&(T.preventDefault(),N(k[x]))}}),h.jsx("kbd",{className:"text-[10px] text-muted-foreground border rounded px-1.5 py-0.5",children:"Esc"})]}),h.jsx("div",{className:"max-h-[60vh] overflow-y-auto",children:k.length===0?h.jsxs("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:['No matches for "',p,'"']}):O2(k,x,N,y)}),h.jsxs("div",{className:"border-t px-4 py-2 text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-3",children:[h.jsx("span",{children:"↑↓ navigate"}),h.jsx("span",{children:"↵ select"}),h.jsx("span",{children:"Esc dismiss"})]})]})})}function O2(t,r,l,i){const s={};return t.forEach((u,c)=>{s[u.category]||(s[u.category]=[]),s[u.category].push({item:u,globalIdx:c})}),h.jsx("div",{className:"p-1",children:Object.entries(s).map(([u,c])=>h.jsxs("div",{children:[h.jsx("div",{className:"px-3 pt-2 pb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:u}),c.map(({item:d,globalIdx:p})=>{const m=d.icon,x=p===r;return h.jsxs("button",{type:"button",onMouseEnter:()=>i(p),onClick:()=>l(d),className:me("w-full flex items-center gap-3 px-3 py-2 rounded text-left text-sm transition-colors",x?"bg-accent text-accent-foreground":"hover:bg-accent/40"),children:[h.jsx(m,{className:"h-4 w-4 text-muted-foreground shrink-0"}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("div",{className:"truncate",children:d.label}),d.hint&&h.jsx("div",{className:"text-xs text-muted-foreground truncate",children:d.hint})]}),x&&h.jsx("span",{className:"text-[10px] text-muted-foreground",children:"↵"})]},d.id)})]},u))})}function xd(){const t=he.getState().messages;he.getState();const r=[],l=new Date().toISOString().slice(0,19).replace(/[:T]/g,"-");r.push("# WrongStack chat export"),r.push(`*Exported: ${new Date().toISOString()}*`),r.push("");for(const c of t)if(c.role==="user")r.push("## 👤 User"),r.push(""),r.push(c.content),r.push("");else if(c.role==="assistant")r.push("## 🤖 Assistant"),r.push(""),r.push(c.content),r.push("");else if(c.role==="tool"){const d=c.isError?"❌":c.toolResult!==void 0?"✅":"⏳";r.push(`### 🔧 Tool: \`${c.toolName??"unknown"}\` ${d}`),c.toolInput!==void 0&&(r.push("```json"),r.push(JSON.stringify(c.toolInput,null,2)),r.push("```")),c.toolResult&&(r.push("<details><summary>Output</summary>"),r.push(""),r.push("```"),r.push(c.toolResult),r.push("```"),r.push("</details>")),r.push("")}const i=new Blob([r.join(`
465
+ `)],{type:"text/markdown"}),s=URL.createObjectURL(i),u=document.createElement("a");u.href=s,u.download=`wrongstack-chat-${l}.md`,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(s)}function _2(){var m,x,y;const t=he.getState().messages,r=Ge.getState(),l=new Date().toISOString().slice(0,19).replace(/[:T]/g,"-"),i=b=>b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),s=t.map(b=>{if(b.role==="tool"){const T=b.isError?"❌":b.toolResult!==void 0?"✅":"⏳";return`
466
+ <section class="bubble tool ${b.isError?"error":""}">
467
+ <header><span class="icon">🔧</span><code>${i(b.toolName??"tool")}</code> ${T}</header>
468
+ ${b.toolInput!==void 0?`<details><summary>Input</summary><pre>${i(JSON.stringify(b.toolInput,null,2))}</pre></details>`:""}
469
+ ${b.toolResult?`<details><summary>Output</summary><pre>${i(b.toolResult)}</pre></details>`:""}
470
+ </section>`}const S=b.role==="user"?"user":"assistant",k=b.role==="user"?"👤":"🤖",N=b.role==="user"?"User":"Assistant";return`
471
+ <section class="bubble ${S}">
472
+ <header><span class="icon">${k}</span><strong>${N}</strong></header>
473
+ <pre class="content">${escape(b.content)}</pre>
474
+ </section>`}),u=`<!doctype html>
475
+ <html lang="en"><head>
476
+ <meta charset="utf-8">
477
+ <title>WrongStack chat — ${escape(((m=r.session)==null?void 0:m.title)||r.projectName||"export")}</title>
478
+ <style>
479
+ :root { color-scheme: light dark; }
480
+ body { font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; max-width: 920px; margin: 24px auto; padding: 0 16px; }
481
+ h1 { font-size: 20px; margin-bottom: 4px; }
482
+ .meta { color: #666; font-size: 12px; margin-bottom: 24px; }
483
+ .bubble { margin: 12px 0; padding: 10px 14px; border-radius: 10px; border: 1px solid #ddd; }
484
+ .bubble header { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #666; margin-bottom: 6px; }
485
+ .bubble header .icon { margin-right: 4px; }
486
+ .bubble.user { background: #eef4ff; border-color: #c8d8f5; }
487
+ .bubble.assistant { background: #fff; }
488
+ .bubble.tool { background: #fafafa; }
489
+ .bubble.tool.error { background: #fff5f5; border-color: #f5c8c8; }
490
+ pre.content, .bubble pre { white-space: pre-wrap; word-break: break-word; font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; margin: 0; }
491
+ details summary { cursor: pointer; color: #555; font-size: 12px; }
492
+ details pre { margin-top: 6px; background: #f4f4f4; padding: 8px; border-radius: 6px; max-height: 360px; overflow: auto; }
493
+ @media (prefers-color-scheme: dark) {
494
+ body { background: #0d0d0f; color: #e6e6e6; }
495
+ .bubble { border-color: #2a2a2e; }
496
+ .bubble.user { background: #16213a; border-color: #2a3d6b; }
497
+ .bubble.assistant { background: #161618; }
498
+ .bubble.tool { background: #131315; }
499
+ .bubble.tool.error { background: #2a1717; border-color: #5c2a2a; }
500
+ details pre { background: #1a1a1c; }
501
+ .meta, .bubble header, details summary { color: #999; }
502
+ }
503
+ </style>
504
+ </head><body>
505
+ <h1>WrongStack chat — ${escape(((x=r.session)==null?void 0:x.title)||r.projectName||"export")}</h1>
506
+ <div class="meta">
507
+ Exported ${new Date().toISOString()}${(y=r.session)!=null&&y.provider?` · ${escape(r.session.provider)}/${escape(r.session.model)}`:""} · ${t.length} message${t.length===1?"":"s"}
508
+ </div>
509
+ ${s.join("")}
510
+ </body></html>`,c=new Blob([u],{type:"text/html;charset=utf-8"}),d=URL.createObjectURL(c),p=document.createElement("a");p.href=d,p.download=`wrongstack-chat-${l}.html`,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(d)}function L2({query:t,onPick:r,onClose:l}){const i=In(),s=Pe(y=>y.wsUrl),[u,c]=w.useState([]),[d,p]=w.useState(0),m=w.useRef(null),x=w.useRef(null);return w.useEffect(()=>{const b=qn(s).on("files.list",S=>{var N;const k=S.payload;c(k.files??[]),p(0),(N=x.current)==null||N.resolve(k.files??[]),x.current=null});return()=>b()},[s]),w.useEffect(()=>(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{i.client.listFiles(t,50)},80),()=>{m.current&&clearTimeout(m.current)}),[t,i.client]),w.useEffect(()=>{const y=b=>{if(b.key==="ArrowDown")b.preventDefault(),p(S=>(S+1)%Math.max(1,u.length));else if(b.key==="ArrowUp")b.preventDefault(),p(S=>(S-1+Math.max(1,u.length))%Math.max(1,u.length));else if(b.key==="Enter"||b.key==="Tab"){if(u.length===0)return;b.preventDefault(),r(u[d])}else b.key==="Escape"&&(b.preventDefault(),l())};return window.addEventListener("keydown",y,!0),()=>window.removeEventListener("keydown",y,!0)},[u,d,r,l]),h.jsxs("div",{className:"absolute bottom-full left-0 right-0 mb-2 rounded-lg border bg-popover shadow-md p-1 text-sm max-h-72 overflow-auto",children:[h.jsxs("div",{className:"px-3 py-1 text-[10px] uppercase tracking-wider text-muted-foreground border-b mb-1 flex items-center justify-between",children:[h.jsxs("span",{children:["@ Files ",t&&`· "${t}"`]}),h.jsx("span",{children:"↑/↓ select · ↵ insert · Esc dismiss"})]}),u.length===0?h.jsx("div",{className:"px-3 py-2 text-xs text-muted-foreground italic",children:t?`No files match "${t}"`:"Searching project…"}):u.map((y,b)=>h.jsxs("button",{type:"button",onClick:()=>r(y),onMouseEnter:()=>p(b),className:me("w-full text-left px-3 py-1.5 rounded transition-colors flex items-center gap-2 font-mono text-xs",b===d?"bg-accent text-accent-foreground":"hover:bg-accent/40"),children:[y.includes("/")?h.jsx(Gw,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}):h.jsx(Fw,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),h.jsx("span",{className:"truncate",children:y})]},y))]})}function fy(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function bd(...t){return r=>{let l=!1;const i=t.map(s=>{const u=fy(s,r);return!l&&typeof u=="function"&&(l=!0),u});if(l)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():fy(t[s],null)}}}}function Vt(...t){return w.useCallback(bd(...t),t)}var U2=Symbol.for("react.lazy"),ys=od[" use ".trim().toString()];function B2(t){return typeof t=="object"&&t!==null&&"then"in t}function Px(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===U2&&"_payload"in t&&B2(t._payload)}function H2(t){const r=I2(t),l=w.forwardRef((i,s)=>{let{children:u,...c}=i;Px(u)&&typeof ys=="function"&&(u=ys(u._payload));const d=w.Children.toArray(u),p=d.find($2);if(p){const m=p.props.children,x=d.map(y=>y===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:y);return h.jsx(r,{...c,ref:s,children:w.isValidElement(m)?w.cloneElement(m,void 0,x):null})}return h.jsx(r,{...c,ref:s,children:u})});return l.displayName=`${t}.Slot`,l}var q2=H2("Slot");function I2(t){const r=w.forwardRef((l,i)=>{let{children:s,...u}=l;if(Px(s)&&typeof ys=="function"&&(s=ys(s._payload)),w.isValidElement(s)){const c=Y2(s),d=F2(u,s.props);return s.type!==w.Fragment&&(d.ref=i?bd(i,c):c),w.cloneElement(s,d)}return w.Children.count(s)>1?w.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var V2=Symbol("radix.slottable");function $2(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===V2}function F2(t,r){const l={...r};for(const i in r){const s=t[i],u=r[i];/^on[A-Z]/.test(i)?s&&u?l[i]=(...d)=>{const p=u(...d);return s(...d),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...u}:i==="className"&&(l[i]=[s,u].filter(Boolean).join(" "))}return{...t,...l}}function Y2(t){var i,s;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?t.ref:(r=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}const dy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,hy=wx,G2=(t,r)=>l=>{var i;if((r==null?void 0:r.variants)==null)return hy(t,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:s,defaultVariants:u}=r,c=Object.keys(s).map(m=>{const x=l==null?void 0:l[m],y=u==null?void 0:u[m];if(x===null)return null;const b=dy(x)||dy(y);return s[m][b]}),d=l&&Object.entries(l).reduce((m,x)=>{let[y,b]=x;return b===void 0||(m[y]=b),m},{}),p=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((m,x)=>{let{class:y,className:b,...S}=x;return Object.entries(S).every(k=>{let[N,T]=k;return Array.isArray(T)?T.includes({...u,...d}[N]):{...u,...d}[N]===T})?[...m,y,b]:m},[]);return hy(t,c,p,l==null?void 0:l.class,l==null?void 0:l.className)},P2=G2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ve=w.forwardRef(({className:t,variant:r,size:l,asChild:i=!1,...s},u)=>{const c=i?q2:"button";return h.jsx(c,{className:me(P2({variant:r,size:l,className:t})),ref:u,...s})});Ve.displayName="Button";const $f=[{name:"/help",category:"App",description:"Show every slash command and what it does"},{name:"/export",category:"Session",description:"Download the current chat as markdown"},{name:"/todos",category:"Inspect",description:"List current todos (try `/todos clear` to reset)"},{name:"/clear",category:"Session",description:"Wipe current context (keeps session id, disk record stays)"},{name:"/new",category:"Session",description:"Start a brand-new session (fresh on disk and in memory)"},{name:"/compact",category:"Session",description:"Shrink context — elide ancient tool output"},{name:"/debug",category:"Inspect",aliases:["/context"],description:"Per-section context size breakdown"},{name:"/tools",category:"Inspect",description:"List every registered tool the model can call"},{name:"/memory",category:"Inspect",description:"Show all remembered notes (project + user scope)"},{name:"/skill",category:"Inspect",aliases:["/skills"],description:"List active skills"},{name:"/diag",category:"Inspect",description:"Runtime diagnostics (provider, tools, features, mode, usage)"},{name:"/stats",category:"Inspect",description:"Session stats: tokens, cache hit ratio, cost, elapsed"},{name:"/save",category:"Session",description:"Force-flush the session (auto-saved already)"},{name:"/abort",category:"Run",aliases:["/stop"],description:"Abort the current run"},{name:"/settings",category:"App",aliases:["/model"],description:"Open settings (provider/model/keys)"}],X2=["Run","Session","Inspect","App"];function my(t,r){let l=r-1;for(;l>=0;){const i=t[l];if(i==="@"){const s=l>0?t[l-1]:"";return l===0||/\s/.test(s??"")?{start:l,query:t.slice(l+1,r)}:null}if(/\s/.test(i))return null;l--}return null}function Q2(t){const r=t.toLowerCase();return r==="/"||r===""?$f:$f.filter(l=>{var i;return l.name.startsWith(r)||(((i=l.aliases)==null?void 0:i.some(s=>s.startsWith(r)))??!1)})}function K2(){const{isLoading:t,setLoading:r,addMessage:l,clearMessages:i}=he(),s=he(A=>A.queue),u=he(A=>A.enqueue),c=he(A=>A.removeQueued),d=he(A=>A.clearQueue),{setCurrentView:p}=Ne(),m=Ne(A=>A.pushPrompt),x=Ne(A=>A.promptHistory),y=In(),{sendMessage:b,sendAbort:S,client:k}=y,N=Ge(A=>A.lastInputTokens),T=Ge(A=>A.maxContext),[j,M]=w.useState(""),[z,F]=w.useState(0),[P,U]=w.useState(-1),[G,le]=w.useState(null),[se,B]=w.useState(null),[X,Q]=w.useState(!1),de=w.useRef(null),oe=w.useCallback(A=>{var J,ye,ke,Ae,ht;const L=A.trim(),E=L.indexOf(" "),O=(E===-1?L:L.slice(0,E)).toLowerCase(),ee=E===-1?"":L.slice(E+1).trim(),ne=O;switch(ne){case"/help":{const yt=["📖 **Slash commands**","",...$f.map(Le=>{var ge;return`• \`${Le.name}\`${(ge=Le.aliases)!=null&&ge.length?` (${Le.aliases.map(ve=>`\`${ve}\``).join(", ")})`:""} — ${Le.description}`})];return l({role:"assistant",content:yt.join(`
511
+ `)}),!0}case"/clear":return i(),(J=k==null?void 0:k.clearContext)==null||J.call(k),!0;case"/new":return(ye=k==null?void 0:k.newSession)==null||ye.call(k),!0;case"/compact":case"/compact!":return(ke=k==null?void 0:k.compactContext)==null||ke.call(k,ne==="/compact!"),!0;case"/debug":case"/context":return(Ae=k==null?void 0:k.debugContext)==null||Ae.call(k),!0;case"/tools":return y.listTools(),!0;case"/memory":return y.listMemory(),!0;case"/skill":case"/skills":return y.listSkills(),!0;case"/diag":return y.getDiag(),!0;case"/stats":return y.getStats(),!0;case"/save":return y.saveSession(),!0;case"/todos":{if(ee.toLowerCase()==="clear")return(ht=k==null?void 0:k.clearTodos)==null||ht.call(k),!0;const Le=Ge.getState().todos;if(Le.length===0)return l({role:"assistant",content:"✅ **Todos** — _empty. Ask the agent to plan something and they'll show up here._"}),!0;const ge=[`✅ **Todos** (${Le.filter(ve=>ve.status==="completed").length}/${Le.length} done)`,""];for(const ve of Le){const $e=ve.status==="completed"?"[x]":ve.status==="in_progress"?"[~]":"[ ]",nt=ve.status==="in_progress"&&ve.activeForm?ve.activeForm:ve.content;ge.push(`- ${$e} ${nt}`)}return ge.push("","_Use `/todos clear` to wipe the list._"),l({role:"assistant",content:ge.join(`
512
+ `)}),!0}case"/export":return xd(),l({role:"assistant",content:"📥 Chat exported to your downloads folder."}),!0;case"/abort":case"/stop":return S(),r(!1),!0;case"/settings":case"/model":return p("settings"),!0;default:return!1}},[l,i,k,S,r,p,y]),q=j.startsWith("/")&&!j.includes(" ")?Q2(j):[];w.useEffect(()=>{z>=q.length&&F(0)},[q.length,z]);const H=w.useCallback(async A=>{if(A.preventDefault(),!j.trim())return;const L=j.trim();if(L.startsWith("/")&&oe(L)){m(L),M(""),U(-1);return}if(M(""),U(-1),m(L),t){u(L);return}try{k!=null&&k.isConnected?(l({role:"user",content:L}),r(!0),b(L)):console.error("WebSocket not connected")}catch(E){console.error("Failed to send:",E),r(!1)}},[j,t,u,k,b,r,l,oe,m]),te=w.useCallback(()=>{S(),r(!1)},[S,r]),ae=w.useCallback(()=>{S(),r(!1);const A=he.getState().messages;for(let L=A.length-1;L>=0;L--){const E=A[L];if(E.role==="user"&&E.content){M(E.content),requestAnimationFrame(()=>{const O=de.current;O&&(O.style.height="auto",O.style.height=`${Math.min(O.scrollHeight,200)}px`,O.focus(),O.setSelectionRange(E.content.length,E.content.length))});return}}},[S,r]),Se=A=>{if(q.length===0&&!G&&x.length>0){if(A.key==="ArrowUp"){const L=A.currentTarget,E=L.value.slice(0,L.selectionStart);if(P>=0||E.indexOf(`
513
+ `)===-1){A.preventDefault();const O=Math.min(x.length-1,P+1);U(O);const ee=x[O]??"";M(ee),requestAnimationFrame(()=>{const ne=de.current;ne&&(ne.style.height="auto",ne.style.height=`${Math.min(ne.scrollHeight,200)}px`,ne.setSelectionRange(ee.length,ee.length))});return}}if(A.key==="ArrowDown"&&P>=0){A.preventDefault();const L=P-1;if(L<0)U(-1),M("");else{U(L);const E=x[L]??"";M(E),requestAnimationFrame(()=>{const O=de.current;O&&(O.style.height="auto",O.style.height=`${Math.min(O.scrollHeight,200)}px`,O.setSelectionRange(E.length,E.length))})}return}}if(q.length>0){if(A.key==="ArrowDown"){A.preventDefault(),F(L=>(L+1)%q.length);return}if(A.key==="ArrowUp"){A.preventDefault(),F(L=>(L-1+q.length)%q.length);return}if(A.key==="Tab"){A.preventDefault();const L=q[z];L&&(M(L.name+" "),F(0));return}if(A.key==="Enter"&&!A.shiftKey){const L=q[z];if(L&&L.name!==j.toLowerCase().trim()){A.preventDefault(),M(""),oe(L.name);return}}if(A.key==="Escape"){A.preventDefault(),M("");return}}A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),H(A))},D=()=>{const A=de.current;A&&(A.style.height="auto",A.style.height=`${Math.min(A.scrollHeight,200)}px`)};return h.jsxs("div",{className:"flex flex-col gap-2",children:[se&&h.jsxs("div",{className:"rounded-md border border-amber-500/30 bg-amber-500/5 text-amber-700 dark:text-amber-300 px-2.5 py-1.5 text-xs flex items-center justify-between gap-2 animate-message",children:[h.jsxs("span",{children:["Pasted"," ",h.jsx("span",{className:"font-mono tabular-nums",children:se.chars.toLocaleString()})," chars (",h.jsx("span",{className:"font-mono tabular-nums",children:se.lines})," lines) — fenced code blocks render best with ",h.jsx("span",{className:"font-mono",children:"```"}),"."]}),h.jsx("button",{type:"button",onClick:()=>B(null),className:"text-amber-600/70 hover:text-amber-600 dark:text-amber-300/70 dark:hover:text-amber-300 shrink-0",title:"Dismiss",children:"×"})]}),s.length>0&&h.jsxs("div",{className:"rounded-lg border bg-muted/30 p-2 text-xs",children:[h.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[h.jsxs("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-medium",children:["Queued (",s.length,")"]}),h.jsx("button",{type:"button",onClick:d,className:"text-muted-foreground hover:text-destructive text-xs",children:"Clear all"})]}),h.jsx("ul",{className:"space-y-1",children:s.map((A,L)=>h.jsxs("li",{className:"flex items-start justify-between gap-2 rounded bg-background/60 border px-2 py-1",children:[h.jsx("span",{className:"truncate flex-1 min-w-0",children:A}),h.jsx("button",{type:"button",onClick:()=>c(L),className:"text-muted-foreground hover:text-destructive shrink-0",title:"Remove from queue",children:"×"})]},L))})]}),h.jsxs("form",{onSubmit:H,onDragEnter:A=>{!A.dataTransfer||!Array.from(A.dataTransfer.types).includes("Files")||(A.preventDefault(),Q(!0))},onDragOver:A=>{!A.dataTransfer||!Array.from(A.dataTransfer.types).includes("Files")||(A.preventDefault(),A.dataTransfer.dropEffect="copy")},onDragLeave:A=>{A.currentTarget.contains(A.relatedTarget)||Q(!1)},onDrop:A=>{if(!A.dataTransfer)return;const L=Array.from(A.dataTransfer.files??[]);if(L.length===0){Q(!1);return}A.preventDefault(),Q(!1);const E=de.current,O=(E==null?void 0:E.selectionStart)??j.length,ee=j.slice(0,O),ne=j.slice(O),ye=ee.length>0&&!/\s$/.test(ee)?" ":"",ke=L.map(nt=>`@${nt.name}`),Ae=ke.join(" "),yt=ne.length===0||!/^\s/.test(ne)?" ":"",Le=`${ye}${Ae}${yt}`,ge=ee+Le+ne;M(ge);const ve=ee.length+ye.length+ke.slice(0,-1).join(" ").length+(ke.length>1?1:0),$e=L[L.length-1].name;requestAnimationFrame(()=>{if(E){const nt=ee.length+Le.length-yt.length;E.focus(),E.setSelectionRange(nt,nt),E.style.height="auto",E.style.height=`${Math.min(E.scrollHeight,200)}px`}le({start:ve,query:$e})})},className:me("flex items-end gap-2 relative rounded-lg transition-colors",X&&"ring-2 ring-primary ring-offset-2 ring-offset-background bg-primary/5"),children:[X&&h.jsxs("div",{className:"absolute inset-0 z-20 flex items-center justify-center pointer-events-none rounded-lg bg-primary/10 text-primary text-sm font-medium",children:["Drop file","(s)"," to attach as @-mention"]}),h.jsxs("div",{className:"relative flex-1",children:[G&&h.jsx(L2,{query:G.query,onClose:()=>le(null),onPick:A=>{const L=j.slice(0,G.start),E=j.slice(G.start+1+G.query.length),O=`@${A} `,ee=L+O+E;M(ee),le(null),requestAnimationFrame(()=>{const ne=de.current;if(ne){const J=L.length+O.length;ne.focus(),ne.setSelectionRange(J,J),ne.style.height="auto",ne.style.height=`${Math.min(ne.scrollHeight,200)}px`}})}}),!G&&q.length>0&&(()=>{const A={};q.forEach((E,O)=>{A[E.category]||(A[E.category]=[]),A[E.category].push({cmd:E,idx:O})});const L=X2.filter(E=>{var O;return(O=A[E])==null?void 0:O.length});return h.jsxs("div",{className:"absolute bottom-full left-0 right-0 mb-2 rounded-lg border bg-popover shadow-md p-1 text-sm max-h-72 overflow-auto",children:[h.jsx("div",{className:"px-3 py-1 text-[10px] uppercase tracking-wider text-muted-foreground border-b mb-1",children:"↑/↓ select · Tab complete · Enter dispatch · Esc dismiss"}),L.map(E=>h.jsxs("div",{className:"mb-1",children:[h.jsx("div",{className:"px-3 pt-1 pb-0.5 text-[10px] uppercase tracking-wider text-muted-foreground/70 font-semibold",children:E}),A[E].map(({cmd:O,idx:ee})=>{var ne;return h.jsxs("button",{type:"button",onClick:()=>{M(""),oe(O.name)},onMouseEnter:()=>F(ee),className:me("w-full text-left px-3 py-1.5 rounded transition-colors flex items-center gap-3",ee===z?"bg-accent text-accent-foreground":"hover:bg-accent/40"),children:[h.jsx("span",{className:"font-mono shrink-0",children:O.name}),(ne=O.aliases)!=null&&ne.length?h.jsxs("span",{className:"text-xs text-muted-foreground/70 font-mono shrink-0",children:["(",O.aliases.join(", "),")"]}):null,h.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["— ",O.description]})]},O.name)})]},E))]})})(),h.jsx("textarea",{ref:de,value:j,onChange:A=>{const L=A.target.value;M(L),D(),P>=0&&U(-1);const E=A.target.selectionStart??L.length;le(my(L,E))},onSelect:A=>{const L=A.currentTarget;le(my(L.value,L.selectionStart))},onKeyDown:Se,onPaste:A=>{var E;const L=((E=A.clipboardData)==null?void 0:E.getData("text"))??"";if(L.length>800){const O=L.split(`
514
+ `).length;B({chars:L.length,lines:O}),setTimeout(()=>B(null),4e3)}},placeholder:k!=null&&k.isConnected?t?"Agent is running — type to queue a follow-up…":"Message WrongStack… (type / for commands, @ for files)":"Connect to server first…",className:me("flex min-h-[44px] w-full resize-none rounded-lg border border-input bg-background px-4 py-3 pr-12","text-sm ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","scrollbar-thin"),rows:1,disabled:!(k!=null&&k.isConnected)}),j.length>0&&(()=>{const A=j.length>=400,L=Math.ceil(j.length/4);let E="text-muted-foreground",O;if(T>0&&A){const ne=(N+L+64)/T*100;ne>=100?(E="text-red-600 dark:text-red-400 font-medium",O=`Projected ${Math.round(ne)}% of ${T.toLocaleString()} ctx — will likely error or compact.`):ne>=85?(E="text-amber-600 dark:text-amber-400 font-medium",O=`Projected ${Math.round(ne)}% of ${T.toLocaleString()} ctx — getting tight.`):O=`≈ ${L.toLocaleString()} tokens · projected ${Math.round(ne)}% of ${T.toLocaleString()} ctx.`}else A&&(O=`≈ ${L.toLocaleString()} tokens (4-char heuristic)`);return h.jsxs("span",{className:me("absolute bottom-1.5 right-12 text-xs tabular-nums",E),title:O,children:[j.length,A&&h.jsxs("span",{className:"ml-1 opacity-70",children:["· ≈",L>=1e3?`${(L/1e3).toFixed(1)}k`:L,"t"]})]})})()]}),h.jsx("div",{className:"flex gap-1",children:t?h.jsxs(h.Fragment,{children:[h.jsx(Ve,{type:"button",size:"icon",variant:"outline",onClick:ae,className:"h-[44px] w-[44px] rounded-lg",title:"Stop run and edit the last prompt (reuse + rewrite)",children:h.jsx(Bx,{className:"h-4 w-4"})}),h.jsx(Ve,{type:"button",size:"icon",variant:"destructive",onClick:te,className:"h-[44px] w-[44px] rounded-lg",title:"Abort the current run",children:h.jsx(i2,{className:"h-4 w-4 fill-current"})})]}):h.jsx(Ve,{type:"submit",size:"icon",disabled:!j.trim()||!(k!=null&&k.isConnected),className:"h-[44px] w-[44px] rounded-lg",children:h.jsx(l2,{className:"h-4 w-4"})})})]})]})}function Z2({wsStatus:t,wsConnected:r}){const l=Pe(c=>c.wsUrl),[i,s]=w.useState(Date.now());w.useEffect(()=>{if(t.state!=="reconnecting")return;const c=setInterval(()=>s(Date.now()),500);return()=>clearInterval(c)},[t.state]);const u=()=>qn(l).retryNow();if(t.state==="open"&&r)return h.jsx("div",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0 bg-green-500/10 text-green-600 dark:text-green-400",title:"Backend connected",children:h.jsx($x,{className:"h-3 w-3"})});if(t.state==="connecting")return h.jsxs("div",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0 bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",title:"Connecting to backend",children:[h.jsx(Fr,{className:"h-3 w-3 animate-spin"}),h.jsx("span",{children:"connecting"})]});if(t.state==="reconnecting"){const c=Math.max(0,Math.ceil((t.nextRetryAt-i)/1e3));return h.jsxs("button",{type:"button",onClick:u,className:me("flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0","bg-orange-500/10 text-orange-600 dark:text-orange-400 hover:bg-orange-500/20","transition-colors"),title:t.lastError?`Reconnecting — last error: ${t.lastError}. Click to retry now.`:"Reconnecting — click to retry now.",children:[h.jsx(Fr,{className:"h-3 w-3 animate-spin"}),h.jsxs("span",{children:["retry #",t.attempt," in ",c,"s"]})]})}return h.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0 bg-red-500/10 text-red-600 dark:text-red-400 hover:bg-red-500/20 transition-colors",title:t.state==="closed"&&t.error?`Disconnected: ${t.error}. Click to retry.`:"Disconnected. Click to retry.",children:[h.jsx(pd,{className:"h-3 w-3"}),h.jsxs("span",{className:"flex items-center gap-0.5",children:["offline",h.jsx(zi,{className:"h-3 w-3 opacity-70"})]})]})}function J2(){const t=Ge(y=>y.cost),r=Ge(y=>y.inputCost),l=Ge(y=>y.outputCost),i=Ge(y=>y.cacheReadCost),s=he(y=>y.messages),[u,c]=w.useState(!1),d=w.useRef(null);w.useEffect(()=>{if(!u)return;const y=S=>{var k;(k=d.current)!=null&&k.contains(S.target)||c(!1)},b=S=>{S.key==="Escape"&&c(!1)};return document.addEventListener("mousedown",y),document.addEventListener("keydown",b),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",b)}},[u]);const p=(()=>{const y=[];for(const b of s)b.role==="assistant"&&b.runSummary&&b.runSummary.costDelta>0&&y.push({id:b.id,preview:b.content.slice(0,80).replace(/\s+/g," ").trim()||"(empty)",cost:b.runSummary.costDelta,tools:b.runSummary.tools,ms:b.runSummary.durationMs,ts:b.timestamp});return y.sort((b,S)=>S.cost-b.cost),y.slice(0,5)})(),m=y=>y>=.01?`$${y.toFixed(4)}`:y>0?`$${y.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`:"$0",x=r>0||l>0;return h.jsxs("div",{ref:d,className:"relative inline-block",children:[h.jsxs("button",{type:"button",onClick:()=>c(y=>!y),className:me("font-medium text-green-600 dark:text-green-400 hover:underline tabular-nums"),title:"Click for per-turn cost breakdown",children:["$",t.toFixed(4)]}),u&&h.jsxs("div",{className:"absolute right-0 top-full mt-1 z-30 w-80 rounded-md border bg-popover shadow-lg p-3 text-foreground",children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"Cost breakdown"}),h.jsx("span",{className:"font-mono tabular-nums text-sm font-semibold text-green-600 dark:text-green-400",children:m(t)})]}),x?h.jsxs("div",{className:"text-[11px] text-muted-foreground font-mono mb-3 border-b pb-2",children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsx("span",{children:"input /1M"}),h.jsxs("span",{children:["$",r.toFixed(2)]})]}),h.jsxs("div",{className:"flex justify-between",children:[h.jsx("span",{children:"output /1M"}),h.jsxs("span",{children:["$",l.toFixed(2)]})]}),i>0&&h.jsxs("div",{className:"flex justify-between",children:[h.jsx("span",{children:"cache /1M"}),h.jsxs("span",{children:["$",i.toFixed(2)]})]})]}):h.jsx("div",{className:"text-[11px] text-muted-foreground italic mb-3 border-b pb-2",children:"No pricing for the current model — cost figures are zero."}),p.length===0?h.jsx("div",{className:"text-xs text-muted-foreground italic",children:"No completed turns yet. Run a prompt to see per-turn cost here."}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/80 mb-1",children:["Top ",p.length," expensive turn",p.length===1?"":"s"]}),h.jsx("ul",{className:"space-y-1",children:p.map(y=>h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>{const b=document.querySelector(`[data-message-id="${y.id}"]`);b&&b.scrollIntoView({behavior:"smooth",block:"center"}),c(!1)},className:"w-full text-left rounded px-2 py-1.5 hover:bg-accent/40 transition-colors",children:[h.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[h.jsx("span",{className:"text-xs truncate",children:y.preview}),h.jsx("span",{className:"text-xs font-mono tabular-nums text-green-600 dark:text-green-400 shrink-0",children:m(y.cost)})]}),h.jsxs("div",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:[y.tools," tool",y.tools===1?"":"s"," · ",(y.ms/1e3).toFixed(1),"s"]})]})},y.id))})]})]})]})}const W2=["path","file_path","pattern","command","cmd","url","query","description","content"];function ek(t,r){if(r==null)return"";if(typeof r!="object")return Hr(String(r),120);const l=r,i=(t??"").toLowerCase();if(/^todo(_?write)?$|^todos$/i.test(i)||Array.isArray(l.todos)){const u=l.todos??[];if(Array.isArray(u)){const c=u.filter(m=>m.status==="completed").length,d=u.filter(m=>m.status==="in_progress").length,p=[`${u.length} todo${u.length===1?"":"s"}`];return c>0&&p.push(`${c} done`),d>0&&p.push(`${d} in-progress`),p.join(" · ")}}if(/batch|parallel/.test(i)||Array.isArray(l.tool_uses)||Array.isArray(l.calls)){const u=l.tool_uses??l.calls??l.batch;if(Array.isArray(u)){const c=new Set;for(const m of u)m&&typeof m=="object"&&"name"in m&&c.add(String(m.name));const d=[...c].slice(0,3).join(", "),p=c.size>3?` +${c.size-3}`:"";return`${u.length} sub-tool${u.length===1?"":"s"}${d?` · ${d}${p}`:""}`}}if(/^(edit|str_replace|edit_file|patch)$/.test(i)){const u=sf(l),c=typeof l.old_string=="string"?l.old_string:"",d=typeof l.new_string=="string"?l.new_string:"",p=c?c.split(`
515
+ `).length:0,m=d?d.split(`
516
+ `).length:0;return`edit ${u||"(file)"}${p||m?` (${p} → ${m} lines)`:""}`}if(/^(write|write_file|create_file|new_file)$/.test(i)){const u=sf(l),c=typeof l.content=="string"?l.content:"",d=c?c.split(`
517
+ `).length:0;return`write ${u||"(file)"}${d?` · ${d} lines`:""}`}if(/^(bash|shell|exec|run|run_command|run_shell)$/.test(i)){const u=l.command??l.cmd??l.script;if(typeof u=="string")return`$ ${Hr(u,110)}`}if(/^(fetch|http|web|webfetch|curl|request)$/.test(i)){const u=l.url;if(typeof u=="string")return`${(l.method??"GET").toUpperCase()} ${Hr(u,100)}`}if(/^(grep|search|ripgrep)$/.test(i)){const u=l.pattern,c=l.path??l.glob??l.type;if(typeof u=="string")return c?`grep ${Hr(u,60)} in ${c}`:`grep ${Hr(u,100)}`}if(/^(glob|find)$/.test(i)){const u=l.pattern??l.glob;if(typeof u=="string")return`glob ${Hr(u,100)}`}if(/^(read|read_file|cat)$/.test(i)){const u=sf(l),c=l.offset,d=l.limit;if(u&&(typeof c=="number"||typeof d=="number")){const p=c??0,m=typeof d=="number"?p+d:"";return`read ${u} (${p}…${m})`}if(u)return`read ${u}`}for(const u of W2){const c=l[u];if(typeof c=="string"&&c.length>0)return`${u}: ${Hr(c,100)}`}const s=tk(r);return Hr(s,120)}function Hr(t,r){return t.length>r?`${t.slice(0,r-1)}…`:t}function sf(t){const r=t.file_path??t.path??t.filepath;return typeof r=="string"?r:""}function tk(t){try{return JSON.stringify(t)}catch{return String(t)}}function nk(t,r){const l={};return(t[t.length-1]===""?[...t,""]:t).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const rk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ak={};function py(t,r){return(ak.jsx?lk:rk).test(t)}const ik=/[ \t\n\f\r]/g;function ok(t){return typeof t=="object"?t.type==="text"?gy(t.value):!1:gy(t)}function gy(t){return t.replace(ik,"")===""}class Oi{constructor(r,l,i){this.normal=l,this.property=r,i&&(this.space=i)}}Oi.prototype.normal={};Oi.prototype.property={};Oi.prototype.space=void 0;function Xx(t,r){const l={},i={};for(const s of t)Object.assign(l,s.property),Object.assign(i,s.normal);return new Oi(l,i,r)}function Ff(t){return t.toLowerCase()}class nn{constructor(r,l){this.attribute=l,this.property=r}}nn.prototype.attribute="";nn.prototype.booleanish=!1;nn.prototype.boolean=!1;nn.prototype.commaOrSpaceSeparated=!1;nn.prototype.commaSeparated=!1;nn.prototype.defined=!1;nn.prototype.mustUseProperty=!1;nn.prototype.number=!1;nn.prototype.overloadedBoolean=!1;nn.prototype.property="";nn.prototype.spaceSeparated=!1;nn.prototype.space=void 0;let sk=0;const _e=bl(),jt=bl(),Yf=bl(),ce=bl(),ut=bl(),fa=bl(),fn=bl();function bl(){return 2**++sk}const Gf=Object.freeze(Object.defineProperty({__proto__:null,boolean:_e,booleanish:jt,commaOrSpaceSeparated:fn,commaSeparated:fa,number:ce,overloadedBoolean:Yf,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),uf=Object.keys(Gf);class vd extends nn{constructor(r,l,i,s){let u=-1;if(super(r,l),yy(this,"space",s),typeof i=="number")for(;++u<uf.length;){const c=uf[u];yy(this,uf[u],(i&Gf[c])===Gf[c])}}}vd.prototype.defined=!0;function yy(t,r,l){l&&(t[r]=l)}function Sa(t){const r={},l={};for(const[i,s]of Object.entries(t.properties)){const u=new vd(i,t.transform(t.attributes||{},i),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),r[i]=u,l[Ff(i)]=i,l[Ff(u.attribute)]=i}return new Oi(r,l,t.space)}const Qx=Sa({properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:ut,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:ce,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:ut,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:jt,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(t,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function Kx(t,r){return r in t?t[r]:r}function Zx(t,r){return Kx(t,r.toLowerCase())}const uk=Sa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fa,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:_e,allowPaymentRequest:_e,allowUserMedia:_e,alt:null,as:null,async:_e,autoCapitalize:null,autoComplete:ut,autoFocus:_e,autoPlay:_e,blocking:ut,capture:null,charSet:null,checked:_e,cite:null,className:ut,cols:ce,colSpan:null,content:null,contentEditable:jt,controls:_e,controlsList:ut,coords:ce|fa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_e,defer:_e,dir:null,dirName:null,disabled:_e,download:Yf,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_e,formTarget:null,headers:ut,height:ce,hidden:Yf,high:ce,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:_e,inputMode:null,integrity:null,is:null,isMap:_e,itemId:null,itemProp:ut,itemRef:ut,itemScope:_e,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_e,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:_e,muted:_e,name:null,nonce:null,noModule:_e,noValidate:_e,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:_e,optimum:ce,pattern:null,ping:ut,placeholder:null,playsInline:_e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_e,referrerPolicy:null,rel:ut,required:_e,reversed:_e,rows:ce,rowSpan:ce,sandbox:ut,scope:null,scoped:_e,seamless:_e,selected:_e,shadowRootClonable:_e,shadowRootDelegatesFocus:_e,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:_e,useMap:null,value:jt,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_e,declare:_e,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:_e,noHref:_e,noShade:_e,noWrap:_e,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_e,disableRemotePlayback:_e,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:Zx}),ck=Sa({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:fn,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:ut,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:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:_e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,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:fa,g2:fa,glyphName:fa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:fn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,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:ce,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:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fn,rev:fn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fn,requiredFeatures:fn,requiredFonts:fn,requiredFormats:fn,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:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:fn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fn,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Kx}),Jx=Sa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,r){return"xlink:"+r.slice(5).toLowerCase()}}),Wx=Sa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zx}),e0=Sa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,r){return"xml:"+r.slice(3).toLowerCase()}}),fk={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"},dk=/[A-Z]/g,xy=/-[a-z]/g,hk=/^data[-\w.:]+$/i;function mk(t,r){const l=Ff(r);let i=r,s=nn;if(l in t.normal)return t.property[t.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&hk.test(r)){if(r.charAt(4)==="-"){const u=r.slice(5).replace(xy,gk);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=r.slice(4);if(!xy.test(u)){let c=u.replace(dk,pk);c.charAt(0)!=="-"&&(c="-"+c),r="data"+c}}s=vd}return new s(i,r)}function pk(t){return"-"+t.toLowerCase()}function gk(t){return t.charAt(1).toUpperCase()}const yk=Xx([Qx,uk,Jx,Wx,e0],"html"),Sd=Xx([Qx,ck,Jx,Wx,e0],"svg");function xk(t){return t.join(" ").trim()}var la={},cf,by;function bk(){if(by)return cf;by=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,l=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
518
+ `,m="/",x="*",y="",b="comment",S="declaration";function k(T,j){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];j=j||{};var M=1,z=1;function F(oe){var q=oe.match(r);q&&(M+=q.length);var H=oe.lastIndexOf(p);z=~H?oe.length-H:z+oe.length}function P(){var oe={line:M,column:z};return function(q){return q.position=new U(oe),se(),q}}function U(oe){this.start=oe,this.end={line:M,column:z},this.source=j.source}U.prototype.content=T;function G(oe){var q=new Error(j.source+":"+M+":"+z+": "+oe);if(q.reason=oe,q.filename=j.source,q.line=M,q.column=z,q.source=T,!j.silent)throw q}function le(oe){var q=oe.exec(T);if(q){var H=q[0];return F(H),T=T.slice(H.length),q}}function se(){le(l)}function B(oe){var q;for(oe=oe||[];q=X();)q!==!1&&oe.push(q);return oe}function X(){var oe=P();if(!(m!=T.charAt(0)||x!=T.charAt(1))){for(var q=2;y!=T.charAt(q)&&(x!=T.charAt(q)||m!=T.charAt(q+1));)++q;if(q+=2,y===T.charAt(q-1))return G("End of comment missing");var H=T.slice(2,q-2);return z+=2,F(H),T=T.slice(q),z+=2,oe({type:b,comment:H})}}function Q(){var oe=P(),q=le(i);if(q){if(X(),!le(s))return G("property missing ':'");var H=le(u),te=oe({type:S,property:N(q[0].replace(t,y)),value:H?N(H[0].replace(t,y)):y});return le(c),te}}function de(){var oe=[];B(oe);for(var q;q=Q();)q!==!1&&(oe.push(q),B(oe));return oe}return se(),de()}function N(T){return T?T.replace(d,y):y}return cf=k,cf}var vy;function vk(){if(vy)return la;vy=1;var t=la&&la.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(la,"__esModule",{value:!0}),la.default=l;const r=t(bk());function l(i,s){let u=null;if(!i||typeof i!="string")return u;const c=(0,r.default)(i),d=typeof s=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:x}=p;d?s(m,x,p):x&&(u=u||{},u[m]=x)}),u}return la}var xi={},Sy;function Sk(){if(Sy)return xi;Sy=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,l=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(m){return!m||l.test(m)||t.test(m)},c=function(m,x){return x.toUpperCase()},d=function(m,x){return"".concat(x,"-")},p=function(m,x){return x===void 0&&(x={}),u(m)?m:(m=m.toLowerCase(),x.reactCompat?m=m.replace(s,d):m=m.replace(i,d),m.replace(r,c))};return xi.camelCase=p,xi}var bi,wy;function wk(){if(wy)return bi;wy=1;var t=bi&&bi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=t(vk()),l=Sk();function i(s,u){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(d,p){d&&p&&(c[(0,l.camelCase)(d,u)]=p)}),c}return i.default=i,bi=i,bi}var kk=wk();const Ck=Ri(kk),t0=n0("end"),wd=n0("start");function n0(t){return r;function r(l){const i=l&&l.position&&l.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Nk(t){const r=wd(t),l=t0(t);if(r&&l)return{start:r,end:l}}function Ci(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ky(t.position):"start"in t||"end"in t?ky(t):"line"in t||"column"in t?Pf(t):""}function Pf(t){return Cy(t&&t.line)+":"+Cy(t&&t.column)}function ky(t){return Pf(t&&t.start)+"-"+Pf(t&&t.end)}function Cy(t){return t&&typeof t=="number"?t:1}class $t extends Error{constructor(r,l,i){super(),typeof l=="string"&&(i=l,l=void 0);let s="",u={},c=!1;if(l&&("line"in l&&"column"in l?u={place:l}:"start"in l&&"end"in l?u={place:l}:"type"in l?u={ancestors:[l],place:l.position}:u={...l}),typeof r=="string"?s=r:!u.cause&&r&&(c=!0,s=r.message,u.cause=r),!u.ruleId&&!u.source&&typeof i=="string"){const p=i.indexOf(":");p===-1?u.ruleId=i:(u.source=i.slice(0,p),u.ruleId=i.slice(p+1))}if(!u.place&&u.ancestors&&u.ancestors){const p=u.ancestors[u.ancestors.length-1];p&&(u.place=p.position)}const d=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=Ci(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.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 kd={}.hasOwnProperty,Ek=new Map,jk=/[A-Z]/g,Tk=new Set(["table","tbody","thead","tfoot","tr"]),Ak=new Set(["td","th"]),r0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Mk(t,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=r.filePath||void 0;let i;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Bk(l,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Uk(l,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:i,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Sd:yk,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},u=l0(s,t,void 0);return u&&typeof u!="string"?u:s.create(t,s.Fragment,{children:u||void 0},void 0)}function l0(t,r,l){if(r.type==="element")return Dk(t,r,l);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return Rk(t,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return Ok(t,r,l);if(r.type==="mdxjsEsm")return zk(t,r);if(r.type==="root")return _k(t,r,l);if(r.type==="text")return Lk(t,r)}function Dk(t,r,l){const i=t.schema;let s=i;r.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=Sd,t.schema=s),t.ancestors.push(r);const u=i0(t,r.tagName,!1),c=Hk(t,r);let d=Nd(t,r);return Tk.has(r.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!ok(p):!0})),a0(t,c,u,r),Cd(c,d),t.ancestors.pop(),t.schema=i,t.create(r,u,c,l)}function Rk(t,r){if(r.data&&r.data.estree&&t.evaluater){const i=r.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}Mi(t,r.position)}function zk(t,r){if(r.data&&r.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(r.data.estree);Mi(t,r.position)}function Ok(t,r,l){const i=t.schema;let s=i;r.name==="svg"&&i.space==="html"&&(s=Sd,t.schema=s),t.ancestors.push(r);const u=r.name===null?t.Fragment:i0(t,r.name,!0),c=qk(t,r),d=Nd(t,r);return a0(t,c,u,r),Cd(c,d),t.ancestors.pop(),t.schema=i,t.create(r,u,c,l)}function _k(t,r,l){const i={};return Cd(i,Nd(t,r)),t.create(r,t.Fragment,i,l)}function Lk(t,r){return r.value}function a0(t,r,l,i){typeof l!="string"&&l!==t.Fragment&&t.passNode&&(r.node=i)}function Cd(t,r){if(r.length>0){const l=r.length>1?r:r[0];l&&(t.children=l)}}function Uk(t,r,l){return i;function i(s,u,c,d){const m=Array.isArray(c.children)?l:r;return d?m(u,c,d):m(u,c)}}function Bk(t,r){return l;function l(i,s,u,c){const d=Array.isArray(u.children),p=wd(i);return r(s,u,c,d,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function Hk(t,r){const l={};let i,s;for(s in r.properties)if(s!=="children"&&kd.call(r.properties,s)){const u=Ik(t,s,r.properties[s]);if(u){const[c,d]=u;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&Ak.has(r.tagName)?i=d:l[c]=d}}if(i){const u=l.style||(l.style={});u[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return l}function qk(t,r){const l={};for(const i of r.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const u=i.data.estree.body[0];u.type;const c=u.expression;c.type;const d=c.properties[0];d.type,Object.assign(l,t.evaluater.evaluateExpression(d.argument))}else Mi(t,r.position);else{const s=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const d=i.value.data.estree.body[0];d.type,u=t.evaluater.evaluateExpression(d.expression)}else Mi(t,r.position);else u=i.value===null?!0:i.value;l[s]=u}return l}function Nd(t,r){const l=[];let i=-1;const s=t.passKeys?new Map:Ek;for(;++i<r.children.length;){const u=r.children[i];let c;if(t.passKeys){const p=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(p){const m=s.get(p)||0;c=p+"-"+m,s.set(p,m+1)}}const d=l0(t,u,c);d!==void 0&&l.push(d)}return l}function Ik(t,r,l){const i=mk(t.schema,r);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=i.commaSeparated?nk(l):xk(l)),i.property==="style"){let s=typeof l=="object"?l:Vk(t,String(l));return t.stylePropertyNameCase==="css"&&(s=$k(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&i.space?fk[i.property]||i.property:i.attribute,l]}}function Vk(t,r){try{return Ck(r,{reactCompat:!0})}catch(l){if(t.ignoreInvalidStyle)return{};const i=l,s=new $t("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=r0+"#cannot-parse-style-attribute",s}}function i0(t,r,l){let i;if(!l)i={type:"Literal",value:r};else if(r.includes(".")){const s=r.split(".");let u=-1,c;for(;++u<s.length;){const d=py(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(u&&d.type==="Literal"),optional:!1}:d}i=c}else i=py(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(i.type==="Literal"){const s=i.value;return kd.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(i);Mi(t)}function Mi(t,r){const l=new $t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=t.filePath||void 0,l.url=r0+"#cannot-handle-mdx-estrees-without-createevaluater",l}function $k(t){const r={};let l;for(l in t)kd.call(t,l)&&(r[Fk(l)]=t[l]);return r}function Fk(t){let r=t.replace(jk,Yk);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function Yk(t){return"-"+t.toLowerCase()}const ff={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"]},Gk={};function Ed(t,r){const l=Gk,i=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,s=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return o0(t,i,s)}function o0(t,r,l){if(Pk(t)){if("value"in t)return t.type==="html"&&!l?"":t.value;if(r&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Ny(t.children,r,l)}return Array.isArray(t)?Ny(t,r,l):""}function Ny(t,r,l){const i=[];let s=-1;for(;++s<t.length;)i[s]=o0(t[s],r,l);return i.join("")}function Pk(t){return!!(t&&typeof t=="object")}const Ey=document.createElement("i");function jd(t){const r="&"+t+";";Ey.innerHTML=r;const l=Ey.textContent;return l.charCodeAt(l.length-1)===59&&t!=="semi"||l===r?!1:l}function mn(t,r,l,i){const s=t.length;let u=0,c;if(r<0?r=-r>s?0:s+r:r=r>s?s:r,l=l>0?l:0,i.length<1e4)c=Array.from(i),c.unshift(r,l),t.splice(...c);else for(l&&t.splice(r,l);u<i.length;)c=i.slice(u,u+1e4),c.unshift(r,0),t.splice(...c),u+=1e4,r+=1e4}function En(t,r){return t.length>0?(mn(t,t.length,0,r),t):r}const jy={}.hasOwnProperty;function s0(t){const r={};let l=-1;for(;++l<t.length;)Xk(r,t[l]);return r}function Xk(t,r){let l;for(l in r){const s=(jy.call(t,l)?t[l]:void 0)||(t[l]={}),u=r[l];let c;if(u)for(c in u){jy.call(s,c)||(s[c]=[]);const d=u[c];Qk(s[c],Array.isArray(d)?d:d?[d]:[])}}}function Qk(t,r){let l=-1;const i=[];for(;++l<r.length;)(r[l].add==="after"?t:i).push(r[l]);mn(t,0,0,i)}function u0(t,r){const l=Number.parseInt(t,r);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function Rn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Gt=Yr(/[A-Za-z]/),It=Yr(/[\dA-Za-z]/),Kk=Yr(/[#-'*+\--9=?A-Z^-~]/);function xs(t){return t!==null&&(t<32||t===127)}const Xf=Yr(/\d/),Zk=Yr(/[\dA-Fa-f]/),Jk=Yr(/[!-/:-@[-`{-~]/);function Ee(t){return t!==null&&t<-2}function ot(t){return t!==null&&(t<0||t===32)}function He(t){return t===-2||t===-1||t===32}const As=Yr(new RegExp("\\p{P}|\\p{S}","u")),gl=Yr(/\s/);function Yr(t){return r;function r(l){return l!==null&&l>-1&&t.test(String.fromCharCode(l))}}function wa(t){const r=[];let l=-1,i=0,s=0;for(;++l<t.length;){const u=t.charCodeAt(l);let c="";if(u===37&&It(t.charCodeAt(l+1))&&It(t.charCodeAt(l+2)))s=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const d=t.charCodeAt(l+1);u<56320&&d>56319&&d<57344?(c=String.fromCharCode(u,d),s=1):c="�"}else c=String.fromCharCode(u);c&&(r.push(t.slice(i,l),encodeURIComponent(c)),i=l+s+1,c=""),s&&(l+=s,s=0)}return r.join("")+t.slice(i)}function Xe(t,r,l,i){const s=i?i-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(p){return He(p)?(t.enter(l),d(p)):r(p)}function d(p){return He(p)&&u++<s?(t.consume(p),d):(t.exit(l),r(p))}}const Wk={tokenize:eC};function eC(t){const r=t.attempt(this.parser.constructs.contentInitial,i,s);let l;return r;function i(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Xe(t,r,"linePrefix")}function s(d){return t.enter("paragraph"),u(d)}function u(d){const p=t.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=p),l=p,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return Ee(d)?(t.consume(d),t.exit("chunkText"),u):(t.consume(d),c)}}const tC={tokenize:nC},Ty={tokenize:rC};function nC(t){const r=this,l=[];let i=0,s,u,c;return d;function d(z){if(i<l.length){const F=l[i];return r.containerState=F[1],t.attempt(F[0].continuation,p,m)(z)}return m(z)}function p(z){if(i++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,s&&M();const F=r.events.length;let P=F,U;for(;P--;)if(r.events[P][0]==="exit"&&r.events[P][1].type==="chunkFlow"){U=r.events[P][1].end;break}j(i);let G=F;for(;G<r.events.length;)r.events[G][1].end={...U},G++;return mn(r.events,P+1,0,r.events.slice(F)),r.events.length=G,m(z)}return d(z)}function m(z){if(i===l.length){if(!s)return b(z);if(s.currentConstruct&&s.currentConstruct.concrete)return k(z);r.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return r.containerState={},t.check(Ty,x,y)(z)}function x(z){return s&&M(),j(i),b(z)}function y(z){return r.parser.lazy[r.now().line]=i!==l.length,c=r.now().offset,k(z)}function b(z){return r.containerState={},t.attempt(Ty,S,k)(z)}function S(z){return i++,l.push([r.currentConstruct,r.containerState]),b(z)}function k(z){if(z===null){s&&M(),j(0),t.consume(z);return}return s=s||r.parser.flow(r.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),N(z)}function N(z){if(z===null){T(t.exit("chunkFlow"),!0),j(0),t.consume(z);return}return Ee(z)?(t.consume(z),T(t.exit("chunkFlow")),i=0,r.interrupt=void 0,d):(t.consume(z),N)}function T(z,F){const P=r.sliceStream(z);if(F&&P.push(null),z.previous=u,u&&(u.next=z),u=z,s.defineSkip(z.start),s.write(P),r.parser.lazy[z.start.line]){let U=s.events.length;for(;U--;)if(s.events[U][1].start.offset<c&&(!s.events[U][1].end||s.events[U][1].end.offset>c))return;const G=r.events.length;let le=G,se,B;for(;le--;)if(r.events[le][0]==="exit"&&r.events[le][1].type==="chunkFlow"){if(se){B=r.events[le][1].end;break}se=!0}for(j(i),U=G;U<r.events.length;)r.events[U][1].end={...B},U++;mn(r.events,le+1,0,r.events.slice(G)),r.events.length=U}}function j(z){let F=l.length;for(;F-- >z;){const P=l[F];r.containerState=P[1],P[0].exit.call(r,t)}l.length=z}function M(){s.write([null]),u=void 0,s=void 0,r.containerState._closeFlow=void 0}}function rC(t,r,l){return Xe(t,t.attempt(this.parser.constructs.document,r,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ga(t){if(t===null||ot(t)||gl(t))return 1;if(As(t))return 2}function Ms(t,r,l){const i=[];let s=-1;for(;++s<t.length;){const u=t[s].resolveAll;u&&!i.includes(u)&&(r=u(r,l),i.push(u))}return r}const Qf={name:"attention",resolveAll:lC,tokenize:aC};function lC(t,r){let l=-1,i,s,u,c,d,p,m,x;for(;++l<t.length;)if(t[l][0]==="enter"&&t[l][1].type==="attentionSequence"&&t[l][1]._close){for(i=l;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&r.sliceSerialize(t[i][1]).charCodeAt(0)===r.sliceSerialize(t[l][1]).charCodeAt(0)){if((t[i][1]._close||t[l][1]._open)&&(t[l][1].end.offset-t[l][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[l][1].end.offset-t[l][1].start.offset)%3))continue;p=t[i][1].end.offset-t[i][1].start.offset>1&&t[l][1].end.offset-t[l][1].start.offset>1?2:1;const y={...t[i][1].end},b={...t[l][1].start};Ay(y,-p),Ay(b,p),c={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...t[i][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...t[l][1].start},end:b},u={type:p>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[l][1].start}},s={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[i][1].end={...c.start},t[l][1].start={...d.end},m=[],t[i][1].end.offset-t[i][1].start.offset&&(m=En(m,[["enter",t[i][1],r],["exit",t[i][1],r]])),m=En(m,[["enter",s,r],["enter",c,r],["exit",c,r],["enter",u,r]]),m=En(m,Ms(r.parser.constructs.insideSpan.null,t.slice(i+1,l),r)),m=En(m,[["exit",u,r],["enter",d,r],["exit",d,r],["exit",s,r]]),t[l][1].end.offset-t[l][1].start.offset?(x=2,m=En(m,[["enter",t[l][1],r],["exit",t[l][1],r]])):x=0,mn(t,i-1,l-i+3,m),l=i+m.length-x-2;break}}for(l=-1;++l<t.length;)t[l][1].type==="attentionSequence"&&(t[l][1].type="data");return t}function aC(t,r){const l=this.parser.constructs.attentionMarkers.null,i=this.previous,s=ga(i);let u;return c;function c(p){return u=p,t.enter("attentionSequence"),d(p)}function d(p){if(p===u)return t.consume(p),d;const m=t.exit("attentionSequence"),x=ga(p),y=!x||x===2&&s||l.includes(p),b=!s||s===2&&x||l.includes(i);return m._open=!!(u===42?y:y&&(s||!b)),m._close=!!(u===42?b:b&&(x||!y)),r(p)}}function Ay(t,r){t.column+=r,t.offset+=r,t._bufferIndex+=r}const iC={name:"autolink",tokenize:oC};function oC(t,r,l){let i=0;return s;function s(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),u}function u(S){return Gt(S)?(t.consume(S),c):S===64?l(S):m(S)}function c(S){return S===43||S===45||S===46||It(S)?(i=1,d(S)):m(S)}function d(S){return S===58?(t.consume(S),i=0,p):(S===43||S===45||S===46||It(S))&&i++<32?(t.consume(S),d):(i=0,m(S))}function p(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),r):S===null||S===32||S===60||xs(S)?l(S):(t.consume(S),p)}function m(S){return S===64?(t.consume(S),x):Kk(S)?(t.consume(S),m):l(S)}function x(S){return It(S)?y(S):l(S)}function y(S){return S===46?(t.consume(S),i=0,x):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),r):b(S)}function b(S){if((S===45||It(S))&&i++<63){const k=S===45?b:y;return t.consume(S),k}return l(S)}}const _i={partial:!0,tokenize:sC};function sC(t,r,l){return i;function i(u){return He(u)?Xe(t,s,"linePrefix")(u):s(u)}function s(u){return u===null||Ee(u)?r(u):l(u)}}const c0={continuation:{tokenize:cC},exit:fC,name:"blockQuote",tokenize:uC};function uC(t,r,l){const i=this;return s;function s(c){if(c===62){const d=i.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),u}return l(c)}function u(c){return He(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),r):(t.exit("blockQuotePrefix"),r(c))}}function cC(t,r,l){const i=this;return s;function s(c){return He(c)?Xe(t,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return t.attempt(c0,r,l)(c)}}function fC(t){t.exit("blockQuote")}const f0={name:"characterEscape",tokenize:dC};function dC(t,r,l){return i;function i(u){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(u),t.exit("escapeMarker"),s}function s(u){return Jk(u)?(t.enter("characterEscapeValue"),t.consume(u),t.exit("characterEscapeValue"),t.exit("characterEscape"),r):l(u)}}const d0={name:"characterReference",tokenize:hC};function hC(t,r,l){const i=this;let s=0,u,c;return d;function d(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),p}function p(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),u=31,c=It,x(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),u=6,c=Zk,x):(t.enter("characterReferenceValue"),u=7,c=Xf,x(y))}function x(y){if(y===59&&s){const b=t.exit("characterReferenceValue");return c===It&&!jd(i.sliceSerialize(b))?l(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),r)}return c(y)&&s++<u?(t.consume(y),x):l(y)}}const My={partial:!0,tokenize:pC},Dy={concrete:!0,name:"codeFenced",tokenize:mC};function mC(t,r,l){const i=this,s={partial:!0,tokenize:P};let u=0,c=0,d;return p;function p(U){return m(U)}function m(U){const G=i.events[i.events.length-1];return u=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,d=U,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),x(U)}function x(U){return U===d?(c++,t.consume(U),x):c<3?l(U):(t.exit("codeFencedFenceSequence"),He(U)?Xe(t,y,"whitespace")(U):y(U))}function y(U){return U===null||Ee(U)?(t.exit("codeFencedFence"),i.interrupt?r(U):t.check(My,N,F)(U)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(U))}function b(U){return U===null||Ee(U)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(U)):He(U)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Xe(t,S,"whitespace")(U)):U===96&&U===d?l(U):(t.consume(U),b)}function S(U){return U===null||Ee(U)?y(U):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),k(U))}function k(U){return U===null||Ee(U)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(U)):U===96&&U===d?l(U):(t.consume(U),k)}function N(U){return t.attempt(s,F,T)(U)}function T(U){return t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),j}function j(U){return u>0&&He(U)?Xe(t,M,"linePrefix",u+1)(U):M(U)}function M(U){return U===null||Ee(U)?t.check(My,N,F)(U):(t.enter("codeFlowValue"),z(U))}function z(U){return U===null||Ee(U)?(t.exit("codeFlowValue"),M(U)):(t.consume(U),z)}function F(U){return t.exit("codeFenced"),r(U)}function P(U,G,le){let se=0;return B;function B(q){return U.enter("lineEnding"),U.consume(q),U.exit("lineEnding"),X}function X(q){return U.enter("codeFencedFence"),He(q)?Xe(U,Q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):Q(q)}function Q(q){return q===d?(U.enter("codeFencedFenceSequence"),de(q)):le(q)}function de(q){return q===d?(se++,U.consume(q),de):se>=c?(U.exit("codeFencedFenceSequence"),He(q)?Xe(U,oe,"whitespace")(q):oe(q)):le(q)}function oe(q){return q===null||Ee(q)?(U.exit("codeFencedFence"),G(q)):le(q)}}}function pC(t,r,l){const i=this;return s;function s(c){return c===null?l(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}const df={name:"codeIndented",tokenize:yC},gC={partial:!0,tokenize:xC};function yC(t,r,l){const i=this;return s;function s(m){return t.enter("codeIndented"),Xe(t,u,"linePrefix",5)(m)}function u(m){const x=i.events[i.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?c(m):l(m)}function c(m){return m===null?p(m):Ee(m)?t.attempt(gC,c,p)(m):(t.enter("codeFlowValue"),d(m))}function d(m){return m===null||Ee(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),d)}function p(m){return t.exit("codeIndented"),r(m)}}function xC(t,r,l){const i=this;return s;function s(c){return i.parser.lazy[i.now().line]?l(c):Ee(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):Xe(t,u,"linePrefix",5)(c)}function u(c){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?r(c):Ee(c)?s(c):l(c)}}const bC={name:"codeText",previous:SC,resolve:vC,tokenize:wC};function vC(t){let r=t.length-4,l=3,i,s;if((t[l][1].type==="lineEnding"||t[l][1].type==="space")&&(t[r][1].type==="lineEnding"||t[r][1].type==="space")){for(i=l;++i<r;)if(t[i][1].type==="codeTextData"){t[l][1].type="codeTextPadding",t[r][1].type="codeTextPadding",l+=2,r-=2;break}}for(i=l-1,r++;++i<=r;)s===void 0?i!==r&&t[i][1].type!=="lineEnding"&&(s=i):(i===r||t[i][1].type==="lineEnding")&&(t[s][1].type="codeTextData",i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),r-=i-s-2,i=s+2),s=void 0);return t}function SC(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wC(t,r,l){let i=0,s,u;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),d(y)}function d(y){return y===96?(t.consume(y),i++,d):(t.exit("codeTextSequence"),p(y))}function p(y){return y===null?l(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),p):y===96?(u=t.enter("codeTextSequence"),s=0,x(y)):Ee(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||Ee(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function x(y){return y===96?(t.consume(y),s++,x):s===i?(t.exit("codeTextSequence"),t.exit("codeText"),r(y)):(u.type="codeTextData",m(y))}}class kC{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,l){const i=l??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(r,i):r>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(r,l,i){const s=l||0;this.setCursor(Math.trunc(r));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&vi(this.left,i),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),vi(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),vi(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const l=this.left.splice(r,Number.POSITIVE_INFINITY);vi(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);vi(this.left,l.reverse())}}}function vi(t,r){let l=0;if(r.length<1e4)t.push(...r);else for(;l<r.length;)t.push(...r.slice(l,l+1e4)),l+=1e4}function h0(t){const r={};let l=-1,i,s,u,c,d,p,m;const x=new kC(t);for(;++l<x.length;){for(;l in r;)l=r[l];if(i=x.get(l),l&&i[1].type==="chunkFlow"&&x.get(l-1)[1].type==="listItemPrefix"&&(p=i[1]._tokenizer.events,u=0,u<p.length&&p[u][1].type==="lineEndingBlank"&&(u+=2),u<p.length&&p[u][1].type==="content"))for(;++u<p.length&&p[u][1].type!=="content";)p[u][1].type==="chunkText"&&(p[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(r,CC(x,l)),l=r[l],m=!0);else if(i[1]._container){for(u=l,s=void 0;u--;)if(c=x.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(x.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(i[1].end={...x.get(s)[1].start},d=x.slice(s,l),d.unshift(i),x.splice(s,l-s+1,d))}}return mn(t,0,Number.POSITIVE_INFINITY,x.slice(0)),!m}function CC(t,r){const l=t.get(r)[1],i=t.get(r)[2];let s=r-1;const u=[];let c=l._tokenizer;c||(c=i.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let x,y,b=-1,S=l,k=0,N=0;const T=[N];for(;S;){for(;t.get(++s)[1]!==S;);u.push(s),S._tokenizer||(x=i.sliceStream(S),S.next||x.push(null),y&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(x),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=S,S=S.next}for(S=l;++b<d.length;)d[b][0]==="exit"&&d[b-1][0]==="enter"&&d[b][1].type===d[b-1][1].type&&d[b][1].start.line!==d[b][1].end.line&&(N=b+1,T.push(N),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):T.pop(),b=T.length;b--;){const j=d.slice(T[b],T[b+1]),M=u.pop();p.push([M,M+j.length-1]),t.splice(M,2,j)}for(p.reverse(),b=-1;++b<p.length;)m[k+p[b][0]]=k+p[b][1],k+=p[b][1]-p[b][0]-1;return m}const NC={resolve:jC,tokenize:TC},EC={partial:!0,tokenize:AC};function jC(t){return h0(t),t}function TC(t,r){let l;return i;function i(d){return t.enter("content"),l=t.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?u(d):Ee(d)?t.check(EC,c,u)(d):(t.consume(d),s)}function u(d){return t.exit("chunkContent"),t.exit("content"),r(d)}function c(d){return t.consume(d),t.exit("chunkContent"),l.next=t.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,s}}function AC(t,r,l){const i=this;return s;function s(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Xe(t,u,"linePrefix")}function u(c){if(c===null||Ee(c))return l(c);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?r(c):t.interrupt(i.parser.constructs.flow,l,r)(c)}}function m0(t,r,l,i,s,u,c,d,p){const m=p||Number.POSITIVE_INFINITY;let x=0;return y;function y(j){return j===60?(t.enter(i),t.enter(s),t.enter(u),t.consume(j),t.exit(u),b):j===null||j===32||j===41||xs(j)?l(j):(t.enter(i),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),N(j))}function b(j){return j===62?(t.enter(u),t.consume(j),t.exit(u),t.exit(s),t.exit(i),r):(t.enter(d),t.enter("chunkString",{contentType:"string"}),S(j))}function S(j){return j===62?(t.exit("chunkString"),t.exit(d),b(j)):j===null||j===60||Ee(j)?l(j):(t.consume(j),j===92?k:S)}function k(j){return j===60||j===62||j===92?(t.consume(j),S):S(j)}function N(j){return!x&&(j===null||j===41||ot(j))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(i),r(j)):x<m&&j===40?(t.consume(j),x++,N):j===41?(t.consume(j),x--,N):j===null||j===32||j===40||xs(j)?l(j):(t.consume(j),j===92?T:N)}function T(j){return j===40||j===41||j===92?(t.consume(j),N):N(j)}}function p0(t,r,l,i,s,u){const c=this;let d=0,p;return m;function m(S){return t.enter(i),t.enter(s),t.consume(S),t.exit(s),t.enter(u),x}function x(S){return d>999||S===null||S===91||S===93&&!p||S===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?l(S):S===93?(t.exit(u),t.enter(s),t.consume(S),t.exit(s),t.exit(i),r):Ee(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),x):(t.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===null||S===91||S===93||Ee(S)||d++>999?(t.exit("chunkString"),x(S)):(t.consume(S),p||(p=!He(S)),S===92?b:y)}function b(S){return S===91||S===92||S===93?(t.consume(S),d++,y):y(S)}}function g0(t,r,l,i,s,u){let c;return d;function d(b){return b===34||b===39||b===40?(t.enter(i),t.enter(s),t.consume(b),t.exit(s),c=b===40?41:b,p):l(b)}function p(b){return b===c?(t.enter(s),t.consume(b),t.exit(s),t.exit(i),r):(t.enter(u),m(b))}function m(b){return b===c?(t.exit(u),p(c)):b===null?l(b):Ee(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),Xe(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===c||b===null||Ee(b)?(t.exit("chunkString"),m(b)):(t.consume(b),b===92?y:x)}function y(b){return b===c||b===92?(t.consume(b),x):x(b)}}function Ni(t,r){let l;return i;function i(s){return Ee(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),l=!0,i):He(s)?Xe(t,i,l?"linePrefix":"lineSuffix")(s):r(s)}}const MC={name:"definition",tokenize:RC},DC={partial:!0,tokenize:zC};function RC(t,r,l){const i=this;let s;return u;function u(S){return t.enter("definition"),c(S)}function c(S){return p0.call(i,t,d,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function d(S){return s=Rn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),p):l(S)}function p(S){return ot(S)?Ni(t,m)(S):m(S)}function m(S){return m0(t,x,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function x(S){return t.attempt(DC,y,y)(S)}function y(S){return He(S)?Xe(t,b,"whitespace")(S):b(S)}function b(S){return S===null||Ee(S)?(t.exit("definition"),i.parser.defined.push(s),r(S)):l(S)}}function zC(t,r,l){return i;function i(d){return ot(d)?Ni(t,s)(d):l(d)}function s(d){return g0(t,u,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return He(d)?Xe(t,c,"whitespace")(d):c(d)}function c(d){return d===null||Ee(d)?r(d):l(d)}}const OC={name:"hardBreakEscape",tokenize:_C};function _C(t,r,l){return i;function i(u){return t.enter("hardBreakEscape"),t.consume(u),s}function s(u){return Ee(u)?(t.exit("hardBreakEscape"),r(u)):l(u)}}const LC={name:"headingAtx",resolve:UC,tokenize:BC};function UC(t,r){let l=t.length-2,i=3,s,u;return t[i][1].type==="whitespace"&&(i+=2),l-2>i&&t[l][1].type==="whitespace"&&(l-=2),t[l][1].type==="atxHeadingSequence"&&(i===l-1||l-4>i&&t[l-2][1].type==="whitespace")&&(l-=i+1===l?2:4),l>i&&(s={type:"atxHeadingText",start:t[i][1].start,end:t[l][1].end},u={type:"chunkText",start:t[i][1].start,end:t[l][1].end,contentType:"text"},mn(t,i,l-i+1,[["enter",s,r],["enter",u,r],["exit",u,r],["exit",s,r]])),t}function BC(t,r,l){let i=0;return s;function s(x){return t.enter("atxHeading"),u(x)}function u(x){return t.enter("atxHeadingSequence"),c(x)}function c(x){return x===35&&i++<6?(t.consume(x),c):x===null||ot(x)?(t.exit("atxHeadingSequence"),d(x)):l(x)}function d(x){return x===35?(t.enter("atxHeadingSequence"),p(x)):x===null||Ee(x)?(t.exit("atxHeading"),r(x)):He(x)?Xe(t,d,"whitespace")(x):(t.enter("atxHeadingText"),m(x))}function p(x){return x===35?(t.consume(x),p):(t.exit("atxHeadingSequence"),d(x))}function m(x){return x===null||x===35||ot(x)?(t.exit("atxHeadingText"),d(x)):(t.consume(x),m)}}const HC=["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"],Ry=["pre","script","style","textarea"],qC={concrete:!0,name:"htmlFlow",resolveTo:$C,tokenize:FC},IC={partial:!0,tokenize:GC},VC={partial:!0,tokenize:YC};function $C(t){let r=t.length;for(;r--&&!(t[r][0]==="enter"&&t[r][1].type==="htmlFlow"););return r>1&&t[r-2][1].type==="linePrefix"&&(t[r][1].start=t[r-2][1].start,t[r+1][1].start=t[r-2][1].start,t.splice(r-2,2)),t}function FC(t,r,l){const i=this;let s,u,c,d,p;return m;function m(E){return x(E)}function x(E){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(E),y}function y(E){return E===33?(t.consume(E),b):E===47?(t.consume(E),u=!0,N):E===63?(t.consume(E),s=3,i.interrupt?r:D):Gt(E)?(t.consume(E),c=String.fromCharCode(E),T):l(E)}function b(E){return E===45?(t.consume(E),s=2,S):E===91?(t.consume(E),s=5,d=0,k):Gt(E)?(t.consume(E),s=4,i.interrupt?r:D):l(E)}function S(E){return E===45?(t.consume(E),i.interrupt?r:D):l(E)}function k(E){const O="CDATA[";return E===O.charCodeAt(d++)?(t.consume(E),d===O.length?i.interrupt?r:Q:k):l(E)}function N(E){return Gt(E)?(t.consume(E),c=String.fromCharCode(E),T):l(E)}function T(E){if(E===null||E===47||E===62||ot(E)){const O=E===47,ee=c.toLowerCase();return!O&&!u&&Ry.includes(ee)?(s=1,i.interrupt?r(E):Q(E)):HC.includes(c.toLowerCase())?(s=6,O?(t.consume(E),j):i.interrupt?r(E):Q(E)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?l(E):u?M(E):z(E))}return E===45||It(E)?(t.consume(E),c+=String.fromCharCode(E),T):l(E)}function j(E){return E===62?(t.consume(E),i.interrupt?r:Q):l(E)}function M(E){return He(E)?(t.consume(E),M):B(E)}function z(E){return E===47?(t.consume(E),B):E===58||E===95||Gt(E)?(t.consume(E),F):He(E)?(t.consume(E),z):B(E)}function F(E){return E===45||E===46||E===58||E===95||It(E)?(t.consume(E),F):P(E)}function P(E){return E===61?(t.consume(E),U):He(E)?(t.consume(E),P):z(E)}function U(E){return E===null||E===60||E===61||E===62||E===96?l(E):E===34||E===39?(t.consume(E),p=E,G):He(E)?(t.consume(E),U):le(E)}function G(E){return E===p?(t.consume(E),p=null,se):E===null||Ee(E)?l(E):(t.consume(E),G)}function le(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||ot(E)?P(E):(t.consume(E),le)}function se(E){return E===47||E===62||He(E)?z(E):l(E)}function B(E){return E===62?(t.consume(E),X):l(E)}function X(E){return E===null||Ee(E)?Q(E):He(E)?(t.consume(E),X):l(E)}function Q(E){return E===45&&s===2?(t.consume(E),H):E===60&&s===1?(t.consume(E),te):E===62&&s===4?(t.consume(E),A):E===63&&s===3?(t.consume(E),D):E===93&&s===5?(t.consume(E),Se):Ee(E)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(IC,L,de)(E)):E===null||Ee(E)?(t.exit("htmlFlowData"),de(E)):(t.consume(E),Q)}function de(E){return t.check(VC,oe,L)(E)}function oe(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),q}function q(E){return E===null||Ee(E)?de(E):(t.enter("htmlFlowData"),Q(E))}function H(E){return E===45?(t.consume(E),D):Q(E)}function te(E){return E===47?(t.consume(E),c="",ae):Q(E)}function ae(E){if(E===62){const O=c.toLowerCase();return Ry.includes(O)?(t.consume(E),A):Q(E)}return Gt(E)&&c.length<8?(t.consume(E),c+=String.fromCharCode(E),ae):Q(E)}function Se(E){return E===93?(t.consume(E),D):Q(E)}function D(E){return E===62?(t.consume(E),A):E===45&&s===2?(t.consume(E),D):Q(E)}function A(E){return E===null||Ee(E)?(t.exit("htmlFlowData"),L(E)):(t.consume(E),A)}function L(E){return t.exit("htmlFlow"),r(E)}}function YC(t,r,l){const i=this;return s;function s(c){return Ee(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):l(c)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}function GC(t,r,l){return i;function i(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(_i,r,l)}}const PC={name:"htmlText",tokenize:XC};function XC(t,r,l){const i=this;let s,u,c;return d;function d(D){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(D),p}function p(D){return D===33?(t.consume(D),m):D===47?(t.consume(D),P):D===63?(t.consume(D),z):Gt(D)?(t.consume(D),le):l(D)}function m(D){return D===45?(t.consume(D),x):D===91?(t.consume(D),u=0,k):Gt(D)?(t.consume(D),M):l(D)}function x(D){return D===45?(t.consume(D),S):l(D)}function y(D){return D===null?l(D):D===45?(t.consume(D),b):Ee(D)?(c=y,te(D)):(t.consume(D),y)}function b(D){return D===45?(t.consume(D),S):y(D)}function S(D){return D===62?H(D):D===45?b(D):y(D)}function k(D){const A="CDATA[";return D===A.charCodeAt(u++)?(t.consume(D),u===A.length?N:k):l(D)}function N(D){return D===null?l(D):D===93?(t.consume(D),T):Ee(D)?(c=N,te(D)):(t.consume(D),N)}function T(D){return D===93?(t.consume(D),j):N(D)}function j(D){return D===62?H(D):D===93?(t.consume(D),j):N(D)}function M(D){return D===null||D===62?H(D):Ee(D)?(c=M,te(D)):(t.consume(D),M)}function z(D){return D===null?l(D):D===63?(t.consume(D),F):Ee(D)?(c=z,te(D)):(t.consume(D),z)}function F(D){return D===62?H(D):z(D)}function P(D){return Gt(D)?(t.consume(D),U):l(D)}function U(D){return D===45||It(D)?(t.consume(D),U):G(D)}function G(D){return Ee(D)?(c=G,te(D)):He(D)?(t.consume(D),G):H(D)}function le(D){return D===45||It(D)?(t.consume(D),le):D===47||D===62||ot(D)?se(D):l(D)}function se(D){return D===47?(t.consume(D),H):D===58||D===95||Gt(D)?(t.consume(D),B):Ee(D)?(c=se,te(D)):He(D)?(t.consume(D),se):H(D)}function B(D){return D===45||D===46||D===58||D===95||It(D)?(t.consume(D),B):X(D)}function X(D){return D===61?(t.consume(D),Q):Ee(D)?(c=X,te(D)):He(D)?(t.consume(D),X):se(D)}function Q(D){return D===null||D===60||D===61||D===62||D===96?l(D):D===34||D===39?(t.consume(D),s=D,de):Ee(D)?(c=Q,te(D)):He(D)?(t.consume(D),Q):(t.consume(D),oe)}function de(D){return D===s?(t.consume(D),s=void 0,q):D===null?l(D):Ee(D)?(c=de,te(D)):(t.consume(D),de)}function oe(D){return D===null||D===34||D===39||D===60||D===61||D===96?l(D):D===47||D===62||ot(D)?se(D):(t.consume(D),oe)}function q(D){return D===47||D===62||ot(D)?se(D):l(D)}function H(D){return D===62?(t.consume(D),t.exit("htmlTextData"),t.exit("htmlText"),r):l(D)}function te(D){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),ae}function ae(D){return He(D)?Xe(t,Se,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Se(D)}function Se(D){return t.enter("htmlTextData"),c(D)}}const Td={name:"labelEnd",resolveAll:JC,resolveTo:WC,tokenize:eN},QC={tokenize:tN},KC={tokenize:nN},ZC={tokenize:rN};function JC(t){let r=-1;const l=[];for(;++r<t.length;){const i=t[r][1];if(l.push(t[r]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",r+=s}}return t.length!==l.length&&mn(t,0,t.length,l),t}function WC(t,r){let l=t.length,i=0,s,u,c,d;for(;l--;)if(s=t[l][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[l][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(t[l][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=l,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(c=l);const p={type:t[u][1].type==="labelLink"?"link":"image",start:{...t[u][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[u][1].start},end:{...t[c][1].end}},x={type:"labelText",start:{...t[u+i+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",p,r],["enter",m,r]],d=En(d,t.slice(u+1,u+i+3)),d=En(d,[["enter",x,r]]),d=En(d,Ms(r.parser.constructs.insideSpan.null,t.slice(u+i+4,c-3),r)),d=En(d,[["exit",x,r],t[c-2],t[c-1],["exit",m,r]]),d=En(d,t.slice(c+1)),d=En(d,[["exit",p,r]]),mn(t,u,t.length,d),t}function eN(t,r,l){const i=this;let s=i.events.length,u,c;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){u=i.events[s][1];break}return d;function d(b){return u?u._inactive?y(b):(c=i.parser.defined.includes(Rn(i.sliceSerialize({start:u.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),p):l(b)}function p(b){return b===40?t.attempt(QC,x,c?x:y)(b):b===91?t.attempt(KC,x,c?m:y)(b):c?x(b):y(b)}function m(b){return t.attempt(ZC,x,y)(b)}function x(b){return r(b)}function y(b){return u._balanced=!0,l(b)}}function tN(t,r,l){return i;function i(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return ot(y)?Ni(t,u)(y):u(y)}function u(y){return y===41?x(y):m0(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return ot(y)?Ni(t,p)(y):x(y)}function d(y){return l(y)}function p(y){return y===34||y===39||y===40?g0(t,m,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):x(y)}function m(y){return ot(y)?Ni(t,x)(y):x(y)}function x(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),r):l(y)}}function nN(t,r,l){const i=this;return s;function s(d){return p0.call(i,t,u,c,"reference","referenceMarker","referenceString")(d)}function u(d){return i.parser.defined.includes(Rn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?r(d):l(d)}function c(d){return l(d)}}function rN(t,r,l){return i;function i(u){return t.enter("reference"),t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),s}function s(u){return u===93?(t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),t.exit("reference"),r):l(u)}}const lN={name:"labelStartImage",resolveAll:Td.resolveAll,tokenize:aN};function aN(t,r,l){const i=this;return s;function s(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),u}function u(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):l(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(d):r(d)}}const iN={name:"labelStartLink",resolveAll:Td.resolveAll,tokenize:oN};function oN(t,r,l){const i=this;return s;function s(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(c):r(c)}}const hf={name:"lineEnding",tokenize:sN};function sN(t,r){return l;function l(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),Xe(t,r,"linePrefix")}}const ms={name:"thematicBreak",tokenize:uN};function uN(t,r,l){let i=0,s;return u;function u(m){return t.enter("thematicBreak"),c(m)}function c(m){return s=m,d(m)}function d(m){return m===s?(t.enter("thematicBreakSequence"),p(m)):i>=3&&(m===null||Ee(m))?(t.exit("thematicBreak"),r(m)):l(m)}function p(m){return m===s?(t.consume(m),i++,p):(t.exit("thematicBreakSequence"),He(m)?Xe(t,d,"whitespace")(m):d(m))}}const tn={continuation:{tokenize:hN},exit:pN,name:"list",tokenize:dN},cN={partial:!0,tokenize:gN},fN={partial:!0,tokenize:mN};function dN(t,r,l){const i=this,s=i.events[i.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(S){const k=i.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||S===i.containerState.marker:Xf(S)){if(i.containerState.type||(i.containerState.type=k,t.enter(k,{_container:!0})),k==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(ms,l,m)(S):m(S);if(!i.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(S)}return l(S)}function p(S){return Xf(S)&&++c<10?(t.consume(S),p):(!i.interrupt||c<2)&&(i.containerState.marker?S===i.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),m(S)):l(S)}function m(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||S,t.check(_i,i.interrupt?l:x,t.attempt(cN,b,y))}function x(S){return i.containerState.initialBlankLine=!0,u++,b(S)}function y(S){return He(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),b):l(S)}function b(S){return i.containerState.size=u+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,r(S)}}function hN(t,r,l){const i=this;return i.containerState._closeFlow=void 0,t.check(_i,s,u);function s(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Xe(t,r,"listItemIndent",i.containerState.size+1)(d)}function u(d){return i.containerState.furtherBlankLines||!He(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(fN,r,c)(d))}function c(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,Xe(t,t.attempt(tn,r,l),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function mN(t,r,l){const i=this;return Xe(t,s,"listItemIndent",i.containerState.size+1);function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?r(u):l(u)}}function pN(t){t.exit(this.containerState.type)}function gN(t,r,l){const i=this;return Xe(t,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const c=i.events[i.events.length-1];return!He(u)&&c&&c[1].type==="listItemPrefixWhitespace"?r(u):l(u)}}const zy={name:"setextUnderline",resolveTo:yN,tokenize:xN};function yN(t,r){let l=t.length,i,s,u;for(;l--;)if(t[l][0]==="enter"){if(t[l][1].type==="content"){i=l;break}t[l][1].type==="paragraph"&&(s=l)}else t[l][1].type==="content"&&t.splice(l,1),!u&&t[l][1].type==="definition"&&(u=l);const c={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",u?(t.splice(s,0,["enter",c,r]),t.splice(u+1,0,["exit",t[i][1],r]),t[i][1].end={...t[u][1].end}):t[i][1]=c,t.push(["exit",c,r]),t}function xN(t,r,l){const i=this;let s;return u;function u(m){let x=i.events.length,y;for(;x--;)if(i.events[x][1].type!=="lineEnding"&&i.events[x][1].type!=="linePrefix"&&i.events[x][1].type!=="content"){y=i.events[x][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(t.enter("setextHeadingLine"),s=m,c(m)):l(m)}function c(m){return t.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===s?(t.consume(m),d):(t.exit("setextHeadingLineSequence"),He(m)?Xe(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Ee(m)?(t.exit("setextHeadingLine"),r(m)):l(m)}}const bN={tokenize:vN};function vN(t){const r=this,l=t.attempt(_i,i,t.attempt(this.parser.constructs.flowInitial,s,Xe(t,t.attempt(this.parser.constructs.flow,s,t.attempt(NC,s)),"linePrefix")));return l;function i(u){if(u===null){t.consume(u);return}return t.enter("lineEndingBlank"),t.consume(u),t.exit("lineEndingBlank"),r.currentConstruct=void 0,l}function s(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),r.currentConstruct=void 0,l}}const SN={resolveAll:x0()},wN=y0("string"),kN=y0("text");function y0(t){return{resolveAll:x0(t==="text"?CN:void 0),tokenize:r};function r(l){const i=this,s=this.parser.constructs[t],u=l.attempt(s,c,d);return c;function c(x){return m(x)?u(x):d(x)}function d(x){if(x===null){l.consume(x);return}return l.enter("data"),l.consume(x),p}function p(x){return m(x)?(l.exit("data"),u(x)):(l.consume(x),p)}function m(x){if(x===null)return!0;const y=s[x];let b=-1;if(y)for(;++b<y.length;){const S=y[b];if(!S.previous||S.previous.call(i,i.previous))return!0}return!1}}}function x0(t){return r;function r(l,i){let s=-1,u;for(;++s<=l.length;)u===void 0?l[s]&&l[s][1].type==="data"&&(u=s,s++):(!l[s]||l[s][1].type!=="data")&&(s!==u+2&&(l[u][1].end=l[s-1][1].end,l.splice(u+2,s-u-2),s=u+2),u=void 0);return t?t(l,i):l}}function CN(t,r){let l=0;for(;++l<=t.length;)if((l===t.length||t[l][1].type==="lineEnding")&&t[l-1][1].type==="data"){const i=t[l-1][1],s=r.sliceStream(i);let u=s.length,c=-1,d=0,p;for(;u--;){const m=s[u];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)p=!0,d++;else if(m!==-1){u++;break}}if(r._contentTypeTextTrailing&&l===t.length&&(d=0),d){const m={type:l===t.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:i.start._bufferIndex+c,_index:i.start._index+u,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...m.start},i.start.offset===i.end.offset?Object.assign(i,m):(t.splice(l,0,["enter",m,r],["exit",m,r]),l+=2)}l++}return t}const NN={42:tn,43:tn,45:tn,48:tn,49:tn,50:tn,51:tn,52:tn,53:tn,54:tn,55:tn,56:tn,57:tn,62:c0},EN={91:MC},jN={[-2]:df,[-1]:df,32:df},TN={35:LC,42:ms,45:[zy,ms],60:qC,61:zy,95:ms,96:Dy,126:Dy},AN={38:d0,92:f0},MN={[-5]:hf,[-4]:hf,[-3]:hf,33:lN,38:d0,42:Qf,60:[iC,PC],91:iN,92:[OC,f0],93:Td,95:Qf,96:bC},DN={null:[Qf,SN]},RN={null:[42,95]},zN={null:[]},ON=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:RN,contentInitial:EN,disable:zN,document:NN,flow:TN,flowInitial:jN,insideSpan:DN,string:AN,text:MN},Symbol.toStringTag,{value:"Module"}));function _N(t,r,l){let i={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const s={},u=[];let c=[],d=[];const p={attempt:G(P),check:G(U),consume:M,enter:z,exit:F,interrupt:G(U,{interrupt:!0})},m={code:null,containerState:{},defineSkip:N,events:[],now:k,parser:t,previous:null,sliceSerialize:b,sliceStream:S,write:y};let x=r.tokenize.call(m,p);return r.resolveAll&&u.push(r),m;function y(X){return c=En(c,X),T(),c[c.length-1]!==null?[]:(le(r,0),m.events=Ms(u,m.events,m),m.events)}function b(X,Q){return UN(S(X),Q)}function S(X){return LN(c,X)}function k(){const{_bufferIndex:X,_index:Q,line:de,column:oe,offset:q}=i;return{_bufferIndex:X,_index:Q,line:de,column:oe,offset:q}}function N(X){s[X.line]=X.column,B()}function T(){let X;for(;i._index<c.length;){const Q=c[i._index];if(typeof Q=="string")for(X=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===X&&i._bufferIndex<Q.length;)j(Q.charCodeAt(i._bufferIndex));else j(Q)}}function j(X){x=x(X)}function M(X){Ee(X)?(i.line++,i.column=1,i.offset+=X===-3?2:1,B()):X!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),m.previous=X}function z(X,Q){const de=Q||{};return de.type=X,de.start=k(),m.events.push(["enter",de,m]),d.push(de),de}function F(X){const Q=d.pop();return Q.end=k(),m.events.push(["exit",Q,m]),Q}function P(X,Q){le(X,Q.from)}function U(X,Q){Q.restore()}function G(X,Q){return de;function de(oe,q,H){let te,ae,Se,D;return Array.isArray(oe)?L(oe):"tokenize"in oe?L([oe]):A(oe);function A(ne){return J;function J(ye){const ke=ye!==null&&ne[ye],Ae=ye!==null&&ne.null,ht=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Ae)?Ae:Ae?[Ae]:[]];return L(ht)(ye)}}function L(ne){return te=ne,ae=0,ne.length===0?H:E(ne[ae])}function E(ne){return J;function J(ye){return D=se(),Se=ne,ne.partial||(m.currentConstruct=ne),ne.name&&m.parser.constructs.disable.null.includes(ne.name)?ee():ne.tokenize.call(Q?Object.assign(Object.create(m),Q):m,p,O,ee)(ye)}}function O(ne){return X(Se,D),q}function ee(ne){return D.restore(),++ae<te.length?E(te[ae]):H}}}function le(X,Q){X.resolveAll&&!u.includes(X)&&u.push(X),X.resolve&&mn(m.events,Q,m.events.length-Q,X.resolve(m.events.slice(Q),m)),X.resolveTo&&(m.events=X.resolveTo(m.events,m))}function se(){const X=k(),Q=m.previous,de=m.currentConstruct,oe=m.events.length,q=Array.from(d);return{from:oe,restore:H};function H(){i=X,m.previous=Q,m.currentConstruct=de,m.events.length=oe,d=q,B()}}function B(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function LN(t,r){const l=r.start._index,i=r.start._bufferIndex,s=r.end._index,u=r.end._bufferIndex;let c;if(l===s)c=[t[l].slice(i,u)];else{if(c=t.slice(l,s),i>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(i):c.shift()}u>0&&c.push(t[s].slice(0,u))}return c}function UN(t,r){let l=-1;const i=[];let s;for(;++l<t.length;){const u=t[l];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
519
+ `;break}case-3:{c=`\r
520
+ `;break}case-2:{c=r?" ":" ";break}case-1:{if(!r&&s)continue;c=" ";break}default:c=String.fromCharCode(u)}s=u===-2,i.push(c)}return i.join("")}function BN(t){const i={constructs:s0([ON,...(t||{}).extensions||[]]),content:s(Wk),defined:[],document:s(tC),flow:s(bN),lazy:{},string:s(wN),text:s(kN)};return i;function s(u){return c;function c(d){return _N(i,u,d)}}}function HN(t){for(;!h0(t););return t}const Oy=/[\0\t\n\r]/g;function qN(){let t=1,r="",l=!0,i;return s;function s(u,c,d){const p=[];let m,x,y,b,S;for(u=r+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),y=0,r="",l&&(u.charCodeAt(0)===65279&&y++,l=void 0);y<u.length;){if(Oy.lastIndex=y,m=Oy.exec(u),b=m&&m.index!==void 0?m.index:u.length,S=u.charCodeAt(b),!m){r=u.slice(y);break}if(S===10&&y===b&&i)p.push(-3),i=void 0;else switch(i&&(p.push(-5),i=void 0),y<b&&(p.push(u.slice(y,b)),t+=b-y),S){case 0:{p.push(65533),t++;break}case 9:{for(x=Math.ceil(t/4)*4,p.push(-2);t++<x;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:i=!0,t=1}y=b+1}return d&&(i&&p.push(-5),r&&p.push(r),p.push(null)),p}}const IN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function VN(t){return t.replace(IN,$N)}function $N(t,r,l){if(r)return r;if(l.charCodeAt(0)===35){const s=l.charCodeAt(1),u=s===120||s===88;return u0(l.slice(u?2:1),u?16:10)}return jd(l)||t}const b0={}.hasOwnProperty;function FN(t,r,l){return r&&typeof r=="object"&&(l=r,r=void 0),YN(l)(HN(BN(l).document().write(qN()(t,r,!0))))}function YN(t){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Qe),autolinkProtocol:se,autolinkEmail:se,atxHeading:u(ve),blockQuote:u(Ae),characterEscape:se,characterReference:se,codeFenced:u(ht),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(ht,c),codeText:u(yt,c),codeTextData:se,data:se,codeFlowValue:se,definition:u(Le),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(ge),hardBreakEscape:u($e),hardBreakTrailing:u($e),htmlFlow:u(nt,c),htmlFlowData:se,htmlText:u(nt,c),htmlTextData:se,image:u(Ft),label:c,link:u(Qe),listItem:u(pn),listItemValue:b,listOrdered:u(Mt,y),listUnordered:u(Mt),paragraph:u(Gr),reference:E,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(ve),strong:u(fr),thematicBreak:u(Te)},exit:{atxHeading:p(),atxHeadingSequence:P,autolink:p(),autolinkEmail:ke,autolinkProtocol:ye,blockQuote:p(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:ne,characterReference:J,codeFenced:p(T),codeFencedFence:N,codeFencedFenceInfo:S,codeFencedFenceMeta:k,codeFlowValue:B,codeIndented:p(j),codeText:p(q),codeTextData:B,data:B,definition:p(),definitionDestinationString:F,definitionLabelString:M,definitionTitleString:z,emphasis:p(),hardBreakEscape:p(Q),hardBreakTrailing:p(Q),htmlFlow:p(de),htmlFlowData:B,htmlText:p(oe),htmlTextData:B,image:p(te),label:Se,labelText:ae,lineEnding:X,link:p(H),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:O,resourceDestinationString:D,resourceTitleString:A,resource:L,setextHeading:p(le),setextHeadingLineSequence:G,setextHeadingText:U,strong:p(),thematicBreak:p()}};v0(r,(t||{}).mdastExtensions||[]);const l={};return i;function i(K){let fe={type:"root",children:[]};const Ce={stack:[fe],tokenStack:[],config:r,enter:d,exit:m,buffer:c,resume:x,data:l},Re=[];let Ye=-1;for(;++Ye<K.length;)if(K[Ye][1].type==="listOrdered"||K[Ye][1].type==="listUnordered")if(K[Ye][0]==="enter")Re.push(Ye);else{const Ot=Re.pop();Ye=s(K,Ot,Ye)}for(Ye=-1;++Ye<K.length;){const Ot=r[K[Ye][0]];b0.call(Ot,K[Ye][1].type)&&Ot[K[Ye][1].type].call(Object.assign({sliceSerialize:K[Ye][2].sliceSerialize},Ce),K[Ye][1])}if(Ce.tokenStack.length>0){const Ot=Ce.tokenStack[Ce.tokenStack.length-1];(Ot[1]||_y).call(Ce,void 0,Ot[0])}for(fe.position={start:qr(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:qr(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<r.transforms.length;)fe=r.transforms[Ye](fe)||fe;return fe}function s(K,fe,Ce){let Re=fe-1,Ye=-1,Ot=!1,vt,gt,st,Dt;for(;++Re<=Ce;){const We=K[Re];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?Ye++:Ye--,Dt=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(vt&&!Dt&&!Ye&&!st&&(st=Re),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!Ye&&We[0]==="enter"&&We[1].type==="listItemPrefix"||Ye===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(vt){let dr=Re;for(gt=void 0;dr--;){const Tn=K[dr];if(Tn[1].type==="lineEnding"||Tn[1].type==="lineEndingBlank"){if(Tn[0]==="exit")continue;gt&&(K[gt][1].type="lineEndingBlank",Ot=!0),Tn[1].type="lineEnding",gt=dr}else if(!(Tn[1].type==="linePrefix"||Tn[1].type==="blockQuotePrefix"||Tn[1].type==="blockQuotePrefixWhitespace"||Tn[1].type==="blockQuoteMarker"||Tn[1].type==="listItemIndent"))break}st&&(!gt||st<gt)&&(vt._spread=!0),vt.end=Object.assign({},gt?K[gt][1].start:We[1].end),K.splice(gt||Re,0,["exit",vt,We[2]]),Re++,Ce++}if(We[1].type==="listItemPrefix"){const dr={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};vt=dr,K.splice(Re,0,["enter",dr,We[2]]),Re++,Ce++,st=void 0,Dt=!0}}}return K[fe][1]._spread=Ot,Ce}function u(K,fe){return Ce;function Ce(Re){d.call(this,K(Re),Re),fe&&fe.call(this,Re)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(K,fe,Ce){this.stack[this.stack.length-1].children.push(K),this.stack.push(K),this.tokenStack.push([fe,Ce||void 0]),K.position={start:qr(fe.start),end:void 0}}function p(K){return fe;function fe(Ce){K&&K.call(this,Ce),m.call(this,Ce)}}function m(K,fe){const Ce=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==K.type&&(fe?fe.call(this,K,Re[0]):(Re[1]||_y).call(this,K,Re[0]));else throw new Error("Cannot close `"+K.type+"` ("+Ci({start:K.start,end:K.end})+"): it’s not open");Ce.position.end=qr(K.end)}function x(){return Ed(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(K){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(K),10),this.data.expectingFirstListItemValue=void 0}}function S(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=K}function k(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=K}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K.replace(/(\r?\n|\r)$/g,"")}function M(K){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Rn(this.sliceSerialize(K)).toLowerCase()}function z(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.title=K}function F(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.url=K}function P(K){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ce=this.sliceSerialize(K).length;fe.depth=Ce}}function U(){this.data.setextHeadingSlurpLineEnding=!0}function G(K){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(K).codePointAt(0)===61?1:2}function le(){this.data.setextHeadingSlurpLineEnding=void 0}function se(K){const Ce=this.stack[this.stack.length-1].children;let Re=Ce[Ce.length-1];(!Re||Re.type!=="text")&&(Re=ue(),Re.position={start:qr(K.start),end:void 0},Ce.push(Re)),this.stack.push(Re)}function B(K){const fe=this.stack.pop();fe.value+=this.sliceSerialize(K),fe.position.end=qr(K.end)}function X(K){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=fe.children[fe.children.length-1];Ce.position.end=qr(K.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(fe.type)&&(se.call(this,K),B.call(this,K))}function Q(){this.data.atHardBreak=!0}function de(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K}function oe(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K}function q(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K}function H(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=fe,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function te(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=fe,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function ae(K){const fe=this.sliceSerialize(K),Ce=this.stack[this.stack.length-2];Ce.label=VN(fe),Ce.identifier=Rn(fe).toLowerCase()}function Se(){const K=this.stack[this.stack.length-1],fe=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Re=K.children;Ce.children=Re}else Ce.alt=fe}function D(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.url=K}function A(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.title=K}function L(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function O(K){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Rn(this.sliceSerialize(K)).toLowerCase(),this.data.referenceType="full"}function ee(K){this.data.characterReferenceType=K.type}function ne(K){const fe=this.sliceSerialize(K),Ce=this.data.characterReferenceType;let Re;Ce?(Re=u0(fe,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=jd(fe);const Ye=this.stack[this.stack.length-1];Ye.value+=Re}function J(K){const fe=this.stack.pop();fe.position.end=qr(K.end)}function ye(K){B.call(this,K);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(K)}function ke(K){B.call(this,K);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(K)}function Ae(){return{type:"blockquote",children:[]}}function ht(){return{type:"code",lang:null,meta:null,value:""}}function yt(){return{type:"inlineCode",value:""}}function Le(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function nt(){return{type:"html",value:""}}function Ft(){return{type:"image",title:null,url:"",alt:null}}function Qe(){return{type:"link",title:null,url:"",children:[]}}function Mt(K){return{type:"list",ordered:K.type==="listOrdered",start:null,spread:K._spread,children:[]}}function pn(K){return{type:"listItem",spread:K._spread,checked:null,children:[]}}function Gr(){return{type:"paragraph",children:[]}}function fr(){return{type:"strong",children:[]}}function ue(){return{type:"text",value:""}}function Te(){return{type:"thematicBreak"}}}function qr(t){return{line:t.line,column:t.column,offset:t.offset}}function v0(t,r){let l=-1;for(;++l<r.length;){const i=r[l];Array.isArray(i)?v0(t,i):GN(t,i)}}function GN(t,r){let l;for(l in r)if(b0.call(r,l))switch(l){case"canContainEols":{const i=r[l];i&&t[l].push(...i);break}case"transforms":{const i=r[l];i&&t[l].push(...i);break}case"enter":case"exit":{const i=r[l];i&&Object.assign(t[l],i);break}}}function _y(t,r){throw t?new Error("Cannot close `"+t.type+"` ("+Ci({start:t.start,end:t.end})+"): a different token (`"+r.type+"`, "+Ci({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Ci({start:r.start,end:r.end})+") is still open")}function PN(t){const r=this;r.parser=l;function l(i){return FN(i,{...r.data("settings"),...t,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function XN(t,r){const l={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(r),!0)};return t.patch(r,l),t.applyData(r,l)}function QN(t,r){const l={type:"element",tagName:"br",properties:{},children:[]};return t.patch(r,l),[t.applyData(r,l),{type:"text",value:`
521
+ `}]}function KN(t,r){const l=r.value?r.value+`
522
+ `:"",i={},s=r.lang?r.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:l}]};return r.meta&&(u.data={meta:r.meta}),t.patch(r,u),u=t.applyData(r,u),u={type:"element",tagName:"pre",properties:{},children:[u]},t.patch(r,u),u}function ZN(t,r){const l={type:"element",tagName:"del",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function JN(t,r){const l={type:"element",tagName:"em",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function WN(t,r){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(r.identifier).toUpperCase(),s=wa(i.toLowerCase()),u=t.footnoteOrder.indexOf(i);let c,d=t.footnoteCounts.get(i);d===void 0?(d=0,t.footnoteOrder.push(i),c=t.footnoteOrder.length):c=u+1,d+=1,t.footnoteCounts.set(i,d);const p={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+s,id:l+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(r,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(r,m),t.applyData(r,m)}function eE(t,r){const l={type:"element",tagName:"h"+r.depth,properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function tE(t,r){if(t.options.allowDangerousHtml){const l={type:"raw",value:r.value};return t.patch(r,l),t.applyData(r,l)}}function S0(t,r){const l=r.referenceType;let i="]";if(l==="collapsed"?i+="[]":l==="full"&&(i+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+i}];const s=t.all(r),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=i:s.push({type:"text",value:i}),s}function nE(t,r){const l=String(r.identifier).toUpperCase(),i=t.definitionById.get(l);if(!i)return S0(t,r);const s={src:wa(i.url||""),alt:r.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"img",properties:s,children:[]};return t.patch(r,u),t.applyData(r,u)}function rE(t,r){const l={src:wa(r.url)};r.alt!==null&&r.alt!==void 0&&(l.alt=r.alt),r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"img",properties:l,children:[]};return t.patch(r,i),t.applyData(r,i)}function lE(t,r){const l={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};t.patch(r,l);const i={type:"element",tagName:"code",properties:{},children:[l]};return t.patch(r,i),t.applyData(r,i)}function aE(t,r){const l=String(r.identifier).toUpperCase(),i=t.definitionById.get(l);if(!i)return S0(t,r);const s={href:wa(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"a",properties:s,children:t.all(r)};return t.patch(r,u),t.applyData(r,u)}function iE(t,r){const l={href:wa(r.url)};r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"a",properties:l,children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}function oE(t,r,l){const i=t.all(r),s=l?sE(l):w0(r),u={},c=[];if(typeof r.checked=="boolean"){const x=i[0];let y;x&&x.type==="element"&&x.tagName==="p"?y=x:(y={type:"element",tagName:"p",properties:{},children:[]},i.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let d=-1;for(;++d<i.length;){const x=i[d];(s||d!==0||x.type!=="element"||x.tagName!=="p")&&c.push({type:"text",value:`
523
+ `}),x.type==="element"&&x.tagName==="p"&&!s?c.push(...x.children):c.push(x)}const p=i[i.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
524
+ `});const m={type:"element",tagName:"li",properties:u,children:c};return t.patch(r,m),t.applyData(r,m)}function sE(t){let r=!1;if(t.type==="list"){r=t.spread||!1;const l=t.children;let i=-1;for(;!r&&++i<l.length;)r=w0(l[i])}return r}function w0(t){const r=t.spread;return r??t.children.length>1}function uE(t,r){const l={},i=t.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(l.start=r.start);++s<i.length;){const c=i[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const u={type:"element",tagName:r.ordered?"ol":"ul",properties:l,children:t.wrap(i,!0)};return t.patch(r,u),t.applyData(r,u)}function cE(t,r){const l={type:"element",tagName:"p",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function fE(t,r){const l={type:"root",children:t.wrap(t.all(r))};return t.patch(r,l),t.applyData(r,l)}function dE(t,r){const l={type:"element",tagName:"strong",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function hE(t,r){const l=t.all(r),i=l.shift(),s=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(r.children[0],c),s.push(c)}if(l.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(l,!0)},d=wd(r.children[1]),p=t0(r.children[r.children.length-1]);d&&p&&(c.position={start:d,end:p}),s.push(c)}const u={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(r,u),t.applyData(r,u)}function mE(t,r,l){const i=l?l.children:void 0,u=(i?i.indexOf(r):1)===0?"th":"td",c=l&&l.type==="table"?l.align:void 0,d=c?c.length:r.children.length;let p=-1;const m=[];for(;++p<d;){const y=r.children[p],b={},S=c?c[p]:void 0;S&&(b.align=S);let k={type:"element",tagName:u,properties:b,children:[]};y&&(k.children=t.all(y),t.patch(y,k),k=t.applyData(y,k)),m.push(k)}const x={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(r,x),t.applyData(r,x)}function pE(t,r){const l={type:"element",tagName:"td",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}const Ly=9,Uy=32;function gE(t){const r=String(t),l=/\r?\n|\r/g;let i=l.exec(r),s=0;const u=[];for(;i;)u.push(By(r.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=l.exec(r);return u.push(By(r.slice(s),s>0,!1)),u.join("")}function By(t,r,l){let i=0,s=t.length;if(r){let u=t.codePointAt(i);for(;u===Ly||u===Uy;)i++,u=t.codePointAt(i)}if(l){let u=t.codePointAt(s-1);for(;u===Ly||u===Uy;)s--,u=t.codePointAt(s-1)}return s>i?t.slice(i,s):""}function yE(t,r){const l={type:"text",value:gE(String(r.value))};return t.patch(r,l),t.applyData(r,l)}function xE(t,r){const l={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(r,l),t.applyData(r,l)}const bE={blockquote:XN,break:QN,code:KN,delete:ZN,emphasis:JN,footnoteReference:WN,heading:eE,html:tE,imageReference:nE,image:rE,inlineCode:lE,linkReference:aE,link:iE,listItem:oE,list:uE,paragraph:cE,root:fE,strong:dE,table:hE,tableCell:pE,tableRow:mE,text:yE,thematicBreak:xE,toml:ls,yaml:ls,definition:ls,footnoteDefinition:ls};function ls(){}const k0=-1,Ds=0,Ei=1,bs=2,Ad=3,Md=4,Dd=5,Rd=6,C0=7,N0=8,vE=typeof self=="object"?self:globalThis,Hy=(t,r)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new vE[t](r)},SE=(t,r)=>{const l=(s,u)=>(t.set(u,s),s),i=s=>{if(t.has(s))return t.get(s);const[u,c]=r[s];switch(u){case Ds:case k0:return l(c,s);case Ei:{const d=l([],s);for(const p of c)d.push(i(p));return d}case bs:{const d=l({},s);for(const[p,m]of c)d[i(p)]=i(m);return d}case Ad:return l(new Date(c),s);case Md:{const{source:d,flags:p}=c;return l(new RegExp(d,p),s)}case Dd:{const d=l(new Map,s);for(const[p,m]of c)d.set(i(p),i(m));return d}case Rd:{const d=l(new Set,s);for(const p of c)d.add(i(p));return d}case C0:{const{name:d,message:p}=c;return l(Hy(d,p),s)}case N0:return l(BigInt(c),s);case"BigInt":return l(Object(BigInt(c)),s);case"ArrayBuffer":return l(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return l(new DataView(d),c)}}return l(Hy(u,c),s)};return i},qy=t=>SE(new Map,t)(0),aa="",{toString:wE}={},{keys:kE}=Object,Si=t=>{const r=typeof t;if(r!=="object"||!t)return[Ds,r];const l=wE.call(t).slice(8,-1);switch(l){case"Array":return[Ei,aa];case"Object":return[bs,aa];case"Date":return[Ad,aa];case"RegExp":return[Md,aa];case"Map":return[Dd,aa];case"Set":return[Rd,aa];case"DataView":return[Ei,l]}return l.includes("Array")?[Ei,l]:l.includes("Error")?[C0,l]:[bs,l]},as=([t,r])=>t===Ds&&(r==="function"||r==="symbol"),CE=(t,r,l,i)=>{const s=(c,d)=>{const p=i.push(c)-1;return l.set(d,p),p},u=c=>{if(l.has(c))return l.get(c);let[d,p]=Si(c);switch(d){case Ds:{let x=c;switch(p){case"bigint":d=N0,x=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);x=null;break;case"undefined":return s([k0],c)}return s([d,x],c)}case Ei:{if(p){let b=c;return p==="DataView"?b=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(b=new Uint8Array(c)),s([p,[...b]],c)}const x=[],y=s([d,x],c);for(const b of c)x.push(u(b));return y}case bs:{if(p)switch(p){case"BigInt":return s([p,c.toString()],c);case"Boolean":case"Number":case"String":return s([p,c.valueOf()],c)}if(r&&"toJSON"in c)return u(c.toJSON());const x=[],y=s([d,x],c);for(const b of kE(c))(t||!as(Si(c[b])))&&x.push([u(b),u(c[b])]);return y}case Ad:return s([d,c.toISOString()],c);case Md:{const{source:x,flags:y}=c;return s([d,{source:x,flags:y}],c)}case Dd:{const x=[],y=s([d,x],c);for(const[b,S]of c)(t||!(as(Si(b))||as(Si(S))))&&x.push([u(b),u(S)]);return y}case Rd:{const x=[],y=s([d,x],c);for(const b of c)(t||!as(Si(b)))&&x.push(u(b));return y}}const{message:m}=c;return s([d,{name:p,message:m}],c)};return u},Iy=(t,{json:r,lossy:l}={})=>{const i=[];return CE(!(r||l),!!r,new Map,i)(t),i},vs=typeof structuredClone=="function"?(t,r)=>r&&("json"in r||"lossy"in r)?qy(Iy(t,r)):structuredClone(t):(t,r)=>qy(Iy(t,r));function NE(t,r){const l=[{type:"text",value:"↩"}];return r>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),l}function EE(t,r){return"Back to reference "+(t+1)+(r>1?"-"+r:"")}function jE(t){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",l=t.options.footnoteBackContent||NE,i=t.options.footnoteBackLabel||EE,s=t.options.footnoteLabel||"Footnotes",u=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const x=t.all(m),y=String(m.identifier).toUpperCase(),b=wa(y.toLowerCase());let S=0;const k=[],N=t.footnoteCounts.get(y);for(;N!==void 0&&++S<=N;){k.length>0&&k.push({type:"text",value:" "});let M=typeof l=="string"?l:l(p,S);typeof M=="string"&&(M={type:"text",value:M}),k.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+b+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(p,S),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const T=x[x.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const M=T.children[T.children.length-1];M&&M.type==="text"?M.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...k)}else x.push(...k);const j={type:"element",tagName:"li",properties:{id:r+"fn-"+b},children:t.wrap(x,!0)};t.patch(m,j),d.push(j)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...vs(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
525
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
526
+ `}]}}const Rs=(function(t){if(t==null)return DE;if(typeof t=="function")return zs(t);if(typeof t=="object")return Array.isArray(t)?TE(t):AE(t);if(typeof t=="string")return ME(t);throw new Error("Expected function, string, or object as test")});function TE(t){const r=[];let l=-1;for(;++l<t.length;)r[l]=Rs(t[l]);return zs(i);function i(...s){let u=-1;for(;++u<r.length;)if(r[u].apply(this,s))return!0;return!1}}function AE(t){const r=t;return zs(l);function l(i){const s=i;let u;for(u in t)if(s[u]!==r[u])return!1;return!0}}function ME(t){return zs(r);function r(l){return l&&l.type===t}}function zs(t){return r;function r(l,i,s){return!!(RE(l)&&t.call(this,l,typeof i=="number"?i:void 0,s||void 0))}}function DE(){return!0}function RE(t){return t!==null&&typeof t=="object"&&"type"in t}const E0=[],zE=!0,Kf=!1,OE="skip";function j0(t,r,l,i){let s;typeof r=="function"&&typeof l!="function"?(i=l,l=r):s=r;const u=Rs(s),c=i?-1:1;d(t,void 0,[])();function d(p,m,x){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const S=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(S?"<"+S+">":""))+")"})}return b;function b(){let S=E0,k,N,T;if((!r||u(p,m,x[x.length-1]||void 0))&&(S=_E(l(p,x)),S[0]===Kf))return S;if("children"in p&&p.children){const j=p;if(j.children&&S[0]!==OE)for(N=(i?j.children.length:-1)+c,T=x.concat(j);N>-1&&N<j.children.length;){const M=j.children[N];if(k=d(M,N,T)(),k[0]===Kf)return k;N=typeof k[1]=="number"?k[1]:N+c}}return S}}}function _E(t){return Array.isArray(t)?t:typeof t=="number"?[zE,t]:t==null?E0:[t]}function zd(t,r,l,i){let s,u,c;typeof r=="function"&&typeof l!="function"?(u=void 0,c=r,s=l):(u=r,c=l,s=i),j0(t,u,d,s);function d(p,m){const x=m[m.length-1],y=x?x.children.indexOf(p):void 0;return c(p,y,x)}}const Zf={}.hasOwnProperty,LE={};function UE(t,r){const l=r||LE,i=new Map,s=new Map,u=new Map,c={...bE,...l.handlers},d={all:m,applyData:HE,definitionById:i,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:l,patch:BE,wrap:IE};return zd(t,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const y=x.type==="definition"?i:s,b=String(x.identifier).toUpperCase();y.has(b)||y.set(b,x)}}),d;function p(x,y){const b=x.type,S=d.handlers[b];if(Zf.call(d.handlers,b)&&S)return S(d,x,y);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in x){const{children:N,...T}=x,j=vs(T);return j.children=d.all(x),j}return vs(x)}return(d.options.unknownHandler||qE)(d,x,y)}function m(x){const y=[];if("children"in x){const b=x.children;let S=-1;for(;++S<b.length;){const k=d.one(b[S],x);if(k){if(S&&b[S-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Vy(k.value)),!Array.isArray(k)&&k.type==="element")){const N=k.children[0];N&&N.type==="text"&&(N.value=Vy(N.value))}Array.isArray(k)?y.push(...k):y.push(k)}}}return y}}function BE(t,r){t.position&&(r.position=Nk(t))}function HE(t,r){let l=r;if(t&&t.data){const i=t.data.hName,s=t.data.hChildren,u=t.data.hProperties;if(typeof i=="string")if(l.type==="element")l.tagName=i;else{const c="children"in l?l.children:[l];l={type:"element",tagName:i,properties:{},children:c}}l.type==="element"&&u&&Object.assign(l.properties,vs(u)),"children"in l&&l.children&&s!==null&&s!==void 0&&(l.children=s)}return l}function qE(t,r){const l=r.data||{},i="value"in r&&!(Zf.call(l,"hProperties")||Zf.call(l,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}function IE(t,r){const l=[];let i=-1;for(r&&l.push({type:"text",value:`
527
+ `});++i<t.length;)i&&l.push({type:"text",value:`
528
+ `}),l.push(t[i]);return r&&t.length>0&&l.push({type:"text",value:`
529
+ `}),l}function Vy(t){let r=0,l=t.charCodeAt(r);for(;l===9||l===32;)r++,l=t.charCodeAt(r);return t.slice(r)}function $y(t,r){const l=UE(t,r),i=l.one(t,void 0),s=jE(l),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
530
+ `},s),u}function VE(t,r){return t&&"run"in t?async function(l,i){const s=$y(l,{file:i,...r});await t.run(s,i)}:function(l,i){return $y(l,{file:i,...t||r})}}function Fy(t){if(t)throw t}var mf,Yy;function $E(){if(Yy)return mf;Yy=1;var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,l=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):r.call(m)==="[object Array]"},u=function(m){if(!m||r.call(m)!=="[object Object]")return!1;var x=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!x&&!y)return!1;var b;for(b in m);return typeof b>"u"||t.call(m,b)},c=function(m,x){l&&x.name==="__proto__"?l(m,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):m[x.name]=x.newValue},d=function(m,x){if(x==="__proto__")if(t.call(m,x)){if(i)return i(m,x).value}else return;return m[x]};return mf=function p(){var m,x,y,b,S,k,N=arguments[0],T=1,j=arguments.length,M=!1;for(typeof N=="boolean"&&(M=N,N=arguments[1]||{},T=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});T<j;++T)if(m=arguments[T],m!=null)for(x in m)y=d(N,x),b=d(m,x),N!==b&&(M&&b&&(u(b)||(S=s(b)))?(S?(S=!1,k=y&&s(y)?y:[]):k=y&&u(y)?y:{},c(N,{name:x,newValue:p(M,k,b)})):typeof b<"u"&&c(N,{name:x,newValue:b}));return N},mf}var FE=$E();const pf=Ri(FE);function Jf(t){if(typeof t!="object"||t===null)return!1;const r=Object.getPrototypeOf(t);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function YE(){const t=[],r={run:l,use:i};return r;function l(...s){let u=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(p,...m){const x=t[++u];let y=-1;if(p){c(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,x?GE(x,d)(...m):c(null,...m)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),r}}function GE(t,r){let l;return i;function i(...c){const d=t.length>c.length;let p;d&&c.push(s);try{p=t.apply(this,c)}catch(m){const x=m;if(d&&l)throw x;return s(x)}d||(p&&p.then&&typeof p.then=="function"?p.then(u,s):p instanceof Error?s(p):u(p))}function s(c,...d){l||(l=!0,r(c,...d))}function u(c){s(null,c)}}const Bn={basename:PE,dirname:XE,extname:QE,join:KE,sep:"/"};function PE(t,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Li(t);let l=0,i=-1,s=t.length,u;if(r===void 0||r.length===0||r.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(u){l=s+1;break}}else i<0&&(u=!0,i=s+1);return i<0?"":t.slice(l,i)}if(r===t)return"";let c=-1,d=r.length-1;for(;s--;)if(t.codePointAt(s)===47){if(u){l=s+1;break}}else c<0&&(u=!0,c=s+1),d>-1&&(t.codePointAt(s)===r.codePointAt(d--)?d<0&&(i=s):(d=-1,i=c));return l===i?i=c:i<0&&(i=t.length),t.slice(l,i)}function XE(t){if(Li(t),t.length===0)return".";let r=-1,l=t.length,i;for(;--l;)if(t.codePointAt(l)===47){if(i){r=l;break}}else i||(i=!0);return r<0?t.codePointAt(0)===47?"/":".":r===1&&t.codePointAt(0)===47?"//":t.slice(0,r)}function QE(t){Li(t);let r=t.length,l=-1,i=0,s=-1,u=0,c;for(;r--;){const d=t.codePointAt(r);if(d===47){if(c){i=r+1;break}continue}l<0&&(c=!0,l=r+1),d===46?s<0?s=r:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||l<0||u===0||u===1&&s===l-1&&s===i+1?"":t.slice(s,l)}function KE(...t){let r=-1,l;for(;++r<t.length;)Li(t[r]),t[r]&&(l=l===void 0?t[r]:l+"/"+t[r]);return l===void 0?".":ZE(l)}function ZE(t){Li(t);const r=t.codePointAt(0)===47;let l=JE(t,!r);return l.length===0&&!r&&(l="."),l.length>0&&t.codePointAt(t.length-1)===47&&(l+="/"),r?"/"+l:l}function JE(t,r){let l="",i=0,s=-1,u=0,c=-1,d,p;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||u===1))if(s!==c-1&&u===2){if(l.length<2||i!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(p=l.lastIndexOf("/"),p!==l.length-1){p<0?(l="",i=0):(l=l.slice(0,p),i=l.length-1-l.lastIndexOf("/")),s=c,u=0;continue}}else if(l.length>0){l="",i=0,s=c,u=0;continue}}r&&(l=l.length>0?l+"/..":"..",i=2)}else l.length>0?l+="/"+t.slice(s+1,c):l=t.slice(s+1,c),i=c-s-1;s=c,u=0}else d===46&&u>-1?u++:u=-1}return l}function Li(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const WE={cwd:ej};function ej(){return"/"}function Wf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function tj(t){if(typeof t=="string")t=new URL(t);else if(!Wf(t)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(t.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return nj(t)}function nj(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const r=t.pathname;let l=-1;for(;++l<r.length;)if(r.codePointAt(l)===37&&r.codePointAt(l+1)===50){const i=r.codePointAt(l+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(r)}const gf=["history","path","basename","stem","extname","dirname"];class T0{constructor(r){let l;r?Wf(r)?l={path:r}:typeof r=="string"||rj(r)?l={value:r}:l=r:l={},this.cwd="cwd"in l?"":WE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<gf.length;){const u=gf[i];u in l&&l[u]!==void 0&&l[u]!==null&&(this[u]=u==="history"?[...l[u]]:l[u])}let s;for(s in l)gf.includes(s)||(this[s]=l[s])}get basename(){return typeof this.path=="string"?Bn.basename(this.path):void 0}set basename(r){xf(r,"basename"),yf(r,"basename"),this.path=Bn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Bn.dirname(this.path):void 0}set dirname(r){Gy(this.basename,"dirname"),this.path=Bn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Bn.extname(this.path):void 0}set extname(r){if(yf(r,"extname"),Gy(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Bn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Wf(r)&&(r=tj(r)),xf(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Bn.basename(this.path,this.extname):void 0}set stem(r){xf(r,"stem"),yf(r,"stem"),this.path=Bn.join(this.dirname||"",r+(this.extname||""))}fail(r,l,i){const s=this.message(r,l,i);throw s.fatal=!0,s}info(r,l,i){const s=this.message(r,l,i);return s.fatal=void 0,s}message(r,l,i){const s=new $t(r,l,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function yf(t,r){if(t&&t.includes(Bn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Bn.sep+"`")}function xf(t,r){if(!t)throw new Error("`"+r+"` cannot be empty")}function Gy(t,r){if(!t)throw new Error("Setting `"+r+"` requires `path` to be set too")}function rj(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const lj=(function(t){const i=this.constructor.prototype,s=i[t],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),aj={}.hasOwnProperty;class Od extends lj{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=YE()}copy(){const r=new Od;let l=-1;for(;++l<this.attachers.length;){const i=this.attachers[l];r.use(...i)}return r.data(pf(!0,{},this.namespace)),r}data(r,l){return typeof r=="string"?arguments.length===2?(Sf("data",this.frozen),this.namespace[r]=l,this):aj.call(this.namespace,r)&&this.namespace[r]||void 0:r?(Sf("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=l.call(r,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const l=is(r),i=this.parser||this.Parser;return bf("parse",i),i(String(l),l)}process(r,l){const i=this;return this.freeze(),bf("process",this.parser||this.Parser),vf("process",this.compiler||this.Compiler),l?s(void 0,l):new Promise(s);function s(u,c){const d=is(r),p=i.parse(d);i.run(p,d,function(x,y,b){if(x||!y||!b)return m(x);const S=y,k=i.stringify(S,b);sj(k)?b.value=k:b.result=k,m(x,b)});function m(x,y){x||!y?c(x):u?u(y):l(void 0,y)}}}processSync(r){let l=!1,i;return this.freeze(),bf("processSync",this.parser||this.Parser),vf("processSync",this.compiler||this.Compiler),this.process(r,s),Xy("processSync","process",l),i;function s(u,c){l=!0,Fy(u),i=c}}run(r,l,i){Py(r),this.freeze();const s=this.transformers;return!i&&typeof l=="function"&&(i=l,l=void 0),i?u(void 0,i):new Promise(u);function u(c,d){const p=is(l);s.run(r,p,m);function m(x,y,b){const S=y||r;x?d(x):c?c(S):i(void 0,S,b)}}}runSync(r,l){let i=!1,s;return this.run(r,l,u),Xy("runSync","run",i),s;function u(c,d){Fy(c),s=d,i=!0}}stringify(r,l){this.freeze();const i=is(l),s=this.compiler||this.Compiler;return vf("stringify",s),Py(r),s(r,i)}use(r,...l){const i=this.attachers,s=this.namespace;if(Sf("use",this.frozen),r!=null)if(typeof r=="function")p(r,l);else if(typeof r=="object")Array.isArray(r)?d(r):c(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function u(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[x,...y]=m;p(x,y)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))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");d(m.plugins),m.settings&&(s.settings=pf(!0,s.settings,m.settings))}function d(m){let x=-1;if(m!=null)if(Array.isArray(m))for(;++x<m.length;){const y=m[x];u(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,x){let y=-1,b=-1;for(;++y<i.length;)if(i[y][0]===m){b=y;break}if(b===-1)i.push([m,...x]);else if(x.length>0){let[S,...k]=x;const N=i[b][1];Jf(N)&&Jf(S)&&(S=pf(!0,N,S)),i[b]=[m,S,...k]}}}}const ij=new Od().freeze();function bf(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function vf(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Sf(t,r){if(r)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Py(t){if(!Jf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Xy(t,r,l){if(!l)throw new Error("`"+t+"` finished async. Use `"+r+"` instead")}function is(t){return oj(t)?t:new T0(t)}function oj(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function sj(t){return typeof t=="string"||uj(t)}function uj(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const cj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Qy=[],Ky={allowDangerousHtml:!0},fj=/^(https?|ircs?|mailto|xmpp)$/i,dj=[{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:"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 hj(t){const r=mj(t),l=pj(t);return gj(r.runSync(r.parse(l),l),t)}function mj(t){const r=t.rehypePlugins||Qy,l=t.remarkPlugins||Qy,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Ky}:Ky;return ij().use(PN).use(l).use(VE,i).use(r)}function pj(t){const r=t.children||"",l=new T0;return typeof r=="string"&&(l.value=r),l}function gj(t,r){const l=r.allowedElements,i=r.allowElement,s=r.components,u=r.disallowedElements,c=r.skipHtml,d=r.unwrapDisallowed,p=r.urlTransform||yj;for(const x of dj)Object.hasOwn(r,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+cj+x.id,void 0);return r.className&&(t={type:"element",tagName:"div",properties:{className:r.className},children:t.type==="root"?t.children:[t]}),zd(t,m),Mk(t,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function m(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 S;for(S in ff)if(Object.hasOwn(ff,S)&&Object.hasOwn(x.properties,S)){const k=x.properties[S],N=ff[S];(N===null||N.includes(x.tagName))&&(x.properties[S]=p(String(k||""),S,x))}}if(x.type==="element"){let S=l?!l.includes(x.tagName):u?u.includes(x.tagName):!1;if(!S&&i&&typeof y=="number"&&(S=!i(x,y,b)),S&&b&&typeof y=="number")return d&&x.children?b.children.splice(y,1,...x.children):b.children.splice(y,1),y}}}function yj(t){const r=t.indexOf(":"),l=t.indexOf("?"),i=t.indexOf("#"),s=t.indexOf("/");return r===-1||s!==-1&&r>s||l!==-1&&r>l||i!==-1&&r>i||fj.test(t.slice(0,r))?t:""}function Zy(t,r){const l=String(t);if(typeof r!="string")throw new TypeError("Expected character");let i=0,s=l.indexOf(r);for(;s!==-1;)i++,s=l.indexOf(r,s+r.length);return i}function xj(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bj(t,r,l){const s=Rs((l||{}).ignore||[]),u=vj(r);let c=-1;for(;++c<u.length;)j0(t,"text",d);function d(m,x){let y=-1,b;for(;++y<x.length;){const S=x[y],k=b?b.children:void 0;if(s(S,k?k.indexOf(S):void 0,b))return;b=S}if(b)return p(m,x)}function p(m,x){const y=x[x.length-1],b=u[c][0],S=u[c][1];let k=0;const T=y.children.indexOf(m);let j=!1,M=[];b.lastIndex=0;let z=b.exec(m.value);for(;z;){const F=z.index,P={index:z.index,input:z.input,stack:[...x,m]};let U=S(...z,P);if(typeof U=="string"&&(U=U.length>0?{type:"text",value:U}:void 0),U===!1?b.lastIndex=F+1:(k!==F&&M.push({type:"text",value:m.value.slice(k,F)}),Array.isArray(U)?M.push(...U):U&&M.push(U),k=F+z[0].length,j=!0),!b.global)break;z=b.exec(m.value)}return j?(k<m.value.length&&M.push({type:"text",value:m.value.slice(k)}),y.children.splice(T,1,...M)):M=[m],T+M.length}}function vj(t){const r=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<l.length;){const s=l[i];r.push([Sj(s[0]),wj(s[1])])}return r}function Sj(t){return typeof t=="string"?new RegExp(xj(t),"g"):t}function wj(t){return typeof t=="function"?t:function(){return t}}const wf="phrasing",kf=["autolink","link","image","label"];function kj(){return{transforms:[Mj],enter:{literalAutolink:Nj,literalAutolinkEmail:Cf,literalAutolinkHttp:Cf,literalAutolinkWww:Cf},exit:{literalAutolink:Aj,literalAutolinkEmail:Tj,literalAutolinkHttp:Ej,literalAutolinkWww:jj}}}function Cj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:wf,notInConstruct:kf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:wf,notInConstruct:kf},{character:":",before:"[ps]",after:"\\/",inConstruct:wf,notInConstruct:kf}]}}function Nj(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Cf(t){this.config.enter.autolinkProtocol.call(this,t)}function Ej(t){this.config.exit.autolinkProtocol.call(this,t)}function jj(t){this.config.exit.data.call(this,t);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(t)}function Tj(t){this.config.exit.autolinkEmail.call(this,t)}function Aj(t){this.exit(t)}function Mj(t){bj(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Dj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Rj]],{ignore:["link","linkReference"]})}function Dj(t,r,l,i,s){let u="";if(!A0(s)||(/^w/i.test(r)&&(l=r+l,r="",u="http://"),!zj(l)))return!1;const c=Oj(l+i);if(!c[0])return!1;const d={type:"link",title:null,url:u+r+c[0],children:[{type:"text",value:r+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function Rj(t,r,l,i){return!A0(i,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+l,children:[{type:"text",value:r+"@"+l}]}}function zj(t){const r=t.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function Oj(t){const r=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!r)return[t,void 0];t=t.slice(0,r.index);let l=r[0],i=l.indexOf(")");const s=Zy(t,"(");let u=Zy(t,")");for(;i!==-1&&s>u;)t+=l.slice(0,i+1),l=l.slice(i+1),i=l.indexOf(")"),u++;return[t,l]}function A0(t,r){const l=t.input.charCodeAt(t.index-1);return(t.index===0||gl(l)||As(l))&&(!r||l!==47)}M0.peek=$j;function _j(){this.buffer()}function Lj(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Uj(){this.buffer()}function Bj(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Hj(t){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Rn(this.sliceSerialize(t)).toLowerCase(),l.label=r}function qj(t){this.exit(t)}function Ij(t){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Rn(this.sliceSerialize(t)).toLowerCase(),l.label=r}function Vj(t){this.exit(t)}function $j(){return"["}function M0(t,r,l,i){const s=l.createTracker(i);let u=s.move("[^");const c=l.enter("footnoteReference"),d=l.enter("reference");return u+=s.move(l.safe(l.associationId(t),{after:"]",before:u})),d(),c(),u+=s.move("]"),u}function Fj(){return{enter:{gfmFootnoteCallString:_j,gfmFootnoteCall:Lj,gfmFootnoteDefinitionLabelString:Uj,gfmFootnoteDefinition:Bj},exit:{gfmFootnoteCallString:Hj,gfmFootnoteCall:qj,gfmFootnoteDefinitionLabelString:Ij,gfmFootnoteDefinition:Vj}}}function Yj(t){let r=!1;return t&&t.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:l,footnoteReference:M0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(i,s,u,c){const d=u.createTracker(c);let p=d.move("[^");const m=u.enter("footnoteDefinition"),x=u.enter("label");return p+=d.move(u.safe(u.associationId(i),{before:p,after:"]"})),x(),p+=d.move("]:"),i.children&&i.children.length>0&&(d.shift(4),p+=d.move((r?`
531
+ `:" ")+u.indentLines(u.containerFlow(i,d.current()),r?D0:Gj))),m(),p}}function Gj(t,r,l){return r===0?t:D0(t,r,l)}function D0(t,r,l){return(l?"":" ")+t}const Pj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];R0.peek=Jj;function Xj(){return{canContainEols:["delete"],enter:{strikethrough:Kj},exit:{strikethrough:Zj}}}function Qj(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Pj}],handlers:{delete:R0}}}function Kj(t){this.enter({type:"delete",children:[]},t)}function Zj(t){this.exit(t)}function R0(t,r,l,i){const s=l.createTracker(i),u=l.enter("strikethrough");let c=s.move("~~");return c+=l.containerPhrasing(t,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),u(),c}function Jj(){return"~"}function Wj(t){return t.length}function e4(t,r){const l=r||{},i=(l.align||[]).concat(),s=l.stringLength||Wj,u=[],c=[],d=[],p=[];let m=0,x=-1;for(;++x<t.length;){const N=[],T=[];let j=-1;for(t[x].length>m&&(m=t[x].length);++j<t[x].length;){const M=t4(t[x][j]);if(l.alignDelimiters!==!1){const z=s(M);T[j]=z,(p[j]===void 0||z>p[j])&&(p[j]=z)}N.push(M)}c[x]=N,d[x]=T}let y=-1;if(typeof i=="object"&&"length"in i)for(;++y<m;)u[y]=Jy(i[y]);else{const N=Jy(i);for(;++y<m;)u[y]=N}y=-1;const b=[],S=[];for(;++y<m;){const N=u[y];let T="",j="";N===99?(T=":",j=":"):N===108?T=":":N===114&&(j=":");let M=l.alignDelimiters===!1?1:Math.max(1,p[y]-T.length-j.length);const z=T+"-".repeat(M)+j;l.alignDelimiters!==!1&&(M=T.length+M+j.length,M>p[y]&&(p[y]=M),S[y]=M),b[y]=z}c.splice(1,0,b),d.splice(1,0,S),x=-1;const k=[];for(;++x<c.length;){const N=c[x],T=d[x];y=-1;const j=[];for(;++y<m;){const M=N[y]||"";let z="",F="";if(l.alignDelimiters!==!1){const P=p[y]-(T[y]||0),U=u[y];U===114?z=" ".repeat(P):U===99?P%2?(z=" ".repeat(P/2+.5),F=" ".repeat(P/2-.5)):(z=" ".repeat(P/2),F=z):F=" ".repeat(P)}l.delimiterStart!==!1&&!y&&j.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&M==="")&&(l.delimiterStart!==!1||y)&&j.push(" "),l.alignDelimiters!==!1&&j.push(z),j.push(M),l.alignDelimiters!==!1&&j.push(F),l.padding!==!1&&j.push(" "),(l.delimiterEnd!==!1||y!==m-1)&&j.push("|")}k.push(l.delimiterEnd===!1?j.join("").replace(/ +$/,""):j.join(""))}return k.join(`
532
+ `)}function t4(t){return t==null?"":String(t)}function Jy(t){const r=typeof t=="string"?t.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function n4(t,r,l,i){const s=l.enter("blockquote"),u=l.createTracker(i);u.move("> "),u.shift(2);const c=l.indentLines(l.containerFlow(t,u.current()),r4);return s(),c}function r4(t,r,l){return">"+(l?"":" ")+t}function l4(t,r){return Wy(t,r.inConstruct,!0)&&!Wy(t,r.notInConstruct,!1)}function Wy(t,r,l){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return l;let i=-1;for(;++i<r.length;)if(t.includes(r[i]))return!0;return!1}function ex(t,r,l,i){let s=-1;for(;++s<l.unsafe.length;)if(l.unsafe[s].character===`
533
+ `&&l4(l.stack,l.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
534
+ `}function a4(t,r){const l=String(t);let i=l.indexOf(r),s=i,u=0,c=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++u>c&&(c=u):u=1,s=i+r.length,i=l.indexOf(r,s);return c}function i4(t,r){return!!(r.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function o4(t){const r=t.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function s4(t,r,l,i){const s=o4(l),u=t.value||"",c=s==="`"?"GraveAccent":"Tilde";if(i4(t,l)){const y=l.enter("codeIndented"),b=l.indentLines(u,u4);return y(),b}const d=l.createTracker(i),p=s.repeat(Math.max(a4(u,s)+1,3)),m=l.enter("codeFenced");let x=d.move(p);if(t.lang){const y=l.enter(`codeFencedLang${c}`);x+=d.move(l.safe(t.lang,{before:x,after:" ",encode:["`"],...d.current()})),y()}if(t.lang&&t.meta){const y=l.enter(`codeFencedMeta${c}`);x+=d.move(" "),x+=d.move(l.safe(t.meta,{before:x,after:`
535
+ `,encode:["`"],...d.current()})),y()}return x+=d.move(`
536
+ `),u&&(x+=d.move(u+`
537
+ `)),x+=d.move(p),m(),x}function u4(t,r,l){return(l?"":" ")+t}function _d(t){const r=t.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function c4(t,r,l,i){const s=_d(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("definition");let d=l.enter("label");const p=l.createTracker(i);let m=p.move("[");return m+=p.move(l.safe(l.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=l.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(l.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=l.enter("destinationRaw"),m+=p.move(l.safe(t.url,{before:m,after:t.title?" ":`
538
+ `,...p.current()}))),d(),t.title&&(d=l.enter(`title${u}`),m+=p.move(" "+s),m+=p.move(l.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),d()),c(),m}function f4(t){const r=t.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Di(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Ss(t,r,l){const i=ga(t),s=ga(r);return i===void 0?s===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===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}}z0.peek=d4;function z0(t,r,l,i){const s=f4(l),u=l.enter("emphasis"),c=l.createTracker(i),d=c.move(s);let p=c.move(l.containerPhrasing(t,{after:s,before:d,...c.current()}));const m=p.charCodeAt(0),x=Ss(i.before.charCodeAt(i.before.length-1),m,s);x.inside&&(p=Di(m)+p.slice(1));const y=p.charCodeAt(p.length-1),b=Ss(i.after.charCodeAt(0),y,s);b.inside&&(p=p.slice(0,-1)+Di(y));const S=c.move(s);return u(),l.attentionEncodeSurroundingInfo={after:b.outside,before:x.outside},d+p+S}function d4(t,r,l){return l.options.emphasis||"*"}function h4(t,r){let l=!1;return zd(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return l=!0,Kf}),!!((!t.depth||t.depth<3)&&Ed(t)&&(r.options.setext||l))}function m4(t,r,l,i){const s=Math.max(Math.min(6,t.depth||1),1),u=l.createTracker(i);if(h4(t,l)){const x=l.enter("headingSetext"),y=l.enter("phrasing"),b=l.containerPhrasing(t,{...u.current(),before:`
539
+ `,after:`
540
+ `});return y(),x(),b+`
541
+ `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
542
+ `))+1))}const c="#".repeat(s),d=l.enter("headingAtx"),p=l.enter("phrasing");u.move(c+" ");let m=l.containerPhrasing(t,{before:"# ",after:`
543
+ `,...u.current()});return/^[\t ]/.test(m)&&(m=Di(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,l.options.closeAtx&&(m+=" "+c),p(),d(),m}O0.peek=p4;function O0(t){return t.value||""}function p4(){return"<"}_0.peek=g4;function _0(t,r,l,i){const s=_d(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("image");let d=l.enter("label");const p=l.createTracker(i);let m=p.move("![");return m+=p.move(l.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=l.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(l.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=l.enter("destinationRaw"),m+=p.move(l.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),d(),t.title&&(d=l.enter(`title${u}`),m+=p.move(" "+s),m+=p.move(l.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),d()),m+=p.move(")"),c(),m}function g4(){return"!"}L0.peek=y4;function L0(t,r,l,i){const s=t.referenceType,u=l.enter("imageReference");let c=l.enter("label");const d=l.createTracker(i);let p=d.move("![");const m=l.safe(t.alt,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const x=l.stack;l.stack=[],c=l.enter("reference");const y=l.safe(l.associationId(t),{before:p,after:"]",...d.current()});return c(),l.stack=x,u(),s==="full"||!m||m!==y?p+=d.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function y4(){return"!"}U0.peek=x4;function U0(t,r,l){let i=t.value||"",s="`",u=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++u<l.unsafe.length;){const c=l.unsafe[u],d=l.compilePattern(c);let p;if(c.atBreak)for(;p=d.exec(i);){let m=p.index;i.charCodeAt(m)===10&&i.charCodeAt(m-1)===13&&m--,i=i.slice(0,m)+" "+i.slice(p.index+1)}}return s+i+s}function x4(){return"`"}function B0(t,r){const l=Ed(t);return!!(!r.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(l===t.url||"mailto:"+l===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}H0.peek=b4;function H0(t,r,l,i){const s=_d(l),u=s==='"'?"Quote":"Apostrophe",c=l.createTracker(i);let d,p;if(B0(t,l)){const x=l.stack;l.stack=[],d=l.enter("autolink");let y=c.move("<");return y+=c.move(l.containerPhrasing(t,{before:y,after:">",...c.current()})),y+=c.move(">"),d(),l.stack=x,y}d=l.enter("link"),p=l.enter("label");let m=c.move("[");return m+=c.move(l.containerPhrasing(t,{before:m,after:"](",...c.current()})),m+=c.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=l.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(l.safe(t.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(p=l.enter("destinationRaw"),m+=c.move(l.safe(t.url,{before:m,after:t.title?" ":")",...c.current()}))),p(),t.title&&(p=l.enter(`title${u}`),m+=c.move(" "+s),m+=c.move(l.safe(t.title,{before:m,after:s,...c.current()})),m+=c.move(s),p()),m+=c.move(")"),d(),m}function b4(t,r,l){return B0(t,l)?"<":"["}q0.peek=v4;function q0(t,r,l,i){const s=t.referenceType,u=l.enter("linkReference");let c=l.enter("label");const d=l.createTracker(i);let p=d.move("[");const m=l.containerPhrasing(t,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const x=l.stack;l.stack=[],c=l.enter("reference");const y=l.safe(l.associationId(t),{before:p,after:"]",...d.current()});return c(),l.stack=x,u(),s==="full"||!m||m!==y?p+=d.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function v4(){return"["}function Ld(t){const r=t.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function S4(t){const r=Ld(t),l=t.options.bulletOther;if(!l)return r==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+l+"`) to be different");return l}function w4(t){const r=t.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function I0(t){const r=t.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function k4(t,r,l,i){const s=l.enter("list"),u=l.bulletCurrent;let c=t.ordered?w4(l):Ld(l);const d=t.ordered?c==="."?")":".":S4(l);let p=r&&l.bulletLastUsed?c===l.bulletLastUsed:!1;if(!t.ordered){const x=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&x&&(!x.children||!x.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(p=!0),I0(l)===c&&x){let y=-1;for(;++y<t.children.length;){const b=t.children[y];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=d),l.bulletCurrent=c;const m=l.containerFlow(t,i);return l.bulletLastUsed=c,l.bulletCurrent=u,s(),m}function C4(t){const r=t.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function N4(t,r,l,i){const s=C4(l);let u=l.bulletCurrent||Ld(l);r&&r.type==="list"&&r.ordered&&(u=(typeof r.start=="number"&&r.start>-1?r.start:1)+(l.options.incrementListMarker===!1?0:r.children.indexOf(t))+u);let c=u.length+1;(s==="tab"||s==="mixed"&&(r&&r.type==="list"&&r.spread||t.spread))&&(c=Math.ceil(c/4)*4);const d=l.createTracker(i);d.move(u+" ".repeat(c-u.length)),d.shift(c);const p=l.enter("listItem"),m=l.indentLines(l.containerFlow(t,d.current()),x);return p(),m;function x(y,b,S){return b?(S?"":" ".repeat(c))+y:(S?u:u+" ".repeat(c-u.length))+y}}function E4(t,r,l,i){const s=l.enter("paragraph"),u=l.enter("phrasing"),c=l.containerPhrasing(t,i);return u(),s(),c}const j4=Rs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function T4(t,r,l,i){return(t.children.some(function(c){return j4(c)})?l.containerPhrasing:l.containerFlow).call(l,t,i)}function A4(t){const r=t.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}V0.peek=M4;function V0(t,r,l,i){const s=A4(l),u=l.enter("strong"),c=l.createTracker(i),d=c.move(s+s);let p=c.move(l.containerPhrasing(t,{after:s,before:d,...c.current()}));const m=p.charCodeAt(0),x=Ss(i.before.charCodeAt(i.before.length-1),m,s);x.inside&&(p=Di(m)+p.slice(1));const y=p.charCodeAt(p.length-1),b=Ss(i.after.charCodeAt(0),y,s);b.inside&&(p=p.slice(0,-1)+Di(y));const S=c.move(s+s);return u(),l.attentionEncodeSurroundingInfo={after:b.outside,before:x.outside},d+p+S}function M4(t,r,l){return l.options.strong||"*"}function D4(t,r,l,i){return l.safe(t.value,i)}function R4(t){const r=t.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function z4(t,r,l){const i=(I0(l)+(l.options.ruleSpaces?" ":"")).repeat(R4(l));return l.options.ruleSpaces?i.slice(0,-1):i}const $0={blockquote:n4,break:ex,code:s4,definition:c4,emphasis:z0,hardBreak:ex,heading:m4,html:O0,image:_0,imageReference:L0,inlineCode:U0,link:H0,linkReference:q0,list:k4,listItem:N4,paragraph:E4,root:T4,strong:V0,text:D4,thematicBreak:z4};function O4(){return{enter:{table:_4,tableData:tx,tableHeader:tx,tableRow:U4},exit:{codeText:B4,table:L4,tableData:Nf,tableHeader:Nf,tableRow:Nf}}}function _4(t){const r=t._align;this.enter({type:"table",align:r.map(function(l){return l==="none"?null:l}),children:[]},t),this.data.inTable=!0}function L4(t){this.exit(t),this.data.inTable=void 0}function U4(t){this.enter({type:"tableRow",children:[]},t)}function Nf(t){this.exit(t)}function tx(t){this.enter({type:"tableCell",children:[]},t)}function B4(t){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,H4));const l=this.stack[this.stack.length-1];l.type,l.value=r,this.exit(t)}function H4(t,r){return r==="|"?r:t}function q4(t){const r=t||{},l=r.tableCellPadding,i=r.tablePipeAlign,s=r.stringLength,u=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
544
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:p,tableRow:d}};function c(S,k,N,T){return m(x(S,N,T),S.align)}function d(S,k,N,T){const j=y(S,N,T),M=m([j]);return M.slice(0,M.indexOf(`
545
+ `))}function p(S,k,N,T){const j=N.enter("tableCell"),M=N.enter("phrasing"),z=N.containerPhrasing(S,{...T,before:u,after:u});return M(),j(),z}function m(S,k){return e4(S,{align:k,alignDelimiters:i,padding:l,stringLength:s})}function x(S,k,N){const T=S.children;let j=-1;const M=[],z=k.enter("table");for(;++j<T.length;)M[j]=y(T[j],k,N);return z(),M}function y(S,k,N){const T=S.children;let j=-1;const M=[],z=k.enter("tableRow");for(;++j<T.length;)M[j]=p(T[j],S,k,N);return z(),M}function b(S,k,N){let T=$0.inlineCode(S,k,N);return N.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function I4(){return{exit:{taskListCheckValueChecked:nx,taskListCheckValueUnchecked:nx,paragraph:$4}}}function V4(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:F4}}}function nx(t){const r=this.stack[this.stack.length-2];r.type,r.checked=t.type==="taskListCheckValueChecked"}function $4(t){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const i=l.children[0];if(i&&i.type==="text"){const s=r.children;let u=-1,c;for(;++u<s.length;){const d=s[u];if(d.type==="paragraph"){c=d;break}}c===l&&(i.value=i.value.slice(1),i.value.length===0?l.children.shift():l.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,l.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function F4(t,r,l,i){const s=t.children[0],u=typeof t.checked=="boolean"&&s&&s.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=l.createTracker(i);u&&d.move(c);let p=$0.listItem(t,r,l,{...i,...d.current()});return u&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(x){return x+c}}function Y4(){return[kj(),Fj(),Xj(),O4(),I4()]}function G4(t){return{extensions:[Cj(),Yj(t),Qj(),q4(t),V4()]}}const P4={tokenize:W4,partial:!0},F0={tokenize:e3,partial:!0},Y0={tokenize:t3,partial:!0},G0={tokenize:n3,partial:!0},X4={tokenize:r3,partial:!0},P0={name:"wwwAutolink",tokenize:Z4,previous:Q0},X0={name:"protocolAutolink",tokenize:J4,previous:K0},ur={name:"emailAutolink",tokenize:K4,previous:Z0},Vn={};function Q4(){return{text:Vn}}let fl=48;for(;fl<123;)Vn[fl]=ur,fl++,fl===58?fl=65:fl===91&&(fl=97);Vn[43]=ur;Vn[45]=ur;Vn[46]=ur;Vn[95]=ur;Vn[72]=[ur,X0];Vn[104]=[ur,X0];Vn[87]=[ur,P0];Vn[119]=[ur,P0];function K4(t,r,l){const i=this;let s,u;return c;function c(y){return!ed(y)||!Z0.call(i,i.previous)||Ud(i.events)?l(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(y))}function d(y){return ed(y)?(t.consume(y),d):y===64?(t.consume(y),p):l(y)}function p(y){return y===46?t.check(X4,x,m)(y):y===45||y===95||It(y)?(u=!0,t.consume(y),p):x(y)}function m(y){return t.consume(y),s=!0,p}function x(y){return u&&s&&Gt(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),r(y)):l(y)}}function Z4(t,r,l){const i=this;return s;function s(c){return c!==87&&c!==119||!Q0.call(i,i.previous)||Ud(i.events)?l(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(P4,t.attempt(F0,t.attempt(Y0,u),l),l)(c))}function u(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),r(c)}}function J4(t,r,l){const i=this;let s="",u=!1;return c;function c(y){return(y===72||y===104)&&K0.call(i,i.previous)&&!Ud(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),d):l(y)}function d(y){if(Gt(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),d;if(y===58){const b=s.toLowerCase();if(b==="http"||b==="https")return t.consume(y),p}return l(y)}function p(y){return y===47?(t.consume(y),u?m:(u=!0,p)):l(y)}function m(y){return y===null||xs(y)||ot(y)||gl(y)||As(y)?l(y):t.attempt(F0,t.attempt(Y0,x),l)(y)}function x(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),r(y)}}function W4(t,r,l){let i=0;return s;function s(c){return(c===87||c===119)&&i<3?(i++,t.consume(c),s):c===46&&i===3?(t.consume(c),u):l(c)}function u(c){return c===null?l(c):r(c)}}function e3(t,r,l){let i,s,u;return c;function c(m){return m===46||m===95?t.check(G0,p,d)(m):m===null||ot(m)||gl(m)||m!==45&&As(m)?p(m):(u=!0,t.consume(m),c)}function d(m){return m===95?i=!0:(s=i,i=void 0),t.consume(m),c}function p(m){return s||i||!u?l(m):r(m)}}function t3(t,r){let l=0,i=0;return s;function s(c){return c===40?(l++,t.consume(c),s):c===41&&i<l?u(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?t.check(G0,r,u)(c):c===null||ot(c)||gl(c)?r(c):(t.consume(c),s)}function u(c){return c===41&&i++,t.consume(c),s}}function n3(t,r,l){return i;function i(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(t.consume(d),i):d===38?(t.consume(d),u):d===93?(t.consume(d),s):d===60||d===null||ot(d)||gl(d)?r(d):l(d)}function s(d){return d===null||d===40||d===91||ot(d)||gl(d)?r(d):i(d)}function u(d){return Gt(d)?c(d):l(d)}function c(d){return d===59?(t.consume(d),i):Gt(d)?(t.consume(d),c):l(d)}}function r3(t,r,l){return i;function i(u){return t.consume(u),s}function s(u){return It(u)?l(u):r(u)}}function Q0(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ot(t)}function K0(t){return!Gt(t)}function Z0(t){return!(t===47||ed(t))}function ed(t){return t===43||t===45||t===46||t===95||It(t)}function Ud(t){let r=t.length,l=!1;for(;r--;){const i=t[r][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){l=!0;break}if(i._gfmAutolinkLiteralWalkedInto){l=!1;break}}return t.length>0&&!l&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const l3={tokenize:d3,partial:!0};function a3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:u3,continuation:{tokenize:c3},exit:f3}},text:{91:{name:"gfmFootnoteCall",tokenize:s3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:i3,resolveTo:o3}}}}function i3(t,r,l){const i=this;let s=i.events.length;const u=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;s--;){const p=i.events[s][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return d;function d(p){if(!c||!c._balanced)return l(p);const m=Rn(i.sliceSerialize({start:c.end,end:i.now()}));return m.codePointAt(0)!==94||!u.includes(m.slice(1))?l(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),r(p))}}function o3(t,r){let l=t.length;for(;l--;)if(t[l][1].type==="labelImage"&&t[l][0]==="enter"){t[l][1];break}t[l+1][1].type="data",t[l+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[l+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[l+3][1].end),end:Object.assign({},t[l+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},d=[t[l+1],t[l+2],["enter",i,r],t[l+3],t[l+4],["enter",s,r],["exit",s,r],["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r],t[t.length-2],t[t.length-1],["exit",i,r]];return t.splice(l,t.length-l+1,...d),t}function s3(t,r,l){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u=0,c;return d;function d(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?l(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(y){if(u>999||y===93&&!c||y===null||y===91||ot(y))return l(y);if(y===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return s.includes(Rn(i.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),r):l(y)}return ot(y)||(c=!0),u++,t.consume(y),y===92?x:m}function x(y){return y===91||y===92||y===93?(t.consume(y),u++,m):m(y)}}function u3(t,r,l){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u,c=0,d;return p;function p(k){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(k){return k===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",x):l(k)}function x(k){if(c>999||k===93&&!d||k===null||k===91||ot(k))return l(k);if(k===93){t.exit("chunkString");const N=t.exit("gfmFootnoteDefinitionLabelString");return u=Rn(i.sliceSerialize(N)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return ot(k)||(d=!0),c++,t.consume(k),k===92?y:x}function y(k){return k===91||k===92||k===93?(t.consume(k),c++,x):x(k)}function b(k){return k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),s.includes(u)||s.push(u),Xe(t,S,"gfmFootnoteDefinitionWhitespace")):l(k)}function S(k){return r(k)}}function c3(t,r,l){return t.check(_i,r,t.attempt(l3,r,l))}function f3(t){t.exit("gfmFootnoteDefinition")}function d3(t,r,l){const i=this;return Xe(t,s,"gfmFootnoteDefinitionIndent",5);function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?r(u):l(u)}}function h3(t){let l=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:u,resolveAll:s};return l==null&&(l=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(c,d){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},y={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},b=[["enter",x,d],["enter",c[m][1],d],["exit",c[m][1],d],["enter",y,d]],S=d.parser.constructs.insideSpan.null;S&&mn(b,b.length,0,Ms(S,c.slice(m+1,p),d)),mn(b,b.length,0,[["exit",y,d],["enter",c[p][1],d],["exit",c[p][1],d],["exit",x,d]]),mn(c,m-1,p-m+3,b),p=m+b.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function u(c,d,p){const m=this.previous,x=this.events;let y=0;return b;function b(k){return m===126&&x[x.length-1][1].type!=="characterEscape"?p(k):(c.enter("strikethroughSequenceTemporary"),S(k))}function S(k){const N=ga(m);if(k===126)return y>1?p(k):(c.consume(k),y++,S);if(y<2&&!l)return p(k);const T=c.exit("strikethroughSequenceTemporary"),j=ga(k);return T._open=!j||j===2&&!!N,T._close=!N||N===2&&!!j,d(k)}}}class m3{constructor(){this.map=[]}add(r,l,i){p3(this,r,l,i)}consume(r){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let l=this.map.length;const i=[];for(;l>0;)l-=1,i.push(r.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),r.length=this.map[l][0];i.push(r.slice()),r.length=0;let s=i.pop();for(;s;){for(const u of s)r.push(u);s=i.pop()}this.map.length=0}}function p3(t,r,l,i){let s=0;if(!(l===0&&i.length===0)){for(;s<t.map.length;){if(t.map[s][0]===r){t.map[s][1]+=l,t.map[s][2].push(...i);return}s+=1}t.map.push([r,l,i])}}function g3(t,r){let l=!1;const i=[];for(;r<t.length;){const s=t[r];if(l){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(t[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[r-1][1].type==="tableDelimiterMarker"){const u=i.length-1;i[u]=i[u]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(l=!0);r+=1}return i}function y3(){return{flow:{null:{name:"table",tokenize:x3,resolveAll:b3}}}}function x3(t,r,l){const i=this;let s=0,u=0,c;return d;function d(B){let X=i.events.length-1;for(;X>-1;){const oe=i.events[X][1].type;if(oe==="lineEnding"||oe==="linePrefix")X--;else break}const Q=X>-1?i.events[X][1].type:null,de=Q==="tableHead"||Q==="tableRow"?U:p;return de===U&&i.parser.lazy[i.now().line]?l(B):de(B)}function p(B){return t.enter("tableHead"),t.enter("tableRow"),m(B)}function m(B){return B===124||(c=!0,u+=1),x(B)}function x(B){return B===null?l(B):Ee(B)?u>1?(u=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(B),t.exit("lineEnding"),S):l(B):He(B)?Xe(t,x,"whitespace")(B):(u+=1,c&&(c=!1,s+=1),B===124?(t.enter("tableCellDivider"),t.consume(B),t.exit("tableCellDivider"),c=!0,x):(t.enter("data"),y(B)))}function y(B){return B===null||B===124||ot(B)?(t.exit("data"),x(B)):(t.consume(B),B===92?b:y)}function b(B){return B===92||B===124?(t.consume(B),y):y(B)}function S(B){return i.interrupt=!1,i.parser.lazy[i.now().line]?l(B):(t.enter("tableDelimiterRow"),c=!1,He(B)?Xe(t,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):k(B))}function k(B){return B===45||B===58?T(B):B===124?(c=!0,t.enter("tableCellDivider"),t.consume(B),t.exit("tableCellDivider"),N):P(B)}function N(B){return He(B)?Xe(t,T,"whitespace")(B):T(B)}function T(B){return B===58?(u+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(B),t.exit("tableDelimiterMarker"),j):B===45?(u+=1,j(B)):B===null||Ee(B)?F(B):P(B)}function j(B){return B===45?(t.enter("tableDelimiterFiller"),M(B)):P(B)}function M(B){return B===45?(t.consume(B),M):B===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(B),t.exit("tableDelimiterMarker"),z):(t.exit("tableDelimiterFiller"),z(B))}function z(B){return He(B)?Xe(t,F,"whitespace")(B):F(B)}function F(B){return B===124?k(B):B===null||Ee(B)?!c||s!==u?P(B):(t.exit("tableDelimiterRow"),t.exit("tableHead"),r(B)):P(B)}function P(B){return l(B)}function U(B){return t.enter("tableRow"),G(B)}function G(B){return B===124?(t.enter("tableCellDivider"),t.consume(B),t.exit("tableCellDivider"),G):B===null||Ee(B)?(t.exit("tableRow"),r(B)):He(B)?Xe(t,G,"whitespace")(B):(t.enter("data"),le(B))}function le(B){return B===null||B===124||ot(B)?(t.exit("data"),G(B)):(t.consume(B),B===92?se:le)}function se(B){return B===92||B===124?(t.consume(B),le):le(B)}}function b3(t,r){let l=-1,i=!0,s=0,u=[0,0,0,0],c=[0,0,0,0],d=!1,p=0,m,x,y;const b=new m3;for(;++l<t.length;){const S=t[l],k=S[1];S[0]==="enter"?k.type==="tableHead"?(d=!1,p!==0&&(rx(b,r,p,m,x),x=void 0,p=0),m={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(l,0,[["enter",m,r]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,y=void 0,u=[0,0,0,0],c=[0,l+1,0,0],d&&(d=!1,x={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(l,0,[["enter",x,r]])),s=k.type==="tableDelimiterRow"?2:x?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],y=os(b,r,u,s,void 0,y),u=[0,0,0,0]),c[2]=l)):k.type==="tableCellDivider"&&(i?i=!1:(u[1]!==0&&(c[0]=c[1],y=os(b,r,u,s,void 0,y)),u=c,c=[u[1],l,0,0])):k.type==="tableHead"?(d=!0,p=l):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=l,u[1]!==0?(c[0]=c[1],y=os(b,r,u,s,l,y)):c[1]!==0&&(y=os(b,r,c,s,l,y)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=l)}for(p!==0&&rx(b,r,p,m,x),b.consume(r.events),l=-1;++l<r.events.length;){const S=r.events[l];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=g3(r.events,l))}return t}function os(t,r,l,i,s,u){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";l[0]!==0&&(u.end=Object.assign({},ua(r.events,l[0])),t.add(l[0],0,[["exit",u,r]]));const p=ua(r.events,l[1]);if(u={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(l[1],0,[["enter",u,r]]),l[2]!==0){const m=ua(r.events,l[2]),x=ua(r.events,l[3]),y={type:d,start:Object.assign({},m),end:Object.assign({},x)};if(t.add(l[2],0,[["enter",y,r]]),i!==2){const b=r.events[l[2]],S=r.events[l[3]];if(b[1].end=Object.assign({},S[1].end),b[1].type="chunkText",b[1].contentType="text",l[3]>l[2]+1){const k=l[2]+1,N=l[3]-l[2]-1;t.add(k,N,[])}}t.add(l[3]+1,0,[["exit",y,r]])}return s!==void 0&&(u.end=Object.assign({},ua(r.events,s)),t.add(s,0,[["exit",u,r]]),u=void 0),u}function rx(t,r,l,i,s){const u=[],c=ua(r.events,l);s&&(s.end=Object.assign({},c),u.push(["exit",s,r])),i.end=Object.assign({},c),u.push(["exit",i,r]),t.add(l+1,0,u)}function ua(t,r){const l=t[r],i=l[0]==="enter"?"start":"end";return l[1][i]}const v3={name:"tasklistCheck",tokenize:w3};function S3(){return{text:{91:v3}}}function w3(t,r,l){const i=this;return s;function s(p){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?l(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),u)}function u(p){return ot(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),c):l(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):l(p)}function d(p){return Ee(p)?r(p):He(p)?t.check({tokenize:k3},r,l)(p):l(p)}}function k3(t,r,l){return Xe(t,i,"whitespace");function i(s){return s===null?l(s):r(s)}}function C3(t){return s0([Q4(),a3(),h3(t),y3(),S3()])}const N3={};function E3(t){const r=this,l=t||N3,i=r.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(C3(l)),u.push(Y4()),c.push(G4(l))}function J0({oldText:t,newText:r,caption:l}){const i=w.useMemo(()=>j3(t,r),[t,r]);if(i===null)return h.jsx("div",{className:"text-xs text-muted-foreground italic px-3 py-2",children:"Diff omitted (file too large to render inline)."});const s=i.filter(c=>c.kind==="add").length,u=i.filter(c=>c.kind==="del").length;return h.jsxs("div",{className:"rounded-lg border bg-background/40 overflow-hidden text-xs",children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b bg-muted/40",children:[h.jsx("span",{className:"font-mono text-muted-foreground truncate",children:l??"diff"}),h.jsxs("span",{className:"font-mono shrink-0",children:[h.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["+",s]}),h.jsx("span",{className:"text-muted-foreground mx-1",children:"·"}),h.jsxs("span",{className:"text-rose-600 dark:text-rose-400",children:["-",u]})]})]}),h.jsx("div",{className:"font-mono leading-relaxed max-h-96 overflow-auto",children:i.map((c,d)=>h.jsxs("div",{className:me("flex",c.kind==="add"&&"bg-emerald-500/10",c.kind==="del"&&"bg-rose-500/10"),children:[h.jsx("span",{className:me("w-6 shrink-0 text-center select-none",c.kind==="add"&&"text-emerald-600 dark:text-emerald-400",c.kind==="del"&&"text-rose-600 dark:text-rose-400",c.kind==="ctx"&&"text-muted-foreground/40"),children:c.kind==="add"?"+":c.kind==="del"?"-":" "}),h.jsx("pre",{className:me("whitespace-pre-wrap break-all flex-1 px-2",c.kind==="ctx"&&"text-muted-foreground/70"),children:c.text||" "})]},d))})]})}const lx=5e3;function j3(t,r){const l=t.split(`
546
+ `),i=r.split(`
547
+ `);if(l.length>lx||i.length>lx)return null;const s=l.length,u=i.length,c=Array.from({length:s+1},()=>new Array(u+1).fill(0));for(let x=s-1;x>=0;x--)for(let y=u-1;y>=0;y--)l[x]===i[y]?c[x][y]=c[x+1][y+1]+1:c[x][y]=Math.max(c[x+1][y],c[x][y+1]);const d=[];let p=0,m=0;for(;p<s&&m<u;)l[p]===i[m]?(d.push({kind:"ctx",text:l[p]}),p++,m++):c[p+1][m]>=c[p][m+1]?(d.push({kind:"del",text:l[p]}),p++):(d.push({kind:"add",text:i[m]}),m++);for(;p<s;)d.push({kind:"del",text:l[p++]});for(;m<u;)d.push({kind:"add",text:i[m++]});return d}function W0(t,r){if(!t||typeof r!="object"||r===null)return null;const l=r,i=String(l.file_path??l.path??"");switch(t){case"edit":case"str_replace":case"edit_file":{const s=typeof l.old_string=="string"?l.old_string:"",u=typeof l.new_string=="string"?l.new_string:"";return!s&&!u?null:{oldText:s,newText:u,caption:`edit ${i}`}}case"write":case"write_file":case"create_file":return{oldText:"",newText:typeof l.content=="string"?l.content:"",caption:`write ${i} (new)`};default:return null}}const T3=25,Ef=12;function jf({text:t,isError:r,className:l,wrapClass:i,showLineNumbers:s}){const u=w.useMemo(()=>t.split(`
548
+ `),[t]),c=u.length>T3,[d,p]=w.useState(!c),m=d?t:u.slice(0,Ef).join(`
549
+ `),x=!!s&&c&&d;return h.jsxs("div",{className:me("rounded-md border bg-background/40 overflow-hidden",l),children:[x?h.jsxs("div",{className:"flex max-h-96 overflow-auto",children:[h.jsx("pre",{"aria-hidden":!0,className:"text-xs font-mono leading-[1.4] py-2 pl-2 pr-2 text-muted-foreground/50 select-none border-r border-border/40 bg-muted/20 tabular-nums text-right whitespace-pre shrink-0",children:u.map((y,b)=>`${b+1}`).join(`
550
+ `)}),h.jsx("pre",{className:me("text-xs font-mono leading-[1.4] py-2 px-2 flex-1 whitespace-pre",r?"text-destructive":"text-foreground"),children:m})]}):h.jsx("pre",{className:me("text-xs font-mono p-2 max-h-96 overflow-auto",i,r?"text-destructive":"text-foreground"),children:m}),c&&h.jsx("button",{type:"button",onClick:()=>p(y=>!y),className:"w-full flex items-center justify-center gap-1 px-2 py-1 border-t bg-muted/30 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:d?h.jsxs(h.Fragment,{children:[h.jsx(Ow,{className:"h-3 w-3"}),"Collapse to first ",Ef," lines"]}):h.jsxs(h.Fragment,{children:[h.jsx(zw,{className:"h-3 w-3"}),"Show all ",u.length," lines (",u.length-Ef," more)"]})})]})}function A3({toolName:t,result:r,isError:l,className:i}){const s=w.useMemo(()=>M3(t,r),[t,r]);return s.kind==="json"?h.jsx(D3,{value:s.value,isError:l,className:i}):s.kind==="numbered"?h.jsx(jf,{text:r,isError:l,className:i,wrapClass:"whitespace-pre"}):s.kind==="bash"?h.jsxs("div",{className:me("rounded-md border bg-background/40 overflow-hidden",i),children:[s.stdout&&h.jsx(jf,{text:s.stdout,isError:l,className:"border-0 rounded-none bg-transparent",wrapClass:"whitespace-pre-wrap break-all",showLineNumbers:!0}),(s.exitCode!==void 0||s.duration)&&h.jsxs("div",{className:me("flex items-center gap-3 text-[11px] px-2 py-1 border-t bg-muted/30 tabular-nums",s.exitCode&&s.exitCode!==0?"text-destructive":"text-muted-foreground"),children:[s.exitCode!==void 0&&h.jsxs("span",{children:["exit code: ",h.jsx("span",{className:"font-mono",children:s.exitCode})]}),s.duration&&h.jsx("span",{children:s.duration})]})]}):h.jsx(jf,{text:r,isError:l,className:i,wrapClass:"whitespace-pre-wrap break-all",showLineNumbers:!0})}function M3(t,r){const l=r.trim();if(/^\s*\d+→/m.test(r.slice(0,200)))return{kind:"numbered"};if(l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]"))try{const c=JSON.parse(l);if(typeof c=="object"&&c!==null)return{kind:"json",value:c}}catch{}const i=!!t&&/^(bash|shell|exec|run)/i.test(t),s=r.match(/(?:^|\n)\s*(?:\[?exit(?:\s*code)?\]?\s*[:=]?\s*)(\d+)\s*$/i),u=r.match(/(?:^|\s)(\d+\s*ms|\d+\.\d+s)\s*$/i);if(i||s){let c=r;return s&&(c=r.slice(0,s.index).trimEnd()),{kind:"bash",stdout:c,exitCode:s?Number(s[1]):void 0,duration:u==null?void 0:u[1]}}return{kind:"plain"}}function D3({value:t,isError:r,className:l}){const i=w.useMemo(()=>{try{return JSON.stringify(t,null,2)}catch{return String(t)}},[t]),s=i.split(`
551
+ `).length,[u,c]=w.useState(s<30);return h.jsxs("div",{className:me("rounded-md border bg-background/40 overflow-hidden",r&&"border-destructive/40",l),children:[h.jsxs("button",{type:"button",onClick:()=>c(d=>!d),className:"w-full flex items-center justify-between px-2 py-1 border-b bg-muted/30 text-[11px] text-muted-foreground hover:text-foreground",children:[h.jsxs("span",{className:"flex items-center gap-1",children:[u?h.jsx(js,{className:"h-3 w-3"}):h.jsx(ud,{className:"h-3 w-3"}),h.jsxs("span",{className:"font-mono",children:["JSON · ",s," lines"]})]}),h.jsx("span",{children:u?"collapse":"expand"})]}),u&&h.jsx("pre",{className:me("text-xs font-mono whitespace-pre p-2 max-h-96 overflow-auto",r?"text-destructive":"text-foreground"),children:i})]})}async function R3(t){var r;try{if(typeof navigator<"u"&&((r=navigator.clipboard)!=null&&r.writeText))return await navigator.clipboard.writeText(t),!0}catch{}try{const l=document.createElement("textarea");l.value=t,l.style.position="fixed",l.style.opacity="0",document.body.appendChild(l),l.select();const i=document.execCommand("copy");return document.body.removeChild(l),i}catch{return!1}}const z3={code({inline:t,className:r,children:l,...i}){const s=/language-(\w+)/.exec(r??""),u=String(l??"").replace(/\n$/,"");return t||!s?h.jsx("code",{className:me("rounded bg-muted/60 px-1.5 py-0.5 text-[0.85em] font-mono",r),...i,children:l}):h.jsxs("div",{className:"not-prose relative my-3 rounded-lg border bg-muted/30 overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b bg-muted/40 text-xs",children:[h.jsx("span",{className:"font-mono text-muted-foreground",children:s[1]}),h.jsx(td,{text:u,label:""})]}),h.jsx("pre",{className:"overflow-x-auto p-3 text-xs leading-relaxed font-mono max-h-[40rem]",children:h.jsx("code",{children:u})})]})}};function td({text:t,className:r,label:l="Copy"}){const[i,s]=w.useState(!1);return h.jsx("button",{type:"button",onClick:async u=>{u.stopPropagation(),await R3(t)&&(s(!0),setTimeout(()=>s(!1),1400))},className:me("inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",r),title:l,children:i?h.jsxs(h.Fragment,{children:[h.jsx(_x,{className:"h-3 w-3 text-green-500"}),h.jsx("span",{children:"Copied"})]}):h.jsxs(h.Fragment,{children:[h.jsx(Hw,{className:"h-3 w-3"}),h.jsx("span",{children:l})]})})}function O3(t,r){if(typeof document>"u")return;const l=new Blob([r],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(l),s=document.createElement("a");s.href=i,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(()=>URL.revokeObjectURL(i),1e3)}function _3(t){const r=(t??"").toLowerCase();return/bash|shell|exec|run/.test(r)?"log":(/grep|search|find/.test(r),"txt")}function L3(t){const r=t.split(`
552
+ `);for(let l=0;l<r.length;l++){const i=r[l];if(/^\s*at\s+\S+.*\(.*:\d+:\d+\)\s*$/.test(i)||/^\s*at\s+\S+\.\S+\(\S+\.java:\d+\)\s*$/.test(i)||/^\s+File "[^"]+", line \d+/.test(i))return l}return-1}function U3({text:t}){const r=L3(t),[l,i]=w.useState(!1);if(r===-1)return h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-xs leading-relaxed",children:t});const s=t.split(`
553
+ `),u=s.slice(0,r).join(`
554
+ `).trim(),c=s.slice(r).join(`
555
+ `),d=c.split(`
556
+ `).filter(p=>p.trim().length>0).length;return h.jsxs("div",{className:"space-y-2",children:[u&&h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-xs leading-relaxed",children:u}),h.jsxs("button",{type:"button",onClick:()=>i(p=>!p),className:"inline-flex items-center gap-1 text-xs text-destructive hover:text-destructive/80 font-medium",children:[l?"▾":"▸"," ",l?"Hide":"Show"," stack trace (",d," frame",d===1?"":"s",")"]}),l&&h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[11px] leading-snug bg-destructive/5 border border-destructive/20 rounded p-2 max-h-80 overflow-auto",children:c})]})}function B3({input:t}){const[r,l]=w.useState({});if(t==null||typeof t!="object"||Array.isArray(t))return h.jsx("pre",{className:"whitespace-pre-wrap break-all text-xs font-mono",children:JSON.stringify(t,null,2)});const i=Object.entries(t);return i.length===0?h.jsx("span",{className:"text-xs text-muted-foreground italic",children:"(no params)"}):h.jsx("div",{className:"text-xs font-mono",children:i.map(([s,u])=>{if(u==null||typeof u=="string"||typeof u=="number"||typeof u=="boolean"){const m=u===null?"null":u===void 0?"undefined":typeof u=="string"?u:String(u),x=typeof u=="string"&&(m.length>80||m.includes(`
557
+ `));return h.jsxs("div",{className:me("py-0.5",x?"flex flex-col gap-0.5":"flex items-baseline gap-2"),children:[h.jsxs("span",{className:"text-muted-foreground shrink-0",children:[s,":"]}),h.jsx("span",{className:me("text-foreground",x?"whitespace-pre-wrap break-all bg-muted/40 rounded px-1.5 py-1":"truncate",typeof u=="string"?"":"text-amber-600 dark:text-amber-400"),title:typeof u=="string"&&!x?m:void 0,children:m})]},s)}const d=!!r[s],p=Array.isArray(u)?`[${u.length} item${u.length===1?"":"s"}]`:`{${Object.keys(u).length} key${Object.keys(u).length===1?"":"s"}}`;return h.jsxs("div",{className:"py-0.5",children:[h.jsxs("button",{type:"button",onClick:()=>l(m=>({...m,[s]:!m[s]})),className:"flex items-baseline gap-2 hover:bg-muted/30 rounded px-1 -mx-1",children:[h.jsx("span",{className:"text-muted-foreground/60 text-[10px]",children:d?"▾":"▸"}),h.jsxs("span",{className:"text-muted-foreground",children:[s,":"]}),h.jsx("span",{className:"text-violet-600 dark:text-violet-400",children:p})]}),d&&h.jsx("pre",{className:"ml-3 mt-1 whitespace-pre-wrap break-all text-[11px] bg-muted/40 rounded px-2 py-1.5",children:JSON.stringify(u,null,2)})]},s)})})}function H3(t){if(t<1e3)return`${t} ms`;if(t<6e4)return`${(t/1e3).toFixed(t<1e4?2:1)}s`;const r=Math.floor(t/6e4),l=Math.floor(t%6e4/1e3);return`${r}m ${l}s`}function ws({message:t,isFirst:r=!1,isContinuation:l=!1}){const[i,s]=w.useState({}),[u,c]=w.useState(!1),[d,p]=w.useState(""),[m,x]=w.useState(!1),y=t.role==="user",b=t.role==="tool";t.role;const S=he(q=>q.truncateAfter),k=he(q=>q.addMessage),N=he(q=>q.setLoading),T=he(q=>q.isLoading),j=Pe(q=>q.wsUrl),M=Ne(q=>q.pinnedIds),z=Ne(q=>q.togglePin),F=Ne(q=>q.compactMode),P=M.includes(t.id),U=Ge(q=>q.inputCost),G=Ge(q=>q.outputCost),le=Ge(q=>q.cacheReadCost),se=(()=>{if(t.role!=="assistant"||T)return!1;const q=he.getState().messages;for(let H=q.length-1;H>=0;H--){const te=q[H];if(te.role==="assistant")return te.id===t.id}return!1})(),B=()=>{const q=he.getState().messages,H=q.findIndex(D=>D.id===t.id);if(H===-1)return;let te=-1;for(let D=H-1;D>=0;D--)if(q[D].role==="user"){te=D;break}if(te===-1)return;const ae=q[te];S(ae.id),k({role:"user",content:ae.content}),N(!0),qn(j).sendMessage(ae.content)},X=q=>{s(H=>({...H,[q]:!H[q]}))},Q=()=>{p(t.content),c(!0)},de=()=>{c(!1),p("")},oe=()=>{const q=d.trim();if(!q){de();return}S(t.id),k({role:"user",content:q}),N(!0),qn(j).sendMessage(q),c(!1),p("")};return h.jsxs("div",{"data-message-id":t.id,"data-pinned":P?"1":void 0,className:me("group flex animate-message rounded-lg transition-shadow",F?"gap-2":"gap-3",y?"flex-row-reverse":"flex-row",P&&"ring-1 ring-amber-500/30 bg-amber-500/[0.02] px-1 -mx-1"),children:[l?h.jsx("div",{className:"flex-shrink-0 w-8 h-8","aria-hidden":!0}):h.jsx("div",{className:me("flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center","ring-2 ring-offset-2 ring-offset-background",y?"bg-primary text-primary-foreground ring-primary/20":b?"bg-secondary text-secondary-foreground ring-secondary/20":"bg-accent text-accent-foreground ring-accent/20"),children:y?h.jsx(s2,{className:"h-4 w-4"}):b?h.jsx(ma,{className:"h-4 w-4"}):h.jsx(zx,{className:"h-4 w-4"})}),h.jsxs("div",{className:me("flex flex-col gap-1.5 max-w-[85%]",y&&"items-end"),children:[r&&!l&&h.jsx("span",{className:me("text-xs font-medium px-1",y?"text-primary":b?"text-secondary":"text-muted-foreground"),children:y?"You":b?"Tool":"Assistant"}),b&&t.toolName&&h.jsxs("button",{type:"button",onClick:()=>X(t.id),className:me("flex items-center gap-2 text-sm font-medium cursor-pointer select-none","hover:bg-muted/50 rounded-lg px-2 py-1 -mx-2 transition-colors",t.isError?"text-destructive":"text-foreground"),children:[h.jsx("span",{className:"text-muted-foreground/50",children:i[t.id]?h.jsx(js,{className:"h-3 w-3"}):h.jsx(ud,{className:"h-3 w-3"})}),h.jsx(ma,{className:"h-3 w-3"}),h.jsx("span",{className:"font-mono",children:t.toolName}),t.toolResult===void 0?h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-500 animate-pulse","aria-hidden":!0}):t.isError?h.jsx(cd,{className:"h-3 w-3 text-destructive"}):h.jsx(pl,{className:"h-3 w-3 text-green-500"}),typeof t.toolDurationMs=="number"&&h.jsx("span",{className:"text-xs text-muted-foreground tabular-nums font-normal",children:H3(t.toolDurationMs)})]}),h.jsx("div",{className:me("rounded-2xl",F?"px-3 py-1.5":"px-4 py-3",y?"bg-primary text-primary-foreground rounded-br-md":b?t.isError?"bg-destructive/5 border border-destructive/20 text-destructive":"bg-muted/80 text-foreground":"bg-card border text-foreground",t.isError&&!b&&"border-destructive/20"),children:b?(()=>{const q=!!i[t.id],H=t.toolInput!==void 0?ek(t.toolName,t.toolInput):"",te=t.toolResult?t.toolResult.split(`
558
+ `).length:0;return h.jsxs("div",{className:"space-y-1",children:[H&&!q&&h.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:H}),t.toolResult===void 0&&t.progressLines&&t.progressLines.length>0&&h.jsx("div",{className:"mt-1 rounded-md border border-amber-500/20 bg-amber-500/5 p-1.5 text-[11px] font-mono leading-snug max-h-32 overflow-auto",children:t.progressLines.slice(-6).map((ae,Se)=>h.jsx("div",{className:"truncate text-muted-foreground",children:ae},Se))}),q&&t.toolInput!==void 0&&(()=>{const ae=W0(t.toolName,t.toolInput);return ae?h.jsx(J0,{oldText:ae.oldText,newText:ae.newText,caption:ae.caption}):h.jsxs("div",{className:"p-3 bg-muted/50 rounded-lg overflow-x-auto",children:[h.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground mb-2 text-xs",children:[h.jsx(Lx,{className:"h-3 w-3"}),h.jsx("span",{children:"Input"})]}),h.jsx(B3,{input:t.toolInput})]})})(),q&&t.toolResult!==void 0&&t.toolResult.length>0&&h.jsxs("div",{className:"relative group/tool",children:[h.jsx(A3,{toolName:t.toolName,result:t.toolResult,isError:t.isError}),h.jsxs("div",{className:"absolute top-1.5 right-1.5 flex items-center gap-1 opacity-0 group-hover/tool:opacity-100 transition-opacity",children:[h.jsx(td,{text:t.toolResult,label:"",className:"bg-background/80 border rounded px-1.5 py-0.5"}),t.toolResult.split(`
559
+ `).length>5&&h.jsx("button",{type:"button",onClick:ae=>{ae.stopPropagation();const Se=_3(t.toolName),D=(t.toolName??"output").replace(/[^a-z0-9_-]+/gi,"-").toLowerCase();O3(`${D}-${new Date().toISOString().replace(/[:.]/g,"-")}.${Se}`,t.toolResult??"")},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground bg-background/80 border rounded px-1.5 py-0.5",title:"Download as file",children:h.jsx(Hf,{className:"h-3 w-3"})})]})]}),q&&t.toolResult!==void 0&&t.toolResult.length===0&&h.jsx("span",{className:"text-xs text-muted-foreground italic",children:"(empty)"}),!q&&t.isError&&t.toolResult&&h.jsx("div",{className:"text-xs font-mono text-destructive truncate",children:t.toolResult.split(`
560
+ `)[0]}),(t.toolResult!==void 0&&t.toolResult.length>0||t.toolInput!==void 0&&Object.keys(t.toolInput??{}).length>0)&&h.jsx("button",{type:"button",onClick:()=>X(t.id),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:q?"Hide details":`Show details${te>0?` (${te} line${te===1?"":"s"})`:""}`})]})})():u&&y?h.jsxs("div",{className:"flex flex-col gap-2 min-w-[280px]",children:[h.jsx("textarea",{value:d,onChange:q=>p(q.target.value),onKeyDown:q=>{q.key==="Escape"?(q.preventDefault(),de()):q.key==="Enter"&&(q.metaKey||q.ctrlKey)&&(q.preventDefault(),oe())},rows:Math.min(8,Math.max(2,d.split(`
561
+ `).length)),className:"w-full resize-none rounded-md border bg-background text-foreground px-2 py-1.5 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-ring"}),h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsx("span",{className:"text-[10px] text-primary-foreground/60",children:"⌘/Ctrl+Enter to save · Esc to cancel"}),h.jsxs("div",{className:"flex gap-1",children:[h.jsx("button",{type:"button",onClick:de,className:"text-xs px-2 py-0.5 rounded border border-primary-foreground/30 hover:bg-primary-foreground/10",children:"Cancel"}),h.jsx("button",{type:"button",onClick:oe,disabled:!d.trim(),className:"text-xs px-2 py-0.5 rounded bg-primary-foreground text-primary disabled:opacity-50",children:"Save & resend"})]})]})]}):h.jsx("div",{className:"text-sm leading-relaxed markdown-content",children:t.content?m&&t.role==="assistant"?h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-foreground/90 max-h-[40rem] overflow-auto",children:t.content}):t.role==="assistant"&&t.isError?h.jsx(U3,{text:t.content}):h.jsx(hj,{remarkPlugins:[E3],components:z3,children:t.content}):t.streaming?h.jsx("span",{className:"inline-block animate-pulse text-muted-foreground",children:"Typing..."}):h.jsx("span",{className:"text-muted-foreground italic",children:"No content"})})}),h.jsxs("div",{className:me("flex items-center gap-2 px-1",y?"flex-row-reverse":"flex-row"),children:[h.jsx("span",{className:"text-xs text-muted-foreground/50",children:new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),t.runSummary&&h.jsxs("span",{className:"text-[10px] text-muted-foreground/60 font-mono tabular-nums",title:[`Iterations: ${t.runSummary.iterations}`,`Tool calls: ${t.runSummary.tools}`,`Elapsed: ${(t.runSummary.durationMs/1e3).toFixed(2)}s`,t.runSummary.costDelta>0?`Cost: $${t.runSummary.costDelta.toFixed(4)}`:""].filter(Boolean).join(" · "),children:[t.runSummary.iterations," iter",t.runSummary.tools>0?` · ${t.runSummary.tools} tool${t.runSummary.tools===1?"":"s"}`:""," · ",t.runSummary.durationMs<6e4?`${(t.runSummary.durationMs/1e3).toFixed(1)}s`:`${Math.floor(t.runSummary.durationMs/6e4)}m ${Math.floor(t.runSummary.durationMs%6e4/1e3)}s`,t.runSummary.costDelta>0?` · $${t.runSummary.costDelta>=.01?t.runSummary.costDelta.toFixed(4):t.runSummary.costDelta.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`:""]}),t.usage&&(t.usage.input>0||t.usage.output>0)&&(()=>{const q=t.usage,H=(q.input*U+q.output*G+(q.cacheRead??0)*le)/1e6,te=U>0||G>0,ae=H>=.01?`$${H.toFixed(4)}`:H>0?`$${H.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`:"";return h.jsxs("span",{className:"text-[10px] text-muted-foreground/60 font-mono tabular-nums",title:[`Input: ${q.input.toLocaleString()}`,`Output: ${q.output.toLocaleString()}`,q.cacheRead?`Cache read: ${q.cacheRead.toLocaleString()}`:"",te?`Cost: ${ae}`:""].filter(Boolean).join(" · "),children:[q.input.toLocaleString(),"→",q.output.toLocaleString(),q.cacheRead?` · ${q.cacheRead.toLocaleString()} ↺`:"",te&&ae?` · ${ae}`:""]})})(),!b&&t.content&&!t.streaming&&h.jsx(td,{text:t.content,label:"",className:"opacity-0 group-hover:opacity-100 transition-opacity"}),t.role==="assistant"&&t.content&&!t.streaming&&h.jsxs("button",{type:"button",onClick:()=>x(q=>!q),title:m?"Show rendered markdown":"Show raw markdown source",className:me("text-xs inline-flex items-center gap-1 transition-opacity",m?"text-primary hover:text-primary/80 opacity-100":"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-foreground"),children:[h.jsx(Vw,{className:"h-3 w-3"}),h.jsx("span",{children:m?"Rendered":"Raw"})]}),y&&!u&&!T&&t.content&&h.jsxs("button",{type:"button",onClick:Q,title:"Edit & resend this prompt",className:"opacity-0 group-hover:opacity-100 transition-opacity text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[h.jsx(Bx,{className:"h-3 w-3"}),h.jsx("span",{children:"Edit"})]}),t.role==="assistant"&&t.content&&!t.streaming&&h.jsxs("button",{type:"button",onClick:()=>z(t.id),title:P?"Unpin":"Pin this answer",className:me("text-xs inline-flex items-center gap-1 transition-opacity",P?"text-amber-500 hover:text-amber-600 opacity-100":"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-foreground"),children:[P?h.jsx(r2,{className:"h-3 w-3"}):h.jsx(Hx,{className:"h-3 w-3"}),h.jsx("span",{children:P?"Pinned":"Pin"})]}),se&&t.content&&!t.streaming&&h.jsxs("button",{type:"button",onClick:B,title:"Regenerate this response",className:"opacity-0 group-hover:opacity-100 transition-opacity text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[h.jsx(zi,{className:"h-3 w-3"}),h.jsx("span",{children:"Retry"})]})]})]})]})}function q3(){const t=Ge(p=>p.mode),r=Ge(p=>p.modes),{listModes:l,switchMode:i}=In(),[s,u]=w.useState(!1),c=w.useRef(null);w.useEffect(()=>{s&&l()},[s,l]),w.useEffect(()=>{if(!s)return;const p=x=>{var y;(y=c.current)!=null&&y.contains(x.target)||u(!1)},m=x=>{x.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",p),document.addEventListener("keydown",m),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",m)}},[s]);const d=r.length>0?r:[{id:"default",name:"Default",description:"Standard agent behaviour"}];return h.jsxs("div",{ref:c,className:"relative shrink-0",children:[h.jsxs("button",{type:"button",onClick:()=>u(p=>!p),className:me("flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium","bg-accent/40 text-foreground hover:bg-accent transition-colors border border-transparent hover:border-primary/30"),title:"Active mode",children:["mode: ",h.jsx("span",{className:"font-mono",children:t||"default"}),h.jsx(js,{className:"h-3 w-3 opacity-60"})]}),s&&h.jsxs("div",{className:"absolute top-full left-0 mt-1 w-64 rounded-md border bg-popover shadow-lg z-30 py-1",children:[h.jsx("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted-foreground border-b",children:"Mode"}),d.map(p=>h.jsxs("button",{type:"button",onClick:()=>{i(p.id),u(!1)},className:me("w-full text-left px-3 py-2 hover:bg-accent/40 flex items-start gap-2",p.id===t&&"bg-accent/30"),children:[h.jsx(_x,{className:me("h-3.5 w-3.5 mt-0.5 shrink-0",p.id===t?"opacity-100 text-primary":"opacity-0")}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"text-xs font-mono",children:p.id}),p.description&&h.jsx("div",{className:"text-[11px] text-muted-foreground leading-snug",children:p.description})]})]},p.id))]})]})}function I3(){const t=Ne(x=>x.searchOpen),r=Ne(x=>x.setSearchOpen),l=Ne(x=>x.searchQuery),i=Ne(x=>x.setSearchQuery),s=he(x=>x.messages),u=w.useRef(null),[c,d]=w.useState(0);w.useEffect(()=>{t&&requestAnimationFrame(()=>{var x;return(x=u.current)==null?void 0:x.focus()})},[t]);const p=w.useMemo(()=>{const x=l.trim().toLowerCase();return x?s.filter(y=>y.role==="tool"?(y.toolName??"").toLowerCase().includes(x)||(y.toolResult??"").toLowerCase().includes(x)||JSON.stringify(y.toolInput??"").toLowerCase().includes(x):y.content.toLowerCase().includes(x)).map(y=>y.id):[]},[s,l]);if(w.useEffect(()=>{c>=p.length&&d(0)},[p,c]),w.useEffect(()=>{var z;const x=window,y=(z=x.CSS)==null?void 0:z.highlights,b=x.Highlight;if(!y||!b)return;const S=()=>{y.delete("chat-search"),y.delete("chat-search-active")},k=l.trim();if(!k||!t){S();return}const N=k.toLowerCase(),T=[],j=[],M=p[c];for(const F of document.querySelectorAll("[data-message-id]")){const U=F.dataset.messageId===M,G=document.createTreeWalker(F,NodeFilter.SHOW_TEXT);let le=G.nextNode();for(;le;){const se=le.nodeValue??"";if(se.length>0){const B=se.toLowerCase();let X=0;for(;X<=B.length-N.length;){const Q=B.indexOf(N,X);if(Q===-1)break;const de=document.createRange();de.setStart(le,Q),de.setEnd(le,Q+N.length),T.push(de),U&&j.push(de),X=Q+N.length}}le=G.nextNode()}}return T.length>0?y.set("chat-search",new b(...T)):y.delete("chat-search"),j.length>0?y.set("chat-search-active",new b(...j)):y.delete("chat-search-active"),S},[l,p,c,t]),w.useEffect(()=>{const x=p[c];if(!x)return;const y=document.querySelector(`[data-message-id="${x}"]`);y&&y.scrollIntoView({behavior:"smooth",block:"center"})},[p,c]),!t)return null;const m=x=>{p.length!==0&&d(y=>(y+x+p.length)%p.length)};return h.jsx("div",{className:"absolute top-2 right-4 z-30 w-[28rem] max-w-[calc(100%-2rem)] rounded-lg border bg-popover shadow-xl",children:h.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[h.jsx(ha,{className:"h-4 w-4 text-muted-foreground shrink-0"}),h.jsx("input",{ref:u,value:l,onChange:x=>i(x.target.value),onKeyDown:x=>{x.key==="Escape"?(x.preventDefault(),r(!1)):x.key==="Enter"?(x.preventDefault(),m(x.shiftKey?-1:1)):x.key==="ArrowDown"?(x.preventDefault(),m(1)):x.key==="ArrowUp"&&(x.preventDefault(),m(-1))},placeholder:"Search in chat…",className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground"}),h.jsx("span",{className:"text-xs text-muted-foreground tabular-nums shrink-0",children:p.length===0?l?"0":"":`${c+1} / ${p.length}`}),h.jsx("button",{type:"button",onClick:()=>m(-1),disabled:p.length===0,className:me("p-1 rounded hover:bg-muted disabled:opacity-30 disabled:cursor-not-allowed"),title:"Previous hit",children:h.jsx(Rx,{className:"h-3.5 w-3.5"})}),h.jsx("button",{type:"button",onClick:()=>m(1),disabled:p.length===0,className:me("p-1 rounded hover:bg-muted disabled:opacity-30 disabled:cursor-not-allowed"),title:"Next hit",children:h.jsx(Mx,{className:"h-3.5 w-3.5"})}),h.jsx("button",{type:"button",onClick:()=>r(!1),className:"p-1 rounded hover:bg-muted text-muted-foreground",title:"Close (Esc)",children:h.jsx(xl,{className:"h-3.5 w-3.5"})})]})})}function V3(t){if(t<1e3)return`${t}ms`;if(t<6e4)return`${(t/1e3).toFixed(t<1e4?2:1)}s`;const r=Math.floor(t/6e4),l=Math.floor(t%6e4/1e3);return`${r}m${l}s`}function $3({tools:t,defaultOpen:r=!1,isContinuation:l=!1}){const[i,s]=w.useState(r);if(t.length===1)return h.jsx(ws,{message:t[0],isFirst:!0,isContinuation:l});const u=t.filter(y=>y.toolResult===void 0).length,c=t.filter(y=>y.isError).length,d=t.reduce((y,b)=>y+(b.toolDurationMs??0),0),p=Array.from(new Set(t.map(y=>y.toolName).filter(Boolean))),m=p.slice(0,3).join(", "),x=p.length>3?` +${p.length-3}`:"";return h.jsxs("div",{className:"flex gap-3 animate-message",children:[l?h.jsx("div",{className:"flex-shrink-0 w-8 h-8","aria-hidden":!0}):h.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center bg-secondary text-secondary-foreground ring-2 ring-offset-2 ring-offset-background ring-secondary/20",children:h.jsx(ma,{className:"h-4 w-4"})}),h.jsxs("div",{className:"flex flex-col gap-1.5 max-w-[85%] flex-1 min-w-0",children:[h.jsxs("button",{type:"button",onClick:()=>s(y=>!y),className:me("flex items-center gap-2 text-sm font-medium cursor-pointer select-none","hover:bg-muted/50 rounded-lg px-2 py-1.5 -mx-2 transition-colors","border border-border/40 bg-muted/30"),children:[i?h.jsx(js,{className:"h-3.5 w-3.5 text-muted-foreground"}):h.jsx(ud,{className:"h-3.5 w-3.5 text-muted-foreground"}),h.jsx(ma,{className:"h-3.5 w-3.5 text-muted-foreground"}),h.jsxs("span",{className:"font-mono text-xs",children:[t.length," tool call",t.length===1?"":"s"]}),u>0?h.jsx(Fr,{className:"h-3 w-3 animate-spin text-amber-500"}):c>0?h.jsx(cd,{className:"h-3 w-3 text-destructive"}):h.jsx(pl,{className:"h-3 w-3 text-green-500"}),d>0&&h.jsx("span",{className:"text-xs text-muted-foreground tabular-nums font-normal",children:V3(d)}),m&&h.jsxs("span",{className:"text-xs text-muted-foreground/80 font-mono truncate",children:["· ",m,x]})]}),i&&h.jsx("div",{className:"space-y-2 pl-3 border-l-2 border-border/40 ml-2",children:t.map(y=>h.jsx(ws,{message:y,isFirst:!1},y.id))})]})]})}const F3=[{icon:ha,title:"Explore",hint:"Understand the code before changing it",tone:"text-blue-600 dark:text-blue-400 bg-blue-500/10 border-blue-500/20",prompts:["Walk me through this codebase: list the top-level packages, the role of each, and how they depend on one another. Highlight any cross-cutting abstractions I should understand first.","Find every place where the WebSocket protocol is defined or consumed (server handlers, client send/receive, type contracts). Show me the message-type table and any gaps where the type isn't enforced.","Locate the entrypoint that boots the agent for normal runs. Trace the call chain from CLI launch all the way to the first model call — what middleware, hooks, and tools are wired along the way?"]},{icon:gd,title:"Build",hint:"Add a feature end-to-end",tone:"text-emerald-600 dark:text-emerald-400 bg-emerald-500/10 border-emerald-500/20",prompts:["Add a slash command `/export` that dumps the current chat (messages + tool calls + usage) as a markdown file to ~/.wrongstack/exports/ and surfaces a 'saved to X' toast. Wire backend + ws-client + slash menu entry.","Create a notification toast system (Zustand store + portal-rendered <Toast/> component) and migrate every existing `key.operation_result` success/failure message to use it instead of dropping into chat.","Add structured JSON logging to the WebSocket server: each handler logs `{ts, level, type, payload}` to ~/.wrongstack/logs/webui.jsonl. Make it tail-friendly and respect the existing log.level config."]},{icon:Dw,title:"Debug",hint:"Track a problem to its root cause",tone:"text-amber-600 dark:text-amber-400 bg-amber-500/10 border-amber-500/20",prompts:["Something feels off with token accounting — the cost chip and the per-message tally drift apart over a long session. Reproduce locally if you can, then propose a fix. Start by reading the TokenCounter + provider.response handler.","The WebSocket sometimes silently stops streaming text mid-response on lossy networks. Check the reconnect logic, message queue, and how we handle a half-completed text_delta stream after a reconnect.","I want to know why ctx % climbs so fast in long sessions. Use the existing /debug context breakdown to identify the largest contributors and propose three concrete pruning strategies (with token savings estimates)."]},{icon:Ix,title:"Refactor",hint:"Clean up without breaking behavior",tone:"text-violet-600 dark:text-violet-400 bg-violet-500/10 border-violet-500/20",prompts:["Find duplicated logic between packages/cli/src/webui-server.ts and packages/webui/src/server/index.ts. Extract the shared bits into a single source of truth (likely the webui package) and update the CLI to import it.","Look at the Zustand stores in packages/webui/src/stores/index.ts — anything that should be a derived selector instead of stored state? Anything persisted that shouldn't be? Propose a leaner shape and migration plan.","Audit the slash command dispatcher: pull each command's run logic into its own module under packages/webui/src/commands/, make the registry data-driven, and ensure /help auto-generates from the registry (not a hardcoded list)."]}],Y3=[{name:"/help",hint:"list every slash command"},{name:"/diag",hint:"runtime diagnostics"},{name:"/stats",hint:"tokens · cache · cost · elapsed"},{name:"/tools",hint:"show registered tools"},{name:"/memory",hint:"show remembered notes"},{name:"/compact",hint:"shrink context"},{name:"/clear",hint:"wipe current context"},{name:"/new",hint:"fresh session"}];function Tf(t){var i;const r=document.querySelector("textarea");if(!r)return;const l=(i=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value"))==null?void 0:i.set;l==null||l.call(r,t),r.dispatchEvent(new Event("input",{bubbles:!0})),r.focus()}function G3(){const{projectName:t}=Ge(),{provider:r,model:l}=Pe(),i=Pe(N=>N.wsConnected),s=Pe(N=>N.wsUrl),u=Ne(N=>N.setCurrentView),[c,d]=w.useState(void 0);w.useEffect(()=>{if(!i)return;const N=qn(s),T=N.on("providers.saved",j=>{var z;const M=j.payload;d(((z=M.providers)==null?void 0:z.length)??0)});return N.listSavedProviders(),()=>{T()}},[i,s]);const m=Ne(N=>N.promptHistory).slice(0,6),{listSessions:x,resumeSession:y}=In(),b=pa(N=>N.entries);w.useEffect(()=>{i&&b.length===0&&x(10)},[i]);const S=Ne(N=>N.sessionNicknames),k=b.filter(N=>!N.isCurrent).slice(0,4);return h.jsxs("div",{className:"flex flex-col gap-8 py-8 px-2 max-w-5xl mx-auto w-full",children:[h.jsxs("div",{className:"flex flex-col items-center text-center gap-3",children:[h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-primary via-primary to-primary/60 flex items-center justify-center shadow-lg shadow-primary/20",children:h.jsx(yd,{className:"h-7 w-7 text-primary-foreground"})}),h.jsx("div",{className:"absolute -inset-3 bg-gradient-to-r from-transparent via-primary/10 to-transparent animate-pulse rounded-full -z-10"})]}),h.jsxs("div",{children:[h.jsxs("h2",{className:"text-2xl font-semibold tracking-tight",children:["Where do you want to start",t?h.jsxs(h.Fragment,{children:[" in ",h.jsx("span",{className:"text-primary",children:t})]}):"","?"]}),h.jsxs("p",{className:"text-sm text-muted-foreground mt-2 max-w-2xl mx-auto leading-relaxed",children:["WrongStack is connected to your project and ready to read, edit, run commands, search the codebase, track todos, and remember context across sessions. Pick a starting prompt below, write your own, or type ",h.jsx("span",{className:"font-mono text-foreground/80",children:"/"})," ","for the full command palette."]}),r&&l&&h.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-2 font-mono",children:[r," / ",l]})]})]}),i&&c===0&&h.jsxs("button",{type:"button",onClick:()=>u("settings"),className:me("group rounded-xl border bg-gradient-to-br from-amber-500/10 via-amber-500/5 to-transparent","border-amber-500/30 hover:border-amber-500/50 transition-colors","p-4 flex items-center gap-4 text-left"),children:[h.jsx("span",{className:"flex items-center justify-center w-12 h-12 rounded-lg bg-amber-500/15 text-amber-600 dark:text-amber-400 shrink-0",children:h.jsx(Qw,{className:"h-6 w-6"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("h3",{className:"text-base font-semibold mb-1",children:"No API key configured yet"}),h.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Register a provider in Settings before sending a message — otherwise the agent has nothing to talk to. Anthropic, OpenAI, Google, and any OpenAI-compatible endpoint all work."})]}),h.jsxs("span",{className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-400 font-medium shrink-0 group-hover:translate-x-0.5 transition-transform",children:["Open Settings ",h.jsx(Dx,{className:"h-3.5 w-3.5"})]})]}),h.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:F3.map(N=>{const T=N.icon;return h.jsxs("div",{className:"rounded-xl border bg-card/40 backdrop-blur-sm p-4 flex flex-col gap-3",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:me("flex items-center justify-center w-8 h-8 rounded-lg border",N.tone),children:h.jsx(T,{className:"h-4 w-4"})}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-semibold",children:N.title}),h.jsx("p",{className:"text-xs text-muted-foreground",children:N.hint})]})]}),h.jsx("div",{className:"flex flex-col gap-1.5",children:N.prompts.map((j,M)=>h.jsx("button",{type:"button",onClick:()=>Tf(j),className:"text-left text-xs leading-relaxed text-foreground/80 hover:text-foreground border border-transparent hover:border-border/60 rounded-lg px-3 py-2 hover:bg-muted/40 transition-colors line-clamp-3",title:j,children:j},M))})]},N.title)})}),k.length>0&&h.jsxs("div",{className:"rounded-xl border bg-muted/20 p-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(Ax,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"Pick back up"})]}),h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:k.map(N=>h.jsxs("button",{type:"button",onClick:()=>y(N.id),className:"text-left rounded-lg border border-border/40 bg-background/60 hover:border-primary/40 hover:bg-accent/30 px-3 py-2 transition-colors group/sess",title:N.title,children:[h.jsx("div",{className:"text-sm font-medium truncate text-foreground group-hover/sess:text-primary",children:S[N.id]||N.title||"(empty)"}),h.jsxs("div",{className:"text-[10px] text-muted-foreground font-mono truncate mt-0.5",children:[N.provider,"/",N.model,N.tokenTotal>0&&h.jsxs("span",{className:"ml-2",children:["· ",N.tokenTotal.toLocaleString()," tok"]})]})]},N.id))})]}),m.length>0&&h.jsxs("div",{className:"rounded-xl border bg-muted/20 p-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(Lx,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"Recent prompts"})]}),h.jsx("div",{className:"flex flex-col gap-1.5",children:m.filter(N=>!N.startsWith("/")).slice(0,5).map((N,T)=>h.jsx("button",{type:"button",onClick:()=>Tf(N),className:"text-left text-xs leading-relaxed text-muted-foreground hover:text-foreground border border-transparent hover:border-border/60 rounded-lg px-3 py-2 hover:bg-background/60 transition-colors line-clamp-2",title:N,children:N},T))})]}),h.jsxs("div",{className:"rounded-xl border bg-muted/20 p-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(Ux,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"Quick commands"})]}),h.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:Y3.map(N=>h.jsxs("button",{type:"button",onClick:()=>Tf(N.name),className:"text-left flex flex-col gap-0.5 rounded-md border border-border/40 bg-background/60 px-3 py-2 hover:border-primary/40 hover:bg-accent/40 transition-colors",children:[h.jsx("span",{className:"font-mono text-xs text-foreground",children:N.name}),h.jsx("span",{className:"text-[11px] text-muted-foreground truncate",children:N.hint})]},N.name))})]})]})}var e1=vx();const P3=Ri(e1);function ks(t){const r=X3(t),l=w.forwardRef((i,s)=>{const{children:u,...c}=i,d=w.Children.toArray(u),p=d.find(K3);if(p){const m=p.props.children,x=d.map(y=>y===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:y);return h.jsx(r,{...c,ref:s,children:w.isValidElement(m)?w.cloneElement(m,void 0,x):null})}return h.jsx(r,{...c,ref:s,children:u})});return l.displayName=`${t}.Slot`,l}function X3(t){const r=w.forwardRef((l,i)=>{const{children:s,...u}=l;if(w.isValidElement(s)){const c=J3(s),d=Z3(u,s.props);return s.type!==w.Fragment&&(d.ref=i?bd(i,c):c),w.cloneElement(s,d)}return w.Children.count(s)>1?w.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Q3=Symbol("radix.slottable");function K3(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Q3}function Z3(t,r){const l={...r};for(const i in r){const s=t[i],u=r[i];/^on[A-Z]/.test(i)?s&&u?l[i]=(...d)=>{const p=u(...d);return s(...d),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...u}:i==="className"&&(l[i]=[s,u].filter(Boolean).join(" "))}return{...t,...l}}function J3(t){var i,s;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?t.ref:(r=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var W3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tt=W3.reduce((t,r)=>{const l=ks(`Primitive.${r}`),i=w.forwardRef((s,u)=>{const{asChild:c,...d}=s,p=c?l:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(p,{...d,ref:u})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function eT(t,r){t&&e1.flushSync(()=>t.dispatchEvent(r))}var ya=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function tT(t,r){return w.useReducer((l,i)=>r[l][i]??l,t)}var cr=t=>{const{present:r,children:l}=t,i=nT(r),s=typeof l=="function"?l({present:i.isPresent}):w.Children.only(l),u=Vt(i.ref,rT(s));return typeof l=="function"||i.isPresent?w.cloneElement(s,{ref:u}):null};cr.displayName="Presence";function nT(t){const[r,l]=w.useState(),i=w.useRef(null),s=w.useRef(t),u=w.useRef("none"),c=t?"mounted":"unmounted",[d,p]=tT(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const m=ss(i.current);u.current=d==="mounted"?m:"none"},[d]),ya(()=>{const m=i.current,x=s.current;if(x!==t){const b=u.current,S=ss(m);t?p("MOUNT"):S==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(x&&b!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,p]),ya(()=>{if(r){let m;const x=r.ownerDocument.defaultView??window,y=S=>{const N=ss(i.current).includes(CSS.escape(S.animationName));if(S.target===r&&N&&(p("ANIMATION_END"),!s.current)){const T=r.style.animationFillMode;r.style.animationFillMode="forwards",m=x.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=T)})}},b=S=>{S.target===r&&(u.current=ss(i.current))};return r.addEventListener("animationstart",b),r.addEventListener("animationcancel",y),r.addEventListener("animationend",y),()=>{x.clearTimeout(m),r.removeEventListener("animationstart",b),r.removeEventListener("animationcancel",y),r.removeEventListener("animationend",y)}}else p("ANIMATION_END")},[r,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:w.useCallback(m=>{i.current=m?getComputedStyle(m):null,l(m)},[])}}function ss(t){return(t==null?void 0:t.animationName)||"none"}function rT(t){var i,s;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?t.ref:(r=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}function lT(t,r){const l=w.createContext(r),i=u=>{const{children:c,...d}=u,p=w.useMemo(()=>d,Object.values(d));return h.jsx(l.Provider,{value:p,children:c})};i.displayName=t+"Provider";function s(u){const c=w.useContext(l);if(c)return c;if(r!==void 0)return r;throw new Error(`\`${u}\` must be used within \`${t}\``)}return[i,s]}function Ui(t,r=[]){let l=[];function i(u,c){const d=w.createContext(c),p=l.length;l=[...l,c];const m=y=>{var j;const{scope:b,children:S,...k}=y,N=((j=b==null?void 0:b[t])==null?void 0:j[p])||d,T=w.useMemo(()=>k,Object.values(k));return h.jsx(N.Provider,{value:T,children:S})};m.displayName=u+"Provider";function x(y,b){var N;const S=((N=b==null?void 0:b[t])==null?void 0:N[p])||d,k=w.useContext(S);if(k)return k;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${u}\``)}return[m,x]}const s=()=>{const u=l.map(c=>w.createContext(c));return function(d){const p=(d==null?void 0:d[t])||u;return w.useMemo(()=>({[`__scope${t}`]:{...d,[t]:p}}),[d,p])}};return s.scopeName=t,[i,aT(s,...r)]}function aT(...t){const r=t[0];if(t.length===1)return r;const l=()=>{const i=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const c=i.reduce((d,{useScope:p,scopeName:m})=>{const y=p(u)[`__scope${m}`];return{...d,...y}},{});return w.useMemo(()=>({[`__scope${r.scopeName}`]:c}),[c])}};return l.scopeName=r.scopeName,l}function hn(t){const r=w.useRef(t);return w.useEffect(()=>{r.current=t}),w.useMemo(()=>(...l)=>{var i;return(i=r.current)==null?void 0:i.call(r,...l)},[])}var iT=w.createContext(void 0);function Bd(t){const r=w.useContext(iT);return t||r||"ltr"}function oT(t,[r,l]){return Math.min(l,Math.max(r,t))}function pt(t,r,{checkForDefaultPrevented:l=!0}={}){return function(s){if(t==null||t(s),l===!1||!s.defaultPrevented)return r==null?void 0:r(s)}}function sT(t,r){return w.useReducer((l,i)=>r[l][i]??l,t)}var Hd="ScrollArea",[t1]=Ui(Hd),[uT,jn]=t1(Hd),n1=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,type:i="hover",dir:s,scrollHideDelay:u=600,...c}=t,[d,p]=w.useState(null),[m,x]=w.useState(null),[y,b]=w.useState(null),[S,k]=w.useState(null),[N,T]=w.useState(null),[j,M]=w.useState(0),[z,F]=w.useState(0),[P,U]=w.useState(!1),[G,le]=w.useState(!1),se=Vt(r,X=>p(X)),B=Bd(s);return h.jsx(uT,{scope:l,type:i,dir:B,scrollHideDelay:u,scrollArea:d,viewport:m,onViewportChange:x,content:y,onContentChange:b,scrollbarX:S,onScrollbarXChange:k,scrollbarXEnabled:P,onScrollbarXEnabledChange:U,scrollbarY:N,onScrollbarYChange:T,scrollbarYEnabled:G,onScrollbarYEnabledChange:le,onCornerWidthChange:M,onCornerHeightChange:F,children:h.jsx(Tt.div,{dir:B,...c,ref:se,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":z+"px",...t.style}})})});n1.displayName=Hd;var r1="ScrollAreaViewport",l1=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,children:i,nonce:s,...u}=t,c=jn(r1,l),d=w.useRef(null),p=Vt(r,d,c.onViewportChange);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),h.jsx(Tt.div,{"data-radix-scroll-area-viewport":"",...u,ref:p,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...t.style},children:h.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});l1.displayName=r1;var $n="ScrollAreaScrollbar",qd=w.forwardRef((t,r)=>{const{forceMount:l,...i}=t,s=jn($n,t.__scopeScrollArea),{onScrollbarXEnabledChange:u,onScrollbarYEnabledChange:c}=s,d=t.orientation==="horizontal";return w.useEffect(()=>(d?u(!0):c(!0),()=>{d?u(!1):c(!1)}),[d,u,c]),s.type==="hover"?h.jsx(cT,{...i,ref:r,forceMount:l}):s.type==="scroll"?h.jsx(fT,{...i,ref:r,forceMount:l}):s.type==="auto"?h.jsx(a1,{...i,ref:r,forceMount:l}):s.type==="always"?h.jsx(Id,{...i,ref:r}):null});qd.displayName=$n;var cT=w.forwardRef((t,r)=>{const{forceMount:l,...i}=t,s=jn($n,t.__scopeScrollArea),[u,c]=w.useState(!1);return w.useEffect(()=>{const d=s.scrollArea;let p=0;if(d){const m=()=>{window.clearTimeout(p),c(!0)},x=()=>{p=window.setTimeout(()=>c(!1),s.scrollHideDelay)};return d.addEventListener("pointerenter",m),d.addEventListener("pointerleave",x),()=>{window.clearTimeout(p),d.removeEventListener("pointerenter",m),d.removeEventListener("pointerleave",x)}}},[s.scrollArea,s.scrollHideDelay]),h.jsx(cr,{present:l||u,children:h.jsx(a1,{"data-state":u?"visible":"hidden",...i,ref:r})})}),fT=w.forwardRef((t,r)=>{const{forceMount:l,...i}=t,s=jn($n,t.__scopeScrollArea),u=t.orientation==="horizontal",c=_s(()=>p("SCROLL_END"),100),[d,p]=sT("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(d==="idle"){const m=window.setTimeout(()=>p("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(m)}},[d,s.scrollHideDelay,p]),w.useEffect(()=>{const m=s.viewport,x=u?"scrollLeft":"scrollTop";if(m){let y=m[x];const b=()=>{const S=m[x];y!==S&&(p("SCROLL"),c()),y=S};return m.addEventListener("scroll",b),()=>m.removeEventListener("scroll",b)}},[s.viewport,u,p,c]),h.jsx(cr,{present:l||d!=="hidden",children:h.jsx(Id,{"data-state":d==="hidden"?"hidden":"visible",...i,ref:r,onPointerEnter:pt(t.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:pt(t.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),a1=w.forwardRef((t,r)=>{const l=jn($n,t.__scopeScrollArea),{forceMount:i,...s}=t,[u,c]=w.useState(!1),d=t.orientation==="horizontal",p=_s(()=>{if(l.viewport){const m=l.viewport.offsetWidth<l.viewport.scrollWidth,x=l.viewport.offsetHeight<l.viewport.scrollHeight;c(d?m:x)}},10);return xa(l.viewport,p),xa(l.content,p),h.jsx(cr,{present:i||u,children:h.jsx(Id,{"data-state":u?"visible":"hidden",...s,ref:r})})}),Id=w.forwardRef((t,r)=>{const{orientation:l="vertical",...i}=t,s=jn($n,t.__scopeScrollArea),u=w.useRef(null),c=w.useRef(0),[d,p]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=c1(d.viewport,d.content),x={...i,sizes:d,onSizesChange:p,hasThumb:m>0&&m<1,onThumbChange:b=>u.current=b,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:b=>c.current=b};function y(b,S){return yT(b,c.current,d,S)}return l==="horizontal"?h.jsx(dT,{...x,ref:r,onThumbPositionChange:()=>{if(s.viewport&&u.current){const b=s.viewport.scrollLeft,S=ax(b,d,s.dir);u.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollLeft=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollLeft=y(b,s.dir))}}):l==="vertical"?h.jsx(hT,{...x,ref:r,onThumbPositionChange:()=>{if(s.viewport&&u.current){const b=s.viewport.scrollTop,S=ax(b,d);u.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollTop=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollTop=y(b))}}):null}),dT=w.forwardRef((t,r)=>{const{sizes:l,onSizesChange:i,...s}=t,u=jn($n,t.__scopeScrollArea),[c,d]=w.useState(),p=w.useRef(null),m=Vt(r,p,u.onScrollbarXChange);return w.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),h.jsx(o1,{"data-orientation":"horizontal",...s,ref:m,sizes:l,style:{bottom:0,left:u.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:u.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Os(l)+"px",...t.style},onThumbPointerDown:x=>t.onThumbPointerDown(x.x),onDragScroll:x=>t.onDragScroll(x.x),onWheelScroll:(x,y)=>{if(u.viewport){const b=u.viewport.scrollLeft+x.deltaX;t.onWheelScroll(b),d1(b,y)&&x.preventDefault()}},onResize:()=>{p.current&&u.viewport&&c&&i({content:u.viewport.scrollWidth,viewport:u.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:Ns(c.paddingLeft),paddingEnd:Ns(c.paddingRight)}})}})}),hT=w.forwardRef((t,r)=>{const{sizes:l,onSizesChange:i,...s}=t,u=jn($n,t.__scopeScrollArea),[c,d]=w.useState(),p=w.useRef(null),m=Vt(r,p,u.onScrollbarYChange);return w.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),h.jsx(o1,{"data-orientation":"vertical",...s,ref:m,sizes:l,style:{top:0,right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Os(l)+"px",...t.style},onThumbPointerDown:x=>t.onThumbPointerDown(x.y),onDragScroll:x=>t.onDragScroll(x.y),onWheelScroll:(x,y)=>{if(u.viewport){const b=u.viewport.scrollTop+x.deltaY;t.onWheelScroll(b),d1(b,y)&&x.preventDefault()}},onResize:()=>{p.current&&u.viewport&&c&&i({content:u.viewport.scrollHeight,viewport:u.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:Ns(c.paddingTop),paddingEnd:Ns(c.paddingBottom)}})}})}),[mT,i1]=t1($n),o1=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,sizes:i,hasThumb:s,onThumbChange:u,onThumbPointerUp:c,onThumbPointerDown:d,onThumbPositionChange:p,onDragScroll:m,onWheelScroll:x,onResize:y,...b}=t,S=jn($n,l),[k,N]=w.useState(null),T=Vt(r,se=>N(se)),j=w.useRef(null),M=w.useRef(""),z=S.viewport,F=i.content-i.viewport,P=hn(x),U=hn(p),G=_s(y,10);function le(se){if(j.current){const B=se.clientX-j.current.left,X=se.clientY-j.current.top;m({x:B,y:X})}}return w.useEffect(()=>{const se=B=>{const X=B.target;(k==null?void 0:k.contains(X))&&P(B,F)};return document.addEventListener("wheel",se,{passive:!1}),()=>document.removeEventListener("wheel",se,{passive:!1})},[z,k,F,P]),w.useEffect(U,[i,U]),xa(k,G),xa(S.content,G),h.jsx(mT,{scope:l,scrollbar:k,hasThumb:s,onThumbChange:hn(u),onThumbPointerUp:hn(c),onThumbPositionChange:U,onThumbPointerDown:hn(d),children:h.jsx(Tt.div,{...b,ref:T,style:{position:"absolute",...b.style},onPointerDown:pt(t.onPointerDown,se=>{se.button===0&&(se.target.setPointerCapture(se.pointerId),j.current=k.getBoundingClientRect(),M.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),le(se))}),onPointerMove:pt(t.onPointerMove,le),onPointerUp:pt(t.onPointerUp,se=>{const B=se.target;B.hasPointerCapture(se.pointerId)&&B.releasePointerCapture(se.pointerId),document.body.style.webkitUserSelect=M.current,S.viewport&&(S.viewport.style.scrollBehavior=""),j.current=null})})})}),Cs="ScrollAreaThumb",s1=w.forwardRef((t,r)=>{const{forceMount:l,...i}=t,s=i1(Cs,t.__scopeScrollArea);return h.jsx(cr,{present:l||s.hasThumb,children:h.jsx(pT,{ref:r,...i})})}),pT=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,style:i,...s}=t,u=jn(Cs,l),c=i1(Cs,l),{onThumbPositionChange:d}=c,p=Vt(r,y=>c.onThumbChange(y)),m=w.useRef(void 0),x=_s(()=>{m.current&&(m.current(),m.current=void 0)},100);return w.useEffect(()=>{const y=u.viewport;if(y){const b=()=>{if(x(),!m.current){const S=xT(y,d);m.current=S,d()}};return d(),y.addEventListener("scroll",b),()=>y.removeEventListener("scroll",b)}},[u.viewport,x,d]),h.jsx(Tt.div,{"data-state":c.hasThumb?"visible":"hidden",...s,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:pt(t.onPointerDownCapture,y=>{const S=y.target.getBoundingClientRect(),k=y.clientX-S.left,N=y.clientY-S.top;c.onThumbPointerDown({x:k,y:N})}),onPointerUp:pt(t.onPointerUp,c.onThumbPointerUp)})});s1.displayName=Cs;var Vd="ScrollAreaCorner",u1=w.forwardRef((t,r)=>{const l=jn(Vd,t.__scopeScrollArea),i=!!(l.scrollbarX&&l.scrollbarY);return l.type!=="scroll"&&i?h.jsx(gT,{...t,ref:r}):null});u1.displayName=Vd;var gT=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,...i}=t,s=jn(Vd,l),[u,c]=w.useState(0),[d,p]=w.useState(0),m=!!(u&&d);return xa(s.scrollbarX,()=>{var y;const x=((y=s.scrollbarX)==null?void 0:y.offsetHeight)||0;s.onCornerHeightChange(x),p(x)}),xa(s.scrollbarY,()=>{var y;const x=((y=s.scrollbarY)==null?void 0:y.offsetWidth)||0;s.onCornerWidthChange(x),c(x)}),m?h.jsx(Tt.div,{...i,ref:r,style:{width:u,height:d,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function Ns(t){return t?parseInt(t,10):0}function c1(t,r){const l=t/r;return isNaN(l)?0:l}function Os(t){const r=c1(t.viewport,t.content),l=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-l)*r;return Math.max(i,18)}function yT(t,r,l,i="ltr"){const s=Os(l),u=s/2,c=r||u,d=s-c,p=l.scrollbar.paddingStart+c,m=l.scrollbar.size-l.scrollbar.paddingEnd-d,x=l.content-l.viewport,y=i==="ltr"?[0,x]:[x*-1,0];return f1([p,m],y)(t)}function ax(t,r,l="ltr"){const i=Os(r),s=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,u=r.scrollbar.size-s,c=r.content-r.viewport,d=u-i,p=l==="ltr"?[0,c]:[c*-1,0],m=oT(t,p);return f1([0,c],[0,d])(m)}function f1(t,r){return l=>{if(t[0]===t[1]||r[0]===r[1])return r[0];const i=(r[1]-r[0])/(t[1]-t[0]);return r[0]+i*(l-t[0])}}function d1(t,r){return t>0&&t<r}var xT=(t,r=()=>{})=>{let l={left:t.scrollLeft,top:t.scrollTop},i=0;return(function s(){const u={left:t.scrollLeft,top:t.scrollTop},c=l.left!==u.left,d=l.top!==u.top;(c||d)&&r(),l=u,i=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(i)};function _s(t,r){const l=hn(t),i=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(i.current),[]),w.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(l,r)},[l,r])}function xa(t,r){const l=hn(r);ya(()=>{let i=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(l)});return s.observe(t),()=>{window.cancelAnimationFrame(i),s.unobserve(t)}}},[t,l])}var h1=n1,bT=l1,vT=u1;const Ls=w.forwardRef(({className:t,children:r,...l},i)=>h.jsxs(h1,{ref:i,className:me("relative overflow-hidden",t),...l,children:[h.jsx(bT,{className:"h-full w-full rounded-[inherit]",children:r}),h.jsx(m1,{}),h.jsx(vT,{})]}));Ls.displayName=h1.displayName;const m1=w.forwardRef(({className:t,orientation:r="vertical",...l},i)=>h.jsx(qd,{ref:i,orientation:r,className:me("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...l,children:h.jsx(s1,{className:"relative flex-1 rounded-full bg-border"})}));m1.displayName=qd.displayName;function wi(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(t>=1e4?0:1)}k`:String(t)}function ST(){const t=he(i=>i.thinkingBuffer);if(!t)return null;const l=t.split(`
562
+ `).slice(-6).join(`
563
+ `).trim();return h.jsxs("div",{className:"flex gap-3 animate-message",children:[h.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center bg-violet-500/10 text-violet-600 dark:text-violet-400 ring-2 ring-offset-2 ring-offset-background ring-violet-500/20",children:h.jsx(Ox,{className:"h-4 w-4 animate-pulse"})}),h.jsxs("div",{className:"flex flex-col gap-1 max-w-[85%] min-w-0",children:[h.jsx("span",{className:"text-xs font-medium text-violet-600 dark:text-violet-400 px-1",children:"Thinking…"}),h.jsx("div",{className:"rounded-2xl rounded-bl-md px-3 py-2 bg-violet-500/[0.04] border border-violet-500/20 text-foreground/80",children:h.jsx("pre",{className:"whitespace-pre-wrap break-words font-sans text-xs leading-relaxed italic max-h-32 overflow-hidden",children:l||"…"})})]})]})}function wT(){const{messages:t,isLoading:r}=he(),l=Ne(J=>J.setPaletteOpen),i=Ne(J=>J.setShortcutsOpen),s=Ne(J=>J.sidebarOpen),u=Ne(J=>J.toggleSidebar),c=Ne(J=>J.compactMode),d=Pe(J=>J.setTheme),p=Pe(J=>J.theme),{totalTokens:m,cost:x,startTime:y,lastInputTokens:b,maxContext:S,projectName:k,iteration:N}=Ge(),{wsConnected:T,wsStatus:j,provider:M,model:z}=Pe(),{setCurrentView:F}=Ne(),P=w.useRef(null),U=S>0&&b>0?Math.min(100,Math.round(b/S*100)):0,G=U>=85?"bg-red-500/15 text-red-600 dark:text-red-400":U>=70?"bg-amber-500/15 text-amber-600 dark:text-amber-400":"bg-muted text-muted-foreground",[le,se]=w.useState(!0),[B,X]=w.useState(0),[Q,de]=w.useState(!1),oe=w.useRef(t.length),q=w.useCallback(()=>{var J;return((J=P.current)==null?void 0:J.querySelector("[data-radix-scroll-area-viewport]"))??null},[]);w.useEffect(()=>{const J=q();if(!J)return;const ye=()=>{const Ae=J.scrollHeight-J.scrollTop-J.clientHeight<120;se(Ae),Ae&&(X(0),oe.current=t.length);const ht=J.scrollTop>J.clientHeight&&J.scrollHeight>J.clientHeight*2.5;de(ht)};return J.addEventListener("scroll",ye,{passive:!0}),()=>J.removeEventListener("scroll",ye)},[q,t.length]),w.useEffect(()=>{const J=q();if(J)if(le)J.scrollTop=J.scrollHeight,oe.current=t.length;else{const ye=t.length-oe.current;ye>0&&X(ye)}},[t,le,q]);const H=w.useCallback(()=>{const J=q();J&&(J.scrollTo({top:J.scrollHeight,behavior:"smooth"}),se(!0),X(0),oe.current=t.length)},[q,t.length]),te=w.useCallback(()=>{const J=q();J&&J.scrollTo({top:0,behavior:"smooth"})},[q]),[ae,Se]=w.useState(null),[D,A]=w.useState(()=>Date.now()),L=w.useRef(null);w.useEffect(()=>{r&&ae===null&&Se(Date.now()),!r&&ae!==null&&Se(null)},[r,ae]),w.useEffect(()=>{if(!r)return;const J=setInterval(()=>A(Date.now()),500);return()=>clearInterval(J)},[r]);const E=J=>{if(!J)return"--";const ye=Math.floor((Date.now()-J)/1e3);if(ye<60)return`${ye}s`;const ke=Math.floor(ye/60),Ae=ye%60;return`${ke}m ${Ae}s`},O=(()=>{if(!r)return"idle";const J=t[t.length-1];return(J==null?void 0:J.role)==="assistant"&&!!J.content&&J.streaming?"streaming":"thinking"})(),ee=O==="idle"?"bg-muted text-muted-foreground":O==="streaming"?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-amber-500/10 text-amber-600 dark:text-amber-400",ne=S>0&&b>0||m.input>0||!!y;return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("header",{className:"flex flex-col border-b bg-card shrink-0",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2",children:[h.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[!s&&h.jsx(Ve,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:u,title:"Open sidebar (Ctrl+\\\\)",children:h.jsx(n2,{className:"h-4 w-4"})}),!s&&h.jsx("div",{className:"flex items-center gap-1.5 shrink-0 mr-1",children:h.jsx("div",{className:"w-5 h-5 rounded bg-primary flex items-center justify-center",children:h.jsx(yd,{className:"h-3 w-3 text-primary-foreground"})})}),h.jsx(Z2,{wsStatus:j,wsConnected:T}),h.jsxs("span",{className:me("flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0 tabular-nums",ee),title:`Agent state: ${O}`,children:[O!=="idle"&&h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-pulse"}),h.jsx("span",{children:O})]}),k&&h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-muted-foreground shrink-0 min-w-0",title:`Project: ${k}`,children:[h.jsx(Yw,{className:"h-3 w-3 shrink-0"}),h.jsx("span",{className:"truncate max-w-[12rem]",children:k})]}),h.jsxs("button",{type:"button",onClick:()=>Ne.getState().setModelSwitcherOpen(!0),className:"group flex items-center gap-1 px-2 py-0.5 rounded-md border bg-background/50 hover:bg-accent hover:border-primary/40 transition-colors text-[11px] min-w-0 shrink-0",title:"Change provider / model (Ctrl+M)",children:[h.jsx(Ti,{className:"h-3 w-3 text-muted-foreground group-hover:text-foreground shrink-0"}),h.jsxs("span",{className:"font-mono truncate max-w-[16rem]",children:[h.jsx("span",{className:"text-muted-foreground",children:M||"no-provider"}),h.jsx("span",{className:"text-muted-foreground/40 mx-0.5",children:"/"}),h.jsx("span",{className:"font-medium",children:z||"no-model"})]})]}),h.jsx(q3,{}),N&&h.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium bg-primary/10 text-primary shrink-0",title:"Agent iteration",children:[h.jsx(Mw,{className:"h-3 w-3 animate-pulse"}),"iter ",N.index,N.max>0?`/${N.max}`:""]})]}),h.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[h.jsx(Ve,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>l(!0),title:"Command palette (Ctrl+K)",children:h.jsx(Bw,{className:"h-4 w-4"})}),h.jsx(Ve,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{d(p==="light"?"dark":p==="dark"?"system":"light")},title:`Theme: ${p} (click to cycle)`,children:p==="light"?h.jsx(md,{className:"h-4 w-4"}):p==="dark"?h.jsx(dd,{className:"h-4 w-4"}):h.jsx(fd,{className:"h-4 w-4"})}),h.jsx(Ve,{variant:"ghost",size:"icon",className:"h-7 w-7 font-mono text-xs",onClick:()=>i(!0),title:"Keyboard shortcuts (?)",children:"?"}),h.jsx(Ve,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>F("settings"),title:"Settings",children:h.jsx(hd,{className:"h-4 w-4"})})]})]}),ne&&h.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-1 border-t bg-muted/20 text-[11px] text-muted-foreground",children:[h.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 tabular-nums",children:[S>0&&b>0&&h.jsxs("span",{className:me("flex items-center gap-1 px-1.5 py-0.5 rounded-full font-medium shrink-0",G),title:`Last input: ${b.toLocaleString()} / ${S.toLocaleString()} tokens`,children:["ctx ",U,"% · ",wi(b),"/",wi(S)]}),m.input>0&&h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"font-medium text-foreground",children:wi(m.input)}),h.jsx("span",{children:"in"})]}),h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"font-medium text-foreground",children:wi(m.output)}),h.jsx("span",{children:"out"})]}),m.cacheRead&&m.cacheRead>0&&(()=>{const J=(m.cacheRead??0)+m.input,ye=J>0?Math.round((m.cacheRead??0)/J*100):0;return h.jsxs("span",{className:"flex items-center gap-1",title:`Cache hit ratio: ${ye}%`,children:[h.jsx("span",{className:"font-medium text-foreground",children:wi(m.cacheRead)}),h.jsxs("span",{children:["cache (",ye,"%)"]})]})})(),h.jsx(J2,{})]})]}),y&&h.jsx("span",{className:"text-muted-foreground/70 tabular-nums shrink-0",children:E(y)})]})]}),h.jsxs("div",{className:"flex-1 relative overflow-hidden",children:[h.jsx(I3,{}),!le&&h.jsxs("button",{type:"button",onClick:H,className:me("absolute bottom-4 left-1/2 -translate-x-1/2 z-10","flex items-center gap-2 px-4 py-2 rounded-full shadow-lg","bg-primary text-primary-foreground text-xs font-medium","hover:bg-primary/90 transition-colors animate-message"),children:[h.jsx(Mx,{className:"h-3.5 w-3.5"}),B>0?`${B} new message${B===1?"":"s"}`:"Jump to latest"]}),Q&&h.jsxs("button",{type:"button",onClick:te,title:"Scroll to top (oldest)",className:me("absolute top-3 right-3 z-10","flex items-center gap-1 px-2.5 py-1 rounded-full shadow-md border","bg-background/90 backdrop-blur-sm text-[11px] text-muted-foreground","hover:text-foreground hover:bg-background transition-colors animate-message"),children:[h.jsx(Rx,{className:"h-3 w-3"}),h.jsx("span",{children:"Top"})]}),h.jsx(Ls,{className:"h-full",ref:P,children:h.jsxs("div",{className:me("mx-auto pb-8",c?"max-w-5xl p-3 space-y-3":"max-w-5xl p-4 space-y-6"),children:[t.length===0&&!r&&h.jsx(G3,{}),(()=>{const J=[];for(let ge=0;ge<t.length;ge++){const ve=t[ge];if(ve.role==="tool"){const $e=J[J.length-1];$e&&$e.kind==="tools"?$e.tools.push(ve):J.push({kind:"tools",tools:[ve],key:ve.id})}else{const $e=t[ge-1];J.push({kind:"msg",message:ve,isFirst:!$e||$e.role!==ve.role})}}const ye=[];for(const ge of J){if(ge.kind==="msg"&&ge.message.role==="user"){ye.push({kind:"user",message:ge.message,key:ge.message.id});continue}const ve=ye[ye.length-1];if(ve&&ve.kind==="agent")ve.items.push(ge);else{const $e=ge.kind==="msg"?ge.message.id:ge.key;ye.push({kind:"agent",items:[ge],key:$e})}}let ke=null;const Ae=ge=>{const ve=new Date(ge);return`${ve.getFullYear()}-${ve.getMonth()}-${ve.getDate()}`},ht=ge=>{const ve=new Date(ge),$e=new Date,nt=new Date(Date.now()-864e5);return Ae(ge)===Ae($e.getTime())?"Today":Ae(ge)===Ae(nt.getTime())?"Yesterday":ve.toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric",year:ve.getFullYear()===$e.getFullYear()?void 0:"numeric"})},yt=ge=>{if(ge.kind==="user")return ge.message.timestamp;const ve=ge.items[0];return ve.kind==="msg"?ve.message.timestamp:ve.tools[0].timestamp},Le=[];for(let ge=0;ge<ye.length;ge++){const ve=ye[ge],$e=yt(ve),nt=Ae($e);if(nt!==ke&&(Le.push(h.jsxs("div",{className:"flex items-center gap-3 py-1 text-[11px] text-muted-foreground/70 uppercase tracking-wider font-medium",children:[h.jsx("div",{className:"flex-1 h-px bg-border/50"}),h.jsx("span",{children:ht($e)}),h.jsx("div",{className:"flex-1 h-px bg-border/50"})]},`day-${nt}-${ge}`)),ke=nt),ve.kind==="user"){Le.push(h.jsx(ws,{message:ve.message,isFirst:!0},ve.key));continue}const Ft=ge===ye.length-1;Le.push(h.jsx("div",{className:me(c?"space-y-1":"space-y-1.5"),children:ve.items.map((Qe,Mt)=>{const pn=Mt>0;if(Qe.kind==="msg")return h.jsx(ws,{message:Qe.message,isFirst:!pn&&Qe.isFirst,isContinuation:pn},Qe.message.id);const Gr=Ft&&Mt===ve.items.length-1&&r&&Qe.tools.some(fr=>fr.toolResult===void 0);return h.jsx($3,{tools:Qe.tools,defaultOpen:Gr,isContinuation:pn},Qe.key)})},ve.key))}return Le})(),h.jsx(ST,{}),r&&(()=>{const J=t[t.length-1],ye=t.filter(ge=>ge.role==="tool"&&ge.toolResult===void 0);let ke="Thinking…";if(ye.length>0){const ge=Array.from(new Set(ye.map(nt=>nt.toolName).filter(Boolean))),ve=ge.slice(0,2).join(", "),$e=ge.length>2?` +${ge.length-2}`:"";ke=ye.length===1?`Running ${ve||"tool"}…`:`Running ${ye.length} tools (${ve}${$e})…`}else(J==null?void 0:J.role)==="assistant"&&J.content?ke="Writing reply…":(J==null?void 0:J.role)==="tool"&&J.toolResult!==void 0&&(ke="Thinking about the next step…");const Ae=ae?Math.max(0,Math.floor((D-ae)/1e3)):0,ht=Ae<60?`${Ae}s`:`${Math.floor(Ae/60)}m ${Ae%60}s`;let yt="";const Le=(J==null?void 0:J.role)==="assistant"&&J.streaming&&J.content?J:null;if(Le){const ge=L.current;if(!ge||ge.id!==Le.id)L.current={id:Le.id,at:Date.now(),len:Le.content.length};else{const ve=Math.max(1,D-ge.at),$e=Math.max(0,Le.content.length-ge.len);if(ve>500&&$e>0){const nt=$e*1e3/ve;yt=nt>=1e3?`${(nt/1e3).toFixed(1)}k ch/s`:`${Math.round(nt)} ch/s`}}}else L.current&&(L.current=null);return h.jsxs("div",{className:"flex gap-3 animate-message",children:[h.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center bg-accent text-accent-foreground ring-2 ring-offset-2 ring-offset-background ring-accent/20",children:h.jsx(zx,{className:"h-4 w-4"})}),h.jsx("div",{className:"flex flex-col gap-1.5",children:h.jsx("div",{className:"rounded-2xl px-4 py-3 bg-card border text-foreground",children:h.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[h.jsxs("span",{className:"flex gap-1",children:[h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary/70 animate-bounce [animation-delay:-0.3s]"}),h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary/70 animate-bounce [animation-delay:-0.15s]"}),h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary/70 animate-bounce"})]}),h.jsx("span",{className:"text-foreground/90",children:ke}),h.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:ht}),N&&h.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:["· iter ",N.index,N.max>0?`/${N.max}`:""]}),yt&&h.jsxs("span",{className:"text-xs text-muted-foreground/80 tabular-nums",children:["· ",yt]})]})})})]})})()]})})]}),h.jsx("div",{className:"border-t bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/50 p-4 shrink-0",children:h.jsxs("div",{className:"max-w-5xl mx-auto",children:[h.jsx(K2,{}),h.jsx("p",{className:"text-xs text-center text-muted-foreground/50 mt-2",children:"Press Enter to send, Shift+Enter for new line"})]})})]})}var kT=od[" useId ".trim().toString()]||(()=>{}),CT=0;function ji(t){const[r,l]=w.useState(kT());return ya(()=>{l(i=>i??String(CT++))},[t]),r?`radix-${r}`:""}var NT=od[" useInsertionEffect ".trim().toString()]||ya;function $d({prop:t,defaultProp:r,onChange:l=()=>{},caller:i}){const[s,u,c]=ET({defaultProp:r,onChange:l}),d=t!==void 0,p=d?t:s;{const x=w.useRef(t!==void 0);w.useEffect(()=>{const y=x.current;y!==d&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=d},[d,i])}const m=w.useCallback(x=>{var y;if(d){const b=jT(x)?x(t):x;b!==t&&((y=c.current)==null||y.call(c,b))}else u(x)},[d,t,u,c]);return[p,m]}function ET({defaultProp:t,onChange:r}){const[l,i]=w.useState(t),s=w.useRef(l),u=w.useRef(r);return NT(()=>{u.current=r},[r]),w.useEffect(()=>{var c;s.current!==l&&((c=u.current)==null||c.call(u,l),s.current=l)},[l,s]),[l,i,u]}function jT(t){return typeof t=="function"}function TT(t,r=globalThis==null?void 0:globalThis.document){const l=hn(t);w.useEffect(()=>{const i=s=>{s.key==="Escape"&&l(s)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[l,r])}var AT="DismissableLayer",nd="dismissableLayer.update",MT="dismissableLayer.pointerDownOutside",DT="dismissableLayer.focusOutside",ix,p1=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),g1=w.forwardRef((t,r)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:c,onDismiss:d,...p}=t,m=w.useContext(p1),[x,y]=w.useState(null),b=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=w.useState({}),k=Vt(r,G=>y(G)),N=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),j=N.indexOf(T),M=x?N.indexOf(x):-1,z=m.layersWithOutsidePointerEventsDisabled.size>0,F=M>=j,P=OT(G=>{const le=G.target,se=[...m.branches].some(B=>B.contains(le));!F||se||(s==null||s(G),c==null||c(G),G.defaultPrevented||d==null||d())},b),U=_T(G=>{const le=G.target;[...m.branches].some(B=>B.contains(le))||(u==null||u(G),c==null||c(G),G.defaultPrevented||d==null||d())},b);return TT(G=>{M===m.layers.size-1&&(i==null||i(G),!G.defaultPrevented&&d&&(G.preventDefault(),d()))},b),w.useEffect(()=>{if(x)return l&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(ix=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(x)),m.layers.add(x),ox(),()=>{l&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=ix)}},[x,b,l,m]),w.useEffect(()=>()=>{x&&(m.layers.delete(x),m.layersWithOutsidePointerEventsDisabled.delete(x),ox())},[x,m]),w.useEffect(()=>{const G=()=>S({});return document.addEventListener(nd,G),()=>document.removeEventListener(nd,G)},[]),h.jsx(Tt.div,{...p,ref:k,style:{pointerEvents:z?F?"auto":"none":void 0,...t.style},onFocusCapture:pt(t.onFocusCapture,U.onFocusCapture),onBlurCapture:pt(t.onBlurCapture,U.onBlurCapture),onPointerDownCapture:pt(t.onPointerDownCapture,P.onPointerDownCapture)})});g1.displayName=AT;var RT="DismissableLayerBranch",zT=w.forwardRef((t,r)=>{const l=w.useContext(p1),i=w.useRef(null),s=Vt(r,i);return w.useEffect(()=>{const u=i.current;if(u)return l.branches.add(u),()=>{l.branches.delete(u)}},[l.branches]),h.jsx(Tt.div,{...t,ref:s})});zT.displayName=RT;function OT(t,r=globalThis==null?void 0:globalThis.document){const l=hn(t),i=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const u=d=>{if(d.target&&!i.current){let p=function(){y1(MT,l,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(r.removeEventListener("click",s.current),s.current=p,r.addEventListener("click",s.current,{once:!0})):p()}else r.removeEventListener("click",s.current);i.current=!1},c=window.setTimeout(()=>{r.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(c),r.removeEventListener("pointerdown",u),r.removeEventListener("click",s.current)}},[r,l]),{onPointerDownCapture:()=>i.current=!0}}function _T(t,r=globalThis==null?void 0:globalThis.document){const l=hn(t),i=w.useRef(!1);return w.useEffect(()=>{const s=u=>{u.target&&!i.current&&y1(DT,l,{originalEvent:u},{discrete:!1})};return r.addEventListener("focusin",s),()=>r.removeEventListener("focusin",s)},[r,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function ox(){const t=new CustomEvent(nd);document.dispatchEvent(t)}function y1(t,r,l,{discrete:i}){const s=l.originalEvent.target,u=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:l});r&&s.addEventListener(t,r,{once:!0}),i?eT(s,u):s.dispatchEvent(u)}var Af="focusScope.autoFocusOnMount",Mf="focusScope.autoFocusOnUnmount",sx={bubbles:!1,cancelable:!0},LT="FocusScope",x1=w.forwardRef((t,r)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...c}=t,[d,p]=w.useState(null),m=hn(s),x=hn(u),y=w.useRef(null),b=Vt(r,N=>p(N)),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(i){let N=function(z){if(S.paused||!d)return;const F=z.target;d.contains(F)?y.current=F:Ir(y.current,{select:!0})},T=function(z){if(S.paused||!d)return;const F=z.relatedTarget;F!==null&&(d.contains(F)||Ir(y.current,{select:!0}))},j=function(z){if(document.activeElement===document.body)for(const P of z)P.removedNodes.length>0&&Ir(d)};document.addEventListener("focusin",N),document.addEventListener("focusout",T);const M=new MutationObserver(j);return d&&M.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",T),M.disconnect()}}},[i,d,S.paused]),w.useEffect(()=>{if(d){cx.add(S);const N=document.activeElement;if(!d.contains(N)){const j=new CustomEvent(Af,sx);d.addEventListener(Af,m),d.dispatchEvent(j),j.defaultPrevented||(UT(VT(b1(d)),{select:!0}),document.activeElement===N&&Ir(d))}return()=>{d.removeEventListener(Af,m),setTimeout(()=>{const j=new CustomEvent(Mf,sx);d.addEventListener(Mf,x),d.dispatchEvent(j),j.defaultPrevented||Ir(N??document.body,{select:!0}),d.removeEventListener(Mf,x),cx.remove(S)},0)}}},[d,m,x,S]);const k=w.useCallback(N=>{if(!l&&!i||S.paused)return;const T=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,j=document.activeElement;if(T&&j){const M=N.currentTarget,[z,F]=BT(M);z&&F?!N.shiftKey&&j===F?(N.preventDefault(),l&&Ir(z,{select:!0})):N.shiftKey&&j===z&&(N.preventDefault(),l&&Ir(F,{select:!0})):j===M&&N.preventDefault()}},[l,i,S.paused]);return h.jsx(Tt.div,{tabIndex:-1,...c,ref:b,onKeyDown:k})});x1.displayName=LT;function UT(t,{select:r=!1}={}){const l=document.activeElement;for(const i of t)if(Ir(i,{select:r}),document.activeElement!==l)return}function BT(t){const r=b1(t),l=ux(r,t),i=ux(r.reverse(),t);return[l,i]}function b1(t){const r=[],l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)r.push(l.currentNode);return r}function ux(t,r){for(const l of t)if(!HT(l,{upTo:r}))return l}function HT(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function qT(t){return t instanceof HTMLInputElement&&"select"in t}function Ir(t,{select:r=!1}={}){if(t&&t.focus){const l=document.activeElement;t.focus({preventScroll:!0}),t!==l&&qT(t)&&r&&t.select()}}var cx=IT();function IT(){let t=[];return{add(r){const l=t[0];r!==l&&(l==null||l.pause()),t=fx(t,r),t.unshift(r)},remove(r){var l;t=fx(t,r),(l=t[0])==null||l.resume()}}}function fx(t,r){const l=[...t],i=l.indexOf(r);return i!==-1&&l.splice(i,1),l}function VT(t){return t.filter(r=>r.tagName!=="A")}var $T="Portal",v1=w.forwardRef((t,r)=>{var d;const{container:l,...i}=t,[s,u]=w.useState(!1);ya(()=>u(!0),[]);const c=l||s&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?P3.createPortal(h.jsx(Tt.div,{...i,ref:r}),c):null});v1.displayName=$T;var Df=0;function FT(){w.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??dx()),document.body.insertAdjacentElement("beforeend",t[1]??dx()),Df++,()=>{Df===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Df--}},[])}function dx(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Hn=function(){return Hn=Object.assign||function(r){for(var l,i=1,s=arguments.length;i<s;i++){l=arguments[i];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(r[u]=l[u])}return r},Hn.apply(this,arguments)};function S1(t,r){var l={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(l[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)r.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(l[i[s]]=t[i[s]]);return l}function YT(t,r,l){if(l||arguments.length===2)for(var i=0,s=r.length,u;i<s;i++)(u||!(i in r))&&(u||(u=Array.prototype.slice.call(r,0,i)),u[i]=r[i]);return t.concat(u||Array.prototype.slice.call(r))}var ps="right-scroll-bar-position",gs="width-before-scroll-bar",GT="with-scroll-bars-hidden",PT="--removed-body-scroll-bar-size";function Rf(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function XT(t,r){var l=w.useState(function(){return{value:t,callback:r,facade:{get current(){return l.value},set current(i){var s=l.value;s!==i&&(l.value=i,l.callback(i,s))}}}})[0];return l.callback=r,l.facade}var QT=typeof window<"u"?w.useLayoutEffect:w.useEffect,hx=new WeakMap;function KT(t,r){var l=XT(null,function(i){return t.forEach(function(s){return Rf(s,i)})});return QT(function(){var i=hx.get(l);if(i){var s=new Set(i),u=new Set(t),c=l.current;s.forEach(function(d){u.has(d)||Rf(d,null)}),u.forEach(function(d){s.has(d)||Rf(d,c)})}hx.set(l,t)},[t]),l}function ZT(t){return t}function JT(t,r){r===void 0&&(r=ZT);var l=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:t},useMedium:function(u){var c=r(u,i);return l.push(c),function(){l=l.filter(function(d){return d!==c})}},assignSyncMedium:function(u){for(i=!0;l.length;){var c=l;l=[],c.forEach(u)}l={push:function(d){return u(d)},filter:function(){return l}}},assignMedium:function(u){i=!0;var c=[];if(l.length){var d=l;l=[],d.forEach(u),c=l}var p=function(){var x=c;c=[],x.forEach(u)},m=function(){return Promise.resolve().then(p)};m(),l={push:function(x){c.push(x),m()},filter:function(x){return c=c.filter(x),l}}}};return s}function WT(t){t===void 0&&(t={});var r=JT(null);return r.options=Hn({async:!0,ssr:!1},t),r}var w1=function(t){var r=t.sideCar,l=S1(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return w.createElement(i,Hn({},l))};w1.isSideCarExport=!0;function eA(t,r){return t.useMedium(r),w1}var k1=WT(),zf=function(){},Us=w.forwardRef(function(t,r){var l=w.useRef(null),i=w.useState({onScrollCapture:zf,onWheelCapture:zf,onTouchMoveCapture:zf}),s=i[0],u=i[1],c=t.forwardProps,d=t.children,p=t.className,m=t.removeScrollBar,x=t.enabled,y=t.shards,b=t.sideCar,S=t.noRelative,k=t.noIsolation,N=t.inert,T=t.allowPinchZoom,j=t.as,M=j===void 0?"div":j,z=t.gapMode,F=S1(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=b,U=KT([l,r]),G=Hn(Hn({},F),s);return w.createElement(w.Fragment,null,x&&w.createElement(P,{sideCar:k1,removeScrollBar:m,shards:y,noRelative:S,noIsolation:k,inert:N,setCallbacks:u,allowPinchZoom:!!T,lockRef:l,gapMode:z}),c?w.cloneElement(w.Children.only(d),Hn(Hn({},G),{ref:U})):w.createElement(M,Hn({},G,{className:p,ref:U}),d))});Us.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Us.classNames={fullWidth:gs,zeroRight:ps};var tA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nA(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=tA();return r&&t.setAttribute("nonce",r),t}function rA(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function lA(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var aA=function(){var t=0,r=null;return{add:function(l){t==0&&(r=nA())&&(rA(r,l),lA(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},iA=function(){var t=aA();return function(r,l){w.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&l])}},C1=function(){var t=iA(),r=function(l){var i=l.styles,s=l.dynamic;return t(i,s),null};return r},oA={left:0,top:0,right:0,gap:0},Of=function(t){return parseInt(t||"",10)||0},sA=function(t){var r=window.getComputedStyle(document.body),l=r[t==="padding"?"paddingLeft":"marginLeft"],i=r[t==="padding"?"paddingTop":"marginTop"],s=r[t==="padding"?"paddingRight":"marginRight"];return[Of(l),Of(i),Of(s)]},uA=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return oA;var r=sA(t),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-l+r[2]-r[0])}},cA=C1(),da="data-scroll-locked",fA=function(t,r,l,i){var s=t.left,u=t.top,c=t.right,d=t.gap;return l===void 0&&(l="margin"),`
564
+ .`.concat(GT,` {
565
+ overflow: hidden `).concat(i,`;
566
+ padding-right: `).concat(d,"px ").concat(i,`;
567
+ }
568
+ body[`).concat(da,`] {
569
+ overflow: hidden `).concat(i,`;
570
+ overscroll-behavior: contain;
571
+ `).concat([r&&"position: relative ".concat(i,";"),l==="margin"&&`
572
+ padding-left: `.concat(s,`px;
573
+ padding-top: `).concat(u,`px;
574
+ padding-right: `).concat(c,`px;
575
+ margin-left:0;
576
+ margin-top:0;
577
+ margin-right: `).concat(d,"px ").concat(i,`;
578
+ `),l==="padding"&&"padding-right: ".concat(d,"px ").concat(i,";")].filter(Boolean).join(""),`
579
+ }
580
+
581
+ .`).concat(ps,` {
582
+ right: `).concat(d,"px ").concat(i,`;
583
+ }
584
+
585
+ .`).concat(gs,` {
586
+ margin-right: `).concat(d,"px ").concat(i,`;
587
+ }
588
+
589
+ .`).concat(ps," .").concat(ps,` {
590
+ right: 0 `).concat(i,`;
591
+ }
592
+
593
+ .`).concat(gs," .").concat(gs,` {
594
+ margin-right: 0 `).concat(i,`;
595
+ }
596
+
597
+ body[`).concat(da,`] {
598
+ `).concat(PT,": ").concat(d,`px;
599
+ }
600
+ `)},mx=function(){var t=parseInt(document.body.getAttribute(da)||"0",10);return isFinite(t)?t:0},dA=function(){w.useEffect(function(){return document.body.setAttribute(da,(mx()+1).toString()),function(){var t=mx()-1;t<=0?document.body.removeAttribute(da):document.body.setAttribute(da,t.toString())}},[])},hA=function(t){var r=t.noRelative,l=t.noImportant,i=t.gapMode,s=i===void 0?"margin":i;dA();var u=w.useMemo(function(){return uA(s)},[s]);return w.createElement(cA,{styles:fA(u,!r,s,l?"":"!important")})},rd=!1;if(typeof window<"u")try{var us=Object.defineProperty({},"passive",{get:function(){return rd=!0,!0}});window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{rd=!1}var ia=rd?{passive:!1}:!1,mA=function(t){return t.tagName==="TEXTAREA"},N1=function(t,r){if(!(t instanceof Element))return!1;var l=window.getComputedStyle(t);return l[r]!=="hidden"&&!(l.overflowY===l.overflowX&&!mA(t)&&l[r]==="visible")},pA=function(t){return N1(t,"overflowY")},gA=function(t){return N1(t,"overflowX")},px=function(t,r){var l=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=E1(t,i);if(s){var u=j1(t,i),c=u[1],d=u[2];if(c>d)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},yA=function(t){var r=t.scrollTop,l=t.scrollHeight,i=t.clientHeight;return[r,l,i]},xA=function(t){var r=t.scrollLeft,l=t.scrollWidth,i=t.clientWidth;return[r,l,i]},E1=function(t,r){return t==="v"?pA(r):gA(r)},j1=function(t,r){return t==="v"?yA(r):xA(r)},bA=function(t,r){return t==="h"&&r==="rtl"?-1:1},vA=function(t,r,l,i,s){var u=bA(t,window.getComputedStyle(r).direction),c=u*i,d=l.target,p=r.contains(d),m=!1,x=c>0,y=0,b=0;do{if(!d)break;var S=j1(t,d),k=S[0],N=S[1],T=S[2],j=N-T-u*k;(k||j)&&E1(t,d)&&(y+=j,b+=k);var M=d.parentNode;d=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!p&&d!==document.body||p&&(r.contains(d)||r===d));return(x&&Math.abs(y)<1||!x&&Math.abs(b)<1)&&(m=!0),m},cs=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},gx=function(t){return[t.deltaX,t.deltaY]},yx=function(t){return t&&"current"in t?t.current:t},SA=function(t,r){return t[0]===r[0]&&t[1]===r[1]},wA=function(t){return`
601
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
602
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
603
+ `)},kA=0,oa=[];function CA(t){var r=w.useRef([]),l=w.useRef([0,0]),i=w.useRef(),s=w.useState(kA++)[0],u=w.useState(C1)[0],c=w.useRef(t);w.useEffect(function(){c.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var N=YT([t.lockRef.current],(t.shards||[]).map(yx),!0).filter(Boolean);return N.forEach(function(T){return T.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),N.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var d=w.useCallback(function(N,T){if("touches"in N&&N.touches.length===2||N.type==="wheel"&&N.ctrlKey)return!c.current.allowPinchZoom;var j=cs(N),M=l.current,z="deltaX"in N?N.deltaX:M[0]-j[0],F="deltaY"in N?N.deltaY:M[1]-j[1],P,U=N.target,G=Math.abs(z)>Math.abs(F)?"h":"v";if("touches"in N&&G==="h"&&U.type==="range")return!1;var le=window.getSelection(),se=le&&le.anchorNode,B=se?se===U||se.contains(U):!1;if(B)return!1;var X=px(G,U);if(!X)return!0;if(X?P=G:(P=G==="v"?"h":"v",X=px(G,U)),!X)return!1;if(!i.current&&"changedTouches"in N&&(z||F)&&(i.current=P),!P)return!0;var Q=i.current||P;return vA(Q,T,N,Q==="h"?z:F)},[]),p=w.useCallback(function(N){var T=N;if(!(!oa.length||oa[oa.length-1]!==u)){var j="deltaY"in T?gx(T):cs(T),M=r.current.filter(function(P){return P.name===T.type&&(P.target===T.target||T.target===P.shadowParent)&&SA(P.delta,j)})[0];if(M&&M.should){T.cancelable&&T.preventDefault();return}if(!M){var z=(c.current.shards||[]).map(yx).filter(Boolean).filter(function(P){return P.contains(T.target)}),F=z.length>0?d(T,z[0]):!c.current.noIsolation;F&&T.cancelable&&T.preventDefault()}}},[]),m=w.useCallback(function(N,T,j,M){var z={name:N,delta:T,target:j,should:M,shadowParent:NA(j)};r.current.push(z),setTimeout(function(){r.current=r.current.filter(function(F){return F!==z})},1)},[]),x=w.useCallback(function(N){l.current=cs(N),i.current=void 0},[]),y=w.useCallback(function(N){m(N.type,gx(N),N.target,d(N,t.lockRef.current))},[]),b=w.useCallback(function(N){m(N.type,cs(N),N.target,d(N,t.lockRef.current))},[]);w.useEffect(function(){return oa.push(u),t.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:b}),document.addEventListener("wheel",p,ia),document.addEventListener("touchmove",p,ia),document.addEventListener("touchstart",x,ia),function(){oa=oa.filter(function(N){return N!==u}),document.removeEventListener("wheel",p,ia),document.removeEventListener("touchmove",p,ia),document.removeEventListener("touchstart",x,ia)}},[]);var S=t.removeScrollBar,k=t.inert;return w.createElement(w.Fragment,null,k?w.createElement(u,{styles:wA(s)}):null,S?w.createElement(hA,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function NA(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const EA=eA(k1,CA);var T1=w.forwardRef(function(t,r){return w.createElement(Us,Hn({},t,{ref:r,sideCar:EA}))});T1.classNames=Us.classNames;var jA=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},sa=new WeakMap,fs=new WeakMap,ds={},_f=0,A1=function(t){return t&&(t.host||A1(t.parentNode))},TA=function(t,r){return r.map(function(l){if(t.contains(l))return l;var i=A1(l);return i&&t.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",t,". Doing nothing"),null)}).filter(function(l){return!!l})},AA=function(t,r,l,i){var s=TA(r,Array.isArray(t)?t:[t]);ds[l]||(ds[l]=new WeakMap);var u=ds[l],c=[],d=new Set,p=new Set(s),m=function(y){!y||d.has(y)||(d.add(y),m(y.parentNode))};s.forEach(m);var x=function(y){!y||p.has(y)||Array.prototype.forEach.call(y.children,function(b){if(d.has(b))x(b);else try{var S=b.getAttribute(i),k=S!==null&&S!=="false",N=(sa.get(b)||0)+1,T=(u.get(b)||0)+1;sa.set(b,N),u.set(b,T),c.push(b),N===1&&k&&fs.set(b,!0),T===1&&b.setAttribute(l,"true"),k||b.setAttribute(i,"true")}catch(j){console.error("aria-hidden: cannot operate on ",b,j)}})};return x(r),d.clear(),_f++,function(){c.forEach(function(y){var b=sa.get(y)-1,S=u.get(y)-1;sa.set(y,b),u.set(y,S),b||(fs.has(y)||y.removeAttribute(i),fs.delete(y)),S||y.removeAttribute(l)}),_f--,_f||(sa=new WeakMap,sa=new WeakMap,fs=new WeakMap,ds={})}},MA=function(t,r,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),s=jA(t);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),AA(i,s,l,"aria-hidden")):function(){return null}},Bs="Dialog",[M1]=Ui(Bs),[DA,zn]=M1(Bs),D1=t=>{const{__scopeDialog:r,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:c=!0}=t,d=w.useRef(null),p=w.useRef(null),[m,x]=$d({prop:i,defaultProp:s??!1,onChange:u,caller:Bs});return h.jsx(DA,{scope:r,triggerRef:d,contentRef:p,contentId:ji(),titleId:ji(),descriptionId:ji(),open:m,onOpenChange:x,onOpenToggle:w.useCallback(()=>x(y=>!y),[x]),modal:c,children:l})};D1.displayName=Bs;var R1="DialogTrigger",RA=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=zn(R1,l),u=Vt(r,s.triggerRef);return h.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Gd(s.open),...i,ref:u,onClick:pt(t.onClick,s.onOpenToggle)})});RA.displayName=R1;var Fd="DialogPortal",[zA,z1]=M1(Fd,{forceMount:void 0}),O1=t=>{const{__scopeDialog:r,forceMount:l,children:i,container:s}=t,u=zn(Fd,r);return h.jsx(zA,{scope:r,forceMount:l,children:w.Children.map(i,c=>h.jsx(cr,{present:l||u.open,children:h.jsx(v1,{asChild:!0,container:s,children:c})}))})};O1.displayName=Fd;var Es="DialogOverlay",_1=w.forwardRef((t,r)=>{const l=z1(Es,t.__scopeDialog),{forceMount:i=l.forceMount,...s}=t,u=zn(Es,t.__scopeDialog);return u.modal?h.jsx(cr,{present:i||u.open,children:h.jsx(_A,{...s,ref:r})}):null});_1.displayName=Es;var OA=ks("DialogOverlay.RemoveScroll"),_A=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=zn(Es,l);return h.jsx(T1,{as:OA,allowPinchZoom:!0,shards:[s.contentRef],children:h.jsx(Tt.div,{"data-state":Gd(s.open),...i,ref:r,style:{pointerEvents:"auto",...i.style}})})}),yl="DialogContent",L1=w.forwardRef((t,r)=>{const l=z1(yl,t.__scopeDialog),{forceMount:i=l.forceMount,...s}=t,u=zn(yl,t.__scopeDialog);return h.jsx(cr,{present:i||u.open,children:u.modal?h.jsx(LA,{...s,ref:r}):h.jsx(UA,{...s,ref:r})})});L1.displayName=yl;var LA=w.forwardRef((t,r)=>{const l=zn(yl,t.__scopeDialog),i=w.useRef(null),s=Vt(r,l.contentRef,i);return w.useEffect(()=>{const u=i.current;if(u)return MA(u)},[]),h.jsx(U1,{...t,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pt(t.onCloseAutoFocus,u=>{var c;u.preventDefault(),(c=l.triggerRef.current)==null||c.focus()}),onPointerDownOutside:pt(t.onPointerDownOutside,u=>{const c=u.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&u.preventDefault()}),onFocusOutside:pt(t.onFocusOutside,u=>u.preventDefault())})}),UA=w.forwardRef((t,r)=>{const l=zn(yl,t.__scopeDialog),i=w.useRef(!1),s=w.useRef(!1);return h.jsx(U1,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var c,d;(c=t.onCloseAutoFocus)==null||c.call(t,u),u.defaultPrevented||(i.current||(d=l.triggerRef.current)==null||d.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{var p,m;(p=t.onInteractOutside)==null||p.call(t,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=u.target;((m=l.triggerRef.current)==null?void 0:m.contains(c))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),U1=w.forwardRef((t,r)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...c}=t,d=zn(yl,l),p=w.useRef(null),m=Vt(r,p);return FT(),h.jsxs(h.Fragment,{children:[h.jsx(x1,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:h.jsx(g1,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Gd(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(BA,{titleId:d.titleId}),h.jsx(qA,{contentRef:p,descriptionId:d.descriptionId})]})]})}),Yd="DialogTitle",B1=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=zn(Yd,l);return h.jsx(Tt.h2,{id:s.titleId,...i,ref:r})});B1.displayName=Yd;var H1="DialogDescription",q1=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=zn(H1,l);return h.jsx(Tt.p,{id:s.descriptionId,...i,ref:r})});q1.displayName=H1;var I1="DialogClose",V1=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=zn(I1,l);return h.jsx(Tt.button,{type:"button",...i,ref:r,onClick:pt(t.onClick,()=>s.onOpenChange(!1))})});V1.displayName=I1;function Gd(t){return t?"open":"closed"}var $1="DialogTitleWarning",[v5,F1]=lT($1,{contentName:yl,titleName:Yd,docsSlug:"dialog"}),BA=({titleId:t})=>{const r=F1($1),l=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
604
+
605
+ If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
606
+
607
+ For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return w.useEffect(()=>{t&&(document.getElementById(t)||console.error(l))},[l,t]),null},HA="DialogDescriptionWarning",qA=({contentRef:t,descriptionId:r})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${F1(HA).contentName}}.`;return w.useEffect(()=>{var u;const s=(u=t.current)==null?void 0:u.getAttribute("aria-describedby");r&&s&&(document.getElementById(r)||console.warn(i))},[i,t,r]),null},IA=D1,VA=O1,Y1=_1,G1=L1,P1=B1,X1=q1,$A=V1;const xx=IA,FA=VA,Q1=w.forwardRef(({className:t,...r},l)=>h.jsx(Y1,{ref:l,className:me("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r}));Q1.displayName=Y1.displayName;const ld=w.forwardRef(({className:t,children:r,...l},i)=>h.jsxs(FA,{children:[h.jsx(Q1,{}),h.jsxs(G1,{ref:i,className:me("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...l,children:[r,h.jsxs($A,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h.jsx(xl,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ld.displayName=G1.displayName;const K1=({className:t,...r})=>h.jsx("div",{className:me("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});K1.displayName="DialogHeader";const Z1=({className:t,...r})=>h.jsx("div",{className:me("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r});Z1.displayName="DialogFooter";const J1=w.forwardRef(({className:t,...r},l)=>h.jsx(P1,{ref:l,className:me("text-lg font-semibold leading-none tracking-tight",t),...r}));J1.displayName=P1.displayName;const W1=w.forwardRef(({className:t,...r},l)=>h.jsx(X1,{ref:l,className:me("text-sm text-muted-foreground",t),...r}));W1.displayName=X1.displayName;function YA(t){return/edit|write|create|patch/i.test(t)?$w:/bash|shell|exec|run|command/i.test(t)?ma:/fetch|http|web|curl|request/i.test(t)?ki:gd}function GA({toolName:t,input:r}){const l=W0(t,r);if(l)return h.jsx("div",{className:"rounded-lg overflow-hidden border",children:h.jsx(J0,{oldText:l.oldText,newText:l.newText,caption:l.caption})});if(typeof r=="object"&&r!==null){const i=r,s=i.command??i.cmd??i.script;if(typeof s=="string"&&s.trim().length>0)return h.jsxs("div",{className:"rounded-lg border bg-background/40 overflow-hidden",children:[h.jsxs("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted-foreground border-b bg-muted/40 flex items-center gap-1.5",children:[h.jsx(ma,{className:"h-3 w-3"}),h.jsx("span",{children:"Command"})]}),h.jsxs("pre",{className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-all max-h-40 overflow-auto",children:["$",s]})]});const u=i.url;if(typeof u=="string"){const c=i.method??"GET";return h.jsxs("div",{className:"rounded-lg border bg-background/40 px-3 py-2 text-xs font-mono",children:[h.jsx("span",{className:"text-muted-foreground",children:c.toUpperCase()})," ",h.jsx("span",{className:"break-all",children:u})]})}}return h.jsxs("div",{className:"p-3 rounded-lg bg-muted/50 border text-xs font-mono",children:[h.jsx("div",{className:"text-muted-foreground mb-2",children:"Input:"}),h.jsx("pre",{className:"whitespace-pre-wrap break-all max-h-60 overflow-auto",children:JSON.stringify(r,null,2)})]})}function PA(){const{showConfirmDialog:t,confirmInfo:r,hideConfirm:l}=Ne(),{sendConfirm:i}=In(),s=d=>{r&&i(r.id,d),l()};if(w.useEffect(()=>{if(!t)return;const d=p=>{var y;const m=p.target,x=(y=m==null?void 0:m.tagName)==null?void 0:y.toLowerCase();x==="input"||x==="textarea"||(p.key==="y"||p.key==="Y"?(p.preventDefault(),s("yes")):p.key==="n"||p.key==="N"||p.key==="Escape"?(p.preventDefault(),s("no")):(p.key==="a"||p.key==="A")&&(p.preventDefault(),s("always")))};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[t,r==null?void 0:r.id]),!r)return h.jsx(xx,{open:t,onOpenChange:()=>l(),children:h.jsx(ld,{})});const u=YA(r.toolName),c=/edit|write/i.test(r.toolName);return h.jsx(xx,{open:t,onOpenChange:()=>l(),children:h.jsxs(ld,{className:"sm:max-w-2xl",children:[h.jsxs(K1,{children:[h.jsxs(J1,{className:"flex items-center gap-2",children:[h.jsx(a2,{className:"h-5 w-5 text-yellow-500"}),"Confirm: ",r.toolName]}),h.jsxs(W1,{children:["The agent wants to ",c?"modify a file":"run this tool",". Review the request below and decide whether to proceed."]})]}),h.jsxs("div",{className:"py-2 space-y-3",children:[h.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted",children:[h.jsx(u,{className:"h-5 w-5 text-muted-foreground"}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"font-medium font-mono truncate",children:r.toolName}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:[c?"File modification":"Tool execution"," — preview below"]})]})]}),r.input!==void 0&&h.jsx(GA,{toolName:r.toolName,input:r.input}),r.suggestedPattern&&h.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-yellow-500/10 border border-yellow-500/20",children:[h.jsx(Vx,{className:"h-4 w-4 text-yellow-600 mt-0.5 shrink-0"}),h.jsxs("div",{className:"text-sm min-w-0",children:[h.jsx("div",{className:"font-medium text-yellow-800 dark:text-yellow-200",children:"Trust pattern suggestion"}),h.jsx("div",{className:"font-mono text-xs mt-1 break-all",children:r.suggestedPattern}),h.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Picking ",h.jsx("span",{className:"font-medium",children:"Always"})," will whitelist matching calls for this project."]})]})]})]}),h.jsxs(Z1,{className:"gap-2 sm:gap-2 flex-wrap",children:[h.jsx(Ve,{variant:"outline",size:"sm",onClick:()=>s("deny"),title:"Reject this and all future calls matching the pattern",children:"Deny always"}),h.jsxs(Ve,{variant:"outline",size:"sm",onClick:()=>s("no"),title:"Reject this single call (Esc / n)",children:["No ",h.jsx("kbd",{className:"ml-1 text-[10px] border rounded px-1 bg-background",children:"n"})]}),h.jsxs(Ve,{variant:"outline",size:"sm",onClick:()=>s("always"),title:"Approve and remember the pattern for the project (a)",children:["Always ",h.jsx("kbd",{className:"ml-1 text-[10px] border rounded px-1 bg-background",children:"a"})]}),h.jsxs(Ve,{size:"sm",onClick:()=>s("yes"),title:"Approve this single call (y)",children:["Yes ",h.jsx("kbd",{className:"ml-1 text-[10px] border rounded px-1 bg-background/80",children:"y"})]})]})]})})}function XA(){const t=Pe(x=>x.wsStatus),r=Pe(x=>x.wsUrl),[l,i]=w.useState(!1),[s,u]=w.useState(Date.now());if(w.useEffect(()=>{if(t.state!=="reconnecting")return;const x=setInterval(()=>u(Date.now()),500);return()=>clearInterval(x)},[t.state]),w.useEffect(()=>{t.state==="open"&&i(!1)},[t.state]),t.state==="open"||t.state==="connecting"||l)return null;const c=()=>qn(r).retryNow(),d=t.state==="reconnecting",p=t.state==="closed"?t.error:t.state==="reconnecting"?t.lastError:void 0,m=d?Math.max(0,Math.ceil((t.nextRetryAt-s)/1e3)):0;return h.jsxs("div",{className:me("flex items-center gap-3 px-4 py-2 border-b text-sm",d?"bg-orange-500/10 text-orange-700 dark:text-orange-300 border-orange-500/30":"bg-red-500/10 text-red-700 dark:text-red-300 border-red-500/30"),children:[d?h.jsx(Fr,{className:"h-4 w-4 animate-spin shrink-0"}):h.jsx(pd,{className:"h-4 w-4 shrink-0"}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("div",{className:"font-medium",children:d?`Reconnecting to backend (attempt ${t.attempt}) — retrying in ${m}s`:"Disconnected from backend"}),p&&h.jsx("div",{className:"text-xs opacity-80 truncate",children:p})]}),h.jsxs("button",{type:"button",onClick:c,className:me("inline-flex items-center gap-1 px-2.5 py-1 rounded-md border text-xs font-medium","hover:bg-background/30 transition-colors shrink-0",d?"border-orange-500/40":"border-red-500/40"),title:"Retry connection now",children:[h.jsx(zi,{className:"h-3 w-3"}),"Retry now"]}),h.jsx("button",{type:"button",onClick:()=>i(!0),className:"text-current/60 hover:text-current shrink-0",title:"Dismiss (chip in topbar still shows status)",children:h.jsx(xl,{className:"h-4 w-4"})})]})}function QA(){const t=Ne(M=>M.modelSwitcherOpen),r=Ne(M=>M.setModelSwitcherOpen),[l,i]=w.useState(""),[s,u]=w.useState(0),[c,d]=w.useState([]),[p,m]=w.useState({}),x=w.useRef(null),y=Pe(M=>M.wsUrl),b=Pe(M=>M.provider),S=Pe(M=>M.model),k=Ne(M=>M.paletteOpen),N=In();w.useEffect(()=>{const M=z=>{if((z.ctrlKey||z.metaKey)&&z.key.toLowerCase()==="m"&&!z.shiftKey&&!z.altKey){if(k)return;z.preventDefault(),r(!t);return}z.key==="Escape"&&t&&(z.preventDefault(),r(!1))};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[t,k]),w.useEffect(()=>{const M=qn(y),z=M.on("providers.saved",P=>{const U=P.payload;d(U.providers??[])}),F=M.on("provider.models",P=>{const U=P.payload;m(G=>({...G,[U.provider]:U.models}))});return()=>{z(),F()}},[y]),w.useEffect(()=>{t&&(i(""),u(0),N.listSavedProviders(),requestAnimationFrame(()=>{var M;return(M=x.current)==null?void 0:M.focus()}))},[t,N]),w.useEffect(()=>{if(t)for(const M of c)p[M.id]||N.listProviderModels(M.id)},[t,c,p,N]);const T=w.useMemo(()=>{const M=[];for(const P of c){const U=p[P.id]??[];for(const G of U)M.push({provider:P.id,model:G.id,modelName:G.name||G.id,contextWindow:G.contextWindow,isCurrent:P.id===b&&G.id===S})}const z=l.toLowerCase().trim();return(z?M.filter(P=>P.provider.toLowerCase().includes(z)||P.model.toLowerCase().includes(z)||P.modelName.toLowerCase().includes(z)):M).sort((P,U)=>P.isCurrent!==U.isCurrent?P.isCurrent?-1:1:P.provider.localeCompare(U.provider)||P.model.localeCompare(U.model))},[c,p,l,b,S]);w.useEffect(()=>{s>=T.length&&u(0)},[T.length,s]);const j=M=>{const z=T[M];z&&(N.switchModel(z.provider,z.model),r(!1))};return t?h.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-background/60 backdrop-blur-sm pt-[15vh]",onClick:M=>{M.target===M.currentTarget&&r(!1)},onKeyDown:M=>{M.key==="Escape"&&r(!1)},children:h.jsxs("div",{className:"w-full max-w-xl rounded-xl border bg-popover shadow-2xl overflow-hidden",children:[h.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[h.jsx(ha,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("input",{ref:x,value:l,onChange:M=>{i(M.target.value),u(0)},onKeyDown:M=>{M.key==="ArrowDown"?(M.preventDefault(),u(z=>Math.min(T.length-1,z+1))):M.key==="ArrowUp"?(M.preventDefault(),u(z=>Math.max(0,z-1))):M.key==="Enter"?(M.preventDefault(),j(s)):M.key==="Escape"&&(M.preventDefault(),r(!1))},placeholder:"Filter providers and models…",className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground"}),h.jsx("span",{className:"text-[10px] text-muted-foreground font-mono",children:"↑↓ · Enter · Esc"})]}),h.jsx("div",{className:"max-h-[50vh] overflow-y-auto py-1",children:T.length===0?h.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:c.length===0?"No saved providers — register a key in Settings first.":"Loading models…"}):T.map((M,z)=>h.jsxs("button",{type:"button",onClick:()=>j(z),onMouseEnter:()=>u(z),className:me("w-full flex items-center gap-3 px-3 py-2 text-left text-sm transition-colors",z===s?"bg-accent text-accent-foreground":"hover:bg-accent/40",M.isCurrent&&"font-medium"),children:[h.jsx(Ti,{className:me("h-4 w-4 shrink-0",M.isCurrent?"text-primary":"text-muted-foreground")}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"truncate",children:[h.jsx("span",{className:"text-muted-foreground",children:M.provider}),h.jsx("span",{className:"mx-1 text-muted-foreground/40",children:"·"}),h.jsx("span",{children:M.modelName})]}),M.contextWindow&&h.jsxs("div",{className:"text-[10px] text-muted-foreground font-mono",children:[M.model," · ctx ",M.contextWindow.toLocaleString()]})]}),M.isCurrent?h.jsx("span",{className:"text-[10px] uppercase tracking-wide text-primary font-semibold",children:"active"}):h.jsx(Dx,{className:"h-3.5 w-3.5 text-muted-foreground opacity-0 group-hover:opacity-100"})]},`${M.provider}:${M.model}`))})]})}):null}const eb=w.createContext(void 0);function KA({children:t,defaultTheme:r="system",storageKey:l="wrongstack-theme"}){const{theme:i,setTheme:s}=Pe(),[u,c]=w.useState(()=>typeof window<"u"&&localStorage.getItem(l)||r);w.useEffect(()=>{const p=window.document.documentElement;if(p.classList.remove("light","dark"),u==="system"){const m=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";p.classList.add(m)}else p.classList.add(u)},[u]);const d={theme:u,setTheme:p=>{localStorage.setItem(l,p),c(p),s(p)}};return h.jsx(eb.Provider,{value:d,children:t})}function tb(){const t=w.useContext(eb);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t}const Vr=w.forwardRef(({className:t,type:r,...l},i)=>h.jsx("input",{type:r,className:me("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:i,...l}));Vr.displayName="Input";function ZA(t){const r=t+"CollectionProvider",[l,i]=Ui(r),[s,u]=l(r,{collectionRef:{current:null},itemMap:new Map}),c=N=>{const{scope:T,children:j}=N,M=dn.useRef(null),z=dn.useRef(new Map).current;return h.jsx(s,{scope:T,itemMap:z,collectionRef:M,children:j})};c.displayName=r;const d=t+"CollectionSlot",p=ks(d),m=dn.forwardRef((N,T)=>{const{scope:j,children:M}=N,z=u(d,j),F=Vt(T,z.collectionRef);return h.jsx(p,{ref:F,children:M})});m.displayName=d;const x=t+"CollectionItemSlot",y="data-radix-collection-item",b=ks(x),S=dn.forwardRef((N,T)=>{const{scope:j,children:M,...z}=N,F=dn.useRef(null),P=Vt(T,F),U=u(x,j);return dn.useEffect(()=>(U.itemMap.set(F,{ref:F,...z}),()=>void U.itemMap.delete(F))),h.jsx(b,{[y]:"",ref:P,children:M})});S.displayName=x;function k(N){const T=u(t+"CollectionConsumer",N);return dn.useCallback(()=>{const M=T.collectionRef.current;if(!M)return[];const z=Array.from(M.querySelectorAll(`[${y}]`));return Array.from(T.itemMap.values()).sort((U,G)=>z.indexOf(U.ref.current)-z.indexOf(G.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:c,Slot:m,ItemSlot:S},k,i]}var Lf="rovingFocusGroup.onEntryFocus",JA={bubbles:!1,cancelable:!0},Bi="RovingFocusGroup",[ad,nb,WA]=ZA(Bi),[e5,rb]=Ui(Bi,[WA]),[t5,n5]=e5(Bi),lb=w.forwardRef((t,r)=>h.jsx(ad.Provider,{scope:t.__scopeRovingFocusGroup,children:h.jsx(ad.Slot,{scope:t.__scopeRovingFocusGroup,children:h.jsx(r5,{...t,ref:r})})}));lb.displayName=Bi;var r5=w.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:l,orientation:i,loop:s=!1,dir:u,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:x=!1,...y}=t,b=w.useRef(null),S=Vt(r,b),k=Bd(u),[N,T]=$d({prop:c,defaultProp:d??null,onChange:p,caller:Bi}),[j,M]=w.useState(!1),z=hn(m),F=nb(l),P=w.useRef(!1),[U,G]=w.useState(0);return w.useEffect(()=>{const le=b.current;if(le)return le.addEventListener(Lf,z),()=>le.removeEventListener(Lf,z)},[z]),h.jsx(t5,{scope:l,orientation:i,dir:k,loop:s,currentTabStopId:N,onItemFocus:w.useCallback(le=>T(le),[T]),onItemShiftTab:w.useCallback(()=>M(!0),[]),onFocusableItemAdd:w.useCallback(()=>G(le=>le+1),[]),onFocusableItemRemove:w.useCallback(()=>G(le=>le-1),[]),children:h.jsx(Tt.div,{tabIndex:j||U===0?-1:0,"data-orientation":i,...y,ref:S,style:{outline:"none",...t.style},onMouseDown:pt(t.onMouseDown,()=>{P.current=!0}),onFocus:pt(t.onFocus,le=>{const se=!P.current;if(le.target===le.currentTarget&&se&&!j){const B=new CustomEvent(Lf,JA);if(le.currentTarget.dispatchEvent(B),!B.defaultPrevented){const X=F().filter(H=>H.focusable),Q=X.find(H=>H.active),de=X.find(H=>H.id===N),q=[Q,de,...X].filter(Boolean).map(H=>H.ref.current);ob(q,x)}}P.current=!1}),onBlur:pt(t.onBlur,()=>M(!1))})})}),ab="RovingFocusGroupItem",ib=w.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:l,focusable:i=!0,active:s=!1,tabStopId:u,children:c,...d}=t,p=ji(),m=u||p,x=n5(ab,l),y=x.currentTabStopId===m,b=nb(l),{onFocusableItemAdd:S,onFocusableItemRemove:k,currentTabStopId:N}=x;return w.useEffect(()=>{if(i)return S(),()=>k()},[i,S,k]),h.jsx(ad.ItemSlot,{scope:l,id:m,focusable:i,active:s,children:h.jsx(Tt.span,{tabIndex:y?0:-1,"data-orientation":x.orientation,...d,ref:r,onMouseDown:pt(t.onMouseDown,T=>{i?x.onItemFocus(m):T.preventDefault()}),onFocus:pt(t.onFocus,()=>x.onItemFocus(m)),onKeyDown:pt(t.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){x.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const j=i5(T,x.orientation,x.dir);if(j!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let z=b().filter(F=>F.focusable).map(F=>F.ref.current);if(j==="last")z.reverse();else if(j==="prev"||j==="next"){j==="prev"&&z.reverse();const F=z.indexOf(T.currentTarget);z=x.loop?o5(z,F+1):z.slice(F+1)}setTimeout(()=>ob(z))}}),children:typeof c=="function"?c({isCurrentTabStop:y,hasTabStop:N!=null}):c})})});ib.displayName=ab;var l5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function a5(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function i5(t,r,l){const i=a5(t.key,l);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return l5[i]}function ob(t,r=!1){const l=document.activeElement;for(const i of t)if(i===l||(i.focus({preventScroll:r}),document.activeElement!==l))return}function o5(t,r){return t.map((l,i)=>t[(r+i)%t.length])}var s5=lb,u5=ib,Hs="Tabs",[c5]=Ui(Hs,[rb]),sb=rb(),[f5,Pd]=c5(Hs),ub=w.forwardRef((t,r)=>{const{__scopeTabs:l,value:i,onValueChange:s,defaultValue:u,orientation:c="horizontal",dir:d,activationMode:p="automatic",...m}=t,x=Bd(d),[y,b]=$d({prop:i,onChange:s,defaultProp:u??"",caller:Hs});return h.jsx(f5,{scope:l,baseId:ji(),value:y,onValueChange:b,orientation:c,dir:x,activationMode:p,children:h.jsx(Tt.div,{dir:x,"data-orientation":c,...m,ref:r})})});ub.displayName=Hs;var cb="TabsList",fb=w.forwardRef((t,r)=>{const{__scopeTabs:l,loop:i=!0,...s}=t,u=Pd(cb,l),c=sb(l);return h.jsx(s5,{asChild:!0,...c,orientation:u.orientation,dir:u.dir,loop:i,children:h.jsx(Tt.div,{role:"tablist","aria-orientation":u.orientation,...s,ref:r})})});fb.displayName=cb;var db="TabsTrigger",hb=w.forwardRef((t,r)=>{const{__scopeTabs:l,value:i,disabled:s=!1,...u}=t,c=Pd(db,l),d=sb(l),p=gb(c.baseId,i),m=yb(c.baseId,i),x=i===c.value;return h.jsx(u5,{asChild:!0,...d,focusable:!s,active:x,children:h.jsx(Tt.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":m,"data-state":x?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:p,...u,ref:r,onMouseDown:pt(t.onMouseDown,y=>{!s&&y.button===0&&y.ctrlKey===!1?c.onValueChange(i):y.preventDefault()}),onKeyDown:pt(t.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&c.onValueChange(i)}),onFocus:pt(t.onFocus,()=>{const y=c.activationMode!=="manual";!x&&!s&&y&&c.onValueChange(i)})})})});hb.displayName=db;var mb="TabsContent",pb=w.forwardRef((t,r)=>{const{__scopeTabs:l,value:i,forceMount:s,children:u,...c}=t,d=Pd(mb,l),p=gb(d.baseId,i),m=yb(d.baseId,i),x=i===d.value,y=w.useRef(x);return w.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),h.jsx(cr,{present:s||x,children:({present:b})=>h.jsx(Tt.div,{"data-state":x?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!b,id:m,tabIndex:0,...c,ref:r,style:{...t.style,animationDuration:y.current?"0s":void 0},children:b&&u})})});pb.displayName=mb;function gb(t,r){return`${t}-trigger-${r}`}function yb(t,r){return`${t}-content-${r}`}var d5=ub,xb=fb,bb=hb,vb=pb;const Sb=d5,Xd=w.forwardRef(({className:t,...r},l)=>h.jsx(xb,{ref:l,className:me("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...r}));Xd.displayName=xb.displayName;const hl=w.forwardRef(({className:t,...r},l)=>h.jsx(bb,{ref:l,className:me("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...r}));hl.displayName=bb.displayName;const ml=w.forwardRef(({className:t,...r},l)=>h.jsx(vb,{ref:l,className:me("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...r}));ml.displayName=vb.displayName;function h5(){var fr;const{setCurrentView:t}=Ne(),{provider:r,model:l,setProvider:i,setModel:s,wsConnected:u}=Pe(),{theme:c,setTheme:d}=tb(),p=In(),m=p.client,x=p.listProviders,y=p.listSavedProviders,[b,S]=w.useState([]),[k,N]=w.useState({}),[T,j]=w.useState([]),[M,z]=w.useState(!1),[F,P]=w.useState(!1),[U,G]=w.useState(!1),[le,se]=w.useState(null),[B,X]=w.useState("catalog"),[Q,de]=w.useState(null),[oe,q]=w.useState(""),[H,te]=w.useState(""),[ae,Se]=w.useState(!1),[D,A]=w.useState(!1),[L,E]=w.useState(""),[O,ee]=w.useState("openai-compatible"),[ne,J]=w.useState(""),[ye,ke]=w.useState(""),Ae=b.find(ue=>ue.id===r);w.useEffect(()=>{const ue=vt=>{if(vt.type==="provider.catalog"){const gt=vt.payload;S(gt.providers.sort((st,Dt)=>st.id.localeCompare(Dt.id))),z(!1)}},Te=vt=>{if(vt.type==="provider.models"){const gt=vt.payload;N(st=>({...st,[gt.provider]:gt.models})),P(!1)}},K=vt=>{if(vt.type==="providers.saved"){const st=vt.payload.providers.sort((Dt,We)=>Dt.id.localeCompare(We.id));j(st),G(!1),st.length>0&&X("saved")}},fe=vt=>{if(vt.type==="key.operation_result"){const gt=vt.payload;se(gt),setTimeout(()=>se(null),3e3),y==null||y()}};if(!u||!m)return;const Ce=m.on("provider.catalog",ue),Re=m.on("provider.models",Te),Ye=m.on("providers.saved",K),Ot=m.on("key.operation_result",fe);return z(!0),G(!0),x==null||x(),y==null||y(),()=>{Ce==null||Ce(),Re==null||Re(),Ye==null||Ye(),Ot==null||Ot()}},[u,m,x,y]);const ht=w.useCallback(ue=>{var Te;i(ue),k[ue]||(P(!0),(Te=p.listProviderModels)==null||Te.call(p,ue))},[k,i,p]),yt=w.useCallback(ue=>{var Te;s(ue),(Te=p.switchModel)==null||Te.call(p,r,ue),se({success:!0,message:`Switching to ${r} / ${ue}…`})},[s,p,r]),Le=w.useCallback(ue=>{var Te;!oe.trim()||!H.trim()||((Te=p.addKey)==null||Te.call(p,ue,oe.trim(),H.trim()),q(""),te(""),de(null))},[p,oe,H]),ge=w.useCallback((ue,Te)=>{var K;(K=p.deleteKey)==null||K.call(p,ue,Te)},[p]),ve=w.useCallback((ue,Te)=>{var K;(K=p.setActiveKey)==null||K.call(p,ue,Te)},[p]),$e=w.useCallback(()=>{var ue;L.trim()&&((ue=p.addProvider)==null||ue.call(p,L.trim(),O,ne||void 0,ye||void 0),E(""),ee("openai-compatible"),J(""),ke(""),A(!1))},[p,L,O,ne,ye]),nt=w.useCallback(ue=>{var Te;(Te=p.removeProvider)==null||Te.call(p,ue)},[p]),[Ft,Qe]=w.useState(""),Mt=["anthropic","openai","google","openai-compatible"],pn=Ft.trim()?b.filter(ue=>{const Te=Ft.trim().toLowerCase();return ue.id.toLowerCase().includes(Te)||ue.name.toLowerCase().includes(Te)||ue.family.toLowerCase().includes(Te)}):b,Gr=pn.reduce((ue,Te)=>(ue[Te.family]||(ue[Te.family]=[]),ue[Te.family].push(Te),ue),{});return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("header",{className:"flex items-center justify-between px-4 py-3 border-b bg-card shrink-0",children:[h.jsx("h1",{className:"text-lg font-semibold",children:"Settings"}),h.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>t("chat"),children:h.jsx(xl,{className:"h-4 w-4"})})]}),h.jsx(Ls,{className:"flex-1",children:h.jsx("div",{className:"p-6 max-w-2xl mx-auto",children:h.jsxs(Sb,{defaultValue:"provider",children:[h.jsxs(Xd,{className:"w-full justify-start mb-6 grid grid-cols-4",children:[h.jsxs(hl,{value:"provider",className:"gap-2",children:[h.jsx(Ww,{className:"h-4 w-4"}),"Provider"]}),h.jsxs(hl,{value:"model",className:"gap-2",children:[h.jsx(Ti,{className:"h-4 w-4"}),"Model"]}),h.jsxs(hl,{value:"connection",className:"gap-2",children:[h.jsx(ki,{className:"h-4 w-4"}),"Connection"]}),h.jsxs(hl,{value:"appearance",className:"gap-2",children:[h.jsx(e2,{className:"h-4 w-4"}),"Appearance"]})]}),h.jsxs(ml,{value:"provider",className:"space-y-4",children:[h.jsxs("div",{className:"flex gap-2 mb-4",children:[h.jsxs(Ve,{variant:B==="catalog"?"default":"outline",size:"sm",onClick:()=>X("catalog"),children:[h.jsx(ki,{className:"h-4 w-4 mr-1"}),"Catalog"]}),h.jsxs(Ve,{variant:B==="saved"?"default":"outline",size:"sm",onClick:()=>X("saved"),children:[h.jsx(af,{className:"h-4 w-4 mr-1"}),"Saved (",T.length,")"]})]}),le&&h.jsxs("div",{className:me("p-3 rounded-lg mb-4 flex items-center gap-2",le.success?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"),children:[le.success?h.jsx(pl,{className:"h-4 w-4"}):h.jsx(_w,{className:"h-4 w-4"}),le.message]}),B==="catalog"&&h.jsxs("div",{className:"space-y-4",children:[h.jsx(Vr,{placeholder:`Search ${b.length} providers (name / id / family)…`,value:Ft,onChange:ue=>Qe(ue.target.value),className:"text-sm"}),M&&b.length===0?h.jsxs("div",{className:"flex items-center justify-center py-8",children:[h.jsx(Fr,{className:"h-6 w-6 animate-spin text-muted-foreground"}),h.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading catalog..."})]}):pn.length===0&&Ft?h.jsxs("div",{className:"text-center py-8 text-muted-foreground text-sm",children:['No providers match "',h.jsx("span",{className:"font-mono",children:Ft}),'".']}):h.jsx(h.Fragment,{children:Mt.map(ue=>{const Te=Gr[ue];return Te!=null&&Te.length?h.jsxs("div",{className:"space-y-2",children:[h.jsx("h3",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider",children:ue}),h.jsx("div",{className:"grid grid-cols-1 gap-2",children:Te.map(K=>h.jsxs("button",{type:"button",onClick:()=>ht(K.id),className:me("flex flex-col items-start p-3 rounded-lg border text-left transition-all",r===K.id?"border-primary bg-primary/5 ring-2 ring-primary/20":"border-border hover:bg-muted"),children:[h.jsxs("div",{className:"flex w-full justify-between items-start",children:[h.jsxs("div",{children:[h.jsx("span",{className:"font-medium",children:K.name}),h.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:["(",K.id,")"]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[K.hasApiKey&&h.jsxs("span",{className:"text-xs bg-green-500/10 text-green-600 px-2 py-0.5 rounded",children:[h.jsx(af,{className:"h-3 w-3 inline mr-1"}),"Configured"]}),K.envVars[0]&&h.jsxs("span",{className:"text-xs text-muted-foreground",children:["ENV: ",K.envVars[0]]}),r===K.id&&h.jsx(pl,{className:"h-4 w-4 text-primary"})]})]}),h.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[K.modelCount," models",K.apiBase&&` · ${K.apiBase}`]})]},K.id))})]},ue):null})})]}),B==="saved"&&h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage your API keys and provider configurations"}),h.jsxs(Ve,{size:"sm",variant:"outline",onClick:()=>A(!D),children:[h.jsx(ry,{className:"h-4 w-4 mr-1"}),"Add Provider"]})]}),D&&h.jsxs("div",{className:"p-4 border rounded-lg space-y-3 bg-muted/50",children:[h.jsx("h4",{className:"font-medium",children:"Add Custom Provider"}),h.jsx(Vr,{placeholder:"Provider ID (e.g. my-llm-server)",value:L,onChange:ue=>E(ue.target.value)}),h.jsxs("select",{className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:O,onChange:ue=>ee(ue.target.value),children:[h.jsx("option",{value:"anthropic",children:"Anthropic"}),h.jsx("option",{value:"openai",children:"OpenAI"}),h.jsx("option",{value:"openai-compatible",children:"OpenAI Compatible"}),h.jsx("option",{value:"google",children:"Google"})]}),h.jsx(Vr,{placeholder:"Base URL (optional, e.g. http://localhost:11434/v1)",value:ne,onChange:ue=>J(ue.target.value)}),h.jsx(Vr,{type:"password",placeholder:"API Key (optional)",value:ye,onChange:ue=>ke(ue.target.value)}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Ve,{size:"sm",onClick:$e,disabled:!L.trim(),children:"Add"}),h.jsx(Ve,{size:"sm",variant:"ghost",onClick:()=>A(!1),children:"Cancel"})]})]}),U?h.jsx("div",{className:"flex items-center justify-center py-8",children:h.jsx(Fr,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):T.length===0?h.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[h.jsx(af,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),h.jsx("p",{children:"No saved providers yet"}),h.jsx("p",{className:"text-sm",children:"Add a provider to get started"})]}):T.map(ue=>h.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[h.jsxs("div",{className:"flex justify-between items-start",children:[h.jsxs("div",{children:[h.jsx("h4",{className:"font-medium",children:ue.id}),ue.family&&h.jsx("span",{className:"text-xs text-muted-foreground",children:ue.family})]}),h.jsx("div",{className:"flex gap-2",children:h.jsx(Ve,{size:"icon",variant:"ghost",onClick:()=>nt(ue.id),children:h.jsx(Ai,{className:"h-4 w-4 text-destructive"})})})]}),ue.baseUrl&&h.jsxs("div",{className:"text-xs text-muted-foreground",children:[h.jsx(ki,{className:"h-3 w-3 inline mr-1"}),ue.baseUrl]}),h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("span",{className:"text-sm font-medium",children:"API Keys"}),h.jsxs(Ve,{size:"sm",variant:"ghost",onClick:()=>de(Q===ue.id?null:ue.id),children:[h.jsx(ry,{className:"h-3 w-3 mr-1"}),"Add Key"]})]}),ue.apiKeys.length===0&&!Q&&h.jsx("p",{className:"text-xs text-muted-foreground",children:"No keys configured"}),ue.apiKeys.map(Te=>h.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted/50 rounded",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-sm font-medium",children:Te.label}),Te.isActive&&h.jsx("span",{className:"ml-2 text-xs bg-green-500/10 text-green-600 px-1.5 py-0.5 rounded",children:"Active"}),h.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:Te.maskedKey})]}),h.jsxs("div",{className:"flex gap-1",children:[!Te.isActive&&h.jsx(Ve,{size:"sm",variant:"ghost",onClick:()=>ve(ue.id,Te.label),children:"Set Active"}),h.jsx(Ve,{size:"icon",variant:"ghost",onClick:()=>ge(ue.id,Te.label),children:h.jsx(Ai,{className:"h-3 w-3 text-destructive"})})]})]},Te.label)),Q===ue.id&&h.jsxs("div",{className:"p-3 border rounded space-y-2 bg-background",children:[h.jsx(Vr,{placeholder:"Key label (e.g. default, production)",value:oe,onChange:Te=>q(Te.target.value)}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Vr,{type:ae?"text":"password",placeholder:"API key",value:H,onChange:Te=>te(Te.target.value)}),h.jsx(Ve,{size:"icon",variant:"ghost",onClick:()=>Se(!ae),children:ae?h.jsx(qw,{className:"h-4 w-4"}):h.jsx(Iw,{className:"h-4 w-4"})})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Ve,{size:"sm",onClick:()=>Le(ue.id),disabled:!oe.trim()||!H.trim(),children:"Save Key"}),h.jsx(Ve,{size:"sm",variant:"ghost",onClick:()=>{de(null),q(""),te("")},children:"Cancel"})]})]})]})]},ue.id))]})]}),h.jsx(ml,{value:"model",className:"space-y-4",children:r?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium",children:(Ae==null?void 0:Ae.name)||r}),h.jsx("p",{className:"text-xs text-muted-foreground",children:r})]}),h.jsx(Ve,{variant:"ghost",size:"sm",onClick:()=>{var ue;P(!0),(ue=p.listProviderModels)==null||ue.call(p,r)},children:h.jsx(qx,{className:me("h-4 w-4",F&&"animate-spin")})})]}),F&&!k[r]?h.jsxs("div",{className:"flex items-center justify-center py-8",children:[h.jsx(Fr,{className:"h-6 w-6 animate-spin text-muted-foreground"}),h.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading models..."})]}):h.jsxs("div",{className:"space-y-1",children:[(k[r]||[]).map(ue=>h.jsxs("button",{type:"button",onClick:()=>yt(ue.id),className:me("w-full flex items-center justify-between p-3 rounded-lg border text-left transition-all",l===ue.id?"border-primary bg-primary/5 ring-2 ring-primary/20":"border-border hover:bg-muted"),children:[h.jsxs("div",{children:[h.jsx("span",{className:"font-medium",children:ue.name||ue.id}),h.jsx("div",{className:"flex gap-2 mt-1",children:ue.capabilities.map(Te=>h.jsx("span",{className:"text-xs bg-muted px-1.5 py-0.5 rounded",children:Te},Te))})]}),h.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:[ue.contextWindow&&h.jsxs("div",{children:[ue.contextWindow/1e3,"k context"]}),ue.inputCost&&ue.outputCost&&h.jsxs("div",{children:["$",ue.inputCost,"/$",ue.outputCost]}),l===ue.id&&h.jsx(pl,{className:"h-4 w-4 text-primary mt-1"})]})]},ue.id)),((fr=k[r])==null?void 0:fr.length)===0&&h.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No models found for this provider. The catalog might be empty or still loading."})]})]}):h.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[h.jsx(Ti,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),h.jsx("p",{children:"Select a provider first"})]})}),h.jsxs(ml,{value:"connection",className:"space-y-4",children:[h.jsxs("div",{className:"space-y-3",children:[h.jsxs("label",{htmlFor:"websocket-url",className:"text-sm font-medium flex items-center gap-2",children:[h.jsx(ki,{className:"h-4 w-4 text-muted-foreground"}),"WebSocket Server URL"]}),h.jsx(Vr,{id:"websocket-url",value:Pe.getState().wsUrl,onChange:ue=>Pe.getState().setConfig({wsUrl:ue.target.value}),placeholder:"ws://localhost:3457",className:"font-mono text-sm"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"URL of the WrongStack WebSocket server. The server runs alongside the CLI."})]}),h.jsxs("div",{className:"p-4 rounded-lg border bg-muted/50",children:[h.jsx("h4",{className:"text-sm font-medium mb-2",children:"Starting the WebSocket Server"}),h.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:["Standalone: run ",h.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"./dev.ps1"})," ","from the repo root, or set WS_HOST/WS_PORT before launching"," ",h.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"node packages/webui/dist/server/entry.js"}),". Or alongside the CLI:"," ",h.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"wstack --webui"}),"."]})]})]}),h.jsxs(ml,{value:"appearance",className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Theme"}),h.jsxs("div",{className:"grid grid-cols-3 gap-2 max-w-md",children:[h.jsxs(Ve,{variant:c==="light"?"default":"outline",size:"sm",onClick:()=>d("light"),children:[h.jsx(md,{className:"h-4 w-4 mr-1"}),"Light"]}),h.jsxs(Ve,{variant:c==="dark"?"default":"outline",size:"sm",onClick:()=>d("dark"),children:[h.jsx(dd,{className:"h-4 w-4 mr-1"}),"Dark"]}),h.jsxs(Ve,{variant:c==="system"?"default":"outline",size:"sm",onClick:()=>d("system"),children:[h.jsx(fd,{className:"h-4 w-4 mr-1"}),"System"]})]}),h.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"System follows your OS-level light/dark preference."})]}),h.jsxs("div",{className:"pt-2 border-t",children:[h.jsx("h3",{className:"text-sm font-semibold mb-3 mt-3",children:"Preferences"}),h.jsx(bx,{label:"Compact density",hint:"Tighter spacing throughout the chat. Toggle anywhere with Ctrl+Shift+D.",selector:ue=>ue.compactMode,onChange:()=>Ne.getState().toggleCompactMode()}),h.jsx(bx,{label:"Sound on completion",hint:"Play a soft chime when a run finishes — useful when working in another tab.",selector:null,configKey:"soundOnComplete"})]})]})]})})})]})}function bx({label:t,hint:r,selector:l,onChange:i,configKey:s}){const u=Ne(m=>l?l(m):!1),c=Pe(m=>s?m[s]:!1),d=l?u:c,p=()=>{if(l)i==null||i();else if(s==="soundOnComplete"){const m=!Pe.getState().soundOnComplete;Pe.getState().setSoundOnComplete(m),m&&Gx(()=>Promise.resolve().then(()=>Yx),void 0).then(x=>x.playCompletionChime()).catch(()=>{})}};return h.jsxs("div",{className:"flex items-start justify-between gap-3 py-2",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"text-sm font-medium",children:t}),r&&h.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:r})]}),h.jsx("button",{type:"button",role:"switch","aria-checked":d,onClick:p,className:me("shrink-0 relative inline-flex h-5 w-9 rounded-full border transition-colors",d?"bg-primary border-primary":"bg-muted border-input hover:bg-muted/80"),children:h.jsx("span",{className:me("absolute top-0.5 left-0.5 h-3.5 w-3.5 rounded-full bg-background shadow transition-transform",d&&"translate-x-4")})})]})}const m5=[{section:"Global",items:[{keys:["Ctrl","K"],description:"Open command palette"},{keys:["?"],description:"Show this shortcuts overlay"},{keys:["Ctrl","\\"],description:"Toggle sidebar"},{keys:["Ctrl","/"],description:"Focus the message input"}]},{section:"Chat input",items:[{keys:["Enter"],description:"Send message"},{keys:["Shift","Enter"],description:"Insert a newline"},{keys:["↑"],description:"Recall previous prompt (in empty input)"},{keys:["↓"],description:"Recall next prompt"},{keys:["/"],description:"Open slash command popup"},{keys:["Tab"],description:"Autocomplete highlighted command"},{keys:["Esc"],description:"Dismiss popup / clear input"}]},{section:"Chat",items:[{keys:["Ctrl","F"],description:"Search within current chat"},{keys:["Ctrl","L"],description:"Clear context (same as /clear)"},{keys:["Ctrl","N"],description:"Start a new session (same as /new)"},{keys:["Ctrl","E"],description:"Export chat as markdown"},{keys:["Ctrl","M"],description:"Quick model switcher overlay"},{keys:["Ctrl","Shift","D"],description:"Toggle compact UI density"},{keys:["Esc"],description:"Abort the current run (when running)"}]},{section:"Chat navigation (when not typing)",items:[{keys:["j"],description:"Focus next message (alias: ↓)"},{keys:["k"],description:"Focus previous message (alias: ↑)"},{keys:["g"],description:"Jump to first message"},{keys:["Shift","G"],description:"Jump to last message"},{keys:["c"],description:"Copy focused message text"},{keys:["Esc"],description:"Clear focused message"}]}];function p5(){const t=Ne(l=>l.shortcutsOpen),r=Ne(l=>l.setShortcutsOpen);return w.useEffect(()=>{const l=i=>{var d;const s=i.target,u=(d=s==null?void 0:s.tagName)==null?void 0:d.toLowerCase();if(!(u==="input"||u==="textarea"||(s==null?void 0:s.isContentEditable))&&i.key==="?"&&!i.ctrlKey&&!i.metaKey&&!i.altKey){i.preventDefault(),r(!Ne.getState().shortcutsOpen);return}i.key==="Escape"&&Ne.getState().shortcutsOpen&&(i.preventDefault(),r(!1))};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[r]),t?h.jsx("div",{className:"fixed inset-0 z-50 bg-background/60 backdrop-blur-sm flex items-center justify-center px-4",onClick:()=>r(!1),onKeyDown:l=>{l.key==="Escape"&&r(!1)},children:h.jsxs("div",{onClick:l=>l.stopPropagation(),onKeyDown:l=>l.stopPropagation(),className:"w-full max-w-2xl rounded-xl border bg-popover shadow-2xl overflow-hidden flex flex-col max-h-[80vh]",children:[h.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Ux,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("h2",{className:"text-sm font-semibold",children:"Keyboard shortcuts"})]}),h.jsx("button",{type:"button",onClick:()=>r(!1),className:"text-muted-foreground hover:text-foreground p-1 rounded hover:bg-muted",children:h.jsx(xl,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"overflow-y-auto px-5 py-4 space-y-6",children:m5.map(l=>h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-2",children:l.section}),h.jsx("div",{className:"grid grid-cols-1 gap-1.5",children:l.items.map(i=>h.jsxs("div",{className:"flex items-center justify-between gap-3 text-sm px-2 py-1.5 rounded hover:bg-muted/40",children:[h.jsx("span",{className:"text-foreground/80",children:i.description}),h.jsx("span",{className:"flex items-center gap-1 shrink-0",children:i.keys.map((s,u)=>h.jsxs("span",{className:"flex items-center gap-1",children:[u>0&&h.jsx("span",{className:"text-muted-foreground/40 text-xs",children:"+"}),h.jsx("kbd",{className:"font-mono text-[10px] border rounded px-1.5 py-0.5 bg-background",children:s})]},s))})]},i.description))})]},l.section))}),h.jsxs("div",{className:"border-t px-5 py-3 text-xs text-muted-foreground",children:["Press"," ",h.jsx("kbd",{className:"font-mono text-[10px] border rounded px-1 py-0.5 bg-background",children:"?"})," ","any time to reopen this list."]})]})}):null}function g5(){const{toggleSidebar:t,currentView:r,setCurrentView:l}=Ne(),i=Ne(O=>O.sidebarWidth),s=Ne(O=>O.setSidebarWidth),{totalTokens:u,cost:c,session:d,todos:p}=Ge(),{messages:m,clearMessages:x}=he(),y=Ne(O=>O.pinnedIds),b=Ne(O=>O.unpinAll),[S,k]=w.useState(""),N=Ne(O=>O.favoriteSessionIds),T=Ne(O=>O.toggleFavoriteSession),j=Ne(O=>O.sessionNicknames),M=Ne(O=>O.setSessionNickname),[z,F]=w.useState(null),[P,U]=w.useState(""),G=y.map(O=>m.find(ee=>ee.id===O)).filter(O=>!!O&&O.content.length>0),{wsConnected:le,wsUrl:se,provider:B,model:X}=Pe(),{entries:Q,loading:de,error:oe}=pa(),{listSessions:q,deleteSession:H,resumeSession:te,client:ae}=In();w.useEffect(()=>{var O;le&&((O=ae==null?void 0:ae.getTodos)==null||O.call(ae))},[le,ae]);const Se=d==null?void 0:d.id;w.useEffect(()=>{r==="history"&&le&&q(50)},[r,le,Se,q]);const D=O=>{if(!O)return"--";const ee=Math.floor((Date.now()-O)/1e3);return ee<60?`${ee}s`:`${Math.floor(ee/60)}m`},A=O=>{const ee=Date.parse(O);if(Number.isNaN(ee))return"";const ne=Date.now()-ee;if(ne<6e4)return"just now";if(ne<36e5)return`${Math.floor(ne/6e4)}m ago`;if(ne<864e5)return`${Math.floor(ne/36e5)}h ago`;const J=Math.floor(ne/864e5);return J<7?`${J}d ago`:new Date(ee).toLocaleDateString()},L=(()=>{const O=S.trim().toLowerCase(),ee=O?Q.filter(Qe=>Qe.title.toLowerCase().includes(O)||Qe.model.toLowerCase().includes(O)||Qe.provider.toLowerCase().includes(O)||Qe.id.toLowerCase().includes(O)):Q,ne=new Date;ne.setHours(0,0,0,0);const J=ne.getTime(),ye=J-864e5,ke=J-6*864e5,Ae={today:[],yesterday:[],week:[],older:[]};for(const Qe of ee){const Mt=Date.parse(Qe.startedAt);if(Number.isNaN(Mt)){Ae.older.push(Qe);continue}Mt>=J?Ae.today.push(Qe):Mt>=ye?Ae.yesterday.push(Qe):Mt>=ke?Ae.week.push(Qe):Ae.older.push(Qe)}const ht=new Set(N),yt=ee.filter(Qe=>ht.has(Qe.id)),Le=[];yt.length&&Le.push({label:"Favorites",rows:yt,star:!0});const ge=Qe=>Qe.filter(Mt=>!ht.has(Mt.id)),ve=ge(Ae.today),$e=ge(Ae.yesterday),nt=ge(Ae.week),Ft=ge(Ae.older);return ve.length&&Le.push({label:"Today",rows:ve}),$e.length&&Le.push({label:"Yesterday",rows:$e}),nt.length&&Le.push({label:"This week",rows:nt}),Ft.length&&Le.push({label:"Earlier",rows:Ft}),Le})(),E=O=>{O.preventDefault();const ee=O.clientX,ne=i,J=ke=>{s(ne+(ke.clientX-ee))},ye=()=>{window.removeEventListener("mousemove",J),window.removeEventListener("mouseup",ye),document.body.style.cursor="",document.body.style.userSelect=""};window.addEventListener("mousemove",J),window.addEventListener("mouseup",ye),document.body.style.cursor="col-resize",document.body.style.userSelect="none"};return h.jsxs("aside",{style:{width:`${i}px`},className:"relative border-r bg-card flex flex-col shrink-0",children:[h.jsxs("div",{onMouseDown:E,onDoubleClick:()=>s(288),className:"group/handle absolute top-0 right-0 h-full w-2 cursor-col-resize z-10 flex items-center justify-end",title:"Drag to resize · double-click to reset",children:[h.jsx("div",{className:"h-full w-px bg-border group-hover/handle:bg-primary/60 group-hover/handle:w-0.5 transition-all"}),h.jsxs("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 flex flex-col gap-0.5 opacity-0 group-hover/handle:opacity-100 transition-opacity pr-0.5",children:[h.jsx("span",{className:"h-1 w-1 rounded-full bg-primary/70"}),h.jsx("span",{className:"h-1 w-1 rounded-full bg-primary/70"}),h.jsx("span",{className:"h-1 w-1 rounded-full bg-primary/70"})]})]}),h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-6 h-6 rounded bg-primary flex items-center justify-center",children:h.jsx(yd,{className:"h-4 w-4 text-primary-foreground"})}),h.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"WrongStack"})]}),h.jsx(Ve,{variant:"ghost",size:"icon",onClick:t,children:h.jsx(t2,{className:"h-4 w-4"})})]}),h.jsxs(Sb,{value:r==="settings"?"chat":r,onValueChange:O=>l(O),className:"flex-1 flex flex-col",children:[h.jsxs(Xd,{className:"w-full rounded-none bg-transparent p-2 h-auto grid grid-cols-2",children:[h.jsxs(hl,{value:"chat",className:"flex-col gap-1.5 py-2 data-[state=active]:bg-primary/10",children:[h.jsx(Jw,{className:"h-4 w-4"}),h.jsx("span",{className:"text-xs",children:"Chat"})]}),h.jsxs(hl,{value:"history",className:"flex-col gap-1.5 py-2 data-[state=active]:bg-primary/10",children:[h.jsx(qf,{className:"h-4 w-4"}),h.jsx("span",{className:"text-xs",children:"History"})]})]}),h.jsxs(ml,{value:"chat",className:"flex-1 flex flex-col m-0 overflow-hidden",children:[h.jsxs("div",{className:"px-4 py-3 border-b",children:[h.jsxs("div",{className:me("flex items-center gap-2 px-3 py-2 rounded-lg text-sm",le?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"),children:[le?h.jsx($x,{className:"h-4 w-4"}):h.jsx(pd,{className:"h-4 w-4"}),h.jsx("span",{className:"font-medium",children:le?"Connected":"Disconnected"})]}),h.jsx("div",{className:"text-xs text-muted-foreground mt-2 px-1 font-mono",children:se})]}),h.jsxs("button",{type:"button",onClick:()=>l("settings"),className:"px-4 py-3 border-b text-left hover:bg-muted/40 transition-colors",children:[h.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Active model"}),h.jsxs("div",{className:"font-mono text-xs truncate",children:[h.jsx("span",{className:"text-muted-foreground",children:B||"—"}),h.jsx("span",{className:"text-muted-foreground/40 mx-1",children:"/"}),h.jsx("span",{className:"font-medium",children:X||"—"})]})]}),h.jsxs("div",{className:"px-4 py-3 border-b space-y-3",children:[h.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[h.jsx(Bf,{className:"h-4 w-4 text-muted-foreground"}),"Session"]}),h.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[h.jsxs("div",{className:"flex flex-col p-2 rounded-lg bg-muted/50",children:[h.jsx("span",{className:"text-muted-foreground",children:"Messages"}),h.jsx("span",{className:"text-lg font-semibold",children:m.length})]}),h.jsxs("div",{className:"flex flex-col p-2 rounded-lg bg-muted/50",children:[h.jsx("span",{className:"text-muted-foreground",children:"Duration"}),h.jsx("span",{className:"text-lg font-semibold",children:D((d==null?void 0:d.startedAt)??null)})]}),h.jsxs("div",{className:"flex flex-col p-2 rounded-lg bg-muted/50",children:[h.jsx("span",{className:"text-muted-foreground",children:"Input"}),h.jsx("span",{className:"text-lg font-semibold",children:u.input.toLocaleString()})]}),h.jsxs("div",{className:"flex flex-col p-2 rounded-lg bg-muted/50",children:[h.jsx("span",{className:"text-muted-foreground",children:"Output"}),h.jsx("span",{className:"text-lg font-semibold",children:u.output.toLocaleString()})]})]}),c>0&&h.jsxs("div",{className:"flex justify-between items-center p-2 rounded-lg bg-green-500/10",children:[h.jsx("span",{className:"text-sm text-muted-foreground",children:"Cost"}),h.jsxs("span",{className:"text-lg font-semibold text-green-600 dark:text-green-400",children:["$",c.toFixed(4)]})]})]}),p.length>0&&h.jsxs("div",{className:"px-4 py-3 border-b space-y-2",children:[h.jsxs("h3",{className:"text-sm font-medium flex items-center justify-between",children:[h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(Kw,{className:"h-4 w-4 text-muted-foreground"}),"Todos"]}),h.jsxs("span",{className:"text-[10px] text-muted-foreground tabular-nums",children:[p.filter(O=>O.status==="completed").length,"/",p.length]})]}),h.jsx("ul",{className:"space-y-1 max-h-48 overflow-y-auto pr-1",children:p.map(O=>{const ee=O.status==="completed"?pl:O.status==="in_progress"?Lw:Uw,ne=O.status==="completed"?"text-green-600 dark:text-green-400 line-through opacity-70":O.status==="in_progress"?"text-amber-600 dark:text-amber-400":"text-muted-foreground";return h.jsxs("li",{className:me("flex items-start gap-2 text-xs leading-snug",ne),children:[h.jsx(ee,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),h.jsx("span",{className:"break-words",children:O.status==="in_progress"&&O.activeForm?O.activeForm:O.content})]},O.id)})})]}),G.length>0&&h.jsxs("div",{className:"px-4 py-3 border-b space-y-2",children:[h.jsxs("h3",{className:"text-sm font-medium flex items-center justify-between",children:[h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(Hx,{className:"h-4 w-4 text-amber-500"}),"Pinned"]}),h.jsx("button",{type:"button",onClick:b,className:"text-[10px] text-muted-foreground hover:text-destructive",children:"Clear"})]}),h.jsx("ul",{className:"space-y-1 max-h-48 overflow-y-auto pr-1",children:G.map(O=>{const ee=O.content.replace(/\s+/g," ").slice(0,80);return h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>{const ne=document.querySelector(`[data-message-id="${O.id}"]`);ne&&(ne.scrollIntoView({behavior:"smooth",block:"center"}),ne.classList.add("ring-2","ring-amber-500/60"),setTimeout(()=>{ne.classList.remove("ring-2","ring-amber-500/60")},1600))},className:"w-full text-left text-xs px-2 py-1.5 rounded bg-muted/40 hover:bg-muted/70 border border-amber-500/20 leading-snug",title:O.content.slice(0,400),children:[ee,O.content.length>80?"…":""]})},O.id)})})]}),h.jsxs("div",{className:"px-4 py-3 border-b space-y-2",children:[h.jsxs(Ve,{variant:"outline",size:"sm",className:"w-full justify-start text-destructive hover:text-destructive",onClick:()=>{var O;x(),(O=ae==null?void 0:ae.clearContext)==null||O.call(ae)},children:[h.jsx(Ai,{className:"h-4 w-4 mr-2"}),"Clear context"]}),h.jsxs(Ve,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:()=>{var O;return(O=ae==null?void 0:ae.newSession)==null?void 0:O.call(ae)},disabled:!le,children:[h.jsx(zi,{className:"h-4 w-4 mr-2"}),"New session"]}),h.jsxs(Ve,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:()=>{var O;return(O=ae==null?void 0:ae.compactContext)==null?void 0:O.call(ae)},disabled:!le,children:[h.jsx(Bf,{className:"h-4 w-4 mr-2"}),"Compact context"]})]}),h.jsx("div",{className:"flex-1"}),h.jsx("div",{className:"px-3 py-3 border-t",children:h.jsxs(Ve,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:()=>l("settings"),children:[h.jsx(hd,{className:"h-4 w-4 mr-2"}),"Settings"]})})]}),h.jsxs(ml,{value:"history",className:"flex-1 m-0 flex flex-col overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b",children:[h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Recent sessions"}),h.jsx(Ve,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>q(50),disabled:!le,title:"Refresh",children:de?h.jsx(Fr,{className:"h-3.5 w-3.5 animate-spin"}):h.jsx(qx,{className:"h-3.5 w-3.5"})})]}),Q.length>3&&h.jsx("div",{className:"px-3 py-2 border-b",children:h.jsxs("div",{className:"relative",children:[h.jsx(ha,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground/60"}),h.jsx("input",{type:"text",value:S,onChange:O=>k(O.target.value),placeholder:"Filter title, model, provider…",className:"w-full pl-7 pr-7 py-1 text-xs rounded-md bg-muted/40 border border-transparent focus:bg-background focus:border-input focus:outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50"}),S&&h.jsx("button",{type:"button",onClick:()=>k(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground/60 hover:text-foreground p-0.5",title:"Clear filter",children:h.jsx(xl,{className:"h-3 w-3"})})]})}),oe&&h.jsx("div",{className:"px-4 py-2 text-xs text-destructive bg-destructive/5 border-b",children:oe}),h.jsx(Ls,{className:"flex-1",children:Q.length===0&&!de?h.jsxs("div",{className:"text-center text-muted-foreground py-8 px-4",children:[h.jsx(qf,{className:"h-8 w-8 mx-auto mb-3 opacity-20"}),h.jsx("p",{className:"text-sm font-medium",children:"No history yet"}),h.jsx("p",{className:"text-xs mt-1",children:"Your conversations will appear here"})]}):L.length===0?h.jsxs("div",{className:"text-center text-muted-foreground py-8 px-4",children:[h.jsx(ha,{className:"h-8 w-8 mx-auto mb-3 opacity-20"}),h.jsx("p",{className:"text-sm font-medium",children:"No matches"}),h.jsx("p",{className:"text-xs mt-1",children:"Try a different filter"})]}):h.jsx("div",{className:"p-2 space-y-3",children:L.map(O=>h.jsxs("div",{className:"space-y-1",children:[h.jsxs("div",{className:me("sticky top-0 z-[1] px-1 pb-1 text-[10px] uppercase tracking-wider font-semibold bg-card/90 backdrop-blur-sm flex items-center gap-1",O.star?"text-amber-500":"text-muted-foreground/80"),children:[O.star&&h.jsx(ly,{className:"h-3 w-3 fill-current"}),O.label," ",h.jsxs("span",{className:"text-muted-foreground/50 font-normal normal-case ml-1",children:["(",O.rows.length,")"]})]}),O.rows.map(ee=>h.jsxs("div",{className:me("group relative rounded-md border text-sm transition-colors",ee.isCurrent?"bg-primary/5 border-primary/40":"bg-card border-border/60 hover:bg-muted/40 hover:border-primary/40"),children:[h.jsx("button",{type:"button",disabled:ee.isCurrent||z===ee.id,onClick:()=>te(ee.id),onDoubleClick:ne=>{ne.stopPropagation(),F(ee.id),U(j[ee.id]??ee.title??"")},className:"block w-full rounded-md px-3 py-2 pr-16 text-left disabled:cursor-default focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:h.jsxs("div",{className:"min-w-0 flex-1",children:[z===ee.id?h.jsx("input",{value:P,onChange:ne=>U(ne.target.value),onClick:ne=>ne.stopPropagation(),onBlur:()=>{M(ee.id,P),F(null)},onKeyDown:ne=>{ne.key==="Enter"?(ne.preventDefault(),M(ee.id,P),F(null)):ne.key==="Escape"&&(ne.preventDefault(),F(null))},placeholder:ee.title||"Nickname",className:"w-full text-sm bg-background border border-input rounded px-1.5 py-0.5 focus:outline-none focus:ring-1 focus:ring-ring"}):h.jsx("div",{className:"font-medium truncate text-foreground",title:j[ee.id]?`${j[ee.id]} — original: ${ee.title}`:`${ee.title}
608
+
609
+ Double-click to rename`,children:j[ee.id]||ee.title||"(empty)"}),h.jsxs("div",{className:"text-[10px] text-muted-foreground font-mono truncate mt-0.5",children:[ee.provider,"/",ee.model]}),h.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground/80 mt-0.5",children:[h.jsx("span",{children:A(ee.startedAt)}),ee.tokenTotal>0&&h.jsxs(h.Fragment,{children:[h.jsx("span",{children:"·"}),h.jsxs("span",{className:"tabular-nums",children:[ee.tokenTotal.toLocaleString()," tok"]})]}),ee.isCurrent&&h.jsxs(h.Fragment,{children:[h.jsx("span",{children:"·"}),h.jsx("span",{className:"text-primary font-medium",children:"active"})]})]})]})}),h.jsxs("div",{className:"absolute right-2 top-2 flex items-center gap-1",children:[h.jsx("button",{type:"button",onClick:()=>T(ee.id),className:me("transition-opacity hover:text-amber-500",N.includes(ee.id)?"opacity-100 text-amber-500":"opacity-0 group-hover:opacity-100 text-muted-foreground"),title:N.includes(ee.id)?"Unfavorite":"Mark as favorite",children:h.jsx(ly,{className:me("h-3.5 w-3.5",N.includes(ee.id)&&"fill-current")})}),!ee.isCurrent&&h.jsx("button",{type:"button",onClick:()=>{window.confirm(`Delete session "${ee.title}"?`)&&H(ee.id)},className:"opacity-0 group-hover:opacity-100 transition-opacity text-muted-foreground hover:text-destructive",title:"Delete session",children:h.jsx(Ai,{className:"h-3.5 w-3.5"})})]})]},ee.id))]},O.label))})})]})]})]})}function y5(){const{theme:t}=tb(),{currentView:r,sidebarOpen:l,toggleSidebar:i,setSearchOpen:s,setSidebarOpen:u}=Ne(),c=he(S=>S.isLoading),d=Ge(S=>S.iteration),p=Ge(S=>S.projectName),m=Ge(S=>{var k;return(k=S.session)==null?void 0:k.title}),x=Ge(S=>{var k;return(k=S.session)==null?void 0:k.id}),y=Ne(S=>x?S.sessionNicknames[x]:void 0),b=In();return w.useEffect(()=>{if(typeof window>"u")return;const S=window.matchMedia("(max-width: 768px)"),k=()=>{S.matches&&Ne.getState().sidebarOpen&&u(!1)};return k(),S.addEventListener("change",k),()=>S.removeEventListener("change",k)},[u]),M2(),w.useEffect(()=>{const S=[];if(c){const j=d?` iter ${d.index}${d.max?`/${d.max}`:""}`:"";S.push(`●${j}`)}const k=(y==null?void 0:y.trim())||(m==null?void 0:m.trim()),N=p==null?void 0:p.trim();k&&S.push(k),N&&S.push(N),S.push("WrongStack");const T=S.filter(Boolean).join(" · ");return document.title=T,()=>{document.title="WrongStack"}},[c,d,p,m,y]),w.useEffect(()=>{const S=k=>{var z,F,P,U,G,le,se;const N=k.target,T=(z=N==null?void 0:N.tagName)==null?void 0:z.toLowerCase(),j=T==="input"||T==="textarea"||(N==null?void 0:N.isContentEditable),M=k.ctrlKey||k.metaKey;if(M&&k.key==="\\"){k.preventDefault(),i();return}if(M&&k.key.toLowerCase()==="f"){k.preventDefault(),s(!0);return}if(M&&k.key.toLowerCase()==="/"){k.preventDefault();const B=document.querySelector("textarea");B==null||B.focus();return}if(M&&!j&&(k.key.toLowerCase()==="l"?(k.preventDefault(),he.getState().clearMessages(),(P=(F=b.client)==null?void 0:F.clearContext)==null||P.call(F)):k.key.toLowerCase()==="n"?(k.preventDefault(),(G=(U=b.client)==null?void 0:U.newSession)==null||G.call(U)):k.key.toLowerCase()==="e"&&(k.preventDefault(),xd())),M&&k.shiftKey&&k.key.toLowerCase()==="d"&&(k.preventDefault(),Ne.getState().toggleCompactMode()),!j&&!M&&!k.altKey){const B=Array.from(document.querySelectorAll("[data-message-id]"));if(B.length===0)return;const X=document.querySelector('[data-message-id][data-focused="true"]'),Q=X?B.indexOf(X):-1,de=oe=>{for(const q of B)q.removeAttribute("data-focused");oe.setAttribute("data-focused","true"),oe.scrollIntoView({behavior:"smooth",block:"center"})};if(k.key==="j"||k.key==="ArrowDown"){const oe=B[Math.min(B.length-1,Math.max(0,Q+1))];oe&&(k.preventDefault(),de(oe));return}if(k.key==="k"||k.key==="ArrowUp"){const oe=B[Math.max(0,Q<=0?0:Q-1)];oe&&(k.preventDefault(),de(oe));return}if(k.key==="g"&&!k.shiftKey){k.preventDefault(),de(B[0]);return}if(k.key==="G"||k.key==="g"&&k.shiftKey){k.preventDefault(),de(B[B.length-1]);return}if(k.key==="Escape"&&X){k.preventDefault(),X.removeAttribute("data-focused");return}if(k.key==="c"&&X){const oe=((le=X.querySelector(".markdown-content"))==null?void 0:le.innerText)??X.innerText;oe&&((se=navigator.clipboard)==null||se.writeText(oe).catch(()=>{}),k.preventDefault());return}}};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[i,s,b]),h.jsxs("div",{className:me("flex h-screen",t),children:[l&&h.jsx(g5,{}),h.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden",children:[h.jsx(XA,{}),r==="chat"&&h.jsx(wT,{}),r==="settings"&&h.jsx(h5,{})]}),h.jsx(PA,{}),h.jsx(z2,{}),h.jsx(p5,{}),h.jsx(QA,{}),h.jsx(g2,{})]})}function x5(){return h.jsx(KA,{defaultTheme:"system",children:h.jsx(y5,{})})}XS.createRoot(document.getElementById("root")).render(h.jsx(dn.StrictMode,{children:h.jsx(x5,{})}));