Files
MultiRoombaRover/server/public/assets/index-DwtMH0qf.js
T
2025-11-17 19:40:50 -05:00

12 lines
309 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function c(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(f){if(f.ep)return;f.ep=!0;const d=c(f);fetch(f.href,d)}})();var ar={exports:{}},Ga={};var Kh;function j0(){if(Kh)return Ga;Kh=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(r,f,d){var p=null;if(d!==void 0&&(p=""+d),f.key!==void 0&&(p=""+f.key),"key"in f){d={};for(var x in f)x!=="key"&&(d[x]=f[x])}else d=f;return f=d.ref,{$$typeof:u,type:r,key:p,ref:f!==void 0?f:null,props:d}}return Ga.Fragment=i,Ga.jsx=c,Ga.jsxs=c,Ga}var Jh;function D0(){return Jh||(Jh=1,ar.exports=j0()),ar.exports}var m=D0(),ir={exports:{}},ee={};var $h;function w0(){if($h)return ee;$h=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),p=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),N=Symbol.iterator;function z(E){return E===null||typeof E!="object"?null:(E=N&&E[N]||E["@@iterator"],typeof E=="function"?E:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,H={};function q(E,B,X){this.props=E,this.context=B,this.refs=H,this.updater=X||L}q.prototype.isReactComponent={},q.prototype.setState=function(E,B){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,B,"setState")},q.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function V(){}V.prototype=q.prototype;function G(E,B,X){this.props=E,this.context=B,this.refs=H,this.updater=X||L}var ae=G.prototype=new V;ae.constructor=G,k(ae,q.prototype),ae.isPureReactComponent=!0;var xe=Array.isArray;function Ce(){}var W={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function P(E,B,X){var Z=X.ref;return{$$typeof:u,type:E,key:B,ref:Z!==void 0?Z:null,props:X}}function oe(E,B){return P(E.type,B,E.props)}function fe(E){return typeof E=="object"&&E!==null&&E.$$typeof===u}function we(E){var B={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(X){return B[X]})}var gt=/\/+/g;function st(E,B){return typeof E=="object"&&E!==null&&E.key!=null?we(""+E.key):B.toString(36)}function zt(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(Ce,Ce):(E.status="pending",E.then(function(B){E.status==="pending"&&(E.status="fulfilled",E.value=B)},function(B){E.status==="pending"&&(E.status="rejected",E.reason=B)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function D(E,B,X,Z,te){var ie=typeof E;(ie==="undefined"||ie==="boolean")&&(E=null);var ve=!1;if(E===null)ve=!0;else switch(ie){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(E.$$typeof){case u:case i:ve=!0;break;case T:return ve=E._init,D(ve(E._payload),B,X,Z,te)}}if(ve)return te=te(E),ve=Z===""?"."+st(E,0):Z,xe(te)?(X="",ve!=null&&(X=ve.replace(gt,"$&/")+"/"),D(te,B,X,"",function(Wl){return Wl})):te!=null&&(fe(te)&&(te=oe(te,X+(te.key==null||E&&E.key===te.key?"":(""+te.key).replace(gt,"$&/")+"/")+ve)),B.push(te)),1;ve=0;var Pe=Z===""?".":Z+":";if(xe(E))for(var Ue=0;Ue<E.length;Ue++)Z=E[Ue],ie=Pe+st(Z,Ue),ve+=D(Z,B,X,ie,te);else if(Ue=z(E),typeof Ue=="function")for(E=Ue.call(E),Ue=0;!(Z=E.next()).done;)Z=Z.value,ie=Pe+st(Z,Ue++),ve+=D(Z,B,X,ie,te);else if(ie==="object"){if(typeof E.then=="function")return D(zt(E),B,X,Z,te);throw B=String(E),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ve}function Y(E,B,X){if(E==null)return E;var Z=[],te=0;return D(E,Z,"","",function(ie){return B.call(X,ie,te++)}),Z}function I(E){if(E._status===-1){var B=E._result;B=B(),B.then(function(X){(E._status===0||E._status===-1)&&(E._status=1,E._result=X)},function(X){(E._status===0||E._status===-1)&&(E._status=2,E._result=X)}),E._status===-1&&(E._status=0,E._result=B)}if(E._status===1)return E._result.default;throw E._result}var Se=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E=="object"&&E!==null&&typeof E.message=="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},Ae={map:Y,forEach:function(E,B,X){Y(E,function(){B.apply(this,arguments)},X)},count:function(E){var B=0;return Y(E,function(){B++}),B},toArray:function(E){return Y(E,function(B){return B})||[]},only:function(E){if(!fe(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return ee.Activity=g,ee.Children=Ae,ee.Component=q,ee.Fragment=c,ee.Profiler=f,ee.PureComponent=G,ee.StrictMode=r,ee.Suspense=v,ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,ee.__COMPILER_RUNTIME={__proto__:null,c:function(E){return W.H.useMemoCache(E)}},ee.cache=function(E){return function(){return E.apply(null,arguments)}},ee.cacheSignal=function(){return null},ee.cloneElement=function(E,B,X){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var Z=k({},E.props),te=E.key;if(B!=null)for(ie in B.key!==void 0&&(te=""+B.key),B)!J.call(B,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&B.ref===void 0||(Z[ie]=B[ie]);var ie=arguments.length-2;if(ie===1)Z.children=X;else if(1<ie){for(var ve=Array(ie),Pe=0;Pe<ie;Pe++)ve[Pe]=arguments[Pe+2];Z.children=ve}return P(E.type,te,Z)},ee.createContext=function(E){return E={$$typeof:p,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:d,_context:E},E},ee.createElement=function(E,B,X){var Z,te={},ie=null;if(B!=null)for(Z in B.key!==void 0&&(ie=""+B.key),B)J.call(B,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(te[Z]=B[Z]);var ve=arguments.length-2;if(ve===1)te.children=X;else if(1<ve){for(var Pe=Array(ve),Ue=0;Ue<ve;Ue++)Pe[Ue]=arguments[Ue+2];te.children=Pe}if(E&&E.defaultProps)for(Z in ve=E.defaultProps,ve)te[Z]===void 0&&(te[Z]=ve[Z]);return P(E,ie,te)},ee.createRef=function(){return{current:null}},ee.forwardRef=function(E){return{$$typeof:x,render:E}},ee.isValidElement=fe,ee.lazy=function(E){return{$$typeof:T,_payload:{_status:-1,_result:E},_init:I}},ee.memo=function(E,B){return{$$typeof:y,type:E,compare:B===void 0?null:B}},ee.startTransition=function(E){var B=W.T,X={};W.T=X;try{var Z=E(),te=W.S;te!==null&&te(X,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(Ce,Se)}catch(ie){Se(ie)}finally{B!==null&&X.types!==null&&(B.types=X.types),W.T=B}},ee.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},ee.use=function(E){return W.H.use(E)},ee.useActionState=function(E,B,X){return W.H.useActionState(E,B,X)},ee.useCallback=function(E,B){return W.H.useCallback(E,B)},ee.useContext=function(E){return W.H.useContext(E)},ee.useDebugValue=function(){},ee.useDeferredValue=function(E,B){return W.H.useDeferredValue(E,B)},ee.useEffect=function(E,B){return W.H.useEffect(E,B)},ee.useEffectEvent=function(E){return W.H.useEffectEvent(E)},ee.useId=function(){return W.H.useId()},ee.useImperativeHandle=function(E,B,X){return W.H.useImperativeHandle(E,B,X)},ee.useInsertionEffect=function(E,B){return W.H.useInsertionEffect(E,B)},ee.useLayoutEffect=function(E,B){return W.H.useLayoutEffect(E,B)},ee.useMemo=function(E,B){return W.H.useMemo(E,B)},ee.useOptimistic=function(E,B){return W.H.useOptimistic(E,B)},ee.useReducer=function(E,B,X){return W.H.useReducer(E,B,X)},ee.useRef=function(E){return W.H.useRef(E)},ee.useState=function(E){return W.H.useState(E)},ee.useSyncExternalStore=function(E,B,X){return W.H.useSyncExternalStore(E,B,X)},ee.useTransition=function(){return W.H.useTransition()},ee.version="19.2.0",ee}var Wh;function Du(){return Wh||(Wh=1,ir.exports=w0()),ir.exports}var _=Du(),ur={exports:{}},Va={},sr={exports:{}},cr={};var Fh;function U0(){return Fh||(Fh=1,(function(u){function i(D,Y){var I=D.length;D.push(Y);e:for(;0<I;){var Se=I-1>>>1,Ae=D[Se];if(0<f(Ae,Y))D[Se]=Y,D[I]=Ae,I=Se;else break e}}function c(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Y=D[0],I=D.pop();if(I!==Y){D[0]=I;e:for(var Se=0,Ae=D.length,E=Ae>>>1;Se<E;){var B=2*(Se+1)-1,X=D[B],Z=B+1,te=D[Z];if(0>f(X,I))Z<Ae&&0>f(te,X)?(D[Se]=te,D[Z]=I,Se=Z):(D[Se]=X,D[B]=I,Se=B);else if(Z<Ae&&0>f(te,I))D[Se]=te,D[Z]=I,Se=Z;else break e}}return Y}function f(D,Y){var I=D.sortIndex-Y.sortIndex;return I!==0?I:D.id-Y.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;u.unstable_now=function(){return d.now()}}else{var p=Date,x=p.now();u.unstable_now=function(){return p.now()-x}}var v=[],y=[],T=1,g=null,N=3,z=!1,L=!1,k=!1,H=!1,q=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function ae(D){for(var Y=c(y);Y!==null;){if(Y.callback===null)r(y);else if(Y.startTime<=D)r(y),Y.sortIndex=Y.expirationTime,i(v,Y);else break;Y=c(y)}}function xe(D){if(k=!1,ae(D),!L)if(c(v)!==null)L=!0,Ce||(Ce=!0,we());else{var Y=c(y);Y!==null&&zt(xe,Y.startTime-D)}}var Ce=!1,W=-1,J=5,P=-1;function oe(){return H?!0:!(u.unstable_now()-P<J)}function fe(){if(H=!1,Ce){var D=u.unstable_now();P=D;var Y=!0;try{e:{L=!1,k&&(k=!1,V(W),W=-1),z=!0;var I=N;try{t:{for(ae(D),g=c(v);g!==null&&!(g.expirationTime>D&&oe());){var Se=g.callback;if(typeof Se=="function"){g.callback=null,N=g.priorityLevel;var Ae=Se(g.expirationTime<=D);if(D=u.unstable_now(),typeof Ae=="function"){g.callback=Ae,ae(D),Y=!0;break t}g===c(v)&&r(v),ae(D)}else r(v);g=c(v)}if(g!==null)Y=!0;else{var E=c(y);E!==null&&zt(xe,E.startTime-D),Y=!1}}break e}finally{g=null,N=I,z=!1}Y=void 0}}finally{Y?we():Ce=!1}}}var we;if(typeof G=="function")we=function(){G(fe)};else if(typeof MessageChannel<"u"){var gt=new MessageChannel,st=gt.port2;gt.port1.onmessage=fe,we=function(){st.postMessage(null)}}else we=function(){q(fe,0)};function zt(D,Y){W=q(function(){D(u.unstable_now())},Y)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<D?Math.floor(1e3/D):5},u.unstable_getCurrentPriorityLevel=function(){return N},u.unstable_next=function(D){switch(N){case 1:case 2:case 3:var Y=3;break;default:Y=N}var I=N;N=Y;try{return D()}finally{N=I}},u.unstable_requestPaint=function(){H=!0},u.unstable_runWithPriority=function(D,Y){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var I=N;N=D;try{return Y()}finally{N=I}},u.unstable_scheduleCallback=function(D,Y,I){var Se=u.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?Se+I:Se):I=Se,D){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=I+Ae,D={id:T++,callback:Y,priorityLevel:D,startTime:I,expirationTime:Ae,sortIndex:-1},I>Se?(D.sortIndex=I,i(y,D),c(v)===null&&D===c(y)&&(k?(V(W),W=-1):k=!0,zt(xe,I-Se))):(D.sortIndex=Ae,i(v,D),L||z||(L=!0,Ce||(Ce=!0,we()))),D},u.unstable_shouldYield=oe,u.unstable_wrapCallback=function(D){var Y=N;return function(){var I=N;N=Y;try{return D.apply(this,arguments)}finally{N=I}}}})(cr)),cr}var Ph;function B0(){return Ph||(Ph=1,sr.exports=U0()),sr.exports}var rr={exports:{}},Fe={};var Ih;function L0(){if(Ih)return Fe;Ih=1;var u=Du();function i(v){var y="https://react.dev/errors/"+v;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)y+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+v+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var r={d:{f:c,r:function(){throw Error(i(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(v,y,T){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:g==null?null:""+g,children:v,containerInfo:y,implementation:T}}var p=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(v,y){if(v==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return Fe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Fe.createPortal=function(v,y){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(i(299));return d(v,y,null,T)},Fe.flushSync=function(v){var y=p.T,T=r.p;try{if(p.T=null,r.p=2,v)return v()}finally{p.T=y,r.p=T,r.d.f()}},Fe.preconnect=function(v,y){typeof v=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,r.d.C(v,y))},Fe.prefetchDNS=function(v){typeof v=="string"&&r.d.D(v)},Fe.preinit=function(v,y){if(typeof v=="string"&&y&&typeof y.as=="string"){var T=y.as,g=x(T,y.crossOrigin),N=typeof y.integrity=="string"?y.integrity:void 0,z=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;T==="style"?r.d.S(v,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:g,integrity:N,fetchPriority:z}):T==="script"&&r.d.X(v,{crossOrigin:g,integrity:N,fetchPriority:z,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Fe.preinitModule=function(v,y){if(typeof v=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var T=x(y.as,y.crossOrigin);r.d.M(v,{crossOrigin:T,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&r.d.M(v)},Fe.preload=function(v,y){if(typeof v=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var T=y.as,g=x(T,y.crossOrigin);r.d.L(v,T,{crossOrigin:g,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},Fe.preloadModule=function(v,y){if(typeof v=="string")if(y){var T=x(y.as,y.crossOrigin);r.d.m(v,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:T,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else r.d.m(v)},Fe.requestFormReset=function(v){r.d.r(v)},Fe.unstable_batchedUpdates=function(v,y){return v(y)},Fe.useFormState=function(v,y,T){return p.H.useFormState(v,y,T)},Fe.useFormStatus=function(){return p.H.useHostTransitionStatus()},Fe.version="19.2.0",Fe}var em;function H0(){if(em)return rr.exports;em=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),rr.exports=L0(),rr.exports}var tm;function q0(){if(tm)return Va;tm=1;var u=B0(),i=Du(),c=H0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(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 p(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 x(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(d(e)!==e)throw Error(r(188))}function y(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return v(a),e;if(s===l)return v(a),t;s=s.sibling}throw Error(r(188))}if(n.return!==l.return)n=a,l=s;else{for(var o=!1,h=a.child;h;){if(h===n){o=!0,n=a,l=s;break}if(h===l){o=!0,l=a,n=s;break}h=h.sibling}if(!o){for(h=s.child;h;){if(h===n){o=!0,n=s,l=a;break}if(h===l){o=!0,l=s,n=a;break}h=h.sibling}if(!o)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,N=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),G=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),xe=Symbol.for("react.suspense"),Ce=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function we(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var gt=Symbol.for("react.client.reference");function st(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===gt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case q:return"Profiler";case H:return"StrictMode";case xe:return"Suspense";case Ce:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case G:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case ae:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:st(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return st(e(t))}catch{}}return null}var zt=Array.isArray,D=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},Se=[],Ae=-1;function E(e){return{current:e}}function B(e){0>Ae||(e.current=Se[Ae],Se[Ae]=null,Ae--)}function X(e,t){Ae++,Se[Ae]=e.current,e.current=t}var Z=E(null),te=E(null),ie=E(null),ve=E(null);function Pe(e,t){switch(X(ie,t),X(te,e),X(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yh(t),e=vh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(Z),X(Z,e)}function Ue(){B(Z),B(te),B(ie)}function Wl(e){e.memoizedState!==null&&X(ve,e);var t=Z.current,n=vh(t,e.type);t!==n&&(X(te,e),X(Z,n))}function ni(e){te.current===e&&(B(Z),B(te)),ve.current===e&&(B(ve),qa._currentValue=I)}var ku,Vr;function kn(e){if(ku===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ku=t&&t[1]||"",Vr=-1<n.stack.indexOf(`
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ku+e+Vr}var Yu=!1;function Xu(e,t){if(!e||Yu)return"";Yu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(M){var O=M}Reflect.construct(e,[],U)}else{try{U.call()}catch(M){O=M}e.call(U.prototype)}}else{try{throw Error()}catch(M){O=M}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(M){if(M&&O&&typeof M.stack=="string")return[M.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=l.DetermineComponentFrameRoot(),o=s[0],h=s[1];if(o&&h){var b=o.split(`
`),R=h.split(`
`);for(a=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;a<R.length&&!R[a].includes("DetermineComponentFrameRoot");)a++;if(l===b.length||a===R.length)for(l=b.length-1,a=R.length-1;1<=l&&0<=a&&b[l]!==R[a];)a--;for(;1<=l&&0<=a;l--,a--)if(b[l]!==R[a]){if(l!==1||a!==1)do if(l--,a--,0>a||b[l]!==R[a]){var j=`
`+b[l].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=l&&0<=a);break}}}finally{Yu=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?kn(n):""}function rp(e,t){switch(e.tag){case 26:case 27:case 5:return kn(e.type);case 16:return kn("Lazy");case 13:return e.child!==t&&t!==null?kn("Suspense Fallback"):kn("Suspense");case 19:return kn("SuspenseList");case 0:case 15:return Xu(e.type,!1);case 11:return Xu(e.type.render,!1);case 1:return Xu(e.type,!0);case 31:return kn("Activity");default:return""}}function Qr(e){try{var t="",n=null;do t+=rp(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
Error generating stack: `+l.message+`
`+l.stack}}var Gu=Object.prototype.hasOwnProperty,Vu=u.unstable_scheduleCallback,Qu=u.unstable_cancelCallback,op=u.unstable_shouldYield,fp=u.unstable_requestPaint,ct=u.unstable_now,dp=u.unstable_getCurrentPriorityLevel,Zr=u.unstable_ImmediatePriority,Kr=u.unstable_UserBlockingPriority,li=u.unstable_NormalPriority,hp=u.unstable_LowPriority,Jr=u.unstable_IdlePriority,mp=u.log,pp=u.unstable_setDisableYieldValue,Fl=null,rt=null;function mn(e){if(typeof mp=="function"&&pp(e),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(Fl,e)}catch{}}var ot=Math.clz32?Math.clz32:gp,yp=Math.log,vp=Math.LN2;function gp(e){return e>>>=0,e===0?32:31-(yp(e)/vp|0)|0}var ai=256,ii=262144,ui=4194304;function Yn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function si(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,s=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~s,l!==0?a=Yn(l):(o&=h,o!==0?a=Yn(o):n||(n=h&~e,n!==0&&(a=Yn(n))))):(h=l&~s,h!==0?a=Yn(h):o!==0?a=Yn(o):n||(n=l&~e,n!==0&&(a=Yn(n)))),a===0?0:t!==0&&t!==a&&(t&s)===0&&(s=a&-a,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:a}function Pl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function bp(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $r(){var e=ui;return ui<<=1,(ui&62914560)===0&&(ui=4194304),e}function Zu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Il(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xp(e,t,n,l,a,s){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var h=e.entanglements,b=e.expirationTimes,R=e.hiddenUpdates;for(n=o&~n;0<n;){var j=31-ot(n),U=1<<j;h[j]=0,b[j]=-1;var O=R[j];if(O!==null)for(R[j]=null,j=0;j<O.length;j++){var M=O[j];M!==null&&(M.lane&=-536870913)}n&=~U}l!==0&&Wr(e,l,0),s!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=s&~(o&~t))}function Wr(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ot(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Fr(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-ot(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Pr(e,t){var n=t&-t;return n=(n&42)!==0?1:Ku(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ku(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ju(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ir(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:kh(e.type))}function eo(e,t){var n=Y.p;try{return Y.p=e,t()}finally{Y.p=n}}var pn=Math.random().toString(36).slice(2),Ze="__reactFiber$"+pn,et="__reactProps$"+pn,cl="__reactContainer$"+pn,$u="__reactEvents$"+pn,Sp="__reactListeners$"+pn,_p="__reactHandles$"+pn,to="__reactResources$"+pn,ea="__reactMarker$"+pn;function Wu(e){delete e[Ze],delete e[et],delete e[$u],delete e[Sp],delete e[_p]}function rl(e){var t=e[Ze];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cl]||n[Ze]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Th(e);e!==null;){if(n=e[Ze])return n;e=Th(e)}return t}e=n,n=e.parentNode}return null}function ol(e){if(e=e[Ze]||e[cl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ta(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function fl(e){var t=e[to];return t||(t=e[to]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ve(e){e[ea]=!0}var no=new Set,lo={};function Xn(e,t){dl(e,t),dl(e+"Capture",t)}function dl(e,t){for(lo[e]=t,e=0;e<t.length;e++)no.add(t[e])}var Ep=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ao={},io={};function Tp(e){return Gu.call(io,e)?!0:Gu.call(ao,e)?!1:Ep.test(e)?io[e]=!0:(ao[e]=!0,!1)}function ci(e,t,n){if(Tp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function ri(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Vt(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ap(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,s=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fu(e){if(!e._valueTracker){var t=uo(e)?"checked":"value";e._valueTracker=Ap(e,t,""+e[t])}}function so(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=uo(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function oi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Np=/[\n"\\]/g;function xt(e){return e.replace(Np,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Pu(e,t,n,l,a,s,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+bt(t)):e.value!==""+bt(t)&&(e.value=""+bt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Iu(e,o,bt(t)):n!=null?Iu(e,o,bt(n)):l!=null&&e.removeAttribute("value"),a==null&&s!=null&&(e.defaultChecked=!!s),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+bt(h):e.removeAttribute("name")}function co(e,t,n,l,a,s,o,h){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Fu(e);return}n=n!=null?""+bt(n):"",t=t!=null?""+bt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Fu(e)}function Iu(e,t,n){t==="number"&&oi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function hl(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+bt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function ro(e,t,n){if(t!=null&&(t=""+bt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+bt(n):""}function oo(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(zt(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=bt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Fu(e)}function ml(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function fo(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Cp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ho(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&fo(e,a,l)}else for(var s in t)t.hasOwnProperty(s)&&fo(e,s,t[s])}function es(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Op=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function fi(e){return Op.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var ts=null;function ns(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pl=null,yl=null;function mo(e){var t=ol(e);if(t&&(e=t.stateNode)){var n=e[et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Pu(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+xt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[et]||null;if(!a)throw Error(r(90));Pu(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&so(l)}break e;case"textarea":ro(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&hl(e,!!n.multiple,t,!1)}}}var ls=!1;function po(e,t,n){if(ls)return e(t,n);ls=!0;try{var l=e(t);return l}finally{if(ls=!1,(pl!==null||yl!==null)&&(Pi(),pl&&(t=pl,e=yl,yl=pl=null,mo(t),e)))for(t=0;t<e.length;t++)mo(e[t])}}function na(e,t){var n=e.stateNode;if(n===null)return null;var l=n[et]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),as=!1;if(Zt)try{var la={};Object.defineProperty(la,"passive",{get:function(){as=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{as=!1}var yn=null,is=null,di=null;function yo(){if(di)return di;var e,t=is,n=t.length,l,a="value"in yn?yn.value:yn.textContent,s=a.length;for(e=0;e<n&&t[e]===a[e];e++);var o=n-e;for(l=1;l<=o&&t[n-l]===a[s-l];l++);return di=a.slice(e,1<l?1-l:void 0)}function hi(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 mi(){return!0}function vo(){return!1}function tt(e){function t(n,l,a,s,o){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(s):s[h]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?mi:vo,this.isPropagationStopped=vo,this}return g(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=mi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=mi)},persist:function(){},isPersistent:mi}),t}var Gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pi=tt(Gn),aa=g({},Gn,{view:0,detail:0}),zp=tt(aa),us,ss,ia,yi=g({},aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rs,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!==ia&&(ia&&e.type==="mousemove"?(us=e.screenX-ia.screenX,ss=e.screenY-ia.screenY):ss=us=0,ia=e),us)},movementY:function(e){return"movementY"in e?e.movementY:ss}}),go=tt(yi),Mp=g({},yi,{dataTransfer:0}),jp=tt(Mp),Dp=g({},aa,{relatedTarget:0}),cs=tt(Dp),wp=g({},Gn,{animationName:0,elapsedTime:0,pseudoElement:0}),Up=tt(wp),Bp=g({},Gn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lp=tt(Bp),Hp=g({},Gn,{data:0}),bo=tt(Hp),qp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kp={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"},Yp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yp[e])?!!t[e]:!1}function rs(){return Xp}var Gp=g({},aa,{key:function(e){if(e.key){var t=qp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=hi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?kp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rs,charCode:function(e){return e.type==="keypress"?hi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vp=tt(Gp),Qp=g({},yi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xo=tt(Qp),Zp=g({},aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rs}),Kp=tt(Zp),Jp=g({},Gn,{propertyName:0,elapsedTime:0,pseudoElement:0}),$p=tt(Jp),Wp=g({},yi,{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}),Fp=tt(Wp),Pp=g({},Gn,{newState:0,oldState:0}),Ip=tt(Pp),ey=[9,13,27,32],os=Zt&&"CompositionEvent"in window,ua=null;Zt&&"documentMode"in document&&(ua=document.documentMode);var ty=Zt&&"TextEvent"in window&&!ua,So=Zt&&(!os||ua&&8<ua&&11>=ua),_o=" ",Eo=!1;function To(e,t){switch(e){case"keyup":return ey.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ao(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vl=!1;function ny(e,t){switch(e){case"compositionend":return Ao(t);case"keypress":return t.which!==32?null:(Eo=!0,_o);case"textInput":return e=t.data,e===_o&&Eo?null:e;default:return null}}function ly(e,t){if(vl)return e==="compositionend"||!os&&To(e,t)?(e=yo(),di=is=yn=null,vl=!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 So&&t.locale!=="ko"?null:t.data;default:return null}}var ay={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 No(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ay[e.type]:t==="textarea"}function Co(e,t,n,l){pl?yl?yl.push(l):yl=[l]:pl=l,t=iu(t,"onChange"),0<t.length&&(n=new pi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var sa=null,ca=null;function iy(e){oh(e,0)}function vi(e){var t=ta(e);if(so(t))return e}function Ro(e,t){if(e==="change")return t}var Oo=!1;if(Zt){var fs;if(Zt){var ds="oninput"in document;if(!ds){var zo=document.createElement("div");zo.setAttribute("oninput","return;"),ds=typeof zo.oninput=="function"}fs=ds}else fs=!1;Oo=fs&&(!document.documentMode||9<document.documentMode)}function Mo(){sa&&(sa.detachEvent("onpropertychange",jo),ca=sa=null)}function jo(e){if(e.propertyName==="value"&&vi(ca)){var t=[];Co(t,ca,e,ns(e)),po(iy,t)}}function uy(e,t,n){e==="focusin"?(Mo(),sa=t,ca=n,sa.attachEvent("onpropertychange",jo)):e==="focusout"&&Mo()}function sy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vi(ca)}function cy(e,t){if(e==="click")return vi(t)}function ry(e,t){if(e==="input"||e==="change")return vi(t)}function oy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ft=typeof Object.is=="function"?Object.is:oy;function ra(e,t){if(ft(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Gu.call(t,a)||!ft(e[a],t[a]))return!1}return!0}function Do(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wo(e,t){var n=Do(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Do(n)}}function Uo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=oi(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=oi(e.document)}return t}function hs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var fy=Zt&&"documentMode"in document&&11>=document.documentMode,gl=null,ms=null,oa=null,ps=!1;function Lo(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ps||gl==null||gl!==oi(l)||(l=gl,"selectionStart"in l&&hs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),oa&&ra(oa,l)||(oa=l,l=iu(ms,"onSelect"),0<l.length&&(t=new pi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=gl)))}function Vn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bl={animationend:Vn("Animation","AnimationEnd"),animationiteration:Vn("Animation","AnimationIteration"),animationstart:Vn("Animation","AnimationStart"),transitionrun:Vn("Transition","TransitionRun"),transitionstart:Vn("Transition","TransitionStart"),transitioncancel:Vn("Transition","TransitionCancel"),transitionend:Vn("Transition","TransitionEnd")},ys={},Ho={};Zt&&(Ho=document.createElement("div").style,"AnimationEvent"in window||(delete bl.animationend.animation,delete bl.animationiteration.animation,delete bl.animationstart.animation),"TransitionEvent"in window||delete bl.transitionend.transition);function Qn(e){if(ys[e])return ys[e];if(!bl[e])return e;var t=bl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ho)return ys[e]=t[n];return e}var qo=Qn("animationend"),ko=Qn("animationiteration"),Yo=Qn("animationstart"),dy=Qn("transitionrun"),hy=Qn("transitionstart"),my=Qn("transitioncancel"),Xo=Qn("transitionend"),Go=new Map,vs="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");vs.push("scrollEnd");function Mt(e,t){Go.set(e,t),Xn(t,[e])}var gi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},St=[],xl=0,gs=0;function bi(){for(var e=xl,t=gs=xl=0;t<e;){var n=St[t];St[t++]=null;var l=St[t];St[t++]=null;var a=St[t];St[t++]=null;var s=St[t];if(St[t++]=null,l!==null&&a!==null){var o=l.pending;o===null?a.next=a:(a.next=o.next,o.next=a),l.pending=a}s!==0&&Vo(n,a,s)}}function xi(e,t,n,l){St[xl++]=e,St[xl++]=t,St[xl++]=n,St[xl++]=l,gs|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function bs(e,t,n,l){return xi(e,t,n,l),Si(e)}function Zn(e,t){return xi(e,null,null,t),Si(e)}function Vo(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,s=e.return;s!==null;)s.childLanes|=n,l=s.alternate,l!==null&&(l.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(a=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,a&&t!==null&&(a=31-ot(n),e=s.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),s):null}function Si(e){if(50<ja)throw ja=0,Rc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Sl={};function py(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dt(e,t,n,l){return new py(e,t,n,l)}function xs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(e,t){var n=e.alternate;return n===null?(n=dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Qo(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _i(e,t,n,l,a,s){var o=0;if(l=e,typeof e=="function")xs(e)&&(o=1);else if(typeof e=="string")o=x0(e,n,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=dt(31,n,t,a),e.elementType=P,e.lanes=s,e;case k:return Kn(n.children,a,s,t);case H:o=8,a|=24;break;case q:return e=dt(12,n,t,a|2),e.elementType=q,e.lanes=s,e;case xe:return e=dt(13,n,t,a),e.elementType=xe,e.lanes=s,e;case Ce:return e=dt(19,n,t,a),e.elementType=Ce,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:o=10;break e;case V:o=9;break e;case ae:o=11;break e;case W:o=14;break e;case J:o=16,l=null;break e}o=29,n=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=dt(o,n,t,a),t.elementType=e,t.type=l,t.lanes=s,t}function Kn(e,t,n,l){return e=dt(7,e,l,t),e.lanes=n,e}function Ss(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function Zo(e){var t=dt(18,null,null,0);return t.stateNode=e,t}function _s(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ko=new WeakMap;function _t(e,t){if(typeof e=="object"&&e!==null){var n=Ko.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Qr(t)},Ko.set(e,t),t)}return{value:e,source:t,stack:Qr(t)}}var _l=[],El=0,Ei=null,fa=0,Et=[],Tt=0,vn=null,Lt=1,Ht="";function Jt(e,t){_l[El++]=fa,_l[El++]=Ei,Ei=e,fa=t}function Jo(e,t,n){Et[Tt++]=Lt,Et[Tt++]=Ht,Et[Tt++]=vn,vn=e;var l=Lt;e=Ht;var a=32-ot(l)-1;l&=~(1<<a),n+=1;var s=32-ot(t)+a;if(30<s){var o=a-a%5;s=(l&(1<<o)-1).toString(32),l>>=o,a-=o,Lt=1<<32-ot(t)+a|n<<a|l,Ht=s+e}else Lt=1<<s|n<<a|l,Ht=e}function Es(e){e.return!==null&&(Jt(e,1),Jo(e,1,0))}function Ts(e){for(;e===Ei;)Ei=_l[--El],_l[El]=null,fa=_l[--El],_l[El]=null;for(;e===vn;)vn=Et[--Tt],Et[Tt]=null,Ht=Et[--Tt],Et[Tt]=null,Lt=Et[--Tt],Et[Tt]=null}function $o(e,t){Et[Tt++]=Lt,Et[Tt++]=Ht,Et[Tt++]=vn,Lt=t.id,Ht=t.overflow,vn=e}var Ke=null,Re=null,de=!1,gn=null,At=!1,As=Error(r(519));function bn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw da(_t(t,e)),As}function Wo(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Ze]=e,t[et]=l,n){case"dialog":se("cancel",t),se("close",t);break;case"iframe":case"object":case"embed":se("load",t);break;case"video":case"audio":for(n=0;n<wa.length;n++)se(wa[n],t);break;case"source":se("error",t);break;case"img":case"image":case"link":se("error",t),se("load",t);break;case"details":se("toggle",t);break;case"input":se("invalid",t),co(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":se("invalid",t);break;case"textarea":se("invalid",t),oo(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||mh(t.textContent,n)?(l.popover!=null&&(se("beforetoggle",t),se("toggle",t)),l.onScroll!=null&&se("scroll",t),l.onScrollEnd!=null&&se("scrollend",t),l.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||bn(e,!0)}function Fo(e){for(Ke=e.return;Ke;)switch(Ke.tag){case 5:case 31:case 13:At=!1;return;case 27:case 3:At=!0;return;default:Ke=Ke.return}}function Tl(e){if(e!==Ke)return!1;if(!de)return Fo(e),de=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Gc(e.type,e.memoizedProps)),n=!n),n&&Re&&bn(e),Fo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Re=Eh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Re=Eh(e)}else t===27?(t=Re,Dn(e.type)?(e=Jc,Jc=null,Re=e):Re=t):Re=Ke?Ct(e.stateNode.nextSibling):null;return!0}function Jn(){Re=Ke=null,de=!1}function Ns(){var e=gn;return e!==null&&(it===null?it=e:it.push.apply(it,e),gn=null),e}function da(e){gn===null?gn=[e]:gn.push(e)}var Cs=E(null),$n=null,$t=null;function xn(e,t,n){X(Cs,t._currentValue),t._currentValue=n}function Wt(e){e._currentValue=Cs.current,B(Cs)}function Rs(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Os(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){var o=a.child;s=s.firstContext;e:for(;s!==null;){var h=s;s=a;for(var b=0;b<t.length;b++)if(h.context===t[b]){s.lanes|=n,h=s.alternate,h!==null&&(h.lanes|=n),Rs(s.return,n,e),l||(o=null);break e}s=h.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(r(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Rs(o,n,e),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function Al(e,t,n,l){e=null;for(var a=t,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(r(387));if(o=o.memoizedProps,o!==null){var h=a.type;ft(a.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(a===ve.current){if(o=a.alternate,o===null)throw Error(r(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(qa):e=[qa])}a=a.return}e!==null&&Os(t,e,n,l),t.flags|=262144}function Ti(e){for(e=e.firstContext;e!==null;){if(!ft(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wn(e){$n=e,$t=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Je(e){return Po($n,e)}function Ai(e,t){return $n===null&&Wn(e),Po(e,t)}function Po(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$t===null){if(e===null)throw Error(r(308));$t=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $t=$t.next=t;return n}var yy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},vy=u.unstable_scheduleCallback,gy=u.unstable_NormalPriority,He={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zs(){return{controller:new yy,data:new Map,refCount:0}}function ha(e){e.refCount--,e.refCount===0&&vy(gy,function(){e.controller.abort()})}var ma=null,Ms=0,Nl=0,Cl=null;function by(e,t){if(ma===null){var n=ma=[];Ms=0,Nl=wc(),Cl={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Ms++,t.then(Io,Io),t}function Io(){if(--Ms===0&&ma!==null){Cl!==null&&(Cl.status="fulfilled");var e=ma;ma=null,Nl=0,Cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xy(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var ef=D.S;D.S=function(e,t){Hd=ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&by(e,t),ef!==null&&ef(e,t)};var Fn=E(null);function js(){var e=Fn.current;return e!==null?e:Ne.pooledCache}function Ni(e,t){t===null?X(Fn,Fn.current):X(Fn,t.pool)}function tf(){var e=js();return e===null?null:{parent:He._currentValue,pool:e}}var Rl=Error(r(460)),Ds=Error(r(474)),Ci=Error(r(542)),Ri={then:function(){}};function nf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function lf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=Ne,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e}throw In=t,Rl}}function Pn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(In=n,Rl):n}}var In=null;function af(){if(In===null)throw Error(r(459));var e=In;return In=null,e}function uf(e){if(e===Rl||e===Ci)throw Error(r(483))}var Ol=null,pa=0;function Oi(e){var t=pa;return pa+=1,Ol===null&&(Ol=[]),lf(Ol,e,t)}function ya(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function zi(e,t){throw t.$$typeof===N?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function sf(e){function t(A,S){if(e){var C=A.deletions;C===null?(A.deletions=[S],A.flags|=16):C.push(S)}}function n(A,S){if(!e)return null;for(;S!==null;)t(A,S),S=S.sibling;return null}function l(A){for(var S=new Map;A!==null;)A.key!==null?S.set(A.key,A):S.set(A.index,A),A=A.sibling;return S}function a(A,S){return A=Kt(A,S),A.index=0,A.sibling=null,A}function s(A,S,C){return A.index=C,e?(C=A.alternate,C!==null?(C=C.index,C<S?(A.flags|=67108866,S):C):(A.flags|=67108866,S)):(A.flags|=1048576,S)}function o(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function h(A,S,C,w){return S===null||S.tag!==6?(S=Ss(C,A.mode,w),S.return=A,S):(S=a(S,C),S.return=A,S)}function b(A,S,C,w){var $=C.type;return $===k?j(A,S,C.props.children,w,C.key):S!==null&&(S.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===J&&Pn($)===S.type)?(S=a(S,C.props),ya(S,C),S.return=A,S):(S=_i(C.type,C.key,C.props,null,A.mode,w),ya(S,C),S.return=A,S)}function R(A,S,C,w){return S===null||S.tag!==4||S.stateNode.containerInfo!==C.containerInfo||S.stateNode.implementation!==C.implementation?(S=_s(C,A.mode,w),S.return=A,S):(S=a(S,C.children||[]),S.return=A,S)}function j(A,S,C,w,$){return S===null||S.tag!==7?(S=Kn(C,A.mode,w,$),S.return=A,S):(S=a(S,C),S.return=A,S)}function U(A,S,C){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Ss(""+S,A.mode,C),S.return=A,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case z:return C=_i(S.type,S.key,S.props,null,A.mode,C),ya(C,S),C.return=A,C;case L:return S=_s(S,A.mode,C),S.return=A,S;case J:return S=Pn(S),U(A,S,C)}if(zt(S)||we(S))return S=Kn(S,A.mode,C,null),S.return=A,S;if(typeof S.then=="function")return U(A,Oi(S),C);if(S.$$typeof===G)return U(A,Ai(A,S),C);zi(A,S)}return null}function O(A,S,C,w){var $=S!==null?S.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return $!==null?null:h(A,S,""+C,w);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case z:return C.key===$?b(A,S,C,w):null;case L:return C.key===$?R(A,S,C,w):null;case J:return C=Pn(C),O(A,S,C,w)}if(zt(C)||we(C))return $!==null?null:j(A,S,C,w,null);if(typeof C.then=="function")return O(A,S,Oi(C),w);if(C.$$typeof===G)return O(A,S,Ai(A,C),w);zi(A,C)}return null}function M(A,S,C,w,$){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return A=A.get(C)||null,h(S,A,""+w,$);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case z:return A=A.get(w.key===null?C:w.key)||null,b(S,A,w,$);case L:return A=A.get(w.key===null?C:w.key)||null,R(S,A,w,$);case J:return w=Pn(w),M(A,S,C,w,$)}if(zt(w)||we(w))return A=A.get(C)||null,j(S,A,w,$,null);if(typeof w.then=="function")return M(A,S,C,Oi(w),$);if(w.$$typeof===G)return M(A,S,C,Ai(S,w),$);zi(S,w)}return null}function Q(A,S,C,w){for(var $=null,me=null,K=S,le=S=0,re=null;K!==null&&le<C.length;le++){K.index>le?(re=K,K=null):re=K.sibling;var pe=O(A,K,C[le],w);if(pe===null){K===null&&(K=re);break}e&&K&&pe.alternate===null&&t(A,K),S=s(pe,S,le),me===null?$=pe:me.sibling=pe,me=pe,K=re}if(le===C.length)return n(A,K),de&&Jt(A,le),$;if(K===null){for(;le<C.length;le++)K=U(A,C[le],w),K!==null&&(S=s(K,S,le),me===null?$=K:me.sibling=K,me=K);return de&&Jt(A,le),$}for(K=l(K);le<C.length;le++)re=M(K,A,le,C[le],w),re!==null&&(e&&re.alternate!==null&&K.delete(re.key===null?le:re.key),S=s(re,S,le),me===null?$=re:me.sibling=re,me=re);return e&&K.forEach(function(Hn){return t(A,Hn)}),de&&Jt(A,le),$}function F(A,S,C,w){if(C==null)throw Error(r(151));for(var $=null,me=null,K=S,le=S=0,re=null,pe=C.next();K!==null&&!pe.done;le++,pe=C.next()){K.index>le?(re=K,K=null):re=K.sibling;var Hn=O(A,K,pe.value,w);if(Hn===null){K===null&&(K=re);break}e&&K&&Hn.alternate===null&&t(A,K),S=s(Hn,S,le),me===null?$=Hn:me.sibling=Hn,me=Hn,K=re}if(pe.done)return n(A,K),de&&Jt(A,le),$;if(K===null){for(;!pe.done;le++,pe=C.next())pe=U(A,pe.value,w),pe!==null&&(S=s(pe,S,le),me===null?$=pe:me.sibling=pe,me=pe);return de&&Jt(A,le),$}for(K=l(K);!pe.done;le++,pe=C.next())pe=M(K,A,le,pe.value,w),pe!==null&&(e&&pe.alternate!==null&&K.delete(pe.key===null?le:pe.key),S=s(pe,S,le),me===null?$=pe:me.sibling=pe,me=pe);return e&&K.forEach(function(M0){return t(A,M0)}),de&&Jt(A,le),$}function Te(A,S,C,w){if(typeof C=="object"&&C!==null&&C.type===k&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case z:e:{for(var $=C.key;S!==null;){if(S.key===$){if($=C.type,$===k){if(S.tag===7){n(A,S.sibling),w=a(S,C.props.children),w.return=A,A=w;break e}}else if(S.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===J&&Pn($)===S.type){n(A,S.sibling),w=a(S,C.props),ya(w,C),w.return=A,A=w;break e}n(A,S);break}else t(A,S);S=S.sibling}C.type===k?(w=Kn(C.props.children,A.mode,w,C.key),w.return=A,A=w):(w=_i(C.type,C.key,C.props,null,A.mode,w),ya(w,C),w.return=A,A=w)}return o(A);case L:e:{for($=C.key;S!==null;){if(S.key===$)if(S.tag===4&&S.stateNode.containerInfo===C.containerInfo&&S.stateNode.implementation===C.implementation){n(A,S.sibling),w=a(S,C.children||[]),w.return=A,A=w;break e}else{n(A,S);break}else t(A,S);S=S.sibling}w=_s(C,A.mode,w),w.return=A,A=w}return o(A);case J:return C=Pn(C),Te(A,S,C,w)}if(zt(C))return Q(A,S,C,w);if(we(C)){if($=we(C),typeof $!="function")throw Error(r(150));return C=$.call(C),F(A,S,C,w)}if(typeof C.then=="function")return Te(A,S,Oi(C),w);if(C.$$typeof===G)return Te(A,S,Ai(A,C),w);zi(A,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,S!==null&&S.tag===6?(n(A,S.sibling),w=a(S,C),w.return=A,A=w):(n(A,S),w=Ss(C,A.mode,w),w.return=A,A=w),o(A)):n(A,S)}return function(A,S,C,w){try{pa=0;var $=Te(A,S,C,w);return Ol=null,$}catch(K){if(K===Rl||K===Ci)throw K;var me=dt(29,K,null,A.mode);return me.lanes=w,me.return=A,me}finally{}}}var el=sf(!0),cf=sf(!1),Sn=!1;function ws(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Us(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _n(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function En(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ye&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=Si(e),Vo(e,null,n),t}return xi(e,l,t,n),Si(e)}function va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Fr(e,n)}}function Bs(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?a=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?a=s=t:s=s.next=t}else a=s=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ls=!1;function ga(){if(Ls){var e=Cl;if(e!==null)throw e}}function ba(e,t,n,l){Ls=!1;var a=e.updateQueue;Sn=!1;var s=a.firstBaseUpdate,o=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var b=h,R=b.next;b.next=null,o===null?s=R:o.next=R,o=b;var j=e.alternate;j!==null&&(j=j.updateQueue,h=j.lastBaseUpdate,h!==o&&(h===null?j.firstBaseUpdate=R:h.next=R,j.lastBaseUpdate=b))}if(s!==null){var U=a.baseState;o=0,j=R=b=null,h=s;do{var O=h.lane&-536870913,M=O!==h.lane;if(M?(ce&O)===O:(l&O)===O){O!==0&&O===Nl&&(Ls=!0),j!==null&&(j=j.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var Q=e,F=h;O=t;var Te=n;switch(F.tag){case 1:if(Q=F.payload,typeof Q=="function"){U=Q.call(Te,U,O);break e}U=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=F.payload,O=typeof Q=="function"?Q.call(Te,U,O):Q,O==null)break e;U=g({},U,O);break e;case 2:Sn=!0}}O=h.callback,O!==null&&(e.flags|=64,M&&(e.flags|=8192),M=a.callbacks,M===null?a.callbacks=[O]:M.push(O))}else M={lane:O,tag:h.tag,payload:h.payload,callback:h.callback,next:null},j===null?(R=j=M,b=U):j=j.next=M,o|=O;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;M=h,h=M.next,M.next=null,a.lastBaseUpdate=M,a.shared.pending=null}}while(!0);j===null&&(b=U),a.baseState=b,a.firstBaseUpdate=R,a.lastBaseUpdate=j,s===null&&(a.shared.lanes=0),Rn|=o,e.lanes=o,e.memoizedState=U}}function rf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function of(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)rf(n[e],t)}var zl=E(null),Mi=E(0);function ff(e,t){e=un,X(Mi,e),X(zl,t),un=e|t.baseLanes}function Hs(){X(Mi,un),X(zl,zl.current)}function qs(){un=Mi.current,B(zl),B(Mi)}var ht=E(null),Nt=null;function Tn(e){var t=e.alternate;X(Be,Be.current&1),X(ht,e),Nt===null&&(t===null||zl.current!==null||t.memoizedState!==null)&&(Nt=e)}function ks(e){X(Be,Be.current),X(ht,e),Nt===null&&(Nt=e)}function df(e){e.tag===22?(X(Be,Be.current),X(ht,e),Nt===null&&(Nt=e)):An()}function An(){X(Be,Be.current),X(ht,ht.current)}function mt(e){B(ht),Nt===e&&(Nt=null),B(Be)}var Be=E(0);function ji(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Zc(n)||Kc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ft=0,ne=null,_e=null,qe=null,Di=!1,Ml=!1,tl=!1,wi=0,xa=0,jl=null,Sy=0;function je(){throw Error(r(321))}function Ys(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ft(e[n],t[n]))return!1;return!0}function Xs(e,t,n,l,a,s){return Ft=s,ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?$f:lc,tl=!1,s=n(l,a),tl=!1,Ml&&(s=mf(t,n,l,a)),hf(e),s}function hf(e){D.H=Ea;var t=_e!==null&&_e.next!==null;if(Ft=0,qe=_e=ne=null,Di=!1,xa=0,jl=null,t)throw Error(r(300));e===null||ke||(e=e.dependencies,e!==null&&Ti(e)&&(ke=!0))}function mf(e,t,n,l){ne=e;var a=0;do{if(Ml&&(jl=null),xa=0,Ml=!1,25<=a)throw Error(r(301));if(a+=1,qe=_e=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}D.H=Wf,s=t(n,l)}while(Ml);return s}function _y(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Sa(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(ne.flags|=1024),t}function Gs(){var e=wi!==0;return wi=0,e}function Vs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Qs(e){if(Di){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Di=!1}Ft=0,qe=_e=ne=null,Ml=!1,xa=wi=0,jl=null}function Ie(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?ne.memoizedState=qe=e:qe=qe.next=e,qe}function Le(){if(_e===null){var e=ne.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=qe===null?ne.memoizedState:qe.next;if(t!==null)qe=t,_e=e;else{if(e===null)throw ne.alternate===null?Error(r(467)):Error(r(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},qe===null?ne.memoizedState=qe=e:qe=qe.next=e}return qe}function Ui(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Sa(e){var t=xa;return xa+=1,jl===null&&(jl=[]),e=lf(jl,e,t),t=ne,(qe===null?t.memoizedState:qe.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?$f:lc),e}function Bi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Sa(e);if(e.$$typeof===G)return Je(e)}throw Error(r(438,String(e)))}function Zs(e){var t=null,n=ne.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=ne.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ui(),ne.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=oe;return t.index++,n}function Pt(e,t){return typeof t=="function"?t(e):t}function Li(e){var t=Le();return Ks(t,_e,e)}function Ks(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var a=e.baseQueue,s=l.pending;if(s!==null){if(a!==null){var o=a.next;a.next=s.next,s.next=o}t.baseQueue=a=s,l.pending=null}if(s=e.baseState,a===null)e.memoizedState=s;else{t=a.next;var h=o=null,b=null,R=t,j=!1;do{var U=R.lane&-536870913;if(U!==R.lane?(ce&U)===U:(Ft&U)===U){var O=R.revertLane;if(O===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),U===Nl&&(j=!0);else if((Ft&O)===O){R=R.next,O===Nl&&(j=!0);continue}else U={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(h=b=U,o=s):b=b.next=U,ne.lanes|=O,Rn|=O;U=R.action,tl&&n(s,U),s=R.hasEagerState?R.eagerState:n(s,U)}else O={lane:U,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(h=b=O,o=s):b=b.next=O,ne.lanes|=U,Rn|=U;R=R.next}while(R!==null&&R!==t);if(b===null?o=s:b.next=h,!ft(s,e.memoizedState)&&(ke=!0,j&&(n=Cl,n!==null)))throw n;e.memoizedState=s,e.baseState=o,e.baseQueue=b,l.lastRenderedState=s}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Js(e){var t=Le(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,s=t.memoizedState;if(a!==null){n.pending=null;var o=a=a.next;do s=e(s,o.action),o=o.next;while(o!==a);ft(s,t.memoizedState)||(ke=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,l]}function pf(e,t,n){var l=ne,a=Le(),s=de;if(s){if(n===void 0)throw Error(r(407));n=n()}else n=t();var o=!ft((_e||a).memoizedState,n);if(o&&(a.memoizedState=n,ke=!0),a=a.queue,Fs(gf.bind(null,l,a,e),[e]),a.getSnapshot!==t||o||qe!==null&&qe.memoizedState.tag&1){if(l.flags|=2048,Dl(9,{destroy:void 0},vf.bind(null,l,a,n,t),null),Ne===null)throw Error(r(349));s||(Ft&127)!==0||yf(l,t,n)}return n}function yf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ne.updateQueue,t===null?(t=Ui(),ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vf(e,t,n,l){t.value=n,t.getSnapshot=l,bf(t)&&xf(e)}function gf(e,t,n){return n(function(){bf(t)&&xf(e)})}function bf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ft(e,n)}catch{return!0}}function xf(e){var t=Zn(e,2);t!==null&&ut(t,e,2)}function $s(e){var t=Ie();if(typeof e=="function"){var n=e;if(e=n(),tl){mn(!0);try{n()}finally{mn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function Sf(e,t,n,l){return e.baseState=n,Ks(e,_e,typeof l=="function"?l:Pt)}function Ey(e,t,n,l,a){if(ki(e))throw Error(r(485));if(e=t.action,e!==null){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){s.listeners.push(o)}};D.T!==null?n(!0):s.isTransition=!1,l(s),n=t.pending,n===null?(s.next=t.pending=s,_f(t,s)):(s.next=n.next,t.pending=n.next=s)}}function _f(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var s=D.T,o={};D.T=o;try{var h=n(a,l),b=D.S;b!==null&&b(o,h),Ef(e,t,h)}catch(R){Ws(e,t,R)}finally{s!==null&&o.types!==null&&(s.types=o.types),D.T=s}}else try{s=n(a,l),Ef(e,t,s)}catch(R){Ws(e,t,R)}}function Ef(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Tf(e,t,l)},function(l){return Ws(e,t,l)}):Tf(e,t,n)}function Tf(e,t,n){t.status="fulfilled",t.value=n,Af(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,_f(e,n)))}function Ws(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Af(t),t=t.next;while(t!==l)}e.action=null}function Af(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Nf(e,t){return t}function Cf(e,t){if(de){var n=Ne.formState;if(n!==null){e:{var l=ne;if(de){if(Re){t:{for(var a=Re,s=At;a.nodeType!==8;){if(!s){a=null;break t}if(a=Ct(a.nextSibling),a===null){a=null;break t}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){Re=Ct(a.nextSibling),l=a.data==="F!";break e}}bn(l)}l=!1}l&&(t=n[0])}}return n=Ie(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nf,lastRenderedState:t},n.queue=l,n=Zf.bind(null,ne,l),l.dispatch=n,l=$s(!1),s=nc.bind(null,ne,!1,l.queue),l=Ie(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Ey.bind(null,ne,a,s,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Rf(e){var t=Le();return Of(t,_e,e)}function Of(e,t,n){if(t=Ks(e,t,Nf)[0],e=Li(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Sa(t)}catch(o){throw o===Rl?Ci:o}else l=t;t=Le();var a=t.queue,s=a.dispatch;return n!==t.memoizedState&&(ne.flags|=2048,Dl(9,{destroy:void 0},Ty.bind(null,a,n),null)),[l,s,e]}function Ty(e,t){e.action=t}function zf(e){var t=Le(),n=_e;if(n!==null)return Of(t,n,e);Le(),t=t.memoizedState,n=Le();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Dl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=ne.updateQueue,t===null&&(t=Ui(),ne.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Mf(){return Le().memoizedState}function Hi(e,t,n,l){var a=Ie();ne.flags|=e,a.memoizedState=Dl(1|t,{destroy:void 0},n,l===void 0?null:l)}function qi(e,t,n,l){var a=Le();l=l===void 0?null:l;var s=a.memoizedState.inst;_e!==null&&l!==null&&Ys(l,_e.memoizedState.deps)?a.memoizedState=Dl(t,s,n,l):(ne.flags|=e,a.memoizedState=Dl(1|t,s,n,l))}function jf(e,t){Hi(8390656,8,e,t)}function Fs(e,t){qi(2048,8,e,t)}function Ay(e){ne.flags|=4;var t=ne.updateQueue;if(t===null)t=Ui(),ne.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Df(e){var t=Le().memoizedState;return Ay({ref:t,nextImpl:e}),function(){if((ye&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function wf(e,t){return qi(4,2,e,t)}function Uf(e,t){return qi(4,4,e,t)}function Bf(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Lf(e,t,n){n=n!=null?n.concat([e]):null,qi(4,4,Bf.bind(null,t,e),n)}function Ps(){}function Hf(e,t){var n=Le();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Ys(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function qf(e,t){var n=Le();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Ys(t,l[1]))return l[0];if(l=e(),tl){mn(!0);try{e()}finally{mn(!1)}}return n.memoizedState=[l,t],l}function Is(e,t,n){return n===void 0||(Ft&1073741824)!==0&&(ce&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=kd(),ne.lanes|=e,Rn|=e,n)}function kf(e,t,n,l){return ft(n,t)?n:zl.current!==null?(e=Is(e,n,l),ft(e,t)||(ke=!0),e):(Ft&42)===0||(Ft&1073741824)!==0&&(ce&261930)===0?(ke=!0,e.memoizedState=n):(e=kd(),ne.lanes|=e,Rn|=e,t)}function Yf(e,t,n,l,a){var s=Y.p;Y.p=s!==0&&8>s?s:8;var o=D.T,h={};D.T=h,nc(e,!1,t,n);try{var b=a(),R=D.S;if(R!==null&&R(h,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var j=xy(b,l);_a(e,t,j,vt(e))}else _a(e,t,l,vt(e))}catch(U){_a(e,t,{then:function(){},status:"rejected",reason:U},vt())}finally{Y.p=s,o!==null&&h.types!==null&&(o.types=h.types),D.T=o}}function Ny(){}function ec(e,t,n,l){if(e.tag!==5)throw Error(r(476));var a=Xf(e).queue;Yf(e,a,t,I,n===null?Ny:function(){return Gf(e),n(l)})}function Xf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Gf(e){var t=Xf(e);t.next===null&&(t=e.alternate.memoizedState),_a(e,t.next.queue,{},vt())}function tc(){return Je(qa)}function Vf(){return Le().memoizedState}function Qf(){return Le().memoizedState}function Cy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vt();e=_n(n);var l=En(t,e,n);l!==null&&(ut(l,t,n),va(l,t,n)),t={cache:zs()},e.payload=t;return}t=t.return}}function Ry(e,t,n){var l=vt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ki(e)?Kf(t,n):(n=bs(e,t,n,l),n!==null&&(ut(n,e,l),Jf(n,t,l)))}function Zf(e,t,n){var l=vt();_a(e,t,n,l)}function _a(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ki(e))Kf(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,h=s(o,n);if(a.hasEagerState=!0,a.eagerState=h,ft(h,o))return xi(e,t,a,0),Ne===null&&bi(),!1}catch{}finally{}if(n=bs(e,t,a,l),n!==null)return ut(n,e,l),Jf(n,t,l),!0}return!1}function nc(e,t,n,l){if(l={lane:2,revertLane:wc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ki(e)){if(t)throw Error(r(479))}else t=bs(e,n,l,2),t!==null&&ut(t,e,2)}function ki(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Kf(e,t){Ml=Di=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Jf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Fr(e,n)}}var Ea={readContext:Je,use:Bi,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useLayoutEffect:je,useInsertionEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useSyncExternalStore:je,useId:je,useHostTransitionStatus:je,useFormState:je,useActionState:je,useOptimistic:je,useMemoCache:je,useCacheRefresh:je};Ea.useEffectEvent=je;var $f={readContext:Je,use:Bi,useCallback:function(e,t){return Ie().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:jf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Hi(4194308,4,Bf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hi(4194308,4,e,t)},useInsertionEffect:function(e,t){Hi(4,2,e,t)},useMemo:function(e,t){var n=Ie();t=t===void 0?null:t;var l=e();if(tl){mn(!0);try{e()}finally{mn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Ie();if(n!==void 0){var a=n(t);if(tl){mn(!0);try{n(t)}finally{mn(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Ry.bind(null,ne,e),[l.memoizedState,e]},useRef:function(e){var t=Ie();return e={current:e},t.memoizedState=e},useState:function(e){e=$s(e);var t=e.queue,n=Zf.bind(null,ne,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ps,useDeferredValue:function(e,t){var n=Ie();return Is(n,e,t)},useTransition:function(){var e=$s(!1);return e=Yf.bind(null,ne,e.queue,!0,!1),Ie().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=ne,a=Ie();if(de){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Ne===null)throw Error(r(349));(ce&127)!==0||yf(l,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,jf(gf.bind(null,l,s,e),[e]),l.flags|=2048,Dl(9,{destroy:void 0},vf.bind(null,l,s,n,t),null),n},useId:function(){var e=Ie(),t=Ne.identifierPrefix;if(de){var n=Ht,l=Lt;n=(l&~(1<<32-ot(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=wi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Sy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Cf,useActionState:Cf,useOptimistic:function(e){var t=Ie();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=nc.bind(null,ne,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zs,useCacheRefresh:function(){return Ie().memoizedState=Cy.bind(null,ne)},useEffectEvent:function(e){var t=Ie(),n={impl:e};return t.memoizedState=n,function(){if((ye&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},lc={readContext:Je,use:Bi,useCallback:Hf,useContext:Je,useEffect:Fs,useImperativeHandle:Lf,useInsertionEffect:wf,useLayoutEffect:Uf,useMemo:qf,useReducer:Li,useRef:Mf,useState:function(){return Li(Pt)},useDebugValue:Ps,useDeferredValue:function(e,t){var n=Le();return kf(n,_e.memoizedState,e,t)},useTransition:function(){var e=Li(Pt)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:Sa(e),t]},useSyncExternalStore:pf,useId:Vf,useHostTransitionStatus:tc,useFormState:Rf,useActionState:Rf,useOptimistic:function(e,t){var n=Le();return Sf(n,_e,e,t)},useMemoCache:Zs,useCacheRefresh:Qf};lc.useEffectEvent=Df;var Wf={readContext:Je,use:Bi,useCallback:Hf,useContext:Je,useEffect:Fs,useImperativeHandle:Lf,useInsertionEffect:wf,useLayoutEffect:Uf,useMemo:qf,useReducer:Js,useRef:Mf,useState:function(){return Js(Pt)},useDebugValue:Ps,useDeferredValue:function(e,t){var n=Le();return _e===null?Is(n,e,t):kf(n,_e.memoizedState,e,t)},useTransition:function(){var e=Js(Pt)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:Sa(e),t]},useSyncExternalStore:pf,useId:Vf,useHostTransitionStatus:tc,useFormState:zf,useActionState:zf,useOptimistic:function(e,t){var n=Le();return _e!==null?Sf(n,_e,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Zs,useCacheRefresh:Qf};Wf.useEffectEvent=Df;function ac(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:g({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ic={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=vt(),a=_n(l);a.payload=t,n!=null&&(a.callback=n),t=En(e,a,l),t!==null&&(ut(t,e,l),va(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=vt(),a=_n(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=En(e,a,l),t!==null&&(ut(t,e,l),va(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vt(),l=_n(n);l.tag=2,t!=null&&(l.callback=t),t=En(e,l,n),t!==null&&(ut(t,e,n),va(t,e,n))}};function Ff(e,t,n,l,a,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,s,o):t.prototype&&t.prototype.isPureReactComponent?!ra(n,l)||!ra(a,s):!0}function Pf(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&ic.enqueueReplaceState(t,t.state,null)}function nl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=g({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function If(e){gi(e)}function ed(e){console.error(e)}function td(e){gi(e)}function Yi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function nd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function uc(e,t,n){return n=_n(n),n.tag=3,n.payload={element:null},n.callback=function(){Yi(e,t)},n}function ld(e){return e=_n(e),e.tag=3,e}function ad(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var s=l.value;e.payload=function(){return a(s)},e.callback=function(){nd(t,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){nd(t,n,l),typeof a!="function"&&(On===null?On=new Set([this]):On.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Oy(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Al(t,n,a,!0),n=ht.current,n!==null){switch(n.tag){case 31:case 13:return Nt===null?Ii():n.alternate===null&&De===0&&(De=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Ri?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Mc(e,l,a)),!1;case 22:return n.flags|=65536,l===Ri?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Mc(e,l,a)),!1}throw Error(r(435,n.tag))}return Mc(e,l,a),Ii(),!1}if(de)return t=ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==As&&(e=Error(r(422),{cause:l}),da(_t(e,n)))):(l!==As&&(t=Error(r(423),{cause:l}),da(_t(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=_t(l,n),a=uc(e.stateNode,l,a),Bs(e,a),De!==4&&(De=2)),!1;var s=Error(r(520),{cause:l});if(s=_t(s,n),Ma===null?Ma=[s]:Ma.push(s),De!==4&&(De=2),t===null)return!0;l=_t(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=uc(n.stateNode,l,e),Bs(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(On===null||!On.has(s))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ld(a),ad(a,e,n,l),Bs(n,a),!1}n=n.return}while(n!==null);return!1}var sc=Error(r(461)),ke=!1;function $e(e,t,n,l){t.child=e===null?cf(t,null,n,l):el(t,e.child,n,l)}function id(e,t,n,l,a){n=n.render;var s=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return Wn(t),l=Xs(e,t,n,o,s,a),h=Gs(),e!==null&&!ke?(Vs(e,t,a),It(e,t,a)):(de&&h&&Es(t),t.flags|=1,$e(e,t,l,a),t.child)}function ud(e,t,n,l,a){if(e===null){var s=n.type;return typeof s=="function"&&!xs(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,sd(e,t,s,l,a)):(e=_i(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!pc(e,a)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ra,n(o,l)&&e.ref===t.ref)return It(e,t,a)}return t.flags|=1,e=Kt(s,l),e.ref=t.ref,e.return=t,t.child=e}function sd(e,t,n,l,a){if(e!==null){var s=e.memoizedProps;if(ra(s,l)&&e.ref===t.ref)if(ke=!1,t.pendingProps=l=s,pc(e,a))(e.flags&131072)!==0&&(ke=!0);else return t.lanes=e.lanes,It(e,t,a)}return cc(e,t,n,l,a)}function cd(e,t,n,l){var a=l.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~s}else l=0,t.child=null;return rd(e,t,s,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ni(t,s!==null?s.cachePool:null),s!==null?ff(t,s):Hs(),df(t);else return l=t.lanes=536870912,rd(e,t,s!==null?s.baseLanes|n:n,n,l)}else s!==null?(Ni(t,s.cachePool),ff(t,s),An(),t.memoizedState=null):(e!==null&&Ni(t,null),Hs(),An());return $e(e,t,a,n),t.child}function Ta(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rd(e,t,n,l,a){var s=js();return s=s===null?null:{parent:He._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&Ni(t,null),Hs(),df(t),e!==null&&Al(e,t,l,!0),t.childLanes=a,null}function Xi(e,t){return t=Vi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function od(e,t,n){return el(t,e.child,null,n),e=Xi(t,t.pendingProps),e.flags|=2,mt(t),t.memoizedState=null,e}function zy(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(de){if(l.mode==="hidden")return e=Xi(t,l),t.lanes=536870912,Ta(null,e);if(ks(t),(e=Re)?(e=_h(e,At),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vn!==null?{id:Lt,overflow:Ht}:null,retryLane:536870912,hydrationErrors:null},n=Zo(e),n.return=t,t.child=n,Ke=t,Re=null)):e=null,e===null)throw bn(t);return t.lanes=536870912,null}return Xi(t,l)}var s=e.memoizedState;if(s!==null){var o=s.dehydrated;if(ks(t),a)if(t.flags&256)t.flags&=-257,t=od(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ke||Al(e,t,n,!1),a=(n&e.childLanes)!==0,ke||a){if(l=Ne,l!==null&&(o=Pr(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,Zn(e,o),ut(l,e,o),sc;Ii(),t=od(e,t,n)}else e=s.treeContext,Re=Ct(o.nextSibling),Ke=t,de=!0,gn=null,At=!1,e!==null&&$o(t,e),t=Xi(t,l),t.flags|=4096;return t}return e=Kt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Gi(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function cc(e,t,n,l,a){return Wn(t),n=Xs(e,t,n,l,void 0,a),l=Gs(),e!==null&&!ke?(Vs(e,t,a),It(e,t,a)):(de&&l&&Es(t),t.flags|=1,$e(e,t,n,a),t.child)}function fd(e,t,n,l,a,s){return Wn(t),t.updateQueue=null,n=mf(t,l,n,a),hf(e),l=Gs(),e!==null&&!ke?(Vs(e,t,s),It(e,t,s)):(de&&l&&Es(t),t.flags|=1,$e(e,t,n,s),t.child)}function dd(e,t,n,l,a){if(Wn(t),t.stateNode===null){var s=Sl,o=n.contextType;typeof o=="object"&&o!==null&&(s=Je(o)),s=new n(l,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ic,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},ws(t),o=n.contextType,s.context=typeof o=="object"&&o!==null?Je(o):Sl,s.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(ac(t,n,o,l),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(o=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),o!==s.state&&ic.enqueueReplaceState(s,s.state,null),ba(t,l,s,a),ga(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){s=t.stateNode;var h=t.memoizedProps,b=nl(n,h);s.props=b;var R=s.context,j=n.contextType;o=Sl,typeof j=="object"&&j!==null&&(o=Je(j));var U=n.getDerivedStateFromProps;j=typeof U=="function"||typeof s.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,j||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(h||R!==o)&&Pf(t,s,l,o),Sn=!1;var O=t.memoizedState;s.state=O,ba(t,l,s,a),ga(),R=t.memoizedState,h||O!==R||Sn?(typeof U=="function"&&(ac(t,n,U,l),R=t.memoizedState),(b=Sn||Ff(t,n,b,l,O,R,o))?(j||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=l,t.memoizedState=R),s.props=l,s.state=R,s.context=o,l=b):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,Us(e,t),o=t.memoizedProps,j=nl(n,o),s.props=j,U=t.pendingProps,O=s.context,R=n.contextType,b=Sl,typeof R=="object"&&R!==null&&(b=Je(R)),h=n.getDerivedStateFromProps,(R=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==U||O!==b)&&Pf(t,s,l,b),Sn=!1,O=t.memoizedState,s.state=O,ba(t,l,s,a),ga();var M=t.memoizedState;o!==U||O!==M||Sn||e!==null&&e.dependencies!==null&&Ti(e.dependencies)?(typeof h=="function"&&(ac(t,n,h,l),M=t.memoizedState),(j=Sn||Ff(t,n,j,l,O,M,b)||e!==null&&e.dependencies!==null&&Ti(e.dependencies))?(R||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(l,M,b),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(l,M,b)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=M),s.props=l,s.state=M,s.context=b,l=j):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),l=!1)}return s=l,Gi(e,t),l=(t.flags&128)!==0,s||l?(s=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&l?(t.child=el(t,e.child,null,a),t.child=el(t,null,n,a)):$e(e,t,n,a),t.memoizedState=s.state,e=t.child):e=It(e,t,a),e}function hd(e,t,n,l){return Jn(),t.flags|=256,$e(e,t,n,l),t.child}var rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function oc(e){return{baseLanes:e,cachePool:tf()}}function fc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=yt),e}function md(e,t,n){var l=t.pendingProps,a=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(Be.current&2)!==0),o&&(a=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(de){if(a?Tn(t):An(),(e=Re)?(e=_h(e,At),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vn!==null?{id:Lt,overflow:Ht}:null,retryLane:536870912,hydrationErrors:null},n=Zo(e),n.return=t,t.child=n,Ke=t,Re=null)):e=null,e===null)throw bn(t);return Kc(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,a?(An(),a=t.mode,h=Vi({mode:"hidden",children:h},a),l=Kn(l,a,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=oc(n),l.childLanes=fc(e,o,n),t.memoizedState=rc,Ta(null,l)):(Tn(t),dc(t,h))}var b=e.memoizedState;if(b!==null&&(h=b.dehydrated,h!==null)){if(s)t.flags&256?(Tn(t),t.flags&=-257,t=hc(e,t,n)):t.memoizedState!==null?(An(),t.child=e.child,t.flags|=128,t=null):(An(),h=l.fallback,a=t.mode,l=Vi({mode:"visible",children:l.children},a),h=Kn(h,a,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,el(t,e.child,null,n),l=t.child,l.memoizedState=oc(n),l.childLanes=fc(e,o,n),t.memoizedState=rc,t=Ta(null,l));else if(Tn(t),Kc(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var R=o.dgst;o=R,l=Error(r(419)),l.stack="",l.digest=o,da({value:l,source:null,stack:null}),t=hc(e,t,n)}else if(ke||Al(e,t,n,!1),o=(n&e.childLanes)!==0,ke||o){if(o=Ne,o!==null&&(l=Pr(o,n),l!==0&&l!==b.retryLane))throw b.retryLane=l,Zn(e,l),ut(o,e,l),sc;Zc(h)||Ii(),t=hc(e,t,n)}else Zc(h)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Re=Ct(h.nextSibling),Ke=t,de=!0,gn=null,At=!1,e!==null&&$o(t,e),t=dc(t,l.children),t.flags|=4096);return t}return a?(An(),h=l.fallback,a=t.mode,b=e.child,R=b.sibling,l=Kt(b,{mode:"hidden",children:l.children}),l.subtreeFlags=b.subtreeFlags&65011712,R!==null?h=Kt(R,h):(h=Kn(h,a,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,Ta(null,l),l=t.child,h=e.child.memoizedState,h===null?h=oc(n):(a=h.cachePool,a!==null?(b=He._currentValue,a=a.parent!==b?{parent:b,pool:b}:a):a=tf(),h={baseLanes:h.baseLanes|n,cachePool:a}),l.memoizedState=h,l.childLanes=fc(e,o,n),t.memoizedState=rc,Ta(e.child,l)):(Tn(t),n=e.child,e=n.sibling,n=Kt(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function dc(e,t){return t=Vi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vi(e,t){return e=dt(22,e,null,t),e.lanes=0,e}function hc(e,t,n){return el(t,e.child,null,n),e=dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Rs(e.return,t,n)}function mc(e,t,n,l,a,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=n,o.tailMode=a,o.treeForkCount=s)}function yd(e,t,n){var l=t.pendingProps,a=l.revealOrder,s=l.tail;l=l.children;var o=Be.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,X(Be,o),$e(e,t,l,n),l=de?fa:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pd(e,n,t);else if(e.tag===19)pd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&ji(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),mc(t,!1,a,n,s,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&ji(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}mc(t,!0,n,null,s,l);break;case"together":mc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function It(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Rn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Al(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Kt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ti(e)))}function My(e,t,n){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),xn(t,He,e.memoizedState.cache),Jn();break;case 27:case 5:Wl(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ks(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Tn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?md(e,t,n):(Tn(t),e=It(e,t,n),e!==null?e.sibling:null);Tn(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Al(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return yd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),X(Be,Be.current),l)break;return null;case 22:return t.lanes=0,cd(e,t,n,t.pendingProps);case 24:xn(t,He,e.memoizedState.cache)}return It(e,t,n)}function vd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ke=!0;else{if(!pc(e,n)&&(t.flags&128)===0)return ke=!1,My(e,t,n);ke=(e.flags&131072)!==0}else ke=!1,de&&(t.flags&1048576)!==0&&Jo(t,fa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Pn(t.elementType),t.type=e,typeof e=="function")xs(e)?(l=nl(e,l),t.tag=1,t=dd(null,t,e,l,n)):(t.tag=0,t=cc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===ae){t.tag=11,t=id(null,t,e,l,n);break e}else if(a===W){t.tag=14,t=ud(null,t,e,l,n);break e}}throw t=st(e)||e,Error(r(306,t,""))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=nl(l,t.pendingProps),dd(e,t,l,a,n);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var s=t.memoizedState;a=s.element,Us(e,t),ba(t,l,null,n);var o=t.memoizedState;if(l=o.cache,xn(t,He,l),l!==s.cache&&Os(t,[He],n,!0),ga(),l=o.element,s.isDehydrated)if(s={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=hd(e,t,l,n);break e}else if(l!==a){a=_t(Error(r(424)),t),da(a),t=hd(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Re=Ct(e.firstChild),Ke=t,de=!0,gn=null,At=!0,n=cf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Jn(),l===a){t=It(e,t,n);break e}$e(e,t,l,n)}t=t.child}return t;case 26:return Gi(e,t),e===null?(n=Rh(t.type,null,t.pendingProps,null))?t.memoizedState=n:de||(n=t.type,e=t.pendingProps,l=uu(ie.current).createElement(n),l[Ze]=t,l[et]=e,We(l,n,e),Ve(l),t.stateNode=l):t.memoizedState=Rh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Wl(t),e===null&&de&&(l=t.stateNode=Ah(t.type,t.pendingProps,ie.current),Ke=t,At=!0,a=Re,Dn(t.type)?(Jc=a,Re=Ct(l.firstChild)):Re=a),$e(e,t,t.pendingProps.children,n),Gi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&de&&((a=l=Re)&&(l=s0(l,t.type,t.pendingProps,At),l!==null?(t.stateNode=l,Ke=t,Re=Ct(l.firstChild),At=!1,a=!0):a=!1),a||bn(t)),Wl(t),a=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,l=s.children,Gc(a,s)?l=null:o!==null&&Gc(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=Xs(e,t,_y,null,null,n),qa._currentValue=a),Gi(e,t),$e(e,t,l,n),t.child;case 6:return e===null&&de&&((e=n=Re)&&(n=c0(n,t.pendingProps,At),n!==null?(t.stateNode=n,Ke=t,Re=null,e=!0):e=!1),e||bn(t)),null;case 13:return md(e,t,n);case 4:return Pe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=el(t,null,l,n):$e(e,t,l,n),t.child;case 11:return id(e,t,t.type,t.pendingProps,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,xn(t,t.type,l.value),$e(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,Wn(t),a=Je(a),l=l(a),t.flags|=1,$e(e,t,l,n),t.child;case 14:return ud(e,t,t.type,t.pendingProps,n);case 15:return sd(e,t,t.type,t.pendingProps,n);case 19:return yd(e,t,n);case 31:return zy(e,t,n);case 22:return cd(e,t,n,t.pendingProps);case 24:return Wn(t),l=Je(He),e===null?(a=js(),a===null&&(a=Ne,s=zs(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:l,cache:a},ws(t),xn(t,He,a)):((e.lanes&n)!==0&&(Us(e,t),ba(t,null,null,n),ga()),a=e.memoizedState,s=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),xn(t,He,l)):(l=s.cache,xn(t,He,l),l!==a.cache&&Os(t,[He],n,!0))),$e(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function en(e){e.flags|=4}function yc(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Vd())e.flags|=8192;else throw In=Ri,Ds}else e.flags&=-16777217}function gd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Dh(t))if(Vd())e.flags|=8192;else throw In=Ri,Ds}function Qi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?$r():536870912,e.lanes|=t,Ll|=t)}function Aa(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function jy(e,t,n){var l=t.pendingProps;switch(Ts(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(t),null;case 1:return Oe(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Wt(He),Ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?en(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ns())),Oe(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(en(t),s!==null?(Oe(t),gd(t,s)):(Oe(t),yc(t,a,null,l,n))):s?s!==e.memoizedState?(en(t),Oe(t),gd(t,s)):(Oe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&en(t),Oe(t),yc(t,a,e,l,n)),null;case 27:if(ni(t),n=ie.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Oe(t),null}e=Z.current,Tl(t)?Wo(t):(e=Ah(a,l,n),t.stateNode=e,en(t))}return Oe(t),null;case 5:if(ni(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Oe(t),null}if(s=Z.current,Tl(t))Wo(t);else{var o=uu(ie.current);switch(s){case 1:s=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:s=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":s=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":s=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":s=o.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?o.createElement(a,{is:l.is}):o.createElement(a)}}s[Ze]=t,s[et]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)s.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=s;e:switch(We(s,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&en(t)}}return Oe(t),yc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=ie.current,Tl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Ke,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[Ze]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||mh(e.nodeValue,n)),e||bn(t,!0)}else e=uu(e).createTextNode(l),e[Ze]=t,t.stateNode=e}return Oe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Tl(t),n!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ze]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),e=!1}else n=Ns(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(mt(t),t):(mt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Oe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Tl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(r(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));a[Ze]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),a=!1}else a=Ns(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(mt(t),t):(mt(t),null)}return mt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Qi(t,t.updateQueue),Oe(t),null);case 4:return Ue(),e===null&&Hc(t.stateNode.containerInfo),Oe(t),null;case 10:return Wt(t.type),Oe(t),null;case 19:if(B(Be),l=t.memoizedState,l===null)return Oe(t),null;if(a=(t.flags&128)!==0,s=l.rendering,s===null)if(a)Aa(l,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=ji(e),s!==null){for(t.flags|=128,Aa(l,!1),e=s.updateQueue,t.updateQueue=e,Qi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Qo(n,e),n=n.sibling;return X(Be,Be.current&1|2),de&&Jt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ct()>Wi&&(t.flags|=128,a=!0,Aa(l,!1),t.lanes=4194304)}else{if(!a)if(e=ji(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Qi(t,e),Aa(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!de)return Oe(t),null}else 2*ct()-l.renderingStartTime>Wi&&n!==536870912&&(t.flags|=128,a=!0,Aa(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ct(),e.sibling=null,n=Be.current,X(Be,a?n&1|2:n&1),de&&Jt(t,l.treeForkCount),e):(Oe(t),null);case 22:case 23:return mt(t),qs(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),n=t.updateQueue,n!==null&&Qi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&B(Fn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wt(He),Oe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Dy(e,t){switch(Ts(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(He),Ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ni(t),null;case 31:if(t.memoizedState!==null){if(mt(t),t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Be),null;case 4:return Ue(),null;case 10:return Wt(t.type),null;case 22:case 23:return mt(t),qs(),e!==null&&B(Fn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(He),null;case 25:return null;default:return null}}function bd(e,t){switch(Ts(t),t.tag){case 3:Wt(He),Ue();break;case 26:case 27:case 5:ni(t);break;case 4:Ue();break;case 31:t.memoizedState!==null&&mt(t);break;case 13:mt(t);break;case 19:B(Be);break;case 10:Wt(t.type);break;case 22:case 23:mt(t),qs(),e!==null&&B(Fn);break;case 24:Wt(He)}}function Na(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var s=n.create,o=n.inst;l=s(),o.destroy=l}n=n.next}while(n!==a)}}catch(h){be(t,t.return,h)}}function Nn(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,a=t;var b=n,R=h;try{R()}catch(j){be(a,b,j)}}}l=l.next}while(l!==s)}}catch(j){be(t,t.return,j)}}function xd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{of(t,n)}catch(l){be(e,e.return,l)}}}function Sd(e,t,n){n.props=nl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){be(e,t,l)}}function Ca(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){be(e,t,a)}}function qt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){be(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){be(e,t,a)}else n.current=null}function _d(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){be(e,e.return,a)}}function vc(e,t,n){try{var l=e.stateNode;t0(l,e.type,n,t),l[et]=t}catch(a){be(e,e.return,a)}}function Ed(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dn(e.type)||e.tag===4}function gc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ed(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Dn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bc(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qt));else if(l!==4&&(l===27&&Dn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(bc(e,t,n),e=e.sibling;e!==null;)bc(e,t,n),e=e.sibling}function Zi(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Dn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zi(e,t,n),e=e.sibling;e!==null;)Zi(e,t,n),e=e.sibling}function Td(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);We(t,l,n),t[Ze]=e,t[et]=n}catch(s){be(e,e.return,s)}}var tn=!1,Ye=!1,xc=!1,Ad=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function wy(e,t){if(e=e.containerInfo,Yc=hu,e=Bo(e),hs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,h=-1,b=-1,R=0,j=0,U=e,O=null;t:for(;;){for(var M;U!==n||a!==0&&U.nodeType!==3||(h=o+a),U!==s||l!==0&&U.nodeType!==3||(b=o+l),U.nodeType===3&&(o+=U.nodeValue.length),(M=U.firstChild)!==null;)O=U,U=M;for(;;){if(U===e)break t;if(O===n&&++R===a&&(h=o),O===s&&++j===l&&(b=o),(M=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=M}n=h===-1||b===-1?null:{start:h,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xc={focusedElem:e,selectionRange:n},hu=!1,Qe=t;Qe!==null;)if(t=Qe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qe=e;else for(;Qe!==null;){switch(t=Qe,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,n=t,a=s.memoizedProps,s=s.memoizedState,l=n.stateNode;try{var Q=nl(n.type,a);e=l.getSnapshotBeforeUpdate(Q,s),l.__reactInternalSnapshotBeforeUpdate=e}catch(F){be(n,n.return,F)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Qc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Qe=e;break}Qe=t.return}}function Nd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:ln(e,n),l&4&&Na(5,n);break;case 1:if(ln(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){be(n,n.return,o)}else{var a=nl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){be(n,n.return,o)}}l&64&&xd(n),l&512&&Ca(n,n.return);break;case 3:if(ln(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{of(e,t)}catch(o){be(n,n.return,o)}}break;case 27:t===null&&l&4&&Td(n);case 26:case 5:ln(e,n),t===null&&l&4&&_d(n),l&512&&Ca(n,n.return);break;case 12:ln(e,n);break;case 31:ln(e,n),l&4&&Od(e,n);break;case 13:ln(e,n),l&4&&zd(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Gy.bind(null,n),r0(e,n))));break;case 22:if(l=n.memoizedState!==null||tn,!l){t=t!==null&&t.memoizedState!==null||Ye,a=tn;var s=Ye;tn=l,(Ye=t)&&!s?an(e,n,(n.subtreeFlags&8772)!==0):ln(e,n),tn=a,Ye=s}break;case 30:break;default:ln(e,n)}}function Cd(e){var t=e.alternate;t!==null&&(e.alternate=null,Cd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Wu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ze=null,nt=!1;function nn(e,t,n){for(n=n.child;n!==null;)Rd(e,t,n),n=n.sibling}function Rd(e,t,n){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(Fl,n)}catch{}switch(n.tag){case 26:Ye||qt(n,t),nn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ye||qt(n,t);var l=ze,a=nt;Dn(n.type)&&(ze=n.stateNode,nt=!1),nn(e,t,n),Ba(n.stateNode),ze=l,nt=a;break;case 5:Ye||qt(n,t);case 6:if(l=ze,a=nt,ze=null,nn(e,t,n),ze=l,nt=a,ze!==null)if(nt)try{(ze.nodeType===9?ze.body:ze.nodeName==="HTML"?ze.ownerDocument.body:ze).removeChild(n.stateNode)}catch(s){be(n,t,s)}else try{ze.removeChild(n.stateNode)}catch(s){be(n,t,s)}break;case 18:ze!==null&&(nt?(e=ze,xh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ql(e)):xh(ze,n.stateNode));break;case 4:l=ze,a=nt,ze=n.stateNode.containerInfo,nt=!0,nn(e,t,n),ze=l,nt=a;break;case 0:case 11:case 14:case 15:Nn(2,n,t),Ye||Nn(4,n,t),nn(e,t,n);break;case 1:Ye||(qt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Sd(n,t,l)),nn(e,t,n);break;case 21:nn(e,t,n);break;case 22:Ye=(l=Ye)||n.memoizedState!==null,nn(e,t,n),Ye=l;break;default:nn(e,t,n)}}function Od(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ql(e)}catch(n){be(t,t.return,n)}}}function zd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ql(e)}catch(n){be(t,t.return,n)}}function Uy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ad),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ad),t;default:throw Error(r(435,e.tag))}}function Ki(e,t){var n=Uy(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Vy.bind(null,e,l);l.then(a,a)}})}function lt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],s=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Dn(h.type)){ze=h.stateNode,nt=!1;break e}break;case 5:ze=h.stateNode,nt=!1;break e;case 3:case 4:ze=h.stateNode.containerInfo,nt=!0;break e}h=h.return}if(ze===null)throw Error(r(160));Rd(s,o,a),ze=null,nt=!1,s=a.alternate,s!==null&&(s.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Md(t,e),t=t.sibling}var jt=null;function Md(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:lt(t,e),at(e),l&4&&(Nn(3,e,e.return),Na(3,e),Nn(5,e,e.return));break;case 1:lt(t,e),at(e),l&512&&(Ye||n===null||qt(n,n.return)),l&64&&tn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=jt;if(lt(t,e),at(e),l&512&&(Ye||n===null||qt(n,n.return)),l&4){var s=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":s=a.getElementsByTagName("title")[0],(!s||s[ea]||s[Ze]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=a.createElement(l),a.head.insertBefore(s,a.querySelector("head > title"))),We(s,l,n),s[Ze]=e,Ve(s),l=s;break e;case"link":var o=Mh("link","href",a).get(l+(n.href||""));if(o){for(var h=0;h<o.length;h++)if(s=o[h],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(h,1);break t}}s=a.createElement(l),We(s,l,n),a.head.appendChild(s);break;case"meta":if(o=Mh("meta","content",a).get(l+(n.content||""))){for(h=0;h<o.length;h++)if(s=o[h],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(h,1);break t}}s=a.createElement(l),We(s,l,n),a.head.appendChild(s);break;default:throw Error(r(468,l))}s[Ze]=e,Ve(s),l=s}e.stateNode=l}else jh(a,e.type,e.stateNode);else e.stateNode=zh(a,l,e.memoizedProps);else s!==l?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,l===null?jh(a,e.type,e.stateNode):zh(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&vc(e,e.memoizedProps,n.memoizedProps)}break;case 27:lt(t,e),at(e),l&512&&(Ye||n===null||qt(n,n.return)),n!==null&&l&4&&vc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(lt(t,e),at(e),l&512&&(Ye||n===null||qt(n,n.return)),e.flags&32){a=e.stateNode;try{ml(a,"")}catch(Q){be(e,e.return,Q)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,vc(e,a,n!==null?n.memoizedProps:a)),l&1024&&(xc=!0);break;case 6:if(lt(t,e),at(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(Q){be(e,e.return,Q)}}break;case 3:if(ru=null,a=jt,jt=su(t.containerInfo),lt(t,e),jt=a,at(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Ql(t.containerInfo)}catch(Q){be(e,e.return,Q)}xc&&(xc=!1,jd(e));break;case 4:l=jt,jt=su(e.stateNode.containerInfo),lt(t,e),at(e),jt=l;break;case 12:lt(t,e),at(e);break;case 31:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ki(e,l)));break;case 13:lt(t,e),at(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($i=ct()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ki(e,l)));break;case 22:a=e.memoizedState!==null;var b=n!==null&&n.memoizedState!==null,R=tn,j=Ye;if(tn=R||a,Ye=j||b,lt(t,e),Ye=j,tn=R,at(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||b||tn||Ye||ll(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){b=n=t;try{if(s=b.stateNode,a)o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=b.stateNode;var U=b.memoizedProps.style,O=U!=null&&U.hasOwnProperty("display")?U.display:null;h.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(Q){be(b,b.return,Q)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=a?"":b.memoizedProps}catch(Q){be(b,b.return,Q)}}}else if(t.tag===18){if(n===null){b=t;try{var M=b.stateNode;a?Sh(M,!0):Sh(b.stateNode,!1)}catch(Q){be(b,b.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}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Ki(e,n))));break;case 19:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ki(e,l)));break;case 30:break;case 21:break;default:lt(t,e),at(e)}}function at(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Ed(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var a=n.stateNode,s=gc(e);Zi(e,s,a);break;case 5:var o=n.stateNode;n.flags&32&&(ml(o,""),n.flags&=-33);var h=gc(e);Zi(e,h,o);break;case 3:case 4:var b=n.stateNode.containerInfo,R=gc(e);bc(e,R,b);break;default:throw Error(r(161))}}catch(j){be(e,e.return,j)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Nd(e,t.alternate,t),t=t.sibling}function ll(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Nn(4,t,t.return),ll(t);break;case 1:qt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Sd(t,t.return,n),ll(t);break;case 27:Ba(t.stateNode);case 26:case 5:qt(t,t.return),ll(t);break;case 22:t.memoizedState===null&&ll(t);break;case 30:ll(t);break;default:ll(t)}e=e.sibling}}function an(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,s=t,o=s.flags;switch(s.tag){case 0:case 11:case 15:an(a,s,n),Na(4,s);break;case 1:if(an(a,s,n),l=s,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(R){be(l,l.return,R)}if(l=s,a=l.updateQueue,a!==null){var h=l.stateNode;try{var b=a.shared.hiddenCallbacks;if(b!==null)for(a.shared.hiddenCallbacks=null,a=0;a<b.length;a++)rf(b[a],h)}catch(R){be(l,l.return,R)}}n&&o&64&&xd(s),Ca(s,s.return);break;case 27:Td(s);case 26:case 5:an(a,s,n),n&&l===null&&o&4&&_d(s),Ca(s,s.return);break;case 12:an(a,s,n);break;case 31:an(a,s,n),n&&o&4&&Od(a,s);break;case 13:an(a,s,n),n&&o&4&&zd(a,s);break;case 22:s.memoizedState===null&&an(a,s,n),Ca(s,s.return);break;case 30:break;default:an(a,s,n)}t=t.sibling}}function Sc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ha(n))}function _c(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ha(e))}function Dt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dd(e,t,n,l),t=t.sibling}function Dd(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Dt(e,t,n,l),a&2048&&Na(9,t);break;case 1:Dt(e,t,n,l);break;case 3:Dt(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ha(e)));break;case 12:if(a&2048){Dt(e,t,n,l),e=t.stateNode;try{var s=t.memoizedProps,o=s.id,h=s.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){be(t,t.return,b)}}else Dt(e,t,n,l);break;case 31:Dt(e,t,n,l);break;case 13:Dt(e,t,n,l);break;case 23:break;case 22:s=t.stateNode,o=t.alternate,t.memoizedState!==null?s._visibility&2?Dt(e,t,n,l):Ra(e,t):s._visibility&2?Dt(e,t,n,l):(s._visibility|=2,wl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Sc(o,t);break;case 24:Dt(e,t,n,l),a&2048&&_c(t.alternate,t);break;default:Dt(e,t,n,l)}}function wl(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,o=t,h=n,b=l,R=o.flags;switch(o.tag){case 0:case 11:case 15:wl(s,o,h,b,a),Na(8,o);break;case 23:break;case 22:var j=o.stateNode;o.memoizedState!==null?j._visibility&2?wl(s,o,h,b,a):Ra(s,o):(j._visibility|=2,wl(s,o,h,b,a)),a&&R&2048&&Sc(o.alternate,o);break;case 24:wl(s,o,h,b,a),a&&R&2048&&_c(o.alternate,o);break;default:wl(s,o,h,b,a)}t=t.sibling}}function Ra(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:Ra(n,l),a&2048&&Sc(l.alternate,l);break;case 24:Ra(n,l),a&2048&&_c(l.alternate,l);break;default:Ra(n,l)}t=t.sibling}}var Oa=8192;function Ul(e,t,n){if(e.subtreeFlags&Oa)for(e=e.child;e!==null;)wd(e,t,n),e=e.sibling}function wd(e,t,n){switch(e.tag){case 26:Ul(e,t,n),e.flags&Oa&&e.memoizedState!==null&&S0(n,jt,e.memoizedState,e.memoizedProps);break;case 5:Ul(e,t,n);break;case 3:case 4:var l=jt;jt=su(e.stateNode.containerInfo),Ul(e,t,n),jt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Oa,Oa=16777216,Ul(e,t,n),Oa=l):Ul(e,t,n));break;default:Ul(e,t,n)}}function Ud(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function za(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Qe=l,Ld(l,e)}Ud(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bd(e),e=e.sibling}function Bd(e){switch(e.tag){case 0:case 11:case 15:za(e),e.flags&2048&&Nn(9,e,e.return);break;case 3:za(e);break;case 12:za(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ji(e)):za(e);break;default:za(e)}}function Ji(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Qe=l,Ld(l,e)}Ud(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nn(8,t,t.return),Ji(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ji(t));break;default:Ji(t)}e=e.sibling}}function Ld(e,t){for(;Qe!==null;){var n=Qe;switch(n.tag){case 0:case 11:case 15:Nn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ha(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Qe=l;else e:for(n=e;Qe!==null;){l=Qe;var a=l.sibling,s=l.return;if(Cd(l),l===n){Qe=null;break e}if(a!==null){a.return=s,Qe=a;break e}Qe=s}}}var By={getCacheForType:function(e){var t=Je(He),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Je(He).controller.signal}},Ly=typeof WeakMap=="function"?WeakMap:Map,ye=0,Ne=null,ue=null,ce=0,ge=0,pt=null,Cn=!1,Bl=!1,Ec=!1,un=0,De=0,Rn=0,al=0,Tc=0,yt=0,Ll=0,Ma=null,it=null,Ac=!1,$i=0,Hd=0,Wi=1/0,Fi=null,On=null,Ge=0,zn=null,Hl=null,sn=0,Nc=0,Cc=null,qd=null,ja=0,Rc=null;function vt(){return(ye&2)!==0&&ce!==0?ce&-ce:D.T!==null?wc():Ir()}function kd(){if(yt===0)if((ce&536870912)===0||de){var e=ii;ii<<=1,(ii&3932160)===0&&(ii=262144),yt=e}else yt=536870912;return e=ht.current,e!==null&&(e.flags|=32),yt}function ut(e,t,n){(e===Ne&&(ge===2||ge===9)||e.cancelPendingCommit!==null)&&(ql(e,0),Mn(e,ce,yt,!1)),Il(e,n),((ye&2)===0||e!==Ne)&&(e===Ne&&((ye&2)===0&&(al|=n),De===4&&Mn(e,ce,yt,!1)),kt(e))}function Yd(e,t,n){if((ye&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Pl(e,t),a=l?ky(e,t):zc(e,t,!0),s=l;do{if(a===0){Bl&&!l&&Mn(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!Hy(n)){a=zc(e,t,!1),s=!1;continue}if(a===2){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;a=Ma;var b=h.current.memoizedState.isDehydrated;if(b&&(ql(h,o).flags|=256),o=zc(h,o,!1),o!==2){if(Ec&&!b){h.errorRecoveryDisabledLanes|=s,al|=s,a=4;break e}s=it,it=a,s!==null&&(it===null?it=s:it.push.apply(it,s))}a=o}if(s=!1,a!==2)continue}}if(a===1){ql(e,0),Mn(e,t,0,!0);break}e:{switch(l=e,s=a,s){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Mn(l,t,yt,!Cn);break e;case 2:it=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(a=$i+300-ct(),10<a)){if(Mn(l,t,yt,!Cn),si(l,0,!0)!==0)break e;sn=t,l.timeoutHandle=gh(Xd.bind(null,l,n,it,Fi,Ac,t,yt,al,Ll,Cn,s,"Throttled",-0,0),a);break e}Xd(l,n,it,Fi,Ac,t,yt,al,Ll,Cn,s,null,-0,0)}}break}while(!0);kt(e)}function Xd(e,t,n,l,a,s,o,h,b,R,j,U,O,M){if(e.timeoutHandle=-1,U=t.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},wd(t,s,U);var Q=(s&62914560)===s?$i-ct():(s&4194048)===s?Hd-ct():0;if(Q=_0(U,Q),Q!==null){sn=s,e.cancelPendingCommit=Q(Wd.bind(null,e,t,s,n,l,a,o,h,b,j,U,null,O,M)),Mn(e,s,o,!R);return}}Wd(e,t,s,n,l,a,o,h,b)}function Hy(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],s=a.getSnapshot;a=a.value;try{if(!ft(s(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Mn(e,t,n,l){t&=~Tc,t&=~al,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var s=31-ot(a),o=1<<s;l[s]=-1,a&=~o}n!==0&&Wr(e,n,t)}function Pi(){return(ye&6)===0?(Da(0),!1):!0}function Oc(){if(ue!==null){if(ge===0)var e=ue.return;else e=ue,$t=$n=null,Qs(e),Ol=null,pa=0,e=ue;for(;e!==null;)bd(e.alternate,e),e=e.return;ue=null}}function ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,a0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),sn=0,Oc(),Ne=e,ue=n=Kt(e.current,null),ce=t,ge=0,pt=null,Cn=!1,Bl=Pl(e,t),Ec=!1,Ll=yt=Tc=al=Rn=De=0,it=Ma=null,Ac=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-ot(l),s=1<<a;t|=e[a],l&=~s}return un=t,bi(),n}function Gd(e,t){ne=null,D.H=Ea,t===Rl||t===Ci?(t=af(),ge=3):t===Ds?(t=af(),ge=4):ge=t===sc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pt=t,ue===null&&(De=1,Yi(e,_t(t,e.current)))}function Vd(){var e=ht.current;return e===null?!0:(ce&4194048)===ce?Nt===null:(ce&62914560)===ce||(ce&536870912)!==0?e===Nt:!1}function Qd(){var e=D.H;return D.H=Ea,e===null?Ea:e}function Zd(){var e=D.A;return D.A=By,e}function Ii(){De=4,Cn||(ce&4194048)!==ce&&ht.current!==null||(Bl=!0),(Rn&134217727)===0&&(al&134217727)===0||Ne===null||Mn(Ne,ce,yt,!1)}function zc(e,t,n){var l=ye;ye|=2;var a=Qd(),s=Zd();(Ne!==e||ce!==t)&&(Fi=null,ql(e,t)),t=!1;var o=De;e:do try{if(ge!==0&&ue!==null){var h=ue,b=pt;switch(ge){case 8:Oc(),o=6;break e;case 3:case 2:case 9:case 6:ht.current===null&&(t=!0);var R=ge;if(ge=0,pt=null,kl(e,h,b,R),n&&Bl){o=0;break e}break;default:R=ge,ge=0,pt=null,kl(e,h,b,R)}}qy(),o=De;break}catch(j){Gd(e,j)}while(!0);return t&&e.shellSuspendCounter++,$t=$n=null,ye=l,D.H=a,D.A=s,ue===null&&(Ne=null,ce=0,bi()),o}function qy(){for(;ue!==null;)Kd(ue)}function ky(e,t){var n=ye;ye|=2;var l=Qd(),a=Zd();Ne!==e||ce!==t?(Fi=null,Wi=ct()+500,ql(e,t)):Bl=Pl(e,t);e:do try{if(ge!==0&&ue!==null){t=ue;var s=pt;t:switch(ge){case 1:ge=0,pt=null,kl(e,t,s,1);break;case 2:case 9:if(nf(s)){ge=0,pt=null,Jd(t);break}t=function(){ge!==2&&ge!==9||Ne!==e||(ge=7),kt(e)},s.then(t,t);break e;case 3:ge=7;break e;case 4:ge=5;break e;case 7:nf(s)?(ge=0,pt=null,Jd(t)):(ge=0,pt=null,kl(e,t,s,7));break;case 5:var o=null;switch(ue.tag){case 26:o=ue.memoizedState;case 5:case 27:var h=ue;if(o?Dh(o):h.stateNode.complete){ge=0,pt=null;var b=h.sibling;if(b!==null)ue=b;else{var R=h.return;R!==null?(ue=R,eu(R)):ue=null}break t}}ge=0,pt=null,kl(e,t,s,5);break;case 6:ge=0,pt=null,kl(e,t,s,6);break;case 8:Oc(),De=6;break e;default:throw Error(r(462))}}Yy();break}catch(j){Gd(e,j)}while(!0);return $t=$n=null,D.H=l,D.A=a,ye=n,ue!==null?0:(Ne=null,ce=0,bi(),De)}function Yy(){for(;ue!==null&&!op();)Kd(ue)}function Kd(e){var t=vd(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?eu(e):ue=t}function Jd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fd(n,t,t.pendingProps,t.type,void 0,ce);break;case 11:t=fd(n,t,t.pendingProps,t.type.render,t.ref,ce);break;case 5:Qs(t);default:bd(n,t),t=ue=Qo(t,un),t=vd(n,t,un)}e.memoizedProps=e.pendingProps,t===null?eu(e):ue=t}function kl(e,t,n,l){$t=$n=null,Qs(t),Ol=null,pa=0;var a=t.return;try{if(Oy(e,a,t,n,ce)){De=1,Yi(e,_t(n,e.current)),ue=null;return}}catch(s){if(a!==null)throw ue=a,s;De=1,Yi(e,_t(n,e.current)),ue=null;return}t.flags&32768?(de||l===1?e=!0:Bl||(ce&536870912)!==0?e=!1:(Cn=e=!0,(l===2||l===9||l===3||l===6)&&(l=ht.current,l!==null&&l.tag===13&&(l.flags|=16384))),$d(t,e)):eu(t)}function eu(e){var t=e;do{if((t.flags&32768)!==0){$d(t,Cn);return}e=t.return;var n=jy(t.alternate,t,un);if(n!==null){ue=n;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);De===0&&(De=5)}function $d(e,t){do{var n=Dy(e.alternate,e);if(n!==null){n.flags&=32767,ue=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ue=e;return}ue=e=n}while(e!==null);De=6,ue=null}function Wd(e,t,n,l,a,s,o,h,b){e.cancelPendingCommit=null;do tu();while(Ge!==0);if((ye&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(s=t.lanes|t.childLanes,s|=gs,xp(e,n,s,o,h,b),e===Ne&&(ue=Ne=null,ce=0),Hl=t,zn=e,sn=n,Nc=s,Cc=a,qd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Qy(li,function(){return th(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,a=Y.p,Y.p=2,o=ye,ye|=4;try{wy(e,t,n)}finally{ye=o,Y.p=a,D.T=l}}Ge=1,Fd(),Pd(),Id()}}function Fd(){if(Ge===1){Ge=0;var e=zn,t=Hl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null;var l=Y.p;Y.p=2;var a=ye;ye|=4;try{Md(t,e);var s=Xc,o=Bo(e.containerInfo),h=s.focusedElem,b=s.selectionRange;if(o!==h&&h&&h.ownerDocument&&Uo(h.ownerDocument.documentElement,h)){if(b!==null&&hs(h)){var R=b.start,j=b.end;if(j===void 0&&(j=R),"selectionStart"in h)h.selectionStart=R,h.selectionEnd=Math.min(j,h.value.length);else{var U=h.ownerDocument||document,O=U&&U.defaultView||window;if(O.getSelection){var M=O.getSelection(),Q=h.textContent.length,F=Math.min(b.start,Q),Te=b.end===void 0?F:Math.min(b.end,Q);!M.extend&&F>Te&&(o=Te,Te=F,F=o);var A=wo(h,F),S=wo(h,Te);if(A&&S&&(M.rangeCount!==1||M.anchorNode!==A.node||M.anchorOffset!==A.offset||M.focusNode!==S.node||M.focusOffset!==S.offset)){var C=U.createRange();C.setStart(A.node,A.offset),M.removeAllRanges(),F>Te?(M.addRange(C),M.extend(S.node,S.offset)):(C.setEnd(S.node,S.offset),M.addRange(C))}}}}for(U=[],M=h;M=M.parentNode;)M.nodeType===1&&U.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<U.length;h++){var w=U[h];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}hu=!!Yc,Xc=Yc=null}finally{ye=a,Y.p=l,D.T=n}}e.current=t,Ge=2}}function Pd(){if(Ge===2){Ge=0;var e=zn,t=Hl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=D.T,D.T=null;var l=Y.p;Y.p=2;var a=ye;ye|=4;try{Nd(e,t.alternate,t)}finally{ye=a,Y.p=l,D.T=n}}Ge=3}}function Id(){if(Ge===4||Ge===3){Ge=0,fp();var e=zn,t=Hl,n=sn,l=qd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ge=5:(Ge=0,Hl=zn=null,eh(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(On=null),Ju(n),t=t.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(Fl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,a=Y.p,Y.p=2,D.T=null;try{for(var s=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];s(h.value,{componentStack:h.stack})}}finally{D.T=t,Y.p=a}}(sn&3)!==0&&tu(),kt(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===Rc?ja++:(ja=0,Rc=e):ja=0,Da(0)}}function eh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ha(t)))}function tu(){return Fd(),Pd(),Id(),th()}function th(){if(Ge!==5)return!1;var e=zn,t=Nc;Nc=0;var n=Ju(sn),l=D.T,a=Y.p;try{Y.p=32>n?32:n,D.T=null,n=Cc,Cc=null;var s=zn,o=sn;if(Ge=0,Hl=zn=null,sn=0,(ye&6)!==0)throw Error(r(331));var h=ye;if(ye|=4,Bd(s.current),Dd(s,s.current,o,n),ye=h,Da(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(Fl,s)}catch{}return!0}finally{Y.p=a,D.T=l,eh(e,t)}}function nh(e,t,n){t=_t(n,t),t=uc(e.stateNode,t,2),e=En(e,t,2),e!==null&&(Il(e,2),kt(e))}function be(e,t,n){if(e.tag===3)nh(e,e,n);else for(;t!==null;){if(t.tag===3){nh(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(On===null||!On.has(l))){e=_t(n,e),n=ld(2),l=En(t,n,2),l!==null&&(ad(n,l,t,e),Il(l,2),kt(l));break}}t=t.return}}function Mc(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Ly;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(Ec=!0,a.add(n),e=Xy.bind(null,e,t,n),t.then(e,e))}function Xy(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ne===e&&(ce&n)===n&&(De===4||De===3&&(ce&62914560)===ce&&300>ct()-$i?(ye&2)===0&&ql(e,0):Tc|=n,Ll===ce&&(Ll=0)),kt(e)}function lh(e,t){t===0&&(t=$r()),e=Zn(e,t),e!==null&&(Il(e,t),kt(e))}function Gy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lh(e,n)}function Vy(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),lh(e,n)}function Qy(e,t){return Vu(e,t)}var nu=null,Yl=null,jc=!1,lu=!1,Dc=!1,jn=0;function kt(e){e!==Yl&&e.next===null&&(Yl===null?nu=Yl=e:Yl=Yl.next=e),lu=!0,jc||(jc=!0,Ky())}function Da(e,t){if(!Dc&&lu){Dc=!0;do for(var n=!1,l=nu;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var s=0;else{var o=l.suspendedLanes,h=l.pingedLanes;s=(1<<31-ot(42|e)+1)-1,s&=a&~(o&~h),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,sh(l,s))}else s=ce,s=si(l,l===Ne?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||Pl(l,s)||(n=!0,sh(l,s));l=l.next}while(n);Dc=!1}}function Zy(){ah()}function ah(){lu=jc=!1;var e=0;jn!==0&&l0()&&(e=jn);for(var t=ct(),n=null,l=nu;l!==null;){var a=l.next,s=ih(l,t);s===0?(l.next=null,n===null?nu=a:n.next=a,a===null&&(Yl=n)):(n=l,(e!==0||(s&3)!==0)&&(lu=!0)),l=a}Ge!==0&&Ge!==5||Da(e),jn!==0&&(jn=0)}function ih(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var o=31-ot(s),h=1<<o,b=a[o];b===-1?((h&n)===0||(h&l)!==0)&&(a[o]=bp(h,t)):b<=t&&(e.expiredLanes|=h),s&=~h}if(t=Ne,n=ce,n=si(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(ge===2||ge===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qu(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Pl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Qu(l),Ju(n)){case 2:case 8:n=Kr;break;case 32:n=li;break;case 268435456:n=Jr;break;default:n=li}return l=uh.bind(null,e),n=Vu(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Qu(l),e.callbackPriority=2,e.callbackNode=null,2}function uh(e,t){if(Ge!==0&&Ge!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(tu()&&e.callbackNode!==n)return null;var l=ce;return l=si(e,e===Ne?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Yd(e,l,t),ih(e,ct()),e.callbackNode!=null&&e.callbackNode===n?uh.bind(null,e):null)}function sh(e,t){if(tu())return null;Yd(e,t,!0)}function Ky(){i0(function(){(ye&6)!==0?Vu(Zr,Zy):ah()})}function wc(){if(jn===0){var e=Nl;e===0&&(e=ai,ai<<=1,(ai&261888)===0&&(ai=256)),jn=e}return jn}function ch(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:fi(""+e)}function rh(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Jy(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var s=ch((a[et]||null).action),o=l.submitter;o&&(t=(t=o[et]||null)?ch(t.formAction):o.getAttribute("formAction"),t!==null&&(s=t,o=null));var h=new pi("action","action",null,l,a);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(jn!==0){var b=o?rh(a,o):new FormData(a);ec(n,{pending:!0,data:b,method:a.method,action:s},null,b)}}else typeof s=="function"&&(h.preventDefault(),b=o?rh(a,o):new FormData(a),ec(n,{pending:!0,data:b,method:a.method,action:s},s,b))},currentTarget:a}]})}}for(var Uc=0;Uc<vs.length;Uc++){var Bc=vs[Uc],$y=Bc.toLowerCase(),Wy=Bc[0].toUpperCase()+Bc.slice(1);Mt($y,"on"+Wy)}Mt(qo,"onAnimationEnd"),Mt(ko,"onAnimationIteration"),Mt(Yo,"onAnimationStart"),Mt("dblclick","onDoubleClick"),Mt("focusin","onFocus"),Mt("focusout","onBlur"),Mt(dy,"onTransitionRun"),Mt(hy,"onTransitionStart"),Mt(my,"onTransitionCancel"),Mt(Xo,"onTransitionEnd"),dl("onMouseEnter",["mouseout","mouseover"]),dl("onMouseLeave",["mouseout","mouseover"]),dl("onPointerEnter",["pointerout","pointerover"]),dl("onPointerLeave",["pointerout","pointerover"]),Xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wa="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(" "),Fy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wa));function oh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var s=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],b=h.instance,R=h.currentTarget;if(h=h.listener,b!==s&&a.isPropagationStopped())break e;s=h,a.currentTarget=R;try{s(a)}catch(j){gi(j)}a.currentTarget=null,s=b}else for(o=0;o<l.length;o++){if(h=l[o],b=h.instance,R=h.currentTarget,h=h.listener,b!==s&&a.isPropagationStopped())break e;s=h,a.currentTarget=R;try{s(a)}catch(j){gi(j)}a.currentTarget=null,s=b}}}}function se(e,t){var n=t[$u];n===void 0&&(n=t[$u]=new Set);var l=e+"__bubble";n.has(l)||(fh(t,e,2,!1),n.add(l))}function Lc(e,t,n){var l=0;t&&(l|=4),fh(n,e,l,t)}var au="_reactListening"+Math.random().toString(36).slice(2);function Hc(e){if(!e[au]){e[au]=!0,no.forEach(function(n){n!=="selectionchange"&&(Fy.has(n)||Lc(n,!1,e),Lc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[au]||(t[au]=!0,Lc("selectionchange",!1,t))}}function fh(e,t,n,l){switch(kh(t)){case 2:var a=A0;break;case 8:a=N0;break;default:a=Ic}n=a.bind(null,t,n,e),a=void 0,!as||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function qc(e,t,n,l,a){var s=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===a)break;if(o===4)for(o=l.return;o!==null;){var b=o.tag;if((b===3||b===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;h!==null;){if(o=rl(h),o===null)return;if(b=o.tag,b===5||b===6||b===26||b===27){l=s=o;continue e}h=h.parentNode}}l=l.return}po(function(){var R=s,j=ns(n),U=[];e:{var O=Go.get(e);if(O!==void 0){var M=pi,Q=e;switch(e){case"keypress":if(hi(n)===0)break e;case"keydown":case"keyup":M=Vp;break;case"focusin":Q="focus",M=cs;break;case"focusout":Q="blur",M=cs;break;case"beforeblur":case"afterblur":M=cs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=go;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=jp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Kp;break;case qo:case ko:case Yo:M=Up;break;case Xo:M=$p;break;case"scroll":case"scrollend":M=zp;break;case"wheel":M=Fp;break;case"copy":case"cut":case"paste":M=Lp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=xo;break;case"toggle":case"beforetoggle":M=Ip}var F=(t&4)!==0,Te=!F&&(e==="scroll"||e==="scrollend"),A=F?O!==null?O+"Capture":null:O;F=[];for(var S=R,C;S!==null;){var w=S;if(C=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||C===null||A===null||(w=na(S,A),w!=null&&F.push(Ua(S,w,C))),Te)break;S=S.return}0<F.length&&(O=new M(O,Q,null,n,j),U.push({event:O,listeners:F}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",O&&n!==ts&&(Q=n.relatedTarget||n.fromElement)&&(rl(Q)||Q[cl]))break e;if((M||O)&&(O=j.window===j?j:(O=j.ownerDocument)?O.defaultView||O.parentWindow:window,M?(Q=n.relatedTarget||n.toElement,M=R,Q=Q?rl(Q):null,Q!==null&&(Te=d(Q),F=Q.tag,Q!==Te||F!==5&&F!==27&&F!==6)&&(Q=null)):(M=null,Q=R),M!==Q)){if(F=go,w="onMouseLeave",A="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(F=xo,w="onPointerLeave",A="onPointerEnter",S="pointer"),Te=M==null?O:ta(M),C=Q==null?O:ta(Q),O=new F(w,S+"leave",M,n,j),O.target=Te,O.relatedTarget=C,w=null,rl(j)===R&&(F=new F(A,S+"enter",Q,n,j),F.target=C,F.relatedTarget=Te,w=F),Te=w,M&&Q)t:{for(F=Py,A=M,S=Q,C=0,w=A;w;w=F(w))C++;w=0;for(var $=S;$;$=F($))w++;for(;0<C-w;)A=F(A),C--;for(;0<w-C;)S=F(S),w--;for(;C--;){if(A===S||S!==null&&A===S.alternate){F=A;break t}A=F(A),S=F(S)}F=null}else F=null;M!==null&&dh(U,O,M,F,!1),Q!==null&&Te!==null&&dh(U,Te,Q,F,!0)}}e:{if(O=R?ta(R):window,M=O.nodeName&&O.nodeName.toLowerCase(),M==="select"||M==="input"&&O.type==="file")var me=Ro;else if(No(O))if(Oo)me=ry;else{me=sy;var K=uy}else M=O.nodeName,!M||M.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?R&&es(R.elementType)&&(me=Ro):me=cy;if(me&&(me=me(e,R))){Co(U,me,n,j);break e}K&&K(e,O,R),e==="focusout"&&R&&O.type==="number"&&R.memoizedProps.value!=null&&Iu(O,"number",O.value)}switch(K=R?ta(R):window,e){case"focusin":(No(K)||K.contentEditable==="true")&&(gl=K,ms=R,oa=null);break;case"focusout":oa=ms=gl=null;break;case"mousedown":ps=!0;break;case"contextmenu":case"mouseup":case"dragend":ps=!1,Lo(U,n,j);break;case"selectionchange":if(fy)break;case"keydown":case"keyup":Lo(U,n,j)}var le;if(os)e:{switch(e){case"compositionstart":var re="onCompositionStart";break e;case"compositionend":re="onCompositionEnd";break e;case"compositionupdate":re="onCompositionUpdate";break e}re=void 0}else vl?To(e,n)&&(re="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(re="onCompositionStart");re&&(So&&n.locale!=="ko"&&(vl||re!=="onCompositionStart"?re==="onCompositionEnd"&&vl&&(le=yo()):(yn=j,is="value"in yn?yn.value:yn.textContent,vl=!0)),K=iu(R,re),0<K.length&&(re=new bo(re,e,null,n,j),U.push({event:re,listeners:K}),le?re.data=le:(le=Ao(n),le!==null&&(re.data=le)))),(le=ty?ny(e,n):ly(e,n))&&(re=iu(R,"onBeforeInput"),0<re.length&&(K=new bo("onBeforeInput","beforeinput",null,n,j),U.push({event:K,listeners:re}),K.data=le)),Jy(U,e,R,n,j)}oh(U,t)})}function Ua(e,t,n){return{instance:e,listener:t,currentTarget:n}}function iu(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,s=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||s===null||(a=na(e,n),a!=null&&l.unshift(Ua(e,a,s)),a=na(e,t),a!=null&&l.push(Ua(e,a,s))),e.tag===3)return l;e=e.return}return[]}function Py(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dh(e,t,n,l,a){for(var s=t._reactName,o=[];n!==null&&n!==l;){var h=n,b=h.alternate,R=h.stateNode;if(h=h.tag,b!==null&&b===l)break;h!==5&&h!==26&&h!==27||R===null||(b=R,a?(R=na(n,s),R!=null&&o.unshift(Ua(n,R,b))):a||(R=na(n,s),R!=null&&o.push(Ua(n,R,b)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Iy=/\r\n?/g,e0=/\u0000|\uFFFD/g;function hh(e){return(typeof e=="string"?e:""+e).replace(Iy,`
`).replace(e0,"")}function mh(e,t){return t=hh(t),hh(e)===t}function Ee(e,t,n,l,a,s){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ml(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ml(e,""+l);break;case"className":ri(e,"class",l);break;case"tabIndex":ri(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ri(e,n,l);break;case"style":ho(e,l,s);break;case"data":if(t!=="object"){ri(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=fi(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(n==="formAction"?(t!=="input"&&Ee(e,t,"name",a.name,a,null),Ee(e,t,"formEncType",a.formEncType,a,null),Ee(e,t,"formMethod",a.formMethod,a,null),Ee(e,t,"formTarget",a.formTarget,a,null)):(Ee(e,t,"encType",a.encType,a,null),Ee(e,t,"method",a.method,a,null),Ee(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=fi(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Qt);break;case"onScroll":l!=null&&se("scroll",e);break;case"onScrollEnd":l!=null&&se("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=fi(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":se("beforetoggle",e),se("toggle",e),ci(e,"popover",l);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ci(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Rp.get(n)||n,ci(e,n,l))}}function kc(e,t,n,l,a,s){switch(n){case"style":ho(e,l,s);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof l=="string"?ml(e,l):(typeof l=="number"||typeof l=="bigint")&&ml(e,""+l);break;case"onScroll":l!=null&&se("scroll",e);break;case"onScrollEnd":l!=null&&se("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lo.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),s=e[et]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,a),typeof l=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):ci(e,n,l)}}}function We(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":se("error",e),se("load",e);var l=!1,a=!1,s;for(s in n)if(n.hasOwnProperty(s)){var o=n[s];if(o!=null)switch(s){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ee(e,t,s,o,n,null)}}a&&Ee(e,t,"srcSet",n.srcSet,n,null),l&&Ee(e,t,"src",n.src,n,null);return;case"input":se("invalid",e);var h=s=o=a=null,b=null,R=null;for(l in n)if(n.hasOwnProperty(l)){var j=n[l];if(j!=null)switch(l){case"name":a=j;break;case"type":o=j;break;case"checked":b=j;break;case"defaultChecked":R=j;break;case"value":s=j;break;case"defaultValue":h=j;break;case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(137,t));break;default:Ee(e,t,l,j,n,null)}}co(e,s,h,b,R,o,a,!1);return;case"select":se("invalid",e),l=o=s=null;for(a in n)if(n.hasOwnProperty(a)&&(h=n[a],h!=null))switch(a){case"value":s=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:Ee(e,t,a,h,n,null)}t=s,n=o,e.multiple=!!l,t!=null?hl(e,!!l,t,!1):n!=null&&hl(e,!!l,n,!0);return;case"textarea":se("invalid",e),s=a=l=null;for(o in n)if(n.hasOwnProperty(o)&&(h=n[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":a=h;break;case"children":s=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:Ee(e,t,o,h,n,null)}oo(e,l,a,s);return;case"option":for(b in n)if(n.hasOwnProperty(b)&&(l=n[b],l!=null))switch(b){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ee(e,t,b,l,n,null)}return;case"dialog":se("beforetoggle",e),se("toggle",e),se("cancel",e),se("close",e);break;case"iframe":case"object":se("load",e);break;case"video":case"audio":for(l=0;l<wa.length;l++)se(wa[l],e);break;case"image":se("error",e),se("load",e);break;case"details":se("toggle",e);break;case"embed":case"source":case"link":se("error",e),se("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in n)if(n.hasOwnProperty(R)&&(l=n[R],l!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ee(e,t,R,l,n,null)}return;default:if(es(t)){for(j in n)n.hasOwnProperty(j)&&(l=n[j],l!==void 0&&kc(e,t,j,l,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(l=n[h],l!=null&&Ee(e,t,h,l,n,null))}function t0(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,s=null,o=null,h=null,b=null,R=null,j=null;for(M in n){var U=n[M];if(n.hasOwnProperty(M)&&U!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":b=U;default:l.hasOwnProperty(M)||Ee(e,t,M,null,l,U)}}for(var O in l){var M=l[O];if(U=n[O],l.hasOwnProperty(O)&&(M!=null||U!=null))switch(O){case"type":s=M;break;case"name":a=M;break;case"checked":R=M;break;case"defaultChecked":j=M;break;case"value":o=M;break;case"defaultValue":h=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:M!==U&&Ee(e,t,O,M,l,U)}}Pu(e,o,h,b,R,j,s,a);return;case"select":M=o=h=O=null;for(s in n)if(b=n[s],n.hasOwnProperty(s)&&b!=null)switch(s){case"value":break;case"multiple":M=b;default:l.hasOwnProperty(s)||Ee(e,t,s,null,l,b)}for(a in l)if(s=l[a],b=n[a],l.hasOwnProperty(a)&&(s!=null||b!=null))switch(a){case"value":O=s;break;case"defaultValue":h=s;break;case"multiple":o=s;default:s!==b&&Ee(e,t,a,s,l,b)}t=h,n=o,l=M,O!=null?hl(e,!!n,O,!1):!!l!=!!n&&(t!=null?hl(e,!!n,t,!0):hl(e,!!n,n?[]:"",!1));return;case"textarea":M=O=null;for(h in n)if(a=n[h],n.hasOwnProperty(h)&&a!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Ee(e,t,h,null,l,a)}for(o in l)if(a=l[o],s=n[o],l.hasOwnProperty(o)&&(a!=null||s!=null))switch(o){case"value":O=a;break;case"defaultValue":M=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(r(91));break;default:a!==s&&Ee(e,t,o,a,l,s)}ro(e,O,M);return;case"option":for(var Q in n)if(O=n[Q],n.hasOwnProperty(Q)&&O!=null&&!l.hasOwnProperty(Q))switch(Q){case"selected":e.selected=!1;break;default:Ee(e,t,Q,null,l,O)}for(b in l)if(O=l[b],M=n[b],l.hasOwnProperty(b)&&O!==M&&(O!=null||M!=null))switch(b){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:Ee(e,t,b,O,l,M)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var F in n)O=n[F],n.hasOwnProperty(F)&&O!=null&&!l.hasOwnProperty(F)&&Ee(e,t,F,null,l,O);for(R in l)if(O=l[R],M=n[R],l.hasOwnProperty(R)&&O!==M&&(O!=null||M!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:Ee(e,t,R,O,l,M)}return;default:if(es(t)){for(var Te in n)O=n[Te],n.hasOwnProperty(Te)&&O!==void 0&&!l.hasOwnProperty(Te)&&kc(e,t,Te,void 0,l,O);for(j in l)O=l[j],M=n[j],!l.hasOwnProperty(j)||O===M||O===void 0&&M===void 0||kc(e,t,j,O,l,M);return}}for(var A in n)O=n[A],n.hasOwnProperty(A)&&O!=null&&!l.hasOwnProperty(A)&&Ee(e,t,A,null,l,O);for(U in l)O=l[U],M=n[U],!l.hasOwnProperty(U)||O===M||O==null&&M==null||Ee(e,t,U,O,l,M)}function ph(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function n0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],s=a.transferSize,o=a.initiatorType,h=a.duration;if(s&&h&&ph(o)){for(o=0,h=a.responseEnd,l+=1;l<n.length;l++){var b=n[l],R=b.startTime;if(R>h)break;var j=b.transferSize,U=b.initiatorType;j&&ph(U)&&(b=b.responseEnd,o+=j*(b<h?1:(h-R)/(b-R)))}if(--l,t+=8*(s+o)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Yc=null,Xc=null;function uu(e){return e.nodeType===9?e:e.ownerDocument}function yh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Gc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vc=null;function l0(){var e=window.event;return e&&e.type==="popstate"?e===Vc?!1:(Vc=e,!0):(Vc=null,!1)}var gh=typeof setTimeout=="function"?setTimeout:void 0,a0=typeof clearTimeout=="function"?clearTimeout:void 0,bh=typeof Promise=="function"?Promise:void 0,i0=typeof queueMicrotask=="function"?queueMicrotask:typeof bh<"u"?function(e){return bh.resolve(null).then(e).catch(u0)}:gh;function u0(e){setTimeout(function(){throw e})}function Dn(e){return e==="head"}function xh(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),Ql(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Ba(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ba(n);for(var s=n.firstChild;s;){var o=s.nextSibling,h=s.nodeName;s[ea]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=o}}else n==="body"&&Ba(e.ownerDocument.body);n=a}while(n);Ql(t)}function Sh(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Qc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Qc(n),Wu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function s0(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ea])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Ct(e.nextSibling),e===null)break}return null}function c0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ct(e.nextSibling),e===null))return null;return e}function _h(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ct(e.nextSibling),e===null))return null;return e}function Zc(e){return e.data==="$?"||e.data==="$~"}function Kc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function r0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ct(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Jc=null;function Eh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Ct(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Th(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Ah(e,t,n){switch(t=uu(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Ba(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Wu(e)}var Rt=new Map,Nh=new Set;function su(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cn=Y.d;Y.d={f:o0,r:f0,D:d0,C:h0,L:m0,m:p0,X:v0,S:y0,M:g0};function o0(){var e=cn.f(),t=Pi();return e||t}function f0(e){var t=ol(e);t!==null&&t.tag===5&&t.type==="form"?Gf(t):cn.r(e)}var Xl=typeof document>"u"?null:document;function Ch(e,t,n){var l=Xl;if(l&&typeof t=="string"&&t){var a=xt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Nh.has(a)||(Nh.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),We(t,"link",e),Ve(t),l.head.appendChild(t)))}}function d0(e){cn.D(e),Ch("dns-prefetch",e,null)}function h0(e,t){cn.C(e,t),Ch("preconnect",e,t)}function m0(e,t,n){cn.L(e,t,n);var l=Xl;if(l&&e&&t){var a='link[rel="preload"][as="'+xt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+xt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+xt(n.imageSizes)+'"]')):a+='[href="'+xt(e)+'"]';var s=a;switch(t){case"style":s=Gl(e);break;case"script":s=Vl(e)}Rt.has(s)||(e=g({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Rt.set(s,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(La(s))||t==="script"&&l.querySelector(Ha(s))||(t=l.createElement("link"),We(t,"link",e),Ve(t),l.head.appendChild(t)))}}function p0(e,t){cn.m(e,t);var n=Xl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+xt(l)+'"][href="'+xt(e)+'"]',s=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Vl(e)}if(!Rt.has(s)&&(e=g({rel:"modulepreload",href:e},t),Rt.set(s,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ha(s)))return}l=n.createElement("link"),We(l,"link",e),Ve(l),n.head.appendChild(l)}}}function y0(e,t,n){cn.S(e,t,n);var l=Xl;if(l&&e){var a=fl(l).hoistableStyles,s=Gl(e);t=t||"default";var o=a.get(s);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(La(s)))h.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Rt.get(s))&&$c(e,n);var b=o=l.createElement("link");Ve(b),We(b,"link",e),b._p=new Promise(function(R,j){b.onload=R,b.onerror=j}),b.addEventListener("load",function(){h.loading|=1}),b.addEventListener("error",function(){h.loading|=2}),h.loading|=4,cu(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},a.set(s,o)}}}function v0(e,t){cn.X(e,t);var n=Xl;if(n&&e){var l=fl(n).hoistableScripts,a=Vl(e),s=l.get(a);s||(s=n.querySelector(Ha(a)),s||(e=g({src:e,async:!0},t),(t=Rt.get(a))&&Wc(e,t),s=n.createElement("script"),Ve(s),We(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function g0(e,t){cn.M(e,t);var n=Xl;if(n&&e){var l=fl(n).hoistableScripts,a=Vl(e),s=l.get(a);s||(s=n.querySelector(Ha(a)),s||(e=g({src:e,async:!0,type:"module"},t),(t=Rt.get(a))&&Wc(e,t),s=n.createElement("script"),Ve(s),We(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function Rh(e,t,n,l){var a=(a=ie.current)?su(a):null;if(!a)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Gl(n.href),n=fl(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Gl(n.href);var s=fl(a).hoistableStyles,o=s.get(e);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,o),(s=a.querySelector(La(e)))&&!s._p&&(o.instance=s,o.state.loading=5),Rt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Rt.set(e,n),s||b0(a,e,n,o.state))),t&&l===null)throw Error(r(528,""));return o}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Vl(n),n=fl(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Gl(e){return'href="'+xt(e)+'"'}function La(e){return'link[rel="stylesheet"]['+e+"]"}function Oh(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function b0(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),We(t,"link",n),Ve(t),e.head.appendChild(t))}function Vl(e){return'[src="'+xt(e)+'"]'}function Ha(e){return"script[async]"+e}function zh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+xt(n.href)+'"]');if(l)return t.instance=l,Ve(l),l;var a=g({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ve(l),We(l,"style",a),cu(l,n.precedence,e),t.instance=l;case"stylesheet":a=Gl(n.href);var s=e.querySelector(La(a));if(s)return t.state.loading|=4,t.instance=s,Ve(s),s;l=Oh(n),(a=Rt.get(a))&&$c(l,a),s=(e.ownerDocument||e).createElement("link"),Ve(s);var o=s;return o._p=new Promise(function(h,b){o.onload=h,o.onerror=b}),We(s,"link",l),t.state.loading|=4,cu(s,n.precedence,e),t.instance=s;case"script":return s=Vl(n.src),(a=e.querySelector(Ha(s)))?(t.instance=a,Ve(a),a):(l=n,(a=Rt.get(s))&&(l=g({},n),Wc(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ve(a),We(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,cu(l,n.precedence,e));return t.instance}function cu(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,s=a,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)s=h;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function $c(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ru=null;function Mh(e,t,n){if(ru===null){var l=new Map,a=ru=new Map;a.set(n,l)}else a=ru,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var s=n[a];if(!(s[ea]||s[Ze]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var o=s.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(s):l.set(o,[s])}}return l}function jh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function x0(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Dh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function S0(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Gl(l.href),s=t.querySelector(La(a));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ou.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Ve(s);return}s=t.ownerDocument||t,l=Oh(l),(a=Rt.get(a))&&$c(l,a),s=s.createElement("link"),Ve(s);var o=s;o._p=new Promise(function(h,b){o.onload=h,o.onerror=b}),We(s,"link",l),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ou.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Fc=0;function _0(e,t){return e.stylesheets&&e.count===0&&du(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&du(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Fc===0&&(Fc=62500*n0());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&du(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Fc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function ou(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)du(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var fu=null;function du(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fu=new Map,t.forEach(E0,e),fu=null,ou.call(e))}function E0(e,t){if(!(t.state.loading&4)){var n=fu.get(e);if(n)var l=n.get(null);else{n=new Map,fu.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var o=a[s];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),l=o)}l&&n.set(null,l)}a=t.instance,o=a.getAttribute("data-precedence"),s=n.get(o)||l,s===l&&n.set(null,a),n.set(o,a),this.count++,l=ou.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),s?s.parentNode.insertBefore(a,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var qa={$$typeof:G,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function T0(e,t,n,l,a,s,o,h,b){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Zu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zu(0),this.hiddenUpdates=Zu(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function wh(e,t,n,l,a,s,o,h,b,R,j,U){return e=new T0(e,t,n,o,b,R,j,U,h),t=1,s===!0&&(t|=24),s=dt(3,null,null,t),e.current=s,s.stateNode=e,t=zs(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:n,cache:t},ws(s),e}function Uh(e){return e?(e=Sl,e):Sl}function Bh(e,t,n,l,a,s){a=Uh(a),l.context===null?l.context=a:l.pendingContext=a,l=_n(t),l.payload={element:n},s=s===void 0?null:s,s!==null&&(l.callback=s),n=En(e,l,t),n!==null&&(ut(n,e,t),va(n,e,t))}function Lh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Pc(e,t){Lh(e,t),(e=e.alternate)&&Lh(e,t)}function Hh(e){if(e.tag===13||e.tag===31){var t=Zn(e,67108864);t!==null&&ut(t,e,67108864),Pc(e,67108864)}}function qh(e){if(e.tag===13||e.tag===31){var t=vt();t=Ku(t);var n=Zn(e,t);n!==null&&ut(n,e,t),Pc(e,t)}}var hu=!0;function A0(e,t,n,l){var a=D.T;D.T=null;var s=Y.p;try{Y.p=2,Ic(e,t,n,l)}finally{Y.p=s,D.T=a}}function N0(e,t,n,l){var a=D.T;D.T=null;var s=Y.p;try{Y.p=8,Ic(e,t,n,l)}finally{Y.p=s,D.T=a}}function Ic(e,t,n,l){if(hu){var a=er(l);if(a===null)qc(e,t,l,mu,n),Yh(e,l);else if(R0(a,e,t,n,l))l.stopPropagation();else if(Yh(e,l),t&4&&-1<C0.indexOf(e)){for(;a!==null;){var s=ol(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var o=Yn(s.pendingLanes);if(o!==0){var h=s;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var b=1<<31-ot(o);h.entanglements[1]|=b,o&=~b}kt(s),(ye&6)===0&&(Wi=ct()+500,Da(0))}}break;case 31:case 13:h=Zn(s,2),h!==null&&ut(h,s,2),Pi(),Pc(s,2)}if(s=er(l),s===null&&qc(e,t,l,mu,n),s===a)break;a=s}a!==null&&l.stopPropagation()}else qc(e,t,l,null,n)}}function er(e){return e=ns(e),tr(e)}var mu=null;function tr(e){if(mu=null,e=rl(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=p(t),e!==null)return e;e=null}else if(n===31){if(e=x(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 mu=e,null}function kh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(dp()){case Zr:return 2;case Kr:return 8;case li:case hp:return 32;case Jr:return 268435456;default:return 32}default:return 32}}var nr=!1,wn=null,Un=null,Bn=null,ka=new Map,Ya=new Map,Ln=[],C0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Yh(e,t){switch(e){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":Un=null;break;case"mouseover":case"mouseout":Bn=null;break;case"pointerover":case"pointerout":ka.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ya.delete(t.pointerId)}}function Xa(e,t,n,l,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:s,targetContainers:[a]},t!==null&&(t=ol(t),t!==null&&Hh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function R0(e,t,n,l,a){switch(t){case"focusin":return wn=Xa(wn,e,t,n,l,a),!0;case"dragenter":return Un=Xa(Un,e,t,n,l,a),!0;case"mouseover":return Bn=Xa(Bn,e,t,n,l,a),!0;case"pointerover":var s=a.pointerId;return ka.set(s,Xa(ka.get(s)||null,e,t,n,l,a)),!0;case"gotpointercapture":return s=a.pointerId,Ya.set(s,Xa(Ya.get(s)||null,e,t,n,l,a)),!0}return!1}function Xh(e){var t=rl(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=p(n),t!==null){e.blockedOn=t,eo(e.priority,function(){qh(n)});return}}else if(t===31){if(t=x(n),t!==null){e.blockedOn=t,eo(e.priority,function(){qh(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 pu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=er(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);ts=l,n.target.dispatchEvent(l),ts=null}else return t=ol(n),t!==null&&Hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Gh(e,t,n){pu(e)&&n.delete(t)}function O0(){nr=!1,wn!==null&&pu(wn)&&(wn=null),Un!==null&&pu(Un)&&(Un=null),Bn!==null&&pu(Bn)&&(Bn=null),ka.forEach(Gh),Ya.forEach(Gh)}function yu(e,t){e.blockedOn===t&&(e.blockedOn=null,nr||(nr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,O0)))}var vu=null;function Vh(e){vu!==e&&(vu=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){vu===e&&(vu=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(tr(l||n)===null)continue;break}var s=ol(n);s!==null&&(e.splice(t,3),t-=3,ec(s,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Ql(e){function t(b){return yu(b,e)}wn!==null&&yu(wn,e),Un!==null&&yu(Un,e),Bn!==null&&yu(Bn,e),ka.forEach(t),Ya.forEach(t);for(var n=0;n<Ln.length;n++){var l=Ln[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ln.length&&(n=Ln[0],n.blockedOn===null);)Xh(n),n.blockedOn===null&&Ln.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],s=n[l+1],o=a[et]||null;if(typeof s=="function")o||Vh(n);else if(o){var h=null;if(s&&s.hasAttribute("formAction")){if(a=s,o=s[et]||null)h=o.formAction;else if(tr(a)!==null)continue}else h=o.action;typeof h=="function"?n[l+1]=h:(n.splice(l,3),l-=3),Vh(n)}}}function Qh(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function lr(e){this._internalRoot=e}gu.prototype.render=lr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=vt();Bh(n,l,e,t,null,null)},gu.prototype.unmount=lr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bh(e.current,2,null,e,null,null),Pi(),t[cl]=null}};function gu(e){this._internalRoot=e}gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ir();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ln.length&&t!==0&&t<Ln[n].priority;n++);Ln.splice(n,0,e),n===0&&Xh(e)}};var Zh=i.version;if(Zh!=="19.2.0")throw Error(r(527,Zh,"19.2.0"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=y(t),e=e!==null?T(e):null,e=e===null?null:e.stateNode,e};var z0={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bu.isDisabled&&bu.supportsFiber)try{Fl=bu.inject(z0),rt=bu}catch{}}return Va.createRoot=function(e,t){if(!f(e))throw Error(r(299));var n=!1,l="",a=If,s=ed,o=td;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=wh(e,1,!1,null,null,n,l,null,a,s,o,Qh),e[cl]=t.current,Hc(e),new lr(t)},Va.hydrateRoot=function(e,t,n){if(!f(e))throw Error(r(299));var l=!1,a="",s=If,o=ed,h=td,b=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(h=n.onRecoverableError),n.formState!==void 0&&(b=n.formState)),t=wh(e,1,!0,t,n??null,l,a,b,s,o,h,Qh),t.context=Uh(null),n=t.current,l=vt(),l=Ku(l),a=_n(l),a.callback=null,En(n,a,l),n=l,t.current.lanes=n,Il(t,n),kt(t),e[cl]=t.current,Hc(e),new gu(t)},Va.version="19.2.0",Va}var nm;function k0(){if(nm)return ur.exports;nm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),ur.exports=q0(),ur.exports}var Y0=k0();var lm="popstate";function X0(u={}){function i(r,f){let{pathname:d,search:p,hash:x}=r.location;return vr("",{pathname:d,search:p,hash:x},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function c(r,f){return typeof f=="string"?f:Wa(f)}return V0(i,c,null,u)}function Me(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function Ut(u,i){if(!u){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function G0(){return Math.random().toString(36).substring(2,10)}function am(u,i){return{usr:u.state,key:u.key,idx:i}}function vr(u,i,c=null,r){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof i=="string"?Kl(i):i,state:c,key:i&&i.key||r||G0()}}function Wa({pathname:u="/",search:i="",hash:c=""}){return i&&i!=="?"&&(u+=i.charAt(0)==="?"?i:"?"+i),c&&c!=="#"&&(u+=c.charAt(0)==="#"?c:"#"+c),u}function Kl(u){let i={};if(u){let c=u.indexOf("#");c>=0&&(i.hash=u.substring(c),u=u.substring(0,c));let r=u.indexOf("?");r>=0&&(i.search=u.substring(r),u=u.substring(0,r)),u&&(i.pathname=u)}return i}function V0(u,i,c,r={}){let{window:f=document.defaultView,v5Compat:d=!1}=r,p=f.history,x="POP",v=null,y=T();y==null&&(y=0,p.replaceState({...p.state,idx:y},""));function T(){return(p.state||{idx:null}).idx}function g(){x="POP";let H=T(),q=H==null?null:H-y;y=H,v&&v({action:x,location:k.location,delta:q})}function N(H,q){x="PUSH";let V=vr(k.location,H,q);y=T()+1;let G=am(V,y),ae=k.createHref(V);try{p.pushState(G,"",ae)}catch(xe){if(xe instanceof DOMException&&xe.name==="DataCloneError")throw xe;f.location.assign(ae)}d&&v&&v({action:x,location:k.location,delta:1})}function z(H,q){x="REPLACE";let V=vr(k.location,H,q);y=T();let G=am(V,y),ae=k.createHref(V);p.replaceState(G,"",ae),d&&v&&v({action:x,location:k.location,delta:0})}function L(H){return Q0(H)}let k={get action(){return x},get location(){return u(f,p)},listen(H){if(v)throw new Error("A history only accepts one active listener");return f.addEventListener(lm,g),v=H,()=>{f.removeEventListener(lm,g),v=null}},createHref(H){return i(f,H)},createURL:L,encodeLocation(H){let q=L(H);return{pathname:q.pathname,search:q.search,hash:q.hash}},push:N,replace:z,go(H){return p.go(H)}};return k}function Q0(u,i=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Me(c,"No window.location.(origin|href) available to create URL");let r=typeof u=="string"?u:Wa(u);return r=r.replace(/ $/,"%20"),!i&&r.startsWith("//")&&(r=c+r),new URL(r,c)}function Em(u,i,c="/"){return Z0(u,i,c,!1)}function Z0(u,i,c,r){let f=typeof i=="string"?Kl(i):i,d=dn(f.pathname||"/",c);if(d==null)return null;let p=Tm(u);K0(p);let x=null;for(let v=0;x==null&&v<p.length;++v){let y=av(d);x=nv(p[v],y,r)}return x}function Tm(u,i=[],c=[],r="",f=!1){let d=(p,x,v=f,y)=>{let T={relativePath:y===void 0?p.path||"":y,caseSensitive:p.caseSensitive===!0,childrenIndex:x,route:p};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(r)&&v)return;Me(T.relativePath.startsWith(r),`Absolute route path "${T.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(r.length)}let g=fn([r,T.relativePath]),N=c.concat(T);p.children&&p.children.length>0&&(Me(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Tm(p.children,i,N,g,v)),!(p.path==null&&!p.index)&&i.push({path:g,score:ev(g,p.index),routesMeta:N})};return u.forEach((p,x)=>{if(p.path===""||!p.path?.includes("?"))d(p,x);else for(let v of Am(p.path))d(p,x,!0,v)}),i}function Am(u){let i=u.split("/");if(i.length===0)return[];let[c,...r]=i,f=c.endsWith("?"),d=c.replace(/\?$/,"");if(r.length===0)return f?[d,""]:[d];let p=Am(r.join("/")),x=[];return x.push(...p.map(v=>v===""?d:[d,v].join("/"))),f&&x.push(...p),x.map(v=>u.startsWith("/")&&v===""?"/":v)}function K0(u){u.sort((i,c)=>i.score!==c.score?c.score-i.score:tv(i.routesMeta.map(r=>r.childrenIndex),c.routesMeta.map(r=>r.childrenIndex)))}var J0=/^:[\w-]+$/,$0=3,W0=2,F0=1,P0=10,I0=-2,im=u=>u==="*";function ev(u,i){let c=u.split("/"),r=c.length;return c.some(im)&&(r+=I0),i&&(r+=W0),c.filter(f=>!im(f)).reduce((f,d)=>f+(J0.test(d)?$0:d===""?F0:P0),r)}function tv(u,i){return u.length===i.length&&u.slice(0,-1).every((r,f)=>r===i[f])?u[u.length-1]-i[i.length-1]:0}function nv(u,i,c=!1){let{routesMeta:r}=u,f={},d="/",p=[];for(let x=0;x<r.length;++x){let v=r[x],y=x===r.length-1,T=d==="/"?i:i.slice(d.length)||"/",g=ju({path:v.relativePath,caseSensitive:v.caseSensitive,end:y},T),N=v.route;if(!g&&y&&c&&!r[r.length-1].route.index&&(g=ju({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},T)),!g)return null;Object.assign(f,g.params),p.push({params:f,pathname:fn([d,g.pathname]),pathnameBase:rv(fn([d,g.pathnameBase])),route:N}),g.pathnameBase!=="/"&&(d=fn([d,g.pathnameBase]))}return p}function ju(u,i){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[c,r]=lv(u.path,u.caseSensitive,u.end),f=i.match(c);if(!f)return null;let d=f[0],p=d.replace(/(.)\/+$/,"$1"),x=f.slice(1);return{params:r.reduce((y,{paramName:T,isOptional:g},N)=>{if(T==="*"){let L=x[N]||"";p=d.slice(0,d.length-L.length).replace(/(.)\/+$/,"$1")}const z=x[N];return g&&!z?y[T]=void 0:y[T]=(z||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:p,pattern:u}}function lv(u,i=!1,c=!0){Ut(u==="*"||!u.endsWith("*")||u.endsWith("/*"),`Route path "${u}" will be treated as if it were "${u.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${u.replace(/\*$/,"/*")}".`);let r=[],f="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,x,v)=>(r.push({paramName:x,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(r.push({paramName:"*"}),f+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?f+="\\/*$":u!==""&&u!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,i?void 0:"i"),r]}function av(u){try{return u.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Ut(!1,`The URL path "${u}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),u}}function dn(u,i){if(i==="/")return u;if(!u.toLowerCase().startsWith(i.toLowerCase()))return null;let c=i.endsWith("/")?i.length-1:i.length,r=u.charAt(c);return r&&r!=="/"?null:u.slice(c)||"/"}var iv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uv=u=>iv.test(u);function sv(u,i="/"){let{pathname:c,search:r="",hash:f=""}=typeof u=="string"?Kl(u):u,d;if(c)if(uv(c))d=c;else{if(c.includes("//")){let p=c;c=c.replace(/\/\/+/g,"/"),Ut(!1,`Pathnames cannot have embedded double slashes - normalizing ${p} -> ${c}`)}c.startsWith("/")?d=um(c.substring(1),"/"):d=um(c,i)}else d=i;return{pathname:d,search:ov(r),hash:fv(f)}}function um(u,i){let c=i.replace(/\/+$/,"").split("/");return u.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function or(u,i,c,r){return`Cannot include a '${u}' character in a manually specified \`to.${i}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function cv(u){return u.filter((i,c)=>c===0||i.route.path&&i.route.path.length>0)}function Nm(u){let i=cv(u);return i.map((c,r)=>r===i.length-1?c.pathname:c.pathnameBase)}function Cm(u,i,c,r=!1){let f;typeof u=="string"?f=Kl(u):(f={...u},Me(!f.pathname||!f.pathname.includes("?"),or("?","pathname","search",f)),Me(!f.pathname||!f.pathname.includes("#"),or("#","pathname","hash",f)),Me(!f.search||!f.search.includes("#"),or("#","search","hash",f)));let d=u===""||f.pathname==="",p=d?"/":f.pathname,x;if(p==null)x=c;else{let g=i.length-1;if(!r&&p.startsWith("..")){let N=p.split("/");for(;N[0]==="..";)N.shift(),g-=1;f.pathname=N.join("/")}x=g>=0?i[g]:"/"}let v=sv(f,x),y=p&&p!=="/"&&p.endsWith("/"),T=(d||p===".")&&c.endsWith("/");return!v.pathname.endsWith("/")&&(y||T)&&(v.pathname+="/"),v}var fn=u=>u.join("/").replace(/\/\/+/g,"/"),rv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),ov=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,fv=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u;function dv(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Rm=["POST","PUT","PATCH","DELETE"];new Set(Rm);var hv=["GET",...Rm];new Set(hv);var Jl=_.createContext(null);Jl.displayName="DataRouter";var wu=_.createContext(null);wu.displayName="DataRouterState";_.createContext(!1);var Om=_.createContext({isTransitioning:!1});Om.displayName="ViewTransition";var mv=_.createContext(new Map);mv.displayName="Fetchers";var pv=_.createContext(null);pv.displayName="Await";var Gt=_.createContext(null);Gt.displayName="Navigation";var Fa=_.createContext(null);Fa.displayName="Location";var hn=_.createContext({outlet:null,matches:[],isDataRoute:!1});hn.displayName="Route";var Nr=_.createContext(null);Nr.displayName="RouteError";function yv(u,{relative:i}={}){Me(Pa(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:r}=_.useContext(Gt),{hash:f,pathname:d,search:p}=Ia(u,{relative:i}),x=d;return c!=="/"&&(x=d==="/"?c:fn([c,d])),r.createHref({pathname:x,search:p,hash:f})}function Pa(){return _.useContext(Fa)!=null}function sl(){return Me(Pa(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(Fa).location}var zm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Mm(u){_.useContext(Gt).static||_.useLayoutEffect(u)}function vv(){let{isDataRoute:u}=_.useContext(hn);return u?zv():gv()}function gv(){Me(Pa(),"useNavigate() may be used only in the context of a <Router> component.");let u=_.useContext(Jl),{basename:i,navigator:c}=_.useContext(Gt),{matches:r}=_.useContext(hn),{pathname:f}=sl(),d=JSON.stringify(Nm(r)),p=_.useRef(!1);return Mm(()=>{p.current=!0}),_.useCallback((v,y={})=>{if(Ut(p.current,zm),!p.current)return;if(typeof v=="number"){c.go(v);return}let T=Cm(v,JSON.parse(d),f,y.relative==="path");u==null&&i!=="/"&&(T.pathname=T.pathname==="/"?i:fn([i,T.pathname])),(y.replace?c.replace:c.push)(T,y.state,y)},[i,c,d,f,u])}_.createContext(null);function Ia(u,{relative:i}={}){let{matches:c}=_.useContext(hn),{pathname:r}=sl(),f=JSON.stringify(Nm(c));return _.useMemo(()=>Cm(u,JSON.parse(f),r,i==="path"),[u,f,r,i])}function bv(u,i){return jm(u,i)}function jm(u,i,c,r,f){Me(Pa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=_.useContext(Gt),{matches:p}=_.useContext(hn),x=p[p.length-1],v=x?x.params:{},y=x?x.pathname:"/",T=x?x.pathnameBase:"/",g=x&&x.route;{let V=g&&g.path||"";Dm(y,!g||V.endsWith("*")||V.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${V}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${V}"> to <Route path="${V==="/"?"*":`${V}/*`}">.`)}let N=sl(),z;if(i){let V=typeof i=="string"?Kl(i):i;Me(T==="/"||V.pathname?.startsWith(T),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${T}" but pathname "${V.pathname}" was given in the \`location\` prop.`),z=V}else z=N;let L=z.pathname||"/",k=L;if(T!=="/"){let V=T.replace(/^\//,"").split("/");k="/"+L.replace(/^\//,"").split("/").slice(V.length).join("/")}let H=Em(u,{pathname:k});Ut(g||H!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),Ut(H==null||H[H.length-1].route.element!==void 0||H[H.length-1].route.Component!==void 0||H[H.length-1].route.lazy!==void 0,`Matched leaf route at location "${z.pathname}${z.search}${z.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let q=Tv(H&&H.map(V=>Object.assign({},V,{params:Object.assign({},v,V.params),pathname:fn([T,d.encodeLocation?d.encodeLocation(V.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:V.pathname]),pathnameBase:V.pathnameBase==="/"?T:fn([T,d.encodeLocation?d.encodeLocation(V.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:V.pathnameBase])})),p,c,r,f);return i&&q?_.createElement(Fa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},q):q}function xv(){let u=Ov(),i=dv(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),c=u instanceof Error?u.stack:null,r="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:r},d={padding:"2px 4px",backgroundColor:r},p=null;return console.error("Error handled by React Router default ErrorBoundary:",u),p=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:d},"ErrorBoundary")," or"," ",_.createElement("code",{style:d},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},i),c?_.createElement("pre",{style:f},c):null,p)}var Sv=_.createElement(xv,null),_v=class extends _.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,i){return i.location!==u.location||i.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:i.error,location:i.location,revalidation:u.revalidation||i.revalidation}}componentDidCatch(u,i){this.props.onError?this.props.onError(u,i):console.error("React Router caught the following error during render",u)}render(){return this.state.error!==void 0?_.createElement(hn.Provider,{value:this.props.routeContext},_.createElement(Nr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Ev({routeContext:u,match:i,children:c}){let r=_.useContext(Jl);return r&&r.static&&r.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=i.route.id),_.createElement(hn.Provider,{value:u},c)}function Tv(u,i=[],c=null,r=null,f=null){if(u==null){if(!c)return null;if(c.errors)u=c.matches;else if(i.length===0&&!c.initialized&&c.matches.length>0)u=c.matches;else return null}let d=u,p=c?.errors;if(p!=null){let T=d.findIndex(g=>g.route.id&&p?.[g.route.id]!==void 0);Me(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(p).join(",")}`),d=d.slice(0,Math.min(d.length,T+1))}let x=!1,v=-1;if(c)for(let T=0;T<d.length;T++){let g=d[T];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(v=T),g.route.id){let{loaderData:N,errors:z}=c,L=g.route.loader&&!N.hasOwnProperty(g.route.id)&&(!z||z[g.route.id]===void 0);if(g.route.lazy||L){x=!0,v>=0?d=d.slice(0,v+1):d=[d[0]];break}}}let y=c&&r?(T,g)=>{r(T,{location:c.location,params:c.matches?.[0]?.params??{},errorInfo:g})}:void 0;return d.reduceRight((T,g,N)=>{let z,L=!1,k=null,H=null;c&&(z=p&&g.route.id?p[g.route.id]:void 0,k=g.route.errorElement||Sv,x&&(v<0&&N===0?(Dm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,H=null):v===N&&(L=!0,H=g.route.hydrateFallbackElement||null)));let q=i.concat(d.slice(0,N+1)),V=()=>{let G;return z?G=k:L?G=H:g.route.Component?G=_.createElement(g.route.Component,null):g.route.element?G=g.route.element:G=T,_.createElement(Ev,{match:g,routeContext:{outlet:T,matches:q,isDataRoute:c!=null},children:G})};return c&&(g.route.ErrorBoundary||g.route.errorElement||N===0)?_.createElement(_v,{location:c.location,revalidation:c.revalidation,component:k,error:z,children:V(),routeContext:{outlet:null,matches:q,isDataRoute:!0},onError:y}):V()},null)}function Cr(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Av(u){let i=_.useContext(Jl);return Me(i,Cr(u)),i}function Nv(u){let i=_.useContext(wu);return Me(i,Cr(u)),i}function Cv(u){let i=_.useContext(hn);return Me(i,Cr(u)),i}function Rr(u){let i=Cv(u),c=i.matches[i.matches.length-1];return Me(c.route.id,`${u} can only be used on routes that contain a unique "id"`),c.route.id}function Rv(){return Rr("useRouteId")}function Ov(){let u=_.useContext(Nr),i=Nv("useRouteError"),c=Rr("useRouteError");return u!==void 0?u:i.errors?.[c]}function zv(){let{router:u}=Av("useNavigate"),i=Rr("useNavigate"),c=_.useRef(!1);return Mm(()=>{c.current=!0}),_.useCallback(async(f,d={})=>{Ut(c.current,zm),c.current&&(typeof f=="number"?u.navigate(f):await u.navigate(f,{fromRouteId:i,...d}))},[u,i])}var sm={};function Dm(u,i,c){!i&&!sm[u]&&(sm[u]=!0,Ut(!1,c))}_.memo(Mv);function Mv({routes:u,future:i,state:c,unstable_onError:r}){return jm(u,void 0,c,r,i)}function gr(u){Me(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function jv({basename:u="/",children:i=null,location:c,navigationType:r="POP",navigator:f,static:d=!1}){Me(!Pa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=u.replace(/^\/*/,"/"),x=_.useMemo(()=>({basename:p,navigator:f,static:d,future:{}}),[p,f,d]);typeof c=="string"&&(c=Kl(c));let{pathname:v="/",search:y="",hash:T="",state:g=null,key:N="default"}=c,z=_.useMemo(()=>{let L=dn(v,p);return L==null?null:{location:{pathname:L,search:y,hash:T,state:g,key:N},navigationType:r}},[p,v,y,T,g,N,r]);return Ut(z!=null,`<Router basename="${p}"> is not able to match the URL "${v}${y}${T}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:_.createElement(Gt.Provider,{value:x},_.createElement(Fa.Provider,{children:i,value:z}))}function Dv({children:u,location:i}){return bv(br(u),i)}function br(u,i=[]){let c=[];return _.Children.forEach(u,(r,f)=>{if(!_.isValidElement(r))return;let d=[...i,f];if(r.type===_.Fragment){c.push.apply(c,br(r.props.children,d));return}Me(r.type===gr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Me(!r.props.index||!r.props.children,"An index route cannot have child routes.");let p={id:r.props.id||d.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(p.children=br(r.props.children,d)),c.push(p)}),c}var Nu="get",Cu="application/x-www-form-urlencoded";function Uu(u){return u!=null&&typeof u.tagName=="string"}function wv(u){return Uu(u)&&u.tagName.toLowerCase()==="button"}function Uv(u){return Uu(u)&&u.tagName.toLowerCase()==="form"}function Bv(u){return Uu(u)&&u.tagName.toLowerCase()==="input"}function Lv(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Hv(u,i){return u.button===0&&(!i||i==="_self")&&!Lv(u)}var xu=null;function qv(){if(xu===null)try{new FormData(document.createElement("form"),0),xu=!1}catch{xu=!0}return xu}var kv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fr(u){return u!=null&&!kv.has(u)?(Ut(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Cu}"`),null):u}function Yv(u,i){let c,r,f,d,p;if(Uv(u)){let x=u.getAttribute("action");r=x?dn(x,i):null,c=u.getAttribute("method")||Nu,f=fr(u.getAttribute("enctype"))||Cu,d=new FormData(u)}else if(wv(u)||Bv(u)&&(u.type==="submit"||u.type==="image")){let x=u.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=u.getAttribute("formaction")||x.getAttribute("action");if(r=v?dn(v,i):null,c=u.getAttribute("formmethod")||x.getAttribute("method")||Nu,f=fr(u.getAttribute("formenctype"))||fr(x.getAttribute("enctype"))||Cu,d=new FormData(x,u),!qv()){let{name:y,type:T,value:g}=u;if(T==="image"){let N=y?`${y}.`:"";d.append(`${N}x`,"0"),d.append(`${N}y`,"0")}else y&&d.append(y,g)}}else{if(Uu(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=Nu,r=null,f=Cu,p=u}return d&&f==="text/plain"&&(p=d,d=void 0),{action:r,method:c.toLowerCase(),encType:f,formData:d,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Or(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function Xv(u,i,c){let r=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return r.pathname==="/"?r.pathname=`_root.${c}`:i&&dn(r.pathname,i)==="/"?r.pathname=`${i.replace(/\/$/,"")}/_root.${c}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${c}`,r}async function Gv(u,i){if(u.id in i)return i[u.id];try{let c=await import(u.module);return i[u.id]=c,c}catch(c){return console.error(`Error loading route module \`${u.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Vv(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Qv(u,i,c){let r=await Promise.all(u.map(async f=>{let d=i.routes[f.route.id];if(d){let p=await Gv(d,c);return p.links?p.links():[]}return[]}));return $v(r.flat(1).filter(Vv).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function cm(u,i,c,r,f,d){let p=(v,y)=>c[y]?v.route.id!==c[y].route.id:!0,x=(v,y)=>c[y].pathname!==v.pathname||c[y].route.path?.endsWith("*")&&c[y].params["*"]!==v.params["*"];return d==="assets"?i.filter((v,y)=>p(v,y)||x(v,y)):d==="data"?i.filter((v,y)=>{let T=r.routes[v.route.id];if(!T||!T.hasLoader)return!1;if(p(v,y)||x(v,y))return!0;if(v.route.shouldRevalidate){let g=v.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:c[0]?.params||{},nextUrl:new URL(u,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function Zv(u,i,{includeHydrateFallback:c}={}){return Kv(u.map(r=>{let f=i.routes[r.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function Kv(u){return[...new Set(u)]}function Jv(u){let i={},c=Object.keys(u).sort();for(let r of c)i[r]=u[r];return i}function $v(u,i){let c=new Set;return new Set(i),u.reduce((r,f)=>{let d=JSON.stringify(Jv(f));return c.has(d)||(c.add(d),r.push({key:d,link:f})),r},[])}function wm(){let u=_.useContext(Jl);return Or(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function Wv(){let u=_.useContext(wu);return Or(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var zr=_.createContext(void 0);zr.displayName="FrameworkContext";function Um(){let u=_.useContext(zr);return Or(u,"You must render this element inside a <HydratedRouter> element"),u}function Fv(u,i){let c=_.useContext(zr),[r,f]=_.useState(!1),[d,p]=_.useState(!1),{onFocus:x,onBlur:v,onMouseEnter:y,onMouseLeave:T,onTouchStart:g}=i,N=_.useRef(null);_.useEffect(()=>{if(u==="render"&&p(!0),u==="viewport"){let k=q=>{q.forEach(V=>{p(V.isIntersecting)})},H=new IntersectionObserver(k,{threshold:.5});return N.current&&H.observe(N.current),()=>{H.disconnect()}}},[u]),_.useEffect(()=>{if(r){let k=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(k)}}},[r]);let z=()=>{f(!0)},L=()=>{f(!1),p(!1)};return c?u!=="intent"?[d,N,{}]:[d,N,{onFocus:Qa(x,z),onBlur:Qa(v,L),onMouseEnter:Qa(y,z),onMouseLeave:Qa(T,L),onTouchStart:Qa(g,z)}]:[!1,N,{}]}function Qa(u,i){return c=>{u&&u(c),c.defaultPrevented||i(c)}}function Pv({page:u,...i}){let{router:c}=wm(),r=_.useMemo(()=>Em(c.routes,u,c.basename),[c.routes,u,c.basename]);return r?_.createElement(eg,{page:u,matches:r,...i}):null}function Iv(u){let{manifest:i,routeModules:c}=Um(),[r,f]=_.useState([]);return _.useEffect(()=>{let d=!1;return Qv(u,i,c).then(p=>{d||f(p)}),()=>{d=!0}},[u,i,c]),r}function eg({page:u,matches:i,...c}){let r=sl(),{manifest:f,routeModules:d}=Um(),{basename:p}=wm(),{loaderData:x,matches:v}=Wv(),y=_.useMemo(()=>cm(u,i,v,f,r,"data"),[u,i,v,f,r]),T=_.useMemo(()=>cm(u,i,v,f,r,"assets"),[u,i,v,f,r]),g=_.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let L=new Set,k=!1;if(i.forEach(q=>{let V=f.routes[q.route.id];!V||!V.hasLoader||(!y.some(G=>G.route.id===q.route.id)&&q.route.id in x&&d[q.route.id]?.shouldRevalidate||V.hasClientLoader?k=!0:L.add(q.route.id))}),L.size===0)return[];let H=Xv(u,p,"data");return k&&L.size>0&&H.searchParams.set("_routes",i.filter(q=>L.has(q.route.id)).map(q=>q.route.id).join(",")),[H.pathname+H.search]},[p,x,r,f,y,i,u,d]),N=_.useMemo(()=>Zv(T,f),[T,f]),z=Iv(T);return _.createElement(_.Fragment,null,g.map(L=>_.createElement("link",{key:L,rel:"prefetch",as:"fetch",href:L,...c})),N.map(L=>_.createElement("link",{key:L,rel:"modulepreload",href:L,...c})),z.map(({key:L,link:k})=>_.createElement("link",{key:L,nonce:c.nonce,...k})))}function tg(...u){return i=>{u.forEach(c=>{typeof c=="function"?c(i):c!=null&&(c.current=i)})}}var Bm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bm&&(window.__reactRouterVersion="7.9.6")}catch{}function ng({basename:u,children:i,window:c}){let r=_.useRef();r.current==null&&(r.current=X0({window:c,v5Compat:!0}));let f=r.current,[d,p]=_.useState({action:f.action,location:f.location}),x=_.useCallback(v=>{_.startTransition(()=>p(v))},[p]);return _.useLayoutEffect(()=>f.listen(x),[f,x]),_.createElement(jv,{basename:u,children:i,location:d.location,navigationType:d.action,navigator:f})}var Lm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hm=_.forwardRef(function({onClick:i,discover:c="render",prefetch:r="none",relative:f,reloadDocument:d,replace:p,state:x,target:v,to:y,preventScrollReset:T,viewTransition:g,...N},z){let{basename:L}=_.useContext(Gt),k=typeof y=="string"&&Lm.test(y),H,q=!1;if(typeof y=="string"&&k&&(H=y,Bm))try{let P=new URL(window.location.href),oe=y.startsWith("//")?new URL(P.protocol+y):new URL(y),fe=dn(oe.pathname,L);oe.origin===P.origin&&fe!=null?y=fe+oe.search+oe.hash:q=!0}catch{Ut(!1,`<Link to="${y}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let V=yv(y,{relative:f}),[G,ae,xe]=Fv(r,N),Ce=ug(y,{replace:p,state:x,target:v,preventScrollReset:T,relative:f,viewTransition:g});function W(P){i&&i(P),P.defaultPrevented||Ce(P)}let J=_.createElement("a",{...N,...xe,href:H||V,onClick:q||d?i:W,ref:tg(z,ae),target:v,"data-discover":!k&&c==="render"?"true":void 0});return G&&!k?_.createElement(_.Fragment,null,J,_.createElement(Pv,{page:V})):J});Hm.displayName="Link";var lg=_.forwardRef(function({"aria-current":i="page",caseSensitive:c=!1,className:r="",end:f=!1,style:d,to:p,viewTransition:x,children:v,...y},T){let g=Ia(p,{relative:y.relative}),N=sl(),z=_.useContext(wu),{navigator:L,basename:k}=_.useContext(Gt),H=z!=null&&fg(g)&&x===!0,q=L.encodeLocation?L.encodeLocation(g).pathname:g.pathname,V=N.pathname,G=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;c||(V=V.toLowerCase(),G=G?G.toLowerCase():null,q=q.toLowerCase()),G&&k&&(G=dn(G,k)||G);const ae=q!=="/"&&q.endsWith("/")?q.length-1:q.length;let xe=V===q||!f&&V.startsWith(q)&&V.charAt(ae)==="/",Ce=G!=null&&(G===q||!f&&G.startsWith(q)&&G.charAt(q.length)==="/"),W={isActive:xe,isPending:Ce,isTransitioning:H},J=xe?i:void 0,P;typeof r=="function"?P=r(W):P=[r,xe?"active":null,Ce?"pending":null,H?"transitioning":null].filter(Boolean).join(" ");let oe=typeof d=="function"?d(W):d;return _.createElement(Hm,{...y,"aria-current":J,className:P,ref:T,style:oe,to:p,viewTransition:x},typeof v=="function"?v(W):v)});lg.displayName="NavLink";var ag=_.forwardRef(({discover:u="render",fetcherKey:i,navigate:c,reloadDocument:r,replace:f,state:d,method:p=Nu,action:x,onSubmit:v,relative:y,preventScrollReset:T,viewTransition:g,...N},z)=>{let L=rg(),k=og(x,{relative:y}),H=p.toLowerCase()==="get"?"get":"post",q=typeof x=="string"&&Lm.test(x),V=G=>{if(v&&v(G),G.defaultPrevented)return;G.preventDefault();let ae=G.nativeEvent.submitter,xe=ae?.getAttribute("formmethod")||p;L(ae||G.currentTarget,{fetcherKey:i,method:xe,navigate:c,replace:f,state:d,relative:y,preventScrollReset:T,viewTransition:g})};return _.createElement("form",{ref:z,method:H,action:k,onSubmit:r?v:V,...N,"data-discover":!q&&u==="render"?"true":void 0})});ag.displayName="Form";function ig(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qm(u){let i=_.useContext(Jl);return Me(i,ig(u)),i}function ug(u,{target:i,replace:c,state:r,preventScrollReset:f,relative:d,viewTransition:p}={}){let x=vv(),v=sl(),y=Ia(u,{relative:d});return _.useCallback(T=>{if(Hv(T,i)){T.preventDefault();let g=c!==void 0?c:Wa(v)===Wa(y);x(u,{replace:g,state:r,preventScrollReset:f,relative:d,viewTransition:p})}},[v,x,y,c,r,i,u,f,d,p])}var sg=0,cg=()=>`__${String(++sg)}__`;function rg(){let{router:u}=qm("useSubmit"),{basename:i}=_.useContext(Gt),c=Rv();return _.useCallback(async(r,f={})=>{let{action:d,method:p,encType:x,formData:v,body:y}=Yv(r,i);if(f.navigate===!1){let T=f.fetcherKey||cg();await u.fetch(T,c,f.action||d,{preventScrollReset:f.preventScrollReset,formData:v,body:y,formMethod:f.method||p,formEncType:f.encType||x,flushSync:f.flushSync})}else await u.navigate(f.action||d,{preventScrollReset:f.preventScrollReset,formData:v,body:y,formMethod:f.method||p,formEncType:f.encType||x,replace:f.replace,state:f.state,fromRouteId:c,flushSync:f.flushSync,viewTransition:f.viewTransition})},[u,i,c])}function og(u,{relative:i}={}){let{basename:c}=_.useContext(Gt),r=_.useContext(hn);Me(r,"useFormAction must be used inside a RouteContext");let[f]=r.matches.slice(-1),d={...Ia(u||".",{relative:i})},p=sl();if(u==null){d.search=p.search;let x=new URLSearchParams(d.search),v=x.getAll("index");if(v.some(T=>T==="")){x.delete("index"),v.filter(g=>g).forEach(g=>x.append("index",g));let T=x.toString();d.search=T?`?${T}`:""}}return(!u||u===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(d.pathname=d.pathname==="/"?c:fn([c,d.pathname])),Wa(d)}function fg(u,{relative:i}={}){let c=_.useContext(Om);Me(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=qm("useViewTransitionState"),f=Ia(u,{relative:i});if(!c.isTransitioning)return!1;let d=dn(c.currentLocation.pathname,r)||c.currentLocation.pathname,p=dn(c.nextLocation.pathname,r)||c.nextLocation.pathname;return ju(f.pathname,p)!=null||ju(f.pathname,d)!=null}const Xt=Object.create(null);Xt.open="0";Xt.close="1";Xt.ping="2";Xt.pong="3";Xt.message="4";Xt.upgrade="5";Xt.noop="6";const Ru=Object.create(null);Object.keys(Xt).forEach(u=>{Ru[Xt[u]]=u});const xr={type:"error",data:"parser error"},km=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ym=typeof ArrayBuffer=="function",Xm=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer,Mr=({type:u,data:i},c,r)=>km&&i instanceof Blob?c?r(i):rm(i,r):Ym&&(i instanceof ArrayBuffer||Xm(i))?c?r(i):rm(new Blob([i]),r):r(Xt[u]+(i||"")),rm=(u,i)=>{const c=new FileReader;return c.onload=function(){const r=c.result.split(",")[1];i("b"+(r||""))},c.readAsDataURL(u)};function om(u){return u instanceof Uint8Array?u:u instanceof ArrayBuffer?new Uint8Array(u):new Uint8Array(u.buffer,u.byteOffset,u.byteLength)}let dr;function dg(u,i){if(km&&u.data instanceof Blob)return u.data.arrayBuffer().then(om).then(i);if(Ym&&(u.data instanceof ArrayBuffer||Xm(u.data)))return i(om(u.data));Mr(u,!1,c=>{dr||(dr=new TextEncoder),i(dr.encode(c))})}const fm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$a=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let u=0;u<fm.length;u++)$a[fm.charCodeAt(u)]=u;const hg=u=>{let i=u.length*.75,c=u.length,r,f=0,d,p,x,v;u[u.length-1]==="="&&(i--,u[u.length-2]==="="&&i--);const y=new ArrayBuffer(i),T=new Uint8Array(y);for(r=0;r<c;r+=4)d=$a[u.charCodeAt(r)],p=$a[u.charCodeAt(r+1)],x=$a[u.charCodeAt(r+2)],v=$a[u.charCodeAt(r+3)],T[f++]=d<<2|p>>4,T[f++]=(p&15)<<4|x>>2,T[f++]=(x&3)<<6|v&63;return y},mg=typeof ArrayBuffer=="function",jr=(u,i)=>{if(typeof u!="string")return{type:"message",data:Gm(u,i)};const c=u.charAt(0);return c==="b"?{type:"message",data:pg(u.substring(1),i)}:Ru[c]?u.length>1?{type:Ru[c],data:u.substring(1)}:{type:Ru[c]}:xr},pg=(u,i)=>{if(mg){const c=hg(u);return Gm(c,i)}else return{base64:!0,data:u}},Gm=(u,i)=>{switch(i){case"blob":return u instanceof Blob?u:new Blob([u]);case"arraybuffer":default:return u instanceof ArrayBuffer?u:u.buffer}},Vm="",yg=(u,i)=>{const c=u.length,r=new Array(c);let f=0;u.forEach((d,p)=>{Mr(d,!1,x=>{r[p]=x,++f===c&&i(r.join(Vm))})})},vg=(u,i)=>{const c=u.split(Vm),r=[];for(let f=0;f<c.length;f++){const d=jr(c[f],i);if(r.push(d),d.type==="error")break}return r};function gg(){return new TransformStream({transform(u,i){dg(u,c=>{const r=c.length;let f;if(r<126)f=new Uint8Array(1),new DataView(f.buffer).setUint8(0,r);else if(r<65536){f=new Uint8Array(3);const d=new DataView(f.buffer);d.setUint8(0,126),d.setUint16(1,r)}else{f=new Uint8Array(9);const d=new DataView(f.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(r))}u.data&&typeof u.data!="string"&&(f[0]|=128),i.enqueue(f),i.enqueue(c)})}})}let hr;function Su(u){return u.reduce((i,c)=>i+c.length,0)}function _u(u,i){if(u[0].length===i)return u.shift();const c=new Uint8Array(i);let r=0;for(let f=0;f<i;f++)c[f]=u[0][r++],r===u[0].length&&(u.shift(),r=0);return u.length&&r<u[0].length&&(u[0]=u[0].slice(r)),c}function bg(u,i){hr||(hr=new TextDecoder);const c=[];let r=0,f=-1,d=!1;return new TransformStream({transform(p,x){for(c.push(p);;){if(r===0){if(Su(c)<1)break;const v=_u(c,1);d=(v[0]&128)===128,f=v[0]&127,f<126?r=3:f===126?r=1:r=2}else if(r===1){if(Su(c)<2)break;const v=_u(c,2);f=new DataView(v.buffer,v.byteOffset,v.length).getUint16(0),r=3}else if(r===2){if(Su(c)<8)break;const v=_u(c,8),y=new DataView(v.buffer,v.byteOffset,v.length),T=y.getUint32(0);if(T>Math.pow(2,21)-1){x.enqueue(xr);break}f=T*Math.pow(2,32)+y.getUint32(4),r=3}else{if(Su(c)<f)break;const v=_u(c,f);x.enqueue(jr(d?v:hr.decode(v),i)),r=0}if(f===0||f>u){x.enqueue(xr);break}}}})}const Qm=4;function Xe(u){if(u)return xg(u)}function xg(u){for(var i in Xe.prototype)u[i]=Xe.prototype[i];return u}Xe.prototype.on=Xe.prototype.addEventListener=function(u,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+u]=this._callbacks["$"+u]||[]).push(i),this};Xe.prototype.once=function(u,i){function c(){this.off(u,c),i.apply(this,arguments)}return c.fn=i,this.on(u,c),this};Xe.prototype.off=Xe.prototype.removeListener=Xe.prototype.removeAllListeners=Xe.prototype.removeEventListener=function(u,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var c=this._callbacks["$"+u];if(!c)return this;if(arguments.length==1)return delete this._callbacks["$"+u],this;for(var r,f=0;f<c.length;f++)if(r=c[f],r===i||r.fn===i){c.splice(f,1);break}return c.length===0&&delete this._callbacks["$"+u],this};Xe.prototype.emit=function(u){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),c=this._callbacks["$"+u],r=1;r<arguments.length;r++)i[r-1]=arguments[r];if(c){c=c.slice(0);for(var r=0,f=c.length;r<f;++r)c[r].apply(this,i)}return this};Xe.prototype.emitReserved=Xe.prototype.emit;Xe.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks["$"+u]||[]};Xe.prototype.hasListeners=function(u){return!!this.listeners(u).length};const Bu=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,c)=>c(i,0),Ot=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Sg="arraybuffer";function Zm(u,...i){return i.reduce((c,r)=>(u.hasOwnProperty(r)&&(c[r]=u[r]),c),{})}const _g=Ot.setTimeout,Eg=Ot.clearTimeout;function Lu(u,i){i.useNativeTimers?(u.setTimeoutFn=_g.bind(Ot),u.clearTimeoutFn=Eg.bind(Ot)):(u.setTimeoutFn=Ot.setTimeout.bind(Ot),u.clearTimeoutFn=Ot.clearTimeout.bind(Ot))}const Tg=1.33;function Ag(u){return typeof u=="string"?Ng(u):Math.ceil((u.byteLength||u.size)*Tg)}function Ng(u){let i=0,c=0;for(let r=0,f=u.length;r<f;r++)i=u.charCodeAt(r),i<128?c+=1:i<2048?c+=2:i<55296||i>=57344?c+=3:(r++,c+=4);return c}function Km(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Cg(u){let i="";for(let c in u)u.hasOwnProperty(c)&&(i.length&&(i+="&"),i+=encodeURIComponent(c)+"="+encodeURIComponent(u[c]));return i}function Rg(u){let i={},c=u.split("&");for(let r=0,f=c.length;r<f;r++){let d=c[r].split("=");i[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return i}class Og extends Error{constructor(i,c,r){super(i),this.description=c,this.context=r,this.type="TransportError"}}class Dr extends Xe{constructor(i){super(),this.writable=!1,Lu(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,c,r){return super.emitReserved("error",new Og(i,c,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const c=jr(i,this.socket.binaryType);this.onPacket(c)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,c={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(c)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const c=Cg(i);return c.length?"?"+c:""}}class zg extends Dr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const c=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||c()})),this.writable||(r++,this.once("drain",function(){--r||c()}))}else c()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const c=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};vg(i,this.socket.binaryType).forEach(c),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,yg(i,c=>{this.doWrite(c,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",c=this.query||{};return this.opts.timestampRequests!==!1&&(c[this.opts.timestampParam]=Km()),!this.supportsBinary&&!c.sid&&(c.b64=1),this.createUri(i,c)}}let Jm=!1;try{Jm=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Mg=Jm;function jg(){}class Dg extends zg{constructor(i){if(super(i),typeof location<"u"){const c=location.protocol==="https:";let r=location.port;r||(r=c?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||r!==i.port}}doWrite(i,c){const r=this.request({method:"POST",data:i});r.on("success",c),r.on("error",(f,d)=>{this.onError("xhr post error",f,d)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(c,r)=>{this.onError("xhr poll error",c,r)}),this.pollXhr=i}}class Yt extends Xe{constructor(i,c,r){super(),this.createRequest=i,Lu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=c,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var i;const c=Zm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");c.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(c);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let f in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(f)&&r.setRequestHeader(f,this._opts.extraHeaders[f])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var f;r.readyState===3&&((f=this._opts.cookieJar)===null||f===void 0||f.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(f){this.setTimeoutFn(()=>{this._onError(f)},0);return}typeof document<"u"&&(this._index=Yt.requestsCount++,Yt.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=jg,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Yt.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Yt.requestsCount=0;Yt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",dm);else if(typeof addEventListener=="function"){const u="onpagehide"in Ot?"pagehide":"unload";addEventListener(u,dm,!1)}}function dm(){for(let u in Yt.requests)Yt.requests.hasOwnProperty(u)&&Yt.requests[u].abort()}const wg=(function(){const u=$m({xdomain:!1});return u&&u.responseType!==null})();class Ug extends Dg{constructor(i){super(i);const c=i&&i.forceBase64;this.supportsBinary=wg&&!c}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Yt($m,this.uri(),i)}}function $m(u){const i=u.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||Mg))return new XMLHttpRequest}catch{}if(!i)try{return new Ot[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Wm=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Bg extends Dr{get name(){return"websocket"}doOpen(){const i=this.uri(),c=this.opts.protocols,r=Wm?{}:Zm(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,c,r)}catch(f){return this.emitReserved("error",f)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let c=0;c<i.length;c++){const r=i[c],f=c===i.length-1;Mr(r,this.supportsBinary,d=>{try{this.doWrite(r,d)}catch{}f&&Bu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",c=this.query||{};return this.opts.timestampRequests&&(c[this.opts.timestampParam]=Km()),this.supportsBinary||(c.b64=1),this.createUri(i,c)}}const mr=Ot.WebSocket||Ot.MozWebSocket;class Lg extends Bg{createSocket(i,c,r){return Wm?new mr(i,c,r):c?new mr(i,c):new mr(i)}doWrite(i,c){this.ws.send(c)}}class Hg extends Dr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const c=bg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=i.readable.pipeThrough(c).getReader(),f=gg();f.readable.pipeTo(i.writable),this._writer=f.writable.getWriter();const d=()=>{r.read().then(({done:x,value:v})=>{x||(this.onPacket(v),d())}).catch(x=>{})};d();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let c=0;c<i.length;c++){const r=i[c],f=c===i.length-1;this._writer.write(r).then(()=>{f&&Bu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const qg={websocket:Lg,webtransport:Hg,polling:Ug},kg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sr(u){if(u.length>8e3)throw"URI too long";const i=u,c=u.indexOf("["),r=u.indexOf("]");c!=-1&&r!=-1&&(u=u.substring(0,c)+u.substring(c,r).replace(/:/g,";")+u.substring(r,u.length));let f=kg.exec(u||""),d={},p=14;for(;p--;)d[Yg[p]]=f[p]||"";return c!=-1&&r!=-1&&(d.source=i,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=Xg(d,d.path),d.queryKey=Gg(d,d.query),d}function Xg(u,i){const c=/\/{2,9}/g,r=i.replace(c,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&r.splice(0,1),i.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Gg(u,i){const c={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,f,d){f&&(c[f]=d)}),c}const _r=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ou=[];_r&&addEventListener("offline",()=>{Ou.forEach(u=>u())},!1);class qn extends Xe{constructor(i,c){if(super(),this.binaryType=Sg,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(c=i,i=null),i){const r=Sr(i);c.hostname=r.host,c.secure=r.protocol==="https"||r.protocol==="wss",c.port=r.port,r.query&&(c.query=r.query)}else c.host&&(c.hostname=Sr(c.host).host);Lu(this,c),this.secure=c.secure!=null?c.secure:typeof location<"u"&&location.protocol==="https:",c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.hostname=c.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=c.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},c.transports.forEach(r=>{const f=r.prototype.name;this.transports.push(f),this._transportsByName[f]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},c),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Rg(this.opts.query)),_r&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ou.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const c=Object.assign({},this.opts.query);c.EIO=Qm,c.transport=i,this.id&&(c.sid=this.id);const r=Object.assign({},this.opts,{query:c,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&qn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const c=this.createTransport(i);c.open(),this.setTransport(c)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",c=>this._onClose("transport close",c))}onOpen(){this.readyState="open",qn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const c=new Error("server error");c.code=i.data,this._onError(c);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let c=1;for(let r=0;r<this.writeBuffer.length;r++){const f=this.writeBuffer[r].data;if(f&&(c+=Ag(f)),r>0&&c>this._maxPayload)return this.writeBuffer.slice(0,r);c+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,Bu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,c,r){return this._sendPacket("message",i,c,r),this}send(i,c,r){return this._sendPacket("message",i,c,r),this}_sendPacket(i,c,r,f){if(typeof c=="function"&&(f=c,c=void 0),typeof r=="function"&&(f=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const d={type:i,data:c,options:r};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),f&&this.once("flush",f),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},c=()=>{this.off("upgrade",c),this.off("upgradeError",c),i()},r=()=>{this.once("upgrade",c),this.once("upgradeError",c)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():i()}):this.upgrading?r():i()),this}_onError(i){if(qn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,c){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),_r&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ou.indexOf(this._offlineEventListener);r!==-1&&Ou.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,c),this.writeBuffer=[],this._prevBufferLen=0}}}qn.protocol=Qm;class Vg extends qn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let c=this.createTransport(i),r=!1;qn.priorWebsocketSuccess=!1;const f=()=>{r||(c.send([{type:"ping",data:"probe"}]),c.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",c),!c)return;qn.priorWebsocketSuccess=c.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(T(),this.setTransport(c),c.send([{type:"upgrade"}]),this.emitReserved("upgrade",c),c=null,this.upgrading=!1,this.flush())})}else{const N=new Error("probe error");N.transport=c.name,this.emitReserved("upgradeError",N)}}))};function d(){r||(r=!0,T(),c.close(),c=null)}const p=g=>{const N=new Error("probe error: "+g);N.transport=c.name,d(),this.emitReserved("upgradeError",N)};function x(){p("transport closed")}function v(){p("socket closed")}function y(g){c&&g.name!==c.name&&d()}const T=()=>{c.removeListener("open",f),c.removeListener("error",p),c.removeListener("close",x),this.off("close",v),this.off("upgrading",y)};c.once("open",f),c.once("error",p),c.once("close",x),this.once("close",v),this.once("upgrading",y),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{r||c.open()},200):c.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const c=[];for(let r=0;r<i.length;r++)~this.transports.indexOf(i[r])&&c.push(i[r]);return c}}let Qg=class extends Vg{constructor(i,c={}){const r=typeof i=="object"?i:c;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(f=>qg[f]).filter(f=>!!f)),super(i,r)}};function Zg(u,i="",c){let r=u;c=c||typeof location<"u"&&location,u==null&&(u=c.protocol+"//"+c.host),typeof u=="string"&&(u.charAt(0)==="/"&&(u.charAt(1)==="/"?u=c.protocol+u:u=c.host+u),/^(https?|wss?):\/\//.test(u)||(typeof c<"u"?u=c.protocol+"//"+u:u="https://"+u),r=Sr(u)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const d=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+d+":"+r.port+i,r.href=r.protocol+"://"+d+(c&&c.port===r.port?"":":"+r.port),r}const Kg=typeof ArrayBuffer=="function",Jg=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u.buffer instanceof ArrayBuffer,Fm=Object.prototype.toString,$g=typeof Blob=="function"||typeof Blob<"u"&&Fm.call(Blob)==="[object BlobConstructor]",Wg=typeof File=="function"||typeof File<"u"&&Fm.call(File)==="[object FileConstructor]";function wr(u){return Kg&&(u instanceof ArrayBuffer||Jg(u))||$g&&u instanceof Blob||Wg&&u instanceof File}function zu(u,i){if(!u||typeof u!="object")return!1;if(Array.isArray(u)){for(let c=0,r=u.length;c<r;c++)if(zu(u[c]))return!0;return!1}if(wr(u))return!0;if(u.toJSON&&typeof u.toJSON=="function"&&arguments.length===1)return zu(u.toJSON(),!0);for(const c in u)if(Object.prototype.hasOwnProperty.call(u,c)&&zu(u[c]))return!0;return!1}function Fg(u){const i=[],c=u.data,r=u;return r.data=Er(c,i),r.attachments=i.length,{packet:r,buffers:i}}function Er(u,i){if(!u)return u;if(wr(u)){const c={_placeholder:!0,num:i.length};return i.push(u),c}else if(Array.isArray(u)){const c=new Array(u.length);for(let r=0;r<u.length;r++)c[r]=Er(u[r],i);return c}else if(typeof u=="object"&&!(u instanceof Date)){const c={};for(const r in u)Object.prototype.hasOwnProperty.call(u,r)&&(c[r]=Er(u[r],i));return c}return u}function Pg(u,i){return u.data=Tr(u.data,i),delete u.attachments,u}function Tr(u,i){if(!u)return u;if(u&&u._placeholder===!0){if(typeof u.num=="number"&&u.num>=0&&u.num<i.length)return i[u.num];throw new Error("illegal attachments")}else if(Array.isArray(u))for(let c=0;c<u.length;c++)u[c]=Tr(u[c],i);else if(typeof u=="object")for(const c in u)Object.prototype.hasOwnProperty.call(u,c)&&(u[c]=Tr(u[c],i));return u}const Ig=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],eb=5;var he;(function(u){u[u.CONNECT=0]="CONNECT",u[u.DISCONNECT=1]="DISCONNECT",u[u.EVENT=2]="EVENT",u[u.ACK=3]="ACK",u[u.CONNECT_ERROR=4]="CONNECT_ERROR",u[u.BINARY_EVENT=5]="BINARY_EVENT",u[u.BINARY_ACK=6]="BINARY_ACK"})(he||(he={}));class tb{constructor(i){this.replacer=i}encode(i){return(i.type===he.EVENT||i.type===he.ACK)&&zu(i)?this.encodeAsBinary({type:i.type===he.EVENT?he.BINARY_EVENT:he.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let c=""+i.type;return(i.type===he.BINARY_EVENT||i.type===he.BINARY_ACK)&&(c+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(c+=i.nsp+","),i.id!=null&&(c+=i.id),i.data!=null&&(c+=JSON.stringify(i.data,this.replacer)),c}encodeAsBinary(i){const c=Fg(i),r=this.encodeAsString(c.packet),f=c.buffers;return f.unshift(r),f}}function hm(u){return Object.prototype.toString.call(u)==="[object Object]"}class Ur extends Xe{constructor(i){super(),this.reviver=i}add(i){let c;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");c=this.decodeString(i);const r=c.type===he.BINARY_EVENT;r||c.type===he.BINARY_ACK?(c.type=r?he.EVENT:he.ACK,this.reconstructor=new nb(c),c.attachments===0&&super.emitReserved("decoded",c)):super.emitReserved("decoded",c)}else if(wr(i)||i.base64)if(this.reconstructor)c=this.reconstructor.takeBinaryData(i),c&&(this.reconstructor=null,super.emitReserved("decoded",c));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let c=0;const r={type:Number(i.charAt(0))};if(he[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===he.BINARY_EVENT||r.type===he.BINARY_ACK){const d=c+1;for(;i.charAt(++c)!=="-"&&c!=i.length;);const p=i.substring(d,c);if(p!=Number(p)||i.charAt(c)!=="-")throw new Error("Illegal attachments");r.attachments=Number(p)}if(i.charAt(c+1)==="/"){const d=c+1;for(;++c&&!(i.charAt(c)===","||c===i.length););r.nsp=i.substring(d,c)}else r.nsp="/";const f=i.charAt(c+1);if(f!==""&&Number(f)==f){const d=c+1;for(;++c;){const p=i.charAt(c);if(p==null||Number(p)!=p){--c;break}if(c===i.length)break}r.id=Number(i.substring(d,c+1))}if(i.charAt(++c)){const d=this.tryParse(i.substr(c));if(Ur.isPayloadValid(r.type,d))r.data=d;else throw new Error("invalid payload")}return r}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,c){switch(i){case he.CONNECT:return hm(c);case he.DISCONNECT:return c===void 0;case he.CONNECT_ERROR:return typeof c=="string"||hm(c);case he.EVENT:case he.BINARY_EVENT:return Array.isArray(c)&&(typeof c[0]=="number"||typeof c[0]=="string"&&Ig.indexOf(c[0])===-1);case he.ACK:case he.BINARY_ACK:return Array.isArray(c)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class nb{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const c=Pg(this.reconPack,this.buffers);return this.finishedReconstruction(),c}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const lb=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ur,Encoder:tb,get PacketType(){return he},protocol:eb},Symbol.toStringTag,{value:"Module"}));function wt(u,i,c){return u.on(i,c),function(){u.off(i,c)}}const ab=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Pm extends Xe{constructor(i,c,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=c,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[wt(i,"open",this.onopen.bind(this)),wt(i,"packet",this.onpacket.bind(this)),wt(i,"error",this.onerror.bind(this)),wt(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...c){var r,f,d;if(ab.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(c.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(c),this;const p={type:he.EVENT,data:c};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof c[c.length-1]=="function"){const T=this.ids++,g=c.pop();this._registerAckCallback(T,g),p.id=T}const x=(f=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||f===void 0?void 0:f.writable,v=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!x||(v?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),this.flags={},this}_registerAckCallback(i,c){var r;const f=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(f===void 0){this.acks[i]=c;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let x=0;x<this.sendBuffer.length;x++)this.sendBuffer[x].id===i&&this.sendBuffer.splice(x,1);c.call(this,new Error("operation has timed out"))},f),p=(...x)=>{this.io.clearTimeoutFn(d),c.apply(this,x)};p.withError=!0,this.acks[i]=p}emitWithAck(i,...c){return new Promise((r,f)=>{const d=(p,x)=>p?f(p):r(x);d.withError=!0,c.push(d),this.emit(i,...c)})}_addToQueue(i){let c;typeof i[i.length-1]=="function"&&(c=i.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((f,...d)=>r!==this._queue[0]?void 0:(f!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),c&&c(f)):(this._queue.shift(),c&&c(null,...d)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const c=this._queue[0];c.pending&&!i||(c.pending=!0,c.tryCount++,this.flags=c.flags,this.emit.apply(this,c.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:he.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,c){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,c),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(r=>String(r.id)===i)){const r=this.acks[i];delete this.acks[i],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case he.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case he.EVENT:case he.BINARY_EVENT:this.onevent(i);break;case he.ACK:case he.BINARY_ACK:this.onack(i);break;case he.DISCONNECT:this.ondisconnect();break;case he.CONNECT_ERROR:this.destroy();const r=new Error(i.data.message);r.data=i.data.data,this.emitReserved("connect_error",r);break}}onevent(i){const c=i.data||[];i.id!=null&&c.push(this.ack(i.id)),this.connected?this.emitEvent(c):this.receiveBuffer.push(Object.freeze(c))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const c=this._anyListeners.slice();for(const r of c)r.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const c=this;let r=!1;return function(...f){r||(r=!0,c.packet({type:he.ACK,id:i,data:f}))}}onack(i){const c=this.acks[i.id];typeof c=="function"&&(delete this.acks[i.id],c.withError&&i.data.unshift(null),c.apply(this,i.data))}onconnect(i,c){this.id=i,this.recovered=c&&this._pid===c,this._pid=c,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:he.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const c=this._anyListeners;for(let r=0;r<c.length;r++)if(i===c[r])return c.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const c=this._anyOutgoingListeners;for(let r=0;r<c.length;r++)if(i===c[r])return c.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const c=this._anyOutgoingListeners.slice();for(const r of c)r.apply(this,i.data)}}}function $l(u){u=u||{},this.ms=u.min||100,this.max=u.max||1e4,this.factor=u.factor||2,this.jitter=u.jitter>0&&u.jitter<=1?u.jitter:0,this.attempts=0}$l.prototype.duration=function(){var u=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),c=Math.floor(i*this.jitter*u);u=(Math.floor(i*10)&1)==0?u-c:u+c}return Math.min(u,this.max)|0};$l.prototype.reset=function(){this.attempts=0};$l.prototype.setMin=function(u){this.ms=u};$l.prototype.setMax=function(u){this.max=u};$l.prototype.setJitter=function(u){this.jitter=u};class Ar extends Xe{constructor(i,c){var r;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(c=i,i=void 0),c=c||{},c.path=c.path||"/socket.io",this.opts=c,Lu(this,c),this.reconnection(c.reconnection!==!1),this.reconnectionAttempts(c.reconnectionAttempts||1/0),this.reconnectionDelay(c.reconnectionDelay||1e3),this.reconnectionDelayMax(c.reconnectionDelayMax||5e3),this.randomizationFactor((r=c.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new $l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(c.timeout==null?2e4:c.timeout),this._readyState="closed",this.uri=i;const f=c.parser||lb;this.encoder=new f.Encoder,this.decoder=new f.Decoder,this._autoConnect=c.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var c;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(c=this.backoff)===null||c===void 0||c.setMin(i),this)}randomizationFactor(i){var c;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(c=this.backoff)===null||c===void 0||c.setJitter(i),this)}reconnectionDelayMax(i){var c;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(c=this.backoff)===null||c===void 0||c.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new Qg(this.uri,this.opts);const c=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const f=wt(c,"open",function(){r.onopen(),i&&i()}),d=x=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",x),i?i(x):this.maybeReconnectOnOpen()},p=wt(c,"error",d);if(this._timeout!==!1){const x=this._timeout,v=this.setTimeoutFn(()=>{f(),d(new Error("timeout")),c.close()},x);this.opts.autoUnref&&v.unref(),this.subs.push(()=>{this.clearTimeoutFn(v)})}return this.subs.push(f),this.subs.push(p),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(wt(i,"ping",this.onping.bind(this)),wt(i,"data",this.ondata.bind(this)),wt(i,"error",this.onerror.bind(this)),wt(i,"close",this.onclose.bind(this)),wt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(c){this.onclose("parse error",c)}}ondecoded(i){Bu(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,c){let r=this.nsps[i];return r?this._autoConnect&&!r.active&&r.connect():(r=new Pm(this,i,c),this.nsps[i]=r),r}_destroy(i){const c=Object.keys(this.nsps);for(const r of c)if(this.nsps[r].active)return;this._close()}_packet(i){const c=this.encoder.encode(i);for(let r=0;r<c.length;r++)this.engine.write(c[r],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,c){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,c),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const c=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(f=>{f?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",f)):i.onreconnect()}))},c);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Za={};function Mu(u,i){typeof u=="object"&&(i=u,u=void 0),i=i||{};const c=Zg(u,i.path||"/socket.io"),r=c.source,f=c.id,d=c.path,p=Za[f]&&d in Za[f].nsps,x=i.forceNew||i["force new connection"]||i.multiplex===!1||p;let v;return x?v=new Ar(r,i):(Za[f]||(Za[f]=new Ar(r,i)),v=Za[f]),c.query&&!i.query&&(i.query=c.queryKey),v.socket(c.path,i)}Object.assign(Mu,{Manager:Ar,Socket:Pm,io:Mu,connect:Mu});const Im=window.location.origin;console.info("[socket] connecting to",Im);const Br=Mu(Im,{transports:["polling","websocket"],timeout:15e3});Br.on("connect_error",u=>console.error("connect_error",u.code,u.message,u.data));const ep=_.createContext(Br),ib=({children:u})=>m.jsx(ep.Provider,{value:Br,children:u}),ei=()=>_.useContext(ep),tp=_.createContext({connected:!1,session:null,logs:[],login:async()=>{},setRole:async()=>{},requestControl:async()=>{},releaseControl:async()=>{},subscribeAll:async()=>{}});function ub(u){return _.useCallback((i,c={})=>new Promise((r,f)=>{u.emit(i,c,(d={})=>{d.error?f(new Error(d.error)):r(d)})}),[u])}function sb({children:u}){const i=ei(),c=ub(i),[r,f]=_.useState(null),[d,p]=_.useState([]),[x,v]=_.useState([]),[y,T]=_.useState(i.connected);_.useEffect(()=>{const z=()=>T(!0),L=()=>T(!1);return i.on("connect",z),i.on("disconnect",L),()=>{i.off("connect",z),i.off("disconnect",L)}},[i]),_.useEffect(()=>{function z(H){f(H)}function L(H=[]){p(H)}function k(H){p(q=>[...q.slice(-199),H])}return i.on("session:sync",z),i.on("log:init",L),i.on("log:entry",k),i.on("alert:new",(H={})=>{v(q=>[...q.slice(-49),{...H,receivedAt:Date.now()}])}),()=>{i.off("session:sync",z),i.off("log:init",L),i.off("log:entry",k),i.off("alert:new")}},[i]);const g=_.useMemo(()=>({login:(z,L)=>c("auth:login",{username:z,password:L}),setRole:z=>c("session:setRole",{role:z}),requestControl:(z,L={})=>c("session:requestControl",{roverId:z,...L}),releaseControl:z=>c("session:releaseControl",{roverId:z}),subscribeAll:()=>c("session:subscribeAll"),lockRover:(z,L)=>c("session:lockRover",{roverId:z,locked:L}),setMode:z=>c("setMode",{mode:z})}),[c]),N=_.useMemo(()=>({connected:y,session:r,logs:d,alerts:x,...g}),[g,x,y,d,r]);return m.jsx(tp.Provider,{value:N,children:u})}function Bt(){return _.useContext(tp)}const np=_.createContext({frames:{}});function cb({children:u}){const i=ei(),[c,r]=_.useState({});_.useEffect(()=>{function d({roverId:p,sensors:x={},frame:v={}}){p&&r(y=>({...y,[p]:{roverId:p,sensors:x,raw:v?.data||null,receivedAt:Date.now()}}))}return i.on("sensorFrame",d),()=>{i.off("sensorFrame",d)}},[i]);const f=_.useMemo(()=>({frames:c}),[c]);return m.jsx(np.Provider,{value:f,children:u})}function lp(){return _.useContext(np).frames}function Lr(u){const i=lp();return u?i[u]??null:null}function il(u,i="--"){return u==null||u===""?i:u}function Hr(){const{connected:u,session:i,requestControl:c}=Bt(),r=i?.assignment?.roverId,f=Lr(r),d=f?.sensors||{},p=d.voltageMv!=null?`${(d.voltageMv/1e3).toFixed(2)} V`:null,x=d.currentMa!=null?`${d.currentMa} mA`:null,v=d.batteryChargeMah,y=d.batteryCapacityMah,T=f?.receivedAt?new Date(f.receivedAt).toLocaleTimeString():null,g=f?.raw?f.raw:null,N=i?.roster??[],z=r?i?.activeDrivers?.[r]:null,L=r?z?z===i?.socketId?"You":z.slice(0,6):"Available":"n/a",k=_.useMemo(()=>i?.role==="admin"||i?.role==="lockdown"||i?.role==="lockdown-admin",[i?.role]),[H,q]=_.useState({});async function V(G){if(G){q(ae=>({...ae,[G]:!0}));try{await c(G)}catch(ae){alert(ae.message)}finally{q(ae=>({...ae,[G]:!1}))}}}return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"text-sm text-slate-400",children:[m.jsx("span",{children:u?"online":"offline"}),m.jsxs("span",{children:[" · role ",i?.role||"unknown"]}),m.jsxs("span",{children:[" · mode ",i?.mode||"--"]}),T&&m.jsxs("span",{children:[" · sensors ",T]}),m.jsxs("span",{children:[" · driver ",L]})]}),r?f?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex flex-wrap gap-0.5",children:[m.jsx(ul,{label:"Charge",value:il(v!=null&&y!=null?`${v}/${y}`:null)}),m.jsx(ul,{label:"Charging",value:il(d.chargingState?.label)}),m.jsx(ul,{label:"OI mode",value:il(d.oiMode?.label)}),m.jsx(ul,{label:"Voltage",value:il(p)}),m.jsx(ul,{label:"Current",value:il(x)}),m.jsx(ul,{label:"Left Encoder",value:il(d.encoderCountsLeft)}),m.jsx(ul,{label:"Right Encoder",value:il(d.encoderCountsRight)})]}),m.jsxs("div",{className:"mt-1 flex gap-0.5",children:[m.jsx(Eu,{value:d.cliffLeftSignal}),m.jsx(Eu,{value:d.cliffFrontLeftSignal}),m.jsx(Eu,{value:d.cliffFrontRightSignal}),m.jsx(Eu,{value:d.cliffRightSignal})]})]}):m.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Waiting for sensor frames…"}):m.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Assign a rover to view sensors."}),g&&m.jsx("pre",{className:"mt-1 text-wrap break-words p-1 text-xs text-lime-300 bg-gray-700",children:g}),m.jsxs("div",{className:"mt-1",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Rovers"}),N.length===0?m.jsx("p",{className:"text-sm text-slate-500",children:"No roster data."}):m.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:N.map(G=>m.jsxs("li",{className:"flex items-center justify-between gap-1",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-slate-200",children:G.name}),m.jsxs("p",{className:"text-xs text-slate-500",children:[G.locked?"locked":"free"," · ",G.lastSeen?"seen":"unknown"]})]}),k&&m.jsx("button",{type:"button",onClick:()=>V(G.id),disabled:H[G.id],className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-40",children:H[G.id]?"...":"request"})]},G.id))})]})]})}function Eu({value:u}){const c=`${u==null?0:Math.max(0,Math.min(100,u/4095*100))}%`;return m.jsx("div",{className:"w-1/4 h-6 bg-gray-700 rounded-sm overflow-hidden",children:m.jsx("div",{className:"w-full bg-amber-400",style:{height:c}})})}function ul({label:u,value:i}){return m.jsxs("div",{className:"bg-gray-700 rounded-sm p-0.5 text-sm",children:[u,": ",i]})}const rb={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},Zl={main:[-127,127],side:[-127,127],vacuum:[0,127]},ob=200,fb=u=>new Promise(i=>setTimeout(i,u));function on(u,i,c){return Math.max(i,Math.min(c,u))}function db(u){const i=u.has("w"),c=u.has("s"),r=u.has("a"),f=u.has("d"),p=u.has("shift")?300:150;let x=0,v=0;return i&&!c?(x+=p,v+=p):c&&!i&&(x-=p,v-=p),r&&!f?(x-=p,v+=p):f&&!r&&(x+=p,v-=p),!i&&!c&&(r||f)&&(x=r?-p:p,v=r?p:-p),{left:on(x,-500,500),right:on(v,-500,500)}}function mm(u){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function hb(u){const i=u.target;if(!i)return!1;const c=i.tagName;return c==="INPUT"||c==="TEXTAREA"||i.isContentEditable||c==="SELECT"&&["w","a","s","d","Shift"].includes(u.key)}function mb(u){const i=String.fromCharCode(...u);if(typeof btoa=="function")return btoa(i);if(typeof Buffer<"u")return Buffer.from(u).toString("base64");throw new Error("No base64 encoder available")}function pb(){const u=ei(),{session:i}=Bt(),c=i?.assignment?.roverId,r=_.useRef(new Set),f=_.useRef({left:0,right:0}),[d,p]=_.useState(()=>({left:0,right:0})),[x,v]=_.useState(null),y=_.useCallback((J,P)=>{c&&u.emit("command",{roverId:c,...J},P)},[u,c]),T=_.useMemo(()=>!c||!Array.isArray(i?.roster)?null:i.roster.find(J=>String(J.id)===String(c))||null,[c,i?.roster]),g=_.useMemo(()=>!T?.cameraServo||!T.cameraServo.enabled?null:T.cameraServo,[T]),N=_.useCallback(()=>{c&&y({type:"sensorStream",data:{sensorStream:{enable:!0}}})},[y,c]),z=_.useCallback(()=>{if(!c)return;const J=db(r.current),P=f.current;J.left===P.left&&J.right===P.right||(f.current=J,p(J),y({type:"drive",data:{driveDirect:J}}))},[y,c]),L=_.useCallback(({x:J=0,y:P=0,boost:oe=!1}={})=>{if(!c)return;const fe=oe?400:250,we=mm(P)*fe,gt=mm(J)*fe,st={left:on(Math.round(we+gt),-500,500),right:on(Math.round(we-gt),-500,500)};f.current=st,p(st),y({type:"drive",data:{driveDirect:st}})},[y,c]),k=_.useCallback(({main:J=0,side:P=0,vacuum:oe=0}={})=>{if(!c)return;const fe={main:on(J,Zl.main[0],Zl.main[1]),side:on(P,Zl.side[0],Zl.side[1]),vacuum:on(oe,Zl.vacuum[0],Zl.vacuum[1])};y({type:"motors",data:{motorPwm:fe}})},[y,c]),H=_.useCallback(()=>{c&&(r.current.clear(),f.current={left:0,right:0},p(f.current),k({main:0,side:0,vacuum:0}))},[c,k]),q=_.useCallback(J=>{if(!c)return;const P=rb[J];P&&(y({type:"raw",data:{raw:mb(P)}}),N())},[y,N,c]),V=_.useCallback(async()=>{if(c)for(const J of["start","dock","full"])q(J),await fb(ob)},[c,q]),G=_.useCallback(()=>{q("dock")},[q]),ae=_.useCallback(J=>{c&&k(J)},[c,k]),xe=_.useCallback(J=>{!c||!g||y({type:"servo",data:{servo:J}})},[y,c,g]),Ce=_.useCallback(J=>{if(!g)return;const P=typeof g.minAngle=="number"?g.minAngle:-45,oe=typeof g.maxAngle=="number"?g.maxAngle:45,fe=on(J,P,oe);v(fe),xe({angle:fe})},[xe,g]),W=_.useCallback(J=>{if(!g)return;const P=typeof g.minAngle=="number"?g.minAngle:-45,oe=typeof g.maxAngle=="number"?g.maxAngle:45,fe=(P+oe)/2,we=typeof J=="number"&&!Number.isNaN(J)&&J!==0?J:g.nudgeDegrees||1,gt=typeof x=="number"?x:g.homeAngle??fe;Ce(gt+we)},[Ce,x,g]);return _.useEffect(()=>{if(!g){v(null),c&&console.debug("Camera servo unavailable for rover",c,{rosterEntry:T});return}const J=typeof g.minAngle=="number"?g.minAngle:-45,P=typeof g.maxAngle=="number"?g.maxAngle:45,oe=typeof g.homeAngle=="number"?g.homeAngle:(J+P)/2;v(on(oe,J,P))},[T,c,g]),_.useEffect(()=>{if(!c){r.current.clear(),f.current={left:0,right:0},p(f.current);return}function J(oe){if(hb(oe))return;const fe=oe.key.toLowerCase();["w","a","s","d","shift"].includes(fe)&&(r.current.has(fe)||(r.current.add(fe),z()))}function P(oe){const fe=oe.key.toLowerCase();r.current.has(fe)&&(r.current.delete(fe),z())}return window.addEventListener("keydown",J),window.addEventListener("keyup",P),N(),()=>{window.removeEventListener("keydown",J),window.removeEventListener("keyup",P)}},[c,z,N]),{roverId:c,speeds:d,stopMotors:H,sendOiCommand:q,runStartDockFull:V,seekDock:G,setAuxMotors:ae,driveWithVector:L,servo:{enabled:!!(c&&g),config:g,angle:typeof x=="number"?x:g?.homeAngle??g?.minAngle??0,setAngle:Ce,nudge:W,goHome:()=>{g&&Ce(g.homeAngle??0)}}}}const ap=_.createContext(null);function yb({children:u}){const i=pb();return m.jsx(ap.Provider,{value:i,children:u})}function ti(){const u=_.useContext(ap);if(!u)throw new Error("useDriveControl must be used within DriveControlProvider");return u}function qr(){const{roverId:u,runStartDockFull:i,seekDock:c}=ti(),f=Lr(u)?.sensors||{},d=(f.oiMode?.label||"").toLowerCase()==="full",p=!!f.chargingSources?.homeBase,x=!!(f.chargingState?.label&&f.chargingState.label.toLowerCase()!=="not charging");return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[m.jsx("span",{children:"Drive control"}),m.jsx("span",{children:u?`Rover ${u}`:"unassigned"})]}),m.jsxs("div",{className:"mt-1 space-y-1",children:[m.jsx(pm,{title:"Start Driving",description:"Press to enable driving mode, then start moving. The headlamps should illuminate.",statuses:[{label:d?"Ready!":"Not Ready!",active:d}],tone:"emerald",onClick:i,disabled:!u}),m.jsx(pm,{title:"Dock and Charge",description:"Line the rover up about a foot from the dock, then trigger an automatic approach.",statuses:[{label:p?"Docked!":"Not Docked!",active:p},{label:x?"Charging!":"Not Charging!",active:x}],tone:"indigo",onClick:c,disabled:!u})]})]})}function pm({title:u,description:i,statuses:c,tone:r,onClick:f,disabled:d,footnote:p}){const x=r==="indigo"?"bg-indigo-600":"bg-emerald-600";return m.jsxs("button",{type:"button",onClick:f,disabled:d,className:`w-full rounded-lg ${x} px-1 py-1 text-left text-white disabled:opacity-40`,children:[m.jsx("p",{className:"text-base font-semibold",children:u}),m.jsx("p",{className:"text-sm text-white/90",children:i}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:c.map(v=>m.jsx("span",{className:`rounded-full px-1 py-0.5 text-xs font-semibold ${v.active?"bg-lime-300 text-emerald-900":"bg-emerald-900 text-emerald-100"}`,children:v.label},v.label))}),p&&m.jsx("p",{className:"mt-1 text-xs text-emerald-50/80",children:p})]})}const vb=5e3;function gb(u){return u.id?u.id:u.timestamp?`${u.timestamp}-${u.message}`:`${u.title||"alert"}-${u.message}`}function bb(){const{alerts:u}=Bt(),[i,c]=_.useState(()=>Date.now()),r=_.useMemo(()=>u.slice(-5).map(d=>({alert:d,key:gb(d)})),[u]);_.useEffect(()=>{if(!r.length)return;const d=setInterval(()=>c(Date.now()),200);return()=>clearInterval(d)},[r.length]);const f=r.map(d=>({...d,age:i-(d.alert.receivedAt??d.alert.timestamp??0)})).filter(d=>d.age<=vb);return f.length?m.jsx("div",{className:"pointer-events-none fixed top-1 left-1/2 z-50 flex -translate-x-1/2 flex-col gap-1",children:f.map(d=>m.jsx(xb,{alert:d.alert},d.key))}):null}function xb({alert:u}){const i=u.color==="error"?"bg-red-500/30 text-red-100":u.color==="warn"?"bg-amber-500/30 text-amber-100":"bg-emerald-500/30 text-emerald-100";return m.jsxs("div",{className:`pointer-events-auto rounded-sm px-1 py-1 text-[0.75rem] shadow-lg shadow-black/60 ${i}`,children:[m.jsx("p",{className:"text-[0.65rem] text-slate-300",children:u.title||"Alert"}),m.jsx("p",{className:"text-sm text-white",children:u.message})]})}const Sb=[{key:"open",label:"Open"},{key:"turns",label:"Turns"},{key:"admin",label:"Admin"},{key:"lockdown",label:"Lockdown"}];function kr(){const{session:u,lockRover:i,setMode:c,requestControl:r}=Bt(),f=_.useMemo(()=>u?.roster??[],[u?.roster]),[d,p]=_.useState({}),x=u?.role==="admin"||u?.role==="lockdown"||u?.role==="lockdown-admin",v=u?.mode??"open",y=async(z,L)=>{try{await i(z,L),p(k=>({...k,[z]:L}))}catch(k){alert(k.message)}},T=async z=>{const L=z.target.value;try{await c(L)}catch(k){alert(k.message)}},g=async z=>{try{await r(z,{force:!0})}catch(L){alert(L.message)}},N=_.useMemo(()=>{const z={};return f.forEach(L=>{z[L.id]=d[L.id]??L.locked}),z},[f,d]);return x?m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between gap-1 text-sm",children:[m.jsx("span",{children:"Admin controls"}),m.jsx("select",{value:v,onChange:T,className:"rounded-sm bg-black/40 px-1 py-1 text-sm text-slate-100",children:Sb.map(z=>m.jsx("option",{value:z.key,children:z.label},z.key))})]}),m.jsx("div",{className:"mt-1 space-y-1 text-sm",children:f.map(z=>m.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 rounded-sm bg-black/30 px-1 py-1",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-slate-100",children:z.name}),m.jsx("p",{className:"text-xs text-slate-400",children:N[z.id]?"locked":"unlocked"})]}),m.jsxs("div",{className:"flex flex-wrap gap-1 text-xs",children:[m.jsx("button",{type:"button",onClick:()=>y(z.id,!N[z.id]),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:N[z.id]?"Unlock":"Lock"}),m.jsx("button",{type:"button",onClick:()=>g(z.id),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:"Force"})]})]},z.id))})]}):null}var pr={},rn={},yr={},ym;function Hu(){return ym||(ym=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=void 0,(function(i){i.Circle="circle",i.Square="square",i.AxisY="axisY",i.AxisX="axisX"})(u.JoystickShape||(u.JoystickShape={}))})(yr)),yr}var Ka={},vm;function _b(){if(vm)return Ka;vm=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.shapeFactory=void 0;var u=Hu(),i=function(c,r){switch(c){case u.JoystickShape.Square:return{borderRadius:Math.sqrt(r)};case u.JoystickShape.Circle:default:return{borderRadius:r}}};return Ka.shapeFactory=i,Ka}var Ja={},gm;function Eb(){if(gm)return Ja;gm=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.shapeBoundsFactory=void 0;var u=Hu(),i=function(r,f,d,p,x,v,y,T,g){switch(r){case u.JoystickShape.Square:return p=c(f-g.left-T/2,T),x=c(d-g.top-T/2,T),{relativeX:p,relativeY:x};case u.JoystickShape.AxisX:return p=c(f-g.left-T/2,T),x=0,{relativeX:p,relativeY:x};case u.JoystickShape.AxisY:return p=0,x=c(d-g.top-T/2,T),{relativeX:p,relativeY:x};default:return v>y&&(p*=y/v,x*=y/v),{relativeX:p,relativeY:x}}};Ja.shapeBoundsFactory=i;var c=function(r,f){var d=f/2;return r>d?d:r<-d?d*-1:r};return Ja}var bm;function Tb(){if(bm)return rn;bm=1;var u=rn&&rn.__extends||(function(){var y=function(T,g){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,z){N.__proto__=z}||function(N,z){for(var L in z)Object.prototype.hasOwnProperty.call(z,L)&&(N[L]=z[L])},y(T,g)};return function(T,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");y(T,g);function N(){this.constructor=T}T.prototype=g===null?Object.create(g):(N.prototype=g.prototype,new N)}})(),i=rn&&rn.__assign||function(){return i=Object.assign||function(y){for(var T,g=1,N=arguments.length;g<N;g++){T=arguments[g];for(var z in T)Object.prototype.hasOwnProperty.call(T,z)&&(y[z]=T[z])}return y},i.apply(this,arguments)};Object.defineProperty(rn,"__esModule",{value:!0}),rn.Joystick=void 0;var c=Du(),r=Hu(),f=_b(),d=Eb(),p;(function(y){y.PointerDown="pointerdown",y.PointerMove="pointermove",y.PointerUp="pointerup"})(p||(p={}));var x;(function(y){y[y.TopRight=2.35619449]="TopRight",y[y.TopLeft=-2.35619449]="TopLeft",y[y.BottomRight=.785398163]="BottomRight",y[y.BottomLeft=-.785398163]="BottomLeft"})(x||(x={}));var v=(function(y){u(T,y);function T(g){var N=y.call(this,g)||this;return N._stickRef=c.createRef(),N._baseRef=c.createRef(),N.frameId=null,N._pointerId=null,N._mounted=!1,N._pointerMove=function(z){if(z.preventDefault(),N.state.dragging){if(!N.props.followCursor&&z.pointerId!==N._pointerId)return;var L=z.clientX,k=z.clientY,H=L-N._parentRect.left-N._radius,q=k-N._parentRect.top-N._radius,V=N._distance(H,q),G=(0,d.shapeBoundsFactory)(N.props.controlPlaneShape||N.props.baseShape,L,k,H,q,V,N._radius,N._baseSize,N._parentRect);H=G.relativeX,q=G.relativeY;var ae=Math.atan2(H,q);N._updatePos({relativeX:H,relativeY:q,distance:N._distanceToPercentile(V),direction:N._getDirection(ae),axisX:L-N._parentRect.left,axisY:k-N._parentRect.top})}},N._pointerUp=function(z){if(z.pointerId===N._pointerId){var L={dragging:!1};N.props.sticky||(L.coordinates=void 0),N.frameId=window.requestAnimationFrame(function(){N._mounted&&N.setState(L)}),window.removeEventListener(p.PointerUp,N._pointerUp),window.removeEventListener(p.PointerMove,N._pointerMove),N._pointerId=null,N.props.stop&&N.props.stop({type:"stop",x:N.props.sticky?N.state.coordinates.relativeX*2/N._baseSize:null,y:N.props.sticky?N.state.coordinates.relativeY*2/N._baseSize:null,direction:N.props.sticky?N.state.coordinates.direction:null,distance:N.props.sticky?N.state.coordinates.distance:null})}},N.state={dragging:!1},N._throttleMoveCallback=(function(){var z=0;return function(L){var k=new Date().getTime(),H=N.props.throttle||0;if(!(k-z<H)&&(z=k,N.props.move))return N.props.move(L)}})(),N}return T.prototype.componentWillUnmount=function(){var g=this;this._mounted=!1,this.props.followCursor&&window.removeEventListener(p.PointerMove,function(N){return g._pointerMove(N)}),this.frameId!==null&&window.cancelAnimationFrame(this.frameId)},T.prototype.componentDidMount=function(){var g=this;this._mounted=!0,this.props.followCursor&&(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(p.PointerMove,function(N){return g._pointerMove(N)}),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},T.prototype._updatePos=function(g){var N=this;this.frameId=window.requestAnimationFrame(function(){N._mounted&&N.setState({coordinates:g})}),!(typeof this.props.minDistance=="number"&&g.distance<this.props.minDistance)&&this._throttleMoveCallback({type:"move",x:g.relativeX*2/this._baseSize,y:-(g.relativeY*2/this._baseSize),direction:g.direction,distance:g.distance})},T.prototype._pointerDown=function(g){this.props.disabled||this.props.followCursor||(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(p.PointerUp,this._pointerUp),window.addEventListener(p.PointerMove,this._pointerMove),this._pointerId=g.pointerId,this._stickRef.current.setPointerCapture(g.pointerId),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},T.prototype._getDirection=function(g){return g>x.TopRight||g<x.TopLeft?"FORWARD":g<x.TopRight&&g>x.BottomRight?"RIGHT":g<x.BottomLeft?"LEFT":"BACKWARD"},T.prototype._distance=function(g,N){return Math.hypot(g,N)},T.prototype._distanceToPercentile=function(g){var N=g/(this._baseSize/2)*100;return N>100?100:N},T.prototype.getBaseShapeStyle=function(){var g=this.props.baseShape||r.JoystickShape.Circle;return(0,f.shapeFactory)(g,this._baseSize)},T.prototype.getStickShapeStyle=function(){var g=this.props.stickShape||r.JoystickShape.Circle;return(0,f.shapeFactory)(g,this._baseSize)},T.prototype._getBaseStyle=function(){var g=this.props.baseColor!==void 0?this.props.baseColor:"#000033",N="".concat(this._baseSize,"px"),z=i(i({},this.getBaseShapeStyle()),{height:N,width:N,background:g,display:"flex",justifyContent:"center",alignItems:"center"});return this.props.baseImage&&(z.background="url(".concat(this.props.baseImage,")"),z.backgroundSize="100%"),z},T.prototype._getStickStyle=function(){var g=this.props.stickColor!==void 0?this.props.stickColor:"#3D59AB",N=this._stickSize?"".concat(this._stickSize,"px"):"".concat(this._baseSize/1.5,"px"),z=i(i({},this.getStickShapeStyle()),{background:g,cursor:"move",height:N,width:N,border:"none",flexShrink:0,touchAction:"none"});return this.props.stickImage&&(z.background="url(".concat(this.props.stickImage,")"),z.backgroundSize="100%"),this.props.pos&&(z=Object.assign({},z,{position:"absolute",transform:"translate3d(".concat(this.props.pos.x*this._baseSize/2,"px, ").concat(-(this.props.pos.y*this._baseSize)/2,"px, 0)")})),this.state.coordinates!==void 0&&(z=Object.assign({},z,{position:"absolute",transform:"translate3d(".concat(this.state.coordinates.relativeX,"px, ").concat(this.state.coordinates.relativeY,"px, 0)")})),z},T.prototype.render=function(){var g=this;this._baseSize=this.props.size||100,this._stickSize=this.props.stickSize,this._radius=this._baseSize/2;var N=this._getBaseStyle(),z=this._getStickStyle();return c.createElement("div",{"data-testid":"joystick-base",className:this.props.disabled?"joystick-base-disabled":"",ref:this._baseRef,style:N},c.createElement("button",{ref:this._stickRef,disabled:this.props.disabled,onPointerDown:function(L){return g._pointerDown(L)},className:this.props.disabled?"joystick-disabled":"",style:z}))},T})(c.Component);return rn.Joystick=v,rn}var xm;function Ab(){return xm||(xm=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=u.Joystick=void 0;var i=Tb();Object.defineProperty(u,"Joystick",{enumerable:!0,get:function(){return i.Joystick}});var c=Hu();Object.defineProperty(u,"JoystickShape",{enumerable:!0,get:function(){return c.JoystickShape}})})(pr)),pr}var Nb=Ab();function Sm(u=0){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function ip(){const{roverId:u,driveWithVector:i,stopMotors:c}=ti(),r=!u,f=_.useCallback((p={})=>{if(r)return;const x=Sm(p.x??0),v=Sm(p.y??0);i({x,y:v})},[r,i]),d=_.useCallback(()=>{r||i({x:0,y:0})},[r,i]);return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("div",{className:"text-xs text-slate-400",children:"Joystick"}),m.jsx("div",{className:"mt-1 flex items-center justify-center",children:m.jsx(Nb.Joystick,{size:120,baseColor:"#0f172a",stickColor:"#38bdf8",throttle:75,move:f,stop:d,disabled:r})}),m.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Drag to drive. Release to stop sending drive commands."}),m.jsx("button",{type:"button",onClick:c,disabled:r,className:"mt-1 w-full rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-40",children:"Panic Stop"})]})}function up(){const{roverId:u,setAuxMotors:i}=ti(),c=!u,r=()=>{c||i({main:127,side:127,vacuum:127})},f=()=>{c||i({main:0,side:0,vacuum:0})},d=[{label:"Main +",values:{main:127}},{label:"Main -",values:{main:-127}},{label:"Side +",values:{side:127}},{label:"Side -",values:{side:-127}},{label:"Vacuum Max",values:{vacuum:127}},{label:"Vacuum Off",values:{vacuum:0}}];return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("div",{className:"text-xs text-slate-400",children:"Aux motors"}),m.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[m.jsx("button",{type:"button",onClick:r,disabled:c,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-40",children:"All forward"}),m.jsx("button",{type:"button",onClick:f,disabled:c,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-40",children:"Stop all"})]}),m.jsx("div",{className:"mt-1 grid grid-cols-2 gap-1 text-[0.75rem]",children:d.map(p=>m.jsx("button",{type:"button",onClick:()=>!c&&i(p.values),disabled:c,className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200 disabled:opacity-30",children:p.label},p.label))})]})}function Cb(){return m.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row",children:[m.jsx("div",{className:"flex-1",children:m.jsx(ip,{})}),m.jsx("div",{className:"flex-1",children:m.jsx(up,{})})]})}function Yr(){return m.jsxs("div",{className:"min-h-[8rem] rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsx("p",{className:"text-center text-sm text-slate-400",children:"Room camera"}),m.jsx("p",{className:"mt-1 text-center",children:"Feed placeholder. Wire upcoming room cam here."})]})}function Xr(){const{logs:u}=Bt();return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-400",children:[m.jsx("span",{children:"Server logs"}),m.jsx("span",{children:u.length})]}),m.jsx("div",{className:"mt-1 h-64 overflow-y-auto rounded-sm bg-black/40 p-1 font-mono text-xs",children:u.length===0?m.jsx("p",{children:"No logs yet."}):u.slice().reverse().map(i=>m.jsxs("div",{className:"mb-1",children:[m.jsx("span",{className:"text-amber-400",children:i.timestamp})," ",m.jsxs("span",{className:"text-lime-400",children:["[",i.level,"]"]})," ",i.label&&m.jsxs("span",{className:"text-teal-400",children:["[",i.label,"]"]})," ",m.jsx("span",{children:i.message})]},i.id))})]})}function qu(){const{login:u,setRole:i}=Bt(),[c,r]=_.useState(""),[f,d]=_.useState(""),[p,x]=_.useState(!1);async function v(y){y.preventDefault(),x(!0);try{await u(c,f),r(""),d("")}catch(T){alert(T.message)}finally{x(!1)}}return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),m.jsxs("form",{className:"mt-1 flex flex-col gap-1",onSubmit:v,children:[m.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Username",value:c,onChange:y=>r(y.target.value)}),m.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Password",type:"password",value:f,onChange:y=>d(y.target.value)}),m.jsx("button",{type:"submit",disabled:p,className:"rounded-sm bg-slate-200 px-1 py-1 text-sm font-semibold text-black disabled:opacity-50",children:p?"Logging in…":"Login"})]}),m.jsxs("div",{className:"mt-1 flex gap-1 text-sm",children:[m.jsx("button",{type:"button",onClick:()=>i("user"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Driver"}),m.jsx("button",{type:"button",onClick:()=>i("spectator"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Spectator"})]})]})}function sp(u=[]){const i=ei(),[c,r]=_.useState({}),f=Array.isArray(u)?u.filter(Boolean).join("|"):"";return _.useEffect(()=>{if(!f)return;const p=f.split("|");let x=!1;return p.forEach(v=>{i.emit("video:request",{roverId:v},(y={})=>{x||r(T=>({...T,[v]:y}))})}),()=>{x=!0}},[i,f]),_.useMemo(()=>{if(!f)return{};const p=f.split("|"),x={};return p.forEach(v=>{c[v]&&(x[v]=c[v])}),x},[f,c])}const Rb={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:your.turn.server:3478",username:"user",credential:"pass"}],bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"};function Ob(u){if(typeof btoa=="function")return btoa(u);if(typeof Buffer<"u")return Buffer.from(u).toString("base64");throw new Error("No base64 encoder available")}function zb(u){if(!u)return{};const i=`${u}:${u}`;return{Authorization:`Basic ${Ob(i)}`}}class Mb{constructor({url:i,token:c,video:r,onStatus:f}){this.url=i,this.token=c,this.video=r,this.pc=null,this.abortController=null,this.onStatus=f}notify(i,c){typeof this.onStatus=="function"&&this.onStatus(i,c)}configureVideoElement(){this.video&&(this.video.playsInline=!0,this.video.autoplay=!0,this.video.disableRemotePlayback=!0,"latencyHint"in HTMLMediaElement.prototype&&(this.video.latencyHint="interactive"))}async start(){if(!this.url||!this.video)throw new Error("Video target missing");this.stop(),this.notify("connecting"),this.configureVideoElement(),this.abortController=new AbortController;const i=new RTCPeerConnection(Rb);this.pc=i;const c=new MediaStream;i.ontrack=r=>{r.streams[0]?.getTracks().forEach(f=>c.addTrack(f)),this.video.srcObject=c,r.track?.kind==="video"&&"playoutDelayHint"in r.receiver&&(r.receiver.playoutDelayHint=0)},i.addTransceiver("video",{direction:"recvonly"}),i.addTransceiver("audio",{direction:"recvonly"}),i.onconnectionstatechange=()=>{const r=i.connectionState;this.notify(r)},i.oniceconnectionstatechange=()=>{const r=i.iceConnectionState;(r==="failed"||r==="disconnected")&&this.notify(r)};try{const r=await i.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});await i.setLocalDescription(r);const f=await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/sdp",...zb(this.token)},body:r.sdp,signal:this.abortController.signal});if(!f.ok)throw new Error(`WHEP request failed: ${f.status}`);const d=await f.text();await i.setRemoteDescription({type:"answer",sdp:d}),i.getReceivers().forEach(p=>{"playoutDelayHint"in p&&(p.playoutDelayHint=0)}),await this.video.play().catch(()=>{}),this.notify("playing")}catch(r){throw this.notify("error",r.message),this.stop(),r}}stop(){this.abortController&&(this.abortController.abort(),this.abortController=null),this.pc&&(this.pc.getSenders().forEach(i=>i.track?.stop()),this.pc.getReceivers().forEach(i=>i.track?.stop()),this.pc.close(),this.pc=null),this.video&&(this.video.srcObject=null),this.notify("stopped")}}const jb=2e3,Db=3e3;function cp({sessionInfo:u,label:i,forceMute:c=!1,telemetryFrame:r,batteryConfig:f}){const d=_.useRef(null),p=_.useRef(null),x=_.useRef(null),[v,y]=_.useState("idle"),[T,g]=_.useState(null),[N,z]=_.useState(0),[L,k]=_.useState(!0),H=r?.sensors,q=H?.batteryChargeMah??null,V=H?.wheelOvercurrents||null,G=!!(V&&Object.values(V).some(W=>!!W)),ae=_.useCallback(()=>{clearTimeout(p.current),p.current=setTimeout(()=>z(Date.now()),jb)},[]),xe=_.useCallback((W=0)=>{if(c)return;clearTimeout(x.current);const J=()=>{clearTimeout(x.current),x.current=setTimeout(()=>{c||P()},Db)},P=async()=>{const oe=d.current;if(oe)try{oe.muted=!1,await oe.play(),k(!1)}catch{oe.muted=!0,k(!0),J()}};x.current=setTimeout(P,W)},[c]);_.useEffect(()=>()=>{clearTimeout(p.current),clearTimeout(x.current)},[]),_.useEffect(()=>{v==="playing"&&xe(0)},[v,xe]),_.useEffect(()=>{if(!u?.url||!d.current)return;let W=!0,J;const P=setTimeout(()=>k(!0),0),oe=(fe,we)=>{W&&(y(fe),g(we||null),["error","failed","disconnected","closed"].includes(fe)&&ae())};return J=new Mb({url:u.url,token:u.token,video:d.current,onStatus:oe}),J.start().catch(fe=>{W&&(y("error"),g(fe.message),ae())}),()=>{W=!1,clearTimeout(P),J?.stop()}},[u?.url,u?.token,N,ae]),_.useEffect(()=>{v==="stopped"&&u?.url&&ae()},[v,u?.url,ae]);const Ce=u?.url?v==="error"?`Error: ${T||"unknown"}`:T?`${v} (${T})`:v:"waiting";return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm bg-black aspect-video",children:[m.jsx("video",{ref:d,muted:c||L,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),m.jsx(Ub,{frame:r}),m.jsx(Bb,{active:G})]}),m.jsx(wb,{charge:q,config:f,label:i,status:Ce})]})}function wb({charge:u,config:i,label:c,status:r}){const f=i?.Full,d=i?.Warn,p=i?.Urgent??null;if(u==null||f==null||d==null)return m.jsxs("div",{className:"rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[m.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[m.jsx("span",{children:c}),m.jsx("span",{children:r})]}),m.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Battery telemetry unavailable"})]});const x=f-d;if(x<=0)return null;const v=(u-d)/x,y=Math.min(1,Math.max(0,v)),T=Math.round(y*100),g=`${T}%`,N=v<=0,z=p!=null&&u<=p,L=N?"bg-red-500 animate-pulse":z?"bg-amber-400":"bg-emerald-500";return m.jsxs("div",{className:"space-y-2 rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[m.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[m.jsx("span",{children:c}),m.jsx("span",{children:r})]}),m.jsxs("div",{className:"relative h-4 w-full rounded-full bg-slate-800",children:[m.jsx("div",{className:`h-full rounded-full transition-[width] ${L}`,style:{width:`${T}%`}}),m.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-black/80",children:g})]})]})}function Ub({frame:u}){const c=u?.sensors?.bumpsAndWheelDrops||{},[r,f]=_.useState(()=>Date.now());_.useEffect(()=>{const v=setInterval(()=>f(Date.now()),150);return()=>clearInterval(v)},[]);const d=u?.receivedAt?r-u.receivedAt<200:!1,p=[{label:"B-L",active:c.bumpLeft},{label:"B-R",active:c.bumpRight}],x=[{label:"Drop L",active:c.wheelDropLeft},{label:"Drop R",active:c.wheelDropRight}];return m.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col justify-between p-1 text-[0.65rem] text-slate-200",children:[m.jsxs("div",{className:"flex items-center justify-between gap-1",children:[m.jsxs("div",{className:"flex items-center gap-1 text-[0.55rem] text-slate-400",children:[m.jsx("span",{className:`h-2 w-2 rounded-full ${d?"bg-emerald-300 shadow-[0_0_4px_rgba(16,185,129,0.8)]":"bg-slate-700"}`}),m.jsx("span",{children:"sensor"})]}),m.jsx("div",{className:"flex gap-1",children:p.map(v=>m.jsx(_m,{label:v.label,active:v.active},v.label))})]}),m.jsx("div",{className:"flex justify-end gap-1",children:x.map(v=>m.jsx(_m,{label:v.label,active:v.active},v.label))})]})}function _m({label:u,active:i}){return m.jsx("span",{className:`rounded-sm px-1 py-0.5 text-[0.55rem] ${i?"bg-emerald-500/30 text-emerald-100":"bg-black/40 text-slate-500"}`,children:u})}function Bb({active:u}){return u?m.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:m.jsx("div",{className:"text-center text-sm font-semibold text-red-100 animate-pulse",children:"Overcurrent"})}):null}function Gr(){const{session:u}=Bt(),i=u?.assignment?.roverId,c=sp(i?[i]:[]),r=i?c[i]:null,f=Lr(i),p=(i&&u?.roster?u.roster.find(x=>String(x.id)===String(i)):null)?.battery??null;return m.jsx("section",{className:"rounded-sm bg-[#242a32] p-1",children:i?m.jsx("div",{className:"w-full",children:m.jsx(cp,{sessionInfo:r,label:i,muted:!1,telemetryFrame:f,batteryConfig:p})}):m.jsx("p",{className:"text-sm text-slate-400",children:"Assign a rover to view the video feed."})})}const Lb=150;function Tu(u){return typeof u!="number"||Number.isNaN(u)?"—":`${u>0?"+":""}${u.toFixed(1)}°`}function Hb(){const{roverId:u,servo:i}=ti(),c=i?.config,r=!!(u&&i?.enabled&&c),f=typeof c?.minAngle=="number"?c.minAngle:-30,d=typeof c?.maxAngle=="number"?c.maxAngle:30,p=typeof i?.angle=="number"?i.angle:typeof c?.homeAngle=="number"?c.homeAngle:(f+d)/2;if(!r)return null;const[x,v]=_.useState(p),y=_.useRef(null),T=_.useRef(!1);_.useEffect(()=>{T.current||v(p)},[p]),_.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]);const g=typeof c?.nudgeDegrees=="number"&&c.nudgeDegrees>0?c.nudgeDegrees:1,N=H=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{i.setAngle(H)},Lb)},z=H=>{const q=Number.parseFloat(H.target.value);Number.isNaN(q)||(T.current=!0,v(q),N(q))},L=()=>{T.current=!1,y.current&&clearTimeout(y.current),i.setAngle(x)},k=H=>{const q=g*H;i.nudge(q)};return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[m.jsx("span",{children:"Camera Tilt"}),m.jsx("span",{className:"font-mono text-sm text-slate-100",children:Tu(p)})]}),m.jsxs("div",{className:"mt-2",children:[m.jsx("input",{type:"range",className:"w-full accent-emerald-400",min:f,max:d,step:.5,value:x,onChange:z,onMouseUp:L,onTouchEnd:L,onPointerUp:L}),m.jsxs("div",{className:"mt-1 flex justify-between text-xs text-slate-400",children:[m.jsx("span",{children:Tu(f)}),m.jsx("span",{children:Tu(d)})]})]}),m.jsxs("div",{className:"mt-2 flex gap-1 text-sm",children:[m.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-800 px-1 py-0.5 text-slate-100 hover:bg-slate-700",onClick:()=>k(-1),children:"Tilt Down"}),m.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-700 px-1 py-0.5 text-slate-100 hover:bg-slate-600",onClick:()=>i.goHome(),children:"Center"}),m.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-800 px-1 py-0.5 text-slate-100 hover:bg-slate-700",onClick:()=>k(1),children:"Tilt Up"})]}),m.jsxs("p",{className:"mt-1 text-xs text-slate-400",children:["Step: ",Tu(g)," · Pin GPIO ",c?.pin]})]})}const qb=[{key:"start",label:"Start OI"},{key:"safe",label:"Safe"},{key:"full",label:"Full"},{key:"passive",label:"Passive"},{key:"dock",label:"Dock"}];function kb(){const{roverId:u,sendOiCommand:i}=ti(),c=ei(),r=!!u,f=_.useMemo(()=>[{key:"start",label:"Enable stream",enable:!0},{key:"stop",label:"Disable stream",enable:!1}],[]),d=p=>{u&&c.emit("command",{roverId:u,type:"sensorStream",data:{sensorStream:{enable:p}}})};return m.jsxs("div",{className:"space-y-1",children:[m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Manual OI commands"}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:qb.map(p=>m.jsx("button",{type:"button",onClick:()=>i(p.key),disabled:!r,className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-30",children:p.label},p.key))})]}),m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Sensor stream"}),m.jsx("div",{className:"mt-1 flex gap-1",children:f.map(p=>m.jsx("button",{type:"button",onClick:()=>d(p.enable),disabled:!r,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-30",children:p.label},p.key))}),!r&&m.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Assign a rover to toggle streams."})]}),m.jsx(qu,{}),m.jsx(kr,{})]})}function Yb({layout:u}){const i={desktop:["Use WASD + Shift to drive. Video must stay focused.","Macros on the left prep the rover before moving.","Switch tabs on the right for telemetry, room, and advanced tools."],"mobile-portrait":["Keep joystick centered when not driving.","Auxiliary buttons sit beside the joystick use them carefully.","Scroll to access drive/telemetry if screen space is limited."],"mobile-landscape":["Joystick and video are side by side for game-style control.","Rotate back to portrait if you need admin controls quickly.","Tabs are desktop-only; mobile shows sections stacked."]},c=i[u]||i.desktop;return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Help"}),m.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:c.map(r=>m.jsx("li",{className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200",children:r},r))})]})}function Au({active:u,onClick:i,children:c}){return m.jsx("button",{type:"button",onClick:i,className:`flex-1 rounded-sm px-1 py-1 text-xs font-semibold ${u?"bg-slate-100 text-slate-900":"bg-black/30 text-slate-300"}`,children:c})}function Xb(){return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Room controls"}),m.jsx("p",{className:"text-sm text-slate-200",children:"Coming soon: lighting, docks, and environmental toggles."})]})}function Gb({layout:u}){const[i,c]=_.useState("telemetry");return m.jsxs("section",{className:"rounded-sm bg-[#1a1d23] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex gap-1",children:[m.jsx(Au,{active:i==="telemetry",onClick:()=>c("telemetry"),children:"Rover Controls"}),m.jsx(Au,{active:i==="room",onClick:()=>c("room"),children:"Room Controls"}),m.jsx(Au,{active:i==="advanced",onClick:()=>c("advanced"),children:"Advanced"}),m.jsx(Au,{active:i==="help",onClick:()=>c("help"),children:"Help"})]}),m.jsxs("div",{className:"mt-1 space-y-1",children:[i==="telemetry"&&m.jsxs("div",{className:"space-y-1",children:[m.jsx(qr,{}),m.jsx(Hb,{}),m.jsx(Hr,{})]}),i==="room"&&m.jsxs("div",{className:"space-y-1",children:[m.jsx(Yr,{}),m.jsx(Xb,{})]}),i==="advanced"&&m.jsx(kb,{}),i==="help"&&m.jsx(Yb,{layout:u})]})]})}const Vb=new Set(["admin","lockdown","lockdown-admin"]),Qb=new Set(["admin","lockdown"]);function Zb(u="admin"){return u==="lockdown"?{title:"Lockdown in effect",description:"Only the lockdown admin can remain connected right now. If you have credentials, log in below. Otherwise please stand by until the server re-opens."}:{title:"Admin mode active",description:"The server is temporarily restricted to administrators. Log in below if you are authorized, or wait for admin mode to end."}}function Kb(){const{session:u}=Bt(),i=u?.mode,c=u?.role,r=Qb.has(i),f=Vb.has(c);if(!r||f)return null;const d=Zb(i);return m.jsx("div",{className:"pointer-events-auto fixed inset-0 z-50 flex items-center justify-center bg-black/85 px-2 py-2",children:m.jsxs("div",{className:"w-full max-w-md space-y-2 rounded-lg bg-[#141821] p-2 text-slate-100 shadow-2xl",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("p",{className:"text-lg font-semibold",children:d.title}),m.jsx("p",{className:"text-sm text-slate-300",children:d.description})]}),m.jsx("div",{className:"rounded-md bg-black/40 p-1",children:m.jsx(qu,{})}),m.jsx("p",{className:"text-xs text-slate-500",children:"Your controls are paused until access is granted. You will automatically regain the interface once the mode changes or after a successful login."})]})})}function Jb(){const{session:u}=Bt(),i=_.useMemo(()=>JSON.stringify(u??{},null,2),[u]);return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-xs text-slate-100",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Session snapshot"}),m.jsx("pre",{className:"mt-1 h-64 overflow-y-auto bg-black/40 p-1 text-[0.7rem] text-lime-300",children:i})]})}function $b(){const[u,i]=_.useState(()=>typeof window>"u"||window.innerWidth>=1024?"desktop":window.innerWidth>window.innerHeight?"mobile-landscape":"mobile-portrait");return _.useEffect(()=>{function c(){if(typeof window>"u")return;const{innerWidth:r,innerHeight:f}=window;r>=1024?i("desktop"):r>f?i("mobile-landscape"):i("mobile-portrait")}return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),u}function Wb({layout:u}){return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("section",{className:"grid grid-cols-[minmax(0,1.8fr)_minmax(0,1fr)] gap-1",children:[m.jsx(Gr,{}),m.jsx(Gb,{layout:u})]}),m.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[m.jsx(Xr,{}),m.jsx(Jb,{})]})]})}function Fb(){return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(Gr,{}),m.jsx(Cb,{}),m.jsx(qr,{}),m.jsx(Hr,{}),m.jsx(qu,{}),m.jsx(kr,{}),m.jsx(Yr,{}),m.jsx(Xr,{})]})}function Pb(){return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("section",{className:"grid grid-cols-[minmax(0,0.7fr)_minmax(0,2.1fr)_minmax(0,0.7fr)] gap-1",children:[m.jsx("div",{className:"flex flex-col gap-1",children:m.jsx(up,{})}),m.jsx(Gr,{}),m.jsx("div",{className:"flex flex-col gap-1",children:m.jsx(ip,{})})]}),m.jsx(Yr,{}),m.jsx(qr,{}),m.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(qu,{}),m.jsx(kr,{})]}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(Xr,{}),m.jsx(Hr,{})]})]})]})}function Ib(){const u=$b(),i=u==="desktop"?m.jsx(Wb,{layout:u}):u==="mobile-landscape"?m.jsx(Pb,{}):m.jsx(Fb,{});return m.jsx("div",{className:"min-h-screen bg-black text-slate-50",children:m.jsxs(yb,{children:[m.jsx("main",{className:"flex w-full flex-col gap-1 px-1 py-1 text-base",children:i}),m.jsx(bb,{}),m.jsx(Kb,{})]})})}function e1(){const{session:u,setRole:i,subscribeAll:c}=Bt(),[r,f]=_.useState(!1);return _.useEffect(()=>{let d=!1;async function p(){try{u?.role!=="spectator"&&await i("spectator"),await c(),d||f(!0)}catch(x){console.error("Failed to enter spectator mode",x)}}return p(),()=>{d=!0}},[u?.role,i,c]),r}function t1({connected:u,ready:i,rosterCount:c}){return m.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[m.jsx("span",{className:`rounded-full px-3 py-1 font-semibold ${u?"bg-emerald-500/20 text-emerald-200":"bg-red-500/20 text-red-200"}`,children:u?"Connected":"Disconnected"}),m.jsxs("span",{className:`rounded-full px-3 py-1 ${i?"bg-blue-600/40 text-blue-100":"bg-slate-700 text-slate-200"}`,children:["Spectator mode ",i?"active":"pending…"]}),m.jsxs("span",{className:"rounded-full bg-slate-800 px-3 py-1 text-slate-200",children:["Rovers: ",c]})]})}function n1({logs:u}){return m.jsxs("section",{className:"rounded-3xl border border-slate-800 bg-slate-900/70 p-4",children:[m.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[m.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),m.jsxs("span",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:["latest ",u.length]})]}),m.jsx("div",{className:"h-60 overflow-y-auto rounded-2xl bg-slate-950/40 p-3 text-xs font-mono text-slate-300",children:u.length===0?m.jsx("p",{children:"No log entries yet."}):u.slice().reverse().map(i=>m.jsxs("div",{className:"mb-2",children:[m.jsx("span",{className:"text-slate-500",children:i.timestamp})," ",m.jsxs("span",{className:"text-cyan-300",children:["[",i.level,"]"]})," ",i.label&&m.jsxs("span",{className:"text-pink-300",children:["[",i.label,"]"]})," ",m.jsx("span",{children:i.message})]},i.id))})]})}function l1(u={}){return Object.entries(u).map(([i,c])=>({key:i,value:typeof c=="object"?JSON.stringify(c):c}))}function a1({rover:u,frame:i,videoInfo:c}){const r=l1(i?.sensors);return m.jsxs("article",{className:"space-y-4 rounded-3xl border border-slate-800 bg-slate-900/70 p-5",children:[m.jsxs("header",{className:"flex flex-col gap-1",children:[m.jsx("h3",{className:"text-2xl font-semibold text-white",children:u.name}),m.jsx("p",{className:"text-sm text-slate-400",children:i?.receivedAt?`Updated ${new Date(i.receivedAt).toLocaleTimeString()}`:"Waiting for telemetry…"})]}),m.jsx(cp,{sessionInfo:c,label:u.name,forceMute:!0}),m.jsxs("section",{className:"rounded-2xl border border-slate-800/80 bg-slate-950/50 p-4",children:[m.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Telemetry"}),r.length===0?m.jsx("p",{className:"mt-3 text-sm text-slate-400",children:"No sensor data yet."}):m.jsx("dl",{className:"mt-3 grid gap-2 text-sm text-slate-200",children:r.map(({key:f,value:d})=>m.jsxs("div",{className:"flex justify-between gap-4",children:[m.jsx("dt",{className:"text-slate-500",children:f}),m.jsx("dd",{className:"text-right font-semibold text-white",children:d})]},f))})]})]})}function i1(){const{connected:u,session:i,logs:c}=Bt(),r=e1(),f=lp(),d=i?.roster??[],p=sp(d.map(v=>v.id)),x=_.useMemo(()=>({connected:u,ready:r,rosterCount:d.length}),[u,r,d.length]);return m.jsx("div",{className:"min-h-screen bg-slate-950 text-slate-50",children:m.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-6 px-6 py-10",children:[m.jsxs("header",{className:"space-y-3",children:[m.jsx("h1",{className:"text-4xl font-semibold text-white",children:"Spectator Console"}),m.jsx("p",{className:"text-slate-400",children:"Live rover telemetry & logs. This view is read-only."}),m.jsx(t1,{...x})]}),m.jsx("section",{className:"grid gap-6 lg:grid-cols-3",children:d.length===0?m.jsx("p",{className:"col-span-full text-slate-400",children:"No rovers registered."}):d.map(v=>m.jsx(a1,{rover:v,frame:f[v.id],videoInfo:p[v.id]},v.id))}),m.jsx(n1,{logs:c})]})})}Y0.createRoot(document.getElementById("root")).render(m.jsx(_.StrictMode,{children:m.jsx(ib,{children:m.jsx(sb,{children:m.jsx(cb,{children:m.jsx(ng,{children:m.jsxs(Dv,{children:[m.jsx(gr,{path:"/",element:m.jsx(Ib,{})}),m.jsx(gr,{path:"/spectate",element:m.jsx(i1,{})})]})})})})})}));