@robota-sdk/agent-cli 3.0.0-beta.95 → 3.0.0-beta.96

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,314 @@
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))u(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const f of s.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function u(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();function Vu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pc={exports:{}},Xr={};/**
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 Im;function _0(){if(Im)return Xr;Im=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(u,o,s){var f=null;if(s!==void 0&&(f=""+s),o.key!==void 0&&(f=""+o.key),"key"in o){s={};for(var h in o)h!=="key"&&(s[h]=o[h])}else s=o;return o=s.ref,{$$typeof:t,type:u,key:f,ref:o!==void 0?o:null,props:s}}return Xr.Fragment=i,Xr.jsx=r,Xr.jsxs=r,Xr}var Ym;function E0(){return Ym||(Ym=1,pc.exports=_0()),pc.exports}var d=E0(),hc={exports:{}},Ee={};/**
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 Vm;function C0(){if(Vm)return Ee;Vm=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function v(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,M={};function _(T,V,j){this.props=T,this.context=V,this.refs=M,this.updater=j||N}_.prototype.isReactComponent={},_.prototype.setState=function(T,V){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,V,"setState")},_.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function G(){}G.prototype=_.prototype;function U(T,V,j){this.props=T,this.context=V,this.refs=M,this.updater=j||N}var Z=U.prototype=new G;Z.constructor=U,C(Z,_.prototype),Z.isPureReactComponent=!0;var ne=Array.isArray;function D(){}var H={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function W(T,V,j){var re=j.ref;return{$$typeof:t,type:T,key:V,ref:re!==void 0?re:null,props:j}}function O(T,V){return W(T.type,V,T.props)}function ae(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function ee(T){var V={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(j){return V[j]})}var xe=/\/+/g;function oe(T,V){return typeof T=="object"&&T!==null&&T.key!=null?ee(""+T.key):V.toString(36)}function J(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(D,D):(T.status="pending",T.then(function(V){T.status==="pending"&&(T.status="fulfilled",T.value=V)},function(V){T.status==="pending"&&(T.status="rejected",T.reason=V)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function L(T,V,j,re,me){var de=typeof T;(de==="undefined"||de==="boolean")&&(T=null);var je=!1;if(T===null)je=!0;else switch(de){case"bigint":case"string":case"number":je=!0;break;case"object":switch(T.$$typeof){case t:case i:je=!0;break;case y:return je=T._init,L(je(T._payload),V,j,re,me)}}if(je)return me=me(T),je=re===""?"."+oe(T,0):re,ne(me)?(j="",je!=null&&(j=je.replace(xe,"$&/")+"/"),L(me,V,j,"",function(pe){return pe})):me!=null&&(ae(me)&&(me=O(me,j+(me.key==null||T&&T.key===me.key?"":(""+me.key).replace(xe,"$&/")+"/")+je)),V.push(me)),1;je=0;var qe=re===""?".":re+":";if(ne(T))for(var se=0;se<T.length;se++)re=T[se],de=qe+oe(re,se),je+=L(re,V,j,de,me);else if(se=v(T),typeof se=="function")for(T=se.call(T),se=0;!(re=T.next()).done;)re=re.value,de=qe+oe(re,se++),je+=L(re,V,j,de,me);else if(de==="object"){if(typeof T.then=="function")return L(J(T),V,j,re,me);throw V=String(T),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return je}function P(T,V,j){if(T==null)return T;var re=[],me=0;return L(T,re,"","",function(de){return V.call(j,de,me++)}),re}function fe(T){if(T._status===-1){var V=T._result;V=V(),V.then(function(j){(T._status===0||T._status===-1)&&(T._status=1,T._result=j)},function(j){(T._status===0||T._status===-1)&&(T._status=2,T._result=j)}),T._status===-1&&(T._status=0,T._result=V)}if(T._status===1)return T._result.default;throw T._result}var ce=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},E={map:P,forEach:function(T,V,j){P(T,function(){V.apply(this,arguments)},j)},count:function(T){var V=0;return P(T,function(){V++}),V},toArray:function(T){return P(T,function(V){return V})||[]},only:function(T){if(!ae(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Ee.Activity=x,Ee.Children=E,Ee.Component=_,Ee.Fragment=r,Ee.Profiler=o,Ee.PureComponent=U,Ee.StrictMode=u,Ee.Suspense=g,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(T){return H.H.useMemoCache(T)}},Ee.cache=function(T){return function(){return T.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(T,V,j){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var re=C({},T.props),me=T.key;if(V!=null)for(de in V.key!==void 0&&(me=""+V.key),V)!le.call(V,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&V.ref===void 0||(re[de]=V[de]);var de=arguments.length-2;if(de===1)re.children=j;else if(1<de){for(var je=Array(de),qe=0;qe<de;qe++)je[qe]=arguments[qe+2];re.children=je}return W(T.type,me,re)},Ee.createContext=function(T){return T={$$typeof:f,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:s,_context:T},T},Ee.createElement=function(T,V,j){var re,me={},de=null;if(V!=null)for(re in V.key!==void 0&&(de=""+V.key),V)le.call(V,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(me[re]=V[re]);var je=arguments.length-2;if(je===1)me.children=j;else if(1<je){for(var qe=Array(je),se=0;se<je;se++)qe[se]=arguments[se+2];me.children=qe}if(T&&T.defaultProps)for(re in je=T.defaultProps,je)me[re]===void 0&&(me[re]=je[re]);return W(T,de,me)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(T){return{$$typeof:h,render:T}},Ee.isValidElement=ae,Ee.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:fe}},Ee.memo=function(T,V){return{$$typeof:m,type:T,compare:V===void 0?null:V}},Ee.startTransition=function(T){var V=H.T,j={};H.T=j;try{var re=T(),me=H.S;me!==null&&me(j,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(D,ce)}catch(de){ce(de)}finally{V!==null&&j.types!==null&&(V.types=j.types),H.T=V}},Ee.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Ee.use=function(T){return H.H.use(T)},Ee.useActionState=function(T,V,j){return H.H.useActionState(T,V,j)},Ee.useCallback=function(T,V){return H.H.useCallback(T,V)},Ee.useContext=function(T){return H.H.useContext(T)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(T,V){return H.H.useDeferredValue(T,V)},Ee.useEffect=function(T,V){return H.H.useEffect(T,V)},Ee.useEffectEvent=function(T){return H.H.useEffectEvent(T)},Ee.useId=function(){return H.H.useId()},Ee.useImperativeHandle=function(T,V,j){return H.H.useImperativeHandle(T,V,j)},Ee.useInsertionEffect=function(T,V){return H.H.useInsertionEffect(T,V)},Ee.useLayoutEffect=function(T,V){return H.H.useLayoutEffect(T,V)},Ee.useMemo=function(T,V){return H.H.useMemo(T,V)},Ee.useOptimistic=function(T,V){return H.H.useOptimistic(T,V)},Ee.useReducer=function(T,V,j){return H.H.useReducer(T,V,j)},Ee.useRef=function(T){return H.H.useRef(T)},Ee.useState=function(T){return H.H.useState(T)},Ee.useSyncExternalStore=function(T,V,j){return H.H.useSyncExternalStore(T,V,j)},Ee.useTransition=function(){return H.H.useTransition()},Ee.version="19.2.8",Ee}var Gm;function vf(){return Gm||(Gm=1,hc.exports=C0()),hc.exports}var w=vf();const Gu=Vu(w);var mc={exports:{}},Qr={},gc={exports:{}},xc={};/**
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 Fm;function T0(){return Fm||(Fm=1,(function(t){function i(L,P){var fe=L.length;L.push(P);e:for(;0<fe;){var ce=fe-1>>>1,E=L[ce];if(0<o(E,P))L[ce]=P,L[fe]=E,fe=ce;else break e}}function r(L){return L.length===0?null:L[0]}function u(L){if(L.length===0)return null;var P=L[0],fe=L.pop();if(fe!==P){L[0]=fe;e:for(var ce=0,E=L.length,T=E>>>1;ce<T;){var V=2*(ce+1)-1,j=L[V],re=V+1,me=L[re];if(0>o(j,fe))re<E&&0>o(me,j)?(L[ce]=me,L[re]=fe,ce=re):(L[ce]=j,L[V]=fe,ce=V);else if(re<E&&0>o(me,fe))L[ce]=me,L[re]=fe,ce=re;else break e}}return P}function o(L,P){var fe=L.sortIndex-P.sortIndex;return fe!==0?fe:L.id-P.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var g=[],m=[],y=1,x=null,S=3,v=!1,N=!1,C=!1,M=!1,_=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function Z(L){for(var P=r(m);P!==null;){if(P.callback===null)u(m);else if(P.startTime<=L)u(m),P.sortIndex=P.expirationTime,i(g,P);else break;P=r(m)}}function ne(L){if(C=!1,Z(L),!N)if(r(g)!==null)N=!0,D||(D=!0,ee());else{var P=r(m);P!==null&&J(ne,P.startTime-L)}}var D=!1,H=-1,le=5,W=-1;function O(){return M?!0:!(t.unstable_now()-W<le)}function ae(){if(M=!1,D){var L=t.unstable_now();W=L;var P=!0;try{e:{N=!1,C&&(C=!1,G(H),H=-1),v=!0;var fe=S;try{t:{for(Z(L),x=r(g);x!==null&&!(x.expirationTime>L&&O());){var ce=x.callback;if(typeof ce=="function"){x.callback=null,S=x.priorityLevel;var E=ce(x.expirationTime<=L);if(L=t.unstable_now(),typeof E=="function"){x.callback=E,Z(L),P=!0;break t}x===r(g)&&u(g),Z(L)}else u(g);x=r(g)}if(x!==null)P=!0;else{var T=r(m);T!==null&&J(ne,T.startTime-L),P=!1}}break e}finally{x=null,S=fe,v=!1}P=void 0}}finally{P?ee():D=!1}}}var ee;if(typeof U=="function")ee=function(){U(ae)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,oe=xe.port2;xe.port1.onmessage=ae,ee=function(){oe.postMessage(null)}}else ee=function(){_(ae,0)};function J(L,P){H=_(function(){L(t.unstable_now())},P)}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(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return S},t.unstable_next=function(L){switch(S){case 1:case 2:case 3:var P=3;break;default:P=S}var fe=S;S=P;try{return L()}finally{S=fe}},t.unstable_requestPaint=function(){M=!0},t.unstable_runWithPriority=function(L,P){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var fe=S;S=L;try{return P()}finally{S=fe}},t.unstable_scheduleCallback=function(L,P,fe){var ce=t.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?ce+fe:ce):fe=ce,L){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=fe+E,L={id:y++,callback:P,priorityLevel:L,startTime:fe,expirationTime:E,sortIndex:-1},fe>ce?(L.sortIndex=fe,i(m,L),r(g)===null&&L===r(m)&&(C?(G(H),H=-1):C=!0,J(ne,fe-ce))):(L.sortIndex=E,i(g,L),N||v||(N=!0,D||(D=!0,ee()))),L},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(L){var P=S;return function(){var fe=S;S=P;try{return L.apply(this,arguments)}finally{S=fe}}}})(xc)),xc}var $m;function A0(){return $m||($m=1,gc.exports=T0()),gc.exports}var yc={exports:{}},zt={};/**
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 Xm;function z0(){if(Xm)return zt;Xm=1;var t=vf();function i(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var u={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(g,m,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:x==null?null:""+x,children:g,containerInfo:m,implementation:y}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,zt.createPortal=function(g,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return s(g,m,null,y)},zt.flushSync=function(g){var m=f.T,y=u.p;try{if(f.T=null,u.p=2,g)return g()}finally{f.T=m,u.p=y,u.d.f()}},zt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,u.d.C(g,m))},zt.prefetchDNS=function(g){typeof g=="string"&&u.d.D(g)},zt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var y=m.as,x=h(y,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?u.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:v}):y==="script"&&u.d.X(g,{crossOrigin:x,integrity:S,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},zt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=h(m.as,m.crossOrigin);u.d.M(g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&u.d.M(g)},zt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,x=h(y,m.crossOrigin);u.d.L(g,y,{crossOrigin:x,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})}},zt.preloadModule=function(g,m){if(typeof g=="string")if(m){var y=h(m.as,m.crossOrigin);u.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else u.d.m(g)},zt.requestFormReset=function(g){u.d.r(g)},zt.unstable_batchedUpdates=function(g,m){return g(m)},zt.useFormState=function(g,m,y){return f.H.useFormState(g,m,y)},zt.useFormStatus=function(){return f.H.useHostTransitionStatus()},zt.version="19.2.8",zt}var Qm;function D0(){if(Qm)return yc.exports;Qm=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(i){console.error(i)}}return t(),yc.exports=z0(),yc.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 Zm;function R0(){if(Zm)return Qr;Zm=1;var t=A0(),i=vf(),r=D0();function u(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function f(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 h(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 g(e){if(s(e)!==e)throw Error(u(188))}function m(e){var n=e.alternate;if(!n){if(n=s(e),n===null)throw Error(u(188));return n!==e?null:e}for(var l=e,a=n;;){var c=l.return;if(c===null)break;var p=c.alternate;if(p===null){if(a=c.return,a!==null){l=a;continue}break}if(c.child===p.child){for(p=c.child;p;){if(p===l)return g(c),e;if(p===a)return g(c),n;p=p.sibling}throw Error(u(188))}if(l.return!==a.return)l=c,a=p;else{for(var b=!1,k=c.child;k;){if(k===l){b=!0,l=c,a=p;break}if(k===a){b=!0,a=c,l=p;break}k=k.sibling}if(!b){for(k=p.child;k;){if(k===l){b=!0,l=p,a=c;break}if(k===a){b=!0,a=p,l=c;break}k=k.sibling}if(!b)throw Error(u(189))}}if(l.alternate!==a)throw Error(u(190))}if(l.tag!==3)throw Error(u(188));return l.stateNode.current===l?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),U=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case _:return"Profiler";case M:return"StrictMode";case ne:return"Suspense";case D:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case U:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case Z:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H: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 J=Array.isArray,L=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},ce=[],E=-1;function T(e){return{current:e}}function V(e){0>E||(e.current=ce[E],ce[E]=null,E--)}function j(e,n){E++,ce[E]=e.current,e.current=n}var re=T(null),me=T(null),de=T(null),je=T(null);function qe(e,n){switch(j(de,n),j(me,e),j(re,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?cm(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=cm(n),e=fm(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(re),j(re,e)}function se(){V(re),V(me),V(de)}function pe(e){e.memoizedState!==null&&j(je,e);var n=re.current,l=fm(n,e.type);n!==l&&(j(me,e),j(re,l))}function Ge(e){me.current===e&&(V(re),V(me)),je.current===e&&(V(je),Vr._currentValue=fe)}var Xt,yn;function Mt(e){if(Xt===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);Xt=n&&n[1]||"",yn=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Xt+e+yn}var bn=!1;function ln(e,n){if(!e||bn)return"";bn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(n){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(Y){var I=Y}Reflect.construct(e,[],K)}else{try{K.call()}catch(Y){I=Y}e.call(K.prototype)}}else{try{throw Error()}catch(Y){I=Y}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(Y){if(Y&&I&&typeof Y.stack=="string")return[Y.stack,I.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=a.DetermineComponentFrameRoot(),b=p[0],k=p[1];if(b&&k){var A=b.split(`
44
+ `),B=k.split(`
45
+ `);for(c=a=0;a<A.length&&!A[a].includes("DetermineComponentFrameRoot");)a++;for(;c<B.length&&!B[c].includes("DetermineComponentFrameRoot");)c++;if(a===A.length||c===B.length)for(a=A.length-1,c=B.length-1;1<=a&&0<=c&&A[a]!==B[c];)c--;for(;1<=a&&0<=c;a--,c--)if(A[a]!==B[c]){if(a!==1||c!==1)do if(a--,c--,0>c||A[a]!==B[c]){var $=`
46
+ `+A[a].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=a&&0<=c);break}}}finally{bn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Mt(l):""}function ul(e,n){switch(e.tag){case 26:case 27:case 5:return Mt(e.type);case 16:return Mt("Lazy");case 13:return e.child!==n&&n!==null?Mt("Suspense Fallback"):Mt("Suspense");case 19:return Mt("SuspenseList");case 0:case 15:return ln(e.type,!1);case 11:return ln(e.type.render,!1);case 1:return ln(e.type,!0);case 31:return Mt("Activity");default:return""}}function Ln(e){try{var n="",l=null;do n+=ul(e,l),l=e,e=e.return;while(e);return n}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var vn=Object.prototype.hasOwnProperty,Sn=t.unstable_scheduleCallback,Un=t.unstable_cancelCallback,te=t.unstable_shouldYield,De=t.unstable_requestPaint,Ie=t.unstable_now,kn=t.unstable_getCurrentPriorityLevel,F=t.unstable_ImmediatePriority,ue=t.unstable_UserBlockingPriority,be=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,Ve=t.unstable_IdlePriority,st=t.log,rn=t.unstable_setDisableYieldValue,kt=null,at=null;function Nt(e){if(typeof st=="function"&&rn(e),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(kt,e)}catch{}}var Qe=Math.clz32?Math.clz32:da,wn=Math.log,Ut=Math.LN2;function da(e){return e>>>=0,e===0?32:31-(wn(e)/Ut|0)|0}var sl=256,oi=262144,Bl=4194304;function an(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 ci(e,n,l){var a=e.pendingLanes;if(a===0)return 0;var c=0,p=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var k=a&134217727;return k!==0?(a=k&~p,a!==0?c=an(a):(b&=k,b!==0?c=an(b):l||(l=k&~e,l!==0&&(c=an(l))))):(k=a&~p,k!==0?c=an(k):b!==0?c=an(b):l||(l=a&~e,l!==0&&(c=an(l)))),c===0?0:n!==0&&n!==c&&(n&p)===0&&(p=c&-c,l=n&-n,p>=l||p===32&&(l&4194048)!==0)?n:c}function ol(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function es(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 pa(){var e=Bl;return Bl<<=1,(Bl&62914560)===0&&(Bl=4194304),e}function lr(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function Q(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function he(e,n,l,a,c,p){var b=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var k=e.entanglements,A=e.expirationTimes,B=e.hiddenUpdates;for(l=b&~l;0<l;){var $=31-Qe(l),K=1<<$;k[$]=0,A[$]=-1;var I=B[$];if(I!==null)for(B[$]=null,$=0;$<I.length;$++){var Y=I[$];Y!==null&&(Y.lane&=-536870913)}l&=~K}a!==0&&Ne(e,a,0),p!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=p&~(b&~n))}function Ne(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var a=31-Qe(n);e.entangledLanes|=n,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function ot(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var a=31-Qe(l),c=1<<a;c&n|e[a]&n&&(e[a]|=n),l&=~c}}function qn(e,n){var l=n&-n;return l=(l&42)!==0?1:ts(l),(l&(e.suspendedLanes|n))!==0?0:l}function ts(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 ns(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Zf(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Mm(e.type))}function Kf(e,n){var l=P.p;try{return P.p=e,n()}finally{P.p=l}}var cl=Math.random().toString(36).slice(2),_t="__reactFiber$"+cl,qt="__reactProps$"+cl,fi="__reactContainer$"+cl,ls="__reactEvents$"+cl,m1="__reactListeners$"+cl,g1="__reactHandles$"+cl,Jf="__reactResources$"+cl,ir="__reactMarker$"+cl;function is(e){delete e[_t],delete e[qt],delete e[ls],delete e[m1],delete e[g1]}function di(e){var n=e[_t];if(n)return n;for(var l=e.parentNode;l;){if(n=l[fi]||l[_t]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=ym(e);e!==null;){if(l=e[_t])return l;e=ym(e)}return n}e=l,l=e.parentNode}return null}function pi(e){if(e=e[_t]||e[fi]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function rr(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(u(33))}function hi(e){var n=e[Jf];return n||(n=e[Jf]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function wt(e){e[ir]=!0}var Pf=new Set,Wf={};function Hl(e,n){mi(e,n),mi(e+"Capture",n)}function mi(e,n){for(Wf[e]=n,e=0;e<n.length;e++)Pf.add(n[e])}var x1=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]*$"),ed={},td={};function y1(e){return vn.call(td,e)?!0:vn.call(ed,e)?!1:x1.test(e)?td[e]=!0:(ed[e]=!0,!1)}function ha(e,n,l){if(y1(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var a=n.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function ma(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function Bn(e,n,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+a)}}function un(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function b1(e,n,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var c=a.get,p=a.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(b){l=""+b,p.call(this,b)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function rs(e){if(!e._valueTracker){var n=nd(e)?"checked":"value";e._valueTracker=b1(e,n,""+e[n])}}function ld(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),a="";return e&&(a=nd(e)?e.checked?"true":"false":e.value),e=a,e!==l?(n.setValue(e),!0):!1}function ga(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 v1=/[\n"\\]/g;function sn(e){return e.replace(v1,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function as(e,n,l,a,c,p,b,k){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+un(n)):e.value!==""+un(n)&&(e.value=""+un(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?us(e,b,un(n)):l!=null?us(e,b,un(l)):a!=null&&e.removeAttribute("value"),c==null&&p!=null&&(e.defaultChecked=!!p),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+un(k):e.removeAttribute("name")}function id(e,n,l,a,c,p,b,k){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),n!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||n!=null)){rs(e);return}l=l!=null?""+un(l):"",n=n!=null?""+un(n):l,k||n===e.value||(e.value=n),e.defaultValue=n}a=a??c,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=k?e.checked:!!a,e.defaultChecked=!!a,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),rs(e)}function us(e,n,l){n==="number"&&ga(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function gi(e,n,l,a){if(e=e.options,n){n={};for(var c=0;c<l.length;c++)n["$"+l[c]]=!0;for(l=0;l<e.length;l++)c=n.hasOwnProperty("$"+e[l].value),e[l].selected!==c&&(e[l].selected=c),c&&a&&(e[l].defaultSelected=!0)}else{for(l=""+un(l),n=null,c=0;c<e.length;c++){if(e[c].value===l){e[c].selected=!0,a&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function rd(e,n,l){if(n!=null&&(n=""+un(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+un(l):""}function ad(e,n,l,a){if(n==null){if(a!=null){if(l!=null)throw Error(u(92));if(J(a)){if(1<a.length)throw Error(u(93));a=a[0]}l=a}l==null&&(l=""),n=l}l=un(n),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),rs(e)}function xi(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var S1=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 ud(e,n,l){var a=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":a?e.setProperty(n,l):typeof l!="number"||l===0||S1.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function sd(e,n,l){if(n!=null&&typeof n!="object")throw Error(u(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||n!=null&&n.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var c in n)a=n[c],n.hasOwnProperty(c)&&l[c]!==a&&ud(e,c,a)}else for(var p in n)n.hasOwnProperty(p)&&ud(e,p,n[p])}function ss(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 k1=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"]]),w1=/^[\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 xa(e){return w1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Hn(){}var os=null;function cs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yi=null,bi=null;function od(e){var n=pi(e);if(n&&(e=n.stateNode)){var l=e[qt]||null;e:switch(e=n.stateNode,n.type){case"input":if(as(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+sn(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var a=l[n];if(a!==e&&a.form===e.form){var c=a[qt]||null;if(!c)throw Error(u(90));as(a,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<l.length;n++)a=l[n],a.form===e.form&&ld(a)}break e;case"textarea":rd(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&gi(e,!!l.multiple,n,!1)}}}var fs=!1;function cd(e,n,l){if(fs)return e(n,l);fs=!0;try{var a=e(n);return a}finally{if(fs=!1,(yi!==null||bi!==null)&&(iu(),yi&&(n=yi,e=bi,bi=yi=null,od(n),e)))for(n=0;n<e.length;n++)od(e[n])}}function ar(e,n){var l=e.stateNode;if(l===null)return null;var a=l[qt]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(u(231,n,typeof l));return l}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ds=!1;if(In)try{var ur={};Object.defineProperty(ur,"passive",{get:function(){ds=!0}}),window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{ds=!1}var fl=null,ps=null,ya=null;function fd(){if(ya)return ya;var e,n=ps,l=n.length,a,c="value"in fl?fl.value:fl.textContent,p=c.length;for(e=0;e<l&&n[e]===c[e];e++);var b=l-e;for(a=1;a<=b&&n[l-a]===c[p-a];a++);return ya=c.slice(e,1<a?1-a:void 0)}function ba(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 va(){return!0}function dd(){return!1}function Bt(e){function n(l,a,c,p,b){this._reactName=l,this._targetInst=c,this.type=a,this.nativeEvent=p,this.target=b,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(l=e[k],this[k]=l?l(p):p[k]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?va:dd,this.isPropagationStopped=dd,this}return x(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=va)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=va)},persist:function(){},isPersistent:va}),n}var Il={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sa=Bt(Il),sr=x({},Il,{view:0,detail:0}),j1=Bt(sr),hs,ms,or,ka=x({},sr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xs,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!==or&&(or&&e.type==="mousemove"?(hs=e.screenX-or.screenX,ms=e.screenY-or.screenY):ms=hs=0,or=e),hs)},movementY:function(e){return"movementY"in e?e.movementY:ms}}),pd=Bt(ka),N1=x({},ka,{dataTransfer:0}),_1=Bt(N1),E1=x({},sr,{relatedTarget:0}),gs=Bt(E1),C1=x({},Il,{animationName:0,elapsedTime:0,pseudoElement:0}),T1=Bt(C1),A1=x({},Il,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),z1=Bt(A1),D1=x({},Il,{data:0}),hd=Bt(D1),R1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},M1={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"},O1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=O1[e])?!!n[e]:!1}function xs(){return L1}var U1=x({},sr,{key:function(e){if(e.key){var n=R1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ba(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?M1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xs,charCode:function(e){return e.type==="keypress"?ba(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ba(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),q1=Bt(U1),B1=x({},ka,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),md=Bt(B1),H1=x({},sr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xs}),I1=Bt(H1),Y1=x({},Il,{propertyName:0,elapsedTime:0,pseudoElement:0}),V1=Bt(Y1),G1=x({},ka,{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}),F1=Bt(G1),$1=x({},Il,{newState:0,oldState:0}),X1=Bt($1),Q1=[9,13,27,32],ys=In&&"CompositionEvent"in window,cr=null;In&&"documentMode"in document&&(cr=document.documentMode);var Z1=In&&"TextEvent"in window&&!cr,gd=In&&(!ys||cr&&8<cr&&11>=cr),xd=" ",yd=!1;function bd(e,n){switch(e){case"keyup":return Q1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vi=!1;function K1(e,n){switch(e){case"compositionend":return vd(n);case"keypress":return n.which!==32?null:(yd=!0,xd);case"textInput":return e=n.data,e===xd&&yd?null:e;default:return null}}function J1(e,n){if(vi)return e==="compositionend"||!ys&&bd(e,n)?(e=fd(),ya=ps=fl=null,vi=!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 gd&&n.locale!=="ko"?null:n.data;default:return null}}var P1={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 Sd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!P1[e.type]:n==="textarea"}function kd(e,n,l,a){yi?bi?bi.push(a):bi=[a]:yi=a,n=fu(n,"onChange"),0<n.length&&(l=new Sa("onChange","change",null,l,a),e.push({event:l,listeners:n}))}var fr=null,dr=null;function W1(e){im(e,0)}function wa(e){var n=rr(e);if(ld(n))return e}function wd(e,n){if(e==="change")return n}var jd=!1;if(In){var bs;if(In){var vs="oninput"in document;if(!vs){var Nd=document.createElement("div");Nd.setAttribute("oninput","return;"),vs=typeof Nd.oninput=="function"}bs=vs}else bs=!1;jd=bs&&(!document.documentMode||9<document.documentMode)}function _d(){fr&&(fr.detachEvent("onpropertychange",Ed),dr=fr=null)}function Ed(e){if(e.propertyName==="value"&&wa(dr)){var n=[];kd(n,dr,e,cs(e)),cd(W1,n)}}function eb(e,n,l){e==="focusin"?(_d(),fr=n,dr=l,fr.attachEvent("onpropertychange",Ed)):e==="focusout"&&_d()}function tb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wa(dr)}function nb(e,n){if(e==="click")return wa(n)}function lb(e,n){if(e==="input"||e==="change")return wa(n)}function ib(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Qt=typeof Object.is=="function"?Object.is:ib;function pr(e,n){if(Qt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),a=Object.keys(n);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var c=l[a];if(!vn.call(n,c)||!Qt(e[c],n[c]))return!1}return!0}function Cd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Td(e,n){var l=Cd(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=n&&a>=n)return{node:l,offset:n-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Cd(l)}}function Ad(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Ad(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function zd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=ga(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=ga(e.document)}return n}function Ss(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 rb=In&&"documentMode"in document&&11>=document.documentMode,Si=null,ks=null,hr=null,ws=!1;function Dd(e,n,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ws||Si==null||Si!==ga(a)||(a=Si,"selectionStart"in a&&Ss(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),hr&&pr(hr,a)||(hr=a,a=fu(ks,"onSelect"),0<a.length&&(n=new Sa("onSelect","select",null,n,l),e.push({event:n,listeners:a}),n.target=Si)))}function Yl(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var ki={animationend:Yl("Animation","AnimationEnd"),animationiteration:Yl("Animation","AnimationIteration"),animationstart:Yl("Animation","AnimationStart"),transitionrun:Yl("Transition","TransitionRun"),transitionstart:Yl("Transition","TransitionStart"),transitioncancel:Yl("Transition","TransitionCancel"),transitionend:Yl("Transition","TransitionEnd")},js={},Rd={};In&&(Rd=document.createElement("div").style,"AnimationEvent"in window||(delete ki.animationend.animation,delete ki.animationiteration.animation,delete ki.animationstart.animation),"TransitionEvent"in window||delete ki.transitionend.transition);function Vl(e){if(js[e])return js[e];if(!ki[e])return e;var n=ki[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in Rd)return js[e]=n[l];return e}var Md=Vl("animationend"),Od=Vl("animationiteration"),Ld=Vl("animationstart"),ab=Vl("transitionrun"),ub=Vl("transitionstart"),sb=Vl("transitioncancel"),Ud=Vl("transitionend"),qd=new Map,Ns="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ns.push("scrollEnd");function jn(e,n){qd.set(e,n),Hl(n,[e])}var ja=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)},on=[],wi=0,_s=0;function Na(){for(var e=wi,n=_s=wi=0;n<e;){var l=on[n];on[n++]=null;var a=on[n];on[n++]=null;var c=on[n];on[n++]=null;var p=on[n];if(on[n++]=null,a!==null&&c!==null){var b=a.pending;b===null?c.next=c:(c.next=b.next,b.next=c),a.pending=c}p!==0&&Bd(l,c,p)}}function _a(e,n,l,a){on[wi++]=e,on[wi++]=n,on[wi++]=l,on[wi++]=a,_s|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Es(e,n,l,a){return _a(e,n,l,a),Ea(e)}function Gl(e,n){return _a(e,null,null,n),Ea(e)}function Bd(e,n,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var c=!1,p=e.return;p!==null;)p.childLanes|=l,a=p.alternate,a!==null&&(a.childLanes|=l),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(c=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,c&&n!==null&&(c=31-Qe(l),e=p.hiddenUpdates,a=e[c],a===null?e[c]=[n]:a.push(n),n.lane=l|536870912),p):null}function Ea(e){if(50<Lr)throw Lr=0,Uo=null,Error(u(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ji={};function ob(e,n,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(e,n,l,a){return new ob(e,n,l,a)}function Cs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,n){var l=e.alternate;return l===null?(l=Zt(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Hd(e,n){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Ca(e,n,l,a,c,p){var b=0;if(a=e,typeof e=="function")Cs(e)&&(b=1);else if(typeof e=="string")b=h0(e,l,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=Zt(31,l,n,c),e.elementType=W,e.lanes=p,e;case C:return Fl(l.children,c,p,n);case M:b=8,c|=24;break;case _:return e=Zt(12,l,n,c|2),e.elementType=_,e.lanes=p,e;case ne:return e=Zt(13,l,n,c),e.elementType=ne,e.lanes=p,e;case D:return e=Zt(19,l,n,c),e.elementType=D,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:b=10;break e;case G:b=9;break e;case Z:b=11;break e;case H:b=14;break e;case le:b=16,a=null;break e}b=29,l=Error(u(130,e===null?"null":typeof e,"")),a=null}return n=Zt(b,l,n,c),n.elementType=e,n.type=a,n.lanes=p,n}function Fl(e,n,l,a){return e=Zt(7,e,a,n),e.lanes=l,e}function Ts(e,n,l){return e=Zt(6,e,null,n),e.lanes=l,e}function Id(e){var n=Zt(18,null,null,0);return n.stateNode=e,n}function As(e,n,l){return n=Zt(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Yd=new WeakMap;function cn(e,n){if(typeof e=="object"&&e!==null){var l=Yd.get(e);return l!==void 0?l:(n={value:e,source:n,stack:Ln(n)},Yd.set(e,n),n)}return{value:e,source:n,stack:Ln(n)}}var Ni=[],_i=0,Ta=null,mr=0,fn=[],dn=0,dl=null,Tn=1,An="";function Vn(e,n){Ni[_i++]=mr,Ni[_i++]=Ta,Ta=e,mr=n}function Vd(e,n,l){fn[dn++]=Tn,fn[dn++]=An,fn[dn++]=dl,dl=e;var a=Tn;e=An;var c=32-Qe(a)-1;a&=~(1<<c),l+=1;var p=32-Qe(n)+c;if(30<p){var b=c-c%5;p=(a&(1<<b)-1).toString(32),a>>=b,c-=b,Tn=1<<32-Qe(n)+c|l<<c|a,An=p+e}else Tn=1<<p|l<<c|a,An=e}function zs(e){e.return!==null&&(Vn(e,1),Vd(e,1,0))}function Ds(e){for(;e===Ta;)Ta=Ni[--_i],Ni[_i]=null,mr=Ni[--_i],Ni[_i]=null;for(;e===dl;)dl=fn[--dn],fn[dn]=null,An=fn[--dn],fn[dn]=null,Tn=fn[--dn],fn[dn]=null}function Gd(e,n){fn[dn++]=Tn,fn[dn++]=An,fn[dn++]=dl,Tn=n.id,An=n.overflow,dl=e}var Et=null,it=null,Be=!1,pl=null,pn=!1,Rs=Error(u(519));function hl(e){var n=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gr(cn(n,e)),Rs}function Fd(e){var n=e.stateNode,l=e.type,a=e.memoizedProps;switch(n[_t]=e,n[qt]=a,l){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(l=0;l<qr.length;l++)Me(qr[l],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":Me("invalid",n),id(n,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Me("invalid",n);break;case"textarea":Me("invalid",n),ad(n,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||a.suppressHydrationWarning===!0||sm(n.textContent,l)?(a.popover!=null&&(Me("beforetoggle",n),Me("toggle",n)),a.onScroll!=null&&Me("scroll",n),a.onScrollEnd!=null&&Me("scrollend",n),a.onClick!=null&&(n.onclick=Hn),n=!0):n=!1,n||hl(e,!0)}function $d(e){for(Et=e.return;Et;)switch(Et.tag){case 5:case 31:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:Et=Et.return}}function Ei(e){if(e!==Et)return!1;if(!Be)return $d(e),Be=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Po(e.type,e.memoizedProps)),l=!l),l&&it&&hl(e),$d(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));it=xm(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));it=xm(e)}else n===27?(n=it,Cl(e.type)?(e=lc,lc=null,it=e):it=n):it=Et?mn(e.stateNode.nextSibling):null;return!0}function $l(){it=Et=null,Be=!1}function Ms(){var e=pl;return e!==null&&(Vt===null?Vt=e:Vt.push.apply(Vt,e),pl=null),e}function gr(e){pl===null?pl=[e]:pl.push(e)}var Os=T(null),Xl=null,Gn=null;function ml(e,n,l){j(Os,n._currentValue),n._currentValue=l}function Fn(e){e._currentValue=Os.current,V(Os)}function Ls(e,n,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===l)break;e=e.return}}function Us(e,n,l,a){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var p=c.dependencies;if(p!==null){var b=c.child;p=p.firstContext;e:for(;p!==null;){var k=p;p=c;for(var A=0;A<n.length;A++)if(k.context===n[A]){p.lanes|=l,k=p.alternate,k!==null&&(k.lanes|=l),Ls(p.return,l,e),a||(b=null);break e}p=k.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(u(341));b.lanes|=l,p=b.alternate,p!==null&&(p.lanes|=l),Ls(b,l,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function Ci(e,n,l,a){e=null;for(var c=n,p=!1;c!==null;){if(!p){if((c.flags&524288)!==0)p=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(u(387));if(b=b.memoizedProps,b!==null){var k=c.type;Qt(c.pendingProps.value,b.value)||(e!==null?e.push(k):e=[k])}}else if(c===je.current){if(b=c.alternate,b===null)throw Error(u(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Vr):e=[Vr])}c=c.return}e!==null&&Us(n,e,l,a),n.flags|=262144}function Aa(e){for(e=e.firstContext;e!==null;){if(!Qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ql(e){Xl=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return Xd(Xl,e)}function za(e,n){return Xl===null&&Ql(e),Xd(e,n)}function Xd(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},Gn===null){if(e===null)throw Error(u(308));Gn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Gn=Gn.next=n;return l}var cb=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},fb=t.unstable_scheduleCallback,db=t.unstable_NormalPriority,mt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qs(){return{controller:new cb,data:new Map,refCount:0}}function xr(e){e.refCount--,e.refCount===0&&fb(db,function(){e.controller.abort()})}var yr=null,Bs=0,Ti=0,Ai=null;function pb(e,n){if(yr===null){var l=yr=[];Bs=0,Ti=Vo(),Ai={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Bs++,n.then(Qd,Qd),n}function Qd(){if(--Bs===0&&yr!==null){Ai!==null&&(Ai.status="fulfilled");var e=yr;yr=null,Ti=0,Ai=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function hb(e,n){var l=[],a={status:"pending",value:null,reason:null,then:function(c){l.push(c)}};return e.then(function(){a.status="fulfilled",a.value=n;for(var c=0;c<l.length;c++)(0,l[c])(n)},function(c){for(a.status="rejected",a.reason=c,c=0;c<l.length;c++)(0,l[c])(void 0)}),a}var Zd=L.S;L.S=function(e,n){Dh=Ie(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&pb(e,n),Zd!==null&&Zd(e,n)};var Zl=T(null);function Hs(){var e=Zl.current;return e!==null?e:tt.pooledCache}function Da(e,n){n===null?j(Zl,Zl.current):j(Zl,n.pool)}function Kd(){var e=Hs();return e===null?null:{parent:mt._currentValue,pool:e}}var zi=Error(u(460)),Is=Error(u(474)),Ra=Error(u(542)),Ma={then:function(){}};function Jd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Pd(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(Hn,Hn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,ep(e),e;default:if(typeof n.status=="string")n.then(Hn,Hn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=n,e.status="pending",e.then(function(a){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=a}},function(a){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=a}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,ep(e),e}throw Jl=n,zi}}function Kl(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Jl=l,zi):l}}var Jl=null;function Wd(){if(Jl===null)throw Error(u(459));var e=Jl;return Jl=null,e}function ep(e){if(e===zi||e===Ra)throw Error(u(483))}var Di=null,br=0;function Oa(e){var n=br;return br+=1,Di===null&&(Di=[]),Pd(Di,e,n)}function vr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function La(e,n){throw n.$$typeof===S?Error(u(525)):(e=Object.prototype.toString.call(n),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function tp(e){function n(R,z){if(e){var q=R.deletions;q===null?(R.deletions=[z],R.flags|=16):q.push(z)}}function l(R,z){if(!e)return null;for(;z!==null;)n(R,z),z=z.sibling;return null}function a(R){for(var z=new Map;R!==null;)R.key!==null?z.set(R.key,R):z.set(R.index,R),R=R.sibling;return z}function c(R,z){return R=Yn(R,z),R.index=0,R.sibling=null,R}function p(R,z,q){return R.index=q,e?(q=R.alternate,q!==null?(q=q.index,q<z?(R.flags|=67108866,z):q):(R.flags|=67108866,z)):(R.flags|=1048576,z)}function b(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function k(R,z,q,X){return z===null||z.tag!==6?(z=Ts(q,R.mode,X),z.return=R,z):(z=c(z,q),z.return=R,z)}function A(R,z,q,X){var ve=q.type;return ve===C?$(R,z,q.props.children,X,q.key):z!==null&&(z.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===le&&Kl(ve)===z.type)?(z=c(z,q.props),vr(z,q),z.return=R,z):(z=Ca(q.type,q.key,q.props,null,R.mode,X),vr(z,q),z.return=R,z)}function B(R,z,q,X){return z===null||z.tag!==4||z.stateNode.containerInfo!==q.containerInfo||z.stateNode.implementation!==q.implementation?(z=As(q,R.mode,X),z.return=R,z):(z=c(z,q.children||[]),z.return=R,z)}function $(R,z,q,X,ve){return z===null||z.tag!==7?(z=Fl(q,R.mode,X,ve),z.return=R,z):(z=c(z,q),z.return=R,z)}function K(R,z,q){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Ts(""+z,R.mode,q),z.return=R,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case v:return q=Ca(z.type,z.key,z.props,null,R.mode,q),vr(q,z),q.return=R,q;case N:return z=As(z,R.mode,q),z.return=R,z;case le:return z=Kl(z),K(R,z,q)}if(J(z)||ee(z))return z=Fl(z,R.mode,q,null),z.return=R,z;if(typeof z.then=="function")return K(R,Oa(z),q);if(z.$$typeof===U)return K(R,za(R,z),q);La(R,z)}return null}function I(R,z,q,X){var ve=z!==null?z.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return ve!==null?null:k(R,z,""+q,X);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return q.key===ve?A(R,z,q,X):null;case N:return q.key===ve?B(R,z,q,X):null;case le:return q=Kl(q),I(R,z,q,X)}if(J(q)||ee(q))return ve!==null?null:$(R,z,q,X,null);if(typeof q.then=="function")return I(R,z,Oa(q),X);if(q.$$typeof===U)return I(R,z,za(R,q),X);La(R,q)}return null}function Y(R,z,q,X,ve){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return R=R.get(q)||null,k(z,R,""+X,ve);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return R=R.get(X.key===null?q:X.key)||null,A(z,R,X,ve);case N:return R=R.get(X.key===null?q:X.key)||null,B(z,R,X,ve);case le:return X=Kl(X),Y(R,z,q,X,ve)}if(J(X)||ee(X))return R=R.get(q)||null,$(z,R,X,ve,null);if(typeof X.then=="function")return Y(R,z,q,Oa(X),ve);if(X.$$typeof===U)return Y(R,z,q,za(z,X),ve);La(z,X)}return null}function ge(R,z,q,X){for(var ve=null,Fe=null,ye=z,Te=z=0,Ue=null;ye!==null&&Te<q.length;Te++){ye.index>Te?(Ue=ye,ye=null):Ue=ye.sibling;var $e=I(R,ye,q[Te],X);if($e===null){ye===null&&(ye=Ue);break}e&&ye&&$e.alternate===null&&n(R,ye),z=p($e,z,Te),Fe===null?ve=$e:Fe.sibling=$e,Fe=$e,ye=Ue}if(Te===q.length)return l(R,ye),Be&&Vn(R,Te),ve;if(ye===null){for(;Te<q.length;Te++)ye=K(R,q[Te],X),ye!==null&&(z=p(ye,z,Te),Fe===null?ve=ye:Fe.sibling=ye,Fe=ye);return Be&&Vn(R,Te),ve}for(ye=a(ye);Te<q.length;Te++)Ue=Y(ye,R,Te,q[Te],X),Ue!==null&&(e&&Ue.alternate!==null&&ye.delete(Ue.key===null?Te:Ue.key),z=p(Ue,z,Te),Fe===null?ve=Ue:Fe.sibling=Ue,Fe=Ue);return e&&ye.forEach(function(Rl){return n(R,Rl)}),Be&&Vn(R,Te),ve}function ke(R,z,q,X){if(q==null)throw Error(u(151));for(var ve=null,Fe=null,ye=z,Te=z=0,Ue=null,$e=q.next();ye!==null&&!$e.done;Te++,$e=q.next()){ye.index>Te?(Ue=ye,ye=null):Ue=ye.sibling;var Rl=I(R,ye,$e.value,X);if(Rl===null){ye===null&&(ye=Ue);break}e&&ye&&Rl.alternate===null&&n(R,ye),z=p(Rl,z,Te),Fe===null?ve=Rl:Fe.sibling=Rl,Fe=Rl,ye=Ue}if($e.done)return l(R,ye),Be&&Vn(R,Te),ve;if(ye===null){for(;!$e.done;Te++,$e=q.next())$e=K(R,$e.value,X),$e!==null&&(z=p($e,z,Te),Fe===null?ve=$e:Fe.sibling=$e,Fe=$e);return Be&&Vn(R,Te),ve}for(ye=a(ye);!$e.done;Te++,$e=q.next())$e=Y(ye,R,Te,$e.value,X),$e!==null&&(e&&$e.alternate!==null&&ye.delete($e.key===null?Te:$e.key),z=p($e,z,Te),Fe===null?ve=$e:Fe.sibling=$e,Fe=$e);return e&&ye.forEach(function(N0){return n(R,N0)}),Be&&Vn(R,Te),ve}function et(R,z,q,X){if(typeof q=="object"&&q!==null&&q.type===C&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case v:e:{for(var ve=q.key;z!==null;){if(z.key===ve){if(ve=q.type,ve===C){if(z.tag===7){l(R,z.sibling),X=c(z,q.props.children),X.return=R,R=X;break e}}else if(z.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===le&&Kl(ve)===z.type){l(R,z.sibling),X=c(z,q.props),vr(X,q),X.return=R,R=X;break e}l(R,z);break}else n(R,z);z=z.sibling}q.type===C?(X=Fl(q.props.children,R.mode,X,q.key),X.return=R,R=X):(X=Ca(q.type,q.key,q.props,null,R.mode,X),vr(X,q),X.return=R,R=X)}return b(R);case N:e:{for(ve=q.key;z!==null;){if(z.key===ve)if(z.tag===4&&z.stateNode.containerInfo===q.containerInfo&&z.stateNode.implementation===q.implementation){l(R,z.sibling),X=c(z,q.children||[]),X.return=R,R=X;break e}else{l(R,z);break}else n(R,z);z=z.sibling}X=As(q,R.mode,X),X.return=R,R=X}return b(R);case le:return q=Kl(q),et(R,z,q,X)}if(J(q))return ge(R,z,q,X);if(ee(q)){if(ve=ee(q),typeof ve!="function")throw Error(u(150));return q=ve.call(q),ke(R,z,q,X)}if(typeof q.then=="function")return et(R,z,Oa(q),X);if(q.$$typeof===U)return et(R,z,za(R,q),X);La(R,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,z!==null&&z.tag===6?(l(R,z.sibling),X=c(z,q),X.return=R,R=X):(l(R,z),X=Ts(q,R.mode,X),X.return=R,R=X),b(R)):l(R,z)}return function(R,z,q,X){try{br=0;var ve=et(R,z,q,X);return Di=null,ve}catch(ye){if(ye===zi||ye===Ra)throw ye;var Fe=Zt(29,ye,null,R.mode);return Fe.lanes=X,Fe.return=R,Fe}}}var Pl=tp(!0),np=tp(!1),gl=!1;function Ys(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vs(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 xl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yl(e,n,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Xe&2)!==0){var c=a.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n,n=Ea(e),Bd(e,null,l),n}return _a(e,a,n,l),Ea(e)}function Sr(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var a=n.lanes;a&=e.pendingLanes,l|=a,n.lanes=l,ot(e,l)}}function Gs(e,n){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var c=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?c=p=b:p=p.next=b,l=l.next}while(l!==null);p===null?c=p=n:p=p.next=n}else c=p=n;l={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:p,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var Fs=!1;function kr(){if(Fs){var e=Ai;if(e!==null)throw e}}function wr(e,n,l,a){Fs=!1;var c=e.updateQueue;gl=!1;var p=c.firstBaseUpdate,b=c.lastBaseUpdate,k=c.shared.pending;if(k!==null){c.shared.pending=null;var A=k,B=A.next;A.next=null,b===null?p=B:b.next=B,b=A;var $=e.alternate;$!==null&&($=$.updateQueue,k=$.lastBaseUpdate,k!==b&&(k===null?$.firstBaseUpdate=B:k.next=B,$.lastBaseUpdate=A))}if(p!==null){var K=c.baseState;b=0,$=B=A=null,k=p;do{var I=k.lane&-536870913,Y=I!==k.lane;if(Y?(Le&I)===I:(a&I)===I){I!==0&&I===Ti&&(Fs=!0),$!==null&&($=$.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var ge=e,ke=k;I=n;var et=l;switch(ke.tag){case 1:if(ge=ke.payload,typeof ge=="function"){K=ge.call(et,K,I);break e}K=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=ke.payload,I=typeof ge=="function"?ge.call(et,K,I):ge,I==null)break e;K=x({},K,I);break e;case 2:gl=!0}}I=k.callback,I!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=c.callbacks,Y===null?c.callbacks=[I]:Y.push(I))}else Y={lane:I,tag:k.tag,payload:k.payload,callback:k.callback,next:null},$===null?(B=$=Y,A=K):$=$.next=Y,b|=I;if(k=k.next,k===null){if(k=c.shared.pending,k===null)break;Y=k,k=Y.next,Y.next=null,c.lastBaseUpdate=Y,c.shared.pending=null}}while(!0);$===null&&(A=K),c.baseState=A,c.firstBaseUpdate=B,c.lastBaseUpdate=$,p===null&&(c.shared.lanes=0),wl|=b,e.lanes=b,e.memoizedState=K}}function lp(e,n){if(typeof e!="function")throw Error(u(191,e));e.call(n)}function ip(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)lp(l[e],n)}var Ri=T(null),Ua=T(0);function rp(e,n){e=el,j(Ua,e),j(Ri,n),el=e|n.baseLanes}function $s(){j(Ua,el),j(Ri,Ri.current)}function Xs(){el=Ua.current,V(Ri),V(Ua)}var Kt=T(null),hn=null;function bl(e){var n=e.alternate;j(dt,dt.current&1),j(Kt,e),hn===null&&(n===null||Ri.current!==null||n.memoizedState!==null)&&(hn=e)}function Qs(e){j(dt,dt.current),j(Kt,e),hn===null&&(hn=e)}function ap(e){e.tag===22?(j(dt,dt.current),j(Kt,e),hn===null&&(hn=e)):vl()}function vl(){j(dt,dt.current),j(Kt,Kt.current)}function Jt(e){V(Kt),hn===e&&(hn=null),V(dt)}var dt=T(0);function qa(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||tc(l)||nc(l)))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 $n=0,Ce=null,Pe=null,gt=null,Ba=!1,Mi=!1,Wl=!1,Ha=0,jr=0,Oi=null,mb=0;function ct(){throw Error(u(321))}function Zs(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Qt(e[l],n[l]))return!1;return!0}function Ks(e,n,l,a,c,p){return $n=p,Ce=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,L.H=e===null||e.memoizedState===null?Vp:fo,Wl=!1,p=l(a,c),Wl=!1,Mi&&(p=sp(n,l,a,c)),up(e),p}function up(e){L.H=Er;var n=Pe!==null&&Pe.next!==null;if($n=0,gt=Pe=Ce=null,Ba=!1,jr=0,Oi=null,n)throw Error(u(300));e===null||xt||(e=e.dependencies,e!==null&&Aa(e)&&(xt=!0))}function sp(e,n,l,a){Ce=e;var c=0;do{if(Mi&&(Oi=null),jr=0,Mi=!1,25<=c)throw Error(u(301));if(c+=1,gt=Pe=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}L.H=Gp,p=n(l,a)}while(Mi);return p}function gb(){var e=L.H,n=e.useState()[0];return n=typeof n.then=="function"?Nr(n):n,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(Ce.flags|=1024),n}function Js(){var e=Ha!==0;return Ha=0,e}function Ps(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function Ws(e){if(Ba){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ba=!1}$n=0,gt=Pe=Ce=null,Mi=!1,jr=Ha=0,Oi=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Ce.memoizedState=gt=e:gt=gt.next=e,gt}function pt(){if(Pe===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var n=gt===null?Ce.memoizedState:gt.next;if(n!==null)gt=n,Pe=e;else{if(e===null)throw Ce.alternate===null?Error(u(467)):Error(u(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},gt===null?Ce.memoizedState=gt=e:gt=gt.next=e}return gt}function Ia(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Nr(e){var n=jr;return jr+=1,Oi===null&&(Oi=[]),e=Pd(Oi,e,n),n=Ce,(gt===null?n.memoizedState:gt.next)===null&&(n=n.alternate,L.H=n===null||n.memoizedState===null?Vp:fo),e}function Ya(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Nr(e);if(e.$$typeof===U)return Ct(e)}throw Error(u(438,String(e)))}function eo(e){var n=null,l=Ce.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var a=Ce.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(n={data:a.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Ia(),Ce.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),a=0;a<e;a++)l[a]=O;return n.index++,l}function Xn(e,n){return typeof n=="function"?n(e):n}function Va(e){var n=pt();return to(n,Pe,e)}function to(e,n,l){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=l;var c=e.baseQueue,p=a.pending;if(p!==null){if(c!==null){var b=c.next;c.next=p.next,p.next=b}n.baseQueue=c=p,a.pending=null}if(p=e.baseState,c===null)e.memoizedState=p;else{n=c.next;var k=b=null,A=null,B=n,$=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Le&K)===K:($n&K)===K){var I=B.revertLane;if(I===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Ti&&($=!0);else if(($n&I)===I){B=B.next,I===Ti&&($=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},A===null?(k=A=K,b=p):A=A.next=K,Ce.lanes|=I,wl|=I;K=B.action,Wl&&l(p,K),p=B.hasEagerState?B.eagerState:l(p,K)}else I={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},A===null?(k=A=I,b=p):A=A.next=I,Ce.lanes|=K,wl|=K;B=B.next}while(B!==null&&B!==n);if(A===null?b=p:A.next=k,!Qt(p,e.memoizedState)&&(xt=!0,$&&(l=Ai,l!==null)))throw l;e.memoizedState=p,e.baseState=b,e.baseQueue=A,a.lastRenderedState=p}return c===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function no(e){var n=pt(),l=n.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var a=l.dispatch,c=l.pending,p=n.memoizedState;if(c!==null){l.pending=null;var b=c=c.next;do p=e(p,b.action),b=b.next;while(b!==c);Qt(p,n.memoizedState)||(xt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),l.lastRenderedState=p}return[p,a]}function op(e,n,l){var a=Ce,c=pt(),p=Be;if(p){if(l===void 0)throw Error(u(407));l=l()}else l=n();var b=!Qt((Pe||c).memoizedState,l);if(b&&(c.memoizedState=l,xt=!0),c=c.queue,ro(dp.bind(null,a,c,e),[e]),c.getSnapshot!==n||b||gt!==null&&gt.memoizedState.tag&1){if(a.flags|=2048,Li(9,{destroy:void 0},fp.bind(null,a,c,l,n),null),tt===null)throw Error(u(349));p||($n&127)!==0||cp(a,n,l)}return l}function cp(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Ce.updateQueue,n===null?(n=Ia(),Ce.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function fp(e,n,l,a){n.value=l,n.getSnapshot=a,pp(n)&&hp(e)}function dp(e,n,l){return l(function(){pp(n)&&hp(e)})}function pp(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Qt(e,l)}catch{return!0}}function hp(e){var n=Gl(e,2);n!==null&&Gt(n,e,2)}function lo(e){var n=Ot();if(typeof e=="function"){var l=e;if(e=l(),Wl){Nt(!0);try{l()}finally{Nt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:e},n}function mp(e,n,l,a){return e.baseState=l,to(e,Pe,typeof a=="function"?a:Xn)}function xb(e,n,l,a,c){if($a(e))throw Error(u(485));if(e=n.action,e!==null){var p={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){p.listeners.push(b)}};L.T!==null?l(!0):p.isTransition=!1,a(p),l=n.pending,l===null?(p.next=n.pending=p,gp(n,p)):(p.next=l.next,n.pending=l.next=p)}}function gp(e,n){var l=n.action,a=n.payload,c=e.state;if(n.isTransition){var p=L.T,b={};L.T=b;try{var k=l(c,a),A=L.S;A!==null&&A(b,k),xp(e,n,k)}catch(B){io(e,n,B)}finally{p!==null&&b.types!==null&&(p.types=b.types),L.T=p}}else try{p=l(c,a),xp(e,n,p)}catch(B){io(e,n,B)}}function xp(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){yp(e,n,a)},function(a){return io(e,n,a)}):yp(e,n,l)}function yp(e,n,l){n.status="fulfilled",n.value=l,bp(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,gp(e,l)))}function io(e,n,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do n.status="rejected",n.reason=l,bp(n),n=n.next;while(n!==a)}e.action=null}function bp(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function vp(e,n){return n}function Sp(e,n){if(Be){var l=tt.formState;if(l!==null){e:{var a=Ce;if(Be){if(it){t:{for(var c=it,p=pn;c.nodeType!==8;){if(!p){c=null;break t}if(c=mn(c.nextSibling),c===null){c=null;break t}}p=c.data,c=p==="F!"||p==="F"?c:null}if(c){it=mn(c.nextSibling),a=c.data==="F!";break e}}hl(a)}a=!1}a&&(n=l[0])}}return l=Ot(),l.memoizedState=l.baseState=n,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vp,lastRenderedState:n},l.queue=a,l=Hp.bind(null,Ce,a),a.dispatch=l,a=lo(!1),p=co.bind(null,Ce,!1,a.queue),a=Ot(),c={state:n,dispatch:null,action:e,pending:null},a.queue=c,l=xb.bind(null,Ce,c,p,l),c.dispatch=l,a.memoizedState=e,[n,l,!1]}function kp(e){var n=pt();return wp(n,Pe,e)}function wp(e,n,l){if(n=to(e,n,vp)[0],e=Va(Xn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var a=Nr(n)}catch(b){throw b===zi?Ra:b}else a=n;n=pt();var c=n.queue,p=c.dispatch;return l!==n.memoizedState&&(Ce.flags|=2048,Li(9,{destroy:void 0},yb.bind(null,c,l),null)),[a,p,e]}function yb(e,n){e.action=n}function jp(e){var n=pt(),l=Pe;if(l!==null)return wp(n,l,e);pt(),n=n.memoizedState,l=pt();var a=l.queue.dispatch;return l.memoizedState=e,[n,a,!1]}function Li(e,n,l,a){return e={tag:e,create:l,deps:a,inst:n,next:null},n=Ce.updateQueue,n===null&&(n=Ia(),Ce.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,n.lastEffect=e),e}function Np(){return pt().memoizedState}function Ga(e,n,l,a){var c=Ot();Ce.flags|=e,c.memoizedState=Li(1|n,{destroy:void 0},l,a===void 0?null:a)}function Fa(e,n,l,a){var c=pt();a=a===void 0?null:a;var p=c.memoizedState.inst;Pe!==null&&a!==null&&Zs(a,Pe.memoizedState.deps)?c.memoizedState=Li(n,p,l,a):(Ce.flags|=e,c.memoizedState=Li(1|n,p,l,a))}function _p(e,n){Ga(8390656,8,e,n)}function ro(e,n){Fa(2048,8,e,n)}function bb(e){Ce.flags|=4;var n=Ce.updateQueue;if(n===null)n=Ia(),Ce.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function Ep(e){var n=pt().memoizedState;return bb({ref:n,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}function Cp(e,n){return Fa(4,2,e,n)}function Tp(e,n){return Fa(4,4,e,n)}function Ap(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function zp(e,n,l){l=l!=null?l.concat([e]):null,Fa(4,4,Ap.bind(null,n,e),l)}function ao(){}function Dp(e,n){var l=pt();n=n===void 0?null:n;var a=l.memoizedState;return n!==null&&Zs(n,a[1])?a[0]:(l.memoizedState=[e,n],e)}function Rp(e,n){var l=pt();n=n===void 0?null:n;var a=l.memoizedState;if(n!==null&&Zs(n,a[1]))return a[0];if(a=e(),Wl){Nt(!0);try{e()}finally{Nt(!1)}}return l.memoizedState=[a,n],a}function uo(e,n,l){return l===void 0||($n&1073741824)!==0&&(Le&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=Mh(),Ce.lanes|=e,wl|=e,l)}function Mp(e,n,l,a){return Qt(l,n)?l:Ri.current!==null?(e=uo(e,l,a),Qt(e,n)||(xt=!0),e):($n&42)===0||($n&1073741824)!==0&&(Le&261930)===0?(xt=!0,e.memoizedState=l):(e=Mh(),Ce.lanes|=e,wl|=e,n)}function Op(e,n,l,a,c){var p=P.p;P.p=p!==0&&8>p?p:8;var b=L.T,k={};L.T=k,co(e,!1,n,l);try{var A=c(),B=L.S;if(B!==null&&B(k,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var $=hb(A,a);_r(e,n,$,en(e))}else _r(e,n,a,en(e))}catch(K){_r(e,n,{then:function(){},status:"rejected",reason:K},en())}finally{P.p=p,b!==null&&k.types!==null&&(b.types=k.types),L.T=b}}function vb(){}function so(e,n,l,a){if(e.tag!==5)throw Error(u(476));var c=Lp(e).queue;Op(e,c,n,fe,l===null?vb:function(){return Up(e),l(a)})}function Lp(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:fe},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Up(e){var n=Lp(e);n.next===null&&(n=e.alternate.memoizedState),_r(e,n.next.queue,{},en())}function oo(){return Ct(Vr)}function qp(){return pt().memoizedState}function Bp(){return pt().memoizedState}function Sb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=en();e=xl(l);var a=yl(n,e,l);a!==null&&(Gt(a,n,l),Sr(a,n,l)),n={cache:qs()},e.payload=n;return}n=n.return}}function kb(e,n,l){var a=en();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},$a(e)?Ip(n,l):(l=Es(e,n,l,a),l!==null&&(Gt(l,e,a),Yp(l,n,a)))}function Hp(e,n,l){var a=en();_r(e,n,l,a)}function _r(e,n,l,a){var c={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if($a(e))Ip(n,c);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var b=n.lastRenderedState,k=p(b,l);if(c.hasEagerState=!0,c.eagerState=k,Qt(k,b))return _a(e,n,c,0),tt===null&&Na(),!1}catch{}if(l=Es(e,n,c,a),l!==null)return Gt(l,e,a),Yp(l,n,a),!0}return!1}function co(e,n,l,a){if(a={lane:2,revertLane:Vo(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},$a(e)){if(n)throw Error(u(479))}else n=Es(e,l,a,2),n!==null&&Gt(n,e,2)}function $a(e){var n=e.alternate;return e===Ce||n!==null&&n===Ce}function Ip(e,n){Mi=Ba=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Yp(e,n,l){if((l&4194048)!==0){var a=n.lanes;a&=e.pendingLanes,l|=a,n.lanes=l,ot(e,l)}}var Er={readContext:Ct,use:Ya,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};Er.useEffectEvent=ct;var Vp={readContext:Ct,use:Ya,useCallback:function(e,n){return Ot().memoizedState=[e,n===void 0?null:n],e},useContext:Ct,useEffect:_p,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,Ga(4194308,4,Ap.bind(null,n,e),l)},useLayoutEffect:function(e,n){return Ga(4194308,4,e,n)},useInsertionEffect:function(e,n){Ga(4,2,e,n)},useMemo:function(e,n){var l=Ot();n=n===void 0?null:n;var a=e();if(Wl){Nt(!0);try{e()}finally{Nt(!1)}}return l.memoizedState=[a,n],a},useReducer:function(e,n,l){var a=Ot();if(l!==void 0){var c=l(n);if(Wl){Nt(!0);try{l(n)}finally{Nt(!1)}}}else c=n;return a.memoizedState=a.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},a.queue=e,e=e.dispatch=kb.bind(null,Ce,e),[a.memoizedState,e]},useRef:function(e){var n=Ot();return e={current:e},n.memoizedState=e},useState:function(e){e=lo(e);var n=e.queue,l=Hp.bind(null,Ce,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:ao,useDeferredValue:function(e,n){var l=Ot();return uo(l,e,n)},useTransition:function(){var e=lo(!1);return e=Op.bind(null,Ce,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var a=Ce,c=Ot();if(Be){if(l===void 0)throw Error(u(407));l=l()}else{if(l=n(),tt===null)throw Error(u(349));(Le&127)!==0||cp(a,n,l)}c.memoizedState=l;var p={value:l,getSnapshot:n};return c.queue=p,_p(dp.bind(null,a,p,e),[e]),a.flags|=2048,Li(9,{destroy:void 0},fp.bind(null,a,p,l,n),null),l},useId:function(){var e=Ot(),n=tt.identifierPrefix;if(Be){var l=An,a=Tn;l=(a&~(1<<32-Qe(a)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Ha++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=mb++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:oo,useFormState:Sp,useActionState:Sp,useOptimistic:function(e){var n=Ot();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=co.bind(null,Ce,!0,l),l.dispatch=n,[e,n]},useMemoCache:eo,useCacheRefresh:function(){return Ot().memoizedState=Sb.bind(null,Ce)},useEffectEvent:function(e){var n=Ot(),l={impl:e};return n.memoizedState=l,function(){if((Xe&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},fo={readContext:Ct,use:Ya,useCallback:Dp,useContext:Ct,useEffect:ro,useImperativeHandle:zp,useInsertionEffect:Cp,useLayoutEffect:Tp,useMemo:Rp,useReducer:Va,useRef:Np,useState:function(){return Va(Xn)},useDebugValue:ao,useDeferredValue:function(e,n){var l=pt();return Mp(l,Pe.memoizedState,e,n)},useTransition:function(){var e=Va(Xn)[0],n=pt().memoizedState;return[typeof e=="boolean"?e:Nr(e),n]},useSyncExternalStore:op,useId:qp,useHostTransitionStatus:oo,useFormState:kp,useActionState:kp,useOptimistic:function(e,n){var l=pt();return mp(l,Pe,e,n)},useMemoCache:eo,useCacheRefresh:Bp};fo.useEffectEvent=Ep;var Gp={readContext:Ct,use:Ya,useCallback:Dp,useContext:Ct,useEffect:ro,useImperativeHandle:zp,useInsertionEffect:Cp,useLayoutEffect:Tp,useMemo:Rp,useReducer:no,useRef:Np,useState:function(){return no(Xn)},useDebugValue:ao,useDeferredValue:function(e,n){var l=pt();return Pe===null?uo(l,e,n):Mp(l,Pe.memoizedState,e,n)},useTransition:function(){var e=no(Xn)[0],n=pt().memoizedState;return[typeof e=="boolean"?e:Nr(e),n]},useSyncExternalStore:op,useId:qp,useHostTransitionStatus:oo,useFormState:jp,useActionState:jp,useOptimistic:function(e,n){var l=pt();return Pe!==null?mp(l,Pe,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:eo,useCacheRefresh:Bp};Gp.useEffectEvent=Ep;function po(e,n,l,a){n=e.memoizedState,l=l(a,n),l=l==null?n:x({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var ho={enqueueSetState:function(e,n,l){e=e._reactInternals;var a=en(),c=xl(a);c.payload=n,l!=null&&(c.callback=l),n=yl(e,c,a),n!==null&&(Gt(n,e,a),Sr(n,e,a))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var a=en(),c=xl(a);c.tag=1,c.payload=n,l!=null&&(c.callback=l),n=yl(e,c,a),n!==null&&(Gt(n,e,a),Sr(n,e,a))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=en(),a=xl(l);a.tag=2,n!=null&&(a.callback=n),n=yl(e,a,l),n!==null&&(Gt(n,e,l),Sr(n,e,l))}};function Fp(e,n,l,a,c,p,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,p,b):n.prototype&&n.prototype.isPureReactComponent?!pr(l,a)||!pr(c,p):!0}function $p(e,n,l,a){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,a),n.state!==e&&ho.enqueueReplaceState(n,n.state,null)}function ei(e,n){var l=n;if("ref"in n){l={};for(var a in n)a!=="ref"&&(l[a]=n[a])}if(e=e.defaultProps){l===n&&(l=x({},l));for(var c in e)l[c]===void 0&&(l[c]=e[c])}return l}function Xp(e){ja(e)}function Qp(e){console.error(e)}function Zp(e){ja(e)}function Xa(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(a){setTimeout(function(){throw a})}}function Kp(e,n,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function mo(e,n,l){return l=xl(l),l.tag=3,l.payload={element:null},l.callback=function(){Xa(e,n)},l}function Jp(e){return e=xl(e),e.tag=3,e}function Pp(e,n,l,a){var c=l.type.getDerivedStateFromError;if(typeof c=="function"){var p=a.value;e.payload=function(){return c(p)},e.callback=function(){Kp(n,l,a)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Kp(n,l,a),typeof c!="function"&&(jl===null?jl=new Set([this]):jl.add(this));var k=a.stack;this.componentDidCatch(a.value,{componentStack:k!==null?k:""})})}function wb(e,n,l,a,c){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(n=l.alternate,n!==null&&Ci(n,l,c,!0),l=Kt.current,l!==null){switch(l.tag){case 31:case 13:return hn===null?ru():l.alternate===null&&ft===0&&(ft=3),l.flags&=-257,l.flags|=65536,l.lanes=c,a===Ma?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([a]):n.add(a),Ho(e,a,c)),!1;case 22:return l.flags|=65536,a===Ma?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([a]):l.add(a)),Ho(e,a,c)),!1}throw Error(u(435,l.tag))}return Ho(e,a,c),ru(),!1}if(Be)return n=Kt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,a!==Rs&&(e=Error(u(422),{cause:a}),gr(cn(e,l)))):(a!==Rs&&(n=Error(u(423),{cause:a}),gr(cn(n,l))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,a=cn(a,l),c=mo(e.stateNode,a,c),Gs(e,c),ft!==4&&(ft=2)),!1;var p=Error(u(520),{cause:a});if(p=cn(p,l),Or===null?Or=[p]:Or.push(p),ft!==4&&(ft=2),n===null)return!0;a=cn(a,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=c&-c,l.lanes|=e,e=mo(l.stateNode,a,e),Gs(l,e),!1;case 1:if(n=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(jl===null||!jl.has(p))))return l.flags|=65536,c&=-c,l.lanes|=c,c=Jp(c),Pp(c,e,l,a),Gs(l,c),!1}l=l.return}while(l!==null);return!1}var go=Error(u(461)),xt=!1;function Tt(e,n,l,a){n.child=e===null?np(n,null,l,a):Pl(n,e.child,l,a)}function Wp(e,n,l,a,c){l=l.render;var p=n.ref;if("ref"in a){var b={};for(var k in a)k!=="ref"&&(b[k]=a[k])}else b=a;return Ql(n),a=Ks(e,n,l,b,p,c),k=Js(),e!==null&&!xt?(Ps(e,n,c),Qn(e,n,c)):(Be&&k&&zs(n),n.flags|=1,Tt(e,n,a,c),n.child)}function eh(e,n,l,a,c){if(e===null){var p=l.type;return typeof p=="function"&&!Cs(p)&&p.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=p,th(e,n,p,a,c)):(e=Ca(l.type,null,a,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,!jo(e,c)){var b=p.memoizedProps;if(l=l.compare,l=l!==null?l:pr,l(b,a)&&e.ref===n.ref)return Qn(e,n,c)}return n.flags|=1,e=Yn(p,a),e.ref=n.ref,e.return=n,n.child=e}function th(e,n,l,a,c){if(e!==null){var p=e.memoizedProps;if(pr(p,a)&&e.ref===n.ref)if(xt=!1,n.pendingProps=a=p,jo(e,c))(e.flags&131072)!==0&&(xt=!0);else return n.lanes=e.lanes,Qn(e,n,c)}return xo(e,n,l,a,c)}function nh(e,n,l,a){var c=a.children,p=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((n.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,e!==null){for(a=n.child=e.child,c=0;a!==null;)c=c|a.lanes|a.childLanes,a=a.sibling;a=c&~p}else a=0,n.child=null;return lh(e,n,p,l,a)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Da(n,p!==null?p.cachePool:null),p!==null?rp(n,p):$s(),ap(n);else return a=n.lanes=536870912,lh(e,n,p!==null?p.baseLanes|l:l,l,a)}else p!==null?(Da(n,p.cachePool),rp(n,p),vl(),n.memoizedState=null):(e!==null&&Da(n,null),$s(),vl());return Tt(e,n,c,l),n.child}function Cr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function lh(e,n,l,a,c){var p=Hs();return p=p===null?null:{parent:mt._currentValue,pool:p},n.memoizedState={baseLanes:l,cachePool:p},e!==null&&Da(n,null),$s(),ap(n),e!==null&&Ci(e,n,a,!0),n.childLanes=c,null}function Qa(e,n){return n=Ka({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function ih(e,n,l){return Pl(n,e.child,null,l),e=Qa(n,n.pendingProps),e.flags|=2,Jt(n),n.memoizedState=null,e}function jb(e,n,l){var a=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Be){if(a.mode==="hidden")return e=Qa(n,a),n.lanes=536870912,Cr(null,e);if(Qs(n),(e=it)?(e=gm(e,pn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:dl!==null?{id:Tn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},l=Id(e),l.return=n,n.child=l,Et=n,it=null)):e=null,e===null)throw hl(n);return n.lanes=536870912,null}return Qa(n,a)}var p=e.memoizedState;if(p!==null){var b=p.dehydrated;if(Qs(n),c)if(n.flags&256)n.flags&=-257,n=ih(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(u(558));else if(xt||Ci(e,n,l,!1),c=(l&e.childLanes)!==0,xt||c){if(a=tt,a!==null&&(b=qn(a,l),b!==0&&b!==p.retryLane))throw p.retryLane=b,Gl(e,b),Gt(a,e,b),go;ru(),n=ih(e,n,l)}else e=p.treeContext,it=mn(b.nextSibling),Et=n,Be=!0,pl=null,pn=!1,e!==null&&Gd(n,e),n=Qa(n,a),n.flags|=4096;return n}return e=Yn(e.child,{mode:a.mode,children:a.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Za(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(u(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function xo(e,n,l,a,c){return Ql(n),l=Ks(e,n,l,a,void 0,c),a=Js(),e!==null&&!xt?(Ps(e,n,c),Qn(e,n,c)):(Be&&a&&zs(n),n.flags|=1,Tt(e,n,l,c),n.child)}function rh(e,n,l,a,c,p){return Ql(n),n.updateQueue=null,l=sp(n,a,l,c),up(e),a=Js(),e!==null&&!xt?(Ps(e,n,p),Qn(e,n,p)):(Be&&a&&zs(n),n.flags|=1,Tt(e,n,l,p),n.child)}function ah(e,n,l,a,c){if(Ql(n),n.stateNode===null){var p=ji,b=l.contextType;typeof b=="object"&&b!==null&&(p=Ct(b)),p=new l(a,p),n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=ho,n.stateNode=p,p._reactInternals=n,p=n.stateNode,p.props=a,p.state=n.memoizedState,p.refs={},Ys(n),b=l.contextType,p.context=typeof b=="object"&&b!==null?Ct(b):ji,p.state=n.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(po(n,l,b,a),p.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(b=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),b!==p.state&&ho.enqueueReplaceState(p,p.state,null),wr(n,a,p,c),kr(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),a=!0}else if(e===null){p=n.stateNode;var k=n.memoizedProps,A=ei(l,k);p.props=A;var B=p.context,$=l.contextType;b=ji,typeof $=="object"&&$!==null&&(b=Ct($));var K=l.getDerivedStateFromProps;$=typeof K=="function"||typeof p.getSnapshotBeforeUpdate=="function",k=n.pendingProps!==k,$||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(k||B!==b)&&$p(n,p,a,b),gl=!1;var I=n.memoizedState;p.state=I,wr(n,a,p,c),kr(),B=n.memoizedState,k||I!==B||gl?(typeof K=="function"&&(po(n,l,K,a),B=n.memoizedState),(A=gl||Fp(n,l,A,a,I,B,b))?($||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(n.flags|=4194308)):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=B),p.props=a,p.state=B,p.context=b,a=A):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{p=n.stateNode,Vs(e,n),b=n.memoizedProps,$=ei(l,b),p.props=$,K=n.pendingProps,I=p.context,B=l.contextType,A=ji,typeof B=="object"&&B!==null&&(A=Ct(B)),k=l.getDerivedStateFromProps,(B=typeof k=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(b!==K||I!==A)&&$p(n,p,a,A),gl=!1,I=n.memoizedState,p.state=I,wr(n,a,p,c),kr();var Y=n.memoizedState;b!==K||I!==Y||gl||e!==null&&e.dependencies!==null&&Aa(e.dependencies)?(typeof k=="function"&&(po(n,l,k,a),Y=n.memoizedState),($=gl||Fp(n,l,$,a,I,Y,A)||e!==null&&e.dependencies!==null&&Aa(e.dependencies))?(B||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(a,Y,A),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(a,Y,A)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=Y),p.props=a,p.state=Y,p.context=A,a=$):(typeof p.componentDidUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=1024),a=!1)}return p=a,Za(e,n),a=(n.flags&128)!==0,p||a?(p=n.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:p.render(),n.flags|=1,e!==null&&a?(n.child=Pl(n,e.child,null,c),n.child=Pl(n,null,l,c)):Tt(e,n,l,c),n.memoizedState=p.state,e=n.child):e=Qn(e,n,c),e}function uh(e,n,l,a){return $l(),n.flags|=256,Tt(e,n,l,a),n.child}var yo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bo(e){return{baseLanes:e,cachePool:Kd()}}function vo(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=Wt),e}function sh(e,n,l){var a=n.pendingProps,c=!1,p=(n.flags&128)!==0,b;if((b=p)||(b=e!==null&&e.memoizedState===null?!1:(dt.current&2)!==0),b&&(c=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(Be){if(c?bl(n):vl(),(e=it)?(e=gm(e,pn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:dl!==null?{id:Tn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},l=Id(e),l.return=n,n.child=l,Et=n,it=null)):e=null,e===null)throw hl(n);return nc(e)?n.lanes=32:n.lanes=536870912,null}var k=a.children;return a=a.fallback,c?(vl(),c=n.mode,k=Ka({mode:"hidden",children:k},c),a=Fl(a,c,l,null),k.return=n,a.return=n,k.sibling=a,n.child=k,a=n.child,a.memoizedState=bo(l),a.childLanes=vo(e,b,l),n.memoizedState=yo,Cr(null,a)):(bl(n),So(n,k))}var A=e.memoizedState;if(A!==null&&(k=A.dehydrated,k!==null)){if(p)n.flags&256?(bl(n),n.flags&=-257,n=ko(e,n,l)):n.memoizedState!==null?(vl(),n.child=e.child,n.flags|=128,n=null):(vl(),k=a.fallback,c=n.mode,a=Ka({mode:"visible",children:a.children},c),k=Fl(k,c,l,null),k.flags|=2,a.return=n,k.return=n,a.sibling=k,n.child=a,Pl(n,e.child,null,l),a=n.child,a.memoizedState=bo(l),a.childLanes=vo(e,b,l),n.memoizedState=yo,n=Cr(null,a));else if(bl(n),nc(k)){if(b=k.nextSibling&&k.nextSibling.dataset,b)var B=b.dgst;b=B,a=Error(u(419)),a.stack="",a.digest=b,gr({value:a,source:null,stack:null}),n=ko(e,n,l)}else if(xt||Ci(e,n,l,!1),b=(l&e.childLanes)!==0,xt||b){if(b=tt,b!==null&&(a=qn(b,l),a!==0&&a!==A.retryLane))throw A.retryLane=a,Gl(e,a),Gt(b,e,a),go;tc(k)||ru(),n=ko(e,n,l)}else tc(k)?(n.flags|=192,n.child=e.child,n=null):(e=A.treeContext,it=mn(k.nextSibling),Et=n,Be=!0,pl=null,pn=!1,e!==null&&Gd(n,e),n=So(n,a.children),n.flags|=4096);return n}return c?(vl(),k=a.fallback,c=n.mode,A=e.child,B=A.sibling,a=Yn(A,{mode:"hidden",children:a.children}),a.subtreeFlags=A.subtreeFlags&65011712,B!==null?k=Yn(B,k):(k=Fl(k,c,l,null),k.flags|=2),k.return=n,a.return=n,a.sibling=k,n.child=a,Cr(null,a),a=n.child,k=e.child.memoizedState,k===null?k=bo(l):(c=k.cachePool,c!==null?(A=mt._currentValue,c=c.parent!==A?{parent:A,pool:A}:c):c=Kd(),k={baseLanes:k.baseLanes|l,cachePool:c}),a.memoizedState=k,a.childLanes=vo(e,b,l),n.memoizedState=yo,Cr(e.child,a)):(bl(n),l=e.child,e=l.sibling,l=Yn(l,{mode:"visible",children:a.children}),l.return=n,l.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=l,n.memoizedState=null,l)}function So(e,n){return n=Ka({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Ka(e,n){return e=Zt(22,e,null,n),e.lanes=0,e}function ko(e,n,l){return Pl(n,e.child,null,l),e=So(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function oh(e,n,l){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),Ls(e.return,n,l)}function wo(e,n,l,a,c,p){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:c,treeForkCount:p}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=a,b.tail=l,b.tailMode=c,b.treeForkCount=p)}function ch(e,n,l){var a=n.pendingProps,c=a.revealOrder,p=a.tail;a=a.children;var b=dt.current,k=(b&2)!==0;if(k?(b=b&1|2,n.flags|=128):b&=1,j(dt,b),Tt(e,n,a,l),a=Be?mr:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oh(e,l,n);else if(e.tag===19)oh(e,l,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(c){case"forwards":for(l=n.child,c=null;l!==null;)e=l.alternate,e!==null&&qa(e)===null&&(c=l),l=l.sibling;l=c,l===null?(c=n.child,n.child=null):(c=l.sibling,l.sibling=null),wo(n,!1,c,l,p,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&qa(e)===null){n.child=c;break}e=c.sibling,c.sibling=l,l=c,c=e}wo(n,!0,l,null,p,a);break;case"together":wo(n,!1,null,null,void 0,a);break;default:n.memoizedState=null}return n.child}function Qn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),wl|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Ci(e,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(u(153));if(n.child!==null){for(e=n.child,l=Yn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=Yn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function jo(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Aa(e)))}function Nb(e,n,l){switch(n.tag){case 3:qe(n,n.stateNode.containerInfo),ml(n,mt,e.memoizedState.cache),$l();break;case 27:case 5:pe(n);break;case 4:qe(n,n.stateNode.containerInfo);break;case 10:ml(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Qs(n),null;break;case 13:var a=n.memoizedState;if(a!==null)return a.dehydrated!==null?(bl(n),n.flags|=128,null):(l&n.child.childLanes)!==0?sh(e,n,l):(bl(n),e=Qn(e,n,l),e!==null?e.sibling:null);bl(n);break;case 19:var c=(e.flags&128)!==0;if(a=(l&n.childLanes)!==0,a||(Ci(e,n,l,!1),a=(l&n.childLanes)!==0),c){if(a)return ch(e,n,l);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),j(dt,dt.current),a)break;return null;case 22:return n.lanes=0,nh(e,n,l,n.pendingProps);case 24:ml(n,mt,e.memoizedState.cache)}return Qn(e,n,l)}function fh(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)xt=!0;else{if(!jo(e,l)&&(n.flags&128)===0)return xt=!1,Nb(e,n,l);xt=(e.flags&131072)!==0}else xt=!1,Be&&(n.flags&1048576)!==0&&Vd(n,mr,n.index);switch(n.lanes=0,n.tag){case 16:e:{var a=n.pendingProps;if(e=Kl(n.elementType),n.type=e,typeof e=="function")Cs(e)?(a=ei(e,a),n.tag=1,n=ah(null,n,e,a,l)):(n.tag=0,n=xo(null,n,e,a,l));else{if(e!=null){var c=e.$$typeof;if(c===Z){n.tag=11,n=Wp(null,n,e,a,l);break e}else if(c===H){n.tag=14,n=eh(null,n,e,a,l);break e}}throw n=oe(e)||e,Error(u(306,n,""))}}return n;case 0:return xo(e,n,n.type,n.pendingProps,l);case 1:return a=n.type,c=ei(a,n.pendingProps),ah(e,n,a,c,l);case 3:e:{if(qe(n,n.stateNode.containerInfo),e===null)throw Error(u(387));a=n.pendingProps;var p=n.memoizedState;c=p.element,Vs(e,n),wr(n,a,null,l);var b=n.memoizedState;if(a=b.cache,ml(n,mt,a),a!==p.cache&&Us(n,[mt],l,!0),kr(),a=b.element,p.isDehydrated)if(p={element:a,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=uh(e,n,a,l);break e}else if(a!==c){c=cn(Error(u(424)),n),gr(c),n=uh(e,n,a,l);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,it=mn(e.firstChild),Et=n,Be=!0,pl=null,pn=!0,l=np(n,null,a,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if($l(),a===c){n=Qn(e,n,l);break e}Tt(e,n,a,l)}n=n.child}return n;case 26:return Za(e,n),e===null?(l=km(n.type,null,n.pendingProps,null))?n.memoizedState=l:Be||(l=n.type,e=n.pendingProps,a=du(de.current).createElement(l),a[_t]=n,a[qt]=e,At(a,l,e),wt(a),n.stateNode=a):n.memoizedState=km(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return pe(n),e===null&&Be&&(a=n.stateNode=bm(n.type,n.pendingProps,de.current),Et=n,pn=!0,c=it,Cl(n.type)?(lc=c,it=mn(a.firstChild)):it=c),Tt(e,n,n.pendingProps.children,l),Za(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Be&&((c=a=it)&&(a=t0(a,n.type,n.pendingProps,pn),a!==null?(n.stateNode=a,Et=n,it=mn(a.firstChild),pn=!1,c=!0):c=!1),c||hl(n)),pe(n),c=n.type,p=n.pendingProps,b=e!==null?e.memoizedProps:null,a=p.children,Po(c,p)?a=null:b!==null&&Po(c,b)&&(n.flags|=32),n.memoizedState!==null&&(c=Ks(e,n,gb,null,null,l),Vr._currentValue=c),Za(e,n),Tt(e,n,a,l),n.child;case 6:return e===null&&Be&&((e=l=it)&&(l=n0(l,n.pendingProps,pn),l!==null?(n.stateNode=l,Et=n,it=null,e=!0):e=!1),e||hl(n)),null;case 13:return sh(e,n,l);case 4:return qe(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=Pl(n,null,a,l):Tt(e,n,a,l),n.child;case 11:return Wp(e,n,n.type,n.pendingProps,l);case 7:return Tt(e,n,n.pendingProps,l),n.child;case 8:return Tt(e,n,n.pendingProps.children,l),n.child;case 12:return Tt(e,n,n.pendingProps.children,l),n.child;case 10:return a=n.pendingProps,ml(n,n.type,a.value),Tt(e,n,a.children,l),n.child;case 9:return c=n.type._context,a=n.pendingProps.children,Ql(n),c=Ct(c),a=a(c),n.flags|=1,Tt(e,n,a,l),n.child;case 14:return eh(e,n,n.type,n.pendingProps,l);case 15:return th(e,n,n.type,n.pendingProps,l);case 19:return ch(e,n,l);case 31:return jb(e,n,l);case 22:return nh(e,n,l,n.pendingProps);case 24:return Ql(n),a=Ct(mt),e===null?(c=Hs(),c===null&&(c=tt,p=qs(),c.pooledCache=p,p.refCount++,p!==null&&(c.pooledCacheLanes|=l),c=p),n.memoizedState={parent:a,cache:c},Ys(n),ml(n,mt,c)):((e.lanes&l)!==0&&(Vs(e,n),wr(n,null,null,l),kr()),c=e.memoizedState,p=n.memoizedState,c.parent!==a?(c={parent:a,cache:a},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),ml(n,mt,a)):(a=p.cache,ml(n,mt,a),a!==c.cache&&Us(n,[mt],l,!0))),Tt(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(u(156,n.tag))}function Zn(e){e.flags|=4}function No(e,n,l,a,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(qh())e.flags|=8192;else throw Jl=Ma,Is}else e.flags&=-16777217}function dh(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Em(n))if(qh())e.flags|=8192;else throw Jl=Ma,Is}function Ja(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?pa():536870912,e.lanes|=n,Hi|=n)}function Tr(e,n){if(!Be)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function rt(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(n)for(var c=e.child;c!==null;)l|=c.lanes|c.childLanes,a|=c.subtreeFlags&65011712,a|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)l|=c.lanes|c.childLanes,a|=c.subtreeFlags,a|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=a,e.childLanes=l,n}function _b(e,n,l){var a=n.pendingProps;switch(Ds(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(n),null;case 1:return rt(n),null;case 3:return l=n.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Fn(mt),se(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ei(n)?Zn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Ms())),rt(n),null;case 26:var c=n.type,p=n.memoizedState;return e===null?(Zn(n),p!==null?(rt(n),dh(n,p)):(rt(n),No(n,c,null,a,l))):p?p!==e.memoizedState?(Zn(n),rt(n),dh(n,p)):(rt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==a&&Zn(n),rt(n),No(n,c,e,a,l)),null;case 27:if(Ge(n),l=de.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Zn(n);else{if(!a){if(n.stateNode===null)throw Error(u(166));return rt(n),null}e=re.current,Ei(n)?Fd(n):(e=bm(c,a,l),n.stateNode=e,Zn(n))}return rt(n),null;case 5:if(Ge(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Zn(n);else{if(!a){if(n.stateNode===null)throw Error(u(166));return rt(n),null}if(p=re.current,Ei(n))Fd(n);else{var b=du(de.current);switch(p){case 1:p=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:p=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":p=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":p=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":p=b.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof a.is=="string"?b.createElement("select",{is:a.is}):b.createElement("select"),a.multiple?p.multiple=!0:a.size&&(p.size=a.size);break;default:p=typeof a.is=="string"?b.createElement(c,{is:a.is}):b.createElement(c)}}p[_t]=n,p[qt]=a;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)p.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=p;e:switch(At(p,c,a),c){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Zn(n)}}return rt(n),No(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==a&&Zn(n);else{if(typeof a!="string"&&n.stateNode===null)throw Error(u(166));if(e=de.current,Ei(n)){if(e=n.stateNode,l=n.memoizedProps,a=null,c=Et,c!==null)switch(c.tag){case 27:case 5:a=c.memoizedProps}e[_t]=n,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||sm(e.nodeValue,l)),e||hl(n,!0)}else e=du(e).createTextNode(a),e[_t]=n,n.stateNode=e}return rt(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(a=Ei(n),l!==null){if(e===null){if(!a)throw Error(u(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[_t]=n}else $l(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;rt(n),e=!1}else l=Ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(Jt(n),n):(Jt(n),null);if((n.flags&128)!==0)throw Error(u(558))}return rt(n),null;case 13:if(a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ei(n),a!==null&&a.dehydrated!==null){if(e===null){if(!c)throw Error(u(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(u(317));c[_t]=n}else $l(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;rt(n),c=!1}else c=Ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(Jt(n),n):(Jt(n),null)}return Jt(n),(n.flags&128)!==0?(n.lanes=l,n):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=n.child,c=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(c=a.alternate.memoizedState.cachePool.pool),p=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(p=a.memoizedState.cachePool.pool),p!==c&&(a.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Ja(n,n.updateQueue),rt(n),null);case 4:return se(),e===null&&Xo(n.stateNode.containerInfo),rt(n),null;case 10:return Fn(n.type),rt(n),null;case 19:if(V(dt),a=n.memoizedState,a===null)return rt(n),null;if(c=(n.flags&128)!==0,p=a.rendering,p===null)if(c)Tr(a,!1);else{if(ft!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(p=qa(e),p!==null){for(n.flags|=128,Tr(a,!1),e=p.updateQueue,n.updateQueue=e,Ja(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)Hd(l,e),l=l.sibling;return j(dt,dt.current&1|2),Be&&Vn(n,a.treeForkCount),n.child}e=e.sibling}a.tail!==null&&Ie()>nu&&(n.flags|=128,c=!0,Tr(a,!1),n.lanes=4194304)}else{if(!c)if(e=qa(p),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,Ja(n,e),Tr(a,!0),a.tail===null&&a.tailMode==="hidden"&&!p.alternate&&!Be)return rt(n),null}else 2*Ie()-a.renderingStartTime>nu&&l!==536870912&&(n.flags|=128,c=!0,Tr(a,!1),n.lanes=4194304);a.isBackwards?(p.sibling=n.child,n.child=p):(e=a.last,e!==null?e.sibling=p:n.child=p,a.last=p)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Ie(),e.sibling=null,l=dt.current,j(dt,c?l&1|2:l&1),Be&&Vn(n,a.treeForkCount),e):(rt(n),null);case 22:case 23:return Jt(n),Xs(),a=n.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(n.flags|=8192):a&&(n.flags|=8192),a?(l&536870912)!==0&&(n.flags&128)===0&&(rt(n),n.subtreeFlags&6&&(n.flags|=8192)):rt(n),l=n.updateQueue,l!==null&&Ja(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),a!==l&&(n.flags|=2048),e!==null&&V(Zl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Fn(mt),rt(n),null;case 25:return null;case 30:return null}throw Error(u(156,n.tag))}function Eb(e,n){switch(Ds(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Fn(mt),se(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ge(n),null;case 31:if(n.memoizedState!==null){if(Jt(n),n.alternate===null)throw Error(u(340));$l()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Jt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(u(340));$l()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return V(dt),null;case 4:return se(),null;case 10:return Fn(n.type),null;case 22:case 23:return Jt(n),Xs(),e!==null&&V(Zl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Fn(mt),null;case 25:return null;default:return null}}function ph(e,n){switch(Ds(n),n.tag){case 3:Fn(mt),se();break;case 26:case 27:case 5:Ge(n);break;case 4:se();break;case 31:n.memoizedState!==null&&Jt(n);break;case 13:Jt(n);break;case 19:V(dt);break;case 10:Fn(n.type);break;case 22:case 23:Jt(n),Xs(),e!==null&&V(Zl);break;case 24:Fn(mt)}}function Ar(e,n){try{var l=n.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var c=a.next;l=c;do{if((l.tag&e)===e){a=void 0;var p=l.create,b=l.inst;a=p(),b.destroy=a}l=l.next}while(l!==c)}}catch(k){Je(n,n.return,k)}}function Sl(e,n,l){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var p=c.next;a=p;do{if((a.tag&e)===e){var b=a.inst,k=b.destroy;if(k!==void 0){b.destroy=void 0,c=n;var A=l,B=k;try{B()}catch($){Je(c,A,$)}}}a=a.next}while(a!==p)}}catch($){Je(n,n.return,$)}}function hh(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{ip(n,l)}catch(a){Je(e,e.return,a)}}}function mh(e,n,l){l.props=ei(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Je(e,n,a)}}function zr(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(c){Je(e,n,c)}}function zn(e,n){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(c){Je(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(c){Je(e,n,c)}else l.current=null}function gh(e){var n=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(c){Je(e,e.return,c)}}function _o(e,n,l){try{var a=e.stateNode;Zb(a,e.type,l,n),a[qt]=n}catch(c){Je(e,e.return,c)}}function xh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cl(e.type)||e.tag===4}function Eo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xh(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&&Cl(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 Co(e,n,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Hn));else if(a!==4&&(a===27&&Cl(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(Co(e,n,l),e=e.sibling;e!==null;)Co(e,n,l),e=e.sibling}function Pa(e,n,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(a!==4&&(a===27&&Cl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Pa(e,n,l),e=e.sibling;e!==null;)Pa(e,n,l),e=e.sibling}function yh(e){var n=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);At(n,a,l),n[_t]=e,n[qt]=l}catch(p){Je(e,e.return,p)}}var Kn=!1,yt=!1,To=!1,bh=typeof WeakSet=="function"?WeakSet:Set,jt=null;function Cb(e,n){if(e=e.containerInfo,Ko=bu,e=zd(e),Ss(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var c=a.anchorOffset,p=a.focusNode;a=a.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break e}var b=0,k=-1,A=-1,B=0,$=0,K=e,I=null;t:for(;;){for(var Y;K!==l||c!==0&&K.nodeType!==3||(k=b+c),K!==p||a!==0&&K.nodeType!==3||(A=b+a),K.nodeType===3&&(b+=K.nodeValue.length),(Y=K.firstChild)!==null;)I=K,K=Y;for(;;){if(K===e)break t;if(I===l&&++B===c&&(k=b),I===p&&++$===a&&(A=b),(Y=K.nextSibling)!==null)break;K=I,I=K.parentNode}K=Y}l=k===-1||A===-1?null:{start:k,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Jo={focusedElem:e,selectionRange:l},bu=!1,jt=n;jt!==null;)if(n=jt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,jt=e;else for(;jt!==null;){switch(n=jt,p=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(l=0;l<e.length;l++)c=e[l],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,l=n,c=p.memoizedProps,p=p.memoizedState,a=l.stateNode;try{var ge=ei(l.type,c);e=a.getSnapshotBeforeUpdate(ge,p),a.__reactInternalSnapshotBeforeUpdate=e}catch(ke){Je(l,l.return,ke)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)ec(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ec(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(u(163))}if(e=n.sibling,e!==null){e.return=n.return,jt=e;break}jt=n.return}}function vh(e,n,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Pn(e,l),a&4&&Ar(5,l);break;case 1:if(Pn(e,l),a&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(b){Je(l,l.return,b)}else{var c=ei(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Je(l,l.return,b)}}a&64&&hh(l),a&512&&zr(l,l.return);break;case 3:if(Pn(e,l),a&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{ip(e,n)}catch(b){Je(l,l.return,b)}}break;case 27:n===null&&a&4&&yh(l);case 26:case 5:Pn(e,l),n===null&&a&4&&gh(l),a&512&&zr(l,l.return);break;case 12:Pn(e,l);break;case 31:Pn(e,l),a&4&&wh(e,l);break;case 13:Pn(e,l),a&4&&jh(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ub.bind(null,l),l0(e,l))));break;case 22:if(a=l.memoizedState!==null||Kn,!a){n=n!==null&&n.memoizedState!==null||yt,c=Kn;var p=yt;Kn=a,(yt=n)&&!p?Wn(e,l,(l.subtreeFlags&8772)!==0):Pn(e,l),Kn=c,yt=p}break;case 30:break;default:Pn(e,l)}}function Sh(e){var n=e.alternate;n!==null&&(e.alternate=null,Sh(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&is(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 ut=null,Ht=!1;function Jn(e,n,l){for(l=l.child;l!==null;)kh(e,n,l),l=l.sibling}function kh(e,n,l){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(kt,l)}catch{}switch(l.tag){case 26:yt||zn(l,n),Jn(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:yt||zn(l,n);var a=ut,c=Ht;Cl(l.type)&&(ut=l.stateNode,Ht=!1),Jn(e,n,l),Hr(l.stateNode),ut=a,Ht=c;break;case 5:yt||zn(l,n);case 6:if(a=ut,c=Ht,ut=null,Jn(e,n,l),ut=a,Ht=c,ut!==null)if(Ht)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(l.stateNode)}catch(p){Je(l,n,p)}else try{ut.removeChild(l.stateNode)}catch(p){Je(l,n,p)}break;case 18:ut!==null&&(Ht?(e=ut,hm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Qi(e)):hm(ut,l.stateNode));break;case 4:a=ut,c=Ht,ut=l.stateNode.containerInfo,Ht=!0,Jn(e,n,l),ut=a,Ht=c;break;case 0:case 11:case 14:case 15:Sl(2,l,n),yt||Sl(4,l,n),Jn(e,n,l);break;case 1:yt||(zn(l,n),a=l.stateNode,typeof a.componentWillUnmount=="function"&&mh(l,n,a)),Jn(e,n,l);break;case 21:Jn(e,n,l);break;case 22:yt=(a=yt)||l.memoizedState!==null,Jn(e,n,l),yt=a;break;default:Jn(e,n,l)}}function wh(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qi(e)}catch(l){Je(n,n.return,l)}}}function jh(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qi(e)}catch(l){Je(n,n.return,l)}}function Tb(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new bh),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new bh),n;default:throw Error(u(435,e.tag))}}function Wa(e,n){var l=Tb(e);n.forEach(function(a){if(!l.has(a)){l.add(a);var c=qb.bind(null,e,a);a.then(c,c)}})}function It(e,n){var l=n.deletions;if(l!==null)for(var a=0;a<l.length;a++){var c=l[a],p=e,b=n,k=b;e:for(;k!==null;){switch(k.tag){case 27:if(Cl(k.type)){ut=k.stateNode,Ht=!1;break e}break;case 5:ut=k.stateNode,Ht=!1;break e;case 3:case 4:ut=k.stateNode.containerInfo,Ht=!0;break e}k=k.return}if(ut===null)throw Error(u(160));kh(p,b,c),ut=null,Ht=!1,p=c.alternate,p!==null&&(p.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Nh(n,e),n=n.sibling}var Nn=null;function Nh(e,n){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:It(n,e),Yt(e),a&4&&(Sl(3,e,e.return),Ar(3,e),Sl(5,e,e.return));break;case 1:It(n,e),Yt(e),a&512&&(yt||l===null||zn(l,l.return)),a&64&&Kn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var c=Nn;if(It(n,e),Yt(e),a&512&&(yt||l===null||zn(l,l.return)),a&4){var p=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,c=c.ownerDocument||c;t:switch(a){case"title":p=c.getElementsByTagName("title")[0],(!p||p[ir]||p[_t]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=c.createElement(a),c.head.insertBefore(p,c.querySelector("head > title"))),At(p,a,l),p[_t]=e,wt(p),a=p;break e;case"link":var b=Nm("link","href",c).get(a+(l.href||""));if(b){for(var k=0;k<b.length;k++)if(p=b[k],p.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&p.getAttribute("rel")===(l.rel==null?null:l.rel)&&p.getAttribute("title")===(l.title==null?null:l.title)&&p.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(k,1);break t}}p=c.createElement(a),At(p,a,l),c.head.appendChild(p);break;case"meta":if(b=Nm("meta","content",c).get(a+(l.content||""))){for(k=0;k<b.length;k++)if(p=b[k],p.getAttribute("content")===(l.content==null?null:""+l.content)&&p.getAttribute("name")===(l.name==null?null:l.name)&&p.getAttribute("property")===(l.property==null?null:l.property)&&p.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&p.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(k,1);break t}}p=c.createElement(a),At(p,a,l),c.head.appendChild(p);break;default:throw Error(u(468,a))}p[_t]=e,wt(p),a=p}e.stateNode=a}else _m(c,e.type,e.stateNode);else e.stateNode=jm(c,a,e.memoizedProps);else p!==a?(p===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):p.count--,a===null?_m(c,e.type,e.stateNode):jm(c,a,e.memoizedProps)):a===null&&e.stateNode!==null&&_o(e,e.memoizedProps,l.memoizedProps)}break;case 27:It(n,e),Yt(e),a&512&&(yt||l===null||zn(l,l.return)),l!==null&&a&4&&_o(e,e.memoizedProps,l.memoizedProps);break;case 5:if(It(n,e),Yt(e),a&512&&(yt||l===null||zn(l,l.return)),e.flags&32){c=e.stateNode;try{xi(c,"")}catch(ge){Je(e,e.return,ge)}}a&4&&e.stateNode!=null&&(c=e.memoizedProps,_o(e,c,l!==null?l.memoizedProps:c)),a&1024&&(To=!0);break;case 6:if(It(n,e),Yt(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ge){Je(e,e.return,ge)}}break;case 3:if(mu=null,c=Nn,Nn=pu(n.containerInfo),It(n,e),Nn=c,Yt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Qi(n.containerInfo)}catch(ge){Je(e,e.return,ge)}To&&(To=!1,_h(e));break;case 4:a=Nn,Nn=pu(e.stateNode.containerInfo),It(n,e),Yt(e),Nn=a;break;case 12:It(n,e),Yt(e);break;case 31:It(n,e),Yt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Wa(e,a)));break;case 13:It(n,e),Yt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(tu=Ie()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Wa(e,a)));break;case 22:c=e.memoizedState!==null;var A=l!==null&&l.memoizedState!==null,B=Kn,$=yt;if(Kn=B||c,yt=$||A,It(n,e),yt=$,Kn=B,Yt(e),a&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(l===null||A||Kn||yt||ti(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){A=l=n;try{if(p=A.stateNode,c)b=p.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{k=A.stateNode;var K=A.memoizedProps.style,I=K!=null&&K.hasOwnProperty("display")?K.display:null;k.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(ge){Je(A,A.return,ge)}}}else if(n.tag===6){if(l===null){A=n;try{A.stateNode.nodeValue=c?"":A.memoizedProps}catch(ge){Je(A,A.return,ge)}}}else if(n.tag===18){if(l===null){A=n;try{var Y=A.stateNode;c?mm(Y,!0):mm(A.stateNode,!1)}catch(ge){Je(A,A.return,ge)}}}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;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Wa(e,l))));break;case 19:It(n,e),Yt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Wa(e,a)));break;case 30:break;case 21:break;default:It(n,e),Yt(e)}}function Yt(e){var n=e.flags;if(n&2){try{for(var l,a=e.return;a!==null;){if(xh(a)){l=a;break}a=a.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var c=l.stateNode,p=Eo(e);Pa(e,p,c);break;case 5:var b=l.stateNode;l.flags&32&&(xi(b,""),l.flags&=-33);var k=Eo(e);Pa(e,k,b);break;case 3:case 4:var A=l.stateNode.containerInfo,B=Eo(e);Co(e,B,A);break;default:throw Error(u(161))}}catch($){Je(e,e.return,$)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function _h(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;_h(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Pn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)vh(e,n.alternate,n),n=n.sibling}function ti(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Sl(4,n,n.return),ti(n);break;case 1:zn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&mh(n,n.return,l),ti(n);break;case 27:Hr(n.stateNode);case 26:case 5:zn(n,n.return),ti(n);break;case 22:n.memoizedState===null&&ti(n);break;case 30:ti(n);break;default:ti(n)}e=e.sibling}}function Wn(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var a=n.alternate,c=e,p=n,b=p.flags;switch(p.tag){case 0:case 11:case 15:Wn(c,p,l),Ar(4,p);break;case 1:if(Wn(c,p,l),a=p,c=a.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(B){Je(a,a.return,B)}if(a=p,c=a.updateQueue,c!==null){var k=a.stateNode;try{var A=c.shared.hiddenCallbacks;if(A!==null)for(c.shared.hiddenCallbacks=null,c=0;c<A.length;c++)lp(A[c],k)}catch(B){Je(a,a.return,B)}}l&&b&64&&hh(p),zr(p,p.return);break;case 27:yh(p);case 26:case 5:Wn(c,p,l),l&&a===null&&b&4&&gh(p),zr(p,p.return);break;case 12:Wn(c,p,l);break;case 31:Wn(c,p,l),l&&b&4&&wh(c,p);break;case 13:Wn(c,p,l),l&&b&4&&jh(c,p);break;case 22:p.memoizedState===null&&Wn(c,p,l),zr(p,p.return);break;case 30:break;default:Wn(c,p,l)}n=n.sibling}}function Ao(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&xr(l))}function zo(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&xr(e))}function _n(e,n,l,a){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Eh(e,n,l,a),n=n.sibling}function Eh(e,n,l,a){var c=n.flags;switch(n.tag){case 0:case 11:case 15:_n(e,n,l,a),c&2048&&Ar(9,n);break;case 1:_n(e,n,l,a);break;case 3:_n(e,n,l,a),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&xr(e)));break;case 12:if(c&2048){_n(e,n,l,a),e=n.stateNode;try{var p=n.memoizedProps,b=p.id,k=p.onPostCommit;typeof k=="function"&&k(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Je(n,n.return,A)}}else _n(e,n,l,a);break;case 31:_n(e,n,l,a);break;case 13:_n(e,n,l,a);break;case 23:break;case 22:p=n.stateNode,b=n.alternate,n.memoizedState!==null?p._visibility&2?_n(e,n,l,a):Dr(e,n):p._visibility&2?_n(e,n,l,a):(p._visibility|=2,Ui(e,n,l,a,(n.subtreeFlags&10256)!==0||!1)),c&2048&&Ao(b,n);break;case 24:_n(e,n,l,a),c&2048&&zo(n.alternate,n);break;default:_n(e,n,l,a)}}function Ui(e,n,l,a,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var p=e,b=n,k=l,A=a,B=b.flags;switch(b.tag){case 0:case 11:case 15:Ui(p,b,k,A,c),Ar(8,b);break;case 23:break;case 22:var $=b.stateNode;b.memoizedState!==null?$._visibility&2?Ui(p,b,k,A,c):Dr(p,b):($._visibility|=2,Ui(p,b,k,A,c)),c&&B&2048&&Ao(b.alternate,b);break;case 24:Ui(p,b,k,A,c),c&&B&2048&&zo(b.alternate,b);break;default:Ui(p,b,k,A,c)}n=n.sibling}}function Dr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,a=n,c=a.flags;switch(a.tag){case 22:Dr(l,a),c&2048&&Ao(a.alternate,a);break;case 24:Dr(l,a),c&2048&&zo(a.alternate,a);break;default:Dr(l,a)}n=n.sibling}}var Rr=8192;function qi(e,n,l){if(e.subtreeFlags&Rr)for(e=e.child;e!==null;)Ch(e,n,l),e=e.sibling}function Ch(e,n,l){switch(e.tag){case 26:qi(e,n,l),e.flags&Rr&&e.memoizedState!==null&&m0(l,Nn,e.memoizedState,e.memoizedProps);break;case 5:qi(e,n,l);break;case 3:case 4:var a=Nn;Nn=pu(e.stateNode.containerInfo),qi(e,n,l),Nn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Rr,Rr=16777216,qi(e,n,l),Rr=a):qi(e,n,l));break;default:qi(e,n,l)}}function Th(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 Mr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var a=n[l];jt=a,zh(a,e)}Th(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ah(e),e=e.sibling}function Ah(e){switch(e.tag){case 0:case 11:case 15:Mr(e),e.flags&2048&&Sl(9,e,e.return);break;case 3:Mr(e);break;case 12:Mr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,eu(e)):Mr(e);break;default:Mr(e)}}function eu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var a=n[l];jt=a,zh(a,e)}Th(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Sl(8,n,n.return),eu(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,eu(n));break;default:eu(n)}e=e.sibling}}function zh(e,n){for(;jt!==null;){var l=jt;switch(l.tag){case 0:case 11:case 15:Sl(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:xr(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,jt=a;else e:for(l=e;jt!==null;){a=jt;var c=a.sibling,p=a.return;if(Sh(a),a===l){jt=null;break e}if(c!==null){c.return=p,jt=c;break e}jt=p}}}var Ab={getCacheForType:function(e){var n=Ct(mt),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return Ct(mt).controller.signal}},zb=typeof WeakMap=="function"?WeakMap:Map,Xe=0,tt=null,Re=null,Le=0,Ke=0,Pt=null,kl=!1,Bi=!1,Do=!1,el=0,ft=0,wl=0,ni=0,Ro=0,Wt=0,Hi=0,Or=null,Vt=null,Mo=!1,tu=0,Dh=0,nu=1/0,lu=null,jl=null,St=0,Nl=null,Ii=null,tl=0,Oo=0,Lo=null,Rh=null,Lr=0,Uo=null;function en(){return(Xe&2)!==0&&Le!==0?Le&-Le:L.T!==null?Vo():Zf()}function Mh(){if(Wt===0)if((Le&536870912)===0||Be){var e=oi;oi<<=1,(oi&3932160)===0&&(oi=262144),Wt=e}else Wt=536870912;return e=Kt.current,e!==null&&(e.flags|=32),Wt}function Gt(e,n,l){(e===tt&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(Yi(e,0),_l(e,Le,Wt,!1)),Q(e,l),((Xe&2)===0||e!==tt)&&(e===tt&&((Xe&2)===0&&(ni|=l),ft===4&&_l(e,Le,Wt,!1)),Dn(e))}function Oh(e,n,l){if((Xe&6)!==0)throw Error(u(327));var a=!l&&(n&127)===0&&(n&e.expiredLanes)===0||ol(e,n),c=a?Mb(e,n):Bo(e,n,!0),p=a;do{if(c===0){Bi&&!a&&_l(e,n,0,!1);break}else{if(l=e.current.alternate,p&&!Db(l)){c=Bo(e,n,!1),p=!1;continue}if(c===2){if(p=n,e.errorRecoveryDisabledLanes&p)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var k=e;c=Or;var A=k.current.memoizedState.isDehydrated;if(A&&(Yi(k,b).flags|=256),b=Bo(k,b,!1),b!==2){if(Do&&!A){k.errorRecoveryDisabledLanes|=p,ni|=p,c=4;break e}p=Vt,Vt=c,p!==null&&(Vt===null?Vt=p:Vt.push.apply(Vt,p))}c=b}if(p=!1,c!==2)continue}}if(c===1){Yi(e,0),_l(e,n,0,!0);break}e:{switch(a=e,p=c,p){case 0:case 1:throw Error(u(345));case 4:if((n&4194048)!==n)break;case 6:_l(a,n,Wt,!kl);break e;case 2:Vt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((n&62914560)===n&&(c=tu+300-Ie(),10<c)){if(_l(a,n,Wt,!kl),ci(a,0,!0)!==0)break e;tl=n,a.timeoutHandle=dm(Lh.bind(null,a,l,Vt,lu,Mo,n,Wt,ni,Hi,kl,p,"Throttled",-0,0),c);break e}Lh(a,l,Vt,lu,Mo,n,Wt,ni,Hi,kl,p,null,-0,0)}}break}while(!0);Dn(e)}function Lh(e,n,l,a,c,p,b,k,A,B,$,K,I,Y){if(e.timeoutHandle=-1,K=n.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Hn},Ch(n,p,K);var ge=(p&62914560)===p?tu-Ie():(p&4194048)===p?Dh-Ie():0;if(ge=g0(K,ge),ge!==null){tl=p,e.cancelPendingCommit=ge(Gh.bind(null,e,n,p,l,a,c,b,k,A,$,K,null,I,Y)),_l(e,p,b,!B);return}}Gh(e,n,p,l,a,c,b,k,A)}function Db(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var c=l[a],p=c.getSnapshot;c=c.value;try{if(!Qt(p(),c))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;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 _l(e,n,l,a){n&=~Ro,n&=~ni,e.suspendedLanes|=n,e.pingedLanes&=~n,a&&(e.warmLanes|=n),a=e.expirationTimes;for(var c=n;0<c;){var p=31-Qe(c),b=1<<p;a[p]=-1,c&=~b}l!==0&&Ne(e,l,n)}function iu(){return(Xe&6)===0?(Ur(0),!1):!0}function qo(){if(Re!==null){if(Ke===0)var e=Re.return;else e=Re,Gn=Xl=null,Ws(e),Di=null,br=0,e=Re;for(;e!==null;)ph(e.alternate,e),e=e.return;Re=null}}function Yi(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Pb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),tl=0,qo(),tt=e,Re=l=Yn(e.current,null),Le=n,Ke=0,Pt=null,kl=!1,Bi=ol(e,n),Do=!1,Hi=Wt=Ro=ni=wl=ft=0,Vt=Or=null,Mo=!1,(n&8)!==0&&(n|=n&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=n;0<a;){var c=31-Qe(a),p=1<<c;n|=e[c],a&=~p}return el=n,Na(),l}function Uh(e,n){Ce=null,L.H=Er,n===zi||n===Ra?(n=Wd(),Ke=3):n===Is?(n=Wd(),Ke=4):Ke=n===go?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Pt=n,Re===null&&(ft=1,Xa(e,cn(n,e.current)))}function qh(){var e=Kt.current;return e===null?!0:(Le&4194048)===Le?hn===null:(Le&62914560)===Le||(Le&536870912)!==0?e===hn:!1}function Bh(){var e=L.H;return L.H=Er,e===null?Er:e}function Hh(){var e=L.A;return L.A=Ab,e}function ru(){ft=4,kl||(Le&4194048)!==Le&&Kt.current!==null||(Bi=!0),(wl&134217727)===0&&(ni&134217727)===0||tt===null||_l(tt,Le,Wt,!1)}function Bo(e,n,l){var a=Xe;Xe|=2;var c=Bh(),p=Hh();(tt!==e||Le!==n)&&(lu=null,Yi(e,n)),n=!1;var b=ft;e:do try{if(Ke!==0&&Re!==null){var k=Re,A=Pt;switch(Ke){case 8:qo(),b=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(n=!0);var B=Ke;if(Ke=0,Pt=null,Vi(e,k,A,B),l&&Bi){b=0;break e}break;default:B=Ke,Ke=0,Pt=null,Vi(e,k,A,B)}}Rb(),b=ft;break}catch($){Uh(e,$)}while(!0);return n&&e.shellSuspendCounter++,Gn=Xl=null,Xe=a,L.H=c,L.A=p,Re===null&&(tt=null,Le=0,Na()),b}function Rb(){for(;Re!==null;)Ih(Re)}function Mb(e,n){var l=Xe;Xe|=2;var a=Bh(),c=Hh();tt!==e||Le!==n?(lu=null,nu=Ie()+500,Yi(e,n)):Bi=ol(e,n);e:do try{if(Ke!==0&&Re!==null){n=Re;var p=Pt;t:switch(Ke){case 1:Ke=0,Pt=null,Vi(e,n,p,1);break;case 2:case 9:if(Jd(p)){Ke=0,Pt=null,Yh(n);break}n=function(){Ke!==2&&Ke!==9||tt!==e||(Ke=7),Dn(e)},p.then(n,n);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Jd(p)?(Ke=0,Pt=null,Yh(n)):(Ke=0,Pt=null,Vi(e,n,p,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var k=Re;if(b?Em(b):k.stateNode.complete){Ke=0,Pt=null;var A=k.sibling;if(A!==null)Re=A;else{var B=k.return;B!==null?(Re=B,au(B)):Re=null}break t}}Ke=0,Pt=null,Vi(e,n,p,5);break;case 6:Ke=0,Pt=null,Vi(e,n,p,6);break;case 8:qo(),ft=6;break e;default:throw Error(u(462))}}Ob();break}catch($){Uh(e,$)}while(!0);return Gn=Xl=null,L.H=a,L.A=c,Xe=l,Re!==null?0:(tt=null,Le=0,Na(),ft)}function Ob(){for(;Re!==null&&!te();)Ih(Re)}function Ih(e){var n=fh(e.alternate,e,el);e.memoizedProps=e.pendingProps,n===null?au(e):Re=n}function Yh(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=rh(l,n,n.pendingProps,n.type,void 0,Le);break;case 11:n=rh(l,n,n.pendingProps,n.type.render,n.ref,Le);break;case 5:Ws(n);default:ph(l,n),n=Re=Hd(n,el),n=fh(l,n,el)}e.memoizedProps=e.pendingProps,n===null?au(e):Re=n}function Vi(e,n,l,a){Gn=Xl=null,Ws(n),Di=null,br=0;var c=n.return;try{if(wb(e,c,n,l,Le)){ft=1,Xa(e,cn(l,e.current)),Re=null;return}}catch(p){if(c!==null)throw Re=c,p;ft=1,Xa(e,cn(l,e.current)),Re=null;return}n.flags&32768?(Be||a===1?e=!0:Bi||(Le&536870912)!==0?e=!1:(kl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Kt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Vh(n,e)):au(n)}function au(e){var n=e;do{if((n.flags&32768)!==0){Vh(n,kl);return}e=n.return;var l=_b(n.alternate,n,el);if(l!==null){Re=l;return}if(n=n.sibling,n!==null){Re=n;return}Re=n=e}while(n!==null);ft===0&&(ft=5)}function Vh(e,n){do{var l=Eb(e.alternate,e);if(l!==null){l.flags&=32767,Re=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){Re=e;return}Re=e=l}while(e!==null);ft=6,Re=null}function Gh(e,n,l,a,c,p,b,k,A){e.cancelPendingCommit=null;do uu();while(St!==0);if((Xe&6)!==0)throw Error(u(327));if(n!==null){if(n===e.current)throw Error(u(177));if(p=n.lanes|n.childLanes,p|=_s,he(e,l,p,b,k,A),e===tt&&(Re=tt=null,Le=0),Ii=n,Nl=e,tl=l,Oo=p,Lo=c,Rh=a,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Bb(be,function(){return Zh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||a){a=L.T,L.T=null,c=P.p,P.p=2,b=Xe,Xe|=4;try{Cb(e,n,l)}finally{Xe=b,P.p=c,L.T=a}}St=1,Fh(),$h(),Xh()}}function Fh(){if(St===1){St=0;var e=Nl,n=Ii,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=L.T,L.T=null;var a=P.p;P.p=2;var c=Xe;Xe|=4;try{Nh(n,e);var p=Jo,b=zd(e.containerInfo),k=p.focusedElem,A=p.selectionRange;if(b!==k&&k&&k.ownerDocument&&Ad(k.ownerDocument.documentElement,k)){if(A!==null&&Ss(k)){var B=A.start,$=A.end;if($===void 0&&($=B),"selectionStart"in k)k.selectionStart=B,k.selectionEnd=Math.min($,k.value.length);else{var K=k.ownerDocument||document,I=K&&K.defaultView||window;if(I.getSelection){var Y=I.getSelection(),ge=k.textContent.length,ke=Math.min(A.start,ge),et=A.end===void 0?ke:Math.min(A.end,ge);!Y.extend&&ke>et&&(b=et,et=ke,ke=b);var R=Td(k,ke),z=Td(k,et);if(R&&z&&(Y.rangeCount!==1||Y.anchorNode!==R.node||Y.anchorOffset!==R.offset||Y.focusNode!==z.node||Y.focusOffset!==z.offset)){var q=K.createRange();q.setStart(R.node,R.offset),Y.removeAllRanges(),ke>et?(Y.addRange(q),Y.extend(z.node,z.offset)):(q.setEnd(z.node,z.offset),Y.addRange(q))}}}}for(K=[],Y=k;Y=Y.parentNode;)Y.nodeType===1&&K.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<K.length;k++){var X=K[k];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}bu=!!Ko,Jo=Ko=null}finally{Xe=c,P.p=a,L.T=l}}e.current=n,St=2}}function $h(){if(St===2){St=0;var e=Nl,n=Ii,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=L.T,L.T=null;var a=P.p;P.p=2;var c=Xe;Xe|=4;try{vh(e,n.alternate,n)}finally{Xe=c,P.p=a,L.T=l}}St=3}}function Xh(){if(St===4||St===3){St=0,De();var e=Nl,n=Ii,l=tl,a=Rh;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?St=5:(St=0,Ii=Nl=null,Qh(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(jl=null),ns(l),n=n.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(kt,n,void 0,(n.current.flags&128)===128)}catch{}if(a!==null){n=L.T,c=P.p,P.p=2,L.T=null;try{for(var p=e.onRecoverableError,b=0;b<a.length;b++){var k=a[b];p(k.value,{componentStack:k.stack})}}finally{L.T=n,P.p=c}}(tl&3)!==0&&uu(),Dn(e),c=e.pendingLanes,(l&261930)!==0&&(c&42)!==0?e===Uo?Lr++:(Lr=0,Uo=e):Lr=0,Ur(0)}}function Qh(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,xr(n)))}function uu(){return Fh(),$h(),Xh(),Zh()}function Zh(){if(St!==5)return!1;var e=Nl,n=Oo;Oo=0;var l=ns(tl),a=L.T,c=P.p;try{P.p=32>l?32:l,L.T=null,l=Lo,Lo=null;var p=Nl,b=tl;if(St=0,Ii=Nl=null,tl=0,(Xe&6)!==0)throw Error(u(331));var k=Xe;if(Xe|=4,Ah(p.current),Eh(p,p.current,b,l),Xe=k,Ur(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(kt,p)}catch{}return!0}finally{P.p=c,L.T=a,Qh(e,n)}}function Kh(e,n,l){n=cn(l,n),n=mo(e.stateNode,n,2),e=yl(e,n,2),e!==null&&(Q(e,2),Dn(e))}function Je(e,n,l){if(e.tag===3)Kh(e,e,l);else for(;n!==null;){if(n.tag===3){Kh(n,e,l);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(jl===null||!jl.has(a))){e=cn(l,e),l=Jp(2),a=yl(n,l,2),a!==null&&(Pp(l,a,n,e),Q(a,2),Dn(a));break}}n=n.return}}function Ho(e,n,l){var a=e.pingCache;if(a===null){a=e.pingCache=new zb;var c=new Set;a.set(n,c)}else c=a.get(n),c===void 0&&(c=new Set,a.set(n,c));c.has(l)||(Do=!0,c.add(l),e=Lb.bind(null,e,n,l),n.then(e,e))}function Lb(e,n,l){var a=e.pingCache;a!==null&&a.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(Le&l)===l&&(ft===4||ft===3&&(Le&62914560)===Le&&300>Ie()-tu?(Xe&2)===0&&Yi(e,0):Ro|=l,Hi===Le&&(Hi=0)),Dn(e)}function Jh(e,n){n===0&&(n=pa()),e=Gl(e,n),e!==null&&(Q(e,n),Dn(e))}function Ub(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),Jh(e,l)}function qb(e,n){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(l=c.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(n),Jh(e,l)}function Bb(e,n){return Sn(e,n)}var su=null,Gi=null,Io=!1,ou=!1,Yo=!1,El=0;function Dn(e){e!==Gi&&e.next===null&&(Gi===null?su=Gi=e:Gi=Gi.next=e),ou=!0,Io||(Io=!0,Ib())}function Ur(e,n){if(!Yo&&ou){Yo=!0;do for(var l=!1,a=su;a!==null;){if(e!==0){var c=a.pendingLanes;if(c===0)var p=0;else{var b=a.suspendedLanes,k=a.pingedLanes;p=(1<<31-Qe(42|e)+1)-1,p&=c&~(b&~k),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,tm(a,p))}else p=Le,p=ci(a,a===tt?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(p&3)===0||ol(a,p)||(l=!0,tm(a,p));a=a.next}while(l);Yo=!1}}function Hb(){Ph()}function Ph(){ou=Io=!1;var e=0;El!==0&&Jb()&&(e=El);for(var n=Ie(),l=null,a=su;a!==null;){var c=a.next,p=Wh(a,n);p===0?(a.next=null,l===null?su=c:l.next=c,c===null&&(Gi=l)):(l=a,(e!==0||(p&3)!==0)&&(ou=!0)),a=c}St!==0&&St!==5||Ur(e),El!==0&&(El=0)}function Wh(e,n){for(var l=e.suspendedLanes,a=e.pingedLanes,c=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var b=31-Qe(p),k=1<<b,A=c[b];A===-1?((k&l)===0||(k&a)!==0)&&(c[b]=es(k,n)):A<=n&&(e.expiredLanes|=k),p&=~k}if(n=tt,l=Le,l=ci(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===n&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Un(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ol(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(a!==null&&Un(a),ns(l)){case 2:case 8:l=ue;break;case 32:l=be;break;case 268435456:l=Ve;break;default:l=be}return a=em.bind(null,e),l=Sn(l,a),e.callbackPriority=n,e.callbackNode=l,n}return a!==null&&a!==null&&Un(a),e.callbackPriority=2,e.callbackNode=null,2}function em(e,n){if(St!==0&&St!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(uu()&&e.callbackNode!==l)return null;var a=Le;return a=ci(e,e===tt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Oh(e,a,n),Wh(e,Ie()),e.callbackNode!=null&&e.callbackNode===l?em.bind(null,e):null)}function tm(e,n){if(uu())return null;Oh(e,n,!0)}function Ib(){Wb(function(){(Xe&6)!==0?Sn(F,Hb):Ph()})}function Vo(){if(El===0){var e=Ti;e===0&&(e=sl,sl<<=1,(sl&261888)===0&&(sl=256)),El=e}return El}function nm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xa(""+e)}function lm(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function Yb(e,n,l,a,c){if(n==="submit"&&l&&l.stateNode===c){var p=nm((c[qt]||null).action),b=a.submitter;b&&(n=(n=b[qt]||null)?nm(n.formAction):b.getAttribute("formAction"),n!==null&&(p=n,b=null));var k=new Sa("action","action",null,a,c);e.push({event:k,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(El!==0){var A=b?lm(c,b):new FormData(c);so(l,{pending:!0,data:A,method:c.method,action:p},null,A)}}else typeof p=="function"&&(k.preventDefault(),A=b?lm(c,b):new FormData(c),so(l,{pending:!0,data:A,method:c.method,action:p},p,A))},currentTarget:c}]})}}for(var Go=0;Go<Ns.length;Go++){var Fo=Ns[Go],Vb=Fo.toLowerCase(),Gb=Fo[0].toUpperCase()+Fo.slice(1);jn(Vb,"on"+Gb)}jn(Md,"onAnimationEnd"),jn(Od,"onAnimationIteration"),jn(Ld,"onAnimationStart"),jn("dblclick","onDoubleClick"),jn("focusin","onFocus"),jn("focusout","onBlur"),jn(ab,"onTransitionRun"),jn(ub,"onTransitionStart"),jn(sb,"onTransitionCancel"),jn(Ud,"onTransitionEnd"),mi("onMouseEnter",["mouseout","mouseover"]),mi("onMouseLeave",["mouseout","mouseover"]),mi("onPointerEnter",["pointerout","pointerover"]),mi("onPointerLeave",["pointerout","pointerover"]),Hl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(" "),Fb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qr));function im(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],c=a.event;a=a.listeners;e:{var p=void 0;if(n)for(var b=a.length-1;0<=b;b--){var k=a[b],A=k.instance,B=k.currentTarget;if(k=k.listener,A!==p&&c.isPropagationStopped())break e;p=k,c.currentTarget=B;try{p(c)}catch($){ja($)}c.currentTarget=null,p=A}else for(b=0;b<a.length;b++){if(k=a[b],A=k.instance,B=k.currentTarget,k=k.listener,A!==p&&c.isPropagationStopped())break e;p=k,c.currentTarget=B;try{p(c)}catch($){ja($)}c.currentTarget=null,p=A}}}}function Me(e,n){var l=n[ls];l===void 0&&(l=n[ls]=new Set);var a=e+"__bubble";l.has(a)||(rm(n,e,2,!1),l.add(a))}function $o(e,n,l){var a=0;n&&(a|=4),rm(l,e,a,n)}var cu="_reactListening"+Math.random().toString(36).slice(2);function Xo(e){if(!e[cu]){e[cu]=!0,Pf.forEach(function(l){l!=="selectionchange"&&(Fb.has(l)||$o(l,!1,e),$o(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[cu]||(n[cu]=!0,$o("selectionchange",!1,n))}}function rm(e,n,l,a){switch(Mm(n)){case 2:var c=b0;break;case 8:c=v0;break;default:c=sc}l=c.bind(null,n,l,e),c=void 0,!ds||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),a?c!==void 0?e.addEventListener(n,l,{capture:!0,passive:c}):e.addEventListener(n,l,!0):c!==void 0?e.addEventListener(n,l,{passive:c}):e.addEventListener(n,l,!1)}function Qo(e,n,l,a,c){var p=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var b=a.tag;if(b===3||b===4){var k=a.stateNode.containerInfo;if(k===c)break;if(b===4)for(b=a.return;b!==null;){var A=b.tag;if((A===3||A===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;k!==null;){if(b=di(k),b===null)return;if(A=b.tag,A===5||A===6||A===26||A===27){a=p=b;continue e}k=k.parentNode}}a=a.return}cd(function(){var B=p,$=cs(l),K=[];e:{var I=qd.get(e);if(I!==void 0){var Y=Sa,ge=e;switch(e){case"keypress":if(ba(l)===0)break e;case"keydown":case"keyup":Y=q1;break;case"focusin":ge="focus",Y=gs;break;case"focusout":ge="blur",Y=gs;break;case"beforeblur":case"afterblur":Y=gs;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=pd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=_1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=I1;break;case Md:case Od:case Ld:Y=T1;break;case Ud:Y=V1;break;case"scroll":case"scrollend":Y=j1;break;case"wheel":Y=F1;break;case"copy":case"cut":case"paste":Y=z1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=md;break;case"toggle":case"beforetoggle":Y=X1}var ke=(n&4)!==0,et=!ke&&(e==="scroll"||e==="scrollend"),R=ke?I!==null?I+"Capture":null:I;ke=[];for(var z=B,q;z!==null;){var X=z;if(q=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||q===null||R===null||(X=ar(z,R),X!=null&&ke.push(Br(z,X,q))),et)break;z=z.return}0<ke.length&&(I=new Y(I,ge,null,l,$),K.push({event:I,listeners:ke}))}}if((n&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",I&&l!==os&&(ge=l.relatedTarget||l.fromElement)&&(di(ge)||ge[fi]))break e;if((Y||I)&&(I=$.window===$?$:(I=$.ownerDocument)?I.defaultView||I.parentWindow:window,Y?(ge=l.relatedTarget||l.toElement,Y=B,ge=ge?di(ge):null,ge!==null&&(et=s(ge),ke=ge.tag,ge!==et||ke!==5&&ke!==27&&ke!==6)&&(ge=null)):(Y=null,ge=B),Y!==ge)){if(ke=pd,X="onMouseLeave",R="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(ke=md,X="onPointerLeave",R="onPointerEnter",z="pointer"),et=Y==null?I:rr(Y),q=ge==null?I:rr(ge),I=new ke(X,z+"leave",Y,l,$),I.target=et,I.relatedTarget=q,X=null,di($)===B&&(ke=new ke(R,z+"enter",ge,l,$),ke.target=q,ke.relatedTarget=et,X=ke),et=X,Y&&ge)t:{for(ke=$b,R=Y,z=ge,q=0,X=R;X;X=ke(X))q++;X=0;for(var ve=z;ve;ve=ke(ve))X++;for(;0<q-X;)R=ke(R),q--;for(;0<X-q;)z=ke(z),X--;for(;q--;){if(R===z||z!==null&&R===z.alternate){ke=R;break t}R=ke(R),z=ke(z)}ke=null}else ke=null;Y!==null&&am(K,I,Y,ke,!1),ge!==null&&et!==null&&am(K,et,ge,ke,!0)}}e:{if(I=B?rr(B):window,Y=I.nodeName&&I.nodeName.toLowerCase(),Y==="select"||Y==="input"&&I.type==="file")var Fe=wd;else if(Sd(I))if(jd)Fe=lb;else{Fe=tb;var ye=eb}else Y=I.nodeName,!Y||Y.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?B&&ss(B.elementType)&&(Fe=wd):Fe=nb;if(Fe&&(Fe=Fe(e,B))){kd(K,Fe,l,$);break e}ye&&ye(e,I,B),e==="focusout"&&B&&I.type==="number"&&B.memoizedProps.value!=null&&us(I,"number",I.value)}switch(ye=B?rr(B):window,e){case"focusin":(Sd(ye)||ye.contentEditable==="true")&&(Si=ye,ks=B,hr=null);break;case"focusout":hr=ks=Si=null;break;case"mousedown":ws=!0;break;case"contextmenu":case"mouseup":case"dragend":ws=!1,Dd(K,l,$);break;case"selectionchange":if(rb)break;case"keydown":case"keyup":Dd(K,l,$)}var Te;if(ys)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else vi?bd(e,l)&&(Ue="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(gd&&l.locale!=="ko"&&(vi||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&vi&&(Te=fd()):(fl=$,ps="value"in fl?fl.value:fl.textContent,vi=!0)),ye=fu(B,Ue),0<ye.length&&(Ue=new hd(Ue,e,null,l,$),K.push({event:Ue,listeners:ye}),Te?Ue.data=Te:(Te=vd(l),Te!==null&&(Ue.data=Te)))),(Te=Z1?K1(e,l):J1(e,l))&&(Ue=fu(B,"onBeforeInput"),0<Ue.length&&(ye=new hd("onBeforeInput","beforeinput",null,l,$),K.push({event:ye,listeners:Ue}),ye.data=Te)),Yb(K,e,B,l,$)}im(K,n)})}function Br(e,n,l){return{instance:e,listener:n,currentTarget:l}}function fu(e,n){for(var l=n+"Capture",a=[];e!==null;){var c=e,p=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||p===null||(c=ar(e,l),c!=null&&a.unshift(Br(e,c,p)),c=ar(e,n),c!=null&&a.push(Br(e,c,p))),e.tag===3)return a;e=e.return}return[]}function $b(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function am(e,n,l,a,c){for(var p=n._reactName,b=[];l!==null&&l!==a;){var k=l,A=k.alternate,B=k.stateNode;if(k=k.tag,A!==null&&A===a)break;k!==5&&k!==26&&k!==27||B===null||(A=B,c?(B=ar(l,p),B!=null&&b.unshift(Br(l,B,A))):c||(B=ar(l,p),B!=null&&b.push(Br(l,B,A)))),l=l.return}b.length!==0&&e.push({event:n,listeners:b})}var Xb=/\r\n?/g,Qb=/\u0000|\uFFFD/g;function um(e){return(typeof e=="string"?e:""+e).replace(Xb,`
49
+ `).replace(Qb,"")}function sm(e,n){return n=um(n),um(e)===n}function We(e,n,l,a,c,p){switch(l){case"children":typeof a=="string"?n==="body"||n==="textarea"&&a===""||xi(e,a):(typeof a=="number"||typeof a=="bigint")&&n!=="body"&&xi(e,""+a);break;case"className":ma(e,"class",a);break;case"tabIndex":ma(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ma(e,l,a);break;case"style":sd(e,a,p);break;case"data":if(n!=="object"){ma(e,"data",a);break}case"src":case"href":if(a===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=xa(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(l==="formAction"?(n!=="input"&&We(e,n,"name",c.name,c,null),We(e,n,"formEncType",c.formEncType,c,null),We(e,n,"formMethod",c.formMethod,c,null),We(e,n,"formTarget",c.formTarget,c,null)):(We(e,n,"encType",c.encType,c,null),We(e,n,"method",c.method,c,null),We(e,n,"target",c.target,c,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=xa(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Hn);break;case"onScroll":a!=null&&Me("scroll",e);break;case"onScrollEnd":a!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(c.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=xa(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Me("beforetoggle",e),Me("toggle",e),ha(e,"popover",a);break;case"xlinkActuate":Bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Bn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Bn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Bn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Bn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ha(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=k1.get(l)||l,ha(e,l,a))}}function Zo(e,n,l,a,c,p){switch(l){case"style":sd(e,a,p);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(c.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof a=="string"?xi(e,a):(typeof a=="number"||typeof a=="bigint")&&xi(e,""+a);break;case"onScroll":a!=null&&Me("scroll",e);break;case"onScrollEnd":a!=null&&Me("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wf.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(c=l.endsWith("Capture"),n=l.slice(2,c?l.length-7:void 0),p=e[qt]||null,p=p!=null?p[l]:null,typeof p=="function"&&e.removeEventListener(n,p,c),typeof a=="function")){typeof p!="function"&&p!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,a,c);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):ha(e,l,a)}}}function At(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var a=!1,c=!1,p;for(p in l)if(l.hasOwnProperty(p)){var b=l[p];if(b!=null)switch(p){case"src":a=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,n));default:We(e,n,p,b,l,null)}}c&&We(e,n,"srcSet",l.srcSet,l,null),a&&We(e,n,"src",l.src,l,null);return;case"input":Me("invalid",e);var k=p=b=c=null,A=null,B=null;for(a in l)if(l.hasOwnProperty(a)){var $=l[a];if($!=null)switch(a){case"name":c=$;break;case"type":b=$;break;case"checked":A=$;break;case"defaultChecked":B=$;break;case"value":p=$;break;case"defaultValue":k=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(u(137,n));break;default:We(e,n,a,$,l,null)}}id(e,p,k,A,B,b,c,!1);return;case"select":Me("invalid",e),a=b=p=null;for(c in l)if(l.hasOwnProperty(c)&&(k=l[c],k!=null))switch(c){case"value":p=k;break;case"defaultValue":b=k;break;case"multiple":a=k;default:We(e,n,c,k,l,null)}n=p,l=b,e.multiple=!!a,n!=null?gi(e,!!a,n,!1):l!=null&&gi(e,!!a,l,!0);return;case"textarea":Me("invalid",e),p=c=a=null;for(b in l)if(l.hasOwnProperty(b)&&(k=l[b],k!=null))switch(b){case"value":a=k;break;case"defaultValue":c=k;break;case"children":p=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(91));break;default:We(e,n,b,k,l,null)}ad(e,a,c,p);return;case"option":for(A in l)l.hasOwnProperty(A)&&(a=l[A],a!=null)&&(A==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":We(e,n,A,a,l,null));return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(a=0;a<qr.length;a++)Me(qr[a],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(B in l)if(l.hasOwnProperty(B)&&(a=l[B],a!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,n));default:We(e,n,B,a,l,null)}return;default:if(ss(n)){for($ in l)l.hasOwnProperty($)&&(a=l[$],a!==void 0&&Zo(e,n,$,a,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(a=l[k],a!=null&&We(e,n,k,a,l,null))}function Zb(e,n,l,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,p=null,b=null,k=null,A=null,B=null,$=null;for(Y in l){var K=l[Y];if(l.hasOwnProperty(Y)&&K!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":A=K;default:a.hasOwnProperty(Y)||We(e,n,Y,null,a,K)}}for(var I in a){var Y=a[I];if(K=l[I],a.hasOwnProperty(I)&&(Y!=null||K!=null))switch(I){case"type":p=Y;break;case"name":c=Y;break;case"checked":B=Y;break;case"defaultChecked":$=Y;break;case"value":b=Y;break;case"defaultValue":k=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(u(137,n));break;default:Y!==K&&We(e,n,I,Y,a,K)}}as(e,b,k,A,B,$,p,c);return;case"select":Y=b=k=I=null;for(p in l)if(A=l[p],l.hasOwnProperty(p)&&A!=null)switch(p){case"value":break;case"multiple":Y=A;default:a.hasOwnProperty(p)||We(e,n,p,null,a,A)}for(c in a)if(p=a[c],A=l[c],a.hasOwnProperty(c)&&(p!=null||A!=null))switch(c){case"value":I=p;break;case"defaultValue":k=p;break;case"multiple":b=p;default:p!==A&&We(e,n,c,p,a,A)}n=k,l=b,a=Y,I!=null?gi(e,!!l,I,!1):!!a!=!!l&&(n!=null?gi(e,!!l,n,!0):gi(e,!!l,l?[]:"",!1));return;case"textarea":Y=I=null;for(k in l)if(c=l[k],l.hasOwnProperty(k)&&c!=null&&!a.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:We(e,n,k,null,a,c)}for(b in a)if(c=a[b],p=l[b],a.hasOwnProperty(b)&&(c!=null||p!=null))switch(b){case"value":I=c;break;case"defaultValue":Y=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(u(91));break;default:c!==p&&We(e,n,b,c,a,p)}rd(e,I,Y);return;case"option":for(var ge in l)I=l[ge],l.hasOwnProperty(ge)&&I!=null&&!a.hasOwnProperty(ge)&&(ge==="selected"?e.selected=!1:We(e,n,ge,null,a,I));for(A in a)I=a[A],Y=l[A],a.hasOwnProperty(A)&&I!==Y&&(I!=null||Y!=null)&&(A==="selected"?e.selected=I&&typeof I!="function"&&typeof I!="symbol":We(e,n,A,I,a,Y));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in l)I=l[ke],l.hasOwnProperty(ke)&&I!=null&&!a.hasOwnProperty(ke)&&We(e,n,ke,null,a,I);for(B in a)if(I=a[B],Y=l[B],a.hasOwnProperty(B)&&I!==Y&&(I!=null||Y!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(u(137,n));break;default:We(e,n,B,I,a,Y)}return;default:if(ss(n)){for(var et in l)I=l[et],l.hasOwnProperty(et)&&I!==void 0&&!a.hasOwnProperty(et)&&Zo(e,n,et,void 0,a,I);for($ in a)I=a[$],Y=l[$],!a.hasOwnProperty($)||I===Y||I===void 0&&Y===void 0||Zo(e,n,$,I,a,Y);return}}for(var R in l)I=l[R],l.hasOwnProperty(R)&&I!=null&&!a.hasOwnProperty(R)&&We(e,n,R,null,a,I);for(K in a)I=a[K],Y=l[K],!a.hasOwnProperty(K)||I===Y||I==null&&Y==null||We(e,n,K,I,a,Y)}function om(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Kb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var c=l[a],p=c.transferSize,b=c.initiatorType,k=c.duration;if(p&&k&&om(b)){for(b=0,k=c.responseEnd,a+=1;a<l.length;a++){var A=l[a],B=A.startTime;if(B>k)break;var $=A.transferSize,K=A.initiatorType;$&&om(K)&&(A=A.responseEnd,b+=$*(A<k?1:(k-B)/(A-B)))}if(--a,n+=8*(p+b)/(c.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 Ko=null,Jo=null;function du(e){return e.nodeType===9?e:e.ownerDocument}function cm(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 fm(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 Po(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 Wo=null;function Jb(){var e=window.event;return e&&e.type==="popstate"?e===Wo?!1:(Wo=e,!0):(Wo=null,!1)}var dm=typeof setTimeout=="function"?setTimeout:void 0,Pb=typeof clearTimeout=="function"?clearTimeout:void 0,pm=typeof Promise=="function"?Promise:void 0,Wb=typeof queueMicrotask=="function"?queueMicrotask:typeof pm<"u"?function(e){return pm.resolve(null).then(e).catch(e0)}:dm;function e0(e){setTimeout(function(){throw e})}function Cl(e){return e==="head"}function hm(e,n){var l=n,a=0;do{var c=l.nextSibling;if(e.removeChild(l),c&&c.nodeType===8)if(l=c.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(c),Qi(n);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Hr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Hr(l);for(var p=l.firstChild;p;){var b=p.nextSibling,k=p.nodeName;p[ir]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=b}}else l==="body"&&Hr(e.ownerDocument.body);l=c}while(l);Qi(n)}function mm(e,n){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function ec(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ec(l),is(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function t0(e,n,l,a){for(;e.nodeType===1;){var c=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ir])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var p=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function n0(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=mn(e.nextSibling),e===null))return null;return e}function gm(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=mn(e.nextSibling),e===null))return null;return e}function tc(e){return e.data==="$?"||e.data==="$~"}function nc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function l0(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var a=function(){n(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function mn(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 lc=null;function xm(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return mn(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function ym(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function bm(e,n,l){switch(n=du(l),e){case"html":if(e=n.documentElement,!e)throw Error(u(452));return e;case"head":if(e=n.head,!e)throw Error(u(453));return e;case"body":if(e=n.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Hr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);is(e)}var gn=new Map,vm=new Set;function pu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var nl=P.d;P.d={f:i0,r:r0,D:a0,C:u0,L:s0,m:o0,X:f0,S:c0,M:d0};function i0(){var e=nl.f(),n=iu();return e||n}function r0(e){var n=pi(e);n!==null&&n.tag===5&&n.type==="form"?Up(n):nl.r(e)}var Fi=typeof document>"u"?null:document;function Sm(e,n,l){var a=Fi;if(a&&typeof n=="string"&&n){var c=sn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof l=="string"&&(c+='[crossorigin="'+l+'"]'),vm.has(c)||(vm.add(c),e={rel:e,crossOrigin:l,href:n},a.querySelector(c)===null&&(n=a.createElement("link"),At(n,"link",e),wt(n),a.head.appendChild(n)))}}function a0(e){nl.D(e),Sm("dns-prefetch",e,null)}function u0(e,n){nl.C(e,n),Sm("preconnect",e,n)}function s0(e,n,l){nl.L(e,n,l);var a=Fi;if(a&&e&&n){var c='link[rel="preload"][as="'+sn(n)+'"]';n==="image"&&l&&l.imageSrcSet?(c+='[imagesrcset="'+sn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(c+='[imagesizes="'+sn(l.imageSizes)+'"]')):c+='[href="'+sn(e)+'"]';var p=c;switch(n){case"style":p=$i(e);break;case"script":p=Xi(e)}gn.has(p)||(e=x({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),gn.set(p,e),a.querySelector(c)!==null||n==="style"&&a.querySelector(Ir(p))||n==="script"&&a.querySelector(Yr(p))||(n=a.createElement("link"),At(n,"link",e),wt(n),a.head.appendChild(n)))}}function o0(e,n){nl.m(e,n);var l=Fi;if(l&&e){var a=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+sn(a)+'"][href="'+sn(e)+'"]',p=c;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Xi(e)}if(!gn.has(p)&&(e=x({rel:"modulepreload",href:e},n),gn.set(p,e),l.querySelector(c)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Yr(p)))return}a=l.createElement("link"),At(a,"link",e),wt(a),l.head.appendChild(a)}}}function c0(e,n,l){nl.S(e,n,l);var a=Fi;if(a&&e){var c=hi(a).hoistableStyles,p=$i(e);n=n||"default";var b=c.get(p);if(!b){var k={loading:0,preload:null};if(b=a.querySelector(Ir(p)))k.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":n},l),(l=gn.get(p))&&ic(e,l);var A=b=a.createElement("link");wt(A),At(A,"link",e),A._p=new Promise(function(B,$){A.onload=B,A.onerror=$}),A.addEventListener("load",function(){k.loading|=1}),A.addEventListener("error",function(){k.loading|=2}),k.loading|=4,hu(b,n,a)}b={type:"stylesheet",instance:b,count:1,state:k},c.set(p,b)}}}function f0(e,n){nl.X(e,n);var l=Fi;if(l&&e){var a=hi(l).hoistableScripts,c=Xi(e),p=a.get(c);p||(p=l.querySelector(Yr(c)),p||(e=x({src:e,async:!0},n),(n=gn.get(c))&&rc(e,n),p=l.createElement("script"),wt(p),At(p,"link",e),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},a.set(c,p))}}function d0(e,n){nl.M(e,n);var l=Fi;if(l&&e){var a=hi(l).hoistableScripts,c=Xi(e),p=a.get(c);p||(p=l.querySelector(Yr(c)),p||(e=x({src:e,async:!0,type:"module"},n),(n=gn.get(c))&&rc(e,n),p=l.createElement("script"),wt(p),At(p,"link",e),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},a.set(c,p))}}function km(e,n,l,a){var c=(c=de.current)?pu(c):null;if(!c)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=$i(l.href),l=hi(c).hoistableStyles,a=l.get(n),a||(a={type:"style",instance:null,count:0,state:null},l.set(n,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=$i(l.href);var p=hi(c).hoistableStyles,b=p.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,b),(p=c.querySelector(Ir(e)))&&!p._p&&(b.instance=p,b.state.loading=5),gn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},gn.set(e,l),p||p0(c,e,l,b.state))),n&&a===null)throw Error(u(528,""));return b}if(n&&a!==null)throw Error(u(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Xi(l),l=hi(c).hoistableScripts,a=l.get(n),a||(a={type:"script",instance:null,count:0,state:null},l.set(n,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function $i(e){return'href="'+sn(e)+'"'}function Ir(e){return'link[rel="stylesheet"]['+e+"]"}function wm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function p0(e,n,l,a){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?a.loading=1:(n=e.createElement("link"),a.preload=n,n.addEventListener("load",function(){return a.loading|=1}),n.addEventListener("error",function(){return a.loading|=2}),At(n,"link",l),wt(n),e.head.appendChild(n))}function Xi(e){return'[src="'+sn(e)+'"]'}function Yr(e){return"script[async]"+e}function jm(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var a=e.querySelector('style[data-href~="'+sn(l.href)+'"]');if(a)return n.instance=a,wt(a),a;var c=x({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),wt(a),At(a,"style",c),hu(a,l.precedence,e),n.instance=a;case"stylesheet":c=$i(l.href);var p=e.querySelector(Ir(c));if(p)return n.state.loading|=4,n.instance=p,wt(p),p;a=wm(l),(c=gn.get(c))&&ic(a,c),p=(e.ownerDocument||e).createElement("link"),wt(p);var b=p;return b._p=new Promise(function(k,A){b.onload=k,b.onerror=A}),At(p,"link",a),n.state.loading|=4,hu(p,l.precedence,e),n.instance=p;case"script":return p=Xi(l.src),(c=e.querySelector(Yr(p)))?(n.instance=c,wt(c),c):(a=l,(c=gn.get(p))&&(a=x({},l),rc(a,c)),e=e.ownerDocument||e,c=e.createElement("script"),wt(c),At(c,"link",a),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(u(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(a=n.instance,n.state.loading|=4,hu(a,l.precedence,e));return n.instance}function hu(e,n,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=a.length?a[a.length-1]:null,p=c,b=0;b<a.length;b++){var k=a[b];if(k.dataset.precedence===n)p=k;else if(p!==c)break}p?p.parentNode.insertBefore(e,p.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function ic(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function rc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var mu=null;function Nm(e,n,l){if(mu===null){var a=new Map,c=mu=new Map;c.set(l,a)}else c=mu,a=c.get(l),a||(a=new Map,c.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),c=0;c<l.length;c++){var p=l[c];if(!(p[ir]||p[_t]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var b=p.getAttribute(n)||"";b=e+b;var k=a.get(b);k?k.push(p):a.set(b,[p])}}return a}function _m(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function h0(e,n,l){if(l===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;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!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 Em(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function m0(e,n,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var c=$i(a.href),p=n.querySelector(Ir(c));if(p){n=p._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=gu.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=p,wt(p);return}p=n.ownerDocument||n,a=wm(a),(c=gn.get(c))&&ic(a,c),p=p.createElement("link"),wt(p);var b=p;b._p=new Promise(function(k,A){b.onload=k,b.onerror=A}),At(p,"link",a),l.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=gu.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var ac=0;function g0(e,n){return e.stylesheets&&e.count===0&&yu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&yu(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+n);0<e.imgBytes&&ac===0&&(ac=62500*Kb());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&yu(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>ac?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(c)}}:null}function gu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xu=null;function yu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xu=new Map,n.forEach(x0,e),xu=null,gu.call(e))}function x0(e,n){if(!(n.state.loading&4)){var l=xu.get(e);if(l)var a=l.get(null);else{l=new Map,xu.set(e,l);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<c.length;p++){var b=c[p];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),a=b)}a&&l.set(null,a)}c=n.instance,b=c.getAttribute("data-precedence"),p=l.get(b)||a,p===a&&l.set(null,c),l.set(b,c),this.count++,a=gu.bind(this),c.addEventListener("load",a),c.addEventListener("error",a),p?p.parentNode.insertBefore(c,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var Vr={$$typeof:U,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function y0(e,n,l,a,c,p,b,k,A){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=lr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lr(0),this.hiddenUpdates=lr(null),this.identifierPrefix=a,this.onUncaughtError=c,this.onCaughtError=p,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Cm(e,n,l,a,c,p,b,k,A,B,$,K){return e=new y0(e,n,l,b,A,B,$,K,k),n=1,p===!0&&(n|=24),p=Zt(3,null,null,n),e.current=p,p.stateNode=e,n=qs(),n.refCount++,e.pooledCache=n,n.refCount++,p.memoizedState={element:a,isDehydrated:l,cache:n},Ys(p),e}function Tm(e){return e?(e=ji,e):ji}function Am(e,n,l,a,c,p){c=Tm(c),a.context===null?a.context=c:a.pendingContext=c,a=xl(n),a.payload={element:l},p=p===void 0?null:p,p!==null&&(a.callback=p),l=yl(e,a,n),l!==null&&(Gt(l,e,n),Sr(l,e,n))}function zm(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function uc(e,n){zm(e,n),(e=e.alternate)&&zm(e,n)}function Dm(e){if(e.tag===13||e.tag===31){var n=Gl(e,67108864);n!==null&&Gt(n,e,67108864),uc(e,67108864)}}function Rm(e){if(e.tag===13||e.tag===31){var n=en();n=ts(n);var l=Gl(e,n);l!==null&&Gt(l,e,n),uc(e,n)}}var bu=!0;function b0(e,n,l,a){var c=L.T;L.T=null;var p=P.p;try{P.p=2,sc(e,n,l,a)}finally{P.p=p,L.T=c}}function v0(e,n,l,a){var c=L.T;L.T=null;var p=P.p;try{P.p=8,sc(e,n,l,a)}finally{P.p=p,L.T=c}}function sc(e,n,l,a){if(bu){var c=oc(a);if(c===null)Qo(e,n,a,vu,l),Om(e,a);else if(k0(c,e,n,l,a))a.stopPropagation();else if(Om(e,a),n&4&&-1<S0.indexOf(e)){for(;c!==null;){var p=pi(c);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var b=an(p.pendingLanes);if(b!==0){var k=p;for(k.pendingLanes|=2,k.entangledLanes|=2;b;){var A=1<<31-Qe(b);k.entanglements[1]|=A,b&=~A}Dn(p),(Xe&6)===0&&(nu=Ie()+500,Ur(0))}}break;case 31:case 13:k=Gl(p,2),k!==null&&Gt(k,p,2),iu(),uc(p,2)}if(p=oc(a),p===null&&Qo(e,n,a,vu,l),p===c)break;c=p}c!==null&&a.stopPropagation()}else Qo(e,n,a,null,l)}}function oc(e){return e=cs(e),cc(e)}var vu=null;function cc(e){if(vu=null,e=di(e),e!==null){var n=s(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=f(n),e!==null)return e;e=null}else if(l===31){if(e=h(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return vu=e,null}function Mm(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(kn()){case F:return 2;case ue:return 8;case be:case Ae:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var fc=!1,Tl=null,Al=null,zl=null,Gr=new Map,Fr=new Map,Dl=[],S0="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 Om(e,n){switch(e){case"focusin":case"focusout":Tl=null;break;case"dragenter":case"dragleave":Al=null;break;case"mouseover":case"mouseout":zl=null;break;case"pointerover":case"pointerout":Gr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fr.delete(n.pointerId)}}function $r(e,n,l,a,c,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:l,eventSystemFlags:a,nativeEvent:p,targetContainers:[c]},n!==null&&(n=pi(n),n!==null&&Dm(n)),e):(e.eventSystemFlags|=a,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function k0(e,n,l,a,c){switch(n){case"focusin":return Tl=$r(Tl,e,n,l,a,c),!0;case"dragenter":return Al=$r(Al,e,n,l,a,c),!0;case"mouseover":return zl=$r(zl,e,n,l,a,c),!0;case"pointerover":var p=c.pointerId;return Gr.set(p,$r(Gr.get(p)||null,e,n,l,a,c)),!0;case"gotpointercapture":return p=c.pointerId,Fr.set(p,$r(Fr.get(p)||null,e,n,l,a,c)),!0}return!1}function Lm(e){var n=di(e.target);if(n!==null){var l=s(n);if(l!==null){if(n=l.tag,n===13){if(n=f(l),n!==null){e.blockedOn=n,Kf(e.priority,function(){Rm(l)});return}}else if(n===31){if(n=h(l),n!==null){e.blockedOn=n,Kf(e.priority,function(){Rm(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Su(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=oc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);os=a,l.target.dispatchEvent(a),os=null}else return n=pi(l),n!==null&&Dm(n),e.blockedOn=l,!1;n.shift()}return!0}function Um(e,n,l){Su(e)&&l.delete(n)}function w0(){fc=!1,Tl!==null&&Su(Tl)&&(Tl=null),Al!==null&&Su(Al)&&(Al=null),zl!==null&&Su(zl)&&(zl=null),Gr.forEach(Um),Fr.forEach(Um)}function ku(e,n){e.blockedOn===n&&(e.blockedOn=null,fc||(fc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,w0)))}var wu=null;function qm(e){wu!==e&&(wu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){wu===e&&(wu=null);for(var n=0;n<e.length;n+=3){var l=e[n],a=e[n+1],c=e[n+2];if(typeof a!="function"){if(cc(a||l)===null)continue;break}var p=pi(l);p!==null&&(e.splice(n,3),n-=3,so(p,{pending:!0,data:c,method:l.method,action:a},a,c))}}))}function Qi(e){function n(A){return ku(A,e)}Tl!==null&&ku(Tl,e),Al!==null&&ku(Al,e),zl!==null&&ku(zl,e),Gr.forEach(n),Fr.forEach(n);for(var l=0;l<Dl.length;l++){var a=Dl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Dl.length&&(l=Dl[0],l.blockedOn===null);)Lm(l),l.blockedOn===null&&Dl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var c=l[a],p=l[a+1],b=c[qt]||null;if(typeof p=="function")b||qm(l);else if(b){var k=null;if(p&&p.hasAttribute("formAction")){if(c=p,b=p[qt]||null)k=b.formAction;else if(cc(c)!==null)continue}else k=b.action;typeof k=="function"?l[a+1]=k:(l.splice(a,3),a-=3),qm(l)}}}function Bm(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function dc(e){this._internalRoot=e}ju.prototype.render=dc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(u(409));var l=n.current,a=en();Am(l,a,e,n,null,null)},ju.prototype.unmount=dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Am(e.current,2,null,e,null,null),iu(),n[fi]=null}};function ju(e){this._internalRoot=e}ju.prototype.unstable_scheduleHydration=function(e){if(e){var n=Zf();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Dl.length&&n!==0&&n<Dl[l].priority;l++);Dl.splice(l,0,e),l===0&&Lm(e)}};var Hm=i.version;if(Hm!=="19.2.8")throw Error(u(527,Hm,"19.2.8"));P.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=m(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var j0={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nu.isDisabled&&Nu.supportsFiber)try{kt=Nu.inject(j0),at=Nu}catch{}}return Qr.createRoot=function(e,n){if(!o(e))throw Error(u(299));var l=!1,a="",c=Xp,p=Qp,b=Zp;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=Cm(e,1,!1,null,null,l,a,null,c,p,b,Bm),e[fi]=n.current,Xo(e),new dc(n)},Qr.hydrateRoot=function(e,n,l){if(!o(e))throw Error(u(299));var a=!1,c="",p=Xp,b=Qp,k=Zp,A=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(c=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(A=l.formState)),n=Cm(e,1,!0,n,l??null,a,c,A,p,b,k,Bm),n.context=Tm(null),l=n.current,a=en(),a=ts(a),c=xl(a),c.callback=null,yl(l,c,a),l=a,n.current.lanes=l,Q(n,l),Dn(n),e[fi]=n.current,Xo(e),new ju(n)},Qr.version="19.2.8",Qr}var Km;function M0(){if(Km)return mc.exports;Km=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(i){console.error(i)}}return t(),mc.exports=R0(),mc.exports}var O0=M0();const L0=Vu(O0);function U0(t,i){const r=t.getElementById("product-config");if(!r)return i;let u;try{u=JSON.parse(r.textContent??"")}catch{throw new Error("Invalid public product configuration.")}if(typeof u!="object"||u===null)throw new Error("Invalid public product configuration.");const o=u,s=o.identity?.displayName,f=o.identity?.cliName,h=o.storage?.browserNamespace;if(![s,f,h].every(g=>typeof g=="string"&&g.trim()!==""))throw new Error("Public product configuration is missing required identity fields.");return{identity:{displayName:s,cliName:f},storage:{browserNamespace:h}}}const q0=Object.freeze(["not_available","stopping","in_progress","prompt_pending","unknown_session","unreadable","start_failed","limit","failed"]),B0=Object.freeze(["not_available","stopping","unknown_session","live_elsewhere","running","failed"]),H0="owner",Cx="agent";function He(t){return typeof t=="object"&&!!t&&!Array.isArray(t)}const we=t=>typeof t=="string",Ze=t=>typeof t=="string"&&t.length>0,il=t=>typeof t=="boolean",Lu=t=>typeof t=="number"&&Number.isFinite(t),bc=t=>Number.isSafeInteger(t)&&t>=0,vt=t=>i=>i===void 0||t(i),Ml=t=>Array.isArray(t)&&t.every(He),Jm=t=>t===null||He(t),En=t=>i=>typeof i=="string"&&t.includes(i),I0={user:!0,"agent-wakeup":!0,peer:!0,external:!0},Y0=t=>He(t)&&we(t.id)&&we(t.timestamp)&&we(t.category)&&we(t.type),V0=t=>Array.isArray(t)&&t.every(Y0),G0=t=>He(t)&&we(t.name)&&we(t.description)&&we(t.definedIn),F0=t=>Array.isArray(t)&&t.every(G0),$0=["cancel","close","send"],Pm={none:{},several:{message:we},stopped:{loopId:Ze,message:vt(we)},failed:{loopId:vt(Ze),message:we}},X0=t=>{if(!He(t)||!we(t.kind))return!1;let i=t.kind;if(!Object.prototype.hasOwnProperty.call(Pm,i))return!1;let r=Pm[i];return Object.entries(r).every(([u,o])=>o(t[u]))};function Sf(t){return i=>{if(!He(i)||!we(i.kind))return!1;let r=Object.prototype.hasOwnProperty.call(t,i.kind)?t[i.kind]:void 0;return r!==void 0&&Object.entries(r).every(([u,o])=>o(i[u]))}}const Q0=["Added","Modified","Deleted","Renamed","Copied","Untracked","Conflicted"],Z0=t=>He(t)&&Ze(t.path)&&En(Q0)(t.status)&&vt(Ze)(t.renamedFrom)&&vt(Lu)(t.added)&&vt(Lu)(t.removed),K0=Sf({status:{branch:vt(we),unborn:il,files:t=>Array.isArray(t)&&t.every(Z0),truncated:il},"not-a-repository":{},failed:{message:we}}),J0=["add","remove","context","hunk"],P0=t=>He(t)&&En(J0)(t.type)&&we(t.text)&&Lu(t.lineNumber),W0=Sf({diff:{diffLines:t=>Array.isArray(t)&&t.every(P0),truncated:il},"not-a-repository":{},"outside-workspace":{},failed:{message:we}}),ev=Sf({memory:{content:we,path:Ze,truncated:il},unavailable:{message:we}}),ll={driverId:vt(we)},tv={text_delta:{delta:we,...ll},user_message:{content:we,...ll},tool_start:{state:He,...ll},tool_end:{state:He,...ll},thinking:{isThinking:il,...ll},complete:{result:He,...ll},interrupted:{result:He,...ll},error:{message:we,code:vt(En(["auth","rate_limit","model_unavailable","network","provider"])),provider:vt(we),retryAfterSeconds:vt(Lu),model:vt(we),...ll},command_result:{name:we,message:we,success:il,requestId:vt(we)},messages:{messages:Ml,display:vt(Ml),...ll},history:{startIndex:bc,total:bc,entries:V0},context:{state:He},history_changed:{},turn_source:{source:En(Object.keys(I0))},commands:{commands:Ml,skills:Ml},session_status:{status:He},model_list:{requestId:Ze,groups:Ml,currentProfile:vt(we),currentModel:we},agent_definitions:{requestId:Ze,agents:F0,current:Ze},sessions:{requestId:Ze,listing:He},sessions_error:{requestId:Ze,code:En(["not_available","list_failed"]),message:we},session_switched:{event:He},session_change_failed:{code:En(q0),message:we,requestId:vt(we)},session_renamed_in_list:{requestId:Ze,sessionId:we,name:we},session_rename_failed:{requestId:Ze,message:we},session_deleted:{requestId:Ze,sessionId:we},session_delete_failed:{requestId:Ze,code:En(B0),message:we},usage_report:{report:He},personal_usage_report:{requestId:Ze,report:He},personal_usage_report_error:{requestId:Ze,code:En(["not_available","report_failed"]),message:we},stored_session_usage_report:{requestId:Ze,sessionId:Ze,report:He},stored_session_usage_report_error:{requestId:Ze,sessionId:Ze,code:En(["not_available","report_failed"]),message:we},executing:{executing:il},pending:{pending:t=>t===null||we(t),pendingCount:vt(bc)},execution_workspace_event:{snapshot:He},execution_detail:{requestId:Ze,page:He},execution_detail_error:{requestId:Ze,message:we},waiting_loop_stop:{requestId:Ze,outcome:X0},project_status:{requestId:Ze,result:K0},project_diff:{requestId:Ze,result:W0},project_memory:{requestId:Ze,result:ev},app_tool_result:{requestId:Ze,success:il,data:()=>!0,parts:vt(Ml),error:vt(we)},app_view:{requestId:Ze,view:He},background_task_event:{event:He},background_job_group_event:{event:He},plan_event:{event:He},context_file_refreshed:{event:He},branch_event:{event:He},background_tasks:{tasks:Ml},background_task:{taskId:we,task:Jm},background_job_groups:{groups:Ml},background_job_group:{groupId:we,group:Jm},background_task_log:{taskId:we,page:He},permission_request:{event:He},ask_request:{event:He},prompt_resolved:{event:He},ui_intent:{event:He},session_renamed:{event:He},history_cleared:{},background_task_control_result:{action:En($0),taskId:we,success:il,message:vt(we)},protocol_error:{message:we,requestId:vt(we)},resume_gap:{},settings:{requestId:Ze,settings:He},settings_error:{requestId:Ze,code:En(["not_available","invalid","refused","update_failed"]),message:we}};function nv(t,i,r){if(!He(t))return{ok:!1,reason:"message must be a JSON object"};let u=t.type;if(!we(u))return{ok:!1,reason:"message type must be a string"};let o=Object.prototype.hasOwnProperty.call(i,u)?i[u]:void 0;if(o===void 0)return{ok:!1,reason:`Unknown message type: ${u}`};for(let[s,f]of Object.entries(o))if(!f(t[s]))return{ok:!1,reason:r(s)};return{ok:!0,message:t}}function lv(t){return nv(t,tv,i=>`${i} has an invalid shape`)}function iv(t,i){if(t.length>4194304)return{ok:!1,reason:"Frame too large"};let r;try{r=JSON.parse(t)}catch{return{ok:!1,reason:"Invalid JSON"}}return i(r)}function rv(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const av=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sv={};function Wm(t,i){return(sv.jsx?uv:av).test(t)}const ov=/[ \t\n\f\r]/g;function cv(t){return typeof t=="object"?t.type==="text"?eg(t.value):!1:eg(t)}function eg(t){return t.replace(ov,"")===""}class ua{constructor(i,r,u){this.normal=r,this.property=i,u&&(this.space=u)}}ua.prototype.normal={};ua.prototype.property={};ua.prototype.space=void 0;function Tx(t,i){const r={},u={};for(const o of t)Object.assign(r,o.property),Object.assign(u,o.normal);return new ua(r,u,i)}function ef(t){return t.toLowerCase()}class $t{constructor(i,r){this.attribute=r,this.property=i}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let fv=0;const _e=si(),bt=si(),tf=si(),ie=si(),nt=si(),ri=si(),tn=si();function si(){return 2**++fv}const nf=Object.freeze(Object.defineProperty({__proto__:null,boolean:_e,booleanish:bt,commaOrSpaceSeparated:tn,commaSeparated:ri,number:ie,overloadedBoolean:tf,spaceSeparated:nt},Symbol.toStringTag,{value:"Module"})),vc=Object.keys(nf);class kf extends $t{constructor(i,r,u,o){let s=-1;if(super(i,r),tg(this,"space",o),typeof u=="number")for(;++s<vc.length;){const f=vc[s];tg(this,vc[s],(u&nf[f])===nf[f])}}}kf.prototype.defined=!0;function tg(t,i,r){r&&(t[i]=r)}function er(t){const i={},r={};for(const[u,o]of Object.entries(t.properties)){const s=new kf(u,t.transform(t.attributes||{},u),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(u)&&(s.mustUseProperty=!0),i[u]=s,r[ef(u)]=u,r[ef(s.attribute)]=u}return new ua(i,r,t.space)}const Ax=er({properties:{ariaActiveDescendant:null,ariaAtomic:bt,ariaAutoComplete:null,ariaBusy:bt,ariaChecked:bt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:nt,ariaCurrent:null,ariaDescribedBy:nt,ariaDetails:null,ariaDisabled:bt,ariaDropEffect:nt,ariaErrorMessage:null,ariaExpanded:bt,ariaFlowTo:nt,ariaGrabbed:bt,ariaHasPopup:null,ariaHidden:bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nt,ariaLevel:ie,ariaLive:null,ariaModal:bt,ariaMultiLine:bt,ariaMultiSelectable:bt,ariaOrientation:null,ariaOwns:nt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:bt,ariaReadOnly:bt,ariaRelevant:null,ariaRequired:bt,ariaRoleDescription:nt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:bt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function zx(t,i){return i in t?t[i]:i}function Dx(t,i){return zx(t,i.toLowerCase())}const dv=er({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ri,acceptCharset:nt,accessKey:nt,action:null,allow:null,allowFullScreen:_e,allowPaymentRequest:_e,allowUserMedia:_e,alpha:_e,alt:null,as:null,async:_e,autoCapitalize:null,autoComplete:nt,autoFocus:_e,autoPlay:_e,blocking:nt,capture:null,charSet:null,checked:_e,cite:null,className:nt,closedBy:null,colorSpace:null,cols:ie,colSpan:ie,command:null,commandFor:null,content:null,contentEditable:bt,controls:_e,controlsList:nt,coords:ie|ri,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_e,defer:_e,dir:null,dirName:null,disabled:_e,download:tf,draggable:bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_e,formTarget:null,headers:nt,height:ie,hidden:tf,high:ie,href:null,hrefLang:null,htmlFor:nt,httpEquiv:nt,id:null,imageSizes:null,imageSrcSet:null,inert:_e,inputMode:null,integrity:null,is:null,isMap:_e,itemId:null,itemProp:nt,itemRef:nt,itemScope:_e,itemType:nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_e,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,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:ie,pattern:null,ping:nt,placeholder:null,playsInline:_e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_e,referrerPolicy:null,rel:nt,required:_e,reversed:_e,rows:ie,rowSpan:ie,sandbox:nt,scope:null,scoped:_e,seamless:_e,selected:_e,shadowRootClonable:_e,shadowRootCustomElementRegistry:_e,shadowRootDelegatesFocus:_e,shadowRootMode:null,shadowRootSerializable:_e,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:_e,useMap:null,value:bt,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,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:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:_e,noHref:_e,noShade:_e,noWrap:_e,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:bt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:_e,disablePictureInPicture:_e,disableRemotePlayback:_e,exportParts:ri,part:nt,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:Dx}),pv=er({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",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:tn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:nt,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:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:_e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:ri,g2:ri,glyphName:ri,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tn,rev:tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tn,requiredFeatures:tn,requiredFonts:tn,requiredFormats:tn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:zx}),Rx=er({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),Mx=er({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Dx}),Ox=er({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),hv={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"},mv=/[A-Z]/g,ng=/-[a-z]/g,gv=/^data[-\w.:]+$/i;function xv(t,i){const r=ef(i);let u=i,o=$t;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&gv.test(i)){if(i.charAt(4)==="-"){const s=i.slice(5).replace(ng,bv);u="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=i.slice(4);if(!ng.test(s)){let f=s.replace(mv,yv);f.charAt(0)!=="-"&&(f="-"+f),i="data"+f}}o=kf}return new o(u,i)}function yv(t){return"-"+t.toLowerCase()}function bv(t){return t.charAt(1).toUpperCase()}const vv=Tx([Ax,dv,Rx,Mx,Ox],"html"),wf=Tx([Ax,pv,Rx,Mx,Ox],"svg");function Sv(t){return t.join(" ").trim()}var Zi={},Sc,lg;function kv(){if(lg)return Sc;lg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,h=/^\s+|\s+$/g,g=`
50
+ `,m="/",y="*",x="",S="comment",v="declaration";function N(M,_){if(typeof M!="string")throw new TypeError("First argument must be a string");if(!M)return[];_=_||{};var G=1,U=1;function Z(oe){var J=oe.match(i);J&&(G+=J.length);var L=oe.lastIndexOf(g);U=~L?oe.length-L:U+oe.length}function ne(){var oe={line:G,column:U};return function(J){return J.position=new D(oe),W(),J}}function D(oe){this.start=oe,this.end={line:G,column:U},this.source=_.source}D.prototype.content=M;function H(oe){var J=new Error(_.source+":"+G+":"+U+": "+oe);if(J.reason=oe,J.filename=_.source,J.line=G,J.column=U,J.source=M,!_.silent)throw J}function le(oe){var J=oe.exec(M);if(J){var L=J[0];return Z(L),M=M.slice(L.length),J}}function W(){le(r)}function O(oe){var J;for(oe=oe||[];J=ae();)J!==!1&&oe.push(J);return oe}function ae(){var oe=ne();if(!(m!=M.charAt(0)||y!=M.charAt(1))){for(var J=2;x!=M.charAt(J)&&(y!=M.charAt(J)||m!=M.charAt(J+1));)++J;if(J+=2,x===M.charAt(J-1))return H("End of comment missing");var L=M.slice(2,J-2);return U+=2,Z(L),M=M.slice(J),U+=2,oe({type:S,comment:L})}}function ee(){var oe=ne(),J=le(u);if(J){if(ae(),!le(o))return H("property missing ':'");var L=le(s),P=oe({type:v,property:C(J[0].replace(t,x)),value:L?C(L[0].replace(t,x)):x});return le(f),P}}function xe(){var oe=[];O(oe);for(var J;J=ee();)J!==!1&&(oe.push(J),O(oe));return oe}return W(),xe()}function C(M){return M?M.replace(h,x):x}return Sc=N,Sc}var ig;function wv(){if(ig)return Zi;ig=1;var t=Zi&&Zi.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.default=r;const i=t(kv());function r(u,o){let s=null;if(!u||typeof u!="string")return s;const f=(0,i.default)(u),h=typeof o=="function";return f.forEach(g=>{if(g.type!=="declaration")return;const{property:m,value:y}=g;h?o(m,y,g):y&&(s=s||{},s[m]=y)}),s}return Zi}var Zr={},rg;function jv(){if(rg)return Zr;rg=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(m){return!m||r.test(m)||t.test(m)},f=function(m,y){return y.toUpperCase()},h=function(m,y){return"".concat(y,"-")},g=function(m,y){return y===void 0&&(y={}),s(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(o,h):m=m.replace(u,h),m.replace(i,f))};return Zr.camelCase=g,Zr}var Kr,ag;function Nv(){if(ag)return Kr;ag=1;var t=Kr&&Kr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},i=t(wv()),r=jv();function u(o,s){var f={};return!o||typeof o!="string"||(0,i.default)(o,function(h,g){h&&g&&(f[(0,r.camelCase)(h,s)]=g)}),f}return u.default=u,Kr=u,Kr}var _v=Nv();const Ev=Vu(_v),Lx=Ux("end"),jf=Ux("start");function Ux(t){return i;function i(r){const u=r&&r.position&&r.position[t]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function Cv(t){const i=jf(t),r=Lx(t);if(i&&r)return{start:i,end:r}}function na(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ug(t.position):"start"in t||"end"in t?ug(t):"line"in t||"column"in t?lf(t):""}function lf(t){return sg(t&&t.line)+":"+sg(t&&t.column)}function ug(t){return lf(t&&t.start)+"-"+lf(t&&t.end)}function sg(t){return t&&typeof t=="number"?t:1}class Rt extends Error{constructor(i,r,u){super(),typeof r=="string"&&(u=r,r=void 0);let o="",s={},f=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof i=="string"?o=i:!s.cause&&i&&(f=!0,o=i.message,s.cause=i),!s.ruleId&&!s.source&&typeof u=="string"){const g=u.indexOf(":");g===-1?s.ruleId=u:(s.source=u.slice(0,g),s.ruleId=u.slice(g+1))}if(!s.place&&s.ancestors&&s.ancestors){const g=s.ancestors[s.ancestors.length-1];g&&(s.place=g.position)}const h=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=h?h.line:void 0,this.name=na(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=f&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Rt.prototype.file="";Rt.prototype.name="";Rt.prototype.reason="";Rt.prototype.message="";Rt.prototype.stack="";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const Nf={}.hasOwnProperty,Tv=new Map,Av=/[A-Z]/g,zv=new Set(["table","tbody","thead","tfoot","tr"]),Dv=new Set(["td","th"]),qx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Rv(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let u;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=Iv(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=Hv(r,i.jsx,i.jsxs)}const o={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:u,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?wf:vv,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},s=Bx(o,t,void 0);return s&&typeof s!="string"?s:o.create(t,o.Fragment,{children:s||void 0},void 0)}function Bx(t,i,r){if(i.type==="element")return Mv(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return Ov(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return Uv(t,i,r);if(i.type==="mdxjsEsm")return Lv(t,i);if(i.type==="root")return qv(t,i,r);if(i.type==="text")return Bv(t,i)}function Mv(t,i,r){const u=t.schema;let o=u;i.tagName.toLowerCase()==="svg"&&u.space==="html"&&(o=wf,t.schema=o),t.ancestors.push(i);const s=Ix(t,i.tagName,!1),f=Yv(t,i);let h=Ef(t,i);return zv.has(i.tagName)&&(h=h.filter(function(g){return typeof g=="string"?!cv(g):!0})),Hx(t,f,s,i),_f(f,h),t.ancestors.pop(),t.schema=u,t.create(i,s,f,r)}function Ov(t,i){if(i.data&&i.data.estree&&t.evaluater){const u=i.data.estree.body[0];return u.type,t.evaluater.evaluateExpression(u.expression)}ra(t,i.position)}function Lv(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);ra(t,i.position)}function Uv(t,i,r){const u=t.schema;let o=u;i.name==="svg"&&u.space==="html"&&(o=wf,t.schema=o),t.ancestors.push(i);const s=i.name===null?t.Fragment:Ix(t,i.name,!0),f=Vv(t,i),h=Ef(t,i);return Hx(t,f,s,i),_f(f,h),t.ancestors.pop(),t.schema=u,t.create(i,s,f,r)}function qv(t,i,r){const u={};return _f(u,Ef(t,i)),t.create(i,t.Fragment,u,r)}function Bv(t,i){return i.value}function Hx(t,i,r,u){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=u)}function _f(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function Hv(t,i,r){return u;function u(o,s,f,h){const m=Array.isArray(f.children)?r:i;return h?m(s,f,h):m(s,f)}}function Iv(t,i){return r;function r(u,o,s,f){const h=Array.isArray(s.children),g=jf(u);return i(o,s,f,h,{columnNumber:g?g.column-1:void 0,fileName:t,lineNumber:g?g.line:void 0},void 0)}}function Yv(t,i){const r={};let u,o;for(o in i.properties)if(o!=="children"&&Nf.call(i.properties,o)){const s=Gv(t,o,i.properties[o]);if(s){const[f,h]=s;t.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&Dv.has(i.tagName)?u=h:r[f]=h}}if(u){const s=r.style||(r.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return r}function Vv(t,i){const r={};for(const u of i.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&t.evaluater){const s=u.data.estree.body[0];s.type;const f=s.expression;f.type;const h=f.properties[0];h.type,Object.assign(r,t.evaluater.evaluateExpression(h.argument))}else ra(t,i.position);else{const o=u.name;let s;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&t.evaluater){const h=u.value.data.estree.body[0];h.type,s=t.evaluater.evaluateExpression(h.expression)}else ra(t,i.position);else s=u.value===null?!0:u.value;r[o]=s}return r}function Ef(t,i){const r=[];let u=-1;const o=t.passKeys?new Map:Tv;for(;++u<i.children.length;){const s=i.children[u];let f;if(t.passKeys){const g=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(g){const m=o.get(g)||0;f=g+"-"+m,o.set(g,m+1)}}const h=Bx(t,s,f);h!==void 0&&r.push(h)}return r}function Gv(t,i,r){const u=xv(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=u.commaSeparated?rv(r):Sv(r)),u.property==="style"){let o=typeof r=="object"?r:Fv(t,String(r));return t.stylePropertyNameCase==="css"&&(o=$v(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&u.space?hv[u.property]||u.property:u.attribute,r]}}function Fv(t,i){try{return Ev(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const u=r,o=new Rt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=qx+"#cannot-parse-style-attribute",o}}function Ix(t,i,r){let u;if(!r)u={type:"Literal",value:i};else if(i.includes(".")){const o=i.split(".");let s=-1,f;for(;++s<o.length;){const h=Wm(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(s&&h.type==="Literal"),optional:!1}:h}u=f}else u=Wm(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(u.type==="Literal"){const o=u.value;return Nf.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(u);ra(t)}function ra(t,i){const r=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=qx+"#cannot-handle-mdx-estrees-without-createevaluater",r}function $v(t){const i={};let r;for(r in t)Nf.call(t,r)&&(i[Xv(r)]=t[r]);return i}function Xv(t){let i=t.replace(Av,Qv);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function Qv(t){return"-"+t.toLowerCase()}const kc={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"]},Zv={};function Cf(t,i){const r=Zv,u=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Yx(t,u,o)}function Yx(t,i,r){if(Kv(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return og(t.children,i,r)}return Array.isArray(t)?og(t,i,r):""}function og(t,i,r){const u=[];let o=-1;for(;++o<t.length;)u[o]=Yx(t[o],i,r);return u.join("")}function Kv(t){return!!(t&&typeof t=="object")}const cg=document.createElement("i");function Tf(t){const i="&"+t+";";cg.innerHTML=i;const r=cg.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function nn(t,i,r,u){const o=t.length;let s=0,f;if(i<0?i=-i>o?0:o+i:i=i>o?o:i,r=r>0?r:0,u.length<1e4)f=Array.from(u),f.unshift(i,r),t.splice(...f);else for(r&&t.splice(i,r);s<u.length;)f=u.slice(s,s+1e4),f.unshift(i,0),t.splice(...f),s+=1e4,i+=1e4}function xn(t,i){return t.length>0?(nn(t,t.length,0,i),t):i}const fg={}.hasOwnProperty;function Vx(t){const i={};let r=-1;for(;++r<t.length;)Jv(i,t[r]);return i}function Jv(t,i){let r;for(r in i){const o=(fg.call(t,r)?t[r]:void 0)||(t[r]={}),s=i[r];let f;if(s)for(f in s){fg.call(o,f)||(o[f]=[]);const h=s[f];Pv(o[f],Array.isArray(h)?h:h?[h]:[])}}}function Pv(t,i){let r=-1;const u=[];for(;++r<i.length;)(i[r].add==="after"?t:u).push(i[r]);nn(t,0,0,u)}function Gx(t,i){const r=Number.parseInt(t,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Cn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Lt=Ul(/[A-Za-z]/),Dt=Ul(/[\dA-Za-z]/),Wv=Ul(/[#-'*+\--9=?A-Z^-~]/);function Uu(t){return t!==null&&(t<32||t===127)}const rf=Ul(/\d/),eS=Ul(/[\dA-Fa-f]/),tS=Ul(/[!-/:-@[-`{-~]/);function Se(t){return t!==null&&t<-2}function lt(t){return t!==null&&(t<0||t===32)}function Oe(t){return t===-2||t===-1||t===32}const Fu=Ul(/\p{P}|\p{S}/u),ui=Ul(/\s/);function Ul(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function tr(t){const i=[];let r=-1,u=0,o=0;for(;++r<t.length;){const s=t.charCodeAt(r);let f="";if(s===37&&Dt(t.charCodeAt(r+1))&&Dt(t.charCodeAt(r+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(f=String.fromCharCode(s));else if(s>55295&&s<57344){const h=t.charCodeAt(r+1);s<56320&&h>56319&&h<57344?(f=String.fromCharCode(s,h),o=1):f="�"}else f=String.fromCharCode(s);f&&(i.push(t.slice(u,r),encodeURIComponent(f)),u=r+o+1,f=""),o&&(r+=o,o=0)}return i.join("")+t.slice(u)}function Ye(t,i,r,u){const o=u?u-1:Number.POSITIVE_INFINITY;let s=0;return f;function f(g){return Oe(g)?(t.enter(r),h(g)):i(g)}function h(g){return Oe(g)&&s++<o?(t.consume(g),h):(t.exit(r),i(g))}}const nS={tokenize:lS};function lS(t){const i=t.attempt(this.parser.constructs.contentInitial,u,o);let r;return i;function u(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Ye(t,i,"linePrefix")}function o(h){return t.enter("paragraph"),s(h)}function s(h){const g=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=g),r=g,f(h)}function f(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return Se(h)?(t.consume(h),t.exit("chunkText"),s):(t.consume(h),f)}}const iS={tokenize:rS},dg={tokenize:aS};function rS(t){const i=this,r=[];let u=0,o,s,f;return h;function h(U){if(u<r.length){const Z=r[u];return i.containerState=Z[1],t.attempt(Z[0].continuation,g,m)(U)}return m(U)}function g(U){if(u++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,o&&G();const Z=i.events.length;let ne=Z,D;for(;ne--;)if(i.events[ne][0]==="exit"&&i.events[ne][1].type==="chunkFlow"){D=i.events[ne][1].end;break}_(u);let H=Z;for(;H<i.events.length;)i.events[H][1].end={...D},H++;return nn(i.events,ne+1,0,i.events.slice(Z)),i.events.length=H,m(U)}return h(U)}function m(U){if(u===r.length){if(!o)return S(U);if(o.currentConstruct&&o.currentConstruct.concrete)return N(U);i.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(dg,y,x)(U)}function y(U){return o&&G(),_(u),S(U)}function x(U){return i.parser.lazy[i.now().line]=u!==r.length,f=i.now().offset,N(U)}function S(U){return i.containerState={},t.attempt(dg,v,N)(U)}function v(U){return u++,r.push([i.currentConstruct,i.containerState]),S(U)}function N(U){if(U===null){o&&G(),_(0),t.consume(U);return}return o=o||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),C(U)}function C(U){if(U===null){M(t.exit("chunkFlow"),!0),_(0),t.consume(U);return}return Se(U)?(t.consume(U),M(t.exit("chunkFlow")),u=0,i.interrupt=void 0,h):(t.consume(U),C)}function M(U,Z){const ne=i.sliceStream(U);if(Z&&ne.push(null),U.previous=s,s&&(s.next=U),s=U,o.defineSkip(U.start),o.write(ne),i.parser.lazy[U.start.line]){let D=o.events.length;for(;D--;)if(o.events[D][1].start.offset<f&&(!o.events[D][1].end||o.events[D][1].end.offset>f))return;const H=i.events.length;let le=H,W,O;for(;le--;)if(i.events[le][0]==="exit"&&i.events[le][1].type==="chunkFlow"){if(W){O=i.events[le][1].end;break}W=!0}for(_(u),D=H;D<i.events.length;)i.events[D][1].end={...O},D++;nn(i.events,le+1,0,i.events.slice(H)),i.events.length=D}}function _(U){let Z=r.length;for(;Z-- >U;){const ne=r[Z];i.containerState=ne[1],ne[0].exit.call(i,t)}r.length=U}function G(){o.write([null]),s=void 0,o=void 0,i.containerState._closeFlow=void 0}}function aS(t,i,r){return Ye(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Wi(t){if(t===null||lt(t)||ui(t))return 1;if(Fu(t))return 2}function $u(t,i,r){const u=[];let o=-1;for(;++o<t.length;){const s=t[o].resolveAll;s&&!u.includes(s)&&(i=s(i,r),u.push(s))}return i}const af={name:"attention",resolveAll:uS,tokenize:sS};function uS(t,i){let r=-1,u,o,s,f,h,g,m,y;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(u=r;u--;)if(t[u][0]==="exit"&&t[u][1].type==="attentionSequence"&&t[u][1]._open&&i.sliceSerialize(t[u][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[u][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[u][1].end.offset-t[u][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;g=t[u][1].end.offset-t[u][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const x={...t[u][1].end},S={...t[r][1].start};pg(x,-g),pg(S,g),f={type:g>1?"strongSequence":"emphasisSequence",start:x,end:{...t[u][1].end}},h={type:g>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:S},s={type:g>1?"strongText":"emphasisText",start:{...t[u][1].end},end:{...t[r][1].start}},o={type:g>1?"strong":"emphasis",start:{...f.start},end:{...h.end}},t[u][1].end={...f.start},t[r][1].start={...h.end},m=[],t[u][1].end.offset-t[u][1].start.offset&&(m=xn(m,[["enter",t[u][1],i],["exit",t[u][1],i]])),m=xn(m,[["enter",o,i],["enter",f,i],["exit",f,i],["enter",s,i]]),m=xn(m,$u(i.parser.constructs.insideSpan.null,t.slice(u+1,r),i)),m=xn(m,[["exit",s,i],["enter",h,i],["exit",h,i],["exit",o,i]]),t[r][1].end.offset-t[r][1].start.offset?(y=2,m=xn(m,[["enter",t[r][1],i],["exit",t[r][1],i]])):y=0,nn(t,u-1,r-u+3,m),r=u+m.length-y-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function sS(t,i){const r=this.parser.constructs.attentionMarkers.null,u=this.previous,o=Wi(u);let s;return f;function f(g){return s=g,t.enter("attentionSequence"),h(g)}function h(g){if(g===s)return t.consume(g),h;const m=t.exit("attentionSequence"),y=Wi(g),x=!y||y===2&&o||r.includes(g),S=!o||o===2&&y||r.includes(u);return m._open=!!(s===42?x:x&&(o||!S)),m._close=!!(s===42?S:S&&(y||!x)),i(g)}}function pg(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const oS={name:"autolink",tokenize:cS};function cS(t,i,r){let u=0;return o;function o(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(v){return Lt(v)?(t.consume(v),f):v===64?r(v):m(v)}function f(v){return v===43||v===45||v===46||Dt(v)?(u=1,h(v)):m(v)}function h(v){return v===58?(t.consume(v),u=0,g):(v===43||v===45||v===46||Dt(v))&&u++<32?(t.consume(v),h):(u=0,m(v))}function g(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),i):v===null||v===32||v===60||Uu(v)?r(v):(t.consume(v),g)}function m(v){return v===64?(t.consume(v),y):Wv(v)?(t.consume(v),m):r(v)}function y(v){return Dt(v)?x(v):r(v)}function x(v){return v===46?(t.consume(v),u=0,y):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),i):S(v)}function S(v){if((v===45||Dt(v))&&u++<63){const N=v===45?S:x;return t.consume(v),N}return r(v)}}const sa={partial:!0,tokenize:fS};function fS(t,i,r){return u;function u(s){return Oe(s)?Ye(t,o,"linePrefix")(s):o(s)}function o(s){return s===null||Se(s)?i(s):r(s)}}const Fx={continuation:{tokenize:pS},exit:hS,name:"blockQuote",tokenize:dS};function dS(t,i,r){const u=this;return o;function o(f){if(f===62){const h=u.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(f),t.exit("blockQuoteMarker"),s}return r(f)}function s(f){return Oe(f)?(t.enter("blockQuotePrefixWhitespace"),t.consume(f),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(f))}}function pS(t,i,r){const u=this;return o;function o(f){return Oe(f)?Ye(t,s,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):s(f)}function s(f){return t.attempt(Fx,i,r)(f)}}function hS(t){t.exit("blockQuote")}const $x={name:"characterEscape",tokenize:mS};function mS(t,i,r){return u;function u(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),o}function o(s){return tS(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(s)}}const Xx={name:"characterReference",tokenize:gS};function gS(t,i,r){const u=this;let o=0,s,f;return h;function h(x){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),g}function g(x){return x===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(x),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),s=31,f=Dt,y(x))}function m(x){return x===88||x===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(x),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,f=eS,y):(t.enter("characterReferenceValue"),s=7,f=rf,y(x))}function y(x){if(x===59&&o){const S=t.exit("characterReferenceValue");return f===Dt&&!Tf(u.sliceSerialize(S))?r(x):(t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return f(x)&&o++<s?(t.consume(x),y):r(x)}}const hg={partial:!0,tokenize:yS},mg={concrete:!0,name:"codeFenced",tokenize:xS};function xS(t,i,r){const u=this,o={partial:!0,tokenize:ne};let s=0,f=0,h;return g;function g(D){return m(D)}function m(D){const H=u.events[u.events.length-1];return s=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,h=D,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(D)}function y(D){return D===h?(f++,t.consume(D),y):f<3?r(D):(t.exit("codeFencedFenceSequence"),Oe(D)?Ye(t,x,"whitespace")(D):x(D))}function x(D){return D===null||Se(D)?(t.exit("codeFencedFence"),u.interrupt?i(D):t.check(hg,C,Z)(D)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||Se(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),x(D)):Oe(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ye(t,v,"whitespace")(D)):D===96&&D===h?r(D):(t.consume(D),S)}function v(D){return D===null||Se(D)?x(D):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(D))}function N(D){return D===null||Se(D)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),x(D)):D===96&&D===h?r(D):(t.consume(D),N)}function C(D){return t.attempt(o,Z,M)(D)}function M(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),_}function _(D){return s>0&&Oe(D)?Ye(t,G,"linePrefix",s+1)(D):G(D)}function G(D){return D===null||Se(D)?t.check(hg,C,Z)(D):(t.enter("codeFlowValue"),U(D))}function U(D){return D===null||Se(D)?(t.exit("codeFlowValue"),G(D)):(t.consume(D),U)}function Z(D){return t.exit("codeFenced"),i(D)}function ne(D,H,le){let W=0;return O;function O(J){return D.enter("lineEnding"),D.consume(J),D.exit("lineEnding"),ae}function ae(J){return D.enter("codeFencedFence"),Oe(J)?Ye(D,ee,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):ee(J)}function ee(J){return J===h?(D.enter("codeFencedFenceSequence"),xe(J)):le(J)}function xe(J){return J===h?(W++,D.consume(J),xe):W>=f?(D.exit("codeFencedFenceSequence"),Oe(J)?Ye(D,oe,"whitespace")(J):oe(J)):le(J)}function oe(J){return J===null||Se(J)?(D.exit("codeFencedFence"),H(J)):le(J)}}}function yS(t,i,r){const u=this;return o;function o(f){return f===null?r(f):(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),s)}function s(f){return u.parser.lazy[u.now().line]?r(f):i(f)}}const wc={name:"codeIndented",tokenize:vS},bS={partial:!0,tokenize:SS};function vS(t,i,r){const u=this;return o;function o(m){return t.enter("codeIndented"),Ye(t,s,"linePrefix",5)(m)}function s(m){const y=u.events[u.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?f(m):r(m)}function f(m){return m===null?g(m):Se(m)?t.attempt(bS,f,g)(m):(t.enter("codeFlowValue"),h(m))}function h(m){return m===null||Se(m)?(t.exit("codeFlowValue"),f(m)):(t.consume(m),h)}function g(m){return t.exit("codeIndented"),i(m)}}function SS(t,i,r){const u=this;return o;function o(f){return u.parser.lazy[u.now().line]?r(f):Se(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o):Ye(t,s,"linePrefix",5)(f)}function s(f){const h=u.events[u.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(f):Se(f)?o(f):r(f)}}const kS={name:"codeText",previous:jS,resolve:wS,tokenize:NS};function wS(t){let i=t.length-4,r=3,u,o;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(u=r;++u<i;)if(t[u][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(u=r-1,i++;++u<=i;)o===void 0?u!==i&&t[u][1].type!=="lineEnding"&&(o=u):(u===i||t[u][1].type==="lineEnding")&&(t[o][1].type="codeTextData",u!==o+2&&(t[o][1].end=t[u-1][1].end,t.splice(o+2,u-o-2),i-=u-o-2,u=o+2),o=void 0);return t}function jS(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function NS(t,i,r){let u=0,o,s;return f;function f(x){return t.enter("codeText"),t.enter("codeTextSequence"),h(x)}function h(x){return x===96?(t.consume(x),u++,h):(t.exit("codeTextSequence"),g(x))}function g(x){return x===null?r(x):x===32?(t.enter("space"),t.consume(x),t.exit("space"),g):x===96?(s=t.enter("codeTextSequence"),o=0,y(x)):Se(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),g):(t.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||Se(x)?(t.exit("codeTextData"),g(x)):(t.consume(x),m)}function y(x){return x===96?(t.consume(x),o++,y):o===u?(t.exit("codeTextSequence"),t.exit("codeText"),i(x)):(s.type="codeTextData",m(x))}}class _S{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const u=r??Number.POSITIVE_INFINITY;return u<this.left.length?this.left.slice(i,u):i>this.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(i,r,u){const o=r||0;this.setCursor(Math.trunc(i));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return u&&Jr(this.left,u),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Jr(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Jr(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);Jr(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Jr(this.left,r.reverse())}}}function Jr(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function Qx(t){const i={};let r=-1,u,o,s,f,h,g,m;const y=new _S(t);for(;++r<y.length;){for(;r in i;)r=i[r];if(u=y.get(r),r&&u[1].type==="chunkFlow"&&y.get(r-1)[1].type==="listItemPrefix"&&(g=u[1]._tokenizer.events,s=0,s<g.length&&g[s][1].type==="lineEndingBlank"&&(s+=2),s<g.length&&g[s][1].type==="content"))for(;++s<g.length&&g[s][1].type!=="content";)g[s][1].type==="chunkText"&&(g[s][1]._isInFirstContentOfListItem=!0,s++);if(u[0]==="enter")u[1].contentType&&(Object.assign(i,ES(y,r)),r=i[r],m=!0);else if(u[1]._container){for(s=r,o=void 0;s--;)if(f=y.get(s),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),f[1].type="lineEnding",o=s);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;o&&(u[1].end={...y.get(o)[1].start},h=y.slice(o,r),h.unshift(u),y.splice(o,r-o+1,h))}}return nn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function ES(t,i){const r=t.get(i)[1],u=t.get(i)[2];let o=i-1;const s=[];let f=r._tokenizer;f||(f=u.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,g=[],m={};let y,x,S=-1,v=r,N=0,C=0;const M=[C];for(;v;){for(;t.get(++o)[1]!==v;);s.push(o),v._tokenizer||(y=u.sliceStream(v),v.next||y.push(null),x&&f.defineSkip(v.start),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(y),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),x=v,v=v.next}for(v=r;++S<h.length;)h[S][0]==="exit"&&h[S-1][0]==="enter"&&h[S][1].type===h[S-1][1].type&&h[S][1].start.line!==h[S][1].end.line&&(C=S+1,M.push(C),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(f.events=[],v?(v._tokenizer=void 0,v.previous=void 0):M.pop(),S=M.length;S--;){const _=h.slice(M[S],M[S+1]),G=s.pop();g.push([G,G+_.length-1]),t.splice(G,2,_)}for(g.reverse(),S=-1;++S<g.length;)m[N+g[S][0]]=N+g[S][1],N+=g[S][1]-g[S][0]-1;return m}const CS={resolve:AS,tokenize:zS},TS={partial:!0,tokenize:DS};function AS(t){return Qx(t),t}function zS(t,i){let r;return u;function u(h){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),o(h)}function o(h){return h===null?s(h):Se(h)?t.check(TS,f,s)(h):(t.consume(h),o)}function s(h){return t.exit("chunkContent"),t.exit("content"),i(h)}function f(h){return t.consume(h),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function DS(t,i,r){const u=this;return o;function o(f){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Ye(t,s,"linePrefix")}function s(f){if(f===null||Se(f))return r(f);const h=u.events[u.events.length-1];return!u.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(f):t.interrupt(u.parser.constructs.flow,r,i)(f)}}function Zx(t,i,r,u,o,s,f,h,g){const m=g||Number.POSITIVE_INFINITY;let y=0;return x;function x(_){return _===60?(t.enter(u),t.enter(o),t.enter(s),t.consume(_),t.exit(s),S):_===null||_===32||_===41||Uu(_)?r(_):(t.enter(u),t.enter(f),t.enter(h),t.enter("chunkString",{contentType:"string"}),C(_))}function S(_){return _===62?(t.enter(s),t.consume(_),t.exit(s),t.exit(o),t.exit(u),i):(t.enter(h),t.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(t.exit("chunkString"),t.exit(h),S(_)):_===null||_===60||Se(_)?r(_):(t.consume(_),_===92?N:v)}function N(_){return _===60||_===62||_===92?(t.consume(_),v):v(_)}function C(_){return!y&&(_===null||_===41||lt(_))?(t.exit("chunkString"),t.exit(h),t.exit(f),t.exit(u),i(_)):y<m&&_===40?(t.consume(_),y++,C):_===41?(t.consume(_),y--,C):_===null||_===32||_===40||Uu(_)?r(_):(t.consume(_),_===92?M:C)}function M(_){return _===40||_===41||_===92?(t.consume(_),C):C(_)}}function Kx(t,i,r,u,o,s){const f=this;let h=0,g;return m;function m(v){return t.enter(u),t.enter(o),t.consume(v),t.exit(o),t.enter(s),y}function y(v){return h>999||v===null||v===91||v===93&&!g||v===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?r(v):v===93?(t.exit(s),t.enter(o),t.consume(v),t.exit(o),t.exit(u),i):Se(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||Se(v)||h++>999?(t.exit("chunkString"),y(v)):(t.consume(v),g||(g=!Oe(v)),v===92?S:x)}function S(v){return v===91||v===92||v===93?(t.consume(v),h++,x):x(v)}}function Jx(t,i,r,u,o,s){let f;return h;function h(S){return S===34||S===39||S===40?(t.enter(u),t.enter(o),t.consume(S),t.exit(o),f=S===40?41:S,g):r(S)}function g(S){return S===f?(t.enter(o),t.consume(S),t.exit(o),t.exit(u),i):(t.enter(s),m(S))}function m(S){return S===f?(t.exit(s),g(f)):S===null?r(S):Se(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),Ye(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===f||S===null||Se(S)?(t.exit("chunkString"),m(S)):(t.consume(S),S===92?x:y)}function x(S){return S===f||S===92?(t.consume(S),y):y(S)}}function la(t,i){let r;return u;function u(o){return Se(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),r=!0,u):Oe(o)?Ye(t,u,r?"linePrefix":"lineSuffix")(o):i(o)}}const RS={name:"definition",tokenize:OS},MS={partial:!0,tokenize:LS};function OS(t,i,r){const u=this;let o;return s;function s(v){return t.enter("definition"),f(v)}function f(v){return Kx.call(u,t,h,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function h(v){return o=Cn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),g):r(v)}function g(v){return lt(v)?la(t,m)(v):m(v)}function m(v){return Zx(t,y,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return t.attempt(MS,x,x)(v)}function x(v){return Oe(v)?Ye(t,S,"whitespace")(v):S(v)}function S(v){return v===null||Se(v)?(t.exit("definition"),u.parser.defined.push(o),i(v)):r(v)}}function LS(t,i,r){return u;function u(h){return lt(h)?la(t,o)(h):r(h)}function o(h){return Jx(t,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function s(h){return Oe(h)?Ye(t,f,"whitespace")(h):f(h)}function f(h){return h===null||Se(h)?i(h):r(h)}}const US={name:"hardBreakEscape",tokenize:qS};function qS(t,i,r){return u;function u(s){return t.enter("hardBreakEscape"),t.consume(s),o}function o(s){return Se(s)?(t.exit("hardBreakEscape"),i(s)):r(s)}}const BS={name:"headingAtx",resolve:HS,tokenize:IS};function HS(t,i){let r=t.length-2,u=3,o,s;return t[u][1].type==="whitespace"&&(u+=2),r-2>u&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(u===r-1||r-4>u&&t[r-2][1].type==="whitespace")&&(r-=u+1===r?2:4),r>u&&(o={type:"atxHeadingText",start:t[u][1].start,end:t[r][1].end},s={type:"chunkText",start:t[u][1].start,end:t[r][1].end,contentType:"text"},nn(t,u,r-u+1,[["enter",o,i],["enter",s,i],["exit",s,i],["exit",o,i]])),t}function IS(t,i,r){let u=0;return o;function o(y){return t.enter("atxHeading"),s(y)}function s(y){return t.enter("atxHeadingSequence"),f(y)}function f(y){return y===35&&u++<6?(t.consume(y),f):y===null||lt(y)?(t.exit("atxHeadingSequence"),h(y)):r(y)}function h(y){return y===35?(t.enter("atxHeadingSequence"),g(y)):y===null||Se(y)?(t.exit("atxHeading"),i(y)):Oe(y)?Ye(t,h,"whitespace")(y):(t.enter("atxHeadingText"),m(y))}function g(y){return y===35?(t.consume(y),g):(t.exit("atxHeadingSequence"),h(y))}function m(y){return y===null||y===35||lt(y)?(t.exit("atxHeadingText"),h(y)):(t.consume(y),m)}}const YS=["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"],gg=["pre","script","style","textarea"],VS={concrete:!0,name:"htmlFlow",resolveTo:$S,tokenize:XS},GS={partial:!0,tokenize:ZS},FS={partial:!0,tokenize:QS};function $S(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function XS(t,i,r){const u=this;let o,s,f,h,g;return m;function m(j){return y(j)}function y(j){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(j),x}function x(j){return j===33?(t.consume(j),S):j===47?(t.consume(j),s=!0,C):j===63?(t.consume(j),o=3,u.interrupt?i:E):Lt(j)?(t.consume(j),f=String.fromCharCode(j),M):r(j)}function S(j){return j===45?(t.consume(j),o=2,v):j===91?(t.consume(j),o=5,h=0,N):Lt(j)?(t.consume(j),o=4,u.interrupt?i:E):r(j)}function v(j){return j===45?(t.consume(j),u.interrupt?i:E):r(j)}function N(j){const re="CDATA[";return j===re.charCodeAt(h++)?(t.consume(j),h===re.length?u.interrupt?i:ee:N):r(j)}function C(j){return Lt(j)?(t.consume(j),f=String.fromCharCode(j),M):r(j)}function M(j){if(j===null||j===47||j===62||lt(j)){const re=j===47,me=f.toLowerCase();return!re&&!s&&gg.includes(me)?(o=1,u.interrupt?i(j):ee(j)):YS.includes(f.toLowerCase())?(o=6,re?(t.consume(j),_):u.interrupt?i(j):ee(j)):(o=7,u.interrupt&&!u.parser.lazy[u.now().line]?r(j):s?G(j):U(j))}return j===45||Dt(j)?(t.consume(j),f+=String.fromCharCode(j),M):r(j)}function _(j){return j===62?(t.consume(j),u.interrupt?i:ee):r(j)}function G(j){return Oe(j)?(t.consume(j),G):O(j)}function U(j){return j===47?(t.consume(j),O):j===58||j===95||Lt(j)?(t.consume(j),Z):Oe(j)?(t.consume(j),U):O(j)}function Z(j){return j===45||j===46||j===58||j===95||Dt(j)?(t.consume(j),Z):ne(j)}function ne(j){return j===61?(t.consume(j),D):Oe(j)?(t.consume(j),ne):U(j)}function D(j){return j===null||j===60||j===61||j===62||j===96?r(j):j===34||j===39?(t.consume(j),g=j,H):Oe(j)?(t.consume(j),D):le(j)}function H(j){return j===g?(t.consume(j),g=null,W):j===null||Se(j)?r(j):(t.consume(j),H)}function le(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||lt(j)?ne(j):(t.consume(j),le)}function W(j){return j===47||j===62||Oe(j)?U(j):r(j)}function O(j){return j===62?(t.consume(j),ae):r(j)}function ae(j){return j===null||Se(j)?ee(j):Oe(j)?(t.consume(j),ae):r(j)}function ee(j){return j===45&&o===2?(t.consume(j),L):j===60&&o===1?(t.consume(j),P):j===62&&o===4?(t.consume(j),T):j===63&&o===3?(t.consume(j),E):j===93&&o===5?(t.consume(j),ce):Se(j)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(GS,V,xe)(j)):j===null||Se(j)?(t.exit("htmlFlowData"),xe(j)):(t.consume(j),ee)}function xe(j){return t.check(FS,oe,V)(j)}function oe(j){return t.enter("lineEnding"),t.consume(j),t.exit("lineEnding"),J}function J(j){return j===null||Se(j)?xe(j):(t.enter("htmlFlowData"),ee(j))}function L(j){return j===45?(t.consume(j),E):ee(j)}function P(j){return j===47?(t.consume(j),f="",fe):ee(j)}function fe(j){if(j===62){const re=f.toLowerCase();return gg.includes(re)?(t.consume(j),T):ee(j)}return Lt(j)&&f.length<8?(t.consume(j),f+=String.fromCharCode(j),fe):ee(j)}function ce(j){return j===93?(t.consume(j),E):ee(j)}function E(j){return j===62?(t.consume(j),T):j===45&&o===2?(t.consume(j),E):ee(j)}function T(j){return j===null||Se(j)?(t.exit("htmlFlowData"),V(j)):(t.consume(j),T)}function V(j){return t.exit("htmlFlow"),i(j)}}function QS(t,i,r){const u=this;return o;function o(f){return Se(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),s):r(f)}function s(f){return u.parser.lazy[u.now().line]?r(f):i(f)}}function ZS(t,i,r){return u;function u(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(sa,i,r)}}const KS={name:"htmlText",tokenize:JS};function JS(t,i,r){const u=this;let o,s,f;return h;function h(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),g}function g(E){return E===33?(t.consume(E),m):E===47?(t.consume(E),ne):E===63?(t.consume(E),U):Lt(E)?(t.consume(E),le):r(E)}function m(E){return E===45?(t.consume(E),y):E===91?(t.consume(E),s=0,N):Lt(E)?(t.consume(E),G):r(E)}function y(E){return E===45?(t.consume(E),v):r(E)}function x(E){return E===null?r(E):E===45?(t.consume(E),S):Se(E)?(f=x,P(E)):(t.consume(E),x)}function S(E){return E===45?(t.consume(E),v):x(E)}function v(E){return E===62?L(E):E===45?S(E):x(E)}function N(E){const T="CDATA[";return E===T.charCodeAt(s++)?(t.consume(E),s===T.length?C:N):r(E)}function C(E){return E===null?r(E):E===93?(t.consume(E),M):Se(E)?(f=C,P(E)):(t.consume(E),C)}function M(E){return E===93?(t.consume(E),_):C(E)}function _(E){return E===62?L(E):E===93?(t.consume(E),_):C(E)}function G(E){return E===null||E===62?L(E):Se(E)?(f=G,P(E)):(t.consume(E),G)}function U(E){return E===null?r(E):E===63?(t.consume(E),Z):Se(E)?(f=U,P(E)):(t.consume(E),U)}function Z(E){return E===62?L(E):U(E)}function ne(E){return Lt(E)?(t.consume(E),D):r(E)}function D(E){return E===45||Dt(E)?(t.consume(E),D):H(E)}function H(E){return Se(E)?(f=H,P(E)):Oe(E)?(t.consume(E),H):L(E)}function le(E){return E===45||Dt(E)?(t.consume(E),le):E===47||E===62||lt(E)?W(E):r(E)}function W(E){return E===47?(t.consume(E),L):E===58||E===95||Lt(E)?(t.consume(E),O):Se(E)?(f=W,P(E)):Oe(E)?(t.consume(E),W):L(E)}function O(E){return E===45||E===46||E===58||E===95||Dt(E)?(t.consume(E),O):ae(E)}function ae(E){return E===61?(t.consume(E),ee):Se(E)?(f=ae,P(E)):Oe(E)?(t.consume(E),ae):W(E)}function ee(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(t.consume(E),o=E,xe):Se(E)?(f=ee,P(E)):Oe(E)?(t.consume(E),ee):(t.consume(E),oe)}function xe(E){return E===o?(t.consume(E),o=void 0,J):E===null?r(E):Se(E)?(f=xe,P(E)):(t.consume(E),xe)}function oe(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||lt(E)?W(E):(t.consume(E),oe)}function J(E){return E===47||E===62||lt(E)?W(E):r(E)}function L(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),i):r(E)}function P(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),fe}function fe(E){return Oe(E)?Ye(t,ce,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):ce(E)}function ce(E){return t.enter("htmlTextData"),f(E)}}const Af={name:"labelEnd",resolveAll:t2,resolveTo:n2,tokenize:l2},PS={tokenize:i2},WS={tokenize:r2},e2={tokenize:a2};function t2(t){let i=-1;const r=[];for(;++i<t.length;){const u=t[i][1];if(r.push(t[i]),u.type==="labelImage"||u.type==="labelLink"||u.type==="labelEnd"){const o=u.type==="labelImage"?4:2;u.type="data",i+=o}}return t.length!==r.length&&nn(t,0,t.length,r),t}function n2(t,i){let r=t.length,u=0,o,s,f,h;for(;r--;)if(o=t[r][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(f){if(t[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=r,o.type!=="labelLink")){u=2;break}}else o.type==="labelEnd"&&(f=r);const g={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[s][1].start},end:{...t[f][1].end}},y={type:"labelText",start:{...t[s+u+2][1].end},end:{...t[f-2][1].start}};return h=[["enter",g,i],["enter",m,i]],h=xn(h,t.slice(s+1,s+u+3)),h=xn(h,[["enter",y,i]]),h=xn(h,$u(i.parser.constructs.insideSpan.null,t.slice(s+u+4,f-3),i)),h=xn(h,[["exit",y,i],t[f-2],t[f-1],["exit",m,i]]),h=xn(h,t.slice(f+1)),h=xn(h,[["exit",g,i]]),nn(t,s,t.length,h),t}function l2(t,i,r){const u=this;let o=u.events.length,s,f;for(;o--;)if((u.events[o][1].type==="labelImage"||u.events[o][1].type==="labelLink")&&!u.events[o][1]._balanced){s=u.events[o][1];break}return h;function h(S){return s?s._inactive?x(S):(f=u.parser.defined.includes(Cn(u.sliceSerialize({start:s.end,end:u.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(S),t.exit("labelMarker"),t.exit("labelEnd"),g):r(S)}function g(S){return S===40?t.attempt(PS,y,f?y:x)(S):S===91?t.attempt(WS,y,f?m:x)(S):f?y(S):x(S)}function m(S){return t.attempt(e2,y,x)(S)}function y(S){return i(S)}function x(S){return s._balanced=!0,r(S)}}function i2(t,i,r){return u;function u(x){return t.enter("resource"),t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),o}function o(x){return lt(x)?la(t,s)(x):s(x)}function s(x){return x===41?y(x):Zx(t,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function f(x){return lt(x)?la(t,g)(x):y(x)}function h(x){return r(x)}function g(x){return x===34||x===39||x===40?Jx(t,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):y(x)}function m(x){return lt(x)?la(t,y)(x):y(x)}function y(x){return x===41?(t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),t.exit("resource"),i):r(x)}}function r2(t,i,r){const u=this;return o;function o(h){return Kx.call(u,t,s,f,"reference","referenceMarker","referenceString")(h)}function s(h){return u.parser.defined.includes(Cn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?i(h):r(h)}function f(h){return r(h)}}function a2(t,i,r){return u;function u(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),o}function o(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),i):r(s)}}const u2={name:"labelStartImage",resolveAll:Af.resolveAll,tokenize:s2};function s2(t,i,r){const u=this;return o;function o(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),s}function s(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),f):r(h)}function f(h){return h===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(h):i(h)}}const o2={name:"labelStartLink",resolveAll:Af.resolveAll,tokenize:c2};function c2(t,i,r){const u=this;return o;function o(f){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelLink"),s}function s(f){return f===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(f):i(f)}}const jc={name:"lineEnding",tokenize:f2};function f2(t,i){return r;function r(u){return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Ye(t,i,"linePrefix")}}const Ru={name:"thematicBreak",tokenize:d2};function d2(t,i,r){let u=0,o;return s;function s(m){return t.enter("thematicBreak"),f(m)}function f(m){return o=m,h(m)}function h(m){return m===o?(t.enter("thematicBreakSequence"),g(m)):u>=3&&(m===null||Se(m))?(t.exit("thematicBreak"),i(m)):r(m)}function g(m){return m===o?(t.consume(m),u++,g):(t.exit("thematicBreakSequence"),Oe(m)?Ye(t,h,"whitespace")(m):h(m))}}const Ft={continuation:{tokenize:g2},exit:y2,name:"list",tokenize:m2},p2={partial:!0,tokenize:b2},h2={partial:!0,tokenize:x2};function m2(t,i,r){const u=this,o=u.events[u.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,f=0;return h;function h(v){const N=u.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!u.containerState.marker||v===u.containerState.marker:rf(v)){if(u.containerState.type||(u.containerState.type=N,t.enter(N,{_container:!0})),N==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(Ru,r,m)(v):m(v);if(!u.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),g(v)}return r(v)}function g(v){return rf(v)&&++f<10?(t.consume(v),g):(!u.interrupt||f<2)&&(u.containerState.marker?v===u.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):r(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||v,t.check(sa,u.interrupt?r:y,t.attempt(p2,S,x))}function y(v){return u.containerState.initialBlankLine=!0,s++,S(v)}function x(v){return Oe(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),S):r(v)}function S(v){return u.containerState.size=s+u.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(v)}}function g2(t,i,r){const u=this;return u.containerState._closeFlow=void 0,t.check(sa,o,s);function o(h){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Ye(t,i,"listItemIndent",u.containerState.size+1)(h)}function s(h){return u.containerState.furtherBlankLines||!Oe(h)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,f(h)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,t.attempt(h2,i,f)(h))}function f(h){return u.containerState._closeFlow=!0,u.interrupt=void 0,Ye(t,t.attempt(Ft,i,r),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function x2(t,i,r){const u=this;return Ye(t,o,"listItemIndent",u.containerState.size+1);function o(s){const f=u.events[u.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===u.containerState.size?i(s):r(s)}}function y2(t){t.exit(this.containerState.type)}function b2(t,i,r){const u=this;return Ye(t,o,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const f=u.events[u.events.length-1];return!Oe(s)&&f&&f[1].type==="listItemPrefixWhitespace"?i(s):r(s)}}const xg={name:"setextUnderline",resolveTo:v2,tokenize:S2};function v2(t,i){let r=t.length,u,o,s;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){u=r;break}t[r][1].type==="paragraph"&&(o=r)}else t[r][1].type==="content"&&t.splice(r,1),!s&&t[r][1].type==="definition"&&(s=r);const f={type:"setextHeading",start:{...t[u][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",s?(t.splice(o,0,["enter",f,i]),t.splice(s+1,0,["exit",t[u][1],i]),t[u][1].end={...t[s][1].end}):t[u][1]=f,t.push(["exit",f,i]),t}function S2(t,i,r){const u=this;let o;return s;function s(m){let y=u.events.length,x;for(;y--;)if(u.events[y][1].type!=="lineEnding"&&u.events[y][1].type!=="linePrefix"&&u.events[y][1].type!=="content"){x=u.events[y][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||x)?(t.enter("setextHeadingLine"),o=m,f(m)):r(m)}function f(m){return t.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===o?(t.consume(m),h):(t.exit("setextHeadingLineSequence"),Oe(m)?Ye(t,g,"lineSuffix")(m):g(m))}function g(m){return m===null||Se(m)?(t.exit("setextHeadingLine"),i(m)):r(m)}}const k2={tokenize:w2};function w2(t){const i=this,r=t.attempt(sa,u,t.attempt(this.parser.constructs.flowInitial,o,Ye(t,t.attempt(this.parser.constructs.flow,o,t.attempt(CS,o)),"linePrefix")));return r;function u(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function o(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const j2={resolveAll:Wx()},N2=Px("string"),_2=Px("text");function Px(t){return{resolveAll:Wx(t==="text"?E2:void 0),tokenize:i};function i(r){const u=this,o=this.parser.constructs[t],s=r.attempt(o,f,h);return f;function f(y){return m(y)?s(y):h(y)}function h(y){if(y===null){r.consume(y);return}return r.enter("data"),r.consume(y),g}function g(y){return m(y)?(r.exit("data"),s(y)):(r.consume(y),g)}function m(y){if(y===null)return!0;const x=o[y];let S=-1;if(x)for(;++S<x.length;){const v=x[S];if(!v.previous||v.previous.call(u,u.previous))return!0}return!1}}}function Wx(t){return i;function i(r,u){let o=-1,s;for(;++o<=r.length;)s===void 0?r[o]&&r[o][1].type==="data"&&(s=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==s+2&&(r[s][1].end=r[o-1][1].end,r.splice(s+2,o-s-2),o=s+2),s=void 0);return t?t(r,u):r}}function E2(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const u=t[r-1][1],o=i.sliceStream(u);let s=o.length,f=-1,h=0,g;for(;s--;){const m=o[s];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)h++,f--;if(f)break;f=-1}else if(m===-2)g=!0,h++;else if(m!==-1){s++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(h=0),h){const m={type:r===t.length||g||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?f:u.start._bufferIndex+f,_index:u.start._index+s,line:u.end.line,column:u.end.column-h,offset:u.end.offset-h},end:{...u.end}};u.end={...m.start},u.start.offset===u.end.offset?Object.assign(u,m):(t.splice(r,0,["enter",m,i],["exit",m,i]),r+=2)}r++}return t}const C2={42:Ft,43:Ft,45:Ft,48:Ft,49:Ft,50:Ft,51:Ft,52:Ft,53:Ft,54:Ft,55:Ft,56:Ft,57:Ft,62:Fx},T2={91:RS},A2={[-2]:wc,[-1]:wc,32:wc},z2={35:BS,42:Ru,45:[xg,Ru],60:VS,61:xg,95:Ru,96:mg,126:mg},D2={38:Xx,92:$x},R2={[-5]:jc,[-4]:jc,[-3]:jc,33:u2,38:Xx,42:af,60:[oS,KS],91:o2,92:[US,$x],93:Af,95:af,96:kS},M2={null:[af,j2]},O2={null:[42,95]},L2={null:[]},U2=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:O2,contentInitial:T2,disable:L2,document:C2,flow:z2,flowInitial:A2,insideSpan:M2,string:D2,text:R2},Symbol.toStringTag,{value:"Module"}));function q2(t,i,r){let u={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},s=[];let f=[],h=[];const g={attempt:H(ne),check:H(D),consume:G,enter:U,exit:Z,interrupt:H(D,{interrupt:!0})},m={code:null,containerState:{},defineSkip:C,events:[],now:N,parser:t,previous:null,sliceSerialize:S,sliceStream:v,write:x};let y=i.tokenize.call(m,g);return i.resolveAll&&s.push(i),m;function x(ae){return f=xn(f,ae),M(),f[f.length-1]!==null?[]:(le(i,0),m.events=$u(s,m.events,m),m.events)}function S(ae,ee){return H2(v(ae),ee)}function v(ae){return B2(f,ae)}function N(){const{_bufferIndex:ae,_index:ee,line:xe,column:oe,offset:J}=u;return{_bufferIndex:ae,_index:ee,line:xe,column:oe,offset:J}}function C(ae){o[ae.line]=ae.column,O()}function M(){let ae;for(;u._index<f.length;){const ee=f[u._index];if(typeof ee=="string")for(ae=u._index,u._bufferIndex<0&&(u._bufferIndex=0);u._index===ae&&u._bufferIndex<ee.length;)_(ee.charCodeAt(u._bufferIndex));else _(ee)}}function _(ae){y=y(ae)}function G(ae){Se(ae)?(u.line++,u.column=1,u.offset+=ae===-3?2:1,O()):ae!==-1&&(u.column++,u.offset++),u._bufferIndex<0?u._index++:(u._bufferIndex++,u._bufferIndex===f[u._index].length&&(u._bufferIndex=-1,u._index++)),m.previous=ae}function U(ae,ee){const xe=ee||{};return xe.type=ae,xe.start=N(),m.events.push(["enter",xe,m]),h.push(xe),xe}function Z(ae){const ee=h.pop();return ee.end=N(),m.events.push(["exit",ee,m]),ee}function ne(ae,ee){le(ae,ee.from)}function D(ae,ee){ee.restore()}function H(ae,ee){return xe;function xe(oe,J,L){let P,fe,ce,E;return Array.isArray(oe)?V(oe):"tokenize"in oe?V([oe]):T(oe);function T(de){return je;function je(qe){const se=qe!==null&&de[qe],pe=qe!==null&&de.null,Ge=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return V(Ge)(qe)}}function V(de){return P=de,fe=0,de.length===0?L:j(de[fe])}function j(de){return je;function je(qe){return E=W(),ce=de,de.partial||(m.currentConstruct=de),de.name&&m.parser.constructs.disable.null.includes(de.name)?me():de.tokenize.call(ee?Object.assign(Object.create(m),ee):m,g,re,me)(qe)}}function re(de){return ae(ce,E),J}function me(de){return E.restore(),++fe<P.length?j(P[fe]):L}}}function le(ae,ee){ae.resolveAll&&!s.includes(ae)&&s.push(ae),ae.resolve&&nn(m.events,ee,m.events.length-ee,ae.resolve(m.events.slice(ee),m)),ae.resolveTo&&(m.events=ae.resolveTo(m.events,m))}function W(){const ae=N(),ee=m.previous,xe=m.currentConstruct,oe=m.events.length,J=Array.from(h);return{from:oe,restore:L};function L(){u=ae,m.previous=ee,m.currentConstruct=xe,m.events.length=oe,h=J,O()}}function O(){u.line in o&&u.column<2&&(u.column=o[u.line],u.offset+=o[u.line]-1)}}function B2(t,i){const r=i.start._index,u=i.start._bufferIndex,o=i.end._index,s=i.end._bufferIndex;let f;if(r===o)f=[t[r].slice(u,s)];else{if(f=t.slice(r,o),u>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(u):f.shift()}s>0&&f.push(t[o].slice(0,s))}return f}function H2(t,i){let r=-1;const u=[];let o;for(;++r<t.length;){const s=t[r];let f;if(typeof s=="string")f=s;else switch(s){case-5:{f="\r";break}case-4:{f=`
51
+ `;break}case-3:{f=`\r
52
+ `;break}case-2:{f=i?" ":" ";break}case-1:{if(!i&&o)continue;f=" ";break}default:f=String.fromCharCode(s)}o=s===-2,u.push(f)}return u.join("")}function I2(t){const u={constructs:Vx([U2,...(t||{}).extensions||[]]),content:o(nS),defined:[],document:o(iS),flow:o(k2),lazy:{},string:o(N2),text:o(_2)};return u;function o(s){return f;function f(h){return q2(u,s,h)}}}function Y2(t){for(;!Qx(t););return t}const yg=/[\0\t\n\r]/g;function V2(){let t=1,i="",r=!0,u;return o;function o(s,f,h){const g=[];let m,y,x,S,v;for(s=i+(typeof s=="string"?s.toString():new TextDecoder(f||void 0).decode(s)),x=0,i="",r&&(s.charCodeAt(0)===65279&&x++,r=void 0);x<s.length;){if(yg.lastIndex=x,m=yg.exec(s),S=m&&m.index!==void 0?m.index:s.length,v=s.charCodeAt(S),!m){i=s.slice(x);break}if(v===10&&x===S&&u)g.push(-3),u=void 0;else switch(u&&(g.push(-5),u=void 0),x<S&&(g.push(s.slice(x,S)),t+=S-x),v){case 0:{g.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,g.push(-2);t++<y;)g.push(-1);break}case 10:{g.push(-4),t=1;break}default:u=!0,t=1}x=S+1}return h&&(u&&g.push(-5),i&&g.push(i),g.push(null)),g}}const G2=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function F2(t){return t.replace(G2,$2)}function $2(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),s=o===120||o===88;return Gx(r.slice(s?2:1),s?16:10)}return Tf(r)||t}const ey={}.hasOwnProperty;function X2(t,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),Q2(r)(Y2(I2(r).document().write(V2()(t,i,!0))))}function Q2(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(vn),autolinkProtocol:W,autolinkEmail:W,atxHeading:s(bn),blockQuote:s(pe),characterEscape:W,characterReference:W,codeFenced:s(Ge),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:s(Ge,f),codeText:s(Xt,f),codeTextData:W,data:W,codeFlowValue:W,definition:s(yn),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:s(Mt),hardBreakEscape:s(ln),hardBreakTrailing:s(ln),htmlFlow:s(ul,f),htmlFlowData:W,htmlText:s(ul,f),htmlTextData:W,image:s(Ln),label:f,link:s(vn),listItem:s(Un),listItemValue:S,listOrdered:s(Sn,x),listUnordered:s(Sn),paragraph:s(te),reference:j,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:s(bn),strong:s(De),thematicBreak:s(kn)},exit:{atxHeading:g(),atxHeadingSequence:ne,autolink:g(),autolinkEmail:se,autolinkProtocol:qe,blockQuote:g(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:de,characterReference:je,codeFenced:g(M),codeFencedFence:C,codeFencedFenceInfo:v,codeFencedFenceMeta:N,codeFlowValue:O,codeIndented:g(_),codeText:g(J),codeTextData:O,data:O,definition:g(),definitionDestinationString:Z,definitionLabelString:G,definitionTitleString:U,emphasis:g(),hardBreakEscape:g(ee),hardBreakTrailing:g(ee),htmlFlow:g(xe),htmlFlowData:O,htmlText:g(oe),htmlTextData:O,image:g(P),label:ce,labelText:fe,lineEnding:ae,link:g(L),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:re,resourceDestinationString:E,resourceTitleString:T,resource:V,setextHeading:g(le),setextHeadingLineSequence:H,setextHeadingText:D,strong:g(),thematicBreak:g()}};ty(i,(t||{}).mdastExtensions||[]);const r={};return u;function u(F){let ue={type:"root",children:[]};const be={stack:[ue],tokenStack:[],config:i,enter:h,exit:m,buffer:f,resume:y,data:r},Ae=[];let Ve=-1;for(;++Ve<F.length;)if(F[Ve][1].type==="listOrdered"||F[Ve][1].type==="listUnordered")if(F[Ve][0]==="enter")Ae.push(Ve);else{const st=Ae.pop();Ve=o(F,st,Ve)}for(Ve=-1;++Ve<F.length;){const st=i[F[Ve][0]];ey.call(st,F[Ve][1].type)&&st[F[Ve][1].type].call(Object.assign({sliceSerialize:F[Ve][2].sliceSerialize},be),F[Ve][1])}if(be.tokenStack.length>0){const st=be.tokenStack[be.tokenStack.length-1];(st[1]||bg).call(be,void 0,st[0])}for(ue.position={start:Ol(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Ol(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<i.transforms.length;)ue=i.transforms[Ve](ue)||ue;return ue}function o(F,ue,be){let Ae=ue-1,Ve=-1,st=!1,rn,kt,at,Nt;for(;++Ae<=be;){const Qe=F[Ae];switch(Qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Qe[0]==="enter"?Ve++:Ve--,Nt=void 0;break}case"lineEndingBlank":{Qe[0]==="enter"&&(rn&&!Nt&&!Ve&&!at&&(at=Ae),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!Ve&&Qe[0]==="enter"&&Qe[1].type==="listItemPrefix"||Ve===-1&&Qe[0]==="exit"&&(Qe[1].type==="listUnordered"||Qe[1].type==="listOrdered")){if(rn){let wn=Ae;for(kt=void 0;wn--;){const Ut=F[wn];if(Ut[1].type==="lineEnding"||Ut[1].type==="lineEndingBlank"){if(Ut[0]==="exit")continue;kt&&(F[kt][1].type="lineEndingBlank",st=!0),Ut[1].type="lineEnding",kt=wn}else if(!(Ut[1].type==="linePrefix"||Ut[1].type==="blockQuotePrefix"||Ut[1].type==="blockQuotePrefixWhitespace"||Ut[1].type==="blockQuoteMarker"||Ut[1].type==="listItemIndent"))break}at&&(!kt||at<kt)&&(rn._spread=!0),rn.end=Object.assign({},kt?F[kt][1].start:Qe[1].end),F.splice(kt||Ae,0,["exit",rn,Qe[2]]),Ae++,be++}if(Qe[1].type==="listItemPrefix"){const wn={type:"listItem",_spread:!1,start:Object.assign({},Qe[1].start),end:void 0};rn=wn,F.splice(Ae,0,["enter",wn,Qe[2]]),Ae++,be++,at=void 0,Nt=!0}}}return F[ue][1]._spread=st,be}function s(F,ue){return be;function be(Ae){h.call(this,F(Ae),Ae),ue&&ue.call(this,Ae)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(F,ue,be){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([ue,be||void 0]),F.position={start:Ol(ue.start),end:void 0}}function g(F){return ue;function ue(be){F&&F.call(this,be),m.call(this,be)}}function m(F,ue){const be=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==F.type&&(ue?ue.call(this,F,Ae[0]):(Ae[1]||bg).call(this,F,Ae[0]));else throw new Error("Cannot close `"+F.type+"` ("+na({start:F.start,end:F.end})+"): it’s not open");be.position.end=Ol(F.end)}function y(){return Cf(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function S(F){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function v(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=F}function N(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=F}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function M(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.value=F.replace(/(\r?\n|\r)$/g,"")}function G(F){const ue=this.resume(),be=this.stack[this.stack.length-1];be.label=ue,be.identifier=Cn(this.sliceSerialize(F)).toLowerCase()}function U(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.title=F}function Z(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.url=F}function ne(F){const ue=this.stack[this.stack.length-1];if(!ue.depth){const be=this.sliceSerialize(F).length;ue.depth=be}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function H(F){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function le(){this.data.setextHeadingSlurpLineEnding=void 0}function W(F){const be=this.stack[this.stack.length-1].children;let Ae=be[be.length-1];(!Ae||Ae.type!=="text")&&(Ae=Ie(),Ae.position={start:Ol(F.start),end:void 0},be.push(Ae)),this.stack.push(Ae)}function O(F){const ue=this.stack.pop();ue.value+=this.sliceSerialize(F),ue.position.end=Ol(F.end)}function ae(F){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ue.children[ue.children.length-1];be.position.end=Ol(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ue.type)&&(W.call(this,F),O.call(this,F))}function ee(){this.data.atHardBreak=!0}function xe(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.value=F}function oe(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.value=F}function J(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.value=F}function L(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ue,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function P(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ue,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function fe(F){const ue=this.sliceSerialize(F),be=this.stack[this.stack.length-2];be.label=F2(ue),be.identifier=Cn(ue).toLowerCase()}function ce(){const F=this.stack[this.stack.length-1],ue=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Ae=F.children;be.children=Ae}else be.alt=ue}function E(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.url=F}function T(){const F=this.resume(),ue=this.stack[this.stack.length-1];ue.title=F}function V(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function re(F){const ue=this.resume(),be=this.stack[this.stack.length-1];be.label=ue,be.identifier=Cn(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function me(F){this.data.characterReferenceType=F.type}function de(F){const ue=this.sliceSerialize(F),be=this.data.characterReferenceType;let Ae;be?(Ae=Gx(ue,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=Tf(ue);const Ve=this.stack[this.stack.length-1];Ve.value+=Ae}function je(F){const ue=this.stack.pop();ue.position.end=Ol(F.end)}function qe(F){O.call(this,F);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(F)}function se(F){O.call(this,F);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(F)}function pe(){return{type:"blockquote",children:[]}}function Ge(){return{type:"code",lang:null,meta:null,value:""}}function Xt(){return{type:"inlineCode",value:""}}function yn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Mt(){return{type:"emphasis",children:[]}}function bn(){return{type:"heading",depth:0,children:[]}}function ln(){return{type:"break"}}function ul(){return{type:"html",value:""}}function Ln(){return{type:"image",title:null,url:"",alt:null}}function vn(){return{type:"link",title:null,url:"",children:[]}}function Sn(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function Un(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function te(){return{type:"paragraph",children:[]}}function De(){return{type:"strong",children:[]}}function Ie(){return{type:"text",value:""}}function kn(){return{type:"thematicBreak"}}}function Ol(t){return{line:t.line,column:t.column,offset:t.offset}}function ty(t,i){let r=-1;for(;++r<i.length;){const u=i[r];Array.isArray(u)?ty(t,u):Z2(t,u)}}function Z2(t,i){let r;for(r in i)if(ey.call(i,r))switch(r){case"canContainEols":{const u=i[r];u&&t[r].push(...u);break}case"transforms":{const u=i[r];u&&t[r].push(...u);break}case"enter":case"exit":{const u=i[r];u&&Object.assign(t[r],u);break}}}function bg(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+na({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+na({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+na({start:i.start,end:i.end})+") is still open")}function K2(t){const i=this;i.parser=r;function r(u){return X2(u,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function J2(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function P2(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
53
+ `}]}function W2(t,i){const r=i.value?i.value+`
54
+ `:"",u={},o=i.lang?i.lang.split(/\s+/):[];o.length>0&&(u.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:u,children:[{type:"text",value:r}]};return i.meta&&(s.data={meta:i.meta}),t.patch(i,s),s=t.applyData(i,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(i,s),s}function ek(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function tk(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function nk(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",u=String(i.identifier).toUpperCase(),o=tr(u.toLowerCase()),s=t.footnoteOrder.indexOf(u);let f,h=t.footnoteCounts.get(u);h===void 0?(h=0,t.footnoteOrder.push(u),f=t.footnoteOrder.length):f=s+1,h+=1,t.footnoteCounts.set(u,h);const g={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};t.patch(i,g);const m={type:"element",tagName:"sup",properties:{},children:[g]};return t.patch(i,m),t.applyData(i,m)}function lk(t,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function ik(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function ny(t,i){const r=i.referenceType;let u="]";if(r==="collapsed"?u+="[]":r==="full"&&(u+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+u}];const o=t.all(i),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const f=o[o.length-1];return f&&f.type==="text"?f.value+=u:o.push({type:"text",value:u}),o}function rk(t,i){const r=String(i.identifier).toUpperCase(),u=t.definitionById.get(r);if(!u)return ny(t,i);const o={src:tr(u.url||""),alt:i.alt};u.title!==null&&u.title!==void 0&&(o.title=u.title);const s={type:"element",tagName:"img",properties:o,children:[]};return t.patch(i,s),t.applyData(i,s)}function ak(t,i){const r={src:tr(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"img",properties:r,children:[]};return t.patch(i,u),t.applyData(i,u)}function uk(t,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,r);const u={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(i,u),t.applyData(i,u)}function sk(t,i){const r=String(i.identifier).toUpperCase(),u=t.definitionById.get(r);if(!u)return ny(t,i);const o={href:tr(u.url||"")};u.title!==null&&u.title!==void 0&&(o.title=u.title);const s={type:"element",tagName:"a",properties:o,children:t.all(i)};return t.patch(i,s),t.applyData(i,s)}function ok(t,i){const r={href:tr(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"a",properties:r,children:t.all(i)};return t.patch(i,u),t.applyData(i,u)}function ck(t,i,r){const u=t.all(i),o=r?fk(r):ly(i),s={},f=[];if(typeof i.checked=="boolean"){const y=u[0];let x;y&&y.type==="element"&&y.tagName==="p"?x=y:(x={type:"element",tagName:"p",properties:{},children:[]},u.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let h=-1;for(;++h<u.length;){const y=u[h];(o||h!==0||y.type!=="element"||y.tagName!=="p")&&f.push({type:"text",value:`
55
+ `}),y.type==="element"&&y.tagName==="p"&&!o?f.push(...y.children):f.push(y)}const g=u[u.length-1];g&&(o||g.type!=="element"||g.tagName!=="p")&&f.push({type:"text",value:`
56
+ `});const m={type:"element",tagName:"li",properties:s,children:f};return t.patch(i,m),t.applyData(i,m)}function fk(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const r=t.children;let u=-1;for(;!i&&++u<r.length;)i=ly(r[u])}return i}function ly(t){const i=t.spread;return i??t.children.length>1}function dk(t,i){const r={},u=t.all(i);let o=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++o<u.length;){const f=u[o];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:t.wrap(u,!0)};return t.patch(i,s),t.applyData(i,s)}function pk(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function hk(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function mk(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function gk(t,i){const r=t.all(i),u=r.shift(),o=[];if(u){const f={type:"element",tagName:"thead",properties:{},children:t.wrap([u],!0)};t.patch(i.children[0],f),o.push(f)}if(r.length>0){const f={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},h=jf(i.children[1]),g=Lx(i.children[i.children.length-1]);h&&g&&(f.position={start:h,end:g}),o.push(f)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(i,s),t.applyData(i,s)}function xk(t,i,r){const u=r?r.children:void 0,s=(u?u.indexOf(i):1)===0?"th":"td",f=r&&r.type==="table"?r.align:void 0,h=f?f.length:i.children.length;let g=-1;const m=[];for(;++g<h;){const x=i.children[g],S={},v=f?f[g]:void 0;v&&(S.align=v);let N={type:"element",tagName:s,properties:S,children:[]};x&&(N.children=t.all(x),t.patch(x,N),N=t.applyData(x,N)),m.push(N)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(i,y),t.applyData(i,y)}function yk(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const vg=9,Sg=32;function bk(t){const i=String(t),r=/\r?\n|\r/g;let u=r.exec(i),o=0;const s=[];for(;u;)s.push(kg(i.slice(o,u.index),o>0,!0),u[0]),o=u.index+u[0].length,u=r.exec(i);return s.push(kg(i.slice(o),o>0,!1)),s.join("")}function kg(t,i,r){let u=0,o=t.length;if(i){let s=t.codePointAt(u);for(;s===vg||s===Sg;)u++,s=t.codePointAt(u)}if(r){let s=t.codePointAt(o-1);for(;s===vg||s===Sg;)o--,s=t.codePointAt(o-1)}return o>u?t.slice(u,o):""}function vk(t,i){const r={type:"text",value:bk(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function Sk(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const kk={blockquote:J2,break:P2,code:W2,delete:ek,emphasis:tk,footnoteReference:nk,heading:lk,html:ik,imageReference:rk,image:ak,inlineCode:uk,linkReference:sk,link:ok,listItem:ck,list:dk,paragraph:pk,root:hk,strong:mk,table:gk,tableCell:yk,tableRow:xk,text:vk,thematicBreak:Sk,toml:_u,yaml:_u,definition:_u,footnoteDefinition:_u};function _u(){}const iy=-1,Xu=0,ia=1,qu=2,zf=3,Df=4,Rf=5,Mf=6,ry=7,ay=8,wk=typeof self=="object"?self:globalThis,wg=(t,i)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new wk[t](i)},jk=(t,i)=>{const r=(o,s)=>(t.set(s,o),o),u=o=>{if(t.has(o))return t.get(o);const[s,f]=i[o];switch(s){case Xu:case iy:return r(f,o);case ia:{const h=r([],o);for(const g of f)h.push(u(g));return h}case qu:{const h=r({},o);for(const[g,m]of f)h[u(g)]=u(m);return h}case zf:return r(new Date(f),o);case Df:{const{source:h,flags:g}=f;return r(new RegExp(h,g),o)}case Rf:{const h=r(new Map,o);for(const[g,m]of f)h.set(u(g),u(m));return h}case Mf:{const h=r(new Set,o);for(const g of f)h.add(u(g));return h}case ry:{const{name:h,message:g}=f;return r(wg(h,g),o)}case ay:return r(BigInt(f),o);case"BigInt":return r(Object(BigInt(f)),o);case"ArrayBuffer":return r(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:h}=new Uint8Array(f);return r(new DataView(h),f)}}return r(wg(s,f),o)};return u},jg=t=>jk(new Map,t)(0),Ki="",{toString:Nk}={},{keys:_k}=Object,Pr=t=>{const i=typeof t;if(i!=="object"||!t)return[Xu,i];const r=Nk.call(t).slice(8,-1);switch(r){case"Array":return[ia,Ki];case"Object":return[qu,Ki];case"Date":return[zf,Ki];case"RegExp":return[Df,Ki];case"Map":return[Rf,Ki];case"Set":return[Mf,Ki];case"DataView":return[ia,r]}return r.includes("Array")?[ia,r]:r.includes("Error")?[ry,r]:[qu,r]},Eu=([t,i])=>t===Xu&&(i==="function"||i==="symbol"),Ek=(t,i,r,u)=>{const o=(f,h)=>{const g=u.push(f)-1;return r.set(h,g),g},s=f=>{if(r.has(f))return r.get(f);let[h,g]=Pr(f);switch(h){case Xu:{let y=f;switch(g){case"bigint":h=ay,y=f.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+g);y=null;break;case"undefined":return o([iy],f)}return o([h,y],f)}case ia:{if(g){let S=f;return g==="DataView"?S=new Uint8Array(f.buffer):g==="ArrayBuffer"&&(S=new Uint8Array(f)),o([g,[...S]],f)}const y=[],x=o([h,y],f);for(const S of f)y.push(s(S));return x}case qu:{if(g)switch(g){case"BigInt":return o([g,f.toString()],f);case"Boolean":case"Number":case"String":return o([g,f.valueOf()],f)}if(i&&"toJSON"in f)return s(f.toJSON());const y=[],x=o([h,y],f);for(const S of _k(f))(t||!Eu(Pr(f[S])))&&y.push([s(S),s(f[S])]);return x}case zf:return o([h,f.toISOString()],f);case Df:{const{source:y,flags:x}=f;return o([h,{source:y,flags:x}],f)}case Rf:{const y=[],x=o([h,y],f);for(const[S,v]of f)(t||!(Eu(Pr(S))||Eu(Pr(v))))&&y.push([s(S),s(v)]);return x}case Mf:{const y=[],x=o([h,y],f);for(const S of f)(t||!Eu(Pr(S)))&&y.push(s(S));return x}}const{message:m}=f;return o([h,{name:g,message:m}],f)};return s},Ng=(t,{json:i,lossy:r}={})=>{const u=[];return Ek(!(i||r),!!i,new Map,u)(t),u},Bu=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?jg(Ng(t,i)):structuredClone(t):(t,i)=>jg(Ng(t,i));function Ck(t,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function Tk(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function Ak(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||Ck,u=t.options.footnoteBackLabel||Tk,o=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",f=t.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let g=-1;for(;++g<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[g]);if(!m)continue;const y=t.all(m),x=String(m.identifier).toUpperCase(),S=tr(x.toLowerCase());let v=0;const N=[],C=t.footnoteCounts.get(x);for(;C!==void 0&&++v<=C;){N.length>0&&N.push({type:"text",value:" "});let G=typeof r=="string"?r:r(g,v);typeof G=="string"&&(G={type:"text",value:G}),N.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+S+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(g,v),className:["data-footnote-backref"]},children:Array.isArray(G)?G:[G]})}const M=y[y.length-1];if(M&&M.type==="element"&&M.tagName==="p"){const G=M.children[M.children.length-1];G&&G.type==="text"?G.value+=" ":M.children.push({type:"text",value:" "}),M.children.push(...N)}else y.push(...N);const _={type:"element",tagName:"li",properties:{id:i+"fn-"+S},children:t.wrap(y,!0)};t.patch(m,_),h.push(_)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Bu(f),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
57
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(h,!0)},{type:"text",value:`
58
+ `}]}}const Qu=(function(t){if(t==null)return Mk;if(typeof t=="function")return Zu(t);if(typeof t=="object")return Array.isArray(t)?zk(t):Dk(t);if(typeof t=="string")return Rk(t);throw new Error("Expected function, string, or object as test")});function zk(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=Qu(t[r]);return Zu(u);function u(...o){let s=-1;for(;++s<i.length;)if(i[s].apply(this,o))return!0;return!1}}function Dk(t){const i=t;return Zu(r);function r(u){const o=u;let s;for(s in t)if(o[s]!==i[s])return!1;return!0}}function Rk(t){return Zu(i);function i(r){return r&&r.type===t}}function Zu(t){return i;function i(r,u,o){return!!(Ok(r)&&t.call(this,r,typeof u=="number"?u:void 0,o||void 0))}}function Mk(){return!0}function Ok(t){return t!==null&&typeof t=="object"&&"type"in t}const uy=[],Lk=!0,uf=!1,Uk="skip";function sy(t,i,r,u){let o;typeof i=="function"&&typeof r!="function"?(u=r,r=i):o=i;const s=Qu(o),f=u?-1:1;h(t,void 0,[])();function h(g,m,y){const x=g&&typeof g=="object"?g:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(g.type+(v?"<"+v+">":""))+")"})}return S;function S(){let v=uy,N,C,M;if((!i||s(g,m,y[y.length-1]||void 0))&&(v=qk(r(g,y)),v[0]===uf))return v;if("children"in g&&g.children){const _=g;if(_.children&&v[0]!==Uk)for(C=(u?_.children.length:-1)+f,M=y.concat(_);C>-1&&C<_.children.length;){const G=_.children[C];if(N=h(G,C,M)(),N[0]===uf)return N;C=typeof N[1]=="number"?N[1]:C+f}}return v}}}function qk(t){return Array.isArray(t)?t:typeof t=="number"?[Lk,t]:t==null?uy:[t]}function Of(t,i,r,u){let o,s,f;typeof i=="function"&&typeof r!="function"?(s=void 0,f=i,o=r):(s=i,f=r,o=u),sy(t,s,h,o);function h(g,m){const y=m[m.length-1],x=y?y.children.indexOf(g):void 0;return f(g,x,y)}}const sf={}.hasOwnProperty,Bk={};function Hk(t,i){const r=i||Bk,u=new Map,o=new Map,s=new Map,f={...kk,...r.handlers},h={all:m,applyData:Yk,definitionById:u,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:f,one:g,options:r,patch:Ik,wrap:Gk};return Of(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const x=y.type==="definition"?u:o,S=String(y.identifier).toUpperCase();x.has(S)||x.set(S,y)}}),h;function g(y,x){const S=y.type,v=h.handlers[S];if(sf.call(h.handlers,S)&&v)return v(h,y,x);if(h.options.passThrough&&h.options.passThrough.includes(S)){if("children"in y){const{children:C,...M}=y,_=Bu(M);return _.children=h.all(y),_}return Bu(y)}return(h.options.unknownHandler||Vk)(h,y,x)}function m(y){const x=[];if("children"in y){const S=y.children;let v=-1;for(;++v<S.length;){const N=h.one(S[v],y);if(N){if(v&&S[v-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=_g(N.value)),!Array.isArray(N)&&N.type==="element")){const C=N.children[0];C&&C.type==="text"&&(C.value=_g(C.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function Ik(t,i){t.position&&(i.position=Cv(t))}function Yk(t,i){let r=i;if(t&&t.data){const u=t.data.hName,o=t.data.hChildren,s=t.data.hProperties;if(typeof u=="string")if(r.type==="element")r.tagName=u;else{const f="children"in r?r.children:[r];r={type:"element",tagName:u,properties:{},children:f}}r.type==="element"&&s&&Object.assign(r.properties,Bu(s)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function Vk(t,i){const r=i.data||{},u="value"in i&&!(sf.call(r,"hProperties")||sf.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,u),t.applyData(i,u)}function Gk(t,i){const r=[];let u=-1;for(i&&r.push({type:"text",value:`
59
+ `});++u<t.length;)u&&r.push({type:"text",value:`
60
+ `}),r.push(t[u]);return i&&t.length>0&&r.push({type:"text",value:`
61
+ `}),r}function _g(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function Eg(t,i){const r=Hk(t,i),u=r.one(t,void 0),o=Ak(r),s=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
62
+ `},o),s}function Fk(t,i){return t&&"run"in t?async function(r,u){const o=Eg(r,{file:u,...i});await t.run(o,u)}:function(r,u){return Eg(r,{file:u,...t||i})}}function Cg(t){if(t)throw t}var Nc,Tg;function $k(){if(Tg)return Nc;Tg=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):i.call(m)==="[object Array]"},s=function(m){if(!m||i.call(m)!=="[object Object]")return!1;var y=t.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!x)return!1;var S;for(S in m);return typeof S>"u"||t.call(m,S)},f=function(m,y){r&&y.name==="__proto__"?r(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},h=function(m,y){if(y==="__proto__")if(t.call(m,y)){if(u)return u(m,y).value}else return;return m[y]};return Nc=function g(){var m,y,x,S,v,N,C=arguments[0],M=1,_=arguments.length,G=!1;for(typeof C=="boolean"&&(G=C,C=arguments[1]||{},M=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});M<_;++M)if(m=arguments[M],m!=null)for(y in m)x=h(C,y),S=h(m,y),C!==S&&(G&&S&&(s(S)||(v=o(S)))?(v?(v=!1,N=x&&o(x)?x:[]):N=x&&s(x)?x:{},f(C,{name:y,newValue:g(G,N,S)})):typeof S<"u"&&f(C,{name:y,newValue:S}));return C},Nc}var Xk=$k();const _c=Vu(Xk);function of(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Qk(){const t=[],i={run:r,use:u};return i;function r(...o){let s=-1;const f=o.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);h(null,...o);function h(g,...m){const y=t[++s];let x=-1;if(g){f(g);return}for(;++x<o.length;)(m[x]===null||m[x]===void 0)&&(m[x]=o[x]);o=m,y?Zk(y,h)(...m):f(null,...m)}}function u(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),i}}function Zk(t,i){let r;return u;function u(...f){const h=t.length>f.length;let g;h&&f.push(o);try{g=t.apply(this,f)}catch(m){const y=m;if(h&&r)throw y;return o(y)}h||(g&&g.then&&typeof g.then=="function"?g.then(s,o):g instanceof Error?o(g):s(g))}function o(f,...h){r||(r=!0,i(f,...h))}function s(f){o(null,f)}}const Rn={basename:Kk,dirname:Jk,extname:Pk,join:Wk,sep:"/"};function Kk(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');oa(t);let r=0,u=-1,o=t.length,s;if(i===void 0||i.length===0||i.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(s){r=o+1;break}}else u<0&&(s=!0,u=o+1);return u<0?"":t.slice(r,u)}if(i===t)return"";let f=-1,h=i.length-1;for(;o--;)if(t.codePointAt(o)===47){if(s){r=o+1;break}}else f<0&&(s=!0,f=o+1),h>-1&&(t.codePointAt(o)===i.codePointAt(h--)?h<0&&(u=o):(h=-1,u=f));return r===u?u=f:u<0&&(u=t.length),t.slice(r,u)}function Jk(t){if(oa(t),t.length===0)return".";let i=-1,r=t.length,u;for(;--r;)if(t.codePointAt(r)===47){if(u){i=r;break}}else u||(u=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function Pk(t){oa(t);let i=t.length,r=-1,u=0,o=-1,s=0,f;for(;i--;){const h=t.codePointAt(i);if(h===47){if(f){u=i+1;break}continue}r<0&&(f=!0,r=i+1),h===46?o<0?o=i:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||r<0||s===0||s===1&&o===r-1&&o===u+1?"":t.slice(o,r)}function Wk(...t){let i=-1,r;for(;++i<t.length;)oa(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":ew(r)}function ew(t){oa(t);const i=t.codePointAt(0)===47;let r=tw(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function tw(t,i){let r="",u=0,o=-1,s=0,f=-1,h,g;for(;++f<=t.length;){if(f<t.length)h=t.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(o===f-1||s===1))if(o!==f-1&&s===2){if(r.length<2||u!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(g=r.lastIndexOf("/"),g!==r.length-1){g<0?(r="",u=0):(r=r.slice(0,g),u=r.length-1-r.lastIndexOf("/")),o=f,s=0;continue}}else if(r.length>0){r="",u=0,o=f,s=0;continue}}i&&(r=r.length>0?r+"/..":"..",u=2)}else r.length>0?r+="/"+t.slice(o+1,f):r=t.slice(o+1,f),u=f-o-1;o=f,s=0}else h===46&&s>-1?s++:s=-1}return r}function oa(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const nw={cwd:lw};function lw(){return"/"}function cf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function iw(t){if(typeof t=="string")t=new URL(t);else if(!cf(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return rw(t)}function rw(t){if(t.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const u=i.codePointAt(r+2);if(u===70||u===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(i)}const Ec=["history","path","basename","stem","extname","dirname"];class oy{constructor(i){let r;i?cf(i)?r={path:i}:typeof i=="string"||aw(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":nw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let u=-1;for(;++u<Ec.length;){const s=Ec[u];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let o;for(o in r)Ec.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?Rn.basename(this.path):void 0}set basename(i){Tc(i,"basename"),Cc(i,"basename"),this.path=Rn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Rn.dirname(this.path):void 0}set dirname(i){Ag(this.basename,"dirname"),this.path=Rn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Rn.extname(this.path):void 0}set extname(i){if(Cc(i,"extname"),Ag(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Rn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){cf(i)&&(i=iw(i)),Tc(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Rn.basename(this.path,this.extname):void 0}set stem(i){Tc(i,"stem"),Cc(i,"stem"),this.path=Rn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,u){const o=this.message(i,r,u);throw o.fatal=!0,o}info(i,r,u){const o=this.message(i,r,u);return o.fatal=void 0,o}message(i,r,u){const o=new Rt(i,r,u);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function Cc(t,i){if(t&&t.includes(Rn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Rn.sep+"`")}function Tc(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function Ag(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function aw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const uw=(function(t){const u=this.constructor.prototype,o=u[t],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,u),s}),sw={}.hasOwnProperty;class Lf extends uw{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=Qk()}copy(){const i=new Lf;let r=-1;for(;++r<this.attachers.length;){const u=this.attachers[r];i.use(...u)}return i.data(_c(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(Dc("data",this.frozen),this.namespace[i]=r,this):sw.call(this.namespace,i)&&this.namespace[i]||void 0:i?(Dc("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...u]=this.attachers[this.freezeIndex];if(u[0]===!1)continue;u[0]===!0&&(u[0]=void 0);const o=r.call(i,...u);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=Cu(i),u=this.parser||this.Parser;return Ac("parse",u),u(String(r),r)}process(i,r){const u=this;return this.freeze(),Ac("process",this.parser||this.Parser),zc("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(s,f){const h=Cu(i),g=u.parse(h);u.run(g,h,function(y,x,S){if(y||!x||!S)return m(y);const v=x,N=u.stringify(v,S);fw(N)?S.value=N:S.result=N,m(y,S)});function m(y,x){y||!x?f(y):s?s(x):r(void 0,x)}}}processSync(i){let r=!1,u;return this.freeze(),Ac("processSync",this.parser||this.Parser),zc("processSync",this.compiler||this.Compiler),this.process(i,o),Dg("processSync","process",r),u;function o(s,f){r=!0,Cg(s),u=f}}run(i,r,u){zg(i),this.freeze();const o=this.transformers;return!u&&typeof r=="function"&&(u=r,r=void 0),u?s(void 0,u):new Promise(s);function s(f,h){const g=Cu(r);o.run(i,g,m);function m(y,x,S){const v=x||i;y?h(y):f?f(v):u(void 0,v,S)}}}runSync(i,r){let u=!1,o;return this.run(i,r,s),Dg("runSync","run",u),o;function s(f,h){Cg(f),o=h,u=!0}}stringify(i,r){this.freeze();const u=Cu(r),o=this.compiler||this.Compiler;return zc("stringify",o),zg(i),o(i,u)}use(i,...r){const u=this.attachers,o=this.namespace;if(Dc("use",this.frozen),i!=null)if(typeof i=="function")g(i,r);else if(typeof i=="object")Array.isArray(i)?h(i):f(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function s(m){if(typeof m=="function")g(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[y,...x]=m;g(y,x)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(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");h(m.plugins),m.settings&&(o.settings=_c(!0,o.settings,m.settings))}function h(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const x=m[y];s(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function g(m,y){let x=-1,S=-1;for(;++x<u.length;)if(u[x][0]===m){S=x;break}if(S===-1)u.push([m,...y]);else if(y.length>0){let[v,...N]=y;const C=u[S][1];of(C)&&of(v)&&(v=_c(!0,C,v)),u[S]=[m,v,...N]}}}}const ow=new Lf().freeze();function Ac(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function zc(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Dc(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zg(t){if(!of(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Dg(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function Cu(t){return cw(t)?t:new oy(t)}function cw(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function fw(t){return typeof t=="string"||dw(t)}function dw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const pw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Rg=[],Mg={allowDangerousHtml:!0},hw=/^(https?|ircs?|mailto|xmpp)$/i,mw=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function gw(t){const i=xw(t),r=yw(t);return bw(i.runSync(i.parse(r),r),t)}function xw(t){const i=t.rehypePlugins||Rg,r=t.remarkPlugins||Rg,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Mg}:Mg;return ow().use(K2).use(r).use(Fk,u).use(i)}function yw(t){const i=t.children||"",r=new oy;return typeof i=="string"&&(r.value=i),r}function bw(t,i){const r=i.allowedElements,u=i.allowElement,o=i.components,s=i.disallowedElements,f=i.skipHtml,h=i.unwrapDisallowed,g=i.urlTransform||vw;for(const y of mw)Object.hasOwn(i,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+pw+y.id,void 0);return Of(t,m),Rv(t,{Fragment:d.Fragment,components:o,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function m(y,x,S){if(y.type==="raw"&&S&&typeof x=="number")return f?S.children.splice(x,1):S.children[x]={type:"text",value:y.value},x;if(y.type==="element"){let v;for(v in kc)if(Object.hasOwn(kc,v)&&Object.hasOwn(y.properties,v)){const N=y.properties[v],C=kc[v];(C===null||C.includes(y.tagName))&&(y.properties[v]=g(String(N||""),v,y))}}if(y.type==="element"){let v=r?!r.includes(y.tagName):s?s.includes(y.tagName):!1;if(!v&&u&&typeof x=="number"&&(v=!u(y,x,S)),v&&S&&typeof x=="number")return h&&y.children?S.children.splice(x,1,...y.children):S.children.splice(x,1),x}}}function vw(t){const i=t.indexOf(":"),r=t.indexOf("?"),u=t.indexOf("#"),o=t.indexOf("/");return i===-1||o!==-1&&i>o||r!==-1&&i>r||u!==-1&&i>u||hw.test(t.slice(0,i))?t:""}function Og(t,i){const r=String(t);if(typeof i!="string")throw new TypeError("Expected character");let u=0,o=r.indexOf(i);for(;o!==-1;)u++,o=r.indexOf(i,o+i.length);return u}function Sw(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function kw(t,i,r){const o=Qu((r||{}).ignore||[]),s=ww(i);let f=-1;for(;++f<s.length;)sy(t,"text",h);function h(m,y){let x=-1,S;for(;++x<y.length;){const v=y[x],N=S?S.children:void 0;if(o(v,N?N.indexOf(v):void 0,S))return;S=v}if(S)return g(m,y)}function g(m,y){const x=y[y.length-1],S=s[f][0],v=s[f][1];let N=0;const M=x.children.indexOf(m);let _=!1,G=[];S.lastIndex=0;let U=S.exec(m.value);for(;U;){const Z=U.index,ne={index:U.index,input:U.input,stack:[...y,m]};let D=v(...U,ne);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?S.lastIndex=Z+1:(N!==Z&&G.push({type:"text",value:m.value.slice(N,Z)}),Array.isArray(D)?G.push(...D):D&&G.push(D),N=Z+U[0].length,_=!0),!S.global)break;U=S.exec(m.value)}return _?(N<m.value.length&&G.push({type:"text",value:m.value.slice(N)}),x.children.splice(M,1,...G)):G=[m],M+G.length}}function ww(t){const i=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let u=-1;for(;++u<r.length;){const o=r[u];i.push([jw(o[0]),Nw(o[1])])}return i}function jw(t){return typeof t=="string"?new RegExp(Sw(t),"g"):t}function Nw(t){return typeof t=="function"?t:function(){return t}}const Rc="phrasing",Mc=["autolink","link","image","label"];function _w(){return{transforms:[Rw],enter:{literalAutolink:Cw,literalAutolinkEmail:Oc,literalAutolinkHttp:Oc,literalAutolinkWww:Oc},exit:{literalAutolink:Dw,literalAutolinkEmail:zw,literalAutolinkHttp:Tw,literalAutolinkWww:Aw}}}function Ew(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Rc,notInConstruct:Mc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Rc,notInConstruct:Mc},{character:":",before:"[ps]",after:"\\/",inConstruct:Rc,notInConstruct:Mc}]}}function Cw(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Oc(t){this.config.enter.autolinkProtocol.call(this,t)}function Tw(t){this.config.exit.autolinkProtocol.call(this,t)}function Aw(t){this.config.exit.data.call(this,t);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(t)}function zw(t){this.config.exit.autolinkEmail.call(this,t)}function Dw(t){this.exit(t)}function Rw(t){kw(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Mw],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ow]],{ignore:["link","linkReference"]})}function Mw(t,i,r,u,o){let s="";if(!cy(o)||(/^w/i.test(i)&&(r=i+r,i="",s="http://"),!Lw(r)))return!1;const f=Uw(r+u);if(!f[0])return!1;const h={type:"link",title:null,url:s+i+f[0],children:[{type:"text",value:i+f[0]}]};return f[1]?[h,{type:"text",value:f[1]}]:h}function Ow(t,i,r,u){return!cy(u,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function Lw(t){const i=t.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function Uw(t){const i=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!i)return[t,void 0];t=t.slice(0,i.index);let r=i[0],u=r.indexOf(")");const o=Og(t,"(");let s=Og(t,")");for(;u!==-1&&o>s;)t+=r.slice(0,u+1),r=r.slice(u+1),u=r.indexOf(")"),s++;return[t,r]}function cy(t,i){const r=t.input.charCodeAt(t.index-1);return(t.index===0||ui(r)||Fu(r))&&(!i||r!==47)}fy.peek=$w;function qw(){this.buffer()}function Bw(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Hw(){this.buffer()}function Iw(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Yw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Cn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function Vw(t){this.exit(t)}function Gw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Cn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function Fw(t){this.exit(t)}function $w(){return"["}function fy(t,i,r,u){const o=r.createTracker(u);let s=o.move("[^");const f=r.enter("footnoteReference"),h=r.enter("reference");return s+=o.move(r.safe(r.associationId(t),{after:"]",before:s})),h(),f(),s+=o.move("]"),s}function Xw(){return{enter:{gfmFootnoteCallString:qw,gfmFootnoteCall:Bw,gfmFootnoteDefinitionLabelString:Hw,gfmFootnoteDefinition:Iw},exit:{gfmFootnoteCallString:Yw,gfmFootnoteCall:Vw,gfmFootnoteDefinitionLabelString:Gw,gfmFootnoteDefinition:Fw}}}function Qw(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:fy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(u,o,s,f){const h=s.createTracker(f);let g=h.move("[^");const m=s.enter("footnoteDefinition"),y=s.enter("label");return g+=h.move(s.safe(s.associationId(u),{before:g,after:"]"})),y(),g+=h.move("]:"),u.children&&u.children.length>0&&(h.shift(4),g+=h.move((i?`
63
+ `:" ")+s.indentLines(s.containerFlow(u,h.current()),i?dy:Zw))),m(),g}}function Zw(t,i,r){return i===0?t:dy(t,i,r)}function dy(t,i,r){return(r?"":" ")+t}const Kw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];py.peek=tj;function Jw(){return{canContainEols:["delete"],enter:{strikethrough:Ww},exit:{strikethrough:ej}}}function Pw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Kw}],handlers:{delete:py}}}function Ww(t){this.enter({type:"delete",children:[]},t)}function ej(t){this.exit(t)}function py(t,i,r,u){const o=r.createTracker(u),s=r.enter("strikethrough");let f=o.move("~~");return f+=r.containerPhrasing(t,{...o.current(),before:f,after:"~"}),f+=o.move("~~"),s(),f}function tj(){return"~"}function nj(t){return t.length}function lj(t,i){const r=i||{},u=(r.align||[]).concat(),o=r.stringLength||nj,s=[],f=[],h=[],g=[];let m=0,y=-1;for(;++y<t.length;){const C=[],M=[];let _=-1;for(t[y].length>m&&(m=t[y].length);++_<t[y].length;){const G=ij(t[y][_]);if(r.alignDelimiters!==!1){const U=o(G);M[_]=U,(g[_]===void 0||U>g[_])&&(g[_]=U)}C.push(G)}f[y]=C,h[y]=M}let x=-1;if(typeof u=="object"&&"length"in u)for(;++x<m;)s[x]=Lg(u[x]);else{const C=Lg(u);for(;++x<m;)s[x]=C}x=-1;const S=[],v=[];for(;++x<m;){const C=s[x];let M="",_="";C===99?(M=":",_=":"):C===108?M=":":C===114&&(_=":");let G=r.alignDelimiters===!1?1:Math.max(1,g[x]-M.length-_.length);const U=M+"-".repeat(G)+_;r.alignDelimiters!==!1&&(G=M.length+G+_.length,G>g[x]&&(g[x]=G),v[x]=G),S[x]=U}f.splice(1,0,S),h.splice(1,0,v),y=-1;const N=[];for(;++y<f.length;){const C=f[y],M=h[y];x=-1;const _=[];for(;++x<m;){const G=C[x]||"";let U="",Z="";if(r.alignDelimiters!==!1){const ne=g[x]-(M[x]||0),D=s[x];D===114?U=" ".repeat(ne):D===99?ne%2?(U=" ".repeat(ne/2+.5),Z=" ".repeat(ne/2-.5)):(U=" ".repeat(ne/2),Z=U):Z=" ".repeat(ne)}r.delimiterStart!==!1&&!x&&_.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&G==="")&&(r.delimiterStart!==!1||x)&&_.push(" "),r.alignDelimiters!==!1&&_.push(U),_.push(G),r.alignDelimiters!==!1&&_.push(Z),r.padding!==!1&&_.push(" "),(r.delimiterEnd!==!1||x!==m-1)&&_.push("|")}N.push(r.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return N.join(`
64
+ `)}function ij(t){return t==null?"":String(t)}function Lg(t){const i=typeof t=="string"?t.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function rj(t,i,r,u){const o=r.enter("blockquote"),s=r.createTracker(u);s.move("> "),s.shift(2);const f=r.indentLines(r.containerFlow(t,s.current()),aj);return o(),f}function aj(t,i,r){return">"+(r?"":" ")+t}function uj(t,i){return Ug(t,i.inConstruct,!0)&&!Ug(t,i.notInConstruct,!1)}function Ug(t,i,r){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return r;let u=-1;for(;++u<i.length;)if(t.includes(i[u]))return!0;return!1}function qg(t,i,r,u){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
65
+ `&&uj(r.stack,r.unsafe[o]))return/[ \t]/.test(u.before)?"":" ";return`\\
66
+ `}function sj(t,i){const r=String(t);let u=r.indexOf(i),o=u,s=0,f=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;u!==-1;)u===o?++s>f&&(f=s):s=1,o=u+i.length,u=r.indexOf(i,o);return f}function oj(t,i){return!!(i.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function cj(t){const i=t.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function fj(t,i,r,u){const o=cj(r),s=t.value||"",f=o==="`"?"GraveAccent":"Tilde";if(oj(t,r)){const x=r.enter("codeIndented"),S=r.indentLines(s,dj);return x(),S}const h=r.createTracker(u),g=o.repeat(Math.max(sj(s,o)+1,3)),m=r.enter("codeFenced");let y=h.move(g);if(t.lang){const x=r.enter(`codeFencedLang${f}`);y+=h.move(r.safe(t.lang,{before:y,after:" ",encode:["`"],...h.current()})),x()}if(t.lang&&t.meta){const x=r.enter(`codeFencedMeta${f}`);y+=h.move(" "),y+=h.move(r.safe(t.meta,{before:y,after:`
67
+ `,encode:["`"],...h.current()})),x()}return y+=h.move(`
68
+ `),s&&(y+=h.move(s+`
69
+ `)),y+=h.move(g),m(),y}function dj(t,i,r){return(r?"":" ")+t}function Uf(t){const i=t.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function pj(t,i,r,u){const o=Uf(r),s=o==='"'?"Quote":"Apostrophe",f=r.enter("definition");let h=r.enter("label");const g=r.createTracker(u);let m=g.move("[");return m+=g.move(r.safe(r.associationId(t),{before:m,after:"]",...g.current()})),m+=g.move("]: "),h(),!t.url||/[\0- \u007F]/.test(t.url)?(h=r.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(r.safe(t.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(h=r.enter("destinationRaw"),m+=g.move(r.safe(t.url,{before:m,after:t.title?" ":`
70
+ `,...g.current()}))),h(),t.title&&(h=r.enter(`title${s}`),m+=g.move(" "+o),m+=g.move(r.safe(t.title,{before:m,after:o,...g.current()})),m+=g.move(o),h()),f(),m}function hj(t){const i=t.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function aa(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Hu(t,i,r){const u=Wi(t),o=Wi(i);return u===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}hy.peek=mj;function hy(t,i,r,u){const o=hj(r),s=r.enter("emphasis"),f=r.createTracker(u),h=f.move(o);let g=f.move(r.containerPhrasing(t,{after:o,before:h,...f.current()}));const m=g.charCodeAt(0),y=Hu(u.before.charCodeAt(u.before.length-1),m,o);y.inside&&(g=aa(m)+g.slice(1));const x=g.charCodeAt(g.length-1),S=Hu(u.after.charCodeAt(0),x,o);S.inside&&(g=g.slice(0,-1)+aa(x));const v=f.move(o);return s(),r.attentionEncodeSurroundingInfo={after:S.outside,before:y.outside},h+g+v}function mj(t,i,r){return r.options.emphasis||"*"}function gj(t,i){let r=!1;return Of(t,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return r=!0,uf}),!!((!t.depth||t.depth<3)&&Cf(t)&&(i.options.setext||r))}function xj(t,i,r,u){const o=Math.max(Math.min(6,t.depth||1),1),s=r.createTracker(u);if(gj(t,r)){const y=r.enter("headingSetext"),x=r.enter("phrasing"),S=r.containerPhrasing(t,{...s.current(),before:`
71
+ `,after:`
72
+ `});return x(),y(),S+`
73
+ `+(o===1?"=":"-").repeat(S.length-(Math.max(S.lastIndexOf("\r"),S.lastIndexOf(`
74
+ `))+1))}const f="#".repeat(o),h=r.enter("headingAtx"),g=r.enter("phrasing");s.move(f+" ");let m=r.containerPhrasing(t,{before:"# ",after:`
75
+ `,...s.current()});return/^[\t ]/.test(m)&&(m=aa(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,r.options.closeAtx&&(m+=" "+f),g(),h(),m}my.peek=yj;function my(t){return t.value||""}function yj(){return"<"}gy.peek=bj;function gy(t,i,r,u){const o=Uf(r),s=o==='"'?"Quote":"Apostrophe",f=r.enter("image");let h=r.enter("label");const g=r.createTracker(u);let m=g.move("![");return m+=g.move(r.safe(t.alt,{before:m,after:"]",...g.current()})),m+=g.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=r.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(r.safe(t.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(h=r.enter("destinationRaw"),m+=g.move(r.safe(t.url,{before:m,after:t.title?" ":")",...g.current()}))),h(),t.title&&(h=r.enter(`title${s}`),m+=g.move(" "+o),m+=g.move(r.safe(t.title,{before:m,after:o,...g.current()})),m+=g.move(o),h()),m+=g.move(")"),f(),m}function bj(){return"!"}xy.peek=vj;function xy(t,i,r,u){const o=t.referenceType,s=r.enter("imageReference");let f=r.enter("label");const h=r.createTracker(u);let g=h.move("![");const m=r.safe(t.alt,{before:g,after:"]",...h.current()});g+=h.move(m+"]["),f();const y=r.stack;r.stack=[],f=r.enter("reference");const x=r.safe(r.associationId(t),{before:g,after:"]",...h.current()});return f(),r.stack=y,s(),o==="full"||!m||m!==x?g+=h.move(x+"]"):o==="shortcut"?g=g.slice(0,-1):g+=h.move("]"),g}function vj(){return"!"}yy.peek=Sj;function yy(t,i,r){let u=t.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(u);)o+="`";for(/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^`|`$/.test(u))&&(u=" "+u+" ");++s<r.unsafe.length;){const f=r.unsafe[s],h=r.compilePattern(f);let g;if(f.atBreak)for(;g=h.exec(u);){let m=g.index;u.charCodeAt(m)===10&&u.charCodeAt(m-1)===13&&m--,u=u.slice(0,m)+" "+u.slice(g.index+1)}}return o+u+o}function Sj(){return"`"}function by(t,i){const r=Cf(t);return!!(!i.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}vy.peek=kj;function vy(t,i,r,u){const o=Uf(r),s=o==='"'?"Quote":"Apostrophe",f=r.createTracker(u);let h,g;if(by(t,r)){const y=r.stack;r.stack=[],h=r.enter("autolink");let x=f.move("<");return x+=f.move(r.containerPhrasing(t,{before:x,after:">",...f.current()})),x+=f.move(">"),h(),r.stack=y,x}h=r.enter("link"),g=r.enter("label");let m=f.move("[");return m+=f.move(r.containerPhrasing(t,{before:m,after:"](",...f.current()})),m+=f.move("]("),g(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(g=r.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(r.safe(t.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(g=r.enter("destinationRaw"),m+=f.move(r.safe(t.url,{before:m,after:t.title?" ":")",...f.current()}))),g(),t.title&&(g=r.enter(`title${s}`),m+=f.move(" "+o),m+=f.move(r.safe(t.title,{before:m,after:o,...f.current()})),m+=f.move(o),g()),m+=f.move(")"),h(),m}function kj(t,i,r){return by(t,r)?"<":"["}Sy.peek=wj;function Sy(t,i,r,u){const o=t.referenceType,s=r.enter("linkReference");let f=r.enter("label");const h=r.createTracker(u);let g=h.move("[");const m=r.containerPhrasing(t,{before:g,after:"]",...h.current()});g+=h.move(m+"]["),f();const y=r.stack;r.stack=[],f=r.enter("reference");const x=r.safe(r.associationId(t),{before:g,after:"]",...h.current()});return f(),r.stack=y,s(),o==="full"||!m||m!==x?g+=h.move(x+"]"):o==="shortcut"?g=g.slice(0,-1):g+=h.move("]"),g}function wj(){return"["}function qf(t){const i=t.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function jj(t){const i=qf(t),r=t.options.bulletOther;if(!r)return i==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+r+"`) to be different");return r}function Nj(t){const i=t.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function ky(t){const i=t.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function _j(t,i,r,u){const o=r.enter("list"),s=r.bulletCurrent;let f=t.ordered?Nj(r):qf(r);const h=t.ordered?f==="."?")":".":jj(r);let g=i&&r.bulletLastUsed?f===r.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((f==="*"||f==="-")&&y&&(!y.children||!y.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(g=!0),ky(r)===f&&y){let x=-1;for(;++x<t.children.length;){const S=t.children[x];if(S&&S.type==="listItem"&&S.children&&S.children[0]&&S.children[0].type==="thematicBreak"){g=!0;break}}}}g&&(f=h),r.bulletCurrent=f;const m=r.containerFlow(t,u);return r.bulletLastUsed=f,r.bulletCurrent=s,o(),m}function Ej(t){const i=t.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function Cj(t,i,r,u){const o=Ej(r);let s=r.bulletCurrent||qf(r);i&&i.type==="list"&&i.ordered&&(s=(typeof i.start=="number"&&i.start>-1?i.start:1)+(r.options.incrementListMarker===!1?0:i.children.indexOf(t))+s);let f=s.length+1;(o==="tab"||o==="mixed"&&(i&&i.type==="list"&&i.spread||t.spread))&&(f=Math.ceil(f/4)*4);const h=r.createTracker(u);h.move(s+" ".repeat(f-s.length)),h.shift(f);const g=r.enter("listItem"),m=r.indentLines(r.containerFlow(t,h.current()),y);return g(),m;function y(x,S,v){return S?(v?"":" ".repeat(f))+x:(v?s:s+" ".repeat(f-s.length))+x}}function Tj(t,i,r,u){const o=r.enter("paragraph"),s=r.enter("phrasing"),f=r.containerPhrasing(t,u);return s(),o(),f}const Aj=Qu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zj(t,i,r,u){return(t.children.some(function(f){return Aj(f)})?r.containerPhrasing:r.containerFlow).call(r,t,u)}function Dj(t){const i=t.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}wy.peek=Rj;function wy(t,i,r,u){const o=Dj(r),s=r.enter("strong"),f=r.createTracker(u),h=f.move(o+o);let g=f.move(r.containerPhrasing(t,{after:o,before:h,...f.current()}));const m=g.charCodeAt(0),y=Hu(u.before.charCodeAt(u.before.length-1),m,o);y.inside&&(g=aa(m)+g.slice(1));const x=g.charCodeAt(g.length-1),S=Hu(u.after.charCodeAt(0),x,o);S.inside&&(g=g.slice(0,-1)+aa(x));const v=f.move(o+o);return s(),r.attentionEncodeSurroundingInfo={after:S.outside,before:y.outside},h+g+v}function Rj(t,i,r){return r.options.strong||"*"}function Mj(t,i,r,u){return r.safe(t.value,u)}function Oj(t){const i=t.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function Lj(t,i,r){const u=(ky(r)+(r.options.ruleSpaces?" ":"")).repeat(Oj(r));return r.options.ruleSpaces?u.slice(0,-1):u}const jy={blockquote:rj,break:qg,code:fj,definition:pj,emphasis:hy,hardBreak:qg,heading:xj,html:my,image:gy,imageReference:xy,inlineCode:yy,link:vy,linkReference:Sy,list:_j,listItem:Cj,paragraph:Tj,root:zj,strong:wy,text:Mj,thematicBreak:Lj};function Uj(){return{enter:{table:qj,tableData:Bg,tableHeader:Bg,tableRow:Hj},exit:{codeText:Ij,table:Bj,tableData:Lc,tableHeader:Lc,tableRow:Lc}}}function qj(t){const i=t._align;this.enter({type:"table",align:i.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function Bj(t){this.exit(t),this.data.inTable=void 0}function Hj(t){this.enter({type:"tableRow",children:[]},t)}function Lc(t){this.exit(t)}function Bg(t){this.enter({type:"tableCell",children:[]},t)}function Ij(t){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,Yj));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(t)}function Yj(t,i){return i==="|"?i:t}function Vj(t){const i=t||{},r=i.tableCellPadding,u=i.tablePipeAlign,o=i.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
76
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:S,table:f,tableCell:g,tableRow:h}};function f(v,N,C,M){return m(y(v,C,M),v.align)}function h(v,N,C,M){const _=x(v,C,M),G=m([_]);return G.slice(0,G.indexOf(`
77
+ `))}function g(v,N,C,M){const _=C.enter("tableCell"),G=C.enter("phrasing"),U=C.containerPhrasing(v,{...M,before:s,after:s});return G(),_(),U}function m(v,N){return lj(v,{align:N,alignDelimiters:u,padding:r,stringLength:o})}function y(v,N,C){const M=v.children;let _=-1;const G=[],U=N.enter("table");for(;++_<M.length;)G[_]=x(M[_],N,C);return U(),G}function x(v,N,C){const M=v.children;let _=-1;const G=[],U=N.enter("tableRow");for(;++_<M.length;)G[_]=g(M[_],v,N,C);return U(),G}function S(v,N,C){let M=jy.inlineCode(v,N,C);return C.stack.includes("tableCell")&&(M=M.replace(/\|/g,"\\$&")),M}}function Gj(){return{exit:{taskListCheckValueChecked:Hg,taskListCheckValueUnchecked:Hg,paragraph:$j}}}function Fj(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Xj}}}function Hg(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function $j(t){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const u=r.children[0];if(u&&u.type==="text"){const o=i.children;let s=-1,f;for(;++s<o.length;){const h=o[s];if(h.type==="paragraph"){f=h;break}}f===r&&(u.value=u.value.slice(1),u.value.length===0?r.children.shift():r.position&&u.position&&typeof u.position.start.offset=="number"&&(u.position.start.column++,u.position.start.offset++,r.position.start=Object.assign({},u.position.start)))}}this.exit(t)}function Xj(t,i,r,u){const o=t.children[0],s=typeof t.checked=="boolean"&&o&&o.type==="paragraph",f="["+(t.checked?"x":" ")+"] ",h=r.createTracker(u);s&&h.move(f);let g=jy.listItem(t,i,r,{...u,...h.current()});return s&&(g=g.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),g;function m(y){return y+f}}function Qj(){return[_w(),Xw(),Jw(),Uj(),Gj()]}function Zj(t){return{extensions:[Ew(),Qw(t),Pw(),Vj(t),Fj()]}}const Kj={tokenize:nN,partial:!0},Ny={tokenize:lN,partial:!0},_y={tokenize:iN,partial:!0},Ey={tokenize:rN,partial:!0},Jj={tokenize:aN,partial:!0},Cy={name:"wwwAutolink",tokenize:eN,previous:Ay},Ty={name:"protocolAutolink",tokenize:tN,previous:zy},al={name:"emailAutolink",tokenize:Wj,previous:Dy},On={};function Pj(){return{text:On}}let li=48;for(;li<123;)On[li]=al,li++,li===58?li=65:li===91&&(li=97);On[43]=al;On[45]=al;On[46]=al;On[95]=al;On[72]=[al,Ty];On[104]=[al,Ty];On[87]=[al,Cy];On[119]=[al,Cy];function Wj(t,i,r){const u=this;let o,s;return f;function f(x){return!ff(x)||!Dy.call(u,u.previous)||Bf(u.events)?r(x):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(x))}function h(x){return ff(x)?(t.consume(x),h):x===64?(t.consume(x),g):r(x)}function g(x){return x===46?t.check(Jj,y,m)(x):x===45||x===95||Dt(x)?(s=!0,t.consume(x),g):y(x)}function m(x){return t.consume(x),o=!0,g}function y(x){return s&&o&&Lt(u.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(x)):r(x)}}function eN(t,i,r){const u=this;return o;function o(f){return f!==87&&f!==119||!Ay.call(u,u.previous)||Bf(u.events)?r(f):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Kj,t.attempt(Ny,t.attempt(_y,s),r),r)(f))}function s(f){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(f)}}function tN(t,i,r){const u=this;let o="",s=!1;return f;function f(x){return(x===72||x===104)&&zy.call(u,u.previous)&&!Bf(u.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(x),t.consume(x),h):r(x)}function h(x){if(Lt(x)&&o.length<5)return o+=String.fromCodePoint(x),t.consume(x),h;if(x===58){const S=o.toLowerCase();if(S==="http"||S==="https")return t.consume(x),g}return r(x)}function g(x){return x===47?(t.consume(x),s?m:(s=!0,g)):r(x)}function m(x){return x===null||Uu(x)||lt(x)||ui(x)||Fu(x)?r(x):t.attempt(Ny,t.attempt(_y,y),r)(x)}function y(x){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(x)}}function nN(t,i,r){let u=0;return o;function o(f){return(f===87||f===119)&&u<3?(u++,t.consume(f),o):f===46&&u===3?(t.consume(f),s):r(f)}function s(f){return f===null?r(f):i(f)}}function lN(t,i,r){let u,o,s;return f;function f(m){return m===46||m===95?t.check(Ey,g,h)(m):m===null||lt(m)||ui(m)||m!==45&&Fu(m)?g(m):(s=!0,t.consume(m),f)}function h(m){return m===95?u=!0:(o=u,u=void 0),t.consume(m),f}function g(m){return o||u||!s?r(m):i(m)}}function iN(t,i){let r=0,u=0;return o;function o(f){return f===40?(r++,t.consume(f),o):f===41&&u<r?s(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?t.check(Ey,i,s)(f):f===null||lt(f)||ui(f)?i(f):(t.consume(f),o)}function s(f){return f===41&&u++,t.consume(f),o}}function rN(t,i,r){return u;function u(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(t.consume(h),u):h===38?(t.consume(h),s):h===93?(t.consume(h),o):h===60||h===null||lt(h)||ui(h)?i(h):r(h)}function o(h){return h===null||h===40||h===91||lt(h)||ui(h)?i(h):u(h)}function s(h){return Lt(h)?f(h):r(h)}function f(h){return h===59?(t.consume(h),u):Lt(h)?(t.consume(h),f):r(h)}}function aN(t,i,r){return u;function u(s){return t.consume(s),o}function o(s){return Dt(s)?r(s):i(s)}}function Ay(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||lt(t)}function zy(t){return!Lt(t)}function Dy(t){return!(t===47||ff(t))}function ff(t){return t===43||t===45||t===46||t===95||Dt(t)}function Bf(t){let i=t.length,r=!1;for(;i--;){const u=t[i][1];if((u.type==="labelLink"||u.type==="labelImage")&&!u._balanced){r=!0;break}if(u._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const uN={tokenize:mN,partial:!0};function sN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dN,continuation:{tokenize:pN},exit:hN}},text:{91:{name:"gfmFootnoteCall",tokenize:fN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oN,resolveTo:cN}}}}function oN(t,i,r){const u=this;let o=u.events.length;const s=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let f;for(;o--;){const g=u.events[o][1];if(g.type==="labelImage"){f=g;break}if(g.type==="gfmFootnoteCall"||g.type==="labelLink"||g.type==="label"||g.type==="image"||g.type==="link")break}return h;function h(g){if(!f||!f._balanced)return r(g);const m=Cn(u.sliceSerialize({start:f.end,end:u.now()}));return m.codePointAt(0)!==94||!s.includes(m.slice(1))?r(g):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),i(g))}}function cN(t,i){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const u={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},h=[t[r+1],t[r+2],["enter",u,i],t[r+3],t[r+4],["enter",o,i],["exit",o,i],["enter",s,i],["enter",f,i],["exit",f,i],["exit",s,i],t[t.length-2],t[t.length-1],["exit",u,i]];return t.splice(r,t.length-r+1,...h),t}function fN(t,i,r){const u=this,o=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let s=0,f;return h;function h(x){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),g}function g(x){return x!==94?r(x):(t.enter("gfmFootnoteCallMarker"),t.consume(x),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(x){if(s>999||x===93&&!f||x===null||x===91||lt(x))return r(x);if(x===93){t.exit("chunkString");const S=t.exit("gfmFootnoteCallString");return o.includes(Cn(u.sliceSerialize(S)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):r(x)}return lt(x)||(f=!0),s++,t.consume(x),x===92?y:m}function y(x){return x===91||x===92||x===93?(t.consume(x),s++,m):m(x)}}function dN(t,i,r){const u=this,o=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let s,f=0,h;return g;function g(N){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(N){return N===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):r(N)}function y(N){if(f>999||N===93&&!h||N===null||N===91||lt(N))return r(N);if(N===93){t.exit("chunkString");const C=t.exit("gfmFootnoteDefinitionLabelString");return s=Cn(u.sliceSerialize(C)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),S}return lt(N)||(h=!0),f++,t.consume(N),N===92?x:y}function x(N){return N===91||N===92||N===93?(t.consume(N),f++,y):y(N)}function S(N){return N===58?(t.enter("definitionMarker"),t.consume(N),t.exit("definitionMarker"),o.includes(s)||o.push(s),Ye(t,v,"gfmFootnoteDefinitionWhitespace")):r(N)}function v(N){return i(N)}}function pN(t,i,r){return t.check(sa,i,t.attempt(uN,i,r))}function hN(t){t.exit("gfmFootnoteDefinition")}function mN(t,i,r){const u=this;return Ye(t,o,"gfmFootnoteDefinitionIndent",5);function o(s){const f=u.events[u.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?i(s):r(s)}}function gN(t){let r=(t||{}).singleTilde;const u={name:"strikethrough",tokenize:s,resolveAll:o};return r==null&&(r=!0),{text:{126:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function o(f,h){let g=-1;for(;++g<f.length;)if(f[g][0]==="enter"&&f[g][1].type==="strikethroughSequenceTemporary"&&f[g][1]._close){let m=g;for(;m--;)if(f[m][0]==="exit"&&f[m][1].type==="strikethroughSequenceTemporary"&&f[m][1]._open&&f[g][1].end.offset-f[g][1].start.offset===f[m][1].end.offset-f[m][1].start.offset){f[g][1].type="strikethroughSequence",f[m][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},f[m][1].start),end:Object.assign({},f[g][1].end)},x={type:"strikethroughText",start:Object.assign({},f[m][1].end),end:Object.assign({},f[g][1].start)},S=[["enter",y,h],["enter",f[m][1],h],["exit",f[m][1],h],["enter",x,h]],v=h.parser.constructs.insideSpan.null;v&&nn(S,S.length,0,$u(v,f.slice(m+1,g),h)),nn(S,S.length,0,[["exit",x,h],["enter",f[g][1],h],["exit",f[g][1],h],["exit",y,h]]),nn(f,m-1,g-m+3,S),g=m+S.length-2;break}}for(g=-1;++g<f.length;)f[g][1].type==="strikethroughSequenceTemporary"&&(f[g][1].type="data");return f}function s(f,h,g){const m=this.previous,y=this.events;let x=0;return S;function S(N){return m===126&&y[y.length-1][1].type!=="characterEscape"?g(N):(f.enter("strikethroughSequenceTemporary"),v(N))}function v(N){const C=Wi(m);if(N===126)return x>1?g(N):(f.consume(N),x++,v);if(x<2&&!r)return g(N);const M=f.exit("strikethroughSequenceTemporary"),_=Wi(N);return M._open=!_||_===2&&!!C,M._close=!C||C===2&&!!_,h(N)}}}class xN{constructor(){this.map=[]}add(i,r,u){yN(this,i,r,u)}consume(i){if(this.map.sort(function(s,f){return s[0]-f[0]}),this.map.length===0)return;let r=this.map.length;const u=[];for(;r>0;)r-=1,u.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];u.push(i.slice()),i.length=0;let o=u.pop();for(;o;){for(const s of o)i.push(s);o=u.pop()}this.map.length=0}}function yN(t,i,r,u){let o=0;if(!(r===0&&u.length===0)){for(;o<t.map.length;){if(t.map[o][0]===i){t.map[o][1]+=r,t.map[o][2].push(...u);return}o+=1}t.map.push([i,r,u])}}function bN(t,i){let r=!1;const u=[];for(;i<t.length;){const o=t[i];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&u.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const s=u.length-1;u[s]=u[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return u}function vN(){return{flow:{null:{name:"table",tokenize:SN,resolveAll:kN}}}}function SN(t,i,r){const u=this;let o=0,s=0,f;return h;function h(O){let ae=u.events.length-1;for(;ae>-1;){const oe=u.events[ae][1].type;if(oe==="lineEnding"||oe==="linePrefix")ae--;else break}const ee=ae>-1?u.events[ae][1].type:null,xe=ee==="tableHead"||ee==="tableRow"?D:g;return xe===D&&u.parser.lazy[u.now().line]?r(O):xe(O)}function g(O){return t.enter("tableHead"),t.enter("tableRow"),m(O)}function m(O){return O===124||(f=!0,s+=1),y(O)}function y(O){return O===null?r(O):Se(O)?s>1?(s=0,u.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),v):r(O):Oe(O)?Ye(t,y,"whitespace")(O):(s+=1,f&&(f=!1,o+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),f=!0,y):(t.enter("data"),x(O)))}function x(O){return O===null||O===124||lt(O)?(t.exit("data"),y(O)):(t.consume(O),O===92?S:x)}function S(O){return O===92||O===124?(t.consume(O),x):x(O)}function v(O){return u.interrupt=!1,u.parser.lazy[u.now().line]?r(O):(t.enter("tableDelimiterRow"),f=!1,Oe(O)?Ye(t,N,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):N(O))}function N(O){return O===45||O===58?M(O):O===124?(f=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),C):ne(O)}function C(O){return Oe(O)?Ye(t,M,"whitespace")(O):M(O)}function M(O){return O===58?(s+=1,f=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),_):O===45?(s+=1,_(O)):O===null||Se(O)?Z(O):ne(O)}function _(O){return O===45?(t.enter("tableDelimiterFiller"),G(O)):ne(O)}function G(O){return O===45?(t.consume(O),G):O===58?(f=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),U):(t.exit("tableDelimiterFiller"),U(O))}function U(O){return Oe(O)?Ye(t,Z,"whitespace")(O):Z(O)}function Z(O){return O===124?N(O):O===null||Se(O)?!f||o!==s?ne(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(O)):ne(O)}function ne(O){return r(O)}function D(O){return t.enter("tableRow"),H(O)}function H(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),H):O===null||Se(O)?(t.exit("tableRow"),i(O)):Oe(O)?Ye(t,H,"whitespace")(O):(t.enter("data"),le(O))}function le(O){return O===null||O===124||lt(O)?(t.exit("data"),H(O)):(t.consume(O),O===92?W:le)}function W(O){return O===92||O===124?(t.consume(O),le):le(O)}}function kN(t,i){let r=-1,u=!0,o=0,s=[0,0,0,0],f=[0,0,0,0],h=!1,g=0,m,y,x;const S=new xN;for(;++r<t.length;){const v=t[r],N=v[1];v[0]==="enter"?N.type==="tableHead"?(h=!1,g!==0&&(Ig(S,i,g,m,y),y=void 0,g=0),m={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},S.add(r,0,[["enter",m,i]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(u=!0,x=void 0,s=[0,0,0,0],f=[0,r+1,0,0],h&&(h=!1,y={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},S.add(r,0,[["enter",y,i]])),o=N.type==="tableDelimiterRow"?2:y?3:1):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(u=!1,f[2]===0&&(s[1]!==0&&(f[0]=f[1],x=Tu(S,i,s,o,void 0,x),s=[0,0,0,0]),f[2]=r)):N.type==="tableCellDivider"&&(u?u=!1:(s[1]!==0&&(f[0]=f[1],x=Tu(S,i,s,o,void 0,x)),s=f,f=[s[1],r,0,0])):N.type==="tableHead"?(h=!0,g=r):N.type==="tableRow"||N.type==="tableDelimiterRow"?(g=r,s[1]!==0?(f[0]=f[1],x=Tu(S,i,s,o,r,x)):f[1]!==0&&(x=Tu(S,i,f,o,r,x)),o=0):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(f[3]=r)}for(g!==0&&Ig(S,i,g,m,y),S.consume(i.events),r=-1;++r<i.events.length;){const v=i.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=bN(i.events,r))}return t}function Tu(t,i,r,u,o,s){const f=u===1?"tableHeader":u===2?"tableDelimiter":"tableData",h="tableContent";r[0]!==0&&(s.end=Object.assign({},Pi(i.events,r[0])),t.add(r[0],0,[["exit",s,i]]));const g=Pi(i.events,r[1]);if(s={type:f,start:Object.assign({},g),end:Object.assign({},g)},t.add(r[1],0,[["enter",s,i]]),r[2]!==0){const m=Pi(i.events,r[2]),y=Pi(i.events,r[3]),x={type:h,start:Object.assign({},m),end:Object.assign({},y)};if(t.add(r[2],0,[["enter",x,i]]),u!==2){const S=i.events[r[2]],v=i.events[r[3]];if(S[1].end=Object.assign({},v[1].end),S[1].type="chunkText",S[1].contentType="text",r[3]>r[2]+1){const N=r[2]+1,C=r[3]-r[2]-1;t.add(N,C,[])}}t.add(r[3]+1,0,[["exit",x,i]])}return o!==void 0&&(s.end=Object.assign({},Pi(i.events,o)),t.add(o,0,[["exit",s,i]]),s=void 0),s}function Ig(t,i,r,u,o){const s=[],f=Pi(i.events,r);o&&(o.end=Object.assign({},f),s.push(["exit",o,i])),u.end=Object.assign({},f),s.push(["exit",u,i]),t.add(r+1,0,s)}function Pi(t,i){const r=t[i],u=r[0]==="enter"?"start":"end";return r[1][u]}const wN={name:"tasklistCheck",tokenize:NN};function jN(){return{text:{91:wN}}}function NN(t,i,r){const u=this;return o;function o(g){return u.previous!==null||!u._gfmTasklistFirstContentOfListItem?r(g):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(g),t.exit("taskListCheckMarker"),s)}function s(g){return lt(g)?(t.enter("taskListCheckValueUnchecked"),t.consume(g),t.exit("taskListCheckValueUnchecked"),f):g===88||g===120?(t.enter("taskListCheckValueChecked"),t.consume(g),t.exit("taskListCheckValueChecked"),f):r(g)}function f(g){return g===93?(t.enter("taskListCheckMarker"),t.consume(g),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):r(g)}function h(g){return Se(g)?i(g):Oe(g)?t.check({tokenize:_N},i,r)(g):r(g)}}function _N(t,i,r){return Ye(t,u,"whitespace");function u(o){return o===null?r(o):i(o)}}function EN(t){return Vx([Pj(),sN(),gN(t),vN(),jN()])}const CN={};function TN(t){const i=this,r=t||CN,u=i.data(),o=u.micromarkExtensions||(u.micromarkExtensions=[]),s=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),f=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);o.push(EN(r)),s.push(Qj()),f.push(Zj(r))}/**
78
+ * @license lucide-react v1.26.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const Ry=(...t)=>t.filter((i,r,u)=>!!i&&i.trim()!==""&&u.indexOf(i)===r).join(" ").trim();/**
83
+ * @license lucide-react v1.26.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const AN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
88
+ * @license lucide-react v1.26.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const zN=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,u)=>u?u.toUpperCase():r.toLowerCase());/**
93
+ * @license lucide-react v1.26.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const Yg=t=>{const i=zN(t);return i.charAt(0).toUpperCase()+i.slice(1)};/**
98
+ * @license lucide-react v1.26.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */var Uc={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"};/**
103
+ * @license lucide-react v1.26.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const DN=t=>{for(const i in t)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},RN=w.createContext({}),MN=()=>w.useContext(RN),ON=w.forwardRef(({color:t,size:i,strokeWidth:r,absoluteStrokeWidth:u,className:o="",children:s,iconNode:f,...h},g)=>{const{size:m=24,strokeWidth:y=2,absoluteStrokeWidth:x=!1,color:S="currentColor",className:v=""}=MN()??{},N=u??x?Number(r??y)*24/Number(i??m):r??y;return w.createElement("svg",{ref:g,...Uc,width:i??m??Uc.width,height:i??m??Uc.height,stroke:t??S,strokeWidth:N,className:Ry("lucide",v,o),...!s&&!DN(h)&&{"aria-hidden":"true"},...h},[...f.map(([C,M])=>w.createElement(C,M)),...Array.isArray(s)?s:[s]])});/**
108
+ * @license lucide-react v1.26.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const ze=(t,i)=>{const r=w.forwardRef(({className:u,...o},s)=>w.createElement(ON,{ref:s,iconNode:i,className:Ry(`lucide-${AN(Yg(t))}`,`lucide-${t}`,u),...o}));return r.displayName=Yg(t),r};/**
113
+ * @license lucide-react v1.26.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const LN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],UN=ze("arrow-down",LN);/**
118
+ * @license lucide-react v1.26.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const qN=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],BN=ze("arrow-up",qN);/**
123
+ * @license lucide-react v1.26.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const HN=[["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"}]],IN=ze("bot",HN);/**
128
+ * @license lucide-react v1.26.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const YN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ca=ze("check",YN);/**
133
+ * @license lucide-react v1.26.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const VN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],My=ze("chevron-down",VN);/**
138
+ * @license lucide-react v1.26.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const GN=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],FN=ze("chevron-left",GN);/**
143
+ * @license lucide-react v1.26.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const $N=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ku=ze("chevron-right",$N);/**
148
+ * @license lucide-react v1.26.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const XN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],QN=ze("circle-check",XN);/**
153
+ * @license lucide-react v1.26.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const ZN=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],KN=ze("circle-dashed",ZN);/**
158
+ * @license lucide-react v1.26.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const JN=[["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"}]],Vg=ze("circle-x",JN);/**
163
+ * @license lucide-react v1.26.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const PN=[["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"}]],WN=ze("copy",PN);/**
168
+ * @license lucide-react v1.26.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const e_=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],t_=ze("ellipsis",e_);/**
173
+ * @license lucide-react v1.26.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const n_=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],l_=ze("external-link",n_);/**
178
+ * @license lucide-react v1.26.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const i_=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],r_=ze("file-text",i_);/**
183
+ * @license lucide-react v1.26.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const a_=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],u_=ze("gauge",a_);/**
188
+ * @license lucide-react v1.26.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const s_=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],o_=ze("git-branch",s_);/**
193
+ * @license lucide-react v1.26.0 - ISC
194
+ *
195
+ * This source code is licensed under the ISC license.
196
+ * See the LICENSE file in the root directory of this source tree.
197
+ */const c_=[["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"}]],f_=ze("globe",c_);/**
198
+ * @license lucide-react v1.26.0 - ISC
199
+ *
200
+ * This source code is licensed under the ISC license.
201
+ * See the LICENSE file in the root directory of this source tree.
202
+ */const d_=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hf=ze("loader-circle",d_);/**
203
+ * @license lucide-react v1.26.0 - ISC
204
+ *
205
+ * This source code is licensed under the ISC license.
206
+ * See the LICENSE file in the root directory of this source tree.
207
+ */const p_=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],h_=ze("message-circle-question-mark",p_);/**
208
+ * @license lucide-react v1.26.0 - ISC
209
+ *
210
+ * This source code is licensed under the ISC license.
211
+ * See the LICENSE file in the root directory of this source tree.
212
+ */const m_=[["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"}]],g_=ze("panel-left-close",m_);/**
213
+ * @license lucide-react v1.26.0 - ISC
214
+ *
215
+ * This source code is licensed under the ISC license.
216
+ * See the LICENSE file in the root directory of this source tree.
217
+ */const x_=[["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"}]],y_=ze("panel-left-open",x_);/**
218
+ * @license lucide-react v1.26.0 - ISC
219
+ *
220
+ * This source code is licensed under the ISC license.
221
+ * See the LICENSE file in the root directory of this source tree.
222
+ */const b_=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Gg=ze("paperclip",b_);/**
223
+ * @license lucide-react v1.26.0 - ISC
224
+ *
225
+ * This source code is licensed under the ISC license.
226
+ * See the LICENSE file in the root directory of this source tree.
227
+ */const v_=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],S_=ze("pause",v_);/**
228
+ * @license lucide-react v1.26.0 - ISC
229
+ *
230
+ * This source code is licensed under the ISC license.
231
+ * See the LICENSE file in the root directory of this source tree.
232
+ */const k_=[["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"}]],Oy=ze("pencil",k_);/**
233
+ * @license lucide-react v1.26.0 - ISC
234
+ *
235
+ * This source code is licensed under the ISC license.
236
+ * See the LICENSE file in the root directory of this source tree.
237
+ */const w_=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],j_=ze("play",w_);/**
238
+ * @license lucide-react v1.26.0 - ISC
239
+ *
240
+ * This source code is licensed under the ISC license.
241
+ * See the LICENSE file in the root directory of this source tree.
242
+ */const N_=[["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"}]],If=ze("refresh-cw",N_);/**
243
+ * @license lucide-react v1.26.0 - ISC
244
+ *
245
+ * This source code is licensed under the ISC license.
246
+ * See the LICENSE file in the root directory of this source tree.
247
+ */const __=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],E_=ze("search",__);/**
248
+ * @license lucide-react v1.26.0 - ISC
249
+ *
250
+ * This source code is licensed under the ISC license.
251
+ * See the LICENSE file in the root directory of this source tree.
252
+ */const C_=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ly=ze("settings",C_);/**
253
+ * @license lucide-react v1.26.0 - ISC
254
+ *
255
+ * This source code is licensed under the ISC license.
256
+ * See the LICENSE file in the root directory of this source tree.
257
+ */const T_=[["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"}]],df=ze("shield-alert",T_);/**
258
+ * @license lucide-react v1.26.0 - ISC
259
+ *
260
+ * This source code is licensed under the ISC license.
261
+ * See the LICENSE file in the root directory of this source tree.
262
+ */const A_=[["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"}]],z_=ze("shield",A_);/**
263
+ * @license lucide-react v1.26.0 - ISC
264
+ *
265
+ * This source code is licensed under the ISC license.
266
+ * See the LICENSE file in the root directory of this source tree.
267
+ */const D_=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],R_=ze("sparkles",D_);/**
268
+ * @license lucide-react v1.26.0 - ISC
269
+ *
270
+ * This source code is licensed under the ISC license.
271
+ * See the LICENSE file in the root directory of this source tree.
272
+ */const M_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],O_=ze("square-check",M_);/**
273
+ * @license lucide-react v1.26.0 - ISC
274
+ *
275
+ * This source code is licensed under the ISC license.
276
+ * See the LICENSE file in the root directory of this source tree.
277
+ */const L_=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Uy=ze("square-pen",L_);/**
278
+ * @license lucide-react v1.26.0 - ISC
279
+ *
280
+ * This source code is licensed under the ISC license.
281
+ * See the LICENSE file in the root directory of this source tree.
282
+ */const U_=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],q_=ze("square-terminal",U_);/**
283
+ * @license lucide-react v1.26.0 - ISC
284
+ *
285
+ * This source code is licensed under the ISC license.
286
+ * See the LICENSE file in the root directory of this source tree.
287
+ */const B_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ju=ze("square",B_);/**
288
+ * @license lucide-react v1.26.0 - ISC
289
+ *
290
+ * This source code is licensed under the ISC license.
291
+ * See the LICENSE file in the root directory of this source tree.
292
+ */const H_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],qy=ze("target",H_);/**
293
+ * @license lucide-react v1.26.0 - ISC
294
+ *
295
+ * This source code is licensed under the ISC license.
296
+ * See the LICENSE file in the root directory of this source tree.
297
+ */const I_=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Yf=ze("trash-2",I_);/**
298
+ * @license lucide-react v1.26.0 - ISC
299
+ *
300
+ * This source code is licensed under the ISC license.
301
+ * See the LICENSE file in the root directory of this source tree.
302
+ */const Y_=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],By=ze("wrench",Y_);/**
303
+ * @license lucide-react v1.26.0 - ISC
304
+ *
305
+ * This source code is licensed under the ISC license.
306
+ * See the LICENSE file in the root directory of this source tree.
307
+ */const V_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nr=ze("x",V_),Hy=new Map([["theme","This app follows your system appearance."],["keybindings","This app uses standard keyboard shortcuts here."],["editor","Type your message directly in the composer."],["statusline","The GUI shows session status in its own status row, not a terminal status line."],["shell","Use the Terminal app for shell commands."],["exit","Close the window or tab to end this session; delete it from the sidebar to remove it for good."],["devices","Device pairing is managed from the terminal for now."]]),G_="This command runs in the host terminal.";function Iy(t){return Hy.has(t.name)?!0:t.runner==="client"&&!(t.surfaces??[]).includes("gui")}function Yy(t){return Hy.get(t)??G_}function F_(t,i){switch(i.type){case"permission_request":{const{id:r,toolName:u,toolArgs:o,requesterDriverId:s,requester:f,diffLines:h,diffFile:g,cwd:m}=i.event;return t.some(y=>y.id===r)?t:[...t,{kind:"permission",id:r,toolName:u,toolArgs:o,...s?{requesterDriverId:s}:{},...f?{requester:f}:{},...h?{diffLines:h,diffFile:g}:{},...m?{cwd:m}:{}}]}case"ask_request":{const{id:r,request:u,requesterDriverId:o}=i.event;return t.some(s=>s.id===r)?t:[...t,{kind:"ask",id:r,request:u,...o?{requesterDriverId:o}:{}}]}case"prompt_resolved":{const{id:r}=i.event,u=t.filter(o=>o.id!==r);return u.length===t.length?t:u}default:return t}}function $_(t,i){return{type:"permission-response",id:t,result:i}}function X_(t,i){return{type:"ask-response",id:t,response:i}}function Wr(t){switch(t.type){case"show-plugin-manager":return"plugin";case"show-settings":return"settings";case"show-session-picker":return"resume";case"show-agent-switcher":return"agent";case"show-theme-picker":return"theme";default:return t.type}}function Au(t){return t.type==="show-session-picker"?"session-sidebar":t.type==="show-settings"?"settings":t.type==="show-plugin-manager"?"settings-plugins":t.type==="show-agent-switcher"?"agent-switcher":null}function Q_(t){switch(t.type){case"show-session-picker":return"This host cannot list sessions, so there is nothing to resume.";case"show-theme-picker":return Yy("theme");default:return`This client does not have a screen for '${t.type}' yet.`}}const Z_=2e3,K_=10;function J_(t,i){let r=null,u="disconnected",o=null,s=0,f=!1;function h(v){u=v,i.onStatusChange(v)}function g(){if(!f){if(s>=K_){i.onGiveUp?.();return}o=setTimeout(()=>{s++,m()},Z_)}}function m(){h("connecting"),r=new WebSocket(t),r.onopen=()=>{s=0,h("connected"),S({type:"get-messages"})},r.onmessage=v=>{const N=v.data;if(typeof N!="string")return;const C=iv(N,lv);if(!C.ok){i.onMessage({type:"protocol_error",message:`Malformed message from server (${C.reason})`});return}i.onMessage(C.message)},r.onclose=()=>{r=null,f?h("disconnected"):(h("disconnected"),g())},r.onerror=()=>{h("error")}}function y(){f=!1,o!==null&&(clearTimeout(o),o=null),m()}function x(){f=!0,o!==null&&(clearTimeout(o),o=null),r?.close(),r=null,h("disconnected")}function S(v){r?.readyState===WebSocket.OPEN&&r.send(JSON.stringify(v))}return{connect:y,disconnect:x,send:S,status:()=>u}}const P_={text_delta:"reducer-state",user_message:"reducer-state",tool_start:"reducer-state",tool_end:"reducer-state",thinking:"reducer-state",complete:"reducer-state",interrupted:"reducer-state",error:"visible-notice",command_result:"reducer-state",messages:"reducer-state",history:"intentionally-not-rendered",history_changed:"intentionally-not-rendered",context:"intentionally-not-rendered",turn_source:"intentionally-not-rendered",commands:"reducer-state",session_status:"reducer-state",model_list:"reducer-state",agent_definitions:"reducer-state",sessions:"reducer-state",sessions_error:"reducer-state",session_switched:"reducer-state",session_change_failed:"visible-notice",session_renamed_in_list:"reducer-state",session_rename_failed:"visible-notice",session_deleted:"reducer-state",session_delete_failed:"visible-notice",usage_report:"reducer-state",personal_usage_report:"reducer-state",personal_usage_report_error:"visible-notice",stored_session_usage_report:"reducer-state",stored_session_usage_report_error:"visible-notice",executing:"intentionally-not-rendered",pending:"reducer-state",execution_workspace_event:"reducer-state",execution_detail:"reducer-state",execution_detail_error:"reducer-state",waiting_loop_stop:"intentionally-not-rendered",project_status:"reducer-state",project_diff:"reducer-state",project_memory:"reducer-state",app_view:"reducer-state",app_tool_result:"reducer-state",background_task_event:"intentionally-not-rendered",background_job_group_event:"intentionally-not-rendered",plan_event:"intentionally-not-rendered",context_file_refreshed:"intentionally-not-rendered",branch_event:"intentionally-not-rendered",background_tasks:"reducer-state",background_task:"intentionally-not-rendered",background_job_groups:"intentionally-not-rendered",background_job_group:"intentionally-not-rendered",background_task_log:"intentionally-not-rendered",permission_request:"reducer-state",ask_request:"reducer-state",prompt_resolved:"reducer-state",ui_intent:"reducer-state",session_renamed:"reducer-state",history_cleared:"reducer-state",background_task_control_result:"visible-notice",protocol_error:"visible-notice",resume_gap:"transport-control",settings:"reducer-state",settings_error:"reducer-state"};let Fg=0;function $g(t){return Fg+=1,`${t}_${Fg}_${Date.now()}`}function W_(t){const[i,r]=w.useState(!1),[u,o]=w.useState("idle"),[s,f]=w.useState([]),[h,g]=w.useState(null),[m,y]=w.useState(null),x=w.useRef(null),S=w.useRef(null),v=w.useCallback(C=>C.type!=="agent_definitions"?!1:(x.current!==C.requestId||(f(C.agents),g(C.current),o("ready")),!0),[]),N=w.useCallback(()=>{const C=$g("get_agent_definitions");x.current=C,t({type:"get-agent-definitions",requestId:C})},[t]);return{agentSwitcherOpen:i,agentSwitcherStatus:u,agentDefinitions:s,currentAgentType:h,agentSwitchMessage:m,openAgentSwitcher:w.useCallback(()=>{r(!0),o(C=>C==="ready"?"ready":"loading"),y(null),N()},[N]),closeAgentSwitcher:w.useCallback(()=>{r(!1)},[]),selectAgent:w.useCallback(C=>{const M=$g("agent_switch");S.current=M,y(null),t({type:"command",name:"agent",args:C,requestId:M})},[t]),handleAgentDefinitionsMessage:v,resolveSwitchResult:w.useCallback((C,M)=>C===void 0||S.current!==C?!1:(S.current=null,y(M.message),M.success&&N(),!0),[N])}}let Xg=0;function Qg(t){return Xg+=1,`${t}_${Xg}_${Date.now()}`}const Zg="The connection to the session closed.";function eE(t){return t.appView?.viewId}function tE(t,i){return{type:"read-app-view",requestId:t,viewId:i}}function nE(t,i,r,u){return{type:"call-app-tool",requestId:t,viewId:i,name:r,arguments:u}}function lE(t,i){const r=w.useRef(new Map),[u]=w.useState(()=>Qg("app_request")),o=w.useCallback((f=Zg)=>{const h=[...r.current.values()];r.current.clear();for(const g of h)g.dispose(),g.reject(new Error(f))},[]),s=w.useCallback((f,h,g,m)=>new Promise((y,x)=>{if(!i()||m?.aborted){x(new Error(m?.aborted?"The app view closed.":Zg));return}const S=Qg(`${u}_${f}`),v=()=>m?.removeEventListener("abort",N),N=()=>{r.current.delete(S),v(),x(new Error("The app view closed."))};r.current.set(S,g(y,x,v)),m?.addEventListener("abort",N,{once:!0});try{t(h(S))}catch(C){r.current.delete(S),v(),x(C instanceof Error?C:new Error(String(C)))}}),[i,u,t]);return{readAppView:w.useCallback((f,h)=>s("app_view",g=>tE(g,f),(g,m,y)=>({answer:"app_view",resolve:g,reject:m,dispose:y}),h),[s]),callAppTool:w.useCallback((f,h,g,m)=>s("app_tool",y=>nE(y,f,h,g),(y,x,S)=>({answer:"app_tool_result",resolve:y,reject:x,dispose:S}),m),[s]),handleAppViewMessage:w.useCallback(f=>{if(f.type==="app_view"||f.type==="app_tool_result"){const h=r.current.get(f.requestId);if(h===void 0||h.answer!==f.type)return!0;if(r.current.delete(f.requestId),h.dispose(),f.type==="app_view"&&h.answer==="app_view")h.resolve(f.view);else if(f.type==="app_tool_result"&&h.answer==="app_tool_result"){const{success:g,data:m,parts:y,error:x}=f;h.resolve({success:g,...m!==void 0?{data:m}:{},...y!==void 0?{parts:y}:{},...x!==void 0?{error:x}:{}})}return!0}if(f.type==="protocol_error"&&f.requestId!==void 0){const h=r.current.get(f.requestId);return h===void 0?f.requestId.startsWith(`${u}_`):(r.current.delete(f.requestId),h.dispose(),h.reject(new Error(f.message)),!0)}return!1},[u]),rejectPendingAppRequests:o}}let Kg=0;function iE(){return Kg+=1,`execdetail_${Kg}_${Date.now()}`}function rE(t){const[i,r]=w.useState(null),[u,o]=w.useState("idle"),[s,f]=w.useState([]),[h,g]=w.useState(null),[m,y]=w.useState(!1),x=w.useRef(null),S=w.useRef(null),v=w.useRef(void 0),N=w.useCallback((C,M)=>{const _=iE();x.current=_,S.current=C,o("loading"),g(null),t({type:"read-execution-detail",requestId:_,entryId:C,cursor:M})},[t]);return{openEntryId:i,executionDetailStatus:u,executionDetailRecords:s,executionDetailError:h,executionDetailComplete:m,openExecutionDetail:w.useCallback(C=>{r(C),f([]),y(!1),v.current=void 0,N(C)},[N]),loadMoreExecutionDetail:w.useCallback(()=>{!i||u==="loading"||m||N(i,v.current)},[i,u,m,N]),closeExecutionDetail:w.useCallback(()=>{r(null),x.current=null,S.current=null,f([]),o("idle"),g(null),y(!1)},[]),handleExecutionDetailMessage:w.useCallback(C=>C.type!=="execution_detail"&&C.type!=="execution_detail_error"?!1:x.current!==C.requestId?!0:C.type==="execution_detail_error"?(o("error"),g(C.message),!0):(f(M=>C.page.cursor===void 0?C.page.records:[...M,...C.page.records]),v.current=C.page.nextCursor,y(C.page.nextCursor===void 0),o("ready"),!0),[])}}let Jg=0;function aE(){return Jg+=1,`model_list_${Jg}_${Date.now()}`}function uE(t){const[i,r]=w.useState(null),u=w.useRef(null),o=w.useCallback(s=>s.type!=="model_list"?!1:(u.current!==s.requestId||r({groups:s.groups,currentModel:s.currentModel,...s.currentProfile!==void 0?{currentProfile:s.currentProfile}:{}}),!0),[]);return{modelList:i,requestModelList:w.useCallback(()=>{const s=aE();u.current=s,t({type:"list-models",requestId:s})},[t]),handleModelListMessage:o}}let Pg=0;function Wg(t){return Pg+=1,`${t}_${Pg}_${Date.now()}`}function sE(t){const[i,r]=w.useState("idle"),[u,o]=w.useState(null),[s,f]=w.useState(null),[h,g]=w.useState("idle"),[m,y]=w.useState(null),[x,S]=w.useState(null),[v,N]=w.useState(null),[C,M]=w.useState("idle"),[_,G]=w.useState(null),U=w.useRef(null),Z=w.useRef(null),ne=w.useCallback(D=>D.type==="personal_usage_report"||D.type==="personal_usage_report_error"?(U.current!==D.requestId||(o(D.type==="personal_usage_report"?D.report:null),f(D.type==="personal_usage_report_error"?D.message:null),r(D.type==="personal_usage_report"?"ready":"error")),!0):D.type==="usage_report"?(G(D.report),M("ready"),!0):D.type==="stored_session_usage_report"||D.type==="stored_session_usage_report_error"?(Z.current!==D.requestId||(y(D.type==="stored_session_usage_report"?D.report:null),S(D.sessionId),N(D.type==="stored_session_usage_report_error"?D.message:null),g(D.type==="stored_session_usage_report"?"ready":"error")),!0):(D.type==="protocol_error"&&M(H=>H==="loading"?"error":H),!1),[]);return{personalUsageStatus:i,personalUsageReport:u,personalUsageError:s,requestPersonalUsage:w.useCallback(D=>{const H=Wg("personal_usage");U.current=H,r("loading"),f(null),t({type:"get-personal-usage-report",requestId:H,period:D,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"})},[t]),storedSessionUsageStatus:h,storedSessionUsageReport:m,storedSessionUsageSessionId:x,storedSessionUsageError:v,requestStoredSessionUsage:w.useCallback(D=>{const H=Wg("stored_session_usage");Z.current=H,g("loading"),y(null),S(D),N(null),t({type:"get-stored-session-usage-report",requestId:H,sessionId:D})},[t]),currentSessionUsageStatus:C,currentSessionUsageReport:_,requestCurrentSessionUsage:w.useCallback(()=>{M("loading"),t({type:"get-usage-report"})},[t]),handleUsageMessage:ne}}let ex=0;function qc(t){return ex+=1,`${t}_${ex}_${Date.now()}`}function oE(t){const[i,r]=w.useState("idle"),[u,o]=w.useState(null),[s,f]=w.useState("idle"),[h,g]=w.useState(null),[m,y]=w.useState(null),[x,S]=w.useState("idle"),[v,N]=w.useState(null),C=w.useRef(null),M=w.useRef(null),_=w.useRef(null),G=w.useCallback(U=>U.type==="project_status"?(C.current!==U.requestId||(o(U.result),r("ready")),!0):U.type==="project_diff"?(M.current!==U.requestId||(y(U.result),f("ready")),!0):U.type==="project_memory"?(_.current!==U.requestId||(N(U.result),S("ready")),!0):(U.type==="protocol_error"&&U.requestId!==void 0&&(C.current===U.requestId&&r("error"),M.current===U.requestId&&f("error"),_.current===U.requestId&&S("error")),!1),[]);return{projectStatusState:i,projectStatus:u,requestProjectStatus:w.useCallback(()=>{const U=qc("project_status");C.current=U,r("loading"),t({type:"project-status",requestId:U})},[t]),projectDiffState:s,projectDiffPath:h,projectDiff:m,requestProjectDiff:w.useCallback(U=>{const Z=qc("project_diff");M.current=Z,g(U),f("loading"),y(null),t({type:"project-diff",requestId:Z,path:U})},[t]),projectMemoryState:x,projectMemory:v,requestProjectMemory:w.useCallback(()=>{const U=qc("project_memory");_.current=U,S("loading"),t({type:"project-memory",requestId:U})},[t]),handleProjectMessage:G}}function cE(t){const[i,r]=w.useState([]),u=w.useCallback(()=>{t({type:"get-background-tasks",filter:{kind:"scheduled"}})},[t]),o=w.useCallback(s=>s.type==="background_tasks"?(r(s.tasks.filter(f=>f.kind==="scheduled")),!0):s.type==="background_task_control_result"&&s.action==="cancel"?(s.success&&u(),!1):(s.type==="command_result"&&s.name==="schedule"&&s.success&&u(),!1),[u]);return{scheduledTasks:i,pauseSchedule:w.useCallback(s=>{t({type:"command",name:"schedule",args:`pause ${s}`})},[t]),resumeSchedule:w.useCallback(s=>{t({type:"command",name:"schedule",args:`resume ${s}`})},[t]),deleteSchedule:w.useCallback(s=>{t({type:"cancel-background-task",taskId:s})},[t]),handleSchedulesMessage:o,requestSchedules:u}}const Vy=w.createContext(null);function fE({value:t,children:i}){if(!t.identity.displayName||!t.identity.cliName||!t.storage.browserNamespace)throw new Error("A public product identity is required");return d.jsx(Vy.Provider,{value:t,children:i},t.storage.browserNamespace)}function ql(){const t=w.useContext(Vy);if(t===null)throw new Error("ProductIdentityProvider is required");return t}let tx=0;function Ji(t){return tx+=1,`${t}_${tx}_${Date.now()}`}function dE(t){return t.sessions.some(i=>typeof i.live=="boolean")}function Vf(t){return`${t}.restoreSessionId`}function pE(t,i){try{window.sessionStorage.setItem(Vf(t),i)}catch{}}function hE(t){try{return window.sessionStorage.getItem(Vf(t))}catch{return null}}function mE(t){try{window.sessionStorage.removeItem(Vf(t))}catch{}}function gE(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(min-width: 768px)").matches}function xE(t){const{storage:{browserNamespace:i}}=ql(),[r,u]=w.useState(null),[o,s]=w.useState(null),[f,h]=w.useState(gE),g=w.useRef(null),m=w.useRef(!1),y=w.useCallback(()=>{const Z=Ji("sessions");g.current=Z,t({type:"list-sessions",requestId:Z})},[t]),x=w.useRef(null);x.current=r?.currentSessionId??null;const S=w.useCallback(Z=>{Z!==x.current&&t({type:"switch-session",sessionId:Z,requestId:Ji("session_change")})},[t,i]),v=w.useCallback(()=>t({type:"new-session",requestId:Ji("session_change")}),[t,i]),N=w.useCallback((Z,ne)=>t({type:"rename-session",sessionId:Z,name:ne,requestId:Ji("session_rename")}),[t,i]),C=w.useCallback(Z=>t({type:"delete-session",sessionId:Z,requestId:Ji("session_delete")}),[t,i]),M=w.useRef(null),_=w.useRef(null),G=w.useCallback(()=>{_.current=hE(i)??M.current},[i]),U=w.useCallback(Z=>{const ne=_.current;_.current=null,ne!==null&&(mE(i),ne!==Z.currentSessionId&&dE(Z)&&Z.sessions.some(D=>D.id===ne)&&t({type:"switch-session",sessionId:ne,requestId:Ji("session_change")}))},[t,i]);return{sessionListing:r,sessionsError:o,requestSessions:y,switchSession:S,newSession:v,renameSessionInList:N,deleteSession:C,sessionSidebarOpen:f,setSessionSidebarOpen:h,handleSessionsMessage:w.useCallback(Z=>Z.type!=="sessions"&&Z.type!=="sessions_error"?!1:Z.requestId!==g.current?!0:Z.type==="sessions"?(m.current=!1,u(Z.listing),s(null),U(Z.listing),!0):(_.current=null,m.current=Z.code==="not_available",Z.code==="not_available"&&u(null),s({code:Z.code,message:Z.message}),!0),[U]),canListSessions:w.useCallback(()=>!m.current,[]),markCurrent:w.useCallback(Z=>{M.current=Z,u(ne=>ne===null?ne:{...ne,currentSessionId:Z})},[i]),armRestore:G}}let nx=0;function lx(t){return nx+=1,`${t}_${nx}_${Date.now()}`}function yE(t){const[i,r]=w.useState(!1),[u,o]=w.useState("idle"),[s,f]=w.useState(null),[h,g]=w.useState(null),[m,y]=w.useState(null),x=w.useRef(null),S=w.useCallback(N=>N.type!=="settings"&&N.type!=="settings_error"?!1:x.current!==N.requestId?!0:N.type==="settings"?(f(N.settings),o("ready"),g(null),!0):(g(N.message),o(C=>C==="ready"?"ready":"error"),!0),[]),v=w.useCallback(()=>{o(C=>C==="ready"?"ready":"loading"),g(null);const N=lx("get_settings");x.current=N,t({type:"get-settings",requestId:N})},[t]);return{settingsOpen:i,settingsStatus:u,settingsSnapshot:s,settingsError:h,settingsInitialSectionId:m,openSettings:w.useCallback(N=>{r(!0),y(N??null),v()},[v]),closeSettings:w.useCallback(()=>{r(!1)},[]),updateSettings:w.useCallback(N=>{const C=lx("update_settings");x.current=C,g(null),t({type:"update-settings",requestId:C,patch:N})},[t]),handleSettingsMessage:S,refreshSettings:v}}let bE=0;function ht(){return`msg_${++bE}_${Date.now()}`}let ix=0;function vE(){return ix+=1,`silent_command_${ix}_${Date.now()}`}function Gy(t,i){const r=t[t.length-1];return r&&r.type==="text"?[...t.slice(0,-1),{...r,text:r.text+i}]:[...t,{type:"text",id:ht(),text:i}]}function Fy(t,i){const r=t[t.length-1];return r&&r.type==="tools"?[...t.slice(0,-1),{...r,tools:[...r.tools,i]}]:[...t,{type:"tools",id:ht(),tools:[i]}]}function $y(t,i){return i.executionId!==void 0?t.findIndex(r=>r.executionId===i.executionId&&r.status==="running"):t.findIndex(r=>r.name===i.toolName&&r.status==="running")}function Xy(t){return{id:ht(),name:t.toolName,input:t.firstArg,...t.executionId?{executionId:t.executionId}:{},...t.displayPath?{displayPath:t.displayPath}:{},...t.commandName?{commandName:t.commandName}:{},...t.internal?{internal:!0}:{}}}function Gf(t){return{status:t.isRunning?"running":t.result==="error"||t.result==="denied"?"error":"done",result:t.result,...t.diffLines?{diffLines:t.diffLines}:{},...t.diffFile?{diffFile:t.diffFile}:{},...t.toolResultData!==void 0?{toolResultData:t.toolResultData}:{},...t.toolResultParts?{toolResultParts:t.toolResultParts}:{},...t.appView?{appView:t.appView}:{}}}function SE(t,i){let r=!1;return t.map(u=>{if(r||u.type!=="tools")return u;const o=$y(u.tools,i);if(o===-1)return u;r=!0;const s=[...u.tools];return s[o]={...s[o],...Gf(i)},{...u,tools:s}})}function Qy(t){const i=new Map;for(const r of t)if(r.type==="tools")for(const u of r.tools){if(!u.diffFile||!u.diffLines||u.diffLines.length===0)continue;const o=u.diffLines.filter(h=>h.type==="add").length,s=u.diffLines.filter(h=>h.type==="remove").length,f=i.get(u.diffFile);i.set(u.diffFile,{path:u.diffFile,added:(f?.added??0)+o,removed:(f?.removed??0)+s,diffLines:u.diffLines})}return[...i.values()]}function kE(t){return{...Xy(t),...Gf(t)}}function wE(t){const i=[];let r=[];const u=()=>{for(const s of r)i.push(s.type==="tools"?{id:s.id,role:"tools",tools:s.tools}:{id:s.id,role:"assistant",content:s.text});const o=Qy(r);o.length>0&&i.push({id:ht(),role:"changed-files",files:o}),r=[]};for(const o of t)o.type==="text"&&o.role==="user"?(u(),i.push({id:ht(),role:"user",content:o.content})):o.type==="text"?r=Gy(r,o.content):r=Fy(r,kE(o.tool));return u(),i}function jE(t){const[i,r]=w.useState("disconnected"),u=w.useRef("disconnected"),[o,s]=w.useState([]),[f,h]=w.useState([]),[g,m]=w.useState(""),[y,x]=w.useState(!1),[S,v]=w.useState(null),[N,C]=w.useState([]),[M,_]=w.useState(null),[G,U]=w.useState(null),[Z,ne]=w.useState([]),[D,H]=w.useState(null),le=w.useRef(null),[W,O]=w.useState(null),[ae,ee]=w.useState(null),[xe,oe]=w.useState(!1),J=w.useCallback(()=>oe(!0),[]),L=w.useCallback(()=>oe(!1),[]),P=w.useRef(null),fe=w.useRef(""),ce=w.useRef([]),E=w.useRef([]),T=w.useRef(null),V=w.useRef(null),j=w.useCallback(Q=>{ce.current=Q(ce.current),h(ce.current)},[]),re=w.useCallback(Q=>{s(he=>[...he,Q])},[]),me=w.useCallback(Q=>{const he=E.current;E.current=[],fe.current="",m(""),x(!1),j(()=>[]);for(const ot of he)ot.type==="tools"?re({id:ot.id,role:"tools",tools:ot.tools.map(qn=>({...qn,status:Q(qn)}))}):re({id:ot.id,role:"assistant",content:ot.text});const Ne=Qy(he);Ne.length>0&&re({id:ht(),role:"changed-files",files:Ne})},[re,j]),de=w.useRef(0),je=w.useRef(new Set),qe=w.useRef(0),se=w.useRef(new Set),pe=w.useCallback(Q=>{if(Q.type==="command"){if(Q.name==="help"){oe(!0);return}const he=le.current?.commands.find(Ne=>Ne.name===Q.name);if(Iy(he??{name:Q.name})){re({id:ht(),role:"command",name:Q.name,content:Yy(Q.name),tone:"info"});return}de.current+=1}(Q.type==="switch-session"||Q.type==="new-session")&&(qe.current+=1,Q.requestId!==void 0&&se.current.add(Q.requestId)),P.current?.send(Q)},[re]),Ge=w.useCallback(Q=>{qe.current=Math.max(0,qe.current-1),Q!==void 0&&se.current.delete(Q)},[]),Xt=w.useCallback((Q,he)=>{const Ne=vE();je.current.add(Ne),pe({type:"command",name:Q,requestId:Ne,...he?{args:he}:{}})},[pe]),{handleUsageMessage:yn,...Mt}=sE(pe),{handleExecutionDetailMessage:bn,closeExecutionDetail:ln,...ul}=rE(pe),{handleModelListMessage:Ln,...vn}=uE(pe),{handleProjectMessage:Sn,...Un}=oE(pe),{handleAppViewMessage:te,rejectPendingAppRequests:De,readAppView:Ie,callAppTool:kn}=lE(pe,w.useCallback(()=>u.current==="connected",[])),{handleSessionsMessage:F,canListSessions:ue,markCurrent:be,armRestore:Ae,...Ve}=xE(pe),{requestSessions:st,setSessionSidebarOpen:rn}=Ve,{handleSettingsMessage:kt,openSettings:at,refreshSettings:Nt,...Qe}=yE(pe),wn=w.useRef(!1);wn.current=Qe.settingsOpen;const{handleAgentDefinitionsMessage:Ut,resolveSwitchResult:da,openAgentSwitcher:sl,...oi}=W_(pe),{handleSchedulesMessage:Bl,requestSchedules:an,...ci}=cE(pe),ol=w.useCallback(Q=>{if(P_[Q.type],!yn(Q)&&!bn(Q)&&!Ln(Q)&&!Sn(Q)&&!te(Q)&&!F(Q)&&!kt(Q)&&!Ut(Q)&&!Bl(Q))switch(Q.type){case"messages":{const he=Q.display?wE(Q.display):Q.messages.flatMap(Ne=>{if(Ne.role!=="user"&&Ne.role!=="assistant")return[];const ot=Ne.content??"";return[{id:ht(),role:Ne.role,content:ot}]});s(he),Q.driverId&&ee(Q.driverId);break}case"user_message":s(he=>[...he,{id:ht(),role:"user",content:Q.content??"",...Q.driverId?{author:Q.driverId}:{}}]);break;case"text_delta":{const he=fe.current+Q.delta;fe.current=he,m(he),E.current=Gy(E.current,Q.delta);break}case"thinking":x(Q.isThinking);break;case"tool_start":{const{state:he}=Q,Ne={...Xy(he),status:"running"};j(ot=>[...ot,Ne]),E.current=Fy(E.current,Ne);break}case"tool_end":{const{state:he}=Q;j(Ne=>{const ot=$y(Ne,he);if(ot===-1)return Ne;const qn=[...Ne];return qn[ot]={...qn[ot],...Gf(he)},qn}),E.current=SE(E.current,he);break}case"execution_workspace_event":v(Q.snapshot);break;case"background_task_control_result":Q.success||ne(he=>[...he,{id:ht(),kind:"background-task-control-failed",message:Q.message??`Could not stop ${Q.taskId}.`}]);break;case"pending":_(Q.pending===null?null:{text:Q.pending,count:Q.pendingCount??1});break;case"permission_request":case"ask_request":case"prompt_resolved":C(he=>F_(he,Q));break;case"ui_intent":{if(Au(Q.event.intent)==="session-sidebar"&&ue()){rn(!0),st(),de.current>0&&(T.current={name:Wr(Q.event.intent),text:null});break}if(Au(Q.event.intent)==="settings"){at(),de.current>0&&(T.current={name:Wr(Q.event.intent),text:null});break}if(Au(Q.event.intent)==="settings-plugins"){at("plugins"),de.current>0&&(T.current={name:Wr(Q.event.intent),text:null});break}if(Au(Q.event.intent)==="agent-switcher"){sl(),de.current>0&&(T.current={name:Wr(Q.event.intent),text:null});break}const he={name:Wr(Q.event.intent),text:Q_(Q.event.intent)};de.current>0?T.current=he:re({id:ht(),role:"command",name:he.name,content:he.text,tone:"info"});break}case"session_renamed":U(Q.event.name),st();break;case"session_switched":De("The active session changed."),Ge(),V.current=null,O(null),fe.current="",E.current=[],m(""),x(!1),j(()=>[]),s([]),C([]),_(null),U(null),v(null),ln(),be(Q.event.sessionId),pe({type:"get-messages"}),pe({type:"get-status"}),pe({type:"get-commands"}),pe({type:"get-execution-workspace"}),pe({type:"get-pending"}),st(),an();break;case"history_cleared":De("The session history was cleared."),fe.current="",E.current=[],m(""),s([]);break;case"error":{const he=Q.model??V.current?.model;pe({type:"get-status"}),me(Ne=>Ne.status==="running"?"error":Ne.status),ne(Ne=>[...Ne,{id:ht(),kind:"session-error",message:Q.message,...Q.code!==void 0&&{code:Q.code},...Q.provider!==void 0&&{provider:Q.provider},...he!==void 0&&{model:he},...Q.retryAfterSeconds!==void 0&&{retryAfterSeconds:Q.retryAfterSeconds}}]);break}case"session_change_failed":if(Q.requestId!==void 0&&!se.current.has(Q.requestId))break;Ge(Q.requestId),ne(he=>[...he,{id:ht(),kind:"session-change-refused",message:Q.message}]);break;case"session_renamed_in_list":st();break;case"session_rename_failed":ne(he=>[...he,{id:ht(),kind:"session-change-refused",message:Q.message}]);break;case"session_deleted":st();break;case"session_delete_failed":ne(he=>[...he,{id:ht(),kind:"session-change-refused",message:Q.message}]);break;case"protocol_error":{if(qe.current>0){Ge(),ne(Ne=>[...Ne,{id:ht(),kind:"protocol-error",message:Q.message}]);break}de.current=Math.max(0,de.current-1);const he=T.current;T.current=null,he!==null&&he.text!==null&&re({id:ht(),role:"command",name:he.name,content:he.text,tone:"info"}),ne(Ne=>[...Ne,{id:ht(),kind:"protocol-error",message:Q.message}]);break}case"commands":{const he={commands:Q.commands,skills:Q.skills};le.current=he,H(he);break}case"session_status":V.current=Q.status,O(Q.status);break;case"command_result":{pe({type:"get-status"}),pe({type:"get-commands"}),de.current=Math.max(0,de.current-1),Q.name==="provider"&&Q.success&&wn.current&&Nt();const he=Q.requestId!==void 0&&je.current.delete(Q.requestId);if(da(Q.requestId,Q))break;const Ne=T.current;if(T.current=null,Ne!==null&&Q.success){Ne.text!==null&&re({id:ht(),role:"command",name:Q.name,content:Ne.text,tone:"info"});break}if(Q.message.trim().length===0)break;if(he){Q.success||ne(ot=>[...ot,{id:ht(),kind:"command-failed",message:Q.message}]);break}re({id:ht(),role:"command",name:Q.name,content:Q.message,tone:Q.success?"success":"error"});break}case"complete":case"interrupted":pe({type:"get-status"}),pe({type:"get-pending"}),st(),me(he=>he.status==="running"?"done":he.status);break}},[re,ue,ln,me,Ut,te,bn,Ln,Sn,Bl,F,kt,yn,be,sl,at,Nt,an,st,da,De,pe,rn,Ge,j]),es=w.useCallback((Q,he)=>{P.current?.send($_(Q,he)),C(Ne=>Ne.filter(ot=>ot.id!==Q))},[]),pa=w.useCallback((Q,he)=>{P.current?.send(X_(Q,he)),C(Ne=>Ne.filter(ot=>ot.id!==Q))},[]),lr=w.useCallback(Q=>{ne(he=>he.filter(Ne=>Ne.id!==Q))},[]);return w.useEffect(()=>{const he=t({onMessage:ol,onStatusChange:Ne=>{u.current=Ne,r(Ne),Ne!=="connected"&&De(),Ne==="connected"&&(de.current=0,je.current.clear(),qe.current=0,se.current.clear(),T.current=null,he.send({type:"get-commands"}),he.send({type:"get-status"}),he.send({type:"get-pending"}),Ae(),st(),an())}});return P.current=he,he.connect(),()=>{he.disconnect(),P.current=null,De()}},[t,ol,st,an,Ae,De]),{status:i,messages:o,activeTools:f,streamingText:g,isThinking:y,executionWorkspace:S,sessionName:G,commandCatalog:D,sessionStatus:W,ownDriverId:ae,send:pe,sendCommandSilently:Xt,pendingPrompts:N,queuedPrompt:M,answerPermission:es,answerAsk:pa,...Mt,...ul,closeExecutionDetail:ln,...vn,...Un,...Ve,sessionNotices:Z,dismissSessionNotice:lr,openSettings:at,...Qe,openAgentSwitcher:sl,...oi,...ci,readAppView:Ie,callAppTool:kn,helpOpen:xe,openHelp:J,closeHelp:L}}function NE(t){const[i,r]=w.useState(!1),u=jE(w.useCallback(o=>J_(t,{...o,onGiveUp:()=>r(!0)}),[t]));return w.useEffect(()=>{u.status==="connected"&&r(!1)},[u.status]),{...u,connectionLost:i}}async function _E(t){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t);return}catch{}if(!EE(t))throw new Error("copy failed")}function EE(t){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,r=document.createElement("textarea");r.value=t,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select();let u=!1;try{u=document.execCommand("copy")}catch{u=!1}return document.body.removeChild(r),i?.focus(),u}const CE=2e3;function TE(){const[t,i]=w.useState("idle");return w.useEffect(()=>{if(t==="idle")return;const u=setTimeout(()=>i("idle"),CE);return()=>clearTimeout(u)},[t]),{status:t,copy:u=>{_E(u).then(()=>i("copied"),()=>i("error"))}}}function pf(t){return t.startsWith("attach:")?"terminal":t==="app"?"desktop-app":t==="browser"?"browser":t==="remote:ws"?"remote":t.startsWith("peer:")?"peer":null}function Zy(t,i){if(t===H0)return!0;if(t===Cx||i===null)return!1;if(t===i)return!0;const r=pf(t);return r!==null&&r===pf(i)}function AE(t){switch(pf(t)){case"terminal":return"the terminal";case"desktop-app":return"the desktop app";case"browser":return"the browser";case"remote":case"peer":return"a remote device";default:return"another surface"}}function Ky(t){return t===Cx?"Automatic — loop":`from ${AE(t)}`}function Jy(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Py(t){const i=[];for(const r of t??[])r.type==="text"?i.push({type:"text",text:r.text}):r.type==="image_inline"?i.push({type:"image",data:r.data,mimeType:r.mimeType}):r.type==="audio_inline"&&i.push({type:"audio",data:r.data,mimeType:r.mimeType});return i}function zE(t){let i=Py(t.parts);return i.length===0&&typeof t.data=="string"&&(i=[{type:"text",text:t.data}]),!t.success&&t.error!==void 0&&(i=[...i,{type:"text",text:t.error}]),{content:i,...Jy(t.data)?{structuredContent:t.data}:{},isError:!t.success}}function DE(t,i){let r=Py(t.toolResultParts);return r.length===0&&t.toolResultData!==void 0&&(r=[{type:"text",text:t.toolResultData}]),{content:r,...Jy(i.structuredContent)?{structuredContent:i.structuredContent}:{},isError:t.status==="error"}}const RE="2026-01-26",rx=-32602,ME=-32601,Bc=-32e3,OE="ui/notifications/sandbox-proxy-ready",LE="ui/notifications/sandbox-resource-ready";function ea(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;const i=Object.getPrototypeOf(t);return i===null||Object.getPrototypeOf(i)===null}function UE(t){return t instanceof Error?t.message:String(t)}function qE(t){const{view:i}=t;let r=!1,u=!1,o="uninitialized",s=!1;const f=(x,S)=>{t.post({jsonrpc:"2.0",id:x,result:S})},h=(x,S,v)=>{t.post({jsonrpc:"2.0",id:x,error:{code:S,message:v}})},g=(x,S)=>{if(o!=="ready"){h(x,Bc,"This app view has not initialized.");return}const v=ea(S)?S.name:void 0,N=typeof v=="string"&&Object.hasOwn(i.callableTools,v)?i.callableTools[v]:void 0;if(!ea(S)||N===void 0){h(x,rx,"This tool is not available to this view.");return}const C=S.arguments===void 0?{}:S.arguments;if(!ea(C)){h(x,rx,"Tool arguments must be an object.");return}if(s){h(x,Bc,"Another tool call from this view is still running.");return}s=!0;let M;try{M=t.callAppTool(N,C)}catch(_){M=Promise.reject(_)}M.then(_=>{s=!1,r||f(x,zE(_))},_=>{s=!1,r||h(x,Bc,UE(_))})},m=(x,S,v)=>{switch(S){case"ui/initialize":o==="uninitialized"&&(o="initializing"),f(x,{protocolVersion:RE,hostCapabilities:{serverTools:{}},hostInfo:t.hostInfo,hostContext:t.hostContext});return;case"tools/call":g(x,v);return;case"ping":f(x,{});return;case"ui/request-display-mode":f(x,{mode:"inline"});return;default:h(x,ME,`This host does not support ${S}.`)}},y=(x,S)=>{switch(x){case OE:if(u)return;u=!0,t.post({jsonrpc:"2.0",method:LE,params:{html:i.html}});return;case"ui/notifications/initialized":if(o!=="initializing")return;o="ready",t.post({jsonrpc:"2.0",method:"ui/notifications/tool-input",params:{arguments:i.toolInput??{}}}),t.post({jsonrpc:"2.0",method:"ui/notifications/tool-result",params:t.toolResult});return;case"ui/notifications/size-changed":{const v=ea(S)?S.height:void 0;if(typeof v!="number"||!Number.isFinite(v))return;t.onHeight(Math.min(640,Math.max(48,Math.round(v))));return}default:return}};return{handleMessage(x){if(r)return;const S=t.source();if(S===null||x.source!==S)return;const v=x.data;if(!ea(v)||v.jsonrpc!=="2.0")return;const{method:N,id:C}=v;typeof N=="string"&&(C===void 0?y(N,v.params):(typeof C=="string"||typeof C=="number")&&m(C,N,v.params))},dispose(){r||(r=!0,o==="ready"&&t.post({jsonrpc:"2.0",id:"teardown",method:"ui/resource-teardown",params:{reason:"closed"}}))}}}const Wy=w.createContext(null);function BE(t){return{theme:typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",displayMode:"inline",availableDisplayModes:["inline"],containerDimensions:{maxHeight:640},platform:t,locale:typeof navigator>"u"?"en-US":navigator.language,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}const HE=160,IE="This tool returned an app view, which this window cannot show.";function e1({tool:t}){const i=w.useContext(Wy);if(t.appView===void 0)return null;const r=eE(t);return i===null||i.sandboxUrl===void 0||r===void 0?d.jsx("p",{className:"text-[13px] text-subtle",children:IE}):d.jsx(YE,{tool:t,host:i,sandboxUrl:i.sandboxUrl,viewKey:r,sourceId:t.appView.sourceId},r)}function YE({tool:t,host:i,sandboxUrl:r,viewKey:u,sourceId:o}){const[s,f]=w.useState({status:"loading"}),[h,g]=w.useState(HE),m=w.useRef(null),y=w.useRef(t);y.current=t,w.useEffect(()=>{const S=new AbortController;return f({status:"loading"}),i.readAppView(u,S.signal).then(v=>{S.signal.aborted||f({status:"ready",view:v,host:i,sandboxUrl:r,signal:S.signal})},v=>{S.signal.aborted||f({status:"failed",reason:v instanceof Error?v.message:String(v)})}),()=>{S.abort()}},[u,i.readAppView,i.callAppTool,r]);const x=s.status==="ready"&&s.host.readAppView===i.readAppView&&s.host.callAppTool===i.callAppTool&&s.sandboxUrl===r?s:null;return w.useLayoutEffect(()=>{const S=m.current;if(x===null||S===null)return;const v=x.host,N=x.view,C=qE({view:N,toolResult:DE(y.current,N),hostInfo:v.hostInfo,hostContext:BE(v.platform),post:_=>S.contentWindow?.postMessage(_,"*"),source:()=>S.contentWindow,callAppTool:(_,G)=>v.callAppTool(u,_,G,x.signal),onHeight:g}),M=_=>C.handleMessage(_);return window.addEventListener("message",M),()=>{window.removeEventListener("message",M),C.dispose()}},[x,u]),s.status==="failed"?d.jsxs("p",{className:"text-[13px] text-subtle",children:["The app from ",o," could not be shown: ",s.reason]}):x===null?d.jsxs("p",{className:"text-[13px] text-subtle",children:["Loading the app from ",o,"…"]}):d.jsxs("div",{className:"my-1 flex flex-col gap-1",children:[d.jsxs("p",{className:"text-[12px] text-subtle",children:["App from ",o]}),d.jsx("iframe",{ref:m,sandbox:"allow-scripts",src:r,title:`App from ${o}`,referrerPolicy:"no-referrer","data-testid":"app-view-frame",style:{width:"100%",height:h},className:"block rounded-lg border border-border bg-card"})]})}const VE={add:"bg-accent/10 text-foreground",remove:"bg-destructive/10 text-foreground",context:"text-muted-foreground",hunk:"text-subtle"},GE={add:"+ ",remove:"- ",context:" ",hunk:""},Hc=40,zu=500;function ax({line:t}){return d.jsx("div",{className:`whitespace-pre ${VE[t.type]}`,children:`${GE[t.type]}${t.text}`})}function Pu({diffLines:t}){const[i,r]=w.useState(!1);if(t.length<=Hc)return d.jsx("pre",{className:"overflow-x-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:t.map((f,h)=>d.jsx(ax,{line:f},h))});const u=t.slice(0,zu),o=i?u:t.slice(0,Hc),s=Math.min(t.length,zu)-Hc;return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("pre",{className:"overflow-x-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:o.map((f,h)=>d.jsx(ax,{line:f},h))}),i&&t.length>zu&&d.jsxs("p",{className:"text-[12px] text-subtle",children:[t.length-zu," more lines not shown"]}),d.jsx("button",{type:"button",onClick:()=>r(f=>!f),className:"self-start text-[12.5px] text-accent hover:underline",children:i?"Show less":`Show more (${s} more lines)`})]})}function hf(t){return t==null||typeof t=="boolean"?"":typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(hf).join(""):Gu.isValidElement(t)?hf(t.props.children):""}function t1({label:t,getText:i,className:r=""}){const{status:u,copy:o}=TE(),s=u==="copied"?"Copied":u==="error"?"Couldn't copy":"";return d.jsxs("span",{className:`inline-flex items-center ${r}`,children:[d.jsxs("button",{type:"button",onClick:()=>o(i()),className:"inline-flex items-center gap-1.5 rounded-md border border-border/60 bg-card px-2 py-1 text-[12px] font-medium text-muted-foreground shadow-sm shadow-black/5 transition-colors hover:bg-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[u==="copied"?d.jsx(ca,{size:13,strokeWidth:2}):d.jsx(WN,{size:13,strokeWidth:1.9}),d.jsx("span",{children:t})]}),d.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:s})]})}function FE({children:t}){const i=hf(t).replace(/\n$/,"");return d.jsxs("div",{className:"group/code relative my-1",children:[d.jsx("pre",{tabIndex:0,"aria-label":"Code block, horizontally scrollable",className:"gui-code-scroll overflow-x-auto rounded-xl bg-sidebar px-4 py-3.5 font-mono text-[13px] leading-[1.65] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:t}),d.jsx(t1,{label:"Copy code",getText:()=>i,className:"absolute right-2 top-2 opacity-0 transition-opacity group-hover/code:opacity-100 group-focus-within/code:opacity-100 [@media(hover:none)]:opacity-100"})]})}function $E({children:t}){return d.jsx(gw,{remarkPlugins:[TN],components:{h1:({children:i})=>d.jsx("h1",{className:"mt-6 text-[20px] font-semibold leading-snug tracking-[-0.015em] first:mt-0",children:i}),h2:({children:i})=>d.jsx("h2",{className:"mt-6 text-[17px] font-semibold leading-snug tracking-[-0.01em] first:mt-0",children:i}),h3:({children:i})=>d.jsx("h3",{className:"mt-5 text-[15px] font-semibold leading-snug first:mt-0",children:i}),p:({children:i})=>d.jsx("p",{children:i}),pre:FE,code:({className:i,children:r})=>i?d.jsx("code",{className:`font-mono ${i??""}`,children:r}):d.jsx("code",{className:"rounded-md bg-raised px-1.5 py-0.5 font-mono text-[0.85em]",children:r}),ul:({children:i})=>d.jsx("ul",{className:"ml-5 list-outside list-disc space-y-1.5 marker:text-subtle",children:i}),ol:({children:i})=>d.jsx("ol",{className:"ml-5 list-outside list-decimal space-y-1.5 marker:text-subtle",children:i}),li:({children:i})=>d.jsx("li",{className:"pl-1",children:i}),strong:({children:i})=>d.jsx("strong",{className:"font-semibold",children:i}),em:({children:i})=>d.jsx("em",{className:"italic",children:i}),a:({href:i,children:r})=>d.jsx("a",{href:i,className:"text-accent underline decoration-accent/40 underline-offset-[3px] hover:decoration-accent",target:"_blank",rel:"noopener noreferrer",children:r}),table:({children:i})=>d.jsx("div",{className:"overflow-x-auto",children:d.jsx("table",{className:"w-full border-collapse text-[14px]",children:i})}),thead:({children:i})=>d.jsx("thead",{children:i}),th:({children:i})=>d.jsx("th",{className:"border-b border-border px-3 py-2 text-left text-[13px] font-medium text-muted-foreground",children:i}),td:({children:i})=>d.jsx("td",{className:"px-3 py-2 align-top",children:i}),blockquote:({children:i})=>d.jsx("blockquote",{className:"border-l-2 border-subtle/50 pl-4 text-muted-foreground",children:i}),hr:()=>d.jsx("hr",{className:"mx-auto my-7 w-12 border-subtle/40"})},children:t})}function XE({content:t,author:i,ownDriverId:r}){const u=i&&!Zy(i,r)?Ky(i):void 0;return d.jsxs("div",{className:"flex flex-col items-end gap-1.5 pl-12",children:[u&&d.jsx("span",{className:"px-1 text-[12.5px] text-subtle",children:u}),d.jsx("div",{className:"max-w-full whitespace-pre-wrap break-words rounded-[20px] bg-raised px-4 py-2.5 text-[15px] leading-relaxed text-foreground",children:t})]})}function ux({content:t,isStreaming:i=!1}){return d.jsxs("div",{className:"group/message gui-prose",children:[d.jsx($E,{children:t}),i&&d.jsx("span",{className:"ml-1 inline-block h-2.5 w-2.5 animate-pulse rounded-full bg-foreground/70 align-middle"}),!i&&d.jsx("div",{className:"flex opacity-0 transition-opacity focus-within:opacity-100 group-hover/message:opacity-100 group-focus-within/message:opacity-100 [@media(hover:none)]:opacity-100",children:d.jsx(t1,{label:"Copy message",getText:()=>t})})]})}function QE({name:t,className:i}){const r=t.toLowerCase(),u={size:15,strokeWidth:1.75,className:i};return/(read|view|cat|open)/u.test(r)?d.jsx(r_,{...u}):/(grep|glob|search|find|list|ls)/u.test(r)?d.jsx(E_,{...u}):/(edit|write|patch|replace|create)/u.test(r)?d.jsx(Oy,{...u}):/(bash|shell|exec|run|command|terminal)/u.test(r)?d.jsx(q_,{...u}):/(web|fetch|http|url|browse)/u.test(r)?d.jsx(f_,{...u}):/(agent|task|delegate)/u.test(r)?d.jsx(IN,{...u}):d.jsx(By,{...u})}const ZE=52;function n1(t,i=ZE){if(t.length<=i)return t;const r=t.lastIndexOf("/");if(r===-1)return t;const u=t.slice(r+1),o=t.slice(0,r),s=i-u.length-2;return s<=0?`…/${u}`:`…${o.slice(o.length-s)}/${u}`}function KE(t){if(t)try{const i=JSON.parse(t);if(typeof i!="object"||i===null)return{output:t};const r=i;return{structured:t,...typeof r.output=="string"&&r.output?{output:r.output}:{},...typeof r.error=="string"&&r.error?{error:r.error}:{},...typeof r.exitCode=="number"?{exitCode:r.exitCode}:{}}}catch{return{output:t}}}const Ic=20,Yc=500;function Iu({text:t}){const[i,r]=w.useState(!1),u=t.split(`
308
+ `);if(u.length<=Ic)return d.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:t});const o=u.slice(0,Yc);return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:(i?o:u.slice(0,Ic)).join(`
309
+ `)}),i&&u.length>Yc&&d.jsxs("p",{className:"text-[12px] text-subtle",children:[u.length-Yc," more lines"]}),d.jsx("button",{type:"button",onClick:()=>r(s=>!s),className:"self-start text-[12.5px] text-accent hover:underline",children:i?"Show less":`Show more (${u.length-Ic} more lines)`})]})}function JE({tool:t}){return d.jsxs("div",{className:"flex flex-col gap-2",children:[t.executionId&&d.jsx("code",{className:"text-[12px] text-subtle",children:t.executionId}),t.toolResultParts?.map((i,r)=>{switch(i.type){case"text":return d.jsx(Iu,{text:i.text},r);case"image_inline":return/^image\/(png|jpeg|gif|webp)$/.test(i.mimeType)?d.jsx("img",{src:`data:${i.mimeType};base64,${i.data}`,alt:`Observation from ${t.name}`,className:"max-h-96 max-w-full object-contain"},r):d.jsxs("p",{children:["Image preview unavailable (",i.mimeType,")."]},r);case"image_uri":return d.jsxs("div",{children:[d.jsx("p",{children:"Image reference; an admitted read is required."}),d.jsx("code",{children:i.uri})]},r);case"resource_link":return d.jsxs("div",{children:[d.jsx("p",{children:i.title??i.name}),d.jsx("code",{children:i.uri}),d.jsx("p",{children:"An admitted read is required."})]},r);case"resource_embedded":return d.jsxs("div",{children:[d.jsx("code",{children:i.uri}),i.text!==void 0?d.jsx(Iu,{text:i.text}):d.jsxs("p",{children:["Embedded binary resource (",i.mimeType??"unknown type","); preview unavailable."]})]},r);case"audio_inline":return d.jsxs("p",{children:["Audio preview unavailable (",i.mimeType,")."]},r)}})]})}function l1({tool:t}){const i=t.status==="running",r=t.status==="error",[u,o]=w.useState(!1),s=KE(t.toolResultData),f=t.diffLines!==void 0&&t.diffLines.length>0,h=!!s?.output||!!s?.error||!!s?.structured,g=!!t.toolResultParts?.length,m=f||h||g,y=t.commandName?`Ran /${t.commandName}`:t.name;return d.jsxs("div",{className:"flex flex-col text-[14px]",children:[d.jsxs("button",{type:"button",disabled:!m,"aria-expanded":m?u:void 0,onClick:()=>m&&o(x=>!x),className:`group -mx-2 flex min-w-0 items-center gap-2.5 rounded-lg px-2 py-1 text-left ${m?"hover:bg-hover":"cursor-default"}`,children:[d.jsx(QE,{name:t.name,className:`flex-shrink-0 ${r?"text-destructive":"text-subtle"}`}),d.jsx("span",{className:`flex-shrink-0 font-medium ${i?"gui-shimmer":r?"text-destructive":"text-muted-foreground"}`,children:y}),t.displayPath?d.jsx("span",{className:"min-w-0 flex-1 break-all font-mono text-[12.5px] text-subtle",title:t.displayPath,children:n1(t.displayPath)}):typeof t.input=="string"&&t.input&&d.jsx("span",{className:"min-w-0 truncate font-mono text-[12.5px] text-subtle",children:t.input}),d.jsxs("span",{className:"ml-auto flex flex-shrink-0 items-center gap-1.5 text-[12.5px] text-subtle",children:[i?d.jsx(Hf,{size:14,className:"animate-spin","aria-label":"running"}):r?d.jsx("span",{className:"text-destructive",children:"failed"}):d.jsx(ca,{size:14,"aria-label":"done"}),m&&d.jsx(Ku,{size:13,className:`transition-transform ${u?"rotate-90":""}`})]})]}),u&&m&&d.jsxs("div",{className:"flex flex-col gap-1 pb-1 pl-[25px] pt-0.5",children:[f&&d.jsx(Pu,{diffLines:t.diffLines}),!f&&s?.output&&d.jsx(Iu,{text:s.output}),s?.error&&d.jsx("p",{className:"font-mono text-[12.5px] text-destructive",children:s.error}),typeof s?.exitCode=="number"&&d.jsxs("p",{className:"text-[12px] text-subtle",children:["exit ",s.exitCode]}),s?.structured&&d.jsx(Iu,{text:s.structured}),g&&d.jsx(JE,{tool:t})]})]})}const sx=12,ox=280,PE={success:{dot:"bg-accent",text:"text-foreground/90"},error:{dot:"bg-destructive",text:"text-destructive"},info:{dot:"bg-subtle",text:"text-muted-foreground"}};function WE({entry:t}){const i=t.content.split(`
310
+ `),r=w.useRef(null),[u,o]=w.useState(!1),[s,f]=w.useState(!1);w.useLayoutEffect(()=>{const S=r.current;S&&o(S.scrollHeight>ox)},[t.content]);const h=i.length>sx,g=h||u,m=g&&!s,y=m&&h?i.slice(0,sx).join(`
311
+ `):t.content,x=PE[t.tone];return d.jsxs("div",{"data-testid":"command-output","data-tone":t.tone,className:"overflow-hidden rounded-xl bg-card",children:[d.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3 text-[13px]",children:[d.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${x.dot}`}),d.jsxs("span",{className:"font-mono font-medium text-foreground",children:["/",t.name]})]}),d.jsxs("div",{className:"relative",children:[d.jsx("pre",{ref:r,style:m?{maxHeight:ox}:void 0,className:`overflow-hidden whitespace-pre-wrap break-words px-4 pb-3 pt-1.5 leading-[1.65] ${g?"font-mono text-[13px]":"font-sans text-[14.5px]"} ${x.text}`,children:y}),m&&d.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-12 bg-gradient-to-t from-card to-transparent"})]}),g&&d.jsxs("button",{type:"button",onClick:()=>f(S=>!S),className:"flex w-full items-center gap-1.5 px-4 pb-2.5 pt-1 text-left text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(My,{size:14,className:s?"rotate-180":""}),s?"Show less":`Show all ${i.length} lines`]})]})}function eC({tools:t}){const[i,r]=w.useState(!1),u=t.filter(f=>!f.internal),o=u.filter(f=>f.status==="error").length,s=[...new Set(u.map(f=>f.commandName?`/${f.commandName}`:f.name))].join(", ");return u.length===0?null:d.jsxs("div",{className:"text-[14px]",children:[d.jsxs("button",{type:"button","aria-expanded":i,onClick:()=>r(f=>!f),className:"group -mx-2 flex max-w-full items-center gap-2.5 rounded-lg px-2 py-1 text-left text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(By,{size:15,strokeWidth:1.75,className:"flex-shrink-0 text-subtle"}),d.jsxs("span",{className:"flex-shrink-0",children:[u.length," tool ",u.length===1?"call":"calls"]}),d.jsx("span",{className:"min-w-0 truncate text-subtle",children:s}),o>0&&d.jsxs("span",{className:"flex-shrink-0 rounded-md bg-destructive/12 px-1.5 text-[12.5px] text-destructive",children:[o," failed"]}),d.jsx(Ku,{size:14,className:`flex-shrink-0 text-subtle transition-transform ${i?"rotate-90":""}`})]}),u.filter(f=>f.appView!==void 0).map(f=>d.jsx("div",{className:"pl-[25px]",children:d.jsx(e1,{tool:f})},f.id)),i&&d.jsx("div",{className:"mt-0.5 flex flex-col pl-[25px]",children:u.map(f=>d.jsx(l1,{tool:f},f.id))})]})}function tC({files:t}){const[i,r]=w.useState(null);return d.jsxs("div",{className:"flex flex-col gap-0.5 rounded-lg bg-card px-2 py-1.5 text-[13px]",children:[d.jsx("p",{className:"px-1 text-[12px] font-medium text-muted-foreground",children:"Changed files"}),t.map(u=>d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("button",{type:"button","aria-expanded":i===u.path,onClick:()=>r(o=>o===u.path?null:u.path),className:"flex min-w-0 items-center gap-2 rounded-md px-1 py-1 text-left hover:bg-hover",children:[d.jsx("span",{className:"min-w-0 flex-1 break-all font-mono text-[12.5px] text-foreground",title:u.path,children:n1(u.path)}),d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-accent",children:["+",u.added]}),d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-destructive",children:["-",u.removed]})]}),i===u.path&&d.jsx("div",{className:"pl-2",children:d.jsx(Pu,{diffLines:u.diffLines})})]},u.path))]})}function nC(){return d.jsx("p",{className:"gui-shimmer w-fit text-[15px] font-medium",children:"Thinking…"})}const lC=80;function iC({messages:t,activeTools:i,streamingText:r,isThinking:u,ownDriverId:o}){const s=w.useRef(null),f=w.useRef(!0),[h,g]=w.useState(!0),[m,y]=w.useState(!1),x=_=>{f.current=_,g(_)};w.useLayoutEffect(()=>{if(f.current){const _=s.current;_&&(_.scrollTop=_.scrollHeight),x(!0),y(!1)}else y(!0)},[t.length,r,u,i.length]);const S=()=>{const _=s.current;if(!_)return;const G=_.scrollHeight-_.scrollTop-_.clientHeight<=lC;x(G),G&&y(!1)},v=()=>{const _=s.current;_&&(_.scrollTop=_.scrollHeight),x(!0),y(!1)},N=t.length===0&&!u&&i.length===0&&!r,C=u||r.length>0||i.some(_=>_.status==="running"),M=!h&&(m||C);return d.jsxs("div",{className:"agent-ui relative flex h-full min-h-0 flex-col",children:[d.jsx("main",{ref:s,onScroll:S,className:"min-h-0 flex-1 overflow-y-auto","aria-label":"Conversation",children:d.jsxs("div",{className:"mx-auto flex w-full max-w-[760px] flex-col gap-6 px-6 pb-6 pt-8",children:[N&&d.jsx("div",{className:"flex h-full items-center justify-center",children:d.jsx("p",{className:"text-[14px] text-subtle",children:"No messages yet"})}),t.map(_=>{switch(_.role){case"user":return d.jsx(XE,{content:_.content,author:_.author,ownDriverId:o},_.id);case"assistant":return d.jsx(ux,{content:_.content},_.id);case"command":return d.jsx(WE,{entry:_},_.id);case"tools":return d.jsx(eC,{tools:_.tools},_.id);case"changed-files":return d.jsx(tC,{files:_.files},_.id)}}),u&&!r&&d.jsx(nC,{}),i.some(_=>!_.internal)&&d.jsx("div",{className:"flex flex-col",children:i.filter(_=>!_.internal).map(_=>d.jsxs(Gu.Fragment,{children:[d.jsx(l1,{tool:_}),_.appView!==void 0&&_.status!=="running"&&d.jsx("div",{className:"pl-[25px]",children:d.jsx(e1,{tool:_})})]},_.id))}),r&&d.jsx(ux,{content:r,isStreaming:!0})]})}),M&&d.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-4 flex justify-center",children:d.jsxs("button",{type:"button",onClick:v,className:"pointer-events-auto flex items-center gap-1.5 rounded-full bg-primary px-3.5 py-2 text-[13px] font-medium text-primary-foreground shadow-lg shadow-black/25 hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[d.jsx(UN,{size:14,strokeWidth:2.25}),"Jump to latest"]})})]})}const cx='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';let ta=[];function fa({open:t,onClose:i,title:r,children:u,destructive:o=!1,panelClassName:s,describedById:f,restoreFocusTo:h,role:g="dialog"}){const m=w.useRef(null),y=w.useRef(null),x=w.useId(),S=w.useRef(Symbol("dialog"));return w.useEffect(()=>{if(!t)return;y.current=h??document.activeElement;const v=m.current;return(v?.querySelector(cx)??v)?.focus(),()=>{y.current?.focus?.()}},[t]),w.useEffect(()=>{if(!t)return;const v=S.current;return ta.push(v),()=>{ta=ta.filter(N=>N!==v)}},[t]),w.useEffect(()=>{if(!t)return;const v=S.current,N=()=>ta[ta.length-1]===v,C=M=>{if(!N())return;if(M.key==="Escape"){M.stopImmediatePropagation(),i();return}if(M.key!=="Tab")return;const _=m.current;if(!_)return;const G=Array.from(_.querySelectorAll(cx));if(G.length===0)return;const U=G[0],Z=G[G.length-1];M.shiftKey&&document.activeElement===U?(M.preventDefault(),Z?.focus()):!M.shiftKey&&document.activeElement===Z&&(M.preventDefault(),U?.focus())};return document.addEventListener("keydown",C,!0),()=>document.removeEventListener("keydown",C,!0)},[t,i]),t?d.jsx("div",{className:"agent-ui fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[2px]",onMouseDown:v=>{o||v.target===v.currentTarget&&i()},children:d.jsxs("div",{ref:m,role:g,"aria-modal":"true","aria-labelledby":x,...f?{"aria-describedby":f}:{},tabIndex:-1,className:s??"flex max-h-[85vh] w-full max-w-lg flex-col rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsx("h2",{id:x,className:"sr-only",children:r}),u]})}):null}const Ff="inline-flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-[14px] font-medium transition-colors",rC=`${Ff} bg-primary text-primary-foreground hover:opacity-90`,aC=`${Ff} bg-raised text-foreground hover:bg-hover`,uC=`${Ff} bg-destructive text-destructive-foreground hover:opacity-90`;function Ll({open:t,title:i,body:r,confirmLabel:u,cancelLabel:o="Cancel",destructive:s=!1,onConfirm:f,onCancel:h,restoreFocusTo:g}){const m=w.useId();return d.jsxs(fa,{open:t,onClose:h,title:i,destructive:s,role:s?"alertdialog":"dialog",describedById:m,restoreFocusTo:g,panelClassName:"w-full max-w-sm rounded-2xl bg-card p-5 text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsx("p",{className:"text-[15px] font-medium text-foreground",children:i}),d.jsx("p",{id:m,className:"mt-2 text-[13.5px] text-muted-foreground",children:r}),d.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d.jsx("button",{type:"button",className:aC,onClick:h,children:o}),d.jsx("button",{type:"button",className:s?uC:rC,onClick:f,children:u})]})]})}const sC={satisfied:"Satisfied","max-iterations":"Stopped — reached the iteration limit",cancelled:"Cancelled","no-progress":"Stopped — no progress"};function oC(t){return t.status==="active"?"Active":t.status==="satisfied"?"Satisfied":t.stopReason?sC[t.stopReason]:"Stopped"}const i1=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function cC(t){return t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})}function fx(t,i){return t.getFullYear()===i.getFullYear()&&t.getMonth()===i.getMonth()&&t.getDate()===i.getDate()}function fC(t,i=new Date){const r=new Date(t);if(Number.isNaN(r.getTime()))return"Unknown";const u=cC(r);if(fx(r,i))return`Today ${u}`;const o=new Date(i);if(o.setDate(i.getDate()+1),fx(r,o))return`Tomorrow ${u}`;const s=new Date(i);return s.setDate(i.getDate()+6),r.getTime()>i.getTime()&&r.getTime()<=s.getTime()?`${i1[r.getDay()]} ${u}`:`${r.toLocaleDateString("en-US",{month:"short",day:"numeric"})} ${u}`}function dC(t){const i=t.trim().split(/\s+/);if(i.length!==5)return;const[r,u,o,s,f]=i;if(o!=="*"||s!=="*"||!/^\d{1,2}$/.test(r)||!/^\d{1,2}$/.test(u))return;const h=`${u.padStart(2,"0")}:${r.padStart(2,"0")}`;if(f==="*")return`Every day at ${h}`;if(f==="1-5")return`Every weekday at ${h}`;if(f==="0,6"||f==="6,0")return`Every weekend at ${h}`;if(/^\d$/.test(f)){const g=i1[Number(f)];return g?`Every ${g} at ${h}`:void 0}}function pC(t,i=new Date){if(t.nextFireAt)return fC(t.nextFireAt,i);const r=t.schedule?.cronExpression;return r?dC(r)??"Repeats":"—"}function r1(t){return t.schedule?.agentInstruction??t.label}const hC={sleeping:"Active",paused:"Paused",running:"Running",queued:"Queued",cancelled:"Deleted",failed:"Failed",completed:"Done",waiting_permission:"Needs you"};function mC(t){return hC[t.status]??t.status}function a1(t,i){return t==="completed"&&(i??0)>0}function gC(t){return u1(t.status,t.attention,t.deniedToolCalls)}function u1(t,i,r){return i==="permission"||t==="waiting_permission"?{label:"Needs you",tone:"warning"}:i==="failed"||t==="failed"?{label:"Failed",tone:"destructive"}:a1(t,r)?{label:"Needs permission",tone:"warning"}:t==="completed"?{label:"Done",tone:"muted"}:t==="cancelled"?{label:"Stopped",tone:"muted"}:t==="queued"?{label:"Queued",tone:"muted"}:t==="running"?{label:"Running",tone:"muted"}:null}function xC({tasks:t,schedules:i=[],goal:r=null,onPauseSchedule:u,onResumeSchedule:o,onDeleteSchedule:s,onCancelGoal:f,className:h,onSelect:g,onReturnToConversation:m,onStop:y,selectedEntryId:x}){const S=t.filter(_=>_.status==="running").length,v=i.filter(_=>_.status!=="cancelled"),[N,C]=w.useState(null),M=v.find(_=>_.id===N)??null;return d.jsxs("div",{className:`agent-ui flex flex-col overflow-hidden ${h??""}`,children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[d.jsx("span",{className:"text-[14px] font-medium text-foreground",children:"Agents"}),S>0&&d.jsxs("span",{className:"ml-auto text-[13px] tabular-nums text-subtle",children:[S," running"]})]}),d.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto px-3 pb-3",children:[t.length>0&&d.jsx("div",{className:"space-y-2",children:t.map(_=>d.jsx(yC,{entry:_,selected:_.id===x,onOpen:_.kind==="main_thread"?m:g&&(()=>g(_)),onStop:y&&_.controls?.includes("cancel")?()=>y(_):void 0},_.id))}),v.length>0&&d.jsxs("div",{children:[d.jsx("p",{className:"px-0.5 pb-1.5 text-[12px] font-medium uppercase tracking-wide text-subtle",children:"Scheduled"}),d.jsx("div",{className:"space-y-2",children:v.map(_=>d.jsx(bC,{task:_,onPause:u,onResume:o,onRequestDelete:()=>C(_.id)},_.id))})]}),r&&d.jsxs("div",{children:[d.jsx("p",{className:"px-0.5 pb-1.5 text-[12px] font-medium uppercase tracking-wide text-subtle",children:"Goal"}),d.jsx(vC,{goal:r,onCancel:f})]})]}),d.jsx(Ll,{open:M!==null,title:"Delete this schedule?",body:M?`"${r1(M)}" will stop running. This cannot be undone.`:"",confirmLabel:"Delete",destructive:!0,onConfirm:()=>{M&&s?.(M.id),C(null)},onCancel:()=>C(null)})]})}function yC({entry:t,selected:i,onOpen:r,onStop:u}){const o=t.attention==="permission"||t.status==="waiting_permission",s=t.attention==="failed"||t.status==="failed";return d.jsxs("div",{role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r,onKeyDown:r?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),r())}:void 0,"aria-label":r?t.title:void 0,className:`rounded-xl px-3.5 py-3 transition-opacity duration-500 ${o?"bg-warning/10":s?"bg-destructive/10":"bg-card"} ${t.status==="completed"?"opacity-60":""} ${i?"ring-1 ring-inset ring-accent":""} ${r?"cursor-pointer":""}`,children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx(SC,{status:t.status,attention:t.attention,deniedToolCalls:t.deniedToolCalls}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.title}),d.jsx(wC,{status:t.status,attention:t.attention,deniedToolCalls:t.deniedToolCalls}),u&&d.jsx("button",{type:"button","aria-label":`Stop ${t.title}`,onClick:f=>{f.stopPropagation(),u()},className:"flex-shrink-0 rounded-md px-1.5 py-px text-[12px] text-subtle hover:bg-destructive/10 hover:text-destructive",children:"Stop"})]}),t.currentAction&&d.jsx("p",{className:"mt-1.5 truncate pl-[26px] text-[13px] leading-snug text-muted-foreground",children:t.currentAction}),t.preview&&d.jsx("p",{className:"mt-1 truncate pl-[26px] font-mono text-[12px] leading-snug text-subtle",children:t.preview})]})}function bC({task:t,onPause:i,onResume:r,onRequestDelete:u}){const o=t.status==="paused";return d.jsxs("div",{className:"rounded-xl bg-card px-3.5 py-3",children:[d.jsx("p",{className:"truncate text-[14px] font-medium text-foreground",children:r1(t)}),d.jsxs("p",{className:"mt-1 text-[13px] text-muted-foreground",children:[pC(t)," · ",mC(t)]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[o?d.jsxs("button",{type:"button",onClick:()=>r?.(t.id),className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(j_,{size:11,fill:"currentColor","aria-hidden":"true"}),"Resume"]}):d.jsxs("button",{type:"button",onClick:()=>i?.(t.id),className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(S_,{size:11,fill:"currentColor","aria-hidden":"true"}),"Pause"]}),d.jsx("button",{type:"button",onClick:u,className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-destructive hover:bg-destructive/10",children:"Delete…"})]})]})}function vC({goal:t,onCancel:i}){return d.jsxs("div",{className:"rounded-xl bg-card px-3.5 py-3",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx(qy,{size:16,strokeWidth:1.9,className:"flex-shrink-0 text-accent"}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.objective})]}),d.jsx("p",{className:"mt-1.5 pl-[26px] text-[13px] text-muted-foreground",children:oC(t)}),t.status==="active"&&d.jsx("div",{className:"mt-2 pl-[26px]",children:d.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(Ju,{size:11,fill:"currentColor","aria-hidden":"true"}),"Cancel goal"]})})]})}function SC({status:t,attention:i,deniedToolCalls:r}){const u={size:16,strokeWidth:1.9,className:"flex-shrink-0"};return i==="permission"||t==="waiting_permission"?d.jsx(df,{...u,className:`${u.className} text-warning`}):i==="failed"||t==="failed"?d.jsx(Vg,{...u,className:`${u.className} text-destructive`}):a1(t,r)?d.jsx(df,{...u,className:`${u.className} text-warning`}):t==="running"?d.jsx(Hf,{...u,className:`${u.className} animate-spin text-muted-foreground`}):t==="completed"?d.jsx(QN,{...u,className:`${u.className} text-success`}):t==="cancelled"?d.jsx(Vg,{...u,className:`${u.className} text-subtle`}):d.jsx(KN,{...u,className:`${u.className} text-subtle`})}const kC={warning:"bg-warning/15 text-warning",destructive:"bg-destructive/12 text-destructive",muted:"text-subtle"};function wC({attention:t,status:i,deniedToolCalls:r}){const u=u1(i,t,r);return!u||u.label==="Running"?null:d.jsx("span",{className:`flex-shrink-0 rounded-md px-1.5 py-px text-[12px] ${kC[u.tone]}`,children:u.label})}function jC({state:t}){if(!t.agentSwitcherOpen)return null;const i=t.agentSwitcherStatus==="loading"&&t.agentDefinitions.length===0;return d.jsxs(fa,{open:!0,onClose:()=>t.closeAgentSwitcher(),title:"Switch agent",panelClassName:"flex max-h-[min(560px,85vh)] w-full max-w-md flex-col overflow-hidden rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[d.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Switch agent"}),d.jsx("button",{type:"button","aria-label":"Close",onClick:()=>t.closeAgentSwitcher(),className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(nr,{size:17,strokeWidth:1.75})})]}),t.agentSwitchMessage?d.jsx("p",{role:"status",className:"mx-4 mt-3 rounded-lg bg-raised px-3 py-2 text-[13px] text-foreground",children:t.agentSwitchMessage}):null,d.jsx("ul",{className:"min-h-0 flex-1 overflow-y-auto p-2",children:i?d.jsx("li",{className:"px-3 py-4 text-[13.5px] text-muted-foreground",children:"Loading agents…"}):t.agentDefinitions.length===0?d.jsx("li",{className:"px-3 py-4 text-[13.5px] text-muted-foreground",children:"No agents are configured on this host."}):t.agentDefinitions.map(r=>{const u=r.name===t.currentAgentType;return d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>t.selectAgent(r.name),"aria-current":u?"true":void 0,className:"flex w-full items-start gap-3 rounded-xl px-3 py-2.5 text-left hover:bg-hover",children:[d.jsx("span",{className:"mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center",children:u?d.jsx(ca,{size:16,strokeWidth:2,className:"text-accent"}):null}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate text-[14px] font-medium text-foreground",children:r.name}),d.jsx("span",{className:"block truncate text-[13px] text-muted-foreground",children:r.description}),d.jsx("span",{className:"block truncate text-[12px] text-subtle",children:r.definedIn})]})]})},r.name)})})]})}function NC(t){return t!==null&&t.matches("input, textarea, select, [contenteditable]")}function mf(t,i){return t==="provider-profile-action"&&i==="delete"}function _C(t){const i=t.maxSelect??1;if(i<=1)return;const r=(t.options??[]).filter(s=>!mf(t.id,s.value)),u=new Set(t.default?.values??[]),o=r.filter(s=>u.has(s.value)).slice(0,i);return{min:t.minSelect??1,max:i,options:r,defaults:new Set(o.map(s=>s.value))}}function Vc({prompts:t,onAnswerPermission:i,onAnswerAsk:r,ownDriverId:u=null,layout:o="modal",armDelayMs:s=450,onFocusReturn:f}){const h=t[0],g=h?.id,m=w.useRef(null),y=w.useRef(null),x=h?.kind==="ask"&&h.request.allowFreeText===!0,[S,v]=w.useState(void 0),[N,C]=w.useState(!1),[M,_]=w.useState(!1),G=w.useRef(null),U=w.useRef(!1),[Z,ne]=w.useState(void 0);w.useEffect(()=>{if(g===void 0||s<=0)return;const se=setTimeout(()=>v(g),s);return()=>clearTimeout(se)},[g,s]);const D=g!==void 0&&(s<=0||S===g);if(w.useLayoutEffect(()=>{const se=m.current;if(!se)return;const pe=document.activeElement,Ge=!!(pe&&pe!==se&&se.contains(pe)),Xt=U.current&&pe===document.body;(Ge||Xt)&&se.focus()},[g]),w.useEffect(()=>{D&&(NC(document.activeElement)||(x?y.current:m.current)?.focus())},[D,g,x]),w.useEffect(()=>{if(g!==void 0){U.current=!1;return}C(!1),U.current&&(U.current=!1,f?.())},[g,f]),!h)return null;if(h.kind==="ask"&&h.request.id==="provider-delete")return d.jsx(Ll,{open:!0,title:h.request.title,body:"This removes it from your provider profiles. This can't be undone.",confirmLabel:"Delete",destructive:!0,onCancel:()=>r(h.id,{type:"cancelled"}),onConfirm:()=>r(h.id,{type:"answer",values:["yes"]})});const H=h.requesterDriverId&&!Zy(h.requesterDriverId,u)?Ky(h.requesterDriverId):void 0,le=o==="dock",W=()=>{const se=m.current,pe=document.activeElement;U.current=!!(se&&pe&&se.contains(pe))},O=(se,pe)=>{W(),i(se,pe)},ae=(se,pe)=>{W(),G.current?.clear(),r(se,pe)},ee=h.kind==="ask"?_C(h.request):void 0,xe=Z?.promptId===h.id?Z.values:ee?.defaults,oe=ee&&xe?ee.options.map(se=>se.value).filter(se=>xe.has(se)):[],J=ee!==void 0&&oe.length>=ee.min,L=se=>{ee&&ne(pe=>{const Ge=new Set(pe?.promptId===h.id?pe.values:ee.defaults);return Ge.has(se)?Ge.delete(se):Ge.size<ee.max&&Ge.add(se),{promptId:h.id,values:Ge}})},P=()=>{J&&ae(h.id,{type:"answer",values:oe})},fe=se=>{x&&(se.target.closest("button, input")||y.current?.focus())},ce=se=>pe=>{!D&&pe.detail===0||se()},E=se=>{if(se.key==="Escape"){se.preventDefault(),h.kind==="permission"?O(h.id,!1):ae(h.id,{type:"cancelled"});return}if(!D)return;if(ee&&se.key==="Enter"){se.target===se.currentTarget&&(se.preventDefault(),P());return}const pe=Number(se.key)-1;if(!Number.isInteger(pe)||pe<0)return;if(h.kind==="permission"){pe<2&&O(h.id,pe===0);return}const Ge=(h.request.options??[]).filter(Xt=>!mf(h.request.id,Xt.value))[pe];Ge&&(ee?L(Ge.value):ae(h.id,{type:"answer",values:[Ge.value]}))},T=h.kind==="permission"&&(h.diffLines?.length??0)>0,V=h.kind==="permission"&&typeof h.toolArgs.command=="string"?h.toolArgs.command:void 0,j=h.kind==="permission"&&h.toolName==="Bash"&&V!==void 0,re=h.kind==="ask"?h.request.id:void 0,me=h.kind==="ask"?h.request.options??[]:[],de=me.find(se=>mf(re,se.value)),je=de?me.filter(se=>se!==de):me,qe=x&&M?"Enter to submit · Esc to cancel":ee&&me.length>0?"1–9 toggle · Enter submit · Esc cancel":me.length>0?"1–9 choose · Esc cancel":"Esc cancels";return d.jsx("div",{className:le?"agent-ui gui-rise flex-shrink-0":"agent-ui fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[2px]",children:d.jsx("div",{ref:m,tabIndex:le?0:-1,onKeyDown:le?E:void 0,onClick:fe,onFocus:()=>C(!0),onBlur:se=>{se.currentTarget.contains(se.relatedTarget)||C(!1)},role:"dialog","aria-label":"pending question","data-armed":le?String(D):void 0,className:`w-full rounded-2xl bg-card text-[14px] text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ${le?"p-4":"max-w-lg p-5"}`,children:h.kind==="permission"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("span",{className:"mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-warning/15 text-warning",children:d.jsx(df,{size:17,strokeWidth:1.9})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["Permission request",H&&d.jsxs(d.Fragment,{children:[" ","· ",d.jsx("span",{className:"text-foreground",children:H})]})]}),h.requester?.kind==="background-agent"?d.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:["Background agent ",d.jsx("span",{className:"font-semibold",children:h.requester.label})," ","wants to"," ",T?d.jsxs(d.Fragment,{children:[h.toolName.toLowerCase()," ",d.jsx("span",{className:"font-mono font-semibold",children:h.diffFile})]}):d.jsxs(d.Fragment,{children:["run ",d.jsx("span",{className:"font-semibold",children:h.toolName})]})]}):T?d.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:[h.toolName," ",d.jsx("span",{className:"font-mono font-semibold",children:h.diffFile})]}):d.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:["Allow ",d.jsx("span",{className:"font-semibold",children:h.toolName})," to run?"]}),T?d.jsx("div",{className:"mt-2.5",children:d.jsx(Pu,{diffLines:h.diffLines})}):j?d.jsx(zC,{command:V,cwd:h.cwd}):d.jsx(AC,{args:h.toolArgs})]})]}),d.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 pl-11",children:[d.jsxs("button",{type:"button","aria-keyshortcuts":le?"1":void 0,className:Mu,onClick:ce(()=>O(h.id,!0)),children:[d.jsx("span",{children:"Allow"}),le&&d.jsx(Gc,{children:"1"})]}),d.jsxs("button",{type:"button","aria-keyshortcuts":le?"2":void 0,className:dx,onClick:ce(()=>O(h.id,!1)),children:[d.jsx("span",{children:"Deny"}),le&&d.jsx(Gc,{children:"2"})]}),le&&d.jsx(px,{hasFocus:N,armed:D,armedText:"1 allow · 2 deny · Esc deny"})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("span",{className:"mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-accent/15 text-accent",children:d.jsx(h_,{size:17,strokeWidth:1.9})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[H&&d.jsx("p",{className:"text-[13px] text-muted-foreground",children:d.jsx("span",{className:"text-foreground",children:H})}),d.jsx("p",{className:"text-[15px] font-medium text-foreground",children:h.request.title}),h.request.description?d.jsx("p",{className:"mt-1 leading-relaxed text-muted-foreground",children:h.request.description}):null]})]}),d.jsxs("div",{className:"mt-4 flex flex-col gap-3 pl-11",children:[je.length>0&&d.jsx("div",{className:"flex flex-wrap items-start gap-3",children:je.map((se,pe)=>d.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[d.jsxs("button",{type:"button","aria-keyshortcuts":le&&pe<9?String(pe+1):void 0,"aria-pressed":ee?oe.includes(se.value):void 0,className:(ee?oe.includes(se.value):pe===0)?Mu:dx,onClick:ce(()=>ee?L(se.value):ae(h.id,{type:"answer",values:[se.value]})),children:[ee&&(oe.includes(se.value)?d.jsx(O_,{size:15,strokeWidth:2}):d.jsx(Ju,{size:15,strokeWidth:2})),d.jsx("span",{children:se.label}),le&&pe<9&&d.jsx(Gc,{children:pe+1})]}),se.description&&d.jsx("p",{className:"pl-0.5 text-[11.5px] leading-snug text-subtle",children:se.description})]},se.value))}),de&&d.jsx("div",{className:"flex flex-wrap items-start gap-3",children:d.jsx("button",{type:"button",className:CC,onClick:ce(()=>ae(h.id,{type:"answer",values:[de.value]})),children:d.jsx("span",{children:de.label})})}),x&&d.jsxs("div",{className:"flex flex-col gap-1.5",children:[me.length>0&&d.jsx("p",{className:"text-[12.5px] text-subtle",children:"or type an answer"}),d.jsx(TC,{ref:G,inputRef:y,masked:h.request.masked===!0,placeholder:h.request.placeholder,allowEmpty:h.request.allowEmpty===!0,wrapClick:ce,onSubmit:se=>ae(h.id,{type:"answer",values:[],text:se}),onCancel:()=>ae(h.id,{type:"cancelled"}),onFocusChange:_},h.id)]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[ee&&d.jsx("button",{type:"button",className:`${Mu} disabled:opacity-60`,disabled:!J,onClick:ce(P),children:J?"Submit":`Submit (min ${ee.min})`}),d.jsx("button",{type:"button",className:EC,onClick:ce(()=>ae(h.id,{type:"cancelled"})),children:"Cancel"}),le&&d.jsx(px,{hasFocus:N,armed:D,armedText:qe})]})]})]})})})}const Wu="inline-flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-[14px] font-medium transition-colors",Mu=`${Wu} bg-primary text-primary-foreground hover:opacity-90`,dx=`${Wu} bg-raised text-foreground hover:bg-hover`,EC=`${Wu} text-muted-foreground hover:bg-hover hover:text-foreground`,CC=`${Wu} bg-destructive/12 text-destructive hover:bg-destructive/20`,TC=w.forwardRef(function({masked:i,placeholder:r,allowEmpty:u,inputRef:o,wrapClick:s,onSubmit:f,onCancel:h,onFocusChange:g},m){const[y,x]=w.useState("");w.useImperativeHandle(m,()=>({clear:()=>x("")}),[]);const S=()=>{const C=y.trim();!C&&!u||(x(""),f(C))},v=()=>{x(""),h()},N=C=>{if(C.stopPropagation(),C.key==="Enter"){if(C.nativeEvent.isComposing||C.keyCode===229)return;C.preventDefault(),S()}else C.key==="Escape"&&(C.preventDefault(),v())};return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{ref:o,type:i?"password":"text",autoComplete:"off","aria-label":"answer",placeholder:r,value:y,onChange:C=>x(C.target.value),onKeyDown:N,onFocus:()=>g(!0),onBlur:()=>g(!1),className:"min-w-0 flex-1 rounded-lg bg-sidebar px-3 py-1.5 text-[14px] text-foreground placeholder:text-subtle focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"}),d.jsx("button",{type:"button",className:Mu,disabled:!y.trim()&&!u,onClick:s(S),children:"Continue"})]})});function Gc({children:t}){return d.jsx("kbd",{"aria-hidden":"true",className:"rounded bg-foreground/10 px-1 font-mono text-[11px] leading-[1.45] opacity-70",children:t})}function px({hasFocus:t,armed:i,armedText:r}){return d.jsx("p",{className:"ml-auto text-[12.5px] text-subtle",children:t?i?r:"keys answer in a moment · click to answer now":"Click to answer, or press Shift+Tab to use the keys"})}function AC({args:t}){if(t===null||typeof t!="object")return null;const i=Object.entries(t);if(i.length===0)return null;const r=i.find(([s,f])=>(s==="command"||s==="cmd")&&typeof f=="string")?.[0],u=i.filter(([s])=>s!==r),o=s=>typeof s=="string"?s:JSON.stringify(s,null,2);return d.jsxs("div",{className:"mt-2.5 max-h-48 overflow-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:[r?d.jsx("pre",{className:"whitespace-pre-wrap break-all text-foreground",children:t[r]}):null,u.length>0?d.jsx("dl",{className:`text-muted-foreground ${r?"mt-1.5":""}`,children:u.map(([s,f])=>d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("dt",{className:"flex-shrink-0 text-subtle",children:[s,":"]}),d.jsx("dd",{className:"min-w-0 whitespace-pre-wrap break-all",children:o(f)})]},s))}):null]})}function zC({command:t,cwd:i}){return d.jsxs("div",{className:"mt-2.5 max-h-48 overflow-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:[d.jsx("pre",{className:"whitespace-pre-wrap break-all text-foreground",children:t}),i&&d.jsxs("p",{className:"mt-1.5 text-muted-foreground",children:[d.jsx("span",{className:"text-subtle",children:"in "}),i]})]})}const gf=6e4,xf=60*gf,Fc=24*xf;function DC(t,i=Date.now()){const r=Date.parse(t);if(Number.isNaN(r))return"";const u=Math.max(0,i-r);return u<gf?"just now":u<xf?`${Math.floor(u/gf)}m ago`:u<Fc?`${Math.floor(u/xf)}h ago`:u<7*Fc?`${Math.floor(u/Fc)}d ago`:new Date(r).toISOString().slice(0,10)}function Mn(t){const i=t.name?.trim();if(i)return i;const r=t.title?.trim();return r||"New session"}function RC(t,i){if(t.clients===void 0)return null;const r=t.clients-(i?1:0);return r>=1?r:null}function MC({state:t,brand:i,className:r}){const u=t.sessionListing??null,o=u?.currentSessionId??null,s=u?.unreadableSessionIds??[],f=t.sessionsError?.code==="list_failed"?t.sessionsError.message:null,h=t.status==="connected",[g,m]=w.useState(null),[y,x]=w.useState(null),[S,v]=w.useState(""),[N,C]=w.useState(null),M=w.useRef(null),_=w.useRef(new Map);w.useEffect(()=>{if(g===null)return;const H=W=>{W.key==="Escape"&&m(null)},le=W=>{M.current&&!M.current.contains(W.target)&&m(null)};return document.addEventListener("keydown",H),document.addEventListener("mousedown",le),()=>{document.removeEventListener("keydown",H),document.removeEventListener("mousedown",le)}},[g]),w.useEffect(()=>{g!==null&&M.current?.querySelector('[role="menuitem"]')?.focus()},[g]);const G=(H,le,W)=>m({sessionId:H,x:le,y:W}),U=H=>{m(null),x(H.id),v(Mn(H))},Z=H=>{const le=S.trim();x(null),!(le.length===0||le===Mn(H))&&(H.id===o?t.send({type:"command",name:"rename",args:le}):t.renameSessionInList?.(H.id,le))},ne=u?.sessions??[],D=ne.find(H=>H.id===N)??null;return d.jsxs("aside",{"aria-label":"Sessions",className:`agent-ui flex w-[272px] flex-shrink-0 flex-col overflow-hidden bg-sidebar ${r??""}`,children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[i,d.jsx("button",{type:"button","aria-label":"Hide sessions",title:"Hide sessions",onClick:()=>t.setSessionSidebarOpen?.(!1),className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(g_,{size:17,strokeWidth:1.75})})]}),d.jsx("div",{className:"flex-shrink-0 px-2.5 pt-1",children:d.jsxs("button",{type:"button",disabled:!h,title:h?void 0:"Reconnecting…",onClick:()=>t.newSession?.(),className:"flex w-full items-center gap-2.5 rounded-lg px-2.5 py-2 text-[14px] font-medium text-foreground hover:bg-hover disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-transparent",children:[d.jsx(Uy,{size:16,strokeWidth:1.75,className:"text-muted-foreground"}),"New session"]})}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-2.5 pb-3 pt-4",children:[d.jsx("h2",{className:"px-2.5 pb-1.5 text-[12.5px] font-medium text-subtle",children:"Sessions"}),f!==null?d.jsx("p",{className:"px-2.5 py-1 text-[13px] leading-snug text-destructive",children:f}):null,u===null&&f===null?d.jsx("p",{className:"px-2.5 py-1 text-[13px] text-subtle",children:"Loading sessions…"}):null,d.jsxs("ul",{className:"space-y-px",children:[ne.map(H=>{const le=H.id===o,W=RC(H,le),O=y===H.id,ae=[H.live===!0?"Live":null,W!==null?`${W} ${W===1?"other":"others"}`:null].filter(J=>J!==null),ee=`session-status-${H.id}`,xe=`session-updated-${H.id}`,oe=ae.length>0?`${xe} ${ee}`:xe;return d.jsxs("li",{className:"group relative",children:[O?d.jsx("input",{autoFocus:!0,"aria-label":`Rename ${Mn(H)}`,value:S,onChange:J=>v(J.target.value),onBlur:()=>Z(H),onKeyDown:J=>{J.key==="Enter"?(J.preventDefault(),Z(H)):J.key==="Escape"&&(J.preventDefault(),x(null))},className:"w-full rounded-lg border border-accent bg-raised px-2.5 py-2 text-[14px] text-foreground outline-none"}):d.jsxs("button",{type:"button","aria-current":le?"true":void 0,"aria-label":Mn(H),"aria-describedby":oe,title:h?H.preview||H.id:"Reconnecting…",disabled:!h,onClick:()=>{le||t.switchSession?.(H.id)},onContextMenu:J=>{J.preventDefault(),G(H.id,J.clientX,J.clientY)},className:`w-full rounded-lg py-2 pl-2.5 pr-8 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-60 ${le?"bg-raised":"hover:bg-hover"}`,children:[d.jsx("span",{className:`block truncate text-[14px] leading-snug ${le?"font-medium text-foreground":"text-foreground/85"}`,children:Mn(H)}),d.jsxs("span",{className:"mt-0.5 flex items-center gap-1.5 text-[12.5px] tabular-nums text-subtle",children:[H.live===!0?d.jsx("span",{title:"Live in the host",className:"h-1.5 w-1.5 flex-shrink-0 rounded-full bg-accent",children:d.jsx("span",{className:"sr-only",children:"live"})}):null,d.jsx("span",{id:xe,children:DC(H.updatedAt)}),W!==null?d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":"true",children:"·"}),d.jsxs("span",{className:"text-muted-foreground",children:[W," ",W===1?"other":"others"]})]}):null,ae.length>0?d.jsx("span",{id:ee,className:"sr-only",children:ae.join(", ")}):null]})]}),O?null:d.jsx("button",{type:"button",ref:J=>{J?_.current.set(H.id,J):_.current.delete(H.id)},"aria-label":`More for ${Mn(H)}`,"aria-haspopup":"menu","aria-expanded":g?.sessionId===H.id,onClick:J=>{const L=J.currentTarget.getBoundingClientRect();G(H.id,L.left,L.bottom)},className:"absolute right-1 top-1/2 -translate-y-1/2 rounded-md p-1 text-muted-foreground opacity-0 hover:bg-hover hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100",children:d.jsx(t_,{size:15,strokeWidth:1.75})})]},H.id)}),s.length>0&&d.jsx("li",{children:d.jsxs("details",{className:"px-2.5 py-2 text-[12.5px] text-subtle",children:[d.jsxs("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:[s.length," older ",s.length===1?"session":"sessions"," in this folder can't be opened"]}),d.jsx("ul",{className:"mt-1.5 space-y-0.5 font-mono text-[11.5px]",children:s.map(H=>d.jsx("li",{className:"truncate",children:H},H))})]})})]})]}),d.jsx("div",{className:"flex-shrink-0 border-t border-border/60 px-2.5 py-2",children:d.jsxs("button",{type:"button","aria-label":"Settings",title:"Settings",onClick:()=>t.openSettings(),className:"flex w-full items-center gap-2.5 rounded-lg px-2.5 py-2 text-[13.5px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(Ly,{size:16,strokeWidth:1.75}),"Settings"]})}),g!==null?(()=>{const H=ne.find(le=>le.id===g.sessionId);return H?d.jsxs("div",{ref:M,role:"menu","aria-label":`Actions for ${Mn(H)}`,style:{position:"fixed",left:g.x,top:g.y},className:"gui-rise z-40 min-w-[140px] overflow-hidden rounded-lg bg-popover py-1 text-popover-foreground shadow-xl shadow-black/30",children:[d.jsxs("button",{type:"button",role:"menuitem",onClick:()=>U(H),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13.5px] hover:bg-hover",children:[d.jsx(Oy,{size:14,strokeWidth:1.75}),"Rename"]}),d.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{m(null),C(H.id)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13.5px] text-destructive hover:bg-hover",children:[d.jsx(Yf,{size:14,strokeWidth:1.75}),"Delete…"]})]}):null})():null,D!==null?d.jsx(Ll,{open:!0,title:`Delete "${Mn(D)}"?`,body:"This removes its conversation from this computer.",confirmLabel:"Delete",destructive:!0,restoreFocusTo:_.current.get(D.id)??null,onCancel:()=>C(null),onConfirm:()=>{t.deleteSession?.(D.id),C(null)}}):null]})}function OC({state:t}){const i=t.status==="connected";return d.jsxs("div",{className:"flex w-12 flex-shrink-0 flex-col items-center gap-1 bg-sidebar py-2.5",children:[d.jsx("button",{type:"button","aria-label":"Show sessions",title:"Show sessions",onClick:()=>t.setSessionSidebarOpen?.(!0),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(y_,{size:17,strokeWidth:1.75})}),d.jsx("button",{type:"button","aria-label":"New session",title:i?"New session":"Reconnecting…",disabled:!i,onClick:()=>t.newSession?.(),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-transparent",children:d.jsx(Uy,{size:16,strokeWidth:1.75})}),d.jsx("button",{type:"button","aria-label":"Settings",title:"Settings",onClick:()=>t.openSettings(),className:"mt-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(Ly,{size:16,strokeWidth:1.75})})]})}const rl=new Intl.NumberFormat("en-US"),LC=100,UC=["model","provider","surface","source"];function qC(t){return t==="activity"?"Activity":`By ${t}`}function BC(t){return t==="cli"?"Terminal":t==="remote"?"App or browser":t.split(/[-_]/).filter(i=>i.length>0).map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function HC(t){return t.length===1&&t[0]?.key==="unknown"}function IC(t){return[...UC.filter(i=>!HC(o1(t,i))),"activity"]}const YC=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"});function s1(t,i,r){const u=t.sessionListing?.sessions.find(f=>f.id===r);if(u)return Mn(u);const o=i.sessionFirstSeen?.[r],s=o?new Date(o):void 0;return s&&!Number.isNaN(s.getTime())?`Session from ${YC.format(s)}`:"Another session"}function ii({label:t,value:i,note:r}){return d.jsxs("div",{className:"rounded-2xl bg-card p-5",children:[d.jsxs("div",{className:"flex items-baseline gap-1.5 text-[13px] text-muted-foreground",children:[t,r?d.jsxs("span",{className:"text-subtle",children:["· ",r]}):null]}),d.jsx("div",{className:"mt-1.5 text-[28px] font-semibold tabular-nums tracking-[-0.02em] text-foreground",children:i})]})}function o1(t,i){return i==="model"?t.byModel:i==="provider"?t.byProvider:i==="surface"?t.bySurface:i==="source"?t.bySource:[]}function VC({state:t,report:i,breakdown:r,setBreakdown:u}){const o=IC(i),s=o.includes(r)?r:o[0]??r;return d.jsxs("section",{className:"rounded-2xl bg-card p-5",children:[d.jsx(GC,{breakdown:s,setBreakdown:u,visible:o}),d.jsx("div",{className:"mt-4 space-y-3",children:s==="activity"?d.jsx(FC,{report:i}):d.jsx($C,{state:t,report:i,breakdown:s,dimensions:o1(i,s)})})]})}function GC({breakdown:t,setBreakdown:i,visible:r}){return d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:"Breakdown"}),d.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(u=>d.jsx("button",{type:"button","aria-pressed":t===u,onClick:()=>i(u),className:`rounded-lg px-2.5 py-1 text-[13px] font-medium ${t===u?"bg-raised text-foreground":"text-muted-foreground hover:text-foreground"}`,children:qC(u)},u))})]})}function FC({report:t}){return d.jsx(d.Fragment,{children:t.byActivity.map(i=>d.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl bg-raised/60 px-3.5 py-2.5",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("span",{className:"truncate text-[14px] text-foreground",children:i.label})," ",d.jsx("span",{className:"ml-1 rounded-full bg-raised px-2 py-0.5 text-[11px] font-medium text-subtle",children:i.kind})]}),d.jsxs("span",{className:"text-[13px] tabular-nums text-muted-foreground",children:[rl.format(i.count)," calls"]})]},i.key))})}function $C({state:t,report:i,breakdown:r,dimensions:u}){return d.jsx(d.Fragment,{children:u.map(o=>d.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-3",children:[d.jsx(XC,{report:i,breakdown:r,dimension:o}),d.jsxs("span",{className:"self-start text-[13px] tabular-nums text-subtle",children:[rl.format(o.turns)," turns"]}),d.jsx(QC,{state:t,report:i,dimension:o})]},o.key))})}function XC({report:t,breakdown:i,dimension:r}){const u=t.totals.totalTokens===0?0:r.totalTokens/t.totals.totalTokens*LC;return d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex justify-between gap-3 text-[14px]",children:[d.jsx("span",{className:"truncate text-foreground",children:i==="surface"?BC(r.key):r.label}),d.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[rl.format(r.totalTokens)," tokens"]})]}),d.jsx("div",{className:"mt-2 h-1.5 overflow-hidden rounded-full bg-raised",children:d.jsx("div",{className:"h-full rounded-full bg-accent/80",style:{width:`${u}%`}})})]})}function QC({state:t,report:i,dimension:r}){return d.jsx("div",{className:"col-span-2 flex flex-wrap gap-1",children:r.sessionIds.map(u=>{const o=s1(t,i,u);return d.jsx("button",{type:"button","data-session-id":u,onClick:()=>t.requestStoredSessionUsage(u),"aria-label":`Open session ${o}`,className:"rounded-md bg-raised px-2 py-1 text-[12px] text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx("span",{className:"max-w-40 truncate align-middle",children:o})},u)})})}function ZC({state:t}){if(t.storedSessionUsageStatus==="idle")return null;const i=t.storedSessionUsageSessionId??"";return d.jsxs("section",{className:"rounded-2xl bg-card p-5","aria-label":"Session usage detail","data-session-id":i,children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:t.personalUsageReport?s1(t,t.personalUsageReport,i):"Another session"}),d.jsx(KC,{state:t})]})}function KC({state:t}){if(t.storedSessionUsageStatus==="loading")return d.jsx("p",{className:"mt-3 text-[14px] text-muted-foreground",children:"Loading trace…"});if(t.storedSessionUsageStatus==="error")return d.jsx("p",{className:"mt-3 text-[14px] text-destructive",children:t.storedSessionUsageError??"Session usage failed."});const i=t.storedSessionUsageReport;return i?d.jsxs("div",{className:"mt-3 grid gap-3 sm:grid-cols-3",children:[d.jsx(ii,{label:"Session tokens",value:rl.format(i.totalTokens)}),d.jsx(ii,{label:"Sources",value:rl.format(i.bySource.length)}),d.jsx(ii,{label:"Trace turns",value:rl.format(i.timeline.length)})]}):null}function JC(t){const{coverage:i}=t,r=[];if(i.unsupportedSessions>0){const u=i.unsupportedSessions===1?"session":"sessions",o=i.unsupportedSessions===1?"uses":"use";r.push(`${rl.format(i.unsupportedSessions)} older ${u} ${o} a format this view can't read and ${i.unsupportedSessions===1?"isn't":"aren't"} counted.`)}if(i.corruptSessions>0){const u=i.corruptSessions===1?"session":"sessions";r.push(`${rl.format(i.corruptSessions)} ${u} couldn't be read and ${i.corruptSessions===1?"isn't":"aren't"} counted.`)}if(i.legacyObservations>0){const u=i.legacyObservations===1?"record":"records";r.push(`${rl.format(i.legacyObservations)} older usage ${u} ${i.legacyObservations===1?"doesn't":"don't"} have enough detail to break down, so ${i.legacyObservations===1?"it counts":"they count"} only toward the totals.`)}return r}function PC({report:t}){const i=JC(t);return i.length===0?null:d.jsx("div",{className:"space-y-1.5 rounded-xl bg-warning/10 px-4 py-3 text-[13px] leading-relaxed text-warning",children:i.map(r=>d.jsx("p",{children:r},r))})}const ai=new Intl.NumberFormat("en-US"),WC=100,hx=2,eT=5,tT=2;function $c({children:t}){return d.jsx("div",{className:"flex min-h-64 items-center justify-center rounded-2xl bg-card px-8 text-center text-[15px] text-muted-foreground",children:t})}function nT({period:t,setPeriod:i,requestCurrentSessionUsage:r}){return d.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[13px] font-medium text-accent",children:"Local analytics"}),d.jsx("h1",{className:"mt-1 text-[28px] font-semibold tracking-[-0.02em]",children:"Personal usage"}),d.jsx("p",{className:"mt-1 text-[15px] text-muted-foreground",children:"Cross-session activity grouped by local calendar day."})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("button",{type:"button",onClick:r,className:"rounded-lg bg-raised px-3 py-2 text-[13px] font-medium text-foreground hover:bg-hover",children:"Current session trace"}),d.jsx(lT,{period:t,setPeriod:i})]})]})}function lT({period:t,setPeriod:i}){return d.jsx("div",{className:"flex rounded-lg bg-raised p-0.5",children:["7d","30d"].map(r=>d.jsx("button",{type:"button","aria-pressed":t===r,onClick:()=>i(r),className:`rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors ${t===r?"bg-card text-foreground shadow-sm shadow-black/25":"text-muted-foreground hover:text-foreground"}`,children:r==="7d"?"7 days":"30 days"},r))})}function iT({state:t}){if(t.currentSessionUsageStatus==="idle")return null;let i=null;if(t.currentSessionUsageStatus==="loading")i=d.jsx("p",{className:"mt-3 text-[14px] text-muted-foreground",children:"Loading trace…"});else if(t.currentSessionUsageStatus==="error")i=d.jsx("p",{className:"mt-3 text-[14px] text-destructive",children:"Current trace unavailable."});else if(t.currentSessionUsageReport){const r=t.currentSessionUsageReport.timeline.length;i=d.jsxs("p",{className:"mt-3 text-[14px] tabular-nums text-muted-foreground",children:["This session: ",ai.format(t.currentSessionUsageReport.totalTokens)," tokens",r>0?` · ${ai.format(r)} turns`:""]})}return d.jsxs("section",{className:"rounded-2xl bg-card p-5","aria-label":"Current session usage",children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:"Current session trace"}),i]})}function rT(t){if(t.totals.costStatus==="unknown")return null;const i=t.totals.unpricedTurns??0;if(i===0)return null;const r=i===1?"turn":"turns",u=i===1?"is":"are";return`${ai.format(i)} ${r} without a price ${u} not included.`}function aT({report:t}){const i=t.totals.costStatus==="unknown"?"Unknown":`$${t.totals.costUsd.toFixed(tT)}`,r=rT(t);return d.jsxs("section",{"aria-label":"Usage totals",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[d.jsx(ii,{label:"Turns",value:ai.format(t.totals.turns)}),d.jsx(ii,{label:"Sessions",value:ai.format(t.totals.sessions)}),d.jsx(ii,{label:"Tokens",value:ai.format(t.totals.totalTokens)}),d.jsx(ii,{label:"Cost",value:i,...t.totals.costStatus==="estimated"?{note:"estimated"}:{}})]}),r?d.jsx("p",{className:"mt-2 text-[13px] text-subtle",children:r}):null]})}function uT({report:t}){const i=t.daily.reduce((r,u)=>Math.max(r,u.totals.totalTokens),0);return d.jsxs("section",{className:"rounded-2xl bg-card p-5",children:[d.jsx(sT,{report:t}),d.jsx("div",{className:"mt-5 flex h-44 items-end gap-1.5",role:"img","aria-label":"Daily token usage chart",children:t.daily.map(r=>d.jsxs("div",{className:"group flex min-w-0 flex-1 flex-col items-center justify-end gap-2",children:[d.jsx("div",{className:"relative flex h-32 w-full items-end",children:d.jsx("div",{className:"mx-auto w-full max-w-10 rounded-md bg-accent/75 transition-colors group-hover:bg-accent",style:{height:`${i===0?hx:Math.max(hx,r.totals.totalTokens/i*WC)}%`},title:`${r.date}: ${ai.format(r.totals.totalTokens)} tokens`})}),d.jsx("span",{className:"truncate text-[12px] tabular-nums text-subtle",children:r.date.slice(eT)})]},r.date))})]})}function sT({report:t}){return d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:"Daily usage"}),d.jsxs("p",{className:"mt-0.5 text-[13px] text-muted-foreground",children:[t.interval.startDate," → ",t.interval.endDate," · ",t.timezone]})]}),t.daily.at(-1)?.partial?d.jsx("span",{className:"rounded-full bg-warning/15 px-2.5 py-1 text-[12px] font-medium text-warning",children:"Partial day"}):null]})}function oT({state:t,breakdown:i,setBreakdown:r}){const u=t.personalUsageReport;return t.personalUsageStatus==="loading"&&!u?d.jsx($c,{children:"Loading local usage…"}):t.personalUsageStatus==="error"?d.jsx($c,{children:t.personalUsageError??"Usage report failed."}):!u||cT(u)?d.jsx($c,{children:"No recorded usage in this period."}):d.jsxs(d.Fragment,{children:[d.jsx(aT,{report:u}),d.jsx(uT,{report:u}),d.jsx(VC,{state:t,report:u,breakdown:i,setBreakdown:r}),d.jsx(ZC,{state:t}),d.jsx(PC,{report:u})]})}function cT(t){return t.totals.sessions===0&&t.totals.totalTokens===0&&t.byActivity.length===0}function fT({state:t}){const[i,r]=w.useState("7d"),[u,o]=w.useState("model");return w.useEffect(()=>{t.requestPersonalUsage(i)},[i,t.requestPersonalUsage]),d.jsx("main",{className:"agent-ui gui-rise h-full overflow-y-auto p-5 md:p-7","aria-label":"Personal usage",children:d.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col gap-5",children:[d.jsx(nT,{period:i,setPeriod:r,requestCurrentSessionUsage:t.requestCurrentSessionUsage}),d.jsx(iT,{state:t}),d.jsx(oT,{state:t,breakdown:u,setBreakdown:o})]})})}function $f({size:t=20}){return d.jsxs("svg",{width:t,height:t,viewBox:"0 0 20 20","aria-hidden":"true",className:"flex-shrink-0",children:[d.jsx("rect",{x:"1",y:"2.5",width:"18",height:"15",rx:"5.5",className:"fill-accent"}),d.jsx("circle",{cx:"7.2",cy:"10",r:"1.7",className:"fill-accent-foreground"}),d.jsx("circle",{cx:"12.8",cy:"10",r:"1.7",className:"fill-accent-foreground"})]})}function Xf({surface:t}){const{identity:i}=ql();return d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx($f,{}),d.jsx("span",{className:"text-[15px] font-semibold tracking-[-0.01em] text-foreground",children:i.displayName}),t?d.jsx("span",{className:"rounded-md bg-raised px-1.5 py-px text-[11px] font-medium text-muted-foreground",children:t}):null]})}const dT=200;function c1(t,i){if(!t||!i.startsWith("/")||/\s/u.test(i))return null;const r=i.slice(1).toLowerCase(),u=t.commands.filter(f=>!Iy(f)).map(f=>({name:f.name,description:f.description,kind:"command"})),o=t.skills.filter(f=>f.userInvocable).map(f=>({name:f.name,description:f.description,kind:"skill"})),s=[...mx(u,r),...mx(o,r)].slice(0,dT);return s.length>0?s:null}function mx(t,i){const r=t.filter(o=>o.name.toLowerCase().startsWith(i)),u=t.filter(o=>!o.name.toLowerCase().startsWith(i)&&o.name.toLowerCase().includes(i));return[...r.sort(gx),...u.sort(gx)]}function gx(t,i){return t.name.localeCompare(i.name)}const pT=64*1024,hT=256*1024,xx="Only files inside this project folder can be attached.",mT="You can attach up to 8 files to one message.",gT="Images and other non-text files can't be attached yet.";function yx(t){return t.replaceAll("\\","/")}function bx(t){const i=t.startsWith("/"),r=[];for(const u of t.split("/"))if(!(u===""||u===".")){if(u===".."){r.length>0&&r[r.length-1]!==".."?r.pop():i||r.push("..");continue}r.push(u)}return(i?"/":"")+r.join("/")}function xT(t,i){if(!t)return null;const r=bx(yx(t));if(!r||r==="/")return null;const u=bx(yx(i));if(u===r)return null;const o=`${r}/`;if(!u.startsWith(o))return null;const s=u.slice(o.length);return s||null}function yT(t){return/^text\//.test(t)||/[+/](?:json|xml)$/.test(t)}const bT=new Set(["png","jpg","jpeg","gif","webp","bmp","ico","tiff","heic","pdf","zip","tar","gz","tgz","7z","rar","exe","dll","so","dylib","bin","class","wasm","woff","woff2","ttf","otf","eot","mp3","mp4","mov","avi","wav","ogg","flac","m4a"]);function vT(t,i){if(i)return!yT(i);const r=t.lastIndexOf(".");return r<0?!1:bT.has(t.slice(r+1).toLowerCase())}const ST=/[\s)\]}>,;"'`]/u,kT=/[.,:;!?]$/u;function vx(t){return t>=1024?`${Math.round(t/1024)} KB`:`${t} B`}function wT(){const t=typeof crypto<"u"?crypto:void 0;return t?.randomUUID?t.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function jT(t,i,r,u){if(u>=8)return{kind:"rejected",message:mT};if(!t.absolutePath)return{kind:"rejected",message:xx};const o=xT(i,t.absolutePath);return o===null?{kind:"rejected",message:xx}:ST.test(o)||kT.test(o)?{kind:"rejected",message:`"${t.name}" has a character (such as a space, or a period/punctuation mark at the end) the @file syntax can't carry — rename it to attach it.`}:vT(t.name,t.mimeType)?{kind:"rejected",message:gT}:t.size>65536?{kind:"rejected",message:`${t.name} is larger than ${vx(pT)} and cannot be attached.`}:r+t.size>262144?{kind:"rejected",message:`Attachments cannot total more than ${vx(hT)}.`}:{kind:"attached",attachment:{id:wT(),name:t.name,relativePath:o,size:t.size}}}function NT(t,i){if(i.length===0)return t;const r=i.map(u=>`@./${u.relativePath}`).join(" ");return t?`${t}
312
+
313
+ ${r}`:r}function f1({label:t,sections:i,onClose:r,triggerRef:u}){const o=i.flatMap(v=>v.items),s=w.useId(),f=w.useRef(null),h=w.useRef([]),[g,m]=w.useState(()=>{const v=o.findIndex(N=>N.checked);return v>=0?v:0}),y=v=>{r(),v&&u.current?.focus()};w.useEffect(()=>{h.current[g]?.focus()},[g]),w.useEffect(()=>{const v=N=>{const C=N.target;f.current?.contains(C)||u.current?.contains(C)||y(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const x=v=>{if(v.key==="Escape"){v.preventDefault(),y(!0);return}if(v.key==="ArrowDown"||v.key==="ArrowUp"){if(v.preventDefault(),o.length===0)return;const N=v.key==="ArrowDown"?1:-1;m(C=>(C+N+o.length)%o.length);return}if(v.key==="Enter"||v.key===" "){v.preventDefault();const N=o[g];N&&(N.onSelect(),y(!0))}};let S=-1;return d.jsx("div",{ref:f,role:"menu","aria-label":t,onKeyDown:x,className:"gui-rise absolute bottom-full z-30 mb-2 max-h-[360px] w-64 overflow-y-auto rounded-2xl bg-popover p-1.5 shadow-2xl shadow-black/35 focus:outline-none",children:i.map((v,N)=>d.jsxs("div",{role:"group","aria-label":v.heading,children:[v.heading?d.jsx("div",{role:"presentation",className:"px-3 pb-1 pt-2 text-[11px] font-medium uppercase tracking-wide text-subtle",children:v.heading}):null,v.items.map(C=>{S+=1;const M=S,_=C.kind==="action",G=C.description?`${s}-desc-${C.key}`:void 0;return d.jsxs("button",{ref:U=>{h.current[M]=U},type:"button",role:_?"menuitem":"menuitemradio","aria-checked":_?void 0:C.checked===!0,"aria-label":C.label,"aria-describedby":G,tabIndex:M===g?0:-1,onFocus:()=>m(M),onClick:()=>{C.onSelect(),y(!0)},className:`flex w-full items-start gap-2 rounded-xl px-3 py-2 text-left text-[13.5px] ${C.destructive?"text-destructive hover:bg-destructive/10":"text-foreground hover:bg-hover"} ${M===g?"bg-hover":""}`,children:[_?null:d.jsx("span",{className:"mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center",children:C.checked?d.jsx(ca,{size:14,strokeWidth:2.25,"aria-hidden":"true"}):null}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate",children:C.label}),C.description?d.jsx("span",{id:G,className:"block truncate text-[12px] text-muted-foreground",children:C.description}):null]})]},C.key)})]},v.heading??N))})}const Xc={auto:"Auto",none:"None",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"Extra high",max:"Maximum"},_T=["auto","low","medium","high"],ET=["none","minimal","xhigh","max"];function d1(t){return t?.commands.find(i=>i.name==="mode")?.subcommands??[]}function CT(t,i){return d1(t).find(r=>r.name===i)?.displayName??i}const TT="flex min-w-0 items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-transparent",AT="text-warning hover:text-warning";function Qc({chipLabel:t,value:i,icon:r,connected:u,warning:o=!1,menuLabel:s,sections:f,onOpen:h}){const[g,m]=w.useState(!1),y=w.useRef(null);return d.jsxs("span",{className:"relative",children:[d.jsxs("button",{ref:y,type:"button","aria-label":`${t}: ${i}`,"aria-haspopup":"menu","aria-expanded":g,title:u?`${t}: ${i}`:"Reconnecting…",disabled:!u,onClick:()=>{h?.(),m(!0)},className:`${TT} ${o?AT:""}`,children:[r,d.jsx("span",{className:"hidden truncate md:inline",children:i})]}),g?d.jsx(f1,{label:s,sections:f,triggerRef:y,onClose:()=>m(!1)}):null]})}const Zc={size:14,strokeWidth:1.75,"aria-hidden":!0};function zT({status:t,catalog:i,modelList:r,onRequestModelList:u,onManageProviders:o,onSilentCommand:s,connected:f}){const h=t?Math.round(t.context.usedPercentage):null,[g,m]=w.useState(!1),y=[...(r?.groups??[]).map(v=>({heading:v.providerLabel,items:v.models.map(N=>({key:N.id,label:N.label,checked:N.id===r?.currentModel&&v.profileName===r?.currentProfile,onSelect:()=>s("model",N.id)}))})),{items:[{key:"manage-providers",label:"Manage providers…",kind:"action",onSelect:o}]}],x=[{items:d1(i).map(v=>({key:v.name,label:v.displayName??v.name,description:v.description,checked:v.name===t?.permissionMode,onSelect:v.name==="bypassPermissions"?()=>m(!0):()=>s("mode",v.name)}))}],S=[{items:_T.map(v=>({key:v,label:Xc[v],checked:v===t?.effort,onSelect:()=>s("effort",v)}))},{heading:"More",items:ET.map(v=>({key:v,label:Xc[v],checked:v===t?.effort,onSelect:()=>s("effort",v)}))}];return d.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-0.5",children:[t?d.jsxs(d.Fragment,{children:[d.jsx(Qc,{chipLabel:"mode",value:CT(i,t.permissionMode),icon:d.jsx(z_,{...Zc}),connected:f,warning:t.permissionMode==="bypassPermissions",menuLabel:"Mode",sections:x}),d.jsx("span",{className:"ml-auto"}),d.jsx(Qc,{chipLabel:"model",value:t.model,icon:d.jsx(R_,{...Zc}),connected:f,menuLabel:"Model",sections:y,onOpen:u}),d.jsx(Qc,{chipLabel:"effort",value:Xc[t.effort],icon:d.jsx(u_,{...Zc}),connected:f,menuLabel:"Effort",sections:S})]}):d.jsx("span",{className:"ml-auto px-2 text-[13px] text-subtle",children:"…"}),d.jsxs("span",{className:"flex items-center gap-1.5 px-1.5 text-[12.5px] tabular-nums text-subtle",title:"Context used","aria-label":`context ${h??0}% used`,children:[d.jsx(DT,{percent:h??0}),h===null?"":`${h}%`]}),d.jsx(Ll,{open:g,title:"Skip all permission checks?",body:"Every action runs without asking first — file edits, shell commands and network access included. You can turn this back on at any time.",confirmLabel:"Skip all checks",destructive:!0,onCancel:()=>m(!1),onConfirm:()=>{m(!1),s("mode","bypassPermissions")}})]})}function DT({percent:t}){const r=2*Math.PI*5,u=Math.min(100,Math.max(0,t))/100;return d.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[d.jsx("circle",{cx:"7",cy:"7",r:5,className:"fill-none stroke-raised",strokeWidth:"2"}),d.jsx("circle",{cx:"7",cy:"7",r:5,className:`fill-none ${t>=80?"stroke-warning":"stroke-muted-foreground"}`,strokeWidth:"2",strokeDasharray:`${r*u} ${r}`,transform:"rotate(-90 7 7)"})]})}const Yu={text:"",attachments:[]},RT=new Set(["settings","resume","help"]);function Sx(t){return t.kind==="command"&&RT.has(t.name)}function Kc(t){return t.kind==="skill"?"Skills":"Commands"}function p1(t,i){return i?`${t}.draft.${i}`:`${t}.draft`}function MT(t){if(!t||typeof t!="object")return!1;const i=t;return typeof i.id=="string"&&typeof i.name=="string"&&typeof i.relativePath=="string"&&typeof i.size=="number"}function OT(t){if(!t)return Yu;try{const i=JSON.parse(t);if(i&&typeof i=="object"&&typeof i.text=="string"){const r=i.attachments;return{text:i.text,attachments:Array.isArray(r)?r.filter(MT):[]}}}catch{}return{text:t,attachments:[]}}function kx(t,i){try{return OT(window.localStorage.getItem(p1(t,i)))}catch{return Yu}}function Du(t,i,r){try{const u=p1(t,i);!r.text&&r.attachments.length===0?window.localStorage.removeItem(u):window.localStorage.setItem(u,JSON.stringify(r))}catch{}}const LT=w.forwardRef(function({onSubmit:i,onCommand:r,catalog:u,status:o,connected:s=!0,running:f,onStop:h,queued:g,onCancelQueue:m,pickFiles:y,getPathForFile:x,modelList:S=null,onRequestModelList:v=()=>{},onSilentCommand:N=r,onManageProviders:C=()=>r("provider")},M){const{identity:_,storage:{browserNamespace:G}}=ql(),U=w.useRef(null);w.useImperativeHandle(M,()=>({focus:()=>U.current?.focus()}),[]);const Z=o?.sessionId,ne=w.useRef(Z),D=w.useRef(Z!==void 0),H=w.useRef(Yu),[le,W]=w.useState(()=>{const te=kx(G,Z);return H.current=te,te.text}),[O,ae]=w.useState(()=>H.current.attachments),[ee,xe]=w.useState(null),[oe,J]=w.useState(0),[L,P]=w.useState(!1),fe=L||!s?null:c1(u,le);w.useEffect(()=>{J(0),P(!1)},[le]);const ce=w.useRef([]);w.useEffect(()=>{ce.current[oe]?.scrollIntoView?.({block:"nearest"})},[oe,fe]);const E=te=>{H.current={...H.current,text:te},W(te),Du(G,ne.current,H.current)},T=te=>{const De=typeof te=="function"?te(H.current.attachments):te;H.current={...H.current,attachments:De},ae(De),Du(G,ne.current,H.current)};w.useEffect(()=>{if(Z===void 0&&D.current||ne.current===Z)return;const te=!D.current,De=ne.current;ne.current=Z,Z!==void 0&&(D.current=!0);const Ie=kx(G,Z),kn=Ie.text!==""||Ie.attachments.length>0,F=H.current.text!==""||H.current.attachments.length>0;if(te&&!kn&&F){Du(G,Z,H.current),Du(G,De,Yu);return}H.current=Ie,W(Ie.text),ae(Ie.attachments),xe(null)},[G,Z]);const V=()=>{if(!s)return;const te=le.trim();!te&&O.length===0||(i(NT(te,O)),E(""),T([]),xe(null))},j=o?.workspace?.path,re=O.reduce((te,De)=>te+De.size,0),me=te=>{if(te.length===0)return;let De=re,Ie=O.length;const kn=[];let F=null;for(const ue of te){const be=jT(ue,j,De,Ie);be.kind==="attached"?(kn.push(be.attachment),De+=be.attachment.size,Ie+=1):F=be.message}kn.length>0&&T(ue=>[...ue,...kn]),xe(F)},de=te=>{T(De=>De.filter(Ie=>Ie.id!==te))},je=te=>({name:te.name,size:te.size,mimeType:te.type||void 0,absolutePath:x&&x(te)||void 0}),qe=w.useRef(null),se=()=>{if(s){if(y){y().then(te=>me(te.map(De=>({name:De.name,size:De.size,absolutePath:De.path})))).catch(()=>xe("Could not open the file picker. Try again."));return}qe.current?.click()}},pe=te=>{const De=Array.from(te.target.files??[]);te.target.value="",me(De.map(je))},Ge=w.useRef(0),[Xt,yn]=w.useState(!1),Mt=te=>Array.from(te.dataTransfer?.types??[]).includes("Files"),bn=te=>{!s||!Mt(te)||(te.preventDefault(),Ge.current+=1,yn(!0))},ln=te=>{!s||!Mt(te)||te.preventDefault()},ul=()=>{Ge.current=Math.max(0,Ge.current-1),Ge.current===0&&yn(!1)},Ln=te=>{!s||!Mt(te)||(te.preventDefault(),Ge.current=0,yn(!1),me(Array.from(te.dataTransfer?.files??[]).map(je)))},vn=te=>{if(Sx(te)){E(""),r(te.name);return}E(`/${te.name} `)},Sn=()=>{const te=fe?.[oe];return!te||!Sx(te)&&le===`/${te.name}`?!1:(vn(te),!0)},Un=()=>{g&&(E(g.text),m())};return d.jsxs("div",{className:"relative flex-shrink-0",onDragEnter:bn,onDragOver:ln,onDragLeave:ul,onDrop:Ln,children:[d.jsx("p",{id:"composer-attach-hint",className:"sr-only",children:"Drag files here, or use Attach files, to add them to your message."}),Xt&&d.jsx("div",{role:"status","aria-live":"polite",className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center rounded-[22px] border-2 border-dashed border-accent bg-accent/10 text-[14px] font-medium text-accent",children:"Drop to attach"}),g&&d.jsxs("div",{role:"status","aria-label":"queued prompt",className:"gui-rise mb-2 flex items-center gap-3 rounded-2xl bg-card px-4 py-2 text-[13px]",children:[d.jsxs("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:["Queued: ",g.text,g.count>1&&d.jsxs("span",{className:"text-subtle",children:[" and ",g.count-1," more"]})]}),g.count===1?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:Un,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Edit"}),d.jsx("button",{type:"button",onClick:m,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Remove"})]}):d.jsx("button",{type:"button",onClick:m,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Remove all"})]}),fe&&d.jsx("div",{role:"listbox","aria-label":"commands",className:"gui-rise absolute bottom-full left-0 right-0 mb-2 max-h-[320px] overflow-y-auto rounded-2xl bg-popover p-1.5 shadow-2xl shadow-black/35",children:fe.map((te,De)=>d.jsxs("div",{children:[(De===0||Kc(fe[De-1])!==Kc(te))&&d.jsx("div",{role:"presentation",className:"px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-subtle first:pt-1",children:Kc(te)}),d.jsxs("button",{ref:Ie=>{ce.current[De]=Ie},type:"button",role:"option","aria-selected":De===oe,onMouseEnter:()=>J(De),onMouseDown:Ie=>{Ie.preventDefault(),vn(te)},className:`flex w-full items-baseline gap-3 rounded-xl px-3 py-2 text-left text-[14px] ${De===oe?"bg-hover":""}`,children:[d.jsxs("span",{className:"flex-shrink-0 font-mono text-[13.5px] text-foreground",children:["/",te.name]}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:te.description})]})]},`${te.kind}:${te.name}`))}),d.jsxs("form",{className:"rounded-[22px] bg-card px-2.5 pb-2 pt-2.5 shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] transition-shadow focus-within:ring-2 focus-within:ring-ring",onSubmit:te=>{te.preventDefault(),V()},children:[O.length>0&&d.jsx("ul",{"aria-label":"attachments",className:"mb-1.5 flex flex-wrap gap-1.5 px-1 pt-0.5",children:O.map(te=>d.jsxs("li",{title:te.relativePath,className:"flex max-w-full items-center gap-1.5 rounded-lg bg-raised px-2 py-1 text-[12.5px] text-muted-foreground",children:[d.jsx(Gg,{size:12,strokeWidth:1.75,"aria-hidden":"true",className:"flex-shrink-0"}),d.jsx("span",{className:"max-w-[180px] truncate",children:te.name}),d.jsx("button",{type:"button","aria-label":`Remove ${te.name}`,onClick:()=>de(te.id),className:"flex-shrink-0 rounded-full p-0.5 hover:bg-hover hover:text-foreground",children:d.jsx(nr,{size:12,strokeWidth:2,"aria-hidden":"true"})})]},te.id))}),ee&&d.jsx("p",{role:"status","aria-live":"polite",className:"mb-1.5 px-1.5 text-[12.5px] text-muted-foreground",children:ee}),d.jsx("input",{ref:qe,type:"file",multiple:!0,onChange:pe,className:"sr-only",tabIndex:-1,"aria-hidden":"true"}),d.jsx("textarea",{ref:U,"aria-label":"message","aria-describedby":"composer-attach-hint",rows:1,value:le,onChange:te=>E(te.target.value),onKeyDown:te=>{if(!(te.key==="Enter"&&(te.nativeEvent.isComposing||te.keyCode===229))){if(fe){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const De=te.key==="ArrowDown"?1:-1;J(Ie=>(Ie+De+fe.length)%fe.length);return}if(te.key==="Escape"){te.preventDefault(),P(!0);return}if((te.key==="Tab"||te.key==="Enter"&&!te.shiftKey)&&Sn()){te.preventDefault();return}}if(te.key==="Escape"&&f&&s){te.preventDefault(),h();return}te.key==="Enter"&&!te.shiftKey&&(te.preventDefault(),V())}},placeholder:`Ask ${_.displayName} anything — type / for commands`,className:"block max-h-[220px] min-h-[48px] w-full resize-none bg-transparent px-2 py-1 text-[15px] leading-relaxed text-foreground [field-sizing:content] focus:outline-none"}),d.jsxs("div",{className:"mt-1 flex items-center gap-1",children:[d.jsx("button",{type:"button","aria-label":"Attach files",title:s?"Attach files":"Reconnecting…",disabled:!s,onClick:se,className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-hover hover:text-foreground disabled:text-subtle disabled:hover:bg-transparent",children:d.jsx(Gg,{size:16,strokeWidth:1.75,"aria-hidden":"true"})}),d.jsx(zT,{status:o,catalog:u,modelList:S,onRequestModelList:v,onManageProviders:C,onSilentCommand:N,connected:s}),d.jsxs("button",{type:f?"button":"submit",onClick:f?h:void 0,disabled:!s||!f&&!le.trim()&&O.length===0,"aria-description":s?void 0:"Not connected",className:"ml-1 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground transition-all hover:opacity-85 disabled:bg-raised disabled:text-subtle",children:[f?d.jsx(Ju,{size:13,strokeWidth:2,fill:"currentColor","aria-hidden":"true"}):d.jsx(BN,{size:17,strokeWidth:2.25,"aria-hidden":"true"}),d.jsx("span",{className:"sr-only",children:f?"Stop":"Send"})]})]})]})]})});function UT({status:t,onStop:i}){const r=t?.goal;if(!r||r.status!=="active")return null;const u=r.maxIterations>0?Math.min(1,r.iterations/r.maxIterations):0;return d.jsxs("div",{role:"status","aria-label":"goal",className:"gui-rise relative flex flex-shrink-0 items-center gap-3 overflow-hidden rounded-2xl bg-card px-4 py-2.5 text-[14px]",children:[d.jsx(qy,{size:16,strokeWidth:1.75,className:"flex-shrink-0 text-accent"}),d.jsx("span",{className:"flex-shrink-0 font-medium text-foreground",children:"Goal"}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:r.objective}),d.jsxs("span",{className:"flex-shrink-0 text-[13px] tabular-nums text-subtle",children:[r.iterations,"/",r.maxIterations]}),d.jsxs("button",{type:"button","aria-label":"Stop goal",onClick:i,className:"flex flex-shrink-0 items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(Ju,{size:11,fill:"currentColor","aria-hidden":"true"}),"Stop"]}),d.jsx("span",{"aria-hidden":"true",className:"absolute bottom-0 left-0 h-[2px] bg-accent/70 transition-[width]",style:{width:`${u*100}%`}})]})}const qT={warning:"bg-warning/15 text-warning",destructive:"bg-destructive/12 text-destructive",muted:"bg-subtle/15 text-subtle"},wx={message:"",tool_activity:"Tool",process_output:"Output",progress:"Progress",result:"Result",error:"Error",group_summary:"Summary"};function BT({entry:t,status:i,records:r,error:u,complete:o,onClose:s,onLoadMore:f,onStop:h}){if(!t)return null;const g=gC(t),m=h!==void 0&&t.controls.includes("cancel"),y=t.headline?.text??t.preview;return d.jsxs("div",{role:"dialog","aria-label":t.title,onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),s())},className:"agent-ui absolute inset-y-0 right-0 z-30 flex w-96 flex-col overflow-hidden border-l border-subtle/20 bg-background shadow-2xl shadow-black/40",children:[d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2 border-b border-subtle/15 px-4 py-3",children:[d.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.title}),g&&d.jsx("span",{className:`flex-shrink-0 rounded-md px-1.5 py-px text-[12px] ${qT[g.tone]}`,children:g.label}),m&&d.jsx("button",{type:"button","aria-label":`Stop ${t.title}`,onClick:h,className:"flex-shrink-0 rounded-md px-1.5 py-px text-[12px] text-subtle hover:bg-destructive/10 hover:text-destructive",children:"Stop"}),d.jsx("button",{type:"button","aria-label":"Close","aria-keyshortcuts":"Escape",onClick:s,className:"flex-shrink-0 rounded-md p-1 text-subtle hover:bg-card hover:text-foreground",children:d.jsx(nr,{size:16,strokeWidth:1.9,"aria-hidden":"true"})})]}),y&&d.jsx("p",{className:"flex-shrink-0 border-b border-subtle/15 px-4 py-2.5 text-[13px] leading-snug text-muted-foreground",children:y}),t.deniedToolCalls!==void 0&&t.deniedToolCalls>0&&d.jsxs("p",{className:"flex-shrink-0 px-4 pt-2 text-[12px] text-warning",children:[t.deniedToolCalls," tool ",t.deniedToolCalls===1?"call was":"calls were"," refused."]}),d.jsxs("div",{className:"flex-1 space-y-2 overflow-y-auto px-4 py-3",children:[r.map(x=>d.jsxs("div",{className:"text-[13px] leading-relaxed text-foreground",children:[wx[x.kind]&&d.jsx("span",{className:"mr-1.5 text-[11px] font-medium uppercase tracking-wide text-subtle",children:wx[x.kind]}),d.jsx("span",{className:"whitespace-pre-wrap break-words",children:x.text})]},x.id)),i==="loading"&&r.length===0&&d.jsx("p",{className:"text-[13px] text-subtle",children:"Loading…"}),u&&d.jsx("p",{className:"text-[13px] text-destructive",children:u}),!o&&i!=="loading"&&d.jsx("button",{type:"button",onClick:f,className:"text-[12px] text-subtle underline hover:text-foreground",children:"Load more"}),!o&&i==="loading"&&r.length>0&&d.jsx("p",{className:"text-[12px] text-subtle",children:"Loading more…"})]})]})}const HT=[{keys:"⌘,",description:"Open Settings"},{keys:"Esc",description:"Close a dialog or menu, or stop the current run"},{keys:"Shift+Tab",description:"Answer a pending question with the keyboard"},{keys:"Enter",description:"Send the message"},{keys:"Shift+Enter",description:"Start a new line"}];function IT({open:t,onClose:i,catalog:r}){const u=c1(r,"/")??[],o=u.filter(f=>f.kind==="command"),s=u.filter(f=>f.kind==="skill");return d.jsxs(fa,{open:t,onClose:i,title:"Help",panelClassName:"flex h-[min(600px,85vh)] w-full max-w-lg flex-col overflow-hidden rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[d.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Help"}),d.jsx("button",{type:"button","aria-label":"Close Help",onClick:i,className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(nr,{size:17,strokeWidth:1.75})})]}),d.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:[d.jsxs("section",{"aria-label":"Shortcuts",children:[d.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wide text-subtle",children:"Shortcuts"}),d.jsx("dl",{className:"mt-2 mb-5 space-y-1.5",children:HT.map(f=>d.jsxs("div",{className:"flex items-baseline gap-3 text-[13.5px]",children:[d.jsx("dt",{className:"w-24 flex-shrink-0 font-mono text-foreground",children:f.keys}),d.jsx("dd",{className:"min-w-0 flex-1 text-muted-foreground",children:f.description})]},f.keys))})]}),d.jsx(jx,{label:"Commands",items:o}),s.length>0&&d.jsx(jx,{label:"Skills",items:s})]})]})}function jx({label:t,items:i}){return d.jsxs("section",{"aria-label":t,className:"mb-5 last:mb-0",children:[d.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wide text-subtle",children:t}),d.jsx("ul",{className:"mt-2 space-y-1.5",children:i.map(r=>d.jsxs("li",{className:"flex items-baseline gap-3 text-[13.5px]",children:[d.jsxs("span",{className:"w-24 flex-shrink-0 truncate font-mono text-foreground",children:["/",r.name]}),d.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:r.description})]},r.name))})]})}const YT={Added:"text-accent",Modified:"text-warning",Deleted:"text-destructive",Renamed:"text-muted-foreground",Copied:"text-muted-foreground",Untracked:"text-subtle",Conflicted:"text-destructive"};function VT({file:t,open:i,onOpen:r}){return d.jsxs("button",{type:"button","aria-expanded":i,onClick:r,className:"flex min-w-0 items-center gap-2 rounded-md px-1.5 py-1.5 text-left hover:bg-hover",children:[d.jsx(Ku,{size:13,className:`flex-shrink-0 text-subtle transition-transform ${i?"rotate-90":""}`}),d.jsx("span",{className:`w-[76px] flex-shrink-0 text-[12px] font-medium ${YT[t.status]}`,children:t.status}),d.jsx("span",{className:"min-w-0 flex-1 truncate break-all font-mono text-[12.5px] text-foreground",title:t.path,children:t.path}),typeof t.added=="number"&&d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-accent",children:["+",t.added]}),typeof t.removed=="number"&&d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-destructive",children:["-",t.removed]})]})}function GT({status:t,statusState:i,onRefresh:r,openPath:u,onSelectFile:o,diff:s,diffState:f,diffPath:h}){return d.jsxs("div",{className:"flex flex-col gap-1.5 rounded-xl bg-card px-2 py-2",children:[d.jsxs("div",{className:"flex items-center gap-2 px-1",children:[d.jsx("p",{className:"flex-1 text-[12px] font-medium text-muted-foreground",children:t?.kind==="status"&&t.branch?`Changes — ${t.branch}`:"Changes"}),d.jsxs("button",{type:"button",onClick:r,disabled:i==="loading","aria-label":"Refresh",className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] text-subtle hover:bg-hover hover:text-foreground disabled:opacity-60",children:[d.jsx(If,{size:12,className:i==="loading"?"animate-spin":""}),"Refresh"]})]}),i==="loading"&&t===null&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"Reading git status…"}),i==="error"&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-destructive",children:"Could not read git status."}),t?.kind==="not-a-repository"&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"This folder is not a git repository."}),t?.kind==="failed"&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-destructive",children:t.message}),t?.kind==="status"&&t.files.length===0&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"No changes."}),t?.kind==="status"&&t.files.map(g=>d.jsxs("div",{className:"flex flex-col",children:[d.jsx(VT,{file:g,open:u===g.path,onOpen:()=>o(g.path)}),u===g.path&&d.jsxs("div",{className:"pl-6",children:[f==="loading"&&h===g.path&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-muted-foreground",children:"Reading diff…"}),s&&h===g.path&&s.kind==="diff"&&s.diffLines.length===0&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-muted-foreground",children:"No differences."}),s&&h===g.path&&s.kind==="diff"&&s.diffLines.length>0&&d.jsxs(d.Fragment,{children:[d.jsx(Pu,{diffLines:s.diffLines}),s.truncated&&d.jsx("p",{className:"py-1 text-[12px] text-subtle",children:"The diff was too long and was cut short."})]}),s&&h===g.path&&s.kind==="failed"&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-destructive",children:s.message}),s&&h===g.path&&s.kind==="outside-workspace"&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-destructive",children:"That path is outside the workspace."}),s&&h===g.path&&s.kind==="not-a-repository"&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-muted-foreground",children:"This folder is not a git repository."})]})]},g.path)),t?.kind==="status"&&t.truncated&&d.jsx("p",{className:"px-1 pt-1 text-[12px] text-subtle",children:"Showing the first files only — there are more."})]})}function FT({memory:t,memoryState:i,onOpenInEditor:r}){return d.jsxs("div",{className:"flex flex-col gap-1.5 rounded-xl bg-card px-2 py-2",children:[d.jsxs("div",{className:"flex items-center gap-2 px-1",children:[d.jsx("p",{className:"flex-1 text-[12px] font-medium text-muted-foreground",children:"Memory"}),t?.kind==="memory"&&r&&d.jsxs("button",{type:"button",onClick:()=>r(t.path),className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] text-subtle hover:bg-hover hover:text-foreground",children:[d.jsx(l_,{size:12}),"Open in editor"]})]}),i==="loading"&&t===null&&d.jsx("p",{className:"px-1 py-1 text-[13px] text-muted-foreground",children:"Reading project memory…"}),t?.kind==="unavailable"&&d.jsx("p",{className:"px-1 py-1 text-[13px] text-muted-foreground",children:t.message}),t?.kind==="memory"&&d.jsxs(d.Fragment,{children:[d.jsx("pre",{className:"max-h-64 overflow-y-auto whitespace-pre-wrap break-words rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed text-foreground",children:t.content.length>0?t.content:"(empty)"}),t.truncated&&d.jsx("p",{className:"px-1 pt-1 text-[12px] text-subtle",children:"The memory was too long and was cut short."})]})]})}function $T({state:t,className:i,onOpenMemoryInEditor:r}){w.useEffect(()=>{t.requestProjectStatus(),t.requestProjectMemory()},[t.requestProjectStatus,t.requestProjectMemory]);const[u,o]=w.useState(null);return d.jsxs("div",{className:`agent-ui flex flex-col overflow-hidden ${i??""}`,children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[d.jsx(o_,{size:15,className:"text-subtle"}),d.jsx("span",{className:"text-[14px] font-medium text-foreground",children:"Project"}),t.projectStatusState==="loading"&&d.jsx(Hf,{size:13,className:"ml-auto animate-spin text-subtle","aria-label":"loading"})]}),d.jsxs("div",{className:"flex-1 space-y-2 overflow-y-auto px-3 pb-3",children:[d.jsx(GT,{status:t.projectStatus,statusState:t.projectStatusState,onRefresh:()=>t.requestProjectStatus(),openPath:u,onSelectFile:s=>{if(u===s){o(null);return}o(s),t.requestProjectDiff(s)},diff:t.projectDiffPath===u?t.projectDiff:null,diffState:t.projectDiffPath===u?t.projectDiffState:"loading",diffPath:t.projectDiffPath}),d.jsx(FT,{memory:t.projectMemory,memoryState:t.projectMemoryState,onOpenInEditor:r})]})]})}const Nx={connected:{dot:"bg-accent status-glow",label:"Connected"},connecting:{dot:"bg-warning animate-pulse",label:"Connecting…"},disconnected:{dot:"bg-subtle",label:"Disconnected"},error:{dot:"bg-destructive",label:"Connection error"}},XT={chat:"Chat",usage:"Usage",project:"Project"};function QT(t){const{identity:i}=ql();w.useEffect(()=>{typeof document>"u"||t===void 0||(document.title=`${t.name} — ${i.displayName}`)},[t,i.displayName])}function ZT({status:t,surface:i,title:r,workspace:u,showBrand:o,view:s,onView:f,personalUsageEnabled:h,connectionLost:g=!1}){const m=Nx[t]??Nx.disconnected;QT(u);const y=w.useRef(!1);w.useEffect(()=>{t==="connected"&&(y.current=!0)},[t]);const x=t!=="connected"&&(g||y.current),S=h?["chat","usage","project"]:["chat","project"];return d.jsxs("header",{className:"agent-gui-status flex h-12 flex-shrink-0 items-center gap-3 px-5","data-status":t,children:[o?d.jsx(Xf,{surface:i}):null,s==="chat"&&r?d.jsx("h1",{className:"min-w-0 truncate text-[14px] font-medium text-foreground/90",children:r}):null,s==="chat"&&u?d.jsx("span",{title:u.path,className:"min-w-0 flex-shrink truncate text-[13px] text-muted-foreground",children:u.name}):null,d.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[d.jsx("nav",{className:"flex items-center rounded-lg bg-raised p-0.5","aria-label":"Primary",children:S.map(v=>d.jsx("button",{type:"button","aria-pressed":s===v,onClick:()=>f(v),className:`rounded-md px-3 py-1 text-[13px] font-medium transition-colors ${s===v?"bg-card text-foreground shadow-sm shadow-black/25":"text-muted-foreground hover:text-foreground"}`,children:XT[v]},v))}),x?null:d.jsxs("span",{className:"flex items-center gap-2",title:m.label,children:[d.jsx("span",{className:`h-2 w-2 rounded-full ${m.dot}`}),t==="connected"?d.jsx("span",{className:"sr-only",children:t}):d.jsx("span",{className:"text-[13px] text-muted-foreground",children:m.label})]})]})]})}const _x="mx-auto w-full max-w-[760px] px-6";function KT({status:t,connectionLost:i,onReconnect:r}){const u=w.useRef(!1);w.useEffect(()=>{t==="connected"&&(u.current=!0)},[t]);const{identity:o}=ql(),[s,f]=w.useState(!1),[h,g]=w.useState(null);if(t==="connected"||!i&&!u.current)return null;if(!i)return d.jsx("div",{role:"status",className:`${_x} flex-shrink-0 pt-3`,children:d.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl bg-warning/15 px-4 py-2.5 text-[13.5px] text-foreground",children:[d.jsx("span",{className:"h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-warning","aria-hidden":"true"}),"Connection lost. Reconnecting…"]})});const m=()=>{r&&(f(!0),g(null),r().catch(y=>{f(!1),g(y instanceof Error?y.message:String(y))}))};return d.jsx("div",{role:"alert",className:`${_x} flex-shrink-0 pt-3`,children:d.jsxs("div",{className:"flex flex-col gap-2 rounded-xl bg-destructive/15 px-4 py-3 text-[13.5px] text-foreground",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-destructive","aria-hidden":"true"}),d.jsxs("span",{className:"min-w-0 flex-1",children:[o.displayName," stopped.",!r&&d.jsxs(d.Fragment,{children:[" ","Run ",d.jsxs("code",{className:"font-mono",children:[o.cliName," --serve --open"]})," again to reopen it."]})]}),r?d.jsx("button",{type:"button",onClick:m,disabled:s,className:"flex-shrink-0 rounded-lg bg-primary px-3 py-1.5 text-[13px] font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:s?"Reconnecting…":"Reconnect"}):null]}),h?d.jsx("p",{className:"text-destructive",children:h}):null]})})}const JT={openai:"OpenAI",deepseek:"DeepSeek"};function PT(t){return t===void 0||t.length===0?"The provider":JT[t]??t[0].toUpperCase()+t.slice(1)}function WT(t){const i=PT(t.provider);switch(t.code){case"auth":return`${i} rejected the API key. Check the key for this provider.`;case"rate_limit":return`${i} is limiting requests. Try again in ${t.retryAfterSeconds!==void 0?`${t.retryAfterSeconds} second${t.retryAfterSeconds===1?"":"s"}`:"a moment"}.`;case"model_unavailable":return t.model?`The model "${t.model}" isn't available with this key.`:"The model isn't available with this key.";case"network":return`Can't reach ${i}. Check your connection.`;case"provider":return`${i} returned an error.`;default:return null}}function e3({state:t}){const i=t.sessionNotices??[];return i.length===0?null:d.jsx("div",{className:"pointer-events-none absolute right-4 top-16 z-40 flex w-[min(400px,calc(100%-32px))] flex-col gap-2",children:i.slice(-3).map(r=>{const u=WT(r);return d.jsxs("div",{role:"alert",className:"gui-rise pointer-events-auto flex items-start gap-3 rounded-xl bg-popover px-4 py-3 text-[14px] leading-snug text-popover-foreground shadow-xl shadow-black/30",children:[d.jsx("span",{className:"mt-[7px] h-2 w-2 flex-shrink-0 rounded-full bg-destructive"}),d.jsxs("span",{className:"max-h-40 flex-1 overflow-y-auto whitespace-pre-wrap break-words",children:[u??r.message,u&&d.jsxs("details",{className:"mt-1.5",children:[d.jsx("summary",{className:"cursor-pointer text-[12.5px] text-muted-foreground hover:text-foreground",children:"Details"}),d.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words text-[12.5px] text-muted-foreground",children:r.message})]})]}),d.jsx("button",{type:"button","aria-label":"Dismiss notice",onClick:()=>t.dismissSessionNotice?.(r.id),className:"-mr-1 rounded-md p-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(nr,{size:15})})]},r.id)})})}const h1="min-w-[160px] flex-shrink-0 rounded-lg border border-border bg-raised px-2.5 py-1.5 text-[13.5px] text-foreground";function yf({label:t,note:i,value:r,options:u,onChange:o,disabled:s=!1}){const f=w.useId(),h=u.find(m=>m.id===r),g=i??h?.description;return d.jsxs("div",{className:"flex flex-col gap-1.5 border-b border-border/60 py-3.5 last:border-b-0",children:[d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsx("label",{htmlFor:f,className:"text-[14px] font-medium text-foreground",children:t}),d.jsxs("select",{id:f,value:u.some(m=>m.id===r)?r:"",disabled:s,onChange:m=>o(m.target.value),className:h1,children:[u.some(m=>m.id===r)?null:d.jsx("option",{value:"",disabled:!0,children:r||"Unset"}),u.map(m=>d.jsx("option",{value:m.id,children:m.label},m.id))]})]}),g?d.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:g}):null]})}const Jc="__other__";function t3({label:t,current:i,recommended:r,note:u,onChange:o,disabled:s=!1}){const f=w.useId(),h=r.some(v=>v.id===i),[g,m]=w.useState(!h&&i.length>0),[y,x]=w.useState(h?"":i);w.useEffect(()=>{const v=r.some(N=>N.id===i);m(!v&&i.length>0),x(v?"":i)},[i,r]);function S(){const v=y.trim();v.length>0&&v!==i&&o(v)}return d.jsxs("div",{className:"flex flex-col gap-1.5 border-b border-border/60 py-3.5 last:border-b-0",children:[d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsx("label",{htmlFor:f,className:"text-[14px] font-medium text-foreground",children:t}),d.jsxs("select",{id:f,disabled:s,value:g?Jc:h?i:"",onChange:v=>{if(v.target.value===Jc){m(!0);return}m(!1),o(v.target.value)},className:h1,children:[!h&&!g?d.jsx("option",{value:"",disabled:!0,children:i||"Unset"}):null,r.map(v=>d.jsx("option",{value:v.id,children:v.label},v.id)),d.jsx("option",{value:Jc,children:"Other…"})]})]}),g?d.jsx("input",{type:"text","aria-label":`${t} — other`,placeholder:"Language code, e.g. fr",value:y,disabled:s,onChange:v=>x(v.target.value),onBlur:S,onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),S())},className:"rounded-lg border border-border bg-raised px-2.5 py-1.5 text-[13.5px] text-foreground"}):null,d.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:u})]})}function n3({snapshot:t,onUpdate:i,onRequestPresetChange:r}){return d.jsxs("section",{"aria-labelledby":"settings-general-heading",children:[d.jsx("h3",{id:"settings-general-heading",className:"sr-only",children:"General"}),d.jsx(t3,{label:"Language",current:t.language.current,recommended:t.language.recommended,note:t.language.appliesNote,onChange:u=>i({field:"language",language:u})}),d.jsx(yf,{label:"Output style",value:t.outputStyle.current,options:t.outputStyle.choices,onChange:u=>i({field:"outputStyle",styleId:u})}),d.jsx(yf,{label:"Preset",note:"Applies to this session — it is not saved for the next one.",value:t.preset.current,options:t.preset.choices,onChange:r})]})}const l3={connected:"Connected",failed:"Failed",disabled:"Disabled"},i3={connected:"text-success",failed:"text-destructive",disabled:"text-muted-foreground"};function r3({server:t,expanded:i,onToggleExpanded:r,onToggleEnabled:u}){const o=w.useId(),s=t.toolNames.length>0;return d.jsx("li",{className:"border-b border-border/60 py-3 last:border-b-0",children:d.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("button",{type:"button",onClick:s?r:void 0,disabled:!s,"aria-expanded":s?i:void 0,className:"flex w-full items-center gap-1.5 text-left disabled:cursor-default",children:[s?i?d.jsx(My,{size:14,strokeWidth:1.75,className:"flex-shrink-0 text-muted-foreground"}):d.jsx(Ku,{size:14,strokeWidth:1.75,className:"flex-shrink-0 text-muted-foreground"}):d.jsx("span",{className:"w-[14px] flex-shrink-0"}),d.jsx("span",{id:o,className:"truncate text-[14px] font-medium text-foreground",children:t.name})]}),d.jsxs("p",{className:"mt-0.5 text-[12.5px] text-muted-foreground",children:[t.scopeLabel," · ",d.jsx("span",{className:i3[t.status],children:l3[t.status]}),t.status==="failed"&&t.statusReason?`: ${t.statusReason}`:""," · ",t.toolNames.length===1?"1 tool":`${t.toolNames.length} tools`]}),i&&s?d.jsx("ul",{className:"mt-2 flex flex-col gap-0.5 pl-[20px]",children:t.toolNames.map(f=>d.jsx("li",{className:"truncate font-mono text-[12px] text-muted-foreground",children:f},f))}):null]}),d.jsx("button",{type:"button",role:"switch","aria-checked":t.enabled,"aria-labelledby":o,onClick:()=>u(!t.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${t.enabled?"bg-primary":"bg-raised"}`,children:d.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${t.enabled?"translate-x-[22px]":"translate-x-0.5"}`})})]})})}function a3({snapshot:t,onToggleServer:i,onReload:r,reloading:u}){const[o,s]=w.useState(new Set),{servers:f}=t.mcp;function h(g){s(m=>{const y=new Set(m);return y.has(g)?y.delete(g):y.add(g),y})}return d.jsxs("section",{"aria-labelledby":"settings-mcp-heading",className:"flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsx("h3",{id:"settings-mcp-heading",className:"text-[14px] font-medium text-foreground",children:"MCP Servers"}),d.jsxs("button",{type:"button",onClick:r,disabled:u,className:"inline-flex items-center gap-1.5 rounded-lg bg-raised px-2.5 py-1.5 text-[13px] text-foreground hover:bg-hover disabled:opacity-60",children:[d.jsx(If,{size:13,strokeWidth:1.75,className:u?"animate-spin":""}),"Reload servers"]})]}),f.length===0?d.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No MCP servers are configured."}):d.jsx("ul",{children:f.map(g=>d.jsx(r3,{server:g,expanded:o.has(g.id),onToggleExpanded:()=>h(g.id),onToggleEnabled:m=>i(g.id,m)},g.id))})]})}const Ex={allow:"Allow",deny:"Deny",ask:"Ask"},u3={allow:"allowed",deny:"denied",ask:"asked about"};function s3({rule:t,onRequestRemove:i}){return d.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-lg px-2.5 py-2 hover:bg-hover",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("p",{className:"truncate text-[13.5px] text-foreground",children:[d.jsx("span",{className:"font-medium",children:Ex[t.kind]})," ",d.jsx("span",{className:"font-mono text-[12.5px]",children:t.pattern})]}),d.jsx("p",{className:"truncate text-[12px] text-muted-foreground",children:t.source})]}),t.removable?d.jsx("button",{type:"button","aria-label":`Remove rule: ${Ex[t.kind]} ${t.pattern}`,onClick:()=>i(t),className:"flex-shrink-0 rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-destructive",children:d.jsx(Yf,{size:15,strokeWidth:1.75})}):null]})}function o3({snapshot:t,onRequestModeChange:i,onToggleSandbox:r,onRequestRemoveRule:u}){const o=w.useId(),{sandbox:s}=t;return d.jsxs("section",{"aria-labelledby":"settings-permissions-heading",className:"flex flex-col gap-5",children:[d.jsxs("div",{children:[d.jsx("h3",{id:"settings-permissions-heading",className:"sr-only",children:"Permissions"}),d.jsx(yf,{label:"Default permission mode",value:t.permissionMode.current,options:t.permissionMode.choices,onChange:i})]}),d.jsxs("div",{children:[d.jsx("h4",{className:"mb-1.5 text-[13px] font-medium text-foreground",children:"Rules"}),t.permissionRules.length===0?d.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No permission rules are configured — the default mode above governs every action."}):d.jsx("ul",{className:"space-y-0.5",children:t.permissionRules.map(f=>d.jsx(s3,{rule:f,onRequestRemove:u},f.id))})]}),d.jsxs("div",{className:"flex items-start justify-between gap-4 border-t border-border/60 pt-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("span",{id:o,className:"text-[14px] font-medium text-foreground",children:"Sandbox"}),d.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-muted-foreground",children:s.description}),!s.available&&s.unavailableReason?d.jsxs("p",{className:"mt-0.5 text-[12.5px] text-destructive",children:["Not available on this machine: ",s.unavailableReason]}):null]}),d.jsx("button",{type:"button",role:"switch","aria-checked":s.enabled,"aria-labelledby":o,disabled:!s.available,onClick:()=>r(!s.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${s.enabled?"bg-primary":"bg-raised"} ${s.available?"":"cursor-not-allowed opacity-50"}`,children:d.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${s.enabled?"translate-x-[22px]":"translate-x-0.5"}`})})]})]})}function c3(t){return`"${t.pattern}" will no longer be ${u3[t.kind]} automatically.`}function f3({plugin:t,canInstall:i,onToggleEnabled:r,onRequestUninstall:u}){const o=w.useId();return d.jsxs("li",{className:"flex items-start justify-between gap-3 border-b border-border/60 py-3 last:border-b-0",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{id:o,className:"truncate text-[14px] font-medium text-foreground",children:t.name}),t.description?d.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-muted-foreground",children:t.description}):null]}),d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[i?d.jsx("button",{type:"button","aria-label":`Uninstall ${t.name}`,onClick:u,className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-destructive",children:d.jsx(Yf,{size:15,strokeWidth:1.75})}):null,d.jsx("button",{type:"button",role:"switch","aria-checked":t.enabled,"aria-labelledby":o,onClick:()=>r(!t.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${t.enabled?"bg-primary":"bg-raised"}`,children:d.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${t.enabled?"translate-x-[22px]":"translate-x-0.5"}`})})]})]})}function d3({snapshot:t,onTogglePlugin:i,onReload:r,reloading:u,onRequestInstall:o,onRequestUninstall:s}){const[f,h]=w.useState(""),{plugins:g,canInstall:m}=t.plugins,y=w.useId();function x(){const S=f.trim();S.length!==0&&(o(S),h(""))}return d.jsxs("section",{"aria-labelledby":"settings-plugins-heading",className:"flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsx("h3",{id:"settings-plugins-heading",className:"text-[14px] font-medium text-foreground",children:"Plugins"}),d.jsxs("button",{type:"button",onClick:r,disabled:u,className:"inline-flex items-center gap-1.5 rounded-lg bg-raised px-2.5 py-1.5 text-[13px] text-foreground hover:bg-hover disabled:opacity-60",children:[d.jsx(If,{size:13,strokeWidth:1.75,className:u?"animate-spin":""}),"Reload plugins"]})]}),g.length===0?d.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No plugins are installed."}):d.jsx("ul",{children:g.map(S=>d.jsx(f3,{plugin:S,canInstall:m,onToggleEnabled:v=>i(S.id,v),onRequestUninstall:()=>s(S)},S.id))}),d.jsx("div",{className:"border-t border-border/60 pt-3",children:m?d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsx("label",{htmlFor:y,className:"text-[13px] font-medium text-foreground",children:"Install a plugin"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:y,type:"text",placeholder:"name@marketplace",value:f,onChange:S=>h(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),x())},className:"min-w-0 flex-1 rounded-lg border border-border bg-raised px-2.5 py-1.5 text-[13.5px] text-foreground"}),d.jsx("button",{type:"button",onClick:x,disabled:f.trim().length===0,className:"flex-shrink-0 rounded-lg bg-raised px-3 py-1.5 text-[13px] text-foreground hover:bg-hover disabled:opacity-60",children:"Install"})]})]}):d.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:"Installing and uninstalling plugins runs code on this computer, so it only works from the desktop app or the page opened here — not from a remote device."})})]})}const Qf="rounded-lg px-2.5 py-1.5 text-[12.5px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",p3=`${Qf} bg-primary text-primary-foreground hover:opacity-90`,Ou=`${Qf} bg-raised text-foreground hover:bg-hover`,h3=`${Qf} text-destructive hover:bg-destructive/10`;function m3({profile:t,modelList:i,onSelect:r}){const[u,o]=w.useState(!1),s=w.useRef(null),f=i?.groups.find(h=>h.profileName===t.name)?.models??[];return d.jsxs("span",{className:"relative inline-block",children:[d.jsx("button",{ref:s,type:"button","aria-haspopup":"menu","aria-expanded":u,disabled:f.length===0,onClick:()=>o(!0),className:Ou,children:"Model"}),u?d.jsx(f1,{label:`Models for ${t.name}`,sections:[{items:f.map(h=>({key:h.id,label:h.label,checked:t.model!==void 0&&h.id===t.model.id,onSelect:()=>r(t.name,h.id)}))}],triggerRef:s,onClose:()=>o(!1)}):null]})}function g3({profile:t,modelList:i,onUse:r,onModelChange:u,onCommand:o,onRequestDelete:s}){return d.jsxs("li",{className:"rounded-xl border border-border/60 p-3",children:[d.jsxs("div",{className:"flex items-start gap-1.5",children:[t.current?d.jsx(ca,{size:14,strokeWidth:2.25,className:"mt-0.5 flex-shrink-0 text-primary","aria-hidden":"true"}):d.jsx("span",{className:"mt-0.5 w-3.5 flex-shrink-0","aria-hidden":"true"}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("p",{className:"truncate text-[14px] font-medium text-foreground",children:[t.name,t.current?d.jsx("span",{className:"sr-only",children:" (in use)"}):null]}),d.jsxs("p",{className:"truncate text-[12.5px] text-muted-foreground",children:[t.providerLabel,t.model?` · ${t.model.label}`:" · No model configured"]}),t.connectionState?d.jsx("p",{className:"text-[12.5px] text-destructive",children:t.connectionState}):null]})]}),d.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[d.jsx("button",{type:"button",disabled:t.current,onClick:()=>r(t.name),className:p3,children:"Use"}),d.jsx(m3,{profile:t,modelList:i,onSelect:u}),d.jsx("button",{type:"button",onClick:()=>o(`edit ${t.name}`),className:Ou,children:"Edit…"}),d.jsx("button",{type:"button",onClick:()=>o(`test ${t.name}`),className:Ou,children:"Test connection"}),d.jsx("button",{type:"button",onClick:()=>o(`duplicate ${t.name}`),className:Ou,children:"Duplicate…"}),d.jsx("button",{type:"button",onClick:()=>s(t.name),className:`${h3} ml-auto`,children:"Delete…"})]})]})}function x3({snapshot:t,modelList:i,onRequestModelList:r,onUse:u,onModelChange:o,onCommand:s,onRequestDelete:f}){w.useEffect(()=>{r()},[]);const{profiles:h}=t.providers;return d.jsxs("section",{"aria-labelledby":"settings-providers-heading",className:"flex flex-col gap-4",children:[d.jsx("h3",{id:"settings-providers-heading",className:"sr-only",children:"Providers & Models"}),h.length===0?d.jsx("p",{className:"text-[13.5px] text-muted-foreground",children:"No providers configured yet."}):d.jsx("ul",{className:"flex flex-col gap-3",children:h.map(g=>d.jsx(g3,{profile:g,modelList:i,onUse:u,onModelChange:o,onCommand:s,onRequestDelete:f},g.name))}),d.jsx("button",{type:"button",onClick:()=>s("add"),className:"self-start rounded-lg bg-raised px-3 py-1.5 text-[13px] font-medium text-foreground hover:bg-hover",children:"Add provider…"})]})}const Pc=[{id:"general",label:"General"},{id:"permissions",label:"Permissions"},{id:"mcp",label:"MCP Servers"},{id:"plugins",label:"Plugins"},{id:"providers",label:"Providers & Models"}];function y3({state:t}){const[i,r]=w.useState("general"),[u,o]=w.useState(!0),[s,f]=w.useState(null),[h,g]=w.useState(null),[m,y]=w.useState(null),[x,S]=w.useState(!1),[v,N]=w.useState(!1),[C,M]=w.useState(null);if(w.useEffect(()=>{t.settingsOpen&&(r(t.settingsInitialSectionId??"general"),o(!0))},[t.settingsOpen,t.settingsInitialSectionId]),w.useEffect(()=>{S(!1),N(!1)},[t.settingsSnapshot,t.settingsError]),!t.settingsOpen)return null;const _=t.settingsSnapshot,G=Pc.find(W=>W.id===i)??Pc[0];function U(W){r(W),o(!1)}function Z(W){if(_&&W===_.permissionMode.skipsAllChecksMode){f({kind:"mode"});return}t.updateSettings({field:"permissionMode",mode:W})}function ne(W){if(_?.preset.skipsAllChecksPresetIds.includes(W)){f({kind:"preset",presetId:W});return}t.updateSettings({field:"preset",presetId:W})}function D(){S(!0),t.updateSettings({field:"reloadMcpServers"})}function H(){N(!0),t.updateSettings({field:"reloadPlugins"})}function le(){m?.kind==="install"?t.updateSettings({field:"installPlugin",pluginId:m.pluginId}):m?.kind==="uninstall"&&t.updateSettings({field:"uninstallPlugin",pluginId:m.plugin.id}),y(null)}return d.jsxs(d.Fragment,{children:[d.jsxs(fa,{open:!0,onClose:()=>t.closeSettings(),title:"Settings",panelClassName:"flex h-[min(680px,85vh)] w-full max-w-3xl flex-col overflow-hidden rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[u?null:d.jsx("button",{type:"button","aria-label":"Back to sections",onClick:()=>o(!0),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground md:hidden",children:d.jsx(FN,{size:18,strokeWidth:1.75})}),d.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Settings"}),d.jsx("button",{type:"button","aria-label":"Close Settings",onClick:()=>t.closeSettings(),className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(nr,{size:17,strokeWidth:1.75})})]}),d.jsxs("div",{className:"flex min-h-0 flex-1",children:[d.jsx("nav",{"aria-label":"Settings sections",className:`w-full flex-shrink-0 overflow-y-auto border-r border-border bg-sidebar px-2 py-3 md:block md:w-[200px] ${u?"block":"hidden"}`,children:d.jsx("ul",{className:"space-y-0.5",children:Pc.map(W=>d.jsx("li",{children:d.jsx("button",{type:"button",onClick:()=>U(W.id),"aria-current":W.id===i?"true":void 0,className:`w-full rounded-lg px-2.5 py-2 text-left text-[13.5px] ${W.id===i?"bg-raised font-medium text-foreground":"text-foreground/85 hover:bg-hover"}`,children:W.label})},W.id))})}),d.jsx("div",{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4 md:block ${u?"hidden":"block"}`,children:_===null?t.settingsStatus==="error"?d.jsxs("div",{className:"flex flex-col items-start gap-2",children:[d.jsx("p",{className:"text-[13.5px] text-destructive",children:t.settingsError??"Settings could not be read."}),d.jsx("button",{type:"button",onClick:()=>t.openSettings(),className:"rounded-lg bg-raised px-3 py-1.5 text-[13px] text-foreground hover:bg-hover",children:"Try again"})]}):d.jsx("p",{className:"text-[13.5px] text-muted-foreground",children:"Loading settings…"}):d.jsxs(d.Fragment,{children:[t.settingsError?d.jsx("p",{className:"mb-3 rounded-lg bg-destructive/12 px-3 py-2 text-[13px] text-destructive",children:t.settingsError}):null,G.id==="general"?d.jsx(n3,{snapshot:_,onUpdate:t.updateSettings,onRequestPresetChange:ne}):G.id==="mcp"?d.jsx(a3,{snapshot:_,onToggleServer:(W,O)=>t.updateSettings({field:"mcpServerEnabled",serverId:W,enabled:O}),onReload:D,reloading:x}):G.id==="plugins"?d.jsx(d3,{snapshot:_,onTogglePlugin:(W,O)=>t.updateSettings({field:"pluginEnabled",pluginId:W,enabled:O}),onReload:H,reloading:v,onRequestInstall:W=>y({kind:"install",pluginId:W}),onRequestUninstall:W=>y({kind:"uninstall",plugin:W})}):G.id==="providers"?d.jsx(x3,{snapshot:_,modelList:t.modelList,onRequestModelList:t.requestModelList,onUse:W=>t.updateSettings({field:"providerProfile",profileName:W}),onModelChange:(W,O)=>t.updateSettings({field:"providerModel",profileName:W,modelId:O}),onCommand:W=>t.send({type:"command",name:"provider",args:W}),onRequestDelete:W=>M(W)}):d.jsx(o3,{snapshot:_,onRequestModeChange:Z,onToggleSandbox:W=>t.updateSettings({field:"sandbox",enabled:W}),onRequestRemoveRule:W=>g(W)})]})})]})]}),d.jsx(Ll,{open:s!==null,title:"Skip all permission checks?",body:"Every action runs without asking first — file edits, shell commands and network access included. You can turn this back on at any time.",confirmLabel:"Skip all checks",destructive:!0,onCancel:()=>f(null),onConfirm:()=>{s?.kind==="mode"&&_?t.updateSettings({field:"permissionMode",mode:_.permissionMode.skipsAllChecksMode}):s?.kind==="preset"&&t.updateSettings({field:"preset",presetId:s.presetId}),f(null)}}),d.jsx(Ll,{open:h!==null,title:"Remove this rule?",body:h?c3(h):"",confirmLabel:"Remove",destructive:!0,onCancel:()=>g(null),onConfirm:()=>{h&&t.updateSettings({field:"removePermissionRule",scope:h.scope,kind:h.kind,pattern:h.pattern}),g(null)}}),d.jsx(Ll,{open:m!==null,title:m?.kind==="uninstall"?"Uninstall this plugin?":"Install this plugin?",body:m?b3(m):"",confirmLabel:m?.kind==="uninstall"?"Uninstall":"Install",destructive:!0,onCancel:()=>y(null),onConfirm:le}),d.jsx(Ll,{open:C!==null,title:C?`Delete profile "${C}"?`:"",body:"This removes the profile and its stored key. This cannot be undone.",confirmLabel:"Delete",destructive:!0,onCancel:()=>M(null),onConfirm:()=>{C&&t.updateSettings({field:"deleteProviderProfile",profileName:C}),M(null)}})]})}function b3(t){if(t.kind==="uninstall")return`"${t.plugin.name}" will be removed from this computer.`;const i=t.pluginId.lastIndexOf("@"),r=i===-1?t.pluginId:t.pluginId.slice(0,i),u=i===-1?void 0:t.pluginId.slice(i+1);return`Install "${r}"${u?` from ${u}`:""}. It can run code on this computer.`}function v3(t){const[i,r]=w.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(t).matches);return w.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const u=window.matchMedia(t),o=()=>r(u.matches);return o(),u.addEventListener("change",o),()=>u.removeEventListener("change",o)},[t]),i}const S3="(max-width: 767.98px)",k3="mx-auto w-full max-w-[760px] px-6",w3="1.0.0";function j3(){return d.jsx("main",{className:"flex h-full items-center justify-center","aria-label":"Conversation",children:d.jsxs("div",{className:"gui-rise flex max-w-[440px] flex-col items-center gap-4 px-8 text-center",children:[d.jsx($f,{size:40}),d.jsx("h2",{className:"text-[26px] font-semibold tracking-[-0.02em] text-foreground",children:"What are we working on?"}),d.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground",children:"Session connected. Send a message to start — the agent works in the host runtime and asks you here before anything that needs your permission."})]})})}function N3({onSetUp:t,disabled:i}){return d.jsx("main",{className:"flex h-full items-center justify-center","aria-label":"Set up a provider",children:d.jsxs("div",{className:"gui-rise flex max-w-[440px] flex-col items-center gap-4 px-8 text-center",children:[d.jsx($f,{size:40}),d.jsx("h2",{className:"text-[26px] font-semibold tracking-[-0.02em] text-foreground",children:"Connect a model provider to start."}),d.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground",children:"Choose a provider and model to start. Enter a key if your provider requires one. You can add more providers or change them later the same way."}),d.jsx("button",{type:"button",onClick:t,disabled:i,className:"rounded-lg bg-primary px-4 py-2 text-[14px] font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:"Set up provider"})]})})}function _3({state:t,surface:i,personalUsageEnabled:r=!1,onReconnect:u,pickFiles:o,getPathForFile:s,onOpenMemoryInEditor:f,appViewSandboxUrl:h}){const[g,m]=w.useState("chat"),{identity:y}=ql(),x=w.useMemo(()=>({...h!==void 0?{sandboxUrl:h}:{},readAppView:t.readAppView,callAppTool:t.callAppTool,hostInfo:{name:y.displayName,version:w3},platform:i==="app"?"desktop":"web"}),[h,t.readAppView,t.callAppTool,y.displayName,i]),S=w.useRef(null),v=t.executionWorkspace?.entries??[],N=v.some(ce=>ce.kind!=="main_thread"),C=v.find(ce=>ce.id===t.openEntryId)??null,M=ce=>{ce.loopId!==void 0?t.send({type:"command",name:"loop",args:`stop ${ce.loopId}`}):t.send({type:"cancel-background-task",taskId:ce.sourceId})},_=t.sessionStatus?.goal??null,G=N||t.scheduledTasks.length>0||_!==null,U=t.messages.length===0&&!t.streamingText&&!t.isThinking&&t.activeTools.length===0,Z=t.sessionStatus?.setupRequired===!0,ne=(t.sessionListing??null)!==null||t.sessionsError?.code==="list_failed",D=ne&&t.sessionSidebarOpen,H=r&&g==="usage",le=g==="project",W=t.sessionListing??null,O=W?.sessions.find(ce=>ce.id===W.currentSessionId),ae=t.sessionName??(O?Mn(O):null),ee=v3(S3),xe=D&&ee,oe=()=>t.setSessionSidebarOpen?.(!1),J=w.useRef(null);w.useEffect(()=>{if(xe)return;const ce=E=>{E.target instanceof HTMLElement&&(J.current=E.target)};return document.addEventListener("focusin",ce),()=>document.removeEventListener("focusin",ce)},[xe]);const L=w.useRef(!1);w.useEffect(()=>{if(L.current&&!xe){const ce=J.current,E=ce?.getAttribute("aria-label");(ce&&document.contains(ce)?ce:E?document.querySelector(`[aria-label="${E}"]`):null)?.focus()}L.current=xe},[xe]);const P={...t,switchSession:ce=>{m("chat"),t.switchSession?.(ce),xe&&oe()},newSession:()=>{m("chat"),t.newSession?.(),xe&&oe()}},fe=d.jsx(MC,{state:P,brand:d.jsx(Xf,{surface:i}),className:xe?"h-full":"absolute inset-y-0 left-0 z-30 shadow-2xl shadow-black/40 md:static md:z-auto md:shadow-none"});return d.jsxs("div",{className:"agent-ui relative flex h-full bg-background text-foreground",children:[ne?D?ee?d.jsx(fa,{open:xe,onClose:oe,title:"Sessions",panelClassName:"mr-auto flex h-full w-[272px] max-w-[85vw] flex-col self-stretch overflow-hidden rounded-2xl bg-sidebar shadow-2xl shadow-black/40 focus:outline-none",children:fe}):fe:d.jsx(OC,{state:P}):null,d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.jsx(ZT,{status:t.status,surface:i,title:ae,workspace:t.sessionStatus?.workspace,showBrand:!D,view:g,onView:m,personalUsageEnabled:r,connectionLost:t.connectionLost??!1}),H?d.jsxs("div",{className:"min-h-0 flex-1",children:[d.jsx(fT,{state:t}),d.jsx(Vc,{layout:"modal",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId})]}):le?d.jsxs("div",{className:"min-h-0 flex-1",children:[d.jsx($T,{state:t,onOpenMemoryInEditor:f}),d.jsx(Vc,{layout:"modal",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId})]}):d.jsxs("div",{className:"flex min-h-0 flex-1",children:[d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.jsx(KT,{status:t.status,connectionLost:t.connectionLost??!1,onReconnect:u}),d.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:Z?d.jsx(N3,{onSetUp:()=>t.send({type:"command",name:"provider",args:"add"}),disabled:t.status!=="connected"}):U?d.jsx(j3,{}):d.jsx(Wy.Provider,{value:x,children:d.jsx(iC,{messages:t.messages,activeTools:t.activeTools,streamingText:t.streamingText,isThinking:t.isThinking,ownDriverId:t.ownDriverId})})}),d.jsxs("div",{className:`${k3} relative flex flex-shrink-0 flex-col gap-2 pb-4 before:pointer-events-none before:absolute before:inset-x-0 before:-top-8 before:h-8 before:bg-gradient-to-t before:from-background before:to-transparent`,children:[d.jsx(UT,{status:t.sessionStatus??null,onStop:()=>t.send({type:"command",name:"goal",args:"cancel"})}),d.jsx(Vc,{layout:"dock",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId,onFocusReturn:()=>S.current?.focus()}),Z?null:d.jsx(LT,{ref:S,catalog:t.commandCatalog??null,status:t.sessionStatus??null,connected:t.status==="connected",running:t.isThinking,onStop:()=>t.send({type:"abort"}),queued:t.queuedPrompt,pickFiles:o,getPathForFile:s,onCancelQueue:()=>{t.send({type:"cancel-queue"}),t.send({type:"get-pending"})},onCommand:(ce,E)=>t.send({type:"command",name:ce,...E?{args:E}:{}}),modelList:t.modelList,onRequestModelList:()=>t.requestModelList(),onSilentCommand:(ce,E)=>t.sendCommandSilently(ce,E),onManageProviders:()=>t.openSettings("providers"),onSubmit:ce=>{if(!ce.startsWith("/")){t.send({type:"submit",prompt:ce});return}const[E,...T]=ce.slice(1).trim().split(/\s+/u);if(!E)return;const V=T.join(" ");t.send({type:"command",name:E,...V?{args:V}:{}})}})]})]}),G&&d.jsx("aside",{"aria-label":"Agents",className:"flex w-72 flex-shrink-0 overflow-hidden bg-sidebar",children:d.jsx(xC,{tasks:v,className:"flex-1",selectedEntryId:t.openEntryId??void 0,onSelect:ce=>t.openExecutionDetail(ce.id),onReturnToConversation:()=>t.closeExecutionDetail(),onStop:M,schedules:t.scheduledTasks,goal:_,onPauseSchedule:t.pauseSchedule,onResumeSchedule:t.resumeSchedule,onDeleteSchedule:t.deleteSchedule,onCancelGoal:()=>t.send({type:"command",name:"goal",args:"cancel"})})}),d.jsx(BT,{entry:C,status:t.executionDetailStatus,records:t.executionDetailRecords,error:t.executionDetailError,complete:t.executionDetailComplete,onClose:()=>t.closeExecutionDetail(),onLoadMore:()=>t.loadMoreExecutionDetail(),onStop:C?()=>M(C):void 0})]})]}),d.jsx(e3,{state:t}),d.jsx(y3,{state:t}),d.jsx(jC,{state:t}),d.jsx(IT,{open:t.helpOpen,onClose:()=>t.closeHelp(),catalog:t.commandCatalog})]})}function bf({tone:t,children:i}){return d.jsxs("div",{className:"agent-ui flex h-full flex-col bg-background text-foreground",children:[d.jsx("header",{className:"flex h-12 flex-shrink-0 items-center px-5",children:d.jsx(Xf,{})}),d.jsx("main",{className:"flex flex-1 items-center justify-center",children:d.jsxs("div",{className:"gui-rise flex max-w-[520px] flex-col items-center gap-4 px-8 text-center",children:[d.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${t==="fatal"?"bg-destructive":"animate-pulse bg-warning"}`}),d.jsx("div",{className:`text-[15px] leading-relaxed ${t==="fatal"?"text-foreground":"text-muted-foreground"}`,children:i})]})})]})}function E3({url:t,host:i}){const{storage:r}=ql(),u=NE(t);w.useEffect(()=>{u.status==="connected"&&i.signalReady()},[u.status,i]);const{openSettings:o}=u;w.useEffect(()=>i.onOpenSettings(o),[i,o]);const s=i.restartRuntime,f=u.sessionListing?.currentSessionId??null,h=s?async()=>{f&&pE(r.browserNamespace,f),await s()}:void 0;return d.jsx(_3,{state:u,surface:i.kind==="desktop"?"app":"web",personalUsageEnabled:!0,onReconnect:h,pickFiles:i.pickFiles,getPathForFile:i.getPathForFile,onOpenMemoryInEditor:i.openMemoryInEditor,appViewSandboxUrl:new URL("app-sandbox.html",document.baseURI).href})}const Wc="rounded-lg px-4 py-2 text-[14px] font-medium disabled:opacity-60 focus-visible:outline focus-visible:outline-2";function C3({detail:t,retry:i}){const[r,u]=w.useState(!1),[o,s]=w.useState(null),f=()=>{i&&(u(!0),s(null),i().catch(h=>{u(!1),s(h instanceof Error?h.message:String(h))}))};return d.jsxs(d.Fragment,{children:[t?d.jsxs(d.Fragment,{children:["The agent process stopped:",d.jsx("pre",{className:"mt-4 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-card p-4 text-left font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:t})]}):"The agent process stopped. Personal Usage is unavailable.",i?d.jsx("div",{className:"mt-4",children:d.jsx("button",{type:"button",onClick:f,disabled:r,className:"rounded-lg bg-primary px-4 py-2 text-[14px] font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:r?"Trying again…":"Try again"})}):d.jsx("p",{className:"mt-3",children:"Restart the app to reconnect."}),o?d.jsx("p",{className:"mt-3 text-[13px] text-destructive",children:o}):null]})}function T3({question:t,answer:i}){const{identity:r}=ql(),[u,o]=w.useState(!1),[s,f]=w.useState(null),h=g=>{o(!0),f(null),i(g).then(m=>{m.error!==void 0&&(o(!1),f(m.error))},m=>{o(!1),f(m instanceof Error?m.message:String(m))})};return d.jsx("div",{role:"dialog","aria-labelledby":"trust-title",className:"flex h-full flex-col",children:d.jsxs(bf,{tone:"muted",children:[d.jsx("h1",{id:"trust-title",className:"text-[16px] font-medium text-foreground",children:"Do you trust this folder?"}),d.jsx("p",{className:"mt-2 break-all font-mono text-[13px] text-foreground",children:t.folder}),d.jsxs("p",{className:"mt-3",children:["Trusting this folder lets ",r.displayName," use the project's own settings, hooks, skills and MCP servers. Restricted starts without them."]}),t.loads.length>0?d.jsxs("details",{className:"mt-4 text-left",children:[d.jsx("summary",{className:"cursor-pointer text-[13px] text-muted-foreground hover:text-foreground",children:"Details"}),d.jsx("pre",{"aria-label":"What trust would load",className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-card p-4 font-mono text-[12px] leading-relaxed text-muted-foreground",children:t.loads.join(`
314
+ `)})]}):null,d.jsxs("div",{className:"mt-5 flex flex-wrap justify-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>h("trust"),disabled:u,className:`${Wc} bg-primary text-primary-foreground hover:opacity-90`,children:"Trust folder"}),d.jsx("button",{type:"button",onClick:()=>h("restricted"),disabled:u,className:`${Wc} bg-card text-foreground hover:opacity-90`,children:"Start Restricted"}),d.jsx("button",{type:"button",onClick:()=>h("quit"),disabled:u,className:`${Wc} text-muted-foreground hover:text-foreground`,children:"Quit"})]}),s?d.jsx("p",{role:"alert",className:"mt-3 whitespace-pre-wrap text-[13px] text-destructive",children:s}):null]})})}function A3({host:t,product:i}){return d.jsx(fE,{value:i,children:d.jsx(z3,{host:t})})}function z3({host:t}){const[i,r]=w.useState(null),[u,o]=w.useState(null),[s,f]=w.useState(null);return w.useEffect(()=>{let h=!1;const g=t.onState((m,y)=>{m==="fatal"&&o(y?{detail:y}:{})});return(async()=>{const m=await t.trustQuestion?.()??null;if(h)return;if(m){f(m);return}const y=await t.getEndpoint();h||r(y)})(),()=>{h=!0,g()}},[t]),u?d.jsx("div",{role:"alert",className:"flex h-full flex-col",children:d.jsx(bf,{tone:"fatal",children:d.jsx(C3,{detail:u.detail,retry:t.restartRuntime})})}):s&&t.answerTrust?d.jsx(T3,{question:s,answer:t.answerTrust}):i?d.jsx(E3,{url:i,host:t}):d.jsx(bf,{tone:"muted",children:"Starting the agent…"})}class D3 extends Gu.Component{constructor(i){super(i),this.state={error:null}}static getDerivedStateFromError(i){return{error:i}}render(){return this.state.error?d.jsx("main",{className:"min-h-screen bg-[var(--background)] flex items-center justify-center p-8",children:d.jsxs("div",{className:"max-w-[600px] text-[15px] text-[var(--destructive)]",children:[d.jsx("p",{className:"mb-2 text-[20px] font-semibold text-[var(--foreground)]",children:"The application encountered an error"}),d.jsx("p",{className:"text-[var(--muted-foreground)] mb-2",children:this.state.error.message}),d.jsx("pre",{className:"overflow-auto whitespace-pre-wrap rounded-xl bg-[var(--card)] p-4 font-mono text-[12.5px] leading-relaxed text-[var(--muted-foreground)]",children:this.state.error.stack})]})}):this.props.children}}function R3(t,i){const r=t?.trim();return r||`ws://${i}`}function M3(t){return t.querySelector('meta[name="ws-url"]')?.getAttribute("content")??null}function O3(t){const i=M3(t.document);if(i?.trim())return i.trim();const r=new URLSearchParams(t.location.search).get("ws");return R3(r,t.location.host)}function L3(t){const{bridge:i}=t;if(i)return{kind:"desktop",getEndpoint:()=>i.getEndpoint(),signalReady:()=>i.signalReady(),onState:u=>i.onState(u),restartRuntime:()=>i.restartRuntime(),trustQuestion:i.runtimeMode==="remote"?void 0:()=>i.trustQuestion(),answerTrust:i.runtimeMode==="remote"?void 0:u=>i.answerTrust(u),pickFiles:i.runtimeMode==="remote"?void 0:()=>i.pickFiles(),getPathForFile:i.runtimeMode==="remote"?void 0:u=>i.getPathForFile(u),onOpenSettings:u=>i.onOpenSettings(u),openMemoryInEditor:i.runtimeMode==="remote"?void 0:u=>{i.openPath(u)}};const r=O3(t);return{kind:"browser",getEndpoint:async()=>r,signalReady:()=>{},onState:()=>()=>{},onOpenSettings:()=>()=>{}}}function U3(t){const i=t.getElementById("root");if(!i)throw new Error("No #root element");return i}var q3={identity:{id:"robota",displayName:"Robota",cliName:"robota",envPrefix:"ROBOTA_",packageScope:"@robota-sdk",repositoryUrl:"https://github.com/woojubb/robota",websiteUrl:"https://robota.io/",docsUrl:"https://docs.robota.io/",appId:"com.robota-sdk.desktop",protocolScheme:"robota"},storage:{browserNamespace:"robota",browserCredentialDatabase:"robota-credentials"},crypto:{namespace:"robota"},services:{}};const B3=L3({bridge:window.agentGui,document,location:window.location});L0.createRoot(U3(document)).render(d.jsx(Gu.StrictMode,{children:d.jsx(D3,{children:d.jsx("div",{className:"h-screen w-screen overflow-hidden",children:d.jsx(A3,{host:B3,product:U0(document,q3)})})})}));