meldivo 2.0.3 → 2.0.4

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.
Binary file
@@ -15,7 +15,7 @@ var _d=Object.defineProperty;var Cd=(a,o,u)=>o in a?_d(a,o,{enumerable:!0,config
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var hc;function Pd(){if(hc)return Vl;hc=1;var a=Ys(),o=Symbol.for("react.element"),u=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,p=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function k(R,A,I){var Z,B={},D=null,G=null;I!==void 0&&(D=""+I),A.key!==void 0&&(D=""+A.key),A.ref!==void 0&&(G=A.ref);for(Z in A)y.call(A,Z)&&!E.hasOwnProperty(Z)&&(B[Z]=A[Z]);if(R&&R.defaultProps)for(Z in A=R.defaultProps,A)B[Z]===void 0&&(B[Z]=A[Z]);return{$$typeof:o,type:R,key:D,ref:G,props:B,_owner:p.current}}return Vl.Fragment=u,Vl.jsx=k,Vl.jsxs=k,Vl}var mc;function Td(){return mc||(mc=1,Ds.exports=Pd()),Ds.exports}var g=Td(),eo={},As={exports:{}},_t={},Us={exports:{}},Vs={};/**
18
+ */var hc;function Pd(){if(hc)return Vl;hc=1;var a=Ys(),o=Symbol.for("react.element"),u=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,p=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function k(R,A,I){var Z,B={},D=null,G=null;I!==void 0&&(D=""+I),A.key!==void 0&&(D=""+A.key),A.ref!==void 0&&(G=A.ref);for(Z in A)y.call(A,Z)&&!E.hasOwnProperty(Z)&&(B[Z]=A[Z]);if(R&&R.defaultProps)for(Z in A=R.defaultProps,A)B[Z]===void 0&&(B[Z]=A[Z]);return{$$typeof:o,type:R,key:D,ref:G,props:B,_owner:p.current}}return Vl.Fragment=u,Vl.jsx=k,Vl.jsxs=k,Vl}var mc;function Td(){return mc||(mc=1,Ds.exports=Pd()),Ds.exports}var v=Td(),eo={},As={exports:{}},_t={},Us={exports:{}},Vs={};/**
19
19
  * @license React
20
20
  * scheduler.production.min.js
21
21
  *
@@ -35,10 +35,10 @@ var _d=Object.defineProperty;var Cd=(a,o,u)=>o in a?_d(a,o,{enumerable:!0,config
35
35
  `+h+e}var ne=!1;function ue(e,t){if(!e||ne)return"";ne=!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(S){var r=S}Reflect.construct(e,[],t)}else{try{t.call()}catch(S){r=S}e.call(t.prototype)}else{try{throw Error()}catch(S){r=S}e()}}catch(S){if(S&&r&&typeof S.stack=="string"){for(var l=S.stack.split(`
36
36
  `),i=r.stack.split(`
37
37
  `),s=l.length-1,c=i.length-1;1<=s&&0<=c&&l[s]!==i[c];)c--;for(;1<=s&&0<=c;s--,c--)if(l[s]!==i[c]){if(s!==1||c!==1)do if(s--,c--,0>c||l[s]!==i[c]){var f=`
38
- `+l[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=s&&0<=c);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_(e):""}function ae(e){switch(e.tag){case 5:return _(e.type);case 16:return _("Lazy");case 13:return _("Suspense");case 19:return _("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 he(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 le:return"Fragment";case fe:return"Portal";case Me:return"Profiler";case we:return"StrictMode";case at:return"Suspense";case Ze:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ze:return(e.displayName||"Context")+".Consumer";case U:return(e._context.displayName||"Context")+".Provider";case nt:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ct:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case Ke:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}function de(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 he(t);case 8:return t===we?"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 ve(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ft(e){var t=Ee(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 l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function un(e){e._valueTracker||(e._valueTracker=ft(e))}function Hl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ee(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Je(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 qn(e,t){var n=t.checked;return $({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function el(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ve(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 mr(e,t){t=t.checked,t!=null&&je(e,"checked",t,!1)}function dt(e,t){mr(e,t);var n=ve(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")?Wt(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wt(e,t.type,ve(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ql(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 Wt(e,t,n){(t!=="number"||Je(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xn=Array.isArray;function En(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ve(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function vr(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(u(91));return $({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tl(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(u(92));if(xn(n)){if(1<n.length)throw Error(u(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ve(n)}}function Yn(e,t){var n=ve(t.value),r=ve(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 Kl(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function _n(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 gr(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?_n(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Gn,yr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Gn=Gn||document.createElement("div"),Gn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Gn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Nn={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},Ht=["Webkit","ms","Moz","O"];Object.keys(Nn).forEach(function(e){Ht.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nn[t]=Nn[e]})});function nl(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Nn.hasOwnProperty(e)&&Nn[e]?(""+t).trim():t+"px"}function Xn(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=nl(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var wr=$({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 Zn(e,t){if(t){if(wr[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function rl(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 ll=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pn=null,Qt=null,cn=null;function il(e){if(e=Cl(e)){if(typeof Pn!="function")throw Error(u(280));var t=e.stateNode;t&&(t=mi(t),Pn(e.stateNode,e.type,t))}}function ol(e){Qt?cn?cn.push(e):cn=[e]:Qt=e}function Kt(){if(Qt){var e=Qt,t=cn;if(cn=Qt=null,il(e),t)for(e=0;e<t.length;e++)il(t[e])}}function Ct(e,t){return e(t)}function Ot(){}var Tn=!1;function Jn(e,t,n){if(Tn)return e(t,n);Tn=!0;try{return Ct(e,t,n)}finally{Tn=!1,(Qt!==null||cn!==null)&&(Ot(),Kt())}}function pt(e,t){var n=e.stateNode;if(n===null)return null;var r=mi(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(u(231,t,typeof n));return n}var vt=!1;if(R)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){vt=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch{vt=!1}function sl(e,t,n,r,l,i,s,c,f){var S=Array.prototype.slice.call(arguments,3);try{t.apply(n,S)}catch(N){this.onError(N)}}var bn=!1,Nt=null,Sr=!1,gt=null,Pt={onError:function(e){bn=!0,Nt=e}};function kr(e,t,n,r,l,i,s,c,f){bn=!1,Nt=null,sl.apply(Pt,arguments)}function Rn(e,t,n,r,l,i,s,c,f){if(kr.apply(this,arguments),bn){if(bn){var S=Nt;bn=!1,Nt=null}else throw Error(u(198));Sr||(Sr=!0,gt=S)}}function fn(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 qt(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 ql(e){if(fn(e)!==e)throw Error(u(188))}function Yl(e){var t=e.alternate;if(!t){if(t=fn(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return ql(l),e;if(i===r)return ql(l),t;i=i.sibling}throw Error(u(188))}if(n.return!==r.return)n=l,r=i;else{for(var s=!1,c=l.child;c;){if(c===n){s=!0,n=l,r=i;break}if(c===r){s=!0,r=l,n=i;break}c=c.sibling}if(!s){for(c=i.child;c;){if(c===n){s=!0,n=i,r=l;break}if(c===r){s=!0,r=i,n=l;break}c=c.sibling}if(!s)throw Error(u(189))}}if(n.alternate!==r)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function Gl(e){return e=Yl(e),e!==null?dn(e):null}function dn(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=dn(e);if(t!==null)return t;e=e.sibling}return null}var xr=o.unstable_scheduleCallback,Yt=o.unstable_cancelCallback,ro=o.unstable_shouldYield,lo=o.unstable_requestPaint,Ne=o.unstable_now,io=o.unstable_getCurrentPriorityLevel,ul=o.unstable_ImmediatePriority,Xl=o.unstable_UserBlockingPriority,Er=o.unstable_NormalPriority,Zl=o.unstable_LowPriority,Jl=o.unstable_IdlePriority,_r=null,Ft=null;function al(e){if(Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(_r,e,void 0,(e.current.flags&128)===128)}catch{}}var qe=Math.clz32?Math.clz32:bl,nn=Math.log,Cr=Math.LN2;function bl(e){return e>>>=0,e===0?32:31-(nn(e)/Cr|0)|0}var Nr=64,Pr=4194304;function er(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 Tr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var c=s&~l;c!==0?r=er(c):(i&=s,i!==0&&(r=er(i)))}else s=n&~l,s!==0?r=er(s):i!==0&&(r=er(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,i=t&-t,l>=i||l===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-qe(t),l=1<<n,r|=e[n],t&=~l;return r}function oo(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 cl(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-qe(i),c=1<<s,f=l[s];f===-1?((c&n)===0||(c&r)!==0)&&(l[s]=oo(c,t)):f<=t&&(e.expiredLanes|=c),i&=~c}}function jn(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function fl(){var e=Nr;return Nr<<=1,(Nr&4194240)===0&&(Nr=64),e}function v(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function x(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-qe(t),e[t]=n}function M(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 l=31-qe(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function L(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-qe(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var O=0;function z(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var oe,Se,Fe,ke,rt,pn=!1,Ae=[],yt=null,Tt=null,Rt=null,$e=new Map,Mn=new Map,Dt=[],Rr="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 ei(e,t){switch(e){case"focusin":case"focusout":yt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":$e.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mn.delete(t.pointerId)}}function ce(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=Cl(t),t!==null&&Se(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function _e(e,t,n,r,l){switch(t){case"focusin":return yt=ce(yt,e,t,n,r,l),!0;case"dragenter":return Tt=ce(Tt,e,t,n,r,l),!0;case"mouseover":return Rt=ce(Rt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return $e.set(i,ce($e.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,Mn.set(i,ce(Mn.get(i)||null,e,t,n,r,l)),!0}return!1}function We(e){var t=tr(e.target);if(t!==null){var n=fn(t);if(n!==null){if(t=n.tag,t===13){if(t=qt(n),t!==null){e.blockedOn=t,rt(e.priority,function(){Fe(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 lt(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=uo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ll=r,n.target.dispatchEvent(r),ll=null}else return t=Cl(n),t!==null&&Se(t),e.blockedOn=n,!1;t.shift()}return!0}function Gt(e,t,n){lt(e)&&n.delete(t)}function ti(){pn=!1,yt!==null&&lt(yt)&&(yt=null),Tt!==null&&lt(Tt)&&(Tt=null),Rt!==null&&lt(Rt)&&(Rt=null),$e.forEach(Gt),Mn.forEach(Gt)}function dl(e,t){e.blockedOn===t&&(e.blockedOn=null,pn||(pn=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,ti)))}function pl(e){function t(l){return dl(l,e)}if(0<Ae.length){dl(Ae[0],e);for(var n=1;n<Ae.length;n++){var r=Ae[n];r.blockedOn===e&&(r.blockedOn=null)}}for(yt!==null&&dl(yt,e),Tt!==null&&dl(Tt,e),Rt!==null&&dl(Rt,e),$e.forEach(t),Mn.forEach(t),n=0;n<Dt.length;n++)r=Dt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Dt.length&&(n=Dt[0],n.blockedOn===null);)We(n),n.blockedOn===null&&Dt.shift()}var jr=K.ReactCurrentBatchConfig,ni=!0;function Yc(e,t,n,r){var l=O,i=jr.transition;jr.transition=null;try{O=1,so(e,t,n,r)}finally{O=l,jr.transition=i}}function Gc(e,t,n,r){var l=O,i=jr.transition;jr.transition=null;try{O=4,so(e,t,n,r)}finally{O=l,jr.transition=i}}function so(e,t,n,r){if(ni){var l=uo(e,t,n,r);if(l===null)No(e,t,r,ri,n),ei(e,r);else if(_e(l,e,t,n,r))r.stopPropagation();else if(ei(e,r),t&4&&-1<Rr.indexOf(e)){for(;l!==null;){var i=Cl(l);if(i!==null&&oe(i),i=uo(e,t,n,r),i===null&&No(e,t,r,ri,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else No(e,t,r,null,n)}}var ri=null;function uo(e,t,n,r){if(ri=null,e=an(r),e=tr(e),e!==null)if(t=fn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=qt(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 ri=e,null}function Js(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(io()){case ul:return 1;case Xl:return 4;case Er:case Zl:return 16;case Jl:return 536870912;default:return 16}default:return 16}}var zn=null,ao=null,li=null;function bs(){if(li)return li;var e,t=ao,n=t.length,r,l="value"in zn?zn.value:zn.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===l[i-r];r++);return li=l.slice(e,1<r?1-r:void 0)}function ii(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 oi(){return!0}function eu(){return!1}function jt(e){function t(n,r,l,i,s){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=s,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)?oi:eu,this.isPropagationStopped=eu,this}return $(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=oi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=oi)},persist:function(){},isPersistent:oi}),t}var Mr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},co=jt(Mr),hl=$({},Mr,{view:0,detail:0}),Xc=jt(hl),fo,po,ml,si=$({},hl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mo,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!==ml&&(ml&&e.type==="mousemove"?(fo=e.screenX-ml.screenX,po=e.screenY-ml.screenY):po=fo=0,ml=e),fo)},movementY:function(e){return"movementY"in e?e.movementY:po}}),tu=jt(si),Zc=$({},si,{dataTransfer:0}),Jc=jt(Zc),bc=$({},hl,{relatedTarget:0}),ho=jt(bc),ef=$({},Mr,{animationName:0,elapsedTime:0,pseudoElement:0}),tf=jt(ef),nf=$({},Mr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rf=jt(nf),lf=$({},Mr,{data:0}),nu=jt(lf),of={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sf={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"},uf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function af(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=uf[e])?!!t[e]:!1}function mo(){return af}var cf=$({},hl,{key:function(e){if(e.key){var t=of[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ii(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mo,charCode:function(e){return e.type==="keypress"?ii(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ii(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ff=jt(cf),df=$({},si,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ru=jt(df),pf=$({},hl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mo}),hf=jt(pf),mf=$({},Mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),vf=jt(mf),gf=$({},si,{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}),yf=jt(gf),wf=[9,13,27,32],vo=R&&"CompositionEvent"in window,vl=null;R&&"documentMode"in document&&(vl=document.documentMode);var Sf=R&&"TextEvent"in window&&!vl,lu=R&&(!vo||vl&&8<vl&&11>=vl),iu=" ",ou=!1;function su(e,t){switch(e){case"keyup":return wf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zr=!1;function kf(e,t){switch(e){case"compositionend":return uu(t);case"keypress":return t.which!==32?null:(ou=!0,iu);case"textInput":return e=t.data,e===iu&&ou?null:e;default:return null}}function xf(e,t){if(zr)return e==="compositionend"||!vo&&su(e,t)?(e=bs(),li=ao=zn=null,zr=!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 lu&&t.locale!=="ko"?null:t.data;default:return null}}var Ef={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 au(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ef[e.type]:t==="textarea"}function cu(e,t,n,r){ol(r),t=di(t,"onChange"),0<t.length&&(n=new co("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gl=null,yl=null;function _f(e){Tu(e,0)}function ui(e){var t=Ir(e);if(Hl(t))return e}function Cf(e,t){if(e==="change")return t}var fu=!1;if(R){var go;if(R){var yo="oninput"in document;if(!yo){var du=document.createElement("div");du.setAttribute("oninput","return;"),yo=typeof du.oninput=="function"}go=yo}else go=!1;fu=go&&(!document.documentMode||9<document.documentMode)}function pu(){gl&&(gl.detachEvent("onpropertychange",hu),yl=gl=null)}function hu(e){if(e.propertyName==="value"&&ui(yl)){var t=[];cu(t,yl,e,an(e)),Jn(_f,t)}}function Nf(e,t,n){e==="focusin"?(pu(),gl=t,yl=n,gl.attachEvent("onpropertychange",hu)):e==="focusout"&&pu()}function Pf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ui(yl)}function Tf(e,t){if(e==="click")return ui(t)}function Rf(e,t){if(e==="input"||e==="change")return ui(t)}function jf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xt=typeof Object.is=="function"?Object.is:jf;function wl(e,t){if(Xt(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 l=n[r];if(!A.call(t,l)||!Xt(e[l],t[l]))return!1}return!0}function mu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vu(e,t){var n=mu(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=mu(n)}}function gu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yu(){for(var e=window,t=Je();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Je(e.document)}return t}function wo(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 Mf(e){var t=yu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gu(n.ownerDocument.documentElement,n)){if(r!==null&&wo(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 l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=vu(n,i);var s=vu(n,r);l&&s&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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 zf=R&&"documentMode"in document&&11>=document.documentMode,Lr=null,So=null,Sl=null,ko=!1;function wu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ko||Lr==null||Lr!==Je(r)||(r=Lr,"selectionStart"in r&&wo(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}),Sl&&wl(Sl,r)||(Sl=r,r=di(So,"onSelect"),0<r.length&&(t=new co("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Lr)))}function ai(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Or={animationend:ai("Animation","AnimationEnd"),animationiteration:ai("Animation","AnimationIteration"),animationstart:ai("Animation","AnimationStart"),transitionend:ai("Transition","TransitionEnd")},xo={},Su={};R&&(Su=document.createElement("div").style,"AnimationEvent"in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),"TransitionEvent"in window||delete Or.transitionend.transition);function ci(e){if(xo[e])return xo[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Su)return xo[e]=t[n];return e}var ku=ci("animationend"),xu=ci("animationiteration"),Eu=ci("animationstart"),_u=ci("transitionend"),Cu=new Map,Nu="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 Ln(e,t){Cu.set(e,t),E(t,[e])}for(var Eo=0;Eo<Nu.length;Eo++){var _o=Nu[Eo],Lf=_o.toLowerCase(),Of=_o[0].toUpperCase()+_o.slice(1);Ln(Lf,"on"+Of)}Ln(ku,"onAnimationEnd"),Ln(xu,"onAnimationIteration"),Ln(Eu,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(_u,"onTransitionEnd"),k("onMouseEnter",["mouseout","mouseover"]),k("onMouseLeave",["mouseout","mouseover"]),k("onPointerEnter",["pointerout","pointerover"]),k("onPointerLeave",["pointerout","pointerover"]),E("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),E("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),E("onBeforeInput",["compositionend","keypress","textInput","paste"]),E("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),E("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),E("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kl="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(" "),Ff=new Set("cancel close invalid load scroll toggle".split(" ").concat(kl));function Pu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Rn(r,t,void 0,e),e.currentTarget=null}function Tu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var c=r[s],f=c.instance,S=c.currentTarget;if(c=c.listener,f!==i&&l.isPropagationStopped())break e;Pu(l,c,S),i=f}else for(s=0;s<r.length;s++){if(c=r[s],f=c.instance,S=c.currentTarget,c=c.listener,f!==i&&l.isPropagationStopped())break e;Pu(l,c,S),i=f}}}if(Sr)throw e=gt,Sr=!1,gt=null,e}function Pe(e,t){var n=t[zo];n===void 0&&(n=t[zo]=new Set);var r=e+"__bubble";n.has(r)||(Ru(t,e,2,!1),n.add(r))}function Co(e,t,n){var r=0;t&&(r|=4),Ru(n,e,r,t)}var fi="_reactListening"+Math.random().toString(36).slice(2);function xl(e){if(!e[fi]){e[fi]=!0,y.forEach(function(n){n!=="selectionchange"&&(Ff.has(n)||Co(n,!1,e),Co(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fi]||(t[fi]=!0,Co("selectionchange",!1,t))}}function Ru(e,t,n,r){switch(Js(t)){case 1:var l=Yc;break;case 4:l=Gc;break;default:l=so}n=l.bind(null,t,n,e),l=void 0,!vt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function No(e,t,n,r,l){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===l||c.nodeType===8&&c.parentNode===l)break;if(s===4)for(s=r.return;s!==null;){var f=s.tag;if((f===3||f===4)&&(f=s.stateNode.containerInfo,f===l||f.nodeType===8&&f.parentNode===l))return;s=s.return}for(;c!==null;){if(s=tr(c),s===null)return;if(f=s.tag,f===5||f===6){r=i=s;continue e}c=c.parentNode}}r=r.return}Jn(function(){var S=i,N=an(n),T=[];e:{var C=Cu.get(e);if(C!==void 0){var V=co,H=e;switch(e){case"keypress":if(ii(n)===0)break e;case"keydown":case"keyup":V=ff;break;case"focusin":H="focus",V=ho;break;case"focusout":H="blur",V=ho;break;case"beforeblur":case"afterblur":V=ho;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":V=tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Jc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=hf;break;case ku:case xu:case Eu:V=tf;break;case _u:V=vf;break;case"scroll":V=Xc;break;case"wheel":V=yf;break;case"copy":case"cut":case"paste":V=rf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=ru}var Q=(t&4)!==0,Ve=!Q&&e==="scroll",m=Q?C!==null?C+"Capture":null:C;Q=[];for(var d=S,w;d!==null;){w=d;var j=w.stateNode;if(w.tag===5&&j!==null&&(w=j,m!==null&&(j=pt(d,m),j!=null&&Q.push(El(d,j,w)))),Ve)break;d=d.return}0<Q.length&&(C=new V(C,H,null,n,N),T.push({event:C,listeners:Q}))}}if((t&7)===0){e:{if(C=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",C&&n!==ll&&(H=n.relatedTarget||n.fromElement)&&(tr(H)||H[hn]))break e;if((V||C)&&(C=N.window===N?N:(C=N.ownerDocument)?C.defaultView||C.parentWindow:window,V?(H=n.relatedTarget||n.toElement,V=S,H=H?tr(H):null,H!==null&&(Ve=fn(H),H!==Ve||H.tag!==5&&H.tag!==6)&&(H=null)):(V=null,H=S),V!==H)){if(Q=tu,j="onMouseLeave",m="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(Q=ru,j="onPointerLeave",m="onPointerEnter",d="pointer"),Ve=V==null?C:Ir(V),w=H==null?C:Ir(H),C=new Q(j,d+"leave",V,n,N),C.target=Ve,C.relatedTarget=w,j=null,tr(N)===S&&(Q=new Q(m,d+"enter",H,n,N),Q.target=w,Q.relatedTarget=Ve,j=Q),Ve=j,V&&H)t:{for(Q=V,m=H,d=0,w=Q;w;w=Fr(w))d++;for(w=0,j=m;j;j=Fr(j))w++;for(;0<d-w;)Q=Fr(Q),d--;for(;0<w-d;)m=Fr(m),w--;for(;d--;){if(Q===m||m!==null&&Q===m.alternate)break t;Q=Fr(Q),m=Fr(m)}Q=null}else Q=null;V!==null&&ju(T,C,V,Q,!1),H!==null&&Ve!==null&&ju(T,Ve,H,Q,!0)}}e:{if(C=S?Ir(S):window,V=C.nodeName&&C.nodeName.toLowerCase(),V==="select"||V==="input"&&C.type==="file")var Y=Cf;else if(au(C))if(fu)Y=Rf;else{Y=Pf;var ee=Nf}else(V=C.nodeName)&&V.toLowerCase()==="input"&&(C.type==="checkbox"||C.type==="radio")&&(Y=Tf);if(Y&&(Y=Y(e,S))){cu(T,Y,n,N);break e}ee&&ee(e,C,S),e==="focusout"&&(ee=C._wrapperState)&&ee.controlled&&C.type==="number"&&Wt(C,"number",C.value)}switch(ee=S?Ir(S):window,e){case"focusin":(au(ee)||ee.contentEditable==="true")&&(Lr=ee,So=S,Sl=null);break;case"focusout":Sl=So=Lr=null;break;case"mousedown":ko=!0;break;case"contextmenu":case"mouseup":case"dragend":ko=!1,wu(T,n,N);break;case"selectionchange":if(zf)break;case"keydown":case"keyup":wu(T,n,N)}var te;if(vo)e:{switch(e){case"compositionstart":var ie="onCompositionStart";break e;case"compositionend":ie="onCompositionEnd";break e;case"compositionupdate":ie="onCompositionUpdate";break e}ie=void 0}else zr?su(e,n)&&(ie="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ie="onCompositionStart");ie&&(lu&&n.locale!=="ko"&&(zr||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&zr&&(te=bs()):(zn=N,ao="value"in zn?zn.value:zn.textContent,zr=!0)),ee=di(S,ie),0<ee.length&&(ie=new nu(ie,e,null,n,N),T.push({event:ie,listeners:ee}),te?ie.data=te:(te=uu(n),te!==null&&(ie.data=te)))),(te=Sf?kf(e,n):xf(e,n))&&(S=di(S,"onBeforeInput"),0<S.length&&(N=new nu("onBeforeInput","beforeinput",null,n,N),T.push({event:N,listeners:S}),N.data=te))}Tu(T,t)})}function El(e,t,n){return{instance:e,listener:t,currentTarget:n}}function di(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=pt(e,n),i!=null&&r.unshift(El(e,i,l)),i=pt(e,t),i!=null&&r.push(El(e,i,l))),e=e.return}return r}function Fr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ju(e,t,n,r,l){for(var i=t._reactName,s=[];n!==null&&n!==r;){var c=n,f=c.alternate,S=c.stateNode;if(f!==null&&f===r)break;c.tag===5&&S!==null&&(c=S,l?(f=pt(n,i),f!=null&&s.unshift(El(n,f,c))):l||(f=pt(n,i),f!=null&&s.push(El(n,f,c)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Df=/\r\n?/g,If=/\u0000|\uFFFD/g;function Mu(e){return(typeof e=="string"?e:""+e).replace(Df,`
38
+ `+l[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=s&&0<=c);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_(e):""}function ae(e){switch(e.tag){case 5:return _(e.type);case 16:return _("Lazy");case 13:return _("Suspense");case 19:return _("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 he(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 le:return"Fragment";case fe:return"Portal";case Me:return"Profiler";case we:return"StrictMode";case at:return"Suspense";case Ze:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ze:return(e.displayName||"Context")+".Consumer";case U:return(e._context.displayName||"Context")+".Provider";case nt:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ct:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case Ke:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}function de(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 he(t);case 8:return t===we?"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 ve(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ft(e){var t=Ee(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 l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function un(e){e._valueTracker||(e._valueTracker=ft(e))}function Hl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ee(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Je(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 qn(e,t){var n=t.checked;return $({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function el(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ve(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 mr(e,t){t=t.checked,t!=null&&je(e,"checked",t,!1)}function dt(e,t){mr(e,t);var n=ve(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")?Wt(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wt(e,t.type,ve(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ql(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 Wt(e,t,n){(t!=="number"||Je(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xn=Array.isArray;function En(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ve(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function vr(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(u(91));return $({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tl(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(u(92));if(xn(n)){if(1<n.length)throw Error(u(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ve(n)}}function Yn(e,t){var n=ve(t.value),r=ve(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 Kl(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function _n(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 gr(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?_n(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Gn,yr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Gn=Gn||document.createElement("div"),Gn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Gn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Nn={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},Ht=["Webkit","ms","Moz","O"];Object.keys(Nn).forEach(function(e){Ht.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nn[t]=Nn[e]})});function nl(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Nn.hasOwnProperty(e)&&Nn[e]?(""+t).trim():t+"px"}function Xn(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=nl(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var wr=$({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 Zn(e,t){if(t){if(wr[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function rl(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 ll=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pn=null,Qt=null,cn=null;function il(e){if(e=Cl(e)){if(typeof Pn!="function")throw Error(u(280));var t=e.stateNode;t&&(t=mi(t),Pn(e.stateNode,e.type,t))}}function ol(e){Qt?cn?cn.push(e):cn=[e]:Qt=e}function Kt(){if(Qt){var e=Qt,t=cn;if(cn=Qt=null,il(e),t)for(e=0;e<t.length;e++)il(t[e])}}function Ct(e,t){return e(t)}function Ot(){}var Tn=!1;function Jn(e,t,n){if(Tn)return e(t,n);Tn=!0;try{return Ct(e,t,n)}finally{Tn=!1,(Qt!==null||cn!==null)&&(Ot(),Kt())}}function pt(e,t){var n=e.stateNode;if(n===null)return null;var r=mi(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(u(231,t,typeof n));return n}var vt=!1;if(R)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){vt=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch{vt=!1}function sl(e,t,n,r,l,i,s,c,f){var S=Array.prototype.slice.call(arguments,3);try{t.apply(n,S)}catch(N){this.onError(N)}}var bn=!1,Nt=null,Sr=!1,gt=null,Pt={onError:function(e){bn=!0,Nt=e}};function kr(e,t,n,r,l,i,s,c,f){bn=!1,Nt=null,sl.apply(Pt,arguments)}function Rn(e,t,n,r,l,i,s,c,f){if(kr.apply(this,arguments),bn){if(bn){var S=Nt;bn=!1,Nt=null}else throw Error(u(198));Sr||(Sr=!0,gt=S)}}function fn(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 qt(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 ql(e){if(fn(e)!==e)throw Error(u(188))}function Yl(e){var t=e.alternate;if(!t){if(t=fn(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return ql(l),e;if(i===r)return ql(l),t;i=i.sibling}throw Error(u(188))}if(n.return!==r.return)n=l,r=i;else{for(var s=!1,c=l.child;c;){if(c===n){s=!0,n=l,r=i;break}if(c===r){s=!0,r=l,n=i;break}c=c.sibling}if(!s){for(c=i.child;c;){if(c===n){s=!0,n=i,r=l;break}if(c===r){s=!0,r=i,n=l;break}c=c.sibling}if(!s)throw Error(u(189))}}if(n.alternate!==r)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function Gl(e){return e=Yl(e),e!==null?dn(e):null}function dn(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=dn(e);if(t!==null)return t;e=e.sibling}return null}var xr=o.unstable_scheduleCallback,Yt=o.unstable_cancelCallback,ro=o.unstable_shouldYield,lo=o.unstable_requestPaint,Ne=o.unstable_now,io=o.unstable_getCurrentPriorityLevel,ul=o.unstable_ImmediatePriority,Xl=o.unstable_UserBlockingPriority,Er=o.unstable_NormalPriority,Zl=o.unstable_LowPriority,Jl=o.unstable_IdlePriority,_r=null,Ft=null;function al(e){if(Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(_r,e,void 0,(e.current.flags&128)===128)}catch{}}var qe=Math.clz32?Math.clz32:bl,nn=Math.log,Cr=Math.LN2;function bl(e){return e>>>=0,e===0?32:31-(nn(e)/Cr|0)|0}var Nr=64,Pr=4194304;function er(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 Tr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var c=s&~l;c!==0?r=er(c):(i&=s,i!==0&&(r=er(i)))}else s=n&~l,s!==0?r=er(s):i!==0&&(r=er(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,i=t&-t,l>=i||l===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-qe(t),l=1<<n,r|=e[n],t&=~l;return r}function oo(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 cl(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-qe(i),c=1<<s,f=l[s];f===-1?((c&n)===0||(c&r)!==0)&&(l[s]=oo(c,t)):f<=t&&(e.expiredLanes|=c),i&=~c}}function jn(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function fl(){var e=Nr;return Nr<<=1,(Nr&4194240)===0&&(Nr=64),e}function g(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function x(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-qe(t),e[t]=n}function M(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 l=31-qe(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function L(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-qe(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var O=0;function z(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var oe,Se,Fe,ke,rt,pn=!1,Ae=[],yt=null,Tt=null,Rt=null,$e=new Map,Mn=new Map,Dt=[],Rr="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 ei(e,t){switch(e){case"focusin":case"focusout":yt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":$e.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mn.delete(t.pointerId)}}function ce(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=Cl(t),t!==null&&Se(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function _e(e,t,n,r,l){switch(t){case"focusin":return yt=ce(yt,e,t,n,r,l),!0;case"dragenter":return Tt=ce(Tt,e,t,n,r,l),!0;case"mouseover":return Rt=ce(Rt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return $e.set(i,ce($e.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,Mn.set(i,ce(Mn.get(i)||null,e,t,n,r,l)),!0}return!1}function We(e){var t=tr(e.target);if(t!==null){var n=fn(t);if(n!==null){if(t=n.tag,t===13){if(t=qt(n),t!==null){e.blockedOn=t,rt(e.priority,function(){Fe(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 lt(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=uo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ll=r,n.target.dispatchEvent(r),ll=null}else return t=Cl(n),t!==null&&Se(t),e.blockedOn=n,!1;t.shift()}return!0}function Gt(e,t,n){lt(e)&&n.delete(t)}function ti(){pn=!1,yt!==null&&lt(yt)&&(yt=null),Tt!==null&&lt(Tt)&&(Tt=null),Rt!==null&&lt(Rt)&&(Rt=null),$e.forEach(Gt),Mn.forEach(Gt)}function dl(e,t){e.blockedOn===t&&(e.blockedOn=null,pn||(pn=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,ti)))}function pl(e){function t(l){return dl(l,e)}if(0<Ae.length){dl(Ae[0],e);for(var n=1;n<Ae.length;n++){var r=Ae[n];r.blockedOn===e&&(r.blockedOn=null)}}for(yt!==null&&dl(yt,e),Tt!==null&&dl(Tt,e),Rt!==null&&dl(Rt,e),$e.forEach(t),Mn.forEach(t),n=0;n<Dt.length;n++)r=Dt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Dt.length&&(n=Dt[0],n.blockedOn===null);)We(n),n.blockedOn===null&&Dt.shift()}var jr=K.ReactCurrentBatchConfig,ni=!0;function Yc(e,t,n,r){var l=O,i=jr.transition;jr.transition=null;try{O=1,so(e,t,n,r)}finally{O=l,jr.transition=i}}function Gc(e,t,n,r){var l=O,i=jr.transition;jr.transition=null;try{O=4,so(e,t,n,r)}finally{O=l,jr.transition=i}}function so(e,t,n,r){if(ni){var l=uo(e,t,n,r);if(l===null)No(e,t,r,ri,n),ei(e,r);else if(_e(l,e,t,n,r))r.stopPropagation();else if(ei(e,r),t&4&&-1<Rr.indexOf(e)){for(;l!==null;){var i=Cl(l);if(i!==null&&oe(i),i=uo(e,t,n,r),i===null&&No(e,t,r,ri,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else No(e,t,r,null,n)}}var ri=null;function uo(e,t,n,r){if(ri=null,e=an(r),e=tr(e),e!==null)if(t=fn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=qt(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 ri=e,null}function Js(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(io()){case ul:return 1;case Xl:return 4;case Er:case Zl:return 16;case Jl:return 536870912;default:return 16}default:return 16}}var zn=null,ao=null,li=null;function bs(){if(li)return li;var e,t=ao,n=t.length,r,l="value"in zn?zn.value:zn.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===l[i-r];r++);return li=l.slice(e,1<r?1-r:void 0)}function ii(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 oi(){return!0}function eu(){return!1}function jt(e){function t(n,r,l,i,s){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=s,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)?oi:eu,this.isPropagationStopped=eu,this}return $(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=oi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=oi)},persist:function(){},isPersistent:oi}),t}var Mr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},co=jt(Mr),hl=$({},Mr,{view:0,detail:0}),Xc=jt(hl),fo,po,ml,si=$({},hl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mo,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!==ml&&(ml&&e.type==="mousemove"?(fo=e.screenX-ml.screenX,po=e.screenY-ml.screenY):po=fo=0,ml=e),fo)},movementY:function(e){return"movementY"in e?e.movementY:po}}),tu=jt(si),Zc=$({},si,{dataTransfer:0}),Jc=jt(Zc),bc=$({},hl,{relatedTarget:0}),ho=jt(bc),ef=$({},Mr,{animationName:0,elapsedTime:0,pseudoElement:0}),tf=jt(ef),nf=$({},Mr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rf=jt(nf),lf=$({},Mr,{data:0}),nu=jt(lf),of={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sf={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"},uf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function af(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=uf[e])?!!t[e]:!1}function mo(){return af}var cf=$({},hl,{key:function(e){if(e.key){var t=of[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ii(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mo,charCode:function(e){return e.type==="keypress"?ii(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ii(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ff=jt(cf),df=$({},si,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ru=jt(df),pf=$({},hl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mo}),hf=jt(pf),mf=$({},Mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),vf=jt(mf),gf=$({},si,{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}),yf=jt(gf),wf=[9,13,27,32],vo=R&&"CompositionEvent"in window,vl=null;R&&"documentMode"in document&&(vl=document.documentMode);var Sf=R&&"TextEvent"in window&&!vl,lu=R&&(!vo||vl&&8<vl&&11>=vl),iu=" ",ou=!1;function su(e,t){switch(e){case"keyup":return wf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zr=!1;function kf(e,t){switch(e){case"compositionend":return uu(t);case"keypress":return t.which!==32?null:(ou=!0,iu);case"textInput":return e=t.data,e===iu&&ou?null:e;default:return null}}function xf(e,t){if(zr)return e==="compositionend"||!vo&&su(e,t)?(e=bs(),li=ao=zn=null,zr=!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 lu&&t.locale!=="ko"?null:t.data;default:return null}}var Ef={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 au(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ef[e.type]:t==="textarea"}function cu(e,t,n,r){ol(r),t=di(t,"onChange"),0<t.length&&(n=new co("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gl=null,yl=null;function _f(e){Tu(e,0)}function ui(e){var t=Ir(e);if(Hl(t))return e}function Cf(e,t){if(e==="change")return t}var fu=!1;if(R){var go;if(R){var yo="oninput"in document;if(!yo){var du=document.createElement("div");du.setAttribute("oninput","return;"),yo=typeof du.oninput=="function"}go=yo}else go=!1;fu=go&&(!document.documentMode||9<document.documentMode)}function pu(){gl&&(gl.detachEvent("onpropertychange",hu),yl=gl=null)}function hu(e){if(e.propertyName==="value"&&ui(yl)){var t=[];cu(t,yl,e,an(e)),Jn(_f,t)}}function Nf(e,t,n){e==="focusin"?(pu(),gl=t,yl=n,gl.attachEvent("onpropertychange",hu)):e==="focusout"&&pu()}function Pf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ui(yl)}function Tf(e,t){if(e==="click")return ui(t)}function Rf(e,t){if(e==="input"||e==="change")return ui(t)}function jf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xt=typeof Object.is=="function"?Object.is:jf;function wl(e,t){if(Xt(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 l=n[r];if(!A.call(t,l)||!Xt(e[l],t[l]))return!1}return!0}function mu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vu(e,t){var n=mu(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=mu(n)}}function gu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yu(){for(var e=window,t=Je();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Je(e.document)}return t}function wo(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 Mf(e){var t=yu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gu(n.ownerDocument.documentElement,n)){if(r!==null&&wo(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 l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=vu(n,i);var s=vu(n,r);l&&s&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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 zf=R&&"documentMode"in document&&11>=document.documentMode,Lr=null,So=null,Sl=null,ko=!1;function wu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ko||Lr==null||Lr!==Je(r)||(r=Lr,"selectionStart"in r&&wo(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}),Sl&&wl(Sl,r)||(Sl=r,r=di(So,"onSelect"),0<r.length&&(t=new co("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Lr)))}function ai(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Or={animationend:ai("Animation","AnimationEnd"),animationiteration:ai("Animation","AnimationIteration"),animationstart:ai("Animation","AnimationStart"),transitionend:ai("Transition","TransitionEnd")},xo={},Su={};R&&(Su=document.createElement("div").style,"AnimationEvent"in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),"TransitionEvent"in window||delete Or.transitionend.transition);function ci(e){if(xo[e])return xo[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Su)return xo[e]=t[n];return e}var ku=ci("animationend"),xu=ci("animationiteration"),Eu=ci("animationstart"),_u=ci("transitionend"),Cu=new Map,Nu="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 Ln(e,t){Cu.set(e,t),E(t,[e])}for(var Eo=0;Eo<Nu.length;Eo++){var _o=Nu[Eo],Lf=_o.toLowerCase(),Of=_o[0].toUpperCase()+_o.slice(1);Ln(Lf,"on"+Of)}Ln(ku,"onAnimationEnd"),Ln(xu,"onAnimationIteration"),Ln(Eu,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(_u,"onTransitionEnd"),k("onMouseEnter",["mouseout","mouseover"]),k("onMouseLeave",["mouseout","mouseover"]),k("onPointerEnter",["pointerout","pointerover"]),k("onPointerLeave",["pointerout","pointerover"]),E("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),E("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),E("onBeforeInput",["compositionend","keypress","textInput","paste"]),E("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),E("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),E("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kl="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(" "),Ff=new Set("cancel close invalid load scroll toggle".split(" ").concat(kl));function Pu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Rn(r,t,void 0,e),e.currentTarget=null}function Tu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var c=r[s],f=c.instance,S=c.currentTarget;if(c=c.listener,f!==i&&l.isPropagationStopped())break e;Pu(l,c,S),i=f}else for(s=0;s<r.length;s++){if(c=r[s],f=c.instance,S=c.currentTarget,c=c.listener,f!==i&&l.isPropagationStopped())break e;Pu(l,c,S),i=f}}}if(Sr)throw e=gt,Sr=!1,gt=null,e}function Pe(e,t){var n=t[zo];n===void 0&&(n=t[zo]=new Set);var r=e+"__bubble";n.has(r)||(Ru(t,e,2,!1),n.add(r))}function Co(e,t,n){var r=0;t&&(r|=4),Ru(n,e,r,t)}var fi="_reactListening"+Math.random().toString(36).slice(2);function xl(e){if(!e[fi]){e[fi]=!0,y.forEach(function(n){n!=="selectionchange"&&(Ff.has(n)||Co(n,!1,e),Co(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fi]||(t[fi]=!0,Co("selectionchange",!1,t))}}function Ru(e,t,n,r){switch(Js(t)){case 1:var l=Yc;break;case 4:l=Gc;break;default:l=so}n=l.bind(null,t,n,e),l=void 0,!vt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function No(e,t,n,r,l){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===l||c.nodeType===8&&c.parentNode===l)break;if(s===4)for(s=r.return;s!==null;){var f=s.tag;if((f===3||f===4)&&(f=s.stateNode.containerInfo,f===l||f.nodeType===8&&f.parentNode===l))return;s=s.return}for(;c!==null;){if(s=tr(c),s===null)return;if(f=s.tag,f===5||f===6){r=i=s;continue e}c=c.parentNode}}r=r.return}Jn(function(){var S=i,N=an(n),T=[];e:{var C=Cu.get(e);if(C!==void 0){var V=co,H=e;switch(e){case"keypress":if(ii(n)===0)break e;case"keydown":case"keyup":V=ff;break;case"focusin":H="focus",V=ho;break;case"focusout":H="blur",V=ho;break;case"beforeblur":case"afterblur":V=ho;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":V=tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Jc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=hf;break;case ku:case xu:case Eu:V=tf;break;case _u:V=vf;break;case"scroll":V=Xc;break;case"wheel":V=yf;break;case"copy":case"cut":case"paste":V=rf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=ru}var Q=(t&4)!==0,Ve=!Q&&e==="scroll",m=Q?C!==null?C+"Capture":null:C;Q=[];for(var d=S,w;d!==null;){w=d;var j=w.stateNode;if(w.tag===5&&j!==null&&(w=j,m!==null&&(j=pt(d,m),j!=null&&Q.push(El(d,j,w)))),Ve)break;d=d.return}0<Q.length&&(C=new V(C,H,null,n,N),T.push({event:C,listeners:Q}))}}if((t&7)===0){e:{if(C=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",C&&n!==ll&&(H=n.relatedTarget||n.fromElement)&&(tr(H)||H[hn]))break e;if((V||C)&&(C=N.window===N?N:(C=N.ownerDocument)?C.defaultView||C.parentWindow:window,V?(H=n.relatedTarget||n.toElement,V=S,H=H?tr(H):null,H!==null&&(Ve=fn(H),H!==Ve||H.tag!==5&&H.tag!==6)&&(H=null)):(V=null,H=S),V!==H)){if(Q=tu,j="onMouseLeave",m="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(Q=ru,j="onPointerLeave",m="onPointerEnter",d="pointer"),Ve=V==null?C:Ir(V),w=H==null?C:Ir(H),C=new Q(j,d+"leave",V,n,N),C.target=Ve,C.relatedTarget=w,j=null,tr(N)===S&&(Q=new Q(m,d+"enter",H,n,N),Q.target=w,Q.relatedTarget=Ve,j=Q),Ve=j,V&&H)t:{for(Q=V,m=H,d=0,w=Q;w;w=Fr(w))d++;for(w=0,j=m;j;j=Fr(j))w++;for(;0<d-w;)Q=Fr(Q),d--;for(;0<w-d;)m=Fr(m),w--;for(;d--;){if(Q===m||m!==null&&Q===m.alternate)break t;Q=Fr(Q),m=Fr(m)}Q=null}else Q=null;V!==null&&ju(T,C,V,Q,!1),H!==null&&Ve!==null&&ju(T,Ve,H,Q,!0)}}e:{if(C=S?Ir(S):window,V=C.nodeName&&C.nodeName.toLowerCase(),V==="select"||V==="input"&&C.type==="file")var Y=Cf;else if(au(C))if(fu)Y=Rf;else{Y=Pf;var ee=Nf}else(V=C.nodeName)&&V.toLowerCase()==="input"&&(C.type==="checkbox"||C.type==="radio")&&(Y=Tf);if(Y&&(Y=Y(e,S))){cu(T,Y,n,N);break e}ee&&ee(e,C,S),e==="focusout"&&(ee=C._wrapperState)&&ee.controlled&&C.type==="number"&&Wt(C,"number",C.value)}switch(ee=S?Ir(S):window,e){case"focusin":(au(ee)||ee.contentEditable==="true")&&(Lr=ee,So=S,Sl=null);break;case"focusout":Sl=So=Lr=null;break;case"mousedown":ko=!0;break;case"contextmenu":case"mouseup":case"dragend":ko=!1,wu(T,n,N);break;case"selectionchange":if(zf)break;case"keydown":case"keyup":wu(T,n,N)}var te;if(vo)e:{switch(e){case"compositionstart":var ie="onCompositionStart";break e;case"compositionend":ie="onCompositionEnd";break e;case"compositionupdate":ie="onCompositionUpdate";break e}ie=void 0}else zr?su(e,n)&&(ie="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ie="onCompositionStart");ie&&(lu&&n.locale!=="ko"&&(zr||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&zr&&(te=bs()):(zn=N,ao="value"in zn?zn.value:zn.textContent,zr=!0)),ee=di(S,ie),0<ee.length&&(ie=new nu(ie,e,null,n,N),T.push({event:ie,listeners:ee}),te?ie.data=te:(te=uu(n),te!==null&&(ie.data=te)))),(te=Sf?kf(e,n):xf(e,n))&&(S=di(S,"onBeforeInput"),0<S.length&&(N=new nu("onBeforeInput","beforeinput",null,n,N),T.push({event:N,listeners:S}),N.data=te))}Tu(T,t)})}function El(e,t,n){return{instance:e,listener:t,currentTarget:n}}function di(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=pt(e,n),i!=null&&r.unshift(El(e,i,l)),i=pt(e,t),i!=null&&r.push(El(e,i,l))),e=e.return}return r}function Fr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ju(e,t,n,r,l){for(var i=t._reactName,s=[];n!==null&&n!==r;){var c=n,f=c.alternate,S=c.stateNode;if(f!==null&&f===r)break;c.tag===5&&S!==null&&(c=S,l?(f=pt(n,i),f!=null&&s.unshift(El(n,f,c))):l||(f=pt(n,i),f!=null&&s.push(El(n,f,c)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Df=/\r\n?/g,If=/\u0000|\uFFFD/g;function Mu(e){return(typeof e=="string"?e:""+e).replace(Df,`
39
39
  `).replace(If,"")}function pi(e,t,n){if(t=Mu(t),Mu(e)!==t&&n)throw Error(u(425))}function hi(){}var Po=null,To=null;function Ro(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 jo=typeof setTimeout=="function"?setTimeout:void 0,Af=typeof clearTimeout=="function"?clearTimeout:void 0,zu=typeof Promise=="function"?Promise:void 0,Uf=typeof queueMicrotask=="function"?queueMicrotask:typeof zu<"u"?function(e){return zu.resolve(null).then(e).catch(Vf)}:jo;function Vf(e){setTimeout(function(){throw e})}function Mo(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),pl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);pl(t)}function On(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 Lu(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 Dr=Math.random().toString(36).slice(2),rn="__reactFiber$"+Dr,_l="__reactProps$"+Dr,hn="__reactContainer$"+Dr,zo="__reactEvents$"+Dr,$f="__reactListeners$"+Dr,Bf="__reactHandles$"+Dr;function tr(e){var t=e[rn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hn]||n[rn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Lu(e);e!==null;){if(n=e[rn])return n;e=Lu(e)}return t}e=n,n=e.parentNode}return null}function Cl(e){return e=e[rn]||e[hn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ir(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(u(33))}function mi(e){return e[_l]||null}var Lo=[],Ar=-1;function Fn(e){return{current:e}}function Te(e){0>Ar||(e.current=Lo[Ar],Lo[Ar]=null,Ar--)}function Ce(e,t){Ar++,Lo[Ar]=e.current,e.current=t}var Dn={},it=Fn(Dn),wt=Fn(!1),nr=Dn;function Ur(e,t){var n=e.type.contextTypes;if(!n)return Dn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function St(e){return e=e.childContextTypes,e!=null}function vi(){Te(wt),Te(it)}function Ou(e,t,n){if(it.current!==Dn)throw Error(u(168));Ce(it,t),Ce(wt,n)}function Fu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(u(108,de(e)||"Unknown",l));return $({},n,r)}function gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dn,nr=it.current,Ce(it,e),Ce(wt,wt.current),!0}function Du(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=Fu(e,t,nr),r.__reactInternalMemoizedMergedChildContext=e,Te(wt),Te(it),Ce(it,e)):Te(wt),Ce(wt,n)}var mn=null,yi=!1,Oo=!1;function Iu(e){mn===null?mn=[e]:mn.push(e)}function Wf(e){yi=!0,Iu(e)}function In(){if(!Oo&&mn!==null){Oo=!0;var e=0,t=O;try{var n=mn;for(O=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}mn=null,yi=!1}catch(l){throw mn!==null&&(mn=mn.slice(e+1)),xr(ul,In),l}finally{O=t,Oo=!1}}return null}var Vr=[],$r=0,wi=null,Si=0,It=[],At=0,rr=null,vn=1,gn="";function lr(e,t){Vr[$r++]=Si,Vr[$r++]=wi,wi=e,Si=t}function Au(e,t,n){It[At++]=vn,It[At++]=gn,It[At++]=rr,rr=e;var r=vn;e=gn;var l=32-qe(r)-1;r&=~(1<<l),n+=1;var i=32-qe(t)+l;if(30<i){var s=l-l%5;i=(r&(1<<s)-1).toString(32),r>>=s,l-=s,vn=1<<32-qe(t)+l|n<<l|r,gn=i+e}else vn=1<<i|n<<l|r,gn=e}function Fo(e){e.return!==null&&(lr(e,1),Au(e,1,0))}function Do(e){for(;e===wi;)wi=Vr[--$r],Vr[$r]=null,Si=Vr[--$r],Vr[$r]=null;for(;e===rr;)rr=It[--At],It[At]=null,gn=It[--At],It[At]=null,vn=It[--At],It[At]=null}var Mt=null,zt=null,Oe=!1,Zt=null;function Uu(e,t){var n=Bt(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 Vu(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,Mt=e,zt=On(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mt=e,zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=rr!==null?{id:vn,overflow:gn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Bt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Mt=e,zt=null,!0):!1;default:return!1}}function Io(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ao(e){if(Oe){var t=zt;if(t){var n=t;if(!Vu(e,t)){if(Io(e))throw Error(u(418));t=On(n.nextSibling);var r=Mt;t&&Vu(e,t)?Uu(r,n):(e.flags=e.flags&-4097|2,Oe=!1,Mt=e)}}else{if(Io(e))throw Error(u(418));e.flags=e.flags&-4097|2,Oe=!1,Mt=e}}}function $u(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mt=e}function ki(e){if(e!==Mt)return!1;if(!Oe)return $u(e),Oe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ro(e.type,e.memoizedProps)),t&&(t=zt)){if(Io(e))throw Bu(),Error(u(418));for(;t;)Uu(e,t),t=On(t.nextSibling)}if($u(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){zt=On(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}zt=null}}else zt=Mt?On(e.stateNode.nextSibling):null;return!0}function Bu(){for(var e=zt;e;)e=On(e.nextSibling)}function Br(){zt=Mt=null,Oe=!1}function Uo(e){Zt===null?Zt=[e]:Zt.push(e)}var Hf=K.ReactCurrentBatchConfig;function Nl(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(u(309));var r=n.stateNode}if(!r)throw Error(u(147,e));var l=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var c=l.refs;s===null?delete c[i]:c[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(u(284));if(!n._owner)throw Error(u(290,e))}return e}function xi(e,t){throw e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wu(e){var t=e._init;return t(e._payload)}function Hu(e){function t(m,d){if(e){var w=m.deletions;w===null?(m.deletions=[d],m.flags|=16):w.push(d)}}function n(m,d){if(!e)return null;for(;d!==null;)t(m,d),d=d.sibling;return null}function r(m,d){for(m=new Map;d!==null;)d.key!==null?m.set(d.key,d):m.set(d.index,d),d=d.sibling;return m}function l(m,d){return m=Qn(m,d),m.index=0,m.sibling=null,m}function i(m,d,w){return m.index=w,e?(w=m.alternate,w!==null?(w=w.index,w<d?(m.flags|=2,d):w):(m.flags|=2,d)):(m.flags|=1048576,d)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function c(m,d,w,j){return d===null||d.tag!==6?(d=js(w,m.mode,j),d.return=m,d):(d=l(d,w),d.return=m,d)}function f(m,d,w,j){var Y=w.type;return Y===le?N(m,d,w.props.children,j,w.key):d!==null&&(d.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===Ke&&Wu(Y)===d.type)?(j=l(d,w.props),j.ref=Nl(m,d,w),j.return=m,j):(j=Ki(w.type,w.key,w.props,null,m.mode,j),j.ref=Nl(m,d,w),j.return=m,j)}function S(m,d,w,j){return d===null||d.tag!==4||d.stateNode.containerInfo!==w.containerInfo||d.stateNode.implementation!==w.implementation?(d=Ms(w,m.mode,j),d.return=m,d):(d=l(d,w.children||[]),d.return=m,d)}function N(m,d,w,j,Y){return d===null||d.tag!==7?(d=dr(w,m.mode,j,Y),d.return=m,d):(d=l(d,w),d.return=m,d)}function T(m,d,w){if(typeof d=="string"&&d!==""||typeof d=="number")return d=js(""+d,m.mode,w),d.return=m,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case se:return w=Ki(d.type,d.key,d.props,null,m.mode,w),w.ref=Nl(m,null,d),w.return=m,w;case fe:return d=Ms(d,m.mode,w),d.return=m,d;case Ke:var j=d._init;return T(m,j(d._payload),w)}if(xn(d)||b(d))return d=dr(d,m.mode,w,null),d.return=m,d;xi(m,d)}return null}function C(m,d,w,j){var Y=d!==null?d.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return Y!==null?null:c(m,d,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case se:return w.key===Y?f(m,d,w,j):null;case fe:return w.key===Y?S(m,d,w,j):null;case Ke:return Y=w._init,C(m,d,Y(w._payload),j)}if(xn(w)||b(w))return Y!==null?null:N(m,d,w,j,null);xi(m,w)}return null}function V(m,d,w,j,Y){if(typeof j=="string"&&j!==""||typeof j=="number")return m=m.get(w)||null,c(d,m,""+j,Y);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case se:return m=m.get(j.key===null?w:j.key)||null,f(d,m,j,Y);case fe:return m=m.get(j.key===null?w:j.key)||null,S(d,m,j,Y);case Ke:var ee=j._init;return V(m,d,w,ee(j._payload),Y)}if(xn(j)||b(j))return m=m.get(w)||null,N(d,m,j,Y,null);xi(d,j)}return null}function H(m,d,w,j){for(var Y=null,ee=null,te=d,ie=d=0,Xe=null;te!==null&&ie<w.length;ie++){te.index>ie?(Xe=te,te=null):Xe=te.sibling;var ye=C(m,te,w[ie],j);if(ye===null){te===null&&(te=Xe);break}e&&te&&ye.alternate===null&&t(m,te),d=i(ye,d,ie),ee===null?Y=ye:ee.sibling=ye,ee=ye,te=Xe}if(ie===w.length)return n(m,te),Oe&&lr(m,ie),Y;if(te===null){for(;ie<w.length;ie++)te=T(m,w[ie],j),te!==null&&(d=i(te,d,ie),ee===null?Y=te:ee.sibling=te,ee=te);return Oe&&lr(m,ie),Y}for(te=r(m,te);ie<w.length;ie++)Xe=V(te,m,ie,w[ie],j),Xe!==null&&(e&&Xe.alternate!==null&&te.delete(Xe.key===null?ie:Xe.key),d=i(Xe,d,ie),ee===null?Y=Xe:ee.sibling=Xe,ee=Xe);return e&&te.forEach(function(Kn){return t(m,Kn)}),Oe&&lr(m,ie),Y}function Q(m,d,w,j){var Y=b(w);if(typeof Y!="function")throw Error(u(150));if(w=Y.call(w),w==null)throw Error(u(151));for(var ee=Y=null,te=d,ie=d=0,Xe=null,ye=w.next();te!==null&&!ye.done;ie++,ye=w.next()){te.index>ie?(Xe=te,te=null):Xe=te.sibling;var Kn=C(m,te,ye.value,j);if(Kn===null){te===null&&(te=Xe);break}e&&te&&Kn.alternate===null&&t(m,te),d=i(Kn,d,ie),ee===null?Y=Kn:ee.sibling=Kn,ee=Kn,te=Xe}if(ye.done)return n(m,te),Oe&&lr(m,ie),Y;if(te===null){for(;!ye.done;ie++,ye=w.next())ye=T(m,ye.value,j),ye!==null&&(d=i(ye,d,ie),ee===null?Y=ye:ee.sibling=ye,ee=ye);return Oe&&lr(m,ie),Y}for(te=r(m,te);!ye.done;ie++,ye=w.next())ye=V(te,m,ie,ye.value,j),ye!==null&&(e&&ye.alternate!==null&&te.delete(ye.key===null?ie:ye.key),d=i(ye,d,ie),ee===null?Y=ye:ee.sibling=ye,ee=ye);return e&&te.forEach(function(Ed){return t(m,Ed)}),Oe&&lr(m,ie),Y}function Ve(m,d,w,j){if(typeof w=="object"&&w!==null&&w.type===le&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case se:e:{for(var Y=w.key,ee=d;ee!==null;){if(ee.key===Y){if(Y=w.type,Y===le){if(ee.tag===7){n(m,ee.sibling),d=l(ee,w.props.children),d.return=m,m=d;break e}}else if(ee.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===Ke&&Wu(Y)===ee.type){n(m,ee.sibling),d=l(ee,w.props),d.ref=Nl(m,ee,w),d.return=m,m=d;break e}n(m,ee);break}else t(m,ee);ee=ee.sibling}w.type===le?(d=dr(w.props.children,m.mode,j,w.key),d.return=m,m=d):(j=Ki(w.type,w.key,w.props,null,m.mode,j),j.ref=Nl(m,d,w),j.return=m,m=j)}return s(m);case fe:e:{for(ee=w.key;d!==null;){if(d.key===ee)if(d.tag===4&&d.stateNode.containerInfo===w.containerInfo&&d.stateNode.implementation===w.implementation){n(m,d.sibling),d=l(d,w.children||[]),d.return=m,m=d;break e}else{n(m,d);break}else t(m,d);d=d.sibling}d=Ms(w,m.mode,j),d.return=m,m=d}return s(m);case Ke:return ee=w._init,Ve(m,d,ee(w._payload),j)}if(xn(w))return H(m,d,w,j);if(b(w))return Q(m,d,w,j);xi(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,d!==null&&d.tag===6?(n(m,d.sibling),d=l(d,w),d.return=m,m=d):(n(m,d),d=js(w,m.mode,j),d.return=m,m=d),s(m)):n(m,d)}return Ve}var Wr=Hu(!0),Qu=Hu(!1),Ei=Fn(null),_i=null,Hr=null,Vo=null;function $o(){Vo=Hr=_i=null}function Bo(e){var t=Ei.current;Te(Ei),e._currentValue=t}function Wo(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 Qr(e,t){_i=e,Vo=Hr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(kt=!0),e.firstContext=null)}function Ut(e){var t=e._currentValue;if(Vo!==e)if(e={context:e,memoizedValue:t,next:null},Hr===null){if(_i===null)throw Error(u(308));Hr=e,_i.dependencies={lanes:0,firstContext:e}}else Hr=Hr.next=e;return t}var ir=null;function Ho(e){ir===null?ir=[e]:ir.push(e)}function Ku(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Ho(t)):(n.next=l.next,l.next=n),t.interleaved=n,yn(e,r)}function yn(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 An=!1;function Qo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qu(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 Un(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ge&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,yn(e,n)}return l=r.interleaved,l===null?(t.next=t,Ho(r)):(t.next=l.next,l.next=t),r.interleaved=t,yn(e,n)}function Ci(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,L(e,n)}}function Yu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,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 Ni(e,t,n,r){var l=e.updateQueue;An=!1;var i=l.firstBaseUpdate,s=l.lastBaseUpdate,c=l.shared.pending;if(c!==null){l.shared.pending=null;var f=c,S=f.next;f.next=null,s===null?i=S:s.next=S,s=f;var N=e.alternate;N!==null&&(N=N.updateQueue,c=N.lastBaseUpdate,c!==s&&(c===null?N.firstBaseUpdate=S:c.next=S,N.lastBaseUpdate=f))}if(i!==null){var T=l.baseState;s=0,N=S=f=null,c=i;do{var C=c.lane,V=c.eventTime;if((r&C)===C){N!==null&&(N=N.next={eventTime:V,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var H=e,Q=c;switch(C=t,V=n,Q.tag){case 1:if(H=Q.payload,typeof H=="function"){T=H.call(V,T,C);break e}T=H;break e;case 3:H.flags=H.flags&-65537|128;case 0:if(H=Q.payload,C=typeof H=="function"?H.call(V,T,C):H,C==null)break e;T=$({},T,C);break e;case 2:An=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,C=l.effects,C===null?l.effects=[c]:C.push(c))}else V={eventTime:V,lane:C,tag:c.tag,payload:c.payload,callback:c.callback,next:null},N===null?(S=N=V,f=T):N=N.next=V,s|=C;if(c=c.next,c===null){if(c=l.shared.pending,c===null)break;C=c,c=C.next,C.next=null,l.lastBaseUpdate=C,l.shared.pending=null}}while(!0);if(N===null&&(f=T),l.baseState=f,l.firstBaseUpdate=S,l.lastBaseUpdate=N,t=l.shared.interleaved,t!==null){l=t;do s|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);ur|=s,e.lanes=s,e.memoizedState=T}}function Gu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(u(191,l));l.call(r)}}}var Pl={},ln=Fn(Pl),Tl=Fn(Pl),Rl=Fn(Pl);function or(e){if(e===Pl)throw Error(u(174));return e}function Ko(e,t){switch(Ce(Rl,t),Ce(Tl,e),Ce(ln,Pl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gr(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gr(t,e)}Te(ln),Ce(ln,t)}function Kr(){Te(ln),Te(Tl),Te(Rl)}function Xu(e){or(Rl.current);var t=or(ln.current),n=gr(t,e.type);t!==n&&(Ce(Tl,e),Ce(ln,n))}function qo(e){Tl.current===e&&(Te(ln),Te(Tl))}var De=Fn(0);function Pi(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 Yo=[];function Go(){for(var e=0;e<Yo.length;e++)Yo[e]._workInProgressVersionPrimary=null;Yo.length=0}var Ti=K.ReactCurrentDispatcher,Xo=K.ReactCurrentBatchConfig,sr=0,Ie=null,He=null,Ye=null,Ri=!1,jl=!1,Ml=0,Qf=0;function ot(){throw Error(u(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xt(e[n],t[n]))return!1;return!0}function Jo(e,t,n,r,l,i){if(sr=i,Ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ti.current=e===null||e.memoizedState===null?Gf:Xf,e=n(r,l),jl){i=0;do{if(jl=!1,Ml=0,25<=i)throw Error(u(301));i+=1,Ye=He=null,t.updateQueue=null,Ti.current=Zf,e=n(r,l)}while(jl)}if(Ti.current=zi,t=He!==null&&He.next!==null,sr=0,Ye=He=Ie=null,Ri=!1,t)throw Error(u(300));return e}function bo(){var e=Ml!==0;return Ml=0,e}function on(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?Ie.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function Vt(){if(He===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=Ye===null?Ie.memoizedState:Ye.next;if(t!==null)Ye=t,He=e;else{if(e===null)throw Error(u(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},Ye===null?Ie.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function zl(e,t){return typeof t=="function"?t(e):t}function es(e){var t=Vt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=He,l=r.baseQueue,i=n.pending;if(i!==null){if(l!==null){var s=l.next;l.next=i.next,i.next=s}r.baseQueue=l=i,n.pending=null}if(l!==null){i=l.next,r=r.baseState;var c=s=null,f=null,S=i;do{var N=S.lane;if((sr&N)===N)f!==null&&(f=f.next={lane:0,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null}),r=S.hasEagerState?S.eagerState:e(r,S.action);else{var T={lane:N,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null};f===null?(c=f=T,s=r):f=f.next=T,Ie.lanes|=N,ur|=N}S=S.next}while(S!==null&&S!==i);f===null?s=r:f.next=c,Xt(r,t.memoizedState)||(kt=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=f,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do i=l.lane,Ie.lanes|=i,ur|=i,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ts(e){var t=Vt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var s=l=l.next;do i=e(i,s.action),s=s.next;while(s!==l);Xt(i,t.memoizedState)||(kt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Zu(){}function Ju(e,t){var n=Ie,r=Vt(),l=t(),i=!Xt(r.memoizedState,l);if(i&&(r.memoizedState=l,kt=!0),r=r.queue,ns(ta.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ye!==null&&Ye.memoizedState.tag&1){if(n.flags|=2048,Ll(9,ea.bind(null,n,r,l,t),void 0,null),Ge===null)throw Error(u(349));(sr&30)!==0||bu(n,t,l)}return l}function bu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ea(e,t,n,r){t.value=n,t.getSnapshot=r,na(t)&&ra(e)}function ta(e,t,n){return n(function(){na(t)&&ra(e)})}function na(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xt(e,n)}catch{return!0}}function ra(e){var t=yn(e,1);t!==null&&tn(t,e,1,-1)}function la(e){var t=on();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zl,lastRenderedState:e},t.queue=e,e=e.dispatch=Yf.bind(null,Ie,e),[t.memoizedState,e]}function Ll(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.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 ia(){return Vt().memoizedState}function ji(e,t,n,r){var l=on();Ie.flags|=e,l.memoizedState=Ll(1|t,n,void 0,r===void 0?null:r)}function Mi(e,t,n,r){var l=Vt();r=r===void 0?null:r;var i=void 0;if(He!==null){var s=He.memoizedState;if(i=s.destroy,r!==null&&Zo(r,s.deps)){l.memoizedState=Ll(t,n,i,r);return}}Ie.flags|=e,l.memoizedState=Ll(1|t,n,i,r)}function oa(e,t){return ji(8390656,8,e,t)}function ns(e,t){return Mi(2048,8,e,t)}function sa(e,t){return Mi(4,2,e,t)}function ua(e,t){return Mi(4,4,e,t)}function aa(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 ca(e,t,n){return n=n!=null?n.concat([e]):null,Mi(4,4,aa.bind(null,t,e),n)}function rs(){}function fa(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function da(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pa(e,t,n){return(sr&21)===0?(e.baseState&&(e.baseState=!1,kt=!0),e.memoizedState=n):(Xt(n,t)||(n=fl(),Ie.lanes|=n,ur|=n,e.baseState=!0),t)}function Kf(e,t){var n=O;O=n!==0&&4>n?n:4,e(!0);var r=Xo.transition;Xo.transition={};try{e(!1),t()}finally{O=n,Xo.transition=r}}function ha(){return Vt().memoizedState}function qf(e,t,n){var r=Wn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ma(e))va(t,n);else if(n=Ku(e,t,n,r),n!==null){var l=mt();tn(n,e,r,l),ga(n,t,r)}}function Yf(e,t,n){var r=Wn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ma(e))va(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,c=i(s,n);if(l.hasEagerState=!0,l.eagerState=c,Xt(c,s)){var f=t.interleaved;f===null?(l.next=l,Ho(t)):(l.next=f.next,f.next=l),t.interleaved=l;return}}catch{}finally{}n=Ku(e,t,l,r),n!==null&&(l=mt(),tn(n,e,r,l),ga(n,t,r))}}function ma(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function va(e,t){jl=Ri=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ga(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L(e,n)}}var zi={readContext:Ut,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useInsertionEffect:ot,useLayoutEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useMutableSource:ot,useSyncExternalStore:ot,useId:ot,unstable_isNewReconciler:!1},Gf={readContext:Ut,useCallback:function(e,t){return on().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:oa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ji(4194308,4,aa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ji(4194308,4,e,t)},useInsertionEffect:function(e,t){return ji(4,2,e,t)},useMemo:function(e,t){var n=on();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=on();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=qf.bind(null,Ie,e),[r.memoizedState,e]},useRef:function(e){var t=on();return e={current:e},t.memoizedState=e},useState:la,useDebugValue:rs,useDeferredValue:function(e){return on().memoizedState=e},useTransition:function(){var e=la(!1),t=e[0];return e=Kf.bind(null,e[1]),on().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ie,l=on();if(Oe){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Ge===null)throw Error(u(349));(sr&30)!==0||bu(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,oa(ta.bind(null,r,i,e),[e]),r.flags|=2048,Ll(9,ea.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=on(),t=Ge.identifierPrefix;if(Oe){var n=gn,r=vn;n=(r&~(1<<32-qe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ml++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Qf++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xf={readContext:Ut,useCallback:fa,useContext:Ut,useEffect:ns,useImperativeHandle:ca,useInsertionEffect:sa,useLayoutEffect:ua,useMemo:da,useReducer:es,useRef:ia,useState:function(){return es(zl)},useDebugValue:rs,useDeferredValue:function(e){var t=Vt();return pa(t,He.memoizedState,e)},useTransition:function(){var e=es(zl)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:Zu,useSyncExternalStore:Ju,useId:ha,unstable_isNewReconciler:!1},Zf={readContext:Ut,useCallback:fa,useContext:Ut,useEffect:ns,useImperativeHandle:ca,useInsertionEffect:sa,useLayoutEffect:ua,useMemo:da,useReducer:ts,useRef:ia,useState:function(){return ts(zl)},useDebugValue:rs,useDeferredValue:function(e){var t=Vt();return He===null?t.memoizedState=e:pa(t,He.memoizedState,e)},useTransition:function(){var e=ts(zl)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:Zu,useSyncExternalStore:Ju,useId:ha,unstable_isNewReconciler:!1};function Jt(e,t){if(e&&e.defaultProps){t=$({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ls(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:$({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Li={isMounted:function(e){return(e=e._reactInternals)?fn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mt(),l=Wn(e),i=wn(r,l);i.payload=t,n!=null&&(i.callback=n),t=Un(e,i,l),t!==null&&(tn(t,e,l,r),Ci(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mt(),l=Wn(e),i=wn(r,l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Un(e,i,l),t!==null&&(tn(t,e,l,r),Ci(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mt(),r=Wn(e),l=wn(n,r);l.tag=2,t!=null&&(l.callback=t),t=Un(e,l,r),t!==null&&(tn(t,e,r,n),Ci(t,e,r))}};function ya(e,t,n,r,l,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!wl(n,r)||!wl(l,i):!0}function wa(e,t,n){var r=!1,l=Dn,i=t.contextType;return typeof i=="object"&&i!==null?i=Ut(i):(l=St(t)?nr:it.current,r=t.contextTypes,i=(r=r!=null)?Ur(e,l):Dn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Li,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function Sa(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&&Li.enqueueReplaceState(t,t.state,null)}function is(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Qo(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=Ut(i):(i=St(t)?nr:it.current,l.context=Ur(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ls(e,t,i,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Li.enqueueReplaceState(l,l.state,null),Ni(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function qr(e,t){try{var n="",r=t;do n+=ae(r),r=r.return;while(r);var l=n}catch(i){l=`
40
40
  Error generating stack: `+i.message+`
41
- `+i.stack}return{value:e,source:t,stack:l,digest:null}}function os(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ss(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Jf=typeof WeakMap=="function"?WeakMap:Map;function ka(e,t,n){n=wn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vi||(Vi=!0,xs=r),ss(e,t)},n}function xa(e,t,n){n=wn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ss(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ss(e,t),typeof r!="function"&&($n===null?$n=new Set([this]):$n.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Ea(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Jf;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=dd.bind(null,e,t,n),t.then(e,e))}function _a(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 Ca(e,t,n,r,l){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,Un(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var bf=K.ReactCurrentOwner,kt=!1;function ht(e,t,n,r){t.child=e===null?Qu(t,null,n,r):Wr(t,e.child,n,r)}function Na(e,t,n,r,l){n=n.render;var i=t.ref;return Qr(t,l),r=Jo(e,t,n,r,i,l),n=bo(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Sn(e,t,l)):(Oe&&n&&Fo(t),t.flags|=1,ht(e,t,r,l),t.child)}function Pa(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Rs(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Ta(e,t,i,r,l)):(e=Ki(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&l)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:wl,n(s,r)&&e.ref===t.ref)return Sn(e,t,l)}return t.flags|=1,e=Qn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Ta(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(wl(i,r)&&e.ref===t.ref)if(kt=!1,t.pendingProps=r=i,(e.lanes&l)!==0)(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,Sn(e,t,l)}return us(e,t,n,r,l)}function Ra(e,t,n){var r=t.pendingProps,l=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},Ce(Gr,Lt),Lt|=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,Ce(Gr,Lt),Lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ce(Gr,Lt),Lt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ce(Gr,Lt),Lt|=r;return ht(e,t,l,n),t.child}function ja(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function us(e,t,n,r,l){var i=St(n)?nr:it.current;return i=Ur(t,i),Qr(t,l),n=Jo(e,t,n,r,i,l),r=bo(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Sn(e,t,l)):(Oe&&r&&Fo(t),t.flags|=1,ht(e,t,n,l),t.child)}function Ma(e,t,n,r,l){if(St(n)){var i=!0;gi(t)}else i=!1;if(Qr(t,l),t.stateNode===null)Fi(e,t),wa(t,n,r),is(t,n,r,l),r=!0;else if(e===null){var s=t.stateNode,c=t.memoizedProps;s.props=c;var f=s.context,S=n.contextType;typeof S=="object"&&S!==null?S=Ut(S):(S=St(n)?nr:it.current,S=Ur(t,S));var N=n.getDerivedStateFromProps,T=typeof N=="function"||typeof s.getSnapshotBeforeUpdate=="function";T||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(c!==r||f!==S)&&Sa(t,s,r,S),An=!1;var C=t.memoizedState;s.state=C,Ni(t,r,s,l),f=t.memoizedState,c!==r||C!==f||wt.current||An?(typeof N=="function"&&(ls(t,n,N,r),f=t.memoizedState),(c=An||ya(t,n,c,r,C,f,S))?(T||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=S,r=c):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,qu(e,t),c=t.memoizedProps,S=t.type===t.elementType?c:Jt(t.type,c),s.props=S,T=t.pendingProps,C=s.context,f=n.contextType,typeof f=="object"&&f!==null?f=Ut(f):(f=St(n)?nr:it.current,f=Ur(t,f));var V=n.getDerivedStateFromProps;(N=typeof V=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(c!==T||C!==f)&&Sa(t,s,r,f),An=!1,C=t.memoizedState,s.state=C,Ni(t,r,s,l);var H=t.memoizedState;c!==T||C!==H||wt.current||An?(typeof V=="function"&&(ls(t,n,V,r),H=t.memoizedState),(S=An||ya(t,n,S,r,C,H,f)||!1)?(N||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,H,f),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,H,f)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||c===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=H),s.props=r,s.state=H,s.context=f,r=S):(typeof s.componentDidUpdate!="function"||c===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),r=!1)}return as(e,t,n,r,i,l)}function as(e,t,n,r,l,i){ja(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return l&&Du(t,n,!1),Sn(e,t,i);r=t.stateNode,bf.current=t;var c=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Wr(t,e.child,null,i),t.child=Wr(t,null,c,i)):ht(e,t,c,i),t.memoizedState=r.state,l&&Du(t,n,!0),t.child}function za(e){var t=e.stateNode;t.pendingContext?Ou(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ou(e,t.context,!1),Ko(e,t.containerInfo)}function La(e,t,n,r,l){return Br(),Uo(l),t.flags|=256,ht(e,t,n,r),t.child}var cs={dehydrated:null,treeContext:null,retryLane:0};function fs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oa(e,t,n){var r=t.pendingProps,l=De.current,i=!1,s=(t.flags&128)!==0,c;if((c=s)||(c=e!==null&&e.memoizedState===null?!1:(l&2)!==0),c?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),Ce(De,l&1),e===null)return Ao(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):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=qi(s,r,0,null),e=dr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=fs(n),t.memoizedState=cs,e):ds(t,s));if(l=e.memoizedState,l!==null&&(c=l.dehydrated,c!==null))return ed(e,t,s,r,c,l,n);if(i){i=r.fallback,s=t.mode,l=e.child,c=l.sibling;var f={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=Qn(l,f),r.subtreeFlags=l.subtreeFlags&14680064),c!==null?i=Qn(c,i):(i=dr(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?fs(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=cs,r}return i=e.child,e=i.sibling,r=Qn(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 ds(e,t){return t=qi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Oi(e,t,n,r){return r!==null&&Uo(r),Wr(t,e.child,null,n),e=ds(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ed(e,t,n,r,l,i,s){if(n)return t.flags&256?(t.flags&=-257,r=os(Error(u(422))),Oi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=qi({mode:"visible",children:r.children},l,0,null),i=dr(i,l,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Wr(t,e.child,null,s),t.child.memoizedState=fs(s),t.memoizedState=cs,i);if((t.mode&1)===0)return Oi(e,t,s,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var c=r.dgst;return r=c,i=Error(u(419)),r=os(i,r,void 0),Oi(e,t,s,r)}if(c=(s&e.childLanes)!==0,kt||c){if(r=Ge,r!==null){switch(s&-s){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(r.suspendedLanes|s))!==0?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,yn(e,l),tn(r,e,l,-1))}return Ts(),r=os(Error(u(421))),Oi(e,t,s,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=pd.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,zt=On(l.nextSibling),Mt=t,Oe=!0,Zt=null,e!==null&&(It[At++]=vn,It[At++]=gn,It[At++]=rr,vn=e.id,gn=e.overflow,rr=t),t=ds(t,r.children),t.flags|=4096,t)}function Fa(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wo(e.return,t,n)}function ps(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function Da(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(ht(e,t,r.children,n),r=De.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&&Fa(e,n,t);else if(e.tag===19)Fa(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(Ce(De,r),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Pi(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ps(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Pi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ps(t,!0,n,null,i);break;case"together":ps(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fi(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Sn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ur|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function td(e,t,n){switch(t.tag){case 3:za(t),Br();break;case 5:Xu(t);break;case 1:St(t.type)&&gi(t);break;case 4:Ko(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;Ce(Ei,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ce(De,De.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Oa(e,t,n):(Ce(De,De.current&1),e=Sn(e,t,n),e!==null?e.sibling:null);Ce(De,De.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Da(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Ce(De,De.current),r)break;return null;case 22:case 23:return t.lanes=0,Ra(e,t,n)}return Sn(e,t,n)}var Ia,hs,Aa,Ua;Ia=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}},hs=function(){},Aa=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,or(ln.current);var i=null;switch(n){case"input":l=qn(e,l),r=qn(e,r),i=[];break;case"select":l=$({},l,{value:void 0}),r=$({},r,{value:void 0}),i=[];break;case"textarea":l=vr(e,l),r=vr(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=hi)}Zn(n,r);var s;n=null;for(S in l)if(!r.hasOwnProperty(S)&&l.hasOwnProperty(S)&&l[S]!=null)if(S==="style"){var c=l[S];for(s in c)c.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else S!=="dangerouslySetInnerHTML"&&S!=="children"&&S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&S!=="autoFocus"&&(p.hasOwnProperty(S)?i||(i=[]):(i=i||[]).push(S,null));for(S in r){var f=r[S];if(c=l!=null?l[S]:void 0,r.hasOwnProperty(S)&&f!==c&&(f!=null||c!=null))if(S==="style")if(c){for(s in c)!c.hasOwnProperty(s)||f&&f.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in f)f.hasOwnProperty(s)&&c[s]!==f[s]&&(n||(n={}),n[s]=f[s])}else n||(i||(i=[]),i.push(S,n)),n=f;else S==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,c=c?c.__html:void 0,f!=null&&c!==f&&(i=i||[]).push(S,f)):S==="children"?typeof f!="string"&&typeof f!="number"||(i=i||[]).push(S,""+f):S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&(p.hasOwnProperty(S)?(f!=null&&S==="onScroll"&&Pe("scroll",e),i||c===f||(i=[])):(i=i||[]).push(S,f))}n&&(i=i||[]).push("style",n);var S=i;(t.updateQueue=S)&&(t.flags|=4)}},Ua=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ol(e,t){if(!Oe)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 st(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function nd(e,t,n){var r=t.pendingProps;switch(Do(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return St(t.type)&&vi(),st(t),null;case 3:return r=t.stateNode,Kr(),Te(wt),Te(it),Go(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ki(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zt!==null&&(Cs(Zt),Zt=null))),hs(e,t),st(t),null;case 5:qo(t);var l=or(Rl.current);if(n=t.type,e!==null&&t.stateNode!=null)Aa(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(u(166));return st(t),null}if(e=or(ln.current),ki(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[rn]=t,r[_l]=i,e=(t.mode&1)!==0,n){case"dialog":Pe("cancel",r),Pe("close",r);break;case"iframe":case"object":case"embed":Pe("load",r);break;case"video":case"audio":for(l=0;l<kl.length;l++)Pe(kl[l],r);break;case"source":Pe("error",r);break;case"img":case"image":case"link":Pe("error",r),Pe("load",r);break;case"details":Pe("toggle",r);break;case"input":el(r,i),Pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Pe("invalid",r);break;case"textarea":tl(r,i),Pe("invalid",r)}Zn(n,i),l=null;for(var s in i)if(i.hasOwnProperty(s)){var c=i[s];s==="children"?typeof c=="string"?r.textContent!==c&&(i.suppressHydrationWarning!==!0&&pi(r.textContent,c,e),l=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(i.suppressHydrationWarning!==!0&&pi(r.textContent,c,e),l=["children",""+c]):p.hasOwnProperty(s)&&c!=null&&s==="onScroll"&&Pe("scroll",r)}switch(n){case"input":un(r),Ql(r,i,!0);break;case"textarea":un(r),Kl(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=hi)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=_n(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[rn]=t,e[_l]=r,Ia(e,t,!1,!1),t.stateNode=e;e:{switch(s=rl(n,r),n){case"dialog":Pe("cancel",e),Pe("close",e),l=r;break;case"iframe":case"object":case"embed":Pe("load",e),l=r;break;case"video":case"audio":for(l=0;l<kl.length;l++)Pe(kl[l],e);l=r;break;case"source":Pe("error",e),l=r;break;case"img":case"image":case"link":Pe("error",e),Pe("load",e),l=r;break;case"details":Pe("toggle",e),l=r;break;case"input":el(e,r),l=qn(e,r),Pe("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=$({},r,{value:void 0}),Pe("invalid",e);break;case"textarea":tl(e,r),l=vr(e,r),Pe("invalid",e);break;default:l=r}Zn(n,l),c=l;for(i in c)if(c.hasOwnProperty(i)){var f=c[i];i==="style"?Xn(e,f):i==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&yr(e,f)):i==="children"?typeof f=="string"?(n!=="textarea"||f!=="")&&Cn(e,f):typeof f=="number"&&Cn(e,""+f):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(p.hasOwnProperty(i)?f!=null&&i==="onScroll"&&Pe("scroll",e):f!=null&&je(e,i,f,s))}switch(n){case"input":un(e),Ql(e,r,!1);break;case"textarea":un(e),Kl(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ve(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?En(e,!!r.multiple,i,!1):r.defaultValue!=null&&En(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=hi)}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 st(t),null;case 6:if(e&&t.stateNode!=null)Ua(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(n=or(Rl.current),or(ln.current),ki(t)){if(r=t.stateNode,n=t.memoizedProps,r[rn]=t,(i=r.nodeValue!==n)&&(e=Mt,e!==null))switch(e.tag){case 3:pi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[rn]=t,t.stateNode=r}return st(t),null;case 13:if(Te(De),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Oe&&zt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Bu(),Br(),t.flags|=98560,i=!1;else if(i=ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[rn]=t}else Br(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),i=!1}else Zt!==null&&(Cs(Zt),Zt=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||(De.current&1)!==0?Qe===0&&(Qe=3):Ts())),t.updateQueue!==null&&(t.flags|=4),st(t),null);case 4:return Kr(),hs(e,t),e===null&&xl(t.stateNode.containerInfo),st(t),null;case 10:return Bo(t.type._context),st(t),null;case 17:return St(t.type)&&vi(),st(t),null;case 19:if(Te(De),i=t.memoizedState,i===null)return st(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Ol(i,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Pi(e),s!==null){for(t.flags|=128,Ol(i,!1),r=s.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,s=i.alternate,s===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=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ce(De,De.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ne()>Xr&&(t.flags|=128,r=!0,Ol(i,!1),t.lanes=4194304)}else{if(!r)if(e=Pi(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ol(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Oe)return st(t),null}else 2*Ne()-i.renderingStartTime>Xr&&n!==1073741824&&(t.flags|=128,r=!0,Ol(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ne(),t.sibling=null,n=De.current,Ce(De,r?n&1|2:n&1),t):(st(t),null);case 22:case 23:return Ps(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Lt&1073741824)!==0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function rd(e,t){switch(Do(t),t.tag){case 1:return St(t.type)&&vi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kr(),Te(wt),Te(it),Go(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return qo(t),null;case 13:if(Te(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(De),null;case 4:return Kr(),null;case 10:return Bo(t.type._context),null;case 22:case 23:return Ps(),null;case 24:return null;default:return null}}var Di=!1,ut=!1,ld=typeof WeakSet=="function"?WeakSet:Set,W=null;function Yr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ue(e,t,r)}else n.current=null}function ms(e,t,n){try{n()}catch(r){Ue(e,t,r)}}var Va=!1;function id(e,t){if(Po=ni,e=yu(),wo(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 l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,c=-1,f=-1,S=0,N=0,T=e,C=null;t:for(;;){for(var V;T!==n||l!==0&&T.nodeType!==3||(c=s+l),T!==i||r!==0&&T.nodeType!==3||(f=s+r),T.nodeType===3&&(s+=T.nodeValue.length),(V=T.firstChild)!==null;)C=T,T=V;for(;;){if(T===e)break t;if(C===n&&++S===l&&(c=s),C===i&&++N===r&&(f=s),(V=T.nextSibling)!==null)break;T=C,C=T.parentNode}T=V}n=c===-1||f===-1?null:{start:c,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(To={focusedElem:e,selectionRange:n},ni=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var H=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(H!==null){var Q=H.memoizedProps,Ve=H.memoizedState,m=t.stateNode,d=m.getSnapshotBeforeUpdate(t.elementType===t.type?Q:Jt(t.type,Q),Ve);m.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(j){Ue(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return H=Va,Va=!1,H}function Fl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ms(t,n,i)}l=l.next}while(l!==r)}}function Ii(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 vs(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 $a(e){var t=e.alternate;t!==null&&(e.alternate=null,$a(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[_l],delete t[zo],delete t[$f],delete t[Bf])),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 Ba(e){return e.tag===5||e.tag===3||e.tag===4}function Wa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ba(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 gs(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=hi));else if(r!==4&&(e=e.child,e!==null))for(gs(e,t,n),e=e.sibling;e!==null;)gs(e,t,n),e=e.sibling}function ys(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(ys(e,t,n),e=e.sibling;e!==null;)ys(e,t,n),e=e.sibling}var be=null,bt=!1;function Vn(e,t,n){for(n=n.child;n!==null;)Ha(e,t,n),n=n.sibling}function Ha(e,t,n){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(_r,n)}catch{}switch(n.tag){case 5:ut||Yr(n,t);case 6:var r=be,l=bt;be=null,Vn(e,t,n),be=r,bt=l,be!==null&&(bt?(e=be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):be.removeChild(n.stateNode));break;case 18:be!==null&&(bt?(e=be,n=n.stateNode,e.nodeType===8?Mo(e.parentNode,n):e.nodeType===1&&Mo(e,n),pl(e)):Mo(be,n.stateNode));break;case 4:r=be,l=bt,be=n.stateNode.containerInfo,bt=!0,Vn(e,t,n),be=r,bt=l;break;case 0:case 11:case 14:case 15:if(!ut&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&ms(n,t,s),l=l.next}while(l!==r)}Vn(e,t,n);break;case 1:if(!ut&&(Yr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Ue(n,t,c)}Vn(e,t,n);break;case 21:Vn(e,t,n);break;case 22:n.mode&1?(ut=(r=ut)||n.memoizedState!==null,Vn(e,t,n),ut=r):Vn(e,t,n);break;default:Vn(e,t,n)}}function Qa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ld),t.forEach(function(r){var l=hd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function en(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,s=t,c=s;e:for(;c!==null;){switch(c.tag){case 5:be=c.stateNode,bt=!1;break e;case 3:be=c.stateNode.containerInfo,bt=!0;break e;case 4:be=c.stateNode.containerInfo,bt=!0;break e}c=c.return}if(be===null)throw Error(u(160));Ha(i,s,l),be=null,bt=!1;var f=l.alternate;f!==null&&(f.return=null),l.return=null}catch(S){Ue(l,t,S)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ka(t,e),t=t.sibling}function Ka(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(en(t,e),sn(e),r&4){try{Fl(3,e,e.return),Ii(3,e)}catch(Q){Ue(e,e.return,Q)}try{Fl(5,e,e.return)}catch(Q){Ue(e,e.return,Q)}}break;case 1:en(t,e),sn(e),r&512&&n!==null&&Yr(n,n.return);break;case 5:if(en(t,e),sn(e),r&512&&n!==null&&Yr(n,n.return),e.flags&32){var l=e.stateNode;try{Cn(l,"")}catch(Q){Ue(e,e.return,Q)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,c=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{c==="input"&&i.type==="radio"&&i.name!=null&&mr(l,i),rl(c,s);var S=rl(c,i);for(s=0;s<f.length;s+=2){var N=f[s],T=f[s+1];N==="style"?Xn(l,T):N==="dangerouslySetInnerHTML"?yr(l,T):N==="children"?Cn(l,T):je(l,N,T,S)}switch(c){case"input":dt(l,i);break;case"textarea":Yn(l,i);break;case"select":var C=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var V=i.value;V!=null?En(l,!!i.multiple,V,!1):C!==!!i.multiple&&(i.defaultValue!=null?En(l,!!i.multiple,i.defaultValue,!0):En(l,!!i.multiple,i.multiple?[]:"",!1))}l[_l]=i}catch(Q){Ue(e,e.return,Q)}}break;case 6:if(en(t,e),sn(e),r&4){if(e.stateNode===null)throw Error(u(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(Q){Ue(e,e.return,Q)}}break;case 3:if(en(t,e),sn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pl(t.containerInfo)}catch(Q){Ue(e,e.return,Q)}break;case 4:en(t,e),sn(e);break;case 13:en(t,e),sn(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(ks=Ne())),r&4&&Qa(e);break;case 22:if(N=n!==null&&n.memoizedState!==null,e.mode&1?(ut=(S=ut)||N,en(t,e),ut=S):en(t,e),sn(e),r&8192){if(S=e.memoizedState!==null,(e.stateNode.isHidden=S)&&!N&&(e.mode&1)!==0)for(W=e,N=e.child;N!==null;){for(T=W=N;W!==null;){switch(C=W,V=C.child,C.tag){case 0:case 11:case 14:case 15:Fl(4,C,C.return);break;case 1:Yr(C,C.return);var H=C.stateNode;if(typeof H.componentWillUnmount=="function"){r=C,n=C.return;try{t=r,H.props=t.memoizedProps,H.state=t.memoizedState,H.componentWillUnmount()}catch(Q){Ue(r,n,Q)}}break;case 5:Yr(C,C.return);break;case 22:if(C.memoizedState!==null){Ga(T);continue}}V!==null?(V.return=C,W=V):Ga(T)}N=N.sibling}e:for(N=null,T=e;;){if(T.tag===5){if(N===null){N=T;try{l=T.stateNode,S?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(c=T.stateNode,f=T.memoizedProps.style,s=f!=null&&f.hasOwnProperty("display")?f.display:null,c.style.display=nl("display",s))}catch(Q){Ue(e,e.return,Q)}}}else if(T.tag===6){if(N===null)try{T.stateNode.nodeValue=S?"":T.memoizedProps}catch(Q){Ue(e,e.return,Q)}}else if((T.tag!==22&&T.tag!==23||T.memoizedState===null||T===e)&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===e)break e;for(;T.sibling===null;){if(T.return===null||T.return===e)break e;N===T&&(N=null),T=T.return}N===T&&(N=null),T.sibling.return=T.return,T=T.sibling}}break;case 19:en(t,e),sn(e),r&4&&Qa(e);break;case 21:break;default:en(t,e),sn(e)}}function sn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ba(n)){var r=n;break e}n=n.return}throw Error(u(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(Cn(l,""),r.flags&=-33);var i=Wa(e);ys(e,i,l);break;case 3:case 4:var s=r.stateNode.containerInfo,c=Wa(e);gs(e,c,s);break;default:throw Error(u(161))}}catch(f){Ue(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function od(e,t,n){W=e,qa(e)}function qa(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var l=W,i=l.child;if(l.tag===22&&r){var s=l.memoizedState!==null||Di;if(!s){var c=l.alternate,f=c!==null&&c.memoizedState!==null||ut;c=Di;var S=ut;if(Di=s,(ut=f)&&!S)for(W=l;W!==null;)s=W,f=s.child,s.tag===22&&s.memoizedState!==null?Xa(l):f!==null?(f.return=s,W=f):Xa(l);for(;i!==null;)W=i,qa(i),i=i.sibling;W=l,Di=c,ut=S}Ya(e)}else(l.subtreeFlags&8772)!==0&&i!==null?(i.return=l,W=i):Ya(e)}}function Ya(e){for(;W!==null;){var t=W;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ut||Ii(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ut)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Jt(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Gu(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Gu(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&n.focus();break;case"img":f.src&&(n.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var S=t.alternate;if(S!==null){var N=S.memoizedState;if(N!==null){var T=N.dehydrated;T!==null&&pl(T)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}ut||t.flags&512&&vs(t)}catch(C){Ue(t,t.return,C)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Ga(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function Xa(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ii(4,t)}catch(f){Ue(t,n,f)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(f){Ue(t,l,f)}}var i=t.return;try{vs(t)}catch(f){Ue(t,i,f)}break;case 5:var s=t.return;try{vs(t)}catch(f){Ue(t,s,f)}}}catch(f){Ue(t,t.return,f)}if(t===e){W=null;break}var c=t.sibling;if(c!==null){c.return=t.return,W=c;break}W=t.return}}var sd=Math.ceil,Ai=K.ReactCurrentDispatcher,ws=K.ReactCurrentOwner,$t=K.ReactCurrentBatchConfig,ge=0,Ge=null,Be=null,et=0,Lt=0,Gr=Fn(0),Qe=0,Dl=null,ur=0,Ui=0,Ss=0,Il=null,xt=null,ks=0,Xr=1/0,kn=null,Vi=!1,xs=null,$n=null,$i=!1,Bn=null,Bi=0,Al=0,Es=null,Wi=-1,Hi=0;function mt(){return(ge&6)!==0?Ne():Wi!==-1?Wi:Wi=Ne()}function Wn(e){return(e.mode&1)===0?1:(ge&2)!==0&&et!==0?et&-et:Hf.transition!==null?(Hi===0&&(Hi=fl()),Hi):(e=O,e!==0||(e=window.event,e=e===void 0?16:Js(e.type)),e)}function tn(e,t,n,r){if(50<Al)throw Al=0,Es=null,Error(u(185));x(e,n,r),((ge&2)===0||e!==Ge)&&(e===Ge&&((ge&2)===0&&(Ui|=n),Qe===4&&Hn(e,et)),Et(e,r),n===1&&ge===0&&(t.mode&1)===0&&(Xr=Ne()+500,yi&&In()))}function Et(e,t){var n=e.callbackNode;cl(e,t);var r=Tr(e,e===Ge?et:0);if(r===0)n!==null&&Yt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Yt(n),t===1)e.tag===0?Wf(Ja.bind(null,e)):Iu(Ja.bind(null,e)),Uf(function(){(ge&6)===0&&In()}),n=null;else{switch(z(r)){case 1:n=ul;break;case 4:n=Xl;break;case 16:n=Er;break;case 536870912:n=Jl;break;default:n=Er}n=oc(n,Za.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Za(e,t){if(Wi=-1,Hi=0,(ge&6)!==0)throw Error(u(327));var n=e.callbackNode;if(Zr()&&e.callbackNode!==n)return null;var r=Tr(e,e===Ge?et:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Qi(e,r);else{t=r;var l=ge;ge|=2;var i=ec();(Ge!==e||et!==t)&&(kn=null,Xr=Ne()+500,cr(e,t));do try{cd();break}catch(c){ba(e,c)}while(!0);$o(),Ai.current=i,ge=l,Be!==null?t=0:(Ge=null,et=0,t=Qe)}if(t!==0){if(t===2&&(l=jn(e),l!==0&&(r=l,t=_s(e,l))),t===1)throw n=Dl,cr(e,0),Hn(e,r),Et(e,Ne()),n;if(t===6)Hn(e,r);else{if(l=e.current.alternate,(r&30)===0&&!ud(l)&&(t=Qi(e,r),t===2&&(i=jn(e),i!==0&&(r=i,t=_s(e,i))),t===1))throw n=Dl,cr(e,0),Hn(e,r),Et(e,Ne()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(u(345));case 2:fr(e,xt,kn);break;case 3:if(Hn(e,r),(r&130023424)===r&&(t=ks+500-Ne(),10<t)){if(Tr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){mt(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=jo(fr.bind(null,e,xt,kn),t);break}fr(e,xt,kn);break;case 4:if(Hn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var s=31-qe(r);i=1<<s,s=t[s],s>l&&(l=s),r&=~i}if(r=l,r=Ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sd(r/1960))-r,10<r){e.timeoutHandle=jo(fr.bind(null,e,xt,kn),r);break}fr(e,xt,kn);break;case 5:fr(e,xt,kn);break;default:throw Error(u(329))}}}return Et(e,Ne()),e.callbackNode===n?Za.bind(null,e):null}function _s(e,t){var n=Il;return e.current.memoizedState.isDehydrated&&(cr(e,t).flags|=256),e=Qi(e,t),e!==2&&(t=xt,xt=n,t!==null&&Cs(t)),e}function Cs(e){xt===null?xt=e:xt.push.apply(xt,e)}function ud(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 l=n[r],i=l.getSnapshot;l=l.value;try{if(!Xt(i(),l))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 Hn(e,t){for(t&=~Ss,t&=~Ui,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-qe(t),r=1<<n;e[n]=-1,t&=~r}}function Ja(e){if((ge&6)!==0)throw Error(u(327));Zr();var t=Tr(e,0);if((t&1)===0)return Et(e,Ne()),null;var n=Qi(e,t);if(e.tag!==0&&n===2){var r=jn(e);r!==0&&(t=r,n=_s(e,r))}if(n===1)throw n=Dl,cr(e,0),Hn(e,t),Et(e,Ne()),n;if(n===6)throw Error(u(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fr(e,xt,kn),Et(e,Ne()),null}function Ns(e,t){var n=ge;ge|=1;try{return e(t)}finally{ge=n,ge===0&&(Xr=Ne()+500,yi&&In())}}function ar(e){Bn!==null&&Bn.tag===0&&(ge&6)===0&&Zr();var t=ge;ge|=1;var n=$t.transition,r=O;try{if($t.transition=null,O=1,e)return e()}finally{O=r,$t.transition=n,ge=t,(ge&6)===0&&In()}}function Ps(){Lt=Gr.current,Te(Gr)}function cr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Af(n)),Be!==null)for(n=Be.return;n!==null;){var r=n;switch(Do(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vi();break;case 3:Kr(),Te(wt),Te(it),Go();break;case 5:qo(r);break;case 4:Kr();break;case 13:Te(De);break;case 19:Te(De);break;case 10:Bo(r.type._context);break;case 22:case 23:Ps()}n=n.return}if(Ge=e,Be=e=Qn(e.current,null),et=Lt=t,Qe=0,Dl=null,Ss=Ui=ur=0,xt=Il=null,ir!==null){for(t=0;t<ir.length;t++)if(n=ir[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=l,r.next=s}n.pending=r}ir=null}return e}function ba(e,t){do{var n=Be;try{if($o(),Ti.current=zi,Ri){for(var r=Ie.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Ri=!1}if(sr=0,Ye=He=Ie=null,jl=!1,Ml=0,ws.current=null,n===null||n.return===null){Qe=1,Dl=t,Be=null;break}e:{var i=e,s=n.return,c=n,f=t;if(t=et,c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var S=f,N=c,T=N.tag;if((N.mode&1)===0&&(T===0||T===11||T===15)){var C=N.alternate;C?(N.updateQueue=C.updateQueue,N.memoizedState=C.memoizedState,N.lanes=C.lanes):(N.updateQueue=null,N.memoizedState=null)}var V=_a(s);if(V!==null){V.flags&=-257,Ca(V,s,c,i,t),V.mode&1&&Ea(i,S,t),t=V,f=S;var H=t.updateQueue;if(H===null){var Q=new Set;Q.add(f),t.updateQueue=Q}else H.add(f);break e}else{if((t&1)===0){Ea(i,S,t),Ts();break e}f=Error(u(426))}}else if(Oe&&c.mode&1){var Ve=_a(s);if(Ve!==null){(Ve.flags&65536)===0&&(Ve.flags|=256),Ca(Ve,s,c,i,t),Uo(qr(f,c));break e}}i=f=qr(f,c),Qe!==4&&(Qe=2),Il===null?Il=[i]:Il.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=ka(i,f,t);Yu(i,m);break e;case 1:c=f;var d=i.type,w=i.stateNode;if((i.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&($n===null||!$n.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var j=xa(i,c,t);Yu(i,j);break e}}i=i.return}while(i!==null)}nc(n)}catch(Y){t=Y,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function ec(){var e=Ai.current;return Ai.current=zi,e===null?zi:e}function Ts(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Ge===null||(ur&268435455)===0&&(Ui&268435455)===0||Hn(Ge,et)}function Qi(e,t){var n=ge;ge|=2;var r=ec();(Ge!==e||et!==t)&&(kn=null,cr(e,t));do try{ad();break}catch(l){ba(e,l)}while(!0);if($o(),ge=n,Ai.current=r,Be!==null)throw Error(u(261));return Ge=null,et=0,Qe}function ad(){for(;Be!==null;)tc(Be)}function cd(){for(;Be!==null&&!ro();)tc(Be)}function tc(e){var t=ic(e.alternate,e,Lt);e.memoizedProps=e.pendingProps,t===null?nc(e):Be=t,ws.current=null}function nc(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=nd(n,t,Lt),n!==null){Be=n;return}}else{if(n=rd(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,Be=null;return}}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);Qe===0&&(Qe=5)}function fr(e,t,n){var r=O,l=$t.transition;try{$t.transition=null,O=1,fd(e,t,n,r)}finally{$t.transition=l,O=r}return null}function fd(e,t,n,r){do Zr();while(Bn!==null);if((ge&6)!==0)throw Error(u(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(u(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(M(e,i),e===Ge&&(Be=Ge=null,et=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||$i||($i=!0,oc(Er,function(){return Zr(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=$t.transition,$t.transition=null;var s=O;O=1;var c=ge;ge|=4,ws.current=null,id(e,n),Ka(n,e),Mf(To),ni=!!Po,To=Po=null,e.current=n,od(n),lo(),ge=c,O=s,$t.transition=i}else e.current=n;if($i&&($i=!1,Bn=e,Bi=l),i=e.pendingLanes,i===0&&($n=null),al(n.stateNode),Et(e,Ne()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(Vi)throw Vi=!1,e=xs,xs=null,e;return(Bi&1)!==0&&e.tag!==0&&Zr(),i=e.pendingLanes,(i&1)!==0?e===Es?Al++:(Al=0,Es=e):Al=0,In(),null}function Zr(){if(Bn!==null){var e=z(Bi),t=$t.transition,n=O;try{if($t.transition=null,O=16>e?16:e,Bn===null)var r=!1;else{if(e=Bn,Bn=null,Bi=0,(ge&6)!==0)throw Error(u(331));var l=ge;for(ge|=4,W=e.current;W!==null;){var i=W,s=i.child;if((W.flags&16)!==0){var c=i.deletions;if(c!==null){for(var f=0;f<c.length;f++){var S=c[f];for(W=S;W!==null;){var N=W;switch(N.tag){case 0:case 11:case 15:Fl(8,N,i)}var T=N.child;if(T!==null)T.return=N,W=T;else for(;W!==null;){N=W;var C=N.sibling,V=N.return;if($a(N),N===S){W=null;break}if(C!==null){C.return=V,W=C;break}W=V}}}var H=i.alternate;if(H!==null){var Q=H.child;if(Q!==null){H.child=null;do{var Ve=Q.sibling;Q.sibling=null,Q=Ve}while(Q!==null)}}W=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,W=s;else e:for(;W!==null;){if(i=W,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Fl(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,W=m;break e}W=i.return}}var d=e.current;for(W=d;W!==null;){s=W;var w=s.child;if((s.subtreeFlags&2064)!==0&&w!==null)w.return=s,W=w;else e:for(s=d;W!==null;){if(c=W,(c.flags&2048)!==0)try{switch(c.tag){case 0:case 11:case 15:Ii(9,c)}}catch(Y){Ue(c,c.return,Y)}if(c===s){W=null;break e}var j=c.sibling;if(j!==null){j.return=c.return,W=j;break e}W=c.return}}if(ge=l,In(),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(_r,e)}catch{}r=!0}return r}finally{O=n,$t.transition=t}}return!1}function rc(e,t,n){t=qr(n,t),t=ka(e,t,1),e=Un(e,t,1),t=mt(),e!==null&&(x(e,1,t),Et(e,t))}function Ue(e,t,n){if(e.tag===3)rc(e,e,n);else for(;t!==null;){if(t.tag===3){rc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($n===null||!$n.has(r))){e=qr(n,e),e=xa(t,e,1),t=Un(t,e,1),e=mt(),t!==null&&(x(t,1,e),Et(t,e));break}}t=t.return}}function dd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=mt(),e.pingedLanes|=e.suspendedLanes&n,Ge===e&&(et&n)===n&&(Qe===4||Qe===3&&(et&130023424)===et&&500>Ne()-ks?cr(e,0):Ss|=n),Et(e,t)}function lc(e,t){t===0&&((e.mode&1)===0?t=1:(t=Pr,Pr<<=1,(Pr&130023424)===0&&(Pr=4194304)));var n=mt();e=yn(e,t),e!==null&&(x(e,t,n),Et(e,n))}function pd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lc(e,n)}function hd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),lc(e,n)}var ic;ic=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wt.current)kt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return kt=!1,td(e,t,n);kt=(e.flags&131072)!==0}else kt=!1,Oe&&(t.flags&1048576)!==0&&Au(t,Si,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fi(e,t),e=t.pendingProps;var l=Ur(t,it.current);Qr(t,n),l=Jo(null,t,r,e,l,n);var i=bo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,St(r)?(i=!0,gi(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Qo(t),l.updater=Li,t.stateNode=l,l._reactInternals=t,is(t,r,e,n),t=as(null,t,r,!0,i,n)):(t.tag=0,Oe&&i&&Fo(t),ht(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fi(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=vd(r),e=Jt(r,e),l){case 0:t=us(null,t,r,e,n);break e;case 1:t=Ma(null,t,r,e,n);break e;case 11:t=Na(null,t,r,e,n);break e;case 14:t=Pa(null,t,r,Jt(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Jt(r,l),us(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Jt(r,l),Ma(e,t,r,l,n);case 3:e:{if(za(t),e===null)throw Error(u(387));r=t.pendingProps,i=t.memoizedState,l=i.element,qu(e,t),Ni(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=qr(Error(u(423)),t),t=La(e,t,r,n,l);break e}else if(r!==l){l=qr(Error(u(424)),t),t=La(e,t,r,n,l);break e}else for(zt=On(t.stateNode.containerInfo.firstChild),Mt=t,Oe=!0,Zt=null,n=Qu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Br(),r===l){t=Sn(e,t,n);break e}ht(e,t,r,n)}t=t.child}return t;case 5:return Xu(t),e===null&&Ao(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,s=l.children,Ro(r,l)?s=null:i!==null&&Ro(r,i)&&(t.flags|=32),ja(e,t),ht(e,t,s,n),t.child;case 6:return e===null&&Ao(t),null;case 13:return Oa(e,t,n);case 4:return Ko(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wr(t,null,r,n):ht(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Jt(r,l),Na(e,t,r,l,n);case 7:return ht(e,t,t.pendingProps,n),t.child;case 8:return ht(e,t,t.pendingProps.children,n),t.child;case 12:return ht(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,s=l.value,Ce(Ei,r._currentValue),r._currentValue=s,i!==null)if(Xt(i.value,s)){if(i.children===l.children&&!wt.current){t=Sn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var c=i.dependencies;if(c!==null){s=i.child;for(var f=c.firstContext;f!==null;){if(f.context===r){if(i.tag===1){f=wn(-1,n&-n),f.tag=2;var S=i.updateQueue;if(S!==null){S=S.shared;var N=S.pending;N===null?f.next=f:(f.next=N.next,N.next=f),S.pending=f}}i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),Wo(i.return,n,t),c.lanes|=n;break}f=f.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(u(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Wo(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}ht(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Qr(t,n),l=Ut(l),r=r(l),t.flags|=1,ht(e,t,r,n),t.child;case 14:return r=t.type,l=Jt(r,t.pendingProps),l=Jt(r.type,l),Pa(e,t,r,l,n);case 15:return Ta(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Jt(r,l),Fi(e,t),t.tag=1,St(r)?(e=!0,gi(t)):e=!1,Qr(t,n),wa(t,r,l),is(t,r,l,n),as(null,t,r,!0,e,n);case 19:return Da(e,t,n);case 22:return Ra(e,t,n)}throw Error(u(156,t.tag))};function oc(e,t){return xr(e,t)}function md(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 Bt(e,t,n,r){return new md(e,t,n,r)}function Rs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vd(e){if(typeof e=="function")return Rs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===nt)return 11;if(e===ct)return 14}return 2}function Qn(e,t){var n=e.alternate;return n===null?(n=Bt(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 Ki(e,t,n,r,l,i){var s=2;if(r=e,typeof e=="function")Rs(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case le:return dr(n.children,l,i,t);case we:s=8,l|=8;break;case Me:return e=Bt(12,n,t,l|2),e.elementType=Me,e.lanes=i,e;case at:return e=Bt(13,n,t,l),e.elementType=at,e.lanes=i,e;case Ze:return e=Bt(19,n,t,l),e.elementType=Ze,e.lanes=i,e;case xe:return qi(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:s=10;break e;case ze:s=9;break e;case nt:s=11;break e;case ct:s=14;break e;case Ke:s=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=Bt(s,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function dr(e,t,n,r){return e=Bt(7,e,r,t),e.lanes=n,e}function qi(e,t,n,r){return e=Bt(22,e,r,t),e.elementType=xe,e.lanes=n,e.stateNode={isHidden:!1},e}function js(e,t,n){return e=Bt(6,e,null,t),e.lanes=n,e}function Ms(e,t,n){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gd(e,t,n,r,l){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=v(0),this.expirationTimes=v(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=v(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function zs(e,t,n,r,l,i,s,c,f){return e=new gd(e,t,n,c,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Bt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qo(i),e}function yd(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fe,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function sc(e){if(!e)return Dn;e=e._reactInternals;e:{if(fn(e)!==e||e.tag!==1)throw Error(u(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(St(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(u(171))}if(e.tag===1){var n=e.type;if(St(n))return Fu(e,n,t)}return t}function uc(e,t,n,r,l,i,s,c,f){return e=zs(n,r,!0,e,l,i,s,c,f),e.context=sc(null),n=e.current,r=mt(),l=Wn(n),i=wn(r,l),i.callback=t??null,Un(n,i,l),e.current.lanes=l,x(e,l,r),Et(e,r),e}function Yi(e,t,n,r){var l=t.current,i=mt(),s=Wn(l);return n=sc(n),t.context===null?t.context=n:t.pendingContext=n,t=wn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Un(l,t,s),e!==null&&(tn(e,l,s,i),Ci(e,l,s)),s}function Gi(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 ac(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ls(e,t){ac(e,t),(e=e.alternate)&&ac(e,t)}function wd(){return null}var cc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Os(e){this._internalRoot=e}Xi.prototype.render=Os.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));Yi(e,t,null,null)},Xi.prototype.unmount=Os.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ar(function(){Yi(null,e,null,null)}),t[hn]=null}};function Xi(e){this._internalRoot=e}Xi.prototype.unstable_scheduleHydration=function(e){if(e){var t=ke();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&t!==0&&t<Dt[n].priority;n++);Dt.splice(n,0,e),n===0&&We(e)}};function Fs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fc(){}function Sd(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var S=Gi(s);i.call(S)}}var s=uc(t,r,e,0,null,!1,!1,"",fc);return e._reactRootContainer=s,e[hn]=s.current,xl(e.nodeType===8?e.parentNode:e),ar(),s}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var c=r;r=function(){var S=Gi(f);c.call(S)}}var f=zs(e,0,!1,null,null,!1,!1,"",fc);return e._reactRootContainer=f,e[hn]=f.current,xl(e.nodeType===8?e.parentNode:e),ar(function(){Yi(t,f,n,r)}),f}function Ji(e,t,n,r,l){var i=n._reactRootContainer;if(i){var s=i;if(typeof l=="function"){var c=l;l=function(){var f=Gi(s);c.call(f)}}Yi(t,s,e,l)}else s=Sd(n,t,e,l,r);return Gi(s)}oe=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=er(t.pendingLanes);n!==0&&(L(t,n|1),Et(t,Ne()),(ge&6)===0&&(Xr=Ne()+500,In()))}break;case 13:ar(function(){var r=yn(e,1);if(r!==null){var l=mt();tn(r,e,1,l)}}),Ls(e,1)}},Se=function(e){if(e.tag===13){var t=yn(e,134217728);if(t!==null){var n=mt();tn(t,e,134217728,n)}Ls(e,134217728)}},Fe=function(e){if(e.tag===13){var t=Wn(e),n=yn(e,t);if(n!==null){var r=mt();tn(n,e,t,r)}Ls(e,t)}},ke=function(){return O},rt=function(e,t){var n=O;try{return O=e,t()}finally{O=n}},Pn=function(e,t,n){switch(t){case"input":if(dt(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 l=mi(r);if(!l)throw Error(u(90));Hl(r),dt(r,l)}}}break;case"textarea":Yn(e,n);break;case"select":t=n.value,t!=null&&En(e,!!n.multiple,t,!1)}},Ct=Ns,Ot=ar;var kd={usingClientEntryPoint:!1,Events:[Cl,Ir,mi,ol,Kt,Ns]},Ul={findFiberByHostInstance:tr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xd={bundleType:Ul.bundleType,version:Ul.version,rendererPackageName:Ul.rendererPackageName,rendererConfig:Ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:K.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Gl(e),e===null?null:e.stateNode},findFiberByHostInstance:Ul.findFiberByHostInstance||wd,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 bi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bi.isDisabled&&bi.supportsFiber)try{_r=bi.inject(xd),Ft=bi}catch{}}return _t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kd,_t.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fs(t))throw Error(u(200));return yd(e,t,null,n)},_t.createRoot=function(e,t){if(!Fs(e))throw Error(u(299));var n=!1,r="",l=cc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=zs(e,1,!1,null,null,n,!1,r,l),e[hn]=t.current,xl(e.nodeType===8?e.parentNode:e),new Os(t)},_t.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(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=Gl(t),e=e===null?null:e.stateNode,e},_t.flushSync=function(e){return ar(e)},_t.hydrate=function(e,t,n){if(!Zi(t))throw Error(u(200));return Ji(null,e,t,!0,n)},_t.hydrateRoot=function(e,t,n){if(!Fs(e))throw Error(u(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",s=cc;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=uc(t,null,e,1,n??null,l,!1,i,s),e[hn]=t.current,xl(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Xi(t)},_t.render=function(e,t,n){if(!Zi(t))throw Error(u(200));return Ji(null,e,t,!1,n)},_t.unmountComponentAtNode=function(e){if(!Zi(e))throw Error(u(40));return e._reactRootContainer?(ar(function(){Ji(null,null,e,!1,function(){e._reactRootContainer=null,e[hn]=null})}),!0):!1},_t.unstable_batchedUpdates=Ns,_t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zi(n))throw Error(u(200));if(e==null||e._reactInternals===void 0)throw Error(u(38));return Ji(e,t,n,!1,r)},_t.version="18.3.1-next-f1338f8080-20240426",_t}var wc;function zd(){if(wc)return As.exports;wc=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(o){console.error(o)}}return a(),As.exports=Md(),As.exports}var Sc;function Ld(){if(Sc)return eo;Sc=1;var a=zd();return eo.createRoot=a.createRoot,eo.hydrateRoot=a.hydrateRoot,eo}var Od=Ld();const Fd="modulepreload",Dd=function(a){return"/"+a},kc={},zc=function(o,u,y){let p=Promise.resolve();if(u&&u.length>0){let k=function(I){return Promise.all(I.map(Z=>Promise.resolve(Z).then(B=>({status:"fulfilled",value:B}),B=>({status:"rejected",reason:B}))))};document.getElementsByTagName("link");const R=document.querySelector("meta[property=csp-nonce]"),A=(R==null?void 0:R.nonce)||(R==null?void 0:R.getAttribute("nonce"));p=k(u.map(I=>{if(I=Dd(I),I in kc)return;kc[I]=!0;const Z=I.endsWith(".css"),B=Z?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${I}"]${B}`))return;const D=document.createElement("link");if(D.rel=Z?"stylesheet":Fd,Z||(D.as="script"),D.crossOrigin="",D.href=I,A&&D.setAttribute("nonce",A),document.head.appendChild(D),Z)return new Promise((G,J)=>{D.addEventListener("load",G),D.addEventListener("error",()=>J(new Error(`Unable to preload CSS for ${I}`)))})}))}function E(k){const R=new Event("vite:preloadError",{cancelable:!0});if(R.payload=k,window.dispatchEvent(R),!R.defaultPrevented)throw k}return p.then(k=>{for(const R of k||[])R.status==="rejected"&&E(R.reason);return o().catch(E)})};var P=Ys();function xc(a){return[...a.toLocaleLowerCase().matchAll(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu)].map(o=>({value:o[0],start:o.index??0}))}function $s(a,o){if(!o.length||o.length>a.length)return!1;for(let u=0;u<=a.length-o.length;u++)if(o.every((y,p)=>a[u+p]===y))return!0;return!1}function Id(a,o){const u=a.trim(),y=xc(u),p=xc(o).map(({value:R})=>R),E=y.map(({value:R})=>R);if(E.join(" ")==="it seems like"&&$s(p,E))return"";if(y.length<5||p.length<5)return u;if($s(p,E))return"";for(let R=y.length-1;R>=5;R--)if($s(p,E.slice(0,R)))return u.slice(y[R].start).replace(/^[\s,.;:!?—-]+/u,"").trim();return u}class Ad{constructor(o,u,y=()=>{},p=()=>{}){X(this,"recordings",[]);X(this,"transcripts",[]);X(this,"hearing",!1);X(this,"pumpingEpoch",null);X(this,"active",null);X(this,"epoch",0);X(this,"transcribe");X(this,"send");X(this,"report");X(this,"changed");this.transcribe=o,this.send=u,this.report=y,this.changed=p}get busy(){return this.pumpingEpoch!==null||this.recordings.length>0||this.transcripts.length>0}speechStarted(){this.hearing=!0,this.changed()}speechEnded(o){this.hearing=!1,this.recordings.push(o),this.changed(),this.pump()}speechDiscarded(){this.hearing=!1,this.changed(),this.pump()}reset(){var o;this.epoch++,(o=this.active)==null||o.abort(),this.active=null,this.recordings=[],this.transcripts=[],this.hearing=!1,this.pumpingEpoch=null,this.changed()}pump(){const o=this.epoch;this.pumpingEpoch!==o&&(this.pumpingEpoch=o,this.changed(),(async()=>{try{for(;this.recordings.length&&o===this.epoch;){const y=this.recordings.shift(),p=new AbortController;this.active=p;try{const E=(await this.transcribe(y,p.signal)).trim();o===this.epoch&&E&&this.transcripts.push(E)}catch(E){if(o===this.epoch&&!p.signal.aborted)throw E}finally{this.active===p&&(this.active=null),o===this.epoch&&this.changed()}}if(o!==this.epoch||this.hearing||this.recordings.length||!this.transcripts.length)return;const u=this.transcripts.join(" ").trim();this.transcripts=[],this.changed(),u&&await this.send(u)}catch(u){o===this.epoch&&this.report(u)}finally{this.pumpingEpoch===o&&(this.pumpingEpoch=null,this.changed(),o===this.epoch&&!this.hearing&&(this.recordings.length||this.transcripts.length)&&this.pump())}})())}}const Ud=2e3;class Vd{constructor(o=Ud){X(this,"tail",Promise.resolve());X(this,"_active",!1);X(this,"_flushing",!1);X(this,"epoch",0);X(this,"timeoutMs");X(this,"invalid",new WeakSet);this.timeoutMs=o}get acceptsCallbacks(){return this._active||this._flushing}pause(o){if(this.invalid.has(o))return Promise.reject(new Error("VAD transition is invalidated."));const u=this.epoch;return this._active=!1,this.enqueue(async()=>{u===this.epoch&&await this.withTimeout(o,o.pause(),"pause")})}start(o){if(this.invalid.has(o))return Promise.reject(new Error("VAD transition is invalidated."));const u=this.epoch;return this.enqueue(async()=>{u===this.epoch&&(await this.withTimeout(o,o.start(),"start"),u===this.epoch&&(this._active=!0))})}flush(o){if(this.invalid.has(o))return Promise.reject(new Error("VAD transition is invalidated."));const u=this.epoch;return this.enqueue(async()=>{if(u===this.epoch){this._flushing=!0;try{await this.withTimeout(o,o.pause(),"pause"),await this.withTimeout(o,o.start(),"start"),u===this.epoch&&(this._active=!0)}finally{u===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(o){return this.invalid.has(o)}enqueue(o){const u=this.tail.then(o,o);return this.tail=u.catch(()=>{}),u}withTimeout(o,u,y){return new Promise((p,E)=>{const k=globalThis.setTimeout(()=>{this.invalidate(o),E(new Error(`VAD ${y} timed out.`))},this.timeoutMs);u.then(()=>{globalThis.clearTimeout(k),p()},R=>{globalThis.clearTimeout(k),E(R)})})}invalidate(o){this.invalid.add(o),this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}}function $d(a,o,u,y,p,E){return a===o&&u===y&&!p&&E}const Bd=350;class Wd{constructor(o,u){X(this,"preRoll",[]);X(this,"current",null);X(this,"segments",new Set);X(this,"ended",new WeakMap);X(this,"request");X(this,"preview");this.request=o,this.preview=u}frame(o,u){const y=u.slice(),p=this.current;if(!p){this.preRoll.push(y),this.preRoll.length>14&&this.preRoll.shift();return}p.frames.push(y),o>=.35?(p.revision++,p.quiet=0):p.quiet++,p.confirmed&&!p.pending&&p.requested!==p.revision&&(p.quiet>=6||p.frames.length-p.lastRequest>=63)&&this.speculate(p)}begin(){const o={frames:this.preRoll,revision:1,quiet:0,confirmed:!1,requested:-1,lastRequest:0,controller:new AbortController};this.preRoll=[],this.current=o,this.segments.add(o),this.preview("")}confirm(){this.current&&(this.current.confirmed=!0)}end(o){this.current&&this.ended.set(o,this.current),this.current=null,this.preRoll=[]}async finish(o,u){var E;const y=this.ended.get(o);if(this.ended.delete(o),!y)return this.request(o,u);const p=()=>y.controller.abort(u.reason);u.addEventListener("abort",p,{once:!0}),u.aborted&&p();try{const k=y.pending;return k&&!await Hd(k,Bd,u)&&y.controller.abort(new DOMException("Speculative transcription timed out.","AbortError")),u.throwIfAborted(),((E=y.result)==null?void 0:E.revision)===y.revision&&y.result.text.trim()?y.result.text:await this.request(o,u)}finally{u.removeEventListener("abort",p),this.segments.delete(y)}}discard(){this.current&&(this.current.controller.abort(),this.segments.delete(this.current)),this.current=null,this.preRoll=[],this.preview("")}reset(){for(const o of this.segments)o.controller.abort();this.segments.clear(),this.ended=new WeakMap,this.discard()}samples(o){const u=new Float32Array(o.frames.reduce((p,E)=>p+E.length,0));let y=0;for(const p of o.frames)u.set(p,y),y+=p.length;return u}speculate(o){const u=o.revision;o.requested=u,o.lastRequest=o.frames.length,o.pending=this.request(this.samples(o),o.controller.signal).then(y=>{o.controller.signal.aborted||(o.result={revision:u,text:y},this.current===o&&this.preview(y))}).catch(()=>{}).finally(()=>{o.pending=void 0})}}function Hd(a,o,u){return new Promise((y,p)=>{if(u.aborted)return p(u.reason);const E=globalThis.setTimeout(A,o),k=()=>{I(),p(u.reason)},R=()=>{I(),y(!0)};function A(){I(),y(!1)}function I(){globalThis.clearTimeout(E),u.removeEventListener("abort",k)}u.addEventListener("abort",k,{once:!0}),a.then(R,R)})}class Qd{constructor(){X(this,"mode","idle");X(this,"interruptOnConfirm",!1)}speechStart(o){return this.mode="candidate",this.interruptOnConfirm=o,{duck:o,begin:!0,accepted:!1}}speechRealStart(){return this.mode==="candidate"?(this.mode="accepted",{interrupt:this.interruptOnConfirm,begin:!1,accepted:!0}):{interrupt:!1,begin:!1,accepted:this.mode==="accepted"}}speechEnd(){const o=this.mode==="accepted";return this.reset(),o}reset(){this.mode="idle",this.interruptOnConfirm=!1}}function Ec(a,o,u,y){return async p=>{p.throwIfAborted();const E=o.createAnalyser();E.fftSize=128,E.connect(u);const k=o.createBufferSource();k.buffer=a,k.connect(E),await new Promise((R,A)=>{const I=()=>{k.onended=null;try{k.stop()}catch{}k.disconnect(),E.disconnect(),A(p.reason)};k.onended=()=>{p.removeEventListener("abort",I),k.disconnect(),E.disconnect(),R()},p.addEventListener("abort",I,{once:!0}),k.start(),y(E),p.aborted&&I()})}}class Kd{constructor(o,u,y){X(this,"run",this.fresh());X(this,"synthesize");X(this,"changed");X(this,"reportError");this.synthesize=o,this.changed=u,this.reportError=y}get busy(){const o=this.run;return o.generating||o.playing||o.text.length>0||o.audio.length>0}enqueue(o){this.run.text.push(...o),this.pump(this.run)}cancel(){const o=this.run;this.run=this.fresh(),o.text=[],o.audio=[],o.controller.abort(),this.changed()}fresh(){return{controller:new AbortController,text:[],audio:[],hasDispatchedSpeech:!1,generating:!1,playing:!1}}fail(o,u){o!==this.run||o.controller.signal.aborted||(this.cancel(),this.reportError(u))}pump(o){if(o!==this.run||o.controller.signal.aborted)return;const u=o.controller.signal;if(!o.playing&&o.audio.length){const y=o.audio.shift();o.playing=!0,(async()=>{try{await y(u)}catch(p){this.fail(o,p)}finally{o.playing=!1,o===this.run&&this.pump(o)}})()}if(!o.generating&&o.audio.length<2&&o.text.length){let y=o.text.shift();if(o.hasDispatchedSpeech)for(;o.text.length&&y.length+o.text[0].length+1<=600;)y+=` ${o.text.shift()}`;o.hasDispatchedSpeech=!0,o.generating=!0,(async()=>{try{const p=await this.synthesize(y,u);o===this.run&&!u.aborted&&(o.audio.push(p),this.pump(o)),await p.completed}catch(p){this.fail(o,p)}finally{o.generating=!1,o===this.run&&this.pump(o)}})()}this.changed()}}const Lc=.45,Oc=.3,Fc=160,Dc=320,Ic=1e3,qd={positiveSpeechThreshold:Lc,negativeSpeechThreshold:Oc,minSpeechMs:Fc,preSpeechPadMs:Dc,redemptionMs:Ic},Ws=512,Hs=16e3,Yd=2e4,Gd={frameSamples:Ws,sampleRate:Hs,positiveSpeechThreshold:Lc,negativeSpeechThreshold:Oc,minSpeechMs:Fc,redemptionMs:Ic,preSpeechPadMs:Dc,maxSpeechMs:Yd,noiseFloorWindowFrames:100,noiseFloorPercentile:.3,noiseFloorMarginDb:6,noiseFloorRangeDb:24,minFloorRms:.0015,submitUserSpeechOnPause:!1};function Xd(a){let o=0;for(let u=0;u<a.length;u++)o+=a[u]*a[u];return Math.sqrt(o/Math.max(1,a.length))}function _c(a){return 20*Math.log10(Math.max(a,1e-8))}function Zd(a){return Math.min(1,Math.max(0,a))}function Jd(a){const o=a.reduce((p,E)=>p+E.length,0),u=new Float32Array(o);let y=0;for(const p of a)u.set(p,y),y+=p.length;return u}class bd{constructor(o={}){X(this,"options");X(this,"msPerFrame");X(this,"minSpeechFrames",1);X(this,"redemptionFrames",1);X(this,"preSpeechPadFrames",0);X(this,"maxSpeechFrames",1);X(this,"state","silence");X(this,"ring",[]);X(this,"recorded",[]);X(this,"activeFrames",0);X(this,"silenceFrames",0);X(this,"noiseFloorSamples",[]);X(this,"active",!0);this.options={...Gd,...o},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(o){this.options={...this.options,...o},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 o=[];return this.state==="speech"?o.push({type:"speech-end",samples:Jd(this.recorded)}):this.state==="maybe"&&o.push({type:"misfire"}),this.reset(),o}process(o){if(!this.active)return{probability:0,events:[]};const u=Xd(o);this.state==="silence"&&this.pushNoiseFloorSample(u);const y=this.estimateNoiseFloor(),p=Zd((_c(u)-_c(y)-this.options.noiseFloorMarginDb)/this.options.noiseFloorRangeDb),E=[];if(this.state==="silence")return this.pushRing(o),p>=this.options.positiveSpeechThreshold&&(this.state="maybe",this.recorded=[...this.ring],this.activeFrames=1,this.silenceFrames=0,E.push({type:"speech-start"})),{probability:p,events:E};this.recorded.push(o),p>=this.options.negativeSpeechThreshold?(this.silenceFrames=0,this.activeFrames++,this.state==="maybe"&&this.activeFrames>=this.minSpeechFrames&&(this.state="speech",E.push({type:"speech-real-start"}))):this.silenceFrames++;const R=this.recorded.length>=this.maxSpeechFrames,A=this.silenceFrames>=this.redemptionFrames;return(R||A)&&E.push(...this.endSegment()),{probability:p,events:E}}pushRing(o){this.ring.push(o),this.ring.length>this.preSpeechPadFrames&&this.ring.shift()}pushNoiseFloorSample(o){this.noiseFloorSamples.push(o),this.noiseFloorSamples.length>this.options.noiseFloorWindowFrames&&this.noiseFloorSamples.shift()}estimateNoiseFloor(){if(this.noiseFloorSamples.length===0)return this.options.minFloorRms;const o=[...this.noiseFloorSamples].sort((y,p)=>y-p),u=Math.min(o.length-1,Math.floor(o.length*this.options.noiseFloorPercentile));return Math.max(this.options.minFloorRms,o[u])}}class ep{constructor(o,u,y){X(this,"inputBuffer",[]);this.nativeSampleRate=o,this.targetSampleRate=u,this.targetFrameSize=y}process(o){const u=[];for(const y of o)for(this.inputBuffer.push(y);this.hasEnoughDataForFrame();)u.push(this.generateOutputFrame());return u}hasEnoughDataForFrame(){return this.inputBuffer.length*this.targetSampleRate/this.nativeSampleRate>=this.targetFrameSize}generateOutputFrame(){const o=new Float32Array(this.targetFrameSize);let u=0,y=0;for(;u<this.targetFrameSize;){let p=0,E=0;const k=Math.min(this.inputBuffer.length,(u+1)*this.nativeSampleRate/this.targetSampleRate);for(;y<k;){const R=this.inputBuffer[y];R!==void 0&&(p+=R,E++),y++}o[u]=E>0?p/E:0,u++}return this.inputBuffer=this.inputBuffer.slice(y),o}}const tp=`
41
+ `+i.stack}return{value:e,source:t,stack:l,digest:null}}function os(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ss(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Jf=typeof WeakMap=="function"?WeakMap:Map;function ka(e,t,n){n=wn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vi||(Vi=!0,xs=r),ss(e,t)},n}function xa(e,t,n){n=wn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ss(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ss(e,t),typeof r!="function"&&($n===null?$n=new Set([this]):$n.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Ea(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Jf;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=dd.bind(null,e,t,n),t.then(e,e))}function _a(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 Ca(e,t,n,r,l){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,Un(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var bf=K.ReactCurrentOwner,kt=!1;function ht(e,t,n,r){t.child=e===null?Qu(t,null,n,r):Wr(t,e.child,n,r)}function Na(e,t,n,r,l){n=n.render;var i=t.ref;return Qr(t,l),r=Jo(e,t,n,r,i,l),n=bo(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Sn(e,t,l)):(Oe&&n&&Fo(t),t.flags|=1,ht(e,t,r,l),t.child)}function Pa(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Rs(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Ta(e,t,i,r,l)):(e=Ki(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&l)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:wl,n(s,r)&&e.ref===t.ref)return Sn(e,t,l)}return t.flags|=1,e=Qn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Ta(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(wl(i,r)&&e.ref===t.ref)if(kt=!1,t.pendingProps=r=i,(e.lanes&l)!==0)(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,Sn(e,t,l)}return us(e,t,n,r,l)}function Ra(e,t,n){var r=t.pendingProps,l=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},Ce(Gr,Lt),Lt|=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,Ce(Gr,Lt),Lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ce(Gr,Lt),Lt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ce(Gr,Lt),Lt|=r;return ht(e,t,l,n),t.child}function ja(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function us(e,t,n,r,l){var i=St(n)?nr:it.current;return i=Ur(t,i),Qr(t,l),n=Jo(e,t,n,r,i,l),r=bo(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Sn(e,t,l)):(Oe&&r&&Fo(t),t.flags|=1,ht(e,t,n,l),t.child)}function Ma(e,t,n,r,l){if(St(n)){var i=!0;gi(t)}else i=!1;if(Qr(t,l),t.stateNode===null)Fi(e,t),wa(t,n,r),is(t,n,r,l),r=!0;else if(e===null){var s=t.stateNode,c=t.memoizedProps;s.props=c;var f=s.context,S=n.contextType;typeof S=="object"&&S!==null?S=Ut(S):(S=St(n)?nr:it.current,S=Ur(t,S));var N=n.getDerivedStateFromProps,T=typeof N=="function"||typeof s.getSnapshotBeforeUpdate=="function";T||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(c!==r||f!==S)&&Sa(t,s,r,S),An=!1;var C=t.memoizedState;s.state=C,Ni(t,r,s,l),f=t.memoizedState,c!==r||C!==f||wt.current||An?(typeof N=="function"&&(ls(t,n,N,r),f=t.memoizedState),(c=An||ya(t,n,c,r,C,f,S))?(T||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=S,r=c):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,qu(e,t),c=t.memoizedProps,S=t.type===t.elementType?c:Jt(t.type,c),s.props=S,T=t.pendingProps,C=s.context,f=n.contextType,typeof f=="object"&&f!==null?f=Ut(f):(f=St(n)?nr:it.current,f=Ur(t,f));var V=n.getDerivedStateFromProps;(N=typeof V=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(c!==T||C!==f)&&Sa(t,s,r,f),An=!1,C=t.memoizedState,s.state=C,Ni(t,r,s,l);var H=t.memoizedState;c!==T||C!==H||wt.current||An?(typeof V=="function"&&(ls(t,n,V,r),H=t.memoizedState),(S=An||ya(t,n,S,r,C,H,f)||!1)?(N||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,H,f),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,H,f)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||c===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=H),s.props=r,s.state=H,s.context=f,r=S):(typeof s.componentDidUpdate!="function"||c===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),r=!1)}return as(e,t,n,r,i,l)}function as(e,t,n,r,l,i){ja(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return l&&Du(t,n,!1),Sn(e,t,i);r=t.stateNode,bf.current=t;var c=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Wr(t,e.child,null,i),t.child=Wr(t,null,c,i)):ht(e,t,c,i),t.memoizedState=r.state,l&&Du(t,n,!0),t.child}function za(e){var t=e.stateNode;t.pendingContext?Ou(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ou(e,t.context,!1),Ko(e,t.containerInfo)}function La(e,t,n,r,l){return Br(),Uo(l),t.flags|=256,ht(e,t,n,r),t.child}var cs={dehydrated:null,treeContext:null,retryLane:0};function fs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oa(e,t,n){var r=t.pendingProps,l=De.current,i=!1,s=(t.flags&128)!==0,c;if((c=s)||(c=e!==null&&e.memoizedState===null?!1:(l&2)!==0),c?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),Ce(De,l&1),e===null)return Ao(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):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=qi(s,r,0,null),e=dr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=fs(n),t.memoizedState=cs,e):ds(t,s));if(l=e.memoizedState,l!==null&&(c=l.dehydrated,c!==null))return ed(e,t,s,r,c,l,n);if(i){i=r.fallback,s=t.mode,l=e.child,c=l.sibling;var f={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=Qn(l,f),r.subtreeFlags=l.subtreeFlags&14680064),c!==null?i=Qn(c,i):(i=dr(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?fs(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=cs,r}return i=e.child,e=i.sibling,r=Qn(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 ds(e,t){return t=qi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Oi(e,t,n,r){return r!==null&&Uo(r),Wr(t,e.child,null,n),e=ds(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ed(e,t,n,r,l,i,s){if(n)return t.flags&256?(t.flags&=-257,r=os(Error(u(422))),Oi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=qi({mode:"visible",children:r.children},l,0,null),i=dr(i,l,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Wr(t,e.child,null,s),t.child.memoizedState=fs(s),t.memoizedState=cs,i);if((t.mode&1)===0)return Oi(e,t,s,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var c=r.dgst;return r=c,i=Error(u(419)),r=os(i,r,void 0),Oi(e,t,s,r)}if(c=(s&e.childLanes)!==0,kt||c){if(r=Ge,r!==null){switch(s&-s){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(r.suspendedLanes|s))!==0?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,yn(e,l),tn(r,e,l,-1))}return Ts(),r=os(Error(u(421))),Oi(e,t,s,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=pd.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,zt=On(l.nextSibling),Mt=t,Oe=!0,Zt=null,e!==null&&(It[At++]=vn,It[At++]=gn,It[At++]=rr,vn=e.id,gn=e.overflow,rr=t),t=ds(t,r.children),t.flags|=4096,t)}function Fa(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wo(e.return,t,n)}function ps(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function Da(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(ht(e,t,r.children,n),r=De.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&&Fa(e,n,t);else if(e.tag===19)Fa(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(Ce(De,r),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Pi(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ps(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Pi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ps(t,!0,n,null,i);break;case"together":ps(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fi(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Sn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ur|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function td(e,t,n){switch(t.tag){case 3:za(t),Br();break;case 5:Xu(t);break;case 1:St(t.type)&&gi(t);break;case 4:Ko(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;Ce(Ei,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ce(De,De.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Oa(e,t,n):(Ce(De,De.current&1),e=Sn(e,t,n),e!==null?e.sibling:null);Ce(De,De.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Da(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Ce(De,De.current),r)break;return null;case 22:case 23:return t.lanes=0,Ra(e,t,n)}return Sn(e,t,n)}var Ia,hs,Aa,Ua;Ia=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}},hs=function(){},Aa=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,or(ln.current);var i=null;switch(n){case"input":l=qn(e,l),r=qn(e,r),i=[];break;case"select":l=$({},l,{value:void 0}),r=$({},r,{value:void 0}),i=[];break;case"textarea":l=vr(e,l),r=vr(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=hi)}Zn(n,r);var s;n=null;for(S in l)if(!r.hasOwnProperty(S)&&l.hasOwnProperty(S)&&l[S]!=null)if(S==="style"){var c=l[S];for(s in c)c.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else S!=="dangerouslySetInnerHTML"&&S!=="children"&&S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&S!=="autoFocus"&&(p.hasOwnProperty(S)?i||(i=[]):(i=i||[]).push(S,null));for(S in r){var f=r[S];if(c=l!=null?l[S]:void 0,r.hasOwnProperty(S)&&f!==c&&(f!=null||c!=null))if(S==="style")if(c){for(s in c)!c.hasOwnProperty(s)||f&&f.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in f)f.hasOwnProperty(s)&&c[s]!==f[s]&&(n||(n={}),n[s]=f[s])}else n||(i||(i=[]),i.push(S,n)),n=f;else S==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,c=c?c.__html:void 0,f!=null&&c!==f&&(i=i||[]).push(S,f)):S==="children"?typeof f!="string"&&typeof f!="number"||(i=i||[]).push(S,""+f):S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&(p.hasOwnProperty(S)?(f!=null&&S==="onScroll"&&Pe("scroll",e),i||c===f||(i=[])):(i=i||[]).push(S,f))}n&&(i=i||[]).push("style",n);var S=i;(t.updateQueue=S)&&(t.flags|=4)}},Ua=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ol(e,t){if(!Oe)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 st(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function nd(e,t,n){var r=t.pendingProps;switch(Do(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return St(t.type)&&vi(),st(t),null;case 3:return r=t.stateNode,Kr(),Te(wt),Te(it),Go(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ki(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zt!==null&&(Cs(Zt),Zt=null))),hs(e,t),st(t),null;case 5:qo(t);var l=or(Rl.current);if(n=t.type,e!==null&&t.stateNode!=null)Aa(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(u(166));return st(t),null}if(e=or(ln.current),ki(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[rn]=t,r[_l]=i,e=(t.mode&1)!==0,n){case"dialog":Pe("cancel",r),Pe("close",r);break;case"iframe":case"object":case"embed":Pe("load",r);break;case"video":case"audio":for(l=0;l<kl.length;l++)Pe(kl[l],r);break;case"source":Pe("error",r);break;case"img":case"image":case"link":Pe("error",r),Pe("load",r);break;case"details":Pe("toggle",r);break;case"input":el(r,i),Pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Pe("invalid",r);break;case"textarea":tl(r,i),Pe("invalid",r)}Zn(n,i),l=null;for(var s in i)if(i.hasOwnProperty(s)){var c=i[s];s==="children"?typeof c=="string"?r.textContent!==c&&(i.suppressHydrationWarning!==!0&&pi(r.textContent,c,e),l=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(i.suppressHydrationWarning!==!0&&pi(r.textContent,c,e),l=["children",""+c]):p.hasOwnProperty(s)&&c!=null&&s==="onScroll"&&Pe("scroll",r)}switch(n){case"input":un(r),Ql(r,i,!0);break;case"textarea":un(r),Kl(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=hi)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=_n(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[rn]=t,e[_l]=r,Ia(e,t,!1,!1),t.stateNode=e;e:{switch(s=rl(n,r),n){case"dialog":Pe("cancel",e),Pe("close",e),l=r;break;case"iframe":case"object":case"embed":Pe("load",e),l=r;break;case"video":case"audio":for(l=0;l<kl.length;l++)Pe(kl[l],e);l=r;break;case"source":Pe("error",e),l=r;break;case"img":case"image":case"link":Pe("error",e),Pe("load",e),l=r;break;case"details":Pe("toggle",e),l=r;break;case"input":el(e,r),l=qn(e,r),Pe("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=$({},r,{value:void 0}),Pe("invalid",e);break;case"textarea":tl(e,r),l=vr(e,r),Pe("invalid",e);break;default:l=r}Zn(n,l),c=l;for(i in c)if(c.hasOwnProperty(i)){var f=c[i];i==="style"?Xn(e,f):i==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&yr(e,f)):i==="children"?typeof f=="string"?(n!=="textarea"||f!=="")&&Cn(e,f):typeof f=="number"&&Cn(e,""+f):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(p.hasOwnProperty(i)?f!=null&&i==="onScroll"&&Pe("scroll",e):f!=null&&je(e,i,f,s))}switch(n){case"input":un(e),Ql(e,r,!1);break;case"textarea":un(e),Kl(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ve(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?En(e,!!r.multiple,i,!1):r.defaultValue!=null&&En(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=hi)}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 st(t),null;case 6:if(e&&t.stateNode!=null)Ua(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(n=or(Rl.current),or(ln.current),ki(t)){if(r=t.stateNode,n=t.memoizedProps,r[rn]=t,(i=r.nodeValue!==n)&&(e=Mt,e!==null))switch(e.tag){case 3:pi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[rn]=t,t.stateNode=r}return st(t),null;case 13:if(Te(De),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Oe&&zt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Bu(),Br(),t.flags|=98560,i=!1;else if(i=ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[rn]=t}else Br(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),i=!1}else Zt!==null&&(Cs(Zt),Zt=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||(De.current&1)!==0?Qe===0&&(Qe=3):Ts())),t.updateQueue!==null&&(t.flags|=4),st(t),null);case 4:return Kr(),hs(e,t),e===null&&xl(t.stateNode.containerInfo),st(t),null;case 10:return Bo(t.type._context),st(t),null;case 17:return St(t.type)&&vi(),st(t),null;case 19:if(Te(De),i=t.memoizedState,i===null)return st(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Ol(i,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Pi(e),s!==null){for(t.flags|=128,Ol(i,!1),r=s.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,s=i.alternate,s===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=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ce(De,De.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ne()>Xr&&(t.flags|=128,r=!0,Ol(i,!1),t.lanes=4194304)}else{if(!r)if(e=Pi(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ol(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Oe)return st(t),null}else 2*Ne()-i.renderingStartTime>Xr&&n!==1073741824&&(t.flags|=128,r=!0,Ol(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ne(),t.sibling=null,n=De.current,Ce(De,r?n&1|2:n&1),t):(st(t),null);case 22:case 23:return Ps(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Lt&1073741824)!==0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function rd(e,t){switch(Do(t),t.tag){case 1:return St(t.type)&&vi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kr(),Te(wt),Te(it),Go(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return qo(t),null;case 13:if(Te(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(De),null;case 4:return Kr(),null;case 10:return Bo(t.type._context),null;case 22:case 23:return Ps(),null;case 24:return null;default:return null}}var Di=!1,ut=!1,ld=typeof WeakSet=="function"?WeakSet:Set,W=null;function Yr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ue(e,t,r)}else n.current=null}function ms(e,t,n){try{n()}catch(r){Ue(e,t,r)}}var Va=!1;function id(e,t){if(Po=ni,e=yu(),wo(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 l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,c=-1,f=-1,S=0,N=0,T=e,C=null;t:for(;;){for(var V;T!==n||l!==0&&T.nodeType!==3||(c=s+l),T!==i||r!==0&&T.nodeType!==3||(f=s+r),T.nodeType===3&&(s+=T.nodeValue.length),(V=T.firstChild)!==null;)C=T,T=V;for(;;){if(T===e)break t;if(C===n&&++S===l&&(c=s),C===i&&++N===r&&(f=s),(V=T.nextSibling)!==null)break;T=C,C=T.parentNode}T=V}n=c===-1||f===-1?null:{start:c,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(To={focusedElem:e,selectionRange:n},ni=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var H=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(H!==null){var Q=H.memoizedProps,Ve=H.memoizedState,m=t.stateNode,d=m.getSnapshotBeforeUpdate(t.elementType===t.type?Q:Jt(t.type,Q),Ve);m.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(j){Ue(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return H=Va,Va=!1,H}function Fl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ms(t,n,i)}l=l.next}while(l!==r)}}function Ii(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 vs(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 $a(e){var t=e.alternate;t!==null&&(e.alternate=null,$a(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[_l],delete t[zo],delete t[$f],delete t[Bf])),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 Ba(e){return e.tag===5||e.tag===3||e.tag===4}function Wa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ba(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 gs(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=hi));else if(r!==4&&(e=e.child,e!==null))for(gs(e,t,n),e=e.sibling;e!==null;)gs(e,t,n),e=e.sibling}function ys(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(ys(e,t,n),e=e.sibling;e!==null;)ys(e,t,n),e=e.sibling}var be=null,bt=!1;function Vn(e,t,n){for(n=n.child;n!==null;)Ha(e,t,n),n=n.sibling}function Ha(e,t,n){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(_r,n)}catch{}switch(n.tag){case 5:ut||Yr(n,t);case 6:var r=be,l=bt;be=null,Vn(e,t,n),be=r,bt=l,be!==null&&(bt?(e=be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):be.removeChild(n.stateNode));break;case 18:be!==null&&(bt?(e=be,n=n.stateNode,e.nodeType===8?Mo(e.parentNode,n):e.nodeType===1&&Mo(e,n),pl(e)):Mo(be,n.stateNode));break;case 4:r=be,l=bt,be=n.stateNode.containerInfo,bt=!0,Vn(e,t,n),be=r,bt=l;break;case 0:case 11:case 14:case 15:if(!ut&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&ms(n,t,s),l=l.next}while(l!==r)}Vn(e,t,n);break;case 1:if(!ut&&(Yr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Ue(n,t,c)}Vn(e,t,n);break;case 21:Vn(e,t,n);break;case 22:n.mode&1?(ut=(r=ut)||n.memoizedState!==null,Vn(e,t,n),ut=r):Vn(e,t,n);break;default:Vn(e,t,n)}}function Qa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ld),t.forEach(function(r){var l=hd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function en(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,s=t,c=s;e:for(;c!==null;){switch(c.tag){case 5:be=c.stateNode,bt=!1;break e;case 3:be=c.stateNode.containerInfo,bt=!0;break e;case 4:be=c.stateNode.containerInfo,bt=!0;break e}c=c.return}if(be===null)throw Error(u(160));Ha(i,s,l),be=null,bt=!1;var f=l.alternate;f!==null&&(f.return=null),l.return=null}catch(S){Ue(l,t,S)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ka(t,e),t=t.sibling}function Ka(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(en(t,e),sn(e),r&4){try{Fl(3,e,e.return),Ii(3,e)}catch(Q){Ue(e,e.return,Q)}try{Fl(5,e,e.return)}catch(Q){Ue(e,e.return,Q)}}break;case 1:en(t,e),sn(e),r&512&&n!==null&&Yr(n,n.return);break;case 5:if(en(t,e),sn(e),r&512&&n!==null&&Yr(n,n.return),e.flags&32){var l=e.stateNode;try{Cn(l,"")}catch(Q){Ue(e,e.return,Q)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,c=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{c==="input"&&i.type==="radio"&&i.name!=null&&mr(l,i),rl(c,s);var S=rl(c,i);for(s=0;s<f.length;s+=2){var N=f[s],T=f[s+1];N==="style"?Xn(l,T):N==="dangerouslySetInnerHTML"?yr(l,T):N==="children"?Cn(l,T):je(l,N,T,S)}switch(c){case"input":dt(l,i);break;case"textarea":Yn(l,i);break;case"select":var C=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var V=i.value;V!=null?En(l,!!i.multiple,V,!1):C!==!!i.multiple&&(i.defaultValue!=null?En(l,!!i.multiple,i.defaultValue,!0):En(l,!!i.multiple,i.multiple?[]:"",!1))}l[_l]=i}catch(Q){Ue(e,e.return,Q)}}break;case 6:if(en(t,e),sn(e),r&4){if(e.stateNode===null)throw Error(u(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(Q){Ue(e,e.return,Q)}}break;case 3:if(en(t,e),sn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pl(t.containerInfo)}catch(Q){Ue(e,e.return,Q)}break;case 4:en(t,e),sn(e);break;case 13:en(t,e),sn(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(ks=Ne())),r&4&&Qa(e);break;case 22:if(N=n!==null&&n.memoizedState!==null,e.mode&1?(ut=(S=ut)||N,en(t,e),ut=S):en(t,e),sn(e),r&8192){if(S=e.memoizedState!==null,(e.stateNode.isHidden=S)&&!N&&(e.mode&1)!==0)for(W=e,N=e.child;N!==null;){for(T=W=N;W!==null;){switch(C=W,V=C.child,C.tag){case 0:case 11:case 14:case 15:Fl(4,C,C.return);break;case 1:Yr(C,C.return);var H=C.stateNode;if(typeof H.componentWillUnmount=="function"){r=C,n=C.return;try{t=r,H.props=t.memoizedProps,H.state=t.memoizedState,H.componentWillUnmount()}catch(Q){Ue(r,n,Q)}}break;case 5:Yr(C,C.return);break;case 22:if(C.memoizedState!==null){Ga(T);continue}}V!==null?(V.return=C,W=V):Ga(T)}N=N.sibling}e:for(N=null,T=e;;){if(T.tag===5){if(N===null){N=T;try{l=T.stateNode,S?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(c=T.stateNode,f=T.memoizedProps.style,s=f!=null&&f.hasOwnProperty("display")?f.display:null,c.style.display=nl("display",s))}catch(Q){Ue(e,e.return,Q)}}}else if(T.tag===6){if(N===null)try{T.stateNode.nodeValue=S?"":T.memoizedProps}catch(Q){Ue(e,e.return,Q)}}else if((T.tag!==22&&T.tag!==23||T.memoizedState===null||T===e)&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===e)break e;for(;T.sibling===null;){if(T.return===null||T.return===e)break e;N===T&&(N=null),T=T.return}N===T&&(N=null),T.sibling.return=T.return,T=T.sibling}}break;case 19:en(t,e),sn(e),r&4&&Qa(e);break;case 21:break;default:en(t,e),sn(e)}}function sn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ba(n)){var r=n;break e}n=n.return}throw Error(u(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(Cn(l,""),r.flags&=-33);var i=Wa(e);ys(e,i,l);break;case 3:case 4:var s=r.stateNode.containerInfo,c=Wa(e);gs(e,c,s);break;default:throw Error(u(161))}}catch(f){Ue(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function od(e,t,n){W=e,qa(e)}function qa(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var l=W,i=l.child;if(l.tag===22&&r){var s=l.memoizedState!==null||Di;if(!s){var c=l.alternate,f=c!==null&&c.memoizedState!==null||ut;c=Di;var S=ut;if(Di=s,(ut=f)&&!S)for(W=l;W!==null;)s=W,f=s.child,s.tag===22&&s.memoizedState!==null?Xa(l):f!==null?(f.return=s,W=f):Xa(l);for(;i!==null;)W=i,qa(i),i=i.sibling;W=l,Di=c,ut=S}Ya(e)}else(l.subtreeFlags&8772)!==0&&i!==null?(i.return=l,W=i):Ya(e)}}function Ya(e){for(;W!==null;){var t=W;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ut||Ii(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ut)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Jt(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Gu(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Gu(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&n.focus();break;case"img":f.src&&(n.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var S=t.alternate;if(S!==null){var N=S.memoizedState;if(N!==null){var T=N.dehydrated;T!==null&&pl(T)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}ut||t.flags&512&&vs(t)}catch(C){Ue(t,t.return,C)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Ga(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function Xa(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ii(4,t)}catch(f){Ue(t,n,f)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(f){Ue(t,l,f)}}var i=t.return;try{vs(t)}catch(f){Ue(t,i,f)}break;case 5:var s=t.return;try{vs(t)}catch(f){Ue(t,s,f)}}}catch(f){Ue(t,t.return,f)}if(t===e){W=null;break}var c=t.sibling;if(c!==null){c.return=t.return,W=c;break}W=t.return}}var sd=Math.ceil,Ai=K.ReactCurrentDispatcher,ws=K.ReactCurrentOwner,$t=K.ReactCurrentBatchConfig,ge=0,Ge=null,Be=null,et=0,Lt=0,Gr=Fn(0),Qe=0,Dl=null,ur=0,Ui=0,Ss=0,Il=null,xt=null,ks=0,Xr=1/0,kn=null,Vi=!1,xs=null,$n=null,$i=!1,Bn=null,Bi=0,Al=0,Es=null,Wi=-1,Hi=0;function mt(){return(ge&6)!==0?Ne():Wi!==-1?Wi:Wi=Ne()}function Wn(e){return(e.mode&1)===0?1:(ge&2)!==0&&et!==0?et&-et:Hf.transition!==null?(Hi===0&&(Hi=fl()),Hi):(e=O,e!==0||(e=window.event,e=e===void 0?16:Js(e.type)),e)}function tn(e,t,n,r){if(50<Al)throw Al=0,Es=null,Error(u(185));x(e,n,r),((ge&2)===0||e!==Ge)&&(e===Ge&&((ge&2)===0&&(Ui|=n),Qe===4&&Hn(e,et)),Et(e,r),n===1&&ge===0&&(t.mode&1)===0&&(Xr=Ne()+500,yi&&In()))}function Et(e,t){var n=e.callbackNode;cl(e,t);var r=Tr(e,e===Ge?et:0);if(r===0)n!==null&&Yt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Yt(n),t===1)e.tag===0?Wf(Ja.bind(null,e)):Iu(Ja.bind(null,e)),Uf(function(){(ge&6)===0&&In()}),n=null;else{switch(z(r)){case 1:n=ul;break;case 4:n=Xl;break;case 16:n=Er;break;case 536870912:n=Jl;break;default:n=Er}n=oc(n,Za.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Za(e,t){if(Wi=-1,Hi=0,(ge&6)!==0)throw Error(u(327));var n=e.callbackNode;if(Zr()&&e.callbackNode!==n)return null;var r=Tr(e,e===Ge?et:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Qi(e,r);else{t=r;var l=ge;ge|=2;var i=ec();(Ge!==e||et!==t)&&(kn=null,Xr=Ne()+500,cr(e,t));do try{cd();break}catch(c){ba(e,c)}while(!0);$o(),Ai.current=i,ge=l,Be!==null?t=0:(Ge=null,et=0,t=Qe)}if(t!==0){if(t===2&&(l=jn(e),l!==0&&(r=l,t=_s(e,l))),t===1)throw n=Dl,cr(e,0),Hn(e,r),Et(e,Ne()),n;if(t===6)Hn(e,r);else{if(l=e.current.alternate,(r&30)===0&&!ud(l)&&(t=Qi(e,r),t===2&&(i=jn(e),i!==0&&(r=i,t=_s(e,i))),t===1))throw n=Dl,cr(e,0),Hn(e,r),Et(e,Ne()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(u(345));case 2:fr(e,xt,kn);break;case 3:if(Hn(e,r),(r&130023424)===r&&(t=ks+500-Ne(),10<t)){if(Tr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){mt(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=jo(fr.bind(null,e,xt,kn),t);break}fr(e,xt,kn);break;case 4:if(Hn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var s=31-qe(r);i=1<<s,s=t[s],s>l&&(l=s),r&=~i}if(r=l,r=Ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sd(r/1960))-r,10<r){e.timeoutHandle=jo(fr.bind(null,e,xt,kn),r);break}fr(e,xt,kn);break;case 5:fr(e,xt,kn);break;default:throw Error(u(329))}}}return Et(e,Ne()),e.callbackNode===n?Za.bind(null,e):null}function _s(e,t){var n=Il;return e.current.memoizedState.isDehydrated&&(cr(e,t).flags|=256),e=Qi(e,t),e!==2&&(t=xt,xt=n,t!==null&&Cs(t)),e}function Cs(e){xt===null?xt=e:xt.push.apply(xt,e)}function ud(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 l=n[r],i=l.getSnapshot;l=l.value;try{if(!Xt(i(),l))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 Hn(e,t){for(t&=~Ss,t&=~Ui,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-qe(t),r=1<<n;e[n]=-1,t&=~r}}function Ja(e){if((ge&6)!==0)throw Error(u(327));Zr();var t=Tr(e,0);if((t&1)===0)return Et(e,Ne()),null;var n=Qi(e,t);if(e.tag!==0&&n===2){var r=jn(e);r!==0&&(t=r,n=_s(e,r))}if(n===1)throw n=Dl,cr(e,0),Hn(e,t),Et(e,Ne()),n;if(n===6)throw Error(u(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fr(e,xt,kn),Et(e,Ne()),null}function Ns(e,t){var n=ge;ge|=1;try{return e(t)}finally{ge=n,ge===0&&(Xr=Ne()+500,yi&&In())}}function ar(e){Bn!==null&&Bn.tag===0&&(ge&6)===0&&Zr();var t=ge;ge|=1;var n=$t.transition,r=O;try{if($t.transition=null,O=1,e)return e()}finally{O=r,$t.transition=n,ge=t,(ge&6)===0&&In()}}function Ps(){Lt=Gr.current,Te(Gr)}function cr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Af(n)),Be!==null)for(n=Be.return;n!==null;){var r=n;switch(Do(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vi();break;case 3:Kr(),Te(wt),Te(it),Go();break;case 5:qo(r);break;case 4:Kr();break;case 13:Te(De);break;case 19:Te(De);break;case 10:Bo(r.type._context);break;case 22:case 23:Ps()}n=n.return}if(Ge=e,Be=e=Qn(e.current,null),et=Lt=t,Qe=0,Dl=null,Ss=Ui=ur=0,xt=Il=null,ir!==null){for(t=0;t<ir.length;t++)if(n=ir[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=l,r.next=s}n.pending=r}ir=null}return e}function ba(e,t){do{var n=Be;try{if($o(),Ti.current=zi,Ri){for(var r=Ie.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Ri=!1}if(sr=0,Ye=He=Ie=null,jl=!1,Ml=0,ws.current=null,n===null||n.return===null){Qe=1,Dl=t,Be=null;break}e:{var i=e,s=n.return,c=n,f=t;if(t=et,c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var S=f,N=c,T=N.tag;if((N.mode&1)===0&&(T===0||T===11||T===15)){var C=N.alternate;C?(N.updateQueue=C.updateQueue,N.memoizedState=C.memoizedState,N.lanes=C.lanes):(N.updateQueue=null,N.memoizedState=null)}var V=_a(s);if(V!==null){V.flags&=-257,Ca(V,s,c,i,t),V.mode&1&&Ea(i,S,t),t=V,f=S;var H=t.updateQueue;if(H===null){var Q=new Set;Q.add(f),t.updateQueue=Q}else H.add(f);break e}else{if((t&1)===0){Ea(i,S,t),Ts();break e}f=Error(u(426))}}else if(Oe&&c.mode&1){var Ve=_a(s);if(Ve!==null){(Ve.flags&65536)===0&&(Ve.flags|=256),Ca(Ve,s,c,i,t),Uo(qr(f,c));break e}}i=f=qr(f,c),Qe!==4&&(Qe=2),Il===null?Il=[i]:Il.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=ka(i,f,t);Yu(i,m);break e;case 1:c=f;var d=i.type,w=i.stateNode;if((i.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&($n===null||!$n.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var j=xa(i,c,t);Yu(i,j);break e}}i=i.return}while(i!==null)}nc(n)}catch(Y){t=Y,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function ec(){var e=Ai.current;return Ai.current=zi,e===null?zi:e}function Ts(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Ge===null||(ur&268435455)===0&&(Ui&268435455)===0||Hn(Ge,et)}function Qi(e,t){var n=ge;ge|=2;var r=ec();(Ge!==e||et!==t)&&(kn=null,cr(e,t));do try{ad();break}catch(l){ba(e,l)}while(!0);if($o(),ge=n,Ai.current=r,Be!==null)throw Error(u(261));return Ge=null,et=0,Qe}function ad(){for(;Be!==null;)tc(Be)}function cd(){for(;Be!==null&&!ro();)tc(Be)}function tc(e){var t=ic(e.alternate,e,Lt);e.memoizedProps=e.pendingProps,t===null?nc(e):Be=t,ws.current=null}function nc(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=nd(n,t,Lt),n!==null){Be=n;return}}else{if(n=rd(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,Be=null;return}}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);Qe===0&&(Qe=5)}function fr(e,t,n){var r=O,l=$t.transition;try{$t.transition=null,O=1,fd(e,t,n,r)}finally{$t.transition=l,O=r}return null}function fd(e,t,n,r){do Zr();while(Bn!==null);if((ge&6)!==0)throw Error(u(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(u(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(M(e,i),e===Ge&&(Be=Ge=null,et=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||$i||($i=!0,oc(Er,function(){return Zr(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=$t.transition,$t.transition=null;var s=O;O=1;var c=ge;ge|=4,ws.current=null,id(e,n),Ka(n,e),Mf(To),ni=!!Po,To=Po=null,e.current=n,od(n),lo(),ge=c,O=s,$t.transition=i}else e.current=n;if($i&&($i=!1,Bn=e,Bi=l),i=e.pendingLanes,i===0&&($n=null),al(n.stateNode),Et(e,Ne()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(Vi)throw Vi=!1,e=xs,xs=null,e;return(Bi&1)!==0&&e.tag!==0&&Zr(),i=e.pendingLanes,(i&1)!==0?e===Es?Al++:(Al=0,Es=e):Al=0,In(),null}function Zr(){if(Bn!==null){var e=z(Bi),t=$t.transition,n=O;try{if($t.transition=null,O=16>e?16:e,Bn===null)var r=!1;else{if(e=Bn,Bn=null,Bi=0,(ge&6)!==0)throw Error(u(331));var l=ge;for(ge|=4,W=e.current;W!==null;){var i=W,s=i.child;if((W.flags&16)!==0){var c=i.deletions;if(c!==null){for(var f=0;f<c.length;f++){var S=c[f];for(W=S;W!==null;){var N=W;switch(N.tag){case 0:case 11:case 15:Fl(8,N,i)}var T=N.child;if(T!==null)T.return=N,W=T;else for(;W!==null;){N=W;var C=N.sibling,V=N.return;if($a(N),N===S){W=null;break}if(C!==null){C.return=V,W=C;break}W=V}}}var H=i.alternate;if(H!==null){var Q=H.child;if(Q!==null){H.child=null;do{var Ve=Q.sibling;Q.sibling=null,Q=Ve}while(Q!==null)}}W=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,W=s;else e:for(;W!==null;){if(i=W,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Fl(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,W=m;break e}W=i.return}}var d=e.current;for(W=d;W!==null;){s=W;var w=s.child;if((s.subtreeFlags&2064)!==0&&w!==null)w.return=s,W=w;else e:for(s=d;W!==null;){if(c=W,(c.flags&2048)!==0)try{switch(c.tag){case 0:case 11:case 15:Ii(9,c)}}catch(Y){Ue(c,c.return,Y)}if(c===s){W=null;break e}var j=c.sibling;if(j!==null){j.return=c.return,W=j;break e}W=c.return}}if(ge=l,In(),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(_r,e)}catch{}r=!0}return r}finally{O=n,$t.transition=t}}return!1}function rc(e,t,n){t=qr(n,t),t=ka(e,t,1),e=Un(e,t,1),t=mt(),e!==null&&(x(e,1,t),Et(e,t))}function Ue(e,t,n){if(e.tag===3)rc(e,e,n);else for(;t!==null;){if(t.tag===3){rc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($n===null||!$n.has(r))){e=qr(n,e),e=xa(t,e,1),t=Un(t,e,1),e=mt(),t!==null&&(x(t,1,e),Et(t,e));break}}t=t.return}}function dd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=mt(),e.pingedLanes|=e.suspendedLanes&n,Ge===e&&(et&n)===n&&(Qe===4||Qe===3&&(et&130023424)===et&&500>Ne()-ks?cr(e,0):Ss|=n),Et(e,t)}function lc(e,t){t===0&&((e.mode&1)===0?t=1:(t=Pr,Pr<<=1,(Pr&130023424)===0&&(Pr=4194304)));var n=mt();e=yn(e,t),e!==null&&(x(e,t,n),Et(e,n))}function pd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lc(e,n)}function hd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),lc(e,n)}var ic;ic=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wt.current)kt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return kt=!1,td(e,t,n);kt=(e.flags&131072)!==0}else kt=!1,Oe&&(t.flags&1048576)!==0&&Au(t,Si,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fi(e,t),e=t.pendingProps;var l=Ur(t,it.current);Qr(t,n),l=Jo(null,t,r,e,l,n);var i=bo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,St(r)?(i=!0,gi(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Qo(t),l.updater=Li,t.stateNode=l,l._reactInternals=t,is(t,r,e,n),t=as(null,t,r,!0,i,n)):(t.tag=0,Oe&&i&&Fo(t),ht(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fi(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=vd(r),e=Jt(r,e),l){case 0:t=us(null,t,r,e,n);break e;case 1:t=Ma(null,t,r,e,n);break e;case 11:t=Na(null,t,r,e,n);break e;case 14:t=Pa(null,t,r,Jt(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Jt(r,l),us(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Jt(r,l),Ma(e,t,r,l,n);case 3:e:{if(za(t),e===null)throw Error(u(387));r=t.pendingProps,i=t.memoizedState,l=i.element,qu(e,t),Ni(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=qr(Error(u(423)),t),t=La(e,t,r,n,l);break e}else if(r!==l){l=qr(Error(u(424)),t),t=La(e,t,r,n,l);break e}else for(zt=On(t.stateNode.containerInfo.firstChild),Mt=t,Oe=!0,Zt=null,n=Qu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Br(),r===l){t=Sn(e,t,n);break e}ht(e,t,r,n)}t=t.child}return t;case 5:return Xu(t),e===null&&Ao(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,s=l.children,Ro(r,l)?s=null:i!==null&&Ro(r,i)&&(t.flags|=32),ja(e,t),ht(e,t,s,n),t.child;case 6:return e===null&&Ao(t),null;case 13:return Oa(e,t,n);case 4:return Ko(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wr(t,null,r,n):ht(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Jt(r,l),Na(e,t,r,l,n);case 7:return ht(e,t,t.pendingProps,n),t.child;case 8:return ht(e,t,t.pendingProps.children,n),t.child;case 12:return ht(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,s=l.value,Ce(Ei,r._currentValue),r._currentValue=s,i!==null)if(Xt(i.value,s)){if(i.children===l.children&&!wt.current){t=Sn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var c=i.dependencies;if(c!==null){s=i.child;for(var f=c.firstContext;f!==null;){if(f.context===r){if(i.tag===1){f=wn(-1,n&-n),f.tag=2;var S=i.updateQueue;if(S!==null){S=S.shared;var N=S.pending;N===null?f.next=f:(f.next=N.next,N.next=f),S.pending=f}}i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),Wo(i.return,n,t),c.lanes|=n;break}f=f.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(u(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Wo(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}ht(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Qr(t,n),l=Ut(l),r=r(l),t.flags|=1,ht(e,t,r,n),t.child;case 14:return r=t.type,l=Jt(r,t.pendingProps),l=Jt(r.type,l),Pa(e,t,r,l,n);case 15:return Ta(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Jt(r,l),Fi(e,t),t.tag=1,St(r)?(e=!0,gi(t)):e=!1,Qr(t,n),wa(t,r,l),is(t,r,l,n),as(null,t,r,!0,e,n);case 19:return Da(e,t,n);case 22:return Ra(e,t,n)}throw Error(u(156,t.tag))};function oc(e,t){return xr(e,t)}function md(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 Bt(e,t,n,r){return new md(e,t,n,r)}function Rs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vd(e){if(typeof e=="function")return Rs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===nt)return 11;if(e===ct)return 14}return 2}function Qn(e,t){var n=e.alternate;return n===null?(n=Bt(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 Ki(e,t,n,r,l,i){var s=2;if(r=e,typeof e=="function")Rs(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case le:return dr(n.children,l,i,t);case we:s=8,l|=8;break;case Me:return e=Bt(12,n,t,l|2),e.elementType=Me,e.lanes=i,e;case at:return e=Bt(13,n,t,l),e.elementType=at,e.lanes=i,e;case Ze:return e=Bt(19,n,t,l),e.elementType=Ze,e.lanes=i,e;case xe:return qi(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:s=10;break e;case ze:s=9;break e;case nt:s=11;break e;case ct:s=14;break e;case Ke:s=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=Bt(s,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function dr(e,t,n,r){return e=Bt(7,e,r,t),e.lanes=n,e}function qi(e,t,n,r){return e=Bt(22,e,r,t),e.elementType=xe,e.lanes=n,e.stateNode={isHidden:!1},e}function js(e,t,n){return e=Bt(6,e,null,t),e.lanes=n,e}function Ms(e,t,n){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gd(e,t,n,r,l){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=g(0),this.expirationTimes=g(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function zs(e,t,n,r,l,i,s,c,f){return e=new gd(e,t,n,c,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Bt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qo(i),e}function yd(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fe,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function sc(e){if(!e)return Dn;e=e._reactInternals;e:{if(fn(e)!==e||e.tag!==1)throw Error(u(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(St(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(u(171))}if(e.tag===1){var n=e.type;if(St(n))return Fu(e,n,t)}return t}function uc(e,t,n,r,l,i,s,c,f){return e=zs(n,r,!0,e,l,i,s,c,f),e.context=sc(null),n=e.current,r=mt(),l=Wn(n),i=wn(r,l),i.callback=t??null,Un(n,i,l),e.current.lanes=l,x(e,l,r),Et(e,r),e}function Yi(e,t,n,r){var l=t.current,i=mt(),s=Wn(l);return n=sc(n),t.context===null?t.context=n:t.pendingContext=n,t=wn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Un(l,t,s),e!==null&&(tn(e,l,s,i),Ci(e,l,s)),s}function Gi(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 ac(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ls(e,t){ac(e,t),(e=e.alternate)&&ac(e,t)}function wd(){return null}var cc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Os(e){this._internalRoot=e}Xi.prototype.render=Os.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));Yi(e,t,null,null)},Xi.prototype.unmount=Os.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ar(function(){Yi(null,e,null,null)}),t[hn]=null}};function Xi(e){this._internalRoot=e}Xi.prototype.unstable_scheduleHydration=function(e){if(e){var t=ke();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&t!==0&&t<Dt[n].priority;n++);Dt.splice(n,0,e),n===0&&We(e)}};function Fs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fc(){}function Sd(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var S=Gi(s);i.call(S)}}var s=uc(t,r,e,0,null,!1,!1,"",fc);return e._reactRootContainer=s,e[hn]=s.current,xl(e.nodeType===8?e.parentNode:e),ar(),s}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var c=r;r=function(){var S=Gi(f);c.call(S)}}var f=zs(e,0,!1,null,null,!1,!1,"",fc);return e._reactRootContainer=f,e[hn]=f.current,xl(e.nodeType===8?e.parentNode:e),ar(function(){Yi(t,f,n,r)}),f}function Ji(e,t,n,r,l){var i=n._reactRootContainer;if(i){var s=i;if(typeof l=="function"){var c=l;l=function(){var f=Gi(s);c.call(f)}}Yi(t,s,e,l)}else s=Sd(n,t,e,l,r);return Gi(s)}oe=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=er(t.pendingLanes);n!==0&&(L(t,n|1),Et(t,Ne()),(ge&6)===0&&(Xr=Ne()+500,In()))}break;case 13:ar(function(){var r=yn(e,1);if(r!==null){var l=mt();tn(r,e,1,l)}}),Ls(e,1)}},Se=function(e){if(e.tag===13){var t=yn(e,134217728);if(t!==null){var n=mt();tn(t,e,134217728,n)}Ls(e,134217728)}},Fe=function(e){if(e.tag===13){var t=Wn(e),n=yn(e,t);if(n!==null){var r=mt();tn(n,e,t,r)}Ls(e,t)}},ke=function(){return O},rt=function(e,t){var n=O;try{return O=e,t()}finally{O=n}},Pn=function(e,t,n){switch(t){case"input":if(dt(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 l=mi(r);if(!l)throw Error(u(90));Hl(r),dt(r,l)}}}break;case"textarea":Yn(e,n);break;case"select":t=n.value,t!=null&&En(e,!!n.multiple,t,!1)}},Ct=Ns,Ot=ar;var kd={usingClientEntryPoint:!1,Events:[Cl,Ir,mi,ol,Kt,Ns]},Ul={findFiberByHostInstance:tr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xd={bundleType:Ul.bundleType,version:Ul.version,rendererPackageName:Ul.rendererPackageName,rendererConfig:Ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:K.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Gl(e),e===null?null:e.stateNode},findFiberByHostInstance:Ul.findFiberByHostInstance||wd,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 bi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bi.isDisabled&&bi.supportsFiber)try{_r=bi.inject(xd),Ft=bi}catch{}}return _t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kd,_t.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fs(t))throw Error(u(200));return yd(e,t,null,n)},_t.createRoot=function(e,t){if(!Fs(e))throw Error(u(299));var n=!1,r="",l=cc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=zs(e,1,!1,null,null,n,!1,r,l),e[hn]=t.current,xl(e.nodeType===8?e.parentNode:e),new Os(t)},_t.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(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=Gl(t),e=e===null?null:e.stateNode,e},_t.flushSync=function(e){return ar(e)},_t.hydrate=function(e,t,n){if(!Zi(t))throw Error(u(200));return Ji(null,e,t,!0,n)},_t.hydrateRoot=function(e,t,n){if(!Fs(e))throw Error(u(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",s=cc;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=uc(t,null,e,1,n??null,l,!1,i,s),e[hn]=t.current,xl(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Xi(t)},_t.render=function(e,t,n){if(!Zi(t))throw Error(u(200));return Ji(null,e,t,!1,n)},_t.unmountComponentAtNode=function(e){if(!Zi(e))throw Error(u(40));return e._reactRootContainer?(ar(function(){Ji(null,null,e,!1,function(){e._reactRootContainer=null,e[hn]=null})}),!0):!1},_t.unstable_batchedUpdates=Ns,_t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zi(n))throw Error(u(200));if(e==null||e._reactInternals===void 0)throw Error(u(38));return Ji(e,t,n,!1,r)},_t.version="18.3.1-next-f1338f8080-20240426",_t}var wc;function zd(){if(wc)return As.exports;wc=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(o){console.error(o)}}return a(),As.exports=Md(),As.exports}var Sc;function Ld(){if(Sc)return eo;Sc=1;var a=zd();return eo.createRoot=a.createRoot,eo.hydrateRoot=a.hydrateRoot,eo}var Od=Ld();const Fd="modulepreload",Dd=function(a){return"/"+a},kc={},zc=function(o,u,y){let p=Promise.resolve();if(u&&u.length>0){let k=function(I){return Promise.all(I.map(Z=>Promise.resolve(Z).then(B=>({status:"fulfilled",value:B}),B=>({status:"rejected",reason:B}))))};document.getElementsByTagName("link");const R=document.querySelector("meta[property=csp-nonce]"),A=(R==null?void 0:R.nonce)||(R==null?void 0:R.getAttribute("nonce"));p=k(u.map(I=>{if(I=Dd(I),I in kc)return;kc[I]=!0;const Z=I.endsWith(".css"),B=Z?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${I}"]${B}`))return;const D=document.createElement("link");if(D.rel=Z?"stylesheet":Fd,Z||(D.as="script"),D.crossOrigin="",D.href=I,A&&D.setAttribute("nonce",A),document.head.appendChild(D),Z)return new Promise((G,J)=>{D.addEventListener("load",G),D.addEventListener("error",()=>J(new Error(`Unable to preload CSS for ${I}`)))})}))}function E(k){const R=new Event("vite:preloadError",{cancelable:!0});if(R.payload=k,window.dispatchEvent(R),!R.defaultPrevented)throw k}return p.then(k=>{for(const R of k||[])R.status==="rejected"&&E(R.reason);return o().catch(E)})};var P=Ys();function xc(a){return[...a.toLocaleLowerCase().matchAll(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu)].map(o=>({value:o[0],start:o.index??0}))}function $s(a,o){if(!o.length||o.length>a.length)return!1;for(let u=0;u<=a.length-o.length;u++)if(o.every((y,p)=>a[u+p]===y))return!0;return!1}function Id(a,o){const u=a.trim(),y=xc(u),p=xc(o).map(({value:R})=>R),E=y.map(({value:R})=>R);if(E.join(" ")==="it seems like"&&$s(p,E))return"";if(y.length<5||p.length<5)return u;if($s(p,E))return"";for(let R=y.length-1;R>=5;R--)if($s(p,E.slice(0,R)))return u.slice(y[R].start).replace(/^[\s,.;:!?—-]+/u,"").trim();return u}class Ad{constructor(o,u,y=()=>{},p=()=>{}){X(this,"recordings",[]);X(this,"transcripts",[]);X(this,"hearing",!1);X(this,"pumpingEpoch",null);X(this,"active",null);X(this,"epoch",0);X(this,"transcribe");X(this,"send");X(this,"report");X(this,"changed");this.transcribe=o,this.send=u,this.report=y,this.changed=p}get busy(){return this.pumpingEpoch!==null||this.recordings.length>0||this.transcripts.length>0}speechStarted(){this.hearing=!0,this.changed()}speechEnded(o){this.hearing=!1,this.recordings.push(o),this.changed(),this.pump()}speechDiscarded(){this.hearing=!1,this.changed(),this.pump()}reset(){var o;this.epoch++,(o=this.active)==null||o.abort(),this.active=null,this.recordings=[],this.transcripts=[],this.hearing=!1,this.pumpingEpoch=null,this.changed()}pump(){const o=this.epoch;this.pumpingEpoch!==o&&(this.pumpingEpoch=o,this.changed(),(async()=>{try{for(;this.recordings.length&&o===this.epoch;){const y=this.recordings.shift(),p=new AbortController;this.active=p;try{const E=(await this.transcribe(y,p.signal)).trim();o===this.epoch&&E&&this.transcripts.push(E)}catch(E){if(o===this.epoch&&!p.signal.aborted)throw E}finally{this.active===p&&(this.active=null),o===this.epoch&&this.changed()}}if(o!==this.epoch||this.hearing||this.recordings.length||!this.transcripts.length)return;const u=this.transcripts.join(" ").trim();this.transcripts=[],this.changed(),u&&await this.send(u)}catch(u){o===this.epoch&&this.report(u)}finally{this.pumpingEpoch===o&&(this.pumpingEpoch=null,this.changed(),o===this.epoch&&!this.hearing&&(this.recordings.length||this.transcripts.length)&&this.pump())}})())}}const Ud=2e3;class Vd{constructor(o=Ud){X(this,"tail",Promise.resolve());X(this,"_active",!1);X(this,"_flushing",!1);X(this,"epoch",0);X(this,"timeoutMs");X(this,"invalid",new WeakSet);this.timeoutMs=o}get acceptsCallbacks(){return this._active||this._flushing}pause(o){if(this.invalid.has(o))return Promise.reject(new Error("VAD transition is invalidated."));const u=this.epoch;return this._active=!1,this.enqueue(async()=>{u===this.epoch&&await this.withTimeout(o,o.pause(),"pause")})}start(o){if(this.invalid.has(o))return Promise.reject(new Error("VAD transition is invalidated."));const u=this.epoch;return this.enqueue(async()=>{u===this.epoch&&(await this.withTimeout(o,o.start(),"start"),u===this.epoch&&(this._active=!0))})}flush(o){if(this.invalid.has(o))return Promise.reject(new Error("VAD transition is invalidated."));const u=this.epoch;return this.enqueue(async()=>{if(u===this.epoch){this._flushing=!0;try{await this.withTimeout(o,o.pause(),"pause"),await this.withTimeout(o,o.start(),"start"),u===this.epoch&&(this._active=!0)}finally{u===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(o){return this.invalid.has(o)}enqueue(o){const u=this.tail.then(o,o);return this.tail=u.catch(()=>{}),u}withTimeout(o,u,y){return new Promise((p,E)=>{const k=globalThis.setTimeout(()=>{this.invalidate(o),E(new Error(`VAD ${y} timed out.`))},this.timeoutMs);u.then(()=>{globalThis.clearTimeout(k),p()},R=>{globalThis.clearTimeout(k),E(R)})})}invalidate(o){this.invalid.add(o),this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}}function $d(a,o,u,y,p,E){return a===o&&u===y&&!p&&E}const Bd=350;class Wd{constructor(o,u){X(this,"preRoll",[]);X(this,"current",null);X(this,"segments",new Set);X(this,"ended",new WeakMap);X(this,"request");X(this,"preview");this.request=o,this.preview=u}frame(o,u){const y=u.slice(),p=this.current;if(!p){this.preRoll.push(y),this.preRoll.length>14&&this.preRoll.shift();return}p.frames.push(y),o>=.35?(p.revision++,p.quiet=0):p.quiet++,p.confirmed&&!p.pending&&p.requested!==p.revision&&(p.quiet>=6||p.frames.length-p.lastRequest>=63)&&this.speculate(p)}begin(){const o={frames:this.preRoll,revision:1,quiet:0,confirmed:!1,requested:-1,lastRequest:0,controller:new AbortController};this.preRoll=[],this.current=o,this.segments.add(o),this.preview("")}confirm(){this.current&&(this.current.confirmed=!0)}end(o){this.current&&this.ended.set(o,this.current),this.current=null,this.preRoll=[]}async finish(o,u){var E;const y=this.ended.get(o);if(this.ended.delete(o),!y)return this.request(o,u);const p=()=>y.controller.abort(u.reason);u.addEventListener("abort",p,{once:!0}),u.aborted&&p();try{const k=y.pending;return k&&!await Hd(k,Bd,u)&&y.controller.abort(new DOMException("Speculative transcription timed out.","AbortError")),u.throwIfAborted(),((E=y.result)==null?void 0:E.revision)===y.revision&&y.result.text.trim()?y.result.text:await this.request(o,u)}finally{u.removeEventListener("abort",p),this.segments.delete(y)}}discard(){this.current&&(this.current.controller.abort(),this.segments.delete(this.current)),this.current=null,this.preRoll=[],this.preview("")}reset(){for(const o of this.segments)o.controller.abort();this.segments.clear(),this.ended=new WeakMap,this.discard()}samples(o){const u=new Float32Array(o.frames.reduce((p,E)=>p+E.length,0));let y=0;for(const p of o.frames)u.set(p,y),y+=p.length;return u}speculate(o){const u=o.revision;o.requested=u,o.lastRequest=o.frames.length,o.pending=this.request(this.samples(o),o.controller.signal).then(y=>{o.controller.signal.aborted||(o.result={revision:u,text:y},this.current===o&&this.preview(y))}).catch(()=>{}).finally(()=>{o.pending=void 0})}}function Hd(a,o,u){return new Promise((y,p)=>{if(u.aborted)return p(u.reason);const E=globalThis.setTimeout(A,o),k=()=>{I(),p(u.reason)},R=()=>{I(),y(!0)};function A(){I(),y(!1)}function I(){globalThis.clearTimeout(E),u.removeEventListener("abort",k)}u.addEventListener("abort",k,{once:!0}),a.then(R,R)})}class Qd{constructor(){X(this,"mode","idle");X(this,"interruptOnConfirm",!1)}speechStart(o){return this.mode="candidate",this.interruptOnConfirm=o,{duck:o,begin:!0,accepted:!1}}speechRealStart(){return this.mode==="candidate"?(this.mode="accepted",{interrupt:this.interruptOnConfirm,begin:!1,accepted:!0}):{interrupt:!1,begin:!1,accepted:this.mode==="accepted"}}speechEnd(){const o=this.mode==="accepted";return this.reset(),o}reset(){this.mode="idle",this.interruptOnConfirm=!1}}function Ec(a,o,u,y){return async p=>{p.throwIfAborted();const E=o.createAnalyser();E.fftSize=128,E.connect(u);const k=o.createBufferSource();k.buffer=a,k.connect(E),await new Promise((R,A)=>{const I=()=>{k.onended=null;try{k.stop()}catch{}k.disconnect(),E.disconnect(),A(p.reason)};k.onended=()=>{p.removeEventListener("abort",I),k.disconnect(),E.disconnect(),R()},p.addEventListener("abort",I,{once:!0}),k.start(),y(E),p.aborted&&I()})}}class Kd{constructor(o,u,y){X(this,"run",this.fresh());X(this,"synthesize");X(this,"changed");X(this,"reportError");this.synthesize=o,this.changed=u,this.reportError=y}get busy(){const o=this.run;return o.generating||o.playing||o.text.length>0||o.audio.length>0}enqueue(o){this.run.text.push(...o),this.pump(this.run)}cancel(){const o=this.run;this.run=this.fresh(),o.text=[],o.audio=[],o.controller.abort(),this.changed()}fresh(){return{controller:new AbortController,text:[],audio:[],hasDispatchedSpeech:!1,generating:!1,playing:!1}}fail(o,u){o!==this.run||o.controller.signal.aborted||(this.cancel(),this.reportError(u))}pump(o){if(o!==this.run||o.controller.signal.aborted)return;const u=o.controller.signal;if(!o.playing&&o.audio.length){const y=o.audio.shift();o.playing=!0,(async()=>{try{await y(u)}catch(p){this.fail(o,p)}finally{o.playing=!1,o===this.run&&this.pump(o)}})()}if(!o.generating&&o.audio.length<2&&o.text.length){let y=o.text.shift();if(o.hasDispatchedSpeech)for(;o.text.length&&y.length+o.text[0].length+1<=600;)y+=` ${o.text.shift()}`;o.hasDispatchedSpeech=!0,o.generating=!0,(async()=>{try{const p=await this.synthesize(y,u);o===this.run&&!u.aborted&&(o.audio.push(p),this.pump(o)),await p.completed}catch(p){this.fail(o,p)}finally{o.generating=!1,o===this.run&&this.pump(o)}})()}this.changed()}}const Lc=.45,Oc=.3,Fc=160,Dc=320,Ic=1e3,qd={positiveSpeechThreshold:Lc,negativeSpeechThreshold:Oc,minSpeechMs:Fc,preSpeechPadMs:Dc,redemptionMs:Ic},Ws=512,Hs=16e3,Yd=2e4,Gd={frameSamples:Ws,sampleRate:Hs,positiveSpeechThreshold:Lc,negativeSpeechThreshold:Oc,minSpeechMs:Fc,redemptionMs:Ic,preSpeechPadMs:Dc,maxSpeechMs:Yd,noiseFloorWindowFrames:100,noiseFloorPercentile:.3,noiseFloorMarginDb:6,noiseFloorRangeDb:24,minFloorRms:.0015,submitUserSpeechOnPause:!1};function Xd(a){let o=0;for(let u=0;u<a.length;u++)o+=a[u]*a[u];return Math.sqrt(o/Math.max(1,a.length))}function _c(a){return 20*Math.log10(Math.max(a,1e-8))}function Zd(a){return Math.min(1,Math.max(0,a))}function Jd(a){const o=a.reduce((p,E)=>p+E.length,0),u=new Float32Array(o);let y=0;for(const p of a)u.set(p,y),y+=p.length;return u}class bd{constructor(o={}){X(this,"options");X(this,"msPerFrame");X(this,"minSpeechFrames",1);X(this,"redemptionFrames",1);X(this,"preSpeechPadFrames",0);X(this,"maxSpeechFrames",1);X(this,"state","silence");X(this,"ring",[]);X(this,"recorded",[]);X(this,"activeFrames",0);X(this,"silenceFrames",0);X(this,"noiseFloorSamples",[]);X(this,"active",!0);this.options={...Gd,...o},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(o){this.options={...this.options,...o},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 o=[];return this.state==="speech"?o.push({type:"speech-end",samples:Jd(this.recorded)}):this.state==="maybe"&&o.push({type:"misfire"}),this.reset(),o}process(o){if(!this.active)return{probability:0,events:[]};const u=Xd(o);this.state==="silence"&&this.pushNoiseFloorSample(u);const y=this.estimateNoiseFloor(),p=Zd((_c(u)-_c(y)-this.options.noiseFloorMarginDb)/this.options.noiseFloorRangeDb),E=[];if(this.state==="silence")return this.pushRing(o),p>=this.options.positiveSpeechThreshold&&(this.state="maybe",this.recorded=[...this.ring],this.activeFrames=1,this.silenceFrames=0,E.push({type:"speech-start"})),{probability:p,events:E};this.recorded.push(o),p>=this.options.negativeSpeechThreshold?(this.silenceFrames=0,this.activeFrames++,this.state==="maybe"&&this.activeFrames>=this.minSpeechFrames&&(this.state="speech",E.push({type:"speech-real-start"}))):this.silenceFrames++;const R=this.recorded.length>=this.maxSpeechFrames,A=this.silenceFrames>=this.redemptionFrames;return(R||A)&&E.push(...this.endSegment()),{probability:p,events:E}}pushRing(o){this.ring.push(o),this.ring.length>this.preSpeechPadFrames&&this.ring.shift()}pushNoiseFloorSample(o){this.noiseFloorSamples.push(o),this.noiseFloorSamples.length>this.options.noiseFloorWindowFrames&&this.noiseFloorSamples.shift()}estimateNoiseFloor(){if(this.noiseFloorSamples.length===0)return this.options.minFloorRms;const o=[...this.noiseFloorSamples].sort((y,p)=>y-p),u=Math.min(o.length-1,Math.floor(o.length*this.options.noiseFloorPercentile));return Math.max(this.options.minFloorRms,o[u])}}class ep{constructor(o,u,y){X(this,"inputBuffer",[]);this.nativeSampleRate=o,this.targetSampleRate=u,this.targetFrameSize=y}process(o){const u=[];for(const y of o)for(this.inputBuffer.push(y);this.hasEnoughDataForFrame();)u.push(this.generateOutputFrame());return u}hasEnoughDataForFrame(){return this.inputBuffer.length*this.targetSampleRate/this.nativeSampleRate>=this.targetFrameSize}generateOutputFrame(){const o=new Float32Array(this.targetFrameSize);let u=0,y=0;for(;u<this.targetFrameSize;){let p=0,E=0;const k=Math.min(this.inputBuffer.length,(u+1)*this.nativeSampleRate/this.targetSampleRate);for(;y<k;){const R=this.inputBuffer[y];R!==void 0&&(p+=R,E++),y++}o[u]=E>0?p/E:0,u++}return this.inputBuffer=this.inputBuffer.slice(y),o}}const tp=`
42
42
  class EnergyVadWorkletProcessor extends AudioWorkletProcessor {
43
43
  constructor(options) {
44
44
  super();
@@ -76,5 +76,5 @@ class EnergyVadWorkletProcessor extends AudioWorkletProcessor {
76
76
  }
77
77
  registerProcessor("energy-vad-worklet-processor", EnergyVadWorkletProcessor);
78
78
  `;class Gs{constructor(o){X(this,"options");X(this,"processor");X(this,"initState","uninitialized");X(this,"stream",null);X(this,"sourceNode",null);X(this,"workletNode",null);X(this,"scriptNode",null);X(this,"workletModuleUrl",null);X(this,"listening",!1);X(this,"handleFrame",o=>{const u=this.processor.process(o);this.options.onFrameProcessed({isSpeech:u.probability,notSpeech:1-u.probability},o);for(const y of u.events)this.dispatch(y)});X(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(o){throw this.initState="errored",o}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}});X(this,"pause",async()=>{if(!this.listening)return;this.listening=!1;const o=this.processor.pause();for(const u of o)this.dispatch(u);this.stream&&this.options.pauseStream&&await this.options.pauseStream(this.stream),this.detachAudioGraph()});X(this,"destroy",async()=>{this.initState!=="destroyed"&&(this.listening&&await this.pause(),this.initState="destroyed",this.workletModuleUrl&&(URL.revokeObjectURL(this.workletModuleUrl),this.workletModuleUrl=null))});X(this,"setOptions",o=>{this.processor.setOptions(o)});this.options=o,this.processor=new bd({positiveSpeechThreshold:o.positiveSpeechThreshold,negativeSpeechThreshold:o.negativeSpeechThreshold,minSpeechMs:o.minSpeechMs,preSpeechPadMs:o.preSpeechPadMs,redemptionMs:o.redemptionMs,maxSpeechMs:o.maxSpeechMs,submitUserSpeechOnPause:o.submitUserSpeechOnPause??!1})}static async new(o){return new Gs(o)}dispatch(o){switch(o.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(o.samples);return}}async attachAudioGraph(){const o=this.options.audioContext,u=this.stream;if(!u)throw new Error("Energy VAD has no active microphone stream.");if(this.sourceNode=new MediaStreamAudioSourceNode(o,{mediaStream:u}),this.canUseAudioWorklet(o))try{await this.attachAsWorklet(o),this.sourceNode.connect(this.workletNode);return}catch{this.workletNode=null}this.attachAsScriptProcessor(o),this.sourceNode.connect(this.scriptNode)}canUseAudioWorklet(o){return"audioWorklet"in o&&typeof AudioWorkletNode=="function"}async attachAsWorklet(o){if(!this.workletModuleUrl){const u=new Blob([tp],{type:"application/javascript"});this.workletModuleUrl=URL.createObjectURL(u)}await o.audioWorklet.addModule(this.workletModuleUrl),this.workletNode=new AudioWorkletNode(o,"energy-vad-worklet-processor",{numberOfInputs:1,numberOfOutputs:0,channelCount:1,processorOptions:{targetSampleRate:Hs,targetFrameSize:Ws}}),this.workletNode.port.onmessage=u=>{this.handleFrame(u.data)}}attachAsScriptProcessor(o){const u=new ep(o.sampleRate,Hs,Ws),p=o.createScriptProcessor(4096,1,1);let E=!1;p.onaudioprocess=k=>{if(!E){E=!0;try{const R=k.inputBuffer.getChannelData(0);k.outputBuffer.getChannelData(0).fill(0);for(const I of u.process(R))this.handleFrame(I)}finally{E=!1}}},p.connect(o.destination),this.scriptNode=p}detachAudioGraph(){var o;(o=this.sourceNode)==null||o.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)}}function Ac(a){return a.replace(/```[\s\S]*?(?:```|$)/g," Code is shown on screen. ").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/<[^>]*>/g,"").replace(/[*_`#>|]/g,"").replace(/\s+/g," ").trim()}function np(a,o){let u=!1,y=!1,p=0,E=!1;for(let k=0;k<a.length;k++){if(a.startsWith("```",k)){u=!u,k+=2;continue}if(u)continue;if(a[k]==="`"){y=!y;continue}if(y)continue;if(a[k]==="["&&p++,a[k]==="]"&&(p=Math.max(0,p-1),a[k+1]==="("&&(E=!0)),E){a[k]===")"&&(E=!1);continue}if(p)continue;const A=(/[.!?。!?]/.test(a[k])||o&&/[,;:,;:]/.test(a[k]))&&(/[。!?,;:]/.test(a[k])||/\s/.test(a[k+1]||"")),I=a[k]==="."&&/(?:\b(?:Mr|Mrs|Ms|Dr|Prof|St|vs|etc)|\b[A-Za-z])\.$/i.test(a.slice(0,k+1)),Z=o?48:160;if(A&&!I||a[k]===`
79
- `||a[k]==="—"||k>=Z&&/\s/.test(a[k]))return k+1}return 0}function rp(a,o,u){var p;let y=0;for(;y<a.length;){const E=np(a.slice(y),u)||(o?a.length-y:0);if(!E)return 0;if(y+=E,(((p=Ac(a.slice(0,y).replace(/—/g," ")).match(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu))==null?void 0:p.length)??0)>(u?5:3)||o&&y===a.length)return y}return 0}function Cc(a,o=!1,u=!1){const y=[];let p=0,E=u;for(;p<a.length;){const k=rp(a.slice(p),o,E);if(!k)break;const R=Ac(a.slice(p,p+k).replace(/—$/,"").replace(/—/g,", "));R&&(y.push(R),E=!1),p+=k}return{chunks:y,rest:o?"":a.slice(p)}}function Nc(a,o,u){return a||o||u}function lp(a){const o=new ArrayBuffer(44+a.length*2),u=new DataView(o),y=(p,E)=>[...E].forEach((k,R)=>u.setUint8(p+R,k.charCodeAt(0)));return y(0,"RIFF"),u.setUint32(4,36+a.length*2,!0),y(8,"WAVEfmt "),u.setUint32(16,16,!0),u.setUint16(20,1,!0),u.setUint16(22,1,!0),u.setUint32(24,16e3,!0),u.setUint32(28,32e3,!0),u.setUint16(32,2,!0),u.setUint16(34,16,!0),y(36,"data"),u.setUint32(40,a.length*2,!0),a.forEach((p,E)=>u.setInt16(44+E*2,Math.max(-1,Math.min(1,p))*(p<0?32768:32767),!0)),new Blob([o],{type:"audio/wav"})}function Qs(){const a=globalThis.crypto;if(a&&typeof a.randomUUID=="function")return a.randomUUID();const o=new Uint8Array(16);if(a)a.getRandomValues(o);else for(let u=0;u<o.length;u+=1)o[u]=Math.floor(Math.random()*256);return Array.from(o,u=>u.toString(16).padStart(2,"0")).join("")}const Uc="meldivo.token",ip="meldivo.token";let br;function op(){try{window.localStorage.removeItem(ip)}catch{}const o=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("token");if(o){try{window.sessionStorage.setItem(Uc,o)}catch{}br=o;try{window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}`)}catch{}}}function sp(){if(br!==void 0)return br;try{br=window.sessionStorage.getItem(Uc)}catch{br=null}return br}function tt(){const a=sp();return a?{"X-Meldivo-Token":a}:{}}class pr extends Error{constructor(){super("Unauthorized"),this.name="UnauthorizedError"}}function hr(a){if(a.status===401)throw new pr;return a}const up="voice-assistant-microphone",Ks="voice-assistant-microphone-owner",ap=15e3,cp=5e3,fp=5e3;function to(){try{const a=window.localStorage.getItem(Ks);if(!a)return null;const o=JSON.parse(a);return typeof o.id!="string"||typeof o.expiresAt!="number"?null:{id:o.id,expiresAt:o.expiresAt}}catch{return null}}function dp(){var k;const a=Qs(),o=Date.now(),u=to();if(u&&u.expiresAt>o)return null;const y=()=>window.localStorage.setItem(Ks,JSON.stringify({id:a,expiresAt:Date.now()+ap}));try{if(y(),((k=to())==null?void 0:k.id)!==a)return null}catch{return{release:()=>{}}}let p=!1;const E=window.setInterval(()=>{var R;p||((R=to())==null?void 0:R.id)!==a||y()},cp);return{release:()=>{var R;if(!p){p=!0,window.clearInterval(E);try{((R=to())==null?void 0:R.id)===a&&window.localStorage.removeItem(Ks)}catch{}}}}}async function pp(){let a,o,u;const y=new Promise((E,k)=>{o=E,u=k}),p=new Promise(E=>{a=E});return navigator.locks.request(up,{mode:"exclusive",ifAvailable:!0},async E=>{if(!E){o(null);return}let k=!1;o({release:()=>{k||(k=!0,a())}}),await p}).catch(u),y}async function hp(a){const o=await fetch("/api/voice/lease",{method:"POST",headers:tt()});if(o.status===409)return null;if(!o.ok)throw new Error("Could not reserve the voice session.");const u=await o.json();if(typeof u.token!="string"||u.token.length<16)throw new Error("Voice session returned an invalid lease.");let y=!1;const p=()=>{y||(y=!0,window.clearInterval(E),fetch("/api/voice/lease",{method:"DELETE",headers:{"Content-Type":"application/json",...tt()},body:JSON.stringify({token:u.token}),keepalive:!0}).catch(()=>{}))},E=window.setInterval(()=>{fetch("/api/voice/lease/heartbeat",{method:"POST",headers:{"Content-Type":"application/json",...tt()},body:JSON.stringify({token:u.token})}).then(k=>{k.status===409&&(p(),a())}).catch(()=>{})},fp);return{release:p}}async function mp(a=()=>{}){const o=typeof navigator<"u"&&navigator.locks?await pp():typeof window>"u"?null:dp();if(!o)return null;try{const u=await hp(a);return u?{release:()=>{u.release(),o.release()}}:(o.release(),null)}catch(u){throw o.release(),u}}const Xs="voice-assistant.selected-voice";function Vc(a){return typeof a=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(a)}function Zs(a){return typeof window>"u"?void 0:window.localStorage}function Jr(a){var o;try{const u=(o=Zs(a))==null?void 0:o.getItem(Xs);return Vc(u)?u:void 0}catch{return}}function vp(a,o){var u;if(!Vc(a))return!1;try{return(u=Zs(o))==null||u.setItem(Xs,a),!0}catch{return!1}}function Pc(a){var o;try{(o=Zs(a))==null||o.removeItem(Xs)}catch{}}function $c(){return g.jsx("main",{className:"auth-screen",children:g.jsxs("p",{children:["Open the link printed by ",g.jsx("code",{children:"meldivo open"}),"."]})})}function $l(a){const o=/^@([A-Za-z0-9._-]{1,40})\/(.+)$/.exec(a);return o?{prefix:`@${o[1]}/`,host:o[1],inner:o[2]}:{prefix:"",host:"",inner:a}}const qs=["pi","opencode","claude"],no={pi:"Pi",opencode:"OpenCode",claude:"Claude Code"};let Tc=!1;function Rc(a){const{host:o,inner:u}=$l(a),y=o||void 0;if(u.startsWith("new:"))return{harness:u.slice(4),title:"New chat",cwd:"~",host:y};if(u==="quick")return{title:"Quick chat",cwd:"~",host:y};const p=u.indexOf(":");return p===-1?{title:u,cwd:"",host:y}:{harness:u.slice(0,p),title:u.slice(p+1),cwd:"",host:y}}function gp(a){const o=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(a);return o?`~${o[2]??""}`:a}function yp(a){return`meldivo.conversation.${a}`}function wp(a){const o=yp(a);try{const u=window.sessionStorage.getItem(o);if(u)return u;const y=Qs();return window.sessionStorage.setItem(o,y),y}catch{return Qs()}}const Sp=12e3,kp=560,xp="This is a voice preview.",Bc="voice-assistant.onboarding-dismissed",Ep=3e3;function Bl(a){const o=/^([a-z]{2})[_-](.+)$/i.exec(a),u={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(o){const y=u[o[1].toLowerCase()];if(y)return`${Bl(o[2])} — ${y}`}return a.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[._-]+/g," ").replace(/\b\w/g,y=>y.toUpperCase())}function _p(){try{return window.localStorage.getItem(Bc)!=="true"}catch{return!0}}class Cp extends Error{constructor(){super("Another voice tab is active. Close it or stop voice there first."),this.name="VoiceOwnershipError"}}async function Np(a,o){if(!a.body)throw new Error("Chat response was empty.");const u=a.body.pipeThrough(new TextDecoderStream).getReader();let y="";for(;;){const{done:p,value:E}=await u.read();if(p)break;y+=E;const k=y.split(`
80
- `);y=k.pop()??"";for(const R of k){if(!R.startsWith("data:"))continue;const A=R.slice(5).trim();if(!A)continue;let I;try{I=JSON.parse(A)}catch{continue}if(o(I),I.type==="done")return}}}function Pp({sessionKey:a,folder:o}){const[u,y]=P.useState("idle"),[p,E]=P.useState(0),[k,R]=P.useState(""),A=P.useRef(u),I=P.useRef(!0),Z=P.useRef(!1),B=P.useRef(!1),D=P.useRef(!1),G=P.useRef(!1),J=P.useRef(null),re=P.useRef(null),q=P.useRef(null),me=P.useRef(null),Re=P.useRef(null),je=P.useRef(!1),K=P.useRef(null),se=P.useRef(null),fe=P.useRef(null),le=P.useRef(new Vd),we=P.useRef(0),Me=P.useRef(0),U=P.useRef(null),ze=P.useRef(null),nt=P.useRef(0),at=P.useRef(wp(o?`${a}|${o}`:a)),Ze=P.useRef(a),ct=P.useRef(null),Ke=P.useRef(Rc(a).harness),xe=P.useRef(0),F=P.useRef(0),b=P.useRef(null),$=P.useRef(""),h=P.useRef(""),_=P.useRef(null),ne=P.useRef(new Qd),ue=P.useRef(),[ae,he]=P.useState(null),[de,ve]=P.useState(!1),[Ee,ft]=P.useState([]),[un,Hl]=P.useState(""),[Je,qn]=P.useState(()=>Jr()??""),[el,mr]=P.useState(()=>Jr()??""),[dt,Ql]=P.useState({ready:!0,downloading:!1}),[Wt,xn]=P.useState(()=>{const v=Rc(a);return o&&$l(a).inner.startsWith("new:")?{...v,cwd:gp(o)}:v}),[En,vr]=P.useState(!1),[tl,Yn]=P.useState(""),[Kl,_n]=P.useState(!1),[gr,Gn]=P.useState(""),[yr,Cn]=P.useState(!1),[Nn,Ht]=P.useState(""),[nl,Xn]=P.useState(""),[wr,Zn]=P.useState(null),[rl,ll]=P.useState(_p),an=P.useRef(null),Pn=P.useRef(null),Qt=P.useRef(0),cn=P.useRef(null),il=P.useRef(null),ol=P.useRef(null),Kt=P.useRef(null),Ct=P.useRef(null),Ot=P.useRef(null),Tn=P.useRef(null),Jn=P.useRef(!1),pt=P.useRef(!1),vt=()=>{U.current!==null&&window.clearTimeout(U.current),U.current=null},Le=v=>{A.current=v,I.current&&y(v)},sl=v=>{v&&b.current!==v||(cancelAnimationFrame(F.current),b.current=null,G.current=!1,I.current&&E(0))},bn=(v,x)=>{cancelAnimationFrame(F.current),b.current=x,G.current=!0,Le("speaking");const M=new Float32Array(v.fftSize),L=()=>{b.current===x&&(v.getFloatTimeDomainData(M),E(Math.min(1,Math.sqrt(M.reduce((O,z)=>O+z*z,0)/M.length)*6)),F.current=requestAnimationFrame(L))};L()},Nt=()=>{var v,x,M;Z.current||A.current==="error"||(G.current||(v=K.current)!=null&&v.busy&&A.current==="speaking"?Le("speaking"):Re.current||(x=K.current)!=null&&x.busy||(M=fe.current)!=null&&M.busy?Le(je.current?"running":"thinking"):B.current&&Le("listening"))},Sr=()=>{const v=me.current,x=q.current;!v||!x||(v.gain.cancelScheduledValues(x.currentTime),v.gain.setTargetAtTime(.01,x.currentTime,.015))},gt=()=>{const v=me.current,x=q.current;!v||!x||(v.gain.cancelScheduledValues(x.currentTime),v.gain.setTargetAtTime(1,x.currentTime,.015))},Pt=v=>{if(!I.current)return;const x=++nt.current;ze.current!==null&&window.clearTimeout(ze.current),R(v),Le("error"),ze.current=window.setTimeout(()=>{nt.current===x&&(ze.current=null,R(""),A.current==="error"&&Le(B.current?Z.current?"muted":"listening":"idle"))},4e3)},kr=()=>{var v;(v=_.current)==null||v.release(),_.current=null},Rn=()=>{var x,M;xe.current++;const v=je.current||!!Re.current;if(je.current=!1,(x=Re.current)==null||x.abort(),Re.current=null,(M=K.current)==null||M.cancel(),sl(),v){const L=ct.current??Ze.current;fetch(`/api/sessions/${encodeURIComponent(L)}/cancel`,{method:"POST",headers:tt()}).catch(()=>{})}ct.current=null,!Z.current&&B.current&&Le("listening")},fn=()=>{var v;Nc(!!Re.current,!!((v=K.current)!=null&&v.busy),G.current)&&Rn()},qt=v=>{var O,z,oe;if(!B.current&&!D.current)return;B.current=!1,D.current=!1,pt.current=!1,_n(!1),we.current++,vt(),le.current.deactivate(),Z.current=!1,Rn(),gt(),ne.current.reset(),(O=se.current)==null||O.reset(),se.current=null,(z=fe.current)==null||z.reset(),fe.current=null,K.current=null;const x=J.current;J.current=null,x==null||x.destroy().catch(()=>{});const M=re.current;re.current=null,M==null||M.getTracks().forEach(Se=>{Se.onended=null,Se.stop()});const L=q.current;q.current=null,(oe=me.current)==null||oe.disconnect(),me.current=null,L&&L.state!=="closed"&&L.close().catch(()=>{}),kr(),Pt(v)},ql=()=>{var L,O,z;if(!B.current)return;B.current=!1,pt.current=!1,_n(!1),we.current++,vt(),le.current.deactivate(),Z.current=!1,Rn(),gt(),ne.current.reset(),(L=se.current)==null||L.reset(),se.current=null,(O=fe.current)==null||O.reset(),fe.current=null,K.current=null;const v=J.current;J.current=null,v==null||v.destroy().catch(()=>{});const x=re.current;re.current=null,x==null||x.getTracks().forEach(oe=>{oe.onended=null,oe.stop()});const M=q.current;q.current=null,(z=me.current)==null||z.disconnect(),me.current=null,M&&M.state!=="closed"&&M.close().catch(()=>{}),kr(),Pt("Voice session moved to another tab. Tap the shape to reconnect.")},Yl=async(v,x)=>{const M=await fetch("/api/voice/transcribe",{method:"POST",headers:{"Content-Type":"audio/wav",...tt()},body:lp(v),signal:x}),L=await M.json();if(!M.ok)throw new Error(L.error??"Transcription failed.");return String(L.text??"").trim()},Gl=async(v,x)=>{const M=q.current;if(!M)throw new Error("Audio output is not ready.");const L=Symbol("playback"),O=rt=>{$.current=v.trim(),bn(rt,L)},z=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...tt()},body:JSON.stringify({text:v,...ue.current?{voice:ue.current}:{}}),signal:x});if(z.headers.get("x-voice-fallback")==="configured"&&(ue.current=void 0,Pc()),!z.ok)throw new Error((await z.json().catch(()=>({}))).error??"Speech generation failed.");const oe=await z.arrayBuffer();x.throwIfAborted();const Se=await M.decodeAudioData(oe);x.throwIfAborted();const Fe=Ec(Se,M,me.current??M.destination,O),ke=(async rt=>{try{await Fe(rt)}finally{sl(L),Nt()}});return ke.completed=Fe.completed,ke},dn=()=>{he(null),ve(!1)},xr=(v,x)=>{he({x:v,y:x}),ve(!1)},Yt=()=>{an.current!==null&&window.clearTimeout(an.current),an.current=null,Pn.current=null},ro=v=>{if(ae||de){Qt.current=Date.now()+1e3,Yt();return}if(v.pointerType!=="touch")return;Yt();const{clientX:x,clientY:M,pointerId:L}=v;Pn.current={pointerId:L,x,y:M},an.current=window.setTimeout(()=>{an.current=null,Pn.current=null,Qt.current=Date.now()+1e3,xr(x,M)},kp)},lo=v=>{const x=Pn.current;!x||x.pointerId!==v.pointerId||Math.hypot(v.clientX-x.x,v.clientY-x.y)>10&&Yt()},Ne=()=>{var x;(x=Ct.current)==null||x.abort(),Ct.current=null,Tn.current=null;const v=Ot.current;Ot.current=null,v&&v.state!=="closed"&&v.close().catch(()=>{}),Zn(null)},io=async()=>{if(!Je||wr)return;Ne();const v=new AbortController;Ct.current=v;const x=new AudioContext;Ot.current=x,Ht(""),Zn(Je);try{await x.resume();const M=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...tt()},body:JSON.stringify({text:xp,voice:Je}),signal:v.signal});if(!M.ok)throw new Error((await M.json().catch(()=>({}))).error??"Voice preview failed.");const L=await M.arrayBuffer();v.signal.throwIfAborted();const O=await x.decodeAudioData(L);v.signal.throwIfAborted();const z=Ec(O,x,x.destination,()=>{});if(Ct.current!==v)return;Tn.current=z,await z(v.signal)}catch(M){!(M instanceof DOMException&&M.name==="AbortError")&&Ct.current===v&&Ht(M instanceof Error?M.message:"Voice preview failed.")}finally{Ct.current===v&&(Ct.current=null),Tn.current=null,Ot.current===x&&(Ot.current=null,x.state!=="closed"&&x.close().catch(()=>{})),Ct.current===null&&Zn(null)}},ul=v=>{var M;(M=Kt.current)==null||M.abort();const x=new AbortController;Kt.current=x,Cn(!0),Ht(""),Gn(""),fetch("/api/voice/voices",{headers:tt(),signal:x.signal}).then(async L=>{const O=await L.json();if(!L.ok)throw new Error(typeof O.current=="string"?O.current:"Could not load voices.");const z=Array.isArray(O.voices)?O.voices.filter(ke=>typeof ke=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(ke)):[],oe=typeof O.current=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(O.current)?O.current:"";if(Kt.current!==x||x.signal.aborted)return;const Se=v??Jr(),Fe=Se&&(!z.length||z.includes(Se))?Se:"";ft(z),Hl(oe),mr(Fe),qn(Fe||oe||z[0]||""),Gn(O.available===!1&&typeof O.warning=="string"?O.warning:"")}).catch(L=>{!(L instanceof DOMException&&L.name==="AbortError")&&!x.signal.aborted&&Ht(L instanceof Error?L.message:"Could not load voices.")}).finally(()=>{Kt.current===x&&(Kt.current=null,Cn(!1))})},Xl=()=>{if(Je){if(!vp(Je)){Ht("This voice could not be saved.");return}mr(Je),Ht(""),Xn(`${Bl(Je)} will be used from the next reply.`)}},Er=()=>{Pc(),mr(""),qn(un),Ht(""),Xn(`${un?Bl(un):"The profile default"} will be used from the next reply.`)},Zl=async()=>{var x,M;if(!B.current||Z.current||pt.current)return;const v=J.current;if(v){pt.current=!0,vt(),ne.current.reset(),h.current="",(x=se.current)==null||x.reset(),(M=fe.current)==null||M.reset(),gt(),v.setOptions({submitUserSpeechOnPause:!1});try{await le.current.pause(v),(J.current!==v||!B.current||Z.current||!Jn.current)&&(pt.current=!1)}catch(L){if(pt.current=!1,J.current!==v||!B.current||Z.current)return;v.setOptions({submitUserSpeechOnPause:!0}),qt(le.current.isInvalid(v)?"Microphone transition timed out. Tap the shape to reconnect.":L instanceof Error?L.message:"Could not pause the microphone for settings.")}}},Jl=async()=>{if(!pt.current)return;const v=J.current;if(pt.current=!1,!(!v||!B.current||Z.current))try{await le.current.start(v),J.current===v&&B.current&&!Z.current&&(v.setOptions({submitUserSpeechOnPause:!0}),Nt())}catch(x){if(J.current!==v||!B.current||Z.current)return;v.setOptions({submitUserSpeechOnPause:!0}),qt(le.current.isInvalid(v)?"Microphone transition timed out. Tap the shape to reconnect.":x instanceof Error?x.message:"Could not resume the microphone after settings.")}},_r=v=>{const x=Ke.current,{prefix:M}=$l(Ze.current);if(x){Ze.current=`${M}${x}:${v}`;return}fetch("/api/sessions",{headers:tt()}).then(hr).then(async L=>{if(!L.ok)return;const z=(await L.json()).sessions.find(oe=>oe.id===v&&$l(oe.key).prefix===M);z&&(Ze.current=z.key,Ke.current=z.harness,I.current&&xn({harness:z.harness,title:z.title,cwd:z.cwd,host:z.host}))}).catch(()=>{})},Ft=async v=>{var O,z;const x=++xe.current;let M=!1;const L=new AbortController;Re.current=L,ue.current=Jr(),Le("thinking");try{if(!v||x!==xe.current){Nt();return}$.current="",ue.current=Jr();const oe=Ze.current;ct.current=oe;const Se=await fetch(`/api/sessions/${encodeURIComponent(oe)}/chat`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...tt()},body:JSON.stringify({conversationId:at.current,message:v,...o&&$l(oe).inner.startsWith("new:")?{cwd:o}:{}}),signal:L.signal});if(hr(Se),!Se.ok)throw new Error((await Se.json().catch(()=>({}))).error??"Chat request failed.");let Fe="";if(await Np(Se,ke=>{var rt,pn;if(x===xe.current)switch(ke.type){case"session":_r(ke.id);return;case"status":je.current=!0,Le("running"),Yn(ke.message);return;case"tool":je.current=!0,Le("running"),Yn(`Using ${ke.name}…`);return;case"delta":{je.current&&(je.current=!1,Le("thinking")),Fe+=ke.text;const Ae=Cc(Fe,!1,!M);Fe=Ae.rest,Ae.chunks.length&&(M=!0,(rt=K.current)==null||rt.enqueue(Ae.chunks));return}case"notice":Yn(ke.message),M=!0,(pn=K.current)==null||pn.enqueue([ke.message]);return;case"error":throw new Error(ke.message);case"done":return}}),x===xe.current){const ke=Cc(Fe,!0,!M);ke.chunks.length&&(M=!0,(O=K.current)==null||O.enqueue(ke.chunks))}}catch(oe){if(oe instanceof pr){I.current&&vr(!0);return}!(oe instanceof DOMException&&oe.name==="AbortError")&&x===xe.current&&(Pt(oe instanceof Error?oe.message:"Voice conversation failed."),M||(z=K.current)==null||z.enqueue(["Sorry, I could not answer that. Please try again."]))}finally{Re.current===L&&(Re.current=null,ct.current=null),je.current=!1,I.current&&Yn(""),Nt()}},al=async()=>{var pn;if(B.current||D.current)return;D.current=!0;const v=++Me.current;let x=null,M=null,L=null,O=null,z=null,oe=null,Se=null,Fe=null;const ke=++we.current,rt=()=>{if(!I.current||we.current!==ke||Me.current!==v)throw new DOMException("Voice startup was cancelled.","AbortError")};le.current.beginSession();try{if(!window.isSecureContext||!((pn=navigator.mediaDevices)!=null&&pn.getUserMedia))throw new Error("Microphone access requires HTTPS or localhost.");if(O=await mp(ql),!O)throw new Cp;rt(),R(""),_n(!1),Le("thinking"),x=new AudioContext,await x.resume(),rt(),z=x.createGain(),z.gain.value=1,z.connect(x.destination),oe=new Kd(Gl,Nt,ce=>{sl(),Pt(ce instanceof Error?ce.message:"Speech playback failed.")}),Se=new Wd(Yl,()=>{}),Fe=new Ad(async(ce,_e)=>{const We=await((Se==null?void 0:Se.finish(ce.samples,_e))??Yl(ce.samples,_e));return ce.possibleEcho?Id(We,ce.possibleEcho):We},Ft,ce=>Pt(ce instanceof Error?ce.message:"Voice transcription failed."),Nt),M=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),rt();const Ae=M,yt={getStream:async()=>Ae,pauseStream:async()=>{},resumeStream:async()=>Ae,...qd,submitUserSpeechOnPause:!0,onSpeechStart:()=>{var We,lt,Gt;if(!qe(L,ke))return;(We=fe.current)==null||We.speechStarted();const ce=Nc(!!Re.current,!!((lt=K.current)!=null&&lt.busy),G.current),_e=ne.current.speechStart(ce);h.current=G.current?$.current:"",_e.begin&&((Gt=se.current)==null||Gt.begin()),_e.duck&&Sr(),bl(L,ke)},onSpeechRealStart:()=>{var _e;if(!qe(L,ke))return;const ce=ne.current.speechRealStart();ce.accepted&&(ce.interrupt&&fn(),gt(),(_e=se.current)==null||_e.confirm(),bl(L,ke),R(""),Le("hearing"))},onVADMisfire:()=>{var ce,_e;qe(L,ke)&&(vt(),ne.current.reset(),h.current="",(ce=se.current)==null||ce.discard(),(_e=fe.current)==null||_e.speechDiscarded(),gt(),Z.current||Nt())},onFrameProcessed:(ce,_e)=>{var We;qe(L,ke)&&((We=se.current)==null||We.frame(ce.isSpeech,_e),E(Math.min(1,Math.sqrt(_e.reduce((lt,Gt)=>lt+Gt*Gt,0)/_e.length)*7)))},onSpeechEnd:ce=>{var We,lt,Gt,ti;if(!qe(L,ke))return;if(vt(),!ne.current.speechEnd()){h.current="",(We=se.current)==null||We.discard(),(lt=fe.current)==null||lt.speechDiscarded(),gt(),Nt();return}gt(),(Gt=se.current)==null||Gt.end(ce);const _e=h.current;h.current="",(ti=fe.current)==null||ti.speechEnded({samples:ce,possibleEcho:_e})}};let Tt=!1;if(!Tc)try{const{MicVAD:ce}=await zc(async()=>{const{MicVAD:_e}=await import("./index-CeWj4ejR.js").then(We=>We.i);return{MicVAD:_e}},__vite__mapDeps([0,1]));rt(),L=await ce.new({model:"v5",audioContext:x,startOnLoad:!1,baseAssetPath:"/voice-assets/",onnxWASMBasePath:"/voice-assets/",ortConfig:_e=>{_e.env.wasm.numThreads=1},...yt})}catch(ce){if(ce instanceof DOMException&&ce.name==="AbortError")throw ce;Tc=!0,L=null}L||(Tt=!0,L=await Gs.new({audioContext:x,...yt})),rt(),_n(Tt),await le.current.start(L),rt();const Rt=L,$e=x;if(!Rt||!$e)throw new Error("Voice startup did not finish.");_.current=O,q.current=$e,me.current=z,K.current=oe,se.current=Se,fe.current=Fe,re.current=Ae,J.current=Rt,B.current=!0;const Mn=()=>{var ce,_e,We;if(!(re.current!==Ae||!B.current)){B.current=!1,pt.current=!1,_n(!1),we.current++,vt(),le.current.deactivate(),Z.current=!1,Rn(),gt(),ne.current.reset(),K.current=null,(ce=se.current)==null||ce.reset(),se.current=null,(_e=fe.current)==null||_e.reset(),fe.current=null,J.current===Rt&&(J.current=null),re.current===Ae&&(re.current=null),q.current===$e&&(q.current=null),(We=me.current)==null||We.disconnect(),me.current=null;for(const lt of Ae.getTracks())lt.onended=null,lt.readyState==="live"&&lt.stop();Rt.destroy().catch(()=>{}),$e.state!=="closed"&&$e.close().catch(()=>{}),kr(),Pt("Microphone disconnected. Tap the shape to reconnect.")}};for(const ce of Ae.getAudioTracks())ce.onended=Mn;let Dt=!1;const Rr=()=>{if(!(q.current!==$e||!B.current)){if($e.state==="running"||$e.state==="closed"){Dt=!1;return}$e.resume().catch(()=>{}).then(()=>{q.current!==$e||!B.current||$e.state==="running"||Dt||(Dt=!0,Pt("The device paused audio. Tap the shape to keep talking."))})}};$e.onstatechange=Rr;const ei=window.setInterval(()=>{if(q.current!==$e||$e.state==="closed"){window.clearInterval(ei),document.removeEventListener("visibilitychange",Rr);return}Rr()},2e3);if(document.addEventListener("visibilitychange",Rr),!Ae.getAudioTracks().some(ce=>ce.readyState==="live")){Mn();return}Le("listening"),Jn.current&&Zl()}catch(Ae){const yt=we.current===ke&&Me.current===v;yt&&(we.current++,vt(),le.current.deactivate(),J.current===L&&(J.current=null),re.current===M&&(re.current=null),q.current===x&&(q.current=null),me.current===z&&(me.current=null),K.current===oe&&(K.current=null),se.current===Se&&(se.current=null),fe.current===Fe&&(fe.current=null)),oe==null||oe.cancel(),Se==null||Se.reset(),Fe==null||Fe.reset(),z==null||z.disconnect(),L&&await L.destroy().catch(()=>{}),M==null||M.getTracks().forEach(Tt=>Tt.stop()),x&&x.state!=="closed"&&await x.close().catch(()=>{}),_.current===O&&(_.current=null),O==null||O.release(),yt&&!(Ae instanceof DOMException&&Ae.name==="AbortError")&&Pt(Ae instanceof Error?Ae.message:"Could not start the microphone.")}finally{Me.current===v&&(D.current=!1)}},qe=(v,x)=>(B.current||D.current)&&!Jn.current&&$d(we.current,x,J.current,v,Z.current,le.current.acceptsCallbacks),nn=(v,x,M)=>v!==null&&J.current===v&&B.current&&Z.current===x&&(M===void 0||we.current===M),Cr=(v,x,M)=>nn(v,x,M)&&v!==null&&!le.current.isInvalid(v),bl=(v,x)=>{vt(),v&&(U.current=window.setTimeout(()=>{U.current=null,qe(v,x)&&le.current.flush(v).then(()=>{Cr(v,!1,x)}).catch(M=>{nn(v,!1,x)&&(le.current.isInvalid(v)?qt("Microphone transition timed out. Tap the shape to reconnect."):Pt(M instanceof Error?M.message:"Microphone recovery failed."))})},Sp))},Nr=async()=>{var x,M,L,O;if(!B.current){D.current||al();return}const v=q.current;if(v&&v.state!=="running"&&v.state!=="closed"&&(await v.resume().catch(()=>{}),v.state==="running")){Le(Z.current?"muted":"listening");return}if(Z.current=!Z.current,Z.current){vt(),Rn(),gt(),ne.current.reset(),(x=se.current)==null||x.reset(),(M=fe.current)==null||M.reset(),(L=re.current)==null||L.getTracks().forEach(oe=>{oe.enabled=!1});const z=J.current;if(!nn(z,!0))return;z==null||z.setOptions({submitUserSpeechOnPause:!1});try{if(z&&await le.current.pause(z),!Cr(z,!0)){nn(z,!0)&&z&&le.current.isInvalid(z)&&qt("Microphone transition timed out. Tap the shape to reconnect.");return}Le("muted")}catch(oe){if(!nn(z,!0))return;z&&le.current.isInvalid(z)?qt("Microphone transition timed out. Tap the shape to reconnect."):Pt(oe instanceof Error?oe.message:"Could not pause the microphone.")}}else{(O=re.current)==null||O.getTracks().forEach(oe=>{oe.enabled=!0});const z=J.current;if(!nn(z,!1))return;try{if(z){if(await le.current.start(z),!Cr(z,!1)){nn(z,!1)&&le.current.isInvalid(z)&&qt("Microphone transition timed out. Tap the shape to reconnect.");return}z.setOptions({submitUserSpeechOnPause:!0})}if(!Cr(z,!1))return;Le("listening")}catch(oe){if(!nn(z,!1))return;z&&le.current.isInvalid(z)?qt("Microphone transition timed out. Tap the shape to reconnect."):Pt(oe instanceof Error?oe.message:"Could not resume the microphone.")}}},Pr=()=>{if(dn(),R(""),B.current||D.current){qt(""),window.setTimeout(()=>{!B.current&&!D.current&&al()},0);return}al()};if(P.useEffect(()=>{const v=new AbortController;return fetch("/api/sessions",{headers:tt(),signal:v.signal}).then(hr).then(async x=>{if(!x.ok)return;const L=(await x.json()).sessions.find(O=>O.key===a);L&&!v.signal.aborted&&(Ke.current=L.harness,xn({harness:L.harness,title:L.title,cwd:L.cwd,host:L.host}))}).catch(x=>{x instanceof pr&&!v.signal.aborted&&vr(!0)}),()=>v.abort()},[a]),P.useEffect(()=>{let v=!1;const x=()=>{fetch("/api/health",{headers:tt()}).then(async L=>{const O=await L.json().catch(()=>({}));if(v)return;const z=O.speech??{};Ql({ready:z.ready!==!1,downloading:z.downloading===!0,progress:typeof z.progress=="number"?z.progress:void 0,error:typeof z.error=="string"?z.error:void 0})}).catch(()=>{})};x();const M=window.setInterval(x,Ep);return()=>{v=!0,window.clearInterval(M)}},[]),P.useEffect(()=>{var v;if(Jn.current=de,de?Zl():Jl(),!de){wr&&Ne(),(v=Kt.current)==null||v.abort(),Kt.current=null;return}Ht(""),Xn(""),ul(Jr()??void 0)},[de]),P.useEffect(()=>{if(!ae&&!de)return;const v=M=>{var O,z;const L=M.target;L instanceof Node&&((O=cn.current)!=null&&O.contains(L)||(z=il.current)!=null&&z.contains(L))||dn()},x=M=>{M.key==="Escape"&&(M.preventDefault(),dn())};return document.addEventListener("pointerdown",v),document.addEventListener("keydown",x),()=>{document.removeEventListener("pointerdown",v),document.removeEventListener("keydown",x)}},[ae,de]),P.useEffect(()=>{de&&window.setTimeout(()=>{var v;return(v=ol.current)==null?void 0:v.focus()},0)},[de]),P.useEffect(()=>()=>{var v,x,M,L,O,z,oe,Se;I.current=!1,nt.current++,ze.current!==null&&window.clearTimeout(ze.current),ze.current=null,B.current=!1,Yt(),(v=Kt.current)==null||v.abort(),(x=Ct.current)==null||x.abort(),Ct.current=null,Tn.current=null,Ot.current&&Ot.current.state!=="closed"&&Ot.current.close().catch(()=>{}),Ot.current=null,we.current++,vt(),le.current.deactivate(),Rn(),gt(),ne.current.reset(),(M=se.current)==null||M.reset(),(L=fe.current)==null||L.reset(),fe.current=null,(O=J.current)==null||O.destroy(),(z=re.current)==null||z.getTracks().forEach(Fe=>{Fe.onended=null,Fe.stop()}),(oe=q.current)==null||oe.close(),(Se=me.current)==null||Se.disconnect(),me.current=null,kr()},[]),En)return g.jsx($c,{});const er=B.current?u==="muted"?"Unmute microphone":"Mute microphone":"Start voice conversation",Tr=ae?Math.max(12,Math.min(ae.x,window.innerWidth-170)):0,oo=ae?Math.max(12,Math.min(ae.y,window.innerHeight-68)):0,cl=el||un,jn=dt.ready,fl=dt.ready?"Ready":dt.downloading?`Downloading voice models…${typeof dt.progress=="number"?` ${Math.round(dt.progress)}%`:""}`:"Offline";return g.jsxs("main",{className:"voice-page","data-state":u,style:{"--level":p},children:[g.jsxs("header",{className:"room-header",children:[g.jsx("a",{className:"room-header__back",href:"/","aria-label":"Back to hub",children:"←"}),g.jsxs("span",{className:"room-header__title",children:[Wt.harness?no[Wt.harness]:"Meldivo"," · ",Wt.title]}),(Wt.host||Wt.cwd)&&g.jsx("span",{className:"room-header__cwd",children:[Wt.host,Wt.cwd].filter(Boolean).join(" · ")})]}),tl&&g.jsx("p",{className:"room-status",role:"status",children:tl}),Kl&&g.jsx("p",{className:"room-status voice-fallback-notice",role:"status",children:"Using basic voice detection"}),!dt.ready&&g.jsx("p",{className:"voice-health",role:"status",children:dt.error||fl}),g.jsxs("button",{className:"voice-shape",type:"button",onClick:()=>{if(Date.now()<Qt.current){Qt.current=0;return}if(ae||de){dn();return}Nr()},onPointerDown:ro,onPointerMove:lo,onPointerUp:Yt,onPointerCancel:Yt,onPointerLeave:Yt,onLostPointerCapture:Yt,onContextMenu:v=>{v.preventDefault(),xr(v.clientX,v.clientY)},onKeyDown:v=>{if(v.key==="ContextMenu"||v.key==="F10"&&v.shiftKey){v.preventDefault();const x=v.currentTarget.getBoundingClientRect();xr(x.left+x.width/2,x.top+x.height/2)}},"aria-label":er,"aria-haspopup":"menu","aria-expanded":!!(ae||de),children:[g.jsx("span",{className:"voice-shape__halo"}),g.jsx("span",{className:"voice-shape__ring voice-shape__ring--one"}),g.jsx("span",{className:"voice-shape__ring voice-shape__ring--two"}),g.jsx("span",{className:"voice-shape__core"})]}),ae&&g.jsx("div",{ref:cn,className:"voice-context-menu",role:"menu","aria-label":"Voice options",style:{left:Tr,top:oo},children:g.jsx("button",{type:"button",role:"menuitem",onClick:()=>{he(null),ve(!0)},children:"Settings"})}),de&&g.jsxs("div",{ref:il,className:"voice-settings",role:"dialog","aria-modal":"false","aria-labelledby":"voice-settings-title",onKeyDown:v=>{v.key==="Escape"&&(v.preventDefault(),dn())},children:[g.jsxs("div",{className:"voice-settings__header",children:[g.jsx("h2",{id:"voice-settings-title",children:"Voice"}),g.jsx("button",{className:"voice-settings__close",type:"button",onClick:dn,"aria-label":"Close voice settings",children:"×"})]}),g.jsxs("p",{id:"tts-provider-status",className:`voice-settings__availability voice-settings__availability--${dt.ready?"ready":dt.downloading?"checking":"offline"}`,role:"status",children:[g.jsx("span",{"aria-hidden":"true"}),fl]}),dt.error&&g.jsx("p",{className:"voice-settings__availability-note",children:dt.error}),gr&&g.jsx("p",{className:"voice-settings__availability-note",children:gr}),yr&&g.jsx("p",{className:"voice-settings__muted",children:"Loading voices…"}),!yr&&Ee.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("label",{className:"voice-settings__label",htmlFor:"voice-choice",children:"Choose a voice"}),g.jsxs("div",{className:"voice-settings__choice",children:[g.jsx("select",{ref:ol,id:"voice-choice",value:Je,onChange:v=>{Ne(),qn(v.target.value),Ht(""),Xn("")},"aria-describedby":"voice-current",children:Ee.map(v=>g.jsx("option",{value:v,children:Bl(v)},v))}),g.jsx("button",{className:"voice-settings__play",type:"button",onClick:()=>{io()},disabled:!Je||!jn||!!wr,"aria-label":`Preview ${Je||"voice"}`,"aria-describedby":"tts-provider-status",title:jn?void 0:"Wait for voice models to be ready.",children:wr?"…":"▶"})]}),g.jsxs("p",{id:"voice-current",className:"voice-settings__current",children:["Current: ",cl?Bl(cl):"profile default"]}),g.jsxs("div",{className:"voice-settings__actions",children:[g.jsx("button",{type:"button",onClick:Xl,disabled:!Je||!jn||Je===cl,"aria-describedby":"tts-provider-status",title:jn?void 0:"Wait for voice models to be ready.",children:"Use this voice"}),g.jsx("button",{type:"button",onClick:Er,disabled:!el,children:"Restore default"})]})]}),!yr&&!Ee.length&&g.jsx(g.Fragment,{children:g.jsx("p",{className:"voice-settings__muted",children:"No selectable voices are configured."})}),Nn&&g.jsx("p",{className:"voice-settings__error",role:"alert",children:Nn}),nl&&g.jsx("p",{className:"voice-settings__notice",role:"status",children:nl})]}),rl&&g.jsx("div",{className:"voice-onboarding",role:"dialog","aria-modal":"true","aria-labelledby":"voice-onboarding-title",children:g.jsxs("div",{className:"voice-onboarding__card",children:[g.jsx("h2",{id:"voice-onboarding-title",children:"Welcome"}),g.jsx("p",{children:"Tap to talk · hold or right-click for settings."}),g.jsx("button",{type:"button",onClick:()=>{try{window.localStorage.setItem(Bc,"true")}catch{}ll(!1)},children:"OK"})]})}),k&&g.jsxs("div",{className:"voice-error",role:"alert",title:k,children:[g.jsx("span",{children:k}),g.jsx("button",{className:"voice-error__reconnect",type:"button",onClick:Pr,children:"Reconnect"})]})]})}const Tp=5e3,Rp=5e3;function Wl(a){const o=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(a);return o?o[2]?`~${o[2]}`:"~":a}function Wc(a){const o=Math.max(0,Math.round((Date.now()-a)/1e3));if(o<5)return"just now";if(o<60)return`${o}s ago`;const u=Math.round(o/60);if(u<60)return`${u}m ago`;const y=Math.round(u/60);return y<24?`${y}h ago`:`${Math.round(y/24)}d ago`}function Hc(a,o){window.location.href=`/?session=${encodeURIComponent(a)}${o?`&folder=${encodeURIComponent(o)}`:""}`}function jp(a){return a.busy?{className:"hub-dot hub-dot--busy",label:"busy"}:a.open?{className:"hub-dot hub-dot--open",label:"open in terminal"}:{className:"hub-dot hub-dot--idle",label:"idle"}}function Mp({onClose:a}){var D;const[o,u]=P.useState(null),[y,p]=P.useState(""),[E,k]=P.useState(!1),[R,A]=P.useState(""),I=()=>{p(""),fetch("/api/remote",{headers:tt()}).then(hr).then(async G=>{if(!G.ok)throw new Error("Could not load phone access options.");u(await G.json())}).catch(G=>{if(G instanceof pr)throw G;p(G instanceof Error?G.message:"Could not load phone access options.")})};P.useEffect(I,[]),P.useEffect(()=>{var re;const G=(re=o==null?void 0:o.active)==null?void 0:re.url;if(!G){A("");return}let J=!1;return zc(()=>import("./browser-CujOq0-h.js").then(q=>q.b),__vite__mapDeps([2,1])).then(async q=>{const me=await q.toDataURL(G,{margin:1,width:200});J||A(me)}).catch(()=>{J||A("")}),()=>{J=!0}},[(D=o==null?void 0:o.active)==null?void 0:D.url]);const Z=G=>{k(!0),p(""),fetch("/api/remote",{method:"POST",headers:{"Content-Type":"application/json",...tt()},body:JSON.stringify({id:G})}).then(hr).then(async J=>{if(!J.ok)throw new Error((await J.json().catch(()=>({}))).error??"Could not enable phone access.");I()}).catch(J=>{if(J instanceof pr)throw J;p(J instanceof Error?J.message:"Could not enable phone access.")}).finally(()=>k(!1))},B=()=>{k(!0),p(""),fetch("/api/remote",{method:"DELETE",headers:tt()}).then(hr).then(G=>{if(!G.ok)throw new Error("Could not turn off phone access.");I()}).catch(G=>{if(G instanceof pr)throw G;p(G instanceof Error?G.message:"Could not turn off phone access.")}).finally(()=>k(!1))};return g.jsxs("div",{className:"hub-remote",role:"dialog","aria-labelledby":"hub-remote-title",children:[g.jsxs("div",{className:"hub-remote__header",children:[g.jsx("h2",{id:"hub-remote-title",children:"Phone access"}),g.jsx("button",{className:"hub-remote__close",type:"button",onClick:a,"aria-label":"Close phone access",children:"×"})]}),!o&&!y&&g.jsx("p",{className:"hub-muted",children:"Loading…"}),y&&g.jsx("p",{className:"hub-error",role:"alert",children:y}),(o==null?void 0:o.active)&&g.jsxs("div",{className:"hub-remote__active",children:[g.jsx("p",{className:"hub-remote__url",children:o.active.url}),R&&g.jsx("img",{className:"hub-remote__qr",src:R,alt:"QR code for phone access URL"}),g.jsx("button",{type:"button",onClick:B,disabled:E,children:"Turn off"})]}),o&&!o.active&&g.jsxs(g.Fragment,{children:[g.jsx("ul",{className:"hub-remote__options",children:o.options.map(G=>g.jsx("li",{children:g.jsxs("button",{type:"button",disabled:!G.ready||E,onClick:()=>Z(G.id),children:[G.label,G.ready?"":" (not ready)"]})},G.id))}),!o.options.some(G=>G.ready)&&o.guide&&(/^https?:\/\//.test(o.guide)?g.jsx("p",{className:"hub-muted",children:g.jsx("a",{href:o.guide,target:"_blank",rel:"noreferrer",children:"Set up phone access"})}):g.jsx("p",{className:"hub-muted",children:o.guide}))]})]})}const jc="meldivo.machine",zp=5;function Lp(a){return a.id?`@${a.id}/`:""}function Op({host:a,sessions:o,selected:u,onSelect:y}){const p=o.filter(A=>A.open).length,E=o.some(A=>A.busy),k=o.reduce((A,I)=>Math.max(A,I.updatedAt),0),R=a.online?E?"hub-dot--busy":"hub-dot--online":"hub-dot--idle";return g.jsxs("button",{type:"button",role:"tab","aria-selected":u,className:`hub-machine${u?" hub-machine--selected":""}${a.online?"":" hub-machine--offline"}`,onClick:y,children:[g.jsxs("span",{className:"hub-machine__name",children:[g.jsx("span",{className:`hub-dot ${R}`,"aria-hidden":"true"}),a.name]}),g.jsx("span",{className:"hub-machine__meta",children:a.online?g.jsxs(g.Fragment,{children:[o.length," session",o.length===1?"":"s",p>0&&g.jsxs(g.Fragment,{children:[" · ",p," open"]})]}):"offline"}),a.online&&k>0&&g.jsxs("span",{className:"hub-machine__meta",children:["active ",Wc(k)]})]})}const Bs=1440*60*1e3;function Fp(a,o){const u=Date.now()-a;return o==="today"?new Date(a).toDateString()===new Date().toDateString():o==="week"?u<=7*Bs:o==="month"?u<=30*Bs:o==="older"?u>30*Bs:!0}function Dp(a,o){const u=[...a];return o==="title"?u.sort((y,p)=>(y.title||"").localeCompare(p.title||"",void 0,{sensitivity:"base"})):u.sort((y,p)=>o==="oldest"?y.updatedAt-p.updatedAt:p.updatedAt-y.updatedAt),u}function Ip({session:a}){const o=jp(a);return g.jsx("li",{children:g.jsxs("button",{type:"button",className:"hub-session",onClick:()=>Hc(a.key),children:[g.jsx("span",{className:o.className,"aria-hidden":"true",title:o.label}),g.jsxs("span",{className:"hub-session__body",children:[g.jsx("span",{className:"hub-session__title",children:a.title||"(untitled)"}),g.jsxs("span",{className:"hub-session__meta",children:[g.jsx("span",{className:"hub-session__badge",children:no[a.harness]}),g.jsx("span",{className:"hub-session__time",children:Wc(a.updatedAt)})]}),a.open&&g.jsx("span",{className:"hub-session__hint",children:"open in a terminal · continues as a voice copy"})]})]})})}function Qc(a,o){if(o.length===0)return!0;const u=`${a.title} ${Wl(a.cwd)} ${no[a.harness]}`.toLowerCase();return o.every(y=>u.includes(y))}function Kc(a){return a.trim().toLowerCase().split(/\s+/).filter(Boolean)}function Ap({cwd:a,sessions:o,total:u}){const[y,p]=P.useState(""),E=Kc(y),k=o.filter(I=>Qc(I,E)),R=Wl(a),A=R==="~"?"Home folder":R||"(no folder)";return g.jsxs("section",{className:"hub-folder","aria-label":A,children:[g.jsxs("h3",{className:"hub-folder__title",children:[g.jsx("span",{children:A}),g.jsx("span",{className:"hub-folder__count",children:o.length===u?u:`${o.length} of ${u}`})]}),o.length>zp&&g.jsx("input",{type:"search",className:"hub-folder__search",placeholder:`Search in ${A}`,value:y,onChange:I=>p(I.target.value),"aria-label":`Search sessions in ${A}`,autoComplete:"off"}),k.length===0?g.jsx("p",{className:"hub-muted hub-folder__none",children:"No sessions here match."}):g.jsx("ul",{className:"hub-sessions hub-folder__list",children:k.map(I=>g.jsx(Ip,{session:I},I.key))})]})}function Up({host:a,folders:o,agent:u,folder:y,onClose:p}){var Z,B;const E=[...a.harnesses].filter(D=>D.available).sort((D,G)=>qs.indexOf(D.id)-qs.indexOf(G.id)),[k,R]=P.useState(((Z=E.find(D=>D.id===u))==null?void 0:Z.id)??((B=E[0])==null?void 0:B.id)),[A,I]=P.useState(y==="all"?"":y);return E.length===0?g.jsx("div",{className:"hub-newchat",children:g.jsxs("p",{className:"hub-muted",children:["No coding agents are installed on ",a.name,"."]})}):g.jsxs("div",{className:"hub-newchat",role:"group","aria-label":"New chat",children:[g.jsxs("div",{className:"hub-newchat__row",children:[g.jsx("span",{className:"hub-newchat__label",children:"Agent"}),g.jsx("div",{className:"hub-chips",children:E.map(D=>g.jsx("button",{type:"button",className:`hub-chip${k===D.id?" hub-chip--on":""}`,"aria-pressed":k===D.id,onClick:()=>R(D.id),children:D.label},D.id))})]}),g.jsxs("label",{className:"hub-newchat__row",children:[g.jsx("span",{className:"hub-newchat__label",children:"Folder"}),g.jsxs("select",{className:"hub-select hub-select--wide",value:A,onChange:D=>I(D.target.value),children:[g.jsx("option",{value:"",children:"Home folder"}),o.map(D=>g.jsx("option",{value:D,children:Wl(D)},D))]})]}),g.jsxs("div",{className:"hub-newchat__actions",children:[g.jsx("button",{type:"button",className:"hub-more",onClick:p,children:"Cancel"}),g.jsx("button",{type:"button",className:"hub-primary",disabled:!k,onClick:()=>k&&Hc(`${Lp(a)}new:${k}`,A||void 0),children:"Start talking"})]})]})}function Vp({host:a,sessions:o}){const[u,y]=P.useState(""),[p,E]=P.useState("all"),[k,R]=P.useState("all"),[A,I]=P.useState("any"),[Z,B]=P.useState("newest"),[D,G]=P.useState(!1),[J,re]=P.useState(!1);if(P.useEffect(()=>{y(""),E("all"),R("all"),I("any"),B("newest"),G(!1),re(!1)},[a.id]),!a.online)return g.jsxs("p",{className:"hub-empty",children:[a.name," is offline. Its sessions appear here as soon as it reconnects."]});const q=new Map;for(const U of o)q.set(U.cwd,Math.max(q.get(U.cwd)??0,U.updatedAt));const me=[...q.entries()].sort((U,ze)=>ze[1]-U[1]).map(([U])=>U),Re=me.filter(U=>U&&Wl(U)!=="~"),je=qs.filter(U=>o.some(ze=>ze.harness===U)),K=Kc(u),se=Dp(o.filter(U=>p!=="all"&&U.harness!==p||k!=="all"&&U.cwd!==k||D&&!U.open||!Fp(U.updatedAt,A)?!1:Qc(U,K)),Z),fe=o.filter(U=>U.open).length,le=p!=="all"||k!=="all"||A!=="any"||D||K.length>0,we=[];for(const U of se){const ze=we.find(nt=>nt.cwd===U.cwd);ze?ze.sessions.push(U):we.push({cwd:U.cwd,sessions:[U]})}const Me=new Map;for(const U of o)Me.set(U.cwd,(Me.get(U.cwd)??0)+1);return g.jsxs("div",{className:"hub-panel",role:"tabpanel",children:[g.jsxs("div",{className:"hub-search",children:[g.jsx("input",{type:"search",className:"hub-search__input",placeholder:`Search all ${o.length} sessions`,value:u,onChange:U=>y(U.target.value),"aria-label":`Search all sessions on ${a.name}`,autoComplete:"off"}),g.jsx("button",{type:"button",className:"hub-primary","aria-expanded":J,onClick:()=>re(!J),children:J?"Close":"New chat"})]}),J&&g.jsx(Up,{host:a,folders:Re,agent:p,folder:k,onClose:()=>re(!1)}),o.length>0&&g.jsxs("div",{className:"hub-filters",children:[g.jsxs("div",{className:"hub-chips",role:"group","aria-label":"Filter by agent",children:[g.jsx("button",{type:"button",className:`hub-chip${p==="all"?" hub-chip--on":""}`,"aria-pressed":p==="all",onClick:()=>E("all"),children:"All agents"}),je.map(U=>g.jsxs("button",{type:"button",className:`hub-chip${p===U?" hub-chip--on":""}`,"aria-pressed":p===U,onClick:()=>E(p===U?"all":U),children:[no[U]," ",g.jsx("span",{className:"hub-chip__count",children:o.filter(ze=>ze.harness===U).length})]},U)),g.jsxs("button",{type:"button",className:`hub-chip${D?" hub-chip--on":""}`,"aria-pressed":D,disabled:fe===0&&!D,onClick:()=>G(!D),children:["Open now ",g.jsx("span",{className:"hub-chip__count",children:fe})]})]}),g.jsxs("div",{className:"hub-selects",children:[g.jsxs("select",{className:"hub-select",value:k,onChange:U=>R(U.target.value),"aria-label":"Folder",children:[g.jsxs("option",{value:"all",children:["All folders (",me.length,")"]}),me.map(U=>g.jsx("option",{value:U,children:Wl(U)||"(no folder)"},U))]}),g.jsxs("select",{className:"hub-select",value:A,onChange:U=>I(U.target.value),"aria-label":"Date",children:[g.jsx("option",{value:"any",children:"Any time"}),g.jsx("option",{value:"today",children:"Today"}),g.jsx("option",{value:"week",children:"Past 7 days"}),g.jsx("option",{value:"month",children:"Past 30 days"}),g.jsx("option",{value:"older",children:"Older than 30 days"})]}),g.jsxs("select",{className:"hub-select",value:Z,onChange:U=>B(U.target.value),"aria-label":"Sort",children:[g.jsx("option",{value:"newest",children:"Newest first"}),g.jsx("option",{value:"oldest",children:"Oldest first"}),g.jsx("option",{value:"title",children:"Title A–Z"})]})]})]}),o.length===0&&g.jsxs("p",{className:"hub-empty",children:["No sessions on ",a.name," yet. Tap New chat to start one."]}),o.length>0&&se.length===0&&g.jsxs("p",{className:"hub-empty",children:["No sessions match. ",g.jsx("button",{type:"button",className:"hub-link",onClick:()=>{y(""),E("all"),R("all"),I("any"),G(!1)},children:"Clear filters"})]}),le&&se.length>0&&g.jsxs("p",{className:"hub-count",children:[se.length," of ",o.length," sessions"]}),g.jsx("div",{className:"hub-folders",children:we.map(U=>g.jsx(Ap,{cwd:U.cwd,sessions:U.sessions,total:Me.get(U.cwd)??U.sessions.length},`${a.id}|${U.cwd}`))})]})}function $p(){const[a,o]=P.useState(null),[u,y]=P.useState(""),[p,E]=P.useState(!1),[k,R]=P.useState({ready:!0,downloading:!1}),[A,I]=P.useState(!1),[Z,B]=P.useState(()=>{try{return window.localStorage.getItem(jc)}catch{return null}}),D=P.useRef(!0);if(P.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]),P.useEffect(()=>{let K=!1;const se=()=>{fetch("/api/sessions",{headers:tt()}).then(hr).then(async le=>{if(!le.ok)throw new Error("Could not load sessions.");const we=await le.json();K||(o(we),y(""))}).catch(le=>{if(!K){if(le instanceof pr){E(!0);return}y(le instanceof Error?le.message:"Could not load sessions.")}})};se();const fe=window.setInterval(se,Tp);return()=>{K=!0,window.clearInterval(fe)}},[]),P.useEffect(()=>{let K=!1;const se=()=>{fetch("/api/health",{headers:tt()}).then(async le=>{const we=await le.json().catch(()=>({}));if(K)return;const Me=we.speech??{};R({ready:Me.ready!==!1,downloading:Me.downloading===!0,progress:typeof Me.progress=="number"?Me.progress:void 0,error:typeof Me.error=="string"?Me.error:void 0})}).catch(()=>{})};se();const fe=window.setInterval(se,Rp);return()=>{K=!0,window.clearInterval(fe)}},[]),p)return g.jsx($c,{});const G=(a==null?void 0:a.hosts)??(a?[{id:"",name:a.machine,online:!0,harnesses:a.harnesses}]:[]),J=(a==null?void 0:a.sessions)??[],re=K=>J.filter(se=>(se.host??"")===K.id),q=G.filter(K=>K.id!==""||G.length===1||K.harnesses.some(se=>se.available)||re(K).length>0),me=q.find(K=>K.id===Z)??q.find(K=>K.online)??q[0],Re=K=>{B(K);try{window.localStorage.setItem(jc,K)}catch{}},je=k.ready?"Speech ready":k.downloading?`Downloading voice models…${typeof k.progress=="number"?` ${Math.round(k.progress)}%`:""}`:"Speech offline";return g.jsxs("main",{className:"hub-page",children:[g.jsxs("header",{className:"hub-header",children:[g.jsx("h1",{children:q.length>1?"Meldivo":(a==null?void 0:a.machine)??"Meldivo"}),g.jsx("p",{className:`hub-speech-status${k.ready?"":" hub-speech-status--warn"}`,role:"status",children:k.error||je}),g.jsx("button",{type:"button",className:"hub-remote-button",onClick:()=>I(!0),children:"Phone access"})]}),u&&g.jsx("p",{className:"hub-error",role:"alert",children:u}),!a&&!u&&g.jsx("p",{className:"hub-empty",children:"Loading…"}),q.length>1&&g.jsx("nav",{className:"hub-machines",role:"tablist","aria-label":"Machines",children:q.map(K=>g.jsx(Op,{host:K,sessions:re(K),selected:K===me,onSelect:()=>Re(K.id)},K.id||"local"))}),me&&g.jsx(Vp,{host:me,sessions:re(me)}),A&&g.jsx(Mp,{onClose:()=>I(!1)})]})}op();const qc=new URLSearchParams(window.location.search),Mc=qc.get("session");Od.createRoot(document.getElementById("root")).render(Mc?g.jsx(Pp,{sessionKey:Mc,folder:qc.get("folder")??void 0}):g.jsx($p,{}));
79
+ `||a[k]==="—"||k>=Z&&/\s/.test(a[k]))return k+1}return 0}function rp(a,o,u){var p;let y=0;for(;y<a.length;){const E=np(a.slice(y),u)||(o?a.length-y:0);if(!E)return 0;if(y+=E,(((p=Ac(a.slice(0,y).replace(/—/g," ")).match(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu))==null?void 0:p.length)??0)>(u?5:3)||o&&y===a.length)return y}return 0}function Cc(a,o=!1,u=!1){const y=[];let p=0,E=u;for(;p<a.length;){const k=rp(a.slice(p),o,E);if(!k)break;const R=Ac(a.slice(p,p+k).replace(/—$/,"").replace(/—/g,", "));R&&(y.push(R),E=!1),p+=k}return{chunks:y,rest:o?"":a.slice(p)}}function Nc(a,o,u){return a||o||u}function lp(a){const o=new ArrayBuffer(44+a.length*2),u=new DataView(o),y=(p,E)=>[...E].forEach((k,R)=>u.setUint8(p+R,k.charCodeAt(0)));return y(0,"RIFF"),u.setUint32(4,36+a.length*2,!0),y(8,"WAVEfmt "),u.setUint32(16,16,!0),u.setUint16(20,1,!0),u.setUint16(22,1,!0),u.setUint32(24,16e3,!0),u.setUint32(28,32e3,!0),u.setUint16(32,2,!0),u.setUint16(34,16,!0),y(36,"data"),u.setUint32(40,a.length*2,!0),a.forEach((p,E)=>u.setInt16(44+E*2,Math.max(-1,Math.min(1,p))*(p<0?32768:32767),!0)),new Blob([o],{type:"audio/wav"})}function Qs(){const a=globalThis.crypto;if(a&&typeof a.randomUUID=="function")return a.randomUUID();const o=new Uint8Array(16);if(a)a.getRandomValues(o);else for(let u=0;u<o.length;u+=1)o[u]=Math.floor(Math.random()*256);return Array.from(o,u=>u.toString(16).padStart(2,"0")).join("")}const Uc="meldivo.token",ip="meldivo.token";let br;function op(){try{window.localStorage.removeItem(ip)}catch{}const o=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("token");if(o){try{window.sessionStorage.setItem(Uc,o)}catch{}br=o;try{window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}`)}catch{}}}function sp(){if(br!==void 0)return br;try{br=window.sessionStorage.getItem(Uc)}catch{br=null}return br}function tt(){const a=sp();return a?{"X-Meldivo-Token":a}:{}}class pr extends Error{constructor(){super("Unauthorized"),this.name="UnauthorizedError"}}function hr(a){if(a.status===401)throw new pr;return a}const up="voice-assistant-microphone",Ks="voice-assistant-microphone-owner",ap=15e3,cp=5e3,fp=5e3;function to(){try{const a=window.localStorage.getItem(Ks);if(!a)return null;const o=JSON.parse(a);return typeof o.id!="string"||typeof o.expiresAt!="number"?null:{id:o.id,expiresAt:o.expiresAt}}catch{return null}}function dp(){var k;const a=Qs(),o=Date.now(),u=to();if(u&&u.expiresAt>o)return null;const y=()=>window.localStorage.setItem(Ks,JSON.stringify({id:a,expiresAt:Date.now()+ap}));try{if(y(),((k=to())==null?void 0:k.id)!==a)return null}catch{return{release:()=>{}}}let p=!1;const E=window.setInterval(()=>{var R;p||((R=to())==null?void 0:R.id)!==a||y()},cp);return{release:()=>{var R;if(!p){p=!0,window.clearInterval(E);try{((R=to())==null?void 0:R.id)===a&&window.localStorage.removeItem(Ks)}catch{}}}}}async function pp(){let a,o,u;const y=new Promise((E,k)=>{o=E,u=k}),p=new Promise(E=>{a=E});return navigator.locks.request(up,{mode:"exclusive",ifAvailable:!0},async E=>{if(!E){o(null);return}let k=!1;o({release:()=>{k||(k=!0,a())}}),await p}).catch(u),y}async function hp(a){const o=await fetch("/api/voice/lease",{method:"POST",headers:tt()});if(o.status===409)return null;if(!o.ok)throw new Error("Could not reserve the voice session.");const u=await o.json();if(typeof u.token!="string"||u.token.length<16)throw new Error("Voice session returned an invalid lease.");let y=!1;const p=()=>{y||(y=!0,window.clearInterval(E),fetch("/api/voice/lease",{method:"DELETE",headers:{"Content-Type":"application/json",...tt()},body:JSON.stringify({token:u.token}),keepalive:!0}).catch(()=>{}))},E=window.setInterval(()=>{fetch("/api/voice/lease/heartbeat",{method:"POST",headers:{"Content-Type":"application/json",...tt()},body:JSON.stringify({token:u.token})}).then(k=>{k.status===409&&(p(),a())}).catch(()=>{})},fp);return{release:p}}async function mp(a=()=>{}){const o=typeof navigator<"u"&&navigator.locks?await pp():typeof window>"u"?null:dp();if(!o)return null;try{const u=await hp(a);return u?{release:()=>{u.release(),o.release()}}:(o.release(),null)}catch(u){throw o.release(),u}}const Xs="voice-assistant.selected-voice";function Vc(a){return typeof a=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(a)}function Zs(a){return typeof window>"u"?void 0:window.localStorage}function Jr(a){var o;try{const u=(o=Zs(a))==null?void 0:o.getItem(Xs);return Vc(u)?u:void 0}catch{return}}function vp(a,o){var u;if(!Vc(a))return!1;try{return(u=Zs(o))==null||u.setItem(Xs,a),!0}catch{return!1}}function Pc(a){var o;try{(o=Zs(a))==null||o.removeItem(Xs)}catch{}}function $c(){return v.jsx("main",{className:"auth-screen",children:v.jsxs("p",{children:["Open the link printed by ",v.jsx("code",{children:"meldivo open"}),"."]})})}function $l(a){const o=/^@([A-Za-z0-9._-]{1,40})\/(.+)$/.exec(a);return o?{prefix:`@${o[1]}/`,host:o[1],inner:o[2]}:{prefix:"",host:"",inner:a}}const qs=["pi","opencode","claude"],no={pi:"Pi",opencode:"OpenCode",claude:"Claude Code"};let Tc=!1;function Rc(a){const{host:o,inner:u}=$l(a),y=o||void 0;if(u.startsWith("new:"))return{harness:u.slice(4),title:"New chat",cwd:"~",host:y};if(u==="quick")return{title:"Quick chat",cwd:"~",host:y};const p=u.indexOf(":");return p===-1?{title:u,cwd:"",host:y}:{harness:u.slice(0,p),title:u.slice(p+1),cwd:"",host:y}}function gp(a){const o=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(a);return o?`~${o[2]??""}`:a}function yp(a){return`meldivo.conversation.${a}`}function wp(a){const o=yp(a);try{const u=window.sessionStorage.getItem(o);if(u)return u;const y=Qs();return window.sessionStorage.setItem(o,y),y}catch{return Qs()}}const Sp=12e3,kp=560,xp="This is a voice preview.",Bc="voice-assistant.onboarding-dismissed",Ep=3e3;function Bl(a){const o=/^([a-z]{2})[_-](.+)$/i.exec(a),u={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(o){const y=u[o[1].toLowerCase()];if(y)return`${Bl(o[2])} — ${y}`}return a.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[._-]+/g," ").replace(/\b\w/g,y=>y.toUpperCase())}function _p(){try{return window.localStorage.getItem(Bc)!=="true"}catch{return!0}}class Cp extends Error{constructor(){super("Another voice tab is active. Close it or stop voice there first."),this.name="VoiceOwnershipError"}}async function Np(a,o){if(!a.body)throw new Error("Chat response was empty.");const u=a.body.pipeThrough(new TextDecoderStream).getReader();let y="";for(;;){const{done:p,value:E}=await u.read();if(p)break;y+=E;const k=y.split(`
80
+ `);y=k.pop()??"";for(const R of k){if(!R.startsWith("data:"))continue;const A=R.slice(5).trim();if(!A)continue;let I;try{I=JSON.parse(A)}catch{continue}if(o(I),I.type==="done")return}}}function Pp({sessionKey:a,folder:o}){const[u,y]=P.useState("idle"),[p,E]=P.useState(0),[k,R]=P.useState(""),A=P.useRef(u),I=P.useRef(!0),Z=P.useRef(!1),B=P.useRef(!1),D=P.useRef(!1),G=P.useRef(!1),J=P.useRef(null),re=P.useRef(null),q=P.useRef(null),me=P.useRef(null),Re=P.useRef(null),je=P.useRef(!1),K=P.useRef(null),se=P.useRef(null),fe=P.useRef(null),le=P.useRef(new Vd),we=P.useRef(0),Me=P.useRef(0),U=P.useRef(null),ze=P.useRef(null),nt=P.useRef(0),at=P.useRef(wp(o?`${a}|${o}`:a)),Ze=P.useRef(a),ct=P.useRef(null),Ke=P.useRef(Rc(a).harness),xe=P.useRef(0),F=P.useRef(0),b=P.useRef(null),$=P.useRef(""),h=P.useRef(""),_=P.useRef(null),ne=P.useRef(new Qd),ue=P.useRef(),[ae,he]=P.useState(null),[de,ve]=P.useState(!1),[Ee,ft]=P.useState([]),[un,Hl]=P.useState(""),[Je,qn]=P.useState(()=>Jr()??""),[el,mr]=P.useState(()=>Jr()??""),[dt,Ql]=P.useState({ready:!0,downloading:!1}),[Wt,xn]=P.useState(()=>{const g=Rc(a);return o&&$l(a).inner.startsWith("new:")?{...g,cwd:gp(o)}:g}),[En,vr]=P.useState(!1),[tl,Yn]=P.useState(""),[Kl,_n]=P.useState(!1),[gr,Gn]=P.useState(""),[yr,Cn]=P.useState(!1),[Nn,Ht]=P.useState(""),[nl,Xn]=P.useState(""),[wr,Zn]=P.useState(null),[rl,ll]=P.useState(_p),an=P.useRef(null),Pn=P.useRef(null),Qt=P.useRef(0),cn=P.useRef(null),il=P.useRef(null),ol=P.useRef(null),Kt=P.useRef(null),Ct=P.useRef(null),Ot=P.useRef(null),Tn=P.useRef(null),Jn=P.useRef(!1),pt=P.useRef(!1),vt=()=>{U.current!==null&&window.clearTimeout(U.current),U.current=null},Le=g=>{A.current=g,I.current&&y(g)},sl=g=>{g&&b.current!==g||(cancelAnimationFrame(F.current),b.current=null,G.current=!1,I.current&&E(0))},bn=(g,x)=>{cancelAnimationFrame(F.current),b.current=x,G.current=!0,Le("speaking");const M=new Float32Array(g.fftSize),L=()=>{b.current===x&&(g.getFloatTimeDomainData(M),E(Math.min(1,Math.sqrt(M.reduce((O,z)=>O+z*z,0)/M.length)*6)),F.current=requestAnimationFrame(L))};L()},Nt=()=>{var g,x,M;Z.current||A.current==="error"||(G.current||(g=K.current)!=null&&g.busy&&A.current==="speaking"?Le("speaking"):Re.current||(x=K.current)!=null&&x.busy||(M=fe.current)!=null&&M.busy?Le(je.current?"running":"thinking"):B.current&&Le("listening"))},Sr=()=>{const g=me.current,x=q.current;!g||!x||(g.gain.cancelScheduledValues(x.currentTime),g.gain.setTargetAtTime(.01,x.currentTime,.015))},gt=()=>{const g=me.current,x=q.current;!g||!x||(g.gain.cancelScheduledValues(x.currentTime),g.gain.setTargetAtTime(1,x.currentTime,.015))},Pt=g=>{if(!I.current)return;const x=++nt.current;ze.current!==null&&window.clearTimeout(ze.current),R(g),Le("error"),ze.current=window.setTimeout(()=>{nt.current===x&&(ze.current=null,R(""),A.current==="error"&&Le(B.current?Z.current?"muted":"listening":"idle"))},4e3)},kr=()=>{var g;(g=_.current)==null||g.release(),_.current=null},Rn=()=>{var x,M;xe.current++;const g=je.current||!!Re.current;if(je.current=!1,(x=Re.current)==null||x.abort(),Re.current=null,(M=K.current)==null||M.cancel(),sl(),g){const L=ct.current??Ze.current;fetch(`/api/sessions/${encodeURIComponent(L)}/cancel`,{method:"POST",headers:tt()}).catch(()=>{})}ct.current=null,!Z.current&&B.current&&Le("listening")},fn=()=>{var g;Nc(!!Re.current,!!((g=K.current)!=null&&g.busy),G.current)&&Rn()},qt=g=>{var O,z,oe;if(!B.current&&!D.current)return;B.current=!1,D.current=!1,pt.current=!1,_n(!1),we.current++,vt(),le.current.deactivate(),Z.current=!1,Rn(),gt(),ne.current.reset(),(O=se.current)==null||O.reset(),se.current=null,(z=fe.current)==null||z.reset(),fe.current=null,K.current=null;const x=J.current;J.current=null,x==null||x.destroy().catch(()=>{});const M=re.current;re.current=null,M==null||M.getTracks().forEach(Se=>{Se.onended=null,Se.stop()});const L=q.current;q.current=null,(oe=me.current)==null||oe.disconnect(),me.current=null,L&&L.state!=="closed"&&L.close().catch(()=>{}),kr(),Pt(g)},ql=()=>{var L,O,z;if(!B.current)return;B.current=!1,pt.current=!1,_n(!1),we.current++,vt(),le.current.deactivate(),Z.current=!1,Rn(),gt(),ne.current.reset(),(L=se.current)==null||L.reset(),se.current=null,(O=fe.current)==null||O.reset(),fe.current=null,K.current=null;const g=J.current;J.current=null,g==null||g.destroy().catch(()=>{});const x=re.current;re.current=null,x==null||x.getTracks().forEach(oe=>{oe.onended=null,oe.stop()});const M=q.current;q.current=null,(z=me.current)==null||z.disconnect(),me.current=null,M&&M.state!=="closed"&&M.close().catch(()=>{}),kr(),Pt("Voice session moved to another tab. Tap the shape to reconnect.")},Yl=async(g,x)=>{const M=await fetch("/api/voice/transcribe",{method:"POST",headers:{"Content-Type":"audio/wav",...tt()},body:lp(g),signal:x}),L=await M.json();if(!M.ok)throw new Error(L.error??"Transcription failed.");return String(L.text??"").trim()},Gl=async(g,x)=>{const M=q.current;if(!M)throw new Error("Audio output is not ready.");const L=Symbol("playback"),O=rt=>{$.current=g.trim(),bn(rt,L)},z=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...tt()},body:JSON.stringify({text:g,...ue.current?{voice:ue.current}:{}}),signal:x});if(z.headers.get("x-voice-fallback")==="configured"&&(ue.current=void 0,Pc()),!z.ok)throw new Error((await z.json().catch(()=>({}))).error??"Speech generation failed.");const oe=await z.arrayBuffer();x.throwIfAborted();const Se=await M.decodeAudioData(oe);x.throwIfAborted();const Fe=Ec(Se,M,me.current??M.destination,O),ke=(async rt=>{try{await Fe(rt)}finally{sl(L),Nt()}});return ke.completed=Fe.completed,ke},dn=()=>{he(null),ve(!1)},xr=(g,x)=>{he({x:g,y:x}),ve(!1)},Yt=()=>{an.current!==null&&window.clearTimeout(an.current),an.current=null,Pn.current=null},ro=g=>{if(ae||de){Qt.current=Date.now()+1e3,Yt();return}if(g.pointerType!=="touch")return;Yt();const{clientX:x,clientY:M,pointerId:L}=g;Pn.current={pointerId:L,x,y:M},an.current=window.setTimeout(()=>{an.current=null,Pn.current=null,Qt.current=Date.now()+1e3,xr(x,M)},kp)},lo=g=>{const x=Pn.current;!x||x.pointerId!==g.pointerId||Math.hypot(g.clientX-x.x,g.clientY-x.y)>10&&Yt()},Ne=()=>{var x;(x=Ct.current)==null||x.abort(),Ct.current=null,Tn.current=null;const g=Ot.current;Ot.current=null,g&&g.state!=="closed"&&g.close().catch(()=>{}),Zn(null)},io=async()=>{if(!Je||wr)return;Ne();const g=new AbortController;Ct.current=g;const x=new AudioContext;Ot.current=x,Ht(""),Zn(Je);try{await x.resume();const M=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...tt()},body:JSON.stringify({text:xp,voice:Je}),signal:g.signal});if(!M.ok)throw new Error((await M.json().catch(()=>({}))).error??"Voice preview failed.");const L=await M.arrayBuffer();g.signal.throwIfAborted();const O=await x.decodeAudioData(L);g.signal.throwIfAborted();const z=Ec(O,x,x.destination,()=>{});if(Ct.current!==g)return;Tn.current=z,await z(g.signal)}catch(M){!(M instanceof DOMException&&M.name==="AbortError")&&Ct.current===g&&Ht(M instanceof Error?M.message:"Voice preview failed.")}finally{Ct.current===g&&(Ct.current=null),Tn.current=null,Ot.current===x&&(Ot.current=null,x.state!=="closed"&&x.close().catch(()=>{})),Ct.current===null&&Zn(null)}},ul=g=>{var M;(M=Kt.current)==null||M.abort();const x=new AbortController;Kt.current=x,Cn(!0),Ht(""),Gn(""),fetch("/api/voice/voices",{headers:tt(),signal:x.signal}).then(async L=>{const O=await L.json();if(!L.ok)throw new Error(typeof O.current=="string"?O.current:"Could not load voices.");const z=Array.isArray(O.voices)?O.voices.filter(ke=>typeof ke=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(ke)):[],oe=typeof O.current=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(O.current)?O.current:"";if(Kt.current!==x||x.signal.aborted)return;const Se=g??Jr(),Fe=Se&&(!z.length||z.includes(Se))?Se:"";ft(z),Hl(oe),mr(Fe),qn(Fe||oe||z[0]||""),Gn(O.available===!1&&typeof O.warning=="string"?O.warning:"")}).catch(L=>{!(L instanceof DOMException&&L.name==="AbortError")&&!x.signal.aborted&&Ht(L instanceof Error?L.message:"Could not load voices.")}).finally(()=>{Kt.current===x&&(Kt.current=null,Cn(!1))})},Xl=()=>{if(Je){if(!vp(Je)){Ht("This voice could not be saved.");return}mr(Je),Ht(""),Xn(`${Bl(Je)} will be used from the next reply.`)}},Er=()=>{Pc(),mr(""),qn(un),Ht(""),Xn(`${un?Bl(un):"The profile default"} will be used from the next reply.`)},Zl=async()=>{var x,M;if(!B.current||Z.current||pt.current)return;const g=J.current;if(g){pt.current=!0,vt(),ne.current.reset(),h.current="",(x=se.current)==null||x.reset(),(M=fe.current)==null||M.reset(),gt(),g.setOptions({submitUserSpeechOnPause:!1});try{await le.current.pause(g),(J.current!==g||!B.current||Z.current||!Jn.current)&&(pt.current=!1)}catch(L){if(pt.current=!1,J.current!==g||!B.current||Z.current)return;g.setOptions({submitUserSpeechOnPause:!0}),qt(le.current.isInvalid(g)?"Microphone transition timed out. Tap the shape to reconnect.":L instanceof Error?L.message:"Could not pause the microphone for settings.")}}},Jl=async()=>{if(!pt.current)return;const g=J.current;if(pt.current=!1,!(!g||!B.current||Z.current))try{await le.current.start(g),J.current===g&&B.current&&!Z.current&&(g.setOptions({submitUserSpeechOnPause:!0}),Nt())}catch(x){if(J.current!==g||!B.current||Z.current)return;g.setOptions({submitUserSpeechOnPause:!0}),qt(le.current.isInvalid(g)?"Microphone transition timed out. Tap the shape to reconnect.":x instanceof Error?x.message:"Could not resume the microphone after settings.")}},_r=g=>{const x=Ke.current,{prefix:M}=$l(Ze.current);if(x){Ze.current=`${M}${x}:${g}`;return}fetch("/api/sessions",{headers:tt()}).then(hr).then(async L=>{if(!L.ok)return;const z=(await L.json()).sessions.find(oe=>oe.id===g&&$l(oe.key).prefix===M);z&&(Ze.current=z.key,Ke.current=z.harness,I.current&&xn({harness:z.harness,title:z.title,cwd:z.cwd,host:z.host}))}).catch(()=>{})},Ft=async g=>{var O,z;const x=++xe.current;let M=!1;const L=new AbortController;Re.current=L,ue.current=Jr(),Le("thinking");try{if(!g||x!==xe.current){Nt();return}$.current="",ue.current=Jr();const oe=Ze.current;ct.current=oe;const Se=await fetch(`/api/sessions/${encodeURIComponent(oe)}/chat`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...tt()},body:JSON.stringify({conversationId:at.current,message:g,...o&&$l(oe).inner.startsWith("new:")?{cwd:o}:{}}),signal:L.signal});if(hr(Se),!Se.ok)throw new Error((await Se.json().catch(()=>({}))).error??"Chat request failed.");let Fe="";if(await Np(Se,ke=>{var rt,pn;if(x===xe.current)switch(ke.type){case"session":_r(ke.id);return;case"status":je.current=!0,Le("running"),Yn(ke.message);return;case"tool":je.current=!0,Le("running"),Yn(`Using ${ke.name}…`);return;case"delta":{je.current&&(je.current=!1,Le("thinking")),Fe+=ke.text;const Ae=Cc(Fe,!1,!M);Fe=Ae.rest,Ae.chunks.length&&(M=!0,(rt=K.current)==null||rt.enqueue(Ae.chunks));return}case"notice":Yn(ke.message),M=!0,(pn=K.current)==null||pn.enqueue([ke.message]);return;case"error":throw new Error(ke.message);case"done":return}}),x===xe.current){const ke=Cc(Fe,!0,!M);ke.chunks.length&&(M=!0,(O=K.current)==null||O.enqueue(ke.chunks))}}catch(oe){if(oe instanceof pr){I.current&&vr(!0);return}!(oe instanceof DOMException&&oe.name==="AbortError")&&x===xe.current&&(Pt(oe instanceof Error?oe.message:"Voice conversation failed."),M||(z=K.current)==null||z.enqueue(["Sorry, I could not answer that. Please try again."]))}finally{Re.current===L&&(Re.current=null,ct.current=null),je.current=!1,I.current&&Yn(""),Nt()}},al=async()=>{var pn;if(B.current||D.current)return;D.current=!0;const g=++Me.current;let x=null,M=null,L=null,O=null,z=null,oe=null,Se=null,Fe=null;const ke=++we.current,rt=()=>{if(!I.current||we.current!==ke||Me.current!==g)throw new DOMException("Voice startup was cancelled.","AbortError")};le.current.beginSession();try{if(!window.isSecureContext||!((pn=navigator.mediaDevices)!=null&&pn.getUserMedia))throw new Error("Microphone access requires HTTPS or localhost.");if(O=await mp(ql),!O)throw new Cp;rt(),R(""),_n(!1),Le("thinking"),x=new AudioContext,await x.resume(),rt(),z=x.createGain(),z.gain.value=1,z.connect(x.destination),oe=new Kd(Gl,Nt,ce=>{sl(),Pt(ce instanceof Error?ce.message:"Speech playback failed.")}),Se=new Wd(Yl,()=>{}),Fe=new Ad(async(ce,_e)=>{const We=await((Se==null?void 0:Se.finish(ce.samples,_e))??Yl(ce.samples,_e));return ce.possibleEcho?Id(We,ce.possibleEcho):We},Ft,ce=>Pt(ce instanceof Error?ce.message:"Voice transcription failed."),Nt),M=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),rt();const Ae=M,yt={getStream:async()=>Ae,pauseStream:async()=>{},resumeStream:async()=>Ae,...qd,submitUserSpeechOnPause:!0,onSpeechStart:()=>{var We,lt,Gt;if(!qe(L,ke))return;(We=fe.current)==null||We.speechStarted();const ce=Nc(!!Re.current,!!((lt=K.current)!=null&&lt.busy),G.current),_e=ne.current.speechStart(ce);h.current=G.current?$.current:"",_e.begin&&((Gt=se.current)==null||Gt.begin()),_e.duck&&Sr(),bl(L,ke)},onSpeechRealStart:()=>{var _e;if(!qe(L,ke))return;const ce=ne.current.speechRealStart();ce.accepted&&(ce.interrupt&&fn(),gt(),(_e=se.current)==null||_e.confirm(),bl(L,ke),R(""),Le("hearing"))},onVADMisfire:()=>{var ce,_e;qe(L,ke)&&(vt(),ne.current.reset(),h.current="",(ce=se.current)==null||ce.discard(),(_e=fe.current)==null||_e.speechDiscarded(),gt(),Z.current||Nt())},onFrameProcessed:(ce,_e)=>{var We;qe(L,ke)&&((We=se.current)==null||We.frame(ce.isSpeech,_e),E(Math.min(1,Math.sqrt(_e.reduce((lt,Gt)=>lt+Gt*Gt,0)/_e.length)*7)))},onSpeechEnd:ce=>{var We,lt,Gt,ti;if(!qe(L,ke))return;if(vt(),!ne.current.speechEnd()){h.current="",(We=se.current)==null||We.discard(),(lt=fe.current)==null||lt.speechDiscarded(),gt(),Nt();return}gt(),(Gt=se.current)==null||Gt.end(ce);const _e=h.current;h.current="",(ti=fe.current)==null||ti.speechEnded({samples:ce,possibleEcho:_e})}};let Tt=!1;if(!Tc)try{const{MicVAD:ce}=await zc(async()=>{const{MicVAD:_e}=await import("./index-CeWj4ejR.js").then(We=>We.i);return{MicVAD:_e}},__vite__mapDeps([0,1]));rt(),L=await ce.new({model:"v5",audioContext:x,startOnLoad:!1,baseAssetPath:"/voice-assets/",onnxWASMBasePath:"/voice-assets/",ortConfig:_e=>{_e.env.wasm.numThreads=1},...yt})}catch(ce){if(ce instanceof DOMException&&ce.name==="AbortError")throw ce;Tc=!0,L=null}L||(Tt=!0,L=await Gs.new({audioContext:x,...yt})),rt(),_n(Tt),await le.current.start(L),rt();const Rt=L,$e=x;if(!Rt||!$e)throw new Error("Voice startup did not finish.");_.current=O,q.current=$e,me.current=z,K.current=oe,se.current=Se,fe.current=Fe,re.current=Ae,J.current=Rt,B.current=!0;const Mn=()=>{var ce,_e,We;if(!(re.current!==Ae||!B.current)){B.current=!1,pt.current=!1,_n(!1),we.current++,vt(),le.current.deactivate(),Z.current=!1,Rn(),gt(),ne.current.reset(),K.current=null,(ce=se.current)==null||ce.reset(),se.current=null,(_e=fe.current)==null||_e.reset(),fe.current=null,J.current===Rt&&(J.current=null),re.current===Ae&&(re.current=null),q.current===$e&&(q.current=null),(We=me.current)==null||We.disconnect(),me.current=null;for(const lt of Ae.getTracks())lt.onended=null,lt.readyState==="live"&&lt.stop();Rt.destroy().catch(()=>{}),$e.state!=="closed"&&$e.close().catch(()=>{}),kr(),Pt("Microphone disconnected. Tap the shape to reconnect.")}};for(const ce of Ae.getAudioTracks())ce.onended=Mn;let Dt=!1;const Rr=()=>{if(!(q.current!==$e||!B.current)){if($e.state==="running"||$e.state==="closed"){Dt=!1;return}$e.resume().catch(()=>{}).then(()=>{q.current!==$e||!B.current||$e.state==="running"||Dt||(Dt=!0,Pt("The device paused audio. Tap the shape to keep talking."))})}};$e.onstatechange=Rr;const ei=window.setInterval(()=>{if(q.current!==$e||$e.state==="closed"){window.clearInterval(ei),document.removeEventListener("visibilitychange",Rr);return}Rr()},2e3);if(document.addEventListener("visibilitychange",Rr),!Ae.getAudioTracks().some(ce=>ce.readyState==="live")){Mn();return}Le("listening"),Jn.current&&Zl()}catch(Ae){const yt=we.current===ke&&Me.current===g;yt&&(we.current++,vt(),le.current.deactivate(),J.current===L&&(J.current=null),re.current===M&&(re.current=null),q.current===x&&(q.current=null),me.current===z&&(me.current=null),K.current===oe&&(K.current=null),se.current===Se&&(se.current=null),fe.current===Fe&&(fe.current=null)),oe==null||oe.cancel(),Se==null||Se.reset(),Fe==null||Fe.reset(),z==null||z.disconnect(),L&&await L.destroy().catch(()=>{}),M==null||M.getTracks().forEach(Tt=>Tt.stop()),x&&x.state!=="closed"&&await x.close().catch(()=>{}),_.current===O&&(_.current=null),O==null||O.release(),yt&&!(Ae instanceof DOMException&&Ae.name==="AbortError")&&Pt(Ae instanceof Error?Ae.message:"Could not start the microphone.")}finally{Me.current===g&&(D.current=!1)}},qe=(g,x)=>(B.current||D.current)&&!Jn.current&&$d(we.current,x,J.current,g,Z.current,le.current.acceptsCallbacks),nn=(g,x,M)=>g!==null&&J.current===g&&B.current&&Z.current===x&&(M===void 0||we.current===M),Cr=(g,x,M)=>nn(g,x,M)&&g!==null&&!le.current.isInvalid(g),bl=(g,x)=>{vt(),g&&(U.current=window.setTimeout(()=>{U.current=null,qe(g,x)&&le.current.flush(g).then(()=>{Cr(g,!1,x)}).catch(M=>{nn(g,!1,x)&&(le.current.isInvalid(g)?qt("Microphone transition timed out. Tap the shape to reconnect."):Pt(M instanceof Error?M.message:"Microphone recovery failed."))})},Sp))},Nr=async()=>{var x,M,L,O;if(!B.current){D.current||al();return}const g=q.current;if(g&&g.state!=="running"&&g.state!=="closed"&&(await g.resume().catch(()=>{}),g.state==="running")){Le(Z.current?"muted":"listening");return}if(Z.current=!Z.current,Z.current){vt(),Rn(),gt(),ne.current.reset(),(x=se.current)==null||x.reset(),(M=fe.current)==null||M.reset(),(L=re.current)==null||L.getTracks().forEach(oe=>{oe.enabled=!1});const z=J.current;if(!nn(z,!0))return;z==null||z.setOptions({submitUserSpeechOnPause:!1});try{if(z&&await le.current.pause(z),!Cr(z,!0)){nn(z,!0)&&z&&le.current.isInvalid(z)&&qt("Microphone transition timed out. Tap the shape to reconnect.");return}Le("muted")}catch(oe){if(!nn(z,!0))return;z&&le.current.isInvalid(z)?qt("Microphone transition timed out. Tap the shape to reconnect."):Pt(oe instanceof Error?oe.message:"Could not pause the microphone.")}}else{(O=re.current)==null||O.getTracks().forEach(oe=>{oe.enabled=!0});const z=J.current;if(!nn(z,!1))return;try{if(z){if(await le.current.start(z),!Cr(z,!1)){nn(z,!1)&&le.current.isInvalid(z)&&qt("Microphone transition timed out. Tap the shape to reconnect.");return}z.setOptions({submitUserSpeechOnPause:!0})}if(!Cr(z,!1))return;Le("listening")}catch(oe){if(!nn(z,!1))return;z&&le.current.isInvalid(z)?qt("Microphone transition timed out. Tap the shape to reconnect."):Pt(oe instanceof Error?oe.message:"Could not resume the microphone.")}}},Pr=()=>{if(dn(),R(""),B.current||D.current){qt(""),window.setTimeout(()=>{!B.current&&!D.current&&al()},0);return}al()};if(P.useEffect(()=>{const g=new AbortController;return fetch("/api/sessions",{headers:tt(),signal:g.signal}).then(hr).then(async x=>{if(!x.ok)return;const L=(await x.json()).sessions.find(O=>O.key===a);L&&!g.signal.aborted&&(Ke.current=L.harness,xn({harness:L.harness,title:L.title,cwd:L.cwd,host:L.host}))}).catch(x=>{x instanceof pr&&!g.signal.aborted&&vr(!0)}),()=>g.abort()},[a]),P.useEffect(()=>{let g=!1;const x=()=>{fetch("/api/health",{headers:tt()}).then(async L=>{const O=await L.json().catch(()=>({}));if(g)return;const z=O.speech??{};Ql({ready:z.ready!==!1,downloading:z.downloading===!0,progress:typeof z.progress=="number"?z.progress:void 0,error:typeof z.error=="string"?z.error:void 0})}).catch(()=>{})};x();const M=window.setInterval(x,Ep);return()=>{g=!0,window.clearInterval(M)}},[]),P.useEffect(()=>{var g;if(Jn.current=de,de?Zl():Jl(),!de){wr&&Ne(),(g=Kt.current)==null||g.abort(),Kt.current=null;return}Ht(""),Xn(""),ul(Jr()??void 0)},[de]),P.useEffect(()=>{if(!ae&&!de)return;const g=M=>{var O,z;const L=M.target;L instanceof Node&&((O=cn.current)!=null&&O.contains(L)||(z=il.current)!=null&&z.contains(L))||dn()},x=M=>{M.key==="Escape"&&(M.preventDefault(),dn())};return document.addEventListener("pointerdown",g),document.addEventListener("keydown",x),()=>{document.removeEventListener("pointerdown",g),document.removeEventListener("keydown",x)}},[ae,de]),P.useEffect(()=>{de&&window.setTimeout(()=>{var g;return(g=ol.current)==null?void 0:g.focus()},0)},[de]),P.useEffect(()=>()=>{var g,x,M,L,O,z,oe,Se;I.current=!1,nt.current++,ze.current!==null&&window.clearTimeout(ze.current),ze.current=null,B.current=!1,Yt(),(g=Kt.current)==null||g.abort(),(x=Ct.current)==null||x.abort(),Ct.current=null,Tn.current=null,Ot.current&&Ot.current.state!=="closed"&&Ot.current.close().catch(()=>{}),Ot.current=null,we.current++,vt(),le.current.deactivate(),Rn(),gt(),ne.current.reset(),(M=se.current)==null||M.reset(),(L=fe.current)==null||L.reset(),fe.current=null,(O=J.current)==null||O.destroy(),(z=re.current)==null||z.getTracks().forEach(Fe=>{Fe.onended=null,Fe.stop()}),(oe=q.current)==null||oe.close(),(Se=me.current)==null||Se.disconnect(),me.current=null,kr()},[]),En)return v.jsx($c,{});const er=B.current?u==="muted"?"Unmute microphone":"Mute microphone":"Start voice conversation",Tr=ae?Math.max(12,Math.min(ae.x,window.innerWidth-170)):0,oo=ae?Math.max(12,Math.min(ae.y,window.innerHeight-68)):0,cl=el||un,jn=dt.ready,fl=dt.ready?"Ready":dt.downloading?`Downloading voice models…${typeof dt.progress=="number"?` ${Math.round(dt.progress)}%`:""}`:"Offline";return v.jsxs("main",{className:"voice-page","data-state":u,style:{"--level":p},children:[v.jsxs("header",{className:"room-header",children:[v.jsx("a",{className:"room-header__back",href:"/","aria-label":"Back to hub",children:"←"}),v.jsx("img",{className:"room-header__logo",src:"/logo-192.png",alt:"",width:22,height:22}),v.jsxs("span",{className:"room-header__title",children:[Wt.harness?no[Wt.harness]:"Meldivo"," · ",Wt.title]}),(Wt.host||Wt.cwd)&&v.jsx("span",{className:"room-header__cwd",children:[Wt.host,Wt.cwd].filter(Boolean).join(" · ")})]}),tl&&v.jsx("p",{className:"room-status",role:"status",children:tl}),Kl&&v.jsx("p",{className:"room-status voice-fallback-notice",role:"status",children:"Using basic voice detection"}),!dt.ready&&v.jsx("p",{className:"voice-health",role:"status",children:dt.error||fl}),v.jsxs("button",{className:"voice-shape",type:"button",onClick:()=>{if(Date.now()<Qt.current){Qt.current=0;return}if(ae||de){dn();return}Nr()},onPointerDown:ro,onPointerMove:lo,onPointerUp:Yt,onPointerCancel:Yt,onPointerLeave:Yt,onLostPointerCapture:Yt,onContextMenu:g=>{g.preventDefault(),xr(g.clientX,g.clientY)},onKeyDown:g=>{if(g.key==="ContextMenu"||g.key==="F10"&&g.shiftKey){g.preventDefault();const x=g.currentTarget.getBoundingClientRect();xr(x.left+x.width/2,x.top+x.height/2)}},"aria-label":er,"aria-haspopup":"menu","aria-expanded":!!(ae||de),children:[v.jsx("span",{className:"voice-shape__halo"}),v.jsx("span",{className:"voice-shape__ring voice-shape__ring--one"}),v.jsx("span",{className:"voice-shape__ring voice-shape__ring--two"}),v.jsx("span",{className:"voice-shape__core"})]}),ae&&v.jsx("div",{ref:cn,className:"voice-context-menu",role:"menu","aria-label":"Voice options",style:{left:Tr,top:oo},children:v.jsx("button",{type:"button",role:"menuitem",onClick:()=>{he(null),ve(!0)},children:"Settings"})}),de&&v.jsxs("div",{ref:il,className:"voice-settings",role:"dialog","aria-modal":"false","aria-labelledby":"voice-settings-title",onKeyDown:g=>{g.key==="Escape"&&(g.preventDefault(),dn())},children:[v.jsxs("div",{className:"voice-settings__header",children:[v.jsx("h2",{id:"voice-settings-title",children:"Voice"}),v.jsx("button",{className:"voice-settings__close",type:"button",onClick:dn,"aria-label":"Close voice settings",children:"×"})]}),v.jsxs("p",{id:"tts-provider-status",className:`voice-settings__availability voice-settings__availability--${dt.ready?"ready":dt.downloading?"checking":"offline"}`,role:"status",children:[v.jsx("span",{"aria-hidden":"true"}),fl]}),dt.error&&v.jsx("p",{className:"voice-settings__availability-note",children:dt.error}),gr&&v.jsx("p",{className:"voice-settings__availability-note",children:gr}),yr&&v.jsx("p",{className:"voice-settings__muted",children:"Loading voices…"}),!yr&&Ee.length>0&&v.jsxs(v.Fragment,{children:[v.jsx("label",{className:"voice-settings__label",htmlFor:"voice-choice",children:"Choose a voice"}),v.jsxs("div",{className:"voice-settings__choice",children:[v.jsx("select",{ref:ol,id:"voice-choice",value:Je,onChange:g=>{Ne(),qn(g.target.value),Ht(""),Xn("")},"aria-describedby":"voice-current",children:Ee.map(g=>v.jsx("option",{value:g,children:Bl(g)},g))}),v.jsx("button",{className:"voice-settings__play",type:"button",onClick:()=>{io()},disabled:!Je||!jn||!!wr,"aria-label":`Preview ${Je||"voice"}`,"aria-describedby":"tts-provider-status",title:jn?void 0:"Wait for voice models to be ready.",children:wr?"…":"▶"})]}),v.jsxs("p",{id:"voice-current",className:"voice-settings__current",children:["Current: ",cl?Bl(cl):"profile default"]}),v.jsxs("div",{className:"voice-settings__actions",children:[v.jsx("button",{type:"button",onClick:Xl,disabled:!Je||!jn||Je===cl,"aria-describedby":"tts-provider-status",title:jn?void 0:"Wait for voice models to be ready.",children:"Use this voice"}),v.jsx("button",{type:"button",onClick:Er,disabled:!el,children:"Restore default"})]})]}),!yr&&!Ee.length&&v.jsx(v.Fragment,{children:v.jsx("p",{className:"voice-settings__muted",children:"No selectable voices are configured."})}),Nn&&v.jsx("p",{className:"voice-settings__error",role:"alert",children:Nn}),nl&&v.jsx("p",{className:"voice-settings__notice",role:"status",children:nl})]}),rl&&v.jsx("div",{className:"voice-onboarding",role:"dialog","aria-modal":"true","aria-labelledby":"voice-onboarding-title",children:v.jsxs("div",{className:"voice-onboarding__card",children:[v.jsx("h2",{id:"voice-onboarding-title",children:"Welcome"}),v.jsx("p",{children:"Tap to talk · hold or right-click for settings."}),v.jsx("button",{type:"button",onClick:()=>{try{window.localStorage.setItem(Bc,"true")}catch{}ll(!1)},children:"OK"})]})}),k&&v.jsxs("div",{className:"voice-error",role:"alert",title:k,children:[v.jsx("span",{children:k}),v.jsx("button",{className:"voice-error__reconnect",type:"button",onClick:Pr,children:"Reconnect"})]})]})}const Tp=5e3,Rp=5e3;function Wl(a){const o=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(a);return o?o[2]?`~${o[2]}`:"~":a}function Wc(a){const o=Math.max(0,Math.round((Date.now()-a)/1e3));if(o<5)return"just now";if(o<60)return`${o}s ago`;const u=Math.round(o/60);if(u<60)return`${u}m ago`;const y=Math.round(u/60);return y<24?`${y}h ago`:`${Math.round(y/24)}d ago`}function Hc(a,o){window.location.href=`/?session=${encodeURIComponent(a)}${o?`&folder=${encodeURIComponent(o)}`:""}`}function jp(a){return a.busy?{className:"hub-dot hub-dot--busy",label:"busy"}:a.open?{className:"hub-dot hub-dot--open",label:"open in terminal"}:{className:"hub-dot hub-dot--idle",label:"idle"}}function Mp({onClose:a}){var D;const[o,u]=P.useState(null),[y,p]=P.useState(""),[E,k]=P.useState(!1),[R,A]=P.useState(""),I=()=>{p(""),fetch("/api/remote",{headers:tt()}).then(hr).then(async G=>{if(!G.ok)throw new Error("Could not load phone access options.");u(await G.json())}).catch(G=>{if(G instanceof pr)throw G;p(G instanceof Error?G.message:"Could not load phone access options.")})};P.useEffect(I,[]),P.useEffect(()=>{var re;const G=(re=o==null?void 0:o.active)==null?void 0:re.url;if(!G){A("");return}let J=!1;return zc(()=>import("./browser-CujOq0-h.js").then(q=>q.b),__vite__mapDeps([2,1])).then(async q=>{const me=await q.toDataURL(G,{margin:1,width:200});J||A(me)}).catch(()=>{J||A("")}),()=>{J=!0}},[(D=o==null?void 0:o.active)==null?void 0:D.url]);const Z=G=>{k(!0),p(""),fetch("/api/remote",{method:"POST",headers:{"Content-Type":"application/json",...tt()},body:JSON.stringify({id:G})}).then(hr).then(async J=>{if(!J.ok)throw new Error((await J.json().catch(()=>({}))).error??"Could not enable phone access.");I()}).catch(J=>{if(J instanceof pr)throw J;p(J instanceof Error?J.message:"Could not enable phone access.")}).finally(()=>k(!1))},B=()=>{k(!0),p(""),fetch("/api/remote",{method:"DELETE",headers:tt()}).then(hr).then(G=>{if(!G.ok)throw new Error("Could not turn off phone access.");I()}).catch(G=>{if(G instanceof pr)throw G;p(G instanceof Error?G.message:"Could not turn off phone access.")}).finally(()=>k(!1))};return v.jsxs("div",{className:"hub-remote",role:"dialog","aria-labelledby":"hub-remote-title",children:[v.jsxs("div",{className:"hub-remote__header",children:[v.jsx("h2",{id:"hub-remote-title",children:"Phone access"}),v.jsx("button",{className:"hub-remote__close",type:"button",onClick:a,"aria-label":"Close phone access",children:"×"})]}),!o&&!y&&v.jsx("p",{className:"hub-muted",children:"Loading…"}),y&&v.jsx("p",{className:"hub-error",role:"alert",children:y}),(o==null?void 0:o.active)&&v.jsxs("div",{className:"hub-remote__active",children:[v.jsx("p",{className:"hub-remote__url",children:o.active.url}),R&&v.jsx("img",{className:"hub-remote__qr",src:R,alt:"QR code for phone access URL"}),v.jsx("button",{type:"button",onClick:B,disabled:E,children:"Turn off"})]}),o&&!o.active&&v.jsxs(v.Fragment,{children:[v.jsx("ul",{className:"hub-remote__options",children:o.options.map(G=>v.jsx("li",{children:v.jsxs("button",{type:"button",disabled:!G.ready||E,onClick:()=>Z(G.id),children:[G.label,G.ready?"":" (not ready)"]})},G.id))}),!o.options.some(G=>G.ready)&&o.guide&&(/^https?:\/\//.test(o.guide)?v.jsx("p",{className:"hub-muted",children:v.jsx("a",{href:o.guide,target:"_blank",rel:"noreferrer",children:"Set up phone access"})}):v.jsx("p",{className:"hub-muted",children:o.guide}))]})]})}const jc="meldivo.machine",zp=5;function Lp(a){return a.id?`@${a.id}/`:""}function Op({host:a,sessions:o,selected:u,onSelect:y}){const p=o.filter(A=>A.open).length,E=o.some(A=>A.busy),k=o.reduce((A,I)=>Math.max(A,I.updatedAt),0),R=a.online?E?"hub-dot--busy":"hub-dot--online":"hub-dot--idle";return v.jsxs("button",{type:"button",role:"tab","aria-selected":u,className:`hub-machine${u?" hub-machine--selected":""}${a.online?"":" hub-machine--offline"}`,onClick:y,children:[v.jsxs("span",{className:"hub-machine__name",children:[v.jsx("span",{className:`hub-dot ${R}`,"aria-hidden":"true"}),a.name]}),v.jsx("span",{className:"hub-machine__meta",children:a.online?v.jsxs(v.Fragment,{children:[o.length," session",o.length===1?"":"s",p>0&&v.jsxs(v.Fragment,{children:[" · ",p," open"]})]}):"offline"}),a.online&&k>0&&v.jsxs("span",{className:"hub-machine__meta",children:["active ",Wc(k)]})]})}const Bs=1440*60*1e3;function Fp(a,o){const u=Date.now()-a;return o==="today"?new Date(a).toDateString()===new Date().toDateString():o==="week"?u<=7*Bs:o==="month"?u<=30*Bs:o==="older"?u>30*Bs:!0}function Dp(a,o){const u=[...a];return o==="title"?u.sort((y,p)=>(y.title||"").localeCompare(p.title||"",void 0,{sensitivity:"base"})):u.sort((y,p)=>o==="oldest"?y.updatedAt-p.updatedAt:p.updatedAt-y.updatedAt),u}function Ip({session:a}){const o=jp(a);return v.jsx("li",{children:v.jsxs("button",{type:"button",className:"hub-session",onClick:()=>Hc(a.key),children:[v.jsx("span",{className:o.className,"aria-hidden":"true",title:o.label}),v.jsxs("span",{className:"hub-session__body",children:[v.jsx("span",{className:"hub-session__title",children:a.title||"(untitled)"}),v.jsxs("span",{className:"hub-session__meta",children:[v.jsx("span",{className:"hub-session__badge",children:no[a.harness]}),v.jsx("span",{className:"hub-session__time",children:Wc(a.updatedAt)})]}),a.open&&v.jsx("span",{className:"hub-session__hint",children:"open in a terminal · continues as a voice copy"})]})]})})}function Qc(a,o){if(o.length===0)return!0;const u=`${a.title} ${Wl(a.cwd)} ${no[a.harness]}`.toLowerCase();return o.every(y=>u.includes(y))}function Kc(a){return a.trim().toLowerCase().split(/\s+/).filter(Boolean)}function Ap({cwd:a,sessions:o,total:u}){const[y,p]=P.useState(""),E=Kc(y),k=o.filter(I=>Qc(I,E)),R=Wl(a),A=R==="~"?"Home folder":R||"(no folder)";return v.jsxs("section",{className:"hub-folder","aria-label":A,children:[v.jsxs("h3",{className:"hub-folder__title",children:[v.jsx("span",{children:A}),v.jsx("span",{className:"hub-folder__count",children:o.length===u?u:`${o.length} of ${u}`})]}),o.length>zp&&v.jsx("input",{type:"search",className:"hub-folder__search",placeholder:`Search in ${A}`,value:y,onChange:I=>p(I.target.value),"aria-label":`Search sessions in ${A}`,autoComplete:"off"}),k.length===0?v.jsx("p",{className:"hub-muted hub-folder__none",children:"No sessions here match."}):v.jsx("ul",{className:"hub-sessions hub-folder__list",children:k.map(I=>v.jsx(Ip,{session:I},I.key))})]})}function Up({host:a,folders:o,agent:u,folder:y,onClose:p}){var Z,B;const E=[...a.harnesses].filter(D=>D.available).sort((D,G)=>qs.indexOf(D.id)-qs.indexOf(G.id)),[k,R]=P.useState(((Z=E.find(D=>D.id===u))==null?void 0:Z.id)??((B=E[0])==null?void 0:B.id)),[A,I]=P.useState(y==="all"?"":y);return E.length===0?v.jsx("div",{className:"hub-newchat",children:v.jsxs("p",{className:"hub-muted",children:["No coding agents are installed on ",a.name,"."]})}):v.jsxs("div",{className:"hub-newchat",role:"group","aria-label":"New chat",children:[v.jsxs("div",{className:"hub-newchat__row",children:[v.jsx("span",{className:"hub-newchat__label",children:"Agent"}),v.jsx("div",{className:"hub-chips",children:E.map(D=>v.jsx("button",{type:"button",className:`hub-chip${k===D.id?" hub-chip--on":""}`,"aria-pressed":k===D.id,onClick:()=>R(D.id),children:D.label},D.id))})]}),v.jsxs("label",{className:"hub-newchat__row",children:[v.jsx("span",{className:"hub-newchat__label",children:"Folder"}),v.jsxs("select",{className:"hub-select hub-select--wide",value:A,onChange:D=>I(D.target.value),children:[v.jsx("option",{value:"",children:"Home folder"}),o.map(D=>v.jsx("option",{value:D,children:Wl(D)},D))]})]}),v.jsxs("div",{className:"hub-newchat__actions",children:[v.jsx("button",{type:"button",className:"hub-more",onClick:p,children:"Cancel"}),v.jsx("button",{type:"button",className:"hub-primary",disabled:!k,onClick:()=>k&&Hc(`${Lp(a)}new:${k}`,A||void 0),children:"Start talking"})]})]})}function Vp({host:a,sessions:o}){const[u,y]=P.useState(""),[p,E]=P.useState("all"),[k,R]=P.useState("all"),[A,I]=P.useState("any"),[Z,B]=P.useState("newest"),[D,G]=P.useState(!1),[J,re]=P.useState(!1);if(P.useEffect(()=>{y(""),E("all"),R("all"),I("any"),B("newest"),G(!1),re(!1)},[a.id]),!a.online)return v.jsxs("p",{className:"hub-empty",children:[a.name," is offline. Its sessions appear here as soon as it reconnects."]});const q=new Map;for(const U of o)q.set(U.cwd,Math.max(q.get(U.cwd)??0,U.updatedAt));const me=[...q.entries()].sort((U,ze)=>ze[1]-U[1]).map(([U])=>U),Re=me.filter(U=>U&&Wl(U)!=="~"),je=qs.filter(U=>o.some(ze=>ze.harness===U)),K=Kc(u),se=Dp(o.filter(U=>p!=="all"&&U.harness!==p||k!=="all"&&U.cwd!==k||D&&!U.open||!Fp(U.updatedAt,A)?!1:Qc(U,K)),Z),fe=o.filter(U=>U.open).length,le=p!=="all"||k!=="all"||A!=="any"||D||K.length>0,we=[];for(const U of se){const ze=we.find(nt=>nt.cwd===U.cwd);ze?ze.sessions.push(U):we.push({cwd:U.cwd,sessions:[U]})}const Me=new Map;for(const U of o)Me.set(U.cwd,(Me.get(U.cwd)??0)+1);return v.jsxs("div",{className:"hub-panel",role:"tabpanel",children:[v.jsxs("div",{className:"hub-search",children:[v.jsx("input",{type:"search",className:"hub-search__input",placeholder:`Search all ${o.length} sessions`,value:u,onChange:U=>y(U.target.value),"aria-label":`Search all sessions on ${a.name}`,autoComplete:"off"}),v.jsx("button",{type:"button",className:"hub-primary","aria-expanded":J,onClick:()=>re(!J),children:J?"Close":"New chat"})]}),J&&v.jsx(Up,{host:a,folders:Re,agent:p,folder:k,onClose:()=>re(!1)}),o.length>0&&v.jsxs("div",{className:"hub-filters",children:[v.jsxs("div",{className:"hub-chips",role:"group","aria-label":"Filter by agent",children:[v.jsx("button",{type:"button",className:`hub-chip${p==="all"?" hub-chip--on":""}`,"aria-pressed":p==="all",onClick:()=>E("all"),children:"All agents"}),je.map(U=>v.jsxs("button",{type:"button",className:`hub-chip${p===U?" hub-chip--on":""}`,"aria-pressed":p===U,onClick:()=>E(p===U?"all":U),children:[no[U]," ",v.jsx("span",{className:"hub-chip__count",children:o.filter(ze=>ze.harness===U).length})]},U)),v.jsxs("button",{type:"button",className:`hub-chip${D?" hub-chip--on":""}`,"aria-pressed":D,disabled:fe===0&&!D,onClick:()=>G(!D),children:["Open now ",v.jsx("span",{className:"hub-chip__count",children:fe})]})]}),v.jsxs("div",{className:"hub-selects",children:[v.jsxs("select",{className:"hub-select",value:k,onChange:U=>R(U.target.value),"aria-label":"Folder",children:[v.jsxs("option",{value:"all",children:["All folders (",me.length,")"]}),me.map(U=>v.jsx("option",{value:U,children:Wl(U)||"(no folder)"},U))]}),v.jsxs("select",{className:"hub-select",value:A,onChange:U=>I(U.target.value),"aria-label":"Date",children:[v.jsx("option",{value:"any",children:"Any time"}),v.jsx("option",{value:"today",children:"Today"}),v.jsx("option",{value:"week",children:"Past 7 days"}),v.jsx("option",{value:"month",children:"Past 30 days"}),v.jsx("option",{value:"older",children:"Older than 30 days"})]}),v.jsxs("select",{className:"hub-select",value:Z,onChange:U=>B(U.target.value),"aria-label":"Sort",children:[v.jsx("option",{value:"newest",children:"Newest first"}),v.jsx("option",{value:"oldest",children:"Oldest first"}),v.jsx("option",{value:"title",children:"Title A–Z"})]})]})]}),o.length===0&&v.jsxs("p",{className:"hub-empty",children:["No sessions on ",a.name," yet. Tap New chat to start one."]}),o.length>0&&se.length===0&&v.jsxs("p",{className:"hub-empty",children:["No sessions match. ",v.jsx("button",{type:"button",className:"hub-link",onClick:()=>{y(""),E("all"),R("all"),I("any"),G(!1)},children:"Clear filters"})]}),le&&se.length>0&&v.jsxs("p",{className:"hub-count",children:[se.length," of ",o.length," sessions"]}),v.jsx("div",{className:"hub-folders",children:we.map(U=>v.jsx(Ap,{cwd:U.cwd,sessions:U.sessions,total:Me.get(U.cwd)??U.sessions.length},`${a.id}|${U.cwd}`))})]})}function $p(){const[a,o]=P.useState(null),[u,y]=P.useState(""),[p,E]=P.useState(!1),[k,R]=P.useState({ready:!0,downloading:!1}),[A,I]=P.useState(!1),[Z,B]=P.useState(()=>{try{return window.localStorage.getItem(jc)}catch{return null}}),D=P.useRef(!0);if(P.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]),P.useEffect(()=>{let K=!1;const se=()=>{fetch("/api/sessions",{headers:tt()}).then(hr).then(async le=>{if(!le.ok)throw new Error("Could not load sessions.");const we=await le.json();K||(o(we),y(""))}).catch(le=>{if(!K){if(le instanceof pr){E(!0);return}y(le instanceof Error?le.message:"Could not load sessions.")}})};se();const fe=window.setInterval(se,Tp);return()=>{K=!0,window.clearInterval(fe)}},[]),P.useEffect(()=>{let K=!1;const se=()=>{fetch("/api/health",{headers:tt()}).then(async le=>{const we=await le.json().catch(()=>({}));if(K)return;const Me=we.speech??{};R({ready:Me.ready!==!1,downloading:Me.downloading===!0,progress:typeof Me.progress=="number"?Me.progress:void 0,error:typeof Me.error=="string"?Me.error:void 0})}).catch(()=>{})};se();const fe=window.setInterval(se,Rp);return()=>{K=!0,window.clearInterval(fe)}},[]),p)return v.jsx($c,{});const G=(a==null?void 0:a.hosts)??(a?[{id:"",name:a.machine,online:!0,harnesses:a.harnesses}]:[]),J=(a==null?void 0:a.sessions)??[],re=K=>J.filter(se=>(se.host??"")===K.id),q=G.filter(K=>K.id!==""||G.length===1||K.harnesses.some(se=>se.available)||re(K).length>0),me=q.find(K=>K.id===Z)??q.find(K=>K.online)??q[0],Re=K=>{B(K);try{window.localStorage.setItem(jc,K)}catch{}},je=k.ready?"Speech ready":k.downloading?`Downloading voice models…${typeof k.progress=="number"?` ${Math.round(k.progress)}%`:""}`:"Speech offline";return v.jsxs("main",{className:"hub-page",children:[v.jsxs("header",{className:"hub-header",children:[v.jsxs("h1",{className:"hub-title",children:[v.jsx("img",{className:"hub-logo",src:"/logo-192.png",alt:"",width:30,height:30}),q.length>1?"Meldivo":(a==null?void 0:a.machine)??"Meldivo"]}),v.jsx("p",{className:`hub-speech-status${k.ready?"":" hub-speech-status--warn"}`,role:"status",children:k.error||je}),v.jsx("button",{type:"button",className:"hub-remote-button",onClick:()=>I(!0),children:"Phone access"})]}),u&&v.jsx("p",{className:"hub-error",role:"alert",children:u}),!a&&!u&&v.jsx("p",{className:"hub-empty",children:"Loading…"}),q.length>1&&v.jsx("nav",{className:"hub-machines",role:"tablist","aria-label":"Machines",children:q.map(K=>v.jsx(Op,{host:K,sessions:re(K),selected:K===me,onSelect:()=>Re(K.id)},K.id||"local"))}),me&&v.jsx(Vp,{host:me,sessions:re(me)}),A&&v.jsx(Mp,{onClose:()=>I(!1)})]})}op();const qc=new URLSearchParams(window.location.search),Mc=qc.get("session");Od.createRoot(document.getElementById("root")).render(Mc?v.jsx(Pp,{sessionKey:Mc,folder:qc.get("folder")??void 0}):v.jsx($p,{}));
@@ -0,0 +1 @@
1
+ :root{color-scheme:dark;background:#050609;font-family:Inter,ui-sans-serif,system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;overflow-x:hidden;background:#050609}button{font:inherit}.voice-page{--color: 144 151 169;--level: 0;position:relative;display:grid;min-height:100vh;place-items:center;overflow:hidden;isolation:isolate;background:radial-gradient(circle at 50% 47%,rgb(var(--color) / .08),transparent 29%),#050609;transition:background .7s ease}.voice-page:before,.voice-page:after{position:absolute;z-index:-1;content:"";width:min(75vw,720px);aspect-ratio:1;border-radius:50%;border:1px solid rgb(var(--color) / .09);transition:border-color .5s ease}.voice-page:before{transform:scale(1.3) rotate(25deg)}.voice-page:after{transform:scale(.82) rotate(-20deg)}.voice-page[data-state=listening],.voice-page[data-state=hearing]{--color: 48 224 151}.voice-page[data-state=thinking]{--color: 173 139 255}.voice-page[data-state=running]{--color: 255 158 68}.voice-page[data-state=speaking]{--color: 70 154 255}.voice-page[data-state=muted]{--color: 95 104 119}.voice-page[data-state=error]{--color: 255 91 107}.voice-shape{position:relative;width:min(46vw,360px);min-width:220px;aspect-ratio:1;padding:0;border:0;border-radius:50%;cursor:pointer;background:transparent;-webkit-tap-highlight-color:transparent;outline:none}.voice-shape:focus-visible{outline:1px solid rgb(var(--color) / .85);outline-offset:20px}.voice-shape__halo,.voice-shape__ring,.voice-shape__core{position:absolute;top:0;right:0;bottom:0;left:0;display:block;border-radius:42% 58% 62% 38%/48% 40% 60% 52%}.voice-shape__halo{top:-22%;right:-22%;bottom:-22%;left:-22%;opacity:calc(.15 + var(--level) * .35);background:radial-gradient(circle,rgb(var(--color) / .34),transparent 61%);filter:blur(28px);transform:scale(calc(1 + var(--level) * .25));transition:opacity .26s ease,transform .1s linear,background .5s ease}.voice-shape__ring{border:1px solid rgb(var(--color) / .65);box-shadow:inset 0 0 26px rgb(var(--color) / .11),0 0 calc(22px + var(--level) * 34px) rgb(var(--color) / calc(.11 + var(--level) * .27));transition:border-color .5s ease,box-shadow .16s ease}.voice-shape__ring--one{animation:orbit-one 10s linear infinite;transform:scale(calc(1 + var(--level) * .1))}.voice-shape__ring--two{top:12%;right:12%;bottom:12%;left:12%;opacity:.72;animation:orbit-two 7s linear infinite reverse;transform:scale(calc(1 + var(--level) * .17))}.voice-shape__core{top:27%;right:27%;bottom:27%;left:27%;background:radial-gradient(circle at 36% 31%,rgb(255 255 255 / .75),rgb(var(--color) / .84) 22%,rgb(var(--color) / .22) 61%,transparent 72%);box-shadow:0 0 calc(22px + var(--level) * 54px) rgb(var(--color) / calc(.25 + var(--level) * .45)),inset -10px -12px 25px #00000073;transform:scale(calc(.9 + var(--level) * .2));transition:transform 90ms linear,background .5s ease,box-shadow .15s ease;animation:breathe 4.2s ease-in-out infinite}.voice-page[data-state=hearing] .voice-shape__core{animation-duration:.72s}.voice-page[data-state=thinking] .voice-shape__ring{animation-duration:2.4s}.voice-page[data-state=running] .voice-shape__ring{animation-duration:1.6s}.voice-page[data-state=speaking] .voice-shape__core{animation-duration:.52s}.voice-page[data-state=muted] .voice-shape{opacity:.62}.voice-page[data-state=error] .voice-shape{animation:shake .35s ease-in-out 2}.voice-error{position:fixed;z-index:4;top:calc(50% + clamp(148px,27vw,208px));left:50%;display:flex;align-items:center;gap:10px;width:max-content;max-width:calc(100vw - 32px);margin:0;padding:7px 8px 7px 11px;transform:translate(-50%);border:1px solid rgb(255 178 183 / .28);border-radius:999px;background:#271016eb;box-shadow:0 8px 24px #00000047;color:#ffcbd0;font-size:12px;line-height:1.2}.voice-error span{overflow-wrap:anywhere}.voice-error__reconnect{flex:none;padding:5px 9px;border:1px solid rgb(255 178 183 / .32);border-radius:999px;color:inherit;background:#ffffff14;cursor:pointer;font-size:11px}.voice-error__reconnect:hover,.voice-error__reconnect:focus-visible{background:#ffffff2b;outline:none}.room-header{position:fixed;z-index:3;top:0;left:0;right:0;display:flex;align-items:center;gap:10px;padding:14px 16px;color:#e0e4eed9;font-size:13px}.room-header__back{flex:none;color:inherit;text-decoration:none;font-size:18px;line-height:1}.room-header__back:hover,.room-header__back:focus-visible{color:#fff;outline:none}.room-header__logo{flex:none;width:22px;height:22px;border-radius:6px}.room-header__title{font-weight:600}.room-header__cwd{color:#d0d6e48c;font-size:11px}.room-status{position:fixed;z-index:3;top:88px;left:50%;margin:0;padding:5px 10px;transform:translate(-50%);border:1px solid rgb(255 255 255 / .12);border-radius:999px;background:#0d0f15cc;color:#d0d6e4d1;font-size:11px;white-space:nowrap}.voice-fallback-notice{top:112px}@keyframes orbit-one{to{rotate:1turn}}@keyframes orbit-two{to{rotate:1turn}}@keyframes breathe{50%{scale:1.08;filter:brightness(1.15)}}@keyframes shake{25%{translate:-7px}75%{translate:7px}}@media(prefers-reduced-motion:reduce){.voice-shape *,.voice-page:before,.voice-page:after{animation:none!important;transition-duration:.01ms!important}}.voice-context-menu,.voice-settings{position:fixed;z-index:5;border:1px solid rgb(255 255 255 / .14);border-radius:12px;background:#0d0f15f5;box-shadow:0 12px 36px #00000059;color:#f0f3fa;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.voice-context-menu{min-width:150px;padding:5px}.voice-context-menu button{width:100%;padding:9px 11px;border:0;border-radius:8px;color:inherit;background:transparent;cursor:pointer;text-align:left;font-size:13px}.voice-context-menu button:hover,.voice-context-menu button:focus-visible{background:#ffffff1a;outline:none}.voice-settings{top:50%;left:50%;width:min(390px,calc(100vw - 24px));max-height:min(720px,calc(100vh - 24px));overflow:auto;padding:16px;transform:translate(-50%,-50%)}.voice-settings__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}.voice-settings h2{margin:0;font-size:15px;font-weight:600;letter-spacing:.01em}.voice-settings__close{width:26px;height:26px;padding:0;border:0;border-radius:7px;color:#e0e4eecc;background:transparent;cursor:pointer;font-size:21px;line-height:1}.voice-settings__close:hover,.voice-settings__close:focus-visible{background:#ffffff1a;outline:none}.voice-settings__label{display:block;margin-bottom:6px;color:#d0d6e4b3;font-size:11px}.voice-settings__choice{display:flex;gap:7px}.voice-settings select{min-width:0;flex:1;padding:8px 9px;border:1px solid rgb(255 255 255 / .16);border-radius:8px;color:inherit;background:#ffffff12;font-size:13px}.voice-settings select,.voice-settings option,.voice-settings optgroup{color:#f0f3fa;background-color:#0d0f15;color-scheme:dark}.voice-settings select:focus-visible{outline:1px solid rgb(var(--color) / .9);outline-offset:1px}.voice-settings__play{width:34px;padding:0;border:1px solid rgb(255 255 255 / .16);border-radius:8px;color:inherit;background:#ffffff12;cursor:pointer;font-size:12px}.voice-settings__play:hover:not(:disabled),.voice-settings__play:focus-visible:not(:disabled){background:#ffffff24;outline:none}.voice-settings button:disabled{cursor:default;opacity:.42}.voice-settings__current,.voice-settings__muted,.voice-settings__error,.voice-settings__notice{margin:9px 0 0;font-size:11px;line-height:1.4}.voice-settings__current,.voice-settings__muted{color:#d0d6e4a6}.voice-settings__error{color:#ffb2b7}.voice-settings__notice{color:#80e8bd}.voice-settings__actions{display:flex;gap:7px;margin-top:14px}.voice-settings__actions button{flex:1;padding:8px 9px;border:1px solid rgb(255 255 255 / .16);border-radius:8px;color:inherit;background:#ffffff14;cursor:pointer;font-size:11px}.voice-settings__actions button:first-child{border-color:rgb(var(--color) / .5);background:rgb(var(--color) / .17)}.voice-settings__actions button:hover:not(:disabled),.voice-settings__actions button:focus-visible:not(:disabled){background:#ffffff26;outline:none}.voice-settings__connection-fields{display:grid;gap:8px;padding-top:6px}.voice-settings__section-title{margin:7px 0 0;color:#d0d6e49e;font-size:10px;letter-spacing:.08em;text-transform:uppercase}.voice-settings__field{display:grid;gap:4px;color:#d0d6e4a6;font-size:10px}.voice-settings__field input,.voice-settings__field select{width:100%;min-width:0;padding:7px 8px;border:1px solid rgb(255 255 255 / .14);border-radius:7px;color:inherit;background:#ffffff0f;font-size:11px}.voice-settings__field-row{display:grid;grid-template-columns:1fr 1fr;gap:7px}.voice-settings__toggle{display:flex;align-items:center;gap:7px;color:#d0d6e4cc;font-size:11px}.voice-settings__toggle input{accent-color:rgb(var(--color))}.voice-settings__field input:focus-visible,.voice-settings__field select:focus-visible{outline:1px solid rgb(var(--color) / .9);outline-offset:1px}.voice-shape{touch-action:manipulation;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.voice-settings--advanced{width:min(500px,calc(100vw - 24px))}.voice-settings__back{margin:-4px 0 -4px -7px;padding:6px 7px;border:0;border-radius:7px;color:#e0e4eed1;background:transparent;cursor:pointer;font-size:12px}.voice-settings__back:hover,.voice-settings__back:focus-visible{color:#fff;background:#ffffff1a;outline:none}.voice-settings__availability{display:flex;align-items:center;gap:6px;margin:8px 0 0;color:#80e8bd;font-size:11px}.voice-settings__availability span{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 8px currentColor}.voice-settings__availability--checking{color:#d0d6e4a6}.voice-settings__availability--offline{color:#ffb2b7}.voice-settings__availability-note{margin:5px 0 0;color:#ffb2b7;font-size:11px;line-height:1.4}.voice-settings__advanced-link{width:100%;margin-top:15px;padding:10px 0 0;border:0;border-top:1px solid rgb(255 255 255 / .1);color:#e0e4eed1;background:transparent;cursor:pointer;font-size:12px;text-align:left}.voice-settings__advanced-link:hover,.voice-settings__advanced-link:focus-visible{color:#fff;outline:none}.voice-onboarding{position:fixed;z-index:8;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:20px;background:#0304079e;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.voice-onboarding__card{width:min(360px,100%);padding:21px;border:1px solid rgb(255 255 255 / .16);border-radius:14px;background:#0d0f15fa;box-shadow:0 18px 48px #00000073;color:#f0f3fa;text-align:center}.voice-onboarding__card h2{margin:0;font-size:17px}.voice-onboarding__card p{margin:10px 0 18px;color:#d0d6e4c2;font-size:13px;line-height:1.45}.voice-onboarding__card button{min-width:90px;padding:8px 14px;border:1px solid rgb(var(--color) / .5);border-radius:8px;color:inherit;background:rgb(var(--color) / .17);cursor:pointer}.voice-onboarding__card button:hover,.voice-onboarding__card button:focus-visible{background:#ffffff26;outline:none}.auth-screen{display:grid;place-items:center;min-height:100vh;margin:0;padding:24px;color:#d0d6e4cc;font-size:14px;text-align:center;background:#050609}.auth-screen code{padding:2px 6px;border-radius:5px;background:#ffffff14;font-size:13px}.voice-health{position:fixed;z-index:3;top:56px;left:50%;margin:0;padding:5px 10px;transform:translate(-50%);border:1px solid rgb(255 205 123 / .3);border-radius:999px;background:#2a1f0dd1;color:#ffeec7;font-size:11px;white-space:nowrap}.hub-page{min-height:100vh;margin:0 auto;padding:max(24px,env(safe-area-inset-top)) 20px 64px;max-width:760px;overflow-x:clip;color:#f0f3fa;background:#050609}.hub-header{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-bottom:24px}.hub-header h1{margin:0;font-size:20px;font-weight:650}.hub-title{display:flex;align-items:center;gap:10px}.hub-logo{flex:none;width:30px;height:30px;border-radius:8px}.hub-speech-status{margin:0;color:#80e8bd;font-size:12px}.hub-speech-status--warn{color:#ffcd7b}.hub-remote-button{margin-left:auto;padding:8px 13px;border:1px solid rgb(255 255 255 / .16);border-radius:999px;color:inherit;background:#ffffff12;cursor:pointer;font-size:12px}.hub-remote-button:hover,.hub-remote-button:focus-visible{background:#ffffff24;outline:none}.hub-empty{margin:18px 2px;color:#d0d6e499;font-size:13px;line-height:1.45}.hub-machines{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(148px,1fr);gap:10px;margin:0 -20px 18px;padding:2px 20px 6px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.hub-machines::-webkit-scrollbar{display:none}.hub-machine{display:flex;flex-direction:column;gap:4px;min-width:0;padding:12px 13px;border:1px solid rgb(255 255 255 / .12);border-radius:14px;color:inherit;background:#ffffff0a;cursor:pointer;text-align:left;scroll-snap-align:start;transition:background .15s,border-color .15s}.hub-machine:hover,.hub-machine:focus-visible{background:#ffffff14;outline:none}.hub-machine--selected{border-color:#469affbf;background:#469aff1f;box-shadow:0 0 0 1px #469aff59 inset}.hub-machine--offline{opacity:.55}.hub-machine__name{display:flex;align-items:center;gap:8px;overflow:hidden;font-size:14px;font-weight:620;text-overflow:ellipsis;white-space:nowrap}.hub-machine__name .hub-dot{margin-top:0}.hub-machine__meta{overflow:hidden;color:#d0d6e499;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.hub-panel{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.hub-search{position:sticky;z-index:2;top:0;display:flex;gap:8px;margin:0 -20px;padding:10px 20px;background:#050609eb;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.hub-search__input{flex:1;min-width:0;padding:10px 13px;border:1px solid rgb(255 255 255 / .14);border-radius:11px;color:inherit;background:#ffffff0d;font:inherit;font-size:16px;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.hub-search__input:focus{border-color:#469affb3}.hub-search__input::placeholder{color:#d0d6e473}.hub-chip{flex:none;padding:7px 12px;border:1px solid rgb(255 255 255 / .14);border-radius:11px;color:#d0d6e4d9;background:#ffffff0a;cursor:pointer;font-size:12px;white-space:nowrap}.hub-chip--on{border-color:#469affbf;color:#f0f3fa;background:#469aff2e}.hub-chip:disabled{cursor:default;opacity:.4}.hub-sessions{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin:0;padding:0;list-style:none}.hub-session{display:flex;align-items:flex-start;gap:11px;width:100%;min-width:0;padding:11px 13px;border:1px solid rgb(255 255 255 / .08);border-radius:12px;color:inherit;background:#ffffff09;cursor:pointer;text-align:left}.hub-session:hover,.hub-session:focus-visible{background:#ffffff14;outline:none}.hub-session__body{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.hub-session__title{display:-webkit-box;overflow:hidden;font-size:14px;font-weight:550;line-height:1.35;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.hub-session__meta{display:flex;align-items:center;gap:8px;min-width:0;color:#d0d6e48c;font-size:11px}.hub-session__badge{flex:none;padding:1px 7px;border-radius:999px;background:#ffffff14;color:#e0e4eecc}.hub-session__cwd{min-width:0;overflow:hidden;font-family:ui-monospace,monospace;text-overflow:ellipsis;white-space:nowrap}.hub-session__time{flex:none;margin-left:auto}.hub-session__hint{color:#80e8bdd9;font-size:11px}.hub-more{justify-self:center;margin-top:4px;padding:9px 16px;border:1px solid rgb(255 255 255 / .14);border-radius:999px;color:inherit;background:transparent;cursor:pointer;font-size:12px}.hub-more:hover,.hub-more:focus-visible{background:#ffffff14;outline:none}.hub-primary{flex:none;padding:0 16px;border:0;border-radius:11px;color:#fff;background:#2e7deb;cursor:pointer;font-size:14px;font-weight:600;white-space:nowrap}.hub-primary:hover:not(:disabled),.hub-primary:focus-visible:not(:disabled){background:#428efa;outline:none}.hub-primary:disabled{cursor:default;opacity:.45}.hub-newchat .hub-primary{padding:10px 18px}.hub-newchat{display:grid;gap:12px;padding:14px;border:1px solid rgb(70 154 255 / .35);border-radius:14px;background:#469aff12}.hub-newchat__row{display:grid;gap:7px}.hub-newchat__label{color:#d0d6e4a6;font-size:12px}.hub-newchat__actions{display:flex;justify-content:flex-end;gap:8px}.hub-newchat__actions .hub-more{margin:0}.hub-filters{display:grid;gap:8px}.hub-chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.hub-chips::-webkit-scrollbar{display:none}.hub-chip__count{margin-left:3px;color:#d0d6e48c;font-size:11px}.hub-chip--on .hub-chip__count{color:#f0f3facc}.hub-selects{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}.hub-selects .hub-select:first-child{grid-column:1 / -1}.hub-select{min-width:0;padding:8px 10px;border:1px solid rgb(255 255 255 / .14);border-radius:10px;color:inherit;background:#ffffff0d;font:inherit;font-size:13px;text-overflow:ellipsis}.hub-select--wide{width:100%;font-size:16px}.hub-select option{color:#111}.hub-count{margin:0 2px;color:#d0d6e48c;font-size:12px}.hub-link{padding:0;border:0;color:#78b4ff;background:none;cursor:pointer;font:inherit;text-decoration:underline}.hub-folders{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.hub-folder{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0;padding:10px;border:1px solid rgb(255 255 255 / .1);border-radius:14px;background:#ffffff06}.hub-folder__list{max-height:min(22rem,55vh);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-right:2px}.hub-folder__search{min-width:0;padding:7px 11px;border:1px solid rgb(255 255 255 / .12);border-radius:9px;color:inherit;background:#ffffff0a;font:inherit;font-size:16px;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.hub-folder__search:focus{border-color:#469affb3}.hub-folder__search::placeholder{color:#d0d6e466}.hub-folder__none{margin:2px 4px 4px;font-size:13px}.hub-folder__title{display:flex;justify-content:space-between;gap:10px;margin:0 4px;color:#d0d6e4b3;font-family:ui-monospace,monospace;font-size:12px;font-weight:500}.hub-folder__title span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hub-folder__count{flex:none;color:#d0d6e473}.hub-dot--online{background:#50d696;box-shadow:0 0 6px #50d69699}@media(min-width:720px){.hub-machines{grid-auto-flow:row;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));margin:0 0 18px;padding:2px 0 6px;overflow:visible}.hub-search{margin:0;padding:10px 0}.hub-selects{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr)}.hub-selects .hub-select:first-child{grid-column:auto}}.hub-muted{margin:0;color:#d0d6e48c;font-size:13px}.hub-error{margin:0 0 16px;padding:9px 12px;border:1px solid rgb(255 178 183 / .3);border-radius:10px;background:#271016b3;color:#ffcbd0;font-size:12px}.hub-dot{flex:none;width:8px;height:8px;margin-top:4px;border-radius:50%;background:#5f6877}.hub-dot--open{background:#469aff;box-shadow:0 0 6px #469affb3}.hub-dot--busy{background:#ff9e44;box-shadow:0 0 6px #ff9e44b3}.hub-dot--idle{background:#5f6877}.hub-remote{position:fixed;z-index:6;top:50%;left:50%;width:min(360px,calc(100vw - 24px));max-height:min(560px,calc(100vh - 24px));overflow:auto;padding:16px;transform:translate(-50%,-50%);border:1px solid rgb(255 255 255 / .14);border-radius:12px;background:#0d0f15fa;box-shadow:0 18px 48px #00000073;color:#f0f3fa}.hub-remote__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}.hub-remote__header h2{margin:0;font-size:15px;font-weight:600}.hub-remote__close{width:26px;height:26px;padding:0;border:0;border-radius:7px;color:#e0e4eecc;background:transparent;cursor:pointer;font-size:21px;line-height:1}.hub-remote__close:hover,.hub-remote__close:focus-visible{background:#ffffff1a;outline:none}.hub-remote__options{display:grid;gap:7px;margin:0;padding:0;list-style:none}.hub-remote__options button{width:100%;padding:9px 11px;border:1px solid rgb(255 255 255 / .14);border-radius:8px;color:inherit;background:#ffffff0f;cursor:pointer;font-size:13px;text-align:left}.hub-remote__options button:hover:not(:disabled),.hub-remote__options button:focus-visible:not(:disabled){background:#ffffff1f;outline:none}.hub-remote__options button:disabled{cursor:default;opacity:.45}.hub-remote__active{display:grid;gap:10px;justify-items:center;text-align:center}.hub-remote__url{margin:0;padding:8px 10px;border-radius:8px;background:#ffffff0f;color:#d0d6e4d9;font-size:11px;word-break:break-all}.hub-remote__qr{width:180px;height:180px;border-radius:8px;background:#fff;padding:8px}.hub-remote__active button{width:100%;padding:9px 11px;border:1px solid rgb(255 178 183 / .3);border-radius:8px;color:#ffcbd0;background:#ffffff0f;cursor:pointer;font-size:12px}.hub-remote__active button:hover,.hub-remote__active button:focus-visible{background:#ffffff1f;outline:none}
Binary file
@@ -8,8 +8,8 @@
8
8
  <link rel="icon" type="image/png" sizes="192x192" href="/logo-192.png" />
9
9
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
10
10
  <title>Meldivo</title>
11
- <script type="module" crossorigin src="/assets/index-ChgmFShS.js"></script>
12
- <link rel="stylesheet" crossorigin href="/assets/index-DqXNdnDD.css">
11
+ <script type="module" crossorigin src="/assets/index-BXHwRIO6.js"></script>
12
+ <link rel="stylesheet" crossorigin href="/assets/index-DkxAKrAA.css">
13
13
  </head>
14
14
  <body><div id="root"></div></body>
15
15
  </html>
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meldivo",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Always-on local voice hub for coding agents: talk hands-free to your Pi, OpenCode, and Claude Code sessions from any browser or phone. Private on-device speech (Parakeet + Kokoro). No cloud speech APIs.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- :root{color-scheme:dark;background:#050609;font-family:Inter,ui-sans-serif,system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;overflow-x:hidden;background:#050609}button{font:inherit}.voice-page{--color: 144 151 169;--level: 0;position:relative;display:grid;min-height:100vh;place-items:center;overflow:hidden;isolation:isolate;background:radial-gradient(circle at 50% 47%,rgb(var(--color) / .08),transparent 29%),#050609;transition:background .7s ease}.voice-page:before,.voice-page:after{position:absolute;z-index:-1;content:"";width:min(75vw,720px);aspect-ratio:1;border-radius:50%;border:1px solid rgb(var(--color) / .09);transition:border-color .5s ease}.voice-page:before{transform:scale(1.3) rotate(25deg)}.voice-page:after{transform:scale(.82) rotate(-20deg)}.voice-page[data-state=listening],.voice-page[data-state=hearing]{--color: 48 224 151}.voice-page[data-state=thinking]{--color: 173 139 255}.voice-page[data-state=running]{--color: 255 158 68}.voice-page[data-state=speaking]{--color: 70 154 255}.voice-page[data-state=muted]{--color: 95 104 119}.voice-page[data-state=error]{--color: 255 91 107}.voice-shape{position:relative;width:min(46vw,360px);min-width:220px;aspect-ratio:1;padding:0;border:0;border-radius:50%;cursor:pointer;background:transparent;-webkit-tap-highlight-color:transparent;outline:none}.voice-shape:focus-visible{outline:1px solid rgb(var(--color) / .85);outline-offset:20px}.voice-shape__halo,.voice-shape__ring,.voice-shape__core{position:absolute;top:0;right:0;bottom:0;left:0;display:block;border-radius:42% 58% 62% 38%/48% 40% 60% 52%}.voice-shape__halo{top:-22%;right:-22%;bottom:-22%;left:-22%;opacity:calc(.15 + var(--level) * .35);background:radial-gradient(circle,rgb(var(--color) / .34),transparent 61%);filter:blur(28px);transform:scale(calc(1 + var(--level) * .25));transition:opacity .26s ease,transform .1s linear,background .5s ease}.voice-shape__ring{border:1px solid rgb(var(--color) / .65);box-shadow:inset 0 0 26px rgb(var(--color) / .11),0 0 calc(22px + var(--level) * 34px) rgb(var(--color) / calc(.11 + var(--level) * .27));transition:border-color .5s ease,box-shadow .16s ease}.voice-shape__ring--one{animation:orbit-one 10s linear infinite;transform:scale(calc(1 + var(--level) * .1))}.voice-shape__ring--two{top:12%;right:12%;bottom:12%;left:12%;opacity:.72;animation:orbit-two 7s linear infinite reverse;transform:scale(calc(1 + var(--level) * .17))}.voice-shape__core{top:27%;right:27%;bottom:27%;left:27%;background:radial-gradient(circle at 36% 31%,rgb(255 255 255 / .75),rgb(var(--color) / .84) 22%,rgb(var(--color) / .22) 61%,transparent 72%);box-shadow:0 0 calc(22px + var(--level) * 54px) rgb(var(--color) / calc(.25 + var(--level) * .45)),inset -10px -12px 25px #00000073;transform:scale(calc(.9 + var(--level) * .2));transition:transform 90ms linear,background .5s ease,box-shadow .15s ease;animation:breathe 4.2s ease-in-out infinite}.voice-page[data-state=hearing] .voice-shape__core{animation-duration:.72s}.voice-page[data-state=thinking] .voice-shape__ring{animation-duration:2.4s}.voice-page[data-state=running] .voice-shape__ring{animation-duration:1.6s}.voice-page[data-state=speaking] .voice-shape__core{animation-duration:.52s}.voice-page[data-state=muted] .voice-shape{opacity:.62}.voice-page[data-state=error] .voice-shape{animation:shake .35s ease-in-out 2}.voice-error{position:fixed;z-index:4;top:calc(50% + clamp(148px,27vw,208px));left:50%;display:flex;align-items:center;gap:10px;width:max-content;max-width:calc(100vw - 32px);margin:0;padding:7px 8px 7px 11px;transform:translate(-50%);border:1px solid rgb(255 178 183 / .28);border-radius:999px;background:#271016eb;box-shadow:0 8px 24px #00000047;color:#ffcbd0;font-size:12px;line-height:1.2}.voice-error span{overflow-wrap:anywhere}.voice-error__reconnect{flex:none;padding:5px 9px;border:1px solid rgb(255 178 183 / .32);border-radius:999px;color:inherit;background:#ffffff14;cursor:pointer;font-size:11px}.voice-error__reconnect:hover,.voice-error__reconnect:focus-visible{background:#ffffff2b;outline:none}.room-header{position:fixed;z-index:3;top:0;left:0;right:0;display:flex;align-items:center;gap:10px;padding:14px 16px;color:#e0e4eed9;font-size:13px}.room-header__back{flex:none;color:inherit;text-decoration:none;font-size:18px;line-height:1}.room-header__back:hover,.room-header__back:focus-visible{color:#fff;outline:none}.room-header__title{font-weight:600}.room-header__cwd{color:#d0d6e48c;font-size:11px}.room-status{position:fixed;z-index:3;top:88px;left:50%;margin:0;padding:5px 10px;transform:translate(-50%);border:1px solid rgb(255 255 255 / .12);border-radius:999px;background:#0d0f15cc;color:#d0d6e4d1;font-size:11px;white-space:nowrap}.voice-fallback-notice{top:112px}@keyframes orbit-one{to{rotate:1turn}}@keyframes orbit-two{to{rotate:1turn}}@keyframes breathe{50%{scale:1.08;filter:brightness(1.15)}}@keyframes shake{25%{translate:-7px}75%{translate:7px}}@media(prefers-reduced-motion:reduce){.voice-shape *,.voice-page:before,.voice-page:after{animation:none!important;transition-duration:.01ms!important}}.voice-context-menu,.voice-settings{position:fixed;z-index:5;border:1px solid rgb(255 255 255 / .14);border-radius:12px;background:#0d0f15f5;box-shadow:0 12px 36px #00000059;color:#f0f3fa;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.voice-context-menu{min-width:150px;padding:5px}.voice-context-menu button{width:100%;padding:9px 11px;border:0;border-radius:8px;color:inherit;background:transparent;cursor:pointer;text-align:left;font-size:13px}.voice-context-menu button:hover,.voice-context-menu button:focus-visible{background:#ffffff1a;outline:none}.voice-settings{top:50%;left:50%;width:min(390px,calc(100vw - 24px));max-height:min(720px,calc(100vh - 24px));overflow:auto;padding:16px;transform:translate(-50%,-50%)}.voice-settings__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}.voice-settings h2{margin:0;font-size:15px;font-weight:600;letter-spacing:.01em}.voice-settings__close{width:26px;height:26px;padding:0;border:0;border-radius:7px;color:#e0e4eecc;background:transparent;cursor:pointer;font-size:21px;line-height:1}.voice-settings__close:hover,.voice-settings__close:focus-visible{background:#ffffff1a;outline:none}.voice-settings__label{display:block;margin-bottom:6px;color:#d0d6e4b3;font-size:11px}.voice-settings__choice{display:flex;gap:7px}.voice-settings select{min-width:0;flex:1;padding:8px 9px;border:1px solid rgb(255 255 255 / .16);border-radius:8px;color:inherit;background:#ffffff12;font-size:13px}.voice-settings select,.voice-settings option,.voice-settings optgroup{color:#f0f3fa;background-color:#0d0f15;color-scheme:dark}.voice-settings select:focus-visible{outline:1px solid rgb(var(--color) / .9);outline-offset:1px}.voice-settings__play{width:34px;padding:0;border:1px solid rgb(255 255 255 / .16);border-radius:8px;color:inherit;background:#ffffff12;cursor:pointer;font-size:12px}.voice-settings__play:hover:not(:disabled),.voice-settings__play:focus-visible:not(:disabled){background:#ffffff24;outline:none}.voice-settings button:disabled{cursor:default;opacity:.42}.voice-settings__current,.voice-settings__muted,.voice-settings__error,.voice-settings__notice{margin:9px 0 0;font-size:11px;line-height:1.4}.voice-settings__current,.voice-settings__muted{color:#d0d6e4a6}.voice-settings__error{color:#ffb2b7}.voice-settings__notice{color:#80e8bd}.voice-settings__actions{display:flex;gap:7px;margin-top:14px}.voice-settings__actions button{flex:1;padding:8px 9px;border:1px solid rgb(255 255 255 / .16);border-radius:8px;color:inherit;background:#ffffff14;cursor:pointer;font-size:11px}.voice-settings__actions button:first-child{border-color:rgb(var(--color) / .5);background:rgb(var(--color) / .17)}.voice-settings__actions button:hover:not(:disabled),.voice-settings__actions button:focus-visible:not(:disabled){background:#ffffff26;outline:none}.voice-settings__connection-fields{display:grid;gap:8px;padding-top:6px}.voice-settings__section-title{margin:7px 0 0;color:#d0d6e49e;font-size:10px;letter-spacing:.08em;text-transform:uppercase}.voice-settings__field{display:grid;gap:4px;color:#d0d6e4a6;font-size:10px}.voice-settings__field input,.voice-settings__field select{width:100%;min-width:0;padding:7px 8px;border:1px solid rgb(255 255 255 / .14);border-radius:7px;color:inherit;background:#ffffff0f;font-size:11px}.voice-settings__field-row{display:grid;grid-template-columns:1fr 1fr;gap:7px}.voice-settings__toggle{display:flex;align-items:center;gap:7px;color:#d0d6e4cc;font-size:11px}.voice-settings__toggle input{accent-color:rgb(var(--color))}.voice-settings__field input:focus-visible,.voice-settings__field select:focus-visible{outline:1px solid rgb(var(--color) / .9);outline-offset:1px}.voice-shape{touch-action:manipulation;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.voice-settings--advanced{width:min(500px,calc(100vw - 24px))}.voice-settings__back{margin:-4px 0 -4px -7px;padding:6px 7px;border:0;border-radius:7px;color:#e0e4eed1;background:transparent;cursor:pointer;font-size:12px}.voice-settings__back:hover,.voice-settings__back:focus-visible{color:#fff;background:#ffffff1a;outline:none}.voice-settings__availability{display:flex;align-items:center;gap:6px;margin:8px 0 0;color:#80e8bd;font-size:11px}.voice-settings__availability span{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 8px currentColor}.voice-settings__availability--checking{color:#d0d6e4a6}.voice-settings__availability--offline{color:#ffb2b7}.voice-settings__availability-note{margin:5px 0 0;color:#ffb2b7;font-size:11px;line-height:1.4}.voice-settings__advanced-link{width:100%;margin-top:15px;padding:10px 0 0;border:0;border-top:1px solid rgb(255 255 255 / .1);color:#e0e4eed1;background:transparent;cursor:pointer;font-size:12px;text-align:left}.voice-settings__advanced-link:hover,.voice-settings__advanced-link:focus-visible{color:#fff;outline:none}.voice-onboarding{position:fixed;z-index:8;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:20px;background:#0304079e;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.voice-onboarding__card{width:min(360px,100%);padding:21px;border:1px solid rgb(255 255 255 / .16);border-radius:14px;background:#0d0f15fa;box-shadow:0 18px 48px #00000073;color:#f0f3fa;text-align:center}.voice-onboarding__card h2{margin:0;font-size:17px}.voice-onboarding__card p{margin:10px 0 18px;color:#d0d6e4c2;font-size:13px;line-height:1.45}.voice-onboarding__card button{min-width:90px;padding:8px 14px;border:1px solid rgb(var(--color) / .5);border-radius:8px;color:inherit;background:rgb(var(--color) / .17);cursor:pointer}.voice-onboarding__card button:hover,.voice-onboarding__card button:focus-visible{background:#ffffff26;outline:none}.auth-screen{display:grid;place-items:center;min-height:100vh;margin:0;padding:24px;color:#d0d6e4cc;font-size:14px;text-align:center;background:#050609}.auth-screen code{padding:2px 6px;border-radius:5px;background:#ffffff14;font-size:13px}.voice-health{position:fixed;z-index:3;top:56px;left:50%;margin:0;padding:5px 10px;transform:translate(-50%);border:1px solid rgb(255 205 123 / .3);border-radius:999px;background:#2a1f0dd1;color:#ffeec7;font-size:11px;white-space:nowrap}.hub-page{min-height:100vh;margin:0 auto;padding:max(24px,env(safe-area-inset-top)) 20px 64px;max-width:760px;overflow-x:clip;color:#f0f3fa;background:#050609}.hub-header{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-bottom:24px}.hub-header h1{margin:0;font-size:20px;font-weight:650}.hub-speech-status{margin:0;color:#80e8bd;font-size:12px}.hub-speech-status--warn{color:#ffcd7b}.hub-remote-button{margin-left:auto;padding:8px 13px;border:1px solid rgb(255 255 255 / .16);border-radius:999px;color:inherit;background:#ffffff12;cursor:pointer;font-size:12px}.hub-remote-button:hover,.hub-remote-button:focus-visible{background:#ffffff24;outline:none}.hub-empty{margin:18px 2px;color:#d0d6e499;font-size:13px;line-height:1.45}.hub-machines{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(148px,1fr);gap:10px;margin:0 -20px 18px;padding:2px 20px 6px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.hub-machines::-webkit-scrollbar{display:none}.hub-machine{display:flex;flex-direction:column;gap:4px;min-width:0;padding:12px 13px;border:1px solid rgb(255 255 255 / .12);border-radius:14px;color:inherit;background:#ffffff0a;cursor:pointer;text-align:left;scroll-snap-align:start;transition:background .15s,border-color .15s}.hub-machine:hover,.hub-machine:focus-visible{background:#ffffff14;outline:none}.hub-machine--selected{border-color:#469affbf;background:#469aff1f;box-shadow:0 0 0 1px #469aff59 inset}.hub-machine--offline{opacity:.55}.hub-machine__name{display:flex;align-items:center;gap:8px;overflow:hidden;font-size:14px;font-weight:620;text-overflow:ellipsis;white-space:nowrap}.hub-machine__name .hub-dot{margin-top:0}.hub-machine__meta{overflow:hidden;color:#d0d6e499;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.hub-panel{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.hub-search{position:sticky;z-index:2;top:0;display:flex;gap:8px;margin:0 -20px;padding:10px 20px;background:#050609eb;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.hub-search__input{flex:1;min-width:0;padding:10px 13px;border:1px solid rgb(255 255 255 / .14);border-radius:11px;color:inherit;background:#ffffff0d;font:inherit;font-size:16px;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.hub-search__input:focus{border-color:#469affb3}.hub-search__input::placeholder{color:#d0d6e473}.hub-chip{flex:none;padding:7px 12px;border:1px solid rgb(255 255 255 / .14);border-radius:11px;color:#d0d6e4d9;background:#ffffff0a;cursor:pointer;font-size:12px;white-space:nowrap}.hub-chip--on{border-color:#469affbf;color:#f0f3fa;background:#469aff2e}.hub-chip:disabled{cursor:default;opacity:.4}.hub-sessions{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin:0;padding:0;list-style:none}.hub-session{display:flex;align-items:flex-start;gap:11px;width:100%;min-width:0;padding:11px 13px;border:1px solid rgb(255 255 255 / .08);border-radius:12px;color:inherit;background:#ffffff09;cursor:pointer;text-align:left}.hub-session:hover,.hub-session:focus-visible{background:#ffffff14;outline:none}.hub-session__body{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.hub-session__title{display:-webkit-box;overflow:hidden;font-size:14px;font-weight:550;line-height:1.35;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.hub-session__meta{display:flex;align-items:center;gap:8px;min-width:0;color:#d0d6e48c;font-size:11px}.hub-session__badge{flex:none;padding:1px 7px;border-radius:999px;background:#ffffff14;color:#e0e4eecc}.hub-session__cwd{min-width:0;overflow:hidden;font-family:ui-monospace,monospace;text-overflow:ellipsis;white-space:nowrap}.hub-session__time{flex:none;margin-left:auto}.hub-session__hint{color:#80e8bdd9;font-size:11px}.hub-more{justify-self:center;margin-top:4px;padding:9px 16px;border:1px solid rgb(255 255 255 / .14);border-radius:999px;color:inherit;background:transparent;cursor:pointer;font-size:12px}.hub-more:hover,.hub-more:focus-visible{background:#ffffff14;outline:none}.hub-primary{flex:none;padding:0 16px;border:0;border-radius:11px;color:#fff;background:#2e7deb;cursor:pointer;font-size:14px;font-weight:600;white-space:nowrap}.hub-primary:hover:not(:disabled),.hub-primary:focus-visible:not(:disabled){background:#428efa;outline:none}.hub-primary:disabled{cursor:default;opacity:.45}.hub-newchat .hub-primary{padding:10px 18px}.hub-newchat{display:grid;gap:12px;padding:14px;border:1px solid rgb(70 154 255 / .35);border-radius:14px;background:#469aff12}.hub-newchat__row{display:grid;gap:7px}.hub-newchat__label{color:#d0d6e4a6;font-size:12px}.hub-newchat__actions{display:flex;justify-content:flex-end;gap:8px}.hub-newchat__actions .hub-more{margin:0}.hub-filters{display:grid;gap:8px}.hub-chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.hub-chips::-webkit-scrollbar{display:none}.hub-chip__count{margin-left:3px;color:#d0d6e48c;font-size:11px}.hub-chip--on .hub-chip__count{color:#f0f3facc}.hub-selects{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}.hub-selects .hub-select:first-child{grid-column:1 / -1}.hub-select{min-width:0;padding:8px 10px;border:1px solid rgb(255 255 255 / .14);border-radius:10px;color:inherit;background:#ffffff0d;font:inherit;font-size:13px;text-overflow:ellipsis}.hub-select--wide{width:100%;font-size:16px}.hub-select option{color:#111}.hub-count{margin:0 2px;color:#d0d6e48c;font-size:12px}.hub-link{padding:0;border:0;color:#78b4ff;background:none;cursor:pointer;font:inherit;text-decoration:underline}.hub-folders{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.hub-folder{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0;padding:10px;border:1px solid rgb(255 255 255 / .1);border-radius:14px;background:#ffffff06}.hub-folder__list{max-height:min(22rem,55vh);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-right:2px}.hub-folder__search{min-width:0;padding:7px 11px;border:1px solid rgb(255 255 255 / .12);border-radius:9px;color:inherit;background:#ffffff0a;font:inherit;font-size:16px;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.hub-folder__search:focus{border-color:#469affb3}.hub-folder__search::placeholder{color:#d0d6e466}.hub-folder__none{margin:2px 4px 4px;font-size:13px}.hub-folder__title{display:flex;justify-content:space-between;gap:10px;margin:0 4px;color:#d0d6e4b3;font-family:ui-monospace,monospace;font-size:12px;font-weight:500}.hub-folder__title span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hub-folder__count{flex:none;color:#d0d6e473}.hub-dot--online{background:#50d696;box-shadow:0 0 6px #50d69699}@media(min-width:720px){.hub-machines{grid-auto-flow:row;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));margin:0 0 18px;padding:2px 0 6px;overflow:visible}.hub-search{margin:0;padding:10px 0}.hub-selects{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr)}.hub-selects .hub-select:first-child{grid-column:auto}}.hub-muted{margin:0;color:#d0d6e48c;font-size:13px}.hub-error{margin:0 0 16px;padding:9px 12px;border:1px solid rgb(255 178 183 / .3);border-radius:10px;background:#271016b3;color:#ffcbd0;font-size:12px}.hub-dot{flex:none;width:8px;height:8px;margin-top:4px;border-radius:50%;background:#5f6877}.hub-dot--open{background:#469aff;box-shadow:0 0 6px #469affb3}.hub-dot--busy{background:#ff9e44;box-shadow:0 0 6px #ff9e44b3}.hub-dot--idle{background:#5f6877}.hub-remote{position:fixed;z-index:6;top:50%;left:50%;width:min(360px,calc(100vw - 24px));max-height:min(560px,calc(100vh - 24px));overflow:auto;padding:16px;transform:translate(-50%,-50%);border:1px solid rgb(255 255 255 / .14);border-radius:12px;background:#0d0f15fa;box-shadow:0 18px 48px #00000073;color:#f0f3fa}.hub-remote__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}.hub-remote__header h2{margin:0;font-size:15px;font-weight:600}.hub-remote__close{width:26px;height:26px;padding:0;border:0;border-radius:7px;color:#e0e4eecc;background:transparent;cursor:pointer;font-size:21px;line-height:1}.hub-remote__close:hover,.hub-remote__close:focus-visible{background:#ffffff1a;outline:none}.hub-remote__options{display:grid;gap:7px;margin:0;padding:0;list-style:none}.hub-remote__options button{width:100%;padding:9px 11px;border:1px solid rgb(255 255 255 / .14);border-radius:8px;color:inherit;background:#ffffff0f;cursor:pointer;font-size:13px;text-align:left}.hub-remote__options button:hover:not(:disabled),.hub-remote__options button:focus-visible:not(:disabled){background:#ffffff1f;outline:none}.hub-remote__options button:disabled{cursor:default;opacity:.45}.hub-remote__active{display:grid;gap:10px;justify-items:center;text-align:center}.hub-remote__url{margin:0;padding:8px 10px;border-radius:8px;background:#ffffff0f;color:#d0d6e4d9;font-size:11px;word-break:break-all}.hub-remote__qr{width:180px;height:180px;border-radius:8px;background:#fff;padding:8px}.hub-remote__active button{width:100%;padding:9px 11px;border:1px solid rgb(255 178 183 / .3);border-radius:8px;color:#ffcbd0;background:#ffffff0f;cursor:pointer;font-size:12px}.hub-remote__active button:hover,.hub-remote__active button:focus-visible{background:#ffffff1f;outline:none}