@vibelet/cli 1.2.120 → 1.2.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/runtime-version.cjs +1 -1
- package/dist/web/assets/index-Nazb4KfI.css +1 -0
- package/dist/web/assets/index-msLkYATw.js +21 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-CVs1NtNL.css +0 -1
- package/dist/web/assets/index-DGB8cpT1.js +0 -21
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))f(p);new MutationObserver(p=>{for(const g of p)if(g.type==="childList")for(const U of g.addedNodes)U.tagName==="LINK"&&U.rel==="modulepreload"&&f(U)}).observe(document,{childList:!0,subtree:!0});function r(p){const g={};return p.integrity&&(g.integrity=p.integrity),p.referrerPolicy&&(g.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?g.credentials="include":p.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function f(p){if(p.ep)return;p.ep=!0;const g=r(p);fetch(p.href,g)}})();var vr={exports:{}},bu={};var bm;function e0(){if(bm)return bu;bm=1;var u=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(f,p,g){var U=null;if(g!==void 0&&(U=""+g),p.key!==void 0&&(U=""+p.key),"key"in p){g={};for(var Z in p)Z!=="key"&&(g[Z]=p[Z])}else g=p;return p=g.ref,{$$typeof:u,type:f,key:U,ref:p!==void 0?p:null,props:g}}return bu.Fragment=s,bu.jsx=r,bu.jsxs=r,bu}var Sm;function t0(){return Sm||(Sm=1,vr.exports=e0()),vr.exports}var c=t0(),br={exports:{}},de={};var xm;function n0(){if(xm)return de;xm=1;var u=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),U=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),C=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),K=Symbol.iterator;function k(S){return S===null||typeof S!="object"?null:(S=K&&S[K]||S["@@iterator"],typeof S=="function"?S:null)}var ae={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,Ne={};function me(S,D,Y){this.props=S,this.context=D,this.refs=Ne,this.updater=Y||ae}me.prototype.isReactComponent={},me.prototype.setState=function(S,D){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,D,"setState")},me.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function te(){}te.prototype=me.prototype;function q(S,D,Y){this.props=S,this.context=D,this.refs=Ne,this.updater=Y||ae}var ie=q.prototype=new te;ie.constructor=q,P(ie,me.prototype),ie.isPureReactComponent=!0;var Ee=Array.isArray;function be(){}var ue={H:null,A:null,T:null,S:null},ge=Object.prototype.hasOwnProperty;function He(S,D,Y){var G=Y.ref;return{$$typeof:u,type:S,key:D,ref:G!==void 0?G:null,props:Y}}function Jt(S,D){return He(S.type,D,S.props)}function J(S){return typeof S=="object"&&S!==null&&S.$$typeof===u}function ye(S){var D={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(Y){return D[Y]})}var Et=/\/+/g;function ft(S,D){return typeof S=="object"&&S!==null&&S.key!=null?ye(""+S.key):D.toString(36)}function Ue(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(be,be):(S.status="pending",S.then(function(D){S.status==="pending"&&(S.status="fulfilled",S.value=D)},function(D){S.status==="pending"&&(S.status="rejected",S.reason=D)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function E(S,D,Y,G,ne){var X=typeof S;(X==="undefined"||X==="boolean")&&(S=null);var ee=!1;if(S===null)ee=!0;else switch(X){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(S.$$typeof){case u:case s:ee=!0;break;case L:return ee=S._init,E(ee(S._payload),D,Y,G,ne)}}if(ee)return ne=ne(S),ee=G===""?"."+ft(S,0):G,Ee(ne)?(Y="",ee!=null&&(Y=ee.replace(Et,"$&/")+"/"),E(ne,D,Y,"",function(qt){return qt})):ne!=null&&(J(ne)&&(ne=Jt(ne,Y+(ne.key==null||S&&S.key===ne.key?"":(""+ne.key).replace(Et,"$&/")+"/")+ee)),D.push(ne)),1;ee=0;var $e=G===""?".":G+":";if(Ee(S))for(var Oe=0;Oe<S.length;Oe++)G=S[Oe],X=$e+ft(G,Oe),ee+=E(G,D,Y,X,ne);else if(Oe=k(S),typeof Oe=="function")for(S=Oe.call(S),Oe=0;!(G=S.next()).done;)G=G.value,X=$e+ft(G,Oe++),ee+=E(G,D,Y,X,ne);else if(X==="object"){if(typeof S.then=="function")return E(Ue(S),D,Y,G,ne);throw D=String(S),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return ee}function B(S,D,Y){if(S==null)return S;var G=[],ne=0;return E(S,G,"","",function(X){return D.call(Y,X,ne++)}),G}function W(S){if(S._status===-1){var D=S._result;D=D(),D.then(function(Y){(S._status===0||S._status===-1)&&(S._status=1,S._result=Y)},function(Y){(S._status===0||S._status===-1)&&(S._status=2,S._result=Y)}),S._status===-1&&(S._status=0,S._result=D)}if(S._status===1)return S._result.default;throw S._result}var re=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Se={map:B,forEach:function(S,D,Y){B(S,function(){D.apply(this,arguments)},Y)},count:function(S){var D=0;return B(S,function(){D++}),D},toArray:function(S){return B(S,function(D){return D})||[]},only:function(S){if(!J(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return de.Activity=H,de.Children=Se,de.Component=me,de.Fragment=r,de.Profiler=p,de.PureComponent=q,de.StrictMode=f,de.Suspense=w,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ue,de.__COMPILER_RUNTIME={__proto__:null,c:function(S){return ue.H.useMemoCache(S)}},de.cache=function(S){return function(){return S.apply(null,arguments)}},de.cacheSignal=function(){return null},de.cloneElement=function(S,D,Y){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var G=P({},S.props),ne=S.key;if(D!=null)for(X in D.key!==void 0&&(ne=""+D.key),D)!ge.call(D,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&D.ref===void 0||(G[X]=D[X]);var X=arguments.length-2;if(X===1)G.children=Y;else if(1<X){for(var ee=Array(X),$e=0;$e<X;$e++)ee[$e]=arguments[$e+2];G.children=ee}return He(S.type,ne,G)},de.createContext=function(S){return S={$$typeof:U,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:g,_context:S},S},de.createElement=function(S,D,Y){var G,ne={},X=null;if(D!=null)for(G in D.key!==void 0&&(X=""+D.key),D)ge.call(D,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(ne[G]=D[G]);var ee=arguments.length-2;if(ee===1)ne.children=Y;else if(1<ee){for(var $e=Array(ee),Oe=0;Oe<ee;Oe++)$e[Oe]=arguments[Oe+2];ne.children=$e}if(S&&S.defaultProps)for(G in ee=S.defaultProps,ee)ne[G]===void 0&&(ne[G]=ee[G]);return He(S,X,ne)},de.createRef=function(){return{current:null}},de.forwardRef=function(S){return{$$typeof:Z,render:S}},de.isValidElement=J,de.lazy=function(S){return{$$typeof:L,_payload:{_status:-1,_result:S},_init:W}},de.memo=function(S,D){return{$$typeof:C,type:S,compare:D===void 0?null:D}},de.startTransition=function(S){var D=ue.T,Y={};ue.T=Y;try{var G=S(),ne=ue.S;ne!==null&&ne(Y,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(be,re)}catch(X){re(X)}finally{D!==null&&Y.types!==null&&(D.types=Y.types),ue.T=D}},de.unstable_useCacheRefresh=function(){return ue.H.useCacheRefresh()},de.use=function(S){return ue.H.use(S)},de.useActionState=function(S,D,Y){return ue.H.useActionState(S,D,Y)},de.useCallback=function(S,D){return ue.H.useCallback(S,D)},de.useContext=function(S){return ue.H.useContext(S)},de.useDebugValue=function(){},de.useDeferredValue=function(S,D){return ue.H.useDeferredValue(S,D)},de.useEffect=function(S,D){return ue.H.useEffect(S,D)},de.useEffectEvent=function(S){return ue.H.useEffectEvent(S)},de.useId=function(){return ue.H.useId()},de.useImperativeHandle=function(S,D,Y){return ue.H.useImperativeHandle(S,D,Y)},de.useInsertionEffect=function(S,D){return ue.H.useInsertionEffect(S,D)},de.useLayoutEffect=function(S,D){return ue.H.useLayoutEffect(S,D)},de.useMemo=function(S,D){return ue.H.useMemo(S,D)},de.useOptimistic=function(S,D){return ue.H.useOptimistic(S,D)},de.useReducer=function(S,D,Y){return ue.H.useReducer(S,D,Y)},de.useRef=function(S){return ue.H.useRef(S)},de.useState=function(S){return ue.H.useState(S)},de.useSyncExternalStore=function(S,D,Y){return ue.H.useSyncExternalStore(S,D,Y)},de.useTransition=function(){return ue.H.useTransition()},de.version="19.2.7",de}var jm;function Yr(){return jm||(jm=1,br.exports=n0()),br.exports}var b=Yr(),Sr={exports:{}},Su={},xr={exports:{}},jr={};var Nm;function l0(){return Nm||(Nm=1,(function(u){function s(E,B){var W=E.length;E.push(B);e:for(;0<W;){var re=W-1>>>1,Se=E[re];if(0<p(Se,B))E[re]=B,E[W]=Se,W=re;else break e}}function r(E){return E.length===0?null:E[0]}function f(E){if(E.length===0)return null;var B=E[0],W=E.pop();if(W!==B){E[0]=W;e:for(var re=0,Se=E.length,S=Se>>>1;re<S;){var D=2*(re+1)-1,Y=E[D],G=D+1,ne=E[G];if(0>p(Y,W))G<Se&&0>p(ne,Y)?(E[re]=ne,E[G]=W,re=G):(E[re]=Y,E[D]=W,re=D);else if(G<Se&&0>p(ne,W))E[re]=ne,E[G]=W,re=G;else break e}}return B}function p(E,B){var W=E.sortIndex-B.sortIndex;return W!==0?W:E.id-B.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;u.unstable_now=function(){return g.now()}}else{var U=Date,Z=U.now();u.unstable_now=function(){return U.now()-Z}}var w=[],C=[],L=1,H=null,K=3,k=!1,ae=!1,P=!1,Ne=!1,me=typeof setTimeout=="function"?setTimeout:null,te=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function ie(E){for(var B=r(C);B!==null;){if(B.callback===null)f(C);else if(B.startTime<=E)f(C),B.sortIndex=B.expirationTime,s(w,B);else break;B=r(C)}}function Ee(E){if(P=!1,ie(E),!ae)if(r(w)!==null)ae=!0,be||(be=!0,ye());else{var B=r(C);B!==null&&Ue(Ee,B.startTime-E)}}var be=!1,ue=-1,ge=5,He=-1;function Jt(){return Ne?!0:!(u.unstable_now()-He<ge)}function J(){if(Ne=!1,be){var E=u.unstable_now();He=E;var B=!0;try{e:{ae=!1,P&&(P=!1,te(ue),ue=-1),k=!0;var W=K;try{t:{for(ie(E),H=r(w);H!==null&&!(H.expirationTime>E&&Jt());){var re=H.callback;if(typeof re=="function"){H.callback=null,K=H.priorityLevel;var Se=re(H.expirationTime<=E);if(E=u.unstable_now(),typeof Se=="function"){H.callback=Se,ie(E),B=!0;break t}H===r(w)&&f(w),ie(E)}else f(w);H=r(w)}if(H!==null)B=!0;else{var S=r(C);S!==null&&Ue(Ee,S.startTime-E),B=!1}}break e}finally{H=null,K=W,k=!1}B=void 0}}finally{B?ye():be=!1}}}var ye;if(typeof q=="function")ye=function(){q(J)};else if(typeof MessageChannel<"u"){var Et=new MessageChannel,ft=Et.port2;Et.port1.onmessage=J,ye=function(){ft.postMessage(null)}}else ye=function(){me(J,0)};function Ue(E,B){ue=me(function(){E(u.unstable_now())},B)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(E){E.callback=null},u.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ge=0<E?Math.floor(1e3/E):5},u.unstable_getCurrentPriorityLevel=function(){return K},u.unstable_next=function(E){switch(K){case 1:case 2:case 3:var B=3;break;default:B=K}var W=K;K=B;try{return E()}finally{K=W}},u.unstable_requestPaint=function(){Ne=!0},u.unstable_runWithPriority=function(E,B){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var W=K;K=E;try{return B()}finally{K=W}},u.unstable_scheduleCallback=function(E,B,W){var re=u.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?re+W:re):W=re,E){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=W+Se,E={id:L++,callback:B,priorityLevel:E,startTime:W,expirationTime:Se,sortIndex:-1},W>re?(E.sortIndex=W,s(C,E),r(w)===null&&E===r(C)&&(P?(te(ue),ue=-1):P=!0,Ue(Ee,W-re))):(E.sortIndex=Se,s(w,E),ae||k||(ae=!0,be||(be=!0,ye()))),E},u.unstable_shouldYield=Jt,u.unstable_wrapCallback=function(E){var B=K;return function(){var W=K;K=B;try{return E.apply(this,arguments)}finally{K=W}}}})(jr)),jr}var Am;function a0(){return Am||(Am=1,xr.exports=l0()),xr.exports}var Nr={exports:{}},Yt={};var Tm;function i0(){if(Tm)return Yt;Tm=1;var u=Yr();function s(w){var C="https://react.dev/errors/"+w;if(1<arguments.length){C+="?args[]="+encodeURIComponent(arguments[1]);for(var L=2;L<arguments.length;L++)C+="&args[]="+encodeURIComponent(arguments[L])}return"Minified React error #"+w+"; visit "+C+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var f={d:{f:r,r:function(){throw Error(s(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},p=Symbol.for("react.portal");function g(w,C,L){var H=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:H==null?null:""+H,children:w,containerInfo:C,implementation:L}}var U=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Z(w,C){if(w==="font")return"";if(typeof C=="string")return C==="use-credentials"?C:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f,Yt.createPortal=function(w,C){var L=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!C||C.nodeType!==1&&C.nodeType!==9&&C.nodeType!==11)throw Error(s(299));return g(w,C,null,L)},Yt.flushSync=function(w){var C=U.T,L=f.p;try{if(U.T=null,f.p=2,w)return w()}finally{U.T=C,f.p=L,f.d.f()}},Yt.preconnect=function(w,C){typeof w=="string"&&(C?(C=C.crossOrigin,C=typeof C=="string"?C==="use-credentials"?C:"":void 0):C=null,f.d.C(w,C))},Yt.prefetchDNS=function(w){typeof w=="string"&&f.d.D(w)},Yt.preinit=function(w,C){if(typeof w=="string"&&C&&typeof C.as=="string"){var L=C.as,H=Z(L,C.crossOrigin),K=typeof C.integrity=="string"?C.integrity:void 0,k=typeof C.fetchPriority=="string"?C.fetchPriority:void 0;L==="style"?f.d.S(w,typeof C.precedence=="string"?C.precedence:void 0,{crossOrigin:H,integrity:K,fetchPriority:k}):L==="script"&&f.d.X(w,{crossOrigin:H,integrity:K,fetchPriority:k,nonce:typeof C.nonce=="string"?C.nonce:void 0})}},Yt.preinitModule=function(w,C){if(typeof w=="string")if(typeof C=="object"&&C!==null){if(C.as==null||C.as==="script"){var L=Z(C.as,C.crossOrigin);f.d.M(w,{crossOrigin:L,integrity:typeof C.integrity=="string"?C.integrity:void 0,nonce:typeof C.nonce=="string"?C.nonce:void 0})}}else C==null&&f.d.M(w)},Yt.preload=function(w,C){if(typeof w=="string"&&typeof C=="object"&&C!==null&&typeof C.as=="string"){var L=C.as,H=Z(L,C.crossOrigin);f.d.L(w,L,{crossOrigin:H,integrity:typeof C.integrity=="string"?C.integrity:void 0,nonce:typeof C.nonce=="string"?C.nonce:void 0,type:typeof C.type=="string"?C.type:void 0,fetchPriority:typeof C.fetchPriority=="string"?C.fetchPriority:void 0,referrerPolicy:typeof C.referrerPolicy=="string"?C.referrerPolicy:void 0,imageSrcSet:typeof C.imageSrcSet=="string"?C.imageSrcSet:void 0,imageSizes:typeof C.imageSizes=="string"?C.imageSizes:void 0,media:typeof C.media=="string"?C.media:void 0})}},Yt.preloadModule=function(w,C){if(typeof w=="string")if(C){var L=Z(C.as,C.crossOrigin);f.d.m(w,{as:typeof C.as=="string"&&C.as!=="script"?C.as:void 0,crossOrigin:L,integrity:typeof C.integrity=="string"?C.integrity:void 0})}else f.d.m(w)},Yt.requestFormReset=function(w){f.d.r(w)},Yt.unstable_batchedUpdates=function(w,C){return w(C)},Yt.useFormState=function(w,C,L){return U.H.useFormState(w,C,L)},Yt.useFormStatus=function(){return U.H.useHostTransitionStatus()},Yt.version="19.2.7",Yt}var Em;function u0(){if(Em)return Nr.exports;Em=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(s){console.error(s)}}return u(),Nr.exports=i0(),Nr.exports}var Cm;function c0(){if(Cm)return Su;Cm=1;var u=a0(),s=Yr(),r=u0();function f(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function g(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function U(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Z(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function w(e){if(g(e)!==e)throw Error(f(188))}function C(e){var t=e.alternate;if(!t){if(t=g(e),t===null)throw Error(f(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return w(a),e;if(i===l)return w(a),t;i=i.sibling}throw Error(f(188))}if(n.return!==l.return)n=a,l=i;else{for(var o=!1,h=a.child;h;){if(h===n){o=!0,n=a,l=i;break}if(h===l){o=!0,l=a,n=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===n){o=!0,n=i,l=a;break}if(h===l){o=!0,l=i,n=a;break}h=h.sibling}if(!o)throw Error(f(189))}}if(n.alternate!==l)throw Error(f(190))}if(n.tag!==3)throw Error(f(188));return n.stateNode.current===n?e:t}function L(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=L(e),t!==null)return t;e=e.sibling}return null}var H=Object.assign,K=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),ae=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),Ne=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),te=Symbol.for("react.consumer"),q=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),Ee=Symbol.for("react.suspense"),be=Symbol.for("react.suspense_list"),ue=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),He=Symbol.for("react.activity"),Jt=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function ye(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var Et=Symbol.for("react.client.reference");function ft(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Et?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case P:return"Fragment";case me:return"Profiler";case Ne:return"StrictMode";case Ee:return"Suspense";case be:return"SuspenseList";case He:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case ae:return"Portal";case q:return e.displayName||"Context";case te:return(e._context.displayName||"Context")+".Consumer";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ue:return t=e.displayName||null,t!==null?t:ft(e.type)||"Memo";case ge:t=e._payload,e=e._init;try{return ft(e(t))}catch{}}return null}var Ue=Array.isArray,E=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},re=[],Se=-1;function S(e){return{current:e}}function D(e){0>Se||(e.current=re[Se],re[Se]=null,Se--)}function Y(e,t){Se++,re[Se]=e.current,e.current=t}var G=S(null),ne=S(null),X=S(null),ee=S(null);function $e(e,t){switch(Y(X,t),Y(ne,e),Y(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gh(t),e=Qh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D(G),Y(G,e)}function Oe(){D(G),D(ne),D(X)}function qt(e){e.memoizedState!==null&&Y(ee,e);var t=G.current,n=Qh(t,e.type);t!==n&&(Y(ne,e),Y(G,n))}function _e(e){ne.current===e&&(D(G),D(ne)),ee.current===e&&(D(ee),yu._currentValue=W)}var nn,ln;function V(e){if(nn===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);nn=t&&t[1]||"",ln=-1<n.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+nn+e+ln}var Ze=!1;function zt(e,t){if(!e||Ze)return"";Ze=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(M){var T=M}Reflect.construct(e,[],R)}else{try{R.call()}catch(M){T=M}e.call(R.prototype)}}else{try{throw Error()}catch(M){T=M}(R=e())&&typeof R.catch=="function"&&R.catch(function(){})}}catch(M){if(M&&T&&typeof M.stack=="string")return[M.stack,T.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var v=o.split(`
|
|
4
|
+
`),A=h.split(`
|
|
5
|
+
`);for(a=l=0;l<v.length&&!v[l].includes("DetermineComponentFrameRoot");)l++;for(;a<A.length&&!A[a].includes("DetermineComponentFrameRoot");)a++;if(l===v.length||a===A.length)for(l=v.length-1,a=A.length-1;1<=l&&0<=a&&v[l]!==A[a];)a--;for(;1<=l&&0<=a;l--,a--)if(v[l]!==A[a]){if(l!==1||a!==1)do if(l--,a--,0>a||v[l]!==A[a]){var z=`
|
|
6
|
+
`+v[l].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=l&&0<=a);break}}}finally{Ze=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?V(n):""}function $(e,t){switch(e.tag){case 26:case 27:case 5:return V(e.type);case 16:return V("Lazy");case 13:return e.child!==t&&t!==null?V("Suspense Fallback"):V("Suspense");case 19:return V("SuspenseList");case 0:case 15:return zt(e.type,!1);case 11:return zt(e.type.render,!1);case 1:return zt(e.type,!0);case 31:return V("Activity");default:return""}}function Be(e){try{var t="",n=null;do t+=$(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var ze=Object.prototype.hasOwnProperty,ct=u.unstable_scheduleCallback,yn=u.unstable_cancelCallback,ka=u.unstable_shouldYield,an=u.unstable_requestPaint,Ce=u.unstable_now,tl=u.unstable_getCurrentPriorityLevel,Ke=u.unstable_ImmediatePriority,wn=u.unstable_UserBlockingPriority,pn=u.unstable_NormalPriority,Gt=u.unstable_LowPriority,jl=u.unstable_IdlePriority,zu=u.log,Ht=u.unstable_setDisableYieldValue,Qn=null,it=null;function un(e){if(typeof zu=="function"&&Ht(e),it&&typeof it.setStrictMode=="function")try{it.setStrictMode(Qn,e)}catch{}}var lt=Math.clz32?Math.clz32:Nl,oa=Math.log,nl=Math.LN2;function Nl(e){return e>>>=0,e===0?32:31-(oa(e)/nl|0)|0}var Vn=256,se=262144,Le=4194304;function yt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Bt(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~i,l!==0?a=yt(l):(o&=h,o!==0?a=yt(o):n||(n=h&~e,n!==0&&(a=yt(n))))):(h=l&~i,h!==0?a=yt(h):o!==0?a=yt(o):n||(n=l&~e,n!==0&&(a=yt(n)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function Qt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ll(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pt(){var e=Le;return Le<<=1,(Le&62914560)===0&&(Le=4194304),e}function Al(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Rn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gt(e,t,n,l,a,i){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var h=e.entanglements,v=e.expirationTimes,A=e.hiddenUpdates;for(n=o&~n;0<n;){var z=31-lt(n),R=1<<z;h[z]=0,v[z]=-1;var T=A[z];if(T!==null)for(A[z]=null,z=0;z<T.length;z++){var M=T[z];M!==null&&(M.lane&=-536870913)}n&=~R}l!==0&&qa(e,l,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function qa(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-lt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Ti(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-lt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Du(e,t){var n=t&-t;return n=(n&42)!==0?1:gn(n),(n&(e.suspendedLanes|t))!==0?0:n}function gn(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 Ha(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vn(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:dm(e.type))}function Ei(e,t){var n=B.p;try{return B.p=e,t()}finally{B.p=n}}var bn=Math.random().toString(36).slice(2),vt="__reactFiber$"+bn,Ct="__reactProps$"+bn,Tl="__reactContainer$"+bn,Vt="__reactEvents$"+bn,Ou="__reactListeners$"+bn,us="__reactHandles$"+bn,Ba="__reactResources$"+bn,El="__reactMarker$"+bn;function Un(e){delete e[vt],delete e[Ct],delete e[Vt],delete e[Ou],delete e[us]}function De(e){var t=e[vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tl]||n[vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Fh(e);e!==null;){if(n=e[vt])return n;e=Fh(e)}return t}e=n,n=e.parentNode}return null}function Dt(e){if(e=e[vt]||e[Tl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Xn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(f(33))}function Cl(e){var t=e[Ba];return t||(t=e[Ba]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[El]=!0}var ra=new Set,wu={};function Sn(e,t){Ml(e,t),Ml(e+"Capture",t)}function Ml(e,t){for(wu[e]=t,e=0;e<t.length;e++)ra.add(t[e])}var cs=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]*$"),Ru={},Uu={};function ss(e){return ze.call(Uu,e)?!0:ze.call(Ru,e)?!1:cs.test(e)?Uu[e]=!0:(Ru[e]=!0,!1)}function La(e,t,n){if(ss(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Ya(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function st(e,t,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.setAttributeNS(t,n,""+l)}}function Mt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ga(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ku(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ie(e){if(!e._valueTracker){var t=Ga(e)?"checked":"value";e._valueTracker=ku(e,t,""+e[t])}}function fa(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Ga(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function Qa(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 Ci=/[\n"\\]/g;function $t(e){return e.replace(Ci,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Va(e,t,n,l,a,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mt(t)):e.value!==""+Mt(t)&&(e.value=""+Mt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?zl(e,o,Mt(t)):n!=null?zl(e,o,Mt(n)):l!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Mt(h):e.removeAttribute("name")}function _l(e,t,n,l,a,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Ie(e);return}n=n!=null?""+Mt(n):"",t=t!=null?""+Mt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Ie(e)}function zl(e,t,n){t==="number"&&Qa(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ft(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Mt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Dl(e,t,n){if(t!=null&&(t=""+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Mt(n):""}function Xa(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(f(92));if(Ue(l)){if(1<l.length)throw Error(f(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Mt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Ie(e)}function Ol(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var al=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 Za(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||al.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Zn(e,t,n){if(t!=null&&typeof t!="object")throw Error(f(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&Za(e,a,l)}else for(var i in t)t.hasOwnProperty(i)&&Za(e,i,t[i])}function Mi(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 ve=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"]]),wl=/^[\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 Lt(e){return wl.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function kn(){}var _i=null;function zi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kn=null,Rl=null;function qu(e){var t=Dt(e);if(t&&(e=t.stateNode)){var n=e[Ct]||null;e:switch(e=t.stateNode,t.type){case"input":if(Va(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+$t(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[Ct]||null;if(!a)throw Error(f(90));Va(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&fa(l)}break e;case"textarea":Dl(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Pe=!1;function Hu(e,t,n){if(Pe)return e(t,n);Pe=!0;try{var l=e(t);return l}finally{if(Pe=!1,(Kn!==null||Rl!==null)&&(Cc(),Kn&&(t=Kn,e=Rl,Rl=Kn=null,qu(t),e)))for(t=0;t<e.length;t++)qu(e[t])}}function Ul(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Ct]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(f(231,t,typeof n));return n}var Xt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ka=!1;if(Xt)try{var da={};Object.defineProperty(da,"passive",{get:function(){Ka=!0}}),window.addEventListener("test",da,da),window.removeEventListener("test",da,da)}catch{Ka=!1}var qn=null,Di=null,il=null;function ha(){if(il)return il;var e,t=Di,n=t.length,l,a="value"in qn?qn.value:qn.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var o=n-e;for(l=1;l<=o&&t[n-l]===a[i-l];l++);return il=a.slice(e,1<l?1-l:void 0)}function ma(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function kl(){return!0}function dt(){return!1}function Fe(e){function t(n,l,a,i,o){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?kl:dt,this.isPropagationStopped=dt,this}return H(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=kl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=kl)},persist:function(){},isPersistent:kl}),t}var Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$n=Fe(Jn),xn=H({},Jn,{view:0,detail:0}),ql=Fe(xn),Hl,Hn,Fn,ya=H({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ki,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!==Fn&&(Fn&&e.type==="mousemove"?(Hl=e.screenX-Fn.screenX,Hn=e.screenY-Fn.screenY):Hn=Hl=0,Fn=e),Hl)},movementY:function(e){return"movementY"in e?e.movementY:Hn}}),Ja=Fe(ya),Bu=H({},ya,{dataTransfer:0}),Lu=Fe(Bu),Oi=H({},xn,{relatedTarget:0}),wi=Fe(Oi),os=H({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),rs=Fe(os),fs=H({},Jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ds=Fe(fs),hs=H({},Jn,{data:0}),Yu=Fe(hs),ms={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ri={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"},Ui={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ys(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ui[e])?!!t[e]:!1}function ki(){return ys}var ps=H({},xn,{key:function(e){if(e.key){var t=ms[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ma(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ri[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ki,charCode:function(e){return e.type==="keypress"?ma(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ma(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gs=Fe(ps),vs=H({},ya,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qi=Fe(vs),bs=H({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ki}),Ss=Fe(bs),Bl=H({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),xs=Fe(Bl),Gu=H({},ya,{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}),js=Fe(Gu),Qu=H({},Jn,{newState:0,oldState:0}),Ns=Fe(Qu),As=[9,13,27,32],Hi=Xt&&"CompositionEvent"in window,pa=null;Xt&&"documentMode"in document&&(pa=document.documentMode);var Ts=Xt&&"TextEvent"in window&&!pa,Vu=Xt&&(!Hi||pa&&8<pa&&11>=pa),Xu=" ",Zu=!1;function d(e,t){switch(e){case"keyup":return As.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function y(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var m=!1;function _(e,t){switch(e){case"compositionend":return y(t);case"keypress":return t.which!==32?null:(Zu=!0,Xu);case"textInput":return e=t.data,e===Xu&&Zu?null:e;default:return null}}function Q(e,t){if(m)return e==="compositionend"||!Hi&&d(e,t)?(e=ha(),il=Di=qn=null,m=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Vu&&t.locale!=="ko"?null:t.data;default:return null}}var fe={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 ke(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fe[e.type]:t==="textarea"}function bt(e,t,n,l){Kn?Rl?Rl.push(l):Rl=[l]:Kn=l,t=Rc(t,"onChange"),0<t.length&&(n=new $n("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var We=null,cn=null;function et(e){kh(e,0)}function Zt(e){var t=Xn(e);if(fa(t))return e}function Ot(e,t){if(e==="change")return t}var jn=!1;if(Xt){var ga;if(Xt){var va="oninput"in document;if(!va){var nf=document.createElement("div");nf.setAttribute("oninput","return;"),va=typeof nf.oninput=="function"}ga=va}else ga=!1;jn=ga&&(!document.documentMode||9<document.documentMode)}function lf(){We&&(We.detachEvent("onpropertychange",af),cn=We=null)}function af(e){if(e.propertyName==="value"&&Zt(cn)){var t=[];bt(t,cn,e,zi(e)),Hu(et,t)}}function My(e,t,n){e==="focusin"?(lf(),We=t,cn=n,We.attachEvent("onpropertychange",af)):e==="focusout"&&lf()}function _y(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zt(cn)}function zy(e,t){if(e==="click")return Zt(t)}function Dy(e,t){if(e==="input"||e==="change")return Zt(t)}function Oy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sn=typeof Object.is=="function"?Object.is:Oy;function Bi(e,t){if(sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!ze.call(t,a)||!sn(e[a],t[a]))return!1}return!0}function uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cf(e,t){var n=uf(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=uf(n)}}function sf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function of(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qa(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Qa(e.document)}return t}function Es(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var wy=Xt&&"documentMode"in document&&11>=document.documentMode,$a=null,Cs=null,Li=null,Ms=!1;function rf(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ms||$a==null||$a!==Qa(l)||(l=$a,"selectionStart"in l&&Es(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Li&&Bi(Li,l)||(Li=l,l=Rc(Cs,"onSelect"),0<l.length&&(t=new $n("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=$a)))}function ba(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fa={animationend:ba("Animation","AnimationEnd"),animationiteration:ba("Animation","AnimationIteration"),animationstart:ba("Animation","AnimationStart"),transitionrun:ba("Transition","TransitionRun"),transitionstart:ba("Transition","TransitionStart"),transitioncancel:ba("Transition","TransitionCancel"),transitionend:ba("Transition","TransitionEnd")},_s={},ff={};Xt&&(ff=document.createElement("div").style,"AnimationEvent"in window||(delete Fa.animationend.animation,delete Fa.animationiteration.animation,delete Fa.animationstart.animation),"TransitionEvent"in window||delete Fa.transitionend.transition);function Sa(e){if(_s[e])return _s[e];if(!Fa[e])return e;var t=Fa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ff)return _s[e]=t[n];return e}var df=Sa("animationend"),hf=Sa("animationiteration"),mf=Sa("animationstart"),Ry=Sa("transitionrun"),Uy=Sa("transitionstart"),ky=Sa("transitioncancel"),yf=Sa("transitionend"),pf=new Map,zs="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(" ");zs.push("scrollEnd");function Bn(e,t){pf.set(e,t),Sn(t,[e])}var Ku=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Nn=[],Wa=0,Ds=0;function Ju(){for(var e=Wa,t=Ds=Wa=0;t<e;){var n=Nn[t];Nn[t++]=null;var l=Nn[t];Nn[t++]=null;var a=Nn[t];Nn[t++]=null;var i=Nn[t];if(Nn[t++]=null,l!==null&&a!==null){var o=l.pending;o===null?a.next=a:(a.next=o.next,o.next=a),l.pending=a}i!==0&&gf(n,a,i)}}function $u(e,t,n,l){Nn[Wa++]=e,Nn[Wa++]=t,Nn[Wa++]=n,Nn[Wa++]=l,Ds|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Os(e,t,n,l){return $u(e,t,n,l),Fu(e)}function xa(e,t){return $u(e,null,null,t),Fu(e)}function gf(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-lt(n),e=i.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),i):null}function Fu(e){if(50<su)throw su=0,Go=null,Error(f(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ia={};function qy(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,n,l){return new qy(e,t,n,l)}function ws(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ul(e,t){var n=e.alternate;return n===null?(n=on(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function vf(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Wu(e,t,n,l,a,i){var o=0;if(l=e,typeof e=="function")ws(e)&&(o=1);else if(typeof e=="string")o=Gp(e,n,G.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case He:return e=on(31,n,t,a),e.elementType=He,e.lanes=i,e;case P:return ja(n.children,a,i,t);case Ne:o=8,a|=24;break;case me:return e=on(12,n,t,a|2),e.elementType=me,e.lanes=i,e;case Ee:return e=on(13,n,t,a),e.elementType=Ee,e.lanes=i,e;case be:return e=on(19,n,t,a),e.elementType=be,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:o=10;break e;case te:o=9;break e;case ie:o=11;break e;case ue:o=14;break e;case ge:o=16,l=null;break e}o=29,n=Error(f(130,e===null?"null":typeof e,"")),l=null}return t=on(o,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function ja(e,t,n,l){return e=on(7,e,l,t),e.lanes=n,e}function Rs(e,t,n){return e=on(6,e,null,t),e.lanes=n,e}function bf(e){var t=on(18,null,null,0);return t.stateNode=e,t}function Us(e,t,n){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Sf=new WeakMap;function An(e,t){if(typeof e=="object"&&e!==null){var n=Sf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Be(t)},Sf.set(e,t),t)}return{value:e,source:t,stack:Be(t)}}var Pa=[],ei=0,Iu=null,Yi=0,Tn=[],En=0,Ll=null,Wn=1,In="";function cl(e,t){Pa[ei++]=Yi,Pa[ei++]=Iu,Iu=e,Yi=t}function xf(e,t,n){Tn[En++]=Wn,Tn[En++]=In,Tn[En++]=Ll,Ll=e;var l=Wn;e=In;var a=32-lt(l)-1;l&=~(1<<a),n+=1;var i=32-lt(t)+a;if(30<i){var o=a-a%5;i=(l&(1<<o)-1).toString(32),l>>=o,a-=o,Wn=1<<32-lt(t)+a|n<<a|l,In=i+e}else Wn=1<<i|n<<a|l,In=e}function ks(e){e.return!==null&&(cl(e,1),xf(e,1,0))}function qs(e){for(;e===Iu;)Iu=Pa[--ei],Pa[ei]=null,Yi=Pa[--ei],Pa[ei]=null;for(;e===Ll;)Ll=Tn[--En],Tn[En]=null,In=Tn[--En],Tn[En]=null,Wn=Tn[--En],Tn[En]=null}function jf(e,t){Tn[En++]=Wn,Tn[En++]=In,Tn[En++]=Ll,Wn=t.id,In=t.overflow,Ll=e}var wt=null,tt=null,Me=!1,Yl=null,Cn=!1,Hs=Error(f(519));function Gl(e){var t=Error(f(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(An(t,e)),Hs}function Nf(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[vt]=e,t[Ct]=l,n){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(n=0;n<ru.length;n++)je(ru[n],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),_l(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),Xa(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Lh(t.textContent,n)?(l.popover!=null&&(je("beforetoggle",t),je("toggle",t)),l.onScroll!=null&&je("scroll",t),l.onScrollEnd!=null&&je("scrollend",t),l.onClick!=null&&(t.onclick=kn),t=!0):t=!1,t||Gl(e,!0)}function Af(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:wt=wt.return}}function ti(e){if(e!==wt)return!1;if(!Me)return Af(e),Me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||lr(e.type,e.memoizedProps)),n=!n),n&&tt&&Gl(e),Af(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(317));tt=$h(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(317));tt=$h(e)}else t===27?(t=tt,na(e.type)?(e=sr,sr=null,tt=e):tt=t):tt=wt?_n(e.stateNode.nextSibling):null;return!0}function Na(){tt=wt=null,Me=!1}function Bs(){var e=Yl;return e!==null&&(en===null?en=e:en.push.apply(en,e),Yl=null),e}function Gi(e){Yl===null?Yl=[e]:Yl.push(e)}var Ls=S(null),Aa=null,sl=null;function Ql(e,t,n){Y(Ls,t._currentValue),t._currentValue=n}function ol(e){e._currentValue=Ls.current,D(Ls)}function Ys(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Gs(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var o=a.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=a;for(var v=0;v<t.length;v++)if(h.context===t[v]){i.lanes|=n,h=i.alternate,h!==null&&(h.lanes|=n),Ys(i.return,n,e),l||(o=null);break e}i=h.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(f(341));o.lanes|=n,i=o.alternate,i!==null&&(i.lanes|=n),Ys(o,n,e),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function ni(e,t,n,l){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(f(387));if(o=o.memoizedProps,o!==null){var h=a.type;sn(a.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(a===ee.current){if(o=a.alternate,o===null)throw Error(f(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(yu):e=[yu])}a=a.return}e!==null&&Gs(t,e,n,l),t.flags|=262144}function Pu(e){for(e=e.firstContext;e!==null;){if(!sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ta(e){Aa=e,sl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return Tf(Aa,e)}function ec(e,t){return Aa===null&&Ta(e),Tf(e,t)}function Tf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sl===null){if(e===null)throw Error(f(308));sl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sl=sl.next=t;return n}var Hy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},By=u.unstable_scheduleCallback,Ly=u.unstable_NormalPriority,St={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qs(){return{controller:new Hy,data:new Map,refCount:0}}function Qi(e){e.refCount--,e.refCount===0&&By(Ly,function(){e.controller.abort()})}var Vi=null,Vs=0,li=0,ai=null;function Yy(e,t){if(Vi===null){var n=Vi=[];Vs=0,li=Jo(),ai={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Vs++,t.then(Ef,Ef),t}function Ef(){if(--Vs===0&&Vi!==null){ai!==null&&(ai.status="fulfilled");var e=Vi;Vi=null,li=0,ai=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Gy(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Cf=E.S;E.S=function(e,t){rh=Ce(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Yy(e,t),Cf!==null&&Cf(e,t)};var Ea=S(null);function Xs(){var e=Ea.current;return e!==null?e:Je.pooledCache}function tc(e,t){t===null?Y(Ea,Ea.current):Y(Ea,t.pool)}function Mf(){var e=Xs();return e===null?null:{parent:St._currentValue,pool:e}}var ii=Error(f(460)),Zs=Error(f(474)),nc=Error(f(542)),lc={then:function(){}};function _f(e){return e=e.status,e==="fulfilled"||e==="rejected"}function zf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(kn,kn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Of(e),e;default:if(typeof t.status=="string")t.then(kn,kn);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(f(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Of(e),e}throw Ma=t,ii}}function Ca(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ma=n,ii):n}}var Ma=null;function Df(){if(Ma===null)throw Error(f(459));var e=Ma;return Ma=null,e}function Of(e){if(e===ii||e===nc)throw Error(f(483))}var ui=null,Xi=0;function ac(e){var t=Xi;return Xi+=1,ui===null&&(ui=[]),zf(ui,e,t)}function Zi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ic(e,t){throw t.$$typeof===K?Error(f(525)):(e=Object.prototype.toString.call(t),Error(f(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wf(e){function t(j,x){if(e){var N=j.deletions;N===null?(j.deletions=[x],j.flags|=16):N.push(x)}}function n(j,x){if(!e)return null;for(;x!==null;)t(j,x),x=x.sibling;return null}function l(j){for(var x=new Map;j!==null;)j.key!==null?x.set(j.key,j):x.set(j.index,j),j=j.sibling;return x}function a(j,x){return j=ul(j,x),j.index=0,j.sibling=null,j}function i(j,x,N){return j.index=N,e?(N=j.alternate,N!==null?(N=N.index,N<x?(j.flags|=67108866,x):N):(j.flags|=67108866,x)):(j.flags|=1048576,x)}function o(j){return e&&j.alternate===null&&(j.flags|=67108866),j}function h(j,x,N,O){return x===null||x.tag!==6?(x=Rs(N,j.mode,O),x.return=j,x):(x=a(x,N),x.return=j,x)}function v(j,x,N,O){var le=N.type;return le===P?z(j,x,N.props.children,O,N.key):x!==null&&(x.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ge&&Ca(le)===x.type)?(x=a(x,N.props),Zi(x,N),x.return=j,x):(x=Wu(N.type,N.key,N.props,null,j.mode,O),Zi(x,N),x.return=j,x)}function A(j,x,N,O){return x===null||x.tag!==4||x.stateNode.containerInfo!==N.containerInfo||x.stateNode.implementation!==N.implementation?(x=Us(N,j.mode,O),x.return=j,x):(x=a(x,N.children||[]),x.return=j,x)}function z(j,x,N,O,le){return x===null||x.tag!==7?(x=ja(N,j.mode,O,le),x.return=j,x):(x=a(x,N),x.return=j,x)}function R(j,x,N){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=Rs(""+x,j.mode,N),x.return=j,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case k:return N=Wu(x.type,x.key,x.props,null,j.mode,N),Zi(N,x),N.return=j,N;case ae:return x=Us(x,j.mode,N),x.return=j,x;case ge:return x=Ca(x),R(j,x,N)}if(Ue(x)||ye(x))return x=ja(x,j.mode,N,null),x.return=j,x;if(typeof x.then=="function")return R(j,ac(x),N);if(x.$$typeof===q)return R(j,ec(j,x),N);ic(j,x)}return null}function T(j,x,N,O){var le=x!==null?x.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return le!==null?null:h(j,x,""+N,O);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case k:return N.key===le?v(j,x,N,O):null;case ae:return N.key===le?A(j,x,N,O):null;case ge:return N=Ca(N),T(j,x,N,O)}if(Ue(N)||ye(N))return le!==null?null:z(j,x,N,O,null);if(typeof N.then=="function")return T(j,x,ac(N),O);if(N.$$typeof===q)return T(j,x,ec(j,N),O);ic(j,N)}return null}function M(j,x,N,O,le){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return j=j.get(N)||null,h(x,j,""+O,le);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case k:return j=j.get(O.key===null?N:O.key)||null,v(x,j,O,le);case ae:return j=j.get(O.key===null?N:O.key)||null,A(x,j,O,le);case ge:return O=Ca(O),M(j,x,N,O,le)}if(Ue(O)||ye(O))return j=j.get(N)||null,z(x,j,O,le,null);if(typeof O.then=="function")return M(j,x,N,ac(O),le);if(O.$$typeof===q)return M(j,x,N,ec(x,O),le);ic(x,O)}return null}function F(j,x,N,O){for(var le=null,we=null,I=x,pe=x=0,Te=null;I!==null&&pe<N.length;pe++){I.index>pe?(Te=I,I=null):Te=I.sibling;var Re=T(j,I,N[pe],O);if(Re===null){I===null&&(I=Te);break}e&&I&&Re.alternate===null&&t(j,I),x=i(Re,x,pe),we===null?le=Re:we.sibling=Re,we=Re,I=Te}if(pe===N.length)return n(j,I),Me&&cl(j,pe),le;if(I===null){for(;pe<N.length;pe++)I=R(j,N[pe],O),I!==null&&(x=i(I,x,pe),we===null?le=I:we.sibling=I,we=I);return Me&&cl(j,pe),le}for(I=l(I);pe<N.length;pe++)Te=M(I,j,pe,N[pe],O),Te!==null&&(e&&Te.alternate!==null&&I.delete(Te.key===null?pe:Te.key),x=i(Te,x,pe),we===null?le=Te:we.sibling=Te,we=Te);return e&&I.forEach(function(ca){return t(j,ca)}),Me&&cl(j,pe),le}function ce(j,x,N,O){if(N==null)throw Error(f(151));for(var le=null,we=null,I=x,pe=x=0,Te=null,Re=N.next();I!==null&&!Re.done;pe++,Re=N.next()){I.index>pe?(Te=I,I=null):Te=I.sibling;var ca=T(j,I,Re.value,O);if(ca===null){I===null&&(I=Te);break}e&&I&&ca.alternate===null&&t(j,I),x=i(ca,x,pe),we===null?le=ca:we.sibling=ca,we=ca,I=Te}if(Re.done)return n(j,I),Me&&cl(j,pe),le;if(I===null){for(;!Re.done;pe++,Re=N.next())Re=R(j,Re.value,O),Re!==null&&(x=i(Re,x,pe),we===null?le=Re:we.sibling=Re,we=Re);return Me&&cl(j,pe),le}for(I=l(I);!Re.done;pe++,Re=N.next())Re=M(I,j,pe,Re.value,O),Re!==null&&(e&&Re.alternate!==null&&I.delete(Re.key===null?pe:Re.key),x=i(Re,x,pe),we===null?le=Re:we.sibling=Re,we=Re);return e&&I.forEach(function(Pp){return t(j,Pp)}),Me&&cl(j,pe),le}function Xe(j,x,N,O){if(typeof N=="object"&&N!==null&&N.type===P&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case k:e:{for(var le=N.key;x!==null;){if(x.key===le){if(le=N.type,le===P){if(x.tag===7){n(j,x.sibling),O=a(x,N.props.children),O.return=j,j=O;break e}}else if(x.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ge&&Ca(le)===x.type){n(j,x.sibling),O=a(x,N.props),Zi(O,N),O.return=j,j=O;break e}n(j,x);break}else t(j,x);x=x.sibling}N.type===P?(O=ja(N.props.children,j.mode,O,N.key),O.return=j,j=O):(O=Wu(N.type,N.key,N.props,null,j.mode,O),Zi(O,N),O.return=j,j=O)}return o(j);case ae:e:{for(le=N.key;x!==null;){if(x.key===le)if(x.tag===4&&x.stateNode.containerInfo===N.containerInfo&&x.stateNode.implementation===N.implementation){n(j,x.sibling),O=a(x,N.children||[]),O.return=j,j=O;break e}else{n(j,x);break}else t(j,x);x=x.sibling}O=Us(N,j.mode,O),O.return=j,j=O}return o(j);case ge:return N=Ca(N),Xe(j,x,N,O)}if(Ue(N))return F(j,x,N,O);if(ye(N)){if(le=ye(N),typeof le!="function")throw Error(f(150));return N=le.call(N),ce(j,x,N,O)}if(typeof N.then=="function")return Xe(j,x,ac(N),O);if(N.$$typeof===q)return Xe(j,x,ec(j,N),O);ic(j,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,x!==null&&x.tag===6?(n(j,x.sibling),O=a(x,N),O.return=j,j=O):(n(j,x),O=Rs(N,j.mode,O),O.return=j,j=O),o(j)):n(j,x)}return function(j,x,N,O){try{Xi=0;var le=Xe(j,x,N,O);return ui=null,le}catch(I){if(I===ii||I===nc)throw I;var we=on(29,I,null,j.mode);return we.lanes=O,we.return=j,we}}}var _a=wf(!0),Rf=wf(!1),Vl=!1;function Ks(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Js(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Zl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(qe&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=Fu(e),gf(e,null,n),t}return $u(e,l,t,n),Fu(e)}function Ki(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ti(e,n)}}function $s(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Fs=!1;function Ji(){if(Fs){var e=ai;if(e!==null)throw e}}function $i(e,t,n,l){Fs=!1;var a=e.updateQueue;Vl=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var v=h,A=v.next;v.next=null,o===null?i=A:o.next=A,o=v;var z=e.alternate;z!==null&&(z=z.updateQueue,h=z.lastBaseUpdate,h!==o&&(h===null?z.firstBaseUpdate=A:h.next=A,z.lastBaseUpdate=v))}if(i!==null){var R=a.baseState;o=0,z=A=v=null,h=i;do{var T=h.lane&-536870913,M=T!==h.lane;if(M?(Ae&T)===T:(l&T)===T){T!==0&&T===li&&(Fs=!0),z!==null&&(z=z.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var F=e,ce=h;T=t;var Xe=n;switch(ce.tag){case 1:if(F=ce.payload,typeof F=="function"){R=F.call(Xe,R,T);break e}R=F;break e;case 3:F.flags=F.flags&-65537|128;case 0:if(F=ce.payload,T=typeof F=="function"?F.call(Xe,R,T):F,T==null)break e;R=H({},R,T);break e;case 2:Vl=!0}}T=h.callback,T!==null&&(e.flags|=64,M&&(e.flags|=8192),M=a.callbacks,M===null?a.callbacks=[T]:M.push(T))}else M={lane:T,tag:h.tag,payload:h.payload,callback:h.callback,next:null},z===null?(A=z=M,v=R):z=z.next=M,o|=T;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;M=h,h=M.next,M.next=null,a.lastBaseUpdate=M,a.shared.pending=null}}while(!0);z===null&&(v=R),a.baseState=v,a.firstBaseUpdate=A,a.lastBaseUpdate=z,i===null&&(a.shared.lanes=0),Wl|=o,e.lanes=o,e.memoizedState=R}}function Uf(e,t){if(typeof e!="function")throw Error(f(191,e));e.call(t)}function kf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Uf(n[e],t)}var ci=S(null),uc=S(0);function qf(e,t){e=vl,Y(uc,e),Y(ci,t),vl=e|t.baseLanes}function Ws(){Y(uc,vl),Y(ci,ci.current)}function Is(){vl=uc.current,D(ci),D(uc)}var rn=S(null),Mn=null;function Kl(e){var t=e.alternate;Y(ht,ht.current&1),Y(rn,e),Mn===null&&(t===null||ci.current!==null||t.memoizedState!==null)&&(Mn=e)}function Ps(e){Y(ht,ht.current),Y(rn,e),Mn===null&&(Mn=e)}function Hf(e){e.tag===22?(Y(ht,ht.current),Y(rn,e),Mn===null&&(Mn=e)):Jl()}function Jl(){Y(ht,ht.current),Y(rn,rn.current)}function fn(e){D(rn),Mn===e&&(Mn=null),D(ht)}var ht=S(0);function cc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ur(n)||cr(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var rl=0,he=null,Qe=null,xt=null,sc=!1,si=!1,za=!1,oc=0,Fi=0,oi=null,Qy=0;function ot(){throw Error(f(321))}function eo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sn(e[n],t[n]))return!1;return!0}function to(e,t,n,l,a,i){return rl=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?xd:go,za=!1,i=n(l,a),za=!1,si&&(i=Lf(t,n,l,a)),Bf(e),i}function Bf(e){E.H=Pi;var t=Qe!==null&&Qe.next!==null;if(rl=0,xt=Qe=he=null,sc=!1,Fi=0,oi=null,t)throw Error(f(300));e===null||jt||(e=e.dependencies,e!==null&&Pu(e)&&(jt=!0))}function Lf(e,t,n,l){he=e;var a=0;do{if(si&&(oi=null),Fi=0,si=!1,25<=a)throw Error(f(301));if(a+=1,xt=Qe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}E.H=jd,i=t(n,l)}while(si);return i}function Vy(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?Wi(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(he.flags|=1024),t}function no(){var e=oc!==0;return oc=0,e}function lo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ao(e){if(sc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}sc=!1}rl=0,xt=Qe=he=null,si=!1,Fi=oc=0,oi=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?he.memoizedState=xt=e:xt=xt.next=e,xt}function mt(){if(Qe===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=xt===null?he.memoizedState:xt.next;if(t!==null)xt=t,Qe=e;else{if(e===null)throw he.alternate===null?Error(f(467)):Error(f(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},xt===null?he.memoizedState=xt=e:xt=xt.next=e}return xt}function rc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wi(e){var t=Fi;return Fi+=1,oi===null&&(oi=[]),e=zf(oi,e,t),t=he,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?xd:go),e}function fc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wi(e);if(e.$$typeof===q)return Rt(e)}throw Error(f(438,String(e)))}function io(e){var t=null,n=he.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=he.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=rc(),he.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Jt;return t.index++,n}function fl(e,t){return typeof t=="function"?t(e):t}function dc(e){var t=mt();return uo(t,Qe,e)}function uo(e,t,n){var l=e.queue;if(l===null)throw Error(f(311));l.lastRenderedReducer=n;var a=e.baseQueue,i=l.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}t.baseQueue=a=i,l.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var h=o=null,v=null,A=t,z=!1;do{var R=A.lane&-536870913;if(R!==A.lane?(Ae&R)===R:(rl&R)===R){var T=A.revertLane;if(T===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),R===li&&(z=!0);else if((rl&T)===T){A=A.next,T===li&&(z=!0);continue}else R={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(h=v=R,o=i):v=v.next=R,he.lanes|=T,Wl|=T;R=A.action,za&&n(i,R),i=A.hasEagerState?A.eagerState:n(i,R)}else T={lane:R,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(h=v=T,o=i):v=v.next=T,he.lanes|=R,Wl|=R;A=A.next}while(A!==null&&A!==t);if(v===null?o=i:v.next=h,!sn(i,e.memoizedState)&&(jt=!0,z&&(n=ai,n!==null)))throw n;e.memoizedState=i,e.baseState=o,e.baseQueue=v,l.lastRenderedState=i}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function co(e){var t=mt(),n=t.queue;if(n===null)throw Error(f(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);sn(i,t.memoizedState)||(jt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function Yf(e,t,n){var l=he,a=mt(),i=Me;if(i){if(n===void 0)throw Error(f(407));n=n()}else n=t();var o=!sn((Qe||a).memoizedState,n);if(o&&(a.memoizedState=n,jt=!0),a=a.queue,ro(Vf.bind(null,l,a,e),[e]),a.getSnapshot!==t||o||xt!==null&&xt.memoizedState.tag&1){if(l.flags|=2048,ri(9,{destroy:void 0},Qf.bind(null,l,a,n,t),null),Je===null)throw Error(f(349));i||(rl&127)!==0||Gf(l,t,n)}return n}function Gf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t=rc(),he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Qf(e,t,n,l){t.value=n,t.getSnapshot=l,Xf(t)&&Zf(e)}function Vf(e,t,n){return n(function(){Xf(t)&&Zf(e)})}function Xf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sn(e,n)}catch{return!0}}function Zf(e){var t=xa(e,2);t!==null&&tn(t,e,2)}function so(e){var t=Kt();if(typeof e=="function"){var n=e;if(e=n(),za){un(!0);try{n()}finally{un(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:e},t}function Kf(e,t,n,l){return e.baseState=n,uo(e,Qe,typeof l=="function"?l:fl)}function Xy(e,t,n,l,a){if(yc(e))throw Error(f(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};E.T!==null?n(!0):i.isTransition=!1,l(i),n=t.pending,n===null?(i.next=t.pending=i,Jf(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Jf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var i=E.T,o={};E.T=o;try{var h=n(a,l),v=E.S;v!==null&&v(o,h),$f(e,t,h)}catch(A){oo(e,t,A)}finally{i!==null&&o.types!==null&&(i.types=o.types),E.T=i}}else try{i=n(a,l),$f(e,t,i)}catch(A){oo(e,t,A)}}function $f(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Ff(e,t,l)},function(l){return oo(e,t,l)}):Ff(e,t,n)}function Ff(e,t,n){t.status="fulfilled",t.value=n,Wf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jf(e,n)))}function oo(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Wf(t),t=t.next;while(t!==l)}e.action=null}function Wf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function If(e,t){return t}function Pf(e,t){if(Me){var n=Je.formState;if(n!==null){e:{var l=he;if(Me){if(tt){t:{for(var a=tt,i=Cn;a.nodeType!==8;){if(!i){a=null;break t}if(a=_n(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){tt=_n(a.nextSibling),l=a.data==="F!";break e}}Gl(l)}l=!1}l&&(t=n[0])}}return n=Kt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:If,lastRenderedState:t},n.queue=l,n=vd.bind(null,he,l),l.dispatch=n,l=so(!1),i=po.bind(null,he,!1,l.queue),l=Kt(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Xy.bind(null,he,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function ed(e){var t=mt();return td(t,Qe,e)}function td(e,t,n){if(t=uo(e,t,If)[0],e=dc(fl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Wi(t)}catch(o){throw o===ii?nc:o}else l=t;t=mt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(he.flags|=2048,ri(9,{destroy:void 0},Zy.bind(null,a,n),null)),[l,i,e]}function Zy(e,t){e.action=t}function nd(e){var t=mt(),n=Qe;if(n!==null)return td(t,n,e);mt(),t=t.memoizedState,n=mt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function ri(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=he.updateQueue,t===null&&(t=rc(),he.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function ld(){return mt().memoizedState}function hc(e,t,n,l){var a=Kt();he.flags|=e,a.memoizedState=ri(1|t,{destroy:void 0},n,l===void 0?null:l)}function mc(e,t,n,l){var a=mt();l=l===void 0?null:l;var i=a.memoizedState.inst;Qe!==null&&l!==null&&eo(l,Qe.memoizedState.deps)?a.memoizedState=ri(t,i,n,l):(he.flags|=e,a.memoizedState=ri(1|t,i,n,l))}function ad(e,t){hc(8390656,8,e,t)}function ro(e,t){mc(2048,8,e,t)}function Ky(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=rc(),he.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function id(e){var t=mt().memoizedState;return Ky({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(f(440));return t.impl.apply(void 0,arguments)}}function ud(e,t){return mc(4,2,e,t)}function cd(e,t){return mc(4,4,e,t)}function sd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function od(e,t,n){n=n!=null?n.concat([e]):null,mc(4,4,sd.bind(null,t,e),n)}function fo(){}function rd(e,t){var n=mt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&eo(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function fd(e,t){var n=mt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&eo(t,l[1]))return l[0];if(l=e(),za){un(!0);try{e()}finally{un(!1)}}return n.memoizedState=[l,t],l}function ho(e,t,n){return n===void 0||(rl&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=dh(),he.lanes|=e,Wl|=e,n)}function dd(e,t,n,l){return sn(n,t)?n:ci.current!==null?(e=ho(e,n,l),sn(e,t)||(jt=!0),e):(rl&42)===0||(rl&1073741824)!==0&&(Ae&261930)===0?(jt=!0,e.memoizedState=n):(e=dh(),he.lanes|=e,Wl|=e,t)}function hd(e,t,n,l,a){var i=B.p;B.p=i!==0&&8>i?i:8;var o=E.T,h={};E.T=h,po(e,!1,t,n);try{var v=a(),A=E.S;if(A!==null&&A(h,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var z=Gy(v,l);Ii(e,t,z,mn(e))}else Ii(e,t,l,mn(e))}catch(R){Ii(e,t,{then:function(){},status:"rejected",reason:R},mn())}finally{B.p=i,o!==null&&h.types!==null&&(o.types=h.types),E.T=o}}function Jy(){}function mo(e,t,n,l){if(e.tag!==5)throw Error(f(476));var a=md(e).queue;hd(e,a,t,W,n===null?Jy:function(){return yd(e),n(l)})}function md(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:W},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function yd(e){var t=md(e);t.next===null&&(t=e.alternate.memoizedState),Ii(e,t.next.queue,{},mn())}function yo(){return Rt(yu)}function pd(){return mt().memoizedState}function gd(){return mt().memoizedState}function $y(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mn();e=Xl(n);var l=Zl(t,e,n);l!==null&&(tn(l,t,n),Ki(l,t,n)),t={cache:Qs()},e.payload=t;return}t=t.return}}function Fy(e,t,n){var l=mn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},yc(e)?bd(t,n):(n=Os(e,t,n,l),n!==null&&(tn(n,e,l),Sd(n,t,l)))}function vd(e,t,n){var l=mn();Ii(e,t,n,l)}function Ii(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(yc(e))bd(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,n);if(a.hasEagerState=!0,a.eagerState=h,sn(h,o))return $u(e,t,a,0),Je===null&&Ju(),!1}catch{}if(n=Os(e,t,a,l),n!==null)return tn(n,e,l),Sd(n,t,l),!0}return!1}function po(e,t,n,l){if(l={lane:2,revertLane:Jo(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},yc(e)){if(t)throw Error(f(479))}else t=Os(e,n,l,2),t!==null&&tn(t,e,2)}function yc(e){var t=e.alternate;return e===he||t!==null&&t===he}function bd(e,t){si=sc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sd(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ti(e,n)}}var Pi={readContext:Rt,use:fc,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};Pi.useEffectEvent=ot;var xd={readContext:Rt,use:fc,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:ad,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,hc(4194308,4,sd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hc(4194308,4,e,t)},useInsertionEffect:function(e,t){hc(4,2,e,t)},useMemo:function(e,t){var n=Kt();t=t===void 0?null:t;var l=e();if(za){un(!0);try{e()}finally{un(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Kt();if(n!==void 0){var a=n(t);if(za){un(!0);try{n(t)}finally{un(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Fy.bind(null,he,e),[l.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:function(e){e=so(e);var t=e.queue,n=vd.bind(null,he,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fo,useDeferredValue:function(e,t){var n=Kt();return ho(n,e,t)},useTransition:function(){var e=so(!1);return e=hd.bind(null,he,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=he,a=Kt();if(Me){if(n===void 0)throw Error(f(407));n=n()}else{if(n=t(),Je===null)throw Error(f(349));(Ae&127)!==0||Gf(l,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,ad(Vf.bind(null,l,i,e),[e]),l.flags|=2048,ri(9,{destroy:void 0},Qf.bind(null,l,i,n,t),null),n},useId:function(){var e=Kt(),t=Je.identifierPrefix;if(Me){var n=In,l=Wn;n=(l&~(1<<32-lt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=oc++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Qy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:yo,useFormState:Pf,useActionState:Pf,useOptimistic:function(e){var t=Kt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=po.bind(null,he,!0,n),n.dispatch=t,[e,t]},useMemoCache:io,useCacheRefresh:function(){return Kt().memoizedState=$y.bind(null,he)},useEffectEvent:function(e){var t=Kt(),n={impl:e};return t.memoizedState=n,function(){if((qe&2)!==0)throw Error(f(440));return n.impl.apply(void 0,arguments)}}},go={readContext:Rt,use:fc,useCallback:rd,useContext:Rt,useEffect:ro,useImperativeHandle:od,useInsertionEffect:ud,useLayoutEffect:cd,useMemo:fd,useReducer:dc,useRef:ld,useState:function(){return dc(fl)},useDebugValue:fo,useDeferredValue:function(e,t){var n=mt();return dd(n,Qe.memoizedState,e,t)},useTransition:function(){var e=dc(fl)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Yf,useId:pd,useHostTransitionStatus:yo,useFormState:ed,useActionState:ed,useOptimistic:function(e,t){var n=mt();return Kf(n,Qe,e,t)},useMemoCache:io,useCacheRefresh:gd};go.useEffectEvent=id;var jd={readContext:Rt,use:fc,useCallback:rd,useContext:Rt,useEffect:ro,useImperativeHandle:od,useInsertionEffect:ud,useLayoutEffect:cd,useMemo:fd,useReducer:co,useRef:ld,useState:function(){return co(fl)},useDebugValue:fo,useDeferredValue:function(e,t){var n=mt();return Qe===null?ho(n,e,t):dd(n,Qe.memoizedState,e,t)},useTransition:function(){var e=co(fl)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Yf,useId:pd,useHostTransitionStatus:yo,useFormState:nd,useActionState:nd,useOptimistic:function(e,t){var n=mt();return Qe!==null?Kf(n,Qe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:io,useCacheRefresh:gd};jd.useEffectEvent=id;function vo(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:H({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bo={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=mn(),a=Xl(l);a.payload=t,n!=null&&(a.callback=n),t=Zl(e,a,l),t!==null&&(tn(t,e,l),Ki(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=mn(),a=Xl(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Zl(e,a,l),t!==null&&(tn(t,e,l),Ki(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mn(),l=Xl(n);l.tag=2,t!=null&&(l.callback=t),t=Zl(e,l,n),t!==null&&(tn(t,e,n),Ki(t,e,n))}};function Nd(e,t,n,l,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,o):t.prototype&&t.prototype.isPureReactComponent?!Bi(n,l)||!Bi(a,i):!0}function Ad(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&bo.enqueueReplaceState(t,t.state,null)}function Da(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=H({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Td(e){Ku(e)}function Ed(e){console.error(e)}function Cd(e){Ku(e)}function pc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Md(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function So(e,t,n){return n=Xl(n),n.tag=3,n.payload={element:null},n.callback=function(){pc(e,t)},n}function _d(e){return e=Xl(e),e.tag=3,e}function zd(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=l.value;e.payload=function(){return a(i)},e.callback=function(){Md(t,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Md(t,n,l),typeof a!="function"&&(Il===null?Il=new Set([this]):Il.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Wy(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&ni(t,n,a,!0),n=rn.current,n!==null){switch(n.tag){case 31:case 13:return Mn===null?Mc():n.alternate===null&&rt===0&&(rt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===lc?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Xo(e,l,a)),!1;case 22:return n.flags|=65536,l===lc?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Xo(e,l,a)),!1}throw Error(f(435,n.tag))}return Xo(e,l,a),Mc(),!1}if(Me)return t=rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==Hs&&(e=Error(f(422),{cause:l}),Gi(An(e,n)))):(l!==Hs&&(t=Error(f(423),{cause:l}),Gi(An(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=An(l,n),a=So(e.stateNode,l,a),$s(e,a),rt!==4&&(rt=2)),!1;var i=Error(f(520),{cause:l});if(i=An(i,n),cu===null?cu=[i]:cu.push(i),rt!==4&&(rt=2),t===null)return!0;l=An(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=So(n.stateNode,l,e),$s(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Il===null||!Il.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=_d(a),zd(a,e,n,l),$s(n,a),!1}n=n.return}while(n!==null);return!1}var xo=Error(f(461)),jt=!1;function Ut(e,t,n,l){t.child=e===null?Rf(t,null,n,l):_a(t,e.child,n,l)}function Dd(e,t,n,l,a){n=n.render;var i=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return Ta(t),l=to(e,t,n,o,i,a),h=no(),e!==null&&!jt?(lo(e,t,a),dl(e,t,a)):(Me&&h&&ks(t),t.flags|=1,Ut(e,t,l,a),t.child)}function Od(e,t,n,l,a){if(e===null){var i=n.type;return typeof i=="function"&&!ws(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,wd(e,t,i,l,a)):(e=Wu(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!_o(e,a)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Bi,n(o,l)&&e.ref===t.ref)return dl(e,t,a)}return t.flags|=1,e=ul(i,l),e.ref=t.ref,e.return=t,t.child=e}function wd(e,t,n,l,a){if(e!==null){var i=e.memoizedProps;if(Bi(i,l)&&e.ref===t.ref)if(jt=!1,t.pendingProps=l=i,_o(e,a))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,dl(e,t,a)}return jo(e,t,n,l,a)}function Rd(e,t,n,l){var a=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,t.child=null;return Ud(e,t,i,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&tc(t,i!==null?i.cachePool:null),i!==null?qf(t,i):Ws(),Hf(t);else return l=t.lanes=536870912,Ud(e,t,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(tc(t,i.cachePool),qf(t,i),Jl(),t.memoizedState=null):(e!==null&&tc(t,null),Ws(),Jl());return Ut(e,t,a,n),t.child}function eu(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ud(e,t,n,l,a){var i=Xs();return i=i===null?null:{parent:St._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&tc(t,null),Ws(),Hf(t),e!==null&&ni(e,t,l,!0),t.childLanes=a,null}function gc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kd(e,t,n){return _a(t,e.child,null,n),e=gc(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function Iy(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Me){if(l.mode==="hidden")return e=gc(t,l),t.lanes=536870912,eu(null,e);if(Ps(t),(e=tt)?(e=Jh(e,Cn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Wn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},n=bf(e),n.return=t,t.child=n,wt=t,tt=null)):e=null,e===null)throw Gl(t);return t.lanes=536870912,null}return gc(t,l)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Ps(t),a)if(t.flags&256)t.flags&=-257,t=kd(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(f(558));else if(jt||ni(e,t,n,!1),a=(n&e.childLanes)!==0,jt||a){if(l=Je,l!==null&&(o=Du(l,n),o!==0&&o!==i.retryLane))throw i.retryLane=o,xa(e,o),tn(l,e,o),xo;Mc(),t=kd(e,t,n)}else e=i.treeContext,tt=_n(o.nextSibling),wt=t,Me=!0,Yl=null,Cn=!1,e!==null&&jf(t,e),t=gc(t,l),t.flags|=4096;return t}return e=ul(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(f(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function jo(e,t,n,l,a){return Ta(t),n=to(e,t,n,l,void 0,a),l=no(),e!==null&&!jt?(lo(e,t,a),dl(e,t,a)):(Me&&l&&ks(t),t.flags|=1,Ut(e,t,n,a),t.child)}function qd(e,t,n,l,a,i){return Ta(t),t.updateQueue=null,n=Lf(t,l,n,a),Bf(e),l=no(),e!==null&&!jt?(lo(e,t,i),dl(e,t,i)):(Me&&l&&ks(t),t.flags|=1,Ut(e,t,n,i),t.child)}function Hd(e,t,n,l,a){if(Ta(t),t.stateNode===null){var i=Ia,o=n.contextType;typeof o=="object"&&o!==null&&(i=Rt(o)),i=new n(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=bo,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},Ks(t),o=n.contextType,i.context=typeof o=="object"&&o!==null?Rt(o):Ia,i.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(vo(t,n,o,l),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&bo.enqueueReplaceState(i,i.state,null),$i(t,l,i,a),Ji(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,v=Da(n,h);i.props=v;var A=i.context,z=n.contextType;o=Ia,typeof z=="object"&&z!==null&&(o=Rt(z));var R=n.getDerivedStateFromProps;z=typeof R=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,z||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||A!==o)&&Ad(t,i,l,o),Vl=!1;var T=t.memoizedState;i.state=T,$i(t,l,i,a),Ji(),A=t.memoizedState,h||T!==A||Vl?(typeof R=="function"&&(vo(t,n,R,l),A=t.memoizedState),(v=Vl||Nd(t,n,v,l,T,A,o))?(z||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=A),i.props=l,i.state=A,i.context=o,l=v):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,Js(e,t),o=t.memoizedProps,z=Da(n,o),i.props=z,R=t.pendingProps,T=i.context,A=n.contextType,v=Ia,typeof A=="object"&&A!==null&&(v=Rt(A)),h=n.getDerivedStateFromProps,(A=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==R||T!==v)&&Ad(t,i,l,v),Vl=!1,T=t.memoizedState,i.state=T,$i(t,l,i,a),Ji();var M=t.memoizedState;o!==R||T!==M||Vl||e!==null&&e.dependencies!==null&&Pu(e.dependencies)?(typeof h=="function"&&(vo(t,n,h,l),M=t.memoizedState),(z=Vl||Nd(t,n,z,l,T,M,v)||e!==null&&e.dependencies!==null&&Pu(e.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,M,v),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,M,v)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=M),i.props=l,i.state=M,i.context=v,l=z):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,vc(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=_a(t,e.child,null,a),t.child=_a(t,null,n,a)):Ut(e,t,n,a),t.memoizedState=i.state,e=t.child):e=dl(e,t,a),e}function Bd(e,t,n,l){return Na(),t.flags|=256,Ut(e,t,n,l),t.child}var No={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ao(e){return{baseLanes:e,cachePool:Mf()}}function To(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=hn),e}function Ld(e,t,n){var l=t.pendingProps,a=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(ht.current&2)!==0),o&&(a=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(a?Kl(t):Jl(),(e=tt)?(e=Jh(e,Cn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Wn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},n=bf(e),n.return=t,t.child=n,wt=t,tt=null)):e=null,e===null)throw Gl(t);return cr(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,a?(Jl(),a=t.mode,h=bc({mode:"hidden",children:h},a),l=ja(l,a,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=Ao(n),l.childLanes=To(e,o,n),t.memoizedState=No,eu(null,l)):(Kl(t),Eo(t,h))}var v=e.memoizedState;if(v!==null&&(h=v.dehydrated,h!==null)){if(i)t.flags&256?(Kl(t),t.flags&=-257,t=Co(e,t,n)):t.memoizedState!==null?(Jl(),t.child=e.child,t.flags|=128,t=null):(Jl(),h=l.fallback,a=t.mode,l=bc({mode:"visible",children:l.children},a),h=ja(h,a,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,_a(t,e.child,null,n),l=t.child,l.memoizedState=Ao(n),l.childLanes=To(e,o,n),t.memoizedState=No,t=eu(null,l));else if(Kl(t),cr(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var A=o.dgst;o=A,l=Error(f(419)),l.stack="",l.digest=o,Gi({value:l,source:null,stack:null}),t=Co(e,t,n)}else if(jt||ni(e,t,n,!1),o=(n&e.childLanes)!==0,jt||o){if(o=Je,o!==null&&(l=Du(o,n),l!==0&&l!==v.retryLane))throw v.retryLane=l,xa(e,l),tn(o,e,l),xo;ur(h)||Mc(),t=Co(e,t,n)}else ur(h)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,tt=_n(h.nextSibling),wt=t,Me=!0,Yl=null,Cn=!1,e!==null&&jf(t,e),t=Eo(t,l.children),t.flags|=4096);return t}return a?(Jl(),h=l.fallback,a=t.mode,v=e.child,A=v.sibling,l=ul(v,{mode:"hidden",children:l.children}),l.subtreeFlags=v.subtreeFlags&65011712,A!==null?h=ul(A,h):(h=ja(h,a,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,eu(null,l),l=t.child,h=e.child.memoizedState,h===null?h=Ao(n):(a=h.cachePool,a!==null?(v=St._currentValue,a=a.parent!==v?{parent:v,pool:v}:a):a=Mf(),h={baseLanes:h.baseLanes|n,cachePool:a}),l.memoizedState=h,l.childLanes=To(e,o,n),t.memoizedState=No,eu(e.child,l)):(Kl(t),n=e.child,e=n.sibling,n=ul(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Eo(e,t){return t=bc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=on(22,e,null,t),e.lanes=0,e}function Co(e,t,n){return _a(t,e.child,null,n),e=Eo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ys(e.return,t,n)}function Mo(e,t,n,l,a,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=n,o.tailMode=a,o.treeForkCount=i)}function Gd(e,t,n){var l=t.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var o=ht.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,Y(ht,o),Ut(e,t,l,n),l=Me?Yi:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yd(e,n,t);else if(e.tag===19)Yd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&cc(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Mo(t,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&cc(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Mo(t,!0,n,null,i,l);break;case"together":Mo(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function dl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ni(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(f(153));if(t.child!==null){for(e=t.child,n=ul(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ul(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _o(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Pu(e)))}function Py(e,t,n){switch(t.tag){case 3:$e(t,t.stateNode.containerInfo),Ql(t,St,e.memoizedState.cache),Na();break;case 27:case 5:qt(t);break;case 4:$e(t,t.stateNode.containerInfo);break;case 10:Ql(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ps(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Kl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Ld(e,t,n):(Kl(t),e=dl(e,t,n),e!==null?e.sibling:null);Kl(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(ni(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return Gd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Y(ht,ht.current),l)break;return null;case 22:return t.lanes=0,Rd(e,t,n,t.pendingProps);case 24:Ql(t,St,e.memoizedState.cache)}return dl(e,t,n)}function Qd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!_o(e,n)&&(t.flags&128)===0)return jt=!1,Py(e,t,n);jt=(e.flags&131072)!==0}else jt=!1,Me&&(t.flags&1048576)!==0&&xf(t,Yi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ca(t.elementType),t.type=e,typeof e=="function")ws(e)?(l=Da(e,l),t.tag=1,t=Hd(null,t,e,l,n)):(t.tag=0,t=jo(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=Dd(null,t,e,l,n);break e}else if(a===ue){t.tag=14,t=Od(null,t,e,l,n);break e}}throw t=ft(e)||e,Error(f(306,t,""))}}return t;case 0:return jo(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=Da(l,t.pendingProps),Hd(e,t,l,a,n);case 3:e:{if($e(t,t.stateNode.containerInfo),e===null)throw Error(f(387));l=t.pendingProps;var i=t.memoizedState;a=i.element,Js(e,t),$i(t,l,null,n);var o=t.memoizedState;if(l=o.cache,Ql(t,St,l),l!==i.cache&&Gs(t,[St],n,!0),Ji(),l=o.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Bd(e,t,l,n);break e}else if(l!==a){a=An(Error(f(424)),t),Gi(a),t=Bd(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,tt=_n(e.firstChild),wt=t,Me=!0,Yl=null,Cn=!0,n=Rf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Na(),l===a){t=dl(e,t,n);break e}Ut(e,t,l,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=em(t.type,null,t.pendingProps,null))?t.memoizedState=n:Me||(n=t.type,e=t.pendingProps,l=Uc(X.current).createElement(n),l[vt]=t,l[Ct]=e,kt(l,n,e),ut(l),t.stateNode=l):t.memoizedState=em(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return qt(t),e===null&&Me&&(l=t.stateNode=Wh(t.type,t.pendingProps,X.current),wt=t,Cn=!0,a=tt,na(t.type)?(sr=a,tt=_n(l.firstChild)):tt=a),Ut(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((a=l=tt)&&(l=_p(l,t.type,t.pendingProps,Cn),l!==null?(t.stateNode=l,wt=t,tt=_n(l.firstChild),Cn=!1,a=!0):a=!1),a||Gl(t)),qt(t),a=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,lr(a,i)?l=null:o!==null&&lr(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=to(e,t,Vy,null,null,n),yu._currentValue=a),vc(e,t),Ut(e,t,l,n),t.child;case 6:return e===null&&Me&&((e=n=tt)&&(n=zp(n,t.pendingProps,Cn),n!==null?(t.stateNode=n,wt=t,tt=null,e=!0):e=!1),e||Gl(t)),null;case 13:return Ld(e,t,n);case 4:return $e(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=_a(t,null,l,n):Ut(e,t,l,n),t.child;case 11:return Dd(e,t,t.type,t.pendingProps,n);case 7:return Ut(e,t,t.pendingProps,n),t.child;case 8:return Ut(e,t,t.pendingProps.children,n),t.child;case 12:return Ut(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,Ql(t,t.type,l.value),Ut(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,Ta(t),a=Rt(a),l=l(a),t.flags|=1,Ut(e,t,l,n),t.child;case 14:return Od(e,t,t.type,t.pendingProps,n);case 15:return wd(e,t,t.type,t.pendingProps,n);case 19:return Gd(e,t,n);case 31:return Iy(e,t,n);case 22:return Rd(e,t,n,t.pendingProps);case 24:return Ta(t),l=Rt(St),e===null?(a=Xs(),a===null&&(a=Je,i=Qs(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},Ks(t),Ql(t,St,a)):((e.lanes&n)!==0&&(Js(e,t),$i(t,null,null,n),Ji()),a=e.memoizedState,i=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ql(t,St,l)):(l=i.cache,Ql(t,St,l),l!==a.cache&&Gs(t,[St],n,!0))),Ut(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(f(156,t.tag))}function hl(e){e.flags|=4}function zo(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(ph())e.flags|=8192;else throw Ma=lc,Zs}else e.flags&=-16777217}function Vd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!im(t))if(ph())e.flags|=8192;else throw Ma=lc,Zs}function Sc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?pt():536870912,e.lanes|=t,mi|=t)}function tu(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function ep(e,t,n){var l=t.pendingProps;switch(qs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return nt(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ol(St),Oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ti(t)?hl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Bs())),nt(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(hl(t),i!==null?(nt(t),Vd(t,i)):(nt(t),zo(t,a,null,l,n))):i?i!==e.memoizedState?(hl(t),nt(t),Vd(t,i)):(nt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&hl(t),nt(t),zo(t,a,e,l,n)),null;case 27:if(_e(t),n=X.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&hl(t);else{if(!l){if(t.stateNode===null)throw Error(f(166));return nt(t),null}e=G.current,ti(t)?Nf(t):(e=Wh(a,l,n),t.stateNode=e,hl(t))}return nt(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&hl(t);else{if(!l){if(t.stateNode===null)throw Error(f(166));return nt(t),null}if(i=G.current,ti(t))Nf(t);else{var o=Uc(X.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?o.createElement(a,{is:l.is}):o.createElement(a)}}i[vt]=t,i[Ct]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(kt(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&hl(t)}}return nt(t),zo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&hl(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(f(166));if(e=X.current,ti(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=wt,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[vt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Lh(e.nodeValue,n)),e||Gl(t,!0)}else e=Uc(e).createTextNode(l),e[vt]=t,t.stateNode=e}return nt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=ti(t),n!==null){if(e===null){if(!l)throw Error(f(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(557));e[vt]=t}else Na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),e=!1}else n=Bs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(f(558))}return nt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ti(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(f(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(f(317));a[vt]=t}else Na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),a=!1}else a=Bs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Sc(t,t.updateQueue),nt(t),null);case 4:return Oe(),e===null&&Io(t.stateNode.containerInfo),nt(t),null;case 10:return ol(t.type),nt(t),null;case 19:if(D(ht),l=t.memoizedState,l===null)return nt(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)tu(l,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=cc(e),i!==null){for(t.flags|=128,tu(l,!1),e=i.updateQueue,t.updateQueue=e,Sc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)vf(n,e),n=n.sibling;return Y(ht,ht.current&1|2),Me&&cl(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ce()>Tc&&(t.flags|=128,a=!0,tu(l,!1),t.lanes=4194304)}else{if(!a)if(e=cc(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Sc(t,e),tu(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Me)return nt(t),null}else 2*Ce()-l.renderingStartTime>Tc&&n!==536870912&&(t.flags|=128,a=!0,tu(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ce(),e.sibling=null,n=ht.current,Y(ht,a?n&1|2:n&1),Me&&cl(t,l.treeForkCount),e):(nt(t),null);case 22:case 23:return fn(t),Is(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),n=t.updateQueue,n!==null&&Sc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&D(Ea),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ol(St),nt(t),null;case 25:return null;case 30:return null}throw Error(f(156,t.tag))}function tp(e,t){switch(qs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ol(St),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(f(340));Na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(f(340));Na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return D(ht),null;case 4:return Oe(),null;case 10:return ol(t.type),null;case 22:case 23:return fn(t),Is(),e!==null&&D(Ea),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ol(St),null;case 25:return null;default:return null}}function Xd(e,t){switch(qs(t),t.tag){case 3:ol(St),Oe();break;case 26:case 27:case 5:_e(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:D(ht);break;case 10:ol(t.type);break;case 22:case 23:fn(t),Is(),e!==null&&D(Ea);break;case 24:ol(St)}}function nu(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var i=n.create,o=n.inst;l=i(),o.destroy=l}n=n.next}while(n!==a)}}catch(h){Ge(t,t.return,h)}}function $l(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,a=t;var v=n,A=h;try{A()}catch(z){Ge(a,v,z)}}}l=l.next}while(l!==i)}}catch(z){Ge(t,t.return,z)}}function Zd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{kf(t,n)}catch(l){Ge(e,e.return,l)}}}function Kd(e,t,n){n.props=Da(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Ge(e,t,l)}}function lu(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){Ge(e,t,a)}}function Pn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Ge(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Ge(e,t,a)}else n.current=null}function Jd(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Ge(e,e.return,a)}}function Do(e,t,n){try{var l=e.stateNode;Np(l,e.type,n,t),l[Ct]=t}catch(a){Ge(e,e.return,a)}}function $d(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&na(e.type)||e.tag===4}function Oo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$d(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&&na(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 wo(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=kn));else if(l!==4&&(l===27&&na(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(wo(e,t,n),e=e.sibling;e!==null;)wo(e,t,n),e=e.sibling}function xc(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&na(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(xc(e,t,n),e=e.sibling;e!==null;)xc(e,t,n),e=e.sibling}function Fd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);kt(t,l,n),t[vt]=e,t[Ct]=n}catch(i){Ge(e,e.return,i)}}var ml=!1,Nt=!1,Ro=!1,Wd=typeof WeakSet=="function"?WeakSet:Set,_t=null;function np(e,t){if(e=e.containerInfo,tr=Gc,e=of(e),Es(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,h=-1,v=-1,A=0,z=0,R=e,T=null;t:for(;;){for(var M;R!==n||a!==0&&R.nodeType!==3||(h=o+a),R!==i||l!==0&&R.nodeType!==3||(v=o+l),R.nodeType===3&&(o+=R.nodeValue.length),(M=R.firstChild)!==null;)T=R,R=M;for(;;){if(R===e)break t;if(T===n&&++A===a&&(h=o),T===i&&++z===l&&(v=o),(M=R.nextSibling)!==null)break;R=T,T=R.parentNode}R=M}n=h===-1||v===-1?null:{start:h,end:v}}else n=null}n=n||{start:0,end:0}}else n=null;for(nr={focusedElem:e,selectionRange:n},Gc=!1,_t=t;_t!==null;)if(t=_t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_t=e;else for(;_t!==null;){switch(t=_t,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var F=Da(n.type,a);e=l.getSnapshotBeforeUpdate(F,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(ce){Ge(n,n.return,ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ir(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ir(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(f(163))}if(e=t.sibling,e!==null){e.return=t.return,_t=e;break}_t=t.return}}function Id(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:pl(e,n),l&4&&nu(5,n);break;case 1:if(pl(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){Ge(n,n.return,o)}else{var a=Da(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ge(n,n.return,o)}}l&64&&Zd(n),l&512&&lu(n,n.return);break;case 3:if(pl(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{kf(e,t)}catch(o){Ge(n,n.return,o)}}break;case 27:t===null&&l&4&&Fd(n);case 26:case 5:pl(e,n),t===null&&l&4&&Jd(n),l&512&&lu(n,n.return);break;case 12:pl(e,n);break;case 31:pl(e,n),l&4&&th(e,n);break;case 13:pl(e,n),l&4&&nh(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=fp.bind(null,n),Dp(e,n))));break;case 22:if(l=n.memoizedState!==null||ml,!l){t=t!==null&&t.memoizedState!==null||Nt,a=ml;var i=Nt;ml=l,(Nt=t)&&!i?gl(e,n,(n.subtreeFlags&8772)!==0):pl(e,n),ml=a,Nt=i}break;case 30:break;default:pl(e,n)}}function Pd(e){var t=e.alternate;t!==null&&(e.alternate=null,Pd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Un(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var at=null,Wt=!1;function yl(e,t,n){for(n=n.child;n!==null;)eh(e,t,n),n=n.sibling}function eh(e,t,n){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount(Qn,n)}catch{}switch(n.tag){case 26:Nt||Pn(n,t),yl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Nt||Pn(n,t);var l=at,a=Wt;na(n.type)&&(at=n.stateNode,Wt=!1),yl(e,t,n),du(n.stateNode),at=l,Wt=a;break;case 5:Nt||Pn(n,t);case 6:if(l=at,a=Wt,at=null,yl(e,t,n),at=l,Wt=a,at!==null)if(Wt)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(n.stateNode)}catch(i){Ge(n,t,i)}else try{at.removeChild(n.stateNode)}catch(i){Ge(n,t,i)}break;case 18:at!==null&&(Wt?(e=at,Zh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ji(e)):Zh(at,n.stateNode));break;case 4:l=at,a=Wt,at=n.stateNode.containerInfo,Wt=!0,yl(e,t,n),at=l,Wt=a;break;case 0:case 11:case 14:case 15:$l(2,n,t),Nt||$l(4,n,t),yl(e,t,n);break;case 1:Nt||(Pn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Kd(n,t,l)),yl(e,t,n);break;case 21:yl(e,t,n);break;case 22:Nt=(l=Nt)||n.memoizedState!==null,yl(e,t,n),Nt=l;break;default:yl(e,t,n)}}function th(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ji(e)}catch(n){Ge(t,t.return,n)}}}function nh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ji(e)}catch(n){Ge(t,t.return,n)}}function lp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Wd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Wd),t;default:throw Error(f(435,e.tag))}}function jc(e,t){var n=lp(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=dp.bind(null,e,l);l.then(a,a)}})}function It(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(na(h.type)){at=h.stateNode,Wt=!1;break e}break;case 5:at=h.stateNode,Wt=!1;break e;case 3:case 4:at=h.stateNode.containerInfo,Wt=!0;break e}h=h.return}if(at===null)throw Error(f(160));eh(i,o,a),at=null,Wt=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)lh(t,e),t=t.sibling}var Ln=null;function lh(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:It(t,e),Pt(e),l&4&&($l(3,e,e.return),nu(3,e),$l(5,e,e.return));break;case 1:It(t,e),Pt(e),l&512&&(Nt||n===null||Pn(n,n.return)),l&64&&ml&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=Ln;if(It(t,e),Pt(e),l&512&&(Nt||n===null||Pn(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":i=a.getElementsByTagName("title")[0],(!i||i[El]||i[vt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),kt(i,l,n),i[vt]=e,ut(i),l=i;break e;case"link":var o=lm("link","href",a).get(l+(n.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(h,1);break t}}i=a.createElement(l),kt(i,l,n),a.head.appendChild(i);break;case"meta":if(o=lm("meta","content",a).get(l+(n.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(h,1);break t}}i=a.createElement(l),kt(i,l,n),a.head.appendChild(i);break;default:throw Error(f(468,l))}i[vt]=e,ut(i),l=i}e.stateNode=l}else am(a,e.type,e.stateNode);else e.stateNode=nm(a,l,e.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?am(a,e.type,e.stateNode):nm(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Do(e,e.memoizedProps,n.memoizedProps)}break;case 27:It(t,e),Pt(e),l&512&&(Nt||n===null||Pn(n,n.return)),n!==null&&l&4&&Do(e,e.memoizedProps,n.memoizedProps);break;case 5:if(It(t,e),Pt(e),l&512&&(Nt||n===null||Pn(n,n.return)),e.flags&32){a=e.stateNode;try{Ol(a,"")}catch(F){Ge(e,e.return,F)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,Do(e,a,n!==null?n.memoizedProps:a)),l&1024&&(Ro=!0);break;case 6:if(It(t,e),Pt(e),l&4){if(e.stateNode===null)throw Error(f(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(F){Ge(e,e.return,F)}}break;case 3:if(Hc=null,a=Ln,Ln=kc(t.containerInfo),It(t,e),Ln=a,Pt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{ji(t.containerInfo)}catch(F){Ge(e,e.return,F)}Ro&&(Ro=!1,ah(e));break;case 4:l=Ln,Ln=kc(e.stateNode.containerInfo),It(t,e),Pt(e),Ln=l;break;case 12:It(t,e),Pt(e);break;case 31:It(t,e),Pt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jc(e,l)));break;case 13:It(t,e),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ac=Ce()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jc(e,l)));break;case 22:a=e.memoizedState!==null;var v=n!==null&&n.memoizedState!==null,A=ml,z=Nt;if(ml=A||a,Nt=z||v,It(t,e),Nt=z,ml=A,Pt(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||v||ml||Nt||Oa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){v=n=t;try{if(i=v.stateNode,a)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=v.stateNode;var R=v.memoizedProps.style,T=R!=null&&R.hasOwnProperty("display")?R.display:null;h.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(F){Ge(v,v.return,F)}}}else if(t.tag===6){if(n===null){v=t;try{v.stateNode.nodeValue=a?"":v.memoizedProps}catch(F){Ge(v,v.return,F)}}}else if(t.tag===18){if(n===null){v=t;try{var M=v.stateNode;a?Kh(M,!0):Kh(v.stateNode,!1)}catch(F){Ge(v,v.return,F)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,jc(e,n))));break;case 19:It(t,e),Pt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jc(e,l)));break;case 30:break;case 21:break;default:It(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if($d(l)){n=l;break}l=l.return}if(n==null)throw Error(f(160));switch(n.tag){case 27:var a=n.stateNode,i=Oo(e);xc(e,i,a);break;case 5:var o=n.stateNode;n.flags&32&&(Ol(o,""),n.flags&=-33);var h=Oo(e);xc(e,h,o);break;case 3:case 4:var v=n.stateNode.containerInfo,A=Oo(e);wo(e,A,v);break;default:throw Error(f(161))}}catch(z){Ge(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ah(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ah(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Id(e,t.alternate,t),t=t.sibling}function Oa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$l(4,t,t.return),Oa(t);break;case 1:Pn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Kd(t,t.return,n),Oa(t);break;case 27:du(t.stateNode);case 26:case 5:Pn(t,t.return),Oa(t);break;case 22:t.memoizedState===null&&Oa(t);break;case 30:Oa(t);break;default:Oa(t)}e=e.sibling}}function gl(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:gl(a,i,n),nu(4,i);break;case 1:if(gl(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(A){Ge(l,l.return,A)}if(l=i,a=l.updateQueue,a!==null){var h=l.stateNode;try{var v=a.shared.hiddenCallbacks;if(v!==null)for(a.shared.hiddenCallbacks=null,a=0;a<v.length;a++)Uf(v[a],h)}catch(A){Ge(l,l.return,A)}}n&&o&64&&Zd(i),lu(i,i.return);break;case 27:Fd(i);case 26:case 5:gl(a,i,n),n&&l===null&&o&4&&Jd(i),lu(i,i.return);break;case 12:gl(a,i,n);break;case 31:gl(a,i,n),n&&o&4&&th(a,i);break;case 13:gl(a,i,n),n&&o&4&&nh(a,i);break;case 22:i.memoizedState===null&&gl(a,i,n),lu(i,i.return);break;case 30:break;default:gl(a,i,n)}t=t.sibling}}function Uo(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Qi(n))}function ko(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e))}function Yn(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ih(e,t,n,l),t=t.sibling}function ih(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Yn(e,t,n,l),a&2048&&nu(9,t);break;case 1:Yn(e,t,n,l);break;case 3:Yn(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e)));break;case 12:if(a&2048){Yn(e,t,n,l),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){Ge(t,t.return,v)}}else Yn(e,t,n,l);break;case 31:Yn(e,t,n,l);break;case 13:Yn(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?Yn(e,t,n,l):au(e,t):i._visibility&2?Yn(e,t,n,l):(i._visibility|=2,fi(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Uo(o,t);break;case 24:Yn(e,t,n,l),a&2048&&ko(t.alternate,t);break;default:Yn(e,t,n,l)}}function fi(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=n,v=l,A=o.flags;switch(o.tag){case 0:case 11:case 15:fi(i,o,h,v,a),nu(8,o);break;case 23:break;case 22:var z=o.stateNode;o.memoizedState!==null?z._visibility&2?fi(i,o,h,v,a):au(i,o):(z._visibility|=2,fi(i,o,h,v,a)),a&&A&2048&&Uo(o.alternate,o);break;case 24:fi(i,o,h,v,a),a&&A&2048&&ko(o.alternate,o);break;default:fi(i,o,h,v,a)}t=t.sibling}}function au(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:au(n,l),a&2048&&Uo(l.alternate,l);break;case 24:au(n,l),a&2048&&ko(l.alternate,l);break;default:au(n,l)}t=t.sibling}}var iu=8192;function di(e,t,n){if(e.subtreeFlags&iu)for(e=e.child;e!==null;)uh(e,t,n),e=e.sibling}function uh(e,t,n){switch(e.tag){case 26:di(e,t,n),e.flags&iu&&e.memoizedState!==null&&Qp(n,Ln,e.memoizedState,e.memoizedProps);break;case 5:di(e,t,n);break;case 3:case 4:var l=Ln;Ln=kc(e.stateNode.containerInfo),di(e,t,n),Ln=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=iu,iu=16777216,di(e,t,n),iu=l):di(e,t,n));break;default:di(e,t,n)}}function ch(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function uu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];_t=l,oh(l,e)}ch(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)sh(e),e=e.sibling}function sh(e){switch(e.tag){case 0:case 11:case 15:uu(e),e.flags&2048&&$l(9,e,e.return);break;case 3:uu(e);break;case 12:uu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nc(e)):uu(e);break;default:uu(e)}}function Nc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];_t=l,oh(l,e)}ch(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$l(8,t,t.return),Nc(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nc(t));break;default:Nc(t)}e=e.sibling}}function oh(e,t){for(;_t!==null;){var n=_t;switch(n.tag){case 0:case 11:case 15:$l(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Qi(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,_t=l;else e:for(n=e;_t!==null;){l=_t;var a=l.sibling,i=l.return;if(Pd(l),l===n){_t=null;break e}if(a!==null){a.return=i,_t=a;break e}_t=i}}}var ap={getCacheForType:function(e){var t=Rt(St),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Rt(St).controller.signal}},ip=typeof WeakMap=="function"?WeakMap:Map,qe=0,Je=null,xe=null,Ae=0,Ye=0,dn=null,Fl=!1,hi=!1,qo=!1,vl=0,rt=0,Wl=0,wa=0,Ho=0,hn=0,mi=0,cu=null,en=null,Bo=!1,Ac=0,rh=0,Tc=1/0,Ec=null,Il=null,Tt=0,Pl=null,yi=null,bl=0,Lo=0,Yo=null,fh=null,su=0,Go=null;function mn(){return(qe&2)!==0&&Ae!==0?Ae&-Ae:E.T!==null?Jo():vn()}function dh(){if(hn===0)if((Ae&536870912)===0||Me){var e=se;se<<=1,(se&3932160)===0&&(se=262144),hn=e}else hn=536870912;return e=rn.current,e!==null&&(e.flags|=32),hn}function tn(e,t,n){(e===Je&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)&&(pi(e,0),ea(e,Ae,hn,!1)),Rn(e,n),((qe&2)===0||e!==Je)&&(e===Je&&((qe&2)===0&&(wa|=n),rt===4&&ea(e,Ae,hn,!1)),el(e))}function hh(e,t,n){if((qe&6)!==0)throw Error(f(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Qt(e,t),a=l?sp(e,t):Vo(e,t,!0),i=l;do{if(a===0){hi&&!l&&ea(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!up(n)){a=Vo(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;a=cu;var v=h.current.memoizedState.isDehydrated;if(v&&(pi(h,o).flags|=256),o=Vo(h,o,!1),o!==2){if(qo&&!v){h.errorRecoveryDisabledLanes|=i,wa|=i,a=4;break e}i=en,en=a,i!==null&&(en===null?en=i:en.push.apply(en,i))}a=o}if(i=!1,a!==2)continue}}if(a===1){pi(e,0),ea(e,t,0,!0);break}e:{switch(l=e,i=a,i){case 0:case 1:throw Error(f(345));case 4:if((t&4194048)!==t)break;case 6:ea(l,t,hn,!Fl);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(f(329))}if((t&62914560)===t&&(a=Ac+300-Ce(),10<a)){if(ea(l,t,hn,!Fl),Bt(l,0,!0)!==0)break e;bl=t,l.timeoutHandle=Vh(mh.bind(null,l,n,en,Ec,Bo,t,hn,wa,mi,Fl,i,"Throttled",-0,0),a);break e}mh(l,n,en,Ec,Bo,t,hn,wa,mi,Fl,i,null,-0,0)}}break}while(!0);el(e)}function mh(e,t,n,l,a,i,o,h,v,A,z,R,T,M){if(e.timeoutHandle=-1,R=t.subtreeFlags,R&8192||(R&16785408)===16785408){R={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:kn},uh(t,i,R);var F=(i&62914560)===i?Ac-Ce():(i&4194048)===i?rh-Ce():0;if(F=Vp(R,F),F!==null){bl=i,e.cancelPendingCommit=F(jh.bind(null,e,t,i,n,l,a,o,h,v,z,R,null,T,M)),ea(e,i,o,!A);return}}jh(e,t,i,n,l,a,o,h,v)}function up(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!sn(i(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ea(e,t,n,l){t&=~Ho,t&=~wa,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var i=31-lt(a),o=1<<i;l[i]=-1,a&=~o}n!==0&&qa(e,n,t)}function Cc(){return(qe&6)===0?(ou(0),!1):!0}function Qo(){if(xe!==null){if(Ye===0)var e=xe.return;else e=xe,sl=Aa=null,ao(e),ui=null,Xi=0,e=xe;for(;e!==null;)Xd(e.alternate,e),e=e.return;xe=null}}function pi(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Ep(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),bl=0,Qo(),Je=e,xe=n=ul(e.current,null),Ae=t,Ye=0,dn=null,Fl=!1,hi=Qt(e,t),qo=!1,mi=hn=Ho=wa=Wl=rt=0,en=cu=null,Bo=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-lt(l),i=1<<a;t|=e[a],l&=~i}return vl=t,Ju(),n}function yh(e,t){he=null,E.H=Pi,t===ii||t===nc?(t=Df(),Ye=3):t===Zs?(t=Df(),Ye=4):Ye=t===xo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,xe===null&&(rt=1,pc(e,An(t,e.current)))}function ph(){var e=rn.current;return e===null?!0:(Ae&4194048)===Ae?Mn===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===Mn:!1}function gh(){var e=E.H;return E.H=Pi,e===null?Pi:e}function vh(){var e=E.A;return E.A=ap,e}function Mc(){rt=4,Fl||(Ae&4194048)!==Ae&&rn.current!==null||(hi=!0),(Wl&134217727)===0&&(wa&134217727)===0||Je===null||ea(Je,Ae,hn,!1)}function Vo(e,t,n){var l=qe;qe|=2;var a=gh(),i=vh();(Je!==e||Ae!==t)&&(Ec=null,pi(e,t)),t=!1;var o=rt;e:do try{if(Ye!==0&&xe!==null){var h=xe,v=dn;switch(Ye){case 8:Qo(),o=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(t=!0);var A=Ye;if(Ye=0,dn=null,gi(e,h,v,A),n&&hi){o=0;break e}break;default:A=Ye,Ye=0,dn=null,gi(e,h,v,A)}}cp(),o=rt;break}catch(z){yh(e,z)}while(!0);return t&&e.shellSuspendCounter++,sl=Aa=null,qe=l,E.H=a,E.A=i,xe===null&&(Je=null,Ae=0,Ju()),o}function cp(){for(;xe!==null;)bh(xe)}function sp(e,t){var n=qe;qe|=2;var l=gh(),a=vh();Je!==e||Ae!==t?(Ec=null,Tc=Ce()+500,pi(e,t)):hi=Qt(e,t);e:do try{if(Ye!==0&&xe!==null){t=xe;var i=dn;t:switch(Ye){case 1:Ye=0,dn=null,gi(e,t,i,1);break;case 2:case 9:if(_f(i)){Ye=0,dn=null,Sh(t);break}t=function(){Ye!==2&&Ye!==9||Je!==e||(Ye=7),el(e)},i.then(t,t);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:_f(i)?(Ye=0,dn=null,Sh(t)):(Ye=0,dn=null,gi(e,t,i,7));break;case 5:var o=null;switch(xe.tag){case 26:o=xe.memoizedState;case 5:case 27:var h=xe;if(o?im(o):h.stateNode.complete){Ye=0,dn=null;var v=h.sibling;if(v!==null)xe=v;else{var A=h.return;A!==null?(xe=A,_c(A)):xe=null}break t}}Ye=0,dn=null,gi(e,t,i,5);break;case 6:Ye=0,dn=null,gi(e,t,i,6);break;case 8:Qo(),rt=6;break e;default:throw Error(f(462))}}op();break}catch(z){yh(e,z)}while(!0);return sl=Aa=null,E.H=l,E.A=a,qe=n,xe!==null?0:(Je=null,Ae=0,Ju(),rt)}function op(){for(;xe!==null&&!ka();)bh(xe)}function bh(e){var t=Qd(e.alternate,e,vl);e.memoizedProps=e.pendingProps,t===null?_c(e):xe=t}function Sh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qd(n,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=qd(n,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:ao(t);default:Xd(n,t),t=xe=vf(t,vl),t=Qd(n,t,vl)}e.memoizedProps=e.pendingProps,t===null?_c(e):xe=t}function gi(e,t,n,l){sl=Aa=null,ao(t),ui=null,Xi=0;var a=t.return;try{if(Wy(e,a,t,n,Ae)){rt=1,pc(e,An(n,e.current)),xe=null;return}}catch(i){if(a!==null)throw xe=a,i;rt=1,pc(e,An(n,e.current)),xe=null;return}t.flags&32768?(Me||l===1?e=!0:hi||(Ae&536870912)!==0?e=!1:(Fl=e=!0,(l===2||l===9||l===3||l===6)&&(l=rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),xh(t,e)):_c(t)}function _c(e){var t=e;do{if((t.flags&32768)!==0){xh(t,Fl);return}e=t.return;var n=ep(t.alternate,t,vl);if(n!==null){xe=n;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);rt===0&&(rt=5)}function xh(e,t){do{var n=tp(e.alternate,e);if(n!==null){n.flags&=32767,xe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){xe=e;return}xe=e=n}while(e!==null);rt=6,xe=null}function jh(e,t,n,l,a,i,o,h,v){e.cancelPendingCommit=null;do zc();while(Tt!==0);if((qe&6)!==0)throw Error(f(327));if(t!==null){if(t===e.current)throw Error(f(177));if(i=t.lanes|t.childLanes,i|=Ds,gt(e,n,i,o,h,v),e===Je&&(xe=Je=null,Ae=0),yi=t,Pl=e,bl=n,Lo=i,Yo=a,fh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,hp(pn,function(){return Ch(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=E.T,E.T=null,a=B.p,B.p=2,o=qe,qe|=4;try{np(e,t,n)}finally{qe=o,B.p=a,E.T=l}}Tt=1,Nh(),Ah(),Th()}}function Nh(){if(Tt===1){Tt=0;var e=Pl,t=yi,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=E.T,E.T=null;var l=B.p;B.p=2;var a=qe;qe|=4;try{lh(t,e);var i=nr,o=of(e.containerInfo),h=i.focusedElem,v=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&sf(h.ownerDocument.documentElement,h)){if(v!==null&&Es(h)){var A=v.start,z=v.end;if(z===void 0&&(z=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(z,h.value.length);else{var R=h.ownerDocument||document,T=R&&R.defaultView||window;if(T.getSelection){var M=T.getSelection(),F=h.textContent.length,ce=Math.min(v.start,F),Xe=v.end===void 0?ce:Math.min(v.end,F);!M.extend&&ce>Xe&&(o=Xe,Xe=ce,ce=o);var j=cf(h,ce),x=cf(h,Xe);if(j&&x&&(M.rangeCount!==1||M.anchorNode!==j.node||M.anchorOffset!==j.offset||M.focusNode!==x.node||M.focusOffset!==x.offset)){var N=R.createRange();N.setStart(j.node,j.offset),M.removeAllRanges(),ce>Xe?(M.addRange(N),M.extend(x.node,x.offset)):(N.setEnd(x.node,x.offset),M.addRange(N))}}}}for(R=[],M=h;M=M.parentNode;)M.nodeType===1&&R.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<R.length;h++){var O=R[h];O.element.scrollLeft=O.left,O.element.scrollTop=O.top}}Gc=!!tr,nr=tr=null}finally{qe=a,B.p=l,E.T=n}}e.current=t,Tt=2}}function Ah(){if(Tt===2){Tt=0;var e=Pl,t=yi,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=E.T,E.T=null;var l=B.p;B.p=2;var a=qe;qe|=4;try{Id(e,t.alternate,t)}finally{qe=a,B.p=l,E.T=n}}Tt=3}}function Th(){if(Tt===4||Tt===3){Tt=0,an();var e=Pl,t=yi,n=bl,l=fh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,yi=Pl=null,Eh(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Il=null),Ha(n),t=t.stateNode,it&&typeof it.onCommitFiberRoot=="function")try{it.onCommitFiberRoot(Qn,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=E.T,a=B.p,B.p=2,E.T=null;try{for(var i=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];i(h.value,{componentStack:h.stack})}}finally{E.T=t,B.p=a}}(bl&3)!==0&&zc(),el(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===Go?su++:(su=0,Go=e):su=0,ou(0)}}function Eh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Qi(t)))}function zc(){return Nh(),Ah(),Th(),Ch()}function Ch(){if(Tt!==5)return!1;var e=Pl,t=Lo;Lo=0;var n=Ha(bl),l=E.T,a=B.p;try{B.p=32>n?32:n,E.T=null,n=Yo,Yo=null;var i=Pl,o=bl;if(Tt=0,yi=Pl=null,bl=0,(qe&6)!==0)throw Error(f(331));var h=qe;if(qe|=4,sh(i.current),ih(i,i.current,o,n),qe=h,ou(0,!1),it&&typeof it.onPostCommitFiberRoot=="function")try{it.onPostCommitFiberRoot(Qn,i)}catch{}return!0}finally{B.p=a,E.T=l,Eh(e,t)}}function Mh(e,t,n){t=An(n,t),t=So(e.stateNode,t,2),e=Zl(e,t,2),e!==null&&(Rn(e,2),el(e))}function Ge(e,t,n){if(e.tag===3)Mh(e,e,n);else for(;t!==null;){if(t.tag===3){Mh(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Il===null||!Il.has(l))){e=An(n,e),n=_d(2),l=Zl(t,n,2),l!==null&&(zd(n,l,t,e),Rn(l,2),el(l));break}}t=t.return}}function Xo(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new ip;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(qo=!0,a.add(n),e=rp.bind(null,e,t,n),t.then(e,e))}function rp(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Je===e&&(Ae&n)===n&&(rt===4||rt===3&&(Ae&62914560)===Ae&&300>Ce()-Ac?(qe&2)===0&&pi(e,0):Ho|=n,mi===Ae&&(mi=0)),el(e)}function _h(e,t){t===0&&(t=pt()),e=xa(e,t),e!==null&&(Rn(e,t),el(e))}function fp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_h(e,n)}function dp(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(f(314))}l!==null&&l.delete(t),_h(e,n)}function hp(e,t){return ct(e,t)}var Dc=null,vi=null,Zo=!1,Oc=!1,Ko=!1,ta=0;function el(e){e!==vi&&e.next===null&&(vi===null?Dc=vi=e:vi=vi.next=e),Oc=!0,Zo||(Zo=!0,yp())}function ou(e,t){if(!Ko&&Oc){Ko=!0;do for(var n=!1,l=Dc;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var o=l.suspendedLanes,h=l.pingedLanes;i=(1<<31-lt(42|e)+1)-1,i&=a&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,wh(l,i))}else i=Ae,i=Bt(l,l===Je?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Qt(l,i)||(n=!0,wh(l,i));l=l.next}while(n);Ko=!1}}function mp(){zh()}function zh(){Oc=Zo=!1;var e=0;ta!==0&&Tp()&&(e=ta);for(var t=Ce(),n=null,l=Dc;l!==null;){var a=l.next,i=Dh(l,t);i===0?(l.next=null,n===null?Dc=a:n.next=a,a===null&&(vi=n)):(n=l,(e!==0||(i&3)!==0)&&(Oc=!0)),l=a}Tt!==0&&Tt!==5||ou(e),ta!==0&&(ta=0)}function Dh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-lt(i),h=1<<o,v=a[o];v===-1?((h&n)===0||(h&l)!==0)&&(a[o]=ll(h,t)):v<=t&&(e.expiredLanes|=h),i&=~h}if(t=Je,n=Ae,n=Bt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&yn(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Qt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&yn(l),Ha(n)){case 2:case 8:n=wn;break;case 32:n=pn;break;case 268435456:n=jl;break;default:n=pn}return l=Oh.bind(null,e),n=ct(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&yn(l),e.callbackPriority=2,e.callbackNode=null,2}function Oh(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(zc()&&e.callbackNode!==n)return null;var l=Ae;return l=Bt(e,e===Je?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(hh(e,l,t),Dh(e,Ce()),e.callbackNode!=null&&e.callbackNode===n?Oh.bind(null,e):null)}function wh(e,t){if(zc())return null;hh(e,t,!0)}function yp(){Cp(function(){(qe&6)!==0?ct(Ke,mp):zh()})}function Jo(){if(ta===0){var e=li;e===0&&(e=Vn,Vn<<=1,(Vn&261888)===0&&(Vn=256)),ta=e}return ta}function Rh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Lt(""+e)}function Uh(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pp(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var i=Rh((a[Ct]||null).action),o=l.submitter;o&&(t=(t=o[Ct]||null)?Rh(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new $n("action","action",null,l,a);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ta!==0){var v=o?Uh(a,o):new FormData(a);mo(n,{pending:!0,data:v,method:a.method,action:i},null,v)}}else typeof i=="function"&&(h.preventDefault(),v=o?Uh(a,o):new FormData(a),mo(n,{pending:!0,data:v,method:a.method,action:i},i,v))},currentTarget:a}]})}}for(var $o=0;$o<zs.length;$o++){var Fo=zs[$o],gp=Fo.toLowerCase(),vp=Fo[0].toUpperCase()+Fo.slice(1);Bn(gp,"on"+vp)}Bn(df,"onAnimationEnd"),Bn(hf,"onAnimationIteration"),Bn(mf,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(Ry,"onTransitionRun"),Bn(Uy,"onTransitionStart"),Bn(ky,"onTransitionCancel"),Bn(yf,"onTransitionEnd"),Ml("onMouseEnter",["mouseout","mouseover"]),Ml("onMouseLeave",["mouseout","mouseover"]),Ml("onPointerEnter",["pointerout","pointerover"]),Ml("onPointerLeave",["pointerout","pointerover"]),Sn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ru="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(" "),bp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ru));function kh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],v=h.instance,A=h.currentTarget;if(h=h.listener,v!==i&&a.isPropagationStopped())break e;i=h,a.currentTarget=A;try{i(a)}catch(z){Ku(z)}a.currentTarget=null,i=v}else for(o=0;o<l.length;o++){if(h=l[o],v=h.instance,A=h.currentTarget,h=h.listener,v!==i&&a.isPropagationStopped())break e;i=h,a.currentTarget=A;try{i(a)}catch(z){Ku(z)}a.currentTarget=null,i=v}}}}function je(e,t){var n=t[Vt];n===void 0&&(n=t[Vt]=new Set);var l=e+"__bubble";n.has(l)||(qh(t,e,2,!1),n.add(l))}function Wo(e,t,n){var l=0;t&&(l|=4),qh(n,e,l,t)}var wc="_reactListening"+Math.random().toString(36).slice(2);function Io(e){if(!e[wc]){e[wc]=!0,ra.forEach(function(n){n!=="selectionchange"&&(bp.has(n)||Wo(n,!1,e),Wo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wc]||(t[wc]=!0,Wo("selectionchange",!1,t))}}function qh(e,t,n,l){switch(dm(t)){case 2:var a=Kp;break;case 8:a=Jp;break;default:a=hr}n=a.bind(null,t,n,e),a=void 0,!Ka||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Po(e,t,n,l,a){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===a)break;if(o===4)for(o=l.return;o!==null;){var v=o.tag;if((v===3||v===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;h!==null;){if(o=De(h),o===null)return;if(v=o.tag,v===5||v===6||v===26||v===27){l=i=o;continue e}h=h.parentNode}}l=l.return}Hu(function(){var A=i,z=zi(n),R=[];e:{var T=pf.get(e);if(T!==void 0){var M=$n,F=e;switch(e){case"keypress":if(ma(n)===0)break e;case"keydown":case"keyup":M=gs;break;case"focusin":F="focus",M=wi;break;case"focusout":F="blur",M=wi;break;case"beforeblur":case"afterblur":M=wi;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=Ja;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Lu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Ss;break;case df:case hf:case mf:M=rs;break;case yf:M=xs;break;case"scroll":case"scrollend":M=ql;break;case"wheel":M=js;break;case"copy":case"cut":case"paste":M=ds;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=qi;break;case"toggle":case"beforetoggle":M=Ns}var ce=(t&4)!==0,Xe=!ce&&(e==="scroll"||e==="scrollend"),j=ce?T!==null?T+"Capture":null:T;ce=[];for(var x=A,N;x!==null;){var O=x;if(N=O.stateNode,O=O.tag,O!==5&&O!==26&&O!==27||N===null||j===null||(O=Ul(x,j),O!=null&&ce.push(fu(x,O,N))),Xe)break;x=x.return}0<ce.length&&(T=new M(T,F,null,n,z),R.push({event:T,listeners:ce}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",T&&n!==_i&&(F=n.relatedTarget||n.fromElement)&&(De(F)||F[Tl]))break e;if((M||T)&&(T=z.window===z?z:(T=z.ownerDocument)?T.defaultView||T.parentWindow:window,M?(F=n.relatedTarget||n.toElement,M=A,F=F?De(F):null,F!==null&&(Xe=g(F),ce=F.tag,F!==Xe||ce!==5&&ce!==27&&ce!==6)&&(F=null)):(M=null,F=A),M!==F)){if(ce=Ja,O="onMouseLeave",j="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(ce=qi,O="onPointerLeave",j="onPointerEnter",x="pointer"),Xe=M==null?T:Xn(M),N=F==null?T:Xn(F),T=new ce(O,x+"leave",M,n,z),T.target=Xe,T.relatedTarget=N,O=null,De(z)===A&&(ce=new ce(j,x+"enter",F,n,z),ce.target=N,ce.relatedTarget=Xe,O=ce),Xe=O,M&&F)t:{for(ce=Sp,j=M,x=F,N=0,O=j;O;O=ce(O))N++;O=0;for(var le=x;le;le=ce(le))O++;for(;0<N-O;)j=ce(j),N--;for(;0<O-N;)x=ce(x),O--;for(;N--;){if(j===x||x!==null&&j===x.alternate){ce=j;break t}j=ce(j),x=ce(x)}ce=null}else ce=null;M!==null&&Hh(R,T,M,ce,!1),F!==null&&Xe!==null&&Hh(R,Xe,F,ce,!0)}}e:{if(T=A?Xn(A):window,M=T.nodeName&&T.nodeName.toLowerCase(),M==="select"||M==="input"&&T.type==="file")var we=Ot;else if(ke(T))if(jn)we=Dy;else{we=_y;var I=My}else M=T.nodeName,!M||M.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?A&&Mi(A.elementType)&&(we=Ot):we=zy;if(we&&(we=we(e,A))){bt(R,we,n,z);break e}I&&I(e,T,A),e==="focusout"&&A&&T.type==="number"&&A.memoizedProps.value!=null&&zl(T,"number",T.value)}switch(I=A?Xn(A):window,e){case"focusin":(ke(I)||I.contentEditable==="true")&&($a=I,Cs=A,Li=null);break;case"focusout":Li=Cs=$a=null;break;case"mousedown":Ms=!0;break;case"contextmenu":case"mouseup":case"dragend":Ms=!1,rf(R,n,z);break;case"selectionchange":if(wy)break;case"keydown":case"keyup":rf(R,n,z)}var pe;if(Hi)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else m?d(e,n)&&(Te="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Te="onCompositionStart");Te&&(Vu&&n.locale!=="ko"&&(m||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&m&&(pe=ha()):(qn=z,Di="value"in qn?qn.value:qn.textContent,m=!0)),I=Rc(A,Te),0<I.length&&(Te=new Yu(Te,e,null,n,z),R.push({event:Te,listeners:I}),pe?Te.data=pe:(pe=y(n),pe!==null&&(Te.data=pe)))),(pe=Ts?_(e,n):Q(e,n))&&(Te=Rc(A,"onBeforeInput"),0<Te.length&&(I=new Yu("onBeforeInput","beforeinput",null,n,z),R.push({event:I,listeners:Te}),I.data=pe)),pp(R,e,A,n,z)}kh(R,t)})}function fu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rc(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Ul(e,n),a!=null&&l.unshift(fu(e,a,i)),a=Ul(e,t),a!=null&&l.push(fu(e,a,i))),e.tag===3)return l;e=e.return}return[]}function Sp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hh(e,t,n,l,a){for(var i=t._reactName,o=[];n!==null&&n!==l;){var h=n,v=h.alternate,A=h.stateNode;if(h=h.tag,v!==null&&v===l)break;h!==5&&h!==26&&h!==27||A===null||(v=A,a?(A=Ul(n,i),A!=null&&o.unshift(fu(n,A,v))):a||(A=Ul(n,i),A!=null&&o.push(fu(n,A,v)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var xp=/\r\n?/g,jp=/\u0000|\uFFFD/g;function Bh(e){return(typeof e=="string"?e:""+e).replace(xp,`
|
|
9
|
+
`).replace(jp,"")}function Lh(e,t){return t=Bh(t),Bh(e)===t}function Ve(e,t,n,l,a,i){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ol(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ol(e,""+l);break;case"className":Ya(e,"class",l);break;case"tabIndex":Ya(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ya(e,n,l);break;case"style":Zn(e,l,i);break;case"data":if(t!=="object"){Ya(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Lt(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Ve(e,t,"name",a.name,a,null),Ve(e,t,"formEncType",a.formEncType,a,null),Ve(e,t,"formMethod",a.formMethod,a,null),Ve(e,t,"formTarget",a.formTarget,a,null)):(Ve(e,t,"encType",a.encType,a,null),Ve(e,t,"method",a.method,a,null),Ve(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Lt(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=kn);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(f(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(f(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=Lt(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":je("beforetoggle",e),je("toggle",e),La(e,"popover",l);break;case"xlinkActuate":st(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":st(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":st(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":st(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":st(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":st(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":st(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":st(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":st(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":La(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=ve.get(n)||n,La(e,n,l))}}function er(e,t,n,l,a,i){switch(n){case"style":Zn(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(f(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(f(60));e.innerHTML=n}}break;case"children":typeof l=="string"?Ol(e,l):(typeof l=="number"||typeof l=="bigint")&&Ol(e,""+l);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"onClick":l!=null&&(e.onclick=kn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wu.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[Ct]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof l=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):La(e,n,l)}}}function kt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var o=n[i];if(o!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(f(137,t));default:Ve(e,t,i,o,n,null)}}a&&Ve(e,t,"srcSet",n.srcSet,n,null),l&&Ve(e,t,"src",n.src,n,null);return;case"input":je("invalid",e);var h=i=o=a=null,v=null,A=null;for(l in n)if(n.hasOwnProperty(l)){var z=n[l];if(z!=null)switch(l){case"name":a=z;break;case"type":o=z;break;case"checked":v=z;break;case"defaultChecked":A=z;break;case"value":i=z;break;case"defaultValue":h=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(f(137,t));break;default:Ve(e,t,l,z,n,null)}}_l(e,i,h,v,A,o,a,!1);return;case"select":je("invalid",e),l=o=i=null;for(a in n)if(n.hasOwnProperty(a)&&(h=n[a],h!=null))switch(a){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:Ve(e,t,a,h,n,null)}t=i,n=o,e.multiple=!!l,t!=null?Ft(e,!!l,t,!1):n!=null&&Ft(e,!!l,n,!0);return;case"textarea":je("invalid",e),i=a=l=null;for(o in n)if(n.hasOwnProperty(o)&&(h=n[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":a=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(f(91));break;default:Ve(e,t,o,h,n,null)}Xa(e,l,a,i);return;case"option":for(v in n)n.hasOwnProperty(v)&&(l=n[v],l!=null)&&(v==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ve(e,t,v,l,n,null));return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(l=0;l<ru.length;l++)je(ru[l],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("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(A in n)if(n.hasOwnProperty(A)&&(l=n[A],l!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(f(137,t));default:Ve(e,t,A,l,n,null)}return;default:if(Mi(t)){for(z in n)n.hasOwnProperty(z)&&(l=n[z],l!==void 0&&er(e,t,z,l,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(l=n[h],l!=null&&Ve(e,t,h,l,n,null))}function Np(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,o=null,h=null,v=null,A=null,z=null;for(M in n){var R=n[M];if(n.hasOwnProperty(M)&&R!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":v=R;default:l.hasOwnProperty(M)||Ve(e,t,M,null,l,R)}}for(var T in l){var M=l[T];if(R=n[T],l.hasOwnProperty(T)&&(M!=null||R!=null))switch(T){case"type":i=M;break;case"name":a=M;break;case"checked":A=M;break;case"defaultChecked":z=M;break;case"value":o=M;break;case"defaultValue":h=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(f(137,t));break;default:M!==R&&Ve(e,t,T,M,l,R)}}Va(e,o,h,v,A,z,i,a);return;case"select":M=o=h=T=null;for(i in n)if(v=n[i],n.hasOwnProperty(i)&&v!=null)switch(i){case"value":break;case"multiple":M=v;default:l.hasOwnProperty(i)||Ve(e,t,i,null,l,v)}for(a in l)if(i=l[a],v=n[a],l.hasOwnProperty(a)&&(i!=null||v!=null))switch(a){case"value":T=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==v&&Ve(e,t,a,i,l,v)}t=h,n=o,l=M,T!=null?Ft(e,!!n,T,!1):!!l!=!!n&&(t!=null?Ft(e,!!n,t,!0):Ft(e,!!n,n?[]:"",!1));return;case"textarea":M=T=null;for(h in n)if(a=n[h],n.hasOwnProperty(h)&&a!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Ve(e,t,h,null,l,a)}for(o in l)if(a=l[o],i=n[o],l.hasOwnProperty(o)&&(a!=null||i!=null))switch(o){case"value":T=a;break;case"defaultValue":M=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(f(91));break;default:a!==i&&Ve(e,t,o,a,l,i)}Dl(e,T,M);return;case"option":for(var F in n)T=n[F],n.hasOwnProperty(F)&&T!=null&&!l.hasOwnProperty(F)&&(F==="selected"?e.selected=!1:Ve(e,t,F,null,l,T));for(v in l)T=l[v],M=n[v],l.hasOwnProperty(v)&&T!==M&&(T!=null||M!=null)&&(v==="selected"?e.selected=T&&typeof T!="function"&&typeof T!="symbol":Ve(e,t,v,T,l,M));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 ce in n)T=n[ce],n.hasOwnProperty(ce)&&T!=null&&!l.hasOwnProperty(ce)&&Ve(e,t,ce,null,l,T);for(A in l)if(T=l[A],M=n[A],l.hasOwnProperty(A)&&T!==M&&(T!=null||M!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(f(137,t));break;default:Ve(e,t,A,T,l,M)}return;default:if(Mi(t)){for(var Xe in n)T=n[Xe],n.hasOwnProperty(Xe)&&T!==void 0&&!l.hasOwnProperty(Xe)&&er(e,t,Xe,void 0,l,T);for(z in l)T=l[z],M=n[z],!l.hasOwnProperty(z)||T===M||T===void 0&&M===void 0||er(e,t,z,T,l,M);return}}for(var j in n)T=n[j],n.hasOwnProperty(j)&&T!=null&&!l.hasOwnProperty(j)&&Ve(e,t,j,null,l,T);for(R in l)T=l[R],M=n[R],!l.hasOwnProperty(R)||T===M||T==null&&M==null||Ve(e,t,R,T,l,M)}function Yh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ap(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,o=a.initiatorType,h=a.duration;if(i&&h&&Yh(o)){for(o=0,h=a.responseEnd,l+=1;l<n.length;l++){var v=n[l],A=v.startTime;if(A>h)break;var z=v.transferSize,R=v.initiatorType;z&&Yh(R)&&(v=v.responseEnd,o+=z*(v<h?1:(h-A)/(v-A)))}if(--l,t+=8*(i+o)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var tr=null,nr=null;function Uc(e){return e.nodeType===9?e:e.ownerDocument}function Gh(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 Qh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function lr(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ar=null;function Tp(){var e=window.event;return e&&e.type==="popstate"?e===ar?!1:(ar=e,!0):(ar=null,!1)}var Vh=typeof setTimeout=="function"?setTimeout:void 0,Ep=typeof clearTimeout=="function"?clearTimeout:void 0,Xh=typeof Promise=="function"?Promise:void 0,Cp=typeof queueMicrotask=="function"?queueMicrotask:typeof Xh<"u"?function(e){return Xh.resolve(null).then(e).catch(Mp)}:Vh;function Mp(e){setTimeout(function(){throw e})}function na(e){return e==="head"}function Zh(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),ji(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")du(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,du(n);for(var i=n.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[El]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=o}}else n==="body"&&du(e.ownerDocument.body);n=a}while(n);ji(t)}function Kh(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function ir(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ir(n),Un(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function _p(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[El])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function zp(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=_n(e.nextSibling),e===null))return null;return e}function Jh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function ur(e){return e.data==="$?"||e.data==="$~"}function cr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Dp(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function _n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var sr=null;function $h(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return _n(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Fh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Wh(e,t,n){switch(t=Uc(n),e){case"html":if(e=t.documentElement,!e)throw Error(f(452));return e;case"head":if(e=t.head,!e)throw Error(f(453));return e;case"body":if(e=t.body,!e)throw Error(f(454));return e;default:throw Error(f(451))}}function du(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Un(e)}var zn=new Map,Ih=new Set;function kc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sl=B.d;B.d={f:Op,r:wp,D:Rp,C:Up,L:kp,m:qp,X:Bp,S:Hp,M:Lp};function Op(){var e=Sl.f(),t=Cc();return e||t}function wp(e){var t=Dt(e);t!==null&&t.tag===5&&t.type==="form"?yd(t):Sl.r(e)}var bi=typeof document>"u"?null:document;function Ph(e,t,n){var l=bi;if(l&&typeof t=="string"&&t){var a=$t(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Ih.has(a)||(Ih.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),kt(t,"link",e),ut(t),l.head.appendChild(t)))}}function Rp(e){Sl.D(e),Ph("dns-prefetch",e,null)}function Up(e,t){Sl.C(e,t),Ph("preconnect",e,t)}function kp(e,t,n){Sl.L(e,t,n);var l=bi;if(l&&e&&t){var a='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+$t(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+$t(n.imageSizes)+'"]')):a+='[href="'+$t(e)+'"]';var i=a;switch(t){case"style":i=Si(e);break;case"script":i=xi(e)}zn.has(i)||(e=H({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zn.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(hu(i))||t==="script"&&l.querySelector(mu(i))||(t=l.createElement("link"),kt(t,"link",e),ut(t),l.head.appendChild(t)))}}function qp(e,t){Sl.m(e,t);var n=bi;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+$t(l)+'"][href="'+$t(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=xi(e)}if(!zn.has(i)&&(e=H({rel:"modulepreload",href:e},t),zn.set(i,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(mu(i)))return}l=n.createElement("link"),kt(l,"link",e),ut(l),n.head.appendChild(l)}}}function Hp(e,t,n){Sl.S(e,t,n);var l=bi;if(l&&e){var a=Cl(l).hoistableStyles,i=Si(e);t=t||"default";var o=a.get(i);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(hu(i)))h.loading=5;else{e=H({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zn.get(i))&&or(e,n);var v=o=l.createElement("link");ut(v),kt(v,"link",e),v._p=new Promise(function(A,z){v.onload=A,v.onerror=z}),v.addEventListener("load",function(){h.loading|=1}),v.addEventListener("error",function(){h.loading|=2}),h.loading|=4,qc(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},a.set(i,o)}}}function Bp(e,t){Sl.X(e,t);var n=bi;if(n&&e){var l=Cl(n).hoistableScripts,a=xi(e),i=l.get(a);i||(i=n.querySelector(mu(a)),i||(e=H({src:e,async:!0},t),(t=zn.get(a))&&rr(e,t),i=n.createElement("script"),ut(i),kt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function Lp(e,t){Sl.M(e,t);var n=bi;if(n&&e){var l=Cl(n).hoistableScripts,a=xi(e),i=l.get(a);i||(i=n.querySelector(mu(a)),i||(e=H({src:e,async:!0,type:"module"},t),(t=zn.get(a))&&rr(e,t),i=n.createElement("script"),ut(i),kt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function em(e,t,n,l){var a=(a=X.current)?kc(a):null;if(!a)throw Error(f(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Si(n.href),n=Cl(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Si(n.href);var i=Cl(a).hoistableStyles,o=i.get(e);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=a.querySelector(hu(e)))&&!i._p&&(o.instance=i,o.state.loading=5),zn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},zn.set(e,n),i||Yp(a,e,n,o.state))),t&&l===null)throw Error(f(528,""));return o}if(t&&l!==null)throw Error(f(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=xi(n),n=Cl(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(f(444,e))}}function Si(e){return'href="'+$t(e)+'"'}function hu(e){return'link[rel="stylesheet"]['+e+"]"}function tm(e){return H({},e,{"data-precedence":e.precedence,precedence:null})}function Yp(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),kt(t,"link",n),ut(t),e.head.appendChild(t))}function xi(e){return'[src="'+$t(e)+'"]'}function mu(e){return"script[async]"+e}function nm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+$t(n.href)+'"]');if(l)return t.instance=l,ut(l),l;var a=H({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ut(l),kt(l,"style",a),qc(l,n.precedence,e),t.instance=l;case"stylesheet":a=Si(n.href);var i=e.querySelector(hu(a));if(i)return t.state.loading|=4,t.instance=i,ut(i),i;l=tm(n),(a=zn.get(a))&&or(l,a),i=(e.ownerDocument||e).createElement("link"),ut(i);var o=i;return o._p=new Promise(function(h,v){o.onload=h,o.onerror=v}),kt(i,"link",l),t.state.loading|=4,qc(i,n.precedence,e),t.instance=i;case"script":return i=xi(n.src),(a=e.querySelector(mu(i)))?(t.instance=a,ut(a),a):(l=n,(a=zn.get(i))&&(l=H({},n),rr(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),ut(a),kt(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(f(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,qc(l,n.precedence,e));return t.instance}function qc(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)i=h;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function or(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function rr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Hc=null;function lm(e,t,n){if(Hc===null){var l=new Map,a=Hc=new Map;a.set(n,l)}else a=Hc,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[El]||i[vt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(i):l.set(o,[i])}}return l}function am(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Gp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function im(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Qp(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Si(l.href),i=t.querySelector(hu(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Bc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ut(i);return}i=t.ownerDocument||t,l=tm(l),(a=zn.get(a))&&or(l,a),i=i.createElement("link"),ut(i);var o=i;o._p=new Promise(function(h,v){o.onload=h,o.onerror=v}),kt(i,"link",l),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Bc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var fr=0;function Vp(e,t){return e.stylesheets&&e.count===0&&Yc(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&Yc(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&fr===0&&(fr=62500*Ap());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Yc(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>fr?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function Bc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Lc=null;function Yc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Lc=new Map,t.forEach(Xp,e),Lc=null,Bc.call(e))}function Xp(e,t){if(!(t.state.loading&4)){var n=Lc.get(e);if(n)var l=n.get(null);else{n=new Map,Lc.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var o=a[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),l=o)}l&&n.set(null,l)}a=t.instance,o=a.getAttribute("data-precedence"),i=n.get(o)||l,i===l&&n.set(null,a),n.set(o,a),this.count++,l=Bc.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var yu={$$typeof:q,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function Zp(e,t,n,l,a,i,o,h,v){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=Al(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Al(0),this.hiddenUpdates=Al(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function um(e,t,n,l,a,i,o,h,v,A,z,R){return e=new Zp(e,t,n,o,v,A,z,R,h),t=1,i===!0&&(t|=24),i=on(3,null,null,t),e.current=i,i.stateNode=e,t=Qs(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:t},Ks(i),e}function cm(e){return e?(e=Ia,e):Ia}function sm(e,t,n,l,a,i){a=cm(a),l.context===null?l.context=a:l.pendingContext=a,l=Xl(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=Zl(e,l,t),n!==null&&(tn(n,e,t),Ki(n,e,t))}function om(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dr(e,t){om(e,t),(e=e.alternate)&&om(e,t)}function rm(e){if(e.tag===13||e.tag===31){var t=xa(e,67108864);t!==null&&tn(t,e,67108864),dr(e,67108864)}}function fm(e){if(e.tag===13||e.tag===31){var t=mn();t=gn(t);var n=xa(e,t);n!==null&&tn(n,e,t),dr(e,t)}}var Gc=!0;function Kp(e,t,n,l){var a=E.T;E.T=null;var i=B.p;try{B.p=2,hr(e,t,n,l)}finally{B.p=i,E.T=a}}function Jp(e,t,n,l){var a=E.T;E.T=null;var i=B.p;try{B.p=8,hr(e,t,n,l)}finally{B.p=i,E.T=a}}function hr(e,t,n,l){if(Gc){var a=mr(l);if(a===null)Po(e,t,l,Qc,n),hm(e,l);else if(Fp(a,e,t,n,l))l.stopPropagation();else if(hm(e,l),t&4&&-1<$p.indexOf(e)){for(;a!==null;){var i=Dt(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=yt(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var v=1<<31-lt(o);h.entanglements[1]|=v,o&=~v}el(i),(qe&6)===0&&(Tc=Ce()+500,ou(0))}}break;case 31:case 13:h=xa(i,2),h!==null&&tn(h,i,2),Cc(),dr(i,2)}if(i=mr(l),i===null&&Po(e,t,l,Qc,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else Po(e,t,l,null,n)}}function mr(e){return e=zi(e),yr(e)}var Qc=null;function yr(e){if(Qc=null,e=De(e),e!==null){var t=g(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=U(t),e!==null)return e;e=null}else if(n===31){if(e=Z(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Qc=e,null}function dm(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(tl()){case Ke:return 2;case wn:return 8;case pn:case Gt:return 32;case jl:return 268435456;default:return 32}default:return 32}}var pr=!1,la=null,aa=null,ia=null,pu=new Map,gu=new Map,ua=[],$p="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 hm(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":ia=null;break;case"pointerover":case"pointerout":pu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gu.delete(t.pointerId)}}function vu(e,t,n,l,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Dt(t),t!==null&&rm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Fp(e,t,n,l,a){switch(t){case"focusin":return la=vu(la,e,t,n,l,a),!0;case"dragenter":return aa=vu(aa,e,t,n,l,a),!0;case"mouseover":return ia=vu(ia,e,t,n,l,a),!0;case"pointerover":var i=a.pointerId;return pu.set(i,vu(pu.get(i)||null,e,t,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,gu.set(i,vu(gu.get(i)||null,e,t,n,l,a)),!0}return!1}function mm(e){var t=De(e.target);if(t!==null){var n=g(t);if(n!==null){if(t=n.tag,t===13){if(t=U(n),t!==null){e.blockedOn=t,Ei(e.priority,function(){fm(n)});return}}else if(t===31){if(t=Z(n),t!==null){e.blockedOn=t,Ei(e.priority,function(){fm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mr(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);_i=l,n.target.dispatchEvent(l),_i=null}else return t=Dt(n),t!==null&&rm(t),e.blockedOn=n,!1;t.shift()}return!0}function ym(e,t,n){Vc(e)&&n.delete(t)}function Wp(){pr=!1,la!==null&&Vc(la)&&(la=null),aa!==null&&Vc(aa)&&(aa=null),ia!==null&&Vc(ia)&&(ia=null),pu.forEach(ym),gu.forEach(ym)}function Xc(e,t){e.blockedOn===t&&(e.blockedOn=null,pr||(pr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,Wp)))}var Zc=null;function pm(e){Zc!==e&&(Zc=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Zc===e&&(Zc=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(yr(l||n)===null)continue;break}var i=Dt(n);i!==null&&(e.splice(t,3),t-=3,mo(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function ji(e){function t(v){return Xc(v,e)}la!==null&&Xc(la,e),aa!==null&&Xc(aa,e),ia!==null&&Xc(ia,e),pu.forEach(t),gu.forEach(t);for(var n=0;n<ua.length;n++){var l=ua[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ua.length&&(n=ua[0],n.blockedOn===null);)mm(n),n.blockedOn===null&&ua.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],o=a[Ct]||null;if(typeof i=="function")o||pm(n);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[Ct]||null)h=o.formAction;else if(yr(a)!==null)continue}else h=o.action;typeof h=="function"?n[l+1]=h:(n.splice(l,3),l-=3),pm(n)}}}function gm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function gr(e){this._internalRoot=e}Kc.prototype.render=gr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(f(409));var n=t.current,l=mn();sm(n,l,e,t,null,null)},Kc.prototype.unmount=gr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sm(e.current,2,null,e,null,null),Cc(),t[Tl]=null}};function Kc(e){this._internalRoot=e}Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=vn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ua.length&&t!==0&&t<ua[n].priority;n++);ua.splice(n,0,e),n===0&&mm(e)}};var vm=s.version;if(vm!=="19.2.7")throw Error(f(527,vm,"19.2.7"));B.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(f(188)):(e=Object.keys(e).join(","),Error(f(268,e)));return e=C(t),e=e!==null?L(e):null,e=e===null?null:e.stateNode,e};var Ip={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jc.isDisabled&&Jc.supportsFiber)try{Qn=Jc.inject(Ip),it=Jc}catch{}}return Su.createRoot=function(e,t){if(!p(e))throw Error(f(299));var n=!1,l="",a=Td,i=Ed,o=Cd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=um(e,1,!1,null,null,n,l,null,a,i,o,gm),e[Tl]=t.current,Io(e),new gr(t)},Su.hydrateRoot=function(e,t,n){if(!p(e))throw Error(f(299));var l=!1,a="",i=Td,o=Ed,h=Cd,v=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(h=n.onRecoverableError),n.formState!==void 0&&(v=n.formState)),t=um(e,1,!0,t,n??null,l,a,v,i,o,h,gm),t.context=cm(null),n=t.current,l=mn(),l=gn(l),a=Xl(l),a.callback=null,Zl(n,a,l),n=l,t.current.lanes=n,Rn(t,n),el(t),e[Tl]=t.current,Io(e),new Kc(t)},Su.version="19.2.7",Su}var Mm;function s0(){if(Mm)return Sr.exports;Mm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(s){console.error(s)}}return u(),Sr.exports=c0(),Sr.exports}var o0=s0();const r0=u=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),f0=u=>u.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,r,f)=>f?f.toUpperCase():r.toLowerCase()),_m=u=>{const s=f0(u);return s.charAt(0).toUpperCase()+s.slice(1)},ey=(...u)=>u.filter((s,r,f)=>!!s&&s.trim()!==""&&f.indexOf(s)===r).join(" ").trim(),d0=u=>{for(const s in u)if(s.startsWith("aria-")||s==="role"||s==="title")return!0};var h0={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"};const m0=b.forwardRef(({color:u="currentColor",size:s=24,strokeWidth:r=2,absoluteStrokeWidth:f,className:p="",children:g,iconNode:U,...Z},w)=>b.createElement("svg",{ref:w,...h0,width:s,height:s,stroke:u,strokeWidth:f?Number(r)*24/Number(s):r,className:ey("lucide",p),...!g&&!d0(Z)&&{"aria-hidden":"true"},...Z},[...U.map(([C,L])=>b.createElement(C,L)),...Array.isArray(g)?g:[g]]));const oe=(u,s)=>{const r=b.forwardRef(({className:f,...p},g)=>b.createElement(m0,{ref:g,iconNode:s,className:ey(`lucide-${r0(_m(u))}`,`lucide-${u}`,f),...p}));return r.displayName=_m(u),r};const y0=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Gr=oe("archive",y0);const p0=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],g0=oe("arrow-down",p0);const v0=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],b0=oe("arrow-up",v0);const S0=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],x0=oe("bell",S0);const j0=[["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"}]],N0=oe("bot",j0);const A0=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Cu=oe("check",A0);const T0=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],E0=oe("chevron-right",T0);const C0=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],M0=oe("chevron-up",C0);const _0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],z0=oe("circle-dot",_0);const D0=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],O0=oe("clipboard",D0);const w0=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Qr=oe("clock-3",w0);const R0=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],U0=oe("code-xml",R0);const k0=[["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"}]],Ai=oe("copy",k0);const q0=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Ar=oe("cpu",q0);const H0=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Mu=oe("download",H0);const B0=[["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"}]],L0=oe("ellipsis",B0);const Y0=[["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"}]],Vr=oe("external-link",Y0);const G0=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Q0=oe("eye",G0);const V0=[["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"}]],Xr=oe("file-text",V0);const X0=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],es=oe("folder-open",X0);const Z0=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Zr=oe("folder",Z0);const K0=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],J0=oe("funnel",K0);const $0=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],xl=oe("gauge",$0);const F0=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],ty=oe("git-compare",F0);const W0=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],I0=oe("hash",W0);const P0=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],e1=oe("image",P0);const t1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],n1=oe("info",t1);const l1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Kr=oe("key-round",l1);const a1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],i1=oe("loader-circle",a1);const u1=[["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"}]],c1=oe("message-circle",u1);const s1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],o1=oe("monitor",s1);const r1=[["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"}]],Jr=oe("paperclip",r1);const f1=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],$r=oe("pin",f1);const d1=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],ny=oe("plug-zap",d1);const h1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Or=oe("plus",h1);const m1=[["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"}]],ns=oe("refresh-cw",m1);const y1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],p1=oe("rotate-ccw",y1);const g1=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],v1=oe("save",g1);const b1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Fr=oe("search",b1);const S1=[["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"}]],x1=oe("settings",S1);const j1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ls=oe("shield-check",j1);const N1=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],ly=oe("sliders-horizontal",N1);const A1=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],T1=oe("smartphone",A1);const E1=[["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"}]],C1=oe("sparkles",E1);const M1=[["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"}]],zm=oe("square-terminal",M1);const _1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Wr=oe("terminal",_1);const z1=[["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"}]],ay=oe("trash-2",z1);const D1=[["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"}]],O1=oe("wrench",D1);const w1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],On=oe("x",w1);const R1=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Eu=oe("zap",R1);function iy(u){if(!u||typeof u!="object"||Array.isArray(u))return;const s=u;return typeof s.lastActivityAt=="string"&&typeof s.sessionId=="string"?{lastActivityAt:s.lastActivityAt,sessionId:s.sessionId}:void 0}const Dn=".",wr="normal",U1=80,k1=1600,uy="vibelet.web.notificationSettings",q1="pending_local_",sa={enabled:!1,approvals:!0,questions:!0,replies:!0,hiddenOnly:!0};function Pc(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}function as(u,s=Date.now()){if(!u)return"unknown";const r=Date.parse(u);if(!Number.isFinite(r))return u;const f=s-r,p=60*1e3,g=60*p,U=24*g;return f<p?"now":f<g?`${Math.floor(f/p)}m ago`:f<U?`${Math.floor(f/g)}h ago`:`${Math.floor(f/U)}d ago`}function cy(u){if(!Number.isFinite(u))return"unknown";const s=u??0;return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function Gn(u){return u.customTitle||u.title||u.sessionId.slice(0,10)}function Rr(u,s){const r=u[u.length-1];return r?.role==="assistant"&&r.type!=="info"?[...u.slice(0,-1),{...r,content:`${r.content}${s}`}]:[...u,{role:"assistant",content:s,timestamp:new Date().toISOString()}]}function H1(u){const s=u;return{sessions:Array.isArray(s.sessions)?s.sessions:[],nextCursor:iy(s.nextCursor),inventoryVersion:s.inventoryVersion,inventoryBackfillInFlight:s.inventoryBackfillInFlight,folderCounts:s.folderCounts}}function B1(u){const s=u;return typeof s.sessionId=="string"?s.sessionId:null}function L1(u){const s=u;return typeof s.path=="string"?s.path:null}function Ra(u){return u.split("/").filter(Boolean).at(-1)??u}function sy(u){return Object.entries(u).length===0?"No structured input.":JSON.stringify(u,null,2)}function Ur(u){return Object.fromEntries(u.questions.map(s=>[s.id,s.options[0]?[s.options[0].label]:[]]))}function Tr(u){return u.trim()||void 0}function Dm(u){if(u==="7d")return Date.now()-7*864e5;if(u==="30d")return Date.now()-30*864e5;if(u==="90d")return Date.now()-90*864e5}function $c(u,s){const r=new Map;for(const f of u)r.set(f.sessionId,f);for(const f of s)r.set(f.sessionId,{...r.get(f.sessionId),...f});return Array.from(r.values()).sort((f,p)=>{const g=f.pinned?f.pinnedAt??0:0,U=p.pinned?p.pinnedAt??0:0;return g!==U?U-g:Date.parse(p.lastActivityAt)-Date.parse(f.lastActivityAt)})}let Er=0;function Y1(u=Date.now()){return Er=(Er+1)%1e4,`${q1}${u}_${Er}`}function G1(u){const s=u.now??new Date().toISOString();return{sessionId:u.sessionId,agent:u.agent,cwd:u.cwd,...u.model?{model:u.model}:{},...u.effort?{effort:u.effort}:{},fastMode:u.fastMode??!1,...u.title?{title:u.title}:{},createdAt:s,lastActivityAt:s,sources:["daemon"],runtime:{state:"daemonActive",confidence:"high",resumeMode:"reuseDriver"},managed:!0,approvalMode:u.approvalMode}}function Q1(u,s,r=new Date().toISOString()){return{...u,sessionId:s,lastActivityAt:r}}function Cr(u,s,r){if(!s||!r||s===r||!Object.hasOwn(u,s))return u;const{[s]:f,...p}=u;return{...p,[r]:f}}function Om(u,s,r){if(!s||!r||s===r||!u.has(s))return u;const f=new Set(u);return f.delete(s),f.add(r),f}function V1(u){const s=new Map;for(const r of u){const f=r.cwd||Dn;s.set(f,[...s.get(f)??[],r])}return Array.from(s.entries()).map(([r,f])=>({folder:r,sessions:f}))}function oy(u,s){const r=u.replace(/\\/g,"/").replace(/\/+$/,"");return!r||r==="."?s:`${r}/${s}`}function wm(u){const s=u.replace(/\\/g,"/").replace(/\/+$/,"");if(!s||s==="/"||s==="~"||s===".")return null;const r=s.lastIndexOf("/");return r<0?".":r===0?"/":s.slice(0,r)}function X1(u,s){return s.startsWith("text/")||s.includes("json")||s.includes("xml")||s.includes("javascript")?!0:/\.(md|txt|json|ya?ml|toml|csv|log|ts|tsx|js|jsx|css|html|xml|py|rb|go|rs|java|kt|swift|sh|zsh|bash)$/i.test(u)}function Z1(u,s){return s.startsWith("image/")||/\.(png|jpe?g|gif|webp|heic|heif|svg)$/i.test(u)}function Mr(u,s,r=window.location.origin){const f=new URL("/file",r);return f.searchParams.set("path",u),s&&f.searchParams.set("cwd",s),f.toString()}function Fc(u,s){return u.get(s)||void 0}function K1(u,s){return`${u.replace(/[<>:"/\\|?*\u0000-\u001F]/g," ").replace(/\s+/g," ").trim().slice(0,80)||s.slice(0,12)||"session"}.txt`}function J1(u,s){const r=[`# ${Gn(u)}`,"",`- Agent: ${u.agent}`,`- Session: \`${u.sessionId}\``,`- Working directory: \`${u.cwd}\``,`- Created: ${u.createdAt}`,`- Exported: ${new Date().toISOString()}`,""];for(const f of s){if(f.role!=="user"&&f.role!=="assistant")continue;const p=f.content.trim(),g=(f.images??[]).map(U=>`- Attachment: \`${U}\``);!p&&g.length===0||(r.push(`## ${f.role==="user"?"User":"Assistant"}`,""),p&&r.push(p,""),g.length&&r.push(...g,""))}return r.join(`
|
|
10
|
+
`).trimEnd()}function ry(u){const s=[`cd ${$1(u.cwd||Dn)} &&`],r=u.approvalMode??u.observedApprovalMode;return u.agent==="claude"?(s.push("claude","--resume",u.sessionId),r==="autoApprove"?s.push("--dangerously-skip-permissions"):r==="acceptEdits"&&s.push("--permission-mode","acceptEdits"),s.join(" ")):(s.push("codex","resume",u.sessionId),r==="autoApprove"&&s.push("--dangerously-bypass-approvals-and-sandbox"),s.join(" "))}function $1(u){return/^[a-zA-Z0-9._/~-]+$/.test(u)?u:`'${u.replace(/'/g,"'\\''")}'`}function F1(u,s){const r=URL.createObjectURL(new Blob([s],{type:"text/plain;charset=utf-8"})),f=document.createElement("a");f.href=r,f.download=u,f.click(),URL.revokeObjectURL(r)}function W1(u=window.localStorage){try{const s=u.getItem(uy);if(!s)return{...sa};const r=JSON.parse(s);return Pc(r)?{enabled:typeof r.enabled=="boolean"?r.enabled:sa.enabled,approvals:typeof r.approvals=="boolean"?r.approvals:sa.approvals,questions:typeof r.questions=="boolean"?r.questions:sa.questions,replies:typeof r.replies=="boolean"?r.replies:sa.replies,hiddenOnly:typeof r.hiddenOnly=="boolean"?r.hiddenOnly:sa.hiddenOnly}:{...sa}}catch{return{...sa}}}function I1(u,s=window.localStorage){s.setItem(uy,JSON.stringify(u))}function kr(u=typeof Notification>"u"?void 0:Notification){return u?.permission??"unsupported"}function P1(u,s,r=typeof document>"u"?"visible":document.visibilityState){return!(!u.enabled||s!=="granted"||u.hiddenOnly&&r==="visible")}function eg(u,s,r={}){const f=r.notificationFactory??(typeof Notification>"u"?void 0:Notification);if(!f)return!1;const p=r.settings??{enabled:!0,hiddenOnly:!1},g=r.permission??kr(),U=r.visibilityState??(typeof document>"u"?"visible":document.visibilityState);if(!P1(p,g,U))return!1;const Z=new f(u,{body:s,tag:r.tag});return r.onClick&&(Z.onclick=r.onClick),!0}function tg(u,s={}){const r=new Set,f={},p={},g={};for(const k of u.sessions)(k.runtime.isResponding||k.runtime.state==="daemonActive")&&r.add(k.sessionId);for(const k of u.pendingApprovals??[])f[k.sessionId]={type:"approval.request",...k};for(const k of u.pendingQuestions??[])p[k.sessionId]={type:"question.request",...k};let U=null,Z,w,C,L,H,K;if(u.activeSession){const k=u.activeSession,ae=u.sessions.find(P=>P.sessionId===k.sessionId);if(U=k.sessionId,Z=k.agent,w=ae?.cwd||s.currentCwd||Dn,C=k.approvalMode??ae?.approvalMode??wr,L=k.approvalMode??null,H=k.partialReplyText?Rr(k.messages,k.partialReplyText):k.messages,(k.isResponding||k.externallyResponding)&&r.add(k.sessionId),k.pendingApproval&&(f[k.sessionId]={type:"approval.request",sessionId:k.sessionId,...k.pendingApproval}),k.pendingQuestion){const P={type:"question.request",sessionId:k.sessionId,...k.pendingQuestion};p[k.sessionId]=P,K=Ur(P)}k.pendingQueue?.length&&(g[k.sessionId]=k.pendingQueue)}else{const k=s.currentActiveSessionId??null;if(k){const ae=u.sessionAliases?.[k];ae?U=ae:u.sessions.some(P=>P.sessionId===k)&&(U=k)}U=U??u.sessions[0]?.sessionId??null}return{page:{sessions:u.sessions,nextCursor:iy(u.nextCursor),inventoryVersion:u.inventoryVersion,inventoryBackfillInFlight:u.inventoryBackfillInFlight},activeSessionId:U,activeAgent:Z,activeCwd:w,activeApprovalMode:C,activeApprovalOverride:L,messages:H,respondingSessionIds:Array.from(r),pendingApprovals:f,pendingQuestions:p,pendingQueues:g,questionAnswers:K}}function Ni(u,s=r=>window.confirm(r)){return s(`${u}
|
|
11
|
+
|
|
12
|
+
This action cannot be undone from Vibelet Web.`)}function fy(u){return`Remote file changed before save: ${u}. Review the latest file or force save to overwrite.`}function ng(u,s){return u==="subscriptionRequired"?s?"Agent skills require an active Pro subscription.":"Terminal takeover requires an active Pro subscription.":u==="skillNotFound"?"Skill not found on the paired computer.":u==="skillResolveFailed"?"Could not load the skill on the paired computer.":u}const lg=/\u001B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g,ag=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F\u00AD\u061C\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\uFEFF]/g,ig=new Set(["","{}","[]","null","undefined",'""']);function Wc(u){return u.replace(/\s+/g," ").trim()}function At(u,s){return typeof u[s]=="string"?u[s]:""}function Rm(u,s){return typeof u[s]=="number"?u[s]:void 0}function xu(u,s){return u.length<=s?u:`${u.slice(0,s)}...`}function _r(u){const s=[],r=At(u,"file_path")||At(u,"filePath");r&&s.push({label:"Path",value:r,isFilePath:!0});const f=Rm(u,"offset"),p=Rm(u,"limit");if(f!==void 0||p!==void 0){const g=[];f!==void 0&&g.push(`line ${f+1}`),p!==void 0&&g.push(`to ${f!==void 0?f+p:p}`),s.push({label:"Range",value:g.join(" ")})}return s}function ug(u){return typeof u!="string"?"":u.replace(/\r\n?/g,`
|
|
13
|
+
`).replace(lg,"").replace(ag,"").trim()}function Ir(u){const s=ug(u);return ig.has(s)?"":s}function cg(u){return Ir(u).length>0}function Pr(u){const s=Ir(u);if(!s)return"";try{const r=JSON.parse(s);if(r&&typeof r=="object"&&!Array.isArray(r)){const f=typeof r.query=="string"?Wc(r.query):"";if(f)return f;const p=typeof r.command=="string"?Wc(r.command):"";if(p)return p;const g=typeof r.description=="string"?Wc(r.description):"";if(g)return g}}catch{}return Wc(s)}function sg(u,s){if(!s)return[];switch((u??"").toLowerCase()){case"read":return _r(s);case"write":{const f=_r(s),p=At(s,"content");return p&&f.push({label:"Content",isDiff:!0,value:"",diffNew:xu(p,500)}),f}case"edit":{const f=_r(s),p=At(s,"old_string")||At(s,"oldString"),g=At(s,"new_string")||At(s,"newString");return(p||g)&&f.push({label:"Change",isDiff:!0,value:"",diffOld:xu(p,300),diffNew:xu(g,300)}),f}case"bash":{const f=At(s,"command");return f?[{label:"Command",value:f,isCode:!0}]:[]}case"websearch":{const f=At(s,"query");return f?[{label:"Query",value:f}]:[]}case"webfetch":{const f=[],p=At(s,"url");p&&f.push({label:"URL",value:p});const g=At(s,"prompt");return g&&f.push({label:"Prompt",value:xu(g,200)}),f}case"glob":{const f=At(s,"pattern");return f?[{label:"Pattern",value:f}]:[]}case"grep":{const f=[],p=At(s,"pattern");p&&f.push({label:"Pattern",value:p,isCode:!0});const g=At(s,"path");return g&&f.push({label:"In",value:g,isFilePath:!0}),f}default:{const f=[],p=At(s,"command");if(p)return[{label:"Command",value:p,isCode:!0}];const g=At(s,"file_path")||At(s,"filePath");g&&f.push({label:"Path",value:g,isFilePath:!0});const U=At(s,"description");U&&f.push({label:"Description",value:xu(U,200)});const Z=At(s,"query");Z&&f.push({label:"Query",value:Z});const w=At(s,"url");return w&&f.push({label:"URL",value:w}),f}}}function Um(u){return u.role==="tool"?!0:u.type!=="info"?!1:!/^Error:/i.test(u.content.trim())}function dy(u){const s=[];for(const f of u){const p=f.toolName?.trim();p&&!s.includes(p)&&s.push(p)}return s.length?s.join(", "):u.map(f=>Pr(f.content)).find(Boolean)??""}const og=/^[A-Za-z_][A-Za-z0-9._:-]*$/,rg=/(?:^|\s)\$([A-Za-z_][A-Za-z0-9._:-]*|)$/;function _u(u){return u.trim().toLowerCase()}function fg(u){const s=u.trim(),r=/^\$([A-Za-z_][A-Za-z0-9._:-]*)(?:\s+([\s\S]*))?$/.exec(s);return r?{name:_u(r[1]??""),...r[2]?.trim()?{args:r[2].trim()}:{}}:null}function zr(u){const s=rg.exec(u);if(!s||s.index+s[0].length!==u.length)return null;const r=s[1]??"";if(r&&!og.test(r))return null;const f=s[0].lastIndexOf("$");return{start:s.index+f,end:u.length,keyword:_u(r)}}function dg(u,s,r){return`${u.slice(0,s.start)}$${_u(r)} ${u.slice(s.end)}`}function hg(u,s,r=8){const f=_u(s);return(f?u.filter(g=>_u(g.name).includes(f)):u).slice(0,r)}function Ic({icon:u,label:s,menuLabel:r,options:f,value:p,onSelect:g,align:U="left",disabled:Z,selected:w,wide:C}){const[L,H]=b.useState(!1);return c.jsxs("div",{className:"composer-menu",onBlur:K=>{const k=K.relatedTarget;(!k||!K.currentTarget.contains(k))&&H(!1)},onKeyDown:K=>{K.key==="Escape"&&H(!1)},children:[c.jsxs("button",{"aria-expanded":L,"aria-haspopup":"menu",className:`composer-option-button ${L||w?"selected":""}`,disabled:Z,onClick:()=>H(K=>!K),title:r,type:"button",children:[c.jsx(u,{"aria-hidden":"true"}),c.jsx("span",{children:s}),c.jsx(M0,{"aria-hidden":"true"})]}),L?c.jsx("div",{className:`composer-option-popover ${C?"wide":""} ${U==="right"?"align-right":""}`,role:"menu","aria-label":r,children:f.map(K=>{const k=K.icon,ae=K.value===p;return c.jsxs("button",{"aria-checked":ae,className:ae?"selected":"",disabled:K.disabled,onClick:()=>{g(K.value),H(!1)},role:"menuitemradio",title:K.description??K.label,type:"button",children:[c.jsx("span",{className:"composer-menu-icon",children:k?c.jsx(k,{"aria-hidden":"true"}):ae?c.jsx(Cu,{"aria-hidden":"true"}):null}),c.jsxs("span",{children:[c.jsx("strong",{children:K.label}),K.description?c.jsx("small",{children:K.description}):null]}),ae?c.jsx(Cu,{className:"composer-menu-check","aria-hidden":"true"}):null]},K.value)})}):null]})}function mg({visible:u,skills:s,onClose:r,onSelect:f,t:p}){return u?c.jsxs("div",{className:"skill-suggestion-popover",children:[c.jsxs("header",{children:[c.jsx("strong",{children:p.skills}),c.jsx("button",{type:"button",className:"icon-button",onClick:r,title:p.closeSkills,children:c.jsx(On,{"aria-hidden":"true"})})]}),s.length?c.jsx("div",{className:"skill-suggestion-list",children:s.map(g=>c.jsxs("button",{onClick:()=>f(g),title:g.description??g.name,type:"button",children:[c.jsxs("span",{children:[c.jsxs("strong",{children:["$",g.name]}),g.description?c.jsx("small",{children:g.description}):null]}),c.jsx("em",{children:g.source})]},`${g.source}:${g.name}`))}):c.jsx("p",{children:p.noSkillsFound})]}):null}const km=[{value:"normal",label:"Normal",description:"Ask before risky actions",icon:ls},{value:"plan",label:"Plan",description:"Plan before edits",icon:ly},{value:"acceptEdits",label:"Edits",description:"Auto-accept file edits",icon:Cu},{value:"autoApprove",label:"Auto",description:"Approve supported actions",icon:Eu}],qm=[{value:"",label:"Effort",description:"Use daemon default",icon:xl},{value:"minimal",label:"Minimal",icon:xl},{value:"low",label:"Low",icon:xl},{value:"medium",label:"Medium",icon:xl},{value:"high",label:"High",icon:xl},{value:"xhigh",label:"X High",icon:xl},{value:"max",label:"Max",icon:xl}];function yg({activeQueue:u,attachments:s,approvalMode:r,activeModelOptions:f,busy:p,draft:g,effort:U,fastMode:Z,model:w,phase:C,quickReplies:L,skills:H,uploadBusy:K,t:k,onApprovalModeChange:ae,onCancelQueuedTurn:P,onDraftChange:Ne,onEffortChange:me,onFastModeChange:te,onModelChange:q,onRefreshSkills:ie,onRemoveAttachment:Ee,onSubmit:be,onUploadFiles:ue}){const ge=b.useRef(null),He=b.useRef(null),[Jt,J]=b.useState(!1),[ye,Et]=b.useState(!1),[ft,Ue]=b.useState(!1),[E,B]=b.useState(""),W=C==="connected",re=b.useMemo(()=>zr(g),[g]),Se=re?`${re.start}:${re.end}:${re.keyword}`:"",S=!!(ft||re&&E!==Se),D=b.useMemo(()=>hg(H,re?.keyword??"",8),[re?.keyword,H]),G=f.find(V=>V.value===w)?.label??(w||"Default"),ne=km.find(V=>V.value===r)?.label??r,X=qm.find(V=>V.value===U)?.label??U,ee=f.map(V=>({value:V.value,label:V.label,description:V.desc,icon:Ar}));ee.some(V=>V.value==="")||ee.unshift({value:"",label:"Default",description:"Use daemon default model",icon:Ar}),b.useEffect(()=>{re||(B(""),Ue(!1))},[re]);const $e=async(V,Ze)=>{await ue(V),Ze.value=""},Oe=async V=>{V.preventDefault(),J(!1),W&&await ue(V.dataTransfer.files)},qt=async V=>{!W||!V.clipboardData.files.length||await ue(V.clipboardData.files)},_e=()=>{Se&&B(Se),Ue(!1),He.current?.focus()},nn=()=>{if(S){_e();return}if(ie(),B(""),!zr(g)){const V=g.length===0||/\s$/.test(g)?"":" ";Ne(`${g}${V}$`)}Ue(!0),He.current?.focus()},ln=V=>{const Ze=zr(g),zt=Ze?dg(g,Ze,V.name):g.trim().length?`${g}${/\s$/.test(g)?"":" "}$${V.name} `:`$${V.name} `;Ne(zt),Ue(!1),B(""),He.current?.focus()};return c.jsxs("form",{className:`composer ${Jt?"dragging":""}`,onDragEnter:V=>{V.preventDefault(),J(!0)},onDragLeave:()=>J(!1),onDragOver:V=>V.preventDefault(),onDrop:V=>{Oe(V)},onSubmit:V=>{be(V)},children:[u.length?c.jsxs("div",{className:"composer-queue-banner",children:[c.jsx(Qr,{"aria-hidden":"true"}),c.jsxs("div",{children:[c.jsxs("strong",{children:[u.length," queued"]}),c.jsx("span",{children:u[0]?.content??"A turn is waiting for this session."})]}),c.jsxs("button",{className:"icon-text-button",disabled:p||!u[0],onClick:()=>u[0]&&P(u[0]),type:"button",children:[c.jsx(On,{"aria-hidden":"true"}),"Withdraw"]})]}):null,ye&&L.length?c.jsx("div",{className:"quick-reply-row",children:L.slice(0,6).map(V=>c.jsx("button",{onClick:()=>Ne(g?`${g}
|
|
14
|
+
${V}`:V),type:"button",children:V},V))}):null,c.jsx(mg,{visible:S,skills:D,onClose:_e,onSelect:ln,t:k}),c.jsx("textarea",{ref:He,value:g,onChange:V=>Ne(V.target.value),onPaste:V=>{qt(V)},onKeyDown:V=>{V.key==="Enter"&&(V.metaKey||V.ctrlKey)&&be()},placeholder:k.messagePlaceholder,rows:3,disabled:!W}),c.jsxs("div",{className:"composer-toolbar",children:[c.jsxs("div",{className:"composer-leading-controls",children:[c.jsx("button",{type:"button",className:"icon-button",onClick:()=>ge.current?.click(),title:k.uploadFiles,disabled:!W||K,children:c.jsx(Or,{"aria-hidden":"true"})}),L.length?c.jsx("button",{className:`icon-button ${ye?"selected":""}`,type:"button",title:ye?k.hideQuickReplies:k.showQuickReplies,onClick:()=>Et(V=>!V),children:c.jsx(C1,{"aria-hidden":"true"})}):null,c.jsx("button",{className:`icon-button ${S?"selected":""}`,type:"button",title:k.skills,onClick:nn,disabled:!W||K,children:c.jsx(Eu,{"aria-hidden":"true"})})]}),c.jsx("input",{ref:ge,type:"file",multiple:!0,hidden:!0,onChange:V=>{$e(V.currentTarget.files,V.currentTarget)}}),c.jsxs("div",{className:"composer-control-strip",children:[c.jsx(Ic,{icon:ls,label:ne,menuLabel:"Approval mode",options:km,value:r,onSelect:ae,wide:!0}),c.jsx(Ic,{icon:Ar,label:G,menuLabel:"Model",options:ee,value:w,onSelect:q,align:"right",wide:!0}),c.jsx(Ic,{icon:xl,label:X||"Effort",menuLabel:"Effort",options:qm,value:U,onSelect:me,align:"right"}),c.jsx(Ic,{icon:Eu,label:Z?"Fast":"Normal",menuLabel:"Fast mode",options:[{value:"off",label:"Normal",description:"Use standard execution",icon:xl},{value:"on",label:"Fast",description:"Prefer faster responses",icon:Eu}],value:Z?"on":"off",onSelect:V=>te(V==="on"),align:"right",selected:Z,wide:!0})]}),c.jsx("button",{type:"submit",className:"send-button",disabled:!W||p||!g.trim(),"aria-label":k.send,title:k.send,children:c.jsx(b0,{"aria-hidden":"true"})})]}),c.jsx("div",{className:"attachment-row",children:s.length?c.jsx("div",{className:"attachment-list",children:s.map(V=>c.jsxs("span",{children:[c.jsx(Jr,{"aria-hidden":"true"}),V.name||Ra(V.path),c.jsx("small",{children:cy(V.size)}),c.jsx("button",{type:"button",onClick:()=>Ee(V.path),title:k.removeAttachment,children:c.jsx(On,{"aria-hidden":"true"})})]},V.path))}):c.jsx("span",{className:"attachment-empty",children:K?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"loading-spinner small","aria-hidden":"true"}),k.uploading]}):k.noFilesAttached})})]})}function pg({cwd:u,paths:s,onClose:r,onOpenRemoteFile:f}){return s.length?c.jsxs("div",{className:"side-drawer",role:"dialog","aria-modal":"true","aria-label":"Attachment preview",children:[c.jsx("button",{className:"side-drawer-backdrop",onClick:r,type:"button","aria-label":"Close attachment preview"}),c.jsxs("aside",{className:"side-drawer-panel",children:[c.jsxs("header",{className:"side-drawer-header",children:[c.jsxs("div",{children:[c.jsx("strong",{children:"Attachments"}),c.jsxs("span",{children:[s.length," file",s.length===1?"":"s"]})]}),c.jsx("button",{className:"icon-button",onClick:r,type:"button",title:"Close",children:c.jsx(On,{"aria-hidden":"true"})})]}),c.jsx("div",{className:"stack-list",children:s.map(p=>c.jsxs("button",{className:"data-row attachment-preview-row",onClick:()=>f(p,u),type:"button",children:[c.jsx(Jr,{"aria-hidden":"true"}),c.jsxs("span",{children:[c.jsx("strong",{children:Ra(p)}),c.jsx("small",{children:p})]}),c.jsx(Vr,{"aria-hidden":"true"})]},p))})]})]}):null}function gg({message:u,onClose:s,onCopy:r}){if(!u)return null;const f=u.content;return c.jsxs("section",{className:"message-source-inline","aria-label":"Markdown source",children:[c.jsxs("header",{className:"inline-detail-header",children:[c.jsxs("div",{className:"inline-detail-title",children:[c.jsx("strong",{children:"Markdown Source"}),c.jsx("span",{children:u.type==="info"?"info":u.role})]}),c.jsxs("div",{className:"row-actions",children:[c.jsx("button",{className:"icon-button",onClick:()=>r(f),type:"button",title:"Copy Markdown source",children:c.jsx(Ai,{"aria-hidden":"true"})}),c.jsx("button",{className:"icon-button",onClick:s,type:"button",title:"Close source",children:c.jsx(On,{"aria-hidden":"true"})})]})]}),c.jsx("pre",{className:"json-box markdown-source-box",children:f})]})}function vg({field:u}){return u.isDiff?c.jsxs("div",{className:"tool-field diff",children:[c.jsx("span",{children:u.label}),u.diffOld?c.jsxs("pre",{className:"tool-diff old",children:[c.jsx("b",{children:"-"}),u.diffOld]}):null,u.diffNew?c.jsxs("pre",{className:"tool-diff new",children:[c.jsx("b",{children:"+"}),u.diffNew]}):null]}):c.jsxs("div",{className:`tool-field ${u.isCode?"code":""} ${u.isFilePath?"path":""}`,children:[c.jsx("span",{children:u.label}),c.jsx("pre",{children:u.value})]})}function bg({message:u,onCopy:s}){const r=sg(u.toolName,u.toolInput),f=Pr(u.content),p=Ir(u.content),g=cg(u.content)&&!r.length,U=u.toolName??"Tool";return c.jsxs("section",{className:"tool-detail-card",children:[c.jsxs("header",{children:[c.jsx("span",{className:"tool-detail-icon",children:c.jsx(Wr,{"aria-hidden":"true"})}),c.jsxs("div",{children:[c.jsx("strong",{children:U}),f?c.jsx("small",{title:f,children:f}):null]}),c.jsx("button",{className:"icon-button",onClick:()=>s(u.content),type:"button",title:"Copy output",children:c.jsx(Ai,{"aria-hidden":"true"})})]}),r.length?c.jsx("div",{className:"tool-fields",children:r.map((Z,w)=>c.jsx(vg,{field:Z},`${Z.label}:${w}`))}):null,g?c.jsx("pre",{className:"json-box compact",children:p}):null]})}function hy({messages:u,onClose:s,onCopy:r}){if(!u.length)return null;const p=u.filter(w=>w.role==="tool").length||u.length,g=p===1?"1 Tool Call":`${p} Tool Calls`,U=dy(u),Z=u.map(w=>w.content).join(`
|
|
15
|
+
|
|
16
|
+
`);return c.jsxs("section",{className:"tool-inline-panel","aria-label":"Tool details",children:[c.jsxs("header",{className:"inline-detail-header",children:[c.jsxs("div",{className:"inline-detail-title",children:[c.jsx("strong",{children:g}),c.jsx("span",{title:U,children:U||"tool detail"})]}),c.jsxs("div",{className:"row-actions",children:[c.jsx("button",{className:"icon-button",onClick:()=>r(Z),type:"button",title:"Copy output",children:c.jsx(Ai,{"aria-hidden":"true"})}),c.jsx("button",{className:"icon-button",onClick:s,type:"button",title:"Close tool details",children:c.jsx(On,{"aria-hidden":"true"})})]})]}),c.jsx("div",{className:"tool-detail-list",children:u.map((w,C)=>c.jsx(bg,{message:w,onCopy:r},`${w.historyKey??w.timestamp??w.toolName??"tool"}:${C}`))})]})}function Sg({activeMatch:u,baseCwd:s,message:r,onCopy:f,onCloseSource:p,onCloseTool:g,onOpenAttachment:U,onOpenRemoteFile:Z,onToggleSource:w,onToggleTool:C,sourceOpen:L,toolOpen:H}){const K=r.role==="tool"?Pr(r.content):"";return c.jsxs("article",{className:`message ${r.role} ${r.type==="info"?"info":""} ${u?"match":""}`,children:[c.jsxs("div",{className:"message-meta",children:[c.jsx("span",{children:r.type==="info"?"info":r.role}),c.jsxs("div",{className:"message-meta-side",children:[c.jsx("time",{children:as(r.timestamp)}),c.jsxs("div",{className:"message-actions","aria-label":"Message actions",role:"group",children:[c.jsx("button",{"aria-label":"Copy message",onClick:()=>f(r.content),title:"Copy message",type:"button",children:c.jsx(Ai,{"aria-hidden":"true"})}),c.jsx("button",{"aria-label":"View Markdown source","aria-expanded":L,onClick:w,title:L?"Hide Markdown source":"View Markdown source",type:"button",children:c.jsx(U0,{"aria-hidden":"true"})})]})]})]}),r.role==="tool"?c.jsxs("button",{className:"tool-inline-summary","aria-expanded":H,onClick:C,type:"button",children:[c.jsxs("span",{children:[c.jsx(O1,{"aria-hidden":"true"}),r.toolName??"Tool"]}),K?c.jsx("small",{children:K}):null]}):c.jsx("pre",{children:r.content}),r.images?.length?c.jsxs("div",{className:"message-files",children:[r.images.map(k=>c.jsxs("button",{className:"file-pill",onClick:()=>Z(k,s),title:k,type:"button",children:[c.jsx(Jr,{"aria-hidden":"true"}),Ra(k)]},k)),c.jsxs("button",{className:"file-pill",onClick:()=>U(r.images??[]),type:"button",children:[c.jsx(Q0,{"aria-hidden":"true"}),"Preview"]})]}):null,L?c.jsx(gg,{message:r,onClose:p,onCopy:f}):null,r.role==="tool"&&H?c.jsx(hy,{messages:[r],onClose:g,onCopy:f}):null]})}function xg({matchCount:u,query:s,onChange:r,onNext:f}){return c.jsxs("div",{className:"message-search-bar",children:[c.jsx(Fr,{"aria-hidden":"true"}),c.jsx("input",{value:s,onChange:p=>r(p.target.value),onKeyDown:p=>{p.key==="Enter"&&f()},placeholder:"Search this session"}),c.jsx("span",{children:s.trim()?`${u} match${u===1?"":"es"}`:"all messages"}),s?c.jsx("button",{"aria-label":"Clear message search",className:"icon-button mini-button",onClick:()=>r(""),type:"button",children:c.jsx(On,{"aria-hidden":"true"})}):null]})}function jg({activeMatch:u,expanded:s,messages:r,onToggle:f}){const p=r.filter(Z=>Z.role==="tool").length||r.length,g=dy(r),U=p===1?"1 tool call":`${p} tool calls`;return c.jsxs("button",{className:`tool-group-bubble ${u?"match":""} ${s?"expanded":""}`,type:"button",onClick:f,"aria-expanded":s,"aria-label":g?`${U}: ${g}`:U,children:[c.jsxs("span",{className:"tool-group-header",children:[c.jsxs("span",{className:"tool-group-title",children:[c.jsx(Wr,{"aria-hidden":"true"}),c.jsx("strong",{children:U})]}),c.jsx(E0,{className:"tool-group-chevron","aria-hidden":"true"})]}),g?c.jsx("span",{className:"tool-group-summary",children:g}):null]})}function Ng({activeSession:u,activeUsage:s,messages:r,renameTitle:f,busy:p,onBrowseFiles:g,onClose:U,onExport:Z,onJumpToMessage:w,onRename:C,onRenameTitleChange:L,onToggleArchived:H,onTogglePinned:K,onViewChanges:k}){const[ae,P]=b.useState(""),Ne=b.useMemo(()=>ry(u),[u]),me=b.useMemo(()=>{const q=ae.trim().toLowerCase();return q?r.map((ie,Ee)=>({message:ie,index:Ee})).filter(({message:ie})=>ie.role!=="user"&&ie.role!=="assistant"?!1:ie.content.toLowerCase().includes(q)).slice(0,20):[]},[r,ae]),te=q=>{q.preventDefault(),C()};return c.jsxs("div",{className:"session-detail-drawer",role:"dialog","aria-label":"Session details",children:[c.jsx("div",{className:"drawer-backdrop",onClick:U,"aria-hidden":"true"}),c.jsxs("aside",{className:"session-detail-panel",children:[c.jsxs("header",{className:"drawer-header",children:[c.jsxs("div",{children:[c.jsx("span",{className:"eyebrow",children:u.agent}),c.jsx("strong",{title:Gn(u),children:Gn(u)})]}),c.jsx("button",{className:"icon-button",type:"button",onClick:U,"aria-label":"Close session details",children:c.jsx(On,{"aria-hidden":"true"})})]}),c.jsxs("form",{className:"detail-title-form",onSubmit:te,children:[c.jsx("input",{value:f,onChange:q=>L(q.target.value),placeholder:Gn(u)}),c.jsx("button",{className:"primary-button",disabled:p,type:"submit",children:"Rename"})]}),c.jsxs("div",{className:"detail-info-grid",children:[c.jsxs("div",{children:[c.jsx(es,{"aria-hidden":"true"}),c.jsx("span",{children:"Working directory"}),c.jsx("strong",{title:u.cwd,children:u.cwd})]}),c.jsxs("div",{children:[c.jsx(c1,{"aria-hidden":"true"}),c.jsx("span",{children:"Messages"}),c.jsx("strong",{children:r.filter(q=>q.role==="user"||q.role==="assistant").length})]}),c.jsxs("div",{children:[c.jsx(I0,{"aria-hidden":"true"}),c.jsx("span",{children:"Session"}),c.jsx("strong",{title:u.sessionId,children:u.sessionId})]}),c.jsxs("div",{children:[c.jsx(Wr,{"aria-hidden":"true"}),c.jsx("span",{children:"Runtime"}),c.jsx("strong",{children:u.runtime.state})]})]}),u.branch||u.diffStat?c.jsxs("button",{className:"detail-command-card",type:"button",onClick:k,children:[c.jsx(ty,{"aria-hidden":"true"}),c.jsxs("span",{children:[u.branch??"Changes",u.diffStat?` · +${u.diffStat.additions} -${u.diffStat.deletions}`:""]})]}):null,c.jsxs("label",{className:"detail-search",children:[c.jsx(Fr,{"aria-hidden":"true"}),c.jsx("input",{value:ae,onChange:q=>P(q.target.value),placeholder:"Search messages"}),ae.trim()?c.jsxs("small",{children:[me.length||"No"," results"]}):null]}),ae.trim()&&me.length?c.jsx("div",{className:"detail-search-results",children:me.map(({message:q,index:ie})=>c.jsxs("button",{type:"button",onClick:()=>{w(ie,ae),U()},children:[c.jsx("span",{children:q.role}),c.jsx("strong",{children:q.content})]},`${q.historyKey??q.timestamp??ie}:${ie}`))}):null,ae.trim()?null:c.jsxs(c.Fragment,{children:[c.jsxs("button",{className:"detail-command-card",type:"button",onClick:g,children:[c.jsx(es,{"aria-hidden":"true"}),c.jsx("span",{children:"Browse files"})]}),c.jsxs("button",{className:"detail-command-card",type:"button",onClick:()=>{navigator.clipboard?.writeText(Ne)},children:[c.jsx(O0,{"aria-hidden":"true"}),c.jsx("span",{title:Ne,children:Ne})]}),c.jsxs("div",{className:"detail-action-grid",children:[c.jsxs("button",{className:"icon-text-button",disabled:p,type:"button",onClick:K,children:[c.jsx($r,{"aria-hidden":"true"}),u.pinned?"Unpin":"Pin"]}),c.jsxs("button",{className:"icon-text-button",disabled:p,type:"button",onClick:H,children:[c.jsx(Gr,{"aria-hidden":"true"}),u.archived?"Unarchive":"Archive"]}),c.jsxs("button",{className:"icon-text-button",type:"button",onClick:Z,children:[c.jsx(Mu,{"aria-hidden":"true"}),"Export"]})]}),s?c.jsxs("p",{className:"detail-usage",children:["Usage: ",s.limits?.fiveHour?.usedPercent??"-","% 5h ·"," ",s.limits?.weekly?.usedPercent??"-","% weekly"]}):null,c.jsxs("p",{className:"detail-usage",children:["Created ",as(u.createdAt)]})]})]})]})}function my(u,s){return`${u.historyKey??u.timestamp??u.toolName??u.content.slice(0,24)??"message"}:${s}`}function Ag(u){const s=[];for(let r=0;r<u.length;r+=1){const f=u[r];if(!Um(f)){s.push({type:"message",index:r,message:f});continue}const p=[];let g=r;for(;g<u.length&&Um(u[g]);)p.push({index:g,message:u[g]}),g+=1;s.push({type:"toolGroup",entries:p,id:`tool-group:${p.map(({index:U,message:Z})=>my(Z,U)).join("|")}`}),r=g-1}return s}function Tg({activeSession:u,activeSessionId:s,activeModelOptions:r,activeQueue:f,activeUsage:p,agent:g,approvalMode:U,attachments:Z,busy:w,cwd:C,draft:L,effort:H,errorText:K,fastMode:k,historyLoading:ae,messages:P,model:Ne,phase:me,quickReplies:te,renameTitle:q,respondingSessionIds:ie,skills:Ee,uploadBusy:be,detailsOpen:ue,t:ge,onApprovalModeChange:He,onBrowseFiles:Jt,onCancelQueuedTurn:J,onClearInterrupt:ye,onDraftChange:Et,onDetailsOpenChange:ft,onEffortChange:Ue,onExportActiveSession:E,onFastModeChange:B,onModelChange:W,onOpenRemoteFile:re,onRefreshSessions:Se,onRefreshSkills:S,onRenameSession:D,onRenameTitleChange:Y,onRemoveAttachment:G,onRestoreSnapshot:ne,onSubmit:X,onToggleArchived:ee,onTogglePinned:$e,onUploadFiles:Oe,onViewChanges:qt}){const[_e,nn]=b.useState(""),[ln,V]=b.useState(0),[Ze,zt]=b.useState(null),[$,Be]=b.useState(null),[ze,ct]=b.useState(!1),[yn,ka]=b.useState([]),an=b.useRef(null),Ce=b.useRef([]),tl=b.useRef(null),Ke=b.useRef(null),wn=b.useRef(0),pn=b.useMemo(()=>Ag(P),[P]),Gt=b.useMemo(()=>{const se=_e.trim().toLowerCase();return se?P.map((Le,yt)=>({index:yt,message:Le})).filter(({message:Le})=>Le.content.toLowerCase().includes(se)):[]},[_e,P]),jl=se=>{navigator.clipboard?.writeText(se).catch(()=>{})},zu=()=>{if(!Gt.length)return;const se=ln%Gt.length,Le=Gt[se]?.index;typeof Le=="number"&&Ce.current[Le]?.scrollIntoView({behavior:"smooth",block:"center"}),V(yt=>(yt+1)%Gt.length)},Ht=b.useCallback(()=>{const se=an.current;se&&(se.scrollTop=se.scrollHeight,ct(!1))},[]),Qn=b.useCallback((se="smooth")=>{const Le=an.current;Le&&(Le.scrollTo({top:Le.scrollHeight,behavior:se}),ct(!1))},[]),it=()=>{const se=an.current;if(!se)return;const Le=se.scrollHeight-se.scrollTop-se.clientHeight;ct(Le>180)},un=b.useMemo(()=>{const se=P.at(-1);return se?`${P.length}:${se.historyKey??""}:${se.timestamp??""}:${se.content.length}`:"0"},[P]);b.useLayoutEffect(()=>{tl.current!==s&&(tl.current=s,Ke.current=s,wn.current=0,zt(null),Be(null));const se=wn.current===0&&P.length>0;wn.current=P.length;const Le=an.current;if(!Le)return;if(se||Ke.current===s&&(!ae||P.length>0)){Ht();const Qt=requestAnimationFrame(Ht),ll=window.setTimeout(Ht,120),pt=window.setTimeout(Ht,360);return Ke.current=null,ct(!1),()=>{cancelAnimationFrame(Qt),window.clearTimeout(ll),window.clearTimeout(pt)}}Le.scrollHeight-Le.scrollTop-Le.clientHeight<240&&Ht()},[s,ae,un,P.length,me,Ht]);const lt=Gt.length&&_e.trim()?Gt[(ln+Gt.length-1)%Gt.length]?.index:void 0,oa=u?Gn(u):"New session",nl=u?.cwd??(C.trim()&&C.trim()!=="."?C:""),Nl=u?.agent??g,Vn=Nl==="codex"?"Codex":"Claude";return c.jsxs("section",{className:"chat-pane","aria-label":"Chat",children:[c.jsxs("header",{className:"chat-header",children:[c.jsxs("button",{className:"chat-title-block chat-title-button",type:"button",onClick:()=>u&&ft(!0),children:[c.jsx("span",{className:`agent-status-pill ${Nl}`,children:Vn}),c.jsx("h1",{title:oa,children:oa}),nl?c.jsx("p",{title:nl,children:nl}):null,u?.branch||u?.diffStat?c.jsxs("div",{className:"header-metadata",children:[u.branch?c.jsx("span",{children:u.branch}):null,u.diffStat?c.jsxs("span",{children:["+",u.diffStat.additions," -",u.diffStat.deletions]}):null,u.runtime.state?c.jsx("span",{children:u.runtime.state}):null,u.terminal?.mode?c.jsx("span",{children:u.terminal.mode}):null]}):null]}),c.jsxs("div",{className:"header-actions",children:[c.jsx("button",{type:"button",className:"icon-button",onClick:()=>u&&qt(u.sessionId),title:ge.viewChanges,disabled:!u,children:c.jsx(ty,{"aria-hidden":"true"})}),c.jsx("button",{type:"button",className:`icon-button ${u?.pinned?"selected":""}`,onClick:$e,title:u?.pinned?ge.unpin:ge.pin,disabled:!u||w,children:c.jsx($r,{"aria-hidden":"true"})}),c.jsx("button",{type:"button",className:`icon-button ${u?.archived?"selected":""}`,onClick:ee,title:u?.archived?ge.unarchive:ge.archive,disabled:!u||w,children:c.jsx(Gr,{"aria-hidden":"true"})}),c.jsx("button",{type:"button",className:"icon-button",onClick:ne,title:ge.restoreSnapshot,children:c.jsx(p1,{"aria-hidden":"true"})}),c.jsx("button",{type:"button",className:"icon-button",onClick:Se,title:ge.refreshSessions,children:c.jsx(ns,{"aria-hidden":"true"})})]})]}),c.jsxs("div",{className:"chat-notices","aria-live":"polite",children:[K?c.jsxs("div",{className:"notice error",children:[c.jsx(On,{"aria-hidden":"true"}),c.jsx("span",{children:K})]}):null,u?.interruptReason?c.jsxs("div",{className:"notice warning",children:[c.jsx(Eu,{"aria-hidden":"true"}),c.jsx("span",{children:u.interruptReason.humanText||u.interruptReason.kind}),c.jsx("button",{className:"icon-text-button",disabled:w,onClick:ye,type:"button",children:ge.clear})]}):null,u?.stallWarning?c.jsxs("div",{className:"notice warning",children:[c.jsx(Qr,{"aria-hidden":"true"}),c.jsx("span",{children:u.stallWarning.humanText||"Agent may be stalled"})]}):null]}),me==="missing-pair"?c.jsxs("div",{className:"empty-state",children:[c.jsx(Kr,{"aria-hidden":"true"}),c.jsx("h2",{children:ge.openDaemonWebLink}),c.jsx("p",{children:ge.openDaemonWebLinkHint}),c.jsx("code",{children:"vibelet --access=quick"})]}):c.jsxs("div",{className:"message-scroll",ref:an,onScroll:it,children:[c.jsx(xg,{matchCount:Gt.length,query:_e,onChange:se=>{nn(se),V(0)},onNext:zu}),ae&&P.length===0?c.jsxs("div",{className:"loading-line",children:[c.jsx("span",{className:"loading-spinner","aria-hidden":"true"}),ge.loadingHistory]}):null,!ae&&P.length===0?c.jsxs("div",{className:"empty-state compact",children:[c.jsx(ls,{"aria-hidden":"true"}),c.jsx("h2",{children:u?ge.noVisibleMessages:ge.startDaemonSession}),c.jsx("p",{children:ge.emptyChatHint})]}):null,pn.map(se=>{if(se.type==="toolGroup"){const pt=se.entries.map(gt=>gt.message),Al=se.entries.some(gt=>lt===gt.index),Rn=$===se.id;return c.jsx("div",{className:"message-frame tool info",ref:gt=>{for(const qa of se.entries)Ce.current[qa.index]=gt},children:c.jsxs("div",{className:"inline-message-stack",children:[c.jsx(jg,{activeMatch:Al,expanded:Rn,messages:pt,onToggle:()=>Be(gt=>gt===se.id?null:se.id)}),Rn?c.jsx(hy,{messages:pt,onClose:()=>Be(null),onCopy:jl}):null]})},se.id)}const{index:Le,message:yt}=se,Bt=my(yt,Le),Qt=Ze===Bt,ll=$===Bt;return c.jsx("div",{className:`message-frame ${yt.role} ${yt.type==="info"?"info":""}`,ref:pt=>{Ce.current[Le]=pt},children:c.jsx(Sg,{activeMatch:lt===Le,baseCwd:u?.cwd,message:yt,onCopy:jl,onCloseSource:()=>zt(null),onCloseTool:()=>Be(null),onOpenAttachment:ka,onOpenRemoteFile:re,onToggleSource:()=>zt(pt=>pt===Bt?null:Bt),onToggleTool:()=>Be(pt=>pt===Bt?null:Bt),sourceOpen:Qt,toolOpen:ll})},Bt)}),s&&ie.has(s)?c.jsxs("div",{className:"typing-line",children:[c.jsx("span",{}),ge.agentResponding]}):null,ze?c.jsx("button",{className:"scroll-latest-button",type:"button","aria-label":ge.scrollToLatest,title:ge.scrollToLatest,onClick:()=>Qn(),children:c.jsx(g0,{"aria-hidden":"true"})}):null]}),me!=="missing-pair"?c.jsx(yg,{activeModelOptions:r,activeQueue:f,approvalMode:U,attachments:Z,busy:w,draft:L,effort:H,fastMode:k,model:Ne,phase:me,quickReplies:te,skills:Ee,uploadBusy:be,onApprovalModeChange:He,onCancelQueuedTurn:J,onDraftChange:Et,onEffortChange:Ue,onFastModeChange:B,onModelChange:W,onRemoveAttachment:G,onRefreshSkills:S,onSubmit:X,onUploadFiles:Oe,t:ge}):null,ue&&u?c.jsx(Ng,{activeSession:u,activeUsage:p,busy:w,messages:P,renameTitle:q,onBrowseFiles:()=>{ft(!1),Jt()},onClose:()=>ft(!1),onExport:E,onJumpToMessage:(se,Le)=>{nn(Le),V(0),Ce.current[se]?.scrollIntoView({behavior:"smooth",block:"center"})},onRename:D,onRenameTitleChange:Y,onToggleArchived:ee,onTogglePinned:$e,onViewChanges:()=>qt(u.sessionId)}):null,c.jsx(pg,{cwd:u?.cwd,paths:yn,onClose:()=>ka([]),onOpenRemoteFile:re})]})}const Eg=[{tab:"session",label:"Session controls",Icon:ly},{tab:"files",label:"Files",Icon:es},{tab:"admin",label:"Settings",Icon:x1}];function Cg({value:u,onChange:s}){return c.jsx("div",{className:"control-tabs",children:Eg.map(({tab:r,label:f,Icon:p})=>c.jsx("button",{className:u===r?"selected":"",onClick:()=>s(r),title:f,type:"button",children:c.jsx(p,{"aria-hidden":"true"})},r))})}function Mg({cwd:u,entries:s,error:r,loaded:f,loading:p,path:g,onPathChange:U,onListDirectory:Z,onOpenRemoteFile:w}){return c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Path"}),c.jsxs("div",{className:"field-row",children:[c.jsx("input",{value:g,onChange:C=>U(C.target.value)}),c.jsx("button",{className:"icon-button",onClick:()=>Z(),type:"button",children:p?c.jsx(i1,{"aria-hidden":"true"}):c.jsx(ns,{"aria-hidden":"true"})})]})]}),r?c.jsx("p",{className:"empty-copy",children:r}):null,p?c.jsx("p",{className:"empty-copy",children:"Loading files..."}):null,c.jsxs("div",{className:"file-list tree-list",children:[wm(g)?c.jsxs("button",{onClick:()=>Z(wm(g)??g),type:"button",children:[c.jsx(es,{"aria-hidden":"true"}),".."]}):null,s.map(C=>{const L=oy(g,C.name);return c.jsxs("button",{onClick:()=>C.isDirectory?Z(L):w(L,u),type:"button",children:[C.isDirectory?c.jsx(Zr,{"aria-hidden":"true"}):c.jsx(Xr,{"aria-hidden":"true"}),C.name]},`${C.name}:${C.isDirectory}`)})]}),f&&!p&&!r&&s.length===0?c.jsx("p",{className:"empty-copy",children:"No files in this directory."}):null]})}function _g({file:u,mode:s,onModeChange:r,onTextChange:f}){return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"segmented editor-mode-tabs",children:[c.jsx("button",{className:s==="edit"?"selected":"",onClick:()=>r("edit"),type:"button",children:"Editor"}),c.jsx("button",{className:s==="source"?"selected":"",onClick:()=>r("source"),type:"button",children:"Source"})]}),s==="edit"?c.jsx("textarea",{className:"remote-editor",value:u.text,onChange:p=>f(p.target.value),rows:14}):c.jsx("pre",{className:"json-box source-viewer",children:u.text})]})}function zg({busy:u,cwd:s,directory:r,newDirName:f,remoteFileMode:p,remoteFile:g,remoteFileConflict:U,onCreateDirectory:Z,onDirectoryPathChange:w,onDownloadRemoteFile:C,onListDirectory:L,onNewDirNameChange:H,onOpenRemoteFile:K,onRemoteFileModeChange:k,onRemoteFileTextChange:ae,onSaveRemoteFile:P}){return c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"control-section",children:[c.jsx("h2",{children:"File Tree"}),c.jsx(Mg,{cwd:s,entries:r.entries,error:r.error,loaded:r.loaded,loading:r.loading,path:r.path,onListDirectory:L,onOpenRemoteFile:K,onPathChange:w}),c.jsxs("div",{className:"field-row",children:[c.jsx("input",{value:f,onChange:Ne=>H(Ne.target.value),placeholder:"New folder"}),c.jsxs("button",{className:"icon-text-button",onClick:Z,type:"button",disabled:!f.trim(),children:[c.jsx(Zr,{"aria-hidden":"true"}),"Create"]})]})]}),c.jsxs("section",{className:"control-section remote-file-section",children:[c.jsx("h2",{children:"Remote File"}),g?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"file-title",children:[g.kind==="image"?c.jsx(e1,{"aria-hidden":"true"}):c.jsx(Xr,{"aria-hidden":"true"}),c.jsxs("div",{children:[c.jsx("strong",{children:Ra(g.path)}),c.jsxs("span",{children:[g.contentType," · ",cy(g.size)]})]})]}),c.jsxs("div",{className:"attention-actions",children:[c.jsxs("button",{className:"icon-text-button",onClick:C,type:"button",children:[c.jsx(Mu,{"aria-hidden":"true"}),"Download"]}),c.jsxs("button",{className:"icon-text-button",onClick:()=>navigator.clipboard?.writeText(g.path),type:"button",children:[c.jsx(Ai,{"aria-hidden":"true"}),"Copy path"]})]}),g.kind==="text"?c.jsxs(c.Fragment,{children:[c.jsx(_g,{file:g,mode:p,onModeChange:k,onTextChange:ae}),c.jsxs("button",{className:"primary-button full-width",disabled:!g.dirty||u,onClick:()=>P(),type:"button",children:[c.jsx(v1,{"aria-hidden":"true"}),"Save file"]}),U?c.jsxs("div",{className:"notice warning inline-notice",children:[c.jsx(Qr,{"aria-hidden":"true"}),c.jsx("span",{children:fy(g.path)}),c.jsx("button",{className:"danger-button",disabled:u,onClick:()=>Ni(`Overwrite ${Ra(g.path)}?`)&&P({force:!0}),type:"button",children:"Force save"})]}):null]}):g.kind==="image"&&g.objectUrl?c.jsx("img",{className:"remote-image",src:g.objectUrl,alt:Ra(g.path)}):c.jsx("p",{className:"empty-copy",children:"Binary preview is not available. Use download to inspect this file."})]}):c.jsx("p",{className:"empty-copy",children:"Select an attachment or a file from the directory browser."})]})]})}function Dg({activeApproval:u,activeQuestion:s,busy:r,questionAnswers:f,t:p,onCancelQuestion:g,onQuestionChoice:U,onRespondApproval:Z,onRespondQuestion:w}){const C=!!(u||s);return c.jsxs(c.Fragment,{children:[C?null:c.jsxs("section",{className:"control-section",children:[c.jsx("h2",{children:p.pendingActions}),c.jsx("p",{className:"empty-copy",children:p.noPendingActions})]}),u?c.jsxs("section",{className:"attention-panel",children:[c.jsxs("div",{className:"attention-head",children:[c.jsx(ls,{"aria-hidden":"true"}),c.jsxs("div",{children:[c.jsx("h2",{children:p.approvalRequired}),c.jsx("p",{children:u.toolName})]})]}),c.jsx("p",{children:u.description}),c.jsx("pre",{children:sy(u.input)}),c.jsxs("div",{className:"attention-actions",children:[c.jsxs("button",{type:"button",className:"danger-button",onClick:()=>Z(!1),disabled:r,children:[c.jsx(On,{"aria-hidden":"true"}),p.deny]}),c.jsxs("button",{type:"button",className:"approve-button",onClick:()=>Z(!0),disabled:r,children:[c.jsx(Cu,{"aria-hidden":"true"}),p.approve]})]})]}):null,s?c.jsxs("section",{className:"attention-panel",children:[c.jsxs("div",{className:"attention-head",children:[c.jsx(Kr,{"aria-hidden":"true"}),c.jsxs("div",{children:[c.jsx("h2",{children:p.inputNeeded}),c.jsxs("p",{children:[s.questions.length," question",s.questions.length>1?"s":""]})]})]}),s.questions.map(L=>c.jsxs("div",{className:"question-block",children:[c.jsx("strong",{children:L.question}),c.jsx("div",{className:"choice-list",children:L.options.map(H=>{const K=(f[L.id]??[]).includes(H.label);return c.jsxs("button",{className:K?"selected":"",onClick:()=>U(L.id,H.label,L.multiSelect),type:"button",children:[c.jsx("span",{children:H.label}),H.description?c.jsx("small",{children:H.description}):null]},H.label)})})]},L.id)),c.jsxs("div",{className:"attention-actions",children:[c.jsxs("button",{type:"button",className:"danger-button",onClick:g,disabled:r,children:[c.jsx(On,{"aria-hidden":"true"}),p.cancel]}),c.jsxs("button",{type:"button",className:"approve-button",onClick:w,disabled:r,children:[c.jsx(Cu,{"aria-hidden":"true"}),p.submit]})]})]}):null]})}function Hm({session:u,active:s,responding:r,onSelect:f,onContextMenu:p,onViewChanges:g}){const U=!!u.diffStat&&(u.diffStat.additions>0||u.diffStat.deletions>0),Z=Gn(u);return c.jsxs("button",{className:`session-row ${s?"active":""} ${u.archived?"archived":""}`,onContextMenu:p,onClick:f,title:Z,type:"button",children:[c.jsxs("span",{className:"session-row-head",children:[c.jsx("strong",{children:Z}),r?c.jsx(z0,{"aria-label":"Responding"}):null]}),c.jsx("span",{children:u.cwd}),c.jsxs("small",{children:[u.agent," · ",as(u.lastActivityAt),u.branch?` · ${u.branch}`:"",u.diffStat&&!g?` · +${u.diffStat.additions}/-${u.diffStat.deletions}`:"",u.pinned?" · pinned":"",u.archived?" · archived":""]}),U&&g&&u.diffStat?c.jsxs("span",{className:"session-diff-badge",role:"button",tabIndex:0,title:"View changes",onClick:w=>{w.stopPropagation(),g()},onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),w.stopPropagation(),g())},children:[c.jsxs("span",{className:"diff-add",children:["+",u.diffStat.additions]}),c.jsxs("span",{className:"diff-del",children:["-",u.diffStat.deletions]})]}):null]})}function yy({ariaLabel:u,options:s,value:r,disabled:f,onChange:p}){return c.jsx("div",{className:"chip-group",role:"radiogroup","aria-label":u,children:s.map(g=>c.jsx("button",{"aria-checked":r===g.value,className:r===g.value?"selected":"",disabled:f,onClick:()=>p(g.value),role:"radio",title:g.title??g.label,type:"button",children:g.label},g.value))})}function Og({agentFilter:u,t:s,onAgentFilterChange:r}){return c.jsxs("div",{className:"session-filter-panel",children:[c.jsx("span",{className:"filter-section-label",children:s.agentFilterLabel}),c.jsx(yy,{ariaLabel:s.agentFilterLabel,value:u,options:[{value:"all",label:s.agentFilterAll},{value:"claude",label:s.agentFilterClaude},{value:"codex",label:s.agentFilterCodex}],onChange:r})]})}function wg({activeSessionId:u,busy:s,collapsedFolders:r,displayName:f,folderCounts:p,groupFolders:g,groupedSessions:U,hideArchived:Z,inventoryVersion:w,nextCursor:C,phase:L,pendingSessionIds:H,respondingSessionIds:K,search:k,sessionAgentFilter:ae,sessionsCount:P,sinceFilter:Ne,statusText:me,t:te,visibleSessions:q,onLoadMore:ie,onCopyResumeCommand:Ee,onCreateSession:be,onDeleteSession:ue,onOpenSessionDetails:ge,onNewInFolder:He,onResetFilters:Jt,onSearchChange:J,onSearchCommit:ye,onSelectSession:Et,onToggleSessionArchived:ft,onToggleSessionPinned:Ue,onSessionAgentFilterChange:E,onSinceFilterChange:B,onToggleFolder:W,onToggleGroupFolders:re,onToggleHideArchived:Se,onViewChanges:S}){const[D,Y]=b.useState(!1),[G,ne]=b.useState(null),[X,ee]=b.useState(null),$e=b.useRef(null),Oe=ae!=="all"||Ne!=="30d"||g||Z,qt=!!(C?.lastActivityAt&&C.sessionId),_e=G?!!H?.has(G.session.sessionId):!1;b.useEffect(()=>{if(!D&&!G&&!X)return;const $=ze=>{const ct=ze.target;ct instanceof Node&&$e.current?.contains(ct)||(Y(!1),ne(null),ee(null))},Be=ze=>{ze.key==="Escape"&&(Y(!1),ne(null),ee(null))};return document.addEventListener("pointerdown",$),document.addEventListener("keydown",Be),()=>{document.removeEventListener("pointerdown",$),document.removeEventListener("keydown",Be)}},[G,X,D]);const nn=($,Be)=>{const ze=$.currentTarget.getBoundingClientRect(),ct=192,yn=114;ne(null),ee({...Be?{folder:Be}:{},x:Math.min(ze.right-ct,window.innerWidth-ct-10),y:Math.min(ze.bottom+8,window.innerHeight-yn-10)})},ln=($,Be)=>{$.preventDefault();const ze=224,ct=306;ee(null),ne({session:Be,x:Math.min($.clientX,window.innerWidth-ze-10),y:Math.min($.clientY,window.innerHeight-ct-10)})},V=()=>ne(null),Ze=$=>{if(!G)return;const{session:Be}=G;V(),$(Be)},zt=$=>{if(!X)return;const{folder:Be}=X;if(ee(null),Be){He(Be,$);return}be($)};return c.jsxs("aside",{className:"session-rail","aria-label":"Sessions",children:[c.jsxs("div",{className:"brand-block",children:[c.jsx("div",{className:"brand-mark",children:c.jsx(zm,{"aria-hidden":"true"})}),c.jsxs("div",{children:[c.jsx("strong",{children:"Vibelet Web"}),c.jsx("span",{children:f??"Daemon workspace"})]})]}),c.jsxs("div",{className:`connection-strip ${L}`,children:[c.jsx(ny,{"aria-hidden":"true"}),c.jsxs("div",{children:[c.jsx("strong",{children:me}),c.jsx("span",{children:L==="connected"?`${q.length}/${P} sessions · v${w??"-"}`:te.sameOriginAccess})]})]}),c.jsxs("div",{className:"rail-list-heading",children:[c.jsx("span",{children:te.sessions}),c.jsx("button",{"aria-label":te.newSession,className:"rail-create-button",disabled:s||L!=="connected",onClick:$=>nn($),title:te.newSession,type:"button",children:c.jsx(Or,{"aria-hidden":"true"})})]}),c.jsxs("div",{className:"search-filter-wrap",ref:$e,children:[c.jsxs("div",{className:"search-box",children:[c.jsx(Fr,{"aria-hidden":"true"}),c.jsx("input",{value:k,onBlur:ye,onChange:$=>J($.target.value),onKeyDown:$=>{$.key==="Enter"&&ye()},placeholder:te.searchSessions}),c.jsx("button",{"aria-expanded":D,"aria-label":te.sessionFilters,className:`filter-toggle ${D||Oe?"selected":""}`,onClick:()=>Y($=>!$),title:te.sessionFilters,type:"button",children:c.jsx(J0,{"aria-hidden":"true"})})]}),D?c.jsxs("div",{className:"filter-popover",role:"dialog","aria-label":te.sessionFilters,children:[c.jsx(Og,{agentFilter:ae,t:te,onAgentFilterChange:E}),c.jsxs("div",{className:"filter-section",children:[c.jsx("span",{className:"filter-section-label",children:te.searchTimeRangeLabel}),c.jsx("div",{className:"rail-filters",role:"group","aria-label":te.searchTimeRangeLabel,children:["all","7d","30d","90d"].map($=>c.jsx("button",{className:Ne===$?"selected":"",onClick:()=>B($),type:"button",children:$==="all"?te.searchTimeRangeAllTime:$==="7d"?te.searchTimeRangeLast7Days:$==="30d"?te.searchTimeRangeLast30Days:te.searchTimeRangeLast90Days},$))})]}),c.jsxs("div",{className:"filter-section",children:[c.jsx("span",{className:"filter-section-label",children:te.filterViewOptions}),c.jsxs("div",{className:"filter-switch-card",children:[c.jsxs("button",{"aria-pressed":g,className:g?"selected":"",onClick:re,type:"button",children:[c.jsx("span",{children:te.groupByFolder}),c.jsx("span",{className:"filter-switch-track","aria-hidden":"true",children:c.jsx("span",{})})]}),c.jsxs("button",{"aria-pressed":Z,className:Z?"selected":"",onClick:Se,type:"button",children:[c.jsx("span",{children:te.hideArchived}),c.jsx("span",{className:"filter-switch-track","aria-hidden":"true",children:c.jsx("span",{})})]})]})]}),Oe?c.jsx("button",{className:"filter-reset-button",onClick:Jt,type:"button",children:te.resetFilters}):null]}):null]}),c.jsxs("div",{className:"session-list",children:[g?U.map($=>{const Be=r[$.folder];return c.jsxs("div",{className:"folder-group",children:[c.jsxs("div",{className:"folder-header",children:[c.jsxs("button",{onClick:()=>W($.folder),type:"button",children:[c.jsx(Zr,{"aria-hidden":"true"}),c.jsx("span",{children:$.folder}),c.jsx("small",{children:p[$.folder]??$.sessions.length})]}),c.jsx("button",{className:"mini-button",disabled:s||L!=="connected",onClick:ze=>nn(ze,$.folder),title:te.newSession,type:"button",children:c.jsx(Or,{"aria-hidden":"true"})})]}),Be?null:$.sessions.map(ze=>c.jsx(Hm,{active:ze.sessionId===u,responding:K.has(ze.sessionId),session:ze,onContextMenu:ct=>ln(ct,ze),onSelect:()=>Et(ze.sessionId),onViewChanges:S?()=>S(ze.sessionId):void 0},ze.sessionId))]},$.folder)}):q.map($=>c.jsx(Hm,{active:$.sessionId===u,responding:K.has($.sessionId),session:$,onContextMenu:Be=>ln(Be,$),onSelect:()=>Et($.sessionId),onViewChanges:S?()=>S($.sessionId):void 0},$.sessionId)),q.length===0?c.jsx("p",{className:"empty-copy",children:te.noSessionsMatch}):null,qt&&C?c.jsxs("button",{className:"icon-text-button load-more-button",disabled:s,onClick:()=>ie(C),type:"button",children:[c.jsx(ns,{"aria-hidden":"true"}),te.loadMore]}):null]}),X?c.jsxs("div",{className:"session-create-menu",role:"menu",style:{left:X.x,top:X.y},onPointerDown:$=>$.stopPropagation(),children:[c.jsxs("button",{type:"button",role:"menuitem",onClick:()=>zt("claude"),children:[c.jsx(N0,{"aria-hidden":"true"}),c.jsxs("span",{children:[c.jsx("strong",{children:"Claude"}),c.jsx("small",{children:te.claudeSession})]})]}),c.jsxs("button",{type:"button",role:"menuitem",onClick:()=>zt("codex"),children:[c.jsx(zm,{"aria-hidden":"true"}),c.jsxs("span",{children:[c.jsx("strong",{children:"Codex"}),c.jsx("small",{children:te.codexSession})]})]})]}):null,G?c.jsxs("div",{className:"session-context-menu",role:"menu",style:{left:G.x,top:G.y},onPointerDown:$=>$.stopPropagation(),children:[c.jsxs("button",{type:"button",role:"menuitem",onClick:()=>Ze($=>Et($.sessionId)),children:[c.jsx(Vr,{"aria-hidden":"true"}),te.open]}),c.jsxs("button",{type:"button",role:"menuitem",disabled:_e,onClick:()=>Ze(ge),children:[c.jsx(n1,{"aria-hidden":"true"}),te.details]}),c.jsxs("button",{type:"button",role:"menuitem",disabled:_e,onClick:()=>Ze(Ee),children:[c.jsx(Ai,{"aria-hidden":"true"}),te.copyResumeCommand]}),c.jsxs("button",{type:"button",role:"menuitem",disabled:_e||!S||!G.session.branch&&!G.session.diffStat,onClick:()=>Ze($=>S?.($.sessionId)),children:[c.jsx(L0,{"aria-hidden":"true"}),te.viewChanges]}),c.jsx("span",{className:"context-menu-separator"}),c.jsxs("button",{type:"button",role:"menuitem",disabled:_e,onClick:()=>Ze(Ue),children:[c.jsx($r,{"aria-hidden":"true"}),G.session.pinned?te.unpin:te.pin]}),c.jsxs("button",{type:"button",role:"menuitem",disabled:_e,onClick:()=>Ze(ft),children:[c.jsx(Gr,{"aria-hidden":"true"}),G.session.archived?te.unarchive:te.archive]}),c.jsxs("button",{className:"danger",type:"button",role:"menuitem",onClick:()=>Ze(ue),children:[c.jsx(ay,{"aria-hidden":"true"}),te.delete]})]}):null]})}function Rg({pairing:u,phase:s,t:r,onForgetPairing:f}){const p=s==="connected"?"connected":u?s:r.notPaired;return c.jsxs("section",{className:"control-section compact-section",children:[c.jsx("h2",{children:r.currentDevice}),c.jsxs("dl",{children:[c.jsxs("div",{children:[c.jsx("dt",{children:r.daemon}),c.jsx("dd",{children:u?.displayName??u?.daemonId??r.notPaired})]}),c.jsxs("div",{children:[c.jsx("dt",{children:r.status}),c.jsx("dd",{children:p})]})]}),c.jsx("div",{className:"action-grid",children:c.jsxs("button",{className:"danger-button",disabled:!u,onClick:f,type:"button",children:[c.jsx(Kr,{"aria-hidden":"true"}),r.forget]})})]})}function Ug({connected:u,metadata:s,showUpdate:r,updateBusy:f,restartBusy:p,t:g,updateStatus:U,onUpdate:Z,onRestart:w}){const C=s.version&&s.latestVersion&&r?`${s.version} -> ${s.latestVersion}`:s.version||g.unknown;return c.jsxs("section",{className:"control-section compact-section",children:[c.jsx("h2",{children:g.desktopConnector}),c.jsx("dl",{children:c.jsxs("div",{children:[c.jsx("dt",{children:g.version}),c.jsx("dd",{children:s.loading?g.checking:C})]})}),c.jsxs("div",{className:"action-grid",children:[r?c.jsxs("button",{className:"primary-button",disabled:!u||f||p,onClick:Z,type:"button",children:[c.jsx(Mu,{"aria-hidden":"true"}),f?g.updating:g.update]}):null,c.jsxs("button",{className:"danger-button",disabled:!u||p,onClick:w,type:"button",children:[c.jsx(ns,{"aria-hidden":"true"}),p?g.restarting:g.restart]})]}),s.error?c.jsx("p",{className:"empty-copy",children:s.error}):null,U?c.jsx("p",{className:"empty-copy",children:U}):null]})}function kg({language:u,t:s,onLanguageChange:r}){return c.jsxs("section",{className:"control-section compact-section",children:[c.jsx("h2",{children:s.language}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:s.displayLanguage}),c.jsx(yy,{ariaLabel:s.displayLanguage,options:[{value:"system",label:s.followSystem},{value:"en",label:s.english},{value:"zh",label:s.chinese}],value:u,onChange:f=>r(f)})]})]})}function qg({notificationsBlocked:u,permission:s,settings:r,t:f,onToggleEnabled:p}){return c.jsxs("section",{className:"control-section compact-section",children:[c.jsx("h2",{children:f.notifications}),c.jsxs("label",{className:`toggle-field notification-toggle ${u?"disabled":""}`,children:[c.jsxs("span",{children:[c.jsx(x0,{"aria-hidden":"true"}),f.browserAlerts]}),c.jsx("input",{type:"checkbox",checked:r.enabled&&!u&&s==="granted",disabled:u,onChange:g=>p(g.target.checked)})]}),u?c.jsx("p",{className:"empty-copy",children:f.notificationsBlocked}):null]})}function Hg({activeDaemonId:u,busy:s,t:r,targets:f,onConnect:p,onForget:g}){return c.jsxs("section",{className:"control-section compact-section",children:[c.jsx("h2",{children:r.savedDevices}),c.jsxs("div",{className:"stack-list",children:[f.map(U=>c.jsxs("div",{className:"data-row target-row",children:[c.jsxs("div",{children:[c.jsxs("strong",{children:[U.label,U.daemonId===u?` · ${r.active}`:""]}),c.jsxs("span",{children:[U.displayName??U.daemonId," ·"," ",U.lastConnectedAt?as(U.lastConnectedAt):r.notConnectedRecently]})]}),c.jsxs("div",{className:"row-actions",children:[c.jsx("button",{"aria-label":`Connect to ${U.label}`,className:"icon-button",disabled:s,onClick:()=>p(U),type:"button",children:c.jsx(ny,{"aria-hidden":"true"})}),c.jsx("button",{"aria-label":`Forget ${U.label}`,className:"icon-button danger-icon",disabled:s,onClick:()=>g(U.daemonId),type:"button",children:c.jsx(ay,{"aria-hidden":"true"})})]})]},U.daemonId)),f.length===0?c.jsx("p",{className:"empty-copy",children:r.noSavedDevices}):null]})]})}const Bm={loading:!1,files:null,error:null};function Bg({client:u,sessionId:s,sessionTitle:r,onClose:f}){const[p,g]=b.useState("unstaged"),[U,Z]=b.useState({unstaged:Bm,staged:Bm}),[w,C]=b.useState(null),[L,H]=b.useState(null),[K,k]=b.useState(!1),[ae,P]=b.useState(null),Ne=U[p],me=b.useCallback(async q=>{Z(ie=>({...ie,[q]:{loading:!0,files:ie[q].files,error:null}}));try{const ie=await u.request({action:"session.gitDiff.list",id:u.makeId("gitDiffList"),sessionId:s,scope:q});Z(Ee=>({...Ee,[q]:{loading:!1,files:ie.files,error:null}}))}catch(ie){Z(Ee=>({...Ee,[q]:{loading:!1,files:null,error:ie instanceof Error?ie.message:String(ie)}}))}},[u,s]);b.useEffect(()=>{!U[p].files&&!U[p].loading&&!U[p].error&&me(p)},[p,U,me]),b.useEffect(()=>{C(null),H(null),P(null)},[p]),b.useEffect(()=>{if(!w){H(null),P(null);return}let q=!1;return k(!0),P(null),u.request({action:"session.gitDiff.file",id:u.makeId("gitDiffFile"),sessionId:s,scope:p,path:w}).then(ie=>{q||(H(ie),k(!1))}).catch(ie=>{q||(P(ie instanceof Error?ie.message:String(ie)),k(!1))}),()=>{q=!0}},[u,s,p,w]);const te=b.useMemo(()=>{const q=ie=>ie?ie.reduce((Ee,be)=>({adds:Ee.adds+be.additions,dels:Ee.dels+be.deletions,count:Ee.count+1}),{adds:0,dels:0,count:0}):{adds:0,dels:0,count:0};return{unstaged:q(U.unstaged.files),staged:q(U.staged.files)}},[U]);return c.jsxs("div",{className:"diff-drawer",role:"dialog","aria-label":"Git diff",children:[c.jsx("div",{className:"diff-drawer-backdrop",onClick:f,"aria-hidden":"true"}),c.jsxs("div",{className:"diff-drawer-panel",children:[c.jsxs("header",{className:"diff-drawer-header",children:[c.jsxs("div",{children:[c.jsx("strong",{children:"Changes"}),c.jsx("span",{children:r})]}),c.jsx("button",{type:"button",className:"icon-button",onClick:f,"aria-label":"Close changes",children:c.jsx(On,{"aria-hidden":"true"})})]}),c.jsx("div",{className:"diff-tabs",role:"tablist",children:["unstaged","staged"].map(q=>{const ie=te[q],Ee=p===q;return c.jsxs("button",{type:"button",role:"tab","aria-selected":Ee,className:`diff-tab ${Ee?"active":""}`,onClick:()=>g(q),children:[c.jsx("span",{className:"diff-tab-label",children:q==="unstaged"?"Working":"Staged"}),ie.count>0?c.jsxs("span",{className:"diff-tab-meta",children:[c.jsxs("span",{className:"diff-add",children:["+",ie.adds]}),c.jsxs("span",{className:"diff-del",children:["-",ie.dels]})]}):null]},q)})}),c.jsxs("div",{className:"diff-body",children:[c.jsxs("aside",{className:"diff-files","aria-label":"Changed files",children:[Ne.loading&&!Ne.files?c.jsx("p",{className:"diff-empty",children:"Loading…"}):null,Ne.error?c.jsx("p",{className:"diff-empty diff-error",children:Ne.error}):null,Ne.files&&Ne.files.length===0?c.jsx("p",{className:"diff-empty",children:"No changes."}):null,Ne.files?.map(q=>c.jsxs("button",{type:"button",className:`diff-file ${w===q.path?"active":""}`,onClick:()=>C(q.path),children:[c.jsx("span",{className:`diff-status diff-status-${q.status}`,children:q.status}),c.jsx("span",{className:"diff-file-path",title:q.path,children:q.path}),c.jsxs("span",{className:"diff-file-stats",children:[q.binary?c.jsx("span",{className:"diff-binary",children:"bin"}):null,!q.binary&&q.additions>0?c.jsxs("span",{className:"diff-add",children:["+",q.additions]}):null,!q.binary&&q.deletions>0?c.jsxs("span",{className:"diff-del",children:["-",q.deletions]}):null]})]},q.path))]}),c.jsx("section",{className:"diff-patch","aria-label":"File diff",children:w?K?c.jsx("p",{className:"diff-empty",children:"Loading patch…"}):ae?c.jsx("p",{className:"diff-empty diff-error",children:ae}):L?.binary?c.jsx("p",{className:"diff-empty",children:"Binary file — no inline diff."}):L?c.jsx(Lg,{patch:L.patch,truncated:L.truncated}):null:c.jsxs("div",{className:"diff-empty",children:[c.jsx(Xr,{"aria-hidden":"true"}),c.jsx("p",{children:"Select a file to view its diff."})]})})]})]})]})}function Lg({patch:u,truncated:s}){const r=b.useMemo(()=>u.split(`
|
|
17
|
+
`),[u]);return c.jsxs("div",{className:"diff-patch-view",children:[r.map((f,p)=>{const g=Yg(f);return c.jsx("div",{className:`diff-line ${g}`,children:c.jsx("span",{className:"diff-line-text",children:f||" "})},p)}),s?c.jsx("p",{className:"diff-empty",children:"Patch truncated — file is larger than the inline limit."}):null]})}function Yg(u){return u.startsWith("diff ")||u.startsWith("index ")||u.startsWith("---")||u.startsWith("+++")?"header":u.startsWith("@@")?"hunk":u.startsWith("+")?"add":u.startsWith("-")?"del":"ctx"}const py="pair",Ua="vibelet.web.pairing",Lm="vibelet.web.deviceId";class ts extends Error{constructor(s,r){super(r),this.code=s,this.name="PairingCreateError"}}function ef(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}function Gg(u){const s=u.replace(/-/g,"+").replace(/_/g,"/"),r=s.padEnd(Math.ceil(s.length/4)*4,"=");return decodeURIComponent(Array.from(atob(r),f=>`%${f.charCodeAt(0).toString(16).padStart(2,"0")}`).join(""))}function Qg(u){const[s,r,f,p,g,U]=u;return!r||!Number.isFinite(f)||f<=0?null:{kind:s==="relay"?"relay":"direct",host:r,port:Math.floor(f),source:p,stability:g,...U===!0?{secure:!0}:{}}}function Vg(u){if(!ef(u))return null;const{kind:s,host:r,port:f,source:p,stability:g,secure:U}=u;return s!=="direct"&&s!=="relay"||typeof r!="string"||!r.trim()||typeof f!="number"||!Number.isFinite(f)||f<=0||typeof p!="string"||typeof g!="string"?null:{kind:s,host:r.trim(),port:Math.floor(f),source:p,stability:g,...U===!0?{secure:!0}:{}}}function Xg(u){const s=u.trim().split(".");if(s.length!==4)return!1;const r=s.map(g=>/^\d+$/.test(g)?Number(g):Number.NaN);if(r.some(g=>!Number.isInteger(g)||g<0||g>255))return!1;const[f,p]=r;return f===10||f===172&&p>=16&&p<=31||f===192&&p===168}function Zg(u){const s=u.trim();return s.includes(":")&&!s.startsWith("[")?`[${s}]`:s}function Kg(u,s){return s.protocol==="https:"&&u.secure!==!0?null:`${u.secure===!0?"wss":"ws"}://${Zg(u.host)}:${u.port}`}function Ym(u){return Xg(u.host)?0:u.source==="local_network"?1:u.source==="configured_host"?2:3}function Jg(u,s){const r=s?.port??u.port,f=s?.canonicalHost??u.canonicalHost;if(!f||typeof r!="number"||!Number.isFinite(r))return[];const p=Math.floor(r);return[{kind:"direct",host:f,port:p,source:"fallback",stability:"stable"},...[...s?.fallbackHosts??[],...u.fallbackHosts??[]].map(g=>({kind:"direct",host:g,port:p,source:"fallback",stability:"stable"}))]}function $g(u,s,r=window.location){const f=[...s?.connections??[],...u.connections??[],...Jg(u,s)].map(Vg).filter(p=>!!p).filter(p=>p.kind==="direct").sort((p,g)=>Ym(p)-Ym(g));for(const p of f){const g=Kg(p,r);if(g)return g}}function Fg(u){if(!u.d||!u.c)return null;const s=Array.isArray(u.o)?u.o.map(Qg).filter(r=>!!r):void 0;return{daemonId:u.d,pairNonce:u.c,...u.n?{displayName:u.n}:{},...u.h?{canonicalHost:u.h}:{},...Number.isFinite(u.p)?{port:u.p}:{},...Array.isArray(u.f)?{fallbackHosts:u.f.filter(r=>typeof r=="string")}:{},...s?.length?{connections:s}:{},...u.e?{expiresAt:u.e}:{}}}function Wg(u){return!u.daemonId||!u.pairNonce?null:{daemonId:u.daemonId,displayName:u.displayName,canonicalHost:u.canonicalHost,fallbackHosts:u.fallbackHosts,port:u.port,connections:u.connections,pairNonce:u.pairNonce,expiresAt:u.expiresAt}}function Ig(u=window.location.hash){const s=u.startsWith("#")?u.slice(1):u,r=new URLSearchParams(s).get(py);if(!r)return null;try{const f=JSON.parse(Gg(r));if(!ef(f))return null;if(f.t==="vp")return Fg(f);if(f.type==="vibelet-pair")return Wg(f)}catch{return null}return null}function Pg(){if(!window.location.hash.includes(`${py}=`))return;const u=`${window.location.pathname}${window.location.search}`;window.history.replaceState(null,"",u)}function ev(u=window.localStorage){const s=u.getItem(Lm);if(s)return s;const r=typeof crypto.randomUUID=="function"?crypto.randomUUID():`web_${Date.now().toString(36)}_${Math.random().toString(36).slice(2)}`;return u.setItem(Lm,r),r}function Gm(u){const s=u.getItem(Ua);if(!s)return null;try{const r=JSON.parse(s);return!r.daemonId||!r.deviceId||!r.pairToken?null:{daemonId:r.daemonId,displayName:r.displayName,deviceId:r.deviceId,pairToken:r.pairToken,pairedAt:r.pairedAt??new Date().toISOString(),webSocketUrl:typeof r.webSocketUrl=="string"?r.webSocketUrl:void 0}}catch{return null}}function tf(u){if(typeof window>"u")return null;try{return u===window.localStorage?window.sessionStorage:null}catch{return null}}function tv(u=window.localStorage,s=tf(u)){const r=Gm(u);if(r)return r;const f=s?Gm(s):null;return f?(u.setItem(Ua,JSON.stringify(f)),s?.removeItem(Ua),f):null}function Qm(u,s=window.localStorage,r=tf(s)){s.setItem(Ua,JSON.stringify(u)),r?.removeItem(Ua)}function Vm(u=window.localStorage,s=tf(u)){u.removeItem(Ua),s?.removeItem(Ua)}function nv(u,s=Date.now()){if(!u.expiresAt)return!1;const r=new Date(u.expiresAt).getTime();return Number.isFinite(r)&&r<s}async function lv(u){const s=await u.text().catch(()=>"");try{const r=JSON.parse(s);if(ef(r)&&r.error==="pair_window_expired")return new ts("pair_window_expired","Pairing link expired.")}catch{}return new ts("pairing_failed",s||"Pairing failed.")}async function av(u,s=ev()){if(nv(u))throw new ts("pair_window_expired","Pairing link expired.");const r=await fetch("/pair/create",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({daemonId:u.daemonId,pairNonce:u.pairNonce,deviceId:s,deviceName:"Vibelet Web"})});if(!r.ok)throw await lv(r);const f=await r.json();return{daemonId:f.daemonId,displayName:f.displayName||u.displayName,deviceId:f.deviceId,pairToken:f.pairToken,pairedAt:new Date().toISOString(),webSocketUrl:$g(u,f)}}function Xm(u){return`${u}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,8)}`}function iv(u,s=window.location){return u?.webSocketUrl?u.webSocketUrl:`${s.protocol==="https:"?"wss:":"ws:"}//${s.host}`}class uv{socket=null;pending=new Map;messageListeners=new Set;closeListeners=new Set;async connect(s){this.disconnect();const r=new WebSocket(iv(s));this.socket=r;const f=new Promise((p,g)=>{r.onopen=()=>p(),r.onerror=()=>g(new Error("WebSocket connection failed."))});return r.onmessage=p=>this.handleSocketMessage(p.data),r.onclose=()=>{this.socket===r&&(this.socket=null),this.rejectPending(new Error("WebSocket disconnected.")),this.closeListeners.forEach(p=>p())},await f,await this.request({action:"auth.hello",id:Xm("auth"),pairToken:s.pairToken,daemonId:s.daemonId,deviceId:s.deviceId,locale:navigator.language})}request(s,r={}){return!this.socket||this.socket.readyState!==WebSocket.OPEN?Promise.reject(new Error("WebSocket is not connected.")):new Promise((f,p)=>{const g={resolve:f,reject:p};r.timeoutMs&&r.timeoutMs>0&&(g.timeoutId=setTimeout(()=>{this.pending.delete(s.id),p(new Error(r.timeoutMessage||"Request timed out."))},r.timeoutMs)),this.pending.set(s.id,g),this.socket?.send(JSON.stringify(s))})}send(s){this.socket?.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify(s))}onMessage(s){return this.messageListeners.add(s),()=>this.messageListeners.delete(s)}onClose(s){return this.closeListeners.add(s),()=>this.closeListeners.delete(s)}disconnect(){this.rejectPending(new Error("WebSocket disconnected.")),this.socket?.close(1e3,"client disconnect"),this.socket=null}get isConnected(){return this.socket?.readyState===WebSocket.OPEN}makeId(s){return Xm(s)}handleSocketMessage(s){if(typeof s!="string")return;let r;try{r=JSON.parse(s)}catch{return}if(r.type!=="pong"){if(r.type==="response"){const f=this.pending.get(r.id);if(f){this.pending.delete(r.id),f.timeoutId&&clearTimeout(f.timeoutId),r.ok?f.resolve(r.data):f.reject(new Error(r.error||"Request failed."));return}}this.messageListeners.forEach(f=>f(r))}}rejectPending(s){for(const r of this.pending.values())r.timeoutId&&clearTimeout(r.timeoutId),r.reject(s);this.pending.clear()}}function cv(){"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/web/sw.js",{scope:"/web/"}).catch(()=>{})})}function sv(u=window.location.search){const s=new URLSearchParams(u);return[s.get("title"),s.get("text"),s.get("url")].map(f=>f?.trim()).filter(f=>!!f).join(`
|
|
18
|
+
|
|
19
|
+
`)}function ov(){const u=new URL(window.location.href);let s=!1;for(const r of["title","text","url"])u.searchParams.has(r)&&(u.searchParams.delete(r),s=!0);s&&window.history.replaceState(null,"",`${u.pathname}${u.search}${u.hash}`)}const gy="vibelet.web.composerDrafts",qr={draftsBySessionId:{},newSessionDraft:""};function Zm(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}function vy(u){return Zm(u)?{draftsBySessionId:Zm(u.draftsBySessionId)?Object.fromEntries(Object.entries(u.draftsBySessionId).filter(r=>typeof r[1]=="string")):{},newSessionDraft:typeof u.newSessionDraft=="string"?u.newSessionDraft:""}:qr}function rv(u=window.localStorage){const s=u.getItem(gy);if(!s)return qr;try{return vy(JSON.parse(s))}catch{return qr}}function ju(u,s=window.localStorage){s.setItem(gy,JSON.stringify(vy(u)))}function Nu(u,s,r){if(!s)return{...u,newSessionDraft:r};const f={...u.draftsBySessionId};return r.trim()?f[s]=r:delete f[s],{...u,draftsBySessionId:f}}function Au(u,s){return s?u.draftsBySessionId[s]??"":u.newSessionDraft}function fv(u,s,r){if(!s||!r||s===r)return u;const f=u.draftsBySessionId[s];if(f===void 0)return u;const p={...u.draftsBySessionId};return delete p[s],f.trim()&&(p[r]=f),{...u,draftsBySessionId:p}}const by="vibelet.web.savedTargets",Sy=12;function dv(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}function hv(u){if(!dv(u)||typeof u.daemonId!="string"||typeof u.deviceId!="string"||typeof u.pairToken!="string"||typeof u.pairedAt!="string")return null;const s=typeof u.displayName=="string"?u.displayName:void 0,r=typeof u.label=="string"&&u.label.trim()?u.label.trim():s||u.daemonId.slice(0,10);return{daemonId:u.daemonId,deviceId:u.deviceId,pairToken:u.pairToken,pairedAt:u.pairedAt,displayName:s,webSocketUrl:typeof u.webSocketUrl=="string"?u.webSocketUrl:void 0,label:r,lastConnectedAt:typeof u.lastConnectedAt=="string"?u.lastConnectedAt:void 0}}function xy(u){if(!Array.isArray(u))return[];const s=new Set,r=[];for(const f of u){const p=hv(f);if(!(!p||s.has(p.daemonId))&&(s.add(p.daemonId),r.push(p),r.length>=Sy))break}return r}function mv(u=window.localStorage){const s=u.getItem(by);if(!s)return[];try{return xy(JSON.parse(s))}catch{return[]}}function Km(u,s=window.localStorage){s.setItem(by,JSON.stringify(xy(u)))}function yv(u,s,r=new Date().toISOString()){return[{...s,label:s.displayName||s.daemonId.slice(0,10),lastConnectedAt:r},...u.filter(p=>p.daemonId!==s.daemonId)].slice(0,Sy)}function pv(u,s){return u.filter(r=>r.daemonId!==s)}const Dr={version:"",latestVersion:"",loading:!1,error:null};function Jm(u){const s=u.match(/^\d+/);return s?Number(s[0]):0}function gv(u,s){const r=u.split(/[+-]/,1)[0].split(".").map(Jm),f=s.split(/[+-]/,1)[0].split(".").map(Jm),p=Math.max(r.length,f.length);for(let g=0;g<p;g+=1){const U=r[g]??0,Z=f[g]??0;if(U<Z)return-1;if(U>Z)return 1}return 0}function vv(u,s){return gv(u,s)<0}function bv(u){const s=u.toLowerCase();if(s.includes("alpha"))return"alpha";if(s.includes("beta"))return"beta";if(u.trim())return"latest"}function Sv(u,s,r){const f=u?.webSocketUrl?u.webSocketUrl:s.origin;try{const p=new URL(f);return p.protocol==="ws:"&&(p.protocol="http:"),p.protocol==="wss:"&&(p.protocol="https:"),p.pathname="/health",p.search="",p.hash="",p.toString()}catch{return new URL("/health",s.origin).toString()}}function xv(u){if(!u||typeof u!="object")return{version:"",latestVersion:""};const s=u;return{version:typeof s.version=="string"?s.version.trim():"",latestVersion:typeof s.latestVersion=="string"?s.latestVersion.trim():""}}function Hr(u,s=typeof navigator>"u"?"en":navigator.language){return u==="en"||u==="zh"?u:s.toLowerCase().startsWith("zh")?"zh":"en"}const jv={en:{daemonWorkspace:"Daemon workspace",sameOriginAccess:"same-origin daemon access",sessions:"Sessions",newSession:"New session",claudeSession:"Claude session",codexSession:"Codex session",searchSessions:"Search sessions",sessionFilters:"Session filters",filterViewOptions:"View options",resetFilters:"Reset filters",searchTimeRangeLabel:"Search within",searchTimeRangeLast7Days:"Last 7 days",searchTimeRangeLast30Days:"Last 30 days",searchTimeRangeLast90Days:"Last 90 days",searchTimeRangeAllTime:"All time",agentFilterLabel:"Assistant",agentFilterAll:"All assistants",agentFilterClaude:"Claude",agentFilterCodex:"Codex",groupByFolder:"Group by folder",hideArchived:"Active only",noSessionsMatch:"No sessions match this view.",loadMore:"Load more",open:"Open",details:"Details",copyResumeCommand:"Copy resume command",viewChanges:"View changes",pin:"Pin",unpin:"Unpin",archive:"Archive",unarchive:"Unarchive",delete:"Delete",connectedTo:u=>`Connected to ${u}`,connectingToDaemon:"Opening secure daemon channel",reconnectingToDaemon:"Reconnecting to daemon",connectionFailed:"Connection failed",pairingFailed:"Pairing failed",pairingLinkExpired:"This pairing link has expired. Open a fresh Vibelet Web link from the host computer.",missingPair:"Open the link printed by vibelet",pendingActions:"Pending Actions",noPendingActions:"No approvals or questions.",approvalRequired:"Approval Required",inputNeeded:"Input Needed",deny:"Deny",approve:"Approve",cancel:"Cancel",submit:"Submit",clear:"Clear",restoreSnapshot:"Restore daemon snapshot",refreshSessions:"Refresh sessions",openDaemonWebLink:"Open the daemon web link",openDaemonWebLinkHint:"Run Vibelet with remote access and open the Web UI link printed by the CLI.",loadingHistory:"Loading history",noVisibleMessages:"No visible messages yet",startDaemonSession:"Start a daemon session",emptyChatHint:"Send a prompt from this browser; the daemon keeps Claude or Codex running on the host machine.",agentResponding:"Agent is responding",scrollToLatest:"Scroll to latest",currentDevice:"Current Device",daemon:"Daemon",status:"Status",active:"active",notPaired:"not paired",forget:"Forget",notifications:"Notifications",browserAlerts:"Browser alerts",notificationsBlocked:"Notifications are blocked by this browser.",savedDevices:"Saved Devices",noSavedDevices:"No saved devices yet.",notConnectedRecently:"not connected recently",desktopConnector:"Desktop Connector",version:"Version",checking:"checking...",unknown:"unknown",update:"Update",updating:"Updating...",restart:"Restart",restarting:"Restarting...",language:"Language",displayLanguage:"Display language",followSystem:"Auto",english:"English",chinese:"中文",skills:"Skills",closeSkills:"Close skills",noSkillsFound:"No skills found.",messagePlaceholder:"Type a message or $ for skills...",uploadFiles:"Upload files",showQuickReplies:"Show quick replies",hideQuickReplies:"Hide quick replies",removeAttachment:"Remove attachment",send:"Send",uploading:"Uploading...",noFilesAttached:"No files attached"},zh:{daemonWorkspace:"Daemon 工作区",sameOriginAccess:"同源 daemon 访问",sessions:"会话",newSession:"新建会话",claudeSession:"Claude 会话",codexSession:"Codex 会话",searchSessions:"搜索会话",sessionFilters:"会话筛选",filterViewOptions:"视图选项",resetFilters:"重置筛选",searchTimeRangeLabel:"搜索范围",searchTimeRangeLast7Days:"近 7 天",searchTimeRangeLast30Days:"近 30 天",searchTimeRangeLast90Days:"近 90 天",searchTimeRangeAllTime:"全部时间",agentFilterLabel:"助手",agentFilterAll:"全部助手",agentFilterClaude:"Claude",agentFilterCodex:"Codex",groupByFolder:"按文件夹分组",hideArchived:"仅显示活跃会话",noSessionsMatch:"没有符合条件的会话。",loadMore:"加载更多",open:"打开",details:"详情",copyResumeCommand:"复制恢复命令",viewChanges:"查看变更",pin:"置顶",unpin:"取消置顶",archive:"归档",unarchive:"取消归档",delete:"删除",connectedTo:u=>`已连接到 ${u}`,connectingToDaemon:"正在打开安全 daemon 通道",reconnectingToDaemon:"正在重连 daemon",connectionFailed:"连接失败",pairingFailed:"配对失败",pairingLinkExpired:"这个配对链接已过期。请在主机上重新打开 vibelet 打印的新 Web 链接。",missingPair:"打开 vibelet 打印的链接",pendingActions:"待处理",noPendingActions:"没有需要处理的审批或问题。",approvalRequired:"需要审批",inputNeeded:"需要输入",deny:"拒绝",approve:"同意",cancel:"取消",submit:"提交",clear:"清除",restoreSnapshot:"恢复 daemon 快照",refreshSessions:"刷新会话",openDaemonWebLink:"打开 daemon web 链接",openDaemonWebLinkHint:"用远程访问启动 Vibelet,然后打开 CLI 打印的 Web UI 链接。",loadingHistory:"正在加载历史",noVisibleMessages:"还没有可见消息",startDaemonSession:"开始 daemon 会话",emptyChatHint:"从浏览器发送提示词;daemon 会在主机上保持 Claude 或 Codex 运行。",agentResponding:"Agent 正在回复",scrollToLatest:"滚动到最新",currentDevice:"当前设备",daemon:"Daemon",status:"状态",active:"当前",notPaired:"未配对",forget:"忘记",notifications:"通知",browserAlerts:"浏览器提醒",notificationsBlocked:"浏览器已阻止通知。",savedDevices:"已保存设备",noSavedDevices:"还没有保存的设备。",notConnectedRecently:"最近未连接",desktopConnector:"桌面连接器",version:"版本",checking:"检查中...",unknown:"未知",update:"更新",updating:"更新中...",restart:"重启",restarting:"重启中...",language:"语言",displayLanguage:"显示语言",followSystem:"自动",english:"English",chinese:"中文",skills:"技能",closeSkills:"关闭技能",noSkillsFound:"没有找到技能。",messagePlaceholder:"输入消息,或输入 $ 选择技能...",uploadFiles:"上传文件",showQuickReplies:"显示快捷回复",hideQuickReplies:"隐藏快捷回复",removeAttachment:"移除附件",send:"发送",uploading:"上传中...",noFilesAttached:"未添加文件"}},jy="vibelet.web.preferences",Ny=8,$m=12,Nv=10,Ay={searchHistory:[],sinceFilter:"30d",hideArchived:!1,groupFolders:!1,collapsedFolders:{},agentFilter:"all"},Br={quickReplies:["Continue","Summarize the current state","Show the next step"],recentCwds:[],favoriteCwds:[],initialMessageHistory:[]},Lr={version:2,theme:"system",language:"system",sessionList:Ay,composer:Br};function is(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}function Tu(u,s){if(!Array.isArray(u))return[];const r=new Set,f=[];for(const p of u){if(typeof p!="string")continue;const g=p.trim();if(!(!g||r.has(g))&&(r.add(g),f.push(g),f.length>=s))break}return f}function Av(u){return is(u)?Object.fromEntries(Object.entries(u).filter(s=>typeof s[1]=="boolean")):{}}function Fm(u){return u==="all"||u==="7d"||u==="30d"||u==="90d"?u:"30d"}function Wm(u){return u==="claude"||u==="codex"?u:"all"}function Tv(u,s){if(!is(u))return Ay;const r=s!==2&&Fm(u.sinceFilter)==="all"&&typeof u.groupFolders=="boolean"&&u.groupFolders&&typeof u.hideArchived=="boolean"&&!u.hideArchived&&Wm(u.agentFilter)==="all"&&(u.statusFilter===void 0||u.statusFilter==="all");return{searchHistory:Tu(u.searchHistory,Ny),sinceFilter:r?"30d":Fm(u.sinceFilter),hideArchived:typeof u.hideArchived=="boolean"?u.hideArchived:!1,groupFolders:r?!1:typeof u.groupFolders=="boolean"?u.groupFolders:!1,collapsedFolders:Av(u.collapsedFolders),agentFilter:Wm(u.agentFilter)}}function Ev(u){if(!is(u))return Br;const s=Tu(u.quickReplies,20);return{quickReplies:s.length?s:Br.quickReplies,recentCwds:Tu(u.recentCwds,$m),favoriteCwds:Tu(u.favoriteCwds,$m),initialMessageHistory:Tu(u.initialMessageHistory,Nv)}}function Ty(u){return is(u)?{version:2,theme:u.theme==="light"||u.theme==="dark"?u.theme:"system",language:u.language==="en"||u.language==="zh"?u.language:"system",sessionList:Tv(u.sessionList,u.version),composer:Ev(u.composer)}:Lr}function Ey(u=window.localStorage){const s=u.getItem(jy);if(!s)return Lr;try{return Ty(JSON.parse(s))}catch{return Lr}}function Im(u,s=window.localStorage){s.setItem(jy,JSON.stringify(Ty(u)))}function Cv(u,s){const r=s.trim();return r?[r,...u.filter(f=>f!==r)].slice(0,Ny):u}function Mv(u,s){const r=s.trim().toLowerCase();return r?[Gn(u),u.cwd,u.agent,u.branch??"",...u.titleAliases??[]].some(f=>f.toLowerCase().includes(r)):!0}function _v(u,s){return u.filter(r=>s.hideArchived&&r.archived||s.agentFilter!=="all"&&r.agent!==s.agentFilter?!1:Mv(r,s.search))}const zv=280,Dv=560,Ov=260,wv=520,Rv=15e3;function Uv(u){return u instanceof Error&&u.message==="auth_failed"}function kv(u,s){return u instanceof ts&&u.code==="pair_window_expired"?s.pairingLinkExpired:u instanceof Error?u.message:String(u)}function Pm(u,s,r){return Math.min(Math.max(Math.round(u),s),r)}function qv(){const u=b.useRef(null),s=b.useRef(async()=>{}),r=b.useRef(null),f=b.useRef(kr()),p=b.useRef(W1()),g=b.useRef(Ey()),U=b.useRef(rv()),Z=b.useRef(mv()),w=b.useRef(f.current),C=b.useRef(p.current),L=b.useRef(U.current),H=b.useRef(null),K=b.useRef(null),k=b.useRef(null),ae=b.useRef(null),P=b.useRef(null),Ne=b.useRef(new Set),me=b.useRef(null),te=b.useRef(0),q=b.useRef(new Set),ie=b.useRef({}),Ee=b.useRef(!1),[be,ue]=b.useState("connecting"),[ge,He]=b.useState("Preparing Vibelet Web"),[Jt,J]=b.useState(null),[ye,Et]=b.useState(null),[ft,Ue]=b.useState([]),[E,B]=b.useState({}),[W,re]=b.useState({}),[Se,S]=b.useState(),[D,Y]=b.useState({}),[G,ne]=b.useState(),[X,ee]=b.useState(null),[$e,Oe]=b.useState(null),[qt,_e]=b.useState([]),[nn,ln]=b.useState(!1),[V,Ze]=b.useState(()=>new Set),[zt,$]=b.useState({}),[Be,ze]=b.useState({}),[ct,yn]=b.useState({}),[ka,an]=b.useState({}),[Ce,tl]=b.useState("claude"),[Ke,wn]=b.useState(Dn),[pn,Gt]=b.useState(wr),[jl,zu]=b.useState(!1),[Ht,Qn]=b.useState(""),[it,un]=b.useState(""),[lt,oa]=b.useState(!1),[nl,Nl]=b.useState(""),[Vn,se]=b.useState([]),[Le,yt]=b.useState(!1),[Bt,Qt]=b.useState(U.current),[ll,pt]=b.useState(()=>Au(U.current,null)),[Al,Rn]=b.useState(g.current),[gt,qa]=b.useState(""),[Ti,Du]=b.useState(g.current.sessionList.searchHistory),[gn,Ha]=b.useState(g.current.sessionList.sinceFilter),[vn,Ei]=b.useState(g.current.sessionList.hideArchived),[bn,vt]=b.useState(g.current.sessionList.groupFolders),[Ct,Tl]=b.useState(g.current.sessionList.collapsedFolders),[Vt,Ou]=b.useState(g.current.sessionList.agentFilter),[us]=b.useState(g.current.composer),[Ba,El]=b.useState(Z.current),[Un,De]=b.useState(!1),[Dt,Xn]=b.useState("session"),[Cl,ut]=b.useState(!1),[ra,wu]=b.useState(366),[Sn,Ml]=b.useState(330),[cs,Ru]=b.useState({}),[Uu,ss]=b.useState({}),[La,Ya]=b.useState([]),[st,Mt]=b.useState({path:Dn,entries:[],loading:!1,loaded:!1}),[Ga,ku]=b.useState(""),[Ie,fa]=b.useState(null),[Qa,Ci]=b.useState(!1),[$t,Va]=b.useState("edit"),[_l,zl]=b.useState({statusText:"",loading:!1,action:null}),[Ft,Dl]=b.useState(Dr),[Xa,Ol]=b.useState(p.current),[al,Za]=b.useState(f.current),Zn=b.useMemo(()=>$c($c(ft,Object.values(W)),Object.values(E)),[W,E,ft]),Mi=b.useMemo(()=>new Set(Object.keys(E)),[E]),ve=b.useMemo(()=>Zn.find(d=>d.sessionId===X)??null,[X,Zn]),wl=b.useMemo(()=>X&&zt[X]?zt[X]:Object.values(zt)[0]??null,[X,zt]),Lt=b.useMemo(()=>X&&Be[X]?Be[X]:Object.values(Be)[0]??null,[X,Be]),kn=X?ka[X]??[]:[],_i=cs[Ce]??[],zi=Uu[Ce],Kn=b.useMemo(()=>_v(Zn,{search:gt,hideArchived:vn,agentFilter:Vt}),[Zn,vn,gt,Vt]),Rl=b.useMemo(()=>V1(Kn),[Kn]),qu=Hr(Al.language),Pe=jv[qu],Hu=b.useMemo(()=>({"--left-pane-width":`${ra}px`,"--right-pane-width":`${Sn}px`}),[ra,Sn]),Ul=b.useCallback(d=>y=>{y.preventDefault();const m=y.clientX,_=ra,Q=Sn,fe=bt=>{const We=bt.clientX-m;if(d==="left"){wu(Pm(_+We,zv,Dv));return}Ml(Pm(Q-We,Ov,wv))},ke=()=>{document.body.classList.remove("pane-resizing"),window.removeEventListener("pointermove",fe),window.removeEventListener("pointerup",ke)};document.body.classList.add("pane-resizing"),window.addEventListener("pointermove",fe),window.addEventListener("pointerup",ke,{once:!0})},[ra,Sn]);b.useEffect(()=>{r.current=X},[X]),b.useEffect(()=>{ae.current=ye},[ye]),b.useEffect(()=>{q.current=V},[V]),b.useEffect(()=>{C.current=Xa},[Xa]),b.useEffect(()=>{w.current=al},[al]),b.useEffect(()=>{L.current=Bt},[Bt]),b.useEffect(()=>{Rn(d=>{const y={...d,sessionList:{...d.sessionList,searchHistory:Ti,sinceFilter:gn,hideArchived:vn,groupFolders:bn,collapsedFolders:Ct,agentFilter:Vt}};return Im(y),y})},[Ct,bn,vn,Ti,Vt,gn]);const Xt=b.useCallback(d=>{pt(d),Qt(y=>{const m=Nu(y,r.current,d);return L.current=m,ju(m),m})},[]),Ka=b.useCallback(d=>{Qt(y=>{const m=Nu(y,null,d);return L.current=m,ju(m),m}),r.current||pt(d)},[]),da=b.useCallback(()=>{Du(d=>Cv(d,gt))},[gt]),qn=b.useCallback(d=>{El(d),Km(d)},[]),Di=b.useCallback(d=>{Rn(y=>{const m={...y,language:d};return Im(m),m})},[]);b.useEffect(()=>{cv();const d=sv();d&&(Ka(d),Xn("session"),ov())},[Ka]),b.useEffect(()=>{Dt==="admin"&&Za(kr())},[Dt]),b.useEffect(()=>()=>{me.current&&window.clearTimeout(me.current),Ie?.objectUrl&&URL.revokeObjectURL(Ie.objectUrl)},[Ie?.objectUrl]);const il=b.useCallback((d,y=!1)=>{Ue(m=>$c(y?m:[],d.sessions)),re(m=>{const _=new Set(d.sessions.map(fe=>fe.sessionId)),Q=Object.fromEntries(Object.entries(m).filter(([fe])=>!_.has(fe)));return Object.keys(Q).length===Object.keys(m).length?m:Q}),S(d.nextCursor),ne(d.inventoryVersion),d.folderCounts&&Y(d.folderCounts),He(d.inventoryBackfillInFlight?"Connected, indexing local sessions":"Connected")},[]),ha=b.useCallback(async d=>{const y=u.current;if(!y?.isConnected)return;const m=[...new Set(d.map(_=>_.cwd).filter(Boolean))];if(m.length!==0)try{const _=await y.request({action:"sessions.gitMetadata",id:y.makeId("git"),cwds:m});Ue(Q=>Q.map(fe=>({...fe,branch:_.branches[fe.cwd]??fe.branch,diffStat:_.diffStats[fe.cwd]??fe.diffStat})))}catch{}},[]),ma=b.useCallback(d=>{const y=tg(d,{currentActiveSessionId:r.current,currentCwd:Ke});il(y.page,!1),S(y.page.nextCursor),ne(y.page.inventoryVersion),y.messages&&(k.current=y.activeSessionId,_e(y.messages)),ee(y.activeSessionId),y.activeAgent&&tl(y.activeAgent),y.activeCwd&&wn(y.activeCwd),y.activeApprovalMode&&Gt(y.activeApprovalMode),y.questionAnswers&&yn(y.questionAnswers),q.current=new Set(y.respondingSessionIds),Ze(q.current),$(y.pendingApprovals),ze(y.pendingQuestions),an(y.pendingQueues),ha(d.sessions)},[Ke,ha,il]),kl=b.useCallback(async()=>{const d=u.current;if(!d?.isConnected)return;const y=await d.request({action:"reconnect.snapshot",id:d.makeId("snapshot"),activeSessionId:r.current??void 0,activeAgent:ve?.agent??Ce,agent:Vt==="all"?void 0:Vt,search:gt.trim()||void 0,sinceMs:Dm(gn),hideArchived:vn,skipGitMetadata:!0});ma(y.snapshot)},[ve?.agent,Ce,ma,vn,gt,Vt,gn]),dt=b.useCallback(async d=>{const y=u.current;if(!y?.isConnected)return;const m=await y.request({action:"sessions.list",id:y.makeId(d?.append?"sessions_more":"sessions"),limit:U1,cursor:d?.cursor,agent:Vt==="all"?void 0:Vt,search:gt.trim()||void 0,sinceMs:Dm(gn),hideArchived:vn,skipGitMetadata:!0,force:d?.force}),_=H1(m);il(_,d?.append),ee(Q=>Q??_.sessions[0]?.sessionId??null),ha(_.sessions)},[vn,ha,gt,Vt,il,gn]),Fe=b.useCallback(d=>d&&K.current&&K.current!==d?!1:(K.current=null,ln(!1),!0),[]),Jn=b.useCallback(async d=>{const y=u.current;if(y?.isConnected){K.current=d.sessionId,ln(!0),J(null);try{await y.request({action:"session.history",id:y.makeId("history"),sessionId:d.sessionId,agent:d.agent},{timeoutMessage:"History request timed out.",timeoutMs:Rv})}catch(m){K.current===d.sessionId&&J(m instanceof Error?m.message:String(m))}finally{Fe(d.sessionId)}}},[Fe]),$n=b.useCallback(async(d,y)=>{const m=u.current;if(m?.isConnected)try{const[_,Q,fe]=await Promise.all([m.request({action:"models.list",id:m.makeId("models"),agent:d}),m.request({action:"usage.limits.fetch",id:m.makeId("usage"),agent:d}),m.request({action:"skills.list",id:m.makeId("skills"),cwd:y||void 0})]);Ru(ke=>({...ke,[d]:_.options??[]})),ss(ke=>({...ke,[d]:Q})),Ya(Array.isArray(fe.skills)?fe.skills:[])}catch(_){J(_ instanceof Error?_.message:String(_))}},[]),xn=b.useCallback((d,y,m="info")=>{const _=u.current;_?.isConnected&&_.request({action:"log.report",id:_.makeId("log"),entries:[{level:m,event:d,data:y,ts:new Date().toISOString()}]}).catch(()=>{})},[]),ql=b.useCallback(async(d=ae.current)=>{if(!d){Dl(Dr);return}Dl(y=>({...y,loading:!0,error:null}));try{const y=await fetch(Sv(d,window.location,{sameOrigin:!1}),{cache:"no-store"});if(!y.ok)throw new Error(`HTTP ${y.status}`);const m=xv(await y.json().catch(()=>null));Dl({...m,loading:!1,error:null})}catch{Dl(y=>({...y,loading:!1,error:"Could not read connector version."}))}},[]);b.useEffect(()=>{Dt==="admin"&&be==="connected"&&ql()},[Dt,be,ql]);const Hl=b.useCallback(d=>{Ol(y=>{const m={...y,...d};return C.current=m,I1(m),m})},[]),Hn=b.useCallback((d,y)=>{!d||!y||d===y||(ee(m=>m===d?y:m),H.current===d&&(H.current=y),k.current===d&&(k.current=y),q.current=Om(q.current,d,y),Ze(m=>Om(m,d,y)),$(m=>Cr(m,d,y)),ze(m=>Cr(m,d,y)),an(m=>Cr(m,d,y)),re(m=>{const _=m[d];if(!_)return m;const Q={...m};return delete Q[d],Q[y]={..._,sessionId:y},Q}),Qt(m=>{const _=fv(m,d,y);return _!==m&&(L.current=_,ju(_)),_}))},[]),Fn=b.useCallback((d,y,m,_,Q)=>{const fe=C.current;if(!fe[_]||Ne.current.has(d))return;eg(y,m,{onClick:()=>{window.focus(),Q&&ee(Q)},permission:w.current,settings:fe,tag:d,visibilityState:document.visibilityState})&&Ne.current.add(d)},[]),ya=b.useCallback(d=>{switch(d.type){case"response":{if(Pc(d.data)&&typeof d.data.oldSessionId=="string"&&typeof d.data.sessionId=="string"){const{oldSessionId:y,sessionId:m}=d.data;Hn(y,m)}break}case"sessions.changed":dt({force:!0}).catch(y=>J(y instanceof Error?y.message:String(y)));break;case"session.history":if(d.sessionId===r.current){Fe(d.sessionId);const y=d.partialReplyText?Rr(d.messages,d.partialReplyText):d.messages;k.current=d.sessionId,_e(y),an(m=>({...m,[d.sessionId]:d.pendingQueue??[]})),$(m=>{const _={...m};return d.pendingApproval?_[d.sessionId]={type:"approval.request",sessionId:d.sessionId,...d.pendingApproval}:delete _[d.sessionId],_}),ze(m=>{const _={...m};if(d.pendingQuestion){const Q={type:"question.request",sessionId:d.sessionId,...d.pendingQuestion};_[d.sessionId]=Q,yn(Ur(Q))}else delete _[d.sessionId];return _})}Ze(y=>{const m=new Set(y);return d.isResponding||d.externallyResponding?(m.add(d.sessionId),q.current=new Set(m)):(m.delete(d.sessionId),q.current=new Set(m)),m});break;case"session.history.append":d.sessionId===r.current&&(k.current=d.sessionId,_e(y=>[...y,...d.messages]));break;case"text.delta":d.sessionId===r.current&&(k.current=d.sessionId,_e(y=>Rr(y,d.content))),q.current=new Set(q.current).add(d.sessionId),Ze(y=>new Set(y).add(d.sessionId));break;case"tool.call":d.sessionId===r.current&&(k.current=d.sessionId,_e(y=>[...y,{role:"tool",type:"info",toolName:d.toolName,toolInput:d.input,content:`Tool call: ${d.toolName}
|
|
20
|
+
|
|
21
|
+
${sy(d.input)}`,timestamp:new Date().toISOString()}]));break;case"tool.result":d.sessionId===r.current&&(k.current=d.sessionId,_e(y=>[...y,{role:"tool",type:"info",content:d.output,timestamp:new Date().toISOString()}]));break;case"approval.request":$(y=>({...y,[d.sessionId]:d})),ee(d.sessionId),Fn(`approval:${d.sessionId}:${d.requestId}`,"Vibelet approval required",d.description||d.toolName,"approvals",d.sessionId);break;case"question.request":ze(y=>({...y,[d.sessionId]:d})),yn(Ur(d)),ee(d.sessionId),Fn(`question:${d.sessionId}:${d.requestId}`,"Vibelet needs input",`${d.questions.length} question(s) waiting`,"questions",d.sessionId);break;case"question.cleared":ze(y=>{const m={...y};return m[d.sessionId]?.requestId===d.requestId&&delete m[d.sessionId],m});break;case"session.queue":an(y=>({...y,[d.sessionId]:d.pending}));break;case"session.stall_warning":Ue(y=>y.map(m=>m.sessionId===d.sessionId?{...m,stallWarning:d.warning}:m));break;case"session.interrupted_notice":Ue(y=>y.map(m=>m.sessionId===d.sessionId?{...m,interruptReason:d.reason,stallWarning:void 0}:m));break;case"session.done":if(q.current.has(d.sessionId)){const y=(ie.current[d.sessionId]??0)+1;ie.current[d.sessionId]=y,Fn(`done:${d.sessionId}:${y}`,"Vibelet reply ready","The agent finished a turn.","replies",d.sessionId)}q.current=new Set(q.current),q.current.delete(d.sessionId),Ze(y=>{const m=new Set(y);return m.delete(d.sessionId),m}),d.sessionId===r.current&&($(y=>{const m={...y};return delete m[d.sessionId],m}),ze(y=>{const m={...y};return delete m[d.sessionId],m})),d.usage&&Ue(y=>y.map(m=>m.sessionId===d.sessionId?{...m,lastUsage:d.usage}:m)),dt({force:!0}).catch(y=>J(y instanceof Error?y.message:String(y)));break;case"session.interrupted":q.current=new Set(q.current),q.current.delete(d.sessionId),Ze(y=>{const m=new Set(y);return m.delete(d.sessionId),m}),dt({force:!0}).catch(y=>J(y instanceof Error?y.message:String(y)));break;case"session.renamed":Ue(y=>y.map(m=>m.sessionId===d.sessionId?{...m,customTitle:d.title}:m));break;case"error":J(d.message);break}},[Fe,Hn,dt,Fn]),Ja=b.useCallback(d=>{const y=d??ae.current;!y||Ee.current||(me.current&&window.clearTimeout(me.current),me.current=window.setTimeout(()=>{me.current=null,s.current(y,!0)},k1))},[]),Bu=b.useCallback(async(d,y=!1)=>{me.current&&(window.clearTimeout(me.current),me.current=null),Ee.current=!1,ue("connecting"),He(y?Pe.reconnectingToDaemon:Pe.connectingToDaemon),J(null);const m=new uv,_=te.current+1;te.current=_;const Q=u.current;u.current=m,Q?.disconnect();const fe=()=>te.current===_&&u.current===m;m.onMessage(ya),m.onClose(()=>{u.current===m&&(u.current=null,!Ee.current&&(ue("connecting"),He(Pe.reconnectingToDaemon),J("The daemon WebSocket closed. Vibelet Web will retry automatically."),Ja(ae.current??d)))});try{let ke=d,bt;try{bt=await m.connect(d)}catch(cn){if(!d.webSocketUrl)throw cn;ke={...d,webSocketUrl:void 0},He(Pe.reconnectingToDaemon),bt=await m.connect(ke)}if(!fe())return;const We={...ke,displayName:bt.displayName??ke.displayName};Et(We),ae.current=We,Qm(We),El(cn=>{const et=yv(cn,We);return Km(et),et}),ue("connected"),He(Pe.connectedTo(bt.displayName??d.displayName??"Vibelet Daemon")),ql(We),await kl(),await $n(Ce,Ke),xn("web.connected",{reconnecting:y})}catch(ke){if(!fe())return;Uv(ke)&&Vm(),ue("error"),He(Pe.connectionFailed),J(ke instanceof Error?ke.message:String(ke)),Ja(d)}},[Ce,Ke,$n,ya,ql,xn,kl,Ja,Pe]);b.useEffect(()=>{s.current=Bu},[Bu]),b.useEffect(()=>{let d=!1;async function y(){const m=Ig(),Q=tv()??Z.current[0]??null;if(!m&&!Q){ue("missing-pair"),He(Pe.missingPair);return}try{ue("pairing"),m&&P.current?.pairNonce!==m.pairNonce&&(P.current={pairNonce:m.pairNonce,promise:av(m)});const fe=m?await P.current?.promise:Q;if(!fe||d)return;m&&(Qm(fe),P.current=null,Pg()),await s.current(fe)}catch(fe){if(d)return;m&&(P.current=null),ue("error"),He(Pe.pairingFailed),J(kv(fe,Pe))}}return y(),()=>{d=!0,Ee.current=!0,te.current+=1,me.current&&window.clearTimeout(me.current),u.current?.disconnect()}},[Pe]),b.useEffect(()=>{if(be!=="connected")return;const d=window.setTimeout(()=>{dt({force:!0}).catch(y=>J(y instanceof Error?y.message:String(y)))},260);return()=>window.clearTimeout(d)},[be,dt,gt,gn]),b.useEffect(()=>{be==="connected"&&$n(Ce,Ke)},[Ce,Ke,$n,be]),b.useEffect(()=>{const d=Zn.find(y=>y.sessionId===X);if(!d){H.current=null,k.current=null,Fe(),_e([]),pt(Au(L.current,null));return}if(tl(d.agent),wn(d.cwd||Dn),Qn(d.model??""),un(d.effort??""),oa(d.fastMode??!1),Gt(d.approvalMode??wr),Nl(d.customTitle??d.title??""),pt(Au(L.current,d.sessionId)),Mt(y=>({...y,path:d.cwd||Dn,loaded:y.path===(d.cwd||Dn)?y.loaded:!1})),E[d.sessionId]){H.current=d.sessionId,Fe(),k.current!==d.sessionId&&(k.current=d.sessionId,_e([]));return}H.current!==d.sessionId&&(H.current=d.sessionId,k.current!==d.sessionId&&(k.current=d.sessionId,_e([])),Jn(d))},[X,Fe,Zn,E,Jn]);const Lu=b.useCallback((d,y)=>{const m=d?.trim()||Ke.trim()||Dn,_=y??Ce,Q=Y1(),fe=G1({sessionId:Q,agent:_,cwd:m,approvalMode:pn,model:Tr(Ht),effort:it||void 0,fastMode:lt,title:`New ${_==="codex"?"Codex":"Claude"} session`}),ke=r.current?"":Au(L.current,null);return B(bt=>({...bt,[Q]:fe})),Qt(bt=>{let We=Nu(bt,Q,ke);return r.current||(We=Nu(We,null,"")),L.current=We,ju(We),We}),wn(m),tl(_),ee(Q),H.current=Q,k.current=Q,Fe(),_e([]),pt(ke),J(null),xn("web.session.pending_create",{sessionId:Q,agent:_,cwd:m}),Q},[Ce,pn,Fe,Ke,it,lt,Ht,xn]),Oi=b.useCallback(async(d,y,m)=>{const _=u.current;if(!_?.isConnected)return J("WebSocket is not connected."),null;const Q=m?E[m]:void 0,fe=d?.trim()||Q?.cwd||Ke.trim()||Dn,ke=y??Q?.agent??Ce,bt=Q?.approvalMode??pn,We=Q?.model??Tr(Ht),cn=Q?.effort??(it||void 0),et=Q?.fastMode??lt;J(null);try{const Zt=await _.request({action:"session.create",id:_.makeId("create"),agent:ke,cwd:fe,approvalMode:bt,continueSession:jl,model:We,effort:cn,fastMode:et,...m?{clientSessionId:m}:{}}),Ot=B1(Zt);if(!Ot)throw new Error("Daemon did not return a session id.");const jn=Pc(Zt)&&typeof Zt.oldSessionId=="string"?Zt.oldSessionId:m;return wn(fe),tl(ke),ee(Ot),H.current=Ot,k.current=Ot,Fe(),m&&Q?(B(ga=>{const va={...ga};return delete va[m],jn&&jn!==m&&delete va[jn],va}),re(ga=>({...ga,[Ot]:Q1(Q,Ot)})),jn&&jn!==Ot&&Hn(jn,Ot),m!==Ot&&Hn(m,Ot)):await dt({force:!0}),xn("web.session.create",{sessionId:Ot,clientSessionId:m,agent:ke,cwd:fe}),Ot}catch(Zt){return J(Zt instanceof Error?Zt.message:String(Zt)),null}},[Ce,pn,jl,Ke,it,lt,Ht,E,Fe,Hn,xn,dt]),wi=b.useCallback(async d=>{d?.preventDefault();const y=ll.trim();if(!y||Un)return;const m=u.current;if(!m?.isConnected){J("WebSocket is not connected.");return}De(!0),J(null),Xt("");const _=Vn;se([]);let Q=X,fe=ve?.agent??Ce;if(Q&&E[Q]){const et=await Oi(E[Q].cwd,E[Q].agent,Q);if(!et){De(!1),Xt(y),se(_);return}Q=et,fe=E[X??""]?.agent??fe}else Q||(Q=await Oi());if(!Q){De(!1),Xt(y),se(_);return}const ke=m.makeId("msg"),bt=_.map(et=>et.path);k.current=Q,_e(et=>[...et,{role:"user",content:y,timestamp:new Date().toISOString(),...bt.length?{images:bt}:{}}]),q.current=new Set(q.current).add(Q),Ze(et=>new Set(et).add(Q));const We=fg(y)??void 0,cn=We?{agentSkills:"pro"}:void 0;try{const et=await m.request({action:"session.send",id:m.makeId("send"),sessionId:Q,agent:fe,message:y,clientMessageId:ke,images:bt.length?bt:void 0,model:Tr(Ht),effort:it||void 0,fastMode:lt,skillInvocation:We,featureEntitlements:cn});Pc(et)&&typeof et.oldSessionId=="string"&&typeof et.sessionId=="string"&&Hn(et.oldSessionId,et.sessionId)}catch(et){const Zt=et instanceof Error?et.message:String(et);J(ng(Zt,!!We)),se(_),q.current=new Set(q.current),q.current.delete(Q),Ze(Ot=>{const jn=new Set(Ot);return jn.delete(Q),jn})}finally{De(!1)}},[ve?.agent,X,Ce,Vn,Un,Oi,ll,it,lt,Ht,E,Hn,Xt]),os=b.useCallback(async d=>{const y=u.current;if(!(!y?.isConnected||!wl)){De(!0),J(null);try{await y.request({action:"session.approve",id:y.makeId("approve"),sessionId:wl.sessionId,requestId:wl.requestId,approved:d}),$(m=>{const _={...m};return delete _[wl.sessionId],_})}catch(m){J(m instanceof Error?m.message:String(m))}finally{De(!1)}}},[wl]),rs=b.useCallback(async()=>{const d=u.current;if(!(!d?.isConnected||!Lt)){De(!0),J(null);try{await d.request({action:"session.respondQuestion",id:d.makeId("question"),sessionId:Lt.sessionId,requestId:Lt.requestId,answers:ct}),ze(y=>{const m={...y};return delete m[Lt.sessionId],m})}catch(y){J(y instanceof Error?y.message:String(y))}finally{De(!1)}}},[Lt,ct]),fs=b.useCallback(async()=>{const d=u.current;if(!(!d?.isConnected||!Lt)){De(!0),J(null);try{await d.request({action:"session.cancelQuestion",id:d.makeId("cancel_question"),sessionId:Lt.sessionId,requestId:Lt.requestId}),ze(y=>{const m={...y};return delete m[Lt.sessionId],m})}catch(y){J(y instanceof Error?y.message:String(y))}finally{De(!1)}}},[Lt]),ds=b.useCallback((d,y,m)=>{yn(_=>{const Q=_[d]??[];if(!m)return{..._,[d]:[y]};const fe=Q.includes(y)?Q.filter(ke=>ke!==y):[...Q,y];return{..._,[d]:fe}})},[]),hs=b.useCallback(async d=>{const y=u.current;if(!(!y?.isConnected||!ve)&&!(d==="session.delete"&&!Ni(`Delete ${Gn(ve)}?`))){De(!0),J(null);try{d==="session.resume"?await y.request({action:d,id:y.makeId("resume"),sessionId:ve.sessionId,agent:ve.agent}):await y.request({action:d,id:y.makeId(d.split(".").at(-1)??"session"),sessionId:ve.sessionId}),d==="session.delete"&&(ee(null),k.current=null,_e([])),await dt({force:!0})}catch(m){J(m instanceof Error?m.message:String(m))}finally{De(!1)}}},[ve,dt]),Yu=b.useCallback(async d=>{Gt(d);const y=u.current;if(!(!y?.isConnected||!ve)){J(null);try{await y.request({action:"session.setApprovalMode",id:y.makeId("approval_mode"),sessionId:ve.sessionId,approvalMode:d}),Ue(m=>m.map(_=>_.sessionId===ve.sessionId?{..._,approvalMode:d}:_))}catch(m){J(m instanceof Error?m.message:String(m))}}},[ve]),ms=b.useCallback(async d=>{const y=u.current;if(!(!y?.isConnected||!X||!d.clientMessageId)){De(!0),J(null);try{await y.request({action:"session.queue.cancel",id:y.makeId("queue_cancel"),sessionId:X,clientMessageId:d.clientMessageId}),an(m=>({...m,[X]:(m[X]??[]).filter(_=>_.clientMessageId!==d.clientMessageId)}))}catch(m){J(m instanceof Error?m.message:String(m))}finally{De(!1)}}},[X]),Ri=b.useCallback(async(d,y)=>{if(E[d.sessionId])return;const m=u.current;if(m?.isConnected){De(!0),J(null);try{const _=y?Date.now():void 0;await m.request({action:"session.setPinned",id:m.makeId("pin"),sessionId:d.sessionId,pinned:y,..._?{pinnedAt:_}:{}}),Ue(Q=>Q.map(fe=>fe.sessionId===d.sessionId?{...fe,pinned:y,pinnedAt:_}:fe)),await dt({force:!0})}catch(_){J(_ instanceof Error?_.message:String(_))}finally{De(!1)}}},[E,dt]),Ui=b.useCallback(async(d,y)=>{if(E[d.sessionId])return;const m=u.current;if(m?.isConnected){De(!0),J(null);try{await m.request({action:"session.setArchived",id:m.makeId("archive"),sessionId:d.sessionId,archived:y}),Ue(_=>_.map(Q=>Q.sessionId===d.sessionId?{...Q,archived:y}:Q)),await dt({force:!0})}catch(_){J(_ instanceof Error?_.message:String(_))}finally{De(!1)}}},[E,dt]),ys=b.useCallback(async d=>{if(E[d.sessionId]){B(m=>{const _={...m};return delete _[d.sessionId],_}),Qt(m=>{const _=Nu(m,d.sessionId,"");return L.current=_,ju(_),_}),r.current===d.sessionId&&(ee(null),k.current=null,H.current=null,_e([]),pt(Au(L.current,null)),ut(!1));return}const y=u.current;if(y?.isConnected&&Ni(`Delete ${Gn(d)}?`)){De(!0),J(null);try{await y.request({action:"session.delete",id:y.makeId("delete"),sessionId:d.sessionId}),re(m=>{if(!m[d.sessionId])return m;const _={...m};return delete _[d.sessionId],_}),r.current===d.sessionId&&(ee(null),k.current=null,_e([]),ut(!1)),await dt({force:!0})}catch(m){J(m instanceof Error?m.message:String(m))}finally{De(!1)}}},[E,dt]),ki=b.useCallback(async()=>{!u.current?.isConnected||!ve||await Ri(ve,!ve.pinned)},[ve,Ri]),ps=b.useCallback(async()=>{!u.current?.isConnected||!ve||await Ui(ve,!ve.archived)},[ve,Ui]),gs=b.useCallback(async()=>{const d=nl.trim();if(ve&&E[ve.sessionId]){B(m=>{const _=m[ve.sessionId];return _?{...m,[ve.sessionId]:{..._,title:d||_.title,customTitle:d||void 0}}:m});return}const y=u.current;if(!(!y?.isConnected||!ve)){De(!0),J(null);try{await y.request({action:"session.rename",id:y.makeId("rename"),sessionId:ve.sessionId,title:d||void 0}),Ue(m=>m.map(_=>_.sessionId===ve.sessionId?{..._,customTitle:d||void 0}:_))}catch(m){J(m instanceof Error?m.message:String(m))}finally{De(!1)}}},[ve,E,nl]),vs=b.useCallback(async d=>{if(!(!d?.length||!ye)){yt(!0),J(null);try{const y=[];for(const m of Array.from(d)){const _=await fetch(`/upload?name=${encodeURIComponent(m.name)}`,{method:"POST",headers:{authorization:`Bearer ${ye.pairToken}`,"content-type":m.type||"application/octet-stream"},body:m});if(!_.ok)throw new Error(await _.text().catch(()=>"Upload failed.")||"Upload failed.");const Q=L1(await _.json());if(!Q)throw new Error("Daemon did not return an uploaded file path.");y.push({path:Q,name:m.name,type:m.type||"application/octet-stream",size:m.size})}se(m=>[...m,...y])}catch(y){J(y instanceof Error?y.message:String(y))}finally{yt(!1)}}},[ye]),qi=b.useCallback(async(d,y)=>{if(ye){J(null);try{Ie?.objectUrl&&URL.revokeObjectURL(Ie.objectUrl);const m=await fetch(Mr(d,y),{headers:{authorization:`Bearer ${ye.pairToken}`}});if(!m.ok)throw new Error(await m.text().catch(()=>"File open failed.")||"File open failed.");const _=m.headers.get("content-type")??"application/octet-stream";if(X1(d,_))fa({path:d,cwd:y,kind:"text",contentType:_,text:await m.text(),etag:Fc(m.headers,"etag"),lastModified:Fc(m.headers,"last-modified"),size:Number(m.headers.get("content-length"))||void 0,dirty:!1});else{const Q=await m.blob();fa({path:d,cwd:y,kind:Z1(d,_)?"image":"binary",contentType:_,text:"",objectUrl:URL.createObjectURL(Q),etag:Fc(m.headers,"etag"),lastModified:Fc(m.headers,"last-modified"),size:Q.size,dirty:!1})}Ci(!1),Va("edit"),Xn("files")}catch(m){J(m instanceof Error?m.message:String(m))}}},[ye,Ie?.objectUrl]),bs=b.useCallback(async d=>{if(!(!ye||!Ie||Ie.kind!=="text")){De(!0),J(null);try{const y=await fetch(Mr(Ie.path,Ie.cwd),{method:"PUT",headers:{authorization:`Bearer ${ye.pairToken}`,"content-type":"text/markdown; charset=utf-8",...Ie.etag&&!d?.force?{"if-match":Ie.etag}:{}},body:Ie.text});if(!y.ok)throw y.status===409?(Ci(!0),new Error(fy(Ie.path))):new Error(await y.text().catch(()=>"File save failed.")||"File save failed.");Ci(!1);const m=await y.json().catch(()=>({}));fa(_=>_&&{..._,dirty:!1,etag:typeof m.etag=="string"?m.etag:_.etag,lastModified:typeof m.lastModified=="string"?m.lastModified:_.lastModified,size:typeof m.size=="number"?m.size:_.size})}catch(y){J(y instanceof Error?y.message:String(y))}finally{De(!1)}}},[ye,Ie]),Ss=b.useCallback(async()=>{if(!(!ye||!Ie))try{const d=await fetch(Mr(Ie.path,Ie.cwd),{headers:{authorization:`Bearer ${ye.pairToken}`}});if(!d.ok)throw new Error("Download failed.");const y=URL.createObjectURL(await d.blob()),m=document.createElement("a");m.href=y,m.download=Ra(Ie.path),m.click(),URL.revokeObjectURL(y)}catch(d){J(d instanceof Error?d.message:String(d))}},[ye,Ie]),Bl=b.useCallback(async(d=st.path)=>{const y=u.current;if(y?.isConnected){Mt(m=>({...m,path:d,loading:!0,loaded:!1,error:void 0}));try{const m=await y.request({action:"dirs.list",id:y.makeId("dirs"),path:d,cwd:Ke||void 0});Mt({path:d,entries:m.entries??[],loading:!1,loaded:!0})}catch(m){Mt(_=>({..._,loading:!1,loaded:!0,error:m instanceof Error?m.message:String(m)}))}}},[Ke,st.path]);b.useEffect(()=>{Dt!=="files"||be!=="connected"||st.loading||st.loaded||Bl(st.path||Ke||Dn)},[Dt,Ke,st.loaded,st.loading,st.path,Bl,be]);const xs=b.useCallback(async()=>{const d=u.current,y=Ga.trim();if(!(!d?.isConnected||!y)){De(!0),J(null);try{const m=oy(st.path,y);await d.request({action:"dirs.create",id:d.makeId("mkdir"),path:m,cwd:Ke||void 0}),ku(""),await Bl(st.path)}catch(m){J(m instanceof Error?m.message:String(m))}finally{De(!1)}}},[Ke,st.path,Bl,Ga]),Gu=b.useCallback(async d=>{const y=u.current;if(y?.isConnected&&!(d==="update"&&!Ni("Update desktop connector?"))&&!(d==="restart"&&!Ni("Restart desktop connector?"))){zl(m=>({...m,loading:!0,action:d,statusText:""})),J(null);try{if(d==="update"){const m=bv(Ft.version),_=await y.request({action:"daemon.update",id:y.makeId("daemon_update"),...m?{channel:m}:{}});zl(Q=>({...Q,loading:!1,action:null,statusText:_.alreadyRunning?"Connector update already running":"Connector update started"}));return}await y.request({action:"daemon.restart",id:y.makeId("daemon_restart")}),zl(m=>({...m,loading:!1,action:null,statusText:"Connector restart requested"})),ql()}catch(m){zl(_=>({..._,loading:!1,action:null})),J(m instanceof Error?m.message:String(m))}}},[Ft.version,ql]),js=b.useCallback(async()=>{if(!ve)return;const d=J1(ve,qt);F1(K1(Gn(ve),ve.sessionId),d),await navigator.clipboard?.writeText(d).catch(()=>{})},[ve,qt]),Qu=b.useCallback(async()=>{if(!("Notification"in window)){Za("unsupported"),J("Browser notifications are not supported.");return}const d=await Notification.requestPermission();w.current=d,Za(d),d==="granted"&&Hl({enabled:!0}),He(d==="granted"?"Browser notifications enabled":"Browser notifications not enabled")},[Hl]),Ns=b.useCallback(()=>{Ni("Forget this browser pairing?")&&(Ee.current=!0,te.current+=1,Vm(),u.current?.disconnect(),Et(null),Dl(Dr),ue("missing-pair"),He(Pe.missingPair))},[Pe]),As=b.useCallback(d=>{if(d&&al==="default"){Qu();return}Hl({enabled:d})},[al,Qu,Hl]),Hi=b.useCallback(d=>{s.current(d,!0)},[]),pa=b.useCallback(d=>{qn(pv(Ba,d))},[qn,Ba]),Ts=b.useCallback(d=>{ee(d.sessionId),Nl(d.customTitle??d.title??""),ut(!0)},[]),Vu=b.useCallback(d=>{navigator.clipboard?.writeText(ry(d)).catch(()=>{})},[]),Xu=al==="denied"||al==="unsupported",Zu=!!(Ft.version&&Ft.latestVersion&&vv(Ft.version,Ft.latestVersion));return c.jsxs("main",{className:"workspace",style:Hu,children:[c.jsx(wg,{activeSessionId:X,busy:Un,collapsedFolders:Ct,displayName:ye?.displayName,folderCounts:D,groupFolders:bn,groupedSessions:Rl,hideArchived:vn,inventoryVersion:G,nextCursor:Se,phase:be,respondingSessionIds:V,search:gt,sessionAgentFilter:Vt,sessionsCount:Zn.length,sinceFilter:gn,statusText:ge,t:Pe,visibleSessions:Kn,onLoadMore:d=>{dt({append:!0,cursor:d})},onCopyResumeCommand:Vu,pendingSessionIds:Mi,onCreateSession:d=>{Lu(void 0,d)},onDeleteSession:d=>{ys(d)},onOpenSessionDetails:Ts,onNewInFolder:(d,y)=>{Lu(d,y)},onResetFilters:()=>{Ou("all"),Ha("30d"),Ei(!1),vt(!1)},onSearchChange:qa,onSearchCommit:da,onSelectSession:ee,onToggleSessionArchived:d=>{Ui(d,!d.archived)},onToggleSessionPinned:d=>{Ri(d,!d.pinned)},onSessionAgentFilterChange:Ou,onSinceFilterChange:Ha,onViewChanges:Oe,onToggleFolder:d=>Tl(y=>({...y,[d]:!y[d]})),onToggleGroupFolders:()=>vt(d=>!d),onToggleHideArchived:()=>Ei(d=>!d)}),c.jsx("button",{className:"resize-handle",type:"button","aria-label":"Resize session sidebar",title:"Resize session sidebar",onPointerDown:Ul("left"),children:c.jsx("span",{})}),c.jsxs("section",{className:"wide-main","aria-label":"Vibelet workspace",children:[c.jsx(Tg,{activeSession:ve,activeSessionId:X,activeModelOptions:_i,activeQueue:kn,activeUsage:zi,agent:Ce,approvalMode:pn,attachments:Vn,busy:Un,cwd:Ke,draft:ll,effort:it,errorText:Jt,fastMode:lt,historyLoading:nn,messages:qt,model:Ht,phase:be,quickReplies:us.quickReplies,renameTitle:nl,respondingSessionIds:V,skills:La,uploadBusy:Le,detailsOpen:Cl,t:Pe,onApprovalModeChange:d=>{Yu(d)},onBrowseFiles:()=>{const d=ve?.cwd||Ke||Dn;Xn("files"),Bl(d)},onCancelQueuedTurn:d=>{ms(d)},onClearInterrupt:()=>{hs("session.clearInterrupt")},onDraftChange:Xt,onDetailsOpenChange:ut,onEffortChange:un,onExportActiveSession:()=>{js()},onFastModeChange:oa,onModelChange:Qn,onOpenRemoteFile:(d,y)=>{qi(d,y)},onRefreshSessions:()=>{dt({force:!0})},onRenameSession:()=>{gs()},onRenameTitleChange:Nl,onRemoveAttachment:d=>se(y=>y.filter(m=>m.path!==d)),onRestoreSnapshot:()=>{kl()},onRefreshSkills:()=>{$n(ve?.agent??Ce,Ke)},onSubmit:wi,onToggleArchived:()=>{ps()},onTogglePinned:()=>{ki()},onUploadFiles:vs,onViewChanges:Oe}),c.jsx("button",{className:"resize-handle right-resize-handle",type:"button","aria-label":"Resize controls sidebar",title:"Resize controls sidebar",onPointerDown:Ul("right"),children:c.jsx("span",{})}),c.jsxs("aside",{className:"control-pane","aria-label":"Controls",children:[c.jsx(Cg,{value:Dt,onChange:Xn}),Dt==="session"?c.jsx(Dg,{activeApproval:wl,activeQuestion:Lt,busy:Un,questionAnswers:ct,t:Pe,onCancelQuestion:()=>{fs()},onQuestionChoice:ds,onRespondApproval:d=>{os(d)},onRespondQuestion:()=>{rs()}}):null,Dt==="files"?c.jsx(zg,{busy:Un,cwd:Ke,directory:st,newDirName:Ga,remoteFile:Ie,remoteFileConflict:Qa,remoteFileMode:$t,onCreateDirectory:()=>{xs()},onDirectoryPathChange:d=>Mt(y=>({...y,path:d,loaded:!1})),onDownloadRemoteFile:()=>{Ss()},onListDirectory:d=>{Bl(d)},onNewDirNameChange:ku,onOpenRemoteFile:(d,y)=>{qi(d,y)},onRemoteFileModeChange:Va,onRemoteFileTextChange:d=>fa(y=>y&&{...y,text:d,dirty:!0}),onSaveRemoteFile:d=>{bs(d)}}):null,Dt==="admin"?c.jsxs(c.Fragment,{children:[c.jsx(Rg,{pairing:ye,phase:be,t:Pe,onForgetPairing:Ns}),c.jsx(kg,{language:Al.language,t:Pe,onLanguageChange:Di}),c.jsx(Hg,{activeDaemonId:ye?.daemonId,busy:Un,t:Pe,targets:Ba,onConnect:Hi,onForget:pa}),c.jsx(qg,{notificationsBlocked:Xu,permission:al,settings:Xa,t:Pe,onToggleEnabled:As}),c.jsx(Ug,{connected:be==="connected",metadata:Ft,restartBusy:_l.loading&&_l.action==="restart",showUpdate:Zu,t:Pe,updateBusy:_l.loading&&_l.action==="update",updateStatus:_l.statusText,onRestart:()=>{Gu("restart")},onUpdate:()=>{Gu("update")}})]}):null]})]}),$e?(()=>{const d=ft.find(m=>m.sessionId===$e),y=u.current;return!d||!y?null:c.jsx(Bg,{client:y,sessionId:d.sessionId,sessionTitle:Gn(d),onClose:()=>Oe(null)})})():null]})}const Cy="(max-width: 767px), (hover: none) and (pointer: coarse) and (max-width: 1024px)",Hv={en:"https://vibelet.icu/#get-app",zh:"https://vibelet.icu/zh/#get-app"},Bv="https://apps.apple.com/app/id6761245790",Lv="https://service.lifeos.vip/auto-updates/vibelet/android/latest.apk",Yv={en:{eyebrow:"Vibelet Web",title:"Use the Vibelet app on mobile",description:"The Web workspace is available for desktop browsers only. Install the mobile app, then pair it with the desktop connector on your computer.",primary:"Open app download page",ios:"App Store",android:"Android APK",desktopOnly:"Desktop browser only",desktopHint:"Open this Web link on a desktop browser to continue here.",pairingBefore:"Run",pairingAfter:"on your computer, then scan the QR code from the app."},zh:{eyebrow:"Vibelet Web",title:"手机端请使用 Vibelet App",description:"Web 工作台只面向桌面浏览器。请安装手机 App,再和电脑上的桌面连接器完成配对。",primary:"打开 App 下载页",ios:"App Store",android:"Android APK",desktopOnly:"仅支持桌面浏览器",desktopHint:"如果要继续使用 Web,请在桌面浏览器打开这个链接。",pairingBefore:"在电脑上运行",pairingAfter:"然后用 App 扫描二维码。"}};function Gv(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(Cy).matches}function Qv(){try{return Hr(Ey().language)}catch{return Hr("system")}}function Vv(){const u=Qv(),s=Yv[u],r=Hv[u];return c.jsx("main",{className:"mobile-app-gate","aria-labelledby":"mobile-app-gate-title",children:c.jsxs("section",{className:"mobile-app-panel",children:[c.jsxs("div",{className:"mobile-app-hero",children:[c.jsx("span",{className:"mobile-app-icon","aria-hidden":"true",children:c.jsx(T1,{})}),c.jsx("span",{className:"mobile-app-eyebrow",children:s.eyebrow}),c.jsx("h1",{id:"mobile-app-gate-title",children:s.title}),c.jsx("p",{children:s.description})]}),c.jsxs("div",{className:"mobile-app-actions",role:"group","aria-label":s.primary,children:[c.jsxs("a",{className:"mobile-app-primary-link",href:r,children:[c.jsx(Mu,{"aria-hidden":"true"}),c.jsx("span",{children:s.primary})]}),c.jsxs("a",{className:"mobile-app-secondary-link",href:Bv,rel:"noopener noreferrer",target:"_blank",children:[c.jsx(Vr,{"aria-hidden":"true"}),c.jsx("span",{children:s.ios})]}),c.jsxs("a",{className:"mobile-app-secondary-link",download:!0,href:Lv,children:[c.jsx(Mu,{"aria-hidden":"true"}),c.jsx("span",{children:s.android})]})]}),c.jsxs("div",{className:"mobile-app-note",children:[c.jsx(o1,{"aria-hidden":"true"}),c.jsxs("div",{children:[c.jsx("strong",{children:s.desktopOnly}),c.jsx("span",{children:s.desktopHint})]})]}),c.jsxs("p",{className:"mobile-app-footnote",children:[c.jsx("span",{children:s.pairingBefore}),c.jsx("code",{children:"npx vibelet"}),c.jsx("span",{children:s.pairingAfter})]})]})})}function Xv(){const[u,s]=b.useState(Gv);return b.useEffect(()=>{if(typeof window.matchMedia!="function")return;const r=window.matchMedia(Cy),f=()=>s(r.matches);return f(),typeof r.addEventListener=="function"?(r.addEventListener("change",f),()=>r.removeEventListener("change",f)):(r.addListener(f),()=>r.removeListener(f))},[]),u?c.jsx(Vv,{}):c.jsx(qv,{})}o0.createRoot(document.getElementById("root")).render(c.jsx(b.StrictMode,{children:c.jsx(Xv,{})}));
|