Files
MultiRoombaRover/server/public/assets/index-CCsZswS4.js
T
2025-11-17 04:35:16 -05:00

12 lines
304 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 h of f)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function c(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(f){if(f.ep)return;f.ep=!0;const h=c(f);fetch(f.href,h)}})();var lr={exports:{}},Ga={};var Qd;function M0(){if(Qd)return Ga;Qd=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(r,f,h){var m=null;if(h!==void 0&&(m=""+h),f.key!==void 0&&(m=""+f.key),"key"in f){h={};for(var b in f)b!=="key"&&(h[b]=f[b])}else h=f;return f=h.ref,{$$typeof:u,type:r,key:m,ref:f!==void 0?f:null,props:h}}return Ga.Fragment=i,Ga.jsx=c,Ga.jsxs=c,Ga}var Zd;function D0(){return Zd||(Zd=1,lr.exports=M0()),lr.exports}var p=D0(),ar={exports:{}},I={};var Kd;function j0(){if(Kd)return I;Kd=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"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),C=Symbol.iterator;function z(_){return _===null||typeof _!="object"?null:(_=C&&_[C]||_["@@iterator"],typeof _=="function"?_:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,q={};function H(_,B,V){this.props=_,this.context=B,this.refs=q,this.updater=V||L}H.prototype.isReactComponent={},H.prototype.setState=function(_,B){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,B,"setState")},H.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function Y(){}Y.prototype=H.prototype;function k(_,B,V){this.props=_,this.context=B,this.refs=q,this.updater=V||L}var F=k.prototype=new Y;F.constructor=k,X(F,H.prototype),F.isPureReactComponent=!0;var ye=Array.isArray;function Re(){}var $={H:null,A:null,T:null,S:null},Te=Object.prototype.hasOwnProperty;function xe(_,B,V){var Z=V.ref;return{$$typeof:u,type:_,key:B,ref:Z!==void 0?Z:null,props:V}}function Ue(_,B){return xe(_.type,B,_.props)}function Xe(_){return typeof _=="object"&&_!==null&&_.$$typeof===u}function We(_){var B={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(V){return B[V]})}var Hn=/\/+/g;function Xt(_,B){return typeof _=="object"&&_!==null&&_.key!=null?We(""+_.key):B.toString(36)}function Nt(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(Re,Re):(_.status="pending",_.then(function(B){_.status==="pending"&&(_.status="fulfilled",_.value=B)},function(B){_.status==="pending"&&(_.status="rejected",_.reason=B)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function j(_,B,V,Z,ee){var le=typeof _;(le==="undefined"||le==="boolean")&&(_=null);var de=!1;if(_===null)de=!0;else switch(le){case"bigint":case"string":case"number":de=!0;break;case"object":switch(_.$$typeof){case u:case i:de=!0;break;case T:return de=_._init,j(de(_._payload),B,V,Z,ee)}}if(de)return ee=ee(_),de=Z===""?"."+Xt(_,0):Z,ye(ee)?(V="",de!=null&&(V=de.replace(Hn,"$&/")+"/"),j(ee,B,V,"",function(Wl){return Wl})):ee!=null&&(Xe(ee)&&(ee=Ue(ee,V+(ee.key==null||_&&_.key===ee.key?"":(""+ee.key).replace(Hn,"$&/")+"/")+de)),B.push(ee)),1;de=0;var Pe=Z===""?".":Z+":";if(ye(_))for(var De=0;De<_.length;De++)Z=_[De],le=Pe+Xt(Z,De),de+=j(Z,B,V,le,ee);else if(De=z(_),typeof De=="function")for(_=De.call(_),De=0;!(Z=_.next()).done;)Z=Z.value,le=Pe+Xt(Z,De++),de+=j(Z,B,V,le,ee);else if(le==="object"){if(typeof _.then=="function")return j(Nt(_),B,V,Z,ee);throw B=String(_),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return de}function G(_,B,V){if(_==null)return _;var Z=[],ee=0;return j(_,Z,"","",function(le){return B.call(V,le,ee++)}),Z}function P(_){if(_._status===-1){var B=_._result;B=B(),B.then(function(V){(_._status===0||_._status===-1)&&(_._status=1,_._result=V)},function(V){(_._status===0||_._status===-1)&&(_._status=2,_._result=V)}),_._status===-1&&(_._status=0,_._result=B)}if(_._status===1)return _._result.default;throw _._result}var ve=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},_e={map:G,forEach:function(_,B,V){G(_,function(){B.apply(this,arguments)},V)},count:function(_){var B=0;return G(_,function(){B++}),B},toArray:function(_){return G(_,function(B){return B})||[]},only:function(_){if(!Xe(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return I.Activity=S,I.Children=_e,I.Component=H,I.Fragment=c,I.Profiler=f,I.PureComponent=k,I.StrictMode=r,I.Suspense=y,I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,I.__COMPILER_RUNTIME={__proto__:null,c:function(_){return $.H.useMemoCache(_)}},I.cache=function(_){return function(){return _.apply(null,arguments)}},I.cacheSignal=function(){return null},I.cloneElement=function(_,B,V){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var Z=X({},_.props),ee=_.key;if(B!=null)for(le in B.key!==void 0&&(ee=""+B.key),B)!Te.call(B,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&B.ref===void 0||(Z[le]=B[le]);var le=arguments.length-2;if(le===1)Z.children=V;else if(1<le){for(var de=Array(le),Pe=0;Pe<le;Pe++)de[Pe]=arguments[Pe+2];Z.children=de}return xe(_.type,ee,Z)},I.createContext=function(_){return _={$$typeof:m,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:h,_context:_},_},I.createElement=function(_,B,V){var Z,ee={},le=null;if(B!=null)for(Z in B.key!==void 0&&(le=""+B.key),B)Te.call(B,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=B[Z]);var de=arguments.length-2;if(de===1)ee.children=V;else if(1<de){for(var Pe=Array(de),De=0;De<de;De++)Pe[De]=arguments[De+2];ee.children=Pe}if(_&&_.defaultProps)for(Z in de=_.defaultProps,de)ee[Z]===void 0&&(ee[Z]=de[Z]);return xe(_,le,ee)},I.createRef=function(){return{current:null}},I.forwardRef=function(_){return{$$typeof:b,render:_}},I.isValidElement=Xe,I.lazy=function(_){return{$$typeof:T,_payload:{_status:-1,_result:_},_init:P}},I.memo=function(_,B){return{$$typeof:v,type:_,compare:B===void 0?null:B}},I.startTransition=function(_){var B=$.T,V={};$.T=V;try{var Z=_(),ee=$.S;ee!==null&&ee(V,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(Re,ve)}catch(le){ve(le)}finally{B!==null&&V.types!==null&&(B.types=V.types),$.T=B}},I.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},I.use=function(_){return $.H.use(_)},I.useActionState=function(_,B,V){return $.H.useActionState(_,B,V)},I.useCallback=function(_,B){return $.H.useCallback(_,B)},I.useContext=function(_){return $.H.useContext(_)},I.useDebugValue=function(){},I.useDeferredValue=function(_,B){return $.H.useDeferredValue(_,B)},I.useEffect=function(_,B){return $.H.useEffect(_,B)},I.useEffectEvent=function(_){return $.H.useEffectEvent(_)},I.useId=function(){return $.H.useId()},I.useImperativeHandle=function(_,B,V){return $.H.useImperativeHandle(_,B,V)},I.useInsertionEffect=function(_,B){return $.H.useInsertionEffect(_,B)},I.useLayoutEffect=function(_,B){return $.H.useLayoutEffect(_,B)},I.useMemo=function(_,B){return $.H.useMemo(_,B)},I.useOptimistic=function(_,B){return $.H.useOptimistic(_,B)},I.useReducer=function(_,B,V){return $.H.useReducer(_,B,V)},I.useRef=function(_){return $.H.useRef(_)},I.useState=function(_){return $.H.useState(_)},I.useSyncExternalStore=function(_,B,V){return $.H.useSyncExternalStore(_,B,V)},I.useTransition=function(){return $.H.useTransition()},I.version="19.2.0",I}var Jd;function Mu(){return Jd||(Jd=1,ar.exports=j0()),ar.exports}var E=Mu(),ir={exports:{}},Va={},ur={exports:{}},sr={};var $d;function w0(){return $d||($d=1,(function(u){function i(j,G){var P=j.length;j.push(G);e:for(;0<P;){var ve=P-1>>>1,_e=j[ve];if(0<f(_e,G))j[ve]=G,j[P]=_e,P=ve;else break e}}function c(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var G=j[0],P=j.pop();if(P!==G){j[0]=P;e:for(var ve=0,_e=j.length,_=_e>>>1;ve<_;){var B=2*(ve+1)-1,V=j[B],Z=B+1,ee=j[Z];if(0>f(V,P))Z<_e&&0>f(ee,V)?(j[ve]=ee,j[Z]=P,ve=Z):(j[ve]=V,j[B]=P,ve=B);else if(Z<_e&&0>f(ee,P))j[ve]=ee,j[Z]=P,ve=Z;else break e}}return G}function f(j,G){var P=j.sortIndex-G.sortIndex;return P!==0?P:j.id-G.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var m=Date,b=m.now();u.unstable_now=function(){return m.now()-b}}var y=[],v=[],T=1,S=null,C=3,z=!1,L=!1,X=!1,q=!1,H=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function F(j){for(var G=c(v);G!==null;){if(G.callback===null)r(v);else if(G.startTime<=j)r(v),G.sortIndex=G.expirationTime,i(y,G);else break;G=c(v)}}function ye(j){if(X=!1,F(j),!L)if(c(y)!==null)L=!0,Re||(Re=!0,We());else{var G=c(v);G!==null&&Nt(ye,G.startTime-j)}}var Re=!1,$=-1,Te=5,xe=-1;function Ue(){return q?!0:!(u.unstable_now()-xe<Te)}function Xe(){if(q=!1,Re){var j=u.unstable_now();xe=j;var G=!0;try{e:{L=!1,X&&(X=!1,Y($),$=-1),z=!0;var P=C;try{t:{for(F(j),S=c(y);S!==null&&!(S.expirationTime>j&&Ue());){var ve=S.callback;if(typeof ve=="function"){S.callback=null,C=S.priorityLevel;var _e=ve(S.expirationTime<=j);if(j=u.unstable_now(),typeof _e=="function"){S.callback=_e,F(j),G=!0;break t}S===c(y)&&r(y),F(j)}else r(y);S=c(y)}if(S!==null)G=!0;else{var _=c(v);_!==null&&Nt(ye,_.startTime-j),G=!1}}break e}finally{S=null,C=P,z=!1}G=void 0}}finally{G?We():Re=!1}}}var We;if(typeof k=="function")We=function(){k(Xe)};else if(typeof MessageChannel<"u"){var Hn=new MessageChannel,Xt=Hn.port2;Hn.port1.onmessage=Xe,We=function(){Xt.postMessage(null)}}else We=function(){H(Xe,0)};function Nt(j,G){$=H(function(){j(u.unstable_now())},G)}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(j){j.callback=null},u.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<j?Math.floor(1e3/j):5},u.unstable_getCurrentPriorityLevel=function(){return C},u.unstable_next=function(j){switch(C){case 1:case 2:case 3:var G=3;break;default:G=C}var P=C;C=G;try{return j()}finally{C=P}},u.unstable_requestPaint=function(){q=!0},u.unstable_runWithPriority=function(j,G){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var P=C;C=j;try{return G()}finally{C=P}},u.unstable_scheduleCallback=function(j,G,P){var ve=u.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?ve+P:ve):P=ve,j){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=P+_e,j={id:T++,callback:G,priorityLevel:j,startTime:P,expirationTime:_e,sortIndex:-1},P>ve?(j.sortIndex=P,i(v,j),c(y)===null&&j===c(v)&&(X?(Y($),$=-1):X=!0,Nt(ye,P-ve))):(j.sortIndex=_e,i(y,j),L||z||(L=!0,Re||(Re=!0,We()))),j},u.unstable_shouldYield=Ue,u.unstable_wrapCallback=function(j){var G=C;return function(){var P=C;C=G;try{return j.apply(this,arguments)}finally{C=P}}}})(sr)),sr}var Wd;function U0(){return Wd||(Wd=1,ur.exports=w0()),ur.exports}var cr={exports:{}},Fe={};var Fd;function B0(){if(Fd)return Fe;Fd=1;var u=Mu();function i(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)v+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+y+"; visit "+v+" 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 h(y,v,T){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:y,containerInfo:v,implementation:T}}var m=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Fe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Fe.createPortal=function(y,v){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return h(y,v,null,T)},Fe.flushSync=function(y){var v=m.T,T=r.p;try{if(m.T=null,r.p=2,y)return y()}finally{m.T=v,r.p=T,r.d.f()}},Fe.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(y,v))},Fe.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},Fe.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var T=v.as,S=b(T,v.crossOrigin),C=typeof v.integrity=="string"?v.integrity:void 0,z=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;T==="style"?r.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:S,integrity:C,fetchPriority:z}):T==="script"&&r.d.X(y,{crossOrigin:S,integrity:C,fetchPriority:z,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Fe.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var T=b(v.as,v.crossOrigin);r.d.M(y,{crossOrigin:T,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&r.d.M(y)},Fe.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var T=v.as,S=b(T,v.crossOrigin);r.d.L(y,T,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Fe.preloadModule=function(y,v){if(typeof y=="string")if(v){var T=b(v.as,v.crossOrigin);r.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:T,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else r.d.m(y)},Fe.requestFormReset=function(y){r.d.r(y)},Fe.unstable_batchedUpdates=function(y,v){return y(v)},Fe.useFormState=function(y,v,T){return m.H.useFormState(y,v,T)},Fe.useFormStatus=function(){return m.H.useHostTransitionStatus()},Fe.version="19.2.0",Fe}var Pd;function L0(){if(Pd)return cr.exports;Pd=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(),cr.exports=B0(),cr.exports}var Id;function H0(){if(Id)return Va;Id=1;var u=U0(),i=Mu(),c=L0();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 h(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 m(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 b(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 y(e){if(h(e)!==e)throw Error(r(188))}function v(e){var t=e.alternate;if(!t){if(t=h(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 y(a),e;if(s===l)return y(a),t;s=s.sibling}throw Error(r(188))}if(n.return!==l.return)n=a,l=s;else{for(var o=!1,d=a.child;d;){if(d===n){o=!0,n=a,l=s;break}if(d===l){o=!0,l=a,n=s;break}d=d.sibling}if(!o){for(d=s.child;d;){if(d===n){o=!0,n=s,l=a;break}if(d===l){o=!0,l=s,n=a;break}d=d.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 S=Object.assign,C=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),k=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),ye=Symbol.for("react.suspense"),Re=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),xe=Symbol.for("react.activity"),Ue=Symbol.for("react.memo_cache_sentinel"),Xe=Symbol.iterator;function We(e){return e===null||typeof e!="object"?null:(e=Xe&&e[Xe]||e["@@iterator"],typeof e=="function"?e:null)}var Hn=Symbol.for("react.client.reference");function Xt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Hn?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case H:return"Profiler";case q:return"StrictMode";case ye:return"Suspense";case Re:return"SuspenseList";case xe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case k:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case F:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:Xt(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return Xt(e(t))}catch{}}return null}var Nt=Array.isArray,j=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},ve=[],_e=-1;function _(e){return{current:e}}function B(e){0>_e||(e.current=ve[_e],ve[_e]=null,_e--)}function V(e,t){_e++,ve[_e]=e.current,e.current=t}var Z=_(null),ee=_(null),le=_(null),de=_(null);function Pe(e,t){switch(V(le,t),V(ee,e),V(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?md(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=md(t),e=pd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(Z),V(Z,e)}function De(){B(Z),B(ee),B(le)}function Wl(e){e.memoizedState!==null&&V(de,e);var t=Z.current,n=pd(t,e.type);t!==n&&(V(ee,e),V(Z,n))}function ti(e){ee.current===e&&(B(Z),B(ee)),de.current===e&&(B(de),qa._currentValue=P)}var qu,Xr;function qn(e){if(qu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qu=t&&t[1]||"",Xr=-1<n.stack.indexOf(`
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+qu+e+Xr}var Yu=!1;function ku(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],d=s[1];if(o&&d){var g=o.split(`
`),N=d.split(`
`);for(a=l=0;l<g.length&&!g[l].includes("DetermineComponentFrameRoot");)l++;for(;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;if(l===g.length||a===N.length)for(l=g.length-1,a=N.length-1;1<=l&&0<=a&&g[l]!==N[a];)a--;for(;1<=l&&0<=a;l--,a--)if(g[l]!==N[a]){if(l!==1||a!==1)do if(l--,a--,0>a||g[l]!==N[a]){var D=`
`+g[l].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),D}while(1<=l&&0<=a);break}}}finally{Yu=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qn(n):""}function cp(e,t){switch(e.tag){case 26:case 27:case 5:return qn(e.type);case 16:return qn("Lazy");case 13:return e.child!==t&&t!==null?qn("Suspense Fallback"):qn("Suspense");case 19:return qn("SuspenseList");case 0:case 15:return ku(e.type,!1);case 11:return ku(e.type.render,!1);case 1:return ku(e.type,!0);case 31:return qn("Activity");default:return""}}function Gr(e){try{var t="",n=null;do t+=cp(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
Error generating stack: `+l.message+`
`+l.stack}}var Xu=Object.prototype.hasOwnProperty,Gu=u.unstable_scheduleCallback,Vu=u.unstable_cancelCallback,rp=u.unstable_shouldYield,op=u.unstable_requestPaint,st=u.unstable_now,fp=u.unstable_getCurrentPriorityLevel,Vr=u.unstable_ImmediatePriority,Qr=u.unstable_UserBlockingPriority,ni=u.unstable_NormalPriority,hp=u.unstable_LowPriority,Zr=u.unstable_IdlePriority,dp=u.log,mp=u.unstable_setDisableYieldValue,Fl=null,ct=null;function hn(e){if(typeof dp=="function"&&mp(e),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(Fl,e)}catch{}}var rt=Math.clz32?Math.clz32:vp,pp=Math.log,yp=Math.LN2;function vp(e){return e>>>=0,e===0?32:31-(pp(e)/yp|0)|0}var li=256,ai=262144,ii=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 ui(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 d=l&134217727;return d!==0?(l=d&~s,l!==0?a=Yn(l):(o&=d,o!==0?a=Yn(o):n||(n=d&~e,n!==0&&(a=Yn(n))))):(d=l&~s,d!==0?a=Yn(d):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 gp(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 Kr(){var e=ii;return ii<<=1,(ii&62914560)===0&&(ii=4194304),e}function Qu(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 bp(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 d=e.entanglements,g=e.expirationTimes,N=e.hiddenUpdates;for(n=o&~n;0<n;){var D=31-rt(n),U=1<<D;d[D]=0,g[D]=-1;var O=N[D];if(O!==null)for(N[D]=null,D=0;D<O.length;D++){var M=O[D];M!==null&&(M.lane&=-536870913)}n&=~U}l!==0&&Jr(e,l,0),s!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=s&~(o&~t))}function Jr(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-rt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function $r(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-rt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Wr(e,t){var n=t&-t;return n=(n&42)!==0?1:Zu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Zu(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 Ku(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fr(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:Hd(e.type))}function Pr(e,t){var n=G.p;try{return G.p=e,t()}finally{G.p=n}}var dn=Math.random().toString(36).slice(2),Qe="__reactFiber$"+dn,et="__reactProps$"+dn,cl="__reactContainer$"+dn,Ju="__reactEvents$"+dn,Sp="__reactListeners$"+dn,xp="__reactHandles$"+dn,Ir="__reactResources$"+dn,ea="__reactMarker$"+dn;function $u(e){delete e[Qe],delete e[et],delete e[Ju],delete e[Sp],delete e[xp]}function rl(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cl]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_d(e);e!==null;){if(n=e[Qe])return n;e=_d(e)}return t}e=n,n=e.parentNode}return null}function ol(e){if(e=e[Qe]||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[Ir];return t||(t=e[Ir]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ge(e){e[ea]=!0}var eo=new Set,to={};function kn(e,t){hl(e,t),hl(e+"Capture",t)}function hl(e,t){for(to[e]=t,e=0;e<t.length;e++)eo.add(t[e])}var _p=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]*$"),no={},lo={};function Ep(e){return Xu.call(lo,e)?!0:Xu.call(no,e)?!1:_p.test(e)?lo[e]=!0:(no[e]=!0,!1)}function si(e,t,n){if(Ep(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 ci(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 Gt(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 vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ao(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tp(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 Wu(e){if(!e._valueTracker){var t=ao(e)?"checked":"value";e._valueTracker=Tp(e,t,""+e[t])}}function io(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=ao(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function ri(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 Ap=/[\n"\\]/g;function gt(e){return e.replace(Ap,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Fu(e,t,n,l,a,s,o,d){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=""+vt(t)):e.value!==""+vt(t)&&(e.value=""+vt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Pu(e,o,vt(t)):n!=null?Pu(e,o,vt(n)):l!=null&&e.removeAttribute("value"),a==null&&s!=null&&(e.defaultChecked=!!s),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+vt(d):e.removeAttribute("name")}function uo(e,t,n,l,a,s,o,d){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)){Wu(e);return}n=n!=null?""+vt(n):"",t=t!=null?""+vt(t):n,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Wu(e)}function Pu(e,t,n){t==="number"&&ri(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function dl(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=""+vt(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 so(e,t,n){if(t!=null&&(t=""+vt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+vt(n):""}function co(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(Nt(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=vt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Wu(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 ro(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 oo(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&&ro(e,a,l)}else for(var s in t)t.hasOwnProperty(s)&&ro(e,s,t[s])}function Iu(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"]]),Np=/^[\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 oi(e){return Np.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Vt(){}var es=null;function ts(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 fo(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(Fu(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="'+gt(""+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));Fu(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&&io(l)}break e;case"textarea":so(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&dl(e,!!n.multiple,t,!1)}}}var ns=!1;function ho(e,t,n){if(ns)return e(t,n);ns=!0;try{var l=e(t);return l}finally{if(ns=!1,(pl!==null||yl!==null)&&(Fi(),pl&&(t=pl,e=yl,yl=pl=null,fo(t),e)))for(t=0;t<e.length;t++)fo(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 Qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ls=!1;if(Qt)try{var la={};Object.defineProperty(la,"passive",{get:function(){ls=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{ls=!1}var mn=null,as=null,fi=null;function mo(){if(fi)return fi;var e,t=as,n=t.length,l,a="value"in mn?mn.value:mn.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 fi=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 di(){return!0}function po(){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 d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(s):s[d]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?di:po,this.isPropagationStopped=po,this}return S(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=di)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=di)},persist:function(){},isPersistent:di}),t}var Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mi=tt(Xn),aa=S({},Xn,{view:0,detail:0}),Op=tt(aa),is,us,ia,pi=S({},aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cs,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"?(is=e.screenX-ia.screenX,us=e.screenY-ia.screenY):us=is=0,ia=e),is)},movementY:function(e){return"movementY"in e?e.movementY:us}}),yo=tt(pi),zp=S({},pi,{dataTransfer:0}),Mp=tt(zp),Dp=S({},aa,{relatedTarget:0}),ss=tt(Dp),jp=S({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),wp=tt(jp),Up=S({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bp=tt(Up),Lp=S({},Xn,{data:0}),vo=tt(Lp),Hp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qp={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 kp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yp[e])?!!t[e]:!1}function cs(){return kp}var Xp=S({},aa,{key:function(e){if(e.key){var t=Hp[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"?qp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cs,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}}),Gp=tt(Xp),Vp=S({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),go=tt(Vp),Qp=S({},aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cs}),Zp=tt(Qp),Kp=S({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jp=tt(Kp),$p=S({},pi,{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}),Wp=tt($p),Fp=S({},Xn,{newState:0,oldState:0}),Pp=tt(Fp),Ip=[9,13,27,32],rs=Qt&&"CompositionEvent"in window,ua=null;Qt&&"documentMode"in document&&(ua=document.documentMode);var ey=Qt&&"TextEvent"in window&&!ua,bo=Qt&&(!rs||ua&&8<ua&&11>=ua),So=" ",xo=!1;function _o(e,t){switch(e){case"keyup":return Ip.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vl=!1;function ty(e,t){switch(e){case"compositionend":return Eo(t);case"keypress":return t.which!==32?null:(xo=!0,So);case"textInput":return e=t.data,e===So&&xo?null:e;default:return null}}function ny(e,t){if(vl)return e==="compositionend"||!rs&&_o(e,t)?(e=mo(),fi=as=mn=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 bo&&t.locale!=="ko"?null:t.data;default:return null}}var ly={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 To(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ly[e.type]:t==="textarea"}function Ao(e,t,n,l){pl?yl?yl.push(l):yl=[l]:pl=l,t=au(t,"onChange"),0<t.length&&(n=new mi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var sa=null,ca=null;function ay(e){cd(e,0)}function yi(e){var t=ta(e);if(io(t))return e}function Co(e,t){if(e==="change")return t}var Ro=!1;if(Qt){var os;if(Qt){var fs="oninput"in document;if(!fs){var No=document.createElement("div");No.setAttribute("oninput","return;"),fs=typeof No.oninput=="function"}os=fs}else os=!1;Ro=os&&(!document.documentMode||9<document.documentMode)}function Oo(){sa&&(sa.detachEvent("onpropertychange",zo),ca=sa=null)}function zo(e){if(e.propertyName==="value"&&yi(ca)){var t=[];Ao(t,ca,e,ts(e)),ho(ay,t)}}function iy(e,t,n){e==="focusin"?(Oo(),sa=t,ca=n,sa.attachEvent("onpropertychange",zo)):e==="focusout"&&Oo()}function uy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yi(ca)}function sy(e,t){if(e==="click")return yi(t)}function cy(e,t){if(e==="input"||e==="change")return yi(t)}function ry(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ot=typeof Object.is=="function"?Object.is:ry;function ra(e,t){if(ot(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(!Xu.call(t,a)||!ot(e[a],t[a]))return!1}return!0}function Mo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Do(e,t){var n=Mo(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=Mo(n)}}function jo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ri(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=ri(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 oy=Qt&&"documentMode"in document&&11>=document.documentMode,gl=null,ds=null,oa=null,ms=!1;function Uo(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ms||gl==null||gl!==ri(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=au(ds,"onSelect"),0<l.length&&(t=new mi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=gl)))}function Gn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bl={animationend:Gn("Animation","AnimationEnd"),animationiteration:Gn("Animation","AnimationIteration"),animationstart:Gn("Animation","AnimationStart"),transitionrun:Gn("Transition","TransitionRun"),transitionstart:Gn("Transition","TransitionStart"),transitioncancel:Gn("Transition","TransitionCancel"),transitionend:Gn("Transition","TransitionEnd")},ps={},Bo={};Qt&&(Bo=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 Vn(e){if(ps[e])return ps[e];if(!bl[e])return e;var t=bl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Bo)return ps[e]=t[n];return e}var Lo=Vn("animationend"),Ho=Vn("animationiteration"),qo=Vn("animationstart"),fy=Vn("transitionrun"),hy=Vn("transitionstart"),dy=Vn("transitioncancel"),Yo=Vn("transitionend"),ko=new Map,ys="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(" ");ys.push("scrollEnd");function Ot(e,t){ko.set(e,t),kn(t,[e])}var vi=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)},bt=[],Sl=0,vs=0;function gi(){for(var e=Sl,t=vs=Sl=0;t<e;){var n=bt[t];bt[t++]=null;var l=bt[t];bt[t++]=null;var a=bt[t];bt[t++]=null;var s=bt[t];if(bt[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&&Xo(n,a,s)}}function bi(e,t,n,l){bt[Sl++]=e,bt[Sl++]=t,bt[Sl++]=n,bt[Sl++]=l,vs|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function gs(e,t,n,l){return bi(e,t,n,l),Si(e)}function Qn(e,t){return bi(e,null,null,t),Si(e)}function Xo(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-rt(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<Da)throw Da=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 xl={};function my(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 ft(e,t,n,l){return new my(e,t,n,l)}function bs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zt(e,t){var n=e.alternate;return n===null?(n=ft(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 Go(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 xi(e,t,n,l,a,s){var o=0;if(l=e,typeof e=="function")bs(e)&&(o=1);else if(typeof e=="string")o=b0(e,n,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case xe:return e=ft(31,n,t,a),e.elementType=xe,e.lanes=s,e;case X:return Zn(n.children,a,s,t);case q:o=8,a|=24;break;case H:return e=ft(12,n,t,a|2),e.elementType=H,e.lanes=s,e;case ye:return e=ft(13,n,t,a),e.elementType=ye,e.lanes=s,e;case Re:return e=ft(19,n,t,a),e.elementType=Re,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:o=10;break e;case Y:o=9;break e;case F:o=11;break e;case $:o=14;break e;case Te:o=16,l=null;break e}o=29,n=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=ft(o,n,t,a),t.elementType=e,t.type=l,t.lanes=s,t}function Zn(e,t,n,l){return e=ft(7,e,l,t),e.lanes=n,e}function Ss(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function Vo(e){var t=ft(18,null,null,0);return t.stateNode=e,t}function xs(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qo=new WeakMap;function St(e,t){if(typeof e=="object"&&e!==null){var n=Qo.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Gr(t)},Qo.set(e,t),t)}return{value:e,source:t,stack:Gr(t)}}var _l=[],El=0,_i=null,fa=0,xt=[],_t=0,pn=null,wt=1,Ut="";function Kt(e,t){_l[El++]=fa,_l[El++]=_i,_i=e,fa=t}function Zo(e,t,n){xt[_t++]=wt,xt[_t++]=Ut,xt[_t++]=pn,pn=e;var l=wt;e=Ut;var a=32-rt(l)-1;l&=~(1<<a),n+=1;var s=32-rt(t)+a;if(30<s){var o=a-a%5;s=(l&(1<<o)-1).toString(32),l>>=o,a-=o,wt=1<<32-rt(t)+a|n<<a|l,Ut=s+e}else wt=1<<s|n<<a|l,Ut=e}function _s(e){e.return!==null&&(Kt(e,1),Zo(e,1,0))}function Es(e){for(;e===_i;)_i=_l[--El],_l[El]=null,fa=_l[--El],_l[El]=null;for(;e===pn;)pn=xt[--_t],xt[_t]=null,Ut=xt[--_t],xt[_t]=null,wt=xt[--_t],xt[_t]=null}function Ko(e,t){xt[_t++]=wt,xt[_t++]=Ut,xt[_t++]=pn,wt=t.id,Ut=t.overflow,pn=e}var Ze=null,Ae=null,ce=!1,yn=null,Et=!1,Ts=Error(r(519));function vn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ha(St(t,e)),Ts}function Jo(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Qe]=e,t[et]=l,n){case"dialog":ie("cancel",t),ie("close",t);break;case"iframe":case"object":case"embed":ie("load",t);break;case"video":case"audio":for(n=0;n<wa.length;n++)ie(wa[n],t);break;case"source":ie("error",t);break;case"img":case"image":case"link":ie("error",t),ie("load",t);break;case"details":ie("toggle",t);break;case"input":ie("invalid",t),uo(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ie("invalid",t);break;case"textarea":ie("invalid",t),co(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||hd(t.textContent,n)?(l.popover!=null&&(ie("beforetoggle",t),ie("toggle",t)),l.onScroll!=null&&ie("scroll",t),l.onScrollEnd!=null&&ie("scrollend",t),l.onClick!=null&&(t.onclick=Vt),t=!0):t=!1,t||vn(e,!0)}function $o(e){for(Ze=e.return;Ze;)switch(Ze.tag){case 5:case 31:case 13:Et=!1;return;case 27:case 3:Et=!0;return;default:Ze=Ze.return}}function Tl(e){if(e!==Ze)return!1;if(!ce)return $o(e),ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Xc(e.type,e.memoizedProps)),n=!n),n&&Ae&&vn(e),$o(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ae=xd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ae=xd(e)}else t===27?(t=Ae,Mn(e.type)?(e=Kc,Kc=null,Ae=e):Ae=t):Ae=Ze?At(e.stateNode.nextSibling):null;return!0}function Kn(){Ae=Ze=null,ce=!1}function As(){var e=yn;return e!==null&&(it===null?it=e:it.push.apply(it,e),yn=null),e}function ha(e){yn===null?yn=[e]:yn.push(e)}var Cs=_(null),Jn=null,Jt=null;function gn(e,t,n){V(Cs,t._currentValue),t._currentValue=n}function $t(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 Ns(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 d=s;s=a;for(var g=0;g<t.length;g++)if(d.context===t[g]){s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),Rs(s.return,n,e),l||(o=null);break e}s=d.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 d=a.type;ot(a.pendingProps.value,o.value)||(e!==null?e.push(d):e=[d])}}else if(a===de.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&&Ns(t,e,n,l),t.flags|=262144}function Ei(e){for(e=e.firstContext;e!==null;){if(!ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $n(e){Jn=e,Jt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ke(e){return Wo(Jn,e)}function Ti(e,t){return Jn===null&&$n(e),Wo(e,t)}function Wo(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Jt===null){if(e===null)throw Error(r(308));Jt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jt=Jt.next=t;return n}var py=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()})}},yy=u.unstable_scheduleCallback,vy=u.unstable_NormalPriority,Be={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Os(){return{controller:new py,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&yy(vy,function(){e.controller.abort()})}var ma=null,zs=0,Cl=0,Rl=null;function gy(e,t){if(ma===null){var n=ma=[];zs=0,Cl=jc(),Rl={status:"pending",value:void 0,then:function(l){n.push(l)}}}return zs++,t.then(Fo,Fo),t}function Fo(){if(--zs===0&&ma!==null){Rl!==null&&(Rl.status="fulfilled");var e=ma;ma=null,Cl=0,Rl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function by(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 Po=j.S;j.S=function(e,t){Bh=st(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gy(e,t),Po!==null&&Po(e,t)};var Wn=_(null);function Ms(){var e=Wn.current;return e!==null?e:Ee.pooledCache}function Ai(e,t){t===null?V(Wn,Wn.current):V(Wn,t.pool)}function Io(){var e=Ms();return e===null?null:{parent:Be._currentValue,pool:e}}var Nl=Error(r(460)),Ds=Error(r(474)),Ci=Error(r(542)),Ri={then:function(){}};function ef(e){return e=e.status,e==="fulfilled"||e==="rejected"}function tf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Vt,Vt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,lf(e),e;default:if(typeof t.status=="string")t.then(Vt,Vt);else{if(e=Ee,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,lf(e),e}throw Pn=t,Nl}}function Fn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Pn=n,Nl):n}}var Pn=null;function nf(){if(Pn===null)throw Error(r(459));var e=Pn;return Pn=null,e}function lf(e){if(e===Nl||e===Ci)throw Error(r(483))}var Ol=null,pa=0;function Ni(e){var t=pa;return pa+=1,Ol===null&&(Ol=[]),tf(Ol,e,t)}function ya(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Oi(e,t){throw t.$$typeof===C?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function af(e){function t(A,x){if(e){var R=A.deletions;R===null?(A.deletions=[x],A.flags|=16):R.push(x)}}function n(A,x){if(!e)return null;for(;x!==null;)t(A,x),x=x.sibling;return null}function l(A){for(var x=new Map;A!==null;)A.key!==null?x.set(A.key,A):x.set(A.index,A),A=A.sibling;return x}function a(A,x){return A=Zt(A,x),A.index=0,A.sibling=null,A}function s(A,x,R){return A.index=R,e?(R=A.alternate,R!==null?(R=R.index,R<x?(A.flags|=67108866,x):R):(A.flags|=67108866,x)):(A.flags|=1048576,x)}function o(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function d(A,x,R,w){return x===null||x.tag!==6?(x=Ss(R,A.mode,w),x.return=A,x):(x=a(x,R),x.return=A,x)}function g(A,x,R,w){var J=R.type;return J===X?D(A,x,R.props.children,w,R.key):x!==null&&(x.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Te&&Fn(J)===x.type)?(x=a(x,R.props),ya(x,R),x.return=A,x):(x=xi(R.type,R.key,R.props,null,A.mode,w),ya(x,R),x.return=A,x)}function N(A,x,R,w){return x===null||x.tag!==4||x.stateNode.containerInfo!==R.containerInfo||x.stateNode.implementation!==R.implementation?(x=xs(R,A.mode,w),x.return=A,x):(x=a(x,R.children||[]),x.return=A,x)}function D(A,x,R,w,J){return x===null||x.tag!==7?(x=Zn(R,A.mode,w,J),x.return=A,x):(x=a(x,R),x.return=A,x)}function U(A,x,R){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=Ss(""+x,A.mode,R),x.return=A,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case z:return R=xi(x.type,x.key,x.props,null,A.mode,R),ya(R,x),R.return=A,R;case L:return x=xs(x,A.mode,R),x.return=A,x;case Te:return x=Fn(x),U(A,x,R)}if(Nt(x)||We(x))return x=Zn(x,A.mode,R,null),x.return=A,x;if(typeof x.then=="function")return U(A,Ni(x),R);if(x.$$typeof===k)return U(A,Ti(A,x),R);Oi(A,x)}return null}function O(A,x,R,w){var J=x!==null?x.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return J!==null?null:d(A,x,""+R,w);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case z:return R.key===J?g(A,x,R,w):null;case L:return R.key===J?N(A,x,R,w):null;case Te:return R=Fn(R),O(A,x,R,w)}if(Nt(R)||We(R))return J!==null?null:D(A,x,R,w,null);if(typeof R.then=="function")return O(A,x,Ni(R),w);if(R.$$typeof===k)return O(A,x,Ti(A,R),w);Oi(A,R)}return null}function M(A,x,R,w,J){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return A=A.get(R)||null,d(x,A,""+w,J);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case z:return A=A.get(w.key===null?R:w.key)||null,g(x,A,w,J);case L:return A=A.get(w.key===null?R:w.key)||null,N(x,A,w,J);case Te:return w=Fn(w),M(A,x,R,w,J)}if(Nt(w)||We(w))return A=A.get(R)||null,D(x,A,w,J,null);if(typeof w.then=="function")return M(A,x,R,Ni(w),J);if(w.$$typeof===k)return M(A,x,R,Ti(x,w),J);Oi(x,w)}return null}function Q(A,x,R,w){for(var J=null,oe=null,K=x,ne=x=0,se=null;K!==null&&ne<R.length;ne++){K.index>ne?(se=K,K=null):se=K.sibling;var fe=O(A,K,R[ne],w);if(fe===null){K===null&&(K=se);break}e&&K&&fe.alternate===null&&t(A,K),x=s(fe,x,ne),oe===null?J=fe:oe.sibling=fe,oe=fe,K=se}if(ne===R.length)return n(A,K),ce&&Kt(A,ne),J;if(K===null){for(;ne<R.length;ne++)K=U(A,R[ne],w),K!==null&&(x=s(K,x,ne),oe===null?J=K:oe.sibling=K,oe=K);return ce&&Kt(A,ne),J}for(K=l(K);ne<R.length;ne++)se=M(K,A,ne,R[ne],w),se!==null&&(e&&se.alternate!==null&&K.delete(se.key===null?ne:se.key),x=s(se,x,ne),oe===null?J=se:oe.sibling=se,oe=se);return e&&K.forEach(function(Bn){return t(A,Bn)}),ce&&Kt(A,ne),J}function W(A,x,R,w){if(R==null)throw Error(r(151));for(var J=null,oe=null,K=x,ne=x=0,se=null,fe=R.next();K!==null&&!fe.done;ne++,fe=R.next()){K.index>ne?(se=K,K=null):se=K.sibling;var Bn=O(A,K,fe.value,w);if(Bn===null){K===null&&(K=se);break}e&&K&&Bn.alternate===null&&t(A,K),x=s(Bn,x,ne),oe===null?J=Bn:oe.sibling=Bn,oe=Bn,K=se}if(fe.done)return n(A,K),ce&&Kt(A,ne),J;if(K===null){for(;!fe.done;ne++,fe=R.next())fe=U(A,fe.value,w),fe!==null&&(x=s(fe,x,ne),oe===null?J=fe:oe.sibling=fe,oe=fe);return ce&&Kt(A,ne),J}for(K=l(K);!fe.done;ne++,fe=R.next())fe=M(K,A,ne,fe.value,w),fe!==null&&(e&&fe.alternate!==null&&K.delete(fe.key===null?ne:fe.key),x=s(fe,x,ne),oe===null?J=fe:oe.sibling=fe,oe=fe);return e&&K.forEach(function(z0){return t(A,z0)}),ce&&Kt(A,ne),J}function Se(A,x,R,w){if(typeof R=="object"&&R!==null&&R.type===X&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case z:e:{for(var J=R.key;x!==null;){if(x.key===J){if(J=R.type,J===X){if(x.tag===7){n(A,x.sibling),w=a(x,R.props.children),w.return=A,A=w;break e}}else if(x.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Te&&Fn(J)===x.type){n(A,x.sibling),w=a(x,R.props),ya(w,R),w.return=A,A=w;break e}n(A,x);break}else t(A,x);x=x.sibling}R.type===X?(w=Zn(R.props.children,A.mode,w,R.key),w.return=A,A=w):(w=xi(R.type,R.key,R.props,null,A.mode,w),ya(w,R),w.return=A,A=w)}return o(A);case L:e:{for(J=R.key;x!==null;){if(x.key===J)if(x.tag===4&&x.stateNode.containerInfo===R.containerInfo&&x.stateNode.implementation===R.implementation){n(A,x.sibling),w=a(x,R.children||[]),w.return=A,A=w;break e}else{n(A,x);break}else t(A,x);x=x.sibling}w=xs(R,A.mode,w),w.return=A,A=w}return o(A);case Te:return R=Fn(R),Se(A,x,R,w)}if(Nt(R))return Q(A,x,R,w);if(We(R)){if(J=We(R),typeof J!="function")throw Error(r(150));return R=J.call(R),W(A,x,R,w)}if(typeof R.then=="function")return Se(A,x,Ni(R),w);if(R.$$typeof===k)return Se(A,x,Ti(A,R),w);Oi(A,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,x!==null&&x.tag===6?(n(A,x.sibling),w=a(x,R),w.return=A,A=w):(n(A,x),w=Ss(R,A.mode,w),w.return=A,A=w),o(A)):n(A,x)}return function(A,x,R,w){try{pa=0;var J=Se(A,x,R,w);return Ol=null,J}catch(K){if(K===Nl||K===Ci)throw K;var oe=ft(29,K,null,A.mode);return oe.lanes=w,oe.return=A,oe}finally{}}}var In=af(!0),uf=af(!1),bn=!1;function js(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ws(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 Sn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xn(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(he&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),Xo(e,null,n),t}return bi(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,$r(e,n)}}function Us(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 Bs=!1;function ga(){if(Bs){var e=Rl;if(e!==null)throw e}}function ba(e,t,n,l){Bs=!1;var a=e.updateQueue;bn=!1;var s=a.firstBaseUpdate,o=a.lastBaseUpdate,d=a.shared.pending;if(d!==null){a.shared.pending=null;var g=d,N=g.next;g.next=null,o===null?s=N:o.next=N,o=g;var D=e.alternate;D!==null&&(D=D.updateQueue,d=D.lastBaseUpdate,d!==o&&(d===null?D.firstBaseUpdate=N:d.next=N,D.lastBaseUpdate=g))}if(s!==null){var U=a.baseState;o=0,D=N=g=null,d=s;do{var O=d.lane&-536870913,M=O!==d.lane;if(M?(ue&O)===O:(l&O)===O){O!==0&&O===Cl&&(Bs=!0),D!==null&&(D=D.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var Q=e,W=d;O=t;var Se=n;switch(W.tag){case 1:if(Q=W.payload,typeof Q=="function"){U=Q.call(Se,U,O);break e}U=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=W.payload,O=typeof Q=="function"?Q.call(Se,U,O):Q,O==null)break e;U=S({},U,O);break e;case 2:bn=!0}}O=d.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:d.tag,payload:d.payload,callback:d.callback,next:null},D===null?(N=D=M,g=U):D=D.next=M,o|=O;if(d=d.next,d===null){if(d=a.shared.pending,d===null)break;M=d,d=M.next,M.next=null,a.lastBaseUpdate=M,a.shared.pending=null}}while(!0);D===null&&(g=U),a.baseState=g,a.firstBaseUpdate=N,a.lastBaseUpdate=D,s===null&&(a.shared.lanes=0),Cn|=o,e.lanes=o,e.memoizedState=U}}function sf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function cf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)sf(n[e],t)}var zl=_(null),zi=_(0);function rf(e,t){e=an,V(zi,e),V(zl,t),an=e|t.baseLanes}function Ls(){V(zi,an),V(zl,zl.current)}function Hs(){an=zi.current,B(zl),B(zi)}var ht=_(null),Tt=null;function _n(e){var t=e.alternate;V(je,je.current&1),V(ht,e),Tt===null&&(t===null||zl.current!==null||t.memoizedState!==null)&&(Tt=e)}function qs(e){V(je,je.current),V(ht,e),Tt===null&&(Tt=e)}function of(e){e.tag===22?(V(je,je.current),V(ht,e),Tt===null&&(Tt=e)):En()}function En(){V(je,je.current),V(ht,ht.current)}function dt(e){B(ht),Tt===e&&(Tt=null),B(je)}var je=_(0);function Mi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Qc(n)||Zc(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 Wt=0,te=null,ge=null,Le=null,Di=!1,Ml=!1,el=!1,ji=0,Sa=0,Dl=null,Sy=0;function ze(){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(!ot(e[n],t[n]))return!1;return!0}function ks(e,t,n,l,a,s){return Wt=s,te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Kf:nc,el=!1,s=n(l,a),el=!1,Ml&&(s=hf(t,n,l,a)),ff(e),s}function ff(e){j.H=Ea;var t=ge!==null&&ge.next!==null;if(Wt=0,Le=ge=te=null,Di=!1,Sa=0,Dl=null,t)throw Error(r(300));e===null||He||(e=e.dependencies,e!==null&&Ei(e)&&(He=!0))}function hf(e,t,n,l){te=e;var a=0;do{if(Ml&&(Dl=null),Sa=0,Ml=!1,25<=a)throw Error(r(301));if(a+=1,Le=ge=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}j.H=Jf,s=t(n,l)}while(Ml);return s}function xy(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?xa(t):t,e=e.useState()[0],(ge!==null?ge.memoizedState:null)!==e&&(te.flags|=1024),t}function Xs(){var e=ji!==0;return ji=0,e}function Gs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Vs(e){if(Di){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Di=!1}Wt=0,Le=ge=te=null,Ml=!1,Sa=ji=0,Dl=null}function Ie(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?te.memoizedState=Le=e:Le=Le.next=e,Le}function we(){if(ge===null){var e=te.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=Le===null?te.memoizedState:Le.next;if(t!==null)Le=t,ge=e;else{if(e===null)throw te.alternate===null?Error(r(467)):Error(r(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Le===null?te.memoizedState=Le=e:Le=Le.next=e}return Le}function wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xa(e){var t=Sa;return Sa+=1,Dl===null&&(Dl=[]),e=tf(Dl,e,t),t=te,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Kf:nc),e}function Ui(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xa(e);if(e.$$typeof===k)return Ke(e)}throw Error(r(438,String(e)))}function Qs(e){var t=null,n=te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=te.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=wi(),te.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]=Ue;return t.index++,n}function Ft(e,t){return typeof t=="function"?t(e):t}function Bi(e){var t=we();return Zs(t,ge,e)}function Zs(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 d=o=null,g=null,N=t,D=!1;do{var U=N.lane&-536870913;if(U!==N.lane?(ue&U)===U:(Wt&U)===U){var O=N.revertLane;if(O===0)g!==null&&(g=g.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),U===Cl&&(D=!0);else if((Wt&O)===O){N=N.next,O===Cl&&(D=!0);continue}else U={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},g===null?(d=g=U,o=s):g=g.next=U,te.lanes|=O,Cn|=O;U=N.action,el&&n(s,U),s=N.hasEagerState?N.eagerState:n(s,U)}else O={lane:U,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},g===null?(d=g=O,o=s):g=g.next=O,te.lanes|=U,Cn|=U;N=N.next}while(N!==null&&N!==t);if(g===null?o=s:g.next=d,!ot(s,e.memoizedState)&&(He=!0,D&&(n=Rl,n!==null)))throw n;e.memoizedState=s,e.baseState=o,e.baseQueue=g,l.lastRenderedState=s}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ks(e){var t=we(),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);ot(s,t.memoizedState)||(He=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,l]}function df(e,t,n){var l=te,a=we(),s=ce;if(s){if(n===void 0)throw Error(r(407));n=n()}else n=t();var o=!ot((ge||a).memoizedState,n);if(o&&(a.memoizedState=n,He=!0),a=a.queue,Ws(yf.bind(null,l,a,e),[e]),a.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(l.flags|=2048,jl(9,{destroy:void 0},pf.bind(null,l,a,n,t),null),Ee===null)throw Error(r(349));s||(Wt&127)!==0||mf(l,t,n)}return n}function mf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=te.updateQueue,t===null?(t=wi(),te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function pf(e,t,n,l){t.value=n,t.getSnapshot=l,vf(t)&&gf(e)}function yf(e,t,n){return n(function(){vf(t)&&gf(e)})}function vf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ot(e,n)}catch{return!0}}function gf(e){var t=Qn(e,2);t!==null&&ut(t,e,2)}function Js(e){var t=Ie();if(typeof e=="function"){var n=e;if(e=n(),el){hn(!0);try{n()}finally{hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:e},t}function bf(e,t,n,l){return e.baseState=n,Zs(e,ge,typeof l=="function"?l:Ft)}function _y(e,t,n,l,a){if(qi(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)}};j.T!==null?n(!0):s.isTransition=!1,l(s),n=t.pending,n===null?(s.next=t.pending=s,Sf(t,s)):(s.next=n.next,t.pending=n.next=s)}}function Sf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var s=j.T,o={};j.T=o;try{var d=n(a,l),g=j.S;g!==null&&g(o,d),xf(e,t,d)}catch(N){$s(e,t,N)}finally{s!==null&&o.types!==null&&(s.types=o.types),j.T=s}}else try{s=n(a,l),xf(e,t,s)}catch(N){$s(e,t,N)}}function xf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){_f(e,t,l)},function(l){return $s(e,t,l)}):_f(e,t,n)}function _f(e,t,n){t.status="fulfilled",t.value=n,Ef(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Sf(e,n)))}function $s(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Ef(t),t=t.next;while(t!==l)}e.action=null}function Ef(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Tf(e,t){return t}function Af(e,t){if(ce){var n=Ee.formState;if(n!==null){e:{var l=te;if(ce){if(Ae){t:{for(var a=Ae,s=Et;a.nodeType!==8;){if(!s){a=null;break t}if(a=At(a.nextSibling),a===null){a=null;break t}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){Ae=At(a.nextSibling),l=a.data==="F!";break e}}vn(l)}l=!1}l&&(t=n[0])}}return n=Ie(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tf,lastRenderedState:t},n.queue=l,n=Vf.bind(null,te,l),l.dispatch=n,l=Js(!1),s=tc.bind(null,te,!1,l.queue),l=Ie(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=_y.bind(null,te,a,s,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Cf(e){var t=we();return Rf(t,ge,e)}function Rf(e,t,n){if(t=Zs(e,t,Tf)[0],e=Bi(Ft)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=xa(t)}catch(o){throw o===Nl?Ci:o}else l=t;t=we();var a=t.queue,s=a.dispatch;return n!==t.memoizedState&&(te.flags|=2048,jl(9,{destroy:void 0},Ey.bind(null,a,n),null)),[l,s,e]}function Ey(e,t){e.action=t}function Nf(e){var t=we(),n=ge;if(n!==null)return Rf(t,n,e);we(),t=t.memoizedState,n=we();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function jl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=te.updateQueue,t===null&&(t=wi(),te.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 Of(){return we().memoizedState}function Li(e,t,n,l){var a=Ie();te.flags|=e,a.memoizedState=jl(1|t,{destroy:void 0},n,l===void 0?null:l)}function Hi(e,t,n,l){var a=we();l=l===void 0?null:l;var s=a.memoizedState.inst;ge!==null&&l!==null&&Ys(l,ge.memoizedState.deps)?a.memoizedState=jl(t,s,n,l):(te.flags|=e,a.memoizedState=jl(1|t,s,n,l))}function zf(e,t){Li(8390656,8,e,t)}function Ws(e,t){Hi(2048,8,e,t)}function Ty(e){te.flags|=4;var t=te.updateQueue;if(t===null)t=wi(),te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Mf(e){var t=we().memoizedState;return Ty({ref:t,nextImpl:e}),function(){if((he&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Df(e,t){return Hi(4,2,e,t)}function jf(e,t){return Hi(4,4,e,t)}function wf(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 Uf(e,t,n){n=n!=null?n.concat([e]):null,Hi(4,4,wf.bind(null,t,e),n)}function Fs(){}function Bf(e,t){var n=we();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 Lf(e,t){var n=we();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Ys(t,l[1]))return l[0];if(l=e(),el){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l}function Ps(e,t,n){return n===void 0||(Wt&1073741824)!==0&&(ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Hh(),te.lanes|=e,Cn|=e,n)}function Hf(e,t,n,l){return ot(n,t)?n:zl.current!==null?(e=Ps(e,n,l),ot(e,t)||(He=!0),e):(Wt&42)===0||(Wt&1073741824)!==0&&(ue&261930)===0?(He=!0,e.memoizedState=n):(e=Hh(),te.lanes|=e,Cn|=e,t)}function qf(e,t,n,l,a){var s=G.p;G.p=s!==0&&8>s?s:8;var o=j.T,d={};j.T=d,tc(e,!1,t,n);try{var g=a(),N=j.S;if(N!==null&&N(d,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var D=by(g,l);_a(e,t,D,yt(e))}else _a(e,t,l,yt(e))}catch(U){_a(e,t,{then:function(){},status:"rejected",reason:U},yt())}finally{G.p=s,o!==null&&d.types!==null&&(o.types=d.types),j.T=o}}function Ay(){}function Is(e,t,n,l){if(e.tag!==5)throw Error(r(476));var a=Yf(e).queue;qf(e,a,t,P,n===null?Ay:function(){return kf(e),n(l)})}function Yf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:P},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function kf(e){var t=Yf(e);t.next===null&&(t=e.alternate.memoizedState),_a(e,t.next.queue,{},yt())}function ec(){return Ke(qa)}function Xf(){return we().memoizedState}function Gf(){return we().memoizedState}function Cy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yt();e=Sn(n);var l=xn(t,e,n);l!==null&&(ut(l,t,n),va(l,t,n)),t={cache:Os()},e.payload=t;return}t=t.return}}function Ry(e,t,n){var l=yt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},qi(e)?Qf(t,n):(n=gs(e,t,n,l),n!==null&&(ut(n,e,l),Zf(n,t,l)))}function Vf(e,t,n){var l=yt();_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(qi(e))Qf(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,d=s(o,n);if(a.hasEagerState=!0,a.eagerState=d,ot(d,o))return bi(e,t,a,0),Ee===null&&gi(),!1}catch{}finally{}if(n=gs(e,t,a,l),n!==null)return ut(n,e,l),Zf(n,t,l),!0}return!1}function tc(e,t,n,l){if(l={lane:2,revertLane:jc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},qi(e)){if(t)throw Error(r(479))}else t=gs(e,n,l,2),t!==null&&ut(t,e,2)}function qi(e){var t=e.alternate;return e===te||t!==null&&t===te}function Qf(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 Zf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,$r(e,n)}}var Ea={readContext:Ke,use:Ui,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useLayoutEffect:ze,useInsertionEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useSyncExternalStore:ze,useId:ze,useHostTransitionStatus:ze,useFormState:ze,useActionState:ze,useOptimistic:ze,useMemoCache:ze,useCacheRefresh:ze};Ea.useEffectEvent=ze;var Kf={readContext:Ke,use:Ui,useCallback:function(e,t){return Ie().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:zf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Li(4194308,4,wf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Li(4194308,4,e,t)},useInsertionEffect:function(e,t){Li(4,2,e,t)},useMemo:function(e,t){var n=Ie();t=t===void 0?null:t;var l=e();if(el){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Ie();if(n!==void 0){var a=n(t);if(el){hn(!0);try{n(t)}finally{hn(!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,te,e),[l.memoizedState,e]},useRef:function(e){var t=Ie();return e={current:e},t.memoizedState=e},useState:function(e){e=Js(e);var t=e.queue,n=Vf.bind(null,te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Fs,useDeferredValue:function(e,t){var n=Ie();return Ps(n,e,t)},useTransition:function(){var e=Js(!1);return e=qf.bind(null,te,e.queue,!0,!1),Ie().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=te,a=Ie();if(ce){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Ee===null)throw Error(r(349));(ue&127)!==0||mf(l,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,zf(yf.bind(null,l,s,e),[e]),l.flags|=2048,jl(9,{destroy:void 0},pf.bind(null,l,s,n,t),null),n},useId:function(){var e=Ie(),t=Ee.identifierPrefix;if(ce){var n=Ut,l=wt;n=(l&~(1<<32-rt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ji++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Sy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ec,useFormState:Af,useActionState:Af,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=tc.bind(null,te,!0,n),n.dispatch=t,[e,t]},useMemoCache:Qs,useCacheRefresh:function(){return Ie().memoizedState=Cy.bind(null,te)},useEffectEvent:function(e){var t=Ie(),n={impl:e};return t.memoizedState=n,function(){if((he&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},nc={readContext:Ke,use:Ui,useCallback:Bf,useContext:Ke,useEffect:Ws,useImperativeHandle:Uf,useInsertionEffect:Df,useLayoutEffect:jf,useMemo:Lf,useReducer:Bi,useRef:Of,useState:function(){return Bi(Ft)},useDebugValue:Fs,useDeferredValue:function(e,t){var n=we();return Hf(n,ge.memoizedState,e,t)},useTransition:function(){var e=Bi(Ft)[0],t=we().memoizedState;return[typeof e=="boolean"?e:xa(e),t]},useSyncExternalStore:df,useId:Xf,useHostTransitionStatus:ec,useFormState:Cf,useActionState:Cf,useOptimistic:function(e,t){var n=we();return bf(n,ge,e,t)},useMemoCache:Qs,useCacheRefresh:Gf};nc.useEffectEvent=Mf;var Jf={readContext:Ke,use:Ui,useCallback:Bf,useContext:Ke,useEffect:Ws,useImperativeHandle:Uf,useInsertionEffect:Df,useLayoutEffect:jf,useMemo:Lf,useReducer:Ks,useRef:Of,useState:function(){return Ks(Ft)},useDebugValue:Fs,useDeferredValue:function(e,t){var n=we();return ge===null?Ps(n,e,t):Hf(n,ge.memoizedState,e,t)},useTransition:function(){var e=Ks(Ft)[0],t=we().memoizedState;return[typeof e=="boolean"?e:xa(e),t]},useSyncExternalStore:df,useId:Xf,useHostTransitionStatus:ec,useFormState:Nf,useActionState:Nf,useOptimistic:function(e,t){var n=we();return ge!==null?bf(n,ge,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Qs,useCacheRefresh:Gf};Jf.useEffectEvent=Mf;function lc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ac={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=yt(),a=Sn(l);a.payload=t,n!=null&&(a.callback=n),t=xn(e,a,l),t!==null&&(ut(t,e,l),va(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=yt(),a=Sn(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=xn(e,a,l),t!==null&&(ut(t,e,l),va(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),l=Sn(n);l.tag=2,t!=null&&(l.callback=t),t=xn(e,l,n),t!==null&&(ut(t,e,n),va(t,e,n))}};function $f(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 Wf(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&&ac.enqueueReplaceState(t,t.state,null)}function tl(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=S({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Ff(e){vi(e)}function Pf(e){console.error(e)}function If(e){vi(e)}function Yi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function eh(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 ic(e,t,n){return n=Sn(n),n.tag=3,n.payload={element:null},n.callback=function(){Yi(e,t)},n}function th(e){return e=Sn(e),e.tag=3,e}function nh(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(){eh(t,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){eh(t,n,l),typeof a!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function Ny(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 Tt===null?Pi():n.alternate===null&&Me===0&&(Me=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),zc(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)),zc(e,l,a)),!1}throw Error(r(435,n.tag))}return zc(e,l,a),Pi(),!1}if(ce)return t=ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==Ts&&(e=Error(r(422),{cause:l}),ha(St(e,n)))):(l!==Ts&&(t=Error(r(423),{cause:l}),ha(St(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=St(l,n),a=ic(e.stateNode,l,a),Us(e,a),Me!==4&&(Me=2)),!1;var s=Error(r(520),{cause:l});if(s=St(s,n),Ma===null?Ma=[s]:Ma.push(s),Me!==4&&(Me=2),t===null)return!0;l=St(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ic(n.stateNode,l,e),Us(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"&&(Rn===null||!Rn.has(s))))return n.flags|=65536,a&=-a,n.lanes|=a,a=th(a),nh(a,e,n,l),Us(n,a),!1}n=n.return}while(n!==null);return!1}var uc=Error(r(461)),He=!1;function Je(e,t,n,l){t.child=e===null?uf(t,null,n,l):In(t,e.child,n,l)}function lh(e,t,n,l,a){n=n.render;var s=t.ref;if("ref"in l){var o={};for(var d in l)d!=="ref"&&(o[d]=l[d])}else o=l;return $n(t),l=ks(e,t,n,o,s,a),d=Xs(),e!==null&&!He?(Gs(e,t,a),Pt(e,t,a)):(ce&&d&&_s(t),t.flags|=1,Je(e,t,l,a),t.child)}function ah(e,t,n,l,a){if(e===null){var s=n.type;return typeof s=="function"&&!bs(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,ih(e,t,s,l,a)):(e=xi(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!mc(e,a)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ra,n(o,l)&&e.ref===t.ref)return Pt(e,t,a)}return t.flags|=1,e=Zt(s,l),e.ref=t.ref,e.return=t,t.child=e}function ih(e,t,n,l,a){if(e!==null){var s=e.memoizedProps;if(ra(s,l)&&e.ref===t.ref)if(He=!1,t.pendingProps=l=s,mc(e,a))(e.flags&131072)!==0&&(He=!0);else return t.lanes=e.lanes,Pt(e,t,a)}return sc(e,t,n,l,a)}function uh(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 sh(e,t,s,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ai(t,s!==null?s.cachePool:null),s!==null?rf(t,s):Ls(),of(t);else return l=t.lanes=536870912,sh(e,t,s!==null?s.baseLanes|n:n,n,l)}else s!==null?(Ai(t,s.cachePool),rf(t,s),En(),t.memoizedState=null):(e!==null&&Ai(t,null),Ls(),En());return Je(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 sh(e,t,n,l,a){var s=Ms();return s=s===null?null:{parent:Be._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&Ai(t,null),Ls(),of(t),e!==null&&Al(e,t,l,!0),t.childLanes=a,null}function ki(e,t){return t=Gi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ch(e,t,n){return In(t,e.child,null,n),e=ki(t,t.pendingProps),e.flags|=2,dt(t),t.memoizedState=null,e}function Oy(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ce){if(l.mode==="hidden")return e=ki(t,l),t.lanes=536870912,Ta(null,e);if(qs(t),(e=Ae)?(e=Sd(e,Et),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:wt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},n=Vo(e),n.return=t,t.child=n,Ze=t,Ae=null)):e=null,e===null)throw vn(t);return t.lanes=536870912,null}return ki(t,l)}var s=e.memoizedState;if(s!==null){var o=s.dehydrated;if(qs(t),a)if(t.flags&256)t.flags&=-257,t=ch(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(He||Al(e,t,n,!1),a=(n&e.childLanes)!==0,He||a){if(l=Ee,l!==null&&(o=Wr(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,Qn(e,o),ut(l,e,o),uc;Pi(),t=ch(e,t,n)}else e=s.treeContext,Ae=At(o.nextSibling),Ze=t,ce=!0,yn=null,Et=!1,e!==null&&Ko(t,e),t=ki(t,l),t.flags|=4096;return t}return e=Zt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Xi(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 sc(e,t,n,l,a){return $n(t),n=ks(e,t,n,l,void 0,a),l=Xs(),e!==null&&!He?(Gs(e,t,a),Pt(e,t,a)):(ce&&l&&_s(t),t.flags|=1,Je(e,t,n,a),t.child)}function rh(e,t,n,l,a,s){return $n(t),t.updateQueue=null,n=hf(t,l,n,a),ff(e),l=Xs(),e!==null&&!He?(Gs(e,t,s),Pt(e,t,s)):(ce&&l&&_s(t),t.flags|=1,Je(e,t,n,s),t.child)}function oh(e,t,n,l,a){if($n(t),t.stateNode===null){var s=xl,o=n.contextType;typeof o=="object"&&o!==null&&(s=Ke(o)),s=new n(l,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ac,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},js(t),o=n.contextType,s.context=typeof o=="object"&&o!==null?Ke(o):xl,s.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(lc(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&&ac.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 d=t.memoizedProps,g=tl(n,d);s.props=g;var N=s.context,D=n.contextType;o=xl,typeof D=="object"&&D!==null&&(o=Ke(D));var U=n.getDerivedStateFromProps;D=typeof U=="function"||typeof s.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,D||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d||N!==o)&&Wf(t,s,l,o),bn=!1;var O=t.memoizedState;s.state=O,ba(t,l,s,a),ga(),N=t.memoizedState,d||O!==N||bn?(typeof U=="function"&&(lc(t,n,U,l),N=t.memoizedState),(g=bn||$f(t,n,g,l,O,N,o))?(D||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=N),s.props=l,s.state=N,s.context=o,l=g):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,ws(e,t),o=t.memoizedProps,D=tl(n,o),s.props=D,U=t.pendingProps,O=s.context,N=n.contextType,g=xl,typeof N=="object"&&N!==null&&(g=Ke(N)),d=n.getDerivedStateFromProps,(N=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==U||O!==g)&&Wf(t,s,l,g),bn=!1,O=t.memoizedState,s.state=O,ba(t,l,s,a),ga();var M=t.memoizedState;o!==U||O!==M||bn||e!==null&&e.dependencies!==null&&Ei(e.dependencies)?(typeof d=="function"&&(lc(t,n,d,l),M=t.memoizedState),(D=bn||$f(t,n,D,l,O,M,g)||e!==null&&e.dependencies!==null&&Ei(e.dependencies))?(N||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(l,M,g),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(l,M,g)),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=g,l=D):(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,Xi(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=In(t,e.child,null,a),t.child=In(t,null,n,a)):Je(e,t,n,a),t.memoizedState=s.state,e=t.child):e=Pt(e,t,a),e}function fh(e,t,n,l){return Kn(),t.flags|=256,Je(e,t,n,l),t.child}var cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rc(e){return{baseLanes:e,cachePool:Io()}}function oc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=pt),e}function hh(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:(je.current&2)!==0),o&&(a=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ce){if(a?_n(t):En(),(e=Ae)?(e=Sd(e,Et),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:wt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},n=Vo(e),n.return=t,t.child=n,Ze=t,Ae=null)):e=null,e===null)throw vn(t);return Zc(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,a?(En(),a=t.mode,d=Gi({mode:"hidden",children:d},a),l=Zn(l,a,n,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=rc(n),l.childLanes=oc(e,o,n),t.memoizedState=cc,Ta(null,l)):(_n(t),fc(t,d))}var g=e.memoizedState;if(g!==null&&(d=g.dehydrated,d!==null)){if(s)t.flags&256?(_n(t),t.flags&=-257,t=hc(e,t,n)):t.memoizedState!==null?(En(),t.child=e.child,t.flags|=128,t=null):(En(),d=l.fallback,a=t.mode,l=Gi({mode:"visible",children:l.children},a),d=Zn(d,a,n,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,In(t,e.child,null,n),l=t.child,l.memoizedState=rc(n),l.childLanes=oc(e,o,n),t.memoizedState=cc,t=Ta(null,l));else if(_n(t),Zc(d)){if(o=d.nextSibling&&d.nextSibling.dataset,o)var N=o.dgst;o=N,l=Error(r(419)),l.stack="",l.digest=o,ha({value:l,source:null,stack:null}),t=hc(e,t,n)}else if(He||Al(e,t,n,!1),o=(n&e.childLanes)!==0,He||o){if(o=Ee,o!==null&&(l=Wr(o,n),l!==0&&l!==g.retryLane))throw g.retryLane=l,Qn(e,l),ut(o,e,l),uc;Qc(d)||Pi(),t=hc(e,t,n)}else Qc(d)?(t.flags|=192,t.child=e.child,t=null):(e=g.treeContext,Ae=At(d.nextSibling),Ze=t,ce=!0,yn=null,Et=!1,e!==null&&Ko(t,e),t=fc(t,l.children),t.flags|=4096);return t}return a?(En(),d=l.fallback,a=t.mode,g=e.child,N=g.sibling,l=Zt(g,{mode:"hidden",children:l.children}),l.subtreeFlags=g.subtreeFlags&65011712,N!==null?d=Zt(N,d):(d=Zn(d,a,n,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,Ta(null,l),l=t.child,d=e.child.memoizedState,d===null?d=rc(n):(a=d.cachePool,a!==null?(g=Be._currentValue,a=a.parent!==g?{parent:g,pool:g}:a):a=Io(),d={baseLanes:d.baseLanes|n,cachePool:a}),l.memoizedState=d,l.childLanes=oc(e,o,n),t.memoizedState=cc,Ta(e.child,l)):(_n(t),n=e.child,e=n.sibling,n=Zt(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 fc(e,t){return t=Gi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Gi(e,t){return e=ft(22,e,null,t),e.lanes=0,e}function hc(e,t,n){return In(t,e.child,null,n),e=fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dh(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Rs(e.return,t,n)}function dc(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 mh(e,t,n){var l=t.pendingProps,a=l.revealOrder,s=l.tail;l=l.children;var o=je.current,d=(o&2)!==0;if(d?(o=o&1|2,t.flags|=128):o&=1,V(je,o),Je(e,t,l,n),l=ce?fa:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dh(e,n,t);else if(e.tag===19)dh(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&&Mi(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),dc(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&&Mi(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}dc(t,!0,n,null,s,l);break;case"together":dc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Pt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cn|=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=Zt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ei(e)))}function zy(e,t,n){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),gn(t,Be,e.memoizedState.cache),Kn();break;case 27:case 5:Wl(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:gn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,qs(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(_n(t),t.flags|=128,null):(n&t.child.childLanes)!==0?hh(e,t,n):(_n(t),e=Pt(e,t,n),e!==null?e.sibling:null);_n(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 mh(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),V(je,je.current),l)break;return null;case 22:return t.lanes=0,uh(e,t,n,t.pendingProps);case 24:gn(t,Be,e.memoizedState.cache)}return Pt(e,t,n)}function ph(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)He=!0;else{if(!mc(e,n)&&(t.flags&128)===0)return He=!1,zy(e,t,n);He=(e.flags&131072)!==0}else He=!1,ce&&(t.flags&1048576)!==0&&Zo(t,fa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Fn(t.elementType),t.type=e,typeof e=="function")bs(e)?(l=tl(e,l),t.tag=1,t=oh(null,t,e,l,n)):(t.tag=0,t=sc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===F){t.tag=11,t=lh(null,t,e,l,n);break e}else if(a===$){t.tag=14,t=ah(null,t,e,l,n);break e}}throw t=Xt(e)||e,Error(r(306,t,""))}}return t;case 0:return sc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=tl(l,t.pendingProps),oh(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,ws(e,t),ba(t,l,null,n);var o=t.memoizedState;if(l=o.cache,gn(t,Be,l),l!==s.cache&&Ns(t,[Be],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=fh(e,t,l,n);break e}else if(l!==a){a=St(Error(r(424)),t),ha(a),t=fh(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(Ae=At(e.firstChild),Ze=t,ce=!0,yn=null,Et=!0,n=uf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Kn(),l===a){t=Pt(e,t,n);break e}Je(e,t,l,n)}t=t.child}return t;case 26:return Xi(e,t),e===null?(n=Cd(t.type,null,t.pendingProps,null))?t.memoizedState=n:ce||(n=t.type,e=t.pendingProps,l=iu(le.current).createElement(n),l[Qe]=t,l[et]=e,$e(l,n,e),Ge(l),t.stateNode=l):t.memoizedState=Cd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Wl(t),e===null&&ce&&(l=t.stateNode=Ed(t.type,t.pendingProps,le.current),Ze=t,Et=!0,a=Ae,Mn(t.type)?(Kc=a,Ae=At(l.firstChild)):Ae=a),Je(e,t,t.pendingProps.children,n),Xi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ce&&((a=l=Ae)&&(l=u0(l,t.type,t.pendingProps,Et),l!==null?(t.stateNode=l,Ze=t,Ae=At(l.firstChild),Et=!1,a=!0):a=!1),a||vn(t)),Wl(t),a=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,l=s.children,Xc(a,s)?l=null:o!==null&&Xc(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=ks(e,t,xy,null,null,n),qa._currentValue=a),Xi(e,t),Je(e,t,l,n),t.child;case 6:return e===null&&ce&&((e=n=Ae)&&(n=s0(n,t.pendingProps,Et),n!==null?(t.stateNode=n,Ze=t,Ae=null,e=!0):e=!1),e||vn(t)),null;case 13:return hh(e,t,n);case 4:return Pe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=In(t,null,l,n):Je(e,t,l,n),t.child;case 11:return lh(e,t,t.type,t.pendingProps,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,gn(t,t.type,l.value),Je(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,$n(t),a=Ke(a),l=l(a),t.flags|=1,Je(e,t,l,n),t.child;case 14:return ah(e,t,t.type,t.pendingProps,n);case 15:return ih(e,t,t.type,t.pendingProps,n);case 19:return mh(e,t,n);case 31:return Oy(e,t,n);case 22:return uh(e,t,n,t.pendingProps);case 24:return $n(t),l=Ke(Be),e===null?(a=Ms(),a===null&&(a=Ee,s=Os(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:l,cache:a},js(t),gn(t,Be,a)):((e.lanes&n)!==0&&(ws(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),gn(t,Be,l)):(l=s.cache,gn(t,Be,l),l!==a.cache&&Ns(t,[Be],n,!0))),Je(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function It(e){e.flags|=4}function pc(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(Xh())e.flags|=8192;else throw Pn=Ri,Ds}else e.flags&=-16777217}function yh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Md(t))if(Xh())e.flags|=8192;else throw Pn=Ri,Ds}function Vi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Kr():536870912,e.lanes|=t,Ll|=t)}function Aa(e,t){if(!ce)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 Ce(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 My(e,t,n){var l=t.pendingProps;switch(Es(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return Ce(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),$t(Be),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?It(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,As())),Ce(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(It(t),s!==null?(Ce(t),yh(t,s)):(Ce(t),pc(t,a,null,l,n))):s?s!==e.memoizedState?(It(t),Ce(t),yh(t,s)):(Ce(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&It(t),Ce(t),pc(t,a,e,l,n)),null;case 27:if(ti(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&It(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ce(t),null}e=Z.current,Tl(t)?Jo(t):(e=Ed(a,l,n),t.stateNode=e,It(t))}return Ce(t),null;case 5:if(ti(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&It(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ce(t),null}if(s=Z.current,Tl(t))Jo(t);else{var o=iu(le.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[Qe]=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($e(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&&It(t)}}return Ce(t),pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&It(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=le.current,Tl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Ze,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||hd(e.nodeValue,n)),e||vn(t,!0)}else e=iu(e).createTextNode(l),e[Qe]=t,t.stateNode=e}return Ce(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[Qe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ce(t),e=!1}else n=As(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(dt(t),t):(dt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ce(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[Qe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ce(t),a=!1}else a=As(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(dt(t),t):(dt(t),null)}return dt(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),Vi(t,t.updateQueue),Ce(t),null);case 4:return De(),e===null&&Lc(t.stateNode.containerInfo),Ce(t),null;case 10:return $t(t.type),Ce(t),null;case 19:if(B(je),l=t.memoizedState,l===null)return Ce(t),null;if(a=(t.flags&128)!==0,s=l.rendering,s===null)if(a)Aa(l,!1);else{if(Me!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Mi(e),s!==null){for(t.flags|=128,Aa(l,!1),e=s.updateQueue,t.updateQueue=e,Vi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Go(n,e),n=n.sibling;return V(je,je.current&1|2),ce&&Kt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&st()>$i&&(t.flags|=128,a=!0,Aa(l,!1),t.lanes=4194304)}else{if(!a)if(e=Mi(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vi(t,e),Aa(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ce)return Ce(t),null}else 2*st()-l.renderingStartTime>$i&&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=st(),e.sibling=null,n=je.current,V(je,a?n&1|2:n&1),ce&&Kt(t,l.treeForkCount),e):(Ce(t),null);case 22:case 23:return dt(t),Hs(),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&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),n=t.updateQueue,n!==null&&Vi(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(Wn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$t(Be),Ce(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Dy(e,t){switch(Es(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $t(Be),De(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ti(t),null;case 31:if(t.memoizedState!==null){if(dt(t),t.alternate===null)throw Error(r(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(dt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(je),null;case 4:return De(),null;case 10:return $t(t.type),null;case 22:case 23:return dt(t),Hs(),e!==null&&B(Wn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $t(Be),null;case 25:return null;default:return null}}function vh(e,t){switch(Es(t),t.tag){case 3:$t(Be),De();break;case 26:case 27:case 5:ti(t);break;case 4:De();break;case 31:t.memoizedState!==null&&dt(t);break;case 13:dt(t);break;case 19:B(je);break;case 10:$t(t.type);break;case 22:case 23:dt(t),Hs(),e!==null&&B(Wn);break;case 24:$t(Be)}}function Ca(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(d){pe(t,t.return,d)}}function Tn(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,d=o.destroy;if(d!==void 0){o.destroy=void 0,a=t;var g=n,N=d;try{N()}catch(D){pe(a,g,D)}}}l=l.next}while(l!==s)}}catch(D){pe(t,t.return,D)}}function gh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{cf(t,n)}catch(l){pe(e,e.return,l)}}}function bh(e,t,n){n.props=tl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){pe(e,t,l)}}function Ra(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){pe(e,t,a)}}function Bt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){pe(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){pe(e,t,a)}else n.current=null}function Sh(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){pe(e,e.return,a)}}function yc(e,t,n){try{var l=e.stateNode;e0(l,e.type,n,t),l[et]=t}catch(a){pe(e,e.return,a)}}function xh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mn(e.type)||e.tag===4}function vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Mn(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 gc(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=Vt));else if(l!==4&&(l===27&&Mn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(gc(e,t,n),e=e.sibling;e!==null;)gc(e,t,n),e=e.sibling}function Qi(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&&Mn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qi(e,t,n),e=e.sibling;e!==null;)Qi(e,t,n),e=e.sibling}function _h(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);$e(t,l,n),t[Qe]=e,t[et]=n}catch(s){pe(e,e.return,s)}}var en=!1,qe=!1,bc=!1,Eh=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function jy(e,t){if(e=e.containerInfo,Yc=hu,e=wo(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,d=-1,g=-1,N=0,D=0,U=e,O=null;t:for(;;){for(var M;U!==n||a!==0&&U.nodeType!==3||(d=o+a),U!==s||l!==0&&U.nodeType!==3||(g=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&&++N===a&&(d=o),O===s&&++D===l&&(g=o),(M=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=M}n=d===-1||g===-1?null:{start:d,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(kc={focusedElem:e,selectionRange:n},hu=!1,Ve=t;Ve!==null;)if(t=Ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ve=e;else for(;Ve!==null;){switch(t=Ve,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=tl(n.type,a);e=l.getSnapshotBeforeUpdate(Q,s),l.__reactInternalSnapshotBeforeUpdate=e}catch(W){pe(n,n.return,W)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Vc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Vc(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,Ve=e;break}Ve=t.return}}function Th(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:nn(e,n),l&4&&Ca(5,n);break;case 1:if(nn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){pe(n,n.return,o)}else{var a=tl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){pe(n,n.return,o)}}l&64&&gh(n),l&512&&Ra(n,n.return);break;case 3:if(nn(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{cf(e,t)}catch(o){pe(n,n.return,o)}}break;case 27:t===null&&l&4&&_h(n);case 26:case 5:nn(e,n),t===null&&l&4&&Sh(n),l&512&&Ra(n,n.return);break;case 12:nn(e,n);break;case 31:nn(e,n),l&4&&Rh(e,n);break;case 13:nn(e,n),l&4&&Nh(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xy.bind(null,n),c0(e,n))));break;case 22:if(l=n.memoizedState!==null||en,!l){t=t!==null&&t.memoizedState!==null||qe,a=en;var s=qe;en=l,(qe=t)&&!s?ln(e,n,(n.subtreeFlags&8772)!==0):nn(e,n),en=a,qe=s}break;case 30:break;default:nn(e,n)}}function Ah(e){var t=e.alternate;t!==null&&(e.alternate=null,Ah(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$u(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 Ne=null,nt=!1;function tn(e,t,n){for(n=n.child;n!==null;)Ch(e,t,n),n=n.sibling}function Ch(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(Fl,n)}catch{}switch(n.tag){case 26:qe||Bt(n,t),tn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qe||Bt(n,t);var l=Ne,a=nt;Mn(n.type)&&(Ne=n.stateNode,nt=!1),tn(e,t,n),Ba(n.stateNode),Ne=l,nt=a;break;case 5:qe||Bt(n,t);case 6:if(l=Ne,a=nt,Ne=null,tn(e,t,n),Ne=l,nt=a,Ne!==null)if(nt)try{(Ne.nodeType===9?Ne.body:Ne.nodeName==="HTML"?Ne.ownerDocument.body:Ne).removeChild(n.stateNode)}catch(s){pe(n,t,s)}else try{Ne.removeChild(n.stateNode)}catch(s){pe(n,t,s)}break;case 18:Ne!==null&&(nt?(e=Ne,gd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ql(e)):gd(Ne,n.stateNode));break;case 4:l=Ne,a=nt,Ne=n.stateNode.containerInfo,nt=!0,tn(e,t,n),Ne=l,nt=a;break;case 0:case 11:case 14:case 15:Tn(2,n,t),qe||Tn(4,n,t),tn(e,t,n);break;case 1:qe||(Bt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&bh(n,t,l)),tn(e,t,n);break;case 21:tn(e,t,n);break;case 22:qe=(l=qe)||n.memoizedState!==null,tn(e,t,n),qe=l;break;default:tn(e,t,n)}}function Rh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ql(e)}catch(n){pe(t,t.return,n)}}}function Nh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ql(e)}catch(n){pe(t,t.return,n)}}function wy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Eh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Eh),t;default:throw Error(r(435,e.tag))}}function Zi(e,t){var n=wy(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Gy.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,d=o;e:for(;d!==null;){switch(d.tag){case 27:if(Mn(d.type)){Ne=d.stateNode,nt=!1;break e}break;case 5:Ne=d.stateNode,nt=!1;break e;case 3:case 4:Ne=d.stateNode.containerInfo,nt=!0;break e}d=d.return}if(Ne===null)throw Error(r(160));Ch(s,o,a),Ne=null,nt=!1,s=a.alternate,s!==null&&(s.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Oh(t,e),t=t.sibling}var zt=null;function Oh(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&&(Tn(3,e,e.return),Ca(3,e),Tn(5,e,e.return));break;case 1:lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),l&64&&en&&(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=zt;if(lt(t,e),at(e),l&512&&(qe||n===null||Bt(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[Qe]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=a.createElement(l),a.head.insertBefore(s,a.querySelector("head > title"))),$e(s,l,n),s[Qe]=e,Ge(s),l=s;break e;case"link":var o=Od("link","href",a).get(l+(n.href||""));if(o){for(var d=0;d<o.length;d++)if(s=o[d],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(d,1);break t}}s=a.createElement(l),$e(s,l,n),a.head.appendChild(s);break;case"meta":if(o=Od("meta","content",a).get(l+(n.content||""))){for(d=0;d<o.length;d++)if(s=o[d],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(d,1);break t}}s=a.createElement(l),$e(s,l,n),a.head.appendChild(s);break;default:throw Error(r(468,l))}s[Qe]=e,Ge(s),l=s}e.stateNode=l}else zd(a,e.type,e.stateNode);else e.stateNode=Nd(a,l,e.memoizedProps);else s!==l?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,l===null?zd(a,e.type,e.stateNode):Nd(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&yc(e,e.memoizedProps,n.memoizedProps)}break;case 27:lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),n!==null&&l&4&&yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),e.flags&32){a=e.stateNode;try{ml(a,"")}catch(Q){pe(e,e.return,Q)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,yc(e,a,n!==null?n.memoizedProps:a)),l&1024&&(bc=!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){pe(e,e.return,Q)}}break;case 3:if(cu=null,a=zt,zt=uu(t.containerInfo),lt(t,e),zt=a,at(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Ql(t.containerInfo)}catch(Q){pe(e,e.return,Q)}bc&&(bc=!1,zh(e));break;case 4:l=zt,zt=uu(e.stateNode.containerInfo),lt(t,e),at(e),zt=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,Zi(e,l)));break;case 13:lt(t,e),at(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ji=st()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zi(e,l)));break;case 22:a=e.memoizedState!==null;var g=n!==null&&n.memoizedState!==null,N=en,D=qe;if(en=N||a,qe=D||g,lt(t,e),qe=D,en=N,at(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||g||en||qe||nl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){g=n=t;try{if(s=g.stateNode,a)o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{d=g.stateNode;var U=g.memoizedProps.style,O=U!=null&&U.hasOwnProperty("display")?U.display:null;d.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(Q){pe(g,g.return,Q)}}}else if(t.tag===6){if(n===null){g=t;try{g.stateNode.nodeValue=a?"":g.memoizedProps}catch(Q){pe(g,g.return,Q)}}}else if(t.tag===18){if(n===null){g=t;try{var M=g.stateNode;a?bd(M,!0):bd(g.stateNode,!1)}catch(Q){pe(g,g.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,Zi(e,n))));break;case 19:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zi(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(xh(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var a=n.stateNode,s=vc(e);Qi(e,s,a);break;case 5:var o=n.stateNode;n.flags&32&&(ml(o,""),n.flags&=-33);var d=vc(e);Qi(e,d,o);break;case 3:case 4:var g=n.stateNode.containerInfo,N=vc(e);gc(e,N,g);break;default:throw Error(r(161))}}catch(D){pe(e,e.return,D)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function nn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Th(e,t.alternate,t),t=t.sibling}function nl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tn(4,t,t.return),nl(t);break;case 1:Bt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&bh(t,t.return,n),nl(t);break;case 27:Ba(t.stateNode);case 26:case 5:Bt(t,t.return),nl(t);break;case 22:t.memoizedState===null&&nl(t);break;case 30:nl(t);break;default:nl(t)}e=e.sibling}}function ln(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:ln(a,s,n),Ca(4,s);break;case 1:if(ln(a,s,n),l=s,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(N){pe(l,l.return,N)}if(l=s,a=l.updateQueue,a!==null){var d=l.stateNode;try{var g=a.shared.hiddenCallbacks;if(g!==null)for(a.shared.hiddenCallbacks=null,a=0;a<g.length;a++)sf(g[a],d)}catch(N){pe(l,l.return,N)}}n&&o&64&&gh(s),Ra(s,s.return);break;case 27:_h(s);case 26:case 5:ln(a,s,n),n&&l===null&&o&4&&Sh(s),Ra(s,s.return);break;case 12:ln(a,s,n);break;case 31:ln(a,s,n),n&&o&4&&Rh(a,s);break;case 13:ln(a,s,n),n&&o&4&&Nh(a,s);break;case 22:s.memoizedState===null&&ln(a,s,n),Ra(s,s.return);break;case 30:break;default:ln(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&&da(n))}function xc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e))}function Mt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Mh(e,t,n,l),t=t.sibling}function Mh(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Mt(e,t,n,l),a&2048&&Ca(9,t);break;case 1:Mt(e,t,n,l);break;case 3:Mt(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&&da(e)));break;case 12:if(a&2048){Mt(e,t,n,l),e=t.stateNode;try{var s=t.memoizedProps,o=s.id,d=s.onPostCommit;typeof d=="function"&&d(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(g){pe(t,t.return,g)}}else Mt(e,t,n,l);break;case 31:Mt(e,t,n,l);break;case 13:Mt(e,t,n,l);break;case 23:break;case 22:s=t.stateNode,o=t.alternate,t.memoizedState!==null?s._visibility&2?Mt(e,t,n,l):Na(e,t):s._visibility&2?Mt(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:Mt(e,t,n,l),a&2048&&xc(t.alternate,t);break;default:Mt(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,d=n,g=l,N=o.flags;switch(o.tag){case 0:case 11:case 15:wl(s,o,d,g,a),Ca(8,o);break;case 23:break;case 22:var D=o.stateNode;o.memoizedState!==null?D._visibility&2?wl(s,o,d,g,a):Na(s,o):(D._visibility|=2,wl(s,o,d,g,a)),a&&N&2048&&Sc(o.alternate,o);break;case 24:wl(s,o,d,g,a),a&&N&2048&&xc(o.alternate,o);break;default:wl(s,o,d,g,a)}t=t.sibling}}function Na(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:Na(n,l),a&2048&&Sc(l.alternate,l);break;case 24:Na(n,l),a&2048&&xc(l.alternate,l);break;default:Na(n,l)}t=t.sibling}}var Oa=8192;function Ul(e,t,n){if(e.subtreeFlags&Oa)for(e=e.child;e!==null;)Dh(e,t,n),e=e.sibling}function Dh(e,t,n){switch(e.tag){case 26:Ul(e,t,n),e.flags&Oa&&e.memoizedState!==null&&S0(n,zt,e.memoizedState,e.memoizedProps);break;case 5:Ul(e,t,n);break;case 3:case 4:var l=zt;zt=uu(e.stateNode.containerInfo),Ul(e,t,n),zt=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 jh(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];Ve=l,Uh(l,e)}jh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wh(e),e=e.sibling}function wh(e){switch(e.tag){case 0:case 11:case 15:za(e),e.flags&2048&&Tn(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,Ki(e)):za(e);break;default:za(e)}}function Ki(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];Ve=l,Uh(l,e)}jh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tn(8,t,t.return),Ki(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ki(t));break;default:Ki(t)}e=e.sibling}}function Uh(e,t){for(;Ve!==null;){var n=Ve;switch(n.tag){case 0:case 11:case 15:Tn(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:da(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ve=l;else e:for(n=e;Ve!==null;){l=Ve;var a=l.sibling,s=l.return;if(Ah(l),l===n){Ve=null;break e}if(a!==null){a.return=s,Ve=a;break e}Ve=s}}}var Uy={getCacheForType:function(e){var t=Ke(Be),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ke(Be).controller.signal}},By=typeof WeakMap=="function"?WeakMap:Map,he=0,Ee=null,ae=null,ue=0,me=0,mt=null,An=!1,Bl=!1,_c=!1,an=0,Me=0,Cn=0,ll=0,Ec=0,pt=0,Ll=0,Ma=null,it=null,Tc=!1,Ji=0,Bh=0,$i=1/0,Wi=null,Rn=null,ke=0,Nn=null,Hl=null,un=0,Ac=0,Cc=null,Lh=null,Da=0,Rc=null;function yt(){return(he&2)!==0&&ue!==0?ue&-ue:j.T!==null?jc():Fr()}function Hh(){if(pt===0)if((ue&536870912)===0||ce){var e=ai;ai<<=1,(ai&3932160)===0&&(ai=262144),pt=e}else pt=536870912;return e=ht.current,e!==null&&(e.flags|=32),pt}function ut(e,t,n){(e===Ee&&(me===2||me===9)||e.cancelPendingCommit!==null)&&(ql(e,0),On(e,ue,pt,!1)),Il(e,n),((he&2)===0||e!==Ee)&&(e===Ee&&((he&2)===0&&(ll|=n),Me===4&&On(e,ue,pt,!1)),Lt(e))}function qh(e,t,n){if((he&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Pl(e,t),a=l?qy(e,t):Oc(e,t,!0),s=l;do{if(a===0){Bl&&!l&&On(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!Ly(n)){a=Oc(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 d=e;a=Ma;var g=d.current.memoizedState.isDehydrated;if(g&&(ql(d,o).flags|=256),o=Oc(d,o,!1),o!==2){if(_c&&!g){d.errorRecoveryDisabledLanes|=s,ll|=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),On(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:On(l,t,pt,!An);break e;case 2:it=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(a=Ji+300-st(),10<a)){if(On(l,t,pt,!An),ui(l,0,!0)!==0)break e;un=t,l.timeoutHandle=yd(Yh.bind(null,l,n,it,Wi,Tc,t,pt,ll,Ll,An,s,"Throttled",-0,0),a);break e}Yh(l,n,it,Wi,Tc,t,pt,ll,Ll,An,s,null,-0,0)}}break}while(!0);Lt(e)}function Yh(e,t,n,l,a,s,o,d,g,N,D,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:Vt},Dh(t,s,U);var Q=(s&62914560)===s?Ji-st():(s&4194048)===s?Bh-st():0;if(Q=x0(U,Q),Q!==null){un=s,e.cancelPendingCommit=Q(Jh.bind(null,e,t,s,n,l,a,o,d,g,D,U,null,O,M)),On(e,s,o,!N);return}}Jh(e,t,s,n,l,a,o,d,g)}function Ly(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(!ot(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 On(e,t,n,l){t&=~Ec,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var s=31-rt(a),o=1<<s;l[s]=-1,a&=~o}n!==0&&Jr(e,n,t)}function Fi(){return(he&6)===0?(ja(0),!1):!0}function Nc(){if(ae!==null){if(me===0)var e=ae.return;else e=ae,Jt=Jn=null,Vs(e),Ol=null,pa=0,e=ae;for(;e!==null;)vh(e.alternate,e),e=e.return;ae=null}}function ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,l0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),un=0,Nc(),Ee=e,ae=n=Zt(e.current,null),ue=t,me=0,mt=null,An=!1,Bl=Pl(e,t),_c=!1,Ll=pt=Ec=ll=Cn=Me=0,it=Ma=null,Tc=!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-rt(l),s=1<<a;t|=e[a],l&=~s}return an=t,gi(),n}function kh(e,t){te=null,j.H=Ea,t===Nl||t===Ci?(t=nf(),me=3):t===Ds?(t=nf(),me=4):me=t===uc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mt=t,ae===null&&(Me=1,Yi(e,St(t,e.current)))}function Xh(){var e=ht.current;return e===null?!0:(ue&4194048)===ue?Tt===null:(ue&62914560)===ue||(ue&536870912)!==0?e===Tt:!1}function Gh(){var e=j.H;return j.H=Ea,e===null?Ea:e}function Vh(){var e=j.A;return j.A=Uy,e}function Pi(){Me=4,An||(ue&4194048)!==ue&&ht.current!==null||(Bl=!0),(Cn&134217727)===0&&(ll&134217727)===0||Ee===null||On(Ee,ue,pt,!1)}function Oc(e,t,n){var l=he;he|=2;var a=Gh(),s=Vh();(Ee!==e||ue!==t)&&(Wi=null,ql(e,t)),t=!1;var o=Me;e:do try{if(me!==0&&ae!==null){var d=ae,g=mt;switch(me){case 8:Nc(),o=6;break e;case 3:case 2:case 9:case 6:ht.current===null&&(t=!0);var N=me;if(me=0,mt=null,Yl(e,d,g,N),n&&Bl){o=0;break e}break;default:N=me,me=0,mt=null,Yl(e,d,g,N)}}Hy(),o=Me;break}catch(D){kh(e,D)}while(!0);return t&&e.shellSuspendCounter++,Jt=Jn=null,he=l,j.H=a,j.A=s,ae===null&&(Ee=null,ue=0,gi()),o}function Hy(){for(;ae!==null;)Qh(ae)}function qy(e,t){var n=he;he|=2;var l=Gh(),a=Vh();Ee!==e||ue!==t?(Wi=null,$i=st()+500,ql(e,t)):Bl=Pl(e,t);e:do try{if(me!==0&&ae!==null){t=ae;var s=mt;t:switch(me){case 1:me=0,mt=null,Yl(e,t,s,1);break;case 2:case 9:if(ef(s)){me=0,mt=null,Zh(t);break}t=function(){me!==2&&me!==9||Ee!==e||(me=7),Lt(e)},s.then(t,t);break e;case 3:me=7;break e;case 4:me=5;break e;case 7:ef(s)?(me=0,mt=null,Zh(t)):(me=0,mt=null,Yl(e,t,s,7));break;case 5:var o=null;switch(ae.tag){case 26:o=ae.memoizedState;case 5:case 27:var d=ae;if(o?Md(o):d.stateNode.complete){me=0,mt=null;var g=d.sibling;if(g!==null)ae=g;else{var N=d.return;N!==null?(ae=N,Ii(N)):ae=null}break t}}me=0,mt=null,Yl(e,t,s,5);break;case 6:me=0,mt=null,Yl(e,t,s,6);break;case 8:Nc(),Me=6;break e;default:throw Error(r(462))}}Yy();break}catch(D){kh(e,D)}while(!0);return Jt=Jn=null,j.H=l,j.A=a,he=n,ae!==null?0:(Ee=null,ue=0,gi(),Me)}function Yy(){for(;ae!==null&&!rp();)Qh(ae)}function Qh(e){var t=ph(e.alternate,e,an);e.memoizedProps=e.pendingProps,t===null?Ii(e):ae=t}function Zh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=rh(n,t,t.pendingProps,t.type,void 0,ue);break;case 11:t=rh(n,t,t.pendingProps,t.type.render,t.ref,ue);break;case 5:Vs(t);default:vh(n,t),t=ae=Go(t,an),t=ph(n,t,an)}e.memoizedProps=e.pendingProps,t===null?Ii(e):ae=t}function Yl(e,t,n,l){Jt=Jn=null,Vs(t),Ol=null,pa=0;var a=t.return;try{if(Ny(e,a,t,n,ue)){Me=1,Yi(e,St(n,e.current)),ae=null;return}}catch(s){if(a!==null)throw ae=a,s;Me=1,Yi(e,St(n,e.current)),ae=null;return}t.flags&32768?(ce||l===1?e=!0:Bl||(ue&536870912)!==0?e=!1:(An=e=!0,(l===2||l===9||l===3||l===6)&&(l=ht.current,l!==null&&l.tag===13&&(l.flags|=16384))),Kh(t,e)):Ii(t)}function Ii(e){var t=e;do{if((t.flags&32768)!==0){Kh(t,An);return}e=t.return;var n=My(t.alternate,t,an);if(n!==null){ae=n;return}if(t=t.sibling,t!==null){ae=t;return}ae=t=e}while(t!==null);Me===0&&(Me=5)}function Kh(e,t){do{var n=Dy(e.alternate,e);if(n!==null){n.flags&=32767,ae=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ae=e;return}ae=e=n}while(e!==null);Me=6,ae=null}function Jh(e,t,n,l,a,s,o,d,g){e.cancelPendingCommit=null;do eu();while(ke!==0);if((he&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(s=t.lanes|t.childLanes,s|=vs,bp(e,n,s,o,d,g),e===Ee&&(ae=Ee=null,ue=0),Hl=t,Nn=e,un=n,Ac=s,Cc=a,Lh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Vy(ni,function(){return Ih(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=j.T,j.T=null,a=G.p,G.p=2,o=he,he|=4;try{jy(e,t,n)}finally{he=o,G.p=a,j.T=l}}ke=1,$h(),Wh(),Fh()}}function $h(){if(ke===1){ke=0;var e=Nn,t=Hl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=j.T,j.T=null;var l=G.p;G.p=2;var a=he;he|=4;try{Oh(t,e);var s=kc,o=wo(e.containerInfo),d=s.focusedElem,g=s.selectionRange;if(o!==d&&d&&d.ownerDocument&&jo(d.ownerDocument.documentElement,d)){if(g!==null&&hs(d)){var N=g.start,D=g.end;if(D===void 0&&(D=N),"selectionStart"in d)d.selectionStart=N,d.selectionEnd=Math.min(D,d.value.length);else{var U=d.ownerDocument||document,O=U&&U.defaultView||window;if(O.getSelection){var M=O.getSelection(),Q=d.textContent.length,W=Math.min(g.start,Q),Se=g.end===void 0?W:Math.min(g.end,Q);!M.extend&&W>Se&&(o=Se,Se=W,W=o);var A=Do(d,W),x=Do(d,Se);if(A&&x&&(M.rangeCount!==1||M.anchorNode!==A.node||M.anchorOffset!==A.offset||M.focusNode!==x.node||M.focusOffset!==x.offset)){var R=U.createRange();R.setStart(A.node,A.offset),M.removeAllRanges(),W>Se?(M.addRange(R),M.extend(x.node,x.offset)):(R.setEnd(x.node,x.offset),M.addRange(R))}}}}for(U=[],M=d;M=M.parentNode;)M.nodeType===1&&U.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<U.length;d++){var w=U[d];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}hu=!!Yc,kc=Yc=null}finally{he=a,G.p=l,j.T=n}}e.current=t,ke=2}}function Wh(){if(ke===2){ke=0;var e=Nn,t=Hl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=j.T,j.T=null;var l=G.p;G.p=2;var a=he;he|=4;try{Th(e,t.alternate,t)}finally{he=a,G.p=l,j.T=n}}ke=3}}function Fh(){if(ke===4||ke===3){ke=0,op();var e=Nn,t=Hl,n=un,l=Lh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ke=5:(ke=0,Hl=Nn=null,Ph(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Rn=null),Ku(n),t=t.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(Fl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=j.T,a=G.p,G.p=2,j.T=null;try{for(var s=e.onRecoverableError,o=0;o<l.length;o++){var d=l[o];s(d.value,{componentStack:d.stack})}}finally{j.T=t,G.p=a}}(un&3)!==0&&eu(),Lt(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===Rc?Da++:(Da=0,Rc=e):Da=0,ja(0)}}function Ph(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,da(t)))}function eu(){return $h(),Wh(),Fh(),Ih()}function Ih(){if(ke!==5)return!1;var e=Nn,t=Ac;Ac=0;var n=Ku(un),l=j.T,a=G.p;try{G.p=32>n?32:n,j.T=null,n=Cc,Cc=null;var s=Nn,o=un;if(ke=0,Hl=Nn=null,un=0,(he&6)!==0)throw Error(r(331));var d=he;if(he|=4,wh(s.current),Mh(s,s.current,o,n),he=d,ja(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(Fl,s)}catch{}return!0}finally{G.p=a,j.T=l,Ph(e,t)}}function ed(e,t,n){t=St(n,t),t=ic(e.stateNode,t,2),e=xn(e,t,2),e!==null&&(Il(e,2),Lt(e))}function pe(e,t,n){if(e.tag===3)ed(e,e,n);else for(;t!==null;){if(t.tag===3){ed(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Rn===null||!Rn.has(l))){e=St(n,e),n=th(2),l=xn(t,n,2),l!==null&&(nh(n,l,t,e),Il(l,2),Lt(l));break}}t=t.return}}function zc(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new By;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)||(_c=!0,a.add(n),e=ky.bind(null,e,t,n),t.then(e,e))}function ky(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ee===e&&(ue&n)===n&&(Me===4||Me===3&&(ue&62914560)===ue&&300>st()-Ji?(he&2)===0&&ql(e,0):Ec|=n,Ll===ue&&(Ll=0)),Lt(e)}function td(e,t){t===0&&(t=Kr()),e=Qn(e,t),e!==null&&(Il(e,t),Lt(e))}function Xy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function Gy(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),td(e,n)}function Vy(e,t){return Gu(e,t)}var tu=null,kl=null,Mc=!1,nu=!1,Dc=!1,zn=0;function Lt(e){e!==kl&&e.next===null&&(kl===null?tu=kl=e:kl=kl.next=e),nu=!0,Mc||(Mc=!0,Zy())}function ja(e,t){if(!Dc&&nu){Dc=!0;do for(var n=!1,l=tu;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var s=0;else{var o=l.suspendedLanes,d=l.pingedLanes;s=(1<<31-rt(42|e)+1)-1,s&=a&~(o&~d),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,id(l,s))}else s=ue,s=ui(l,l===Ee?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||Pl(l,s)||(n=!0,id(l,s));l=l.next}while(n);Dc=!1}}function Qy(){nd()}function nd(){nu=Mc=!1;var e=0;zn!==0&&n0()&&(e=zn);for(var t=st(),n=null,l=tu;l!==null;){var a=l.next,s=ld(l,t);s===0?(l.next=null,n===null?tu=a:n.next=a,a===null&&(kl=n)):(n=l,(e!==0||(s&3)!==0)&&(nu=!0)),l=a}ke!==0&&ke!==5||ja(e),zn!==0&&(zn=0)}function ld(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var o=31-rt(s),d=1<<o,g=a[o];g===-1?((d&n)===0||(d&l)!==0)&&(a[o]=gp(d,t)):g<=t&&(e.expiredLanes|=d),s&=~d}if(t=Ee,n=ue,n=ui(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(me===2||me===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Vu(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&&Vu(l),Ku(n)){case 2:case 8:n=Qr;break;case 32:n=ni;break;case 268435456:n=Zr;break;default:n=ni}return l=ad.bind(null,e),n=Gu(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Vu(l),e.callbackPriority=2,e.callbackNode=null,2}function ad(e,t){if(ke!==0&&ke!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(eu()&&e.callbackNode!==n)return null;var l=ue;return l=ui(e,e===Ee?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(qh(e,l,t),ld(e,st()),e.callbackNode!=null&&e.callbackNode===n?ad.bind(null,e):null)}function id(e,t){if(eu())return null;qh(e,t,!0)}function Zy(){a0(function(){(he&6)!==0?Gu(Vr,Qy):nd()})}function jc(){if(zn===0){var e=Cl;e===0&&(e=li,li<<=1,(li&261888)===0&&(li=256)),zn=e}return zn}function ud(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:oi(""+e)}function sd(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 Ky(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var s=ud((a[et]||null).action),o=l.submitter;o&&(t=(t=o[et]||null)?ud(t.formAction):o.getAttribute("formAction"),t!==null&&(s=t,o=null));var d=new mi("action","action",null,l,a);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(zn!==0){var g=o?sd(a,o):new FormData(a);Is(n,{pending:!0,data:g,method:a.method,action:s},null,g)}}else typeof s=="function"&&(d.preventDefault(),g=o?sd(a,o):new FormData(a),Is(n,{pending:!0,data:g,method:a.method,action:s},s,g))},currentTarget:a}]})}}for(var wc=0;wc<ys.length;wc++){var Uc=ys[wc],Jy=Uc.toLowerCase(),$y=Uc[0].toUpperCase()+Uc.slice(1);Ot(Jy,"on"+$y)}Ot(Lo,"onAnimationEnd"),Ot(Ho,"onAnimationIteration"),Ot(qo,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(fy,"onTransitionRun"),Ot(hy,"onTransitionStart"),Ot(dy,"onTransitionCancel"),Ot(Yo,"onTransitionEnd"),hl("onMouseEnter",["mouseout","mouseover"]),hl("onMouseLeave",["mouseout","mouseover"]),hl("onPointerEnter",["pointerout","pointerover"]),hl("onPointerLeave",["pointerout","pointerover"]),kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kn("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(" "),Wy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wa));function cd(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 d=l[o],g=d.instance,N=d.currentTarget;if(d=d.listener,g!==s&&a.isPropagationStopped())break e;s=d,a.currentTarget=N;try{s(a)}catch(D){vi(D)}a.currentTarget=null,s=g}else for(o=0;o<l.length;o++){if(d=l[o],g=d.instance,N=d.currentTarget,d=d.listener,g!==s&&a.isPropagationStopped())break e;s=d,a.currentTarget=N;try{s(a)}catch(D){vi(D)}a.currentTarget=null,s=g}}}}function ie(e,t){var n=t[Ju];n===void 0&&(n=t[Ju]=new Set);var l=e+"__bubble";n.has(l)||(rd(t,e,2,!1),n.add(l))}function Bc(e,t,n){var l=0;t&&(l|=4),rd(n,e,l,t)}var lu="_reactListening"+Math.random().toString(36).slice(2);function Lc(e){if(!e[lu]){e[lu]=!0,eo.forEach(function(n){n!=="selectionchange"&&(Wy.has(n)||Bc(n,!1,e),Bc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[lu]||(t[lu]=!0,Bc("selectionchange",!1,t))}}function rd(e,t,n,l){switch(Hd(t)){case 2:var a=T0;break;case 8:a=A0;break;default:a=Pc}n=a.bind(null,t,n,e),a=void 0,!ls||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 Hc(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 d=l.stateNode.containerInfo;if(d===a)break;if(o===4)for(o=l.return;o!==null;){var g=o.tag;if((g===3||g===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;d!==null;){if(o=rl(d),o===null)return;if(g=o.tag,g===5||g===6||g===26||g===27){l=s=o;continue e}d=d.parentNode}}l=l.return}ho(function(){var N=s,D=ts(n),U=[];e:{var O=ko.get(e);if(O!==void 0){var M=mi,Q=e;switch(e){case"keypress":if(hi(n)===0)break e;case"keydown":case"keyup":M=Gp;break;case"focusin":Q="focus",M=ss;break;case"focusout":Q="blur",M=ss;break;case"beforeblur":case"afterblur":M=ss;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=yo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Mp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Zp;break;case Lo:case Ho:case qo:M=wp;break;case Yo:M=Jp;break;case"scroll":case"scrollend":M=Op;break;case"wheel":M=Wp;break;case"copy":case"cut":case"paste":M=Bp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=go;break;case"toggle":case"beforetoggle":M=Pp}var W=(t&4)!==0,Se=!W&&(e==="scroll"||e==="scrollend"),A=W?O!==null?O+"Capture":null:O;W=[];for(var x=N,R;x!==null;){var w=x;if(R=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||R===null||A===null||(w=na(x,A),w!=null&&W.push(Ua(x,w,R))),Se)break;x=x.return}0<W.length&&(O=new M(O,Q,null,n,D),U.push({event:O,listeners:W}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",O&&n!==es&&(Q=n.relatedTarget||n.fromElement)&&(rl(Q)||Q[cl]))break e;if((M||O)&&(O=D.window===D?D:(O=D.ownerDocument)?O.defaultView||O.parentWindow:window,M?(Q=n.relatedTarget||n.toElement,M=N,Q=Q?rl(Q):null,Q!==null&&(Se=h(Q),W=Q.tag,Q!==Se||W!==5&&W!==27&&W!==6)&&(Q=null)):(M=null,Q=N),M!==Q)){if(W=yo,w="onMouseLeave",A="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(W=go,w="onPointerLeave",A="onPointerEnter",x="pointer"),Se=M==null?O:ta(M),R=Q==null?O:ta(Q),O=new W(w,x+"leave",M,n,D),O.target=Se,O.relatedTarget=R,w=null,rl(D)===N&&(W=new W(A,x+"enter",Q,n,D),W.target=R,W.relatedTarget=Se,w=W),Se=w,M&&Q)t:{for(W=Fy,A=M,x=Q,R=0,w=A;w;w=W(w))R++;w=0;for(var J=x;J;J=W(J))w++;for(;0<R-w;)A=W(A),R--;for(;0<w-R;)x=W(x),w--;for(;R--;){if(A===x||x!==null&&A===x.alternate){W=A;break t}A=W(A),x=W(x)}W=null}else W=null;M!==null&&od(U,O,M,W,!1),Q!==null&&Se!==null&&od(U,Se,Q,W,!0)}}e:{if(O=N?ta(N):window,M=O.nodeName&&O.nodeName.toLowerCase(),M==="select"||M==="input"&&O.type==="file")var oe=Co;else if(To(O))if(Ro)oe=cy;else{oe=uy;var K=iy}else M=O.nodeName,!M||M.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?N&&Iu(N.elementType)&&(oe=Co):oe=sy;if(oe&&(oe=oe(e,N))){Ao(U,oe,n,D);break e}K&&K(e,O,N),e==="focusout"&&N&&O.type==="number"&&N.memoizedProps.value!=null&&Pu(O,"number",O.value)}switch(K=N?ta(N):window,e){case"focusin":(To(K)||K.contentEditable==="true")&&(gl=K,ds=N,oa=null);break;case"focusout":oa=ds=gl=null;break;case"mousedown":ms=!0;break;case"contextmenu":case"mouseup":case"dragend":ms=!1,Uo(U,n,D);break;case"selectionchange":if(oy)break;case"keydown":case"keyup":Uo(U,n,D)}var ne;if(rs)e:{switch(e){case"compositionstart":var se="onCompositionStart";break e;case"compositionend":se="onCompositionEnd";break e;case"compositionupdate":se="onCompositionUpdate";break e}se=void 0}else vl?_o(e,n)&&(se="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(se="onCompositionStart");se&&(bo&&n.locale!=="ko"&&(vl||se!=="onCompositionStart"?se==="onCompositionEnd"&&vl&&(ne=mo()):(mn=D,as="value"in mn?mn.value:mn.textContent,vl=!0)),K=au(N,se),0<K.length&&(se=new vo(se,e,null,n,D),U.push({event:se,listeners:K}),ne?se.data=ne:(ne=Eo(n),ne!==null&&(se.data=ne)))),(ne=ey?ty(e,n):ny(e,n))&&(se=au(N,"onBeforeInput"),0<se.length&&(K=new vo("onBeforeInput","beforeinput",null,n,D),U.push({event:K,listeners:se}),K.data=ne)),Ky(U,e,N,n,D)}cd(U,t)})}function Ua(e,t,n){return{instance:e,listener:t,currentTarget:n}}function au(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 Fy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function od(e,t,n,l,a){for(var s=t._reactName,o=[];n!==null&&n!==l;){var d=n,g=d.alternate,N=d.stateNode;if(d=d.tag,g!==null&&g===l)break;d!==5&&d!==26&&d!==27||N===null||(g=N,a?(N=na(n,s),N!=null&&o.unshift(Ua(n,N,g))):a||(N=na(n,s),N!=null&&o.push(Ua(n,N,g)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Py=/\r\n?/g,Iy=/\u0000|\uFFFD/g;function fd(e){return(typeof e=="string"?e:""+e).replace(Py,`
`).replace(Iy,"")}function hd(e,t){return t=fd(t),fd(e)===t}function be(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":ci(e,"class",l);break;case"tabIndex":ci(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ci(e,n,l);break;case"style":oo(e,l,s);break;case"data":if(t!=="object"){ci(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=oi(""+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"&&be(e,t,"name",a.name,a,null),be(e,t,"formEncType",a.formEncType,a,null),be(e,t,"formMethod",a.formMethod,a,null),be(e,t,"formTarget",a.formTarget,a,null)):(be(e,t,"encType",a.encType,a,null),be(e,t,"method",a.method,a,null),be(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=oi(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Vt);break;case"onScroll":l!=null&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("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=oi(""+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":ie("beforetoggle",e),ie("toggle",e),si(e,"popover",l);break;case"xlinkActuate":Gt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":si(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,si(e,n,l))}}function qc(e,t,n,l,a,s){switch(n){case"style":oo(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&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Vt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!to.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,""):si(e,n,l)}}}function $e(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ie("error",e),ie("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:be(e,t,s,o,n,null)}}a&&be(e,t,"srcSet",n.srcSet,n,null),l&&be(e,t,"src",n.src,n,null);return;case"input":ie("invalid",e);var d=s=o=a=null,g=null,N=null;for(l in n)if(n.hasOwnProperty(l)){var D=n[l];if(D!=null)switch(l){case"name":a=D;break;case"type":o=D;break;case"checked":g=D;break;case"defaultChecked":N=D;break;case"value":s=D;break;case"defaultValue":d=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:be(e,t,l,D,n,null)}}uo(e,s,d,g,N,o,a,!1);return;case"select":ie("invalid",e),l=o=s=null;for(a in n)if(n.hasOwnProperty(a)&&(d=n[a],d!=null))switch(a){case"value":s=d;break;case"defaultValue":o=d;break;case"multiple":l=d;default:be(e,t,a,d,n,null)}t=s,n=o,e.multiple=!!l,t!=null?dl(e,!!l,t,!1):n!=null&&dl(e,!!l,n,!0);return;case"textarea":ie("invalid",e),s=a=l=null;for(o in n)if(n.hasOwnProperty(o)&&(d=n[o],d!=null))switch(o){case"value":l=d;break;case"defaultValue":a=d;break;case"children":s=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(r(91));break;default:be(e,t,o,d,n,null)}co(e,l,a,s);return;case"option":for(g in n)if(n.hasOwnProperty(g)&&(l=n[g],l!=null))switch(g){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:be(e,t,g,l,n,null)}return;case"dialog":ie("beforetoggle",e),ie("toggle",e),ie("cancel",e),ie("close",e);break;case"iframe":case"object":ie("load",e);break;case"video":case"audio":for(l=0;l<wa.length;l++)ie(wa[l],e);break;case"image":ie("error",e),ie("load",e);break;case"details":ie("toggle",e);break;case"embed":case"source":case"link":ie("error",e),ie("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(N in n)if(n.hasOwnProperty(N)&&(l=n[N],l!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:be(e,t,N,l,n,null)}return;default:if(Iu(t)){for(D in n)n.hasOwnProperty(D)&&(l=n[D],l!==void 0&&qc(e,t,D,l,n,void 0));return}}for(d in n)n.hasOwnProperty(d)&&(l=n[d],l!=null&&be(e,t,d,l,n,null))}function e0(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,d=null,g=null,N=null,D=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":g=U;default:l.hasOwnProperty(M)||be(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":N=M;break;case"defaultChecked":D=M;break;case"value":o=M;break;case"defaultValue":d=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:M!==U&&be(e,t,O,M,l,U)}}Fu(e,o,d,g,N,D,s,a);return;case"select":M=o=d=O=null;for(s in n)if(g=n[s],n.hasOwnProperty(s)&&g!=null)switch(s){case"value":break;case"multiple":M=g;default:l.hasOwnProperty(s)||be(e,t,s,null,l,g)}for(a in l)if(s=l[a],g=n[a],l.hasOwnProperty(a)&&(s!=null||g!=null))switch(a){case"value":O=s;break;case"defaultValue":d=s;break;case"multiple":o=s;default:s!==g&&be(e,t,a,s,l,g)}t=d,n=o,l=M,O!=null?dl(e,!!n,O,!1):!!l!=!!n&&(t!=null?dl(e,!!n,t,!0):dl(e,!!n,n?[]:"",!1));return;case"textarea":M=O=null;for(d in n)if(a=n[d],n.hasOwnProperty(d)&&a!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:be(e,t,d,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&&be(e,t,o,a,l,s)}so(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:be(e,t,Q,null,l,O)}for(g in l)if(O=l[g],M=n[g],l.hasOwnProperty(g)&&O!==M&&(O!=null||M!=null))switch(g){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:be(e,t,g,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 W in n)O=n[W],n.hasOwnProperty(W)&&O!=null&&!l.hasOwnProperty(W)&&be(e,t,W,null,l,O);for(N in l)if(O=l[N],M=n[N],l.hasOwnProperty(N)&&O!==M&&(O!=null||M!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:be(e,t,N,O,l,M)}return;default:if(Iu(t)){for(var Se in n)O=n[Se],n.hasOwnProperty(Se)&&O!==void 0&&!l.hasOwnProperty(Se)&&qc(e,t,Se,void 0,l,O);for(D in l)O=l[D],M=n[D],!l.hasOwnProperty(D)||O===M||O===void 0&&M===void 0||qc(e,t,D,O,l,M);return}}for(var A in n)O=n[A],n.hasOwnProperty(A)&&O!=null&&!l.hasOwnProperty(A)&&be(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||be(e,t,U,O,l,M)}function dd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function t0(){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,d=a.duration;if(s&&d&&dd(o)){for(o=0,d=a.responseEnd,l+=1;l<n.length;l++){var g=n[l],N=g.startTime;if(N>d)break;var D=g.transferSize,U=g.initiatorType;D&&dd(U)&&(g=g.responseEnd,o+=D*(g<d?1:(d-N)/(g-N)))}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,kc=null;function iu(e){return e.nodeType===9?e:e.ownerDocument}function md(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 pd(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 Xc(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 Gc=null;function n0(){var e=window.event;return e&&e.type==="popstate"?e===Gc?!1:(Gc=e,!0):(Gc=null,!1)}var yd=typeof setTimeout=="function"?setTimeout:void 0,l0=typeof clearTimeout=="function"?clearTimeout:void 0,vd=typeof Promise=="function"?Promise:void 0,a0=typeof queueMicrotask=="function"?queueMicrotask:typeof vd<"u"?function(e){return vd.resolve(null).then(e).catch(i0)}:yd;function i0(e){setTimeout(function(){throw e})}function Mn(e){return e==="head"}function gd(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,d=s.nodeName;s[ea]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=o}}else n==="body"&&Ba(e.ownerDocument.body);n=a}while(n);Ql(t)}function bd(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 Vc(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":Vc(n),$u(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function u0(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=At(e.nextSibling),e===null)break}return null}function s0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=At(e.nextSibling),e===null))return null;return e}function Sd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=At(e.nextSibling),e===null))return null;return e}function Qc(e){return e.data==="$?"||e.data==="$~"}function Zc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function c0(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 At(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 Kc=null;function xd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return At(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function _d(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 Ed(e,t,n){switch(t=iu(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]);$u(e)}var Ct=new Map,Td=new Set;function uu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var sn=G.d;G.d={f:r0,r:o0,D:f0,C:h0,L:d0,m:m0,X:y0,S:p0,M:v0};function r0(){var e=sn.f(),t=Fi();return e||t}function o0(e){var t=ol(e);t!==null&&t.tag===5&&t.type==="form"?kf(t):sn.r(e)}var Xl=typeof document>"u"?null:document;function Ad(e,t,n){var l=Xl;if(l&&typeof t=="string"&&t){var a=gt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Td.has(a)||(Td.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),$e(t,"link",e),Ge(t),l.head.appendChild(t)))}}function f0(e){sn.D(e),Ad("dns-prefetch",e,null)}function h0(e,t){sn.C(e,t),Ad("preconnect",e,t)}function d0(e,t,n){sn.L(e,t,n);var l=Xl;if(l&&e&&t){var a='link[rel="preload"][as="'+gt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+gt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+gt(n.imageSizes)+'"]')):a+='[href="'+gt(e)+'"]';var s=a;switch(t){case"style":s=Gl(e);break;case"script":s=Vl(e)}Ct.has(s)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ct.set(s,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(La(s))||t==="script"&&l.querySelector(Ha(s))||(t=l.createElement("link"),$e(t,"link",e),Ge(t),l.head.appendChild(t)))}}function m0(e,t){sn.m(e,t);var n=Xl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+gt(l)+'"][href="'+gt(e)+'"]',s=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Vl(e)}if(!Ct.has(s)&&(e=S({rel:"modulepreload",href:e},t),Ct.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"),$e(l,"link",e),Ge(l),n.head.appendChild(l)}}}function p0(e,t,n){sn.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 d={loading:0,preload:null};if(o=l.querySelector(La(s)))d.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ct.get(s))&&Jc(e,n);var g=o=l.createElement("link");Ge(g),$e(g,"link",e),g._p=new Promise(function(N,D){g.onload=N,g.onerror=D}),g.addEventListener("load",function(){d.loading|=1}),g.addEventListener("error",function(){d.loading|=2}),d.loading|=4,su(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:d},a.set(s,o)}}}function y0(e,t){sn.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=S({src:e,async:!0},t),(t=Ct.get(a))&&$c(e,t),s=n.createElement("script"),Ge(s),$e(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function v0(e,t){sn.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=S({src:e,async:!0,type:"module"},t),(t=Ct.get(a))&&$c(e,t),s=n.createElement("script"),Ge(s),$e(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function Cd(e,t,n,l){var a=(a=le.current)?uu(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),Ct.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},Ct.set(e,n),s||g0(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="'+gt(e)+'"'}function La(e){return'link[rel="stylesheet"]['+e+"]"}function Rd(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function g0(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}),$e(t,"link",n),Ge(t),e.head.appendChild(t))}function Vl(e){return'[src="'+gt(e)+'"]'}function Ha(e){return"script[async]"+e}function Nd(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+gt(n.href)+'"]');if(l)return t.instance=l,Ge(l),l;var a=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ge(l),$e(l,"style",a),su(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,Ge(s),s;l=Rd(n),(a=Ct.get(a))&&Jc(l,a),s=(e.ownerDocument||e).createElement("link"),Ge(s);var o=s;return o._p=new Promise(function(d,g){o.onload=d,o.onerror=g}),$e(s,"link",l),t.state.loading|=4,su(s,n.precedence,e),t.instance=s;case"script":return s=Vl(n.src),(a=e.querySelector(Ha(s)))?(t.instance=a,Ge(a),a):(l=n,(a=Ct.get(s))&&(l=S({},n),$c(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ge(a),$e(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,su(l,n.precedence,e));return t.instance}function su(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 d=l[o];if(d.dataset.precedence===t)s=d;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 Jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $c(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var cu=null;function Od(e,t,n){if(cu===null){var l=new Map,a=cu=new Map;a.set(n,l)}else a=cu,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[Qe]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var o=s.getAttribute(t)||"";o=e+o;var d=l.get(o);d?d.push(s):l.set(o,[s])}}return l}function zd(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function b0(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 Md(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=ru.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Ge(s);return}s=t.ownerDocument||t,l=Rd(l),(a=Ct.get(a))&&Jc(l,a),s=s.createElement("link"),Ge(s);var o=s;o._p=new Promise(function(d,g){o.onload=d,o.onerror=g}),$e(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=ru.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Wc=0;function x0(e,t){return e.stylesheets&&e.count===0&&fu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&fu(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Wc===0&&(Wc=62500*t0());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&fu(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Wc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function ru(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ou=null;function fu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ou=new Map,t.forEach(_0,e),ou=null,ru.call(e))}function _0(e,t){if(!(t.state.loading&4)){var n=ou.get(e);if(n)var l=n.get(null);else{n=new Map,ou.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=ru.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:k,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function E0(e,t,n,l,a,s,o,d,g){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=Qu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qu(0),this.hiddenUpdates=Qu(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.incompleteTransitions=new Map}function Dd(e,t,n,l,a,s,o,d,g,N,D,U){return e=new E0(e,t,n,o,g,N,D,U,d),t=1,s===!0&&(t|=24),s=ft(3,null,null,t),e.current=s,s.stateNode=e,t=Os(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:n,cache:t},js(s),e}function jd(e){return e?(e=xl,e):xl}function wd(e,t,n,l,a,s){a=jd(a),l.context===null?l.context=a:l.pendingContext=a,l=Sn(t),l.payload={element:n},s=s===void 0?null:s,s!==null&&(l.callback=s),n=xn(e,l,t),n!==null&&(ut(n,e,t),va(n,e,t))}function Ud(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Fc(e,t){Ud(e,t),(e=e.alternate)&&Ud(e,t)}function Bd(e){if(e.tag===13||e.tag===31){var t=Qn(e,67108864);t!==null&&ut(t,e,67108864),Fc(e,67108864)}}function Ld(e){if(e.tag===13||e.tag===31){var t=yt();t=Zu(t);var n=Qn(e,t);n!==null&&ut(n,e,t),Fc(e,t)}}var hu=!0;function T0(e,t,n,l){var a=j.T;j.T=null;var s=G.p;try{G.p=2,Pc(e,t,n,l)}finally{G.p=s,j.T=a}}function A0(e,t,n,l){var a=j.T;j.T=null;var s=G.p;try{G.p=8,Pc(e,t,n,l)}finally{G.p=s,j.T=a}}function Pc(e,t,n,l){if(hu){var a=Ic(l);if(a===null)Hc(e,t,l,du,n),qd(e,l);else if(R0(a,e,t,n,l))l.stopPropagation();else if(qd(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 d=s;for(d.pendingLanes|=2,d.entangledLanes|=2;o;){var g=1<<31-rt(o);d.entanglements[1]|=g,o&=~g}Lt(s),(he&6)===0&&($i=st()+500,ja(0))}}break;case 31:case 13:d=Qn(s,2),d!==null&&ut(d,s,2),Fi(),Fc(s,2)}if(s=Ic(l),s===null&&Hc(e,t,l,du,n),s===a)break;a=s}a!==null&&l.stopPropagation()}else Hc(e,t,l,null,n)}}function Ic(e){return e=ts(e),er(e)}var du=null;function er(e){if(du=null,e=rl(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===31){if(e=b(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 du=e,null}function Hd(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(fp()){case Vr:return 2;case Qr:return 8;case ni:case hp:return 32;case Zr:return 268435456;default:return 32}default:return 32}}var tr=!1,Dn=null,jn=null,wn=null,Ya=new Map,ka=new Map,Un=[],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 qd(e,t){switch(e){case"focusin":case"focusout":Dn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":wn=null;break;case"pointerover":case"pointerout":Ya.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ka.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&&Bd(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 Dn=Xa(Dn,e,t,n,l,a),!0;case"dragenter":return jn=Xa(jn,e,t,n,l,a),!0;case"mouseover":return wn=Xa(wn,e,t,n,l,a),!0;case"pointerover":var s=a.pointerId;return Ya.set(s,Xa(Ya.get(s)||null,e,t,n,l,a)),!0;case"gotpointercapture":return s=a.pointerId,ka.set(s,Xa(ka.get(s)||null,e,t,n,l,a)),!0}return!1}function Yd(e){var t=rl(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,Pr(e.priority,function(){Ld(n)});return}}else if(t===31){if(t=b(n),t!==null){e.blockedOn=t,Pr(e.priority,function(){Ld(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 mu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ic(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);es=l,n.target.dispatchEvent(l),es=null}else return t=ol(n),t!==null&&Bd(t),e.blockedOn=n,!1;t.shift()}return!0}function kd(e,t,n){mu(e)&&n.delete(t)}function N0(){tr=!1,Dn!==null&&mu(Dn)&&(Dn=null),jn!==null&&mu(jn)&&(jn=null),wn!==null&&mu(wn)&&(wn=null),Ya.forEach(kd),ka.forEach(kd)}function pu(e,t){e.blockedOn===t&&(e.blockedOn=null,tr||(tr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,N0)))}var yu=null;function Xd(e){yu!==e&&(yu=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){yu===e&&(yu=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(er(l||n)===null)continue;break}var s=ol(n);s!==null&&(e.splice(t,3),t-=3,Is(s,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Ql(e){function t(g){return pu(g,e)}Dn!==null&&pu(Dn,e),jn!==null&&pu(jn,e),wn!==null&&pu(wn,e),Ya.forEach(t),ka.forEach(t);for(var n=0;n<Un.length;n++){var l=Un[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Un.length&&(n=Un[0],n.blockedOn===null);)Yd(n),n.blockedOn===null&&Un.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||Xd(n);else if(o){var d=null;if(s&&s.hasAttribute("formAction")){if(a=s,o=s[et]||null)d=o.formAction;else if(er(a)!==null)continue}else d=o.action;typeof d=="function"?n[l+1]=d:(n.splice(l,3),l-=3),Xd(n)}}}function Gd(){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 nr(e){this._internalRoot=e}vu.prototype.render=nr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=yt();wd(n,l,e,t,null,null)},vu.prototype.unmount=nr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wd(e.current,2,null,e,null,null),Fi(),t[cl]=null}};function vu(e){this._internalRoot=e}vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fr();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Un.length&&t!==0&&t<Un[n].priority;n++);Un.splice(n,0,e),n===0&&Yd(e)}};var Vd=i.version;if(Vd!=="19.2.0")throw Error(r(527,Vd,"19.2.0"));G.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=v(t),e=e!==null?T(e):null,e=e===null?null:e.stateNode,e};var O0={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gu.isDisabled&&gu.supportsFiber)try{Fl=gu.inject(O0),ct=gu}catch{}}return Va.createRoot=function(e,t){if(!f(e))throw Error(r(299));var n=!1,l="",a=Ff,s=Pf,o=If;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=Dd(e,1,!1,null,null,n,l,null,a,s,o,Gd),e[cl]=t.current,Lc(e),new nr(t)},Va.hydrateRoot=function(e,t,n){if(!f(e))throw Error(r(299));var l=!1,a="",s=Ff,o=Pf,d=If,g=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&&(d=n.onRecoverableError),n.formState!==void 0&&(g=n.formState)),t=Dd(e,1,!0,t,n??null,l,a,g,s,o,d,Gd),t.context=jd(null),n=t.current,l=yt(),l=Zu(l),a=Sn(l),a.callback=null,xn(n,a,l),n=l,t.current.lanes=n,Il(t,n),Lt(t),e[cl]=t.current,Lc(e),new vu(t)},Va.version="19.2.0",Va}var em;function q0(){if(em)return ir.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(),ir.exports=H0(),ir.exports}var Y0=q0();var tm="popstate";function k0(u={}){function i(r,f){let{pathname:h,search:m,hash:b}=r.location;return yr("",{pathname:h,search:m,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function c(r,f){return typeof f=="string"?f:Wa(f)}return G0(i,c,null,u)}function Oe(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function jt(u,i){if(!u){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function X0(){return Math.random().toString(36).substring(2,10)}function nm(u,i){return{usr:u.state,key:u.key,idx:i}}function yr(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||X0()}}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 G0(u,i,c,r={}){let{window:f=document.defaultView,v5Compat:h=!1}=r,m=f.history,b="POP",y=null,v=T();v==null&&(v=0,m.replaceState({...m.state,idx:v},""));function T(){return(m.state||{idx:null}).idx}function S(){b="POP";let q=T(),H=q==null?null:q-v;v=q,y&&y({action:b,location:X.location,delta:H})}function C(q,H){b="PUSH";let Y=yr(X.location,q,H);v=T()+1;let k=nm(Y,v),F=X.createHref(Y);try{m.pushState(k,"",F)}catch(ye){if(ye instanceof DOMException&&ye.name==="DataCloneError")throw ye;f.location.assign(F)}h&&y&&y({action:b,location:X.location,delta:1})}function z(q,H){b="REPLACE";let Y=yr(X.location,q,H);v=T();let k=nm(Y,v),F=X.createHref(Y);m.replaceState(k,"",F),h&&y&&y({action:b,location:X.location,delta:0})}function L(q){return V0(q)}let X={get action(){return b},get location(){return u(f,m)},listen(q){if(y)throw new Error("A history only accepts one active listener");return f.addEventListener(tm,S),y=q,()=>{f.removeEventListener(tm,S),y=null}},createHref(q){return i(f,q)},createURL:L,encodeLocation(q){let H=L(q);return{pathname:H.pathname,search:H.search,hash:H.hash}},push:C,replace:z,go(q){return m.go(q)}};return X}function V0(u,i=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Oe(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 xm(u,i,c="/"){return Q0(u,i,c,!1)}function Q0(u,i,c,r){let f=typeof i=="string"?Kl(i):i,h=on(f.pathname||"/",c);if(h==null)return null;let m=_m(u);Z0(m);let b=null;for(let y=0;b==null&&y<m.length;++y){let v=lv(h);b=tv(m[y],v,r)}return b}function _m(u,i=[],c=[],r="",f=!1){let h=(m,b,y=f,v)=>{let T={relativePath:v===void 0?m.path||"":v,caseSensitive:m.caseSensitive===!0,childrenIndex:b,route:m};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(r)&&y)return;Oe(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 S=rn([r,T.relativePath]),C=c.concat(T);m.children&&m.children.length>0&&(Oe(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),_m(m.children,i,C,S,y)),!(m.path==null&&!m.index)&&i.push({path:S,score:I0(S,m.index),routesMeta:C})};return u.forEach((m,b)=>{if(m.path===""||!m.path?.includes("?"))h(m,b);else for(let y of Em(m.path))h(m,b,!0,y)}),i}function Em(u){let i=u.split("/");if(i.length===0)return[];let[c,...r]=i,f=c.endsWith("?"),h=c.replace(/\?$/,"");if(r.length===0)return f?[h,""]:[h];let m=Em(r.join("/")),b=[];return b.push(...m.map(y=>y===""?h:[h,y].join("/"))),f&&b.push(...m),b.map(y=>u.startsWith("/")&&y===""?"/":y)}function Z0(u){u.sort((i,c)=>i.score!==c.score?c.score-i.score:ev(i.routesMeta.map(r=>r.childrenIndex),c.routesMeta.map(r=>r.childrenIndex)))}var K0=/^:[\w-]+$/,J0=3,$0=2,W0=1,F0=10,P0=-2,lm=u=>u==="*";function I0(u,i){let c=u.split("/"),r=c.length;return c.some(lm)&&(r+=P0),i&&(r+=$0),c.filter(f=>!lm(f)).reduce((f,h)=>f+(K0.test(h)?J0:h===""?W0:F0),r)}function ev(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 tv(u,i,c=!1){let{routesMeta:r}=u,f={},h="/",m=[];for(let b=0;b<r.length;++b){let y=r[b],v=b===r.length-1,T=h==="/"?i:i.slice(h.length)||"/",S=zu({path:y.relativePath,caseSensitive:y.caseSensitive,end:v},T),C=y.route;if(!S&&v&&c&&!r[r.length-1].route.index&&(S=zu({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},T)),!S)return null;Object.assign(f,S.params),m.push({params:f,pathname:rn([h,S.pathname]),pathnameBase:cv(rn([h,S.pathnameBase])),route:C}),S.pathnameBase!=="/"&&(h=rn([h,S.pathnameBase]))}return m}function zu(u,i){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[c,r]=nv(u.path,u.caseSensitive,u.end),f=i.match(c);if(!f)return null;let h=f[0],m=h.replace(/(.)\/+$/,"$1"),b=f.slice(1);return{params:r.reduce((v,{paramName:T,isOptional:S},C)=>{if(T==="*"){let L=b[C]||"";m=h.slice(0,h.length-L.length).replace(/(.)\/+$/,"$1")}const z=b[C];return S&&!z?v[T]=void 0:v[T]=(z||"").replace(/%2F/g,"/"),v},{}),pathname:h,pathnameBase:m,pattern:u}}function nv(u,i=!1,c=!0){jt(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,(m,b,y)=>(r.push({paramName:b,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).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 lv(u){try{return u.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return jt(!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 on(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 av=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,iv=u=>av.test(u);function uv(u,i="/"){let{pathname:c,search:r="",hash:f=""}=typeof u=="string"?Kl(u):u,h;if(c)if(iv(c))h=c;else{if(c.includes("//")){let m=c;c=c.replace(/\/\/+/g,"/"),jt(!1,`Pathnames cannot have embedded double slashes - normalizing ${m} -> ${c}`)}c.startsWith("/")?h=am(c.substring(1),"/"):h=am(c,i)}else h=i;return{pathname:h,search:rv(r),hash:ov(f)}}function am(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 rr(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 sv(u){return u.filter((i,c)=>c===0||i.route.path&&i.route.path.length>0)}function Tm(u){let i=sv(u);return i.map((c,r)=>r===i.length-1?c.pathname:c.pathnameBase)}function Am(u,i,c,r=!1){let f;typeof u=="string"?f=Kl(u):(f={...u},Oe(!f.pathname||!f.pathname.includes("?"),rr("?","pathname","search",f)),Oe(!f.pathname||!f.pathname.includes("#"),rr("#","pathname","hash",f)),Oe(!f.search||!f.search.includes("#"),rr("#","search","hash",f)));let h=u===""||f.pathname==="",m=h?"/":f.pathname,b;if(m==null)b=c;else{let S=i.length-1;if(!r&&m.startsWith("..")){let C=m.split("/");for(;C[0]==="..";)C.shift(),S-=1;f.pathname=C.join("/")}b=S>=0?i[S]:"/"}let y=uv(f,b),v=m&&m!=="/"&&m.endsWith("/"),T=(h||m===".")&&c.endsWith("/");return!y.pathname.endsWith("/")&&(v||T)&&(y.pathname+="/"),y}var rn=u=>u.join("/").replace(/\/\/+/g,"/"),cv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),rv=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,ov=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u;function fv(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 Cm=["POST","PUT","PATCH","DELETE"];new Set(Cm);var hv=["GET",...Cm];new Set(hv);var Jl=E.createContext(null);Jl.displayName="DataRouter";var Du=E.createContext(null);Du.displayName="DataRouterState";E.createContext(!1);var Rm=E.createContext({isTransitioning:!1});Rm.displayName="ViewTransition";var dv=E.createContext(new Map);dv.displayName="Fetchers";var mv=E.createContext(null);mv.displayName="Await";var Yt=E.createContext(null);Yt.displayName="Navigation";var Fa=E.createContext(null);Fa.displayName="Location";var fn=E.createContext({outlet:null,matches:[],isDataRoute:!1});fn.displayName="Route";var Ar=E.createContext(null);Ar.displayName="RouteError";function pv(u,{relative:i}={}){Oe(Pa(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:r}=E.useContext(Yt),{hash:f,pathname:h,search:m}=Ia(u,{relative:i}),b=h;return c!=="/"&&(b=h==="/"?c:rn([c,h])),r.createHref({pathname:b,search:m,hash:f})}function Pa(){return E.useContext(Fa)!=null}function sl(){return Oe(Pa(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Fa).location}var Nm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Om(u){E.useContext(Yt).static||E.useLayoutEffect(u)}function yv(){let{isDataRoute:u}=E.useContext(fn);return u?Ov():vv()}function vv(){Oe(Pa(),"useNavigate() may be used only in the context of a <Router> component.");let u=E.useContext(Jl),{basename:i,navigator:c}=E.useContext(Yt),{matches:r}=E.useContext(fn),{pathname:f}=sl(),h=JSON.stringify(Tm(r)),m=E.useRef(!1);return Om(()=>{m.current=!0}),E.useCallback((y,v={})=>{if(jt(m.current,Nm),!m.current)return;if(typeof y=="number"){c.go(y);return}let T=Am(y,JSON.parse(h),f,v.relative==="path");u==null&&i!=="/"&&(T.pathname=T.pathname==="/"?i:rn([i,T.pathname])),(v.replace?c.replace:c.push)(T,v.state,v)},[i,c,h,f,u])}E.createContext(null);function Ia(u,{relative:i}={}){let{matches:c}=E.useContext(fn),{pathname:r}=sl(),f=JSON.stringify(Tm(c));return E.useMemo(()=>Am(u,JSON.parse(f),r,i==="path"),[u,f,r,i])}function gv(u,i){return zm(u,i)}function zm(u,i,c,r,f){Oe(Pa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=E.useContext(Yt),{matches:m}=E.useContext(fn),b=m[m.length-1],y=b?b.params:{},v=b?b.pathname:"/",T=b?b.pathnameBase:"/",S=b&&b.route;{let Y=S&&S.path||"";Mm(v,!S||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${Y}">) 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="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let C=sl(),z;if(i){let Y=typeof i=="string"?Kl(i):i;Oe(T==="/"||Y.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 "${Y.pathname}" was given in the \`location\` prop.`),z=Y}else z=C;let L=z.pathname||"/",X=L;if(T!=="/"){let Y=T.replace(/^\//,"").split("/");X="/"+L.replace(/^\//,"").split("/").slice(Y.length).join("/")}let q=xm(u,{pathname:X});jt(S||q!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),jt(q==null||q[q.length-1].route.element!==void 0||q[q.length-1].route.Component!==void 0||q[q.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 H=Ev(q&&q.map(Y=>Object.assign({},Y,{params:Object.assign({},y,Y.params),pathname:rn([T,h.encodeLocation?h.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?T:rn([T,h.encodeLocation?h.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),m,c,r,f);return i&&H?E.createElement(Fa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},H):H}function bv(){let u=Nv(),i=fv(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},h={padding:"2px 4px",backgroundColor:r},m=null;return console.error("Error handled by React Router default ErrorBoundary:",u),m=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:h},"ErrorBoundary")," or"," ",E.createElement("code",{style:h},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},i),c?E.createElement("pre",{style:f},c):null,m)}var Sv=E.createElement(bv,null),xv=class extends E.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?E.createElement(fn.Provider,{value:this.props.routeContext},E.createElement(Ar.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function _v({routeContext:u,match:i,children:c}){let r=E.useContext(Jl);return r&&r.static&&r.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=i.route.id),E.createElement(fn.Provider,{value:u},c)}function Ev(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 h=u,m=c?.errors;if(m!=null){let T=h.findIndex(S=>S.route.id&&m?.[S.route.id]!==void 0);Oe(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),h=h.slice(0,Math.min(h.length,T+1))}let b=!1,y=-1;if(c)for(let T=0;T<h.length;T++){let S=h[T];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(y=T),S.route.id){let{loaderData:C,errors:z}=c,L=S.route.loader&&!C.hasOwnProperty(S.route.id)&&(!z||z[S.route.id]===void 0);if(S.route.lazy||L){b=!0,y>=0?h=h.slice(0,y+1):h=[h[0]];break}}}let v=c&&r?(T,S)=>{r(T,{location:c.location,params:c.matches?.[0]?.params??{},errorInfo:S})}:void 0;return h.reduceRight((T,S,C)=>{let z,L=!1,X=null,q=null;c&&(z=m&&S.route.id?m[S.route.id]:void 0,X=S.route.errorElement||Sv,b&&(y<0&&C===0?(Mm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,q=null):y===C&&(L=!0,q=S.route.hydrateFallbackElement||null)));let H=i.concat(h.slice(0,C+1)),Y=()=>{let k;return z?k=X:L?k=q:S.route.Component?k=E.createElement(S.route.Component,null):S.route.element?k=S.route.element:k=T,E.createElement(_v,{match:S,routeContext:{outlet:T,matches:H,isDataRoute:c!=null},children:k})};return c&&(S.route.ErrorBoundary||S.route.errorElement||C===0)?E.createElement(xv,{location:c.location,revalidation:c.revalidation,component:X,error:z,children:Y(),routeContext:{outlet:null,matches:H,isDataRoute:!0},onError:v}):Y()},null)}function Cr(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tv(u){let i=E.useContext(Jl);return Oe(i,Cr(u)),i}function Av(u){let i=E.useContext(Du);return Oe(i,Cr(u)),i}function Cv(u){let i=E.useContext(fn);return Oe(i,Cr(u)),i}function Rr(u){let i=Cv(u),c=i.matches[i.matches.length-1];return Oe(c.route.id,`${u} can only be used on routes that contain a unique "id"`),c.route.id}function Rv(){return Rr("useRouteId")}function Nv(){let u=E.useContext(Ar),i=Av("useRouteError"),c=Rr("useRouteError");return u!==void 0?u:i.errors?.[c]}function Ov(){let{router:u}=Tv("useNavigate"),i=Rr("useNavigate"),c=E.useRef(!1);return Om(()=>{c.current=!0}),E.useCallback(async(f,h={})=>{jt(c.current,Nm),c.current&&(typeof f=="number"?u.navigate(f):await u.navigate(f,{fromRouteId:i,...h}))},[u,i])}var im={};function Mm(u,i,c){!i&&!im[u]&&(im[u]=!0,jt(!1,c))}E.memo(zv);function zv({routes:u,future:i,state:c,unstable_onError:r}){return zm(u,void 0,c,r,i)}function vr(u){Oe(!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 Mv({basename:u="/",children:i=null,location:c,navigationType:r="POP",navigator:f,static:h=!1}){Oe(!Pa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=u.replace(/^\/*/,"/"),b=E.useMemo(()=>({basename:m,navigator:f,static:h,future:{}}),[m,f,h]);typeof c=="string"&&(c=Kl(c));let{pathname:y="/",search:v="",hash:T="",state:S=null,key:C="default"}=c,z=E.useMemo(()=>{let L=on(y,m);return L==null?null:{location:{pathname:L,search:v,hash:T,state:S,key:C},navigationType:r}},[m,y,v,T,S,C,r]);return jt(z!=null,`<Router basename="${m}"> is not able to match the URL "${y}${v}${T}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:E.createElement(Yt.Provider,{value:b},E.createElement(Fa.Provider,{children:i,value:z}))}function Dv({children:u,location:i}){return gv(gr(u),i)}function gr(u,i=[]){let c=[];return E.Children.forEach(u,(r,f)=>{if(!E.isValidElement(r))return;let h=[...i,f];if(r.type===E.Fragment){c.push.apply(c,gr(r.props.children,h));return}Oe(r.type===vr,`[${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>`),Oe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let m={id:r.props.id||h.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&&(m.children=gr(r.props.children,h)),c.push(m)}),c}var Tu="get",Au="application/x-www-form-urlencoded";function ju(u){return u!=null&&typeof u.tagName=="string"}function jv(u){return ju(u)&&u.tagName.toLowerCase()==="button"}function wv(u){return ju(u)&&u.tagName.toLowerCase()==="form"}function Uv(u){return ju(u)&&u.tagName.toLowerCase()==="input"}function Bv(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Lv(u,i){return u.button===0&&(!i||i==="_self")&&!Bv(u)}var bu=null;function Hv(){if(bu===null)try{new FormData(document.createElement("form"),0),bu=!1}catch{bu=!0}return bu}var qv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function or(u){return u!=null&&!qv.has(u)?(jt(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Au}"`),null):u}function Yv(u,i){let c,r,f,h,m;if(wv(u)){let b=u.getAttribute("action");r=b?on(b,i):null,c=u.getAttribute("method")||Tu,f=or(u.getAttribute("enctype"))||Au,h=new FormData(u)}else if(jv(u)||Uv(u)&&(u.type==="submit"||u.type==="image")){let b=u.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=u.getAttribute("formaction")||b.getAttribute("action");if(r=y?on(y,i):null,c=u.getAttribute("formmethod")||b.getAttribute("method")||Tu,f=or(u.getAttribute("formenctype"))||or(b.getAttribute("enctype"))||Au,h=new FormData(b,u),!Hv()){let{name:v,type:T,value:S}=u;if(T==="image"){let C=v?`${v}.`:"";h.append(`${C}x`,"0"),h.append(`${C}y`,"0")}else v&&h.append(v,S)}}else{if(ju(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=Tu,r=null,f=Au,m=u}return h&&f==="text/plain"&&(m=h,h=void 0),{action:r,method:c.toLowerCase(),encType:f,formData:h,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nr(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function kv(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&&on(r.pathname,i)==="/"?r.pathname=`${i.replace(/\/$/,"")}/_root.${c}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${c}`,r}async function Xv(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 Gv(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 Vv(u,i,c){let r=await Promise.all(u.map(async f=>{let h=i.routes[f.route.id];if(h){let m=await Xv(h,c);return m.links?m.links():[]}return[]}));return Jv(r.flat(1).filter(Gv).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function um(u,i,c,r,f,h){let m=(y,v)=>c[v]?y.route.id!==c[v].route.id:!0,b=(y,v)=>c[v].pathname!==y.pathname||c[v].route.path?.endsWith("*")&&c[v].params["*"]!==y.params["*"];return h==="assets"?i.filter((y,v)=>m(y,v)||b(y,v)):h==="data"?i.filter((y,v)=>{let T=r.routes[y.route.id];if(!T||!T.hasLoader)return!1;if(m(y,v)||b(y,v))return!0;if(y.route.shouldRevalidate){let S=y.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:c[0]?.params||{},nextUrl:new URL(u,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function Qv(u,i,{includeHydrateFallback:c}={}){return Zv(u.map(r=>{let f=i.routes[r.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function Zv(u){return[...new Set(u)]}function Kv(u){let i={},c=Object.keys(u).sort();for(let r of c)i[r]=u[r];return i}function Jv(u,i){let c=new Set;return new Set(i),u.reduce((r,f)=>{let h=JSON.stringify(Kv(f));return c.has(h)||(c.add(h),r.push({key:h,link:f})),r},[])}function Dm(){let u=E.useContext(Jl);return Nr(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function $v(){let u=E.useContext(Du);return Nr(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Or=E.createContext(void 0);Or.displayName="FrameworkContext";function jm(){let u=E.useContext(Or);return Nr(u,"You must render this element inside a <HydratedRouter> element"),u}function Wv(u,i){let c=E.useContext(Or),[r,f]=E.useState(!1),[h,m]=E.useState(!1),{onFocus:b,onBlur:y,onMouseEnter:v,onMouseLeave:T,onTouchStart:S}=i,C=E.useRef(null);E.useEffect(()=>{if(u==="render"&&m(!0),u==="viewport"){let X=H=>{H.forEach(Y=>{m(Y.isIntersecting)})},q=new IntersectionObserver(X,{threshold:.5});return C.current&&q.observe(C.current),()=>{q.disconnect()}}},[u]),E.useEffect(()=>{if(r){let X=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(X)}}},[r]);let z=()=>{f(!0)},L=()=>{f(!1),m(!1)};return c?u!=="intent"?[h,C,{}]:[h,C,{onFocus:Qa(b,z),onBlur:Qa(y,L),onMouseEnter:Qa(v,z),onMouseLeave:Qa(T,L),onTouchStart:Qa(S,z)}]:[!1,C,{}]}function Qa(u,i){return c=>{u&&u(c),c.defaultPrevented||i(c)}}function Fv({page:u,...i}){let{router:c}=Dm(),r=E.useMemo(()=>xm(c.routes,u,c.basename),[c.routes,u,c.basename]);return r?E.createElement(Iv,{page:u,matches:r,...i}):null}function Pv(u){let{manifest:i,routeModules:c}=jm(),[r,f]=E.useState([]);return E.useEffect(()=>{let h=!1;return Vv(u,i,c).then(m=>{h||f(m)}),()=>{h=!0}},[u,i,c]),r}function Iv({page:u,matches:i,...c}){let r=sl(),{manifest:f,routeModules:h}=jm(),{basename:m}=Dm(),{loaderData:b,matches:y}=$v(),v=E.useMemo(()=>um(u,i,y,f,r,"data"),[u,i,y,f,r]),T=E.useMemo(()=>um(u,i,y,f,r,"assets"),[u,i,y,f,r]),S=E.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let L=new Set,X=!1;if(i.forEach(H=>{let Y=f.routes[H.route.id];!Y||!Y.hasLoader||(!v.some(k=>k.route.id===H.route.id)&&H.route.id in b&&h[H.route.id]?.shouldRevalidate||Y.hasClientLoader?X=!0:L.add(H.route.id))}),L.size===0)return[];let q=kv(u,m,"data");return X&&L.size>0&&q.searchParams.set("_routes",i.filter(H=>L.has(H.route.id)).map(H=>H.route.id).join(",")),[q.pathname+q.search]},[m,b,r,f,v,i,u,h]),C=E.useMemo(()=>Qv(T,f),[T,f]),z=Pv(T);return E.createElement(E.Fragment,null,S.map(L=>E.createElement("link",{key:L,rel:"prefetch",as:"fetch",href:L,...c})),C.map(L=>E.createElement("link",{key:L,rel:"modulepreload",href:L,...c})),z.map(({key:L,link:X})=>E.createElement("link",{key:L,nonce:c.nonce,...X})))}function eg(...u){return i=>{u.forEach(c=>{typeof c=="function"?c(i):c!=null&&(c.current=i)})}}var wm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wm&&(window.__reactRouterVersion="7.9.6")}catch{}function tg({basename:u,children:i,window:c}){let r=E.useRef();r.current==null&&(r.current=k0({window:c,v5Compat:!0}));let f=r.current,[h,m]=E.useState({action:f.action,location:f.location}),b=E.useCallback(y=>{E.startTransition(()=>m(y))},[m]);return E.useLayoutEffect(()=>f.listen(b),[f,b]),E.createElement(Mv,{basename:u,children:i,location:h.location,navigationType:h.action,navigator:f})}var Um=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Bm=E.forwardRef(function({onClick:i,discover:c="render",prefetch:r="none",relative:f,reloadDocument:h,replace:m,state:b,target:y,to:v,preventScrollReset:T,viewTransition:S,...C},z){let{basename:L}=E.useContext(Yt),X=typeof v=="string"&&Um.test(v),q,H=!1;if(typeof v=="string"&&X&&(q=v,wm))try{let xe=new URL(window.location.href),Ue=v.startsWith("//")?new URL(xe.protocol+v):new URL(v),Xe=on(Ue.pathname,L);Ue.origin===xe.origin&&Xe!=null?v=Xe+Ue.search+Ue.hash:H=!0}catch{jt(!1,`<Link to="${v}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let Y=pv(v,{relative:f}),[k,F,ye]=Wv(r,C),Re=ig(v,{replace:m,state:b,target:y,preventScrollReset:T,relative:f,viewTransition:S});function $(xe){i&&i(xe),xe.defaultPrevented||Re(xe)}let Te=E.createElement("a",{...C,...ye,href:q||Y,onClick:H||h?i:$,ref:eg(z,F),target:y,"data-discover":!X&&c==="render"?"true":void 0});return k&&!X?E.createElement(E.Fragment,null,Te,E.createElement(Fv,{page:Y})):Te});Bm.displayName="Link";var ng=E.forwardRef(function({"aria-current":i="page",caseSensitive:c=!1,className:r="",end:f=!1,style:h,to:m,viewTransition:b,children:y,...v},T){let S=Ia(m,{relative:v.relative}),C=sl(),z=E.useContext(Du),{navigator:L,basename:X}=E.useContext(Yt),q=z!=null&&og(S)&&b===!0,H=L.encodeLocation?L.encodeLocation(S).pathname:S.pathname,Y=C.pathname,k=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;c||(Y=Y.toLowerCase(),k=k?k.toLowerCase():null,H=H.toLowerCase()),k&&X&&(k=on(k,X)||k);const F=H!=="/"&&H.endsWith("/")?H.length-1:H.length;let ye=Y===H||!f&&Y.startsWith(H)&&Y.charAt(F)==="/",Re=k!=null&&(k===H||!f&&k.startsWith(H)&&k.charAt(H.length)==="/"),$={isActive:ye,isPending:Re,isTransitioning:q},Te=ye?i:void 0,xe;typeof r=="function"?xe=r($):xe=[r,ye?"active":null,Re?"pending":null,q?"transitioning":null].filter(Boolean).join(" ");let Ue=typeof h=="function"?h($):h;return E.createElement(Bm,{...v,"aria-current":Te,className:xe,ref:T,style:Ue,to:m,viewTransition:b},typeof y=="function"?y($):y)});ng.displayName="NavLink";var lg=E.forwardRef(({discover:u="render",fetcherKey:i,navigate:c,reloadDocument:r,replace:f,state:h,method:m=Tu,action:b,onSubmit:y,relative:v,preventScrollReset:T,viewTransition:S,...C},z)=>{let L=cg(),X=rg(b,{relative:v}),q=m.toLowerCase()==="get"?"get":"post",H=typeof b=="string"&&Um.test(b),Y=k=>{if(y&&y(k),k.defaultPrevented)return;k.preventDefault();let F=k.nativeEvent.submitter,ye=F?.getAttribute("formmethod")||m;L(F||k.currentTarget,{fetcherKey:i,method:ye,navigate:c,replace:f,state:h,relative:v,preventScrollReset:T,viewTransition:S})};return E.createElement("form",{ref:z,method:q,action:X,onSubmit:r?y:Y,...C,"data-discover":!H&&u==="render"?"true":void 0})});lg.displayName="Form";function ag(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lm(u){let i=E.useContext(Jl);return Oe(i,ag(u)),i}function ig(u,{target:i,replace:c,state:r,preventScrollReset:f,relative:h,viewTransition:m}={}){let b=yv(),y=sl(),v=Ia(u,{relative:h});return E.useCallback(T=>{if(Lv(T,i)){T.preventDefault();let S=c!==void 0?c:Wa(y)===Wa(v);b(u,{replace:S,state:r,preventScrollReset:f,relative:h,viewTransition:m})}},[y,b,v,c,r,i,u,f,h,m])}var ug=0,sg=()=>`__${String(++ug)}__`;function cg(){let{router:u}=Lm("useSubmit"),{basename:i}=E.useContext(Yt),c=Rv();return E.useCallback(async(r,f={})=>{let{action:h,method:m,encType:b,formData:y,body:v}=Yv(r,i);if(f.navigate===!1){let T=f.fetcherKey||sg();await u.fetch(T,c,f.action||h,{preventScrollReset:f.preventScrollReset,formData:y,body:v,formMethod:f.method||m,formEncType:f.encType||b,flushSync:f.flushSync})}else await u.navigate(f.action||h,{preventScrollReset:f.preventScrollReset,formData:y,body:v,formMethod:f.method||m,formEncType:f.encType||b,replace:f.replace,state:f.state,fromRouteId:c,flushSync:f.flushSync,viewTransition:f.viewTransition})},[u,i,c])}function rg(u,{relative:i}={}){let{basename:c}=E.useContext(Yt),r=E.useContext(fn);Oe(r,"useFormAction must be used inside a RouteContext");let[f]=r.matches.slice(-1),h={...Ia(u||".",{relative:i})},m=sl();if(u==null){h.search=m.search;let b=new URLSearchParams(h.search),y=b.getAll("index");if(y.some(T=>T==="")){b.delete("index"),y.filter(S=>S).forEach(S=>b.append("index",S));let T=b.toString();h.search=T?`?${T}`:""}}return(!u||u===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(h.pathname=h.pathname==="/"?c:rn([c,h.pathname])),Wa(h)}function og(u,{relative:i}={}){let c=E.useContext(Rm);Oe(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Lm("useViewTransitionState"),f=Ia(u,{relative:i});if(!c.isTransitioning)return!1;let h=on(c.currentLocation.pathname,r)||c.currentLocation.pathname,m=on(c.nextLocation.pathname,r)||c.nextLocation.pathname;return zu(f.pathname,m)!=null||zu(f.pathname,h)!=null}const qt=Object.create(null);qt.open="0";qt.close="1";qt.ping="2";qt.pong="3";qt.message="4";qt.upgrade="5";qt.noop="6";const Cu=Object.create(null);Object.keys(qt).forEach(u=>{Cu[qt[u]]=u});const br={type:"error",data:"parser error"},Hm=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",qm=typeof ArrayBuffer=="function",Ym=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer,zr=({type:u,data:i},c,r)=>Hm&&i instanceof Blob?c?r(i):sm(i,r):qm&&(i instanceof ArrayBuffer||Ym(i))?c?r(i):sm(new Blob([i]),r):r(qt[u]+(i||"")),sm=(u,i)=>{const c=new FileReader;return c.onload=function(){const r=c.result.split(",")[1];i("b"+(r||""))},c.readAsDataURL(u)};function cm(u){return u instanceof Uint8Array?u:u instanceof ArrayBuffer?new Uint8Array(u):new Uint8Array(u.buffer,u.byteOffset,u.byteLength)}let fr;function fg(u,i){if(Hm&&u.data instanceof Blob)return u.data.arrayBuffer().then(cm).then(i);if(qm&&(u.data instanceof ArrayBuffer||Ym(u.data)))return i(cm(u.data));zr(u,!1,c=>{fr||(fr=new TextEncoder),i(fr.encode(c))})}const rm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$a=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let u=0;u<rm.length;u++)$a[rm.charCodeAt(u)]=u;const hg=u=>{let i=u.length*.75,c=u.length,r,f=0,h,m,b,y;u[u.length-1]==="="&&(i--,u[u.length-2]==="="&&i--);const v=new ArrayBuffer(i),T=new Uint8Array(v);for(r=0;r<c;r+=4)h=$a[u.charCodeAt(r)],m=$a[u.charCodeAt(r+1)],b=$a[u.charCodeAt(r+2)],y=$a[u.charCodeAt(r+3)],T[f++]=h<<2|m>>4,T[f++]=(m&15)<<4|b>>2,T[f++]=(b&3)<<6|y&63;return v},dg=typeof ArrayBuffer=="function",Mr=(u,i)=>{if(typeof u!="string")return{type:"message",data:km(u,i)};const c=u.charAt(0);return c==="b"?{type:"message",data:mg(u.substring(1),i)}:Cu[c]?u.length>1?{type:Cu[c],data:u.substring(1)}:{type:Cu[c]}:br},mg=(u,i)=>{if(dg){const c=hg(u);return km(c,i)}else return{base64:!0,data:u}},km=(u,i)=>{switch(i){case"blob":return u instanceof Blob?u:new Blob([u]);case"arraybuffer":default:return u instanceof ArrayBuffer?u:u.buffer}},Xm="",pg=(u,i)=>{const c=u.length,r=new Array(c);let f=0;u.forEach((h,m)=>{zr(h,!1,b=>{r[m]=b,++f===c&&i(r.join(Xm))})})},yg=(u,i)=>{const c=u.split(Xm),r=[];for(let f=0;f<c.length;f++){const h=Mr(c[f],i);if(r.push(h),h.type==="error")break}return r};function vg(){return new TransformStream({transform(u,i){fg(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 h=new DataView(f.buffer);h.setUint8(0,126),h.setUint16(1,r)}else{f=new Uint8Array(9);const h=new DataView(f.buffer);h.setUint8(0,127),h.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 xu(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 gg(u,i){hr||(hr=new TextDecoder);const c=[];let r=0,f=-1,h=!1;return new TransformStream({transform(m,b){for(c.push(m);;){if(r===0){if(Su(c)<1)break;const y=xu(c,1);h=(y[0]&128)===128,f=y[0]&127,f<126?r=3:f===126?r=1:r=2}else if(r===1){if(Su(c)<2)break;const y=xu(c,2);f=new DataView(y.buffer,y.byteOffset,y.length).getUint16(0),r=3}else if(r===2){if(Su(c)<8)break;const y=xu(c,8),v=new DataView(y.buffer,y.byteOffset,y.length),T=v.getUint32(0);if(T>Math.pow(2,21)-1){b.enqueue(br);break}f=T*Math.pow(2,32)+v.getUint32(4),r=3}else{if(Su(c)<f)break;const y=xu(c,f);b.enqueue(Mr(h?y:hr.decode(y),i)),r=0}if(f===0||f>u){b.enqueue(br);break}}}})}const Gm=4;function Ye(u){if(u)return bg(u)}function bg(u){for(var i in Ye.prototype)u[i]=Ye.prototype[i];return u}Ye.prototype.on=Ye.prototype.addEventListener=function(u,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+u]=this._callbacks["$"+u]||[]).push(i),this};Ye.prototype.once=function(u,i){function c(){this.off(u,c),i.apply(this,arguments)}return c.fn=i,this.on(u,c),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.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};Ye.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};Ye.prototype.emitReserved=Ye.prototype.emit;Ye.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks["$"+u]||[]};Ye.prototype.hasListeners=function(u){return!!this.listeners(u).length};const wu=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,c)=>c(i,0),Rt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Sg="arraybuffer";function Vm(u,...i){return i.reduce((c,r)=>(u.hasOwnProperty(r)&&(c[r]=u[r]),c),{})}const xg=Rt.setTimeout,_g=Rt.clearTimeout;function Uu(u,i){i.useNativeTimers?(u.setTimeoutFn=xg.bind(Rt),u.clearTimeoutFn=_g.bind(Rt)):(u.setTimeoutFn=Rt.setTimeout.bind(Rt),u.clearTimeoutFn=Rt.clearTimeout.bind(Rt))}const Eg=1.33;function Tg(u){return typeof u=="string"?Ag(u):Math.ceil((u.byteLength||u.size)*Eg)}function Ag(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 Qm(){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 h=c[r].split("=");i[decodeURIComponent(h[0])]=decodeURIComponent(h[1])}return i}class Ng extends Error{constructor(i,c,r){super(i),this.description=c,this.context=r,this.type="TransportError"}}class Dr extends Ye{constructor(i){super(),this.writable=!1,Uu(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 Ng(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=Mr(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 Og 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)};yg(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,pg(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]=Qm()),!this.supportsBinary&&!c.sid&&(c.b64=1),this.createUri(i,c)}}let Zm=!1;try{Zm=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const zg=Zm;function Mg(){}class Dg extends Og{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,h)=>{this.onError("xhr post error",f,h)})}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 Ht extends Ye{constructor(i,c,r){super(),this.createRequest=i,Uu(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=Vm(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=Ht.requestsCount++,Ht.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=Mg,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ht.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()}}Ht.requestsCount=0;Ht.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",om);else if(typeof addEventListener=="function"){const u="onpagehide"in Rt?"pagehide":"unload";addEventListener(u,om,!1)}}function om(){for(let u in Ht.requests)Ht.requests.hasOwnProperty(u)&&Ht.requests[u].abort()}const jg=(function(){const u=Km({xdomain:!1});return u&&u.responseType!==null})();class wg extends Dg{constructor(i){super(i);const c=i&&i.forceBase64;this.supportsBinary=jg&&!c}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Ht(Km,this.uri(),i)}}function Km(u){const i=u.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||zg))return new XMLHttpRequest}catch{}if(!i)try{return new Rt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Jm=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ug extends Dr{get name(){return"websocket"}doOpen(){const i=this.uri(),c=this.opts.protocols,r=Jm?{}:Vm(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;zr(r,this.supportsBinary,h=>{try{this.doWrite(r,h)}catch{}f&&wu(()=>{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]=Qm()),this.supportsBinary||(c.b64=1),this.createUri(i,c)}}const dr=Rt.WebSocket||Rt.MozWebSocket;class Bg extends Ug{createSocket(i,c,r){return Jm?new dr(i,c,r):c?new dr(i,c):new dr(i)}doWrite(i,c){this.ws.send(c)}}class Lg 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=gg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=i.readable.pipeThrough(c).getReader(),f=vg();f.readable.pipeTo(i.writable),this._writer=f.writable.getWriter();const h=()=>{r.read().then(({done:b,value:y})=>{b||(this.onPacket(y),h())}).catch(b=>{})};h();const m={type:"open"};this.query.sid&&(m.data=`{"sid":"${this.query.sid}"}`),this._writer.write(m).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&&wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const Hg={websocket:Bg,webtransport:Lg,polling:wg},qg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(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=qg.exec(u||""),h={},m=14;for(;m--;)h[Yg[m]]=f[m]||"";return c!=-1&&r!=-1&&(h.source=i,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h.pathNames=kg(h,h.path),h.queryKey=Xg(h,h.query),h}function kg(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 Xg(u,i){const c={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,f,h){f&&(c[f]=h)}),c}const xr=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ru=[];xr&&addEventListener("offline",()=>{Ru.forEach(u=>u())},!1);class Ln extends Ye{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);Uu(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)),xr&&(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"})},Ru.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const c=Object.assign({},this.opts.query);c.EIO=Gm,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&&Ln.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",Ln.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+=Tg(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,wu(()=>{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 h={type:i,data:c,options:r};this.emitReserved("packetCreate",h),this.writeBuffer.push(h),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(Ln.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(),xr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ru.indexOf(this._offlineEventListener);r!==-1&&Ru.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,c),this.writeBuffer=[],this._prevBufferLen=0}}}Ln.protocol=Gm;class Gg extends Ln{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;Ln.priorWebsocketSuccess=!1;const f=()=>{r||(c.send([{type:"ping",data:"probe"}]),c.once("packet",S=>{if(!r)if(S.type==="pong"&&S.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",c),!c)return;Ln.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 C=new Error("probe error");C.transport=c.name,this.emitReserved("upgradeError",C)}}))};function h(){r||(r=!0,T(),c.close(),c=null)}const m=S=>{const C=new Error("probe error: "+S);C.transport=c.name,h(),this.emitReserved("upgradeError",C)};function b(){m("transport closed")}function y(){m("socket closed")}function v(S){c&&S.name!==c.name&&h()}const T=()=>{c.removeListener("open",f),c.removeListener("error",m),c.removeListener("close",b),this.off("close",y),this.off("upgrading",v)};c.once("open",f),c.once("error",m),c.once("close",b),this.once("close",y),this.once("upgrading",v),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 Vg=class extends Gg{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=>Hg[f]).filter(f=>!!f)),super(i,r)}};function Qg(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 h=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+h+":"+r.port+i,r.href=r.protocol+"://"+h+(c&&c.port===r.port?"":":"+r.port),r}const Zg=typeof ArrayBuffer=="function",Kg=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u.buffer instanceof ArrayBuffer,$m=Object.prototype.toString,Jg=typeof Blob=="function"||typeof Blob<"u"&&$m.call(Blob)==="[object BlobConstructor]",$g=typeof File=="function"||typeof File<"u"&&$m.call(File)==="[object FileConstructor]";function jr(u){return Zg&&(u instanceof ArrayBuffer||Kg(u))||Jg&&u instanceof Blob||$g&&u instanceof File}function Nu(u,i){if(!u||typeof u!="object")return!1;if(Array.isArray(u)){for(let c=0,r=u.length;c<r;c++)if(Nu(u[c]))return!0;return!1}if(jr(u))return!0;if(u.toJSON&&typeof u.toJSON=="function"&&arguments.length===1)return Nu(u.toJSON(),!0);for(const c in u)if(Object.prototype.hasOwnProperty.call(u,c)&&Nu(u[c]))return!0;return!1}function Wg(u){const i=[],c=u.data,r=u;return r.data=_r(c,i),r.attachments=i.length,{packet:r,buffers:i}}function _r(u,i){if(!u)return u;if(jr(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]=_r(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]=_r(u[r],i));return c}return u}function Fg(u,i){return u.data=Er(u.data,i),delete u.attachments,u}function Er(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]=Er(u[c],i);else if(typeof u=="object")for(const c in u)Object.prototype.hasOwnProperty.call(u,c)&&(u[c]=Er(u[c],i));return u}const Pg=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ig=5;var re;(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"})(re||(re={}));class eb{constructor(i){this.replacer=i}encode(i){return(i.type===re.EVENT||i.type===re.ACK)&&Nu(i)?this.encodeAsBinary({type:i.type===re.EVENT?re.BINARY_EVENT:re.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let c=""+i.type;return(i.type===re.BINARY_EVENT||i.type===re.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=Wg(i),r=this.encodeAsString(c.packet),f=c.buffers;return f.unshift(r),f}}function fm(u){return Object.prototype.toString.call(u)==="[object Object]"}class wr extends Ye{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===re.BINARY_EVENT;r||c.type===re.BINARY_ACK?(c.type=r?re.EVENT:re.ACK,this.reconstructor=new tb(c),c.attachments===0&&super.emitReserved("decoded",c)):super.emitReserved("decoded",c)}else if(jr(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(re[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===re.BINARY_EVENT||r.type===re.BINARY_ACK){const h=c+1;for(;i.charAt(++c)!=="-"&&c!=i.length;);const m=i.substring(h,c);if(m!=Number(m)||i.charAt(c)!=="-")throw new Error("Illegal attachments");r.attachments=Number(m)}if(i.charAt(c+1)==="/"){const h=c+1;for(;++c&&!(i.charAt(c)===","||c===i.length););r.nsp=i.substring(h,c)}else r.nsp="/";const f=i.charAt(c+1);if(f!==""&&Number(f)==f){const h=c+1;for(;++c;){const m=i.charAt(c);if(m==null||Number(m)!=m){--c;break}if(c===i.length)break}r.id=Number(i.substring(h,c+1))}if(i.charAt(++c)){const h=this.tryParse(i.substr(c));if(wr.isPayloadValid(r.type,h))r.data=h;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 re.CONNECT:return fm(c);case re.DISCONNECT:return c===void 0;case re.CONNECT_ERROR:return typeof c=="string"||fm(c);case re.EVENT:case re.BINARY_EVENT:return Array.isArray(c)&&(typeof c[0]=="number"||typeof c[0]=="string"&&Pg.indexOf(c[0])===-1);case re.ACK:case re.BINARY_ACK:return Array.isArray(c)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class tb{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=Fg(this.reconPack,this.buffers);return this.finishedReconstruction(),c}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const nb=Object.freeze(Object.defineProperty({__proto__:null,Decoder:wr,Encoder:eb,get PacketType(){return re},protocol:Ig},Symbol.toStringTag,{value:"Module"}));function Dt(u,i,c){return u.on(i,c),function(){u.off(i,c)}}const lb=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Wm extends Ye{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=[Dt(i,"open",this.onopen.bind(this)),Dt(i,"packet",this.onpacket.bind(this)),Dt(i,"error",this.onerror.bind(this)),Dt(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,h;if(lb.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 m={type:re.EVENT,data:c};if(m.options={},m.options.compress=this.flags.compress!==!1,typeof c[c.length-1]=="function"){const T=this.ids++,S=c.pop();this._registerAckCallback(T,S),m.id=T}const b=(f=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||f===void 0?void 0:f.writable,y=this.connected&&!(!((h=this.io.engine)===null||h===void 0)&&h._hasPingExpired());return this.flags.volatile&&!b||(y?(this.notifyOutgoingListeners(m),this.packet(m)):this.sendBuffer.push(m)),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 h=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let b=0;b<this.sendBuffer.length;b++)this.sendBuffer[b].id===i&&this.sendBuffer.splice(b,1);c.call(this,new Error("operation has timed out"))},f),m=(...b)=>{this.io.clearTimeoutFn(h),c.apply(this,b)};m.withError=!0,this.acks[i]=m}emitWithAck(i,...c){return new Promise((r,f)=>{const h=(m,b)=>m?f(m):r(b);h.withError=!0,c.push(h),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,...h)=>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,...h)),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:re.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 re.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 re.EVENT:case re.BINARY_EVENT:this.onevent(i);break;case re.ACK:case re.BINARY_ACK:this.onack(i);break;case re.DISCONNECT:this.ondisconnect();break;case re.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:re.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:re.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 Tr extends Ye{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,Uu(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||nb;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 Vg(this.uri,this.opts);const c=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const f=Dt(c,"open",function(){r.onopen(),i&&i()}),h=b=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",b),i?i(b):this.maybeReconnectOnOpen()},m=Dt(c,"error",h);if(this._timeout!==!1){const b=this._timeout,y=this.setTimeoutFn(()=>{f(),h(new Error("timeout")),c.close()},b);this.opts.autoUnref&&y.unref(),this.subs.push(()=>{this.clearTimeoutFn(y)})}return this.subs.push(f),this.subs.push(m),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(Dt(i,"ping",this.onping.bind(this)),Dt(i,"data",this.ondata.bind(this)),Dt(i,"error",this.onerror.bind(this)),Dt(i,"close",this.onclose.bind(this)),Dt(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){wu(()=>{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 Wm(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 Ou(u,i){typeof u=="object"&&(i=u,u=void 0),i=i||{};const c=Qg(u,i.path||"/socket.io"),r=c.source,f=c.id,h=c.path,m=Za[f]&&h in Za[f].nsps,b=i.forceNew||i["force new connection"]||i.multiplex===!1||m;let y;return b?y=new Tr(r,i):(Za[f]||(Za[f]=new Tr(r,i)),y=Za[f]),c.query&&!i.query&&(i.query=c.queryKey),y.socket(c.path,i)}Object.assign(Ou,{Manager:Tr,Socket:Wm,io:Ou,connect:Ou});const Fm=window.location.origin;console.info("[socket] connecting to",Fm);const Ur=Ou(Fm,{transports:["polling","websocket"],timeout:15e3});Ur.on("connect_error",u=>console.error("connect_error",u.code,u.message,u.data));const Pm=E.createContext(Ur),ab=({children:u})=>p.jsx(Pm.Provider,{value:Ur,children:u}),ei=()=>E.useContext(Pm),Im=E.createContext({connected:!1,session:null,logs:[],login:async()=>{},setRole:async()=>{},requestControl:async()=>{},releaseControl:async()=>{},subscribeAll:async()=>{}});function ib(u){return E.useCallback((i,c={})=>new Promise((r,f)=>{u.emit(i,c,(h={})=>{h.error?f(new Error(h.error)):r(h)})}),[u])}function ub({children:u}){const i=ei(),c=ib(i),[r,f]=E.useState(null),[h,m]=E.useState([]),[b,y]=E.useState([]),[v,T]=E.useState(i.connected);E.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]),E.useEffect(()=>{function z(q){f(q)}function L(q=[]){m(q)}function X(q){m(H=>[...H.slice(-199),q])}return i.on("session:sync",z),i.on("log:init",L),i.on("log:entry",X),i.on("alert:new",(q={})=>{y(H=>[...H.slice(-49),{...q,receivedAt:Date.now()}])}),()=>{i.off("session:sync",z),i.off("log:init",L),i.off("log:entry",X),i.off("alert:new")}},[i]);const S=E.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]),C=E.useMemo(()=>({connected:v,session:r,logs:h,alerts:b,...S}),[S,b,v,h,r]);return p.jsx(Im.Provider,{value:C,children:u})}function kt(){return E.useContext(Im)}const ep=E.createContext({frames:{}});function sb({children:u}){const i=ei(),[c,r]=E.useState({});E.useEffect(()=>{function h({roverId:m,sensors:b={},frame:y={}}){m&&r(v=>({...v,[m]:{roverId:m,sensors:b,raw:y?.data||null,receivedAt:Date.now()}}))}return i.on("sensorFrame",h),()=>{i.off("sensorFrame",h)}},[i]);const f=E.useMemo(()=>({frames:c}),[c]);return p.jsx(ep.Provider,{value:f,children:u})}function tp(){return E.useContext(ep).frames}function Br(u){const i=tp();return u?i[u]??null:null}function al(u,i="--"){return u==null||u===""?i:u}function Lr(){const{connected:u,session:i,requestControl:c}=kt(),r=i?.assignment?.roverId,f=Br(r),h=f?.sensors||{},m=h.voltageMv!=null?`${(h.voltageMv/1e3).toFixed(2)} V`:null,b=h.currentMa!=null?`${h.currentMa} mA`:null,y=h.batteryChargeMah,v=h.batteryCapacityMah,T=f?.receivedAt?new Date(f.receivedAt).toLocaleTimeString():null,S=f?.raw?f.raw:null,C=i?.roster??[],z=r?i?.activeDrivers?.[r]:null,L=r?z?z===i?.socketId?"You":z.slice(0,6):"Available":"n/a",X=E.useMemo(()=>i?.role==="admin"||i?.role==="lockdown"||i?.role==="lockdown-admin",[i?.role]),[q,H]=E.useState({});async function Y(k){if(k){H(F=>({...F,[k]:!0}));try{await c(k)}catch(F){alert(F.message)}finally{H(F=>({...F,[k]:!1}))}}}return p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"text-sm text-slate-400",children:[p.jsx("span",{children:u?"online":"offline"}),p.jsxs("span",{children:[" · role ",i?.role||"unknown"]}),p.jsxs("span",{children:[" · mode ",i?.mode||"--"]}),T&&p.jsxs("span",{children:[" · sensors ",T]}),p.jsxs("span",{children:[" · driver ",L]})]}),r?f?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex flex-wrap gap-0.5",children:[p.jsx(il,{label:"Charge",value:al(y!=null&&v!=null?`${y}/${v}`:null)}),p.jsx(il,{label:"Charging",value:al(h.chargingState?.label)}),p.jsx(il,{label:"OI mode",value:al(h.oiMode?.label)}),p.jsx(il,{label:"Voltage",value:al(m)}),p.jsx(il,{label:"Current",value:al(b)}),p.jsx(il,{label:"Left Encoder",value:al(h.encoderCountsLeft)}),p.jsx(il,{label:"Right Encoder",value:al(h.encoderCountsRight)})]}),p.jsxs("div",{className:"mt-1 flex gap-0.5",children:[p.jsx(_u,{value:h.cliffLeftSignal}),p.jsx(_u,{value:h.cliffFrontLeftSignal}),p.jsx(_u,{value:h.cliffFrontRightSignal}),p.jsx(_u,{value:h.cliffRightSignal})]})]}):p.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Waiting for sensor frames…"}):p.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Assign a rover to view sensors."}),S&&p.jsx("pre",{className:"mt-1 text-wrap break-words p-1 text-xs text-lime-300 bg-gray-700",children:S}),p.jsxs("div",{className:"mt-1",children:[p.jsx("p",{className:"text-sm text-slate-400",children:"Rovers"}),C.length===0?p.jsx("p",{className:"text-sm text-slate-500",children:"No roster data."}):p.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:C.map(k=>p.jsxs("li",{className:"flex items-center justify-between gap-1",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-slate-200",children:k.name}),p.jsxs("p",{className:"text-xs text-slate-500",children:[k.locked?"locked":"free"," · ",k.lastSeen?"seen":"unknown"]})]}),X&&p.jsx("button",{type:"button",onClick:()=>Y(k.id),disabled:q[k.id],className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-40",children:q[k.id]?"...":"request"})]},k.id))})]})]})}function _u({value:u}){const c=`${u==null?0:Math.max(0,Math.min(100,u/4095*100))}%`;return p.jsx("div",{className:"w-1/4 h-6 bg-gray-700 rounded-sm overflow-hidden",children:p.jsx("div",{className:"w-full bg-amber-400",style:{height:c}})})}function il({label:u,value:i}){return p.jsxs("div",{className:"bg-gray-700 rounded-sm p-0.5 text-sm",children:[u,": ",i]})}const cb={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},Zl={main:[-127,127],side:[-127,127],vacuum:[0,127]},rb=200,ob=u=>new Promise(i=>setTimeout(i,u));function ul(u,i,c){return Math.max(i,Math.min(c,u))}function fb(u){const i=u.has("w"),c=u.has("s"),r=u.has("a"),f=u.has("d"),m=u.has("shift")?300:150;let b=0,y=0;return i&&!c?(b+=m,y+=m):c&&!i&&(b-=m,y-=m),r&&!f?(b-=m,y+=m):f&&!r&&(b+=m,y-=m),!i&&!c&&(r||f)&&(b=r?-m:m,y=r?m:-m),{left:ul(b,-500,500),right:ul(y,-500,500)}}function hm(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 db(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 mb(){const u=ei(),{session:i}=kt(),c=i?.assignment?.roverId,r=E.useRef(new Set),f=E.useRef({left:0,right:0}),[h,m]=E.useState(()=>({left:0,right:0})),b=E.useCallback((H,Y)=>{c&&u.emit("command",{roverId:c,...H},Y)},[u,c]),y=E.useCallback(()=>{c&&b({type:"sensorStream",data:{sensorStream:{enable:!0}}})},[b,c]),v=E.useCallback(()=>{if(!c)return;const H=fb(r.current),Y=f.current;H.left===Y.left&&H.right===Y.right||(f.current=H,m(H),b({type:"drive",data:{driveDirect:H}}))},[b,c]),T=E.useCallback(({x:H=0,y:Y=0,boost:k=!1}={})=>{if(!c)return;const F=k?400:250,ye=hm(Y)*F,Re=hm(H)*F,$={left:ul(Math.round(ye+Re),-500,500),right:ul(Math.round(ye-Re),-500,500)};f.current=$,m($),b({type:"drive",data:{driveDirect:$}})},[b,c]),S=E.useCallback(({main:H=0,side:Y=0,vacuum:k=0}={})=>{if(!c)return;const F={main:ul(H,Zl.main[0],Zl.main[1]),side:ul(Y,Zl.side[0],Zl.side[1]),vacuum:ul(k,Zl.vacuum[0],Zl.vacuum[1])};b({type:"motors",data:{motorPwm:F}})},[b,c]),C=E.useCallback(()=>{c&&(r.current.clear(),f.current={left:0,right:0},m(f.current),S({main:0,side:0,vacuum:0}))},[c,S]),z=E.useCallback(H=>{if(!c)return;const Y=cb[H];Y&&(b({type:"raw",data:{raw:db(Y)}}),y())},[b,y,c]),L=E.useCallback(async()=>{if(c)for(const H of["start","dock","full"])z(H),await ob(rb)},[c,z]),X=E.useCallback(()=>{z("dock")},[z]),q=E.useCallback(H=>{c&&S(H)},[c,S]);return E.useEffect(()=>{if(!c){r.current.clear(),f.current={left:0,right:0},m(f.current);return}function H(k){if(hb(k))return;const F=k.key.toLowerCase();["w","a","s","d","shift"].includes(F)&&(r.current.has(F)||(r.current.add(F),v()))}function Y(k){const F=k.key.toLowerCase();r.current.has(F)&&(r.current.delete(F),v())}return window.addEventListener("keydown",H),window.addEventListener("keyup",Y),y(),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Y)}},[c,v,y]),{roverId:c,speeds:h,stopMotors:C,sendOiCommand:z,runStartDockFull:L,seekDock:X,setAuxMotors:q,driveWithVector:T}}const np=E.createContext(null);function pb({children:u}){const i=mb();return p.jsx(np.Provider,{value:i,children:u})}function Bu(){const u=E.useContext(np);if(!u)throw new Error("useDriveControl must be used within DriveControlProvider");return u}function Hr(){const{roverId:u,runStartDockFull:i,seekDock:c}=Bu(),f=Br(u)?.sensors||{},h=(f.oiMode?.label||"").toLowerCase()==="full",m=!!f.chargingSources?.homeBase,b=!!(f.chargingState?.label&&f.chargingState.label.toLowerCase()!=="not charging");return p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[p.jsx("span",{children:"Drive control"}),p.jsx("span",{children:u?`Rover ${u}`:"unassigned"})]}),p.jsxs("div",{className:"mt-1 space-y-1",children:[p.jsx(dm,{title:"Start Driving",description:"Press to enable driving mode, then start moving. The headlamps should illuminate.",statuses:[{label:h?"Ready!":"Not Ready!",active:h}],tone:"emerald",onClick:i,disabled:!u}),p.jsx(dm,{title:"Dock and Charge",description:"Line the rover up about a foot from the dock, then trigger an automatic approach.",statuses:[{label:m?"Docked!":"Not Docked!",active:m},{label:b?"Charging!":"Not Charging!",active:b}],tone:"indigo",onClick:c,disabled:!u})]})]})}function dm({title:u,description:i,statuses:c,tone:r,onClick:f,disabled:h,footnote:m}){const b=r==="indigo"?"bg-indigo-600":"bg-emerald-600";return p.jsxs("button",{type:"button",onClick:f,disabled:h,className:`w-full rounded-lg ${b} px-1 py-1 text-left text-white disabled:opacity-40`,children:[p.jsx("p",{className:"text-base font-semibold",children:u}),p.jsx("p",{className:"text-sm text-white/90",children:i}),p.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:c.map(y=>p.jsx("span",{className:`rounded-full px-1 py-0.5 text-xs font-semibold ${y.active?"bg-lime-300 text-emerald-900":"bg-emerald-900 text-emerald-100"}`,children:y.label},y.label))}),m&&p.jsx("p",{className:"mt-1 text-xs text-emerald-50/80",children:m})]})}const yb=5e3;function vb(u){return u.id?u.id:u.timestamp?`${u.timestamp}-${u.message}`:`${u.title||"alert"}-${u.message}`}function gb(){const{alerts:u}=kt(),[i,c]=E.useState(()=>Date.now()),r=E.useMemo(()=>u.slice(-5).map(h=>({alert:h,key:vb(h)})),[u]);E.useEffect(()=>{if(!r.length)return;const h=setInterval(()=>c(Date.now()),200);return()=>clearInterval(h)},[r.length]);const f=r.map(h=>({...h,age:i-(h.alert.receivedAt??h.alert.timestamp??0)})).filter(h=>h.age<=yb);return f.length?p.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(h=>p.jsx(bb,{alert:h.alert},h.key))}):null}function bb({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 p.jsxs("div",{className:`pointer-events-auto rounded-sm px-1 py-1 text-[0.75rem] shadow-lg shadow-black/60 ${i}`,children:[p.jsx("p",{className:"text-[0.65rem] text-slate-300",children:u.title||"Alert"}),p.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 Lu(){const{session:u,lockRover:i,setMode:c,requestControl:r}=kt(),f=E.useMemo(()=>u?.roster??[],[u?.roster]),[h,m]=E.useState({}),b=u?.role==="admin"||u?.role==="lockdown"||u?.role==="lockdown-admin",y=u?.mode??"open",v=async(z,L)=>{try{await i(z,L),m(X=>({...X,[z]:L}))}catch(X){alert(X.message)}},T=async z=>{const L=z.target.value;try{await c(L)}catch(X){alert(X.message)}},S=async z=>{try{await r(z,{force:!0})}catch(L){alert(L.message)}},C=E.useMemo(()=>{const z={};return f.forEach(L=>{z[L.id]=h[L.id]??L.locked}),z},[f,h]);return b?p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"flex items-center justify-between gap-1 text-sm",children:[p.jsx("span",{children:"Admin controls"}),p.jsx("select",{value:y,onChange:T,className:"rounded-sm bg-black/40 px-1 py-1 text-sm text-slate-100",children:Sb.map(z=>p.jsx("option",{value:z.key,children:z.label},z.key))})]}),p.jsx("div",{className:"mt-1 space-y-1 text-sm",children:f.map(z=>p.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 rounded-sm bg-black/30 px-1 py-1",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-slate-100",children:z.name}),p.jsx("p",{className:"text-xs text-slate-400",children:C[z.id]?"locked":"unlocked"})]}),p.jsxs("div",{className:"flex flex-wrap gap-1 text-xs",children:[p.jsx("button",{type:"button",onClick:()=>v(z.id,!C[z.id]),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:C[z.id]?"Unlock":"Lock"}),p.jsx("button",{type:"button",onClick:()=>S(z.id),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:"Force"})]})]},z.id))})]}):null}var mr={},cn={},pr={},mm;function Hu(){return mm||(mm=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={}))})(pr)),pr}var Ka={},pm;function xb(){if(pm)return Ka;pm=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={},ym;function _b(){if(ym)return Ja;ym=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.shapeBoundsFactory=void 0;var u=Hu(),i=function(r,f,h,m,b,y,v,T,S){switch(r){case u.JoystickShape.Square:return m=c(f-S.left-T/2,T),b=c(h-S.top-T/2,T),{relativeX:m,relativeY:b};case u.JoystickShape.AxisX:return m=c(f-S.left-T/2,T),b=0,{relativeX:m,relativeY:b};case u.JoystickShape.AxisY:return m=0,b=c(h-S.top-T/2,T),{relativeX:m,relativeY:b};default:return y>v&&(m*=v/y,b*=v/y),{relativeX:m,relativeY:b}}};Ja.shapeBoundsFactory=i;var c=function(r,f){var h=f/2;return r>h?h:r<-h?h*-1:r};return Ja}var vm;function Eb(){if(vm)return cn;vm=1;var u=cn&&cn.__extends||(function(){var v=function(T,S){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,z){C.__proto__=z}||function(C,z){for(var L in z)Object.prototype.hasOwnProperty.call(z,L)&&(C[L]=z[L])},v(T,S)};return function(T,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");v(T,S);function C(){this.constructor=T}T.prototype=S===null?Object.create(S):(C.prototype=S.prototype,new C)}})(),i=cn&&cn.__assign||function(){return i=Object.assign||function(v){for(var T,S=1,C=arguments.length;S<C;S++){T=arguments[S];for(var z in T)Object.prototype.hasOwnProperty.call(T,z)&&(v[z]=T[z])}return v},i.apply(this,arguments)};Object.defineProperty(cn,"__esModule",{value:!0}),cn.Joystick=void 0;var c=Mu(),r=Hu(),f=xb(),h=_b(),m;(function(v){v.PointerDown="pointerdown",v.PointerMove="pointermove",v.PointerUp="pointerup"})(m||(m={}));var b;(function(v){v[v.TopRight=2.35619449]="TopRight",v[v.TopLeft=-2.35619449]="TopLeft",v[v.BottomRight=.785398163]="BottomRight",v[v.BottomLeft=-.785398163]="BottomLeft"})(b||(b={}));var y=(function(v){u(T,v);function T(S){var C=v.call(this,S)||this;return C._stickRef=c.createRef(),C._baseRef=c.createRef(),C.frameId=null,C._pointerId=null,C._mounted=!1,C._pointerMove=function(z){if(z.preventDefault(),C.state.dragging){if(!C.props.followCursor&&z.pointerId!==C._pointerId)return;var L=z.clientX,X=z.clientY,q=L-C._parentRect.left-C._radius,H=X-C._parentRect.top-C._radius,Y=C._distance(q,H),k=(0,h.shapeBoundsFactory)(C.props.controlPlaneShape||C.props.baseShape,L,X,q,H,Y,C._radius,C._baseSize,C._parentRect);q=k.relativeX,H=k.relativeY;var F=Math.atan2(q,H);C._updatePos({relativeX:q,relativeY:H,distance:C._distanceToPercentile(Y),direction:C._getDirection(F),axisX:L-C._parentRect.left,axisY:X-C._parentRect.top})}},C._pointerUp=function(z){if(z.pointerId===C._pointerId){var L={dragging:!1};C.props.sticky||(L.coordinates=void 0),C.frameId=window.requestAnimationFrame(function(){C._mounted&&C.setState(L)}),window.removeEventListener(m.PointerUp,C._pointerUp),window.removeEventListener(m.PointerMove,C._pointerMove),C._pointerId=null,C.props.stop&&C.props.stop({type:"stop",x:C.props.sticky?C.state.coordinates.relativeX*2/C._baseSize:null,y:C.props.sticky?C.state.coordinates.relativeY*2/C._baseSize:null,direction:C.props.sticky?C.state.coordinates.direction:null,distance:C.props.sticky?C.state.coordinates.distance:null})}},C.state={dragging:!1},C._throttleMoveCallback=(function(){var z=0;return function(L){var X=new Date().getTime(),q=C.props.throttle||0;if(!(X-z<q)&&(z=X,C.props.move))return C.props.move(L)}})(),C}return T.prototype.componentWillUnmount=function(){var S=this;this._mounted=!1,this.props.followCursor&&window.removeEventListener(m.PointerMove,function(C){return S._pointerMove(C)}),this.frameId!==null&&window.cancelAnimationFrame(this.frameId)},T.prototype.componentDidMount=function(){var S=this;this._mounted=!0,this.props.followCursor&&(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(m.PointerMove,function(C){return S._pointerMove(C)}),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},T.prototype._updatePos=function(S){var C=this;this.frameId=window.requestAnimationFrame(function(){C._mounted&&C.setState({coordinates:S})}),!(typeof this.props.minDistance=="number"&&S.distance<this.props.minDistance)&&this._throttleMoveCallback({type:"move",x:S.relativeX*2/this._baseSize,y:-(S.relativeY*2/this._baseSize),direction:S.direction,distance:S.distance})},T.prototype._pointerDown=function(S){this.props.disabled||this.props.followCursor||(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(m.PointerUp,this._pointerUp),window.addEventListener(m.PointerMove,this._pointerMove),this._pointerId=S.pointerId,this._stickRef.current.setPointerCapture(S.pointerId),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},T.prototype._getDirection=function(S){return S>b.TopRight||S<b.TopLeft?"FORWARD":S<b.TopRight&&S>b.BottomRight?"RIGHT":S<b.BottomLeft?"LEFT":"BACKWARD"},T.prototype._distance=function(S,C){return Math.hypot(S,C)},T.prototype._distanceToPercentile=function(S){var C=S/(this._baseSize/2)*100;return C>100?100:C},T.prototype.getBaseShapeStyle=function(){var S=this.props.baseShape||r.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},T.prototype.getStickShapeStyle=function(){var S=this.props.stickShape||r.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},T.prototype._getBaseStyle=function(){var S=this.props.baseColor!==void 0?this.props.baseColor:"#000033",C="".concat(this._baseSize,"px"),z=i(i({},this.getBaseShapeStyle()),{height:C,width:C,background:S,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 S=this.props.stickColor!==void 0?this.props.stickColor:"#3D59AB",C=this._stickSize?"".concat(this._stickSize,"px"):"".concat(this._baseSize/1.5,"px"),z=i(i({},this.getStickShapeStyle()),{background:S,cursor:"move",height:C,width:C,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 S=this;this._baseSize=this.props.size||100,this._stickSize=this.props.stickSize,this._radius=this._baseSize/2;var C=this._getBaseStyle(),z=this._getStickStyle();return c.createElement("div",{"data-testid":"joystick-base",className:this.props.disabled?"joystick-base-disabled":"",ref:this._baseRef,style:C},c.createElement("button",{ref:this._stickRef,disabled:this.props.disabled,onPointerDown:function(L){return S._pointerDown(L)},className:this.props.disabled?"joystick-disabled":"",style:z}))},T})(c.Component);return cn.Joystick=y,cn}var gm;function Tb(){return gm||(gm=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=u.Joystick=void 0;var i=Eb();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}})})(mr)),mr}var Ab=Tb();function bm(u=0){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function lp(){const{roverId:u,driveWithVector:i,stopMotors:c}=Bu(),r=!u,f=E.useCallback((m={})=>{if(r)return;const b=bm(m.x??0),y=bm(m.y??0);i({x:b,y})},[r,i]),h=E.useCallback(()=>{r||i({x:0,y:0})},[r,i]);return p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("div",{className:"text-xs text-slate-400",children:"Joystick"}),p.jsx("div",{className:"mt-1 flex items-center justify-center",children:p.jsx(Ab.Joystick,{size:120,baseColor:"#0f172a",stickColor:"#38bdf8",throttle:75,move:f,stop:h,disabled:r})}),p.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Drag to drive. Release to stop sending drive commands."}),p.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 ap(){const{roverId:u,setAuxMotors:i}=Bu(),c=!u,r=()=>{c||i({main:127,side:127,vacuum:127})},f=()=>{c||i({main:0,side:0,vacuum:0})},h=[{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 p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("div",{className:"text-xs text-slate-400",children:"Aux motors"}),p.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[p.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"}),p.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"})]}),p.jsx("div",{className:"mt-1 grid grid-cols-2 gap-1 text-[0.75rem]",children:h.map(m=>p.jsx("button",{type:"button",onClick:()=>!c&&i(m.values),disabled:c,className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200 disabled:opacity-30",children:m.label},m.label))})]})}function Cb(){return p.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row",children:[p.jsx("div",{className:"flex-1",children:p.jsx(lp,{})}),p.jsx("div",{className:"flex-1",children:p.jsx(ap,{})})]})}function qr(){return p.jsxs("div",{className:"min-h-[8rem] rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsx("p",{className:"text-center text-sm text-slate-400",children:"Room camera"}),p.jsx("p",{className:"mt-1 text-center",children:"Feed placeholder. Wire upcoming room cam here."})]})}function ip(){const{logs:u}=kt();return p.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-400",children:[p.jsx("span",{children:"Server logs"}),p.jsx("span",{children:u.length})]}),p.jsx("div",{className:"mt-1 h-48 overflow-y-auto rounded-sm bg-black/40 p-1 font-mono text-xs",children:u.length===0?p.jsx("p",{children:"No logs yet."}):u.slice().reverse().map(i=>p.jsxs("div",{className:"mb-1",children:[p.jsx("span",{className:"text-amber-400",children:i.timestamp})," ",p.jsxs("span",{className:"text-lime-400",children:["[",i.level,"]"]})," ",i.label&&p.jsxs("span",{className:"text-teal-400",children:["[",i.label,"]"]})," ",p.jsx("span",{children:i.message})]},i.id))})]})}function Yr(){const{login:u,setRole:i}=kt(),[c,r]=E.useState(""),[f,h]=E.useState(""),[m,b]=E.useState(!1);async function y(v){v.preventDefault(),b(!0);try{await u(c,f),r(""),h("")}catch(T){alert(T.message)}finally{b(!1)}}return p.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),p.jsxs("form",{className:"mt-1 flex flex-col gap-1",onSubmit:y,children:[p.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Username",value:c,onChange:v=>r(v.target.value)}),p.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Password",type:"password",value:f,onChange:v=>h(v.target.value)}),p.jsx("button",{type:"submit",disabled:m,className:"rounded-sm bg-slate-200 px-1 py-1 text-sm font-semibold text-black disabled:opacity-50",children:m?"Logging in…":"Login"})]}),p.jsxs("div",{className:"mt-1 flex gap-1 text-sm",children:[p.jsx("button",{type:"button",onClick:()=>i("user"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Driver"}),p.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 up(u=[]){const i=ei(),[c,r]=E.useState({}),f=Array.isArray(u)?u.filter(Boolean).join("|"):"";return E.useEffect(()=>{if(!f)return;const m=f.split("|");let b=!1;return m.forEach(y=>{i.emit("video:request",{roverId:y},(v={})=>{b||r(T=>({...T,[y]:v}))})}),()=>{b=!0}},[i,f]),E.useMemo(()=>{if(!f)return{};const m=f.split("|"),b={};return m.forEach(y=>{c[y]&&(b[y]=c[y])}),b},[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 Nb(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 Ob(u){if(!u)return{};const i=`${u}:${u}`;return{Authorization:`Basic ${Nb(i)}`}}class zb{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",...Ob(this.token)},body:r.sdp,signal:this.abortController.signal});if(!f.ok)throw new Error(`WHEP request failed: ${f.status}`);const h=await f.text();await i.setRemoteDescription({type:"answer",sdp:h}),i.getReceivers().forEach(m=>{"playoutDelayHint"in m&&(m.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 Mb=2e3,Db=3e3;function sp({sessionInfo:u,label:i,forceMute:c=!1,telemetryFrame:r,batteryConfig:f}){const h=E.useRef(null),m=E.useRef(null),b=E.useRef(null),[y,v]=E.useState("idle"),[T,S]=E.useState(null),[C,z]=E.useState(0),[L,X]=E.useState(!0),q=r?.sensors,H=q?.batteryChargeMah??null,Y=q?.wheelOvercurrents||null,k=!!(Y&&Object.values(Y).some($=>!!$)),F=E.useCallback(()=>{clearTimeout(m.current),m.current=setTimeout(()=>z(Date.now()),Mb)},[]),ye=E.useCallback(($=0)=>{if(c)return;clearTimeout(b.current);const Te=()=>{clearTimeout(b.current),b.current=setTimeout(()=>{c||xe()},Db)},xe=async()=>{const Ue=h.current;if(Ue)try{Ue.muted=!1,await Ue.play(),X(!1)}catch{Ue.muted=!0,X(!0),Te()}};b.current=setTimeout(xe,$)},[c]);E.useEffect(()=>()=>{clearTimeout(m.current),clearTimeout(b.current)},[]),E.useEffect(()=>{y==="playing"&&ye(0)},[y,ye]),E.useEffect(()=>{if(!u?.url||!h.current)return;let $=!0,Te;const xe=setTimeout(()=>X(!0),0),Ue=(Xe,We)=>{$&&(v(Xe),S(We||null),["error","failed","disconnected","closed"].includes(Xe)&&F())};return Te=new zb({url:u.url,token:u.token,video:h.current,onStatus:Ue}),Te.start().catch(Xe=>{$&&(v("error"),S(Xe.message),F())}),()=>{$=!1,clearTimeout(xe),Te?.stop()}},[u?.url,u?.token,C,F]),E.useEffect(()=>{y==="stopped"&&u?.url&&F()},[y,u?.url,F]);const Re=u?.url?y==="error"?`Error: ${T||"unknown"}`:T?`${y} (${T})`:y:"waiting";return p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm bg-black aspect-video",children:[p.jsx("video",{ref:h,muted:c||L,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),p.jsx(wb,{frame:r}),p.jsx(Ub,{active:k})]}),p.jsx(jb,{charge:H,config:f,label:i,status:Re})]})}function jb({charge:u,config:i,label:c,status:r}){const f=i?.Full,h=i?.Warn,m=i?.Urgent??null;if(u==null||f==null||h==null)return p.jsxs("div",{className:"rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[p.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[p.jsx("span",{children:c}),p.jsx("span",{children:r})]}),p.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Battery telemetry unavailable"})]});const b=f-h;if(b<=0)return null;const y=(u-h)/b,v=Math.min(1,Math.max(0,y)),T=Math.round(v*100),S=`${T}%`,C=y<=0,z=m!=null&&u<=m,L=C?"bg-red-500 animate-pulse":z?"bg-amber-400":"bg-emerald-500";return p.jsxs("div",{className:"space-y-2 rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[p.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[p.jsx("span",{children:c}),p.jsx("span",{children:r})]}),p.jsxs("div",{className:"relative h-4 w-full rounded-full bg-slate-800",children:[p.jsx("div",{className:`h-full rounded-full transition-[width] ${L}`,style:{width:`${T}%`}}),p.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-black/80",children:S})]})]})}function wb({frame:u}){const c=u?.sensors?.bumpsAndWheelDrops||{},[r,f]=E.useState(()=>Date.now());E.useEffect(()=>{const y=setInterval(()=>f(Date.now()),150);return()=>clearInterval(y)},[]);const h=u?.receivedAt?r-u.receivedAt<200:!1,m=[{label:"B-L",active:c.bumpLeft},{label:"B-R",active:c.bumpRight}],b=[{label:"Drop L",active:c.wheelDropLeft},{label:"Drop R",active:c.wheelDropRight}];return p.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col justify-between p-1 text-[0.65rem] text-slate-200",children:[p.jsxs("div",{className:"flex items-center justify-between gap-1",children:[p.jsxs("div",{className:"flex items-center gap-1 text-[0.55rem] text-slate-400",children:[p.jsx("span",{className:`h-2 w-2 rounded-full ${h?"bg-emerald-300 shadow-[0_0_4px_rgba(16,185,129,0.8)]":"bg-slate-700"}`}),p.jsx("span",{children:"sensor"})]}),p.jsx("div",{className:"flex gap-1",children:m.map(y=>p.jsx(Sm,{label:y.label,active:y.active},y.label))})]}),p.jsx("div",{className:"flex justify-end gap-1",children:b.map(y=>p.jsx(Sm,{label:y.label,active:y.active},y.label))})]})}function Sm({label:u,active:i}){return p.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 Ub({active:u}){return u?p.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:p.jsx("div",{className:"text-center text-sm font-semibold text-red-100 animate-pulse",children:"Overcurrent"})}):null}function kr(){const{session:u}=kt(),i=u?.assignment?.roverId,c=up(i?[i]:[]),r=i?c[i]:null,f=Br(i),m=(i&&u?.roster?u.roster.find(b=>String(b.id)===String(i)):null)?.battery??null;return p.jsx("section",{className:"rounded-sm bg-[#242a32] p-1",children:i?p.jsx("div",{className:"w-full",children:p.jsx(sp,{sessionInfo:r,label:i,muted:!1,telemetryFrame:f,batteryConfig:m})}):p.jsx("p",{className:"text-sm text-slate-400",children:"Assign a rover to view the video feed."})})}const Bb=[{key:"start",label:"Start OI"},{key:"safe",label:"Safe"},{key:"full",label:"Full"},{key:"passive",label:"Passive"},{key:"dock",label:"Dock"}];function Lb(){const{roverId:u,sendOiCommand:i}=Bu(),c=ei(),r=!!u,f=E.useMemo(()=>[{key:"start",label:"Enable stream",enable:!0},{key:"stop",label:"Disable stream",enable:!1}],[]),h=m=>{u&&c.emit("command",{roverId:u,type:"sensorStream",data:{sensorStream:{enable:m}}})};return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("p",{className:"text-xs text-slate-400",children:"Manual OI commands"}),p.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:Bb.map(m=>p.jsx("button",{type:"button",onClick:()=>i(m.key),disabled:!r,className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-30",children:m.label},m.key))})]}),p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("p",{className:"text-xs text-slate-400",children:"Sensor stream"}),p.jsx("div",{className:"mt-1 flex gap-1",children:f.map(m=>p.jsx("button",{type:"button",onClick:()=>h(m.enable),disabled:!r,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-30",children:m.label},m.key))}),!r&&p.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Assign a rover to toggle streams."})]}),p.jsx(Yr,{}),p.jsx(Lu,{})]})}function Hb({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 p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsx("p",{className:"text-sm text-slate-400",children:"Help"}),p.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:c.map(r=>p.jsx("li",{className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200",children:r},r))})]})}function Eu({active:u,onClick:i,children:c}){return p.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 qb(){return p.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("p",{className:"text-xs text-slate-400",children:"Room controls"}),p.jsx("p",{className:"text-sm text-slate-200",children:"Coming soon: lighting, docks, and environmental toggles."})]})}function Yb({layout:u}){const[i,c]=E.useState("telemetry");return p.jsxs("section",{className:"rounded-sm bg-[#1a1d23] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"flex gap-1",children:[p.jsx(Eu,{active:i==="telemetry",onClick:()=>c("telemetry"),children:"Rover Controls"}),p.jsx(Eu,{active:i==="room",onClick:()=>c("room"),children:"Room Controls"}),p.jsx(Eu,{active:i==="advanced",onClick:()=>c("advanced"),children:"Advanced"}),p.jsx(Eu,{active:i==="help",onClick:()=>c("help"),children:"Help"})]}),p.jsxs("div",{className:"mt-1 space-y-1",children:[i==="telemetry"&&p.jsxs("div",{className:"space-y-1",children:[p.jsx(Hr,{}),p.jsx(Lr,{})]}),i==="room"&&p.jsxs("div",{className:"space-y-1",children:[p.jsx(qr,{}),p.jsx(qb,{})]}),i==="advanced"&&p.jsx(Lb,{}),i==="help"&&p.jsx(Hb,{layout:u})]})]})}function kb(){const{session:u}=kt(),i=E.useMemo(()=>JSON.stringify(u??{},null,2),[u]);return p.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-xs text-slate-100",children:[p.jsx("p",{className:"text-sm text-slate-400",children:"Session snapshot"}),p.jsx("pre",{className:"mt-1 max-h-64 overflow-y-auto bg-black/40 p-1 text-[0.7rem] text-lime-300",children:i})]})}function Xb(){const[u,i]=E.useState(()=>typeof window>"u"||window.innerWidth>=1024?"desktop":window.innerWidth>window.innerHeight?"mobile-landscape":"mobile-portrait");return E.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 Gb({layout:u}){return p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsxs("section",{className:"grid grid-cols-[minmax(0,1.8fr)_minmax(0,1fr)] gap-1",children:[p.jsx(kr,{}),p.jsx(Yb,{layout:u})]}),p.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[p.jsx(Lu,{}),p.jsx(kb,{})]})]})}function Vb(){return p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx(kr,{}),p.jsx(Cb,{}),p.jsx(Hr,{}),p.jsx(Lr,{}),p.jsx(Yr,{}),p.jsx(Lu,{}),p.jsx(qr,{}),p.jsx(ip,{})]})}function Qb(){return p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsxs("section",{className:"grid grid-cols-[minmax(0,0.7fr)_minmax(0,2.1fr)_minmax(0,0.7fr)] gap-1",children:[p.jsx("div",{className:"flex flex-col gap-1",children:p.jsx(ap,{})}),p.jsx(kr,{}),p.jsx("div",{className:"flex flex-col gap-1",children:p.jsx(lp,{})})]}),p.jsx(qr,{}),p.jsx(Hr,{}),p.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx(Yr,{}),p.jsx(Lu,{})]}),p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx(ip,{}),p.jsx(Lr,{})]})]})]})}function Zb(){const u=Xb(),i=u==="desktop"?p.jsx(Gb,{layout:u}):u==="mobile-landscape"?p.jsx(Qb,{}):p.jsx(Vb,{});return p.jsx("div",{className:"min-h-screen bg-black text-slate-50",children:p.jsxs(pb,{children:[p.jsx("main",{className:"flex w-full flex-col gap-1 px-1 py-1 text-base",children:i}),p.jsx(gb,{})]})})}function Kb(){const{session:u,setRole:i,subscribeAll:c}=kt(),[r,f]=E.useState(!1);return E.useEffect(()=>{let h=!1;async function m(){try{u?.role!=="spectator"&&await i("spectator"),await c(),h||f(!0)}catch(b){console.error("Failed to enter spectator mode",b)}}return m(),()=>{h=!0}},[u?.role,i,c]),r}function Jb({connected:u,ready:i,rosterCount:c}){return p.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[p.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"}),p.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…"]}),p.jsxs("span",{className:"rounded-full bg-slate-800 px-3 py-1 text-slate-200",children:["Rovers: ",c]})]})}function $b({logs:u}){return p.jsxs("section",{className:"rounded-3xl border border-slate-800 bg-slate-900/70 p-4",children:[p.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[p.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),p.jsxs("span",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:["latest ",u.length]})]}),p.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?p.jsx("p",{children:"No log entries yet."}):u.slice().reverse().map(i=>p.jsxs("div",{className:"mb-2",children:[p.jsx("span",{className:"text-slate-500",children:i.timestamp})," ",p.jsxs("span",{className:"text-cyan-300",children:["[",i.level,"]"]})," ",i.label&&p.jsxs("span",{className:"text-pink-300",children:["[",i.label,"]"]})," ",p.jsx("span",{children:i.message})]},i.id))})]})}function Wb(u={}){return Object.entries(u).map(([i,c])=>({key:i,value:typeof c=="object"?JSON.stringify(c):c}))}function Fb({rover:u,frame:i,videoInfo:c}){const r=Wb(i?.sensors);return p.jsxs("article",{className:"space-y-4 rounded-3xl border border-slate-800 bg-slate-900/70 p-5",children:[p.jsxs("header",{className:"flex flex-col gap-1",children:[p.jsx("h3",{className:"text-2xl font-semibold text-white",children:u.name}),p.jsx("p",{className:"text-sm text-slate-400",children:i?.receivedAt?`Updated ${new Date(i.receivedAt).toLocaleTimeString()}`:"Waiting for telemetry…"})]}),p.jsx(sp,{sessionInfo:c,label:u.name,forceMute:!0}),p.jsxs("section",{className:"rounded-2xl border border-slate-800/80 bg-slate-950/50 p-4",children:[p.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Telemetry"}),r.length===0?p.jsx("p",{className:"mt-3 text-sm text-slate-400",children:"No sensor data yet."}):p.jsx("dl",{className:"mt-3 grid gap-2 text-sm text-slate-200",children:r.map(({key:f,value:h})=>p.jsxs("div",{className:"flex justify-between gap-4",children:[p.jsx("dt",{className:"text-slate-500",children:f}),p.jsx("dd",{className:"text-right font-semibold text-white",children:h})]},f))})]})]})}function Pb(){const{connected:u,session:i,logs:c}=kt(),r=Kb(),f=tp(),h=i?.roster??[],m=up(h.map(y=>y.id)),b=E.useMemo(()=>({connected:u,ready:r,rosterCount:h.length}),[u,r,h.length]);return p.jsx("div",{className:"min-h-screen bg-slate-950 text-slate-50",children:p.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-6 px-6 py-10",children:[p.jsxs("header",{className:"space-y-3",children:[p.jsx("h1",{className:"text-4xl font-semibold text-white",children:"Spectator Console"}),p.jsx("p",{className:"text-slate-400",children:"Live rover telemetry & logs. This view is read-only."}),p.jsx(Jb,{...b})]}),p.jsx("section",{className:"grid gap-6 lg:grid-cols-3",children:h.length===0?p.jsx("p",{className:"col-span-full text-slate-400",children:"No rovers registered."}):h.map(y=>p.jsx(Fb,{rover:y,frame:f[y.id],videoInfo:m[y.id]},y.id))}),p.jsx($b,{logs:c})]})})}Y0.createRoot(document.getElementById("root")).render(p.jsx(E.StrictMode,{children:p.jsx(ab,{children:p.jsx(ub,{children:p.jsx(sb,{children:p.jsx(tg,{children:p.jsxs(Dv,{children:[p.jsx(vr,{path:"/",element:p.jsx(Zb,{})}),p.jsx(vr,{path:"/spectate",element:p.jsx(Pb,{})})]})})})})})}));