mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
12 lines
303 KiB
JavaScript
12 lines
303 KiB
JavaScript
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function c(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(f){if(f.ep)return;f.ep=!0;const d=c(f);fetch(f.href,d)}})();var nr={exports:{}},ka={};var Qd;function z0(){if(Qd)return ka;Qd=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(r,f,d){var m=null;if(d!==void 0&&(m=""+d),f.key!==void 0&&(m=""+f.key),"key"in f){d={};for(var b in f)b!=="key"&&(d[b]=f[b])}else d=f;return f=d.ref,{$$typeof:u,type:r,key:m,ref:f!==void 0?f:null,props:d}}return ka.Fragment=i,ka.jsx=c,ka.jsxs=c,ka}var Zd;function M0(){return Zd||(Zd=1,nr.exports=z0()),nr.exports}var y=M0(),lr={exports:{}},I={};var Kd;function D0(){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"),d=Symbol.for("react.consumer"),m=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),p=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 H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,Y={};function L(_,B,G){this.props=_,this.context=B,this.refs=Y,this.updater=G||H}L.prototype.isReactComponent={},L.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")},L.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function q(){}q.prototype=L.prototype;function Q(_,B,G){this.props=_,this.context=B,this.refs=Y,this.updater=G||H}var P=Q.prototype=new q;P.constructor=Q,k(P,L.prototype),P.isPureReactComponent=!0;var ye=Array.isArray;function Re(){}var $={H:null,A:null,T:null,S:null},Te=Object.prototype.hasOwnProperty;function xe(_,B,G){var Z=G.ref;return{$$typeof:u,type:_,key:B,ref:Z!==void 0?Z:null,props:G}}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(G){return B[G]})}var Hn=/\/+/g;function kt(_,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,G,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,G,Z,ee)}}if(de)return ee=ee(_),de=Z===""?"."+kt(_,0):Z,ye(ee)?(G="",de!=null&&(G=de.replace(Hn,"$&/")+"/"),j(ee,B,G,"",function(Jl){return Jl})):ee!=null&&(Xe(ee)&&(ee=Ue(ee,G+(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+kt(Z,De),de+=j(Z,B,G,le,ee);else if(De=z(_),typeof De=="function")for(_=De.call(_),De=0;!(Z=_.next()).done;)Z=Z.value,le=Pe+kt(Z,De++),de+=j(Z,B,G,le,ee);else if(le==="object"){if(typeof _.then=="function")return j(Nt(_),B,G,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 X(_,B,G){if(_==null)return _;var Z=[],ee=0;return j(_,Z,"","",function(le){return B.call(G,le,ee++)}),Z}function F(_){if(_._status===-1){var B=_._result;B=B(),B.then(function(G){(_._status===0||_._status===-1)&&(_._status=1,_._result=G)},function(G){(_._status===0||_._status===-1)&&(_._status=2,_._result=G)}),_._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:X,forEach:function(_,B,G){X(_,function(){B.apply(this,arguments)},G)},count:function(_){var B=0;return X(_,function(){B++}),B},toArray:function(_){return X(_,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=L,I.Fragment=c,I.Profiler=f,I.PureComponent=Q,I.StrictMode=r,I.Suspense=p,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,G){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var Z=k({},_.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=G;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:d,_context:_},_},I.createElement=function(_,B,G){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=G;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:F}},I.memo=function(_,B){return{$$typeof:v,type:_,compare:B===void 0?null:B}},I.startTransition=function(_){var B=$.T,G={};$.T=G;try{var Z=_(),ee=$.S;ee!==null&&ee(G,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(Re,ve)}catch(le){ve(le)}finally{B!==null&&G.types!==null&&(B.types=G.types),$.T=B}},I.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},I.use=function(_){return $.H.use(_)},I.useActionState=function(_,B,G){return $.H.useActionState(_,B,G)},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,G){return $.H.useImperativeHandle(_,B,G)},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,G){return $.H.useReducer(_,B,G)},I.useRef=function(_){return $.H.useRef(_)},I.useState=function(_){return $.H.useState(_)},I.useSyncExternalStore=function(_,B,G){return $.H.useSyncExternalStore(_,B,G)},I.useTransition=function(){return $.H.useTransition()},I.version="19.2.0",I}var Jd;function zu(){return Jd||(Jd=1,lr.exports=D0()),lr.exports}var E=zu(),ar={exports:{}},Xa={},ir={exports:{}},ur={};var $d;function j0(){return $d||($d=1,(function(u){function i(j,X){var F=j.length;j.push(X);e:for(;0<F;){var ve=F-1>>>1,_e=j[ve];if(0<f(_e,X))j[ve]=X,j[F]=_e,F=ve;else break e}}function c(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var X=j[0],F=j.pop();if(F!==X){j[0]=F;e:for(var ve=0,_e=j.length,_=_e>>>1;ve<_;){var B=2*(ve+1)-1,G=j[B],Z=B+1,ee=j[Z];if(0>f(G,F))Z<_e&&0>f(ee,G)?(j[ve]=ee,j[Z]=F,ve=Z):(j[ve]=G,j[B]=F,ve=B);else if(Z<_e&&0>f(ee,F))j[ve]=ee,j[Z]=F,ve=Z;else break e}}return X}function f(j,X){var F=j.sortIndex-X.sortIndex;return F!==0?F:j.id-X.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;u.unstable_now=function(){return d.now()}}else{var m=Date,b=m.now();u.unstable_now=function(){return m.now()-b}}var p=[],v=[],T=1,S=null,C=3,z=!1,H=!1,k=!1,Y=!1,L=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function P(j){for(var X=c(v);X!==null;){if(X.callback===null)r(v);else if(X.startTime<=j)r(v),X.sortIndex=X.expirationTime,i(p,X);else break;X=c(v)}}function ye(j){if(k=!1,P(j),!H)if(c(p)!==null)H=!0,Re||(Re=!0,We());else{var X=c(v);X!==null&&Nt(ye,X.startTime-j)}}var Re=!1,$=-1,Te=5,xe=-1;function Ue(){return Y?!0:!(u.unstable_now()-xe<Te)}function Xe(){if(Y=!1,Re){var j=u.unstable_now();xe=j;var X=!0;try{e:{H=!1,k&&(k=!1,q($),$=-1),z=!0;var F=C;try{t:{for(P(j),S=c(p);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,P(j),X=!0;break t}S===c(p)&&r(p),P(j)}else r(p);S=c(p)}if(S!==null)X=!0;else{var _=c(v);_!==null&&Nt(ye,_.startTime-j),X=!1}}break e}finally{S=null,C=F,z=!1}X=void 0}}finally{X?We():Re=!1}}}var We;if(typeof Q=="function")We=function(){Q(Xe)};else if(typeof MessageChannel<"u"){var Hn=new MessageChannel,kt=Hn.port2;Hn.port1.onmessage=Xe,We=function(){kt.postMessage(null)}}else We=function(){L(Xe,0)};function Nt(j,X){$=L(function(){j(u.unstable_now())},X)}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 X=3;break;default:X=C}var F=C;C=X;try{return j()}finally{C=F}},u.unstable_requestPaint=function(){Y=!0},u.unstable_runWithPriority=function(j,X){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var F=C;C=j;try{return X()}finally{C=F}},u.unstable_scheduleCallback=function(j,X,F){var ve=u.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ve+F:ve):F=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=F+_e,j={id:T++,callback:X,priorityLevel:j,startTime:F,expirationTime:_e,sortIndex:-1},F>ve?(j.sortIndex=F,i(v,j),c(p)===null&&j===c(v)&&(k?(q($),$=-1):k=!0,Nt(ye,F-ve))):(j.sortIndex=_e,i(p,j),H||z||(H=!0,Re||(Re=!0,We()))),j},u.unstable_shouldYield=Ue,u.unstable_wrapCallback=function(j){var X=C;return function(){var F=C;C=X;try{return j.apply(this,arguments)}finally{C=F}}}})(ur)),ur}var Wd;function w0(){return Wd||(Wd=1,ir.exports=j0()),ir.exports}var sr={exports:{}},Fe={};var Fd;function U0(){if(Fd)return Fe;Fd=1;var u=zu();function i(p){var v="https://react.dev/errors/"+p;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 #"+p+"; 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 d(p,v,T){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:p,containerInfo:v,implementation:T}}var m=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(p,v){if(p==="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(p,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 d(p,v,null,T)},Fe.flushSync=function(p){var v=m.T,T=r.p;try{if(m.T=null,r.p=2,p)return p()}finally{m.T=v,r.p=T,r.d.f()}},Fe.preconnect=function(p,v){typeof p=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(p,v))},Fe.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Fe.preinit=function(p,v){if(typeof p=="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(p,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:S,integrity:C,fetchPriority:z}):T==="script"&&r.d.X(p,{crossOrigin:S,integrity:C,fetchPriority:z,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Fe.preinitModule=function(p,v){if(typeof p=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var T=b(v.as,v.crossOrigin);r.d.M(p,{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(p)},Fe.preload=function(p,v){if(typeof p=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var T=v.as,S=b(T,v.crossOrigin);r.d.L(p,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(p,v){if(typeof p=="string")if(v){var T=b(v.as,v.crossOrigin);r.d.m(p,{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(p)},Fe.requestFormReset=function(p){r.d.r(p)},Fe.unstable_batchedUpdates=function(p,v){return p(v)},Fe.useFormState=function(p,v,T){return m.H.useFormState(p,v,T)},Fe.useFormStatus=function(){return m.H.useHostTransitionStatus()},Fe.version="19.2.0",Fe}var Pd;function B0(){if(Pd)return sr.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(),sr.exports=U0(),sr.exports}var Id;function L0(){if(Id)return Xa;Id=1;var u=w0(),i=zu(),c=B0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function 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 p(e){if(d(e)!==e)throw Error(r(188))}function v(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return p(a),e;if(s===l)return p(a),t;s=s.sibling}throw Error(r(188))}if(n.return!==l.return)n=a,l=s;else{for(var o=!1,h=a.child;h;){if(h===n){o=!0,n=a,l=s;break}if(h===l){o=!0,l=a,n=s;break}h=h.sibling}if(!o){for(h=s.child;h;){if(h===n){o=!0,n=s,l=a;break}if(h===l){o=!0,l=s,n=a;break}h=h.sibling}if(!o)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,C=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),P=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 kt(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 k:return"Fragment";case L:return"Profiler";case Y:return"StrictMode";case ye:return"Suspense";case Re:return"SuspenseList";case xe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case Q:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case P: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:kt(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return kt(e(t))}catch{}}return null}var Nt=Array.isArray,j=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={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 G(e,t){_e++,ve[_e]=e.current,e.current=t}var Z=_(null),ee=_(null),le=_(null),de=_(null);function Pe(e,t){switch(G(le,t),G(ee,e),G(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),G(Z,e)}function De(){B(Z),B(ee),B(le)}function Jl(e){e.memoizedState!==null&&G(de,e);var t=Z.current,n=pd(t,e.type);t!==n&&(G(ee,e),G(Z,n))}function ti(e){ee.current===e&&(B(Z),B(ee)),de.current===e&&(B(de),La._currentValue=F)}var Hu,Xr;function qn(e){if(Hu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Hu=t&&t[1]||"",Xr=-1<n.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Hu+e+Xr}var qu=!1;function Yu(e,t){if(!e||qu)return"";qu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(M){var O=M}Reflect.construct(e,[],U)}else{try{U.call()}catch(M){O=M}e.call(U.prototype)}}else{try{throw Error()}catch(M){O=M}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(M){if(M&&O&&typeof M.stack=="string")return[M.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=l.DetermineComponentFrameRoot(),o=s[0],h=s[1];if(o&&h){var g=o.split(`
|
||
`),N=h.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{qu=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qn(n):""}function sp(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 Yu(e.type,!1);case 11:return Yu(e.type.render,!1);case 1:return Yu(e.type,!0);case 31:return qn("Activity");default:return""}}function Gr(e){try{var t="",n=null;do t+=sp(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
||
Error generating stack: `+l.message+`
|
||
`+l.stack}}var ku=Object.prototype.hasOwnProperty,Xu=u.unstable_scheduleCallback,Gu=u.unstable_cancelCallback,cp=u.unstable_shouldYield,rp=u.unstable_requestPaint,st=u.unstable_now,op=u.unstable_getCurrentPriorityLevel,Vr=u.unstable_ImmediatePriority,Qr=u.unstable_UserBlockingPriority,ni=u.unstable_NormalPriority,fp=u.unstable_LowPriority,Zr=u.unstable_IdlePriority,hp=u.log,dp=u.unstable_setDisableYieldValue,$l=null,ct=null;function hn(e){if(typeof hp=="function"&&dp(e),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode($l,e)}catch{}}var rt=Math.clz32?Math.clz32:yp,mp=Math.log,pp=Math.LN2;function yp(e){return e>>>=0,e===0?32:31-(mp(e)/pp|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 h=l&134217727;return h!==0?(l=h&~s,l!==0?a=Yn(l):(o&=h,o!==0?a=Yn(o):n||(n=h&~e,n!==0&&(a=Yn(n))))):(h=l&~s,h!==0?a=Yn(h):o!==0?a=Yn(o):n||(n=l&~e,n!==0&&(a=Yn(n)))),a===0?0:t!==0&&t!==a&&(t&s)===0&&(s=a&-a,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:a}function Wl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vp(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 Vu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gp(e,t,n,l,a,s){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var h=e.entanglements,g=e.expirationTimes,N=e.hiddenUpdates;for(n=o&~n;0<n;){var D=31-rt(n),U=1<<D;h[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:Qu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Qu(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 Zu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fr(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Hd(e.type))}function Pr(e,t){var n=X.p;try{return X.p=e,t()}finally{X.p=n}}var dn=Math.random().toString(36).slice(2),Qe="__reactFiber$"+dn,et="__reactProps$"+dn,ul="__reactContainer$"+dn,Ku="__reactEvents$"+dn,bp="__reactListeners$"+dn,Sp="__reactHandles$"+dn,Ir="__reactResources$"+dn,Pl="__reactMarker$"+dn;function Ju(e){delete e[Qe],delete e[et],delete e[Ku],delete e[bp],delete e[Sp]}function sl(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ul]||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 cl(e){if(e=e[Qe]||e[ul]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Il(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function rl(e){var t=e[Ir];return t||(t=e[Ir]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ge(e){e[Pl]=!0}var eo=new Set,to={};function kn(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for(to[e]=t,e=0;e<t.length;e++)eo.add(t[e])}var xp=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 _p(e){return ku.call(lo,e)?!0:ku.call(no,e)?!1:xp.test(e)?lo[e]=!0:(no[e]=!0,!1)}function si(e,t,n){if(_p(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 Xt(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 Ep(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 $u(e){if(!e._valueTracker){var t=ao(e)?"checked":"value";e._valueTracker=Ep(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 Tp=/[\n"\\]/g;function gt(e){return e.replace(Tp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Wu(e,t,n,l,a,s,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+vt(t)):e.value!==""+vt(t)&&(e.value=""+vt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Fu(e,o,vt(t)):n!=null?Fu(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"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+vt(h):e.removeAttribute("name")}function uo(e,t,n,l,a,s,o,h){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){$u(e);return}n=n!=null?""+vt(n):"",t=t!=null?""+vt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),$u(e)}function Fu(e,t,n){t==="number"&&ri(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function fl(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),$u(e)}function hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ap=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||Ap.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 Pu(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 Cp=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"]]),Rp=/^[\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 Rp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Gt(){}var Iu=null;function es(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dl=null,ml=null;function fo(e){var t=cl(e);if(t&&(e=t.stateNode)){var n=e[et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Wu(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));Wu(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&&fl(e,!!n.multiple,t,!1)}}}var ts=!1;function ho(e,t,n){if(ts)return e(t,n);ts=!0;try{var l=e(t);return l}finally{if(ts=!1,(dl!==null||ml!==null)&&(Fi(),dl&&(t=dl,e=ml,ml=dl=null,fo(t),e)))for(t=0;t<e.length;t++)fo(e[t])}}function ea(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 Vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ns=!1;if(Vt)try{var ta={};Object.defineProperty(ta,"passive",{get:function(){ns=!0}}),window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch{ns=!1}var mn=null,ls=null,fi=null;function mo(){if(fi)return fi;var e,t=ls,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 h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(s):s[h]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?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),na=S({},Xn,{view:0,detail:0}),Np=tt(na),as,is,la,pi=S({},na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ss,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!==la&&(la&&e.type==="mousemove"?(as=e.screenX-la.screenX,is=e.screenY-la.screenY):is=as=0,la=e),as)},movementY:function(e){return"movementY"in e?e.movementY:is}}),yo=tt(pi),Op=S({},pi,{dataTransfer:0}),zp=tt(Op),Mp=S({},na,{relatedTarget:0}),us=tt(Mp),Dp=S({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),jp=tt(Dp),wp=S({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Up=tt(wp),Bp=S({},Xn,{data:0}),vo=tt(Bp),Lp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hp={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"},qp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qp[e])?!!t[e]:!1}function ss(){return Yp}var kp=S({},na,{key:function(e){if(e.key){var t=Lp[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"?Hp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ss,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}}),Xp=tt(kp),Gp=S({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),go=tt(Gp),Vp=S({},na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ss}),Qp=tt(Vp),Zp=S({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kp=tt(Zp),Jp=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}),$p=tt(Jp),Wp=S({},Xn,{newState:0,oldState:0}),Fp=tt(Wp),Pp=[9,13,27,32],cs=Vt&&"CompositionEvent"in window,aa=null;Vt&&"documentMode"in document&&(aa=document.documentMode);var Ip=Vt&&"TextEvent"in window&&!aa,bo=Vt&&(!cs||aa&&8<aa&&11>=aa),So=" ",xo=!1;function _o(e,t){switch(e){case"keyup":return Pp.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 pl=!1;function ey(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 ty(e,t){if(pl)return e==="compositionend"||!cs&&_o(e,t)?(e=mo(),fi=ls=mn=null,pl=!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 ny={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"?!!ny[e.type]:t==="textarea"}function Ao(e,t,n,l){dl?ml?ml.push(l):ml=[l]:dl=l,t=au(t,"onChange"),0<t.length&&(n=new mi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ia=null,ua=null;function ly(e){cd(e,0)}function yi(e){var t=Il(e);if(io(t))return e}function Co(e,t){if(e==="change")return t}var Ro=!1;if(Vt){var rs;if(Vt){var os="oninput"in document;if(!os){var No=document.createElement("div");No.setAttribute("oninput","return;"),os=typeof No.oninput=="function"}rs=os}else rs=!1;Ro=rs&&(!document.documentMode||9<document.documentMode)}function Oo(){ia&&(ia.detachEvent("onpropertychange",zo),ua=ia=null)}function zo(e){if(e.propertyName==="value"&&yi(ua)){var t=[];Ao(t,ua,e,es(e)),ho(ly,t)}}function ay(e,t,n){e==="focusin"?(Oo(),ia=t,ua=n,ia.attachEvent("onpropertychange",zo)):e==="focusout"&&Oo()}function iy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yi(ua)}function uy(e,t){if(e==="click")return yi(t)}function sy(e,t){if(e==="input"||e==="change")return yi(t)}function cy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ot=typeof Object.is=="function"?Object.is:cy;function sa(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(!ku.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 fs(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 ry=Vt&&"documentMode"in document&&11>=document.documentMode,yl=null,hs=null,ca=null,ds=!1;function Uo(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ds||yl==null||yl!==ri(l)||(l=yl,"selectionStart"in l&&fs(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}),ca&&sa(ca,l)||(ca=l,l=au(hs,"onSelect"),0<l.length&&(t=new mi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=yl)))}function Gn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vl={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")},ms={},Bo={};Vt&&(Bo=document.createElement("div").style,"AnimationEvent"in window||(delete vl.animationend.animation,delete vl.animationiteration.animation,delete vl.animationstart.animation),"TransitionEvent"in window||delete vl.transitionend.transition);function Vn(e){if(ms[e])return ms[e];if(!vl[e])return e;var t=vl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Bo)return ms[e]=t[n];return e}var Lo=Vn("animationend"),Ho=Vn("animationiteration"),qo=Vn("animationstart"),oy=Vn("transitionrun"),fy=Vn("transitionstart"),hy=Vn("transitioncancel"),Yo=Vn("transitionend"),ko=new Map,ps="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(" ");ps.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=[],gl=0,ys=0;function gi(){for(var e=gl,t=ys=gl=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[gl++]=e,bt[gl++]=t,bt[gl++]=n,bt[gl++]=l,ys|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function vs(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<za)throw za=0,Cc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bl={};function dy(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 dy(e,t,n,l)}function gs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qt(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")gs(e)&&(o=1);else if(typeof e=="string")o=g0(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 k:return Zn(n.children,a,s,t);case Y:o=8,a|=24;break;case L:return e=ft(12,n,t,a|2),e.elementType=L,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 Q:o=10;break e;case q:o=9;break e;case P: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 bs(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 Ss(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 Sl=[],xl=0,_i=null,ra=0,xt=[],_t=0,pn=null,wt=1,Ut="";function Zt(e,t){Sl[xl++]=ra,Sl[xl++]=_i,_i=e,ra=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 xs(e){e.return!==null&&(Zt(e,1),Zo(e,1,0))}function _s(e){for(;e===_i;)_i=Sl[--xl],Sl[xl]=null,ra=Sl[--xl],Sl[xl]=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,Es=Error(r(519));function vn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oa(St(t,e)),Es}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<Da.length;n++)ie(Da[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=Gt),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 _l(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")||kc(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=Zc,Zc=null,Ae=e):Ae=t):Ae=Ze?At(e.stateNode.nextSibling):null;return!0}function Kn(){Ae=Ze=null,ce=!1}function Ts(){var e=yn;return e!==null&&(it===null?it=e:it.push.apply(it,e),yn=null),e}function oa(e){yn===null?yn=[e]:yn.push(e)}var As=_(null),Jn=null,Kt=null;function gn(e,t,n){G(As,t._currentValue),t._currentValue=n}function Jt(e){e._currentValue=As.current,B(As)}function Cs(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 Rs(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){var o=a.child;s=s.firstContext;e:for(;s!==null;){var h=s;s=a;for(var g=0;g<t.length;g++)if(h.context===t[g]){s.lanes|=n,h=s.alternate,h!==null&&(h.lanes|=n),Cs(s.return,n,e),l||(o=null);break e}s=h.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(r(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Cs(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 El(e,t,n,l){e=null;for(var a=t,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(r(387));if(o=o.memoizedProps,o!==null){var h=a.type;ot(a.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}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(La):e=[La])}a=a.return}e!==null&&Rs(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,Kt=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},Kt===null){if(e===null)throw Error(r(308));Kt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kt=Kt.next=t;return n}var my=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()})}},py=u.unstable_scheduleCallback,yy=u.unstable_NormalPriority,Be={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ns(){return{controller:new my,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&py(yy,function(){e.controller.abort()})}var ha=null,Os=0,Tl=0,Al=null;function vy(e,t){if(ha===null){var n=ha=[];Os=0,Tl=Dc(),Al={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Os++,t.then(Fo,Fo),t}function Fo(){if(--Os===0&&ha!==null){Al!==null&&(Al.status="fulfilled");var e=ha;ha=null,Tl=0,Al=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gy(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Po=j.S;j.S=function(e,t){Bh=st(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&vy(e,t),Po!==null&&Po(e,t)};var Wn=_(null);function zs(){var e=Wn.current;return e!==null?e:Ee.pooledCache}function Ai(e,t){t===null?G(Wn,Wn.current):G(Wn,t.pool)}function Io(){var e=zs();return e===null?null:{parent:Be._currentValue,pool:e}}var Cl=Error(r(460)),Ms=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(Gt,Gt),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(Gt,Gt);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,Cl}}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,Cl):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===Cl||e===Ci)throw Error(r(483))}var Rl=null,da=0;function Ni(e){var t=da;return da+=1,Rl===null&&(Rl=[]),tf(Rl,e,t)}function ma(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=Qt(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 h(A,x,R,w){return x===null||x.tag!==6?(x=bs(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===k?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),ma(x,R),x.return=A,x):(x=xi(R.type,R.key,R.props,null,A.mode,w),ma(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=Ss(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=bs(""+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),ma(R,x),R.return=A,R;case H:return x=Ss(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===Q)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:h(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 H: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===Q)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,h(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 H: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===Q)return M(A,x,R,Ti(x,w),J);Oi(x,w)}return null}function V(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&&Zt(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&&Zt(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&&Zt(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&&Zt(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&&Zt(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(O0){return t(A,O0)}),ce&&Zt(A,ne),J}function Se(A,x,R,w){if(typeof R=="object"&&R!==null&&R.type===k&&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===k){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),ma(w,R),w.return=A,A=w;break e}n(A,x);break}else t(A,x);x=x.sibling}R.type===k?(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),ma(w,R),w.return=A,A=w)}return o(A);case H: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=Ss(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 V(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===Q)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=bs(R,A.mode,w),w.return=A,A=w),o(A)):n(A,x)}return function(A,x,R,w){try{da=0;var J=Se(A,x,R,w);return Rl=null,J}catch(K){if(K===Cl||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 Ds(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function js(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function 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 pa(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 ws(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 Us=!1;function ya(){if(Us){var e=Al;if(e!==null)throw e}}function va(e,t,n,l){Us=!1;var a=e.updateQueue;bn=!1;var s=a.firstBaseUpdate,o=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var g=h,N=g.next;g.next=null,o===null?s=N:o.next=N,o=g;var D=e.alternate;D!==null&&(D=D.updateQueue,h=D.lastBaseUpdate,h!==o&&(h===null?D.firstBaseUpdate=N:h.next=N,D.lastBaseUpdate=g))}if(s!==null){var U=a.baseState;o=0,D=N=g=null,h=s;do{var O=h.lane&-536870913,M=O!==h.lane;if(M?(ue&O)===O:(l&O)===O){O!==0&&O===Tl&&(Us=!0),D!==null&&(D=D.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var V=e,W=h;O=t;var Se=n;switch(W.tag){case 1:if(V=W.payload,typeof V=="function"){U=V.call(Se,U,O);break e}U=V;break e;case 3:V.flags=V.flags&-65537|128;case 0:if(V=W.payload,O=typeof V=="function"?V.call(Se,U,O):V,O==null)break e;U=S({},U,O);break e;case 2:bn=!0}}O=h.callback,O!==null&&(e.flags|=64,M&&(e.flags|=8192),M=a.callbacks,M===null?a.callbacks=[O]:M.push(O))}else M={lane:O,tag:h.tag,payload:h.payload,callback:h.callback,next:null},D===null?(N=D=M,g=U):D=D.next=M,o|=O;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;M=h,h=M.next,M.next=null,a.lastBaseUpdate=M,a.shared.pending=null}}while(!0);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 Nl=_(null),zi=_(0);function rf(e,t){e=ln,G(zi,e),G(Nl,t),ln=e|t.baseLanes}function Bs(){G(zi,ln),G(Nl,Nl.current)}function Ls(){ln=zi.current,B(Nl),B(zi)}var ht=_(null),Tt=null;function _n(e){var t=e.alternate;G(je,je.current&1),G(ht,e),Tt===null&&(t===null||Nl.current!==null||t.memoizedState!==null)&&(Tt=e)}function Hs(e){G(je,je.current),G(ht,e),Tt===null&&(Tt=e)}function of(e){e.tag===22?(G(je,je.current),G(ht,e),Tt===null&&(Tt=e)):En()}function En(){G(je,je.current),G(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||Vc(n)||Qc(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 $t=0,te=null,ge=null,Le=null,Di=!1,Ol=!1,el=!1,ji=0,ga=0,zl=null,by=0;function ze(){throw Error(r(321))}function qs(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 Ys(e,t,n,l,a,s){return $t=s,te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Kf:tc,el=!1,s=n(l,a),el=!1,Ol&&(s=hf(t,n,l,a)),ff(e),s}function ff(e){j.H=xa;var t=ge!==null&&ge.next!==null;if($t=0,Le=ge=te=null,Di=!1,ga=0,zl=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(Ol&&(zl=null),ga=0,Ol=!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(Ol);return s}function Sy(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?ba(t):t,e=e.useState()[0],(ge!==null?ge.memoizedState:null)!==e&&(te.flags|=1024),t}function ks(){var e=ji!==0;return ji=0,e}function Xs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Gs(e){if(Di){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Di=!1}$t=0,Le=ge=te=null,Ol=!1,ga=ji=0,zl=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 ba(e){var t=ga;return ga+=1,zl===null&&(zl=[]),e=tf(zl,e,t),t=te,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Kf:tc),e}function Ui(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ba(e);if(e.$$typeof===Q)return Ke(e)}throw Error(r(438,String(e)))}function Vs(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 Wt(e,t){return typeof t=="function"?t(e):t}function Bi(e){var t=we();return Qs(t,ge,e)}function Qs(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var a=e.baseQueue,s=l.pending;if(s!==null){if(a!==null){var o=a.next;a.next=s.next,s.next=o}t.baseQueue=a=s,l.pending=null}if(s=e.baseState,a===null)e.memoizedState=s;else{t=a.next;var h=o=null,g=null,N=t,D=!1;do{var U=N.lane&-536870913;if(U!==N.lane?(ue&U)===U:($t&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===Tl&&(D=!0);else if(($t&O)===O){N=N.next,O===Tl&&(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?(h=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?(h=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=h,!ot(s,e.memoizedState)&&(He=!0,D&&(n=Al,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 Zs(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,$s(yf.bind(null,l,a,e),[e]),a.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(l.flags|=2048,Ml(9,{destroy:void 0},pf.bind(null,l,a,n,t),null),Ee===null)throw Error(r(349));s||($t&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 Ks(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:Wt,lastRenderedState:e},t}function bf(e,t,n,l){return e.baseState=n,Qs(e,ge,typeof l=="function"?l:Wt)}function xy(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 h=n(a,l),g=j.S;g!==null&&g(o,h),xf(e,t,h)}catch(N){Js(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){Js(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 Js(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 Js(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=Ks(!1),s=ec.bind(null,te,!1,l.queue),l=Ie(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=xy.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=Qs(e,t,Tf)[0],e=Bi(Wt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ba(t)}catch(o){throw o===Cl?Ci:o}else l=t;t=we();var a=t.queue,s=a.dispatch;return n!==t.memoizedState&&(te.flags|=2048,Ml(9,{destroy:void 0},_y.bind(null,a,n),null)),[l,s,e]}function _y(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 Ml(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=Ml(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&&qs(l,ge.memoizedState.deps)?a.memoizedState=Ml(t,s,n,l):(te.flags|=e,a.memoizedState=Ml(1|t,s,n,l))}function zf(e,t){Li(8390656,8,e,t)}function $s(e,t){Hi(2048,8,e,t)}function Ey(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 Ey({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 Ws(){}function Bf(e,t){var n=we();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&qs(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&&qs(t,l[1]))return l[0];if(l=e(),el){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l}function Fs(e,t,n){return n===void 0||($t&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:Nl.current!==null?(e=Fs(e,n,l),ot(e,t)||(He=!0),e):($t&42)===0||($t&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=X.p;X.p=s!==0&&8>s?s:8;var o=j.T,h={};j.T=h,ec(e,!1,t,n);try{var g=a(),N=j.S;if(N!==null&&N(h,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var D=gy(g,l);Sa(e,t,D,yt(e))}else Sa(e,t,l,yt(e))}catch(U){Sa(e,t,{then:function(){},status:"rejected",reason:U},yt())}finally{X.p=s,o!==null&&h.types!==null&&(o.types=h.types),j.T=o}}function Ty(){}function Ps(e,t,n,l){if(e.tag!==5)throw Error(r(476));var a=Yf(e).queue;qf(e,a,t,F,n===null?Ty:function(){return kf(e),n(l)})}function Yf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,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),Sa(e,t.next.queue,{},yt())}function Is(){return Ke(La)}function Xf(){return we().memoizedState}function Gf(){return we().memoizedState}function Ay(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),pa(l,t,n)),t={cache:Ns()},e.payload=t;return}t=t.return}}function Cy(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=vs(e,t,n,l),n!==null&&(ut(n,e,l),Zf(n,t,l)))}function Vf(e,t,n){var l=yt();Sa(e,t,n,l)}function Sa(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,h=s(o,n);if(a.hasEagerState=!0,a.eagerState=h,ot(h,o))return bi(e,t,a,0),Ee===null&&gi(),!1}catch{}finally{}if(n=vs(e,t,a,l),n!==null)return ut(n,e,l),Zf(n,t,l),!0}return!1}function ec(e,t,n,l){if(l={lane:2,revertLane:Dc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},qi(e)){if(t)throw Error(r(479))}else t=vs(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){Ol=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 xa={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};xa.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=Cy.bind(null,te,e),[l.memoizedState,e]},useRef:function(e){var t=Ie();return e={current:e},t.memoizedState=e},useState:function(e){e=Ks(e);var t=e.queue,n=Vf.bind(null,te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ws,useDeferredValue:function(e,t){var n=Ie();return Fs(n,e,t)},useTransition:function(){var e=Ks(!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,Ml(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=by++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Is,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=ec.bind(null,te,!0,n),n.dispatch=t,[e,t]},useMemoCache:Vs,useCacheRefresh:function(){return Ie().memoizedState=Ay.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)}}},tc={readContext:Ke,use:Ui,useCallback:Bf,useContext:Ke,useEffect:$s,useImperativeHandle:Uf,useInsertionEffect:Df,useLayoutEffect:jf,useMemo:Lf,useReducer:Bi,useRef:Of,useState:function(){return Bi(Wt)},useDebugValue:Ws,useDeferredValue:function(e,t){var n=we();return Hf(n,ge.memoizedState,e,t)},useTransition:function(){var e=Bi(Wt)[0],t=we().memoizedState;return[typeof e=="boolean"?e:ba(e),t]},useSyncExternalStore:df,useId:Xf,useHostTransitionStatus:Is,useFormState:Cf,useActionState:Cf,useOptimistic:function(e,t){var n=we();return bf(n,ge,e,t)},useMemoCache:Vs,useCacheRefresh:Gf};tc.useEffectEvent=Mf;var Jf={readContext:Ke,use:Ui,useCallback:Bf,useContext:Ke,useEffect:$s,useImperativeHandle:Uf,useInsertionEffect:Df,useLayoutEffect:jf,useMemo:Lf,useReducer:Zs,useRef:Of,useState:function(){return Zs(Wt)},useDebugValue:Ws,useDeferredValue:function(e,t){var n=we();return ge===null?Fs(n,e,t):Hf(n,ge.memoizedState,e,t)},useTransition:function(){var e=Zs(Wt)[0],t=we().memoizedState;return[typeof e=="boolean"?e:ba(e),t]},useSyncExternalStore:df,useId:Xf,useHostTransitionStatus:Is,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:Vs,useCacheRefresh:Gf};Jf.useEffectEvent=Mf;function nc(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 lc={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),pa(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),pa(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),pa(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?!sa(n,l)||!sa(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&&lc.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 ac(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 h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Ry(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&El(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),Oc(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)),Oc(e,l,a)),!1}throw Error(r(435,n.tag))}return Oc(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!==Es&&(e=Error(r(422),{cause:l}),oa(St(e,n)))):(l!==Es&&(t=Error(r(423),{cause:l}),oa(St(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=St(l,n),a=ac(e.stateNode,l,a),ws(e,a),Me!==4&&(Me=2)),!1;var s=Error(r(520),{cause:l});if(s=St(s,n),Oa===null?Oa=[s]:Oa.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=ac(n.stateNode,l,e),ws(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),ws(n,a),!1}n=n.return}while(n!==null);return!1}var ic=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 h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return $n(t),l=Ys(e,t,n,o,s,a),h=ks(),e!==null&&!He?(Xs(e,t,a),Ft(e,t,a)):(ce&&h&&xs(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"&&!gs(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,!dc(e,a)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:sa,n(o,l)&&e.ref===t.ref)return Ft(e,t,a)}return t.flags|=1,e=Qt(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(sa(s,l)&&e.ref===t.ref)if(He=!1,t.pendingProps=l=s,dc(e,a))(e.flags&131072)!==0&&(He=!0);else return t.lanes=e.lanes,Ft(e,t,a)}return uc(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):Bs(),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),Bs(),En());return Je(e,t,a,n),t.child}function _a(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=zs();return s=s===null?null:{parent:Be._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&Ai(t,null),Bs(),of(t),e!==null&&El(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 Ny(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,_a(null,e);if(Hs(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(Hs(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||El(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),ic;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=Qt(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 uc(e,t,n,l,a){return $n(t),n=Ys(e,t,n,l,void 0,a),l=ks(),e!==null&&!He?(Xs(e,t,a),Ft(e,t,a)):(ce&&l&&xs(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=ks(),e!==null&&!He?(Xs(e,t,s),Ft(e,t,s)):(ce&&l&&xs(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=bl,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=lc,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},Ds(t),o=n.contextType,s.context=typeof o=="object"&&o!==null?Ke(o):bl,s.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(nc(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&&lc.enqueueReplaceState(s,s.state,null),va(t,l,s,a),ya(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){s=t.stateNode;var h=t.memoizedProps,g=tl(n,h);s.props=g;var N=s.context,D=n.contextType;o=bl,typeof D=="object"&&D!==null&&(o=Ke(D));var U=n.getDerivedStateFromProps;D=typeof U=="function"||typeof s.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,D||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(h||N!==o)&&Wf(t,s,l,o),bn=!1;var O=t.memoizedState;s.state=O,va(t,l,s,a),ya(),N=t.memoizedState,h||O!==N||bn?(typeof U=="function"&&(nc(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,js(e,t),o=t.memoizedProps,D=tl(n,o),s.props=D,U=t.pendingProps,O=s.context,N=n.contextType,g=bl,typeof N=="object"&&N!==null&&(g=Ke(N)),h=n.getDerivedStateFromProps,(N=typeof h=="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,va(t,l,s,a),ya();var M=t.memoizedState;o!==U||O!==M||bn||e!==null&&e.dependencies!==null&&Ei(e.dependencies)?(typeof h=="function"&&(nc(t,n,h,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=Ft(e,t,a),e}function fh(e,t,n,l){return Kn(),t.flags|=256,Je(e,t,n,l),t.child}var sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cc(e){return{baseLanes:e,cachePool:Io()}}function rc(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 Qc(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,a?(En(),a=t.mode,h=Gi({mode:"hidden",children:h},a),l=Zn(l,a,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=cc(n),l.childLanes=rc(e,o,n),t.memoizedState=sc,_a(null,l)):(_n(t),oc(t,h))}var g=e.memoizedState;if(g!==null&&(h=g.dehydrated,h!==null)){if(s)t.flags&256?(_n(t),t.flags&=-257,t=fc(e,t,n)):t.memoizedState!==null?(En(),t.child=e.child,t.flags|=128,t=null):(En(),h=l.fallback,a=t.mode,l=Gi({mode:"visible",children:l.children},a),h=Zn(h,a,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,In(t,e.child,null,n),l=t.child,l.memoizedState=cc(n),l.childLanes=rc(e,o,n),t.memoizedState=sc,t=_a(null,l));else if(_n(t),Qc(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var N=o.dgst;o=N,l=Error(r(419)),l.stack="",l.digest=o,oa({value:l,source:null,stack:null}),t=fc(e,t,n)}else if(He||El(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),ic;Vc(h)||Pi(),t=fc(e,t,n)}else Vc(h)?(t.flags|=192,t.child=e.child,t=null):(e=g.treeContext,Ae=At(h.nextSibling),Ze=t,ce=!0,yn=null,Et=!1,e!==null&&Ko(t,e),t=oc(t,l.children),t.flags|=4096);return t}return a?(En(),h=l.fallback,a=t.mode,g=e.child,N=g.sibling,l=Qt(g,{mode:"hidden",children:l.children}),l.subtreeFlags=g.subtreeFlags&65011712,N!==null?h=Qt(N,h):(h=Zn(h,a,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,_a(null,l),l=t.child,h=e.child.memoizedState,h===null?h=cc(n):(a=h.cachePool,a!==null?(g=Be._currentValue,a=a.parent!==g?{parent:g,pool:g}:a):a=Io(),h={baseLanes:h.baseLanes|n,cachePool:a}),l.memoizedState=h,l.childLanes=rc(e,o,n),t.memoizedState=sc,_a(e.child,l)):(_n(t),n=e.child,e=n.sibling,n=Qt(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 oc(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 fc(e,t,n){return In(t,e.child,null,n),e=oc(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),Cs(e.return,t,n)}function hc(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,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,G(je,o),Je(e,t,l,n),l=ce?ra:0,!h&&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),hc(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}hc(t,!0,n,null,s,l);break;case"together":hc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Ft(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(El(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=Qt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ei(e)))}function Oy(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:Jl(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,Hs(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=Ft(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||(El(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),G(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 Ft(e,t,n)}function ph(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)He=!0;else{if(!dc(e,n)&&(t.flags&128)===0)return He=!1,Oy(e,t,n);He=(e.flags&131072)!==0}else He=!1,ce&&(t.flags&1048576)!==0&&Zo(t,ra,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")gs(e)?(l=tl(e,l),t.tag=1,t=oh(null,t,e,l,n)):(t.tag=0,t=uc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===P){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=kt(e)||e,Error(r(306,t,""))}}return t;case 0:return uc(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,js(e,t),va(t,l,null,n);var o=t.memoizedState;if(l=o.cache,gn(t,Be,l),l!==s.cache&&Rs(t,[Be],n,!0),ya(),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),oa(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=Ft(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 Jl(t),e===null&&ce&&(l=t.stateNode=Ed(t.type,t.pendingProps,le.current),Ze=t,Et=!0,a=Ae,Mn(t.type)?(Zc=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=i0(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)),Jl(t),a=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,l=s.children,kc(a,s)?l=null:o!==null&&kc(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=Ys(e,t,Sy,null,null,n),La._currentValue=a),Xi(e,t),Je(e,t,l,n),t.child;case 6:return e===null&&ce&&((e=n=Ae)&&(n=u0(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 Ny(e,t,n);case 22:return uh(e,t,n,t.pendingProps);case 24:return $n(t),l=Ke(Be),e===null?(a=zs(),a===null&&(a=Ee,s=Ns(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:l,cache:a},Ds(t),gn(t,Be,a)):((e.lanes&n)!==0&&(js(e,t),va(t,null,null,n),ya()),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&&Rs(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 Pt(e){e.flags|=4}function mc(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,Ms}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,Ms}function Vi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Kr():536870912,e.lanes|=t,Ul|=t)}function Ea(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 zy(e,t,n){var l=t.pendingProps;switch(_s(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),Jt(Be),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(_l(t)?Pt(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ts())),Ce(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(Pt(t),s!==null?(Ce(t),yh(t,s)):(Ce(t),mc(t,a,null,l,n))):s?s!==e.memoizedState?(Pt(t),Ce(t),yh(t,s)):(Ce(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Pt(t),Ce(t),mc(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&&Pt(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ce(t),null}e=Z.current,_l(t)?Jo(t):(e=Ed(a,l,n),t.stateNode=e,Pt(t))}return Ce(t),null;case 5:if(ti(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Pt(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ce(t),null}if(s=Z.current,_l(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&&Pt(t)}}return Ce(t),mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Pt(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=le.current,_l(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=_l(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=Ts(),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=_l(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=Ts(),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&&Bc(t.stateNode.containerInfo),Ce(t),null;case 10:return Jt(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)Ea(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,Ea(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 G(je,je.current&1|2),ce&&Zt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&st()>$i&&(t.flags|=128,a=!0,Ea(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),Ea(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,Ea(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,G(je,a?n&1|2:n&1),ce&&Zt(t,l.treeForkCount),e):(Ce(t),null);case 22:case 23:return dt(t),Ls(),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),Jt(Be),Ce(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function My(e,t){switch(_s(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jt(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 Jt(t.type),null;case 22:case 23:return dt(t),Ls(),e!==null&&B(Wn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jt(Be),null;case 25:return null;default:return null}}function vh(e,t){switch(_s(t),t.tag){case 3:Jt(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:Jt(t.type);break;case 22:case 23:dt(t),Ls(),e!==null&&B(Wn);break;case 24:Jt(Be)}}function Ta(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var s=n.create,o=n.inst;l=s(),o.destroy=l}n=n.next}while(n!==a)}}catch(h){pe(t,t.return,h)}}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,h=o.destroy;if(h!==void 0){o.destroy=void 0,a=t;var g=n,N=h;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 Aa(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 pc(e,t,n){try{var l=e.stateNode;Iy(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 yc(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 vc(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=Gt));else if(l!==4&&(l===27&&Mn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(vc(e,t,n),e=e.sibling;e!==null;)vc(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 It=!1,qe=!1,gc=!1,Eh=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function Dy(e,t){if(e=e.containerInfo,qc=hu,e=wo(e),fs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,h=-1,g=-1,N=0,D=0,U=e,O=null;t:for(;;){for(var M;U!==n||a!==0&&U.nodeType!==3||(h=o+a),U!==s||l!==0&&U.nodeType!==3||(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&&(h=o),O===s&&++D===l&&(g=o),(M=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=M}n=h===-1||g===-1?null:{start:h,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yc={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 V=tl(n.type,a);e=l.getSnapshotBeforeUpdate(V,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)Gc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Gc(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:tn(e,n),l&4&&Ta(5,n);break;case 1:if(tn(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&&Aa(n,n.return);break;case 3:if(tn(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:tn(e,n),t===null&&l&4&&Sh(n),l&512&&Aa(n,n.return);break;case 12:tn(e,n);break;case 31:tn(e,n),l&4&&Rh(e,n);break;case 13:tn(e,n),l&4&&Nh(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ky.bind(null,n),s0(e,n))));break;case 22:if(l=n.memoizedState!==null||It,!l){t=t!==null&&t.memoizedState!==null||qe,a=It;var s=qe;It=l,(qe=t)&&!s?nn(e,n,(n.subtreeFlags&8772)!==0):tn(e,n),It=a,qe=s}break;case 30:break;default:tn(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&&Ju(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 en(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($l,n)}catch{}switch(n.tag){case 26:qe||Bt(n,t),en(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),en(e,t,n),wa(n.stateNode),Ne=l,nt=a;break;case 5:qe||Bt(n,t);case 6:if(l=Ne,a=nt,Ne=null,en(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),Gl(e)):gd(Ne,n.stateNode));break;case 4:l=Ne,a=nt,Ne=n.stateNode.containerInfo,nt=!0,en(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),en(e,t,n);break;case 1:qe||(Bt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&bh(n,t,l)),en(e,t,n);break;case 21:en(e,t,n);break;case 22:qe=(l=qe)||n.memoizedState!==null,en(e,t,n),qe=l;break;default:en(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{Gl(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{Gl(e)}catch(n){pe(t,t.return,n)}}function jy(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=jy(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Xy.bind(null,e,l);l.then(a,a)}})}function lt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],s=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Mn(h.type)){Ne=h.stateNode,nt=!1;break e}break;case 5:Ne=h.stateNode,nt=!1;break e;case 3:case 4:Ne=h.stateNode.containerInfo,nt=!0;break e}h=h.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),Ta(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&&It&&(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[Pl]||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 h=0;h<o.length;h++)if(s=o[h],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(h,1);break t}}s=a.createElement(l),$e(s,l,n),a.head.appendChild(s);break;case"meta":if(o=Od("meta","content",a).get(l+(n.content||""))){for(h=0;h<o.length;h++)if(s=o[h],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(h,1);break t}}s=a.createElement(l),$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&&pc(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&&pc(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{hl(a,"")}catch(V){pe(e,e.return,V)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,pc(e,a,n!==null?n.memoizedProps:a)),l&1024&&(gc=!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(V){pe(e,e.return,V)}}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{Gl(t.containerInfo)}catch(V){pe(e,e.return,V)}gc&&(gc=!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=It,D=qe;if(It=N||a,qe=D||g,lt(t,e),qe=D,It=N,at(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||g||It||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{h=g.stateNode;var U=g.memoizedProps.style,O=U!=null&&U.hasOwnProperty("display")?U.display:null;h.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(V){pe(g,g.return,V)}}}else if(t.tag===6){if(n===null){g=t;try{g.stateNode.nodeValue=a?"":g.memoizedProps}catch(V){pe(g,g.return,V)}}}else if(t.tag===18){if(n===null){g=t;try{var M=g.stateNode;a?bd(M,!0):bd(g.stateNode,!1)}catch(V){pe(g,g.return,V)}}}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=yc(e);Qi(e,s,a);break;case 5:var o=n.stateNode;n.flags&32&&(hl(o,""),n.flags&=-33);var h=yc(e);Qi(e,h,o);break;case 3:case 4:var g=n.stateNode.containerInfo,N=yc(e);vc(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 tn(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:wa(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 nn(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:nn(a,s,n),Ta(4,s);break;case 1:if(nn(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 h=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],h)}catch(N){pe(l,l.return,N)}}n&&o&64&&gh(s),Aa(s,s.return);break;case 27:_h(s);case 26:case 5:nn(a,s,n),n&&l===null&&o&4&&Sh(s),Aa(s,s.return);break;case 12:nn(a,s,n);break;case 31:nn(a,s,n),n&&o&4&&Rh(a,s);break;case 13:nn(a,s,n),n&&o&4&&Nh(a,s);break;case 22:s.memoizedState===null&&nn(a,s,n),Aa(s,s.return);break;case 30:break;default:nn(a,s,n)}t=t.sibling}}function bc(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&&fa(n))}function Sc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(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&&Ta(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&&fa(e)));break;case 12:if(a&2048){Mt(e,t,n,l),e=t.stateNode;try{var s=t.memoizedProps,o=s.id,h=s.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(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):Ca(e,t):s._visibility&2?Mt(e,t,n,l):(s._visibility|=2,Dl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&bc(o,t);break;case 24:Mt(e,t,n,l),a&2048&&Sc(t.alternate,t);break;default:Mt(e,t,n,l)}}function Dl(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,o=t,h=n,g=l,N=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(s,o,h,g,a),Ta(8,o);break;case 23:break;case 22:var D=o.stateNode;o.memoizedState!==null?D._visibility&2?Dl(s,o,h,g,a):Ca(s,o):(D._visibility|=2,Dl(s,o,h,g,a)),a&&N&2048&&bc(o.alternate,o);break;case 24:Dl(s,o,h,g,a),a&&N&2048&&Sc(o.alternate,o);break;default:Dl(s,o,h,g,a)}t=t.sibling}}function Ca(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:Ca(n,l),a&2048&&bc(l.alternate,l);break;case 24:Ca(n,l),a&2048&&Sc(l.alternate,l);break;default:Ca(n,l)}t=t.sibling}}var Ra=8192;function jl(e,t,n){if(e.subtreeFlags&Ra)for(e=e.child;e!==null;)Dh(e,t,n),e=e.sibling}function Dh(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Ra&&e.memoizedState!==null&&b0(n,zt,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var l=zt;zt=uu(e.stateNode.containerInfo),jl(e,t,n),zt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ra,Ra=16777216,jl(e,t,n),Ra=l):jl(e,t,n));break;default:jl(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 Na(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:Na(e),e.flags&2048&&Tn(9,e,e.return);break;case 3:Na(e);break;case 12:Na(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)):Na(e);break;default:Na(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:fa(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 wy={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}},Uy=typeof WeakMap=="function"?WeakMap:Map,he=0,Ee=null,ae=null,ue=0,me=0,mt=null,An=!1,wl=!1,xc=!1,ln=0,Me=0,Cn=0,ll=0,_c=0,pt=0,Ul=0,Oa=null,it=null,Ec=!1,Ji=0,Bh=0,$i=1/0,Wi=null,Rn=null,ke=0,Nn=null,Bl=null,an=0,Tc=0,Ac=null,Lh=null,za=0,Cc=null;function yt(){return(he&2)!==0&&ue!==0?ue&-ue:j.T!==null?Dc():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)&&(Ll(e,0),On(e,ue,pt,!1)),Fl(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||Wl(e,t),a=l?Hy(e,t):Nc(e,t,!0),s=l;do{if(a===0){wl&&!l&&On(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!By(n)){a=Nc(e,t,!1),s=!1;continue}if(a===2){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;a=Oa;var g=h.current.memoizedState.isDehydrated;if(g&&(Ll(h,o).flags|=256),o=Nc(h,o,!1),o!==2){if(xc&&!g){h.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){Ll(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;an=t,l.timeoutHandle=yd(Yh.bind(null,l,n,it,Wi,Ec,t,pt,ll,Ul,An,s,"Throttled",-0,0),a);break e}Yh(l,n,it,Wi,Ec,t,pt,ll,Ul,An,s,null,-0,0)}}break}while(!0);Lt(e)}function Yh(e,t,n,l,a,s,o,h,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:Gt},Dh(t,s,U);var V=(s&62914560)===s?Ji-st():(s&4194048)===s?Bh-st():0;if(V=S0(U,V),V!==null){an=s,e.cancelPendingCommit=V(Jh.bind(null,e,t,s,n,l,a,o,h,g,D,U,null,O,M)),On(e,s,o,!N);return}}Jh(e,t,s,n,l,a,o,h,g)}function By(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&=~_c,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?(Ma(0),!1):!0}function Rc(){if(ae!==null){if(me===0)var e=ae.return;else e=ae,Kt=Jn=null,Gs(e),Rl=null,da=0,e=ae;for(;e!==null;)vh(e.alternate,e),e=e.return;ae=null}}function Ll(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,n0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),an=0,Rc(),Ee=e,ae=n=Qt(e.current,null),ue=t,me=0,mt=null,An=!1,wl=Wl(e,t),xc=!1,Ul=pt=_c=ll=Cn=Me=0,it=Oa=null,Ec=!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 ln=t,gi(),n}function kh(e,t){te=null,j.H=xa,t===Cl||t===Ci?(t=nf(),me=3):t===Ms?(t=nf(),me=4):me=t===ic?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=xa,e===null?xa:e}function Vh(){var e=j.A;return j.A=wy,e}function Pi(){Me=4,An||(ue&4194048)!==ue&&ht.current!==null||(wl=!0),(Cn&134217727)===0&&(ll&134217727)===0||Ee===null||On(Ee,ue,pt,!1)}function Nc(e,t,n){var l=he;he|=2;var a=Gh(),s=Vh();(Ee!==e||ue!==t)&&(Wi=null,Ll(e,t)),t=!1;var o=Me;e:do try{if(me!==0&&ae!==null){var h=ae,g=mt;switch(me){case 8:Rc(),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,Hl(e,h,g,N),n&&wl){o=0;break e}break;default:N=me,me=0,mt=null,Hl(e,h,g,N)}}Ly(),o=Me;break}catch(D){kh(e,D)}while(!0);return t&&e.shellSuspendCounter++,Kt=Jn=null,he=l,j.H=a,j.A=s,ae===null&&(Ee=null,ue=0,gi()),o}function Ly(){for(;ae!==null;)Qh(ae)}function Hy(e,t){var n=he;he|=2;var l=Gh(),a=Vh();Ee!==e||ue!==t?(Wi=null,$i=st()+500,Ll(e,t)):wl=Wl(e,t);e:do try{if(me!==0&&ae!==null){t=ae;var s=mt;t:switch(me){case 1:me=0,mt=null,Hl(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,Hl(e,t,s,7));break;case 5:var o=null;switch(ae.tag){case 26:o=ae.memoizedState;case 5:case 27:var h=ae;if(o?Md(o):h.stateNode.complete){me=0,mt=null;var g=h.sibling;if(g!==null)ae=g;else{var N=h.return;N!==null?(ae=N,Ii(N)):ae=null}break t}}me=0,mt=null,Hl(e,t,s,5);break;case 6:me=0,mt=null,Hl(e,t,s,6);break;case 8:Rc(),Me=6;break e;default:throw Error(r(462))}}qy();break}catch(D){kh(e,D)}while(!0);return Kt=Jn=null,j.H=l,j.A=a,he=n,ae!==null?0:(Ee=null,ue=0,gi(),Me)}function qy(){for(;ae!==null&&!cp();)Qh(ae)}function Qh(e){var t=ph(e.alternate,e,ln);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:Gs(t);default:vh(n,t),t=ae=Go(t,ln),t=ph(n,t,ln)}e.memoizedProps=e.pendingProps,t===null?Ii(e):ae=t}function Hl(e,t,n,l){Kt=Jn=null,Gs(t),Rl=null,da=0;var a=t.return;try{if(Ry(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:wl||(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=zy(t.alternate,t,ln);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=My(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,h,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|=ys,gp(e,n,s,o,h,g),e===Ee&&(ae=Ee=null,ue=0),Bl=t,Nn=e,an=n,Tc=s,Ac=a,Lh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Gy(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=X.p,X.p=2,o=he,he|=4;try{Dy(e,t,n)}finally{he=o,X.p=a,j.T=l}}ke=1,$h(),Wh(),Fh()}}function $h(){if(ke===1){ke=0;var e=Nn,t=Bl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=j.T,j.T=null;var l=X.p;X.p=2;var a=he;he|=4;try{Oh(t,e);var s=Yc,o=wo(e.containerInfo),h=s.focusedElem,g=s.selectionRange;if(o!==h&&h&&h.ownerDocument&&jo(h.ownerDocument.documentElement,h)){if(g!==null&&fs(h)){var N=g.start,D=g.end;if(D===void 0&&(D=N),"selectionStart"in h)h.selectionStart=N,h.selectionEnd=Math.min(D,h.value.length);else{var U=h.ownerDocument||document,O=U&&U.defaultView||window;if(O.getSelection){var M=O.getSelection(),V=h.textContent.length,W=Math.min(g.start,V),Se=g.end===void 0?W:Math.min(g.end,V);!M.extend&&W>Se&&(o=Se,Se=W,W=o);var A=Do(h,W),x=Do(h,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=h;M=M.parentNode;)M.nodeType===1&&U.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<U.length;h++){var w=U[h];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}hu=!!qc,Yc=qc=null}finally{he=a,X.p=l,j.T=n}}e.current=t,ke=2}}function Wh(){if(ke===2){ke=0;var e=Nn,t=Bl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=j.T,j.T=null;var l=X.p;X.p=2;var a=he;he|=4;try{Th(e,t.alternate,t)}finally{he=a,X.p=l,j.T=n}}ke=3}}function Fh(){if(ke===4||ke===3){ke=0,rp();var e=Nn,t=Bl,n=an,l=Lh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ke=5:(ke=0,Bl=Nn=null,Ph(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Rn=null),Zu(n),t=t.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot($l,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=j.T,a=X.p,X.p=2,j.T=null;try{for(var s=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];s(h.value,{componentStack:h.stack})}}finally{j.T=t,X.p=a}}(an&3)!==0&&eu(),Lt(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===Cc?za++:(za=0,Cc=e):za=0,Ma(0)}}function Ph(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function eu(){return $h(),Wh(),Fh(),Ih()}function Ih(){if(ke!==5)return!1;var e=Nn,t=Tc;Tc=0;var n=Zu(an),l=j.T,a=X.p;try{X.p=32>n?32:n,j.T=null,n=Ac,Ac=null;var s=Nn,o=an;if(ke=0,Bl=Nn=null,an=0,(he&6)!==0)throw Error(r(331));var h=he;if(he|=4,wh(s.current),Mh(s,s.current,o,n),he=h,Ma(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot($l,s)}catch{}return!0}finally{X.p=a,j.T=l,Ph(e,t)}}function ed(e,t,n){t=St(n,t),t=ac(e.stateNode,t,2),e=xn(e,t,2),e!==null&&(Fl(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),Fl(l,2),Lt(l));break}}t=t.return}}function Oc(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Uy;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)||(xc=!0,a.add(n),e=Yy.bind(null,e,t,n),t.then(e,e))}function Yy(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&&Ll(e,0):_c|=n,Ul===ue&&(Ul=0)),Lt(e)}function td(e,t){t===0&&(t=Kr()),e=Qn(e,t),e!==null&&(Fl(e,t),Lt(e))}function ky(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function Xy(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 Gy(e,t){return Xu(e,t)}var tu=null,ql=null,zc=!1,nu=!1,Mc=!1,zn=0;function Lt(e){e!==ql&&e.next===null&&(ql===null?tu=ql=e:ql=ql.next=e),nu=!0,zc||(zc=!0,Qy())}function Ma(e,t){if(!Mc&&nu){Mc=!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,h=l.pingedLanes;s=(1<<31-rt(42|e)+1)-1,s&=a&~(o&~h),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||Wl(l,s)||(n=!0,id(l,s));l=l.next}while(n);Mc=!1}}function Vy(){nd()}function nd(){nu=zc=!1;var e=0;zn!==0&&t0()&&(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&&(ql=n)):(n=l,(e!==0||(s&3)!==0)&&(nu=!0)),l=a}ke!==0&&ke!==5||Ma(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),h=1<<o,g=a[o];g===-1?((h&n)===0||(h&l)!==0)&&(a[o]=vp(h,t)):g<=t&&(e.expiredLanes|=h),s&=~h}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&&Gu(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Wl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Gu(l),Zu(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=Xu(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Gu(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 Qy(){l0(function(){(he&6)!==0?Xu(Vr,Vy):nd()})}function Dc(){if(zn===0){var e=Tl;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 Zy(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 h=new mi("action","action",null,l,a);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(zn!==0){var g=o?sd(a,o):new FormData(a);Ps(n,{pending:!0,data:g,method:a.method,action:s},null,g)}}else typeof s=="function"&&(h.preventDefault(),g=o?sd(a,o):new FormData(a),Ps(n,{pending:!0,data:g,method:a.method,action:s},s,g))},currentTarget:a}]})}}for(var jc=0;jc<ps.length;jc++){var wc=ps[jc],Ky=wc.toLowerCase(),Jy=wc[0].toUpperCase()+wc.slice(1);Ot(Ky,"on"+Jy)}Ot(Lo,"onAnimationEnd"),Ot(Ho,"onAnimationIteration"),Ot(qo,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(oy,"onTransitionRun"),Ot(fy,"onTransitionStart"),Ot(hy,"onTransitionCancel"),Ot(Yo,"onTransitionEnd"),ol("onMouseEnter",["mouseout","mouseover"]),ol("onMouseLeave",["mouseout","mouseover"]),ol("onPointerEnter",["pointerout","pointerover"]),ol("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 Da="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(" "),$y=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Da));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 h=l[o],g=h.instance,N=h.currentTarget;if(h=h.listener,g!==s&&a.isPropagationStopped())break e;s=h,a.currentTarget=N;try{s(a)}catch(D){vi(D)}a.currentTarget=null,s=g}else for(o=0;o<l.length;o++){if(h=l[o],g=h.instance,N=h.currentTarget,h=h.listener,g!==s&&a.isPropagationStopped())break e;s=h,a.currentTarget=N;try{s(a)}catch(D){vi(D)}a.currentTarget=null,s=g}}}}function ie(e,t){var n=t[Ku];n===void 0&&(n=t[Ku]=new Set);var l=e+"__bubble";n.has(l)||(rd(t,e,2,!1),n.add(l))}function Uc(e,t,n){var l=0;t&&(l|=4),rd(n,e,l,t)}var lu="_reactListening"+Math.random().toString(36).slice(2);function Bc(e){if(!e[lu]){e[lu]=!0,eo.forEach(function(n){n!=="selectionchange"&&($y.has(n)||Uc(n,!1,e),Uc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[lu]||(t[lu]=!0,Uc("selectionchange",!1,t))}}function rd(e,t,n,l){switch(Hd(t)){case 2:var a=E0;break;case 8:a=T0;break;default:a=Fc}n=a.bind(null,t,n,e),a=void 0,!ns||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 Lc(e,t,n,l,a){var s=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===a)break;if(o===4)for(o=l.return;o!==null;){var g=o.tag;if((g===3||g===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;h!==null;){if(o=sl(h),o===null)return;if(g=o.tag,g===5||g===6||g===26||g===27){l=s=o;continue e}h=h.parentNode}}l=l.return}ho(function(){var N=s,D=es(n),U=[];e:{var O=ko.get(e);if(O!==void 0){var M=mi,V=e;switch(e){case"keypress":if(hi(n)===0)break e;case"keydown":case"keyup":M=Xp;break;case"focusin":V="focus",M=us;break;case"focusout":V="blur",M=us;break;case"beforeblur":case"afterblur":M=us;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=zp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Qp;break;case Lo:case Ho:case qo:M=jp;break;case Yo:M=Kp;break;case"scroll":case"scrollend":M=Np;break;case"wheel":M=$p;break;case"copy":case"cut":case"paste":M=Up;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=Fp}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=ea(x,A),w!=null&&W.push(ja(x,w,R))),Se)break;x=x.return}0<W.length&&(O=new M(O,V,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!==Iu&&(V=n.relatedTarget||n.fromElement)&&(sl(V)||V[ul]))break e;if((M||O)&&(O=D.window===D?D:(O=D.ownerDocument)?O.defaultView||O.parentWindow:window,M?(V=n.relatedTarget||n.toElement,M=N,V=V?sl(V):null,V!==null&&(Se=d(V),W=V.tag,V!==Se||W!==5&&W!==27&&W!==6)&&(V=null)):(M=null,V=N),M!==V)){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:Il(M),R=V==null?O:Il(V),O=new W(w,x+"leave",M,n,D),O.target=Se,O.relatedTarget=R,w=null,sl(D)===N&&(W=new W(A,x+"enter",V,n,D),W.target=R,W.relatedTarget=Se,w=W),Se=w,M&&V)t:{for(W=Wy,A=M,x=V,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),V!==null&&Se!==null&&od(U,Se,V,W,!0)}}e:{if(O=N?Il(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=sy;else{oe=iy;var K=ay}else M=O.nodeName,!M||M.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?N&&Pu(N.elementType)&&(oe=Co):oe=uy;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&&Fu(O,"number",O.value)}switch(K=N?Il(N):window,e){case"focusin":(To(K)||K.contentEditable==="true")&&(yl=K,hs=N,ca=null);break;case"focusout":ca=hs=yl=null;break;case"mousedown":ds=!0;break;case"contextmenu":case"mouseup":case"dragend":ds=!1,Uo(U,n,D);break;case"selectionchange":if(ry)break;case"keydown":case"keyup":Uo(U,n,D)}var ne;if(cs)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 pl?_o(e,n)&&(se="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(se="onCompositionStart");se&&(bo&&n.locale!=="ko"&&(pl||se!=="onCompositionStart"?se==="onCompositionEnd"&&pl&&(ne=mo()):(mn=D,ls="value"in mn?mn.value:mn.textContent,pl=!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=Ip?ey(e,n):ty(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)),Zy(U,e,N,n,D)}cd(U,t)})}function ja(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=ea(e,n),a!=null&&l.unshift(ja(e,a,s)),a=ea(e,t),a!=null&&l.push(ja(e,a,s))),e.tag===3)return l;e=e.return}return[]}function Wy(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 h=n,g=h.alternate,N=h.stateNode;if(h=h.tag,g!==null&&g===l)break;h!==5&&h!==26&&h!==27||N===null||(g=N,a?(N=ea(n,s),N!=null&&o.unshift(ja(n,N,g))):a||(N=ea(n,s),N!=null&&o.push(ja(n,N,g)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Fy=/\r\n?/g,Py=/\u0000|\uFFFD/g;function fd(e){return(typeof e=="string"?e:""+e).replace(Fy,`
|
||
`).replace(Py,"")}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===""||hl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&hl(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=Gt);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":Xt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Xt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Xt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Xt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Xt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Xt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Xt(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=Cp.get(n)||n,si(e,n,l))}}function Hc(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"?hl(e,l):(typeof l=="number"||typeof l=="bigint")&&hl(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=Gt);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 h=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":h=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,h,g,N,o,a,!1);return;case"select":ie("invalid",e),l=o=s=null;for(a in n)if(n.hasOwnProperty(a)&&(h=n[a],h!=null))switch(a){case"value":s=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:be(e,t,a,h,n,null)}t=s,n=o,e.multiple=!!l,t!=null?fl(e,!!l,t,!1):n!=null&&fl(e,!!l,n,!0);return;case"textarea":ie("invalid",e),s=a=l=null;for(o in n)if(n.hasOwnProperty(o)&&(h=n[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":a=h;break;case"children":s=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:be(e,t,o,h,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<Da.length;l++)ie(Da[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(Pu(t)){for(D in n)n.hasOwnProperty(D)&&(l=n[D],l!==void 0&&Hc(e,t,D,l,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(l=n[h],l!=null&&be(e,t,h,l,n,null))}function Iy(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,s=null,o=null,h=null,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":h=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)}}Wu(e,o,h,g,N,D,s,a);return;case"select":M=o=h=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":h=s;break;case"multiple":o=s;default:s!==g&&be(e,t,a,s,l,g)}t=h,n=o,l=M,O!=null?fl(e,!!n,O,!1):!!l!=!!n&&(t!=null?fl(e,!!n,t,!0):fl(e,!!n,n?[]:"",!1));return;case"textarea":M=O=null;for(h in n)if(a=n[h],n.hasOwnProperty(h)&&a!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:be(e,t,h,null,l,a)}for(o in l)if(a=l[o],s=n[o],l.hasOwnProperty(o)&&(a!=null||s!=null))switch(o){case"value":O=a;break;case"defaultValue":M=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(r(91));break;default:a!==s&&be(e,t,o,a,l,s)}so(e,O,M);return;case"option":for(var V in n)if(O=n[V],n.hasOwnProperty(V)&&O!=null&&!l.hasOwnProperty(V))switch(V){case"selected":e.selected=!1;break;default:be(e,t,V,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(Pu(t)){for(var Se in n)O=n[Se],n.hasOwnProperty(Se)&&O!==void 0&&!l.hasOwnProperty(Se)&&Hc(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||Hc(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 e0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],s=a.transferSize,o=a.initiatorType,h=a.duration;if(s&&h&&dd(o)){for(o=0,h=a.responseEnd,l+=1;l<n.length;l++){var g=n[l],N=g.startTime;if(N>h)break;var D=g.transferSize,U=g.initiatorType;D&&dd(U)&&(g=g.responseEnd,o+=D*(g<h?1:(h-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 qc=null,Yc=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 kc(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 Xc=null;function t0(){var e=window.event;return e&&e.type==="popstate"?e===Xc?!1:(Xc=e,!0):(Xc=null,!1)}var yd=typeof setTimeout=="function"?setTimeout:void 0,n0=typeof clearTimeout=="function"?clearTimeout:void 0,vd=typeof Promise=="function"?Promise:void 0,l0=typeof queueMicrotask=="function"?queueMicrotask:typeof vd<"u"?function(e){return vd.resolve(null).then(e).catch(a0)}:yd;function a0(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),Gl(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")wa(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,wa(n);for(var s=n.firstChild;s;){var o=s.nextSibling,h=s.nodeName;s[Pl]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=o}}else n==="body"&&wa(e.ownerDocument.body);n=a}while(n);Gl(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 Gc(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":Gc(n),Ju(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function i0(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[Pl])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 u0(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 Vc(e){return e.data==="$?"||e.data==="$~"}function Qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function s0(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 Zc=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 wa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ju(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 un=X.d;X.d={f:c0,r:r0,D:o0,C:f0,L:h0,m:d0,X:p0,S:m0,M:y0};function c0(){var e=un.f(),t=Fi();return e||t}function r0(e){var t=cl(e);t!==null&&t.tag===5&&t.type==="form"?kf(t):un.r(e)}var Yl=typeof document>"u"?null:document;function Ad(e,t,n){var l=Yl;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 o0(e){un.D(e),Ad("dns-prefetch",e,null)}function f0(e,t){un.C(e,t),Ad("preconnect",e,t)}function h0(e,t,n){un.L(e,t,n);var l=Yl;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=kl(e);break;case"script":s=Xl(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(Ua(s))||t==="script"&&l.querySelector(Ba(s))||(t=l.createElement("link"),$e(t,"link",e),Ge(t),l.head.appendChild(t)))}}function d0(e,t){un.m(e,t);var n=Yl;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=Xl(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(Ba(s)))return}l=n.createElement("link"),$e(l,"link",e),Ge(l),n.head.appendChild(l)}}}function m0(e,t,n){un.S(e,t,n);var l=Yl;if(l&&e){var a=rl(l).hoistableStyles,s=kl(e);t=t||"default";var o=a.get(s);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(Ua(s)))h.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ct.get(s))&&Kc(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(){h.loading|=1}),g.addEventListener("error",function(){h.loading|=2}),h.loading|=4,su(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},a.set(s,o)}}}function p0(e,t){un.X(e,t);var n=Yl;if(n&&e){var l=rl(n).hoistableScripts,a=Xl(e),s=l.get(a);s||(s=n.querySelector(Ba(a)),s||(e=S({src:e,async:!0},t),(t=Ct.get(a))&&Jc(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 y0(e,t){un.M(e,t);var n=Yl;if(n&&e){var l=rl(n).hoistableScripts,a=Xl(e),s=l.get(a);s||(s=n.querySelector(Ba(a)),s||(e=S({src:e,async:!0,type:"module"},t),(t=Ct.get(a))&&Jc(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=kl(n.href),n=rl(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=kl(n.href);var s=rl(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(Ua(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||v0(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=Xl(n),n=rl(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 kl(e){return'href="'+gt(e)+'"'}function Ua(e){return'link[rel="stylesheet"]['+e+"]"}function Rd(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function v0(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 Xl(e){return'[src="'+gt(e)+'"]'}function Ba(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=kl(n.href);var s=e.querySelector(Ua(a));if(s)return t.state.loading|=4,t.instance=s,Ge(s),s;l=Rd(n),(a=Ct.get(a))&&Kc(l,a),s=(e.ownerDocument||e).createElement("link"),Ge(s);var o=s;return o._p=new Promise(function(h,g){o.onload=h,o.onerror=g}),$e(s,"link",l),t.state.loading|=4,su(s,n.precedence,e),t.instance=s;case"script":return s=Xl(n.src),(a=e.querySelector(Ba(s)))?(t.instance=a,Ge(a),a):(l=n,(a=Ct.get(s))&&(l=S({},n),Jc(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 h=l[o];if(h.dataset.precedence===t)s=h;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Kc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Jc(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[Pl]||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 h=l.get(o);h?h.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 g0(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 b0(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=kl(l.href),s=t.querySelector(Ua(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))&&Kc(l,a),s=s.createElement("link"),Ge(s);var o=s;o._p=new Promise(function(h,g){o.onload=h,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 $c=0;function S0(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&&$c===0&&($c=62500*e0());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>$c?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(x0,e),ou=null,ru.call(e))}function x0(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 La={$$typeof:Q,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function _0(e,t,n,l,a,s,o,h,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=Vu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vu(0),this.hiddenUpdates=Vu(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,h,g,N,D,U){return e=new _0(e,t,n,o,g,N,D,U,h),t=1,s===!0&&(t|=24),s=ft(3,null,null,t),e.current=s,s.stateNode=e,t=Ns(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:n,cache:t},Ds(s),e}function jd(e){return e?(e=bl,e):bl}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),pa(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 Wc(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),Wc(e,67108864)}}function Ld(e){if(e.tag===13||e.tag===31){var t=yt();t=Qu(t);var n=Qn(e,t);n!==null&&ut(n,e,t),Wc(e,t)}}var hu=!0;function E0(e,t,n,l){var a=j.T;j.T=null;var s=X.p;try{X.p=2,Fc(e,t,n,l)}finally{X.p=s,j.T=a}}function T0(e,t,n,l){var a=j.T;j.T=null;var s=X.p;try{X.p=8,Fc(e,t,n,l)}finally{X.p=s,j.T=a}}function Fc(e,t,n,l){if(hu){var a=Pc(l);if(a===null)Lc(e,t,l,du,n),qd(e,l);else if(C0(a,e,t,n,l))l.stopPropagation();else if(qd(e,l),t&4&&-1<A0.indexOf(e)){for(;a!==null;){var s=cl(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var o=Yn(s.pendingLanes);if(o!==0){var h=s;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var g=1<<31-rt(o);h.entanglements[1]|=g,o&=~g}Lt(s),(he&6)===0&&($i=st()+500,Ma(0))}}break;case 31:case 13:h=Qn(s,2),h!==null&&ut(h,s,2),Fi(),Wc(s,2)}if(s=Pc(l),s===null&&Lc(e,t,l,du,n),s===a)break;a=s}a!==null&&l.stopPropagation()}else Lc(e,t,l,null,n)}}function Pc(e){return e=es(e),Ic(e)}var du=null;function Ic(e){if(du=null,e=sl(e),e!==null){var t=d(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(op()){case Vr:return 2;case Qr:return 8;case ni:case fp:return 32;case Zr:return 268435456;default:return 32}default:return 32}}var er=!1,Dn=null,jn=null,wn=null,Ha=new Map,qa=new Map,Un=[],A0="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":Ha.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qa.delete(t.pointerId)}}function Ya(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=cl(t),t!==null&&Bd(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function C0(e,t,n,l,a){switch(t){case"focusin":return Dn=Ya(Dn,e,t,n,l,a),!0;case"dragenter":return jn=Ya(jn,e,t,n,l,a),!0;case"mouseover":return wn=Ya(wn,e,t,n,l,a),!0;case"pointerover":var s=a.pointerId;return Ha.set(s,Ya(Ha.get(s)||null,e,t,n,l,a)),!0;case"gotpointercapture":return s=a.pointerId,qa.set(s,Ya(qa.get(s)||null,e,t,n,l,a)),!0}return!1}function Yd(e){var t=sl(e.target);if(t!==null){var n=d(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=Pc(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Iu=l,n.target.dispatchEvent(l),Iu=null}else return t=cl(n),t!==null&&Bd(t),e.blockedOn=n,!1;t.shift()}return!0}function kd(e,t,n){mu(e)&&n.delete(t)}function R0(){er=!1,Dn!==null&&mu(Dn)&&(Dn=null),jn!==null&&mu(jn)&&(jn=null),wn!==null&&mu(wn)&&(wn=null),Ha.forEach(kd),qa.forEach(kd)}function pu(e,t){e.blockedOn===t&&(e.blockedOn=null,er||(er=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,R0)))}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(Ic(l||n)===null)continue;break}var s=cl(n);s!==null&&(e.splice(t,3),t-=3,Ps(s,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Gl(e){function t(g){return pu(g,e)}Dn!==null&&pu(Dn,e),jn!==null&&pu(jn,e),wn!==null&&pu(wn,e),Ha.forEach(t),qa.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 h=null;if(s&&s.hasAttribute("formAction")){if(a=s,o=s[et]||null)h=o.formAction;else if(Ic(a)!==null)continue}else h=o.action;typeof h=="function"?n[l+1]=h:(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 tr(e){this._internalRoot=e}vu.prototype.render=tr.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=tr.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[ul]=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"));X.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 N0={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{$l=gu.inject(N0),ct=gu}catch{}}return Xa.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[ul]=t.current,Bc(e),new tr(t)},Xa.hydrateRoot=function(e,t,n){if(!f(e))throw Error(r(299));var l=!1,a="",s=Ff,o=Pf,h=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&&(h=n.onRecoverableError),n.formState!==void 0&&(g=n.formState)),t=Dd(e,1,!0,t,n??null,l,a,g,s,o,h,Gd),t.context=jd(null),n=t.current,l=yt(),l=Qu(l),a=Sn(l),a.callback=null,xn(n,a,l),n=l,t.current.lanes=n,Fl(t,n),Lt(t),e[ul]=t.current,Bc(e),new vu(t)},Xa.version="19.2.0",Xa}var em;function H0(){if(em)return ar.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(),ar.exports=L0(),ar.exports}var q0=H0();var tm="popstate";function Y0(u={}){function i(r,f){let{pathname:d,search:m,hash:b}=r.location;return pr("",{pathname:d,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 X0(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 k0(){return Math.random().toString(36).substring(2,10)}function nm(u,i){return{usr:u.state,key:u.key,idx:i}}function pr(u,i,c=null,r){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof i=="string"?Ql(i):i,state:c,key:i&&i.key||r||k0()}}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 Ql(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 X0(u,i,c,r={}){let{window:f=document.defaultView,v5Compat:d=!1}=r,m=f.history,b="POP",p=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 Y=T(),L=Y==null?null:Y-v;v=Y,p&&p({action:b,location:k.location,delta:L})}function C(Y,L){b="PUSH";let q=pr(k.location,Y,L);v=T()+1;let Q=nm(q,v),P=k.createHref(q);try{m.pushState(Q,"",P)}catch(ye){if(ye instanceof DOMException&&ye.name==="DataCloneError")throw ye;f.location.assign(P)}d&&p&&p({action:b,location:k.location,delta:1})}function z(Y,L){b="REPLACE";let q=pr(k.location,Y,L);v=T();let Q=nm(q,v),P=k.createHref(q);m.replaceState(Q,"",P),d&&p&&p({action:b,location:k.location,delta:0})}function H(Y){return G0(Y)}let k={get action(){return b},get location(){return u(f,m)},listen(Y){if(p)throw new Error("A history only accepts one active listener");return f.addEventListener(tm,S),p=Y,()=>{f.removeEventListener(tm,S),p=null}},createHref(Y){return i(f,Y)},createURL:H,encodeLocation(Y){let L=H(Y);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:C,replace:z,go(Y){return m.go(Y)}};return k}function G0(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 V0(u,i,c,!1)}function V0(u,i,c,r){let f=typeof i=="string"?Ql(i):i,d=rn(f.pathname||"/",c);if(d==null)return null;let m=_m(u);Q0(m);let b=null;for(let p=0;b==null&&p<m.length;++p){let v=nv(d);b=ev(m[p],v,r)}return b}function _m(u,i=[],c=[],r="",f=!1){let d=(m,b,p=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)&&p)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=cn([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,p)),!(m.path==null&&!m.index)&&i.push({path:S,score:P0(S,m.index),routesMeta:C})};return u.forEach((m,b)=>{if(m.path===""||!m.path?.includes("?"))d(m,b);else for(let p of Em(m.path))d(m,b,!0,p)}),i}function Em(u){let i=u.split("/");if(i.length===0)return[];let[c,...r]=i,f=c.endsWith("?"),d=c.replace(/\?$/,"");if(r.length===0)return f?[d,""]:[d];let m=Em(r.join("/")),b=[];return b.push(...m.map(p=>p===""?d:[d,p].join("/"))),f&&b.push(...m),b.map(p=>u.startsWith("/")&&p===""?"/":p)}function Q0(u){u.sort((i,c)=>i.score!==c.score?c.score-i.score:I0(i.routesMeta.map(r=>r.childrenIndex),c.routesMeta.map(r=>r.childrenIndex)))}var Z0=/^:[\w-]+$/,K0=3,J0=2,$0=1,W0=10,F0=-2,lm=u=>u==="*";function P0(u,i){let c=u.split("/"),r=c.length;return c.some(lm)&&(r+=F0),i&&(r+=J0),c.filter(f=>!lm(f)).reduce((f,d)=>f+(Z0.test(d)?K0:d===""?$0:W0),r)}function I0(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 ev(u,i,c=!1){let{routesMeta:r}=u,f={},d="/",m=[];for(let b=0;b<r.length;++b){let p=r[b],v=b===r.length-1,T=d==="/"?i:i.slice(d.length)||"/",S=Ou({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},T),C=p.route;if(!S&&v&&c&&!r[r.length-1].route.index&&(S=Ou({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},T)),!S)return null;Object.assign(f,S.params),m.push({params:f,pathname:cn([d,S.pathname]),pathnameBase:sv(cn([d,S.pathnameBase])),route:C}),S.pathnameBase!=="/"&&(d=cn([d,S.pathnameBase]))}return m}function Ou(u,i){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[c,r]=tv(u.path,u.caseSensitive,u.end),f=i.match(c);if(!f)return null;let d=f[0],m=d.replace(/(.)\/+$/,"$1"),b=f.slice(1);return{params:r.reduce((v,{paramName:T,isOptional:S},C)=>{if(T==="*"){let H=b[C]||"";m=d.slice(0,d.length-H.length).replace(/(.)\/+$/,"$1")}const z=b[C];return S&&!z?v[T]=void 0:v[T]=(z||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:m,pattern:u}}function tv(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,p)=>(r.push({paramName:b,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).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 nv(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 rn(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 lv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,av=u=>lv.test(u);function iv(u,i="/"){let{pathname:c,search:r="",hash:f=""}=typeof u=="string"?Ql(u):u,d;if(c)if(av(c))d=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("/")?d=am(c.substring(1),"/"):d=am(c,i)}else d=i;return{pathname:d,search:cv(r),hash:rv(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 cr(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 uv(u){return u.filter((i,c)=>c===0||i.route.path&&i.route.path.length>0)}function Tm(u){let i=uv(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=Ql(u):(f={...u},Oe(!f.pathname||!f.pathname.includes("?"),cr("?","pathname","search",f)),Oe(!f.pathname||!f.pathname.includes("#"),cr("#","pathname","hash",f)),Oe(!f.search||!f.search.includes("#"),cr("#","search","hash",f)));let d=u===""||f.pathname==="",m=d?"/":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 p=iv(f,b),v=m&&m!=="/"&&m.endsWith("/"),T=(d||m===".")&&c.endsWith("/");return!p.pathname.endsWith("/")&&(v||T)&&(p.pathname+="/"),p}var cn=u=>u.join("/").replace(/\/\/+/g,"/"),sv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),cv=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,rv=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u;function ov(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 fv=["GET",...Cm];new Set(fv);var Zl=E.createContext(null);Zl.displayName="DataRouter";var Mu=E.createContext(null);Mu.displayName="DataRouterState";E.createContext(!1);var Rm=E.createContext({isTransitioning:!1});Rm.displayName="ViewTransition";var hv=E.createContext(new Map);hv.displayName="Fetchers";var dv=E.createContext(null);dv.displayName="Await";var Yt=E.createContext(null);Yt.displayName="Navigation";var Fa=E.createContext(null);Fa.displayName="Location";var on=E.createContext({outlet:null,matches:[],isDataRoute:!1});on.displayName="Route";var Tr=E.createContext(null);Tr.displayName="RouteError";function mv(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:d,search:m}=Ia(u,{relative:i}),b=d;return c!=="/"&&(b=d==="/"?c:cn([c,d])),r.createHref({pathname:b,search:m,hash:f})}function Pa(){return E.useContext(Fa)!=null}function il(){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 pv(){let{isDataRoute:u}=E.useContext(on);return u?Nv():yv()}function yv(){Oe(Pa(),"useNavigate() may be used only in the context of a <Router> component.");let u=E.useContext(Zl),{basename:i,navigator:c}=E.useContext(Yt),{matches:r}=E.useContext(on),{pathname:f}=il(),d=JSON.stringify(Tm(r)),m=E.useRef(!1);return Om(()=>{m.current=!0}),E.useCallback((p,v={})=>{if(jt(m.current,Nm),!m.current)return;if(typeof p=="number"){c.go(p);return}let T=Am(p,JSON.parse(d),f,v.relative==="path");u==null&&i!=="/"&&(T.pathname=T.pathname==="/"?i:cn([i,T.pathname])),(v.replace?c.replace:c.push)(T,v.state,v)},[i,c,d,f,u])}E.createContext(null);function Ia(u,{relative:i}={}){let{matches:c}=E.useContext(on),{pathname:r}=il(),f=JSON.stringify(Tm(c));return E.useMemo(()=>Am(u,JSON.parse(f),r,i==="path"),[u,f,r,i])}function vv(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:d}=E.useContext(Yt),{matches:m}=E.useContext(on),b=m[m.length-1],p=b?b.params:{},v=b?b.pathname:"/",T=b?b.pathnameBase:"/",S=b&&b.route;{let q=S&&S.path||"";Mm(v,!S||q.endsWith("*")||q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${q}">) 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="${q}"> to <Route path="${q==="/"?"*":`${q}/*`}">.`)}let C=il(),z;if(i){let q=typeof i=="string"?Ql(i):i;Oe(T==="/"||q.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 "${q.pathname}" was given in the \`location\` prop.`),z=q}else z=C;let H=z.pathname||"/",k=H;if(T!=="/"){let q=T.replace(/^\//,"").split("/");k="/"+H.replace(/^\//,"").split("/").slice(q.length).join("/")}let Y=xm(u,{pathname:k});jt(S||Y!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),jt(Y==null||Y[Y.length-1].route.element!==void 0||Y[Y.length-1].route.Component!==void 0||Y[Y.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 L=_v(Y&&Y.map(q=>Object.assign({},q,{params:Object.assign({},p,q.params),pathname:cn([T,d.encodeLocation?d.encodeLocation(q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathname]),pathnameBase:q.pathnameBase==="/"?T:cn([T,d.encodeLocation?d.encodeLocation(q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathnameBase])})),m,c,r,f);return i&&L?E.createElement(Fa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},L):L}function gv(){let u=Rv(),i=ov(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),c=u instanceof Error?u.stack:null,r="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:r},d={padding:"2px 4px",backgroundColor:r},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:d},"ErrorBoundary")," or"," ",E.createElement("code",{style:d},"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 bv=E.createElement(gv,null),Sv=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(on.Provider,{value:this.props.routeContext},E.createElement(Tr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function xv({routeContext:u,match:i,children:c}){let r=E.useContext(Zl);return r&&r.static&&r.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=i.route.id),E.createElement(on.Provider,{value:u},c)}function _v(u,i=[],c=null,r=null,f=null){if(u==null){if(!c)return null;if(c.errors)u=c.matches;else if(i.length===0&&!c.initialized&&c.matches.length>0)u=c.matches;else return null}let d=u,m=c?.errors;if(m!=null){let T=d.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(",")}`),d=d.slice(0,Math.min(d.length,T+1))}let b=!1,p=-1;if(c)for(let T=0;T<d.length;T++){let S=d[T];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(p=T),S.route.id){let{loaderData:C,errors:z}=c,H=S.route.loader&&!C.hasOwnProperty(S.route.id)&&(!z||z[S.route.id]===void 0);if(S.route.lazy||H){b=!0,p>=0?d=d.slice(0,p+1):d=[d[0]];break}}}let v=c&&r?(T,S)=>{r(T,{location:c.location,params:c.matches?.[0]?.params??{},errorInfo:S})}:void 0;return d.reduceRight((T,S,C)=>{let z,H=!1,k=null,Y=null;c&&(z=m&&S.route.id?m[S.route.id]:void 0,k=S.route.errorElement||bv,b&&(p<0&&C===0?(Mm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,Y=null):p===C&&(H=!0,Y=S.route.hydrateFallbackElement||null)));let L=i.concat(d.slice(0,C+1)),q=()=>{let Q;return z?Q=k:H?Q=Y:S.route.Component?Q=E.createElement(S.route.Component,null):S.route.element?Q=S.route.element:Q=T,E.createElement(xv,{match:S,routeContext:{outlet:T,matches:L,isDataRoute:c!=null},children:Q})};return c&&(S.route.ErrorBoundary||S.route.errorElement||C===0)?E.createElement(Sv,{location:c.location,revalidation:c.revalidation,component:k,error:z,children:q(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:v}):q()},null)}function Ar(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ev(u){let i=E.useContext(Zl);return Oe(i,Ar(u)),i}function Tv(u){let i=E.useContext(Mu);return Oe(i,Ar(u)),i}function Av(u){let i=E.useContext(on);return Oe(i,Ar(u)),i}function Cr(u){let i=Av(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 Cv(){return Cr("useRouteId")}function Rv(){let u=E.useContext(Tr),i=Tv("useRouteError"),c=Cr("useRouteError");return u!==void 0?u:i.errors?.[c]}function Nv(){let{router:u}=Ev("useNavigate"),i=Cr("useNavigate"),c=E.useRef(!1);return Om(()=>{c.current=!0}),E.useCallback(async(f,d={})=>{jt(c.current,Nm),c.current&&(typeof f=="number"?u.navigate(f):await u.navigate(f,{fromRouteId:i,...d}))},[u,i])}var im={};function Mm(u,i,c){!i&&!im[u]&&(im[u]=!0,jt(!1,c))}E.memo(Ov);function Ov({routes:u,future:i,state:c,unstable_onError:r}){return zm(u,void 0,c,r,i)}function yr(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 zv({basename:u="/",children:i=null,location:c,navigationType:r="POP",navigator:f,static:d=!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:d,future:{}}),[m,f,d]);typeof c=="string"&&(c=Ql(c));let{pathname:p="/",search:v="",hash:T="",state:S=null,key:C="default"}=c,z=E.useMemo(()=>{let H=rn(p,m);return H==null?null:{location:{pathname:H,search:v,hash:T,state:S,key:C},navigationType:r}},[m,p,v,T,S,C,r]);return jt(z!=null,`<Router basename="${m}"> is not able to match the URL "${p}${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 Mv({children:u,location:i}){return vv(vr(u),i)}function vr(u,i=[]){let c=[];return E.Children.forEach(u,(r,f)=>{if(!E.isValidElement(r))return;let d=[...i,f];if(r.type===E.Fragment){c.push.apply(c,vr(r.props.children,d));return}Oe(r.type===yr,`[${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||d.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(m.children=vr(r.props.children,d)),c.push(m)}),c}var Eu="get",Tu="application/x-www-form-urlencoded";function Du(u){return u!=null&&typeof u.tagName=="string"}function Dv(u){return Du(u)&&u.tagName.toLowerCase()==="button"}function jv(u){return Du(u)&&u.tagName.toLowerCase()==="form"}function wv(u){return Du(u)&&u.tagName.toLowerCase()==="input"}function Uv(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Bv(u,i){return u.button===0&&(!i||i==="_self")&&!Uv(u)}var bu=null;function Lv(){if(bu===null)try{new FormData(document.createElement("form"),0),bu=!1}catch{bu=!0}return bu}var Hv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rr(u){return u!=null&&!Hv.has(u)?(jt(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Tu}"`),null):u}function qv(u,i){let c,r,f,d,m;if(jv(u)){let b=u.getAttribute("action");r=b?rn(b,i):null,c=u.getAttribute("method")||Eu,f=rr(u.getAttribute("enctype"))||Tu,d=new FormData(u)}else if(Dv(u)||wv(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 p=u.getAttribute("formaction")||b.getAttribute("action");if(r=p?rn(p,i):null,c=u.getAttribute("formmethod")||b.getAttribute("method")||Eu,f=rr(u.getAttribute("formenctype"))||rr(b.getAttribute("enctype"))||Tu,d=new FormData(b,u),!Lv()){let{name:v,type:T,value:S}=u;if(T==="image"){let C=v?`${v}.`:"";d.append(`${C}x`,"0"),d.append(`${C}y`,"0")}else v&&d.append(v,S)}}else{if(Du(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=Eu,r=null,f=Tu,m=u}return d&&f==="text/plain"&&(m=d,d=void 0),{action:r,method:c.toLowerCase(),encType:f,formData:d,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Rr(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function Yv(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&&rn(r.pathname,i)==="/"?r.pathname=`${i.replace(/\/$/,"")}/_root.${c}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${c}`,r}async function kv(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 Xv(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 Gv(u,i,c){let r=await Promise.all(u.map(async f=>{let d=i.routes[f.route.id];if(d){let m=await kv(d,c);return m.links?m.links():[]}return[]}));return Kv(r.flat(1).filter(Xv).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,d){let m=(p,v)=>c[v]?p.route.id!==c[v].route.id:!0,b=(p,v)=>c[v].pathname!==p.pathname||c[v].route.path?.endsWith("*")&&c[v].params["*"]!==p.params["*"];return d==="assets"?i.filter((p,v)=>m(p,v)||b(p,v)):d==="data"?i.filter((p,v)=>{let T=r.routes[p.route.id];if(!T||!T.hasLoader)return!1;if(m(p,v)||b(p,v))return!0;if(p.route.shouldRevalidate){let S=p.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:c[0]?.params||{},nextUrl:new URL(u,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function Vv(u,i,{includeHydrateFallback:c}={}){return Qv(u.map(r=>{let f=i.routes[r.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function Qv(u){return[...new Set(u)]}function Zv(u){let i={},c=Object.keys(u).sort();for(let r of c)i[r]=u[r];return i}function Kv(u,i){let c=new Set;return new Set(i),u.reduce((r,f)=>{let d=JSON.stringify(Zv(f));return c.has(d)||(c.add(d),r.push({key:d,link:f})),r},[])}function Dm(){let u=E.useContext(Zl);return Rr(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function Jv(){let u=E.useContext(Mu);return Rr(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Nr=E.createContext(void 0);Nr.displayName="FrameworkContext";function jm(){let u=E.useContext(Nr);return Rr(u,"You must render this element inside a <HydratedRouter> element"),u}function $v(u,i){let c=E.useContext(Nr),[r,f]=E.useState(!1),[d,m]=E.useState(!1),{onFocus:b,onBlur:p,onMouseEnter:v,onMouseLeave:T,onTouchStart:S}=i,C=E.useRef(null);E.useEffect(()=>{if(u==="render"&&m(!0),u==="viewport"){let k=L=>{L.forEach(q=>{m(q.isIntersecting)})},Y=new IntersectionObserver(k,{threshold:.5});return C.current&&Y.observe(C.current),()=>{Y.disconnect()}}},[u]),E.useEffect(()=>{if(r){let k=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(k)}}},[r]);let z=()=>{f(!0)},H=()=>{f(!1),m(!1)};return c?u!=="intent"?[d,C,{}]:[d,C,{onFocus:Ga(b,z),onBlur:Ga(p,H),onMouseEnter:Ga(v,z),onMouseLeave:Ga(T,H),onTouchStart:Ga(S,z)}]:[!1,C,{}]}function Ga(u,i){return c=>{u&&u(c),c.defaultPrevented||i(c)}}function Wv({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(Pv,{page:u,matches:r,...i}):null}function Fv(u){let{manifest:i,routeModules:c}=jm(),[r,f]=E.useState([]);return E.useEffect(()=>{let d=!1;return Gv(u,i,c).then(m=>{d||f(m)}),()=>{d=!0}},[u,i,c]),r}function Pv({page:u,matches:i,...c}){let r=il(),{manifest:f,routeModules:d}=jm(),{basename:m}=Dm(),{loaderData:b,matches:p}=Jv(),v=E.useMemo(()=>um(u,i,p,f,r,"data"),[u,i,p,f,r]),T=E.useMemo(()=>um(u,i,p,f,r,"assets"),[u,i,p,f,r]),S=E.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let H=new Set,k=!1;if(i.forEach(L=>{let q=f.routes[L.route.id];!q||!q.hasLoader||(!v.some(Q=>Q.route.id===L.route.id)&&L.route.id in b&&d[L.route.id]?.shouldRevalidate||q.hasClientLoader?k=!0:H.add(L.route.id))}),H.size===0)return[];let Y=Yv(u,m,"data");return k&&H.size>0&&Y.searchParams.set("_routes",i.filter(L=>H.has(L.route.id)).map(L=>L.route.id).join(",")),[Y.pathname+Y.search]},[m,b,r,f,v,i,u,d]),C=E.useMemo(()=>Vv(T,f),[T,f]),z=Fv(T);return E.createElement(E.Fragment,null,S.map(H=>E.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...c})),C.map(H=>E.createElement("link",{key:H,rel:"modulepreload",href:H,...c})),z.map(({key:H,link:k})=>E.createElement("link",{key:H,nonce:c.nonce,...k})))}function Iv(...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 eg({basename:u,children:i,window:c}){let r=E.useRef();r.current==null&&(r.current=Y0({window:c,v5Compat:!0}));let f=r.current,[d,m]=E.useState({action:f.action,location:f.location}),b=E.useCallback(p=>{E.startTransition(()=>m(p))},[m]);return E.useLayoutEffect(()=>f.listen(b),[f,b]),E.createElement(zv,{basename:u,children:i,location:d.location,navigationType:d.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:d,replace:m,state:b,target:p,to:v,preventScrollReset:T,viewTransition:S,...C},z){let{basename:H}=E.useContext(Yt),k=typeof v=="string"&&Um.test(v),Y,L=!1;if(typeof v=="string"&&k&&(Y=v,wm))try{let xe=new URL(window.location.href),Ue=v.startsWith("//")?new URL(xe.protocol+v):new URL(v),Xe=rn(Ue.pathname,H);Ue.origin===xe.origin&&Xe!=null?v=Xe+Ue.search+Ue.hash:L=!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 q=mv(v,{relative:f}),[Q,P,ye]=$v(r,C),Re=ag(v,{replace:m,state:b,target:p,preventScrollReset:T,relative:f,viewTransition:S});function $(xe){i&&i(xe),xe.defaultPrevented||Re(xe)}let Te=E.createElement("a",{...C,...ye,href:Y||q,onClick:L||d?i:$,ref:Iv(z,P),target:p,"data-discover":!k&&c==="render"?"true":void 0});return Q&&!k?E.createElement(E.Fragment,null,Te,E.createElement(Wv,{page:q})):Te});Bm.displayName="Link";var tg=E.forwardRef(function({"aria-current":i="page",caseSensitive:c=!1,className:r="",end:f=!1,style:d,to:m,viewTransition:b,children:p,...v},T){let S=Ia(m,{relative:v.relative}),C=il(),z=E.useContext(Mu),{navigator:H,basename:k}=E.useContext(Yt),Y=z!=null&&rg(S)&&b===!0,L=H.encodeLocation?H.encodeLocation(S).pathname:S.pathname,q=C.pathname,Q=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;c||(q=q.toLowerCase(),Q=Q?Q.toLowerCase():null,L=L.toLowerCase()),Q&&k&&(Q=rn(Q,k)||Q);const P=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let ye=q===L||!f&&q.startsWith(L)&&q.charAt(P)==="/",Re=Q!=null&&(Q===L||!f&&Q.startsWith(L)&&Q.charAt(L.length)==="/"),$={isActive:ye,isPending:Re,isTransitioning:Y},Te=ye?i:void 0,xe;typeof r=="function"?xe=r($):xe=[r,ye?"active":null,Re?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let Ue=typeof d=="function"?d($):d;return E.createElement(Bm,{...v,"aria-current":Te,className:xe,ref:T,style:Ue,to:m,viewTransition:b},typeof p=="function"?p($):p)});tg.displayName="NavLink";var ng=E.forwardRef(({discover:u="render",fetcherKey:i,navigate:c,reloadDocument:r,replace:f,state:d,method:m=Eu,action:b,onSubmit:p,relative:v,preventScrollReset:T,viewTransition:S,...C},z)=>{let H=sg(),k=cg(b,{relative:v}),Y=m.toLowerCase()==="get"?"get":"post",L=typeof b=="string"&&Um.test(b),q=Q=>{if(p&&p(Q),Q.defaultPrevented)return;Q.preventDefault();let P=Q.nativeEvent.submitter,ye=P?.getAttribute("formmethod")||m;H(P||Q.currentTarget,{fetcherKey:i,method:ye,navigate:c,replace:f,state:d,relative:v,preventScrollReset:T,viewTransition:S})};return E.createElement("form",{ref:z,method:Y,action:k,onSubmit:r?p:q,...C,"data-discover":!L&&u==="render"?"true":void 0})});ng.displayName="Form";function lg(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(Zl);return Oe(i,lg(u)),i}function ag(u,{target:i,replace:c,state:r,preventScrollReset:f,relative:d,viewTransition:m}={}){let b=pv(),p=il(),v=Ia(u,{relative:d});return E.useCallback(T=>{if(Bv(T,i)){T.preventDefault();let S=c!==void 0?c:Wa(p)===Wa(v);b(u,{replace:S,state:r,preventScrollReset:f,relative:d,viewTransition:m})}},[p,b,v,c,r,i,u,f,d,m])}var ig=0,ug=()=>`__${String(++ig)}__`;function sg(){let{router:u}=Lm("useSubmit"),{basename:i}=E.useContext(Yt),c=Cv();return E.useCallback(async(r,f={})=>{let{action:d,method:m,encType:b,formData:p,body:v}=qv(r,i);if(f.navigate===!1){let T=f.fetcherKey||ug();await u.fetch(T,c,f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,body:v,formMethod:f.method||m,formEncType:f.encType||b,flushSync:f.flushSync})}else await u.navigate(f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,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 cg(u,{relative:i}={}){let{basename:c}=E.useContext(Yt),r=E.useContext(on);Oe(r,"useFormAction must be used inside a RouteContext");let[f]=r.matches.slice(-1),d={...Ia(u||".",{relative:i})},m=il();if(u==null){d.search=m.search;let b=new URLSearchParams(d.search),p=b.getAll("index");if(p.some(T=>T==="")){b.delete("index"),p.filter(S=>S).forEach(S=>b.append("index",S));let T=b.toString();d.search=T?`?${T}`:""}}return(!u||u===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(d.pathname=d.pathname==="/"?c:cn([c,d.pathname])),Wa(d)}function rg(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 d=rn(c.currentLocation.pathname,r)||c.currentLocation.pathname,m=rn(c.nextLocation.pathname,r)||c.nextLocation.pathname;return Ou(f.pathname,m)!=null||Ou(f.pathname,d)!=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 Au=Object.create(null);Object.keys(qt).forEach(u=>{Au[qt[u]]=u});const gr={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,Or=({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 or;function og(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));Or(u,!1,c=>{or||(or=new TextEncoder),i(or.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 fg=u=>{let i=u.length*.75,c=u.length,r,f=0,d,m,b,p;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)d=$a[u.charCodeAt(r)],m=$a[u.charCodeAt(r+1)],b=$a[u.charCodeAt(r+2)],p=$a[u.charCodeAt(r+3)],T[f++]=d<<2|m>>4,T[f++]=(m&15)<<4|b>>2,T[f++]=(b&3)<<6|p&63;return v},hg=typeof ArrayBuffer=="function",zr=(u,i)=>{if(typeof u!="string")return{type:"message",data:km(u,i)};const c=u.charAt(0);return c==="b"?{type:"message",data:dg(u.substring(1),i)}:Au[c]?u.length>1?{type:Au[c],data:u.substring(1)}:{type:Au[c]}:gr},dg=(u,i)=>{if(hg){const c=fg(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="",mg=(u,i)=>{const c=u.length,r=new Array(c);let f=0;u.forEach((d,m)=>{Or(d,!1,b=>{r[m]=b,++f===c&&i(r.join(Xm))})})},pg=(u,i)=>{const c=u.split(Xm),r=[];for(let f=0;f<c.length;f++){const d=zr(c[f],i);if(r.push(d),d.type==="error")break}return r};function yg(){return new TransformStream({transform(u,i){og(u,c=>{const r=c.length;let f;if(r<126)f=new Uint8Array(1),new DataView(f.buffer).setUint8(0,r);else if(r<65536){f=new Uint8Array(3);const d=new DataView(f.buffer);d.setUint8(0,126),d.setUint16(1,r)}else{f=new Uint8Array(9);const d=new DataView(f.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(r))}u.data&&typeof u.data!="string"&&(f[0]|=128),i.enqueue(f),i.enqueue(c)})}})}let fr;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 vg(u,i){fr||(fr=new TextDecoder);const c=[];let r=0,f=-1,d=!1;return new TransformStream({transform(m,b){for(c.push(m);;){if(r===0){if(Su(c)<1)break;const p=xu(c,1);d=(p[0]&128)===128,f=p[0]&127,f<126?r=3:f===126?r=1:r=2}else if(r===1){if(Su(c)<2)break;const p=xu(c,2);f=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),r=3}else if(r===2){if(Su(c)<8)break;const p=xu(c,8),v=new DataView(p.buffer,p.byteOffset,p.length),T=v.getUint32(0);if(T>Math.pow(2,21)-1){b.enqueue(gr);break}f=T*Math.pow(2,32)+v.getUint32(4),r=3}else{if(Su(c)<f)break;const p=xu(c,f);b.enqueue(zr(d?p:fr.decode(p),i)),r=0}if(f===0||f>u){b.enqueue(gr);break}}}})}const Gm=4;function Ye(u){if(u)return gg(u)}function gg(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 ju=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")(),bg="arraybuffer";function Vm(u,...i){return i.reduce((c,r)=>(u.hasOwnProperty(r)&&(c[r]=u[r]),c),{})}const Sg=Rt.setTimeout,xg=Rt.clearTimeout;function wu(u,i){i.useNativeTimers?(u.setTimeoutFn=Sg.bind(Rt),u.clearTimeoutFn=xg.bind(Rt)):(u.setTimeoutFn=Rt.setTimeout.bind(Rt),u.clearTimeoutFn=Rt.clearTimeout.bind(Rt))}const _g=1.33;function Eg(u){return typeof u=="string"?Tg(u):Math.ceil((u.byteLength||u.size)*_g)}function Tg(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 Ag(u){let i="";for(let c in u)u.hasOwnProperty(c)&&(i.length&&(i+="&"),i+=encodeURIComponent(c)+"="+encodeURIComponent(u[c]));return i}function Cg(u){let i={},c=u.split("&");for(let r=0,f=c.length;r<f;r++){let d=c[r].split("=");i[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return i}class Rg extends Error{constructor(i,c,r){super(i),this.description=c,this.context=r,this.type="TransportError"}}class Mr extends Ye{constructor(i){super(),this.writable=!1,wu(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 Rg(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=zr(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=Ag(i);return c.length?"?"+c:""}}class Ng extends Mr{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)};pg(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,mg(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 Og=Zm;function zg(){}class Mg extends Ng{constructor(i){if(super(i),typeof location<"u"){const c=location.protocol==="https:";let r=location.port;r||(r=c?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||r!==i.port}}doWrite(i,c){const r=this.request({method:"POST",data:i});r.on("success",c),r.on("error",(f,d)=>{this.onError("xhr post error",f,d)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(c,r)=>{this.onError("xhr poll error",c,r)}),this.pollXhr=i}}class Ht extends Ye{constructor(i,c,r){super(),this.createRequest=i,wu(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=zg,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 Dg=(function(){const u=Km({xdomain:!1});return u&&u.responseType!==null})();class jg extends Mg{constructor(i){super(i);const c=i&&i.forceBase64;this.supportsBinary=Dg&&!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||Og))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 wg extends Mr{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;Or(r,this.supportsBinary,d=>{try{this.doWrite(r,d)}catch{}f&&ju(()=>{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 hr=Rt.WebSocket||Rt.MozWebSocket;class Ug extends wg{createSocket(i,c,r){return Jm?new hr(i,c,r):c?new hr(i,c):new hr(i)}doWrite(i,c){this.ws.send(c)}}class Bg extends Mr{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=vg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=i.readable.pipeThrough(c).getReader(),f=yg();f.readable.pipeTo(i.writable),this._writer=f.writable.getWriter();const d=()=>{r.read().then(({done:b,value:p})=>{b||(this.onPacket(p),d())}).catch(b=>{})};d();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&&ju(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const Lg={websocket:Ug,webtransport:Bg,polling:jg},Hg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,qg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function br(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=Hg.exec(u||""),d={},m=14;for(;m--;)d[qg[m]]=f[m]||"";return c!=-1&&r!=-1&&(d.source=i,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=Yg(d,d.path),d.queryKey=kg(d,d.query),d}function Yg(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 kg(u,i){const c={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,f,d){f&&(c[f]=d)}),c}const Sr=typeof addEventListener=="function"&&typeof removeEventListener=="function",Cu=[];Sr&&addEventListener("offline",()=>{Cu.forEach(u=>u())},!1);class Ln extends Ye{constructor(i,c){if(super(),this.binaryType=bg,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=br(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=br(c.host).host);wu(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=Cg(this.opts.query)),Sr&&(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"})},Cu.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+=Eg(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,ju(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,c,r){return this._sendPacket("message",i,c,r),this}send(i,c,r){return this._sendPacket("message",i,c,r),this}_sendPacket(i,c,r,f){if(typeof c=="function"&&(f=c,c=void 0),typeof r=="function"&&(f=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const d={type:i,data:c,options:r};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),f&&this.once("flush",f),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},c=()=>{this.off("upgrade",c),this.off("upgradeError",c),i()},r=()=>{this.once("upgrade",c),this.once("upgradeError",c)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():i()}):this.upgrading?r():i()),this}_onError(i){if(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(),Sr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Cu.indexOf(this._offlineEventListener);r!==-1&&Cu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,c),this.writeBuffer=[],this._prevBufferLen=0}}}Ln.protocol=Gm;class Xg 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 d(){r||(r=!0,T(),c.close(),c=null)}const m=S=>{const C=new Error("probe error: "+S);C.transport=c.name,d(),this.emitReserved("upgradeError",C)};function b(){m("transport closed")}function p(){m("socket closed")}function v(S){c&&S.name!==c.name&&d()}const T=()=>{c.removeListener("open",f),c.removeListener("error",m),c.removeListener("close",b),this.off("close",p),this.off("upgrading",v)};c.once("open",f),c.once("error",m),c.once("close",b),this.once("close",p),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 Gg=class extends Xg{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=>Lg[f]).filter(f=>!!f)),super(i,r)}};function Vg(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=br(u)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const d=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+d+":"+r.port+i,r.href=r.protocol+"://"+d+(c&&c.port===r.port?"":":"+r.port),r}const Qg=typeof ArrayBuffer=="function",Zg=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u.buffer instanceof ArrayBuffer,$m=Object.prototype.toString,Kg=typeof Blob=="function"||typeof Blob<"u"&&$m.call(Blob)==="[object BlobConstructor]",Jg=typeof File=="function"||typeof File<"u"&&$m.call(File)==="[object FileConstructor]";function Dr(u){return Qg&&(u instanceof ArrayBuffer||Zg(u))||Kg&&u instanceof Blob||Jg&&u instanceof File}function Ru(u,i){if(!u||typeof u!="object")return!1;if(Array.isArray(u)){for(let c=0,r=u.length;c<r;c++)if(Ru(u[c]))return!0;return!1}if(Dr(u))return!0;if(u.toJSON&&typeof u.toJSON=="function"&&arguments.length===1)return Ru(u.toJSON(),!0);for(const c in u)if(Object.prototype.hasOwnProperty.call(u,c)&&Ru(u[c]))return!0;return!1}function $g(u){const i=[],c=u.data,r=u;return r.data=xr(c,i),r.attachments=i.length,{packet:r,buffers:i}}function xr(u,i){if(!u)return u;if(Dr(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]=xr(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]=xr(u[r],i));return c}return u}function Wg(u,i){return u.data=_r(u.data,i),delete u.attachments,u}function _r(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]=_r(u[c],i);else if(typeof u=="object")for(const c in u)Object.prototype.hasOwnProperty.call(u,c)&&(u[c]=_r(u[c],i));return u}const Fg=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Pg=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 Ig{constructor(i){this.replacer=i}encode(i){return(i.type===re.EVENT||i.type===re.ACK)&&Ru(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=$g(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 jr 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 e1(c),c.attachments===0&&super.emitReserved("decoded",c)):super.emitReserved("decoded",c)}else if(Dr(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 d=c+1;for(;i.charAt(++c)!=="-"&&c!=i.length;);const m=i.substring(d,c);if(m!=Number(m)||i.charAt(c)!=="-")throw new Error("Illegal attachments");r.attachments=Number(m)}if(i.charAt(c+1)==="/"){const d=c+1;for(;++c&&!(i.charAt(c)===","||c===i.length););r.nsp=i.substring(d,c)}else r.nsp="/";const f=i.charAt(c+1);if(f!==""&&Number(f)==f){const d=c+1;for(;++c;){const m=i.charAt(c);if(m==null||Number(m)!=m){--c;break}if(c===i.length)break}r.id=Number(i.substring(d,c+1))}if(i.charAt(++c)){const d=this.tryParse(i.substr(c));if(jr.isPayloadValid(r.type,d))r.data=d;else throw new Error("invalid payload")}return r}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,c){switch(i){case 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"&&Fg.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 e1{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=Wg(this.reconPack,this.buffers);return this.finishedReconstruction(),c}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const t1=Object.freeze(Object.defineProperty({__proto__:null,Decoder:jr,Encoder:Ig,get PacketType(){return re},protocol:Pg},Symbol.toStringTag,{value:"Module"}));function Dt(u,i,c){return u.on(i,c),function(){u.off(i,c)}}const n1=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,d;if(n1.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,p=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!b||(p?(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 d=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(d),c.apply(this,b)};m.withError=!0,this.acks[i]=m}emitWithAck(i,...c){return new Promise((r,f)=>{const d=(m,b)=>m?f(m):r(b);d.withError=!0,c.push(d),this.emit(i,...c)})}_addToQueue(i){let c;typeof i[i.length-1]=="function"&&(c=i.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((f,...d)=>r!==this._queue[0]?void 0:(f!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),c&&c(f)):(this._queue.shift(),c&&c(null,...d)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const c=this._queue[0];c.pending&&!i||(c.pending=!0,c.tryCount++,this.flags=c.flags,this.emit.apply(this,c.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type: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 Kl(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}Kl.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};Kl.prototype.reset=function(){this.attempts=0};Kl.prototype.setMin=function(u){this.ms=u};Kl.prototype.setMax=function(u){this.max=u};Kl.prototype.setJitter=function(u){this.jitter=u};class Er 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,wu(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 Kl({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||t1;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 Gg(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()}),d=b=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",b),i?i(b):this.maybeReconnectOnOpen()},m=Dt(c,"error",d);if(this._timeout!==!1){const b=this._timeout,p=this.setTimeoutFn(()=>{f(),d(new Error("timeout")),c.close()},b);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}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){ju(()=>{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 Va={};function Nu(u,i){typeof u=="object"&&(i=u,u=void 0),i=i||{};const c=Vg(u,i.path||"/socket.io"),r=c.source,f=c.id,d=c.path,m=Va[f]&&d in Va[f].nsps,b=i.forceNew||i["force new connection"]||i.multiplex===!1||m;let p;return b?p=new Er(r,i):(Va[f]||(Va[f]=new Er(r,i)),p=Va[f]),c.query&&!i.query&&(i.query=c.queryKey),p.socket(c.path,i)}Object.assign(Nu,{Manager:Er,Socket:Wm,io:Nu,connect:Nu});const Fm=window.location.origin;console.info("[socket] connecting to",Fm);const wr=Nu(Fm,{transports:["polling","websocket"],timeout:15e3});wr.on("connect_error",u=>console.error("connect_error",u.code,u.message,u.data));const Pm=E.createContext(wr),l1=({children:u})=>y.jsx(Pm.Provider,{value:wr,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 a1(u){return E.useCallback((i,c={})=>new Promise((r,f)=>{u.emit(i,c,(d={})=>{d.error?f(new Error(d.error)):r(d)})}),[u])}function i1({children:u}){const i=ei(),c=a1(i),[r,f]=E.useState(null),[d,m]=E.useState([]),[b,p]=E.useState([]),[v,T]=E.useState(i.connected);E.useEffect(()=>{const z=()=>T(!0),H=()=>T(!1);return i.on("connect",z),i.on("disconnect",H),()=>{i.off("connect",z),i.off("disconnect",H)}},[i]),E.useEffect(()=>{function z(Y){f(Y)}function H(Y=[]){m(Y)}function k(Y){m(L=>[...L.slice(-199),Y])}return i.on("session:sync",z),i.on("log:init",H),i.on("log:entry",k),i.on("alert:new",(Y={})=>{p(L=>[...L.slice(-49),{...Y,receivedAt:Date.now()}])}),()=>{i.off("session:sync",z),i.off("log:init",H),i.off("log:entry",k),i.off("alert:new")}},[i]);const S=E.useMemo(()=>({login:(z,H)=>c("auth:login",{username:z,password:H}),setRole:z=>c("session:setRole",{role:z}),requestControl:(z,H={})=>c("session:requestControl",{roverId:z,...H}),releaseControl:z=>c("session:releaseControl",{roverId:z}),subscribeAll:()=>c("session:subscribeAll"),lockRover:(z,H)=>c("session:lockRover",{roverId:z,locked:H}),setMode:z=>c("setMode",{mode:z})}),[c]),C=E.useMemo(()=>({connected:v,session:r,logs:d,alerts:b,...S}),[S,b,v,d,r]);return y.jsx(Im.Provider,{value:C,children:u})}function fn(){return E.useContext(Im)}const ep=E.createContext({frames:{}});function u1({children:u}){const i=ei(),[c,r]=E.useState({});E.useEffect(()=>{function d({roverId:m,sensors:b={},frame:p={}}){m&&r(v=>({...v,[m]:{roverId:m,sensors:b,raw:p?.data||null,receivedAt:Date.now()}}))}return i.on("sensorFrame",d),()=>{i.off("sensorFrame",d)}},[i]);const f=E.useMemo(()=>({frames:c}),[c]);return y.jsx(ep.Provider,{value:f,children:u})}function tp(){return E.useContext(ep).frames}function Ur(u){const i=tp();return u?i[u]??null:null}function Qa(u,i="--"){return u==null||u===""?i:u}function Br(){const{connected:u,session:i,requestControl:c}=fn(),r=i?.assignment?.roverId,f=Ur(r),d=f?.sensors||{},m=d.voltageMv!=null?`${(d.voltageMv/1e3).toFixed(2)} V`:null,b=d.currentMa!=null?`${d.currentMa} mA`:null,p=d.batteryChargeMah,v=d.batteryCapacityMah,T=f?.receivedAt?new Date(f.receivedAt).toLocaleTimeString():null,S=f?.raw?f.raw.length>80?`${f.raw.slice(0,80)}…`:f.raw:null,C=i?.roster??[],z=E.useMemo(()=>i?.role==="admin"||i?.role==="lockdown"||i?.role==="lockdown-admin",[i?.role]),[H,k]=E.useState({});async function Y(L){if(L){k(q=>({...q,[L]:!0}));try{await c(L)}catch(q){alert(q.message)}finally{k(q=>({...q,[L]:!1}))}}}return y.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[y.jsxs("div",{className:"text-sm text-slate-400",children:[y.jsx("span",{children:u?"online":"offline"}),y.jsxs("span",{children:[" · role ",i?.role||"unknown"]}),y.jsxs("span",{children:[" · mode ",i?.mode||"--"]}),T&&y.jsxs("span",{children:[" · sensors ",T]})]}),r?f?y.jsxs("div",{className:"flex gap-0.5 flex-wrap",children:[y.jsx(Za,{label:"Charge",value:Qa(p!=null&&v!=null?`${p}/${v}`:null)}),y.jsx(Za,{label:"Charging",value:Qa(d.chargingState?.label)}),y.jsx(Za,{label:"OI mode",value:Qa(d.oiMode?.label)}),y.jsx(Za,{label:"Voltage",value:Qa(m)}),y.jsx(Za,{label:"Current",value:Qa(b)})]}):y.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Waiting for sensor frames…"}):y.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Assign a rover to view sensors."}),S&&y.jsx("pre",{className:"mt-1 overflow-scroll p-1 text-xs text-lime-300",children:S}),y.jsxs("div",{className:"mt-1",children:[y.jsx("p",{className:"text-sm text-slate-400",children:"Rovers"}),C.length===0?y.jsx("p",{className:"text-sm text-slate-500",children:"No roster data."}):y.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:C.map(L=>y.jsxs("li",{className:"flex items-center justify-between gap-1",children:[y.jsxs("div",{children:[y.jsx("p",{className:"text-slate-200",children:L.name}),y.jsxs("p",{className:"text-xs text-slate-500",children:[L.locked?"locked":"free"," · ",L.lastSeen?"seen":"unknown"]})]}),z&&y.jsx("button",{type:"button",onClick:()=>Y(L.id),disabled:H[L.id],className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-40",children:H[L.id]?"...":"request"})]},L.id))})]})]})}function Za({label:u,value:i}){return y.jsxs("div",{className:"bg-gray-700 rounded-sm p-0.5 text-sm",children:[u,": ",i]})}const s1={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},Vl={main:[-127,127],side:[-127,127],vacuum:[0,127]},c1=200,r1=u=>new Promise(i=>setTimeout(i,u));function al(u,i,c){return Math.max(i,Math.min(c,u))}function o1(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,p=0;return i&&!c?(b+=m,p+=m):c&&!i&&(b-=m,p-=m),r&&!f?(b-=m,p+=m):f&&!r&&(b+=m,p-=m),!i&&!c&&(r||f)&&(b=r?-m:m,p=r?m:-m),{left:al(b,-500,500),right:al(p,-500,500)}}function hm(u){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function f1(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 h1(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 d1(){const u=ei(),{session:i}=fn(),c=i?.assignment?.roverId,r=E.useRef(new Set),f=E.useRef({left:0,right:0}),[d,m]=E.useState(()=>({left:0,right:0})),b=E.useCallback((L,q)=>{c&&u.emit("command",{roverId:c,...L},q)},[u,c]),p=E.useCallback(()=>{c&&b({type:"sensorStream",data:{sensorStream:{enable:!0}}})},[b,c]),v=E.useCallback(()=>{if(!c)return;const L=o1(r.current),q=f.current;L.left===q.left&&L.right===q.right||(f.current=L,m(L),b({type:"drive",data:{driveDirect:L}}))},[b,c]),T=E.useCallback(({x:L=0,y:q=0,boost:Q=!1}={})=>{if(!c)return;const P=Q?400:250,ye=hm(q)*P,Re=hm(L)*P,$={left:al(Math.round(ye+Re),-500,500),right:al(Math.round(ye-Re),-500,500)};f.current=$,m($),b({type:"drive",data:{driveDirect:$}})},[b,c]),S=E.useCallback(({main:L=0,side:q=0,vacuum:Q=0}={})=>{if(!c)return;const P={main:al(L,Vl.main[0],Vl.main[1]),side:al(q,Vl.side[0],Vl.side[1]),vacuum:al(Q,Vl.vacuum[0],Vl.vacuum[1])};b({type:"motors",data:{motorPwm:P}})},[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(L=>{if(!c)return;const q=s1[L];q&&(b({type:"raw",data:{raw:h1(q)}}),p())},[b,p,c]),H=E.useCallback(async()=>{if(c)for(const L of["start","dock","full"])z(L),await r1(c1)},[c,z]),k=E.useCallback(()=>{z("dock")},[z]),Y=E.useCallback(L=>{c&&S(L)},[c,S]);return E.useEffect(()=>{if(!c){r.current.clear(),f.current={left:0,right:0},m(f.current);return}function L(Q){if(f1(Q))return;const P=Q.key.toLowerCase();["w","a","s","d","shift"].includes(P)&&(r.current.has(P)||(r.current.add(P),v()))}function q(Q){const P=Q.key.toLowerCase();r.current.has(P)&&(r.current.delete(P),v())}return window.addEventListener("keydown",L),window.addEventListener("keyup",q),p(),()=>{window.removeEventListener("keydown",L),window.removeEventListener("keyup",q)}},[c,v,p]),{roverId:c,speeds:d,stopMotors:C,sendOiCommand:z,runStartDockFull:H,seekDock:k,setAuxMotors:Y,driveWithVector:T}}const np=E.createContext(null);function m1({children:u}){const i=d1();return y.jsx(np.Provider,{value:i,children:u})}function Uu(){const u=E.useContext(np);if(!u)throw new Error("useDriveControl must be used within DriveControlProvider");return u}function Lr(){const{roverId:u,runStartDockFull:i,seekDock:c}=Uu(),f=Ur(u)?.sensors||{},d=(f.oiMode?.label||"").toLowerCase()==="full",m=!!f.chargingSources?.homeBase,b=!!(f.chargingState?.label&&f.chargingState.label.toLowerCase()!=="not charging");return y.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[y.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[y.jsx("span",{children:"Drive control"}),y.jsx("span",{children:u?`Rover ${u}`:"unassigned"})]}),y.jsxs("div",{className:"mt-1 space-y-1",children:[y.jsx(dm,{title:"Start Driving",description:"Press to enable driving mode, then start moving. The headlamps should illuminate.",statuses:[{label:d?"Ready!":"Not Ready!",active:d}],tone:"emerald",onClick:i,disabled:!u}),y.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:d,footnote:m}){const b=r==="indigo"?"bg-indigo-600":"bg-emerald-600";return y.jsxs("button",{type:"button",onClick:f,disabled:d,className:`w-full rounded-lg ${b} px-1 py-1 text-left text-white disabled:opacity-40`,children:[y.jsx("p",{className:"text-base font-semibold",children:u}),y.jsx("p",{className:"text-sm text-white/90",children:i}),y.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:c.map(p=>y.jsx("span",{className:`rounded-full px-1 py-0.5 text-xs font-semibold ${p.active?"bg-lime-300 text-emerald-900":"bg-emerald-900 text-emerald-100"}`,children:p.label},p.label))}),m&&y.jsx("p",{className:"mt-1 text-xs text-emerald-50/80",children:m})]})}const p1=5e3;function y1(u){return u.id?u.id:u.timestamp?`${u.timestamp}-${u.message}`:`${u.title||"alert"}-${u.message}`}function v1(){const{alerts:u}=fn(),[i,c]=E.useState(()=>Date.now()),r=E.useMemo(()=>u.slice(-5).map(d=>({alert:d,key:y1(d)})),[u]);E.useEffect(()=>{if(!r.length)return;const d=setInterval(()=>c(Date.now()),200);return()=>clearInterval(d)},[r.length]);const f=r.map(d=>({...d,age:i-(d.alert.receivedAt??d.alert.timestamp??0)})).filter(d=>d.age<=p1);return f.length?y.jsx("div",{className:"pointer-events-none fixed top-1 left-1/2 z-50 flex -translate-x-1/2 flex-col gap-1",children:f.map(d=>y.jsx(g1,{alert:d.alert},d.key))}):null}function g1({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 y.jsxs("div",{className:`pointer-events-auto rounded-sm px-1 py-1 text-[0.75rem] shadow-lg shadow-black/60 ${i}`,children:[y.jsx("p",{className:"text-[0.65rem] text-slate-300",children:u.title||"Alert"}),y.jsx("p",{className:"text-sm text-white",children:u.message})]})}const b1=[{key:"open",label:"Open"},{key:"turns",label:"Turns"},{key:"admin",label:"Admin"},{key:"lockdown",label:"Lockdown"}];function Bu(){const{session:u,lockRover:i,setMode:c,requestControl:r}=fn(),f=E.useMemo(()=>u?.roster??[],[u?.roster]),[d,m]=E.useState({}),b=u?.role==="admin"||u?.role==="lockdown"||u?.role==="lockdown-admin",p=u?.mode??"open",v=async(z,H)=>{try{await i(z,H),m(k=>({...k,[z]:H}))}catch(k){alert(k.message)}},T=async z=>{const H=z.target.value;try{await c(H)}catch(k){alert(k.message)}},S=async z=>{try{await r(z,{force:!0})}catch(H){alert(H.message)}},C=E.useMemo(()=>{const z={};return f.forEach(H=>{z[H.id]=d[H.id]??H.locked}),z},[f,d]);return b?y.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[y.jsxs("div",{className:"flex items-center justify-between gap-1 text-sm",children:[y.jsx("span",{children:"Admin controls"}),y.jsx("select",{value:p,onChange:T,className:"rounded-sm bg-black/40 px-1 py-1 text-sm text-slate-100",children:b1.map(z=>y.jsx("option",{value:z.key,children:z.label},z.key))})]}),y.jsx("div",{className:"mt-1 space-y-1 text-sm",children:f.map(z=>y.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 rounded-sm bg-black/30 px-1 py-1",children:[y.jsxs("div",{children:[y.jsx("p",{className:"text-slate-100",children:z.name}),y.jsx("p",{className:"text-xs text-slate-400",children:C[z.id]?"locked":"unlocked"})]}),y.jsxs("div",{className:"flex flex-wrap gap-1 text-xs",children:[y.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"}),y.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 dr={},sn={},mr={},mm;function Lu(){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={}))})(mr)),mr}var Ka={},pm;function S1(){if(pm)return Ka;pm=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.shapeFactory=void 0;var u=Lu(),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 x1(){if(ym)return Ja;ym=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.shapeBoundsFactory=void 0;var u=Lu(),i=function(r,f,d,m,b,p,v,T,S){switch(r){case u.JoystickShape.Square:return m=c(f-S.left-T/2,T),b=c(d-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(d-S.top-T/2,T),{relativeX:m,relativeY:b};default:return p>v&&(m*=v/p,b*=v/p),{relativeX:m,relativeY:b}}};Ja.shapeBoundsFactory=i;var c=function(r,f){var d=f/2;return r>d?d:r<-d?d*-1:r};return Ja}var vm;function _1(){if(vm)return sn;vm=1;var u=sn&&sn.__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 H in z)Object.prototype.hasOwnProperty.call(z,H)&&(C[H]=z[H])},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=sn&&sn.__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(sn,"__esModule",{value:!0}),sn.Joystick=void 0;var c=zu(),r=Lu(),f=S1(),d=x1(),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 p=(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 H=z.clientX,k=z.clientY,Y=H-C._parentRect.left-C._radius,L=k-C._parentRect.top-C._radius,q=C._distance(Y,L),Q=(0,d.shapeBoundsFactory)(C.props.controlPlaneShape||C.props.baseShape,H,k,Y,L,q,C._radius,C._baseSize,C._parentRect);Y=Q.relativeX,L=Q.relativeY;var P=Math.atan2(Y,L);C._updatePos({relativeX:Y,relativeY:L,distance:C._distanceToPercentile(q),direction:C._getDirection(P),axisX:H-C._parentRect.left,axisY:k-C._parentRect.top})}},C._pointerUp=function(z){if(z.pointerId===C._pointerId){var H={dragging:!1};C.props.sticky||(H.coordinates=void 0),C.frameId=window.requestAnimationFrame(function(){C._mounted&&C.setState(H)}),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(H){var k=new Date().getTime(),Y=C.props.throttle||0;if(!(k-z<Y)&&(z=k,C.props.move))return C.props.move(H)}})(),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(H){return S._pointerDown(H)},className:this.props.disabled?"joystick-disabled":"",style:z}))},T})(c.Component);return sn.Joystick=p,sn}var gm;function E1(){return gm||(gm=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=u.Joystick=void 0;var i=_1();Object.defineProperty(u,"Joystick",{enumerable:!0,get:function(){return i.Joystick}});var c=Lu();Object.defineProperty(u,"JoystickShape",{enumerable:!0,get:function(){return c.JoystickShape}})})(dr)),dr}var T1=E1();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}=Uu(),r=!u,f=E.useCallback((m={})=>{if(r)return;const b=bm(m.x??0),p=bm(m.y??0);i({x:b,y:p})},[r,i]),d=E.useCallback(()=>{r||i({x:0,y:0})},[r,i]);return y.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[y.jsx("div",{className:"text-xs text-slate-400",children:"Joystick"}),y.jsx("div",{className:"mt-1 flex items-center justify-center",children:y.jsx(T1.Joystick,{size:120,baseColor:"#0f172a",stickColor:"#38bdf8",throttle:75,move:f,stop:d,disabled:r})}),y.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Drag to drive. Release to stop sending drive commands."}),y.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}=Uu(),c=!u,r=()=>{c||i({main:127,side:127,vacuum:127})},f=()=>{c||i({main:0,side:0,vacuum:0})},d=[{label:"Main +",values:{main:127}},{label:"Main -",values:{main:-127}},{label:"Side +",values:{side:127}},{label:"Side -",values:{side:-127}},{label:"Vacuum Max",values:{vacuum:127}},{label:"Vacuum Off",values:{vacuum:0}}];return y.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[y.jsx("div",{className:"text-xs text-slate-400",children:"Aux motors"}),y.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[y.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"}),y.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"})]}),y.jsx("div",{className:"mt-1 grid grid-cols-2 gap-1 text-[0.75rem]",children:d.map(m=>y.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 A1(){return y.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row",children:[y.jsx("div",{className:"flex-1",children:y.jsx(lp,{})}),y.jsx("div",{className:"flex-1",children:y.jsx(ap,{})})]})}function Hr(){return y.jsxs("div",{className:"min-h-[8rem] rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[y.jsx("p",{className:"text-center text-sm text-slate-400",children:"Room camera"}),y.jsx("p",{className:"mt-1 text-center",children:"Feed placeholder. Wire upcoming room cam here."})]})}function qr(){const{logs:u}=fn();return y.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[y.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-400",children:[y.jsx("span",{children:"Server logs"}),y.jsx("span",{children:u.length})]}),y.jsx("div",{className:"mt-1 h-48 overflow-y-auto rounded-sm bg-black/40 p-1 font-mono text-sm text-slate-300",children:u.length===0?y.jsx("p",{children:"No logs yet."}):u.slice().reverse().map(i=>y.jsxs("div",{className:"mb-1",children:[y.jsx("span",{className:"text-slate-500",children:i.timestamp})," ",y.jsxs("span",{className:"text-slate-300",children:["[",i.level,"]"]})," ",i.label&&y.jsxs("span",{className:"text-slate-400",children:["[",i.label,"]"]})," ",y.jsx("span",{children:i.message})]},i.id))})]})}function Yr(){const{login:u,setRole:i}=fn(),[c,r]=E.useState(""),[f,d]=E.useState(""),[m,b]=E.useState(!1);async function p(v){v.preventDefault(),b(!0);try{await u(c,f),r(""),d("")}catch(T){alert(T.message)}finally{b(!1)}}return y.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[y.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),y.jsxs("form",{className:"mt-1 flex flex-col gap-1",onSubmit:p,children:[y.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)}),y.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Password",type:"password",value:f,onChange:v=>d(v.target.value)}),y.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"})]}),y.jsxs("div",{className:"mt-1 flex gap-1 text-sm",children:[y.jsx("button",{type:"button",onClick:()=>i("user"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Driver"}),y.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 ip(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(p=>{i.emit("video:request",{roverId:p},(v={})=>{b||r(T=>({...T,[p]:v}))})}),()=>{b=!0}},[i,f]),E.useMemo(()=>{if(!f)return{};const m=f.split("|"),b={};return m.forEach(p=>{c[p]&&(b[p]=c[p])}),b},[f,c])}const C1={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:your.turn.server:3478",username:"user",credential:"pass"}],bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"};function R1(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 N1(u){if(!u)return{};const i=`${u}:${u}`;return{Authorization:`Basic ${R1(i)}`}}class O1{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(C1);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",...N1(this.token)},body:r.sdp,signal:this.abortController.signal});if(!f.ok)throw new Error(`WHEP request failed: ${f.status}`);const d=await f.text();await i.setRemoteDescription({type:"answer",sdp:d}),i.getReceivers().forEach(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 z1=2e3,M1=3e3;function up({sessionInfo:u,label:i,forceMute:c=!1,telemetryFrame:r,batteryConfig:f}){const d=E.useRef(null),m=E.useRef(null),b=E.useRef(null),[p,v]=E.useState("idle"),[T,S]=E.useState(null),[C,z]=E.useState(0),[H,k]=E.useState(!0),Y=r?.sensors,L=Y?.batteryChargeMah??null,q=Y?.wheelOvercurrents||null,Q=!!(q&&Object.values(q).some($=>!!$)),P=E.useCallback(()=>{clearTimeout(m.current),m.current=setTimeout(()=>z(Date.now()),z1)},[]),ye=E.useCallback(($=0)=>{if(c)return;clearTimeout(b.current);const Te=()=>{clearTimeout(b.current),b.current=setTimeout(()=>{c||xe()},M1)},xe=async()=>{const Ue=d.current;if(Ue)try{Ue.muted=!1,await Ue.play(),k(!1)}catch{Ue.muted=!0,k(!0),Te()}};b.current=setTimeout(xe,$)},[c]);E.useEffect(()=>()=>{clearTimeout(m.current),clearTimeout(b.current)},[]),E.useEffect(()=>{p==="playing"&&ye(0)},[p,ye]),E.useEffect(()=>{if(!u?.url||!d.current)return;let $=!0,Te;const xe=setTimeout(()=>k(!0),0),Ue=(Xe,We)=>{$&&(v(Xe),S(We||null),["error","failed","disconnected","closed"].includes(Xe)&&P())};return Te=new O1({url:u.url,token:u.token,video:d.current,onStatus:Ue}),Te.start().catch(Xe=>{$&&(v("error"),S(Xe.message),P())}),()=>{$=!1,clearTimeout(xe),Te?.stop()}},[u?.url,u?.token,C,P]),E.useEffect(()=>{p==="stopped"&&u?.url&&P()},[p,u?.url,P]);const Re=u?.url?p==="error"?`Error: ${T||"unknown"}`:T?`${p} (${T})`:p:"waiting";return y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm bg-black aspect-video",children:[y.jsx("video",{ref:d,muted:c||H,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),y.jsx(j1,{frame:r}),y.jsx(w1,{active:Q})]}),y.jsx(D1,{charge:L,config:f,label:i,status:Re})]})}function D1({charge:u,config:i,label:c,status:r}){const f=i?.Full,d=i?.Warn,m=i?.Urgent??null;if(u==null||f==null||d==null)return y.jsxs("div",{className:"rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[y.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[y.jsx("span",{children:c}),y.jsx("span",{children:r})]}),y.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Battery telemetry unavailable"})]});const b=f-d;if(b<=0)return null;const p=(u-d)/b,v=Math.min(1,Math.max(0,p)),T=Math.round(v*100),S=`${T}%`,C=p<=0,z=m!=null&&u<=m,H=C?"bg-red-500 animate-pulse":z?"bg-amber-400":"bg-emerald-500";return y.jsxs("div",{className:"space-y-2 rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[y.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[y.jsx("span",{children:c}),y.jsx("span",{children:r})]}),y.jsxs("div",{className:"relative h-4 w-full rounded-full bg-slate-800",children:[y.jsx("div",{className:`h-full rounded-full transition-[width] ${H}`,style:{width:`${T}%`}}),y.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-black/80",children:S})]})]})}function j1({frame:u}){const c=u?.sensors?.bumpsAndWheelDrops||{},[r,f]=E.useState(()=>Date.now());E.useEffect(()=>{const p=setInterval(()=>f(Date.now()),150);return()=>clearInterval(p)},[]);const d=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 y.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col justify-between p-1 text-[0.65rem] text-slate-200",children:[y.jsxs("div",{className:"flex items-center justify-between gap-1",children:[y.jsxs("div",{className:"flex items-center gap-1 text-[0.55rem] text-slate-400",children:[y.jsx("span",{className:`h-2 w-2 rounded-full ${d?"bg-emerald-300 shadow-[0_0_4px_rgba(16,185,129,0.8)]":"bg-slate-700"}`}),y.jsx("span",{children:"sensor"})]}),y.jsx("div",{className:"flex gap-1",children:m.map(p=>y.jsx(Sm,{label:p.label,active:p.active},p.label))})]}),y.jsx("div",{className:"flex justify-end gap-1",children:b.map(p=>y.jsx(Sm,{label:p.label,active:p.active},p.label))})]})}function Sm({label:u,active:i}){return y.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 w1({active:u}){return u?y.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:y.jsx("div",{className:"text-center text-sm font-semibold text-red-100 animate-pulse",children:"Overcurrent"})}):null}function kr(){const{session:u}=fn(),i=u?.assignment?.roverId,c=ip(i?[i]:[]),r=i?c[i]:null,f=Ur(i),m=(i&&u?.roster?u.roster.find(b=>String(b.id)===String(i)):null)?.battery??null;return y.jsx("section",{className:"rounded-sm bg-[#242a32] p-1",children:i?y.jsx("div",{className:"w-full",children:y.jsx(up,{sessionInfo:r,label:i,muted:!1,telemetryFrame:f,batteryConfig:m})}):y.jsx("p",{className:"text-sm text-slate-400",children:"Assign a rover to view the video feed."})})}const U1=[{key:"start",label:"Start OI"},{key:"safe",label:"Safe"},{key:"full",label:"Full"},{key:"passive",label:"Passive"},{key:"dock",label:"Dock"}];function B1(){const{roverId:u,sendOiCommand:i}=Uu(),c=ei(),r=!!u,f=E.useMemo(()=>[{key:"start",label:"Enable stream",enable:!0},{key:"stop",label:"Disable stream",enable:!1}],[]),d=m=>{u&&c.emit("command",{roverId:u,type:"sensorStream",data:{sensorStream:{enable:m}}})};return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[y.jsx("p",{className:"text-xs text-slate-400",children:"Manual OI commands"}),y.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:U1.map(m=>y.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))})]}),y.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[y.jsx("p",{className:"text-xs text-slate-400",children:"Sensor stream"}),y.jsx("div",{className:"mt-1 flex gap-1",children:f.map(m=>y.jsx("button",{type:"button",onClick:()=>d(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&&y.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Assign a rover to toggle streams."})]}),y.jsx(Yr,{}),y.jsx(Bu,{})]})}function L1({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 y.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[y.jsx("p",{className:"text-sm text-slate-400",children:"Help"}),y.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:c.map(r=>y.jsx("li",{className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200",children:r},r))})]})}function _u({active:u,onClick:i,children:c}){return y.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 H1(){return y.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[y.jsx("p",{className:"text-xs text-slate-400",children:"Room controls"}),y.jsx("p",{className:"text-sm text-slate-200",children:"Coming soon: lighting, docks, and environmental toggles."})]})}function q1({layout:u}){const[i,c]=E.useState("telemetry");return y.jsxs("section",{className:"rounded-sm bg-[#1a1d23] p-1 text-base text-slate-100",children:[y.jsxs("div",{className:"flex gap-1",children:[y.jsx(_u,{active:i==="telemetry",onClick:()=>c("telemetry"),children:"Rover Controls"}),y.jsx(_u,{active:i==="room",onClick:()=>c("room"),children:"Room Controls"}),y.jsx(_u,{active:i==="advanced",onClick:()=>c("advanced"),children:"Advanced"}),y.jsx(_u,{active:i==="help",onClick:()=>c("help"),children:"Help"})]}),y.jsxs("div",{className:"mt-1 space-y-1",children:[i==="telemetry"&&y.jsxs("div",{className:"space-y-1",children:[y.jsx(Br,{}),y.jsx(Lr,{})]}),i==="room"&&y.jsxs("div",{className:"space-y-1",children:[y.jsx(Hr,{}),y.jsx(H1,{})]}),i==="advanced"&&y.jsx(B1,{}),i==="help"&&y.jsx(L1,{layout:u})]})]})}function Y1(){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 k1({layout:u}){return y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsxs("section",{className:"grid grid-cols-[minmax(0,1.8fr)_minmax(0,1fr)] gap-1",children:[y.jsx(kr,{}),y.jsx(q1,{layout:u})]}),y.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[y.jsx(Bu,{}),y.jsx(qr,{})]})]})}function X1(){return y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx(kr,{}),y.jsx(A1,{}),y.jsx(Lr,{}),y.jsx(Br,{}),y.jsx(Yr,{}),y.jsx(Bu,{}),y.jsx(Hr,{}),y.jsx(qr,{})]})}function G1(){return y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsxs("section",{className:"grid grid-cols-[minmax(0,0.7fr)_minmax(0,2.1fr)_minmax(0,0.7fr)] gap-1",children:[y.jsx("div",{className:"flex flex-col gap-1",children:y.jsx(ap,{})}),y.jsx(kr,{}),y.jsx("div",{className:"flex flex-col gap-1",children:y.jsx(lp,{})})]}),y.jsx(Hr,{}),y.jsx(Lr,{}),y.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx(Yr,{}),y.jsx(Bu,{})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx(qr,{}),y.jsx(Br,{})]})]})]})}function V1(){const u=Y1(),i=u==="desktop"?y.jsx(k1,{layout:u}):u==="mobile-landscape"?y.jsx(G1,{}):y.jsx(X1,{});return y.jsx("div",{className:"min-h-screen bg-black text-slate-50",children:y.jsxs(m1,{children:[y.jsx("main",{className:"flex w-full flex-col gap-1 px-1 py-1 text-base",children:i}),y.jsx(v1,{})]})})}function Q1(){const{session:u,setRole:i,subscribeAll:c}=fn(),[r,f]=E.useState(!1);return E.useEffect(()=>{let d=!1;async function m(){try{u?.role!=="spectator"&&await i("spectator"),await c(),d||f(!0)}catch(b){console.error("Failed to enter spectator mode",b)}}return m(),()=>{d=!0}},[u?.role,i,c]),r}function Z1({connected:u,ready:i,rosterCount:c}){return y.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[y.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"}),y.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…"]}),y.jsxs("span",{className:"rounded-full bg-slate-800 px-3 py-1 text-slate-200",children:["Rovers: ",c]})]})}function K1({logs:u}){return y.jsxs("section",{className:"rounded-3xl border border-slate-800 bg-slate-900/70 p-4",children:[y.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[y.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),y.jsxs("span",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:["latest ",u.length]})]}),y.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?y.jsx("p",{children:"No log entries yet."}):u.slice().reverse().map(i=>y.jsxs("div",{className:"mb-2",children:[y.jsx("span",{className:"text-slate-500",children:i.timestamp})," ",y.jsxs("span",{className:"text-cyan-300",children:["[",i.level,"]"]})," ",i.label&&y.jsxs("span",{className:"text-pink-300",children:["[",i.label,"]"]})," ",y.jsx("span",{children:i.message})]},i.id))})]})}function J1(u={}){return Object.entries(u).map(([i,c])=>({key:i,value:typeof c=="object"?JSON.stringify(c):c}))}function $1({rover:u,frame:i,videoInfo:c}){const r=J1(i?.sensors);return y.jsxs("article",{className:"space-y-4 rounded-3xl border border-slate-800 bg-slate-900/70 p-5",children:[y.jsxs("header",{className:"flex flex-col gap-1",children:[y.jsx("h3",{className:"text-2xl font-semibold text-white",children:u.name}),y.jsx("p",{className:"text-sm text-slate-400",children:i?.receivedAt?`Updated ${new Date(i.receivedAt).toLocaleTimeString()}`:"Waiting for telemetry…"})]}),y.jsx(up,{sessionInfo:c,label:u.name,forceMute:!0}),y.jsxs("section",{className:"rounded-2xl border border-slate-800/80 bg-slate-950/50 p-4",children:[y.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Telemetry"}),r.length===0?y.jsx("p",{className:"mt-3 text-sm text-slate-400",children:"No sensor data yet."}):y.jsx("dl",{className:"mt-3 grid gap-2 text-sm text-slate-200",children:r.map(({key:f,value:d})=>y.jsxs("div",{className:"flex justify-between gap-4",children:[y.jsx("dt",{className:"text-slate-500",children:f}),y.jsx("dd",{className:"text-right font-semibold text-white",children:d})]},f))})]})]})}function W1(){const{connected:u,session:i,logs:c}=fn(),r=Q1(),f=tp(),d=i?.roster??[],m=ip(d.map(p=>p.id)),b=E.useMemo(()=>({connected:u,ready:r,rosterCount:d.length}),[u,r,d.length]);return y.jsx("div",{className:"min-h-screen bg-slate-950 text-slate-50",children:y.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-6 px-6 py-10",children:[y.jsxs("header",{className:"space-y-3",children:[y.jsx("h1",{className:"text-4xl font-semibold text-white",children:"Spectator Console"}),y.jsx("p",{className:"text-slate-400",children:"Live rover telemetry & logs. This view is read-only."}),y.jsx(Z1,{...b})]}),y.jsx("section",{className:"grid gap-6 lg:grid-cols-3",children:d.length===0?y.jsx("p",{className:"col-span-full text-slate-400",children:"No rovers registered."}):d.map(p=>y.jsx($1,{rover:p,frame:f[p.id],videoInfo:m[p.id]},p.id))}),y.jsx(K1,{logs:c})]})})}q0.createRoot(document.getElementById("root")).render(y.jsx(E.StrictMode,{children:y.jsx(l1,{children:y.jsx(i1,{children:y.jsx(u1,{children:y.jsx(eg,{children:y.jsxs(Mv,{children:[y.jsx(yr,{path:"/",element:y.jsx(V1,{})}),y.jsx(yr,{path:"/spectate",element:y.jsx(W1,{})})]})})})})})}));
|