meldivo 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CeWj4ejR.js","assets/_commonjsHelpers-CqkleIqs.js","assets/browser-CujOq0-h.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var bd=Object.defineProperty;var Zd=(u,l,s)=>l in u?bd(u,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[l]=s;var te=(u,l,s)=>Zd(u,typeof l!="symbol"?l+"":l,s);(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))f(d);new MutationObserver(d=>{for(const y of d)if(y.type==="childList")for(const E of y.addedNodes)E.tagName==="LINK"&&E.rel==="modulepreload"&&f(E)}).observe(document,{childList:!0,subtree:!0});function s(d){const y={};return d.integrity&&(y.integrity=d.integrity),d.referrerPolicy&&(y.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?y.credentials="include":d.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function f(d){if(d.ep)return;d.ep=!0;const y=s(d);fetch(d.href,y)}})();var gu={exports:{}},Si={},yu={exports:{}},Se={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var Zc;function eh(){if(Zc)return Se;Zc=1;var u=Symbol.for("react.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),E=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),j=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),I=Symbol.iterator;function z(g){return g===null||typeof g!="object"?null:(g=I&&g[I]||g["@@iterator"],typeof g=="function"?g:null)}var $={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},J=Object.assign,le={};function C(g,T,ie){this.props=g,this.context=T,this.refs=le,this.updater=ie||$}C.prototype.isReactComponent={},C.prototype.setState=function(g,T){if(typeof g!="object"&&typeof g!="function"&&g!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,g,T,"setState")},C.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function Q(){}Q.prototype=C.prototype;function q(g,T,ie){this.props=g,this.context=T,this.refs=le,this.updater=ie||$}var ye=q.prototype=new Q;ye.constructor=q,J(ye,C.prototype),ye.isPureReactComponent=!0;var U=Array.isArray,H=Object.prototype.hasOwnProperty,D={current:null},ne={key:!0,ref:!0,__self:!0,__source:!0};function ve(g,T,ie){var ue,me={},we=null,ge=null;if(T!=null)for(ue in T.ref!==void 0&&(ge=T.ref),T.key!==void 0&&(we=""+T.key),T)H.call(T,ue)&&!ne.hasOwnProperty(ue)&&(me[ue]=T[ue]);var xe=arguments.length-2;if(xe===1)me.children=ie;else if(1<xe){for(var je=Array(xe),st=0;st<xe;st++)je[st]=arguments[st+2];me.children=je}if(g&&g.defaultProps)for(ue in xe=g.defaultProps,xe)me[ue]===void 0&&(me[ue]=xe[ue]);return{$$typeof:u,type:g,key:we,ref:ge,props:me,_owner:D.current}}function ke(g,T){return{$$typeof:u,type:g.type,key:T,ref:g.ref,props:g.props,_owner:g._owner}}function B(g){return typeof g=="object"&&g!==null&&g.$$typeof===u}function Ee(g){var T={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(ie){return T[ie]})}var Ye=/\/+/g;function be(g,T){return typeof g=="object"&&g!==null&&g.key!=null?Ee(""+g.key):T.toString(36)}function Qe(g,T,ie,ue,me){var we=typeof g;(we==="undefined"||we==="boolean")&&(g=null);var ge=!1;if(g===null)ge=!0;else switch(we){case"string":case"number":ge=!0;break;case"object":switch(g.$$typeof){case u:case l:ge=!0}}if(ge)return ge=g,me=me(ge),g=ue===""?"."+be(ge,0):ue,U(me)?(ie="",g!=null&&(ie=g.replace(Ye,"$&/")+"/"),Qe(me,T,ie,"",function(st){return st})):me!=null&&(B(me)&&(me=ke(me,ie+(!me.key||ge&&ge.key===me.key?"":(""+me.key).replace(Ye,"$&/")+"/")+g)),T.push(me)),1;if(ge=0,ue=ue===""?".":ue+":",U(g))for(var xe=0;xe<g.length;xe++){we=g[xe];var je=ue+be(we,xe);ge+=Qe(we,T,ie,je,me)}else if(je=z(g),typeof je=="function")for(g=je.call(g),xe=0;!(we=g.next()).done;)we=we.value,je=ue+be(we,xe++),ge+=Qe(we,T,ie,je,me);else if(we==="object")throw T=String(g),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return ge}function De(g,T,ie){if(g==null)return g;var ue=[],me=0;return Qe(g,ue,"","",function(we){return T.call(ie,we,me++)}),ue}function Ie(g){if(g._status===-1){var T=g._result;T=T(),T.then(function(ie){(g._status===0||g._status===-1)&&(g._status=1,g._result=ie)},function(ie){(g._status===0||g._status===-1)&&(g._status=2,g._result=ie)}),g._status===-1&&(g._status=0,g._result=T)}if(g._status===1)return g._result.default;throw g._result}var Ne={current:null},V={transition:null},se={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:V,ReactCurrentOwner:D};function W(){throw Error("act(...) is not supported in production builds of React.")}return Se.Children={map:De,forEach:function(g,T,ie){De(g,function(){T.apply(this,arguments)},ie)},count:function(g){var T=0;return De(g,function(){T++}),T},toArray:function(g){return De(g,function(T){return T})||[]},only:function(g){if(!B(g))throw Error("React.Children.only expected to receive a single React element child.");return g}},Se.Component=C,Se.Fragment=s,Se.Profiler=d,Se.PureComponent=q,Se.StrictMode=f,Se.Suspense=L,Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,Se.act=W,Se.cloneElement=function(g,T,ie){if(g==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+g+".");var ue=J({},g.props),me=g.key,we=g.ref,ge=g._owner;if(T!=null){if(T.ref!==void 0&&(we=T.ref,ge=D.current),T.key!==void 0&&(me=""+T.key),g.type&&g.type.defaultProps)var xe=g.type.defaultProps;for(je in T)H.call(T,je)&&!ne.hasOwnProperty(je)&&(ue[je]=T[je]===void 0&&xe!==void 0?xe[je]:T[je])}var je=arguments.length-2;if(je===1)ue.children=ie;else if(1<je){xe=Array(je);for(var st=0;st<je;st++)xe[st]=arguments[st+2];ue.children=xe}return{$$typeof:u,type:g.type,key:me,ref:we,props:ue,_owner:ge}},Se.createContext=function(g){return g={$$typeof:E,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},g.Provider={$$typeof:y,_context:g},g.Consumer=g},Se.createElement=ve,Se.createFactory=function(g){var T=ve.bind(null,g);return T.type=g,T},Se.createRef=function(){return{current:null}},Se.forwardRef=function(g){return{$$typeof:N,render:g}},Se.isValidElement=B,Se.lazy=function(g){return{$$typeof:K,_payload:{_status:-1,_result:g},_init:Ie}},Se.memo=function(g,T){return{$$typeof:j,type:g,compare:T===void 0?null:T}},Se.startTransition=function(g){var T=V.transition;V.transition={};try{g()}finally{V.transition=T}},Se.unstable_act=W,Se.useCallback=function(g,T){return Ne.current.useCallback(g,T)},Se.useContext=function(g){return Ne.current.useContext(g)},Se.useDebugValue=function(){},Se.useDeferredValue=function(g){return Ne.current.useDeferredValue(g)},Se.useEffect=function(g,T){return Ne.current.useEffect(g,T)},Se.useId=function(){return Ne.current.useId()},Se.useImperativeHandle=function(g,T,ie){return Ne.current.useImperativeHandle(g,T,ie)},Se.useInsertionEffect=function(g,T){return Ne.current.useInsertionEffect(g,T)},Se.useLayoutEffect=function(g,T){return Ne.current.useLayoutEffect(g,T)},Se.useMemo=function(g,T){return Ne.current.useMemo(g,T)},Se.useReducer=function(g,T,ie){return Ne.current.useReducer(g,T,ie)},Se.useRef=function(g){return Ne.current.useRef(g)},Se.useState=function(g){return Ne.current.useState(g)},Se.useSyncExternalStore=function(g,T,ie){return Ne.current.useSyncExternalStore(g,T,ie)},Se.useTransition=function(){return Ne.current.useTransition()},Se.version="18.3.1",Se}var ef;function Uu(){return ef||(ef=1,yu.exports=eh()),yu.exports}/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var tf;function th(){if(tf)return Si;tf=1;var u=Uu(),l=Symbol.for("react.element"),s=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,d=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function E(N,L,j){var K,I={},z=null,$=null;j!==void 0&&(z=""+j),L.key!==void 0&&(z=""+L.key),L.ref!==void 0&&($=L.ref);for(K in L)f.call(L,K)&&!y.hasOwnProperty(K)&&(I[K]=L[K]);if(N&&N.defaultProps)for(K in L=N.defaultProps,L)I[K]===void 0&&(I[K]=L[K]);return{$$typeof:l,type:N,key:z,ref:$,props:I,_owner:d.current}}return Si.Fragment=s,Si.jsx=E,Si.jsxs=E,Si}var nf;function nh(){return nf||(nf=1,gu.exports=th()),gu.exports}var h=nh(),Ol={},wu={exports:{}},Mt={},Su={exports:{}},ku={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var rf;function rh(){return rf||(rf=1,(function(u){function l(V,se){var W=V.length;V.push(se);e:for(;0<W;){var g=W-1>>>1,T=V[g];if(0<d(T,se))V[g]=se,V[W]=T,W=g;else break e}}function s(V){return V.length===0?null:V[0]}function f(V){if(V.length===0)return null;var se=V[0],W=V.pop();if(W!==se){V[0]=W;e:for(var g=0,T=V.length,ie=T>>>1;g<ie;){var ue=2*(g+1)-1,me=V[ue],we=ue+1,ge=V[we];if(0>d(me,W))we<T&&0>d(ge,me)?(V[g]=ge,V[we]=W,g=we):(V[g]=me,V[ue]=W,g=ue);else if(we<T&&0>d(ge,W))V[g]=ge,V[we]=W,g=we;else break e}}return se}function d(V,se){var W=V.sortIndex-se.sortIndex;return W!==0?W:V.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var y=performance;u.unstable_now=function(){return y.now()}}else{var E=Date,N=E.now();u.unstable_now=function(){return E.now()-N}}var L=[],j=[],K=1,I=null,z=3,$=!1,J=!1,le=!1,C=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ye(V){for(var se=s(j);se!==null;){if(se.callback===null)f(j);else if(se.startTime<=V)f(j),se.sortIndex=se.expirationTime,l(L,se);else break;se=s(j)}}function U(V){if(le=!1,ye(V),!J)if(s(L)!==null)J=!0,Ie(H);else{var se=s(j);se!==null&&Ne(U,se.startTime-V)}}function H(V,se){J=!1,le&&(le=!1,Q(ve),ve=-1),$=!0;var W=z;try{for(ye(se),I=s(L);I!==null&&(!(I.expirationTime>se)||V&&!Ee());){var g=I.callback;if(typeof g=="function"){I.callback=null,z=I.priorityLevel;var T=g(I.expirationTime<=se);se=u.unstable_now(),typeof T=="function"?I.callback=T:I===s(L)&&f(L),ye(se)}else f(L);I=s(L)}if(I!==null)var ie=!0;else{var ue=s(j);ue!==null&&Ne(U,ue.startTime-se),ie=!1}return ie}finally{I=null,z=W,$=!1}}var D=!1,ne=null,ve=-1,ke=5,B=-1;function Ee(){return!(u.unstable_now()-B<ke)}function Ye(){if(ne!==null){var V=u.unstable_now();B=V;var se=!0;try{se=ne(!0,V)}finally{se?be():(D=!1,ne=null)}}else D=!1}var be;if(typeof q=="function")be=function(){q(Ye)};else if(typeof MessageChannel<"u"){var Qe=new MessageChannel,De=Qe.port2;Qe.port1.onmessage=Ye,be=function(){De.postMessage(null)}}else be=function(){C(Ye,0)};function Ie(V){ne=V,D||(D=!0,be())}function Ne(V,se){ve=C(function(){V(u.unstable_now())},se)}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(V){V.callback=null},u.unstable_continueExecution=function(){J||$||(J=!0,Ie(H))},u.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ke=0<V?Math.floor(1e3/V):5},u.unstable_getCurrentPriorityLevel=function(){return z},u.unstable_getFirstCallbackNode=function(){return s(L)},u.unstable_next=function(V){switch(z){case 1:case 2:case 3:var se=3;break;default:se=z}var W=z;z=se;try{return V()}finally{z=W}},u.unstable_pauseExecution=function(){},u.unstable_requestPaint=function(){},u.unstable_runWithPriority=function(V,se){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var W=z;z=V;try{return se()}finally{z=W}},u.unstable_scheduleCallback=function(V,se,W){var g=u.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?g+W:g):W=g,V){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=W+T,V={id:K++,callback:se,priorityLevel:V,startTime:W,expirationTime:T,sortIndex:-1},W>g?(V.sortIndex=W,l(j,V),s(L)===null&&V===s(j)&&(le?(Q(ve),ve=-1):le=!0,Ne(U,W-g))):(V.sortIndex=T,l(L,V),J||$||(J=!0,Ie(H))),V},u.unstable_shouldYield=Ee,u.unstable_wrapCallback=function(V){var se=z;return function(){var W=z;z=se;try{return V.apply(this,arguments)}finally{z=W}}}})(ku)),ku}var of;function oh(){return of||(of=1,Su.exports=rh()),Su.exports}/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var lf;function ih(){if(lf)return Mt;lf=1;var u=Uu(),l=oh();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var f=new Set,d={};function y(e,t){E(e,t),E(e+"Capture",t)}function E(e,t){for(d[e]=t,e=0;e<t.length;e++)f.add(t[e])}var N=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),L=Object.prototype.hasOwnProperty,j=/^[: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]*$/,K={},I={};function z(e){return L.call(I,e)?!0:L.call(K,e)?!1:j.test(e)?I[e]=!0:(K[e]=!0,!1)}function $(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function J(e,t,n,r){if(t===null||typeof t>"u"||$(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function le(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[e]=new le(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];C[t]=new le(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new le(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[e]=new le(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){C[e]=new le(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new le(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new le(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new le(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new le(e,5,!1,e.toLowerCase(),null,!1,!1)});var Q=/[\-:]([a-z])/g;function q(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Q,q);C[t]=new le(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Q,q);C[t]=new le(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Q,q);C[t]=new le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new le(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new le(e,1,!1,e.toLowerCase(),null,!0,!0)});function ye(e,t,n,r){var o=C.hasOwnProperty(t)?C[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(J(t,n,o,r)&&(n=null),r||o===null?z(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var U=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,H=Symbol.for("react.element"),D=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),ve=Symbol.for("react.strict_mode"),ke=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),Ee=Symbol.for("react.context"),Ye=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),Qe=Symbol.for("react.suspense_list"),De=Symbol.for("react.memo"),Ie=Symbol.for("react.lazy"),Ne=Symbol.for("react.offscreen"),V=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var W=Object.assign,g;function T(e){if(g===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);g=t&&t[1]||""}return`
|
|
35
|
+
`+g+e}var ie=!1;function ue(e,t){if(!e||ie)return"";ie=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(x){var r=x}Reflect.construct(e,[],t)}else{try{t.call()}catch(x){r=x}e.call(t.prototype)}else{try{throw Error()}catch(x){r=x}e()}}catch(x){if(x&&r&&typeof x.stack=="string"){for(var o=x.stack.split(`
|
|
36
|
+
`),i=r.stack.split(`
|
|
37
|
+
`),a=o.length-1,c=i.length-1;1<=a&&0<=c&&o[a]!==i[c];)c--;for(;1<=a&&0<=c;a--,c--)if(o[a]!==i[c]){if(a!==1||c!==1)do if(a--,c--,0>c||o[a]!==i[c]){var p=`
|
|
38
|
+
`+o[a].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),p}while(1<=a&&0<=c);break}}}finally{ie=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?T(e):""}function me(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=ue(e.type,!1),e;case 11:return e=ue(e.type.render,!1),e;case 1:return e=ue(e.type,!0),e;default:return""}}function we(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ne:return"Fragment";case D:return"Portal";case ke:return"Profiler";case ve:return"StrictMode";case be:return"Suspense";case Qe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ee:return(e.displayName||"Context")+".Consumer";case B:return(e._context.displayName||"Context")+".Provider";case Ye:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case De:return t=e.displayName||null,t!==null?t:we(e.type)||"Memo";case Ie:t=e._payload,e=e._init;try{return we(e(t))}catch{}}return null}function ge(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return we(t);case 8:return t===ve?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function je(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function st(e){var t=je(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qn(e){e._valueTracker||(e._valueTracker=st(e))}function mr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=je(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ze(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}}function vr(e,t){var n=t.checked;return W({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pn(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xe(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gr(e,t){t=t.checked,t!=null&&ye(e,"checked",t,!1)}function qn(e,t){gr(e,t);var n=xe(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tn(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tn(e,t.type,xe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Pn(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Tn(e,t,n){(t!=="number"||Ze(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bt=Array.isArray;function $t(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+xe(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function _t(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return W({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Wr(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(s(92));if(bt(n)){if(1<n.length)throw Error(s(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:xe(n)}}function yt(e,t){var n=xe(t.value),r=xe(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Hr(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Kr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Oo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Kr(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var jn,Ei=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(jn=jn||document.createElement("div"),jn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=jn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function et(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Rn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_i=["Webkit","ms","Moz","O"];Object.keys(Rn).forEach(function(e){_i.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Rn[t]=Rn[e]})});function Qr(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Rn.hasOwnProperty(e)&&Rn[e]?(""+t).trim():t+"px"}function Ao(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Qr(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Bl=W({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wt(e,t){if(t){if(Bl[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function zo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Zt=null;function qr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Do=null,Mn=null,Fn=null;function Ln(e){if(e=ii(e)){if(typeof Do!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Yi(t),Do(e.stateNode,e.type,t))}}function yr(e){Mn?Fn?Fn.push(e):Fn=[e]:Mn=e}function Ci(){if(Mn){var e=Mn,t=Fn;if(Fn=Mn=null,Ln(e),t)for(e=0;e<t.length;e++)Ln(t[e])}}function Gn(e,t){return e(t)}function Io(){}var Gr=!1;function Yr(e,t,n){if(Gr)return e(t,n);Gr=!0;try{return Gn(e,t,n)}finally{Gr=!1,(Mn!==null||Fn!==null)&&(Io(),Ci())}}function Yn(e,t){var n=e.stateNode;if(n===null)return null;var r=Yi(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(s(231,t,typeof n));return n}var Xr=!1;if(N)try{var St={};Object.defineProperty(St,"passive",{get:function(){Xr=!0}}),window.addEventListener("test",St,St),window.removeEventListener("test",St,St)}catch{Xr=!1}function Ni(e,t,n,r,o,i,a,c,p){var x=Array.prototype.slice.call(arguments,3);try{t.apply(n,x)}catch(F){this.onError(F)}}var mn=!1,On=null,Xn=!1,Uo=null,Wl={onError:function(e){mn=!0,On=e}};function wr(e,t,n,r,o,i,a,c,p){mn=!1,On=null,Ni.apply(Wl,arguments)}function Jr(e,t,n,r,o,i,a,c,p){if(wr.apply(this,arguments),mn){if(mn){var x=On;mn=!1,On=null}else throw Error(s(198));Xn||(Xn=!0,Uo=x)}}function Vt(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 $o(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 Vo(e){if(Vt(e)!==e)throw Error(s(188))}function Pi(e){var t=e.alternate;if(!t){if(t=Vt(e),t===null)throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Vo(o),e;if(i===r)return Vo(o),t;i=i.sibling}throw Error(s(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,c=o.child;c;){if(c===n){a=!0,n=o,r=i;break}if(c===r){a=!0,r=o,n=i;break}c=c.sibling}if(!a){for(c=i.child;c;){if(c===n){a=!0,n=i,r=o;break}if(c===r){a=!0,r=i,n=o;break}c=c.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function en(e){return e=Pi(e),e!==null?Ft(e):null}function Ft(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ft(e);if(t!==null)return t;e=e.sibling}return null}var Bt=l.unstable_scheduleCallback,Sr=l.unstable_cancelCallback,br=l.unstable_shouldYield,tn=l.unstable_requestPaint,Pe=l.unstable_now,Wt=l.unstable_getCurrentPriorityLevel,Jn=l.unstable_ImmediatePriority,tt=l.unstable_UserBlockingPriority,An=l.unstable_NormalPriority,Ti=l.unstable_LowPriority,dt=l.unstable_IdlePriority,bn=null,Lt=null;function Hl(e){if(Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(bn,e,void 0,(e.current.flags&128)===128)}catch{}}var Ot=Math.clz32?Math.clz32:Bo,ht=Math.log,Kl=Math.LN2;function Bo(e){return e>>>=0,e===0?32:31-(ht(e)/Kl|0)|0}var Zr=64,eo=4194304;function nt(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zn(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var c=a&~o;c!==0?r=nt(c):(i&=a,i!==0&&(r=nt(i)))}else a=n&~o,a!==0?r=nt(a):i!==0&&(r=nt(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ot(t),o=1<<n,r|=e[n],t&=~o;return r}function Zn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kr(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Ot(i),c=1<<a,p=o[a];p===-1?((c&n)===0||(c&r)!==0)&&(o[a]=Zn(c,t)):p<=t&&(e.expiredLanes|=c),i&=~c}}function At(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ji(){var e=Zr;return Zr<<=1,(Zr&4194240)===0&&(Zr=64),e}function to(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=n}function Ql(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Ot(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function vn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ot(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var _e=0;function nn(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Ri,Wo,no,Mi,Fi,Ho=!1,ro=[],gn=null,rn=null,yn=null,Er=new Map,_r=new Map,Ht=[],wn="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 submit".split(" ");function Kt(e,t){switch(e){case"focusin":case"focusout":gn=null;break;case"dragenter":case"dragleave":rn=null;break;case"mouseover":case"mouseout":yn=null;break;case"pointerover":case"pointerout":Er.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_r.delete(t.pointerId)}}function Sn(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=ii(t),t!==null&&Wo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Li(e,t,n,r,o){switch(t){case"focusin":return gn=Sn(gn,e,t,n,r,o),!0;case"dragenter":return rn=Sn(rn,e,t,n,r,o),!0;case"mouseover":return yn=Sn(yn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Er.set(i,Sn(Er.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,_r.set(i,Sn(_r.get(i)||null,e,t,n,r,o)),!0}return!1}function Oi(e){var t=Rr(e.target);if(t!==null){var n=Vt(t);if(n!==null){if(t=n.tag,t===13){if(t=$o(n),t!==null){e.blockedOn=t,Fi(e.priority,function(){no(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 Cr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=m(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zt=r,n.target.dispatchEvent(r),Zt=null}else return t=ii(n),t!==null&&Wo(t),e.blockedOn=n,!1;t.shift()}return!0}function Ai(e,t,n){Cr(e)&&n.delete(t)}function ql(){Ho=!1,gn!==null&&Cr(gn)&&(gn=null),rn!==null&&Cr(rn)&&(rn=null),yn!==null&&Cr(yn)&&(yn=null),Er.forEach(Ai),_r.forEach(Ai)}function Nr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ho||(Ho=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,ql)))}function Pr(e){function t(o){return Nr(o,e)}if(0<ro.length){Nr(ro[0],e);for(var n=1;n<ro.length;n++){var r=ro[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gn!==null&&Nr(gn,e),rn!==null&&Nr(rn,e),yn!==null&&Nr(yn,e),Er.forEach(t),_r.forEach(t),n=0;n<Ht.length;n++)r=Ht[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ht.length&&(n=Ht[0],n.blockedOn===null);)Oi(n),n.blockedOn===null&&Ht.shift()}var er=U.ReactCurrentBatchConfig,oo=!0;function Ko(e,t,n,r){var o=_e,i=er.transition;er.transition=null;try{_e=1,lo(e,t,n,r)}finally{_e=o,er.transition=i}}function io(e,t,n,r){var o=_e,i=er.transition;er.transition=null;try{_e=4,lo(e,t,n,r)}finally{_e=o,er.transition=i}}function lo(e,t,n,r){if(oo){var o=m(e,t,n,r);if(o===null)ss(e,t,r,Tr,n),Kt(e,r);else if(Li(o,e,t,n,r))r.stopPropagation();else if(Kt(e,r),t&4&&-1<wn.indexOf(e)){for(;o!==null;){var i=ii(o);if(i!==null&&Ri(i),i=m(e,t,n,r),i===null&&ss(e,t,r,Tr,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else ss(e,t,r,null,n)}}var Tr=null;function m(e,t,n,r){if(Tr=null,e=qr(r),e=Rr(e),e!==null)if(t=Vt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=$o(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 Tr=e,null}function k(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Wt()){case Jn:return 1;case tt:return 4;case An:case Ti:return 16;case dt:return 536870912;default:return 16}default:return 16}}var P=null,M=null,X=null;function G(){if(X)return X;var e,t=M,n=t.length,r,o="value"in P?P.value:P.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return X=o.slice(e,1<r?1-r:void 0)}function Z(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 de(){return!0}function Ae(){return!1}function fe(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(i):i[c]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?de:Ae,this.isPropagationStopped=Ae,this}return W(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=de)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=de)},persist:function(){},isPersistent:de}),t}var We={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zt=fe(We),qe=W({},We,{view:0,detail:0}),kn=fe(qe),on,Dn,rt,ut=W({},qe,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Re,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!==rt&&(rt&&e.type==="mousemove"?(on=e.screenX-rt.screenX,Dn=e.screenY-rt.screenY):Dn=on=0,rt=e),on)},movementY:function(e){return"movementY"in e?e.movementY:Dn}}),so=fe(ut),zi=W({},ut,{dataTransfer:0}),Di=fe(zi),Gl=W({},qe,{relatedTarget:0}),Qo=fe(Gl),xn=W({},We,{animationName:0,elapsedTime:0,pseudoElement:0}),Yl=fe(xn),qo=W({},We,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uo=fe(qo),at=W({},We,{data:0}),Go=fe(at),Yo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ao={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"},Xl={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function he(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Xl[e])?!!t[e]:!1}function Re(){return he}var Ue=W({},qe,{key:function(e){if(e.key){var t=Yo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Z(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ao[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Re,charCode:function(e){return e.type==="keypress"?Z(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Z(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$e=fe(Ue),kt=W({},ut,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ct=fe(kt),jr=W({},qe,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Re}),Ii=fe(jr),Ui=W({},We,{propertyName:0,elapsedTime:0,pseudoElement:0}),$i=fe(Ui),Vi=W({},ut,{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}),Qf=fe(Vi),qf=[9,13,27,32],Jl=N&&"CompositionEvent"in window,Xo=null;N&&"documentMode"in document&&(Xo=document.documentMode);var Gf=N&&"TextEvent"in window&&!Xo,Ku=N&&(!Jl||Xo&&8<Xo&&11>=Xo),Qu=" ",qu=!1;function Gu(e,t){switch(e){case"keyup":return qf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var co=!1;function Yf(e,t){switch(e){case"compositionend":return Yu(t);case"keypress":return t.which!==32?null:(qu=!0,Qu);case"textInput":return e=t.data,e===Qu&&qu?null:e;default:return null}}function Xf(e,t){if(co)return e==="compositionend"||!Jl&&Gu(e,t)?(e=G(),X=M=P=null,co=!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 Ku&&t.locale!=="ko"?null:t.data;default:return null}}var Jf={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 Xu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jf[e.type]:t==="textarea"}function Ju(e,t,n,r){yr(r),t=Qi(t,"onChange"),0<t.length&&(n=new zt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jo=null,bo=null;function bf(e){ma(e,0)}function Bi(e){var t=vo(e);if(mr(t))return e}function Zf(e,t){if(e==="change")return t}var bu=!1;if(N){var bl;if(N){var Zl="oninput"in document;if(!Zl){var Zu=document.createElement("div");Zu.setAttribute("oninput","return;"),Zl=typeof Zu.oninput=="function"}bl=Zl}else bl=!1;bu=bl&&(!document.documentMode||9<document.documentMode)}function ea(){Jo&&(Jo.detachEvent("onpropertychange",ta),bo=Jo=null)}function ta(e){if(e.propertyName==="value"&&Bi(bo)){var t=[];Ju(t,bo,e,qr(e)),Yr(bf,t)}}function ed(e,t,n){e==="focusin"?(ea(),Jo=t,bo=n,Jo.attachEvent("onpropertychange",ta)):e==="focusout"&&ea()}function td(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bi(bo)}function nd(e,t){if(e==="click")return Bi(t)}function rd(e,t){if(e==="input"||e==="change")return Bi(t)}function od(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ln=typeof Object.is=="function"?Object.is:od;function Zo(e,t){if(ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!L.call(t,o)||!ln(e[o],t[o]))return!1}return!0}function na(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ra(e,t){var n=na(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=na(n)}}function oa(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oa(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ia(){for(var e=window,t=Ze();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ze(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")}function id(e){var t=ia(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&oa(n.ownerDocument.documentElement,n)){if(r!==null&&es(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ra(n,i);var a=ra(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ld=N&&"documentMode"in document&&11>=document.documentMode,fo=null,ts=null,ei=null,ns=!1;function la(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ns||fo==null||fo!==Ze(r)||(r=fo,"selectionStart"in r&&es(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ei&&Zo(ei,r)||(ei=r,r=Qi(ts,"onSelect"),0<r.length&&(t=new zt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fo)))}function Wi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ho={animationend:Wi("Animation","AnimationEnd"),animationiteration:Wi("Animation","AnimationIteration"),animationstart:Wi("Animation","AnimationStart"),transitionend:Wi("Transition","TransitionEnd")},rs={},sa={};N&&(sa=document.createElement("div").style,"AnimationEvent"in window||(delete ho.animationend.animation,delete ho.animationiteration.animation,delete ho.animationstart.animation),"TransitionEvent"in window||delete ho.transitionend.transition);function Hi(e){if(rs[e])return rs[e];if(!ho[e])return e;var t=ho[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in sa)return rs[e]=t[n];return e}var ua=Hi("animationend"),aa=Hi("animationiteration"),ca=Hi("animationstart"),fa=Hi("transitionend"),da=new Map,ha="abort auxClick 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(" ");function tr(e,t){da.set(e,t),y(t,[e])}for(var os=0;os<ha.length;os++){var is=ha[os],sd=is.toLowerCase(),ud=is[0].toUpperCase()+is.slice(1);tr(sd,"on"+ud)}tr(ua,"onAnimationEnd"),tr(aa,"onAnimationIteration"),tr(ca,"onAnimationStart"),tr("dblclick","onDoubleClick"),tr("focusin","onFocus"),tr("focusout","onBlur"),tr(fa,"onTransitionEnd"),E("onMouseEnter",["mouseout","mouseover"]),E("onMouseLeave",["mouseout","mouseover"]),E("onPointerEnter",["pointerout","pointerover"]),E("onPointerLeave",["pointerout","pointerover"]),y("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),y("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),y("onBeforeInput",["compositionend","keypress","textInput","paste"]),y("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),y("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),y("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ti="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(" "),ad=new Set("cancel close invalid load scroll toggle".split(" ").concat(ti));function pa(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Jr(r,t,void 0,e),e.currentTarget=null}function ma(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var c=r[a],p=c.instance,x=c.currentTarget;if(c=c.listener,p!==i&&o.isPropagationStopped())break e;pa(o,c,x),i=p}else for(a=0;a<r.length;a++){if(c=r[a],p=c.instance,x=c.currentTarget,c=c.listener,p!==i&&o.isPropagationStopped())break e;pa(o,c,x),i=p}}}if(Xn)throw e=Uo,Xn=!1,Uo=null,e}function Fe(e,t){var n=t[hs];n===void 0&&(n=t[hs]=new Set);var r=e+"__bubble";n.has(r)||(va(t,e,2,!1),n.add(r))}function ls(e,t,n){var r=0;t&&(r|=4),va(n,e,r,t)}var Ki="_reactListening"+Math.random().toString(36).slice(2);function ni(e){if(!e[Ki]){e[Ki]=!0,f.forEach(function(n){n!=="selectionchange"&&(ad.has(n)||ls(n,!1,e),ls(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ki]||(t[Ki]=!0,ls("selectionchange",!1,t))}}function va(e,t,n,r){switch(k(t)){case 1:var o=Ko;break;case 4:o=io;break;default:o=lo}n=o.bind(null,t,n,e),o=void 0,!Xr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ss(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var c=r.stateNode.containerInfo;if(c===o||c.nodeType===8&&c.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var p=a.tag;if((p===3||p===4)&&(p=a.stateNode.containerInfo,p===o||p.nodeType===8&&p.parentNode===o))return;a=a.return}for(;c!==null;){if(a=Rr(c),a===null)return;if(p=a.tag,p===5||p===6){r=i=a;continue e}c=c.parentNode}}r=r.return}Yr(function(){var x=i,F=qr(n),O=[];e:{var R=da.get(e);if(R!==void 0){var Y=zt,ee=e;switch(e){case"keypress":if(Z(n)===0)break e;case"keydown":case"keyup":Y=$e;break;case"focusin":ee="focus",Y=Qo;break;case"focusout":ee="blur",Y=Qo;break;case"beforeblur":case"afterblur":Y=Qo;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":Y=so;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=Di;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Ii;break;case ua:case aa:case ca:Y=Yl;break;case fa:Y=$i;break;case"scroll":Y=kn;break;case"wheel":Y=Qf;break;case"copy":case"cut":case"paste":Y=uo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Ct}var re=(t&4)!==0,Ke=!re&&e==="scroll",w=re?R!==null?R+"Capture":null:R;re=[];for(var v=x,S;v!==null;){S=v;var A=S.stateNode;if(S.tag===5&&A!==null&&(S=A,w!==null&&(A=Yn(v,w),A!=null&&re.push(ri(v,A,S)))),Ke)break;v=v.return}0<re.length&&(R=new Y(R,ee,null,n,F),O.push({event:R,listeners:re}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",R&&n!==Zt&&(ee=n.relatedTarget||n.fromElement)&&(Rr(ee)||ee[In]))break e;if((Y||R)&&(R=F.window===F?F:(R=F.ownerDocument)?R.defaultView||R.parentWindow:window,Y?(ee=n.relatedTarget||n.toElement,Y=x,ee=ee?Rr(ee):null,ee!==null&&(Ke=Vt(ee),ee!==Ke||ee.tag!==5&&ee.tag!==6)&&(ee=null)):(Y=null,ee=x),Y!==ee)){if(re=so,A="onMouseLeave",w="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(re=Ct,A="onPointerLeave",w="onPointerEnter",v="pointer"),Ke=Y==null?R:vo(Y),S=ee==null?R:vo(ee),R=new re(A,v+"leave",Y,n,F),R.target=Ke,R.relatedTarget=S,A=null,Rr(F)===x&&(re=new re(w,v+"enter",ee,n,F),re.target=S,re.relatedTarget=Ke,A=re),Ke=A,Y&&ee)t:{for(re=Y,w=ee,v=0,S=re;S;S=po(S))v++;for(S=0,A=w;A;A=po(A))S++;for(;0<v-S;)re=po(re),v--;for(;0<S-v;)w=po(w),S--;for(;v--;){if(re===w||w!==null&&re===w.alternate)break t;re=po(re),w=po(w)}re=null}else re=null;Y!==null&&ga(O,R,Y,re,!1),ee!==null&&Ke!==null&&ga(O,Ke,ee,re,!0)}}e:{if(R=x?vo(x):window,Y=R.nodeName&&R.nodeName.toLowerCase(),Y==="select"||Y==="input"&&R.type==="file")var oe=Zf;else if(Xu(R))if(bu)oe=rd;else{oe=td;var ae=ed}else(Y=R.nodeName)&&Y.toLowerCase()==="input"&&(R.type==="checkbox"||R.type==="radio")&&(oe=nd);if(oe&&(oe=oe(e,x))){Ju(O,oe,n,F);break e}ae&&ae(e,R,x),e==="focusout"&&(ae=R._wrapperState)&&ae.controlled&&R.type==="number"&&Tn(R,"number",R.value)}switch(ae=x?vo(x):window,e){case"focusin":(Xu(ae)||ae.contentEditable==="true")&&(fo=ae,ts=x,ei=null);break;case"focusout":ei=ts=fo=null;break;case"mousedown":ns=!0;break;case"contextmenu":case"mouseup":case"dragend":ns=!1,la(O,n,F);break;case"selectionchange":if(ld)break;case"keydown":case"keyup":la(O,n,F)}var ce;if(Jl)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else co?Gu(e,n)&&(pe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(pe="onCompositionStart");pe&&(Ku&&n.locale!=="ko"&&(co||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&co&&(ce=G()):(P=F,M="value"in P?P.value:P.textContent,co=!0)),ae=Qi(x,pe),0<ae.length&&(pe=new Go(pe,e,null,n,F),O.push({event:pe,listeners:ae}),ce?pe.data=ce:(ce=Yu(n),ce!==null&&(pe.data=ce)))),(ce=Gf?Yf(e,n):Xf(e,n))&&(x=Qi(x,"onBeforeInput"),0<x.length&&(F=new Go("onBeforeInput","beforeinput",null,n,F),O.push({event:F,listeners:x}),F.data=ce))}ma(O,t)})}function ri(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qi(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Yn(e,n),i!=null&&r.unshift(ri(e,i,o)),i=Yn(e,t),i!=null&&r.push(ri(e,i,o))),e=e.return}return r}function po(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ga(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var c=n,p=c.alternate,x=c.stateNode;if(p!==null&&p===r)break;c.tag===5&&x!==null&&(c=x,o?(p=Yn(n,i),p!=null&&a.unshift(ri(n,p,c))):o||(p=Yn(n,i),p!=null&&a.push(ri(n,p,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var cd=/\r\n?/g,fd=/\u0000|\uFFFD/g;function ya(e){return(typeof e=="string"?e:""+e).replace(cd,`
|
|
39
|
+
`).replace(fd,"")}function qi(e,t,n){if(t=ya(t),ya(e)!==t&&n)throw Error(s(425))}function Gi(){}var us=null,as=null;function cs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fs=typeof setTimeout=="function"?setTimeout:void 0,dd=typeof clearTimeout=="function"?clearTimeout:void 0,wa=typeof Promise=="function"?Promise:void 0,hd=typeof queueMicrotask=="function"?queueMicrotask:typeof wa<"u"?function(e){return wa.resolve(null).then(e).catch(pd)}:fs;function pd(e){setTimeout(function(){throw e})}function ds(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Pr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Pr(t)}function nr(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==="$?")break;if(t==="/$")return null}}return e}function Sa(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var mo=Math.random().toString(36).slice(2),En="__reactFiber$"+mo,oi="__reactProps$"+mo,In="__reactContainer$"+mo,hs="__reactEvents$"+mo,md="__reactListeners$"+mo,vd="__reactHandles$"+mo;function Rr(e){var t=e[En];if(t)return t;for(var n=e.parentNode;n;){if(t=n[In]||n[En]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sa(e);e!==null;){if(n=e[En])return n;e=Sa(e)}return t}e=n,n=e.parentNode}return null}function ii(e){return e=e[En]||e[In],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function vo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function Yi(e){return e[oi]||null}var ps=[],go=-1;function rr(e){return{current:e}}function Le(e){0>go||(e.current=ps[go],ps[go]=null,go--)}function Me(e,t){go++,ps[go]=e.current,e.current=t}var or={},pt=rr(or),Nt=rr(!1),Mr=or;function yo(e,t){var n=e.type.contextTypes;if(!n)return or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Pt(e){return e=e.childContextTypes,e!=null}function Xi(){Le(Nt),Le(pt)}function ka(e,t,n){if(pt.current!==or)throw Error(s(168));Me(pt,t),Me(Nt,n)}function xa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(s(108,ge(e)||"Unknown",o));return W({},n,r)}function Ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Mr=pt.current,Me(pt,e),Me(Nt,Nt.current),!0}function Ea(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=xa(e,t,Mr),r.__reactInternalMemoizedMergedChildContext=e,Le(Nt),Le(pt),Me(pt,e)):Le(Nt),Me(Nt,n)}var Un=null,bi=!1,ms=!1;function _a(e){Un===null?Un=[e]:Un.push(e)}function gd(e){bi=!0,_a(e)}function ir(){if(!ms&&Un!==null){ms=!0;var e=0,t=_e;try{var n=Un;for(_e=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Un=null,bi=!1}catch(o){throw Un!==null&&(Un=Un.slice(e+1)),Bt(Jn,ir),o}finally{_e=t,ms=!1}}return null}var wo=[],So=0,Zi=null,el=0,Qt=[],qt=0,Fr=null,$n=1,Vn="";function Lr(e,t){wo[So++]=el,wo[So++]=Zi,Zi=e,el=t}function Ca(e,t,n){Qt[qt++]=$n,Qt[qt++]=Vn,Qt[qt++]=Fr,Fr=e;var r=$n;e=Vn;var o=32-Ot(r)-1;r&=~(1<<o),n+=1;var i=32-Ot(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,$n=1<<32-Ot(t)+o|n<<o|r,Vn=i+e}else $n=1<<i|n<<o|r,Vn=e}function vs(e){e.return!==null&&(Lr(e,1),Ca(e,1,0))}function gs(e){for(;e===Zi;)Zi=wo[--So],wo[So]=null,el=wo[--So],wo[So]=null;for(;e===Fr;)Fr=Qt[--qt],Qt[qt]=null,Vn=Qt[--qt],Qt[qt]=null,$n=Qt[--qt],Qt[qt]=null}var Dt=null,It=null,ze=!1,sn=null;function Na(e,t){var n=Jt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Pa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Dt=e,It=nr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Dt=e,It=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Fr!==null?{id:$n,overflow:Vn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Jt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Dt=e,It=null,!0):!1;default:return!1}}function ys(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ws(e){if(ze){var t=It;if(t){var n=t;if(!Pa(e,t)){if(ys(e))throw Error(s(418));t=nr(n.nextSibling);var r=Dt;t&&Pa(e,t)?Na(r,n):(e.flags=e.flags&-4097|2,ze=!1,Dt=e)}}else{if(ys(e))throw Error(s(418));e.flags=e.flags&-4097|2,ze=!1,Dt=e}}}function Ta(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Dt=e}function tl(e){if(e!==Dt)return!1;if(!ze)return Ta(e),ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!cs(e.type,e.memoizedProps)),t&&(t=It)){if(ys(e))throw ja(),Error(s(418));for(;t;)Na(e,t),t=nr(t.nextSibling)}if(Ta(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){It=nr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}It=null}}else It=Dt?nr(e.stateNode.nextSibling):null;return!0}function ja(){for(var e=It;e;)e=nr(e.nextSibling)}function ko(){It=Dt=null,ze=!1}function Ss(e){sn===null?sn=[e]:sn.push(e)}var yd=U.ReactCurrentBatchConfig;function li(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var c=o.refs;a===null?delete c[i]:c[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function nl(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ra(e){var t=e._init;return t(e._payload)}function Ma(e){function t(w,v){if(e){var S=w.deletions;S===null?(w.deletions=[v],w.flags|=16):S.push(v)}}function n(w,v){if(!e)return null;for(;v!==null;)t(w,v),v=v.sibling;return null}function r(w,v){for(w=new Map;v!==null;)v.key!==null?w.set(v.key,v):w.set(v.index,v),v=v.sibling;return w}function o(w,v){return w=hr(w,v),w.index=0,w.sibling=null,w}function i(w,v,S){return w.index=S,e?(S=w.alternate,S!==null?(S=S.index,S<v?(w.flags|=2,v):S):(w.flags|=2,v)):(w.flags|=1048576,v)}function a(w){return e&&w.alternate===null&&(w.flags|=2),w}function c(w,v,S,A){return v===null||v.tag!==6?(v=fu(S,w.mode,A),v.return=w,v):(v=o(v,S),v.return=w,v)}function p(w,v,S,A){var oe=S.type;return oe===ne?F(w,v,S.props.children,A,S.key):v!==null&&(v.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===Ie&&Ra(oe)===v.type)?(A=o(v,S.props),A.ref=li(w,v,S),A.return=w,A):(A=Nl(S.type,S.key,S.props,null,w.mode,A),A.ref=li(w,v,S),A.return=w,A)}function x(w,v,S,A){return v===null||v.tag!==4||v.stateNode.containerInfo!==S.containerInfo||v.stateNode.implementation!==S.implementation?(v=du(S,w.mode,A),v.return=w,v):(v=o(v,S.children||[]),v.return=w,v)}function F(w,v,S,A,oe){return v===null||v.tag!==7?(v=Vr(S,w.mode,A,oe),v.return=w,v):(v=o(v,S),v.return=w,v)}function O(w,v,S){if(typeof v=="string"&&v!==""||typeof v=="number")return v=fu(""+v,w.mode,S),v.return=w,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case H:return S=Nl(v.type,v.key,v.props,null,w.mode,S),S.ref=li(w,null,v),S.return=w,S;case D:return v=du(v,w.mode,S),v.return=w,v;case Ie:var A=v._init;return O(w,A(v._payload),S)}if(bt(v)||se(v))return v=Vr(v,w.mode,S,null),v.return=w,v;nl(w,v)}return null}function R(w,v,S,A){var oe=v!==null?v.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return oe!==null?null:c(w,v,""+S,A);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case H:return S.key===oe?p(w,v,S,A):null;case D:return S.key===oe?x(w,v,S,A):null;case Ie:return oe=S._init,R(w,v,oe(S._payload),A)}if(bt(S)||se(S))return oe!==null?null:F(w,v,S,A,null);nl(w,S)}return null}function Y(w,v,S,A,oe){if(typeof A=="string"&&A!==""||typeof A=="number")return w=w.get(S)||null,c(v,w,""+A,oe);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case H:return w=w.get(A.key===null?S:A.key)||null,p(v,w,A,oe);case D:return w=w.get(A.key===null?S:A.key)||null,x(v,w,A,oe);case Ie:var ae=A._init;return Y(w,v,S,ae(A._payload),oe)}if(bt(A)||se(A))return w=w.get(S)||null,F(v,w,A,oe,null);nl(v,A)}return null}function ee(w,v,S,A){for(var oe=null,ae=null,ce=v,pe=v=0,lt=null;ce!==null&&pe<S.length;pe++){ce.index>pe?(lt=ce,ce=null):lt=ce.sibling;var Te=R(w,ce,S[pe],A);if(Te===null){ce===null&&(ce=lt);break}e&&ce&&Te.alternate===null&&t(w,ce),v=i(Te,v,pe),ae===null?oe=Te:ae.sibling=Te,ae=Te,ce=lt}if(pe===S.length)return n(w,ce),ze&&Lr(w,pe),oe;if(ce===null){for(;pe<S.length;pe++)ce=O(w,S[pe],A),ce!==null&&(v=i(ce,v,pe),ae===null?oe=ce:ae.sibling=ce,ae=ce);return ze&&Lr(w,pe),oe}for(ce=r(w,ce);pe<S.length;pe++)lt=Y(ce,w,pe,S[pe],A),lt!==null&&(e&<.alternate!==null&&ce.delete(lt.key===null?pe:lt.key),v=i(lt,v,pe),ae===null?oe=lt:ae.sibling=lt,ae=lt);return e&&ce.forEach(function(pr){return t(w,pr)}),ze&&Lr(w,pe),oe}function re(w,v,S,A){var oe=se(S);if(typeof oe!="function")throw Error(s(150));if(S=oe.call(S),S==null)throw Error(s(151));for(var ae=oe=null,ce=v,pe=v=0,lt=null,Te=S.next();ce!==null&&!Te.done;pe++,Te=S.next()){ce.index>pe?(lt=ce,ce=null):lt=ce.sibling;var pr=R(w,ce,Te.value,A);if(pr===null){ce===null&&(ce=lt);break}e&&ce&&pr.alternate===null&&t(w,ce),v=i(pr,v,pe),ae===null?oe=pr:ae.sibling=pr,ae=pr,ce=lt}if(Te.done)return n(w,ce),ze&&Lr(w,pe),oe;if(ce===null){for(;!Te.done;pe++,Te=S.next())Te=O(w,Te.value,A),Te!==null&&(v=i(Te,v,pe),ae===null?oe=Te:ae.sibling=Te,ae=Te);return ze&&Lr(w,pe),oe}for(ce=r(w,ce);!Te.done;pe++,Te=S.next())Te=Y(ce,w,pe,Te.value,A),Te!==null&&(e&&Te.alternate!==null&&ce.delete(Te.key===null?pe:Te.key),v=i(Te,v,pe),ae===null?oe=Te:ae.sibling=Te,ae=Te);return e&&ce.forEach(function(Jd){return t(w,Jd)}),ze&&Lr(w,pe),oe}function Ke(w,v,S,A){if(typeof S=="object"&&S!==null&&S.type===ne&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case H:e:{for(var oe=S.key,ae=v;ae!==null;){if(ae.key===oe){if(oe=S.type,oe===ne){if(ae.tag===7){n(w,ae.sibling),v=o(ae,S.props.children),v.return=w,w=v;break e}}else if(ae.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===Ie&&Ra(oe)===ae.type){n(w,ae.sibling),v=o(ae,S.props),v.ref=li(w,ae,S),v.return=w,w=v;break e}n(w,ae);break}else t(w,ae);ae=ae.sibling}S.type===ne?(v=Vr(S.props.children,w.mode,A,S.key),v.return=w,w=v):(A=Nl(S.type,S.key,S.props,null,w.mode,A),A.ref=li(w,v,S),A.return=w,w=A)}return a(w);case D:e:{for(ae=S.key;v!==null;){if(v.key===ae)if(v.tag===4&&v.stateNode.containerInfo===S.containerInfo&&v.stateNode.implementation===S.implementation){n(w,v.sibling),v=o(v,S.children||[]),v.return=w,w=v;break e}else{n(w,v);break}else t(w,v);v=v.sibling}v=du(S,w.mode,A),v.return=w,w=v}return a(w);case Ie:return ae=S._init,Ke(w,v,ae(S._payload),A)}if(bt(S))return ee(w,v,S,A);if(se(S))return re(w,v,S,A);nl(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,v!==null&&v.tag===6?(n(w,v.sibling),v=o(v,S),v.return=w,w=v):(n(w,v),v=fu(S,w.mode,A),v.return=w,w=v),a(w)):n(w,v)}return Ke}var xo=Ma(!0),Fa=Ma(!1),rl=rr(null),ol=null,Eo=null,ks=null;function xs(){ks=Eo=ol=null}function Es(e){var t=rl.current;Le(rl),e._currentValue=t}function _s(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _o(e,t){ol=e,ks=Eo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Tt=!0),e.firstContext=null)}function Gt(e){var t=e._currentValue;if(ks!==e)if(e={context:e,memoizedValue:t,next:null},Eo===null){if(ol===null)throw Error(s(308));Eo=e,ol.dependencies={lanes:0,firstContext:e}}else Eo=Eo.next=e;return t}var Or=null;function Cs(e){Or===null?Or=[e]:Or.push(e)}function La(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Cs(t)):(n.next=o.next,o.next=n),t.interleaved=n,Bn(e,r)}function Bn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var lr=!1;function Ns(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Oa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Wn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function sr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ce&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Bn(e,n)}return o=r.interleaved,o===null?(t.next=t,Cs(r)):(t.next=o.next,o.next=t),r.interleaved=t,Bn(e,n)}function il(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vn(e,n)}}function Aa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ll(e,t,n,r){var o=e.updateQueue;lr=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,c=o.shared.pending;if(c!==null){o.shared.pending=null;var p=c,x=p.next;p.next=null,a===null?i=x:a.next=x,a=p;var F=e.alternate;F!==null&&(F=F.updateQueue,c=F.lastBaseUpdate,c!==a&&(c===null?F.firstBaseUpdate=x:c.next=x,F.lastBaseUpdate=p))}if(i!==null){var O=o.baseState;a=0,F=x=p=null,c=i;do{var R=c.lane,Y=c.eventTime;if((r&R)===R){F!==null&&(F=F.next={eventTime:Y,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var ee=e,re=c;switch(R=t,Y=n,re.tag){case 1:if(ee=re.payload,typeof ee=="function"){O=ee.call(Y,O,R);break e}O=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=re.payload,R=typeof ee=="function"?ee.call(Y,O,R):ee,R==null)break e;O=W({},O,R);break e;case 2:lr=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,R=o.effects,R===null?o.effects=[c]:R.push(c))}else Y={eventTime:Y,lane:R,tag:c.tag,payload:c.payload,callback:c.callback,next:null},F===null?(x=F=Y,p=O):F=F.next=Y,a|=R;if(c=c.next,c===null){if(c=o.shared.pending,c===null)break;R=c,c=R.next,R.next=null,o.lastBaseUpdate=R,o.shared.pending=null}}while(!0);if(F===null&&(p=O),o.baseState=p,o.firstBaseUpdate=x,o.lastBaseUpdate=F,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Dr|=a,e.lanes=a,e.memoizedState=O}}function za(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(s(191,o));o.call(r)}}}var si={},_n=rr(si),ui=rr(si),ai=rr(si);function Ar(e){if(e===si)throw Error(s(174));return e}function Ps(e,t){switch(Me(ai,t),Me(ui,e),Me(_n,si),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Oo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Oo(t,e)}Le(_n),Me(_n,t)}function Co(){Le(_n),Le(ui),Le(ai)}function Da(e){Ar(ai.current);var t=Ar(_n.current),n=Oo(t,e.type);t!==n&&(Me(ui,e),Me(_n,n))}function Ts(e){ui.current===e&&(Le(_n),Le(ui))}var Ve=rr(0);function sl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 js=[];function Rs(){for(var e=0;e<js.length;e++)js[e]._workInProgressVersionPrimary=null;js.length=0}var ul=U.ReactCurrentDispatcher,Ms=U.ReactCurrentBatchConfig,zr=0,Be=null,Xe=null,ot=null,al=!1,ci=!1,fi=0,wd=0;function mt(){throw Error(s(321))}function Fs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ln(e[n],t[n]))return!1;return!0}function Ls(e,t,n,r,o,i){if(zr=i,Be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ul.current=e===null||e.memoizedState===null?Ed:_d,e=n(r,o),ci){i=0;do{if(ci=!1,fi=0,25<=i)throw Error(s(301));i+=1,ot=Xe=null,t.updateQueue=null,ul.current=Cd,e=n(r,o)}while(ci)}if(ul.current=dl,t=Xe!==null&&Xe.next!==null,zr=0,ot=Xe=Be=null,al=!1,t)throw Error(s(300));return e}function Os(){var e=fi!==0;return fi=0,e}function Cn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Be.memoizedState=ot=e:ot=ot.next=e,ot}function Yt(){if(Xe===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?Be.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw Error(s(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?Be.memoizedState=ot=e:ot=ot.next=e}return ot}function di(e,t){return typeof t=="function"?t(e):t}function As(e){var t=Yt(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=Xe,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var c=a=null,p=null,x=i;do{var F=x.lane;if((zr&F)===F)p!==null&&(p=p.next={lane:0,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),r=x.hasEagerState?x.eagerState:e(r,x.action);else{var O={lane:F,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null};p===null?(c=p=O,a=r):p=p.next=O,Be.lanes|=F,Dr|=F}x=x.next}while(x!==null&&x!==i);p===null?a=r:p.next=c,ln(r,t.memoizedState)||(Tt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=p,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Be.lanes|=i,Dr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function zs(e){var t=Yt(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);ln(i,t.memoizedState)||(Tt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ia(){}function Ua(e,t){var n=Be,r=Yt(),o=t(),i=!ln(r.memoizedState,o);if(i&&(r.memoizedState=o,Tt=!0),r=r.queue,Ds(Ba.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||ot!==null&&ot.memoizedState.tag&1){if(n.flags|=2048,hi(9,Va.bind(null,n,r,o,t),void 0,null),it===null)throw Error(s(349));(zr&30)!==0||$a(n,t,o)}return o}function $a(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Va(e,t,n,r){t.value=n,t.getSnapshot=r,Wa(t)&&Ha(e)}function Ba(e,t,n){return n(function(){Wa(t)&&Ha(e)})}function Wa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ln(e,n)}catch{return!0}}function Ha(e){var t=Bn(e,1);t!==null&&fn(t,e,1,-1)}function Ka(e){var t=Cn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:e},t.queue=e,e=e.dispatch=xd.bind(null,Be,e),[t.memoizedState,e]}function hi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Qa(){return Yt().memoizedState}function cl(e,t,n,r){var o=Cn();Be.flags|=e,o.memoizedState=hi(1|t,n,void 0,r===void 0?null:r)}function fl(e,t,n,r){var o=Yt();r=r===void 0?null:r;var i=void 0;if(Xe!==null){var a=Xe.memoizedState;if(i=a.destroy,r!==null&&Fs(r,a.deps)){o.memoizedState=hi(t,n,i,r);return}}Be.flags|=e,o.memoizedState=hi(1|t,n,i,r)}function qa(e,t){return cl(8390656,8,e,t)}function Ds(e,t){return fl(2048,8,e,t)}function Ga(e,t){return fl(4,2,e,t)}function Ya(e,t){return fl(4,4,e,t)}function Xa(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ja(e,t,n){return n=n!=null?n.concat([e]):null,fl(4,4,Xa.bind(null,t,e),n)}function Is(){}function ba(e,t){var n=Yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Za(e,t){var n=Yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ec(e,t,n){return(zr&21)===0?(e.baseState&&(e.baseState=!1,Tt=!0),e.memoizedState=n):(ln(n,t)||(n=ji(),Be.lanes|=n,Dr|=n,e.baseState=!0),t)}function Sd(e,t){var n=_e;_e=n!==0&&4>n?n:4,e(!0);var r=Ms.transition;Ms.transition={};try{e(!1),t()}finally{_e=n,Ms.transition=r}}function tc(){return Yt().memoizedState}function kd(e,t,n){var r=fr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},nc(e))rc(t,n);else if(n=La(e,t,n,r),n!==null){var o=Et();fn(n,e,r,o),oc(n,t,r)}}function xd(e,t,n){var r=fr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(nc(e))rc(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,c=i(a,n);if(o.hasEagerState=!0,o.eagerState=c,ln(c,a)){var p=t.interleaved;p===null?(o.next=o,Cs(t)):(o.next=p.next,p.next=o),t.interleaved=o;return}}catch{}finally{}n=La(e,t,o,r),n!==null&&(o=Et(),fn(n,e,r,o),oc(n,t,r))}}function nc(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function rc(e,t){ci=al=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vn(e,n)}}var dl={readContext:Gt,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useInsertionEffect:mt,useLayoutEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useMutableSource:mt,useSyncExternalStore:mt,useId:mt,unstable_isNewReconciler:!1},Ed={readContext:Gt,useCallback:function(e,t){return Cn().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:qa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,cl(4194308,4,Xa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cl(4194308,4,e,t)},useInsertionEffect:function(e,t){return cl(4,2,e,t)},useMemo:function(e,t){var n=Cn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Cn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=kd.bind(null,Be,e),[r.memoizedState,e]},useRef:function(e){var t=Cn();return e={current:e},t.memoizedState=e},useState:Ka,useDebugValue:Is,useDeferredValue:function(e){return Cn().memoizedState=e},useTransition:function(){var e=Ka(!1),t=e[0];return e=Sd.bind(null,e[1]),Cn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Be,o=Cn();if(ze){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),it===null)throw Error(s(349));(zr&30)!==0||$a(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,qa(Ba.bind(null,r,i,e),[e]),r.flags|=2048,hi(9,Va.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Cn(),t=it.identifierPrefix;if(ze){var n=Vn,r=$n;n=(r&~(1<<32-Ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=fi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=wd++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_d={readContext:Gt,useCallback:ba,useContext:Gt,useEffect:Ds,useImperativeHandle:Ja,useInsertionEffect:Ga,useLayoutEffect:Ya,useMemo:Za,useReducer:As,useRef:Qa,useState:function(){return As(di)},useDebugValue:Is,useDeferredValue:function(e){var t=Yt();return ec(t,Xe.memoizedState,e)},useTransition:function(){var e=As(di)[0],t=Yt().memoizedState;return[e,t]},useMutableSource:Ia,useSyncExternalStore:Ua,useId:tc,unstable_isNewReconciler:!1},Cd={readContext:Gt,useCallback:ba,useContext:Gt,useEffect:Ds,useImperativeHandle:Ja,useInsertionEffect:Ga,useLayoutEffect:Ya,useMemo:Za,useReducer:zs,useRef:Qa,useState:function(){return zs(di)},useDebugValue:Is,useDeferredValue:function(e){var t=Yt();return Xe===null?t.memoizedState=e:ec(t,Xe.memoizedState,e)},useTransition:function(){var e=zs(di)[0],t=Yt().memoizedState;return[e,t]},useMutableSource:Ia,useSyncExternalStore:Ua,useId:tc,unstable_isNewReconciler:!1};function un(e,t){if(e&&e.defaultProps){t=W({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:W({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hl={isMounted:function(e){return(e=e._reactInternals)?Vt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Et(),o=fr(e),i=Wn(r,o);i.payload=t,n!=null&&(i.callback=n),t=sr(e,i,o),t!==null&&(fn(t,e,o,r),il(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Et(),o=fr(e),i=Wn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=sr(e,i,o),t!==null&&(fn(t,e,o,r),il(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Et(),r=fr(e),o=Wn(n,r);o.tag=2,t!=null&&(o.callback=t),t=sr(e,o,r),t!==null&&(fn(t,e,r,n),il(t,e,r))}};function ic(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Zo(n,r)||!Zo(o,i):!0}function lc(e,t,n){var r=!1,o=or,i=t.contextType;return typeof i=="object"&&i!==null?i=Gt(i):(o=Pt(t)?Mr:pt.current,r=t.contextTypes,i=(r=r!=null)?yo(e,o):or),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=hl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function sc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&hl.enqueueReplaceState(t,t.state,null)}function $s(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ns(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Gt(i):(i=Pt(t)?Mr:pt.current,o.context=yo(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Us(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&hl.enqueueReplaceState(o,o.state,null),ll(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function No(e,t){try{var n="",r=t;do n+=me(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
40
|
+
Error generating stack: `+i.message+`
|
|
41
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Vs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Nd=typeof WeakMap=="function"?WeakMap:Map;function uc(e,t,n){n=Wn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Sl||(Sl=!0,ru=r),Bs(e,t)},n}function ac(e,t,n){n=Wn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Bs(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Bs(e,t),typeof r!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function cc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nd;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=$d.bind(null,e,t,n),t.then(e,e))}function fc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function dc(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Wn(-1,1),t.tag=2,sr(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Pd=U.ReactCurrentOwner,Tt=!1;function xt(e,t,n,r){t.child=e===null?Fa(t,null,n,r):xo(t,e.child,n,r)}function hc(e,t,n,r,o){n=n.render;var i=t.ref;return _o(t,o),r=Ls(e,t,n,r,i,o),n=Os(),e!==null&&!Tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Hn(e,t,o)):(ze&&n&&vs(t),t.flags|=1,xt(e,t,r,o),t.child)}function pc(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!cu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,mc(e,t,i,r,o)):(e=Nl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Zo,n(a,r)&&e.ref===t.ref)return Hn(e,t,o)}return t.flags|=1,e=hr(i,r),e.ref=t.ref,e.return=t,t.child=e}function mc(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Zo(i,r)&&e.ref===t.ref)if(Tt=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Tt=!0);else return t.lanes=e.lanes,Hn(e,t,o)}return Ws(e,t,n,r,o)}function vc(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Me(To,Ut),Ut|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Me(To,Ut),Ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Me(To,Ut),Ut|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Me(To,Ut),Ut|=r;return xt(e,t,o,n),t.child}function gc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ws(e,t,n,r,o){var i=Pt(n)?Mr:pt.current;return i=yo(t,i),_o(t,o),n=Ls(e,t,n,r,i,o),r=Os(),e!==null&&!Tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Hn(e,t,o)):(ze&&r&&vs(t),t.flags|=1,xt(e,t,n,o),t.child)}function yc(e,t,n,r,o){if(Pt(n)){var i=!0;Ji(t)}else i=!1;if(_o(t,o),t.stateNode===null)ml(e,t),lc(t,n,r),$s(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,c=t.memoizedProps;a.props=c;var p=a.context,x=n.contextType;typeof x=="object"&&x!==null?x=Gt(x):(x=Pt(n)?Mr:pt.current,x=yo(t,x));var F=n.getDerivedStateFromProps,O=typeof F=="function"||typeof a.getSnapshotBeforeUpdate=="function";O||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==r||p!==x)&&sc(t,a,r,x),lr=!1;var R=t.memoizedState;a.state=R,ll(t,r,a,o),p=t.memoizedState,c!==r||R!==p||Nt.current||lr?(typeof F=="function"&&(Us(t,n,F,r),p=t.memoizedState),(c=lr||ic(t,n,c,r,R,p,x))?(O||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=x,r=c):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Oa(e,t),c=t.memoizedProps,x=t.type===t.elementType?c:un(t.type,c),a.props=x,O=t.pendingProps,R=a.context,p=n.contextType,typeof p=="object"&&p!==null?p=Gt(p):(p=Pt(n)?Mr:pt.current,p=yo(t,p));var Y=n.getDerivedStateFromProps;(F=typeof Y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==O||R!==p)&&sc(t,a,r,p),lr=!1,R=t.memoizedState,a.state=R,ll(t,r,a,o);var ee=t.memoizedState;c!==O||R!==ee||Nt.current||lr?(typeof Y=="function"&&(Us(t,n,Y,r),ee=t.memoizedState),(x=lr||ic(t,n,x,r,R,ee,p)||!1)?(F||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,ee,p),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,ee,p)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=ee),a.props=r,a.state=ee,a.context=p,r=x):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),r=!1)}return Hs(e,t,n,r,i,o)}function Hs(e,t,n,r,o,i){gc(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&Ea(t,n,!1),Hn(e,t,i);r=t.stateNode,Pd.current=t;var c=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=xo(t,e.child,null,i),t.child=xo(t,null,c,i)):xt(e,t,c,i),t.memoizedState=r.state,o&&Ea(t,n,!0),t.child}function wc(e){var t=e.stateNode;t.pendingContext?ka(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ka(e,t.context,!1),Ps(e,t.containerInfo)}function Sc(e,t,n,r,o){return ko(),Ss(o),t.flags|=256,xt(e,t,n,r),t.child}var Ks={dehydrated:null,treeContext:null,retryLane:0};function Qs(e){return{baseLanes:e,cachePool:null,transitions:null}}function kc(e,t,n){var r=t.pendingProps,o=Ve.current,i=!1,a=(t.flags&128)!==0,c;if((c=a)||(c=e!==null&&e.memoizedState===null?!1:(o&2)!==0),c?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Me(Ve,o&1),e===null)return ws(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Pl(a,r,0,null),e=Vr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Qs(n),t.memoizedState=Ks,e):qs(t,a));if(o=e.memoizedState,o!==null&&(c=o.dehydrated,c!==null))return Td(e,t,a,r,c,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,c=o.sibling;var p={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=p,t.deletions=null):(r=hr(o,p),r.subtreeFlags=o.subtreeFlags&14680064),c!==null?i=hr(c,i):(i=Vr(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?Qs(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=Ks,r}return i=e.child,e=i.sibling,r=hr(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function qs(e,t){return t=Pl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function pl(e,t,n,r){return r!==null&&Ss(r),xo(t,e.child,null,n),e=qs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Td(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=Vs(Error(s(422))),pl(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Pl({mode:"visible",children:r.children},o,0,null),i=Vr(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&xo(t,e.child,null,a),t.child.memoizedState=Qs(a),t.memoizedState=Ks,i);if((t.mode&1)===0)return pl(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var c=r.dgst;return r=c,i=Error(s(419)),r=Vs(i,r,void 0),pl(e,t,a,r)}if(c=(a&e.childLanes)!==0,Tt||c){if(r=it,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|a))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Bn(e,o),fn(r,e,o,-1))}return au(),r=Vs(Error(s(421))),pl(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Vd.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,It=nr(o.nextSibling),Dt=t,ze=!0,sn=null,e!==null&&(Qt[qt++]=$n,Qt[qt++]=Vn,Qt[qt++]=Fr,$n=e.id,Vn=e.overflow,Fr=t),t=qs(t,r.children),t.flags|=4096,t)}function xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_s(e.return,t,n)}function Gs(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Ec(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(xt(e,t,r.children,n),r=Ve.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xc(e,n,t);else if(e.tag===19)xc(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}r&=1}if(Me(Ve,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&sl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Gs(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&sl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Gs(t,!0,n,null,i);break;case"together":Gs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ml(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Dr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=hr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=hr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jd(e,t,n){switch(t.tag){case 3:wc(t),ko();break;case 5:Da(t);break;case 1:Pt(t.type)&&Ji(t);break;case 4:Ps(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Me(rl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Me(Ve,Ve.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?kc(e,t,n):(Me(Ve,Ve.current&1),e=Hn(e,t,n),e!==null?e.sibling:null);Me(Ve,Ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Ec(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Me(Ve,Ve.current),r)break;return null;case 22:case 23:return t.lanes=0,vc(e,t,n)}return Hn(e,t,n)}var _c,Ys,Cc,Nc;_c=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ys=function(){},Cc=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ar(_n.current);var i=null;switch(n){case"input":o=vr(e,o),r=vr(e,r),i=[];break;case"select":o=W({},o,{value:void 0}),r=W({},r,{value:void 0}),i=[];break;case"textarea":o=_t(e,o),r=_t(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gi)}wt(n,r);var a;n=null;for(x in o)if(!r.hasOwnProperty(x)&&o.hasOwnProperty(x)&&o[x]!=null)if(x==="style"){var c=o[x];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else x!=="dangerouslySetInnerHTML"&&x!=="children"&&x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(d.hasOwnProperty(x)?i||(i=[]):(i=i||[]).push(x,null));for(x in r){var p=r[x];if(c=o!=null?o[x]:void 0,r.hasOwnProperty(x)&&p!==c&&(p!=null||c!=null))if(x==="style")if(c){for(a in c)!c.hasOwnProperty(a)||p&&p.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in p)p.hasOwnProperty(a)&&c[a]!==p[a]&&(n||(n={}),n[a]=p[a])}else n||(i||(i=[]),i.push(x,n)),n=p;else x==="dangerouslySetInnerHTML"?(p=p?p.__html:void 0,c=c?c.__html:void 0,p!=null&&c!==p&&(i=i||[]).push(x,p)):x==="children"?typeof p!="string"&&typeof p!="number"||(i=i||[]).push(x,""+p):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&(d.hasOwnProperty(x)?(p!=null&&x==="onScroll"&&Fe("scroll",e),i||c===p||(i=[])):(i=i||[]).push(x,p))}n&&(i=i||[]).push("style",n);var x=i;(t.updateQueue=x)&&(t.flags|=4)}},Nc=function(e,t,n,r){n!==r&&(t.flags|=4)};function pi(e,t){if(!ze)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 r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Rd(e,t,n){var r=t.pendingProps;switch(gs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return Pt(t.type)&&Xi(),vt(t),null;case 3:return r=t.stateNode,Co(),Le(Nt),Le(pt),Rs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sn!==null&&(lu(sn),sn=null))),Ys(e,t),vt(t),null;case 5:Ts(t);var o=Ar(ai.current);if(n=t.type,e!==null&&t.stateNode!=null)Cc(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(s(166));return vt(t),null}if(e=Ar(_n.current),tl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[En]=t,r[oi]=i,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(o=0;o<ti.length;o++)Fe(ti[o],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":pn(r,i),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Fe("invalid",r);break;case"textarea":Wr(r,i),Fe("invalid",r)}wt(n,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var c=i[a];a==="children"?typeof c=="string"?r.textContent!==c&&(i.suppressHydrationWarning!==!0&&qi(r.textContent,c,e),o=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(i.suppressHydrationWarning!==!0&&qi(r.textContent,c,e),o=["children",""+c]):d.hasOwnProperty(a)&&c!=null&&a==="onScroll"&&Fe("scroll",r)}switch(n){case"input":Qn(r),Pn(r,i,!0);break;case"textarea":Qn(r),Hr(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Gi)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Kr(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[En]=t,e[oi]=r,_c(e,t,!1,!1),t.stateNode=e;e:{switch(a=zo(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),o=r;break;case"iframe":case"object":case"embed":Fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<ti.length;o++)Fe(ti[o],e);o=r;break;case"source":Fe("error",e),o=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),o=r;break;case"details":Fe("toggle",e),o=r;break;case"input":pn(e,r),o=vr(e,r),Fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=W({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":Wr(e,r),o=_t(e,r),Fe("invalid",e);break;default:o=r}wt(n,o),c=o;for(i in c)if(c.hasOwnProperty(i)){var p=c[i];i==="style"?Ao(e,p):i==="dangerouslySetInnerHTML"?(p=p?p.__html:void 0,p!=null&&Ei(e,p)):i==="children"?typeof p=="string"?(n!=="textarea"||p!=="")&&et(e,p):typeof p=="number"&&et(e,""+p):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(d.hasOwnProperty(i)?p!=null&&i==="onScroll"&&Fe("scroll",e):p!=null&&ye(e,i,p,a))}switch(n){case"input":Qn(e),Pn(e,r,!1);break;case"textarea":Qn(e),Hr(e);break;case"option":r.value!=null&&e.setAttribute("value",""+xe(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?$t(e,!!r.multiple,i,!1):r.defaultValue!=null&&$t(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Gi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return vt(t),null;case 6:if(e&&t.stateNode!=null)Nc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(s(166));if(n=Ar(ai.current),Ar(_n.current),tl(t)){if(r=t.stateNode,n=t.memoizedProps,r[En]=t,(i=r.nodeValue!==n)&&(e=Dt,e!==null))switch(e.tag){case 3:qi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[En]=t,t.stateNode=r}return vt(t),null;case 13:if(Le(Ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ze&&It!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ja(),ko(),t.flags|=98560,i=!1;else if(i=tl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));i[En]=t}else ko(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),i=!1}else sn!==null&&(lu(sn),sn=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ve.current&1)!==0?Je===0&&(Je=3):au())),t.updateQueue!==null&&(t.flags|=4),vt(t),null);case 4:return Co(),Ys(e,t),e===null&&ni(t.stateNode.containerInfo),vt(t),null;case 10:return Es(t.type._context),vt(t),null;case 17:return Pt(t.type)&&Xi(),vt(t),null;case 19:if(Le(Ve),i=t.memoizedState,i===null)return vt(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)pi(i,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=sl(e),a!==null){for(t.flags|=128,pi(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Me(Ve,Ve.current&1|2),t.child}e=e.sibling}i.tail!==null&&Pe()>jo&&(t.flags|=128,r=!0,pi(i,!1),t.lanes=4194304)}else{if(!r)if(e=sl(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),pi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!ze)return vt(t),null}else 2*Pe()-i.renderingStartTime>jo&&n!==1073741824&&(t.flags|=128,r=!0,pi(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Pe(),t.sibling=null,n=Ve.current,Me(Ve,r?n&1|2:n&1),t):(vt(t),null);case 22:case 23:return uu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Ut&1073741824)!==0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Md(e,t){switch(gs(t),t.tag){case 1:return Pt(t.type)&&Xi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Co(),Le(Nt),Le(pt),Rs(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ts(t),null;case 13:if(Le(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));ko()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Le(Ve),null;case 4:return Co(),null;case 10:return Es(t.type._context),null;case 22:case 23:return uu(),null;case 24:return null;default:return null}}var vl=!1,gt=!1,Fd=typeof WeakSet=="function"?WeakSet:Set,b=null;function Po(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){He(e,t,r)}else n.current=null}function Xs(e,t,n){try{n()}catch(r){He(e,t,r)}}var Pc=!1;function Ld(e,t){if(us=oo,e=ia(),es(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,c=-1,p=-1,x=0,F=0,O=e,R=null;t:for(;;){for(var Y;O!==n||o!==0&&O.nodeType!==3||(c=a+o),O!==i||r!==0&&O.nodeType!==3||(p=a+r),O.nodeType===3&&(a+=O.nodeValue.length),(Y=O.firstChild)!==null;)R=O,O=Y;for(;;){if(O===e)break t;if(R===n&&++x===o&&(c=a),R===i&&++F===r&&(p=a),(Y=O.nextSibling)!==null)break;O=R,R=O.parentNode}O=Y}n=c===-1||p===-1?null:{start:c,end:p}}else n=null}n=n||{start:0,end:0}}else n=null;for(as={focusedElem:e,selectionRange:n},oo=!1,b=t;b!==null;)if(t=b,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,b=e;else for(;b!==null;){t=b;try{var ee=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ee!==null){var re=ee.memoizedProps,Ke=ee.memoizedState,w=t.stateNode,v=w.getSnapshotBeforeUpdate(t.elementType===t.type?re:un(t.type,re),Ke);w.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(A){He(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,b=e;break}b=t.return}return ee=Pc,Pc=!1,ee}function mi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Xs(t,n,i)}o=o.next}while(o!==r)}}function gl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Js(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Tc(e){var t=e.alternate;t!==null&&(e.alternate=null,Tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[En],delete t[oi],delete t[hs],delete t[md],delete t[vd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jc(e){return e.tag===5||e.tag===3||e.tag===4}function Rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jc(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.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 bs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gi));else if(r!==4&&(e=e.child,e!==null))for(bs(e,t,n),e=e.sibling;e!==null;)bs(e,t,n),e=e.sibling}function Zs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zs(e,t,n),e=e.sibling;e!==null;)Zs(e,t,n),e=e.sibling}var ct=null,an=!1;function ur(e,t,n){for(n=n.child;n!==null;)Mc(e,t,n),n=n.sibling}function Mc(e,t,n){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(bn,n)}catch{}switch(n.tag){case 5:gt||Po(n,t);case 6:var r=ct,o=an;ct=null,ur(e,t,n),ct=r,an=o,ct!==null&&(an?(e=ct,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ct.removeChild(n.stateNode));break;case 18:ct!==null&&(an?(e=ct,n=n.stateNode,e.nodeType===8?ds(e.parentNode,n):e.nodeType===1&&ds(e,n),Pr(e)):ds(ct,n.stateNode));break;case 4:r=ct,o=an,ct=n.stateNode.containerInfo,an=!0,ur(e,t,n),ct=r,an=o;break;case 0:case 11:case 14:case 15:if(!gt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&Xs(n,t,a),o=o.next}while(o!==r)}ur(e,t,n);break;case 1:if(!gt&&(Po(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){He(n,t,c)}ur(e,t,n);break;case 21:ur(e,t,n);break;case 22:n.mode&1?(gt=(r=gt)||n.memoizedState!==null,ur(e,t,n),gt=r):ur(e,t,n);break;default:ur(e,t,n)}}function Fc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Fd),t.forEach(function(r){var o=Bd.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function cn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,c=a;e:for(;c!==null;){switch(c.tag){case 5:ct=c.stateNode,an=!1;break e;case 3:ct=c.stateNode.containerInfo,an=!0;break e;case 4:ct=c.stateNode.containerInfo,an=!0;break e}c=c.return}if(ct===null)throw Error(s(160));Mc(i,a,o),ct=null,an=!1;var p=o.alternate;p!==null&&(p.return=null),o.return=null}catch(x){He(o,t,x)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lc(t,e),t=t.sibling}function Lc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(cn(t,e),Nn(e),r&4){try{mi(3,e,e.return),gl(3,e)}catch(re){He(e,e.return,re)}try{mi(5,e,e.return)}catch(re){He(e,e.return,re)}}break;case 1:cn(t,e),Nn(e),r&512&&n!==null&&Po(n,n.return);break;case 5:if(cn(t,e),Nn(e),r&512&&n!==null&&Po(n,n.return),e.flags&32){var o=e.stateNode;try{et(o,"")}catch(re){He(e,e.return,re)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,c=e.type,p=e.updateQueue;if(e.updateQueue=null,p!==null)try{c==="input"&&i.type==="radio"&&i.name!=null&&gr(o,i),zo(c,a);var x=zo(c,i);for(a=0;a<p.length;a+=2){var F=p[a],O=p[a+1];F==="style"?Ao(o,O):F==="dangerouslySetInnerHTML"?Ei(o,O):F==="children"?et(o,O):ye(o,F,O,x)}switch(c){case"input":qn(o,i);break;case"textarea":yt(o,i);break;case"select":var R=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var Y=i.value;Y!=null?$t(o,!!i.multiple,Y,!1):R!==!!i.multiple&&(i.defaultValue!=null?$t(o,!!i.multiple,i.defaultValue,!0):$t(o,!!i.multiple,i.multiple?[]:"",!1))}o[oi]=i}catch(re){He(e,e.return,re)}}break;case 6:if(cn(t,e),Nn(e),r&4){if(e.stateNode===null)throw Error(s(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(re){He(e,e.return,re)}}break;case 3:if(cn(t,e),Nn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pr(t.containerInfo)}catch(re){He(e,e.return,re)}break;case 4:cn(t,e),Nn(e);break;case 13:cn(t,e),Nn(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(nu=Pe())),r&4&&Fc(e);break;case 22:if(F=n!==null&&n.memoizedState!==null,e.mode&1?(gt=(x=gt)||F,cn(t,e),gt=x):cn(t,e),Nn(e),r&8192){if(x=e.memoizedState!==null,(e.stateNode.isHidden=x)&&!F&&(e.mode&1)!==0)for(b=e,F=e.child;F!==null;){for(O=b=F;b!==null;){switch(R=b,Y=R.child,R.tag){case 0:case 11:case 14:case 15:mi(4,R,R.return);break;case 1:Po(R,R.return);var ee=R.stateNode;if(typeof ee.componentWillUnmount=="function"){r=R,n=R.return;try{t=r,ee.props=t.memoizedProps,ee.state=t.memoizedState,ee.componentWillUnmount()}catch(re){He(r,n,re)}}break;case 5:Po(R,R.return);break;case 22:if(R.memoizedState!==null){zc(O);continue}}Y!==null?(Y.return=R,b=Y):zc(O)}F=F.sibling}e:for(F=null,O=e;;){if(O.tag===5){if(F===null){F=O;try{o=O.stateNode,x?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(c=O.stateNode,p=O.memoizedProps.style,a=p!=null&&p.hasOwnProperty("display")?p.display:null,c.style.display=Qr("display",a))}catch(re){He(e,e.return,re)}}}else if(O.tag===6){if(F===null)try{O.stateNode.nodeValue=x?"":O.memoizedProps}catch(re){He(e,e.return,re)}}else if((O.tag!==22&&O.tag!==23||O.memoizedState===null||O===e)&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===e)break e;for(;O.sibling===null;){if(O.return===null||O.return===e)break e;F===O&&(F=null),O=O.return}F===O&&(F=null),O.sibling.return=O.return,O=O.sibling}}break;case 19:cn(t,e),Nn(e),r&4&&Fc(e);break;case 21:break;default:cn(t,e),Nn(e)}}function Nn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(jc(n)){var r=n;break e}n=n.return}throw Error(s(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(et(o,""),r.flags&=-33);var i=Rc(e);Zs(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,c=Rc(e);bs(e,c,a);break;default:throw Error(s(161))}}catch(p){He(e,e.return,p)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Od(e,t,n){b=e,Oc(e)}function Oc(e,t,n){for(var r=(e.mode&1)!==0;b!==null;){var o=b,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||vl;if(!a){var c=o.alternate,p=c!==null&&c.memoizedState!==null||gt;c=vl;var x=gt;if(vl=a,(gt=p)&&!x)for(b=o;b!==null;)a=b,p=a.child,a.tag===22&&a.memoizedState!==null?Dc(o):p!==null?(p.return=a,b=p):Dc(o);for(;i!==null;)b=i,Oc(i),i=i.sibling;b=o,vl=c,gt=x}Ac(e)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,b=i):Ac(e)}}function Ac(e){for(;b!==null;){var t=b;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:gt||gl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!gt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:un(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&za(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}za(t,a,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var p=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":p.autoFocus&&n.focus();break;case"img":p.src&&(n.src=p.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var x=t.alternate;if(x!==null){var F=x.memoizedState;if(F!==null){var O=F.dehydrated;O!==null&&Pr(O)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}gt||t.flags&512&&Js(t)}catch(R){He(t,t.return,R)}}if(t===e){b=null;break}if(n=t.sibling,n!==null){n.return=t.return,b=n;break}b=t.return}}function zc(e){for(;b!==null;){var t=b;if(t===e){b=null;break}var n=t.sibling;if(n!==null){n.return=t.return,b=n;break}b=t.return}}function Dc(e){for(;b!==null;){var t=b;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gl(4,t)}catch(p){He(t,n,p)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(p){He(t,o,p)}}var i=t.return;try{Js(t)}catch(p){He(t,i,p)}break;case 5:var a=t.return;try{Js(t)}catch(p){He(t,a,p)}}}catch(p){He(t,t.return,p)}if(t===e){b=null;break}var c=t.sibling;if(c!==null){c.return=t.return,b=c;break}b=t.return}}var Ad=Math.ceil,yl=U.ReactCurrentDispatcher,eu=U.ReactCurrentOwner,Xt=U.ReactCurrentBatchConfig,Ce=0,it=null,Ge=null,ft=0,Ut=0,To=rr(0),Je=0,vi=null,Dr=0,wl=0,tu=0,gi=null,jt=null,nu=0,jo=1/0,Kn=null,Sl=!1,ru=null,ar=null,kl=!1,cr=null,xl=0,yi=0,ou=null,El=-1,_l=0;function Et(){return(Ce&6)!==0?Pe():El!==-1?El:El=Pe()}function fr(e){return(e.mode&1)===0?1:(Ce&2)!==0&&ft!==0?ft&-ft:yd.transition!==null?(_l===0&&(_l=ji()),_l):(e=_e,e!==0||(e=window.event,e=e===void 0?16:k(e.type)),e)}function fn(e,t,n,r){if(50<yi)throw yi=0,ou=null,Error(s(185));xr(e,n,r),((Ce&2)===0||e!==it)&&(e===it&&((Ce&2)===0&&(wl|=n),Je===4&&dr(e,ft)),Rt(e,r),n===1&&Ce===0&&(t.mode&1)===0&&(jo=Pe()+500,bi&&ir()))}function Rt(e,t){var n=e.callbackNode;kr(e,t);var r=zn(e,e===it?ft:0);if(r===0)n!==null&&Sr(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Sr(n),t===1)e.tag===0?gd(Uc.bind(null,e)):_a(Uc.bind(null,e)),hd(function(){(Ce&6)===0&&ir()}),n=null;else{switch(nn(r)){case 1:n=Jn;break;case 4:n=tt;break;case 16:n=An;break;case 536870912:n=dt;break;default:n=An}n=qc(n,Ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ic(e,t){if(El=-1,_l=0,(Ce&6)!==0)throw Error(s(327));var n=e.callbackNode;if(Ro()&&e.callbackNode!==n)return null;var r=zn(e,e===it?ft:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Cl(e,r);else{t=r;var o=Ce;Ce|=2;var i=Vc();(it!==e||ft!==t)&&(Kn=null,jo=Pe()+500,Ur(e,t));do try{Id();break}catch(c){$c(e,c)}while(!0);xs(),yl.current=i,Ce=o,Ge!==null?t=0:(it=null,ft=0,t=Je)}if(t!==0){if(t===2&&(o=At(e),o!==0&&(r=o,t=iu(e,o))),t===1)throw n=vi,Ur(e,0),dr(e,r),Rt(e,Pe()),n;if(t===6)dr(e,r);else{if(o=e.current.alternate,(r&30)===0&&!zd(o)&&(t=Cl(e,r),t===2&&(i=At(e),i!==0&&(r=i,t=iu(e,i))),t===1))throw n=vi,Ur(e,0),dr(e,r),Rt(e,Pe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(s(345));case 2:$r(e,jt,Kn);break;case 3:if(dr(e,r),(r&130023424)===r&&(t=nu+500-Pe(),10<t)){if(zn(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Et(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=fs($r.bind(null,e,jt,Kn),t);break}$r(e,jt,Kn);break;case 4:if(dr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-Ot(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=Pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ad(r/1960))-r,10<r){e.timeoutHandle=fs($r.bind(null,e,jt,Kn),r);break}$r(e,jt,Kn);break;case 5:$r(e,jt,Kn);break;default:throw Error(s(329))}}}return Rt(e,Pe()),e.callbackNode===n?Ic.bind(null,e):null}function iu(e,t){var n=gi;return e.current.memoizedState.isDehydrated&&(Ur(e,t).flags|=256),e=Cl(e,t),e!==2&&(t=jt,jt=n,t!==null&&lu(t)),e}function lu(e){jt===null?jt=e:jt.push.apply(jt,e)}function zd(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!ln(i(),o))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 dr(e,t){for(t&=~tu,t&=~wl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ot(t),r=1<<n;e[n]=-1,t&=~r}}function Uc(e){if((Ce&6)!==0)throw Error(s(327));Ro();var t=zn(e,0);if((t&1)===0)return Rt(e,Pe()),null;var n=Cl(e,t);if(e.tag!==0&&n===2){var r=At(e);r!==0&&(t=r,n=iu(e,r))}if(n===1)throw n=vi,Ur(e,0),dr(e,t),Rt(e,Pe()),n;if(n===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$r(e,jt,Kn),Rt(e,Pe()),null}function su(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(jo=Pe()+500,bi&&ir())}}function Ir(e){cr!==null&&cr.tag===0&&(Ce&6)===0&&Ro();var t=Ce;Ce|=1;var n=Xt.transition,r=_e;try{if(Xt.transition=null,_e=1,e)return e()}finally{_e=r,Xt.transition=n,Ce=t,(Ce&6)===0&&ir()}}function uu(){Ut=To.current,Le(To)}function Ur(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,dd(n)),Ge!==null)for(n=Ge.return;n!==null;){var r=n;switch(gs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xi();break;case 3:Co(),Le(Nt),Le(pt),Rs();break;case 5:Ts(r);break;case 4:Co();break;case 13:Le(Ve);break;case 19:Le(Ve);break;case 10:Es(r.type._context);break;case 22:case 23:uu()}n=n.return}if(it=e,Ge=e=hr(e.current,null),ft=Ut=t,Je=0,vi=null,tu=wl=Dr=0,jt=gi=null,Or!==null){for(t=0;t<Or.length;t++)if(n=Or[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=o,r.next=a}n.pending=r}Or=null}return e}function $c(e,t){do{var n=Ge;try{if(xs(),ul.current=dl,al){for(var r=Be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}al=!1}if(zr=0,ot=Xe=Be=null,ci=!1,fi=0,eu.current=null,n===null||n.return===null){Je=1,vi=t,Ge=null;break}e:{var i=e,a=n.return,c=n,p=t;if(t=ft,c.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){var x=p,F=c,O=F.tag;if((F.mode&1)===0&&(O===0||O===11||O===15)){var R=F.alternate;R?(F.updateQueue=R.updateQueue,F.memoizedState=R.memoizedState,F.lanes=R.lanes):(F.updateQueue=null,F.memoizedState=null)}var Y=fc(a);if(Y!==null){Y.flags&=-257,dc(Y,a,c,i,t),Y.mode&1&&cc(i,x,t),t=Y,p=x;var ee=t.updateQueue;if(ee===null){var re=new Set;re.add(p),t.updateQueue=re}else ee.add(p);break e}else{if((t&1)===0){cc(i,x,t),au();break e}p=Error(s(426))}}else if(ze&&c.mode&1){var Ke=fc(a);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),dc(Ke,a,c,i,t),Ss(No(p,c));break e}}i=p=No(p,c),Je!==4&&(Je=2),gi===null?gi=[i]:gi.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var w=uc(i,p,t);Aa(i,w);break e;case 1:c=p;var v=i.type,S=i.stateNode;if((i.flags&128)===0&&(typeof v.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(ar===null||!ar.has(S)))){i.flags|=65536,t&=-t,i.lanes|=t;var A=ac(i,c,t);Aa(i,A);break e}}i=i.return}while(i!==null)}Wc(n)}catch(oe){t=oe,Ge===n&&n!==null&&(Ge=n=n.return);continue}break}while(!0)}function Vc(){var e=yl.current;return yl.current=dl,e===null?dl:e}function au(){(Je===0||Je===3||Je===2)&&(Je=4),it===null||(Dr&268435455)===0&&(wl&268435455)===0||dr(it,ft)}function Cl(e,t){var n=Ce;Ce|=2;var r=Vc();(it!==e||ft!==t)&&(Kn=null,Ur(e,t));do try{Dd();break}catch(o){$c(e,o)}while(!0);if(xs(),Ce=n,yl.current=r,Ge!==null)throw Error(s(261));return it=null,ft=0,Je}function Dd(){for(;Ge!==null;)Bc(Ge)}function Id(){for(;Ge!==null&&!br();)Bc(Ge)}function Bc(e){var t=Qc(e.alternate,e,Ut);e.memoizedProps=e.pendingProps,t===null?Wc(e):Ge=t,eu.current=null}function Wc(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Rd(n,t,Ut),n!==null){Ge=n;return}}else{if(n=Md(n,t),n!==null){n.flags&=32767,Ge=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Je=6,Ge=null;return}}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);Je===0&&(Je=5)}function $r(e,t,n){var r=_e,o=Xt.transition;try{Xt.transition=null,_e=1,Ud(e,t,n,r)}finally{Xt.transition=o,_e=r}return null}function Ud(e,t,n,r){do Ro();while(cr!==null);if((Ce&6)!==0)throw Error(s(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Ql(e,i),e===it&&(Ge=it=null,ft=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||kl||(kl=!0,qc(An,function(){return Ro(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=Xt.transition,Xt.transition=null;var a=_e;_e=1;var c=Ce;Ce|=4,eu.current=null,Ld(e,n),Lc(n,e),id(as),oo=!!us,as=us=null,e.current=n,Od(n),tn(),Ce=c,_e=a,Xt.transition=i}else e.current=n;if(kl&&(kl=!1,cr=e,xl=o),i=e.pendingLanes,i===0&&(ar=null),Hl(n.stateNode),Rt(e,Pe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Sl)throw Sl=!1,e=ru,ru=null,e;return(xl&1)!==0&&e.tag!==0&&Ro(),i=e.pendingLanes,(i&1)!==0?e===ou?yi++:(yi=0,ou=e):yi=0,ir(),null}function Ro(){if(cr!==null){var e=nn(xl),t=Xt.transition,n=_e;try{if(Xt.transition=null,_e=16>e?16:e,cr===null)var r=!1;else{if(e=cr,cr=null,xl=0,(Ce&6)!==0)throw Error(s(331));var o=Ce;for(Ce|=4,b=e.current;b!==null;){var i=b,a=i.child;if((b.flags&16)!==0){var c=i.deletions;if(c!==null){for(var p=0;p<c.length;p++){var x=c[p];for(b=x;b!==null;){var F=b;switch(F.tag){case 0:case 11:case 15:mi(8,F,i)}var O=F.child;if(O!==null)O.return=F,b=O;else for(;b!==null;){F=b;var R=F.sibling,Y=F.return;if(Tc(F),F===x){b=null;break}if(R!==null){R.return=Y,b=R;break}b=Y}}}var ee=i.alternate;if(ee!==null){var re=ee.child;if(re!==null){ee.child=null;do{var Ke=re.sibling;re.sibling=null,re=Ke}while(re!==null)}}b=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,b=a;else e:for(;b!==null;){if(i=b,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:mi(9,i,i.return)}var w=i.sibling;if(w!==null){w.return=i.return,b=w;break e}b=i.return}}var v=e.current;for(b=v;b!==null;){a=b;var S=a.child;if((a.subtreeFlags&2064)!==0&&S!==null)S.return=a,b=S;else e:for(a=v;b!==null;){if(c=b,(c.flags&2048)!==0)try{switch(c.tag){case 0:case 11:case 15:gl(9,c)}}catch(oe){He(c,c.return,oe)}if(c===a){b=null;break e}var A=c.sibling;if(A!==null){A.return=c.return,b=A;break e}b=c.return}}if(Ce=o,ir(),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(bn,e)}catch{}r=!0}return r}finally{_e=n,Xt.transition=t}}return!1}function Hc(e,t,n){t=No(n,t),t=uc(e,t,1),e=sr(e,t,1),t=Et(),e!==null&&(xr(e,1,t),Rt(e,t))}function He(e,t,n){if(e.tag===3)Hc(e,e,n);else for(;t!==null;){if(t.tag===3){Hc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ar===null||!ar.has(r))){e=No(n,e),e=ac(t,e,1),t=sr(t,e,1),e=Et(),t!==null&&(xr(t,1,e),Rt(t,e));break}}t=t.return}}function $d(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Et(),e.pingedLanes|=e.suspendedLanes&n,it===e&&(ft&n)===n&&(Je===4||Je===3&&(ft&130023424)===ft&&500>Pe()-nu?Ur(e,0):tu|=n),Rt(e,t)}function Kc(e,t){t===0&&((e.mode&1)===0?t=1:(t=eo,eo<<=1,(eo&130023424)===0&&(eo=4194304)));var n=Et();e=Bn(e,t),e!==null&&(xr(e,t,n),Rt(e,n))}function Vd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kc(e,n)}function Bd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Kc(e,n)}var Qc;Qc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Nt.current)Tt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Tt=!1,jd(e,t,n);Tt=(e.flags&131072)!==0}else Tt=!1,ze&&(t.flags&1048576)!==0&&Ca(t,el,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ml(e,t),e=t.pendingProps;var o=yo(t,pt.current);_o(t,n),o=Ls(null,t,r,e,o,n);var i=Os();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pt(r)?(i=!0,Ji(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ns(t),o.updater=hl,t.stateNode=o,o._reactInternals=t,$s(t,r,e,n),t=Hs(null,t,r,!0,i,n)):(t.tag=0,ze&&i&&vs(t),xt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ml(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Hd(r),e=un(r,e),o){case 0:t=Ws(null,t,r,e,n);break e;case 1:t=yc(null,t,r,e,n);break e;case 11:t=hc(null,t,r,e,n);break e;case 14:t=pc(null,t,r,un(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),Ws(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),yc(e,t,r,o,n);case 3:e:{if(wc(t),e===null)throw Error(s(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Oa(e,t),ll(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=No(Error(s(423)),t),t=Sc(e,t,r,n,o);break e}else if(r!==o){o=No(Error(s(424)),t),t=Sc(e,t,r,n,o);break e}else for(It=nr(t.stateNode.containerInfo.firstChild),Dt=t,ze=!0,sn=null,n=Fa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ko(),r===o){t=Hn(e,t,n);break e}xt(e,t,r,n)}t=t.child}return t;case 5:return Da(t),e===null&&ws(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,cs(r,o)?a=null:i!==null&&cs(r,i)&&(t.flags|=32),gc(e,t),xt(e,t,a,n),t.child;case 6:return e===null&&ws(t),null;case 13:return kc(e,t,n);case 4:return Ps(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xo(t,null,r,n):xt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),hc(e,t,r,o,n);case 7:return xt(e,t,t.pendingProps,n),t.child;case 8:return xt(e,t,t.pendingProps.children,n),t.child;case 12:return xt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Me(rl,r._currentValue),r._currentValue=a,i!==null)if(ln(i.value,a)){if(i.children===o.children&&!Nt.current){t=Hn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var c=i.dependencies;if(c!==null){a=i.child;for(var p=c.firstContext;p!==null;){if(p.context===r){if(i.tag===1){p=Wn(-1,n&-n),p.tag=2;var x=i.updateQueue;if(x!==null){x=x.shared;var F=x.pending;F===null?p.next=p:(p.next=F.next,F.next=p),x.pending=p}}i.lanes|=n,p=i.alternate,p!==null&&(p.lanes|=n),_s(i.return,n,t),c.lanes|=n;break}p=p.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(s(341));a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),_s(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}xt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,_o(t,n),o=Gt(o),r=r(o),t.flags|=1,xt(e,t,r,n),t.child;case 14:return r=t.type,o=un(r,t.pendingProps),o=un(r.type,o),pc(e,t,r,o,n);case 15:return mc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),ml(e,t),t.tag=1,Pt(r)?(e=!0,Ji(t)):e=!1,_o(t,n),lc(t,r,o),$s(t,r,o,n),Hs(null,t,r,!0,e,n);case 19:return Ec(e,t,n);case 22:return vc(e,t,n)}throw Error(s(156,t.tag))};function qc(e,t){return Bt(e,t)}function Wd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,n,r){return new Wd(e,t,n,r)}function cu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hd(e){if(typeof e=="function")return cu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ye)return 11;if(e===De)return 14}return 2}function hr(e,t){var n=e.alternate;return n===null?(n=Jt(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&14680064,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}function Nl(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")cu(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ne:return Vr(n.children,o,i,t);case ve:a=8,o|=8;break;case ke:return e=Jt(12,n,t,o|2),e.elementType=ke,e.lanes=i,e;case be:return e=Jt(13,n,t,o),e.elementType=be,e.lanes=i,e;case Qe:return e=Jt(19,n,t,o),e.elementType=Qe,e.lanes=i,e;case Ne:return Pl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:a=10;break e;case Ee:a=9;break e;case Ye:a=11;break e;case De:a=14;break e;case Ie:a=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Jt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Vr(e,t,n,r){return e=Jt(7,e,r,t),e.lanes=n,e}function Pl(e,t,n,r){return e=Jt(22,e,r,t),e.elementType=Ne,e.lanes=n,e.stateNode={isHidden:!1},e}function fu(e,t,n){return e=Jt(6,e,null,t),e.lanes=n,e}function du(e,t,n){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kd(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=to(0),this.expirationTimes=to(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=to(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function hu(e,t,n,r,o,i,a,c,p){return e=new Kd(e,t,n,c,p),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ns(i),e}function Qd(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gc(e){if(!e)return or;e=e._reactInternals;e:{if(Vt(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var n=e.type;if(Pt(n))return xa(e,n,t)}return t}function Yc(e,t,n,r,o,i,a,c,p){return e=hu(n,r,!0,e,o,i,a,c,p),e.context=Gc(null),n=e.current,r=Et(),o=fr(n),i=Wn(r,o),i.callback=t??null,sr(n,i,o),e.current.lanes=o,xr(e,o,r),Rt(e,r),e}function Tl(e,t,n,r){var o=t.current,i=Et(),a=fr(o);return n=Gc(n),t.context===null?t.context=n:t.pendingContext=n,t=Wn(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=sr(o,t,a),e!==null&&(fn(e,o,a,i),il(e,o,a)),a}function jl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Xc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pu(e,t){Xc(e,t),(e=e.alternate)&&Xc(e,t)}function qd(){return null}var Jc=typeof reportError=="function"?reportError:function(e){console.error(e)};function mu(e){this._internalRoot=e}Rl.prototype.render=mu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));Tl(e,t,null,null)},Rl.prototype.unmount=mu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ir(function(){Tl(null,e,null,null)}),t[In]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ht.length&&t!==0&&t<Ht[n].priority;n++);Ht.splice(n,0,e),n===0&&Oi(e)}};function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ml(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function bc(){}function Gd(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var x=jl(a);i.call(x)}}var a=Yc(t,r,e,0,null,!1,!1,"",bc);return e._reactRootContainer=a,e[In]=a.current,ni(e.nodeType===8?e.parentNode:e),Ir(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var c=r;r=function(){var x=jl(p);c.call(x)}}var p=hu(e,0,!1,null,null,!1,!1,"",bc);return e._reactRootContainer=p,e[In]=p.current,ni(e.nodeType===8?e.parentNode:e),Ir(function(){Tl(t,p,n,r)}),p}function Fl(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var c=o;o=function(){var p=jl(a);c.call(p)}}Tl(t,a,e,o)}else a=Gd(n,t,e,o,r);return jl(a)}Ri=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=nt(t.pendingLanes);n!==0&&(vn(t,n|1),Rt(t,Pe()),(Ce&6)===0&&(jo=Pe()+500,ir()))}break;case 13:Ir(function(){var r=Bn(e,1);if(r!==null){var o=Et();fn(r,e,1,o)}}),pu(e,1)}},Wo=function(e){if(e.tag===13){var t=Bn(e,134217728);if(t!==null){var n=Et();fn(t,e,134217728,n)}pu(e,134217728)}},no=function(e){if(e.tag===13){var t=fr(e),n=Bn(e,t);if(n!==null){var r=Et();fn(n,e,t,r)}pu(e,t)}},Mi=function(){return _e},Fi=function(e,t){var n=_e;try{return _e=e,t()}finally{_e=n}},Do=function(e,t,n){switch(t){case"input":if(qn(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Yi(r);if(!o)throw Error(s(90));mr(r),qn(r,o)}}}break;case"textarea":yt(e,n);break;case"select":t=n.value,t!=null&&$t(e,!!n.multiple,t,!1)}},Gn=su,Io=Ir;var Yd={usingClientEntryPoint:!1,Events:[ii,vo,Yi,yr,Ci,su]},wi={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Xd={bundleType:wi.bundleType,version:wi.version,rendererPackageName:wi.rendererPackageName,rendererConfig:wi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=en(e),e===null?null:e.stateNode},findFiberByHostInstance:wi.findFiberByHostInstance||qd,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ll.isDisabled&&Ll.supportsFiber)try{bn=Ll.inject(Xd),Lt=Ll}catch{}}return Mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Yd,Mt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vu(t))throw Error(s(200));return Qd(e,t,null,n)},Mt.createRoot=function(e,t){if(!vu(e))throw Error(s(299));var n=!1,r="",o=Jc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=hu(e,1,!1,null,null,n,!1,r,o),e[In]=t.current,ni(e.nodeType===8?e.parentNode:e),new mu(t)},Mt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=en(t),e=e===null?null:e.stateNode,e},Mt.flushSync=function(e){return Ir(e)},Mt.hydrate=function(e,t,n){if(!Ml(t))throw Error(s(200));return Fl(null,e,t,!0,n)},Mt.hydrateRoot=function(e,t,n){if(!vu(e))throw Error(s(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=Jc;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Yc(t,null,e,1,n??null,o,!1,i,a),e[In]=t.current,ni(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Rl(t)},Mt.render=function(e,t,n){if(!Ml(t))throw Error(s(200));return Fl(null,e,t,!1,n)},Mt.unmountComponentAtNode=function(e){if(!Ml(e))throw Error(s(40));return e._reactRootContainer?(Ir(function(){Fl(null,null,e,!1,function(){e._reactRootContainer=null,e[In]=null})}),!0):!1},Mt.unstable_batchedUpdates=su,Mt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ml(n))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return Fl(e,t,n,!1,r)},Mt.version="18.3.1-next-f1338f8080-20240426",Mt}var sf;function lh(){if(sf)return wu.exports;sf=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(l){console.error(l)}}return u(),wu.exports=ih(),wu.exports}var uf;function sh(){if(uf)return Ol;uf=1;var u=lh();return Ol.createRoot=u.createRoot,Ol.hydrateRoot=u.hydrateRoot,Ol}var uh=sh(),_=Uu();function af(u){return[...u.toLocaleLowerCase().matchAll(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu)].map(l=>({value:l[0],start:l.index??0}))}function xu(u,l){if(!l.length||l.length>u.length)return!1;for(let s=0;s<=u.length-l.length;s++)if(l.every((f,d)=>u[s+d]===f))return!0;return!1}function ah(u,l){const s=u.trim(),f=af(s),d=af(l).map(({value:N})=>N),y=f.map(({value:N})=>N);if(y.join(" ")==="it seems like"&&xu(d,y))return"";if(f.length<5||d.length<5)return s;if(xu(d,y))return"";for(let N=f.length-1;N>=5;N--)if(xu(d,y.slice(0,N)))return s.slice(f[N].start).replace(/^[\s,.;:!?—-]+/u,"").trim();return s}class ch{constructor(l,s,f=()=>{},d=()=>{}){te(this,"recordings",[]);te(this,"transcripts",[]);te(this,"hearing",!1);te(this,"pumpingEpoch",null);te(this,"active",null);te(this,"epoch",0);te(this,"transcribe");te(this,"send");te(this,"report");te(this,"changed");this.transcribe=l,this.send=s,this.report=f,this.changed=d}get busy(){return this.pumpingEpoch!==null||this.recordings.length>0||this.transcripts.length>0}speechStarted(){this.hearing=!0,this.changed()}speechEnded(l){this.hearing=!1,this.recordings.push(l),this.changed(),this.pump()}speechDiscarded(){this.hearing=!1,this.changed(),this.pump()}reset(){var l;this.epoch++,(l=this.active)==null||l.abort(),this.active=null,this.recordings=[],this.transcripts=[],this.hearing=!1,this.pumpingEpoch=null,this.changed()}pump(){const l=this.epoch;this.pumpingEpoch!==l&&(this.pumpingEpoch=l,this.changed(),(async()=>{try{for(;this.recordings.length&&l===this.epoch;){const f=this.recordings.shift(),d=new AbortController;this.active=d;try{const y=(await this.transcribe(f,d.signal)).trim();l===this.epoch&&y&&this.transcripts.push(y)}catch(y){if(l===this.epoch&&!d.signal.aborted)throw y}finally{this.active===d&&(this.active=null),l===this.epoch&&this.changed()}}if(l!==this.epoch||this.hearing||this.recordings.length||!this.transcripts.length)return;const s=this.transcripts.join(" ").trim();this.transcripts=[],this.changed(),s&&await this.send(s)}catch(s){l===this.epoch&&this.report(s)}finally{this.pumpingEpoch===l&&(this.pumpingEpoch=null,this.changed(),l===this.epoch&&!this.hearing&&(this.recordings.length||this.transcripts.length)&&this.pump())}})())}}const fh=2e3;class dh{constructor(l=fh){te(this,"tail",Promise.resolve());te(this,"_active",!1);te(this,"_flushing",!1);te(this,"epoch",0);te(this,"timeoutMs");te(this,"invalid",new WeakSet);this.timeoutMs=l}get acceptsCallbacks(){return this._active||this._flushing}pause(l){if(this.invalid.has(l))return Promise.reject(new Error("VAD transition is invalidated."));const s=this.epoch;return this._active=!1,this.enqueue(async()=>{s===this.epoch&&await this.withTimeout(l,l.pause(),"pause")})}start(l){if(this.invalid.has(l))return Promise.reject(new Error("VAD transition is invalidated."));const s=this.epoch;return this.enqueue(async()=>{s===this.epoch&&(await this.withTimeout(l,l.start(),"start"),s===this.epoch&&(this._active=!0))})}flush(l){if(this.invalid.has(l))return Promise.reject(new Error("VAD transition is invalidated."));const s=this.epoch;return this.enqueue(async()=>{if(s===this.epoch){this._flushing=!0;try{await this.withTimeout(l,l.pause(),"pause"),await this.withTimeout(l,l.start(),"start"),s===this.epoch&&(this._active=!0)}finally{s===this.epoch&&(this._flushing=!1)}}})}beginSession(){this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}deactivate(){this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}isInvalid(l){return this.invalid.has(l)}enqueue(l){const s=this.tail.then(l,l);return this.tail=s.catch(()=>{}),s}withTimeout(l,s,f){return new Promise((d,y)=>{const E=globalThis.setTimeout(()=>{this.invalidate(l),y(new Error(`VAD ${f} timed out.`))},this.timeoutMs);s.then(()=>{globalThis.clearTimeout(E),d()},N=>{globalThis.clearTimeout(E),y(N)})})}invalidate(l){this.invalid.add(l),this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}}function hh(u,l,s,f,d,y){return u===l&&s===f&&!d&&y}const ph=10,mh=2;function vh(u){const l=u.trim().replace(/["'“”‘’«»)\]}]+$/u,"").trimEnd();return/[.?!]$/.test(l)?!/(\.\.|…)$/.test(l):!1}function gh(u){return u.split(/\s+/).filter(l=>/[\p{L}\p{N}]/u.test(l)).length}function yh(u){const{text:l,resultRevision:s,revision:f,quietFrames:d}=u;return l===void 0||s!==f||d<ph?!1:vh(l)&&gh(l)>=mh}const $l=.45,$u=.3,Pf=160,Tf=320,Lo=700,jf=300,Rf=2e3,Tu=100;function Vu(u){if(!Number.isFinite(u))return Lo;const l=Math.round(u/Tu)*Tu;return Math.min(Rf,Math.max(jf,l))}function wh(u=Lo){return{positiveSpeechThreshold:$l,negativeSpeechThreshold:$u,minSpeechMs:Pf,preSpeechPadMs:Tf,redemptionMs:Vu(u)}}const Sh=350,kh=20;class xh{constructor(l,s,f=()=>{}){te(this,"preRoll",[]);te(this,"current",null);te(this,"segments",new Set);te(this,"ended",new WeakMap);te(this,"request");te(this,"preview");te(this,"endpoint");te(this,"speechThreshold",$l);this.request=l,this.preview=s,this.endpoint=f}frame(l,s){const f=s.slice(),d=this.current;if(!d){this.preRoll.push(f),this.preRoll.length>14&&this.preRoll.shift();return}d.frames.push(f),l>=this.speechThreshold?(d.revision++,d.quiet=0):d.quiet++;const y=d.confirmed&&d.overActiveTurn&&d.requested===-1&&d.confirmedAt!==null&&d.frames.length-d.confirmedAt>=kh;d.confirmed&&!d.pending&&d.requested!==d.revision&&(y||d.quiet>=6||d.frames.length-d.lastRequest>=63)&&this.speculate(d),this.checkEndpoint(d)}begin(l=!1){const s={frames:this.preRoll,revision:1,quiet:0,confirmed:!1,requested:-1,lastRequest:0,controller:new AbortController,endpointed:!1,overActiveTurn:l,confirmedAt:null};this.preRoll=[],this.current=s,this.segments.add(s),this.preview("")}confirm(){this.current&&(this.current.confirmed=!0,this.current.confirmedAt=this.current.frames.length)}end(l){this.current&&this.ended.set(l,this.current),this.current=null,this.preRoll=[]}async finish(l,s){var y;const f=this.ended.get(l);if(this.ended.delete(l),!f)return this.request(l,s);const d=()=>f.controller.abort(s.reason);s.addEventListener("abort",d,{once:!0}),s.aborted&&d();try{const E=f.pending;return E&&!await Eh(E,Sh,s)&&f.controller.abort(new DOMException("Speculative transcription timed out.","AbortError")),s.throwIfAborted(),((y=f.result)==null?void 0:y.revision)===f.revision&&f.result.text.trim()?f.result.text:await this.request(l,s)}finally{s.removeEventListener("abort",d),this.segments.delete(f)}}discard(){this.current&&(this.current.controller.abort(),this.segments.delete(this.current)),this.current=null,this.preRoll=[],this.preview("")}reset(){for(const l of this.segments)l.controller.abort();this.segments.clear(),this.ended=new WeakMap,this.discard()}samples(l){const s=new Float32Array(l.frames.reduce((d,y)=>d+y.length,0));let f=0;for(const d of l.frames)s.set(d,f),f+=d.length;return s}checkEndpoint(l){var s,f;l.endpointed||this.current!==l||!l.confirmed||yh({text:(s=l.result)==null?void 0:s.text,resultRevision:(f=l.result)==null?void 0:f.revision,revision:l.revision,quietFrames:l.quiet})&&(l.endpointed=!0,this.endpoint())}speculate(l){const s=l.revision;l.requested=s,l.lastRequest=l.frames.length,l.pending=this.request(this.samples(l),l.controller.signal).then(f=>{l.controller.signal.aborted||(l.result={revision:s,text:f},this.current===l&&(this.preview(f),this.checkEndpoint(l)))}).catch(()=>{}).finally(()=>{l.pending=void 0})}}function Eh(u,l,s){return new Promise((f,d)=>{if(s.aborted)return d(s.reason);const y=globalThis.setTimeout(L,l),E=()=>{j(),d(s.reason)},N=()=>{j(),f(!0)};function L(){j(),f(!1)}function j(){globalThis.clearTimeout(y),s.removeEventListener("abort",E)}s.addEventListener("abort",E,{once:!0}),u.then(N,N)})}const ju=new Set(["um","uh","uhm","erm","hmm","mm","mhm","ah","oh"]),cf=2,_h=1200,Ch=700;function Ru(u){return[...u.toLocaleLowerCase().matchAll(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu)].map(l=>l[0])}function Nh(u){return Ru(u).filter(l=>!ju.has(l))}function Ph(u,l,s,f){let d=0;for(let y=0;y<u.length;y++)if(u[y]!==l[s+y]&&(d++,d>f))return!1;return!0}function Th(u,l){let s=null;for(let f=0;f<u.length;f++)for(let d=u.length;d>f;d--){const y=d-f;if(s&&y<=s.end-s.start)break;if(y<2||y>l.length)continue;const E=Math.floor(y/4),N=u.slice(f,d);let L=!1;for(let j=0;j<=l.length-y;j++)if(Ph(N,l,j,E)){L=!0;break}if(L){s={start:f,end:d};break}}return s}function jh(u,l){const s=Ru(u);if(s.filter(y=>!ju.has(y)).length<cf)return{echo:!1,meaningful:!1};const d=Ru(l);if(d.length){const y=Th(s,d);if(y&&s.filter((N,L)=>(L<y.start||L>=y.end)&&!ju.has(N)).length<cf)return{echo:!0,meaningful:!1}}return{echo:!1,meaningful:!0}}function Mu(u,l){return jh(u,l).meaningful}const Rh=["stop","wait","hold on","hang on","pause","shut up","enough"],Mh=Rh.map(u=>new RegExp(`\\b${u.replace(/ /g,"\\s+")}\\b`,"iu"));function Mf(u,l){for(const s of Mh){if(!s.test(u)||s.test(l))continue;const f=new RegExp(s.source,`${s.flags}g`),d=u.replace(f," ").replace(/\s+/gu," ").trim().replace(/^[\s,.;:!?—-]+/u,"");return{remainder:Nh(d).length?d:""}}return null}function ff(u,l){return Mf(u,l)!==null}function Fh(u){return Math.max(.2,u.trim().length/15)}const Lh=1500,Oh=300,Ah=1e4;function df(u,l,s){const f=u.filter(d=>s-(d.startedAt+d.seconds*1e3)<Ah);return f.push({text:l,startedAt:s,seconds:Fh(l)}),f}function zh(u,l,s){const f=l-Lh,d=s+Oh;return u.filter(y=>y.startedAt+y.seconds*1e3>=f&&y.startedAt<=d).map(y=>y.text).join(" ")}const Dh=8,Ih=2.5;function Uh(u,l){return l===null?!1:u<l*Ih}class $h{constructor(l=()=>Date.now()){te(this,"mode","idle");te(this,"interruptOnConfirm",!1);te(this,"interrupted",!1);te(this,"startedAt",0);te(this,"wordPathBlockedFlag",!1);te(this,"now");this.now=l}get idle(){return this.mode==="idle"}get wordPathBlocked(){return this.wordPathBlockedFlag}blockWordPath(){(this.mode==="candidate"||this.mode==="accepted")&&(this.wordPathBlockedFlag=!0)}speechStart(l){return this.mode="candidate",this.interruptOnConfirm=l,this.interrupted=!1,this.wordPathBlockedFlag=!1,this.startedAt=this.now(),{duck:l,begin:!0,accepted:!1}}speechRealStart(){return this.mode==="candidate"?(this.mode="accepted",{keepDucked:this.interruptOnConfirm,begin:!1,accepted:!0}):{keepDucked:!1,begin:!1,accepted:this.mode==="accepted"}}shouldInterruptNow(l,s){return this.mode!=="accepted"||!this.interruptOnConfirm||this.interrupted?!1:ff(l,s)?(this.interrupted=!0,!0):this.wordPathBlockedFlag?!1:Mu(l,s)?(this.interrupted=!0,!0):!1}speechEnd(l,s,f){const d=this.mode==="accepted",y=this.wordPathBlockedFlag;return d?!this.interruptOnConfirm||this.interrupted?(this.reset(),{accepted:!0,interrupt:!1,send:!0,deferDecision:!1,wordPathBlocked:y}):f?ff(l,s)||!y&&Mu(l,s)?(this.reset(),{accepted:!0,interrupt:!0,send:!0,deferDecision:!1,wordPathBlocked:y}):(this.reset(),{accepted:!0,interrupt:!1,send:!1,deferDecision:!1,wordPathBlocked:y}):(this.reset(),{accepted:!0,interrupt:!1,send:!0,deferDecision:!0,wordPathBlocked:y}):(this.reset(),{accepted:!1,interrupt:!1,send:!1,deferDecision:!1,wordPathBlocked:y})}reset(){this.mode="idle",this.interruptOnConfirm=!1,this.interrupted=!1,this.wordPathBlockedFlag=!1,this.startedAt=0}}function Eu(u,l,s,f){return async d=>{d.throwIfAborted();const y=l.createAnalyser();y.fftSize=128,y.connect(s);const E=l.createBufferSource();E.buffer=u,E.connect(y),await new Promise((N,L)=>{const j=()=>{E.onended=null;try{E.stop()}catch{}E.disconnect(),y.disconnect(),L(d.reason)};E.onended=()=>{d.removeEventListener("abort",j),E.disconnect(),y.disconnect(),N()},d.addEventListener("abort",j,{once:!0}),E.start(),f(y),d.aborted&&j()})}}const Vh=.1,Bh=.02,Wh=.5,Hh=.3,Al=.005;function Kh(){return{nextTime:0,started:!1,underrunLead:Bh,restarted:!1}}function Qh(u,l,s){let f,d;return u.started?u.nextTime<l?(f=l+u.underrunLead,u.underrunLead=Math.min(Wh,u.underrunLead*2),d=!0):(f=u.nextTime,d=!1):(f=l+Vh,d=!0),u.started=!0,u.restarted=d,u.nextTime=f+s,f}function qh(u,l){return u.reduce((s,f)=>s+f.length,0)/l}function Gh(u,l){return u>=Hh}function Yh(u,l,s,f){return u.started&&!f&&u.nextTime<l&&s<u.underrunLead}async function Xh(u,l,s,f,d,y){const E=u.getReader(),N=[];let L=null,j=!1,K=0,I=null;const z=()=>{const U=I;I=null,U==null||U()},$=()=>{E.cancel().catch(()=>{})};y.addEventListener("abort",$,{once:!0});const J=U=>{let H=U;L!==null&&(H=new Uint8Array(U.length+1),H[0]=L,H.set(U,1),L=null),H.length%2&&(L=H[H.length-1],H=H.subarray(0,H.length-1));const D=new DataView(H.buffer,H.byteOffset,H.byteLength),ne=new Float32Array(H.length/2);for(let ve=0;ve<ne.length;ve++){const ke=D.getInt16(ve*2,!0);ne[ve]=ke<0?ke/32768:ke/32767}return ne};let le,C;const Q=new Promise((U,H)=>{le=U,C=H}),q=(async()=>{try{for(;;){const{done:U,value:H}=await E.read();if(U)break;if(!(H!=null&&H.length))continue;const D=J(H);D.length&&(K+=D.length,N.push(D),Gh(K/l,!1)&&le(),z())}if(!K)throw new Error("The speech server sent no audio")}finally{j=!0,y.removeEventListener("abort",$),z()}})();q.catch(U=>C(U)),q.then(()=>le(),()=>{}),await Q;const ye=(async U=>{U.throwIfAborted();const H=s.createAnalyser();H.fftSize=128,H.connect(f);const D=s.createGain();D.connect(H);const ne=new Set,ve=Kh();let ke=!1;try{await new Promise((B,Ee)=>{const Ye=()=>{j&&!N.length&&!ne.size&&B()},be=()=>{if(U.aborted)return;const De=s.currentTime,Ie=qh(N,l);if(N.length&&!Yh(ve,De,Ie,j)){const Ne=N.reduce((ie,ue)=>ie+ue.length,0),V=s.createBuffer(1,Ne,l),se=V.getChannelData(0);let W=0;for(const ie of N.splice(0))se.set(ie,W),W+=ie.length;const g=s.createBufferSource();g.buffer=V,g.connect(D);const T=Qh(ve,De,V.duration);ve.restarted&&(D.gain.cancelScheduledValues(T),D.gain.setValueAtTime(0,T),D.gain.linearRampToValueAtTime(1,T+Al)),g.start(T),ne.add(g),g.onended=()=>{ne.delete(g),g.disconnect(),Ye()},ke||(ke=!0,d(H))}Ye(),(!j||N.length)&&(I=be)},Qe=()=>{I=null;const De=s.currentTime;D.gain.cancelScheduledValues(De),D.gain.setValueAtTime(D.gain.value,De),D.gain.linearRampToValueAtTime(0,De+Al);for(const Ie of ne){Ie.onended=null;try{Ie.stop(De+Al)}catch{}}ne.clear(),$(),Ee(U.reason)};U.addEventListener("abort",Qe,{once:!0}),be()}),D.disconnect(),H.disconnect()}catch(B){throw setTimeout(()=>{try{D.disconnect()}catch{}try{H.disconnect()}catch{}},Al*1e3+20),B}});return ye.completed=q,ye}const Jh=300;class bh{constructor(l,s,f){te(this,"run",this.fresh());te(this,"synthesize");te(this,"changed");te(this,"reportError");this.synthesize=l,this.changed=s,this.reportError=f}get busy(){const l=this.run;return l.generating||l.playing||l.text.length>0||l.audio.length>0}enqueue(l){this.run.text.push(...l),this.pump(this.run)}cancel(){const l=this.run;this.run=this.fresh(),l.text=[],l.audio=[],l.controller.abort(),this.changed()}fresh(){return{controller:new AbortController,text:[],audio:[],hasDispatchedSpeech:!1,generating:!1,playing:!1}}fail(l,s){l!==this.run||l.controller.signal.aborted||(this.cancel(),this.reportError(s))}pump(l){if(l!==this.run||l.controller.signal.aborted)return;const s=l.controller.signal;if(!l.playing&&l.audio.length){const f=l.audio.shift();l.playing=!0,(async()=>{try{await f(s)}catch(d){this.fail(l,d)}finally{l.playing=!1,l===this.run&&this.pump(l)}})()}if(!l.generating&&l.audio.length<2&&l.text.length){let f=l.text.shift();if(l.hasDispatchedSpeech)for(;l.text.length&&f.length+l.text[0].length+1<=Jh;)f+=` ${l.text.shift()}`;l.hasDispatchedSpeech=!0,l.generating=!0,(async()=>{var d;try{const y=await this.synthesize(f,s);l===this.run&&!s.aborted&&l.audio.push(y),(d=y.completed)==null||d.catch(E=>this.fail(l,E))}catch(y){this.fail(l,y)}finally{l.generating=!1,l===this.run&&this.pump(l)}})()}this.changed()}}const Zh="modulepreload",ep=function(u){return"/"+u},hf={},Ff=function(l,s,f){let d=Promise.resolve();if(s&&s.length>0){let E=function(j){return Promise.all(j.map(K=>Promise.resolve(K).then(I=>({status:"fulfilled",value:I}),I=>({status:"rejected",reason:I}))))};document.getElementsByTagName("link");const N=document.querySelector("meta[property=csp-nonce]"),L=(N==null?void 0:N.nonce)||(N==null?void 0:N.getAttribute("nonce"));d=E(s.map(j=>{if(j=ep(j),j in hf)return;hf[j]=!0;const K=j.endsWith(".css"),I=K?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${j}"]${I}`))return;const z=document.createElement("link");if(z.rel=K?"stylesheet":Zh,K||(z.as="script"),z.crossOrigin="",z.href=j,L&&z.setAttribute("nonce",L),document.head.appendChild(z),K)return new Promise(($,J)=>{z.addEventListener("load",$),z.addEventListener("error",()=>J(new Error(`Unable to preload CSS for ${j}`)))})}))}function y(E){const N=new Event("vite:preloadError",{cancelable:!0});if(N.payload=E,window.dispatchEvent(N),!N.defaultPrevented)throw E}return d.then(E=>{for(const N of E||[])N.status==="rejected"&&y(N.reason);return l().catch(y)})},Fu="/voice-assets/",tp=["silero_vad_v5.onnx","vad.worklet.bundle.min.js","ort-wasm-simd-threaded.mjs","ort-wasm-simd-threaded.wasm"];let _u=null;function Lf(){return _u??(_u=Ff(()=>import("./index-CeWj4ejR.js").then(u=>u.i),__vite__mapDeps([0,1])).catch(u=>{throw _u=null,u})),_u}let pf=!1;function np(){if(!pf){pf=!0,Lf().catch(()=>{});for(const u of tp)fetch(`${Fu}${u}`,{priority:"low"}).then(l=>l.ok?l.arrayBuffer():void 0).catch(()=>{})}}const Of="voice-assistant.vad-redemption-ms";function Af(u){return typeof window>"u"?void 0:window.localStorage}function Cu(u){var l;try{const s=(l=Af(u))==null?void 0:l.getItem(Of);if(s==null)return Lo;const f=Number(s);return Number.isFinite(f)?Vu(f):Lo}catch{return Lo}}function rp(u,l){var f;const s=Vu(u);try{(f=Af(l))==null||f.setItem(Of,String(s))}catch{}return s}const Lu=512,Ou=16e3,op=2e4,ip={frameSamples:Lu,sampleRate:Ou,positiveSpeechThreshold:$l,negativeSpeechThreshold:$u,minSpeechMs:Pf,redemptionMs:Lo,preSpeechPadMs:Tf,maxSpeechMs:op,noiseFloorWindowFrames:100,noiseFloorPercentile:.3,noiseFloorMarginDb:6,noiseFloorRangeDb:24,minFloorRms:.0015,submitUserSpeechOnPause:!1};function lp(u){let l=0;for(let s=0;s<u.length;s++)l+=u[s]*u[s];return Math.sqrt(l/Math.max(1,u.length))}function mf(u){return 20*Math.log10(Math.max(u,1e-8))}function sp(u){return Math.min(1,Math.max(0,u))}function up(u){const l=u.reduce((d,y)=>d+y.length,0),s=new Float32Array(l);let f=0;for(const d of u)s.set(d,f),f+=d.length;return s}class ap{constructor(l={}){te(this,"options");te(this,"msPerFrame");te(this,"minSpeechFrames",1);te(this,"redemptionFrames",1);te(this,"preSpeechPadFrames",0);te(this,"maxSpeechFrames",1);te(this,"state","silence");te(this,"ring",[]);te(this,"recorded",[]);te(this,"activeFrames",0);te(this,"silenceFrames",0);te(this,"noiseFloorSamples",[]);te(this,"active",!0);this.options={...ip,...l},this.msPerFrame=this.options.frameSamples/this.options.sampleRate*1e3,this.recalculateFrameCounts()}recalculateFrameCounts(){this.minSpeechFrames=Math.max(1,Math.ceil(this.options.minSpeechMs/this.msPerFrame)),this.redemptionFrames=Math.max(1,Math.ceil(this.options.redemptionMs/this.msPerFrame)),this.preSpeechPadFrames=Math.max(0,Math.ceil(this.options.preSpeechPadMs/this.msPerFrame)),this.maxSpeechFrames=Math.max(this.minSpeechFrames,Math.ceil(this.options.maxSpeechMs/this.msPerFrame))}setOptions(l){this.options={...this.options,...l},this.recalculateFrameCounts()}get noiseFloor(){return this.estimateNoiseFloor()}get speaking(){return this.state==="speech"}reset(){this.state="silence",this.ring=[],this.recorded=[],this.activeFrames=0,this.silenceFrames=0}resume(){this.active=!0}pause(){return this.active=!1,this.options.submitUserSpeechOnPause?this.endSegment():(this.reset(),[])}endSegment(){const l=[];return this.state==="speech"?l.push({type:"speech-end",samples:up(this.recorded)}):this.state==="maybe"&&l.push({type:"misfire"}),this.reset(),l}process(l){if(!this.active)return{probability:0,events:[]};const s=lp(l);this.state==="silence"&&this.pushNoiseFloorSample(s);const f=this.estimateNoiseFloor(),d=sp((mf(s)-mf(f)-this.options.noiseFloorMarginDb)/this.options.noiseFloorRangeDb),y=[];if(this.state==="silence")return this.pushRing(l),d>=this.options.positiveSpeechThreshold&&(this.state="maybe",this.recorded=[...this.ring],this.activeFrames=1,this.silenceFrames=0,y.push({type:"speech-start"})),{probability:d,events:y};this.recorded.push(l),d>=this.options.negativeSpeechThreshold?(this.silenceFrames=0,this.activeFrames++,this.state==="maybe"&&this.activeFrames>=this.minSpeechFrames&&(this.state="speech",y.push({type:"speech-real-start"}))):this.silenceFrames++;const N=this.recorded.length>=this.maxSpeechFrames,L=this.silenceFrames>=this.redemptionFrames;return(N||L)&&y.push(...this.endSegment()),{probability:d,events:y}}pushRing(l){this.ring.push(l),this.ring.length>this.preSpeechPadFrames&&this.ring.shift()}pushNoiseFloorSample(l){this.noiseFloorSamples.push(l),this.noiseFloorSamples.length>this.options.noiseFloorWindowFrames&&this.noiseFloorSamples.shift()}estimateNoiseFloor(){if(this.noiseFloorSamples.length===0)return this.options.minFloorRms;const l=[...this.noiseFloorSamples].sort((f,d)=>f-d),s=Math.min(l.length-1,Math.floor(l.length*this.options.noiseFloorPercentile));return Math.max(this.options.minFloorRms,l[s])}}class cp{constructor(l,s,f){te(this,"inputBuffer",[]);this.nativeSampleRate=l,this.targetSampleRate=s,this.targetFrameSize=f}process(l){const s=[];for(const f of l)for(this.inputBuffer.push(f);this.hasEnoughDataForFrame();)s.push(this.generateOutputFrame());return s}hasEnoughDataForFrame(){return this.inputBuffer.length*this.targetSampleRate/this.nativeSampleRate>=this.targetFrameSize}generateOutputFrame(){const l=new Float32Array(this.targetFrameSize);let s=0,f=0;for(;s<this.targetFrameSize;){let d=0,y=0;const E=Math.min(this.inputBuffer.length,(s+1)*this.nativeSampleRate/this.targetSampleRate);for(;f<E;){const N=this.inputBuffer[f];N!==void 0&&(d+=N,y++),f++}l[s]=y>0?d/y:0,s++}return this.inputBuffer=this.inputBuffer.slice(f),l}}const fp=`
|
|
42
|
+
class EnergyVadWorkletProcessor extends AudioWorkletProcessor {
|
|
43
|
+
constructor(options) {
|
|
44
|
+
super();
|
|
45
|
+
this.targetSampleRate = options.processorOptions.targetSampleRate;
|
|
46
|
+
this.targetFrameSize = options.processorOptions.targetFrameSize;
|
|
47
|
+
this.inputBuffer = [];
|
|
48
|
+
}
|
|
49
|
+
process(inputs) {
|
|
50
|
+
const channel = inputs[0] && inputs[0][0];
|
|
51
|
+
if (!channel) return true;
|
|
52
|
+
for (let i = 0; i < channel.length; i++) {
|
|
53
|
+
this.inputBuffer.push(channel[i]);
|
|
54
|
+
while ((this.inputBuffer.length * this.targetSampleRate) / sampleRate >= this.targetFrameSize) {
|
|
55
|
+
const frame = new Float32Array(this.targetFrameSize);
|
|
56
|
+
let outputIndex = 0;
|
|
57
|
+
let inputIndex = 0;
|
|
58
|
+
while (outputIndex < this.targetFrameSize) {
|
|
59
|
+
let sum = 0;
|
|
60
|
+
let count = 0;
|
|
61
|
+
const limit = Math.min(this.inputBuffer.length, ((outputIndex + 1) * sampleRate) / this.targetSampleRate);
|
|
62
|
+
while (inputIndex < limit) {
|
|
63
|
+
const value = this.inputBuffer[inputIndex];
|
|
64
|
+
if (value !== undefined) { sum += value; count++; }
|
|
65
|
+
inputIndex++;
|
|
66
|
+
}
|
|
67
|
+
frame[outputIndex] = count > 0 ? sum / count : 0;
|
|
68
|
+
outputIndex++;
|
|
69
|
+
}
|
|
70
|
+
this.inputBuffer = this.inputBuffer.slice(inputIndex);
|
|
71
|
+
this.port.postMessage(frame);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
registerProcessor("energy-vad-worklet-processor", EnergyVadWorkletProcessor);
|
|
78
|
+
`;class Bu{constructor(l){te(this,"options");te(this,"processor");te(this,"initState","uninitialized");te(this,"stream",null);te(this,"sourceNode",null);te(this,"workletNode",null);te(this,"scriptNode",null);te(this,"workletModuleUrl",null);te(this,"listening",!1);te(this,"handleFrame",l=>{const s=this.processor.process(l);this.options.onFrameProcessed({isSpeech:s.probability,notSpeech:1-s.probability},l);for(const f of s.events)this.dispatch(f)});te(this,"start",async()=>{switch(this.initState){case"uninitialized":{this.initState="initializing",this.processor.resume();try{this.stream=await this.options.getStream(),await this.attachAudioGraph(),this.listening=!0,this.initState="initialized"}catch(l){throw this.initState="errored",l}return}case"initialized":{if(this.listening)return;this.processor.resume(),this.stream=this.options.resumeStream?await this.options.resumeStream(this.stream):this.stream,await this.attachAudioGraph(),this.listening=!0;return}default:return}});te(this,"pause",async()=>{if(!this.listening)return;this.listening=!1;const l=this.processor.pause();for(const s of l)this.dispatch(s);this.stream&&this.options.pauseStream&&await this.options.pauseStream(this.stream),this.detachAudioGraph()});te(this,"destroy",async()=>{this.initState!=="destroyed"&&(this.listening&&await this.pause(),this.initState="destroyed",this.workletModuleUrl&&(URL.revokeObjectURL(this.workletModuleUrl),this.workletModuleUrl=null))});te(this,"setOptions",l=>{this.processor.setOptions(l)});this.options=l,this.processor=new ap({positiveSpeechThreshold:l.positiveSpeechThreshold,negativeSpeechThreshold:l.negativeSpeechThreshold,minSpeechMs:l.minSpeechMs,preSpeechPadMs:l.preSpeechPadMs,redemptionMs:l.redemptionMs,maxSpeechMs:l.maxSpeechMs,submitUserSpeechOnPause:l.submitUserSpeechOnPause??!1})}static async new(l){return new Bu(l)}dispatch(l){switch(l.type){case"speech-start":this.options.onSpeechStart();return;case"speech-real-start":this.options.onSpeechRealStart();return;case"misfire":this.options.onVADMisfire();return;case"speech-end":this.options.onSpeechEnd(l.samples);return}}async attachAudioGraph(){const l=this.options.audioContext,s=this.stream;if(!s)throw new Error("Energy VAD has no active microphone stream.");if(this.sourceNode=new MediaStreamAudioSourceNode(l,{mediaStream:s}),this.canUseAudioWorklet(l))try{await this.attachAsWorklet(l),this.sourceNode.connect(this.workletNode);return}catch{this.workletNode=null}this.attachAsScriptProcessor(l),this.sourceNode.connect(this.scriptNode)}canUseAudioWorklet(l){return"audioWorklet"in l&&typeof AudioWorkletNode=="function"}async attachAsWorklet(l){if(!this.workletModuleUrl){const s=new Blob([fp],{type:"application/javascript"});this.workletModuleUrl=URL.createObjectURL(s)}await l.audioWorklet.addModule(this.workletModuleUrl),this.workletNode=new AudioWorkletNode(l,"energy-vad-worklet-processor",{numberOfInputs:1,numberOfOutputs:0,channelCount:1,processorOptions:{targetSampleRate:Ou,targetFrameSize:Lu}}),this.workletNode.port.onmessage=s=>{this.handleFrame(s.data)}}attachAsScriptProcessor(l){const s=new cp(l.sampleRate,Ou,Lu),d=l.createScriptProcessor(4096,1,1);let y=!1;d.onaudioprocess=E=>{if(!y){y=!0;try{const N=E.inputBuffer.getChannelData(0);E.outputBuffer.getChannelData(0).fill(0);for(const j of s.process(N))this.handleFrame(j)}finally{y=!1}}},d.connect(l.destination),this.scriptNode=d}detachAudioGraph(){var l;(l=this.sourceNode)==null||l.disconnect(),this.sourceNode=null,this.workletNode&&(this.workletNode.port.onmessage=null,this.workletNode.disconnect(),this.workletNode=null),this.scriptNode&&(this.scriptNode.onaudioprocess=null,this.scriptNode.disconnect(),this.scriptNode=null)}}const Il=["One moment.","Checking now.","Still on it.","Just a second.","Working on it."],dp=1500,hp=6e3,pp=4e3,mp=500;function vp(){return{turnActive:!1,hasSpokenThisTurn:!1,lastCueAt:null,lastCueText:null}}function gp(u){return{turnActive:!0,hasSpokenThisTurn:!1,lastCueAt:null,lastCueText:null}}function vf(u){return{...u,turnActive:!1}}function yp(u){return u.hasSpokenThisTurn?u:{...u,hasSpokenThisTurn:!0}}function wp(u,l,s){return{...u,lastCueAt:s,lastCueText:l}}function Sp(u,l,s){return!(!u.turnActive||!u.hasSpokenThisTurn||l<dp||u.lastCueAt!==null&&s-u.lastCueAt<hp)}function kp(u,l=Math.random){const s=u.lastCueText?Il.filter(d=>d!==u.lastCueText):Il,f=s.length?s:Il;return f[Math.min(f.length-1,Math.floor(l()*f.length))]}function zf(u){return u.replace(/```[\s\S]*?(?:```|$)/g," Code is shown on screen. ").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/<[^>]*>/g,"").replace(/[*_`#>|]/g,"").replace(/\s+/g," ").trim()}function xp(u,l){let s=!1,f=!1,d=0,y=!1;for(let E=0;E<u.length;E++){if(u.startsWith("```",E)){s=!s,E+=2;continue}if(s)continue;if(u[E]==="`"){f=!f;continue}if(f)continue;if(u[E]==="["&&d++,u[E]==="]"&&(d=Math.max(0,d-1),u[E+1]==="("&&(y=!0)),y){u[E]===")"&&(y=!1);continue}if(d)continue;const L=(/[.!?。!?]/.test(u[E])||l&&/[,;:,;:]/.test(u[E]))&&(/[。!?,;:]/.test(u[E])||/\s/.test(u[E+1]||"")),j=u[E]==="."&&/(?:\b(?:Mr|Mrs|Ms|Dr|Prof|St|vs|etc)|\b[A-Za-z])\.$/i.test(u.slice(0,E+1)),K=l?48:160;if(L&&!j||u[E]===`
|
|
79
|
+
`||u[E]==="—"||E>=K&&/\s/.test(u[E]))return E+1}return 0}function Ep(u,l,s){var d;let f=0;for(;f<u.length;){const y=xp(u.slice(f),s)||(l?u.length-f:0);if(!y)return 0;f+=y;const E=((d=zf(u.slice(0,f).replace(/—/g," ")).match(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu))==null?void 0:d.length)??0,N=/[.!?。!?]["'”’)\]]*\s*$/.test(u.slice(0,f));if(E>(s&&N?1:3)||l&&f===u.length)return f}return 0}function Nu(u,l=!1,s=!1){const f=[];let d=0,y=s;for(;d<u.length;){const E=Ep(u.slice(d),l,y);if(!E)break;const N=zf(u.slice(d,d+E).replace(/—$/,"").replace(/—/g,", "));N&&(f.push(N),y=!1),d+=E}return{chunks:f,rest:l?"":u.slice(d)}}function zl(u,l,s){return u||l||s}function _p(u){const l=new ArrayBuffer(44+u.length*2),s=new DataView(l),f=(d,y)=>[...y].forEach((E,N)=>s.setUint8(d+N,E.charCodeAt(0)));return f(0,"RIFF"),s.setUint32(4,36+u.length*2,!0),f(8,"WAVEfmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,16e3,!0),s.setUint32(28,32e3,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),f(36,"data"),s.setUint32(40,u.length*2,!0),u.forEach((d,y)=>s.setInt16(44+y*2,Math.max(-1,Math.min(1,d))*(d<0?32768:32767),!0)),new Blob([l],{type:"audio/wav"})}function Au(){const u=globalThis.crypto;if(u&&typeof u.randomUUID=="function")return u.randomUUID();const l=new Uint8Array(16);if(u)u.getRandomValues(l);else for(let s=0;s<l.length;s+=1)l[s]=Math.floor(Math.random()*256);return Array.from(l,s=>s.toString(16).padStart(2,"0")).join("")}const Df="meldivo.token",Cp="meldivo.token";let Mo;function Np(){try{window.localStorage.removeItem(Cp)}catch{}const l=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("token");if(l){try{window.sessionStorage.setItem(Df,l)}catch{}Mo=l;try{window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}`)}catch{}}}function Pp(){if(Mo!==void 0)return Mo;try{Mo=window.sessionStorage.getItem(Df)}catch{Mo=null}return Mo}function Oe(){const u=Pp();return u?{"X-Meldivo-Token":u}:{}}class dn extends Error{constructor(){super("Unauthorized"),this.name="UnauthorizedError"}}function hn(u){if(u.status===401)throw new dn;return u}const Tp="voice-assistant-microphone",zu="voice-assistant-microphone-owner",jp=15e3,Rp=5e3,Mp=5e3;function Dl(){try{const u=window.localStorage.getItem(zu);if(!u)return null;const l=JSON.parse(u);return typeof l.id!="string"||typeof l.expiresAt!="number"?null:{id:l.id,expiresAt:l.expiresAt}}catch{return null}}function Fp(){var E;const u=Au(),l=Date.now(),s=Dl();if(s&&s.expiresAt>l)return null;const f=()=>window.localStorage.setItem(zu,JSON.stringify({id:u,expiresAt:Date.now()+jp}));try{if(f(),((E=Dl())==null?void 0:E.id)!==u)return null}catch{return{release:()=>{}}}let d=!1;const y=window.setInterval(()=>{var N;d||((N=Dl())==null?void 0:N.id)!==u||f()},Rp);return{release:()=>{var N;if(!d){d=!0,window.clearInterval(y);try{((N=Dl())==null?void 0:N.id)===u&&window.localStorage.removeItem(zu)}catch{}}}}}async function Lp(){let u,l,s;const f=new Promise((y,E)=>{l=y,s=E}),d=new Promise(y=>{u=y});return navigator.locks.request(Tp,{mode:"exclusive",ifAvailable:!0},async y=>{if(!y){l(null);return}let E=!1;l({release:()=>{E||(E=!0,u())}}),await d}).catch(s),f}async function Op(u){const l=await fetch("/api/voice/lease",{method:"POST",headers:Oe()});if(l.status===409)return null;if(!l.ok)throw new Error("Could not reserve the voice session.");const s=await l.json();if(typeof s.token!="string"||s.token.length<16)throw new Error("Voice session returned an invalid lease.");let f=!1;const d=()=>{f||(f=!0,window.clearInterval(y),fetch("/api/voice/lease",{method:"DELETE",headers:{"Content-Type":"application/json",...Oe()},body:JSON.stringify({token:s.token}),keepalive:!0}).catch(()=>{}))},y=window.setInterval(()=>{fetch("/api/voice/lease/heartbeat",{method:"POST",headers:{"Content-Type":"application/json",...Oe()},body:JSON.stringify({token:s.token})}).then(E=>{E.status===409&&(d(),u())}).catch(()=>{})},Mp);return{release:d}}async function Ap(u=()=>{}){const l=typeof navigator<"u"&&navigator.locks?await Lp():typeof window>"u"?null:Fp();if(!l)return null;try{const s=await Op(u);return s?{release:()=>{s.release(),l.release()}}:(l.release(),null)}catch(s){throw l.release(),s}}const Wu="voice-assistant.selected-voice";function If(u){return typeof u=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(u)}function Hu(u){return typeof window>"u"?void 0:window.localStorage}function Br(u){var l;try{const s=(l=Hu(u))==null?void 0:l.getItem(Wu);return If(s)?s:void 0}catch{return}}function zp(u,l){var s;if(!If(u))return!1;try{return(s=Hu(l))==null||s.setItem(Wu,u),!0}catch{return!1}}function gf(u){var l;try{(l=Hu(u))==null||l.removeItem(Wu)}catch{}}function Uf(){return h.jsx("main",{className:"auth-screen",children:h.jsxs("p",{children:["Open the link printed by ",h.jsx("code",{children:"meldivo open"}),"."]})})}const Dp=3,yf=420,wf=140;function Ip(){const[u,l]=_.useState([]),s=_.useRef(0),f=_.useRef(new Set);_.useEffect(()=>()=>{for(const N of f.current)window.clearTimeout(N);f.current.clear()},[]);const d=_.useCallback((N,L)=>{const j=window.setTimeout(()=>{f.current.delete(j),l(K=>K.filter(I=>!N.includes(I.id)))},L);f.current.add(j)},[]),y=_.useCallback(N=>{const j={id:++s.current,name:N.name,summary:N.summary??`Using ${N.name}`,detail:N.detail,folder:N.folder,leaving:!1,delay:0};l(K=>{const I=K.filter($=>!$.leaving),z=new Set(I.slice(0,Math.max(0,I.length+1-Dp)).map($=>$.id));return z.size&&d([...z],yf),[...K.map($=>z.has($.id)?{...$,leaving:!0,delay:0}:$),j]})},[d]),E=_.useCallback(()=>{l(N=>{const L=N.filter(j=>!j.leaving);return L.length?(d(L.map(j=>j.id),yf+wf*L.length),N.map(j=>j.leaving?j:{...j,leaving:!0,delay:wf*L.indexOf(j)})):N})},[d]);return{items:u,push:y,clear:E}}function Up({items:u}){return u.length?h.jsx("ol",{className:"tool-activity","aria-live":"polite","aria-label":"What the agent is doing",children:u.map(l=>h.jsxs("li",{className:`tool-activity__item${l.leaving?" tool-activity__item--leaving":""}`,style:{"--delay":`${l.delay}ms`},"aria-hidden":l.leaving||void 0,children:[h.jsxs("span",{className:"tool-activity__summary",children:[h.jsx("span",{className:"tool-activity__tool",children:l.name.replace(/^mcp__.*__/,"")}),l.summary]}),l.detail&&h.jsx("code",{className:"tool-activity__detail",title:l.detail,children:l.detail}),l.folder&&h.jsxs("span",{className:"tool-activity__folder",children:["in ",l.folder]})]},l.id))}):null}function Fo(u){const l=/^@([A-Za-z0-9._-]{1,40})\/(.+)$/.exec(u);return l?{prefix:`@${l[1]}/`,host:l[1],inner:l[2]}:{prefix:"",host:"",inner:u}}const Du=["pi","opencode","claude"],Vl={pi:"Pi",opencode:"OpenCode",claude:"Claude Code"};let Sf=!1;function kf(u){const{host:l,inner:s}=Fo(u),f=l||void 0;if(s.startsWith("new:"))return{harness:s.slice(4),title:"New chat",cwd:"~",host:f};if(s==="quick")return{title:"Quick chat",cwd:"~",host:f};const d=s.indexOf(":");return d===-1?{title:s,cwd:"",host:f}:{harness:s.slice(0,d),title:s.slice(d+1),cwd:"",host:f}}function $p(u){const l=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(u);return l?`~${l[2]??""}`:u}function Vp(u){return`meldivo.conversation.${u}`}function Bp(u){const l=Vp(u);try{const s=window.sessionStorage.getItem(l);if(s)return s;const f=Au();return window.sessionStorage.setItem(l,f),f}catch{return Au()}}const Wp=12e3,Hp=560,Kp="This is a voice preview.",$f="voice-assistant.onboarding-dismissed",Qp=3e3;function ki(u){const l=/^([a-z]{2})[_-](.+)$/i.exec(u),s={af:"American female",am:"American male",bf:"British female",bm:"British male",ef:"Spanish female",em:"Spanish male",ff:"French female",fm:"French male",hf:"Hindi female",hm:"Hindi male",if:"Italian female",im:"Italian male",jf:"Japanese female",jm:"Japanese male",pf:"Portuguese female",pm:"Portuguese male",zf:"Chinese female",zm:"Chinese male"};if(l){const f=s[l[1].toLowerCase()];if(f)return`${ki(l[2])} — ${f}`}return u.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[._-]+/g," ").replace(/\b\w/g,f=>f.toUpperCase())}function qp(){try{return window.localStorage.getItem($f)!=="true"}catch{return!0}}class Gp extends Error{constructor(){super("Another voice tab is active. Close it or stop voice there first."),this.name="VoiceOwnershipError"}}function xf(u,l){return new Promise((s,f)=>{if(l.aborted)return f(l.reason);const d=window.setTimeout(()=>{l.removeEventListener("abort",y),s()},u),y=()=>{window.clearTimeout(d),f(l.reason)};l.addEventListener("abort",y,{once:!0})})}async function Yp(u,l){if(!u.body)throw new Error("Chat response was empty.");const s=u.body.pipeThrough(new TextDecoderStream).getReader();let f="";for(;;){const{done:d,value:y}=await s.read();if(d)break;f+=y;const E=f.split(`
|
|
80
|
+
`);f=E.pop()??"";for(const N of E){if(!N.startsWith("data:"))continue;const L=N.slice(5).trim();if(!L)continue;let j;try{j=JSON.parse(L)}catch{continue}if(l(j),j.type==="done")return}}}function Xp({sessionKey:u,folder:l}){var Tr;const[s,f]=_.useState("idle"),[d,y]=_.useState(0),[E,N]=_.useState(""),L=_.useRef(s),j=_.useRef(!0),K=_.useRef(!1),I=_.useRef(!1),z=_.useRef(!1),$=_.useRef(!1),J=_.useRef(null),le=_.useRef(null),C=_.useRef(null),Q=_.useRef(null),q=_.useRef(null),ye=_.useRef(!1),U=_.useRef(null),H=_.useRef(null),D=_.useRef(null),ne=_.useRef(new dh),ve=_.useRef(0),ke=_.useRef(0),B=_.useRef(null),Ee=_.useRef(null),Ye=_.useRef(0),be=_.useRef(Bp(l?`${u}|${l}`:u)),Qe=_.useRef(u),De=_.useRef(null),Ie=_.useRef(kf(u).harness),Ne=_.useRef(0),V=_.useRef(0),se=_.useRef(null),W=_.useRef(""),g=_.useRef(""),T=_.useRef(null),ie=_.useRef(new $h),ue=_.useRef(""),me=_.useRef(0),we=_.useRef([]),ge=_.useRef(""),xe=_.useRef(null),je=_.useRef(0),st=_.useRef(0),Qn=_.useRef(!1),mr=_.useRef(null),Ze=_.useRef(vp()),vr=_.useRef(new Map),pn=_.useRef(null),gr=_.useRef(null),qn=_.useRef(null),Pn=_.useRef(null),Tn=_.useRef(0),bt=_.useRef({}),$t=_.useRef(),[_t,Wr]=_.useState(null),[yt,Hr]=_.useState(!1),[Kr,Oo]=_.useState([]),[jn,Ei]=_.useState(""),[et,Rn]=_.useState(()=>Br()??""),[_i,Qr]=_.useState(()=>Br()??""),[Ao,Bl]=_.useState(()=>Cu()),[wt,zo]=_.useState({ready:!0,downloading:!1}),[Zt,qr]=_.useState(()=>{const m=kf(u);return l&&Fo(u).inner.startsWith("new:")?{...m,cwd:$p(l)}:m}),[Do,Mn]=_.useState(!1),[Fn,Ln]=_.useState(""),yr=Ip(),[Ci,Gn]=_.useState(!1),[Io,Gr]=_.useState(""),[Yr,Yn]=_.useState(!1),[Xr,St]=_.useState(""),[Ni,mn]=_.useState(""),[On,Xn]=_.useState(null),[Uo,Wl]=_.useState(qp),wr=_.useRef(null),Jr=_.useRef(null),Vt=_.useRef(0),$o=_.useRef(null),Vo=_.useRef(null),Pi=_.useRef(null),en=_.useRef(null),Ft=_.useRef(null),Bt=_.useRef(null),Sr=_.useRef(null),br=_.useRef(!1),tn=_.useRef(!1),Pe=()=>{B.current!==null&&window.clearTimeout(B.current),B.current=null},Wt=()=>{mr.current!==null&&window.clearTimeout(mr.current),mr.current=null},Jn=()=>{var m;gr.current!==null&&window.clearInterval(gr.current),gr.current=null,(m=pn.current)==null||m.abort(),pn.current=null},tt=m=>{L.current=m,j.current&&f(m)},An=m=>{m&&se.current!==m||(cancelAnimationFrame(V.current),se.current=null,$.current=!1,j.current&&y(0))},Ti=(m,k)=>{cancelAnimationFrame(V.current),se.current=k,$.current=!0,tt("speaking");const P=new Float32Array(m.fftSize),M=()=>{se.current===k&&(m.getFloatTimeDomainData(P),y(Math.min(1,Math.sqrt(P.reduce((X,G)=>X+G*G,0)/P.length)*6)),V.current=requestAnimationFrame(M))};M()},dt=()=>{var m,k,P;K.current||L.current==="error"||($.current||(m=U.current)!=null&&m.busy&&L.current==="speaking"?tt("speaking"):q.current||(k=U.current)!=null&&k.busy||(P=D.current)!=null&&P.busy?tt(ye.current?"running":"thinking"):I.current&&tt("listening"))},bn=_.useRef(!1),Lt="Reading the conversation…",Hl=async()=>{const m=Qe.current,{inner:k}=Fo(m);if(!(bn.current||!k.includes(":")||k.startsWith("new:"))){bn.current=!0,Ln(Lt);try{await fetch(`/api/sessions/${encodeURIComponent(m)}/warm`,{method:"POST",headers:Oe()})}catch{}finally{bn.current=!1,j.current&&Ln(P=>P===Lt?"":P)}}},Ot=()=>{const m=Q.current,k=C.current;!m||!k||(m.gain.cancelScheduledValues(k.currentTime),m.gain.setTargetAtTime(0,k.currentTime,.01))},ht=()=>{const m=Q.current,k=C.current;!m||!k||(m.gain.cancelScheduledValues(k.currentTime),m.gain.setTargetAtTime(1,k.currentTime,.015))},Kl=()=>{var m,k;return!!q.current||!!((m=U.current)!=null&&m.busy)||$.current||!!((k=D.current)!=null&&k.busy)||L.current==="hearing"},Bo=async m=>{var X,G;(X=qn.current)==null||X.abort(),(G=Pn.current)==null||G.abort();const k=new AbortController;qn.current=k,vr.current.clear();const P=Br(),M=()=>C.current===m&&!k.signal.aborted;try{await xf(pp,k.signal);for(const Z of Il)for(;M();){for(;M()&&Kl();)await xf(mp,k.signal);if(!M())return;const de=new AbortController;Pn.current=de;try{const Ae=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...Oe()},body:JSON.stringify({text:Z,...P?{voice:P}:{}}),signal:de.signal});if(!M()||!Ae.ok)break;const fe=await Ae.arrayBuffer();if(!M())return;const We=await m.decodeAudioData(fe);M()&&vr.current.set(Z,We);break}catch{if(!de.signal.aborted)break}finally{Pn.current===de&&(Pn.current=null)}}}catch{}finally{qn.current===k&&(qn.current=null)}},Zr=async(m,k)=>{const P=C.current,M=vr.current.get(m);if(!P||!M)return;const X=Symbol("cue"),G=W.current;W.current=m,we.current=df(we.current,m,performance.now());const Z=Eu(M,P,Q.current??P.destination,de=>Ti(de,X));try{await Z(k)}catch{}finally{An(X),W.current===m&&(W.current=G),dt()}},eo=()=>{Jn(),gr.current=window.setInterval(()=>{var X;if(!Ze.current.turnActive){Jn();return}if($.current||(X=U.current)!=null&&X.busy||pn.current)return;const m=Date.now(),k=m-Tn.current;if(!Sp(Ze.current,k,m))return;const P=kp(Ze.current);Ze.current=wp(Ze.current,P,m);const M=new AbortController;pn.current=M,Zr(P,M.signal).finally(()=>{pn.current===M&&(pn.current=null),Tn.current=Date.now()})},300)},nt=m=>{if(!j.current)return;const k=++Ye.current;Ee.current!==null&&window.clearTimeout(Ee.current),N(m),tt("error"),Ee.current=window.setTimeout(()=>{Ye.current===k&&(Ee.current=null,N(""),L.current==="error"&&tt(I.current?K.current?"muted":"listening":"idle"))},4e3)},zn=()=>{var m;(m=T.current)==null||m.release(),T.current=null},Zn=()=>{var k,P;Ne.current++;const m=ye.current||!!q.current;if(ye.current=!1,(k=q.current)==null||k.abort(),q.current=null,(P=U.current)==null||P.cancel(),An(),ht(),Ze.current=vf(Ze.current),Jn(),m){const M=De.current??Qe.current;fetch(`/api/sessions/${encodeURIComponent(M)}/cancel`,{method:"POST",headers:Oe()}).catch(()=>{})}De.current=null,!K.current&&I.current&&tt("listening")},kr=()=>{var m;zl(!!q.current,!!((m=U.current)!=null&&m.busy),$.current)&&Zn()},At=m=>{var X,G,Z;if(!I.current&&!z.current)return;I.current=!1,z.current=!1,tn.current=!1,Gn(!1),ve.current++,Pe(),ne.current.deactivate(),K.current=!1,Zn(),ht(),ie.current.reset(),Wt(),ue.current="",me.current=0,ge.current="",(X=H.current)==null||X.reset(),H.current=null,(G=D.current)==null||G.reset(),D.current=null,U.current=null;const k=J.current;J.current=null,k==null||k.destroy().catch(()=>{});const P=le.current;le.current=null,P==null||P.getTracks().forEach(de=>{de.onended=null,de.stop()});const M=C.current;C.current=null,(Z=Q.current)==null||Z.disconnect(),Q.current=null,M&&M.state!=="closed"&&M.close().catch(()=>{}),zn(),nt(m)},ji=()=>{var M,X,G;if(!I.current)return;I.current=!1,tn.current=!1,Gn(!1),ve.current++,Pe(),ne.current.deactivate(),K.current=!1,Zn(),ht(),ie.current.reset(),Wt(),ue.current="",me.current=0,ge.current="",(M=H.current)==null||M.reset(),H.current=null,(X=D.current)==null||X.reset(),D.current=null,U.current=null;const m=J.current;J.current=null,m==null||m.destroy().catch(()=>{});const k=le.current;le.current=null,k==null||k.getTracks().forEach(Z=>{Z.onended=null,Z.stop()});const P=C.current;C.current=null,(G=Q.current)==null||G.disconnect(),Q.current=null,P&&P.state!=="closed"&&P.close().catch(()=>{}),zn(),nt("Voice session moved to another tab. Tap the shape to reconnect.")},to=async(m,k)=>{const P=await fetch("/api/voice/transcribe",{method:"POST",headers:{"Content-Type":"audio/wav",...Oe()},body:_p(m),signal:k}),M=await P.json();if(!P.ok)throw new Error(M.error??"Transcription failed.");return String(M.text??"").trim()},xr=()=>{const m=bt.current;if(m.reported||m.sent===void 0)return;m.reported=!0;const k=performance.now(),P=(M,X)=>M===void 0||X===void 0?void 0:Math.round(X-M);fetch("/api/voice/timing",{method:"POST",headers:{"Content-Type":"application/json",...Oe()},body:JSON.stringify({silence_wait_ms:J.current?Cu():void 0,speech_end_to_send_ms:P(m.speechEnd,m.sent),send_to_first_word_ms:P(m.sent,m.firstDelta),first_word_to_sound_ms:P(m.firstDelta,k),speech_end_to_sound_ms:P(m.speechEnd,k)})}).catch(()=>{})},Ql=async(m,k)=>{var Ae;const P=C.current;if(!P)throw new Error("Audio output is not ready.");const M=Symbol("playback"),X=fe=>{var We;(We=pn.current)==null||We.abort(),xr(),W.current=`${W.current} ${m.trim()}`.trim().slice(-2e3),we.current=df(we.current,m,performance.now()),Ti(fe,M)},G=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/pcm, audio/wav;q=0.9",...Oe()},body:JSON.stringify({text:m,...$t.current?{voice:$t.current}:{}}),signal:k});if(G.headers.get("x-voice-fallback")==="configured"&&($t.current=void 0,gf()),!G.ok)throw new Error((await G.json().catch(()=>({}))).error??"Speech generation failed.");let Z;if(G.body&&((Ae=G.headers.get("content-type"))!=null&&Ae.startsWith("audio/pcm"))){const fe=Number(G.headers.get("x-sample-rate"))||24e3;Z=await Xh(G.body,fe,P,Q.current??P.destination,X,k)}else{const fe=await G.arrayBuffer();k.throwIfAborted();const We=await P.decodeAudioData(fe);k.throwIfAborted(),Z=Eu(We,P,Q.current??P.destination,X)}const de=(async fe=>{try{await Z(fe)}finally{An(M),dt()}});return de.completed=Z.completed,de},vn=()=>{Wr(null),Hr(!1)},_e=(m,k)=>{Wr({x:m,y:k}),Hr(!1)},nn=()=>{wr.current!==null&&window.clearTimeout(wr.current),wr.current=null,Jr.current=null},Ri=m=>{if(_t||yt){Vt.current=Date.now()+1e3,nn();return}if(m.pointerType!=="touch")return;nn();const{clientX:k,clientY:P,pointerId:M}=m;Jr.current={pointerId:M,x:k,y:P},wr.current=window.setTimeout(()=>{wr.current=null,Jr.current=null,Vt.current=Date.now()+1e3,_e(k,P)},Hp)},Wo=m=>{const k=Jr.current;!k||k.pointerId!==m.pointerId||Math.hypot(m.clientX-k.x,m.clientY-k.y)>10&&nn()},no=()=>{var k;(k=Ft.current)==null||k.abort(),Ft.current=null,Sr.current=null;const m=Bt.current;Bt.current=null,m&&m.state!=="closed"&&m.close().catch(()=>{}),Xn(null)},Mi=async()=>{if(!et||On)return;no();const m=new AbortController;Ft.current=m;const k=new AudioContext;Bt.current=k,St(""),Xn(et);try{await k.resume();const P=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...Oe()},body:JSON.stringify({text:Kp,voice:et}),signal:m.signal});if(!P.ok)throw new Error((await P.json().catch(()=>({}))).error??"Voice preview failed.");const M=await P.arrayBuffer();m.signal.throwIfAborted();const X=await k.decodeAudioData(M);m.signal.throwIfAborted();const G=Eu(X,k,k.destination,()=>{});if(Ft.current!==m)return;Sr.current=G,await G(m.signal)}catch(P){!(P instanceof DOMException&&P.name==="AbortError")&&Ft.current===m&&St(P instanceof Error?P.message:"Voice preview failed.")}finally{Ft.current===m&&(Ft.current=null),Sr.current=null,Bt.current===k&&(Bt.current=null,k.state!=="closed"&&k.close().catch(()=>{})),Ft.current===null&&Xn(null)}},Fi=m=>{var P;(P=en.current)==null||P.abort();const k=new AbortController;en.current=k,Yn(!0),St(""),Gr(""),fetch("/api/voice/voices",{headers:Oe(),signal:k.signal}).then(async M=>{const X=await M.json();if(!M.ok)throw new Error(typeof X.current=="string"?X.current:"Could not load voices.");const G=Array.isArray(X.voices)?X.voices.filter(fe=>typeof fe=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(fe)):[],Z=typeof X.current=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(X.current)?X.current:"";if(en.current!==k||k.signal.aborted)return;const de=m??Br(),Ae=de&&(!G.length||G.includes(de))?de:"";Oo(G),Ei(Z),Qr(Ae),Rn(Ae||Z||G[0]||""),Gr(X.available===!1&&typeof X.warning=="string"?X.warning:"")}).catch(M=>{!(M instanceof DOMException&&M.name==="AbortError")&&!k.signal.aborted&&St(M instanceof Error?M.message:"Could not load voices.")}).finally(()=>{en.current===k&&(en.current=null,Yn(!1))})},Ho=()=>{if(et){if(!zp(et)){St("This voice could not be saved.");return}Qr(et),St(""),mn(`${ki(et)} will be used from the next reply.`),C.current&&Bo(C.current)}},ro=m=>{var P;const k=rp(m);Bl(k),(P=J.current)==null||P.setOptions({redemptionMs:k})},gn=()=>{gf(),Qr(""),Rn(jn),St(""),mn(`${jn?ki(jn):"The profile default"} will be used from the next reply.`),C.current&&Bo(C.current)},rn=async()=>{var k,P;if(!I.current||K.current||tn.current)return;const m=J.current;if(m){tn.current=!0,Pe(),ie.current.reset(),Wt(),ue.current="",me.current=0,ge.current="",g.current="",(k=H.current)==null||k.reset(),(P=D.current)==null||P.reset(),ht(),m.setOptions({submitUserSpeechOnPause:!1});try{await ne.current.pause(m),(J.current!==m||!I.current||K.current||!br.current)&&(tn.current=!1)}catch(M){if(tn.current=!1,J.current!==m||!I.current||K.current)return;m.setOptions({submitUserSpeechOnPause:!0}),At(ne.current.isInvalid(m)?"Microphone transition timed out. Tap the shape to reconnect.":M instanceof Error?M.message:"Could not pause the microphone for settings.")}}},yn=async()=>{if(!tn.current)return;const m=J.current;if(tn.current=!1,!(!m||!I.current||K.current))try{await ne.current.start(m),J.current===m&&I.current&&!K.current&&(m.setOptions({submitUserSpeechOnPause:!0}),dt())}catch(k){if(J.current!==m||!I.current||K.current)return;m.setOptions({submitUserSpeechOnPause:!0}),At(ne.current.isInvalid(m)?"Microphone transition timed out. Tap the shape to reconnect.":k instanceof Error?k.message:"Could not resume the microphone after settings.")}},Er=m=>{const k=Ie.current,{prefix:P}=Fo(Qe.current);if(k){Qe.current=`${P}${k}:${m}`;return}fetch("/api/sessions",{headers:Oe()}).then(hn).then(async M=>{if(!M.ok)return;const G=(await M.json()).sessions.find(Z=>Z.id===m&&Fo(Z.key).prefix===P);G&&(Qe.current=G.key,Ie.current=G.harness,j.current&&qr({harness:G.harness,title:G.title,cwd:G.cwd,host:G.host}))}).catch(()=>{})},_r=async m=>{var Z,de,Ae;const k=++Ne.current;let P=!1,M=!1;const X=new AbortController;q.current=X,(Z=Pn.current)==null||Z.abort(),$t.current=Br(),bt.current={speechEnd:bt.current.speechEnd,sent:performance.now()},tt("thinking"),Ze.current=gp(Ze.current),Tn.current=Date.now(),eo();const G=()=>{P=!0,M=!1,Ze.current=yp(Ze.current),Tn.current=Date.now()};try{if(!m||k!==Ne.current){dt();return}W.current="",$t.current=Br();const fe=Qe.current;De.current=fe;const We=await fetch(`/api/sessions/${encodeURIComponent(fe)}/chat`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...Oe()},body:JSON.stringify({conversationId:be.current,message:m,...l&&Fo(fe).inner.startsWith("new:")?{cwd:l}:{}}),signal:X.signal});if(hn(We),!We.ok)throw new Error((await We.json().catch(()=>({}))).error??"Chat request failed.");let zt="";if(await Yp(We,qe=>{var kn,on,Dn,rt;if(k===Ne.current)switch(qe.type){case"session":Er(qe.id);return;case"status":ye.current=!0,dt(),Ln(qe.message);return;case"tool":{if(ye.current=!0,dt(),Ln(""),yr.push(qe),Tn.current=Date.now(),zt.trim()){const ut=Nu(zt,!0,!P||M);zt=ut.rest,ut.chunks.length&&(G(),(kn=U.current)==null||kn.enqueue(ut.chunks))}M=!0;return}case"delta":{(on=bt.current).firstDelta??(on.firstDelta=performance.now()),ye.current&&(ye.current=!1,dt()),yr.clear(),zt+=qe.text;const ut=Nu(zt,!1,!P||M);zt=ut.rest,ut.chunks.length&&(G(),(Dn=U.current)==null||Dn.enqueue(ut.chunks));return}case"notice":Ln(qe.message),G(),(rt=U.current)==null||rt.enqueue([qe.message]);return;case"error":throw new Error(qe.message);case"done":return}}),k===Ne.current){const qe=Nu(zt,!0,!P||M);qe.chunks.length&&(G(),(de=U.current)==null||de.enqueue(qe.chunks))}}catch(fe){if(fe instanceof dn){j.current&&Mn(!0);return}!(fe instanceof DOMException&&fe.name==="AbortError")&&k===Ne.current&&(nt(fe instanceof Error?fe.message:"Voice conversation failed."),P||(Ae=U.current)==null||Ae.enqueue(["Sorry, I could not answer that. Please try again."]))}finally{q.current===X&&(q.current=null,De.current=null),ye.current=!1,j.current&&(Ln(""),yr.clear()),k===Ne.current&&(Ze.current=vf(Ze.current),Jn()),dt()}},Ht=async()=>{var Dn;if(I.current||z.current)return;z.current=!0;const m=++ke.current;let k=null,P=null,M=null,X=null,G=null,Z=null,de=null,Ae=null;const fe=++ve.current,We=()=>{if(!j.current||ve.current!==fe||ke.current!==m)throw new DOMException("Voice startup was cancelled.","AbortError")};ne.current.beginSession();const zt=performance.now(),qe={},kn=rt=>{qe[rt]=Math.round(performance.now()-zt)};let on=!1;try{if(!window.isSecureContext||!((Dn=navigator.mediaDevices)!=null&&Dn.getUserMedia))throw new Error("Microphone access requires HTTPS or localhost.");N(""),Gn(!1),tt("thinking"),k=new AudioContext;const rt=k,ut=Ap(ji).then(he=>on?(he==null||he.release(),null):(X=he,kn("startup_lease_ms"),he)),so=navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}).then(he=>on?(he.getTracks().forEach(Re=>Re.stop()),null):(P=he,kn("startup_microphone_ms"),he));G=k.createGain(),G.gain.value=1,G.connect(k.destination),Z=new bh(Ql,dt,he=>{An(),nt(he instanceof Error?he.message:"Speech playback failed.")}),de=new xh(to,he=>{ue.current=he,me.current=performance.now(),Cr(M,fe)},()=>Oi(M,fe)),Ae=new ch(async(he,Re)=>{const Ue=await((de==null?void 0:de.finish(he.samples,Re))??to(he.samples,Re)),$e=he.possibleEcho?ah(Ue,he.possibleEcho):Ue,kt=he.pendingInterruptDecision;if(!kt)return $e;const Ct=Mf($e,kt.recentWindow);return Ct?(kr(),Ct.remainder):!kt.wordPathBlocked&&Mu($e,kt.recentWindow)?(kr(),$e):(ht(),"")},_r,he=>nt(he instanceof Error?he.message:"Voice transcription failed."),dt);const zi=async()=>{if(!P)throw new Error("The microphone is not ready.");return P},Di={getStream:zi,pauseStream:async()=>{},resumeStream:zi,...wh(Cu()),submitUserSpeechOnPause:!0,onSpeechStart:()=>{var $e,kt,Ct,jr;if(!wn(M,fe))return;($e=D.current)==null||$e.speechStarted();const he=zl(!!q.current,!!((kt=U.current)!=null&&kt.busy),$.current),Re=ie.current.speechStart(he);g.current=$.current||(Ct=U.current)!=null&&Ct.busy?W.current:"";const Ue=performance.now();ge.current=zh(we.current,Ue,Ue),ue.current="",me.current=0,je.current=0,st.current=0,Qn.current=!1,Re.begin&&((jr=H.current)==null||jr.begin(he)),Li(M,fe),Wt(),he&&(mr.current=window.setTimeout(()=>Cr(M,fe),_h))},onSpeechRealStart:()=>{var Re,Ue;if(!wn(M,fe))return;ie.current.speechRealStart().accepted&&(ht(),(Re=H.current)==null||Re.confirm(),Li(M,fe),(Ue=Pn.current)==null||Ue.abort(),N(""),tt("hearing"))},onVADMisfire:()=>{var he,Re;wn(M,fe)&&(Pe(),ie.current.reset(),Wt(),ue.current="",me.current=0,g.current="",ge.current="",(he=H.current)==null||he.discard(),(Re=D.current)==null||Re.speechDiscarded(),ht(),K.current||dt())},onFrameProcessed:(he,Re)=>{var $e;if(!wn(M,fe))return;($e=H.current)==null||$e.frame(he.isSpeech,Re);const Ue=Math.sqrt(Re.reduce((kt,Ct)=>kt+Ct*Ct,0)/Re.length);if(y(Math.min(1,Ue*7)),$.current&&ie.current.idle)xe.current=xe.current===null?Ue:xe.current*.9+Ue*.1;else if(!ie.current.idle&&$.current&&!Qn.current&&(je.current++,st.current+=Ue,je.current>=Dh)){Qn.current=!0;const kt=st.current/je.current;Uh(kt,xe.current)?ie.current.blockWordPath():xe.current!==null&&Ot()}},onSpeechEnd:he=>{var Ct,jr,Ii,Ui,$i,Vi;if(!wn(M,fe))return;bt.current={speechEnd:performance.now()},Pe(),Wt();const Re=ue.current.trim()!==""&&performance.now()-me.current<=Ch,Ue=ge.current,$e=ie.current.speechEnd(ue.current,Ue,Re);if(ue.current="",me.current=0,!$e.accepted){g.current="",ge.current="",(Ct=H.current)==null||Ct.discard(),(jr=D.current)==null||jr.speechDiscarded(),ht(),dt();return}if($e.deferDecision||ht(),$e.interrupt&&kr(),!$e.send){g.current="",ge.current="",(Ii=H.current)==null||Ii.discard(),(Ui=D.current)==null||Ui.speechDiscarded(),dt();return}($i=H.current)==null||$i.end(he);const kt=g.current;g.current="",ge.current="",(Vi=D.current)==null||Vi.speechEnded({samples:he,possibleEcho:kt,...$e.deferDecision?{pendingInterruptDecision:{recentWindow:Ue,wordPathBlocked:$e.wordPathBlocked}}:{}})}},Gl=Sf?Promise.resolve(null):(async()=>{try{const{MicVAD:he}=await Lf(),Re=await he.new({model:"v5",audioContext:rt,startOnLoad:!1,baseAssetPath:Fu,onnxWASMBasePath:Fu,ortConfig:Ue=>{Ue.env.wasm.numThreads=1},...Di});return on?(Re.destroy().catch(()=>{}),null):(M=Re,kn("startup_detector_ms"),Re)}catch{return Sf=!0,null}})(),[Qo,xn,Yl]=await Promise.all([ut,so,Gl,rt.resume()]);if(X=Qo,P=xn,M=Yl,!X)throw new Gp;if(!xn)throw new Error("Voice startup did not finish.");We();let qo=!1;M||(qo=!0,M=await Bu.new({audioContext:k,...Di}),kn("startup_detector_ms")),We(),de.speechThreshold=qo?$u:$l,Gn(qo),await ne.current.start(M),kn("startup_listening_ms"),We();const uo=M,at=k;if(!uo||!at)throw new Error("Voice startup did not finish.");T.current=X,C.current=at,Q.current=G,Bo(at),U.current=Z,H.current=de,D.current=Ae,le.current=xn,J.current=uo,I.current=!0;const Go=()=>{var he,Re,Ue;if(!(le.current!==xn||!I.current)){I.current=!1,tn.current=!1,Gn(!1),ve.current++,Pe(),ne.current.deactivate(),K.current=!1,Zn(),ht(),ie.current.reset(),Wt(),ue.current="",me.current=0,ge.current="",U.current=null,(he=H.current)==null||he.reset(),H.current=null,(Re=D.current)==null||Re.reset(),D.current=null,J.current===uo&&(J.current=null),le.current===xn&&(le.current=null),C.current===at&&(C.current=null),(Ue=Q.current)==null||Ue.disconnect(),Q.current=null;for(const $e of xn.getTracks())$e.onended=null,$e.readyState==="live"&&$e.stop();uo.destroy().catch(()=>{}),at.state!=="closed"&&at.close().catch(()=>{}),zn(),nt("Microphone disconnected. Tap the shape to reconnect.")}};for(const he of xn.getAudioTracks())he.onended=Go;let Yo=!1;const ao=()=>{if(!(C.current!==at||!I.current)){if(at.state==="running"||at.state==="closed"){Yo=!1;return}at.resume().catch(()=>{}).then(()=>{C.current!==at||!I.current||at.state==="running"||Yo||(Yo=!0,nt("The device paused audio. Tap the shape to keep talking."))})}};at.onstatechange=ao;const Xl=window.setInterval(()=>{if(C.current!==at||at.state==="closed"){window.clearInterval(Xl),document.removeEventListener("visibilitychange",ao);return}ao()},2e3);if(document.addEventListener("visibilitychange",ao),!xn.getAudioTracks().some(he=>he.readyState==="live")){Go();return}tt("listening"),fetch("/api/voice/timing",{method:"POST",headers:{"Content-Type":"application/json",...Oe()},body:JSON.stringify(qe)}).catch(()=>{}),br.current&&rn()}catch(rt){on=!0;const ut=ve.current===fe&&ke.current===m;ut&&(ve.current++,Pe(),ne.current.deactivate(),J.current===M&&(J.current=null),le.current===P&&(le.current=null),C.current===k&&(C.current=null),Q.current===G&&(Q.current=null),U.current===Z&&(U.current=null),H.current===de&&(H.current=null),D.current===Ae&&(D.current=null)),Z==null||Z.cancel(),de==null||de.reset(),Ae==null||Ae.reset(),G==null||G.disconnect(),M&&await M.destroy().catch(()=>{}),P==null||P.getTracks().forEach(so=>so.stop()),k&&k.state!=="closed"&&await k.close().catch(()=>{}),T.current===X&&(T.current=null),X==null||X.release(),ut&&!(rt instanceof DOMException&&rt.name==="AbortError")&&nt(rt instanceof Error?rt.message:"Could not start the microphone.")}finally{ke.current===m&&(z.current=!1)}},wn=(m,k)=>(I.current||z.current)&&!br.current&&hh(ve.current,k,J.current,m,K.current,ne.current.acceptsCallbacks),Kt=(m,k,P)=>m!==null&&J.current===m&&I.current&&K.current===k&&(P===void 0||ve.current===P),Sn=(m,k,P)=>Kt(m,k,P)&&m!==null&&!ne.current.isInvalid(m),Li=(m,k)=>{Pe(),m&&(B.current=window.setTimeout(()=>{B.current=null,wn(m,k)&&ne.current.flush(m).then(()=>{Sn(m,!1,k)}).catch(P=>{Kt(m,!1,k)&&(ne.current.isInvalid(m)?At("Microphone transition timed out. Tap the shape to reconnect."):nt(P instanceof Error?P.message:"Microphone recovery failed."))})},Wp))},Oi=(m,k)=>{!m||!wn(m,k)||ne.current.flush(m).catch(P=>{Kt(m,!1,k)&&(ne.current.isInvalid(m)?At("Microphone transition timed out. Tap the shape to reconnect."):nt(P instanceof Error?P.message:"Microphone recovery failed."))})},Cr=(m,k)=>{wn(m,k)&&ie.current.shouldInterruptNow(ue.current,ge.current)&&(Wt(),kr(),ht())},Ai=async()=>{var k,P,M,X,G;if(!I.current){z.current||Ht();return}const m=C.current;if(m&&m.state!=="running"&&m.state!=="closed"&&(await m.resume().catch(()=>{}),m.state==="running")){tt(K.current?"muted":"listening");return}if(!K.current&&zl(!!q.current,!!((k=U.current)!=null&&k.busy),$.current)){kr(),ht();return}if(K.current=!K.current,K.current){Pe(),Zn(),ht(),ie.current.reset(),Wt(),ue.current="",me.current=0,ge.current="",(P=H.current)==null||P.reset(),(M=D.current)==null||M.reset(),(X=le.current)==null||X.getTracks().forEach(de=>{de.enabled=!1});const Z=J.current;if(!Kt(Z,!0))return;Z==null||Z.setOptions({submitUserSpeechOnPause:!1});try{if(Z&&await ne.current.pause(Z),!Sn(Z,!0)){Kt(Z,!0)&&Z&&ne.current.isInvalid(Z)&&At("Microphone transition timed out. Tap the shape to reconnect.");return}tt("muted")}catch(de){if(!Kt(Z,!0))return;Z&&ne.current.isInvalid(Z)?At("Microphone transition timed out. Tap the shape to reconnect."):nt(de instanceof Error?de.message:"Could not pause the microphone.")}}else{(G=le.current)==null||G.getTracks().forEach(de=>{de.enabled=!0});const Z=J.current;if(!Kt(Z,!1))return;try{if(Z){if(await ne.current.start(Z),!Sn(Z,!1)){Kt(Z,!1)&&ne.current.isInvalid(Z)&&At("Microphone transition timed out. Tap the shape to reconnect.");return}Z.setOptions({submitUserSpeechOnPause:!0})}if(!Sn(Z,!1))return;tt("listening")}catch(de){if(!Kt(Z,!1))return;Z&&ne.current.isInvalid(Z)?At("Microphone transition timed out. Tap the shape to reconnect."):nt(de instanceof Error?de.message:"Could not resume the microphone.")}}},ql=()=>{if(vn(),N(""),I.current||z.current){At(""),window.setTimeout(()=>{!I.current&&!z.current&&Ht()},0);return}Ht()};if(_.useEffect(()=>{np(),Hl()},[u]),_.useEffect(()=>{const m=new AbortController;return fetch("/api/sessions",{headers:Oe(),signal:m.signal}).then(hn).then(async k=>{if(!k.ok)return;const M=(await k.json()).sessions.find(X=>X.key===u);M&&!m.signal.aborted&&(Ie.current=M.harness,qr({harness:M.harness,title:M.title,cwd:M.cwd,host:M.host}))}).catch(k=>{k instanceof dn&&!m.signal.aborted&&Mn(!0)}),()=>m.abort()},[u]),_.useEffect(()=>{let m=!1;const k=()=>{fetch("/api/health",{headers:Oe()}).then(async M=>{const X=await M.json().catch(()=>({}));if(m)return;const G=X.speech??{};zo({ready:G.ready!==!1,downloading:G.downloading===!0,progress:typeof G.progress=="number"?G.progress:void 0,error:typeof G.error=="string"?G.error:void 0})}).catch(()=>{})};k();const P=window.setInterval(k,Qp);return()=>{m=!0,window.clearInterval(P)}},[]),_.useEffect(()=>{var m;if(br.current=yt,yt?rn():yn(),!yt){On&&no(),(m=en.current)==null||m.abort(),en.current=null;return}St(""),mn(""),Fi(Br()??void 0)},[yt]),_.useEffect(()=>{if(!_t&&!yt)return;const m=P=>{var X,G;const M=P.target;M instanceof Node&&((X=$o.current)!=null&&X.contains(M)||(G=Vo.current)!=null&&G.contains(M))||vn()},k=P=>{P.key==="Escape"&&(P.preventDefault(),vn())};return document.addEventListener("pointerdown",m),document.addEventListener("keydown",k),()=>{document.removeEventListener("pointerdown",m),document.removeEventListener("keydown",k)}},[_t,yt]),_.useEffect(()=>{yt&&window.setTimeout(()=>{var m;return(m=Pi.current)==null?void 0:m.focus()},0)},[yt]),_.useEffect(()=>()=>{var m,k,P,M,X,G,Z,de;j.current=!1,Ye.current++,Ee.current!==null&&window.clearTimeout(Ee.current),Ee.current=null,I.current=!1,nn(),(m=en.current)==null||m.abort(),(k=Ft.current)==null||k.abort(),Ft.current=null,Sr.current=null,Bt.current&&Bt.current.state!=="closed"&&Bt.current.close().catch(()=>{}),Bt.current=null,ve.current++,Pe(),ne.current.deactivate(),Zn(),ht(),ie.current.reset(),Wt(),ue.current="",me.current=0,ge.current="",(P=H.current)==null||P.reset(),(M=D.current)==null||M.reset(),D.current=null,(X=J.current)==null||X.destroy(),(G=le.current)==null||G.getTracks().forEach(Ae=>{Ae.onended=null,Ae.stop()}),(Z=C.current)==null||Z.close(),(de=Q.current)==null||de.disconnect(),Q.current=null,zn()},[]),Do)return h.jsx(Uf,{});const Nr=zl(!!q.current,!!((Tr=U.current)!=null&&Tr.busy),$.current),Pr=I.current?s==="muted"?"Unmute microphone":Nr?"Stop reply":"Mute microphone":"Start voice conversation",er=_t?Math.max(12,Math.min(_t.x,window.innerWidth-170)):0,oo=_t?Math.max(12,Math.min(_t.y,window.innerHeight-68)):0,Ko=_i||jn,io=wt.ready,lo=wt.ready?"Ready":wt.downloading?`Downloading voice models…${typeof wt.progress=="number"?` ${Math.round(wt.progress)}%`:""}`:"Offline";return h.jsxs("main",{className:"voice-page","data-state":s,style:{"--level":d},children:[h.jsxs("header",{className:"room-header",children:[h.jsx("a",{className:"room-header__back",href:"/","aria-label":"Back to hub",children:"←"}),h.jsx("img",{className:"room-header__logo",src:"/logo-192.png",alt:"",width:22,height:22}),h.jsxs("span",{className:"room-header__title",children:[Zt.harness?Vl[Zt.harness]:"Meldivo"," · ",Zt.title]}),(Zt.host||Zt.cwd)&&h.jsx("span",{className:"room-header__cwd",children:[Zt.host,Zt.cwd].filter(Boolean).join(" · ")})]}),Fn&&h.jsx("p",{className:"room-status",role:"status",children:Fn}),h.jsx(Up,{items:yr.items}),Ci&&h.jsx("p",{className:"room-status voice-fallback-notice",role:"status",children:"Using basic voice detection"}),!wt.ready&&h.jsx("p",{className:"voice-health",role:"status",children:wt.error||lo}),h.jsxs("button",{className:"voice-shape",type:"button",onClick:()=>{if(Date.now()<Vt.current){Vt.current=0;return}if(_t||yt){vn();return}Ai()},onPointerDown:Ri,onPointerMove:Wo,onPointerUp:nn,onPointerCancel:nn,onPointerLeave:nn,onLostPointerCapture:nn,onContextMenu:m=>{m.preventDefault(),_e(m.clientX,m.clientY)},onKeyDown:m=>{if(m.key==="ContextMenu"||m.key==="F10"&&m.shiftKey){m.preventDefault();const k=m.currentTarget.getBoundingClientRect();_e(k.left+k.width/2,k.top+k.height/2)}},"aria-label":Pr,"aria-haspopup":"menu","aria-expanded":!!(_t||yt),children:[h.jsx("span",{className:"voice-shape__halo"}),h.jsx("span",{className:"voice-shape__ring voice-shape__ring--one"}),h.jsx("span",{className:"voice-shape__ring voice-shape__ring--two"}),h.jsx("span",{className:"voice-shape__core"})]}),_t&&h.jsx("div",{ref:$o,className:"voice-context-menu",role:"menu","aria-label":"Voice options",style:{left:er,top:oo},children:h.jsx("button",{type:"button",role:"menuitem",onClick:()=>{Wr(null),Hr(!0)},children:"Settings"})}),yt&&h.jsxs("div",{ref:Vo,className:"voice-settings",role:"dialog","aria-modal":"false","aria-labelledby":"voice-settings-title",onKeyDown:m=>{m.key==="Escape"&&(m.preventDefault(),vn())},children:[h.jsxs("div",{className:"voice-settings__header",children:[h.jsx("h2",{id:"voice-settings-title",children:"Voice"}),h.jsx("button",{className:"voice-settings__close",type:"button",onClick:vn,"aria-label":"Close voice settings",children:"×"})]}),h.jsxs("p",{id:"tts-provider-status",className:`voice-settings__availability voice-settings__availability--${wt.ready?"ready":wt.downloading?"checking":"offline"}`,role:"status",children:[h.jsx("span",{"aria-hidden":"true"}),lo]}),wt.error&&h.jsx("p",{className:"voice-settings__availability-note",children:wt.error}),Io&&h.jsx("p",{className:"voice-settings__availability-note",children:Io}),Yr&&h.jsx("p",{className:"voice-settings__muted",children:"Loading voices…"}),!Yr&&Kr.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("label",{className:"voice-settings__label",htmlFor:"voice-choice",children:"Choose a voice"}),h.jsxs("div",{className:"voice-settings__choice",children:[h.jsx("select",{ref:Pi,id:"voice-choice",value:et,onChange:m=>{no(),Rn(m.target.value),St(""),mn("")},"aria-describedby":"voice-current",children:Kr.map(m=>h.jsx("option",{value:m,children:ki(m)},m))}),h.jsx("button",{className:"voice-settings__play",type:"button",onClick:()=>{Mi()},disabled:!et||!io||!!On,"aria-label":`Preview ${et||"voice"}`,"aria-describedby":"tts-provider-status",title:io?void 0:"Wait for voice models to be ready.",children:On?"…":"▶"})]}),h.jsxs("p",{id:"voice-current",className:"voice-settings__current",children:["Current: ",Ko?ki(Ko):"profile default"]}),h.jsxs("div",{className:"voice-settings__actions",children:[h.jsx("button",{type:"button",onClick:Ho,disabled:!et||!io||et===Ko,"aria-describedby":"tts-provider-status",title:io?void 0:"Wait for voice models to be ready.",children:"Use this voice"}),h.jsx("button",{type:"button",onClick:gn,disabled:!_i,children:"Restore default"})]})]}),!Yr&&!Kr.length&&h.jsx(h.Fragment,{children:h.jsx("p",{className:"voice-settings__muted",children:"No selectable voices are configured."})}),Xr&&h.jsx("p",{className:"voice-settings__error",role:"alert",children:Xr}),Ni&&h.jsx("p",{className:"voice-settings__notice",role:"status",children:Ni}),h.jsxs("label",{className:"voice-settings__label",htmlFor:"vad-redemption",children:["End-of-speech wait: ",Ao," ms"]}),h.jsx("input",{id:"vad-redemption",type:"range",min:jf,max:Rf,step:Tu,value:Ao,onChange:m=>ro(Number(m.target.value)),"aria-describedby":"vad-redemption-hint"}),h.jsx("p",{id:"vad-redemption-hint",className:"voice-settings__muted",children:"How long to wait after you stop talking before the reply starts. Lower is snappier; higher avoids cutting off pauses."}),h.jsx("a",{className:"voice-settings__advanced-link",href:"/?settings=speech",children:"Speech engines and servers…"})]}),Uo&&h.jsx("div",{className:"voice-onboarding",role:"dialog","aria-modal":"true","aria-labelledby":"voice-onboarding-title",children:h.jsxs("div",{className:"voice-onboarding__card",children:[h.jsx("h2",{id:"voice-onboarding-title",children:"Welcome"}),h.jsx("p",{children:"Tap to talk, or to stop a reply · hold or right-click for settings."}),h.jsx("button",{type:"button",onClick:()=>{try{window.localStorage.setItem($f,"true")}catch{}Wl(!1)},children:"OK"})]})}),E&&h.jsxs("div",{className:"voice-error",role:"alert",title:E,children:[h.jsx("span",{children:E}),h.jsx("button",{className:"voice-error__reconnect",type:"button",onClick:ql,children:"Reconnect"})]})]})}function Iu(u){return{engine:u.engine,url:u.url??"",apiKey:"",hasKey:!!u.hasKey,clearKey:!1,model:u.model??"",voice:u.voice??"",models:[],voices:[],status:"idle",error:""}}function Ul(u){return u.engine==="local"?{engine:"local",...u.voice?{voice:u.voice}:{}}:{engine:u.engine,url:u.url,...u.apiKey?{apiKey:u.apiKey}:{},...u.clearKey?{clearKey:!0}:{},...u.model?{model:u.model}:{},...u.voice?{voice:u.voice}:{}}}function Ef(u){const l=/^([abefhijpz])([fm])_(.+)$/.exec(u),f=(l?l[3]:u.replace(/\.(wav|mp3|flac)$/i,"")).replace(/[_-]+/g," ").trim().replace(/\b\w/g,y=>y.toUpperCase());return l?`${f} (${{a:"American",b:"British",e:"Spanish",f:"French",h:"Hindi",i:"Italian",j:"Japanese",p:"Portuguese",z:"Chinese"}[l[1]]??""} ${l[2]==="f"?"female":"male"})`.replace("( ","("):f}async function Jp(u,l,s){const f=hn(await fetch(u,{method:"POST",headers:{"Content-Type":"application/json",...Oe()},body:JSON.stringify(l),signal:s})),d=await f.json().catch(()=>({}));if(!f.ok)throw new Error(d.error??"The request failed.");return d}function _f({kind:u,engines:l,draft:s,onChange:f}){const d=l.find(C=>C.id===s.engine),y=s.engine!=="local",[E,N]=_.useState(!1),L=_.useRef(null),j=_.useRef(null),K=_.useRef(null),I=u==="tts"?"Text to speech":"Speech to text",z=`speech-${u}`,$=u==="tts"?s.model:"";_.useEffect(()=>{var q;if((q=K.current)==null||q.abort(),y&&!s.url.trim()){f(ye=>({...ye,models:[],voices:[],status:"idle",error:""}));return}const C=new AbortController;K.current=C;const Q=window.setTimeout(()=>{f(U=>({...U,status:"loading",error:""}));const ye={...Ul({...s,voice:""})};Jp("/api/speech/discover",{kind:u,setting:ye},C.signal).then(U=>{C.signal.aborted||f(H=>{var ve;const D=U.models.some(ke=>ke.id===H.model)?H.model:U.model??((ve=U.models[0])==null?void 0:ve.id)??"",ne=U.voices.includes(H.voice)?H.voice:U.voice??U.voices[0]??"";return{...H,models:U.models,voices:U.voices,model:D,voice:ne,status:"ready",error:""}})}).catch(U=>{if(U instanceof dn)throw U;C.signal.aborted||f(H=>({...H,models:[],voices:[],status:"error",error:U instanceof Error?U.message:"Could not reach the server."}))})},y?600:0);return()=>{window.clearTimeout(Q),C.abort()}},[u,s.engine,s.url,s.apiKey,s.clearKey,$]);const J=()=>{var Q;(Q=L.current)==null||Q.abort();const C=j.current;j.current=null,C&&C.state!=="closed"&&C.close().catch(()=>{})};_.useEffect(()=>J,[]);const le=async()=>{if(!s.voice)return;J();const C=new AbortController;L.current=C;const Q=new AudioContext;j.current=Q,N(!0),f(q=>({...q,error:""}));try{const q=hn(await fetch("/api/speech/preview",{method:"POST",headers:{"Content-Type":"application/json",...Oe()},body:JSON.stringify({setting:Ul(s),voice:s.voice}),signal:C.signal}));if(!q.ok)throw new Error((await q.json().catch(()=>({}))).error??"Preview failed.");await Q.resume();const ye=await Q.decodeAudioData(await q.arrayBuffer());if(C.signal.aborted)return;const U=Q.createBufferSource();U.buffer=ye,U.connect(Q.destination),U.onended=()=>{j.current===Q&&(J(),N(!1))},U.start()}catch(q){if(q instanceof dn)throw q;C.signal.aborted||(J(),N(!1),f(ye=>({...ye,error:q instanceof Error?q.message:"Preview failed."})))}};return h.jsxs("section",{className:"speech-section","aria-labelledby":`${z}-title`,children:[h.jsx("h3",{id:`${z}-title`,children:I}),h.jsxs("label",{className:"speech-field",children:[h.jsx("span",{children:"Engine"}),h.jsx("select",{value:s.engine,onChange:C=>{const Q=C.target.value;f(q=>({...Iu({engine:Q}),url:Q===q.engine?q.url:""}))},children:l.map(C=>h.jsxs("option",{value:C.id,children:[C.label,C.note?` · ${C.note}`:""]},C.id))})]}),y&&h.jsxs(h.Fragment,{children:[h.jsxs("label",{className:"speech-field",children:[h.jsx("span",{children:"Server address"}),h.jsx("input",{type:"url",inputMode:"url",autoComplete:"off",spellCheck:!1,placeholder:(d==null?void 0:d.defaultUrl)??"http://localhost:8000",value:s.url,onChange:C=>{const Q=C.target.value;f(q=>({...q,url:Q}))}})]}),h.jsxs("label",{className:"speech-field",children:[h.jsxs("span",{children:["API key ",h.jsx("em",{children:"(optional)"})]}),h.jsx("input",{type:"password",autoComplete:"off",placeholder:s.hasKey&&!s.clearKey?"Saved; type to replace":"Leave empty if the server has none",value:s.apiKey,onChange:C=>{const Q=C.target.value;f(q=>({...q,apiKey:Q,clearKey:!1}))}})]}),s.hasKey&&!s.apiKey&&!s.clearKey&&h.jsx("button",{type:"button",className:"speech-link",onClick:()=>f(C=>({...C,clearKey:!0})),children:"Remove saved key"})]}),s.status==="loading"&&h.jsx("p",{className:"speech-status",children:"Connecting…"}),s.status==="ready"&&y&&h.jsx("p",{className:"speech-status speech-status--ok",children:"Connected"}),s.status==="error"&&h.jsx("p",{className:"speech-status speech-status--error",role:"alert",children:s.error}),y&&s.models.length>0&&((d==null?void 0:d.hasModels)||s.models.length>1)&&h.jsxs("label",{className:"speech-field",children:[h.jsx("span",{children:"Model"}),h.jsx("select",{value:s.model,onChange:C=>{const Q=C.target.value;f(q=>({...q,model:Q}))},children:s.models.map(C=>h.jsxs("option",{value:C.id,children:[C.id,C.installed===!1?" (downloads on first use)":""]},C.id))})]}),u==="tts"&&s.voices.length>0&&h.jsxs("div",{className:"speech-field",children:[h.jsx("label",{htmlFor:`${z}-voice`,children:"Speaker"}),h.jsxs("div",{className:"speech-voice",children:[h.jsx("select",{id:`${z}-voice`,value:s.voice,onChange:C=>{const Q=C.target.value;f(q=>({...q,voice:Q}))},children:s.voices.map(C=>h.jsx("option",{value:C,children:Ef(C)},C))}),h.jsx("button",{type:"button",className:"speech-play",onClick:()=>{le()},disabled:!s.voice||E,"aria-label":`Play a preview of ${s.voice?Ef(s.voice):"this speaker"}`,children:E?"…":"▶"})]})]}),s.error&&s.status!=="error"&&h.jsx("p",{className:"speech-status speech-status--error",role:"alert",children:s.error})]})}function bp({onClose:u}){const[l,s]=_.useState(null),[f,d]=_.useState(null),[y,E]=_.useState(null),[N,L]=_.useState(""),[j,K]=_.useState(""),[I,z]=_.useState(!1);_.useEffect(()=>{fetch("/api/speech/settings",{headers:Oe()}).then(hn).then(async C=>{if(!C.ok)throw new Error("Could not load the speech settings.");const Q=await C.json();s(Q),d(Iu(Q.tts.setting)),E(Iu(Q.stt.setting))}).catch(C=>{if(C instanceof dn)throw C;L(C instanceof Error?C.message:"Could not load the speech settings.")})},[]);const $=C=>Q=>{K(""),C(q=>q&&Q(q))},J=()=>{!f||!y||(z(!0),L(""),K(""),fetch("/api/speech/settings",{method:"PUT",headers:{"Content-Type":"application/json",...Oe()},body:JSON.stringify({tts:Ul(f),stt:Ul(y)})}).then(hn).then(async C=>{const Q=await C.json().catch(()=>({}));if(!C.ok)throw new Error(Q.error??"Could not save the speech settings.");d(q=>q&&{...q,apiKey:"",clearKey:!1,hasKey:!!Q.tts.setting.hasKey}),E(q=>q&&{...q,apiKey:"",clearKey:!1,hasKey:!!Q.stt.setting.hasKey}),K("Saved. Every machine and browser on this hub uses it from the next turn.")}).catch(C=>{if(C instanceof dn)throw C;L(C instanceof Error?C.message:"Could not save the speech settings.")}).finally(()=>z(!1)))},le=C=>!C||C.engine!=="local"&&!C.url.trim();return h.jsxs("div",{className:"hub-remote speech-settings",role:"dialog","aria-labelledby":"speech-settings-title",children:[h.jsxs("div",{className:"hub-remote__header",children:[h.jsx("h2",{id:"speech-settings-title",children:"Speech"}),h.jsx("button",{className:"hub-remote__close",type:"button",onClick:u,"aria-label":"Close speech settings",children:"×"})]}),h.jsx("p",{className:"hub-muted speech-intro",children:"Use the built-in on-device models, or point either direction at a speech server you run, for a bigger, more realistic, or faster model."}),!l&&!N&&h.jsx("p",{className:"hub-muted",children:"Loading…"}),l&&f&&y&&h.jsxs(h.Fragment,{children:[h.jsx(_f,{kind:"tts",engines:l.tts.engines,draft:f,onChange:$(d)}),h.jsx(_f,{kind:"stt",engines:l.stt.engines,draft:y,onChange:$(E)}),h.jsx("div",{className:"speech-actions",children:h.jsx("button",{type:"button",className:"hub-primary",onClick:J,disabled:I||le(f)||le(y),children:I?"Saving…":"Save"})})]}),N&&h.jsx("p",{className:"hub-error",role:"alert",children:N}),j&&h.jsx("p",{className:"speech-status speech-status--ok",role:"status",children:j})]})}const Zp=5e3,em=5e3;function xi(u){const l=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(u);return l?l[2]?`~${l[2]}`:"~":u}function Vf(u){const l=Math.max(0,Math.round((Date.now()-u)/1e3));if(l<5)return"just now";if(l<60)return`${l}s ago`;const s=Math.round(l/60);if(s<60)return`${s}m ago`;const f=Math.round(s/60);return f<24?`${f}h ago`:`${Math.round(f/24)}d ago`}function Bf(u,l){window.location.href=`/?session=${encodeURIComponent(u)}${l?`&folder=${encodeURIComponent(l)}`:""}`}function tm(u){return u.busy?{className:"hub-dot hub-dot--busy",label:"busy"}:u.open?{className:"hub-dot hub-dot--open",label:"open in terminal"}:{className:"hub-dot hub-dot--idle",label:"idle"}}function nm({onClose:u}){var z;const[l,s]=_.useState(null),[f,d]=_.useState(""),[y,E]=_.useState(!1),[N,L]=_.useState(""),j=()=>{d(""),fetch("/api/remote",{headers:Oe()}).then(hn).then(async $=>{if(!$.ok)throw new Error("Could not load phone access options.");s(await $.json())}).catch($=>{if($ instanceof dn)throw $;d($ instanceof Error?$.message:"Could not load phone access options.")})};_.useEffect(j,[]),_.useEffect(()=>{var le;const $=(le=l==null?void 0:l.active)==null?void 0:le.url;if(!$){L("");return}let J=!1;return Ff(()=>import("./browser-CujOq0-h.js").then(C=>C.b),__vite__mapDeps([2,1])).then(async C=>{const Q=await C.toDataURL($,{margin:1,width:200});J||L(Q)}).catch(()=>{J||L("")}),()=>{J=!0}},[(z=l==null?void 0:l.active)==null?void 0:z.url]);const K=$=>{E(!0),d(""),fetch("/api/remote",{method:"POST",headers:{"Content-Type":"application/json",...Oe()},body:JSON.stringify({id:$})}).then(hn).then(async J=>{if(!J.ok)throw new Error((await J.json().catch(()=>({}))).error??"Could not enable phone access.");j()}).catch(J=>{if(J instanceof dn)throw J;d(J instanceof Error?J.message:"Could not enable phone access.")}).finally(()=>E(!1))},I=()=>{E(!0),d(""),fetch("/api/remote",{method:"DELETE",headers:Oe()}).then(hn).then($=>{if(!$.ok)throw new Error("Could not turn off phone access.");j()}).catch($=>{if($ instanceof dn)throw $;d($ instanceof Error?$.message:"Could not turn off phone access.")}).finally(()=>E(!1))};return h.jsxs("div",{className:"hub-remote",role:"dialog","aria-labelledby":"hub-remote-title",children:[h.jsxs("div",{className:"hub-remote__header",children:[h.jsx("h2",{id:"hub-remote-title",children:"Phone access"}),h.jsx("button",{className:"hub-remote__close",type:"button",onClick:u,"aria-label":"Close phone access",children:"×"})]}),!l&&!f&&h.jsx("p",{className:"hub-muted",children:"Loading…"}),f&&h.jsx("p",{className:"hub-error",role:"alert",children:f}),(l==null?void 0:l.active)&&h.jsxs("div",{className:"hub-remote__active",children:[h.jsx("p",{className:"hub-remote__url",children:l.active.url}),N&&h.jsx("img",{className:"hub-remote__qr",src:N,alt:"QR code for phone access URL"}),h.jsx("button",{type:"button",onClick:I,disabled:y,children:"Turn off"})]}),l&&!l.active&&h.jsxs(h.Fragment,{children:[h.jsx("ul",{className:"hub-remote__options",children:l.options.map($=>h.jsx("li",{children:h.jsxs("button",{type:"button",disabled:!$.ready||y,onClick:()=>K($.id),children:[$.label,$.ready?"":" (not ready)"]})},$.id))}),!l.options.some($=>$.ready)&&l.guide&&(/^https?:\/\//.test(l.guide)?h.jsx("p",{className:"hub-muted",children:h.jsx("a",{href:l.guide,target:"_blank",rel:"noreferrer",children:"Set up phone access"})}):h.jsx("p",{className:"hub-muted",children:l.guide}))]})]})}const Cf="meldivo.machine",rm=5;function om(u){return u.id?`@${u.id}/`:""}function im({host:u,sessions:l,selected:s,onSelect:f}){const d=l.filter(L=>L.open).length,y=l.some(L=>L.busy),E=l.reduce((L,j)=>Math.max(L,j.updatedAt),0),N=u.online?y?"hub-dot--busy":"hub-dot--online":"hub-dot--idle";return h.jsxs("button",{type:"button",role:"tab","aria-selected":s,className:`hub-machine${s?" hub-machine--selected":""}${u.online?"":" hub-machine--offline"}`,onClick:f,children:[h.jsxs("span",{className:"hub-machine__name",children:[h.jsx("span",{className:`hub-dot ${N}`,"aria-hidden":"true"}),u.name]}),h.jsx("span",{className:"hub-machine__meta",children:u.online?h.jsxs(h.Fragment,{children:[l.length," session",l.length===1?"":"s",d>0&&h.jsxs(h.Fragment,{children:[" · ",d," open"]})]}):"offline"}),u.online&&E>0&&h.jsxs("span",{className:"hub-machine__meta",children:["active ",Vf(E)]})]})}const Pu=1440*60*1e3;function lm(u,l){const s=Date.now()-u;return l==="today"?new Date(u).toDateString()===new Date().toDateString():l==="week"?s<=7*Pu:l==="month"?s<=30*Pu:l==="older"?s>30*Pu:!0}function sm(u,l){const s=[...u];return l==="title"?s.sort((f,d)=>(f.title||"").localeCompare(d.title||"",void 0,{sensitivity:"base"})):s.sort((f,d)=>l==="oldest"?f.updatedAt-d.updatedAt:d.updatedAt-f.updatedAt),s}function um({session:u}){const l=tm(u);return h.jsx("li",{children:h.jsxs("button",{type:"button",className:"hub-session",onClick:()=>Bf(u.key),children:[h.jsx("span",{className:l.className,"aria-hidden":"true",title:l.label}),h.jsxs("span",{className:"hub-session__body",children:[h.jsx("span",{className:"hub-session__title",children:u.title||"(untitled)"}),h.jsxs("span",{className:"hub-session__meta",children:[h.jsx("span",{className:"hub-session__badge",children:Vl[u.harness]}),h.jsx("span",{className:"hub-session__time",children:Vf(u.updatedAt)})]}),u.open&&h.jsx("span",{className:"hub-session__hint",children:"open in a terminal · continues as a voice copy"})]})]})})}function Wf(u,l){if(l.length===0)return!0;const s=`${u.title} ${xi(u.cwd)} ${Vl[u.harness]}`.toLowerCase();return l.every(f=>s.includes(f))}function Hf(u){return u.trim().toLowerCase().split(/\s+/).filter(Boolean)}function am({cwd:u,sessions:l,total:s}){const[f,d]=_.useState(""),y=Hf(f),E=l.filter(j=>Wf(j,y)),N=xi(u),L=N==="~"?"Home folder":N||"(no folder)";return h.jsxs("section",{className:"hub-folder","aria-label":L,children:[h.jsxs("h3",{className:"hub-folder__title",children:[h.jsx("span",{children:L}),h.jsx("span",{className:"hub-folder__count",children:l.length===s?s:`${l.length} of ${s}`})]}),l.length>rm&&h.jsx("input",{type:"search",className:"hub-folder__search",placeholder:`Search in ${L}`,value:f,onChange:j=>d(j.target.value),"aria-label":`Search sessions in ${L}`,autoComplete:"off"}),E.length===0?h.jsx("p",{className:"hub-muted hub-folder__none",children:"No sessions here match."}):h.jsx("ul",{className:"hub-sessions hub-folder__list",children:E.map(j=>h.jsx(um,{session:j},j.key))})]})}function cm({host:u,folders:l,agent:s,folder:f,onClose:d}){var K,I;const y=[...u.harnesses].filter(z=>z.available).sort((z,$)=>Du.indexOf(z.id)-Du.indexOf($.id)),[E,N]=_.useState(((K=y.find(z=>z.id===s))==null?void 0:K.id)??((I=y[0])==null?void 0:I.id)),[L,j]=_.useState(f==="all"?"":f);return y.length===0?h.jsx("div",{className:"hub-newchat",children:h.jsxs("p",{className:"hub-muted",children:["No coding agents are installed on ",u.name,"."]})}):h.jsxs("div",{className:"hub-newchat",role:"group","aria-label":"New chat",children:[h.jsxs("div",{className:"hub-newchat__row",children:[h.jsx("span",{className:"hub-newchat__label",children:"Agent"}),h.jsx("div",{className:"hub-chips",children:y.map(z=>h.jsx("button",{type:"button",className:`hub-chip${E===z.id?" hub-chip--on":""}`,"aria-pressed":E===z.id,onClick:()=>N(z.id),children:z.label},z.id))})]}),h.jsxs("label",{className:"hub-newchat__row",children:[h.jsx("span",{className:"hub-newchat__label",children:"Folder"}),h.jsxs("select",{className:"hub-select hub-select--wide",value:L,onChange:z=>j(z.target.value),children:[h.jsx("option",{value:"",children:"Home folder"}),l.map(z=>h.jsx("option",{value:z,children:xi(z)},z))]})]}),h.jsxs("div",{className:"hub-newchat__actions",children:[h.jsx("button",{type:"button",className:"hub-more",onClick:d,children:"Cancel"}),h.jsx("button",{type:"button",className:"hub-primary",disabled:!E,onClick:()=>E&&Bf(`${om(u)}new:${E}`,L||void 0),children:"Start talking"})]})]})}function fm({host:u,sessions:l}){const[s,f]=_.useState(""),[d,y]=_.useState("all"),[E,N]=_.useState("all"),[L,j]=_.useState("any"),[K,I]=_.useState("newest"),[z,$]=_.useState(!1),[J,le]=_.useState(!1);if(_.useEffect(()=>{f(""),y("all"),N("all"),j("any"),I("newest"),$(!1),le(!1)},[u.id]),!u.online)return h.jsxs("p",{className:"hub-empty",children:[u.name," is offline. Its sessions appear here as soon as it reconnects."]});const C=new Map;for(const B of l)C.set(B.cwd,Math.max(C.get(B.cwd)??0,B.updatedAt));const Q=[...C.entries()].sort((B,Ee)=>Ee[1]-B[1]).map(([B])=>B),q=Q.filter(B=>B&&xi(B)!=="~"),ye=Du.filter(B=>l.some(Ee=>Ee.harness===B)),U=Hf(s),H=sm(l.filter(B=>d!=="all"&&B.harness!==d||E!=="all"&&B.cwd!==E||z&&!B.open||!lm(B.updatedAt,L)?!1:Wf(B,U)),K),D=l.filter(B=>B.open).length,ne=d!=="all"||E!=="all"||L!=="any"||z||U.length>0,ve=[];for(const B of H){const Ee=ve.find(Ye=>Ye.cwd===B.cwd);Ee?Ee.sessions.push(B):ve.push({cwd:B.cwd,sessions:[B]})}const ke=new Map;for(const B of l)ke.set(B.cwd,(ke.get(B.cwd)??0)+1);return h.jsxs("div",{className:"hub-panel",role:"tabpanel",children:[h.jsxs("div",{className:"hub-search",children:[h.jsx("input",{type:"search",className:"hub-search__input",placeholder:`Search all ${l.length} sessions`,value:s,onChange:B=>f(B.target.value),"aria-label":`Search all sessions on ${u.name}`,autoComplete:"off"}),h.jsx("button",{type:"button",className:"hub-primary","aria-expanded":J,onClick:()=>le(!J),children:J?"Close":"New chat"})]}),J&&h.jsx(cm,{host:u,folders:q,agent:d,folder:E,onClose:()=>le(!1)}),l.length>0&&h.jsxs("div",{className:"hub-filters",children:[h.jsxs("div",{className:"hub-chips",role:"group","aria-label":"Filter by agent",children:[h.jsx("button",{type:"button",className:`hub-chip${d==="all"?" hub-chip--on":""}`,"aria-pressed":d==="all",onClick:()=>y("all"),children:"All agents"}),ye.map(B=>h.jsxs("button",{type:"button",className:`hub-chip${d===B?" hub-chip--on":""}`,"aria-pressed":d===B,onClick:()=>y(d===B?"all":B),children:[Vl[B]," ",h.jsx("span",{className:"hub-chip__count",children:l.filter(Ee=>Ee.harness===B).length})]},B)),h.jsxs("button",{type:"button",className:`hub-chip${z?" hub-chip--on":""}`,"aria-pressed":z,disabled:D===0&&!z,onClick:()=>$(!z),children:["Open now ",h.jsx("span",{className:"hub-chip__count",children:D})]})]}),h.jsxs("div",{className:"hub-selects",children:[h.jsxs("select",{className:"hub-select",value:E,onChange:B=>N(B.target.value),"aria-label":"Folder",children:[h.jsxs("option",{value:"all",children:["All folders (",Q.length,")"]}),Q.map(B=>h.jsx("option",{value:B,children:xi(B)||"(no folder)"},B))]}),h.jsxs("select",{className:"hub-select",value:L,onChange:B=>j(B.target.value),"aria-label":"Date",children:[h.jsx("option",{value:"any",children:"Any time"}),h.jsx("option",{value:"today",children:"Today"}),h.jsx("option",{value:"week",children:"Past 7 days"}),h.jsx("option",{value:"month",children:"Past 30 days"}),h.jsx("option",{value:"older",children:"Older than 30 days"})]}),h.jsxs("select",{className:"hub-select",value:K,onChange:B=>I(B.target.value),"aria-label":"Sort",children:[h.jsx("option",{value:"newest",children:"Newest first"}),h.jsx("option",{value:"oldest",children:"Oldest first"}),h.jsx("option",{value:"title",children:"Title A–Z"})]})]})]}),l.length===0&&h.jsxs("p",{className:"hub-empty",children:["No sessions on ",u.name," yet. Tap New chat to start one."]}),l.length>0&&H.length===0&&h.jsxs("p",{className:"hub-empty",children:["No sessions match. ",h.jsx("button",{type:"button",className:"hub-link",onClick:()=>{f(""),y("all"),N("all"),j("any"),$(!1)},children:"Clear filters"})]}),ne&&H.length>0&&h.jsxs("p",{className:"hub-count",children:[H.length," of ",l.length," sessions"]}),h.jsx("div",{className:"hub-folders",children:ve.map(B=>h.jsx(am,{cwd:B.cwd,sessions:B.sessions,total:ke.get(B.cwd)??B.sessions.length},`${u.id}|${B.cwd}`))})]})}function dm(){const[u,l]=_.useState(null),[s,f]=_.useState(""),[d,y]=_.useState(!1),[E,N]=_.useState({ready:!0,downloading:!1}),[L,j]=_.useState(!1),[K,I]=_.useState(()=>new URLSearchParams(window.location.search).get("settings")==="speech"),[z,$]=_.useState(()=>{try{return window.localStorage.getItem(Cf)}catch{return null}}),J=_.useRef(!0);if(_.useEffect(()=>(J.current=!0,()=>{J.current=!1}),[]),_.useEffect(()=>{let D=!1;const ne=()=>{fetch("/api/sessions",{headers:Oe()}).then(hn).then(async ke=>{if(!ke.ok)throw new Error("Could not load sessions.");const B=await ke.json();D||(l(B),f(""))}).catch(ke=>{if(!D){if(ke instanceof dn){y(!0);return}f(ke instanceof Error?ke.message:"Could not load sessions.")}})};ne();const ve=window.setInterval(ne,Zp);return()=>{D=!0,window.clearInterval(ve)}},[]),_.useEffect(()=>{let D=!1;const ne=()=>{fetch("/api/health",{headers:Oe()}).then(async ke=>{const B=await ke.json().catch(()=>({}));if(D)return;const Ee=B.speech??{};N({ready:Ee.ready!==!1,downloading:Ee.downloading===!0,progress:typeof Ee.progress=="number"?Ee.progress:void 0,error:typeof Ee.error=="string"?Ee.error:void 0})}).catch(()=>{})};ne();const ve=window.setInterval(ne,em);return()=>{D=!0,window.clearInterval(ve)}},[]),d)return h.jsx(Uf,{});const le=(u==null?void 0:u.hosts)??(u?[{id:"",name:u.machine,online:!0,harnesses:u.harnesses}]:[]),C=(u==null?void 0:u.sessions)??[],Q=D=>C.filter(ne=>(ne.host??"")===D.id),q=le.filter(D=>D.id!==""||le.length===1||D.harnesses.some(ne=>ne.available)||Q(D).length>0),ye=q.find(D=>D.id===z)??q.find(D=>D.online)??q[0],U=D=>{$(D);try{window.localStorage.setItem(Cf,D)}catch{}},H=E.ready?"Speech ready":E.downloading?`Downloading voice models…${typeof E.progress=="number"?` ${Math.round(E.progress)}%`:""}`:"Speech offline";return h.jsxs("main",{className:"hub-page",children:[h.jsxs("header",{className:"hub-header",children:[h.jsxs("h1",{className:"hub-title",children:[h.jsx("img",{className:"hub-logo",src:"/logo-192.png",alt:"",width:30,height:30}),q.length>1?"Meldivo":(u==null?void 0:u.machine)??"Meldivo"]}),h.jsx("p",{className:`hub-speech-status${E.ready?"":" hub-speech-status--warn"}`,role:"status",children:E.error||H}),h.jsx("button",{type:"button",className:"hub-remote-button",onClick:()=>{j(!1),I(!0)},children:"Speech"}),h.jsx("button",{type:"button",className:"hub-remote-button hub-remote-button--next",onClick:()=>{I(!1),j(!0)},children:"Phone access"})]}),s&&h.jsx("p",{className:"hub-error",role:"alert",children:s}),!u&&!s&&h.jsx("p",{className:"hub-empty",children:"Loading…"}),q.length>1&&h.jsx("nav",{className:"hub-machines",role:"tablist","aria-label":"Machines",children:q.map(D=>h.jsx(im,{host:D,sessions:Q(D),selected:D===ye,onSelect:()=>U(D.id)},D.id||"local"))}),ye&&h.jsx(fm,{host:ye,sessions:Q(ye)}),L&&h.jsx(nm,{onClose:()=>j(!1)}),K&&h.jsx(bp,{onClose:()=>I(!1)})]})}Np();const Kf=new URLSearchParams(window.location.search),Nf=Kf.get("session");uh.createRoot(document.getElementById("root")).render(Nf?h.jsx(Xp,{sessionKey:Nf,folder:Kf.get("folder")??void 0}):h.jsx(dm,{}));
|