night-orch 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +0,0 @@
1
- (function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const g of h.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&r(g)}).observe(document,{childList:!0,subtree:!0});function i(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(f){if(f.ep)return;f.ep=!0;const h=i(f);fetch(f.href,h)}})();function cg(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var rr={exports:{}},Js={};var zm;function og(){if(zm)return Js;zm=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function i(r,f,h){var g=null;if(h!==void 0&&(g=""+h),f.key!==void 0&&(g=""+f.key),"key"in f){h={};for(var v in f)v!=="key"&&(h[v]=f[v])}else h=f;return f=h.ref,{$$typeof:l,type:r,key:g,ref:f!==void 0?f:null,props:h}}return Js.Fragment=u,Js.jsx=i,Js.jsxs=i,Js}var Dm;function rg(){return Dm||(Dm=1,rr.exports=og()),rr.exports}var o=rg(),fr={exports:{}},de={};var Lm;function fg(){if(Lm)return de;Lm=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function j(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,A={};function C(R,Y,F){this.props=R,this.context=Y,this.refs=A,this.updater=F||_}C.prototype.isReactComponent={},C.prototype.setState=function(R,Y){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,Y,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function X(){}X.prototype=C.prototype;function Z(R,Y,F){this.props=R,this.context=Y,this.refs=A,this.updater=F||_}var J=Z.prototype=new X;J.constructor=Z,E(J,C.prototype),J.isPureReactComponent=!0;var I=Array.isArray;function P(){}var Q={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function B(R,Y,F){var K=F.ref;return{$$typeof:l,type:R,key:Y,ref:K!==void 0?K:null,props:F}}function se(R,Y){return B(R.type,Y,R.props)}function ee(R){return typeof R=="object"&&R!==null&&R.$$typeof===l}function ce(R){var Y={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(F){return Y[F]})}var be=/\/+/g;function Ye(R,Y){return typeof R=="object"&&R!==null&&R.key!=null?ce(""+R.key):Y.toString(36)}function Ee(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(P,P):(R.status="pending",R.then(function(Y){R.status==="pending"&&(R.status="fulfilled",R.value=Y)},function(Y){R.status==="pending"&&(R.status="rejected",R.reason=Y)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function H(R,Y,F,K,oe){var re=typeof R;(re==="undefined"||re==="boolean")&&(R=null);var pe=!1;if(R===null)pe=!0;else switch(re){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(R.$$typeof){case l:case u:pe=!0;break;case S:return pe=R._init,H(pe(R._payload),Y,F,K,oe)}}if(pe)return oe=oe(R),pe=K===""?"."+Ye(R,0):K,I(oe)?(F="",pe!=null&&(F=pe.replace(be,"$&/")+"/"),H(oe,Y,F,"",function(St){return St})):oe!=null&&(ee(oe)&&(oe=se(oe,F+(oe.key==null||R&&R.key===oe.key?"":(""+oe.key).replace(be,"$&/")+"/")+pe)),Y.push(oe)),1;pe=0;var He=K===""?".":K+":";if(I(R))for(var Ue=0;Ue<R.length;Ue++)K=R[Ue],re=He+Ye(K,Ue),pe+=H(K,Y,F,re,oe);else if(Ue=j(R),typeof Ue=="function")for(R=Ue.call(R),Ue=0;!(K=R.next()).done;)K=K.value,re=He+Ye(K,Ue++),pe+=H(K,Y,F,re,oe);else if(re==="object"){if(typeof R.then=="function")return H(Ee(R),Y,F,K,oe);throw Y=String(R),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return pe}function $(R,Y,F){if(R==null)return R;var K=[],oe=0;return H(R,K,"","",function(re){return Y.call(F,re,oe++)}),K}function le(R){if(R._status===-1){var Y=R._result;Y=Y(),Y.then(function(F){(R._status===0||R._status===-1)&&(R._status=1,R._result=F)},function(F){(R._status===0||R._status===-1)&&(R._status=2,R._result=F)}),R._status===-1&&(R._status=0,R._result=Y)}if(R._status===1)return R._result.default;throw R._result}var Te=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},ye={map:$,forEach:function(R,Y,F){$(R,function(){Y.apply(this,arguments)},F)},count:function(R){var Y=0;return $(R,function(){Y++}),Y},toArray:function(R){return $(R,function(Y){return Y})||[]},only:function(R){if(!ee(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return de.Activity=y,de.Children=ye,de.Component=C,de.Fragment=i,de.Profiler=f,de.PureComponent=Z,de.StrictMode=r,de.Suspense=p,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,de.__COMPILER_RUNTIME={__proto__:null,c:function(R){return Q.H.useMemoCache(R)}},de.cache=function(R){return function(){return R.apply(null,arguments)}},de.cacheSignal=function(){return null},de.cloneElement=function(R,Y,F){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var K=E({},R.props),oe=R.key;if(Y!=null)for(re in Y.key!==void 0&&(oe=""+Y.key),Y)!q.call(Y,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&Y.ref===void 0||(K[re]=Y[re]);var re=arguments.length-2;if(re===1)K.children=F;else if(1<re){for(var pe=Array(re),He=0;He<re;He++)pe[He]=arguments[He+2];K.children=pe}return B(R.type,oe,K)},de.createContext=function(R){return R={$$typeof:g,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:h,_context:R},R},de.createElement=function(R,Y,F){var K,oe={},re=null;if(Y!=null)for(K in Y.key!==void 0&&(re=""+Y.key),Y)q.call(Y,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(oe[K]=Y[K]);var pe=arguments.length-2;if(pe===1)oe.children=F;else if(1<pe){for(var He=Array(pe),Ue=0;Ue<pe;Ue++)He[Ue]=arguments[Ue+2];oe.children=He}if(R&&R.defaultProps)for(K in pe=R.defaultProps,pe)oe[K]===void 0&&(oe[K]=pe[K]);return B(R,re,oe)},de.createRef=function(){return{current:null}},de.forwardRef=function(R){return{$$typeof:v,render:R}},de.isValidElement=ee,de.lazy=function(R){return{$$typeof:S,_payload:{_status:-1,_result:R},_init:le}},de.memo=function(R,Y){return{$$typeof:m,type:R,compare:Y===void 0?null:Y}},de.startTransition=function(R){var Y=Q.T,F={};Q.T=F;try{var K=R(),oe=Q.S;oe!==null&&oe(F,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(P,Te)}catch(re){Te(re)}finally{Y!==null&&F.types!==null&&(Y.types=F.types),Q.T=Y}},de.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},de.use=function(R){return Q.H.use(R)},de.useActionState=function(R,Y,F){return Q.H.useActionState(R,Y,F)},de.useCallback=function(R,Y){return Q.H.useCallback(R,Y)},de.useContext=function(R){return Q.H.useContext(R)},de.useDebugValue=function(){},de.useDeferredValue=function(R,Y){return Q.H.useDeferredValue(R,Y)},de.useEffect=function(R,Y){return Q.H.useEffect(R,Y)},de.useEffectEvent=function(R){return Q.H.useEffectEvent(R)},de.useId=function(){return Q.H.useId()},de.useImperativeHandle=function(R,Y,F){return Q.H.useImperativeHandle(R,Y,F)},de.useInsertionEffect=function(R,Y){return Q.H.useInsertionEffect(R,Y)},de.useLayoutEffect=function(R,Y){return Q.H.useLayoutEffect(R,Y)},de.useMemo=function(R,Y){return Q.H.useMemo(R,Y)},de.useOptimistic=function(R,Y){return Q.H.useOptimistic(R,Y)},de.useReducer=function(R,Y,F){return Q.H.useReducer(R,Y,F)},de.useRef=function(R){return Q.H.useRef(R)},de.useState=function(R){return Q.H.useState(R)},de.useSyncExternalStore=function(R,Y,F){return Q.H.useSyncExternalStore(R,Y,F)},de.useTransition=function(){return Q.H.useTransition()},de.version="19.2.4",de}var Um;function ri(){return Um||(Um=1,fr.exports=fg()),fr.exports}var U=ri();const Pl=cg(U);var dr={exports:{}},$s={},hr={exports:{}},mr={};var Bm;function dg(){return Bm||(Bm=1,(function(l){function u(H,$){var le=H.length;H.push($);e:for(;0<le;){var Te=le-1>>>1,ye=H[Te];if(0<f(ye,$))H[Te]=$,H[le]=ye,le=Te;else break e}}function i(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var $=H[0],le=H.pop();if(le!==$){H[0]=le;e:for(var Te=0,ye=H.length,R=ye>>>1;Te<R;){var Y=2*(Te+1)-1,F=H[Y],K=Y+1,oe=H[K];if(0>f(F,le))K<ye&&0>f(oe,F)?(H[Te]=oe,H[K]=le,Te=K):(H[Te]=F,H[Y]=le,Te=Y);else if(K<ye&&0>f(oe,le))H[Te]=oe,H[K]=le,Te=K;else break e}}return $}function f(H,$){var le=H.sortIndex-$.sortIndex;return le!==0?le:H.id-$.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;l.unstable_now=function(){return h.now()}}else{var g=Date,v=g.now();l.unstable_now=function(){return g.now()-v}}var p=[],m=[],S=1,y=null,x=3,j=!1,_=!1,E=!1,A=!1,C=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function J(H){for(var $=i(m);$!==null;){if($.callback===null)r(m);else if($.startTime<=H)r(m),$.sortIndex=$.expirationTime,u(p,$);else break;$=i(m)}}function I(H){if(E=!1,J(H),!_)if(i(p)!==null)_=!0,P||(P=!0,ce());else{var $=i(m);$!==null&&Ee(I,$.startTime-H)}}var P=!1,Q=-1,q=5,B=-1;function se(){return A?!0:!(l.unstable_now()-B<q)}function ee(){if(A=!1,P){var H=l.unstable_now();B=H;var $=!0;try{e:{_=!1,E&&(E=!1,X(Q),Q=-1),j=!0;var le=x;try{t:{for(J(H),y=i(p);y!==null&&!(y.expirationTime>H&&se());){var Te=y.callback;if(typeof Te=="function"){y.callback=null,x=y.priorityLevel;var ye=Te(y.expirationTime<=H);if(H=l.unstable_now(),typeof ye=="function"){y.callback=ye,J(H),$=!0;break t}y===i(p)&&r(p),J(H)}else r(p);y=i(p)}if(y!==null)$=!0;else{var R=i(m);R!==null&&Ee(I,R.startTime-H),$=!1}}break e}finally{y=null,x=le,j=!1}$=void 0}}finally{$?ce():P=!1}}}var ce;if(typeof Z=="function")ce=function(){Z(ee)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,Ye=be.port2;be.port1.onmessage=ee,ce=function(){Ye.postMessage(null)}}else ce=function(){C(ee,0)};function Ee(H,$){Q=C(function(){H(l.unstable_now())},$)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(H){H.callback=null},l.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<H?Math.floor(1e3/H):5},l.unstable_getCurrentPriorityLevel=function(){return x},l.unstable_next=function(H){switch(x){case 1:case 2:case 3:var $=3;break;default:$=x}var le=x;x=$;try{return H()}finally{x=le}},l.unstable_requestPaint=function(){A=!0},l.unstable_runWithPriority=function(H,$){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var le=x;x=H;try{return $()}finally{x=le}},l.unstable_scheduleCallback=function(H,$,le){var Te=l.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?Te+le:Te):le=Te,H){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=le+ye,H={id:S++,callback:$,priorityLevel:H,startTime:le,expirationTime:ye,sortIndex:-1},le>Te?(H.sortIndex=le,u(m,H),i(p)===null&&H===i(m)&&(E?(X(Q),Q=-1):E=!0,Ee(I,le-Te))):(H.sortIndex=ye,u(p,H),_||j||(_=!0,P||(P=!0,ce()))),H},l.unstable_shouldYield=se,l.unstable_wrapCallback=function(H){var $=x;return function(){var le=x;x=$;try{return H.apply(this,arguments)}finally{x=le}}}})(mr)),mr}var Hm;function hg(){return Hm||(Hm=1,hr.exports=dg()),hr.exports}var pr={exports:{}},bt={};var km;function mg(){if(km)return bt;km=1;var l=ri();function u(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)m+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(u(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(p,m,S){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:y==null?null:""+y,children:p,containerInfo:m,implementation:S}}var g=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,bt.createPortal=function(p,m){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(u(299));return h(p,m,null,S)},bt.flushSync=function(p){var m=g.T,S=r.p;try{if(g.T=null,r.p=2,p)return p()}finally{g.T=m,r.p=S,r.d.f()}},bt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},bt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},bt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var S=m.as,y=v(S,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;S==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:j}):S==="script"&&r.d.X(p,{crossOrigin:y,integrity:x,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},bt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var S=v(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},bt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var S=m.as,y=v(S,m.crossOrigin);r.d.L(p,S,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},bt.preloadModule=function(p,m){if(typeof p=="string")if(m){var S=v(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},bt.requestFormReset=function(p){r.d.r(p)},bt.unstable_batchedUpdates=function(p,m){return p(m)},bt.useFormState=function(p,m,S){return g.H.useFormState(p,m,S)},bt.useFormStatus=function(){return g.H.useHostTransitionStatus()},bt.version="19.2.4",bt}var qm;function Np(){if(qm)return pr.exports;qm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),pr.exports=mg(),pr.exports}var Ym;function pg(){if(Ym)return $s;Ym=1;var l=hg(),u=ri(),i=Np();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function g(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 v(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(h(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,n=t;;){var s=a.return;if(s===null)break;var c=s.alternate;if(c===null){if(n=s.return,n!==null){a=n;continue}break}if(s.child===c.child){for(c=s.child;c;){if(c===a)return p(s),e;if(c===n)return p(s),t;c=c.sibling}throw Error(r(188))}if(a.return!==n.return)a=s,n=c;else{for(var d=!1,b=s.child;b;){if(b===a){d=!0,a=s,n=c;break}if(b===n){d=!0,n=s,a=c;break}b=b.sibling}if(!d){for(b=c.child;b;){if(b===a){d=!0,a=c,n=s;break}if(b===n){d=!0,n=c,a=s;break}b=b.sibling}if(!d)throw Error(r(189))}}if(a.alternate!==n)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function ce(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var be=Symbol.for("react.client.reference");function Ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===be?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case C:return"Profiler";case A:return"StrictMode";case I:return"Suspense";case P:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case Z:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:Ye(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return Ye(e(t))}catch{}}return null}var Ee=Array.isArray,H=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},Te=[],ye=-1;function R(e){return{current:e}}function Y(e){0>ye||(e.current=Te[ye],Te[ye]=null,ye--)}function F(e,t){ye++,Te[ye]=e.current,e.current=t}var K=R(null),oe=R(null),re=R(null),pe=R(null);function He(e,t){switch(F(re,t),F(oe,e),F(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?am(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=am(t),e=nm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(K),F(K,e)}function Ue(){Y(K),Y(oe),Y(re)}function St(e){e.memoizedState!==null&&F(pe,e);var t=K.current,a=nm(t,e.type);t!==a&&(F(oe,e),F(K,a))}function Pt(e){oe.current===e&&(Y(K),Y(oe)),pe.current===e&&(Y(pe),Qs._currentValue=le)}var la,On;function gt(e){if(la===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);la=t&&t[1]||"",On=-1<a.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+la+e+On}var sa=!1;function ia(e,t){if(!e||sa)return"";sa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(L){var D=L}Reflect.construct(e,[],V)}else{try{V.call()}catch(L){D=L}e.call(V.prototype)}}else{try{throw Error()}catch(L){D=L}(V=e())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(L){if(L&&D&&typeof L.stack=="string")return[L.stack,D.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),d=c[0],b=c[1];if(d&&b){var N=d.split(`
4
- `),z=b.split(`
5
- `);for(s=n=0;n<N.length&&!N[n].includes("DetermineComponentFrameRoot");)n++;for(;s<z.length&&!z[s].includes("DetermineComponentFrameRoot");)s++;if(n===N.length||s===z.length)for(n=N.length-1,s=z.length-1;1<=n&&0<=s&&N[n]!==z[s];)s--;for(;1<=n&&0<=s;n--,s--)if(N[n]!==z[s]){if(n!==1||s!==1)do if(n--,s--,0>s||N[n]!==z[s]){var k=`
6
- `+N[n].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=n&&0<=s);break}}}finally{sa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?gt(a):""}function ua(e,t){switch(e.tag){case 26:case 27:case 5:return gt(e.type);case 16:return gt("Lazy");case 13:return e.child!==t&&t!==null?gt("Suspense Fallback"):gt("Suspense");case 19:return gt("SuspenseList");case 0:case 15:return ia(e.type,!1);case 11:return ia(e.type.render,!1);case 1:return ia(e.type,!0);case 31:return gt("Activity");default:return""}}function Ht(e){try{var t="",a=null;do t+=ua(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
7
- Error generating stack: `+n.message+`
8
- `+n.stack}}var vt=Object.prototype.hasOwnProperty,ga=l.unstable_scheduleCallback,Za=l.unstable_cancelCallback,va=l.unstable_shouldYield,Ka=l.unstable_requestPaint,fe=l.unstable_now,Pe=l.unstable_getCurrentPriorityLevel,jt=l.unstable_ImmediatePriority,rl=l.unstable_UserBlockingPriority,Ja=l.unstable_NormalPriority,Wu=l.unstable_LowPriority,ya=l.unstable_IdlePriority,zn=l.log,ca=l.unstable_setDisableYieldValue,xa=null,ot=null;function kt(e){if(typeof zn=="function"&&ca(e),ot&&typeof ot.setStrictMode=="function")try{ot.setStrictMode(xa,e)}catch{}}var $e=Math.clz32?Math.clz32:fl,lt=Math.log,Dn=Math.LN2;function fl(e){return e>>>=0,e===0?32:31-(lt(e)/Dn|0)|0}var $a=256,Wt=262144,dl=4194304;function pt(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 Ln(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var s=0,c=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var b=n&134217727;return b!==0?(n=b&~c,n!==0?s=pt(n):(d&=b,d!==0?s=pt(d):a||(a=b&~e,a!==0&&(s=pt(a))))):(b=n&~c,b!==0?s=pt(b):d!==0?s=pt(d):a||(a=n&~e,a!==0&&(s=pt(a)))),s===0?0:t!==0&&t!==s&&(t&c)===0&&(c=s&-s,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:s}function Sa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ja(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 ts(){var e=dl;return dl<<=1,(dl&62914560)===0&&(dl=4194304),e}function oa(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function qt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function di(e,t,a,n,s,c){var d=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,N=e.expirationTimes,z=e.hiddenUpdates;for(a=d&~a;0<a;){var k=31-$e(a),V=1<<k;b[k]=0,N[k]=-1;var D=z[k];if(D!==null)for(z[k]=null,k=0;k<D.length;k++){var L=D[k];L!==null&&(L.lane&=-536870913)}a&=~V}n!==0&&Un(e,n,0),c!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=c&~(d&~t))}function Un(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-$e(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function Na(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-$e(a),s=1<<n;s&t|e[n]&t&&(e[n]|=t),a&=~s}}function hi(e,t){var a=t&-t;return a=(a&42)!==0?1:Bn(a),(a&(e.suspendedLanes|t))!==0?0:a}function Bn(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 Re(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function mi(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:_m(e.type))}function as(e,t){var a=$.p;try{return $.p=e,t()}finally{$.p=a}}var ea=Math.random().toString(36).slice(2),st="__reactFiber$"+ea,rt="__reactProps$"+ea,Fa="__reactContainer$"+ea,ns="__reactEvents$"+ea,ec="__reactListeners$"+ea,tc="__reactHandles$"+ea,pi="__reactResources$"+ea,Hn="__reactMarker$"+ea;function ls(e){delete e[st],delete e[rt],delete e[ns],delete e[ec],delete e[tc]}function Ia(e){var t=e[st];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Fa]||a[st]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=rm(e);e!==null;){if(a=e[st])return a;e=rm(e)}return t}e=a,a=e.parentNode}return null}function Pa(e){if(e=e[st]||e[Fa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function kn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Wa(e){var t=e[pi];return t||(t=e[pi]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function We(e){e[Hn]=!0}var bi=new Set,gi={};function Ra(e,t){en(e,t),en(e+"Capture",t)}function en(e,t){for(gi[e]=t,e=0;e<t.length;e++)bi.add(t[e])}var ac=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]*$"),vi={},w={};function W(e){return vt.call(w,e)?!0:vt.call(vi,e)?!1:ac.test(e)?w[e]=!0:(vi[e]=!0,!1)}function Ge(e,t,a){if(W(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ut(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Oe(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function xe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ra(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ss(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){a=""+d,c.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(d){a=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function is(e){if(!e._valueTracker){var t=ra(e)?"checked":"value";e._valueTracker=ss(e,t,""+e[t])}}function Jr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=ra(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function yi(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 ab=/[\n"\\]/g;function Yt(e){return e.replace(ab,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nc(e,t,a,n,s,c,d,b){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xe(t)):e.value!==""+xe(t)&&(e.value=""+xe(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?lc(e,d,xe(t)):a!=null?lc(e,d,xe(a)):n!=null&&e.removeAttribute("value"),s==null&&c!=null&&(e.defaultChecked=!!c),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+xe(b):e.removeAttribute("name")}function $r(e,t,a,n,s,c,d,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){is(e);return}a=a!=null?""+xe(a):"",t=t!=null?""+xe(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}n=n??s,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=b?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),is(e)}function lc(e,t,a){t==="number"&&yi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function hl(e,t,a,n){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&n&&(e[a].defaultSelected=!0)}else{for(a=""+xe(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Fr(e,t,a){if(t!=null&&(t=""+xe(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+xe(a):""}function Ir(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(r(92));if(Ee(n)){if(1<n.length)throw Error(r(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=xe(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),is(e)}function ml(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var nb=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 Pr(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||nb.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Wr(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var s in t)n=t[s],t.hasOwnProperty(s)&&a[s]!==n&&Pr(e,s,n)}else for(var c in t)t.hasOwnProperty(c)&&Pr(e,c,t[c])}function sc(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 lb=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"]]),sb=/^[\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 xi(e){return sb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ta(){}var ic=null;function uc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pl=null,bl=null;function ef(e){var t=Pa(e);if(t&&(e=t.stateNode)){var a=e[rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(nc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Yt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var s=n[rt]||null;if(!s)throw Error(r(90));nc(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&Jr(n)}break e;case"textarea":Fr(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&hl(e,!!a.multiple,t,!1)}}}var cc=!1;function tf(e,t,a){if(cc)return e(t,a);cc=!0;try{var n=e(t);return n}finally{if(cc=!1,(pl!==null||bl!==null)&&(uu(),pl&&(t=pl,e=bl,bl=pl=null,ef(t),e)))for(t=0;t<e.length;t++)ef(e[t])}}function us(e,t){var a=e.stateNode;if(a===null)return null;var n=a[rt]||null;if(n===null)return null;a=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var _a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oc=!1;if(_a)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){oc=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{oc=!1}var tn=null,rc=null,Si=null;function af(){if(Si)return Si;var e,t=rc,a=t.length,n,s="value"in tn?tn.value:tn.textContent,c=s.length;for(e=0;e<a&&t[e]===s[e];e++);var d=a-e;for(n=1;n<=d&&t[a-n]===s[c-n];n++);return Si=s.slice(e,1<n?1-n:void 0)}function ji(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 Ni(){return!0}function nf(){return!1}function Nt(e){function t(a,n,s,c,d){this._reactName=a,this._targetInst=s,this.type=n,this.nativeEvent=c,this.target=d,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ni:nf,this.isPropagationStopped=nf,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ni)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ni)},persist:function(){},isPersistent:Ni}),t}var qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ri=Nt(qn),os=y({},qn,{view:0,detail:0}),ib=Nt(os),fc,dc,rs,Ti=y({},os,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mc,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!==rs&&(rs&&e.type==="mousemove"?(fc=e.screenX-rs.screenX,dc=e.screenY-rs.screenY):dc=fc=0,rs=e),fc)},movementY:function(e){return"movementY"in e?e.movementY:dc}}),lf=Nt(Ti),ub=y({},Ti,{dataTransfer:0}),cb=Nt(ub),ob=y({},os,{relatedTarget:0}),hc=Nt(ob),rb=y({},qn,{animationName:0,elapsedTime:0,pseudoElement:0}),fb=Nt(rb),db=y({},qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hb=Nt(db),mb=y({},qn,{data:0}),sf=Nt(mb),pb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bb={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"},gb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gb[e])?!!t[e]:!1}function mc(){return vb}var yb=y({},os,{key:function(e){if(e.key){var t=pb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ji(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mc,charCode:function(e){return e.type==="keypress"?ji(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ji(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xb=Nt(yb),Sb=y({},Ti,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uf=Nt(Sb),jb=y({},os,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mc}),Nb=Nt(jb),Rb=y({},qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tb=Nt(Rb),_b=y({},Ti,{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}),Mb=Nt(_b),Eb=y({},qn,{newState:0,oldState:0}),Cb=Nt(Eb),Ab=[9,13,27,32],pc=_a&&"CompositionEvent"in window,fs=null;_a&&"documentMode"in document&&(fs=document.documentMode);var wb=_a&&"TextEvent"in window&&!fs,cf=_a&&(!pc||fs&&8<fs&&11>=fs),of=" ",rf=!1;function ff(e,t){switch(e){case"keyup":return Ab.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function df(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gl=!1;function Ob(e,t){switch(e){case"compositionend":return df(t);case"keypress":return t.which!==32?null:(rf=!0,of);case"textInput":return e=t.data,e===of&&rf?null:e;default:return null}}function zb(e,t){if(gl)return e==="compositionend"||!pc&&ff(e,t)?(e=af(),Si=rc=tn=null,gl=!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 cf&&t.locale!=="ko"?null:t.data;default:return null}}var Db={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 hf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Db[e.type]:t==="textarea"}function mf(e,t,a,n){pl?bl?bl.push(n):bl=[n]:pl=n,t=mu(t,"onChange"),0<t.length&&(a=new Ri("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var ds=null,hs=null;function Lb(e){Fh(e,0)}function _i(e){var t=kn(e);if(Jr(t))return e}function pf(e,t){if(e==="change")return t}var bf=!1;if(_a){var bc;if(_a){var gc="oninput"in document;if(!gc){var gf=document.createElement("div");gf.setAttribute("oninput","return;"),gc=typeof gf.oninput=="function"}bc=gc}else bc=!1;bf=bc&&(!document.documentMode||9<document.documentMode)}function vf(){ds&&(ds.detachEvent("onpropertychange",yf),hs=ds=null)}function yf(e){if(e.propertyName==="value"&&_i(hs)){var t=[];mf(t,hs,e,uc(e)),tf(Lb,t)}}function Ub(e,t,a){e==="focusin"?(vf(),ds=t,hs=a,ds.attachEvent("onpropertychange",yf)):e==="focusout"&&vf()}function Bb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _i(hs)}function Hb(e,t){if(e==="click")return _i(t)}function kb(e,t){if(e==="input"||e==="change")return _i(t)}function qb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var At=typeof Object.is=="function"?Object.is:qb;function ms(e,t){if(At(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var s=a[n];if(!vt.call(t,s)||!At(e[s],t[s]))return!1}return!0}function xf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sf(e,t){var a=xf(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=xf(a)}}function jf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yi(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=yi(e.document)}return t}function vc(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 Yb=_a&&"documentMode"in document&&11>=document.documentMode,vl=null,yc=null,ps=null,xc=!1;function Rf(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;xc||vl==null||vl!==yi(n)||(n=vl,"selectionStart"in n&&vc(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ps&&ms(ps,n)||(ps=n,n=mu(yc,"onSelect"),0<n.length&&(t=new Ri("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=vl)))}function Yn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var yl={animationend:Yn("Animation","AnimationEnd"),animationiteration:Yn("Animation","AnimationIteration"),animationstart:Yn("Animation","AnimationStart"),transitionrun:Yn("Transition","TransitionRun"),transitionstart:Yn("Transition","TransitionStart"),transitioncancel:Yn("Transition","TransitionCancel"),transitionend:Yn("Transition","TransitionEnd")},Sc={},Tf={};_a&&(Tf=document.createElement("div").style,"AnimationEvent"in window||(delete yl.animationend.animation,delete yl.animationiteration.animation,delete yl.animationstart.animation),"TransitionEvent"in window||delete yl.transitionend.transition);function Gn(e){if(Sc[e])return Sc[e];if(!yl[e])return e;var t=yl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Tf)return Sc[e]=t[a];return e}var _f=Gn("animationend"),Mf=Gn("animationiteration"),Ef=Gn("animationstart"),Gb=Gn("transitionrun"),Vb=Gn("transitionstart"),Qb=Gn("transitioncancel"),Cf=Gn("transitionend"),Af=new Map,jc="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(" ");jc.push("scrollEnd");function ta(e,t){Af.set(e,t),Ra(t,[e])}var Mi=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)},Gt=[],xl=0,Nc=0;function Ei(){for(var e=xl,t=Nc=xl=0;t<e;){var a=Gt[t];Gt[t++]=null;var n=Gt[t];Gt[t++]=null;var s=Gt[t];Gt[t++]=null;var c=Gt[t];if(Gt[t++]=null,n!==null&&s!==null){var d=n.pending;d===null?s.next=s:(s.next=d.next,d.next=s),n.pending=s}c!==0&&wf(a,s,c)}}function Ci(e,t,a,n){Gt[xl++]=e,Gt[xl++]=t,Gt[xl++]=a,Gt[xl++]=n,Nc|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Rc(e,t,a,n){return Ci(e,t,a,n),Ai(e)}function Vn(e,t){return Ci(e,null,null,t),Ai(e)}function wf(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var s=!1,c=e.return;c!==null;)c.childLanes|=a,n=c.alternate,n!==null&&(n.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(s=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,s&&t!==null&&(s=31-$e(a),e=c.hiddenUpdates,n=e[s],n===null?e[s]=[t]:n.push(t),t.lane=a|536870912),c):null}function Ai(e){if(50<Bs)throw Bs=0,Do=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Sl={};function Xb(e,t,a,n){this.tag=e,this.key=a,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wt(e,t,a,n){return new Xb(e,t,a,n)}function Tc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ma(e,t){var a=e.alternate;return a===null?(a=wt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Of(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function wi(e,t,a,n,s,c){var d=0;if(n=e,typeof e=="function")Tc(e)&&(d=1);else if(typeof e=="string")d=F0(e,a,K.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=wt(31,a,t,s),e.elementType=B,e.lanes=c,e;case E:return Qn(a.children,s,c,t);case A:d=8,s|=24;break;case C:return e=wt(12,a,t,s|2),e.elementType=C,e.lanes=c,e;case I:return e=wt(13,a,t,s),e.elementType=I,e.lanes=c,e;case P:return e=wt(19,a,t,s),e.elementType=P,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:d=10;break e;case X:d=9;break e;case J:d=11;break e;case Q:d=14;break e;case q:d=16,n=null;break e}d=29,a=Error(r(130,e===null?"null":typeof e,"")),n=null}return t=wt(d,a,t,s),t.elementType=e,t.type=n,t.lanes=c,t}function Qn(e,t,a,n){return e=wt(7,e,n,t),e.lanes=a,e}function _c(e,t,a){return e=wt(6,e,null,t),e.lanes=a,e}function zf(e){var t=wt(18,null,null,0);return t.stateNode=e,t}function Mc(e,t,a){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Df=new WeakMap;function Vt(e,t){if(typeof e=="object"&&e!==null){var a=Df.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ht(t)},Df.set(e,t),t)}return{value:e,source:t,stack:Ht(t)}}var jl=[],Nl=0,Oi=null,bs=0,Qt=[],Xt=0,an=null,fa=1,da="";function Ea(e,t){jl[Nl++]=bs,jl[Nl++]=Oi,Oi=e,bs=t}function Lf(e,t,a){Qt[Xt++]=fa,Qt[Xt++]=da,Qt[Xt++]=an,an=e;var n=fa;e=da;var s=32-$e(n)-1;n&=~(1<<s),a+=1;var c=32-$e(t)+s;if(30<c){var d=s-s%5;c=(n&(1<<d)-1).toString(32),n>>=d,s-=d,fa=1<<32-$e(t)+s|a<<s|n,da=c+e}else fa=1<<c|a<<s|n,da=e}function Ec(e){e.return!==null&&(Ea(e,1),Lf(e,1,0))}function Cc(e){for(;e===Oi;)Oi=jl[--Nl],jl[Nl]=null,bs=jl[--Nl],jl[Nl]=null;for(;e===an;)an=Qt[--Xt],Qt[Xt]=null,da=Qt[--Xt],Qt[Xt]=null,fa=Qt[--Xt],Qt[Xt]=null}function Uf(e,t){Qt[Xt++]=fa,Qt[Xt++]=da,Qt[Xt++]=an,fa=t.id,da=t.overflow,an=e}var ft=null,ke=null,Ne=!1,nn=null,Zt=!1,Ac=Error(r(519));function ln(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gs(Vt(t,e)),Ac}function Bf(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[st]=e,t[rt]=n,a){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(a=0;a<ks.length;a++)ve(ks[a],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),$r(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),Ir(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||em(t.textContent,a)?(n.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),n.onScroll!=null&&ve("scroll",t),n.onScrollEnd!=null&&ve("scrollend",t),n.onClick!=null&&(t.onclick=Ta),t=!0):t=!1,t||ln(e,!0)}function Hf(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:Zt=!1;return;case 27:case 3:Zt=!0;return;default:ft=ft.return}}function Rl(e){if(e!==ft)return!1;if(!Ne)return Hf(e),Ne=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||$o(e.type,e.memoizedProps)),a=!a),a&&ke&&ln(e),Hf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ke=om(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ke=om(e)}else t===27?(t=ke,yn(e.type)?(e=er,er=null,ke=e):ke=t):ke=ft?Jt(e.stateNode.nextSibling):null;return!0}function Xn(){ke=ft=null,Ne=!1}function wc(){var e=nn;return e!==null&&(Mt===null?Mt=e:Mt.push.apply(Mt,e),nn=null),e}function gs(e){nn===null?nn=[e]:nn.push(e)}var Oc=R(null),Zn=null,Ca=null;function sn(e,t,a){F(Oc,t._currentValue),t._currentValue=a}function Aa(e){e._currentValue=Oc.current,Y(Oc)}function zc(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Dc(e,t,a,n){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var c=s.dependencies;if(c!==null){var d=s.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=s;for(var N=0;N<t.length;N++)if(b.context===t[N]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),zc(c.return,a,e),n||(d=null);break e}c=b.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error(r(341));d.lanes|=a,c=d.alternate,c!==null&&(c.lanes|=a),zc(d,a,e),d=null}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===e){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}}function Tl(e,t,a,n){e=null;for(var s=t,c=!1;s!==null;){if(!c){if((s.flags&524288)!==0)c=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error(r(387));if(d=d.memoizedProps,d!==null){var b=s.type;At(s.pendingProps.value,d.value)||(e!==null?e.push(b):e=[b])}}else if(s===pe.current){if(d=s.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Qs):e=[Qs])}s=s.return}e!==null&&Dc(t,e,a,n),t.flags|=262144}function zi(e){for(e=e.firstContext;e!==null;){if(!At(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Kn(e){Zn=e,Ca=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function dt(e){return kf(Zn,e)}function Di(e,t){return Zn===null&&Kn(e),kf(e,t)}function kf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ca===null){if(e===null)throw Error(r(308));Ca=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ca=Ca.next=t;return a}var Zb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Kb=l.unstable_scheduleCallback,Jb=l.unstable_NormalPriority,et={$$typeof:Z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lc(){return{controller:new Zb,data:new Map,refCount:0}}function vs(e){e.refCount--,e.refCount===0&&Kb(Jb,function(){e.controller.abort()})}var ys=null,Uc=0,_l=0,Ml=null;function $b(e,t){if(ys===null){var a=ys=[];Uc=0,_l=qo(),Ml={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Uc++,t.then(qf,qf),t}function qf(){if(--Uc===0&&ys!==null){Ml!==null&&(Ml.status="fulfilled");var e=ys;ys=null,_l=0,Ml=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Fb(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(n.status="rejected",n.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),n}var Yf=H.S;H.S=function(e,t){Rh=fe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&$b(e,t),Yf!==null&&Yf(e,t)};var Jn=R(null);function Bc(){var e=Jn.current;return e!==null?e:Be.pooledCache}function Li(e,t){t===null?F(Jn,Jn.current):F(Jn,t.pool)}function Gf(){var e=Bc();return e===null?null:{parent:et._currentValue,pool:e}}var El=Error(r(460)),Hc=Error(r(474)),Ui=Error(r(542)),Bi={then:function(){}};function Vf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ta,Ta),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zf(e),e;default:if(typeof t.status=="string")t.then(Ta,Ta);else{if(e=Be,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=n}},function(n){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zf(e),e}throw Fn=t,El}}function $n(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Fn=a,El):a}}var Fn=null;function Xf(){if(Fn===null)throw Error(r(459));var e=Fn;return Fn=null,e}function Zf(e){if(e===El||e===Ui)throw Error(r(483))}var Cl=null,xs=0;function Hi(e){var t=xs;return xs+=1,Cl===null&&(Cl=[]),Qf(Cl,e,t)}function Ss(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ki(e,t){throw t.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kf(e){function t(M,T){if(e){var O=M.deletions;O===null?(M.deletions=[T],M.flags|=16):O.push(T)}}function a(M,T){if(!e)return null;for(;T!==null;)t(M,T),T=T.sibling;return null}function n(M){for(var T=new Map;M!==null;)M.key!==null?T.set(M.key,M):T.set(M.index,M),M=M.sibling;return T}function s(M,T){return M=Ma(M,T),M.index=0,M.sibling=null,M}function c(M,T,O){return M.index=O,e?(O=M.alternate,O!==null?(O=O.index,O<T?(M.flags|=67108866,T):O):(M.flags|=67108866,T)):(M.flags|=1048576,T)}function d(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function b(M,T,O,G){return T===null||T.tag!==6?(T=_c(O,M.mode,G),T.return=M,T):(T=s(T,O),T.return=M,T)}function N(M,T,O,G){var ie=O.type;return ie===E?k(M,T,O.props.children,G,O.key):T!==null&&(T.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===q&&$n(ie)===T.type)?(T=s(T,O.props),Ss(T,O),T.return=M,T):(T=wi(O.type,O.key,O.props,null,M.mode,G),Ss(T,O),T.return=M,T)}function z(M,T,O,G){return T===null||T.tag!==4||T.stateNode.containerInfo!==O.containerInfo||T.stateNode.implementation!==O.implementation?(T=Mc(O,M.mode,G),T.return=M,T):(T=s(T,O.children||[]),T.return=M,T)}function k(M,T,O,G,ie){return T===null||T.tag!==7?(T=Qn(O,M.mode,G,ie),T.return=M,T):(T=s(T,O),T.return=M,T)}function V(M,T,O){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=_c(""+T,M.mode,O),T.return=M,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case j:return O=wi(T.type,T.key,T.props,null,M.mode,O),Ss(O,T),O.return=M,O;case _:return T=Mc(T,M.mode,O),T.return=M,T;case q:return T=$n(T),V(M,T,O)}if(Ee(T)||ce(T))return T=Qn(T,M.mode,O,null),T.return=M,T;if(typeof T.then=="function")return V(M,Hi(T),O);if(T.$$typeof===Z)return V(M,Di(M,T),O);ki(M,T)}return null}function D(M,T,O,G){var ie=T!==null?T.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return ie!==null?null:b(M,T,""+O,G);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case j:return O.key===ie?N(M,T,O,G):null;case _:return O.key===ie?z(M,T,O,G):null;case q:return O=$n(O),D(M,T,O,G)}if(Ee(O)||ce(O))return ie!==null?null:k(M,T,O,G,null);if(typeof O.then=="function")return D(M,T,Hi(O),G);if(O.$$typeof===Z)return D(M,T,Di(M,O),G);ki(M,O)}return null}function L(M,T,O,G,ie){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return M=M.get(O)||null,b(T,M,""+G,ie);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case j:return M=M.get(G.key===null?O:G.key)||null,N(T,M,G,ie);case _:return M=M.get(G.key===null?O:G.key)||null,z(T,M,G,ie);case q:return G=$n(G),L(M,T,O,G,ie)}if(Ee(G)||ce(G))return M=M.get(O)||null,k(T,M,G,ie,null);if(typeof G.then=="function")return L(M,T,O,Hi(G),ie);if(G.$$typeof===Z)return L(M,T,O,Di(T,G),ie);ki(T,G)}return null}function te(M,T,O,G){for(var ie=null,_e=null,ae=T,me=T=0,je=null;ae!==null&&me<O.length;me++){ae.index>me?(je=ae,ae=null):je=ae.sibling;var Me=D(M,ae,O[me],G);if(Me===null){ae===null&&(ae=je);break}e&&ae&&Me.alternate===null&&t(M,ae),T=c(Me,T,me),_e===null?ie=Me:_e.sibling=Me,_e=Me,ae=je}if(me===O.length)return a(M,ae),Ne&&Ea(M,me),ie;if(ae===null){for(;me<O.length;me++)ae=V(M,O[me],G),ae!==null&&(T=c(ae,T,me),_e===null?ie=ae:_e.sibling=ae,_e=ae);return Ne&&Ea(M,me),ie}for(ae=n(ae);me<O.length;me++)je=L(ae,M,me,O[me],G),je!==null&&(e&&je.alternate!==null&&ae.delete(je.key===null?me:je.key),T=c(je,T,me),_e===null?ie=je:_e.sibling=je,_e=je);return e&&ae.forEach(function(Rn){return t(M,Rn)}),Ne&&Ea(M,me),ie}function ue(M,T,O,G){if(O==null)throw Error(r(151));for(var ie=null,_e=null,ae=T,me=T=0,je=null,Me=O.next();ae!==null&&!Me.done;me++,Me=O.next()){ae.index>me?(je=ae,ae=null):je=ae.sibling;var Rn=D(M,ae,Me.value,G);if(Rn===null){ae===null&&(ae=je);break}e&&ae&&Rn.alternate===null&&t(M,ae),T=c(Rn,T,me),_e===null?ie=Rn:_e.sibling=Rn,_e=Rn,ae=je}if(Me.done)return a(M,ae),Ne&&Ea(M,me),ie;if(ae===null){for(;!Me.done;me++,Me=O.next())Me=V(M,Me.value,G),Me!==null&&(T=c(Me,T,me),_e===null?ie=Me:_e.sibling=Me,_e=Me);return Ne&&Ea(M,me),ie}for(ae=n(ae);!Me.done;me++,Me=O.next())Me=L(ae,M,me,Me.value,G),Me!==null&&(e&&Me.alternate!==null&&ae.delete(Me.key===null?me:Me.key),T=c(Me,T,me),_e===null?ie=Me:_e.sibling=Me,_e=Me);return e&&ae.forEach(function(ug){return t(M,ug)}),Ne&&Ea(M,me),ie}function Le(M,T,O,G){if(typeof O=="object"&&O!==null&&O.type===E&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case j:e:{for(var ie=O.key;T!==null;){if(T.key===ie){if(ie=O.type,ie===E){if(T.tag===7){a(M,T.sibling),G=s(T,O.props.children),G.return=M,M=G;break e}}else if(T.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===q&&$n(ie)===T.type){a(M,T.sibling),G=s(T,O.props),Ss(G,O),G.return=M,M=G;break e}a(M,T);break}else t(M,T);T=T.sibling}O.type===E?(G=Qn(O.props.children,M.mode,G,O.key),G.return=M,M=G):(G=wi(O.type,O.key,O.props,null,M.mode,G),Ss(G,O),G.return=M,M=G)}return d(M);case _:e:{for(ie=O.key;T!==null;){if(T.key===ie)if(T.tag===4&&T.stateNode.containerInfo===O.containerInfo&&T.stateNode.implementation===O.implementation){a(M,T.sibling),G=s(T,O.children||[]),G.return=M,M=G;break e}else{a(M,T);break}else t(M,T);T=T.sibling}G=Mc(O,M.mode,G),G.return=M,M=G}return d(M);case q:return O=$n(O),Le(M,T,O,G)}if(Ee(O))return te(M,T,O,G);if(ce(O)){if(ie=ce(O),typeof ie!="function")throw Error(r(150));return O=ie.call(O),ue(M,T,O,G)}if(typeof O.then=="function")return Le(M,T,Hi(O),G);if(O.$$typeof===Z)return Le(M,T,Di(M,O),G);ki(M,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,T!==null&&T.tag===6?(a(M,T.sibling),G=s(T,O),G.return=M,M=G):(a(M,T),G=_c(O,M.mode,G),G.return=M,M=G),d(M)):a(M,T)}return function(M,T,O,G){try{xs=0;var ie=Le(M,T,O,G);return Cl=null,ie}catch(ae){if(ae===El||ae===Ui)throw ae;var _e=wt(29,ae,null,M.mode);return _e.lanes=G,_e.return=M,_e}finally{}}}var In=Kf(!0),Jf=Kf(!1),un=!1;function kc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qc(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 cn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function on(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ce&2)!==0){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,t=Ai(e),wf(e,null,a),t}return Ci(e,n,t,a),Ai(e)}function js(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Na(e,a)}}function Yc(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var s=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?s=c=d:c=c.next=d,a=a.next}while(a!==null);c===null?s=c=t:c=c.next=t}else s=c=t;a={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:c,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Gc=!1;function Ns(){if(Gc){var e=Ml;if(e!==null)throw e}}function Rs(e,t,a,n){Gc=!1;var s=e.updateQueue;un=!1;var c=s.firstBaseUpdate,d=s.lastBaseUpdate,b=s.shared.pending;if(b!==null){s.shared.pending=null;var N=b,z=N.next;N.next=null,d===null?c=z:d.next=z,d=N;var k=e.alternate;k!==null&&(k=k.updateQueue,b=k.lastBaseUpdate,b!==d&&(b===null?k.firstBaseUpdate=z:b.next=z,k.lastBaseUpdate=N))}if(c!==null){var V=s.baseState;d=0,k=z=N=null,b=c;do{var D=b.lane&-536870913,L=D!==b.lane;if(L?(Se&D)===D:(n&D)===D){D!==0&&D===_l&&(Gc=!0),k!==null&&(k=k.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var te=e,ue=b;D=t;var Le=a;switch(ue.tag){case 1:if(te=ue.payload,typeof te=="function"){V=te.call(Le,V,D);break e}V=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=ue.payload,D=typeof te=="function"?te.call(Le,V,D):te,D==null)break e;V=y({},V,D);break e;case 2:un=!0}}D=b.callback,D!==null&&(e.flags|=64,L&&(e.flags|=8192),L=s.callbacks,L===null?s.callbacks=[D]:L.push(D))}else L={lane:D,tag:b.tag,payload:b.payload,callback:b.callback,next:null},k===null?(z=k=L,N=V):k=k.next=L,d|=D;if(b=b.next,b===null){if(b=s.shared.pending,b===null)break;L=b,b=L.next,L.next=null,s.lastBaseUpdate=L,s.shared.pending=null}}while(!0);k===null&&(N=V),s.baseState=N,s.firstBaseUpdate=z,s.lastBaseUpdate=k,c===null&&(s.shared.lanes=0),mn|=d,e.lanes=d,e.memoizedState=V}}function $f(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Ff(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)$f(a[e],t)}var Al=R(null),qi=R(0);function If(e,t){e=ka,F(qi,e),F(Al,t),ka=e|t.baseLanes}function Vc(){F(qi,ka),F(Al,Al.current)}function Qc(){ka=qi.current,Y(Al),Y(qi)}var Ot=R(null),Kt=null;function rn(e){var t=e.alternate;F(Fe,Fe.current&1),F(Ot,e),Kt===null&&(t===null||Al.current!==null||t.memoizedState!==null)&&(Kt=e)}function Xc(e){F(Fe,Fe.current),F(Ot,e),Kt===null&&(Kt=e)}function Pf(e){e.tag===22?(F(Fe,Fe.current),F(Ot,e),Kt===null&&(Kt=e)):fn()}function fn(){F(Fe,Fe.current),F(Ot,Ot.current)}function zt(e){Y(Ot),Kt===e&&(Kt=null),Y(Fe)}var Fe=R(0);function Yi(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Po(a)||Wo(a)))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 wa=0,he=null,ze=null,tt=null,Gi=!1,wl=!1,Pn=!1,Vi=0,Ts=0,Ol=null,Ib=0;function Ze(){throw Error(r(321))}function Zc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!At(e[a],t[a]))return!1;return!0}function Kc(e,t,a,n,s,c){return wa=c,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?Ld:co,Pn=!1,c=a(n,s),Pn=!1,wl&&(c=ed(t,a,n,s)),Wf(e),c}function Wf(e){H.H=Es;var t=ze!==null&&ze.next!==null;if(wa=0,tt=ze=he=null,Gi=!1,Ts=0,Ol=null,t)throw Error(r(300));e===null||at||(e=e.dependencies,e!==null&&zi(e)&&(at=!0))}function ed(e,t,a,n){he=e;var s=0;do{if(wl&&(Ol=null),Ts=0,wl=!1,25<=s)throw Error(r(301));if(s+=1,tt=ze=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}H.H=Ud,c=t(a,n)}while(wl);return c}function Pb(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?_s(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(he.flags|=1024),t}function Jc(){var e=Vi!==0;return Vi=0,e}function $c(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Fc(e){if(Gi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Gi=!1}wa=0,tt=ze=he=null,wl=!1,Ts=Vi=0,Ol=null}function yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?he.memoizedState=tt=e:tt=tt.next=e,tt}function Ie(){if(ze===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=tt===null?he.memoizedState:tt.next;if(t!==null)tt=t,ze=e;else{if(e===null)throw he.alternate===null?Error(r(467)):Error(r(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},tt===null?he.memoizedState=tt=e:tt=tt.next=e}return tt}function Qi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _s(e){var t=Ts;return Ts+=1,Ol===null&&(Ol=[]),e=Qf(Ol,e,t),t=he,(tt===null?t.memoizedState:tt.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?Ld:co),e}function Xi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _s(e);if(e.$$typeof===Z)return dt(e)}throw Error(r(438,String(e)))}function Ic(e){var t=null,a=he.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=he.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Qi(),he.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=se;return t.index++,a}function Oa(e,t){return typeof t=="function"?t(e):t}function Zi(e){var t=Ie();return Pc(t,ze,e)}function Pc(e,t,a){var n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=a;var s=e.baseQueue,c=n.pending;if(c!==null){if(s!==null){var d=s.next;s.next=c.next,c.next=d}t.baseQueue=s=c,n.pending=null}if(c=e.baseState,s===null)e.memoizedState=c;else{t=s.next;var b=d=null,N=null,z=t,k=!1;do{var V=z.lane&-536870913;if(V!==z.lane?(Se&V)===V:(wa&V)===V){var D=z.revertLane;if(D===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),V===_l&&(k=!0);else if((wa&D)===D){z=z.next,D===_l&&(k=!0);continue}else V={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},N===null?(b=N=V,d=c):N=N.next=V,he.lanes|=D,mn|=D;V=z.action,Pn&&a(c,V),c=z.hasEagerState?z.eagerState:a(c,V)}else D={lane:V,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},N===null?(b=N=D,d=c):N=N.next=D,he.lanes|=V,mn|=V;z=z.next}while(z!==null&&z!==t);if(N===null?d=c:N.next=b,!At(c,e.memoizedState)&&(at=!0,k&&(a=Ml,a!==null)))throw a;e.memoizedState=c,e.baseState=d,e.baseQueue=N,n.lastRenderedState=c}return s===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Wc(e){var t=Ie(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var n=a.dispatch,s=a.pending,c=t.memoizedState;if(s!==null){a.pending=null;var d=s=s.next;do c=e(c,d.action),d=d.next;while(d!==s);At(c,t.memoizedState)||(at=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function td(e,t,a){var n=he,s=Ie(),c=Ne;if(c){if(a===void 0)throw Error(r(407));a=a()}else a=t();var d=!At((ze||s).memoizedState,a);if(d&&(s.memoizedState=a,at=!0),s=s.queue,ao(ld.bind(null,n,s,e),[e]),s.getSnapshot!==t||d||tt!==null&&tt.memoizedState.tag&1){if(n.flags|=2048,zl(9,{destroy:void 0},nd.bind(null,n,s,a,t),null),Be===null)throw Error(r(349));c||(wa&127)!==0||ad(n,t,a)}return a}function ad(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=he.updateQueue,t===null?(t=Qi(),he.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function nd(e,t,a,n){t.value=a,t.getSnapshot=n,sd(t)&&id(e)}function ld(e,t,a){return a(function(){sd(t)&&id(e)})}function sd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!At(e,a)}catch{return!0}}function id(e){var t=Vn(e,2);t!==null&&Et(t,e,2)}function eo(e){var t=yt();if(typeof e=="function"){var a=e;if(e=a(),Pn){kt(!0);try{a()}finally{kt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:e},t}function ud(e,t,a,n){return e.baseState=a,Pc(e,ze,typeof n=="function"?n:Oa)}function Wb(e,t,a,n,s){if($i(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){c.listeners.push(d)}};H.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,cd(t,c)):(c.next=a.next,t.pending=a.next=c)}}function cd(e,t){var a=t.action,n=t.payload,s=e.state;if(t.isTransition){var c=H.T,d={};H.T=d;try{var b=a(s,n),N=H.S;N!==null&&N(d,b),od(e,t,b)}catch(z){to(e,t,z)}finally{c!==null&&d.types!==null&&(c.types=d.types),H.T=c}}else try{c=a(s,n),od(e,t,c)}catch(z){to(e,t,z)}}function od(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){rd(e,t,n)},function(n){return to(e,t,n)}):rd(e,t,a)}function rd(e,t,a){t.status="fulfilled",t.value=a,fd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,cd(e,a)))}function to(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,fd(t),t=t.next;while(t!==n)}e.action=null}function fd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function dd(e,t){return t}function hd(e,t){if(Ne){var a=Be.formState;if(a!==null){e:{var n=he;if(Ne){if(ke){t:{for(var s=ke,c=Zt;s.nodeType!==8;){if(!c){s=null;break t}if(s=Jt(s.nextSibling),s===null){s=null;break t}}c=s.data,s=c==="F!"||c==="F"?s:null}if(s){ke=Jt(s.nextSibling),n=s.data==="F!";break e}}ln(n)}n=!1}n&&(t=a[0])}}return a=yt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dd,lastRenderedState:t},a.queue=n,a=Od.bind(null,he,n),n.dispatch=a,n=eo(!1),c=uo.bind(null,he,!1,n.queue),n=yt(),s={state:t,dispatch:null,action:e,pending:null},n.queue=s,a=Wb.bind(null,he,s,c,a),s.dispatch=a,n.memoizedState=e,[t,a,!1]}function md(e){var t=Ie();return pd(t,ze,e)}function pd(e,t,a){if(t=Pc(e,t,dd)[0],e=Zi(Oa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=_s(t)}catch(d){throw d===El?Ui:d}else n=t;t=Ie();var s=t.queue,c=s.dispatch;return a!==t.memoizedState&&(he.flags|=2048,zl(9,{destroy:void 0},e0.bind(null,s,a),null)),[n,c,e]}function e0(e,t){e.action=t}function bd(e){var t=Ie(),a=ze;if(a!==null)return pd(t,a,e);Ie(),t=t.memoizedState,a=Ie();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function zl(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=he.updateQueue,t===null&&(t=Qi(),he.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function gd(){return Ie().memoizedState}function Ki(e,t,a,n){var s=yt();he.flags|=e,s.memoizedState=zl(1|t,{destroy:void 0},a,n===void 0?null:n)}function Ji(e,t,a,n){var s=Ie();n=n===void 0?null:n;var c=s.memoizedState.inst;ze!==null&&n!==null&&Zc(n,ze.memoizedState.deps)?s.memoizedState=zl(t,c,a,n):(he.flags|=e,s.memoizedState=zl(1|t,c,a,n))}function vd(e,t){Ki(8390656,8,e,t)}function ao(e,t){Ji(2048,8,e,t)}function t0(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=Qi(),he.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function yd(e){var t=Ie().memoizedState;return t0({ref:t,nextImpl:e}),function(){if((Ce&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function xd(e,t){return Ji(4,2,e,t)}function Sd(e,t){return Ji(4,4,e,t)}function jd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Nd(e,t,a){a=a!=null?a.concat([e]):null,Ji(4,4,jd.bind(null,t,e),a)}function no(){}function Rd(e,t){var a=Ie();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Zc(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Td(e,t){var a=Ie();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Zc(t,n[1]))return n[0];if(n=e(),Pn){kt(!0);try{e()}finally{kt(!1)}}return a.memoizedState=[n,t],n}function lo(e,t,a){return a===void 0||(wa&1073741824)!==0&&(Se&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=_h(),he.lanes|=e,mn|=e,a)}function _d(e,t,a,n){return At(a,t)?a:Al.current!==null?(e=lo(e,a,n),At(e,t)||(at=!0),e):(wa&42)===0||(wa&1073741824)!==0&&(Se&261930)===0?(at=!0,e.memoizedState=a):(e=_h(),he.lanes|=e,mn|=e,t)}function Md(e,t,a,n,s){var c=$.p;$.p=c!==0&&8>c?c:8;var d=H.T,b={};H.T=b,uo(e,!1,t,a);try{var N=s(),z=H.S;if(z!==null&&z(b,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var k=Fb(N,n);Ms(e,t,k,Ut(e))}else Ms(e,t,n,Ut(e))}catch(V){Ms(e,t,{then:function(){},status:"rejected",reason:V},Ut())}finally{$.p=c,d!==null&&b.types!==null&&(d.types=b.types),H.T=d}}function a0(){}function so(e,t,a,n){if(e.tag!==5)throw Error(r(476));var s=Ed(e).queue;Md(e,s,t,le,a===null?a0:function(){return Cd(e),a(n)})}function Ed(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:le},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cd(e){var t=Ed(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},Ut())}function io(){return dt(Qs)}function Ad(){return Ie().memoizedState}function wd(){return Ie().memoizedState}function n0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ut();e=cn(a);var n=on(t,e,a);n!==null&&(Et(n,t,a),js(n,t,a)),t={cache:Lc()},e.payload=t;return}t=t.return}}function l0(e,t,a){var n=Ut();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},$i(e)?zd(t,a):(a=Rc(e,t,a,n),a!==null&&(Et(a,e,n),Dd(a,t,n)))}function Od(e,t,a){var n=Ut();Ms(e,t,a,n)}function Ms(e,t,a,n){var s={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if($i(e))zd(t,s);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var d=t.lastRenderedState,b=c(d,a);if(s.hasEagerState=!0,s.eagerState=b,At(b,d))return Ci(e,t,s,0),Be===null&&Ei(),!1}catch{}finally{}if(a=Rc(e,t,s,n),a!==null)return Et(a,e,n),Dd(a,t,n),!0}return!1}function uo(e,t,a,n){if(n={lane:2,revertLane:qo(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},$i(e)){if(t)throw Error(r(479))}else t=Rc(e,a,n,2),t!==null&&Et(t,e,2)}function $i(e){var t=e.alternate;return e===he||t!==null&&t===he}function zd(e,t){wl=Gi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Dd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Na(e,a)}}var Es={readContext:dt,use:Xi,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};Es.useEffectEvent=Ze;var Ld={readContext:dt,use:Xi,useCallback:function(e,t){return yt().memoizedState=[e,t===void 0?null:t],e},useContext:dt,useEffect:vd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ki(4194308,4,jd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ki(4194308,4,e,t)},useInsertionEffect:function(e,t){Ki(4,2,e,t)},useMemo:function(e,t){var a=yt();t=t===void 0?null:t;var n=e();if(Pn){kt(!0);try{e()}finally{kt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=yt();if(a!==void 0){var s=a(t);if(Pn){kt(!0);try{a(t)}finally{kt(!1)}}}else s=t;return n.memoizedState=n.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},n.queue=e,e=e.dispatch=l0.bind(null,he,e),[n.memoizedState,e]},useRef:function(e){var t=yt();return e={current:e},t.memoizedState=e},useState:function(e){e=eo(e);var t=e.queue,a=Od.bind(null,he,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:no,useDeferredValue:function(e,t){var a=yt();return lo(a,e,t)},useTransition:function(){var e=eo(!1);return e=Md.bind(null,he,e.queue,!0,!1),yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=he,s=yt();if(Ne){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Be===null)throw Error(r(349));(Se&127)!==0||ad(n,t,a)}s.memoizedState=a;var c={value:a,getSnapshot:t};return s.queue=c,vd(ld.bind(null,n,c,e),[e]),n.flags|=2048,zl(9,{destroy:void 0},nd.bind(null,n,c,a,t),null),a},useId:function(){var e=yt(),t=Be.identifierPrefix;if(Ne){var a=da,n=fa;a=(n&~(1<<32-$e(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Vi++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ib++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:io,useFormState:hd,useActionState:hd,useOptimistic:function(e){var t=yt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=uo.bind(null,he,!0,a),a.dispatch=t,[e,t]},useMemoCache:Ic,useCacheRefresh:function(){return yt().memoizedState=n0.bind(null,he)},useEffectEvent:function(e){var t=yt(),a={impl:e};return t.memoizedState=a,function(){if((Ce&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},co={readContext:dt,use:Xi,useCallback:Rd,useContext:dt,useEffect:ao,useImperativeHandle:Nd,useInsertionEffect:xd,useLayoutEffect:Sd,useMemo:Td,useReducer:Zi,useRef:gd,useState:function(){return Zi(Oa)},useDebugValue:no,useDeferredValue:function(e,t){var a=Ie();return _d(a,ze.memoizedState,e,t)},useTransition:function(){var e=Zi(Oa)[0],t=Ie().memoizedState;return[typeof e=="boolean"?e:_s(e),t]},useSyncExternalStore:td,useId:Ad,useHostTransitionStatus:io,useFormState:md,useActionState:md,useOptimistic:function(e,t){var a=Ie();return ud(a,ze,e,t)},useMemoCache:Ic,useCacheRefresh:wd};co.useEffectEvent=yd;var Ud={readContext:dt,use:Xi,useCallback:Rd,useContext:dt,useEffect:ao,useImperativeHandle:Nd,useInsertionEffect:xd,useLayoutEffect:Sd,useMemo:Td,useReducer:Wc,useRef:gd,useState:function(){return Wc(Oa)},useDebugValue:no,useDeferredValue:function(e,t){var a=Ie();return ze===null?lo(a,e,t):_d(a,ze.memoizedState,e,t)},useTransition:function(){var e=Wc(Oa)[0],t=Ie().memoizedState;return[typeof e=="boolean"?e:_s(e),t]},useSyncExternalStore:td,useId:Ad,useHostTransitionStatus:io,useFormState:bd,useActionState:bd,useOptimistic:function(e,t){var a=Ie();return ze!==null?ud(a,ze,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Ic,useCacheRefresh:wd};Ud.useEffectEvent=yd;function oo(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ro={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ut(),s=cn(n);s.payload=t,a!=null&&(s.callback=a),t=on(e,s,n),t!==null&&(Et(t,e,n),js(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ut(),s=cn(n);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=on(e,s,n),t!==null&&(Et(t,e,n),js(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ut(),n=cn(a);n.tag=2,t!=null&&(n.callback=t),t=on(e,n,a),t!==null&&(Et(t,e,a),js(t,e,a))}};function Bd(e,t,a,n,s,c,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,d):t.prototype&&t.prototype.isPureReactComponent?!ms(a,n)||!ms(s,c):!0}function Hd(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&ro.enqueueReplaceState(t,t.state,null)}function Wn(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function kd(e){Mi(e)}function qd(e){console.error(e)}function Yd(e){Mi(e)}function Fi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Gd(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function fo(e,t,a){return a=cn(a),a.tag=3,a.payload={element:null},a.callback=function(){Fi(e,t)},a}function Vd(e){return e=cn(e),e.tag=3,e}function Qd(e,t,a,n){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var c=n.value;e.payload=function(){return s(c)},e.callback=function(){Gd(t,a,n)}}var d=a.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Gd(t,a,n),typeof s!="function"&&(pn===null?pn=new Set([this]):pn.add(this));var b=n.stack;this.componentDidCatch(n.value,{componentStack:b!==null?b:""})})}function s0(e,t,a,n,s){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Tl(t,a,s,!0),a=Ot.current,a!==null){switch(a.tag){case 31:case 13:return Kt===null?cu():a.alternate===null&&Ke===0&&(Ke=3),a.flags&=-257,a.flags|=65536,a.lanes=s,n===Bi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Bo(e,n,s)),!1;case 22:return a.flags|=65536,n===Bi?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Bo(e,n,s)),!1}throw Error(r(435,a.tag))}return Bo(e,n,s),cu(),!1}if(Ne)return t=Ot.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,n!==Ac&&(e=Error(r(422),{cause:n}),gs(Vt(e,a)))):(n!==Ac&&(t=Error(r(423),{cause:n}),gs(Vt(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,n=Vt(n,a),s=fo(e.stateNode,n,s),Yc(e,s),Ke!==4&&(Ke=2)),!1;var c=Error(r(520),{cause:n});if(c=Vt(c,a),Us===null?Us=[c]:Us.push(c),Ke!==4&&(Ke=2),t===null)return!0;n=Vt(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=fo(a.stateNode,n,e),Yc(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(pn===null||!pn.has(c))))return a.flags|=65536,s&=-s,a.lanes|=s,s=Vd(s),Qd(s,e,a,n),Yc(a,s),!1}a=a.return}while(a!==null);return!1}var ho=Error(r(461)),at=!1;function ht(e,t,a,n){t.child=e===null?Jf(t,null,a,n):In(t,e.child,a,n)}function Xd(e,t,a,n,s){a=a.render;var c=t.ref;if("ref"in n){var d={};for(var b in n)b!=="ref"&&(d[b]=n[b])}else d=n;return Kn(t),n=Kc(e,t,a,d,c,s),b=Jc(),e!==null&&!at?($c(e,t,s),za(e,t,s)):(Ne&&b&&Ec(t),t.flags|=1,ht(e,t,n,s),t.child)}function Zd(e,t,a,n,s){if(e===null){var c=a.type;return typeof c=="function"&&!Tc(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,Kd(e,t,c,n,s)):(e=wi(a.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!So(e,s)){var d=c.memoizedProps;if(a=a.compare,a=a!==null?a:ms,a(d,n)&&e.ref===t.ref)return za(e,t,s)}return t.flags|=1,e=Ma(c,n),e.ref=t.ref,e.return=t,t.child=e}function Kd(e,t,a,n,s){if(e!==null){var c=e.memoizedProps;if(ms(c,n)&&e.ref===t.ref)if(at=!1,t.pendingProps=n=c,So(e,s))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,za(e,t,s)}return mo(e,t,a,n,s)}function Jd(e,t,a,n){var s=n.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(n=t.child=e.child,s=0;n!==null;)s=s|n.lanes|n.childLanes,n=n.sibling;n=s&~c}else n=0,t.child=null;return $d(e,t,c,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Li(t,c!==null?c.cachePool:null),c!==null?If(t,c):Vc(),Pf(t);else return n=t.lanes=536870912,$d(e,t,c!==null?c.baseLanes|a:a,a,n)}else c!==null?(Li(t,c.cachePool),If(t,c),fn(),t.memoizedState=null):(e!==null&&Li(t,null),Vc(),fn());return ht(e,t,s,a),t.child}function Cs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function $d(e,t,a,n,s){var c=Bc();return c=c===null?null:{parent:et._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Li(t,null),Vc(),Pf(t),e!==null&&Tl(e,t,n,!0),t.childLanes=s,null}function Ii(e,t){return t=Wi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fd(e,t,a){return In(t,e.child,null,a),e=Ii(t,t.pendingProps),e.flags|=2,zt(t),t.memoizedState=null,e}function i0(e,t,a){var n=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(n.mode==="hidden")return e=Ii(t,n),t.lanes=536870912,Cs(null,e);if(Xc(t),(e=ke)?(e=cm(e,Zt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:an!==null?{id:fa,overflow:da}:null,retryLane:536870912,hydrationErrors:null},a=zf(e),a.return=t,t.child=a,ft=t,ke=null)):e=null,e===null)throw ln(t);return t.lanes=536870912,null}return Ii(t,n)}var c=e.memoizedState;if(c!==null){var d=c.dehydrated;if(Xc(t),s)if(t.flags&256)t.flags&=-257,t=Fd(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(at||Tl(e,t,a,!1),s=(a&e.childLanes)!==0,at||s){if(n=Be,n!==null&&(d=hi(n,a),d!==0&&d!==c.retryLane))throw c.retryLane=d,Vn(e,d),Et(n,e,d),ho;cu(),t=Fd(e,t,a)}else e=c.treeContext,ke=Jt(d.nextSibling),ft=t,Ne=!0,nn=null,Zt=!1,e!==null&&Uf(t,e),t=Ii(t,n),t.flags|=4096;return t}return e=Ma(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Pi(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function mo(e,t,a,n,s){return Kn(t),a=Kc(e,t,a,n,void 0,s),n=Jc(),e!==null&&!at?($c(e,t,s),za(e,t,s)):(Ne&&n&&Ec(t),t.flags|=1,ht(e,t,a,s),t.child)}function Id(e,t,a,n,s,c){return Kn(t),t.updateQueue=null,a=ed(t,n,a,s),Wf(e),n=Jc(),e!==null&&!at?($c(e,t,c),za(e,t,c)):(Ne&&n&&Ec(t),t.flags|=1,ht(e,t,a,c),t.child)}function Pd(e,t,a,n,s){if(Kn(t),t.stateNode===null){var c=Sl,d=a.contextType;typeof d=="object"&&d!==null&&(c=dt(d)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=ro,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},kc(t),d=a.contextType,c.context=typeof d=="object"&&d!==null?dt(d):Sl,c.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(oo(t,a,d,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(d=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),d!==c.state&&ro.enqueueReplaceState(c,c.state,null),Rs(t,n,c,s),Ns(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,N=Wn(a,b);c.props=N;var z=c.context,k=a.contextType;d=Sl,typeof k=="object"&&k!==null&&(d=dt(k));var V=a.getDerivedStateFromProps;k=typeof V=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,k||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||z!==d)&&Hd(t,c,n,d),un=!1;var D=t.memoizedState;c.state=D,Rs(t,n,c,s),Ns(),z=t.memoizedState,b||D!==z||un?(typeof V=="function"&&(oo(t,a,V,n),z=t.memoizedState),(N=un||Bd(t,a,N,n,D,z,d))?(k||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=z),c.props=n,c.state=z,c.context=d,n=N):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,qc(e,t),d=t.memoizedProps,k=Wn(a,d),c.props=k,V=t.pendingProps,D=c.context,z=a.contextType,N=Sl,typeof z=="object"&&z!==null&&(N=dt(z)),b=a.getDerivedStateFromProps,(z=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(d!==V||D!==N)&&Hd(t,c,n,N),un=!1,D=t.memoizedState,c.state=D,Rs(t,n,c,s),Ns();var L=t.memoizedState;d!==V||D!==L||un||e!==null&&e.dependencies!==null&&zi(e.dependencies)?(typeof b=="function"&&(oo(t,a,b,n),L=t.memoizedState),(k=un||Bd(t,a,k,n,D,L,N)||e!==null&&e.dependencies!==null&&zi(e.dependencies))?(z||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,L,N),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,L,N)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=L),c.props=n,c.state=L,c.context=N,n=k):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,Pi(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=In(t,e.child,null,s),t.child=In(t,null,a,s)):ht(e,t,a,s),t.memoizedState=c.state,e=t.child):e=za(e,t,s),e}function Wd(e,t,a,n){return Xn(),t.flags|=256,ht(e,t,a,n),t.child}var po={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bo(e){return{baseLanes:e,cachePool:Gf()}}function go(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Lt),e}function eh(e,t,a){var n=t.pendingProps,s=!1,c=(t.flags&128)!==0,d;if((d=c)||(d=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),d&&(s=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(s?rn(t):fn(),(e=ke)?(e=cm(e,Zt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:an!==null?{id:fa,overflow:da}:null,retryLane:536870912,hydrationErrors:null},a=zf(e),a.return=t,t.child=a,ft=t,ke=null)):e=null,e===null)throw ln(t);return Wo(e)?t.lanes=32:t.lanes=536870912,null}var b=n.children;return n=n.fallback,s?(fn(),s=t.mode,b=Wi({mode:"hidden",children:b},s),n=Qn(n,s,a,null),b.return=t,n.return=t,b.sibling=n,t.child=b,n=t.child,n.memoizedState=bo(a),n.childLanes=go(e,d,a),t.memoizedState=po,Cs(null,n)):(rn(t),vo(t,b))}var N=e.memoizedState;if(N!==null&&(b=N.dehydrated,b!==null)){if(c)t.flags&256?(rn(t),t.flags&=-257,t=yo(e,t,a)):t.memoizedState!==null?(fn(),t.child=e.child,t.flags|=128,t=null):(fn(),b=n.fallback,s=t.mode,n=Wi({mode:"visible",children:n.children},s),b=Qn(b,s,a,null),b.flags|=2,n.return=t,b.return=t,n.sibling=b,t.child=n,In(t,e.child,null,a),n=t.child,n.memoizedState=bo(a),n.childLanes=go(e,d,a),t.memoizedState=po,t=Cs(null,n));else if(rn(t),Wo(b)){if(d=b.nextSibling&&b.nextSibling.dataset,d)var z=d.dgst;d=z,n=Error(r(419)),n.stack="",n.digest=d,gs({value:n,source:null,stack:null}),t=yo(e,t,a)}else if(at||Tl(e,t,a,!1),d=(a&e.childLanes)!==0,at||d){if(d=Be,d!==null&&(n=hi(d,a),n!==0&&n!==N.retryLane))throw N.retryLane=n,Vn(e,n),Et(d,e,n),ho;Po(b)||cu(),t=yo(e,t,a)}else Po(b)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,ke=Jt(b.nextSibling),ft=t,Ne=!0,nn=null,Zt=!1,e!==null&&Uf(t,e),t=vo(t,n.children),t.flags|=4096);return t}return s?(fn(),b=n.fallback,s=t.mode,N=e.child,z=N.sibling,n=Ma(N,{mode:"hidden",children:n.children}),n.subtreeFlags=N.subtreeFlags&65011712,z!==null?b=Ma(z,b):(b=Qn(b,s,a,null),b.flags|=2),b.return=t,n.return=t,n.sibling=b,t.child=n,Cs(null,n),n=t.child,b=e.child.memoizedState,b===null?b=bo(a):(s=b.cachePool,s!==null?(N=et._currentValue,s=s.parent!==N?{parent:N,pool:N}:s):s=Gf(),b={baseLanes:b.baseLanes|a,cachePool:s}),n.memoizedState=b,n.childLanes=go(e,d,a),t.memoizedState=po,Cs(e.child,n)):(rn(t),a=e.child,e=a.sibling,a=Ma(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=a,t.memoizedState=null,a)}function vo(e,t){return t=Wi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Wi(e,t){return e=wt(22,e,null,t),e.lanes=0,e}function yo(e,t,a){return In(t,e.child,null,a),e=vo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function th(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),zc(e.return,t,a)}function xo(e,t,a,n,s,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:s,treeForkCount:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=a,d.tailMode=s,d.treeForkCount=c)}function ah(e,t,a){var n=t.pendingProps,s=n.revealOrder,c=n.tail;n=n.children;var d=Fe.current,b=(d&2)!==0;if(b?(d=d&1|2,t.flags|=128):d&=1,F(Fe,d),ht(e,t,n,a),n=Ne?bs:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&th(e,a,t);else if(e.tag===19)th(e,a,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(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&Yi(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),xo(t,!1,s,a,c,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Yi(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}xo(t,!0,a,null,c,n);break;case"together":xo(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function za(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),mn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Tl(e,t,a,!1),(a&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,a=Ma(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ma(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function So(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zi(e)))}function u0(e,t,a){switch(t.tag){case 3:He(t,t.stateNode.containerInfo),sn(t,et,e.memoizedState.cache),Xn();break;case 27:case 5:St(t);break;case 4:He(t,t.stateNode.containerInfo);break;case 10:sn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xc(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(rn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?eh(e,t,a):(rn(t),e=za(e,t,a),e!==null?e.sibling:null);rn(t);break;case 19:var s=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Tl(e,t,a,!1),n=(a&t.childLanes)!==0),s){if(n)return ah(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),F(Fe,Fe.current),n)break;return null;case 22:return t.lanes=0,Jd(e,t,a,t.pendingProps);case 24:sn(t,et,e.memoizedState.cache)}return za(e,t,a)}function nh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!So(e,a)&&(t.flags&128)===0)return at=!1,u0(e,t,a);at=(e.flags&131072)!==0}else at=!1,Ne&&(t.flags&1048576)!==0&&Lf(t,bs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=$n(t.elementType),t.type=e,typeof e=="function")Tc(e)?(n=Wn(e,n),t.tag=1,t=Pd(null,t,e,n,a)):(t.tag=0,t=mo(null,t,e,n,a));else{if(e!=null){var s=e.$$typeof;if(s===J){t.tag=11,t=Xd(null,t,e,n,a);break e}else if(s===Q){t.tag=14,t=Zd(null,t,e,n,a);break e}}throw t=Ye(e)||e,Error(r(306,t,""))}}return t;case 0:return mo(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,s=Wn(n,t.pendingProps),Pd(e,t,n,s,a);case 3:e:{if(He(t,t.stateNode.containerInfo),e===null)throw Error(r(387));n=t.pendingProps;var c=t.memoizedState;s=c.element,qc(e,t),Rs(t,n,null,a);var d=t.memoizedState;if(n=d.cache,sn(t,et,n),n!==c.cache&&Dc(t,[et],a,!0),Ns(),n=d.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Wd(e,t,n,a);break e}else if(n!==s){s=Vt(Error(r(424)),t),gs(s),t=Wd(e,t,n,a);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(ke=Jt(e.firstChild),ft=t,Ne=!0,nn=null,Zt=!0,a=Jf(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Xn(),n===s){t=za(e,t,a);break e}ht(e,t,n,a)}t=t.child}return t;case 26:return Pi(e,t),e===null?(a=mm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ne||(a=t.type,e=t.pendingProps,n=pu(re.current).createElement(a),n[st]=t,n[rt]=e,mt(n,a,e),We(n),t.stateNode=n):t.memoizedState=mm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return St(t),e===null&&Ne&&(n=t.stateNode=fm(t.type,t.pendingProps,re.current),ft=t,Zt=!0,s=ke,yn(t.type)?(er=s,ke=Jt(n.firstChild)):ke=s),ht(e,t,t.pendingProps.children,a),Pi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((s=n=ke)&&(n=B0(n,t.type,t.pendingProps,Zt),n!==null?(t.stateNode=n,ft=t,ke=Jt(n.firstChild),Zt=!1,s=!0):s=!1),s||ln(t)),St(t),s=t.type,c=t.pendingProps,d=e!==null?e.memoizedProps:null,n=c.children,$o(s,c)?n=null:d!==null&&$o(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=Kc(e,t,Pb,null,null,a),Qs._currentValue=s),Pi(e,t),ht(e,t,n,a),t.child;case 6:return e===null&&Ne&&((e=a=ke)&&(a=H0(a,t.pendingProps,Zt),a!==null?(t.stateNode=a,ft=t,ke=null,e=!0):e=!1),e||ln(t)),null;case 13:return eh(e,t,a);case 4:return He(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=In(t,null,n,a):ht(e,t,n,a),t.child;case 11:return Xd(e,t,t.type,t.pendingProps,a);case 7:return ht(e,t,t.pendingProps,a),t.child;case 8:return ht(e,t,t.pendingProps.children,a),t.child;case 12:return ht(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,sn(t,t.type,n.value),ht(e,t,n.children,a),t.child;case 9:return s=t.type._context,n=t.pendingProps.children,Kn(t),s=dt(s),n=n(s),t.flags|=1,ht(e,t,n,a),t.child;case 14:return Zd(e,t,t.type,t.pendingProps,a);case 15:return Kd(e,t,t.type,t.pendingProps,a);case 19:return ah(e,t,a);case 31:return i0(e,t,a);case 22:return Jd(e,t,a,t.pendingProps);case 24:return Kn(t),n=dt(et),e===null?(s=Bc(),s===null&&(s=Be,c=Lc(),s.pooledCache=c,c.refCount++,c!==null&&(s.pooledCacheLanes|=a),s=c),t.memoizedState={parent:n,cache:s},kc(t),sn(t,et,s)):((e.lanes&a)!==0&&(qc(e,t),Rs(t,null,null,a),Ns()),s=e.memoizedState,c=t.memoizedState,s.parent!==n?(s={parent:n,cache:n},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),sn(t,et,n)):(n=c.cache,sn(t,et,n),n!==s.cache&&Dc(t,[et],a,!0))),ht(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Da(e){e.flags|=4}function jo(e,t,a,n,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Ah())e.flags|=8192;else throw Fn=Bi,Hc}else e.flags&=-16777217}function lh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ym(t))if(Ah())e.flags|=8192;else throw Fn=Bi,Hc}function eu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ts():536870912,e.lanes|=t,Bl|=t)}function As(e,t){if(!Ne)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags&65011712,n|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function c0(e,t,a){var n=t.pendingProps;switch(Cc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return qe(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Aa(et),Ue(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Rl(t)?Da(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wc())),qe(t),null;case 26:var s=t.type,c=t.memoizedState;return e===null?(Da(t),c!==null?(qe(t),lh(t,c)):(qe(t),jo(t,s,null,n,a))):c?c!==e.memoizedState?(Da(t),qe(t),lh(t,c)):(qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Da(t),qe(t),jo(t,s,e,n,a)),null;case 27:if(Pt(t),a=re.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Da(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return qe(t),null}e=K.current,Rl(t)?Bf(t):(e=fm(s,n,a),t.stateNode=e,Da(t))}return qe(t),null;case 5:if(Pt(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Da(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return qe(t),null}if(c=K.current,Rl(t))Bf(t);else{var d=pu(re.current);switch(c){case 1:c=d.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:c=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":c=d.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":c=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":c=d.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?d.createElement(s,{is:n.is}):d.createElement(s)}}c[st]=t,c[rt]=n;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)c.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=c;e:switch(mt(c,s,n),s){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Da(t)}}return qe(t),jo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Da(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(r(166));if(e=re.current,Rl(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,s=ft,s!==null)switch(s.tag){case 27:case 5:n=s.memoizedProps}e[st]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||em(e.nodeValue,a)),e||ln(t,!0)}else e=pu(e).createTextNode(n),e[st]=t,t.stateNode=e}return qe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Rl(t),a!==null){if(e===null){if(!n)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[st]=t}else Xn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else a=wc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(zt(t),t):(zt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Rl(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[st]=t}else Xn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),s=!1}else s=wc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(zt(t),t):(zt(t),null)}return zt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,s=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(s=n.alternate.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==s&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),eu(t,t.updateQueue),qe(t),null);case 4:return Ue(),e===null&&Qo(t.stateNode.containerInfo),qe(t),null;case 10:return Aa(t.type),qe(t),null;case 19:if(Y(Fe),n=t.memoizedState,n===null)return qe(t),null;if(s=(t.flags&128)!==0,c=n.rendering,c===null)if(s)As(n,!1);else{if(Ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Yi(e),c!==null){for(t.flags|=128,As(n,!1),e=c.updateQueue,t.updateQueue=e,eu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Of(a,e),a=a.sibling;return F(Fe,Fe.current&1|2),Ne&&Ea(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&fe()>su&&(t.flags|=128,s=!0,As(n,!1),t.lanes=4194304)}else{if(!s)if(e=Yi(c),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,eu(t,e),As(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!Ne)return qe(t),null}else 2*fe()-n.renderingStartTime>su&&a!==536870912&&(t.flags|=128,s=!0,As(n,!1),t.lanes=4194304);n.isBackwards?(c.sibling=t.child,t.child=c):(e=n.last,e!==null?e.sibling=c:t.child=c,n.last=c)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=fe(),e.sibling=null,a=Fe.current,F(Fe,s?a&1|2:a&1),Ne&&Ea(t,n.treeForkCount),e):(qe(t),null);case 22:case 23:return zt(t),Qc(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),a=t.updateQueue,a!==null&&eu(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Y(Jn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Aa(et),qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function o0(e,t){switch(Cc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(et),Ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Pt(t),null;case 31:if(t.memoizedState!==null){if(zt(t),t.alternate===null)throw Error(r(340));Xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Fe),null;case 4:return Ue(),null;case 10:return Aa(t.type),null;case 22:case 23:return zt(t),Qc(),e!==null&&Y(Jn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Aa(et),null;case 25:return null;default:return null}}function sh(e,t){switch(Cc(t),t.tag){case 3:Aa(et),Ue();break;case 26:case 27:case 5:Pt(t);break;case 4:Ue();break;case 31:t.memoizedState!==null&&zt(t);break;case 13:zt(t);break;case 19:Y(Fe);break;case 10:Aa(t.type);break;case 22:case 23:zt(t),Qc(),e!==null&&Y(Jn);break;case 24:Aa(et)}}function ws(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var s=n.next;a=s;do{if((a.tag&e)===e){n=void 0;var c=a.create,d=a.inst;n=c(),d.destroy=n}a=a.next}while(a!==s)}}catch(b){we(t,t.return,b)}}function dn(e,t,a){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var c=s.next;n=c;do{if((n.tag&e)===e){var d=n.inst,b=d.destroy;if(b!==void 0){d.destroy=void 0,s=t;var N=a,z=b;try{z()}catch(k){we(s,N,k)}}}n=n.next}while(n!==c)}}catch(k){we(t,t.return,k)}}function ih(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ff(t,a)}catch(n){we(e,e.return,n)}}}function uh(e,t,a){a.props=Wn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){we(e,t,n)}}function Os(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(s){we(e,t,s)}}function ha(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(s){we(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){we(e,t,s)}else a.current=null}function ch(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(s){we(e,e.return,s)}}function No(e,t,a){try{var n=e.stateNode;w0(n,e.type,a,t),n[rt]=t}catch(s){we(e,e.return,s)}}function oh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&yn(e.type)||e.tag===4}function Ro(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||oh(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&&yn(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 To(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ta));else if(n!==4&&(n===27&&yn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(To(e,t,a),e=e.sibling;e!==null;)To(e,t,a),e=e.sibling}function tu(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&yn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(tu(e,t,a),e=e.sibling;e!==null;)tu(e,t,a),e=e.sibling}function rh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);mt(t,n,a),t[st]=e,t[rt]=a}catch(c){we(e,e.return,c)}}var La=!1,nt=!1,_o=!1,fh=typeof WeakSet=="function"?WeakSet:Set,ct=null;function r0(e,t){if(e=e.containerInfo,Ko=ju,e=Nf(e),vc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var s=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var d=0,b=-1,N=-1,z=0,k=0,V=e,D=null;t:for(;;){for(var L;V!==a||s!==0&&V.nodeType!==3||(b=d+s),V!==c||n!==0&&V.nodeType!==3||(N=d+n),V.nodeType===3&&(d+=V.nodeValue.length),(L=V.firstChild)!==null;)D=V,V=L;for(;;){if(V===e)break t;if(D===a&&++z===s&&(b=d),D===c&&++k===n&&(N=d),(L=V.nextSibling)!==null)break;V=D,D=V.parentNode}V=L}a=b===-1||N===-1?null:{start:b,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(Jo={focusedElem:e,selectionRange:a},ju=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,c=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(a=0;a<e.length;a++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,s=c.memoizedProps,c=c.memoizedState,n=a.stateNode;try{var te=Wn(a.type,s);e=n.getSnapshotBeforeUpdate(te,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(ue){we(a,a.return,ue)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Io(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Io(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,ct=e;break}ct=t.return}}function dh(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ba(e,a),n&4&&ws(5,a);break;case 1:if(Ba(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(d){we(a,a.return,d)}else{var s=Wn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){we(a,a.return,d)}}n&64&&ih(a),n&512&&Os(a,a.return);break;case 3:if(Ba(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Ff(e,t)}catch(d){we(a,a.return,d)}}break;case 27:t===null&&n&4&&rh(a);case 26:case 5:Ba(e,a),t===null&&n&4&&ch(a),n&512&&Os(a,a.return);break;case 12:Ba(e,a);break;case 31:Ba(e,a),n&4&&ph(e,a);break;case 13:Ba(e,a),n&4&&bh(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=y0.bind(null,a),k0(e,a))));break;case 22:if(n=a.memoizedState!==null||La,!n){t=t!==null&&t.memoizedState!==null||nt,s=La;var c=nt;La=n,(nt=t)&&!c?Ha(e,a,(a.subtreeFlags&8772)!==0):Ba(e,a),La=s,nt=c}break;case 30:break;default:Ba(e,a)}}function hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ls(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 Ve=null,Rt=!1;function Ua(e,t,a){for(a=a.child;a!==null;)mh(e,t,a),a=a.sibling}function mh(e,t,a){if(ot&&typeof ot.onCommitFiberUnmount=="function")try{ot.onCommitFiberUnmount(xa,a)}catch{}switch(a.tag){case 26:nt||ha(a,t),Ua(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:nt||ha(a,t);var n=Ve,s=Rt;yn(a.type)&&(Ve=a.stateNode,Rt=!1),Ua(e,t,a),Ys(a.stateNode),Ve=n,Rt=s;break;case 5:nt||ha(a,t);case 6:if(n=Ve,s=Rt,Ve=null,Ua(e,t,a),Ve=n,Rt=s,Ve!==null)if(Rt)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(a.stateNode)}catch(c){we(a,t,c)}else try{Ve.removeChild(a.stateNode)}catch(c){we(a,t,c)}break;case 18:Ve!==null&&(Rt?(e=Ve,im(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Xl(e)):im(Ve,a.stateNode));break;case 4:n=Ve,s=Rt,Ve=a.stateNode.containerInfo,Rt=!0,Ua(e,t,a),Ve=n,Rt=s;break;case 0:case 11:case 14:case 15:dn(2,a,t),nt||dn(4,a,t),Ua(e,t,a);break;case 1:nt||(ha(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&uh(a,t,n)),Ua(e,t,a);break;case 21:Ua(e,t,a);break;case 22:nt=(n=nt)||a.memoizedState!==null,Ua(e,t,a),nt=n;break;default:Ua(e,t,a)}}function ph(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xl(e)}catch(a){we(t,t.return,a)}}}function bh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xl(e)}catch(a){we(t,t.return,a)}}function f0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new fh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new fh),t;default:throw Error(r(435,e.tag))}}function au(e,t){var a=f0(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var s=x0.bind(null,e,n);n.then(s,s)}})}function Tt(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var s=a[n],c=e,d=t,b=d;e:for(;b!==null;){switch(b.tag){case 27:if(yn(b.type)){Ve=b.stateNode,Rt=!1;break e}break;case 5:Ve=b.stateNode,Rt=!1;break e;case 3:case 4:Ve=b.stateNode.containerInfo,Rt=!0;break e}b=b.return}if(Ve===null)throw Error(r(160));mh(c,d,s),Ve=null,Rt=!1,c=s.alternate,c!==null&&(c.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gh(t,e),t=t.sibling}var aa=null;function gh(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Tt(t,e),_t(e),n&4&&(dn(3,e,e.return),ws(3,e),dn(5,e,e.return));break;case 1:Tt(t,e),_t(e),n&512&&(nt||a===null||ha(a,a.return)),n&64&&La&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var s=aa;if(Tt(t,e),_t(e),n&512&&(nt||a===null||ha(a,a.return)),n&4){var c=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(n){case"title":c=s.getElementsByTagName("title")[0],(!c||c[Hn]||c[st]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=s.createElement(n),s.head.insertBefore(c,s.querySelector("head > title"))),mt(c,n,a),c[st]=e,We(c),n=c;break e;case"link":var d=gm("link","href",s).get(n+(a.href||""));if(d){for(var b=0;b<d.length;b++)if(c=d[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){d.splice(b,1);break t}}c=s.createElement(n),mt(c,n,a),s.head.appendChild(c);break;case"meta":if(d=gm("meta","content",s).get(n+(a.content||""))){for(b=0;b<d.length;b++)if(c=d[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){d.splice(b,1);break t}}c=s.createElement(n),mt(c,n,a),s.head.appendChild(c);break;default:throw Error(r(468,n))}c[st]=e,We(c),n=c}e.stateNode=n}else vm(s,e.type,e.stateNode);else e.stateNode=bm(s,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?vm(s,e.type,e.stateNode):bm(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&No(e,e.memoizedProps,a.memoizedProps)}break;case 27:Tt(t,e),_t(e),n&512&&(nt||a===null||ha(a,a.return)),a!==null&&n&4&&No(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Tt(t,e),_t(e),n&512&&(nt||a===null||ha(a,a.return)),e.flags&32){s=e.stateNode;try{ml(s,"")}catch(te){we(e,e.return,te)}}n&4&&e.stateNode!=null&&(s=e.memoizedProps,No(e,s,a!==null?a.memoizedProps:s)),n&1024&&(_o=!0);break;case 6:if(Tt(t,e),_t(e),n&4){if(e.stateNode===null)throw Error(r(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(te){we(e,e.return,te)}}break;case 3:if(vu=null,s=aa,aa=bu(t.containerInfo),Tt(t,e),aa=s,_t(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Xl(t.containerInfo)}catch(te){we(e,e.return,te)}_o&&(_o=!1,vh(e));break;case 4:n=aa,aa=bu(e.stateNode.containerInfo),Tt(t,e),_t(e),aa=n;break;case 12:Tt(t,e),_t(e);break;case 31:Tt(t,e),_t(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,au(e,n)));break;case 13:Tt(t,e),_t(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(lu=fe()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,au(e,n)));break;case 22:s=e.memoizedState!==null;var N=a!==null&&a.memoizedState!==null,z=La,k=nt;if(La=z||s,nt=k||N,Tt(t,e),nt=k,La=z,_t(e),n&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||N||La||nt||el(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){N=a=t;try{if(c=N.stateNode,s)d=c.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{b=N.stateNode;var V=N.memoizedProps.style,D=V!=null&&V.hasOwnProperty("display")?V.display:null;b.style.display=D==null||typeof D=="boolean"?"":(""+D).trim()}}catch(te){we(N,N.return,te)}}}else if(t.tag===6){if(a===null){N=t;try{N.stateNode.nodeValue=s?"":N.memoizedProps}catch(te){we(N,N.return,te)}}}else if(t.tag===18){if(a===null){N=t;try{var L=N.stateNode;s?um(L,!0):um(N.stateNode,!1)}catch(te){we(N,N.return,te)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,au(e,a))));break;case 19:Tt(t,e),_t(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,au(e,n)));break;case 30:break;case 21:break;default:Tt(t,e),_t(e)}}function _t(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(oh(n)){a=n;break}n=n.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var s=a.stateNode,c=Ro(e);tu(e,c,s);break;case 5:var d=a.stateNode;a.flags&32&&(ml(d,""),a.flags&=-33);var b=Ro(e);tu(e,b,d);break;case 3:case 4:var N=a.stateNode.containerInfo,z=Ro(e);To(e,z,N);break;default:throw Error(r(161))}}catch(k){we(e,e.return,k)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ba(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dh(e,t.alternate,t),t=t.sibling}function el(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:dn(4,t,t.return),el(t);break;case 1:ha(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&uh(t,t.return,a),el(t);break;case 27:Ys(t.stateNode);case 26:case 5:ha(t,t.return),el(t);break;case 22:t.memoizedState===null&&el(t);break;case 30:el(t);break;default:el(t)}e=e.sibling}}function Ha(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,s=e,c=t,d=c.flags;switch(c.tag){case 0:case 11:case 15:Ha(s,c,a),ws(4,c);break;case 1:if(Ha(s,c,a),n=c,s=n.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(z){we(n,n.return,z)}if(n=c,s=n.updateQueue,s!==null){var b=n.stateNode;try{var N=s.shared.hiddenCallbacks;if(N!==null)for(s.shared.hiddenCallbacks=null,s=0;s<N.length;s++)$f(N[s],b)}catch(z){we(n,n.return,z)}}a&&d&64&&ih(c),Os(c,c.return);break;case 27:rh(c);case 26:case 5:Ha(s,c,a),a&&n===null&&d&4&&ch(c),Os(c,c.return);break;case 12:Ha(s,c,a);break;case 31:Ha(s,c,a),a&&d&4&&ph(s,c);break;case 13:Ha(s,c,a),a&&d&4&&bh(s,c);break;case 22:c.memoizedState===null&&Ha(s,c,a),Os(c,c.return);break;case 30:break;default:Ha(s,c,a)}t=t.sibling}}function Mo(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&vs(a))}function Eo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vs(e))}function na(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)yh(e,t,a,n),t=t.sibling}function yh(e,t,a,n){var s=t.flags;switch(t.tag){case 0:case 11:case 15:na(e,t,a,n),s&2048&&ws(9,t);break;case 1:na(e,t,a,n);break;case 3:na(e,t,a,n),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vs(e)));break;case 12:if(s&2048){na(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,d=c.id,b=c.onPostCommit;typeof b=="function"&&b(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){we(t,t.return,N)}}else na(e,t,a,n);break;case 31:na(e,t,a,n);break;case 13:na(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,d=t.alternate,t.memoizedState!==null?c._visibility&2?na(e,t,a,n):zs(e,t):c._visibility&2?na(e,t,a,n):(c._visibility|=2,Dl(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Mo(d,t);break;case 24:na(e,t,a,n),s&2048&&Eo(t.alternate,t);break;default:na(e,t,a,n)}}function Dl(e,t,a,n,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,d=t,b=a,N=n,z=d.flags;switch(d.tag){case 0:case 11:case 15:Dl(c,d,b,N,s),ws(8,d);break;case 23:break;case 22:var k=d.stateNode;d.memoizedState!==null?k._visibility&2?Dl(c,d,b,N,s):zs(c,d):(k._visibility|=2,Dl(c,d,b,N,s)),s&&z&2048&&Mo(d.alternate,d);break;case 24:Dl(c,d,b,N,s),s&&z&2048&&Eo(d.alternate,d);break;default:Dl(c,d,b,N,s)}t=t.sibling}}function zs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,s=n.flags;switch(n.tag){case 22:zs(a,n),s&2048&&Mo(n.alternate,n);break;case 24:zs(a,n),s&2048&&Eo(n.alternate,n);break;default:zs(a,n)}t=t.sibling}}var Ds=8192;function Ll(e,t,a){if(e.subtreeFlags&Ds)for(e=e.child;e!==null;)xh(e,t,a),e=e.sibling}function xh(e,t,a){switch(e.tag){case 26:Ll(e,t,a),e.flags&Ds&&e.memoizedState!==null&&I0(a,aa,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,a);break;case 3:case 4:var n=aa;aa=bu(e.stateNode.containerInfo),Ll(e,t,a),aa=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ds,Ds=16777216,Ll(e,t,a),Ds=n):Ll(e,t,a));break;default:Ll(e,t,a)}}function Sh(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 Ls(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];ct=n,Nh(n,e)}Sh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jh(e),e=e.sibling}function jh(e){switch(e.tag){case 0:case 11:case 15:Ls(e),e.flags&2048&&dn(9,e,e.return);break;case 3:Ls(e);break;case 12:Ls(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,nu(e)):Ls(e);break;default:Ls(e)}}function nu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];ct=n,Nh(n,e)}Sh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:dn(8,t,t.return),nu(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,nu(t));break;default:nu(t)}e=e.sibling}}function Nh(e,t){for(;ct!==null;){var a=ct;switch(a.tag){case 0:case 11:case 15:dn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:vs(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,ct=n;else e:for(a=e;ct!==null;){n=ct;var s=n.sibling,c=n.return;if(hh(n),n===a){ct=null;break e}if(s!==null){s.return=c,ct=s;break e}ct=c}}}var d0={getCacheForType:function(e){var t=dt(et),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return dt(et).controller.signal}},h0=typeof WeakMap=="function"?WeakMap:Map,Ce=0,Be=null,ge=null,Se=0,Ae=0,Dt=null,hn=!1,Ul=!1,Co=!1,ka=0,Ke=0,mn=0,tl=0,Ao=0,Lt=0,Bl=0,Us=null,Mt=null,wo=!1,lu=0,Rh=0,su=1/0,iu=null,pn=null,it=0,bn=null,Hl=null,qa=0,Oo=0,zo=null,Th=null,Bs=0,Do=null;function Ut(){return(Ce&2)!==0&&Se!==0?Se&-Se:H.T!==null?qo():mi()}function _h(){if(Lt===0)if((Se&536870912)===0||Ne){var e=Wt;Wt<<=1,(Wt&3932160)===0&&(Wt=262144),Lt=e}else Lt=536870912;return e=Ot.current,e!==null&&(e.flags|=32),Lt}function Et(e,t,a){(e===Be&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(kl(e,0),gn(e,Se,Lt,!1)),qt(e,a),((Ce&2)===0||e!==Be)&&(e===Be&&((Ce&2)===0&&(tl|=a),Ke===4&&gn(e,Se,Lt,!1)),ma(e))}function Mh(e,t,a){if((Ce&6)!==0)throw Error(r(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Sa(e,t),s=n?b0(e,t):Uo(e,t,!0),c=n;do{if(s===0){Ul&&!n&&gn(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!m0(a)){s=Uo(e,t,!1),c=!1;continue}if(s===2){if(c=t,e.errorRecoveryDisabledLanes&c)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var b=e;s=Us;var N=b.current.memoizedState.isDehydrated;if(N&&(kl(b,d).flags|=256),d=Uo(b,d,!1),d!==2){if(Co&&!N){b.errorRecoveryDisabledLanes|=c,tl|=c,s=4;break e}c=Mt,Mt=s,c!==null&&(Mt===null?Mt=c:Mt.push.apply(Mt,c))}s=d}if(c=!1,s!==2)continue}}if(s===1){kl(e,0),gn(e,t,0,!0);break}e:{switch(n=e,c=s,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:gn(n,t,Lt,!hn);break e;case 2:Mt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=lu+300-fe(),10<s)){if(gn(n,t,Lt,!hn),Ln(n,0,!0)!==0)break e;qa=t,n.timeoutHandle=lm(Eh.bind(null,n,a,Mt,iu,wo,t,Lt,tl,Bl,hn,c,"Throttled",-0,0),s);break e}Eh(n,a,Mt,iu,wo,t,Lt,tl,Bl,hn,c,null,-0,0)}}break}while(!0);ma(e)}function Eh(e,t,a,n,s,c,d,b,N,z,k,V,D,L){if(e.timeoutHandle=-1,V=t.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ta},xh(t,c,V);var te=(c&62914560)===c?lu-fe():(c&4194048)===c?Rh-fe():0;if(te=P0(V,te),te!==null){qa=c,e.cancelPendingCommit=te(Uh.bind(null,e,t,c,a,n,s,d,b,N,k,V,null,D,L)),gn(e,c,d,!z);return}}Uh(e,t,c,a,n,s,d,b,N)}function m0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var s=a[n],c=s.getSnapshot;s=s.value;try{if(!At(c(),s))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 gn(e,t,a,n){t&=~Ao,t&=~tl,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var s=t;0<s;){var c=31-$e(s),d=1<<c;n[c]=-1,s&=~d}a!==0&&Un(e,a,t)}function uu(){return(Ce&6)===0?(Hs(0),!1):!0}function Lo(){if(ge!==null){if(Ae===0)var e=ge.return;else e=ge,Ca=Zn=null,Fc(e),Cl=null,xs=0,e=ge;for(;e!==null;)sh(e.alternate,e),e=e.return;ge=null}}function kl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,D0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),qa=0,Lo(),Be=e,ge=a=Ma(e.current,null),Se=t,Ae=0,Dt=null,hn=!1,Ul=Sa(e,t),Co=!1,Bl=Lt=Ao=tl=mn=Ke=0,Mt=Us=null,wo=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-$e(n),c=1<<s;t|=e[s],n&=~c}return ka=t,Ei(),a}function Ch(e,t){he=null,H.H=Es,t===El||t===Ui?(t=Xf(),Ae=3):t===Hc?(t=Xf(),Ae=4):Ae=t===ho?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Dt=t,ge===null&&(Ke=1,Fi(e,Vt(t,e.current)))}function Ah(){var e=Ot.current;return e===null?!0:(Se&4194048)===Se?Kt===null:(Se&62914560)===Se||(Se&536870912)!==0?e===Kt:!1}function wh(){var e=H.H;return H.H=Es,e===null?Es:e}function Oh(){var e=H.A;return H.A=d0,e}function cu(){Ke=4,hn||(Se&4194048)!==Se&&Ot.current!==null||(Ul=!0),(mn&134217727)===0&&(tl&134217727)===0||Be===null||gn(Be,Se,Lt,!1)}function Uo(e,t,a){var n=Ce;Ce|=2;var s=wh(),c=Oh();(Be!==e||Se!==t)&&(iu=null,kl(e,t)),t=!1;var d=Ke;e:do try{if(Ae!==0&&ge!==null){var b=ge,N=Dt;switch(Ae){case 8:Lo(),d=6;break e;case 3:case 2:case 9:case 6:Ot.current===null&&(t=!0);var z=Ae;if(Ae=0,Dt=null,ql(e,b,N,z),a&&Ul){d=0;break e}break;default:z=Ae,Ae=0,Dt=null,ql(e,b,N,z)}}p0(),d=Ke;break}catch(k){Ch(e,k)}while(!0);return t&&e.shellSuspendCounter++,Ca=Zn=null,Ce=n,H.H=s,H.A=c,ge===null&&(Be=null,Se=0,Ei()),d}function p0(){for(;ge!==null;)zh(ge)}function b0(e,t){var a=Ce;Ce|=2;var n=wh(),s=Oh();Be!==e||Se!==t?(iu=null,su=fe()+500,kl(e,t)):Ul=Sa(e,t);e:do try{if(Ae!==0&&ge!==null){t=ge;var c=Dt;t:switch(Ae){case 1:Ae=0,Dt=null,ql(e,t,c,1);break;case 2:case 9:if(Vf(c)){Ae=0,Dt=null,Dh(t);break}t=function(){Ae!==2&&Ae!==9||Be!==e||(Ae=7),ma(e)},c.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:Vf(c)?(Ae=0,Dt=null,Dh(t)):(Ae=0,Dt=null,ql(e,t,c,7));break;case 5:var d=null;switch(ge.tag){case 26:d=ge.memoizedState;case 5:case 27:var b=ge;if(d?ym(d):b.stateNode.complete){Ae=0,Dt=null;var N=b.sibling;if(N!==null)ge=N;else{var z=b.return;z!==null?(ge=z,ou(z)):ge=null}break t}}Ae=0,Dt=null,ql(e,t,c,5);break;case 6:Ae=0,Dt=null,ql(e,t,c,6);break;case 8:Lo(),Ke=6;break e;default:throw Error(r(462))}}g0();break}catch(k){Ch(e,k)}while(!0);return Ca=Zn=null,H.H=n,H.A=s,Ce=a,ge!==null?0:(Be=null,Se=0,Ei(),Ke)}function g0(){for(;ge!==null&&!va();)zh(ge)}function zh(e){var t=nh(e.alternate,e,ka);e.memoizedProps=e.pendingProps,t===null?ou(e):ge=t}function Dh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Id(a,t,t.pendingProps,t.type,void 0,Se);break;case 11:t=Id(a,t,t.pendingProps,t.type.render,t.ref,Se);break;case 5:Fc(t);default:sh(a,t),t=ge=Of(t,ka),t=nh(a,t,ka)}e.memoizedProps=e.pendingProps,t===null?ou(e):ge=t}function ql(e,t,a,n){Ca=Zn=null,Fc(t),Cl=null,xs=0;var s=t.return;try{if(s0(e,s,t,a,Se)){Ke=1,Fi(e,Vt(a,e.current)),ge=null;return}}catch(c){if(s!==null)throw ge=s,c;Ke=1,Fi(e,Vt(a,e.current)),ge=null;return}t.flags&32768?(Ne||n===1?e=!0:Ul||(Se&536870912)!==0?e=!1:(hn=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ot.current,n!==null&&n.tag===13&&(n.flags|=16384))),Lh(t,e)):ou(t)}function ou(e){var t=e;do{if((t.flags&32768)!==0){Lh(t,hn);return}e=t.return;var a=c0(t.alternate,t,ka);if(a!==null){ge=a;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);Ke===0&&(Ke=5)}function Lh(e,t){do{var a=o0(e.alternate,e);if(a!==null){a.flags&=32767,ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=a}while(e!==null);Ke=6,ge=null}function Uh(e,t,a,n,s,c,d,b,N){e.cancelPendingCommit=null;do ru();while(it!==0);if((Ce&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=Nc,di(e,a,c,d,b,N),e===Be&&(ge=Be=null,Se=0),Hl=t,bn=e,qa=a,Oo=c,zo=s,Th=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,S0(Ja,function(){return Yh(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=H.T,H.T=null,s=$.p,$.p=2,d=Ce,Ce|=4;try{r0(e,t,a)}finally{Ce=d,$.p=s,H.T=n}}it=1,Bh(),Hh(),kh()}}function Bh(){if(it===1){it=0;var e=bn,t=Hl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var n=$.p;$.p=2;var s=Ce;Ce|=4;try{gh(t,e);var c=Jo,d=Nf(e.containerInfo),b=c.focusedElem,N=c.selectionRange;if(d!==b&&b&&b.ownerDocument&&jf(b.ownerDocument.documentElement,b)){if(N!==null&&vc(b)){var z=N.start,k=N.end;if(k===void 0&&(k=z),"selectionStart"in b)b.selectionStart=z,b.selectionEnd=Math.min(k,b.value.length);else{var V=b.ownerDocument||document,D=V&&V.defaultView||window;if(D.getSelection){var L=D.getSelection(),te=b.textContent.length,ue=Math.min(N.start,te),Le=N.end===void 0?ue:Math.min(N.end,te);!L.extend&&ue>Le&&(d=Le,Le=ue,ue=d);var M=Sf(b,ue),T=Sf(b,Le);if(M&&T&&(L.rangeCount!==1||L.anchorNode!==M.node||L.anchorOffset!==M.offset||L.focusNode!==T.node||L.focusOffset!==T.offset)){var O=V.createRange();O.setStart(M.node,M.offset),L.removeAllRanges(),ue>Le?(L.addRange(O),L.extend(T.node,T.offset)):(O.setEnd(T.node,T.offset),L.addRange(O))}}}}for(V=[],L=b;L=L.parentNode;)L.nodeType===1&&V.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<V.length;b++){var G=V[b];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}ju=!!Ko,Jo=Ko=null}finally{Ce=s,$.p=n,H.T=a}}e.current=t,it=2}}function Hh(){if(it===2){it=0;var e=bn,t=Hl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var n=$.p;$.p=2;var s=Ce;Ce|=4;try{dh(e,t.alternate,t)}finally{Ce=s,$.p=n,H.T=a}}it=3}}function kh(){if(it===4||it===3){it=0,Ka();var e=bn,t=Hl,a=qa,n=Th;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?it=5:(it=0,Hl=bn=null,qh(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(pn=null),Re(a),t=t.stateNode,ot&&typeof ot.onCommitFiberRoot=="function")try{ot.onCommitFiberRoot(xa,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=H.T,s=$.p,$.p=2,H.T=null;try{for(var c=e.onRecoverableError,d=0;d<n.length;d++){var b=n[d];c(b.value,{componentStack:b.stack})}}finally{H.T=t,$.p=s}}(qa&3)!==0&&ru(),ma(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===Do?Bs++:(Bs=0,Do=e):Bs=0,Hs(0)}}function qh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,vs(t)))}function ru(){return Bh(),Hh(),kh(),Yh()}function Yh(){if(it!==5)return!1;var e=bn,t=Oo;Oo=0;var a=Re(qa),n=H.T,s=$.p;try{$.p=32>a?32:a,H.T=null,a=zo,zo=null;var c=bn,d=qa;if(it=0,Hl=bn=null,qa=0,(Ce&6)!==0)throw Error(r(331));var b=Ce;if(Ce|=4,jh(c.current),yh(c,c.current,d,a),Ce=b,Hs(0,!1),ot&&typeof ot.onPostCommitFiberRoot=="function")try{ot.onPostCommitFiberRoot(xa,c)}catch{}return!0}finally{$.p=s,H.T=n,qh(e,t)}}function Gh(e,t,a){t=Vt(a,t),t=fo(e.stateNode,t,2),e=on(e,t,2),e!==null&&(qt(e,2),ma(e))}function we(e,t,a){if(e.tag===3)Gh(e,e,a);else for(;t!==null;){if(t.tag===3){Gh(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(pn===null||!pn.has(n))){e=Vt(a,e),a=Vd(2),n=on(t,a,2),n!==null&&(Qd(a,n,t,e),qt(n,2),ma(n));break}}t=t.return}}function Bo(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new h0;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(a)||(Co=!0,s.add(a),e=v0.bind(null,e,t,a),t.then(e,e))}function v0(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Be===e&&(Se&a)===a&&(Ke===4||Ke===3&&(Se&62914560)===Se&&300>fe()-lu?(Ce&2)===0&&kl(e,0):Ao|=a,Bl===Se&&(Bl=0)),ma(e)}function Vh(e,t){t===0&&(t=ts()),e=Vn(e,t),e!==null&&(qt(e,t),ma(e))}function y0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Vh(e,a)}function x0(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}n!==null&&n.delete(t),Vh(e,a)}function S0(e,t){return ga(e,t)}var fu=null,Yl=null,Ho=!1,du=!1,ko=!1,vn=0;function ma(e){e!==Yl&&e.next===null&&(Yl===null?fu=Yl=e:Yl=Yl.next=e),du=!0,Ho||(Ho=!0,N0())}function Hs(e,t){if(!ko&&du){ko=!0;do for(var a=!1,n=fu;n!==null;){if(e!==0){var s=n.pendingLanes;if(s===0)var c=0;else{var d=n.suspendedLanes,b=n.pingedLanes;c=(1<<31-$e(42|e)+1)-1,c&=s&~(d&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Kh(n,c))}else c=Se,c=Ln(n,n===Be?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||Sa(n,c)||(a=!0,Kh(n,c));n=n.next}while(a);ko=!1}}function j0(){Qh()}function Qh(){du=Ho=!1;var e=0;vn!==0&&z0()&&(e=vn);for(var t=fe(),a=null,n=fu;n!==null;){var s=n.next,c=Xh(n,t);c===0?(n.next=null,a===null?fu=s:a.next=s,s===null&&(Yl=a)):(a=n,(e!==0||(c&3)!==0)&&(du=!0)),n=s}it!==0&&it!==5||Hs(e),vn!==0&&(vn=0)}function Xh(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var d=31-$e(c),b=1<<d,N=s[d];N===-1?((b&a)===0||(b&n)!==0)&&(s[d]=ja(b,t)):N<=t&&(e.expiredLanes|=b),c&=~b}if(t=Be,a=Se,a=Ln(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Za(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Sa(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Za(n),Re(a)){case 2:case 8:a=rl;break;case 32:a=Ja;break;case 268435456:a=ya;break;default:a=Ja}return n=Zh.bind(null,e),a=ga(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Za(n),e.callbackPriority=2,e.callbackNode=null,2}function Zh(e,t){if(it!==0&&it!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(ru()&&e.callbackNode!==a)return null;var n=Se;return n=Ln(e,e===Be?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Mh(e,n,t),Xh(e,fe()),e.callbackNode!=null&&e.callbackNode===a?Zh.bind(null,e):null)}function Kh(e,t){if(ru())return null;Mh(e,t,!0)}function N0(){L0(function(){(Ce&6)!==0?ga(jt,j0):Qh()})}function qo(){if(vn===0){var e=_l;e===0&&(e=$a,$a<<=1,($a&261888)===0&&($a=256)),vn=e}return vn}function Jh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xi(""+e)}function $h(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function R0(e,t,a,n,s){if(t==="submit"&&a&&a.stateNode===s){var c=Jh((s[rt]||null).action),d=n.submitter;d&&(t=(t=d[rt]||null)?Jh(t.formAction):d.getAttribute("formAction"),t!==null&&(c=t,d=null));var b=new Ri("action","action",null,n,s);e.push({event:b,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(vn!==0){var N=d?$h(s,d):new FormData(s);so(a,{pending:!0,data:N,method:s.method,action:c},null,N)}}else typeof c=="function"&&(b.preventDefault(),N=d?$h(s,d):new FormData(s),so(a,{pending:!0,data:N,method:s.method,action:c},c,N))},currentTarget:s}]})}}for(var Yo=0;Yo<jc.length;Yo++){var Go=jc[Yo],T0=Go.toLowerCase(),_0=Go[0].toUpperCase()+Go.slice(1);ta(T0,"on"+_0)}ta(_f,"onAnimationEnd"),ta(Mf,"onAnimationIteration"),ta(Ef,"onAnimationStart"),ta("dblclick","onDoubleClick"),ta("focusin","onFocus"),ta("focusout","onBlur"),ta(Gb,"onTransitionRun"),ta(Vb,"onTransitionStart"),ta(Qb,"onTransitionCancel"),ta(Cf,"onTransitionEnd"),en("onMouseEnter",["mouseout","mouseover"]),en("onMouseLeave",["mouseout","mouseover"]),en("onPointerEnter",["pointerout","pointerover"]),en("onPointerLeave",["pointerout","pointerover"]),Ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ks="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(" "),M0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ks));function Fh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],s=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var d=n.length-1;0<=d;d--){var b=n[d],N=b.instance,z=b.currentTarget;if(b=b.listener,N!==c&&s.isPropagationStopped())break e;c=b,s.currentTarget=z;try{c(s)}catch(k){Mi(k)}s.currentTarget=null,c=N}else for(d=0;d<n.length;d++){if(b=n[d],N=b.instance,z=b.currentTarget,b=b.listener,N!==c&&s.isPropagationStopped())break e;c=b,s.currentTarget=z;try{c(s)}catch(k){Mi(k)}s.currentTarget=null,c=N}}}}function ve(e,t){var a=t[ns];a===void 0&&(a=t[ns]=new Set);var n=e+"__bubble";a.has(n)||(Ih(t,e,2,!1),a.add(n))}function Vo(e,t,a){var n=0;t&&(n|=4),Ih(a,e,n,t)}var hu="_reactListening"+Math.random().toString(36).slice(2);function Qo(e){if(!e[hu]){e[hu]=!0,bi.forEach(function(a){a!=="selectionchange"&&(M0.has(a)||Vo(a,!1,e),Vo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hu]||(t[hu]=!0,Vo("selectionchange",!1,t))}}function Ih(e,t,a,n){switch(_m(t)){case 2:var s=tg;break;case 8:s=ag;break;default:s=sr}a=s.bind(null,t,a,e),s=void 0,!oc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function Xo(e,t,a,n,s){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var d=n.tag;if(d===3||d===4){var b=n.stateNode.containerInfo;if(b===s)break;if(d===4)for(d=n.return;d!==null;){var N=d.tag;if((N===3||N===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;b!==null;){if(d=Ia(b),d===null)return;if(N=d.tag,N===5||N===6||N===26||N===27){n=c=d;continue e}b=b.parentNode}}n=n.return}tf(function(){var z=c,k=uc(a),V=[];e:{var D=Af.get(e);if(D!==void 0){var L=Ri,te=e;switch(e){case"keypress":if(ji(a)===0)break e;case"keydown":case"keyup":L=xb;break;case"focusin":te="focus",L=hc;break;case"focusout":te="blur",L=hc;break;case"beforeblur":case"afterblur":L=hc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=lf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=cb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=Nb;break;case _f:case Mf:case Ef:L=fb;break;case Cf:L=Tb;break;case"scroll":case"scrollend":L=ib;break;case"wheel":L=Mb;break;case"copy":case"cut":case"paste":L=hb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=uf;break;case"toggle":case"beforetoggle":L=Cb}var ue=(t&4)!==0,Le=!ue&&(e==="scroll"||e==="scrollend"),M=ue?D!==null?D+"Capture":null:D;ue=[];for(var T=z,O;T!==null;){var G=T;if(O=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||O===null||M===null||(G=us(T,M),G!=null&&ue.push(qs(T,G,O))),Le)break;T=T.return}0<ue.length&&(D=new L(D,te,null,a,k),V.push({event:D,listeners:ue}))}}if((t&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",D&&a!==ic&&(te=a.relatedTarget||a.fromElement)&&(Ia(te)||te[Fa]))break e;if((L||D)&&(D=k.window===k?k:(D=k.ownerDocument)?D.defaultView||D.parentWindow:window,L?(te=a.relatedTarget||a.toElement,L=z,te=te?Ia(te):null,te!==null&&(Le=h(te),ue=te.tag,te!==Le||ue!==5&&ue!==27&&ue!==6)&&(te=null)):(L=null,te=z),L!==te)){if(ue=lf,G="onMouseLeave",M="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(ue=uf,G="onPointerLeave",M="onPointerEnter",T="pointer"),Le=L==null?D:kn(L),O=te==null?D:kn(te),D=new ue(G,T+"leave",L,a,k),D.target=Le,D.relatedTarget=O,G=null,Ia(k)===z&&(ue=new ue(M,T+"enter",te,a,k),ue.target=O,ue.relatedTarget=Le,G=ue),Le=G,L&&te)t:{for(ue=E0,M=L,T=te,O=0,G=M;G;G=ue(G))O++;G=0;for(var ie=T;ie;ie=ue(ie))G++;for(;0<O-G;)M=ue(M),O--;for(;0<G-O;)T=ue(T),G--;for(;O--;){if(M===T||T!==null&&M===T.alternate){ue=M;break t}M=ue(M),T=ue(T)}ue=null}else ue=null;L!==null&&Ph(V,D,L,ue,!1),te!==null&&Le!==null&&Ph(V,Le,te,ue,!0)}}e:{if(D=z?kn(z):window,L=D.nodeName&&D.nodeName.toLowerCase(),L==="select"||L==="input"&&D.type==="file")var _e=pf;else if(hf(D))if(bf)_e=kb;else{_e=Bb;var ae=Ub}else L=D.nodeName,!L||L.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?z&&sc(z.elementType)&&(_e=pf):_e=Hb;if(_e&&(_e=_e(e,z))){mf(V,_e,a,k);break e}ae&&ae(e,D,z),e==="focusout"&&z&&D.type==="number"&&z.memoizedProps.value!=null&&lc(D,"number",D.value)}switch(ae=z?kn(z):window,e){case"focusin":(hf(ae)||ae.contentEditable==="true")&&(vl=ae,yc=z,ps=null);break;case"focusout":ps=yc=vl=null;break;case"mousedown":xc=!0;break;case"contextmenu":case"mouseup":case"dragend":xc=!1,Rf(V,a,k);break;case"selectionchange":if(Yb)break;case"keydown":case"keyup":Rf(V,a,k)}var me;if(pc)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else gl?ff(e,a)&&(je="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(je="onCompositionStart");je&&(cf&&a.locale!=="ko"&&(gl||je!=="onCompositionStart"?je==="onCompositionEnd"&&gl&&(me=af()):(tn=k,rc="value"in tn?tn.value:tn.textContent,gl=!0)),ae=mu(z,je),0<ae.length&&(je=new sf(je,e,null,a,k),V.push({event:je,listeners:ae}),me?je.data=me:(me=df(a),me!==null&&(je.data=me)))),(me=wb?Ob(e,a):zb(e,a))&&(je=mu(z,"onBeforeInput"),0<je.length&&(ae=new sf("onBeforeInput","beforeinput",null,a,k),V.push({event:ae,listeners:je}),ae.data=me)),R0(V,e,z,a,k)}Fh(V,t)})}function qs(e,t,a){return{instance:e,listener:t,currentTarget:a}}function mu(e,t){for(var a=t+"Capture",n=[];e!==null;){var s=e,c=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||c===null||(s=us(e,a),s!=null&&n.unshift(qs(e,s,c)),s=us(e,t),s!=null&&n.push(qs(e,s,c))),e.tag===3)return n;e=e.return}return[]}function E0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ph(e,t,a,n,s){for(var c=t._reactName,d=[];a!==null&&a!==n;){var b=a,N=b.alternate,z=b.stateNode;if(b=b.tag,N!==null&&N===n)break;b!==5&&b!==26&&b!==27||z===null||(N=z,s?(z=us(a,c),z!=null&&d.unshift(qs(a,z,N))):s||(z=us(a,c),z!=null&&d.push(qs(a,z,N)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var C0=/\r\n?/g,A0=/\u0000|\uFFFD/g;function Wh(e){return(typeof e=="string"?e:""+e).replace(C0,`
9
- `).replace(A0,"")}function em(e,t){return t=Wh(t),Wh(e)===t}function De(e,t,a,n,s,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||ml(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&ml(e,""+n);break;case"className":ut(e,"class",n);break;case"tabIndex":ut(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ut(e,a,n);break;case"style":Wr(e,n,c);break;case"data":if(t!=="object"){ut(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=xi(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"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 c=="function"&&(a==="formAction"?(t!=="input"&&De(e,t,"name",s.name,s,null),De(e,t,"formEncType",s.formEncType,s,null),De(e,t,"formMethod",s.formMethod,s,null),De(e,t,"formTarget",s.formTarget,s,null)):(De(e,t,"encType",s.encType,s,null),De(e,t,"method",s.method,s,null),De(e,t,"target",s.target,s,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=xi(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Ta);break;case"onScroll":n!=null&&ve("scroll",e);break;case"onScrollEnd":n!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(a=n.__html,a!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=xi(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":ve("beforetoggle",e),ve("toggle",e),Ge(e,"popover",n);break;case"xlinkActuate":Oe(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Oe(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Oe(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Oe(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Oe(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Oe(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Oe(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Oe(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Oe(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ge(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=lb.get(a)||a,Ge(e,a,n))}}function Zo(e,t,a,n,s,c){switch(a){case"style":Wr(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(a=n.__html,a!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof n=="string"?ml(e,n):(typeof n=="number"||typeof n=="bigint")&&ml(e,""+n);break;case"onScroll":n!=null&&ve("scroll",e);break;case"onScrollEnd":n!=null&&ve("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gi.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),c=e[rt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,s),typeof n=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,s);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Ge(e,a,n)}}}function mt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var n=!1,s=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(d!=null)switch(c){case"src":n=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:De(e,t,c,d,a,null)}}s&&De(e,t,"srcSet",a.srcSet,a,null),n&&De(e,t,"src",a.src,a,null);return;case"input":ve("invalid",e);var b=c=d=s=null,N=null,z=null;for(n in a)if(a.hasOwnProperty(n)){var k=a[n];if(k!=null)switch(n){case"name":s=k;break;case"type":d=k;break;case"checked":N=k;break;case"defaultChecked":z=k;break;case"value":c=k;break;case"defaultValue":b=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,t));break;default:De(e,t,n,k,a,null)}}$r(e,c,b,N,z,d,s,!1);return;case"select":ve("invalid",e),n=d=c=null;for(s in a)if(a.hasOwnProperty(s)&&(b=a[s],b!=null))switch(s){case"value":c=b;break;case"defaultValue":d=b;break;case"multiple":n=b;default:De(e,t,s,b,a,null)}t=c,a=d,e.multiple=!!n,t!=null?hl(e,!!n,t,!1):a!=null&&hl(e,!!n,a,!0);return;case"textarea":ve("invalid",e),c=s=n=null;for(d in a)if(a.hasOwnProperty(d)&&(b=a[d],b!=null))switch(d){case"value":n=b;break;case"defaultValue":s=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:De(e,t,d,b,a,null)}Ir(e,n,s,c);return;case"option":for(N in a)if(a.hasOwnProperty(N)&&(n=a[N],n!=null))switch(N){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:De(e,t,N,n,a,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(n=0;n<ks.length;n++)ve(ks[n],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("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(z in a)if(a.hasOwnProperty(z)&&(n=a[z],n!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:De(e,t,z,n,a,null)}return;default:if(sc(t)){for(k in a)a.hasOwnProperty(k)&&(n=a[k],n!==void 0&&Zo(e,t,k,n,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(n=a[b],n!=null&&De(e,t,b,n,a,null))}function w0(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,c=null,d=null,b=null,N=null,z=null,k=null;for(L in a){var V=a[L];if(a.hasOwnProperty(L)&&V!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":N=V;default:n.hasOwnProperty(L)||De(e,t,L,null,n,V)}}for(var D in n){var L=n[D];if(V=a[D],n.hasOwnProperty(D)&&(L!=null||V!=null))switch(D){case"type":c=L;break;case"name":s=L;break;case"checked":z=L;break;case"defaultChecked":k=L;break;case"value":d=L;break;case"defaultValue":b=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(137,t));break;default:L!==V&&De(e,t,D,L,n,V)}}nc(e,d,b,N,z,k,c,s);return;case"select":L=d=b=D=null;for(c in a)if(N=a[c],a.hasOwnProperty(c)&&N!=null)switch(c){case"value":break;case"multiple":L=N;default:n.hasOwnProperty(c)||De(e,t,c,null,n,N)}for(s in n)if(c=n[s],N=a[s],n.hasOwnProperty(s)&&(c!=null||N!=null))switch(s){case"value":D=c;break;case"defaultValue":b=c;break;case"multiple":d=c;default:c!==N&&De(e,t,s,c,n,N)}t=b,a=d,n=L,D!=null?hl(e,!!a,D,!1):!!n!=!!a&&(t!=null?hl(e,!!a,t,!0):hl(e,!!a,a?[]:"",!1));return;case"textarea":L=D=null;for(b in a)if(s=a[b],a.hasOwnProperty(b)&&s!=null&&!n.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:De(e,t,b,null,n,s)}for(d in n)if(s=n[d],c=a[d],n.hasOwnProperty(d)&&(s!=null||c!=null))switch(d){case"value":D=s;break;case"defaultValue":L=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==c&&De(e,t,d,s,n,c)}Fr(e,D,L);return;case"option":for(var te in a)if(D=a[te],a.hasOwnProperty(te)&&D!=null&&!n.hasOwnProperty(te))switch(te){case"selected":e.selected=!1;break;default:De(e,t,te,null,n,D)}for(N in n)if(D=n[N],L=a[N],n.hasOwnProperty(N)&&D!==L&&(D!=null||L!=null))switch(N){case"selected":e.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:De(e,t,N,D,n,L)}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 ue in a)D=a[ue],a.hasOwnProperty(ue)&&D!=null&&!n.hasOwnProperty(ue)&&De(e,t,ue,null,n,D);for(z in n)if(D=n[z],L=a[z],n.hasOwnProperty(z)&&D!==L&&(D!=null||L!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:De(e,t,z,D,n,L)}return;default:if(sc(t)){for(var Le in a)D=a[Le],a.hasOwnProperty(Le)&&D!==void 0&&!n.hasOwnProperty(Le)&&Zo(e,t,Le,void 0,n,D);for(k in n)D=n[k],L=a[k],!n.hasOwnProperty(k)||D===L||D===void 0&&L===void 0||Zo(e,t,k,D,n,L);return}}for(var M in a)D=a[M],a.hasOwnProperty(M)&&D!=null&&!n.hasOwnProperty(M)&&De(e,t,M,null,n,D);for(V in n)D=n[V],L=a[V],!n.hasOwnProperty(V)||D===L||D==null&&L==null||De(e,t,V,D,n,L)}function tm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function O0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var s=a[n],c=s.transferSize,d=s.initiatorType,b=s.duration;if(c&&b&&tm(d)){for(d=0,b=s.responseEnd,n+=1;n<a.length;n++){var N=a[n],z=N.startTime;if(z>b)break;var k=N.transferSize,V=N.initiatorType;k&&tm(V)&&(N=N.responseEnd,d+=k*(N<b?1:(b-z)/(N-z)))}if(--n,t+=8*(c+d)/(s.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 Ko=null,Jo=null;function pu(e){return e.nodeType===9?e:e.ownerDocument}function am(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 nm(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 $o(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 Fo=null;function z0(){var e=window.event;return e&&e.type==="popstate"?e===Fo?!1:(Fo=e,!0):(Fo=null,!1)}var lm=typeof setTimeout=="function"?setTimeout:void 0,D0=typeof clearTimeout=="function"?clearTimeout:void 0,sm=typeof Promise=="function"?Promise:void 0,L0=typeof queueMicrotask=="function"?queueMicrotask:typeof sm<"u"?function(e){return sm.resolve(null).then(e).catch(U0)}:lm;function U0(e){setTimeout(function(){throw e})}function yn(e){return e==="head"}function im(e,t){var a=t,n=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(s),Xl(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Ys(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ys(a);for(var c=a.firstChild;c;){var d=c.nextSibling,b=c.nodeName;c[Hn]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=d}}else a==="body"&&Ys(e.ownerDocument.body);a=s}while(a);Xl(t)}function um(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Io(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Io(a),ls(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function B0(e,t,a,n){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Hn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Jt(e.nextSibling),e===null)break}return null}function H0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Jt(e.nextSibling),e===null))return null;return e}function cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Jt(e.nextSibling),e===null))return null;return e}function Po(e){return e.data==="$?"||e.data==="$~"}function Wo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function k0(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Jt(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 er=null;function om(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Jt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function rm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function fm(e,t,a){switch(t=pu(a),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 Ys(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ls(e)}var $t=new Map,dm=new Set;function bu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ya=$.d;$.d={f:q0,r:Y0,D:G0,C:V0,L:Q0,m:X0,X:K0,S:Z0,M:J0};function q0(){var e=Ya.f(),t=uu();return e||t}function Y0(e){var t=Pa(e);t!==null&&t.tag===5&&t.type==="form"?Cd(t):Ya.r(e)}var Gl=typeof document>"u"?null:document;function hm(e,t,a){var n=Gl;if(n&&typeof t=="string"&&t){var s=Yt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),dm.has(s)||(dm.add(s),e={rel:e,crossOrigin:a,href:t},n.querySelector(s)===null&&(t=n.createElement("link"),mt(t,"link",e),We(t),n.head.appendChild(t)))}}function G0(e){Ya.D(e),hm("dns-prefetch",e,null)}function V0(e,t){Ya.C(e,t),hm("preconnect",e,t)}function Q0(e,t,a){Ya.L(e,t,a);var n=Gl;if(n&&e&&t){var s='link[rel="preload"][as="'+Yt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Yt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Yt(a.imageSizes)+'"]')):s+='[href="'+Yt(e)+'"]';var c=s;switch(t){case"style":c=Vl(e);break;case"script":c=Ql(e)}$t.has(c)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),$t.set(c,e),n.querySelector(s)!==null||t==="style"&&n.querySelector(Gs(c))||t==="script"&&n.querySelector(Vs(c))||(t=n.createElement("link"),mt(t,"link",e),We(t),n.head.appendChild(t)))}}function X0(e,t){Ya.m(e,t);var a=Gl;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Yt(n)+'"][href="'+Yt(e)+'"]',c=s;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ql(e)}if(!$t.has(c)&&(e=y({rel:"modulepreload",href:e},t),$t.set(c,e),a.querySelector(s)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Vs(c)))return}n=a.createElement("link"),mt(n,"link",e),We(n),a.head.appendChild(n)}}}function Z0(e,t,a){Ya.S(e,t,a);var n=Gl;if(n&&e){var s=Wa(n).hoistableStyles,c=Vl(e);t=t||"default";var d=s.get(c);if(!d){var b={loading:0,preload:null};if(d=n.querySelector(Gs(c)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=$t.get(c))&&tr(e,a);var N=d=n.createElement("link");We(N),mt(N,"link",e),N._p=new Promise(function(z,k){N.onload=z,N.onerror=k}),N.addEventListener("load",function(){b.loading|=1}),N.addEventListener("error",function(){b.loading|=2}),b.loading|=4,gu(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:b},s.set(c,d)}}}function K0(e,t){Ya.X(e,t);var a=Gl;if(a&&e){var n=Wa(a).hoistableScripts,s=Ql(e),c=n.get(s);c||(c=a.querySelector(Vs(s)),c||(e=y({src:e,async:!0},t),(t=$t.get(s))&&ar(e,t),c=a.createElement("script"),We(c),mt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(s,c))}}function J0(e,t){Ya.M(e,t);var a=Gl;if(a&&e){var n=Wa(a).hoistableScripts,s=Ql(e),c=n.get(s);c||(c=a.querySelector(Vs(s)),c||(e=y({src:e,async:!0,type:"module"},t),(t=$t.get(s))&&ar(e,t),c=a.createElement("script"),We(c),mt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(s,c))}}function mm(e,t,a,n){var s=(s=re.current)?bu(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Vl(a.href),a=Wa(s).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Vl(a.href);var c=Wa(s).hoistableStyles,d=c.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=s.querySelector(Gs(e)))&&!c._p&&(d.instance=c,d.state.loading=5),$t.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},$t.set(e,a),c||$0(s,e,a,d.state))),t&&n===null)throw Error(r(528,""));return d}if(t&&n!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ql(a),a=Wa(s).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Vl(e){return'href="'+Yt(e)+'"'}function Gs(e){return'link[rel="stylesheet"]['+e+"]"}function pm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function $0(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),mt(t,"link",a),We(t),e.head.appendChild(t))}function Ql(e){return'[src="'+Yt(e)+'"]'}function Vs(e){return"script[async]"+e}function bm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Yt(a.href)+'"]');if(n)return t.instance=n,We(n),n;var s=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),We(n),mt(n,"style",s),gu(n,a.precedence,e),t.instance=n;case"stylesheet":s=Vl(a.href);var c=e.querySelector(Gs(s));if(c)return t.state.loading|=4,t.instance=c,We(c),c;n=pm(a),(s=$t.get(s))&&tr(n,s),c=(e.ownerDocument||e).createElement("link"),We(c);var d=c;return d._p=new Promise(function(b,N){d.onload=b,d.onerror=N}),mt(c,"link",n),t.state.loading|=4,gu(c,a.precedence,e),t.instance=c;case"script":return c=Ql(a.src),(s=e.querySelector(Vs(c)))?(t.instance=s,We(s),s):(n=a,(s=$t.get(c))&&(n=y({},a),ar(n,s)),e=e.ownerDocument||e,s=e.createElement("script"),We(s),mt(s,"link",n),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,gu(n,a.precedence,e));return t.instance}function gu(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=n.length?n[n.length-1]:null,c=s,d=0;d<n.length;d++){var b=n[d];if(b.dataset.precedence===t)c=b;else if(c!==s)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function tr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ar(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var vu=null;function gm(e,t,a){if(vu===null){var n=new Map,s=vu=new Map;s.set(a,n)}else s=vu,n=s.get(a),n||(n=new Map,s.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var c=a[s];if(!(c[Hn]||c[st]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var d=c.getAttribute(t)||"";d=e+d;var b=n.get(d);b?b.push(c):n.set(d,[c])}}return n}function vm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function F0(e,t,a){if(a===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 ym(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function I0(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=Vl(n.href),c=t.querySelector(Gs(s));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=yu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,We(c);return}c=t.ownerDocument||t,n=pm(n),(s=$t.get(s))&&tr(n,s),c=c.createElement("link"),We(c);var d=c;d._p=new Promise(function(b,N){d.onload=b,d.onerror=N}),mt(c,"link",n),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=yu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var nr=0;function P0(e,t){return e.stylesheets&&e.count===0&&Su(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Su(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&nr===0&&(nr=62500*O0());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Su(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>nr?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(s)}}:null}function yu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Su(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xu=null;function Su(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xu=new Map,t.forEach(W0,e),xu=null,yu.call(e))}function W0(e,t){if(!(t.state.loading&4)){var a=xu.get(e);if(a)var n=a.get(null);else{a=new Map,xu.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<s.length;c++){var d=s[c];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(a.set(d.dataset.precedence,d),n=d)}n&&a.set(null,n)}s=t.instance,d=s.getAttribute("data-precedence"),c=a.get(d)||n,c===n&&a.set(null,s),a.set(d,s),this.count++,n=yu.bind(this),s.addEventListener("load",n),s.addEventListener("error",n),c?c.parentNode.insertBefore(s,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Qs={$$typeof:Z,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function eg(e,t,a,n,s,c,d,b,N){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=oa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oa(0),this.hiddenUpdates=oa(null),this.identifierPrefix=n,this.onUncaughtError=s,this.onCaughtError=c,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function xm(e,t,a,n,s,c,d,b,N,z,k,V){return e=new eg(e,t,a,d,N,z,k,V,b),t=1,c===!0&&(t|=24),c=wt(3,null,null,t),e.current=c,c.stateNode=e,t=Lc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},kc(c),e}function Sm(e){return e?(e=Sl,e):Sl}function jm(e,t,a,n,s,c){s=Sm(s),n.context===null?n.context=s:n.pendingContext=s,n=cn(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=on(e,n,t),a!==null&&(Et(a,e,t),js(a,e,t))}function Nm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function lr(e,t){Nm(e,t),(e=e.alternate)&&Nm(e,t)}function Rm(e){if(e.tag===13||e.tag===31){var t=Vn(e,67108864);t!==null&&Et(t,e,67108864),lr(e,67108864)}}function Tm(e){if(e.tag===13||e.tag===31){var t=Ut();t=Bn(t);var a=Vn(e,t);a!==null&&Et(a,e,t),lr(e,t)}}var ju=!0;function tg(e,t,a,n){var s=H.T;H.T=null;var c=$.p;try{$.p=2,sr(e,t,a,n)}finally{$.p=c,H.T=s}}function ag(e,t,a,n){var s=H.T;H.T=null;var c=$.p;try{$.p=8,sr(e,t,a,n)}finally{$.p=c,H.T=s}}function sr(e,t,a,n){if(ju){var s=ir(n);if(s===null)Xo(e,t,n,Nu,a),Mm(e,n);else if(lg(s,e,t,a,n))n.stopPropagation();else if(Mm(e,n),t&4&&-1<ng.indexOf(e)){for(;s!==null;){var c=Pa(s);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var d=pt(c.pendingLanes);if(d!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;d;){var N=1<<31-$e(d);b.entanglements[1]|=N,d&=~N}ma(c),(Ce&6)===0&&(su=fe()+500,Hs(0))}}break;case 31:case 13:b=Vn(c,2),b!==null&&Et(b,c,2),uu(),lr(c,2)}if(c=ir(n),c===null&&Xo(e,t,n,Nu,a),c===s)break;s=c}s!==null&&n.stopPropagation()}else Xo(e,t,n,null,a)}}function ir(e){return e=uc(e),ur(e)}var Nu=null;function ur(e){if(Nu=null,e=Ia(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=v(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Nu=e,null}function _m(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(Pe()){case jt:return 2;case rl:return 8;case Ja:case Wu:return 32;case ya:return 268435456;default:return 32}default:return 32}}var cr=!1,xn=null,Sn=null,jn=null,Xs=new Map,Zs=new Map,Nn=[],ng="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 Mm(e,t){switch(e){case"focusin":case"focusout":xn=null;break;case"dragenter":case"dragleave":Sn=null;break;case"mouseover":case"mouseout":jn=null;break;case"pointerover":case"pointerout":Xs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zs.delete(t.pointerId)}}function Ks(e,t,a,n,s,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:c,targetContainers:[s]},t!==null&&(t=Pa(t),t!==null&&Rm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function lg(e,t,a,n,s){switch(t){case"focusin":return xn=Ks(xn,e,t,a,n,s),!0;case"dragenter":return Sn=Ks(Sn,e,t,a,n,s),!0;case"mouseover":return jn=Ks(jn,e,t,a,n,s),!0;case"pointerover":var c=s.pointerId;return Xs.set(c,Ks(Xs.get(c)||null,e,t,a,n,s)),!0;case"gotpointercapture":return c=s.pointerId,Zs.set(c,Ks(Zs.get(c)||null,e,t,a,n,s)),!0}return!1}function Em(e){var t=Ia(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,as(e.priority,function(){Tm(a)});return}}else if(t===31){if(t=v(a),t!==null){e.blockedOn=t,as(e.priority,function(){Tm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ru(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ir(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);ic=n,a.target.dispatchEvent(n),ic=null}else return t=Pa(a),t!==null&&Rm(t),e.blockedOn=a,!1;t.shift()}return!0}function Cm(e,t,a){Ru(e)&&a.delete(t)}function sg(){cr=!1,xn!==null&&Ru(xn)&&(xn=null),Sn!==null&&Ru(Sn)&&(Sn=null),jn!==null&&Ru(jn)&&(jn=null),Xs.forEach(Cm),Zs.forEach(Cm)}function Tu(e,t){e.blockedOn===t&&(e.blockedOn=null,cr||(cr=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,sg)))}var _u=null;function Am(e){_u!==e&&(_u=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){_u===e&&(_u=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],s=e[t+2];if(typeof n!="function"){if(ur(n||a)===null)continue;break}var c=Pa(a);c!==null&&(e.splice(t,3),t-=3,so(c,{pending:!0,data:s,method:a.method,action:n},n,s))}}))}function Xl(e){function t(N){return Tu(N,e)}xn!==null&&Tu(xn,e),Sn!==null&&Tu(Sn,e),jn!==null&&Tu(jn,e),Xs.forEach(t),Zs.forEach(t);for(var a=0;a<Nn.length;a++){var n=Nn[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Nn.length&&(a=Nn[0],a.blockedOn===null);)Em(a),a.blockedOn===null&&Nn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var s=a[n],c=a[n+1],d=s[rt]||null;if(typeof c=="function")d||Am(a);else if(d){var b=null;if(c&&c.hasAttribute("formAction")){if(s=c,d=c[rt]||null)b=d.formAction;else if(ur(s)!==null)continue}else b=d.action;typeof b=="function"?a[n+1]=b:(a.splice(n,3),n-=3),Am(a)}}}function wm(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function or(e){this._internalRoot=e}Mu.prototype.render=or.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,n=Ut();jm(a,n,e,t,null,null)},Mu.prototype.unmount=or.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jm(e.current,2,null,e,null,null),uu(),t[Fa]=null}};function Mu(e){this._internalRoot=e}Mu.prototype.unstable_scheduleHydration=function(e){if(e){var t=mi();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Nn.length&&t!==0&&t<Nn[a].priority;a++);Nn.splice(a,0,e),a===0&&Em(e)}};var Om=u.version;if(Om!=="19.2.4")throw Error(r(527,Om,"19.2.4"));$.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=m(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var ig={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eu.isDisabled&&Eu.supportsFiber)try{xa=Eu.inject(ig),ot=Eu}catch{}}return $s.createRoot=function(e,t){if(!f(e))throw Error(r(299));var a=!1,n="",s=kd,c=qd,d=Yd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=xm(e,1,!1,null,null,a,n,null,s,c,d,wm),e[Fa]=t.current,Qo(e),new or(t)},$s.hydrateRoot=function(e,t,a){if(!f(e))throw Error(r(299));var n=!1,s="",c=kd,d=qd,b=Yd,N=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(N=a.formState)),t=xm(e,1,!0,t,a??null,n,s,N,c,d,b,wm),t.context=Sm(null),a=t.current,n=Ut(),n=Bn(n),s=cn(n),s.callback=null,on(a,s,n),a=n,t.current.lanes=a,qt(t,a),ma(t),e[Fa]=t.current,Qo(e),new Mu(t)},$s.version="19.2.4",$s}var Gm;function bg(){if(Gm)return dr.exports;Gm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),dr.exports=pg(),dr.exports}var gg=bg(),ni=typeof window<"u"?U.useLayoutEffect:U.useEffect;function br(l){const u=U.useRef({value:l,prev:null}),i=u.current.value;return l!==i&&(u.current={value:l,prev:i}),u.current.prev}function vg(l,u,i={},r={}){U.useEffect(()=>{if(!l.current||r.disabled||typeof IntersectionObserver!="function")return;const f=new IntersectionObserver(([h])=>{u(h)},i);return f.observe(l.current),()=>{f.disconnect()}},[u,i,r.disabled,l])}function yg(l){const u=U.useRef(null);return U.useImperativeHandle(l,()=>u.current,[]),u}var Rp=!1;function li(l){return l[l.length-1]}function xg(l){return typeof l=="function"}function Mn(l,u){return xg(l)?l(u):l}var Sg=Object.prototype.hasOwnProperty,Vm=Object.prototype.propertyIsEnumerable,jg=()=>Object.create(null),al=(l,u)=>nl(l,u,jg);function nl(l,u,i=()=>({}),r=0){if(l===u)return l;if(r>500)return u;const f=u,h=Zm(l)&&Zm(f);if(!h&&!(Wl(l)&&Wl(f)))return f;const g=h?l:Qm(l);if(!g)return f;const v=h?f:Qm(f);if(!v)return f;const p=g.length,m=v.length,S=h?new Array(m):i();let y=0;for(let x=0;x<m;x++){const j=h?x:v[x],_=l[j],E=f[j];if(_===E){S[j]=_,(h?x<p:Sg.call(l,j))&&y++;continue}if(_===null||E===null||typeof _!="object"||typeof E!="object"){S[j]=E;continue}const A=nl(_,E,i,r+1);S[j]=A,A===_&&y++}return p===m&&y===p?l:S}function Qm(l){const u=Object.getOwnPropertyNames(l);for(const f of u)if(!Vm.call(l,f))return!1;const i=Object.getOwnPropertySymbols(l);if(i.length===0)return u;const r=u;for(const f of i){if(!Vm.call(l,f))return!1;r.push(f)}return r}function Wl(l){if(!Xm(l))return!1;const u=l.constructor;if(typeof u>"u")return!0;const i=u.prototype;return!(!Xm(i)||!i.hasOwnProperty("isPrototypeOf"))}function Xm(l){return Object.prototype.toString.call(l)==="[object Object]"}function Zm(l){return Array.isArray(l)&&l.length===Object.keys(l).length}function il(l,u,i){if(l===u)return!0;if(typeof l!=typeof u)return!1;if(Array.isArray(l)&&Array.isArray(u)){if(l.length!==u.length)return!1;for(let r=0,f=l.length;r<f;r++)if(!il(l[r],u[r],i))return!1;return!0}if(Wl(l)&&Wl(u)){const r=i?.ignoreUndefined??!0;if(i?.partial){for(const g in u)if((!r||u[g]!==void 0)&&!il(l[g],u[g],i))return!1;return!0}let f=0;if(!r)f=Object.keys(l).length;else for(const g in l)l[g]!==void 0&&f++;let h=0;for(const g in u)if((!r||u[g]!==void 0)&&(h++,h>f||!il(l[g],u[g],i)))return!1;return f===h}return!1}function es(l){let u,i;const r=new Promise((f,h)=>{u=f,i=h});return r.status="pending",r.resolve=f=>{r.status="resolved",r.value=f,u(f),l?.(f)},r.reject=f=>{r.status="rejected",i(f)},r}function si(l){return!!(l&&typeof l=="object"&&typeof l.then=="function")}function Ng(l){return l.replace(/[\x00-\x1f\x7f]/g,"")}function Km(l){let u;try{u=decodeURI(l)}catch{u=l.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return Ng(u)}var Rg=["http:","https:","mailto:","tel:"];function ku(l,u){if(!l)return!1;try{const i=new URL(l);return!u.has(i.protocol)}catch{return!1}}function Fs(l){if(!l)return{path:l,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(l)&&!l.startsWith("//"))return{path:l,handledProtocolRelativeURL:!1};const u=/%25|%5C/gi;let i=0,r="",f;for(;(f=u.exec(l))!==null;)r+=Km(l.slice(i,f.index))+f[0],i=u.lastIndex;r=r+Km(i?l.slice(i):l);let h=!1;return r.startsWith("//")&&(h=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:h}}function Tg(l){return/\s|[^\u0000-\u007F]/.test(l)?l.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):l}function _g(l,u){if(l===u)return!0;if(l.length!==u.length)return!1;for(let i=0;i<l.length;i++)if(l[i]!==u[i])return!1;return!0}function Qa(){throw new Error("Invariant failed")}function ii(l){const u=new Map;let i,r;const f=h=>{h.next&&(h.prev?(h.prev.next=h.next,h.next.prev=h.prev,h.next=void 0,r&&(r.next=h,h.prev=r)):(h.next.prev=void 0,i=h.next,h.next=void 0,r&&(h.prev=r,r.next=h)),r=h)};return{get(h){const g=u.get(h);if(g)return f(g),g.value},set(h,g){if(u.size>=l&&i){const p=i;u.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const v=u.get(h);if(v)v.value=g,f(v);else{const p={key:h,value:g,prev:r};r&&(r.next=p),r=p,i||(i=p),u.set(h,p)}},clear(){u.clear(),i=void 0,r=void 0}}}var ll=4,Tp=5;function Mg(l){const u=l.indexOf("{");if(u===-1)return null;const i=l.indexOf("}",u);return i===-1||u+1>=l.length?null:[u,i]}function kr(l,u,i=new Uint16Array(6)){const r=l.indexOf("/",u),f=r===-1?l.length:r,h=l.substring(u,f);if(!h||!h.includes("$"))return i[0]=0,i[1]=u,i[2]=u,i[3]=f,i[4]=f,i[5]=f,i;if(h==="$"){const v=l.length;return i[0]=2,i[1]=u,i[2]=u,i[3]=v,i[4]=v,i[5]=v,i}if(h.charCodeAt(0)===36)return i[0]=1,i[1]=u,i[2]=u+1,i[3]=f,i[4]=f,i[5]=f,i;const g=Mg(h);if(g){const[v,p]=g,m=h.charCodeAt(v+1);if(m===45){if(v+2<h.length&&h.charCodeAt(v+2)===36){const S=v+3,y=p;if(S<y)return i[0]=3,i[1]=u+v,i[2]=u+S,i[3]=u+y,i[4]=u+p+1,i[5]=f,i}}else if(m===36){const S=v+1,y=v+2;return y===p?(i[0]=2,i[1]=u+v,i[2]=u+S,i[3]=u+y,i[4]=u+p+1,i[5]=l.length,i):(i[0]=1,i[1]=u+v,i[2]=u+y,i[3]=u+p,i[4]=u+p+1,i[5]=f,i)}}return i[0]=0,i[1]=u,i[2]=u,i[3]=f,i[4]=f,i[5]=f,i}function Xu(l,u,i,r,f,h,g){g?.(i);let v=r;{const p=i.fullPath??i.from,m=p.length,S=i.options?.caseSensitive??l,y=!!(i.options?.params?.parse&&i.options?.skipRouteOnParseError?.params);for(;v<m;){const j=kr(p,v,u);let _;const E=v,A=j[5];switch(v=A+1,h++,j[0]){case 0:{const C=p.substring(j[2],j[3]);if(S){const X=f.static?.get(C);if(X)_=X;else{f.static??=new Map;const Z=sl(i.fullPath??i.from);Z.parent=f,Z.depth=h,_=Z,f.static.set(C,Z)}}else{const X=C.toLowerCase(),Z=f.staticInsensitive?.get(X);if(Z)_=Z;else{f.staticInsensitive??=new Map;const J=sl(i.fullPath??i.from);J.parent=f,J.depth=h,_=J,f.staticInsensitive.set(X,J)}}break}case 1:{const C=p.substring(E,j[1]),X=p.substring(j[4],A),Z=S&&!!(C||X),J=C?Z?C:C.toLowerCase():void 0,I=X?Z?X:X.toLowerCase():void 0,P=!y&&f.dynamic?.find(Q=>!Q.skipOnParamError&&Q.caseSensitive===Z&&Q.prefix===J&&Q.suffix===I);if(P)_=P;else{const Q=vr(1,i.fullPath??i.from,Z,J,I);_=Q,Q.depth=h,Q.parent=f,f.dynamic??=[],f.dynamic.push(Q)}break}case 3:{const C=p.substring(E,j[1]),X=p.substring(j[4],A),Z=S&&!!(C||X),J=C?Z?C:C.toLowerCase():void 0,I=X?Z?X:X.toLowerCase():void 0,P=!y&&f.optional?.find(Q=>!Q.skipOnParamError&&Q.caseSensitive===Z&&Q.prefix===J&&Q.suffix===I);if(P)_=P;else{const Q=vr(3,i.fullPath??i.from,Z,J,I);_=Q,Q.parent=f,Q.depth=h,f.optional??=[],f.optional.push(Q)}break}case 2:{const C=p.substring(E,j[1]),X=p.substring(j[4],A),Z=S&&!!(C||X),J=C?Z?C:C.toLowerCase():void 0,I=X?Z?X:X.toLowerCase():void 0,P=vr(2,i.fullPath??i.from,Z,J,I);_=P,P.parent=f,P.depth=h,f.wildcard??=[],f.wildcard.push(P)}}f=_}if(y&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const j=sl(i.fullPath??i.from);j.kind=Tp,j.parent=f,h++,j.depth=h,f.pathless??=[],f.pathless.push(j),f=j}const x=(i.path||!i.children)&&!i.isRoot;if(x&&p.endsWith("/")){const j=sl(i.fullPath??i.from);j.kind=ll,j.parent=f,h++,j.depth=h,f.index=j,f=j}f.parse=i.options?.params?.parse??null,f.skipOnParamError=y,f.parsingPriority=i.options?.skipRouteOnParseError?.priority??0,x&&!f.route&&(f.route=i,f.fullPath=i.fullPath??i.from)}if(i.children)for(const p of i.children)Xu(l,u,p,v,f,h,g)}function gr(l,u){if(l.skipOnParamError&&!u.skipOnParamError)return-1;if(!l.skipOnParamError&&u.skipOnParamError)return 1;if(l.skipOnParamError&&u.skipOnParamError&&(l.parsingPriority||u.parsingPriority))return u.parsingPriority-l.parsingPriority;if(l.prefix&&u.prefix&&l.prefix!==u.prefix){if(l.prefix.startsWith(u.prefix))return-1;if(u.prefix.startsWith(l.prefix))return 1}if(l.suffix&&u.suffix&&l.suffix!==u.suffix){if(l.suffix.endsWith(u.suffix))return-1;if(u.suffix.endsWith(l.suffix))return 1}return l.prefix&&!u.prefix?-1:!l.prefix&&u.prefix?1:l.suffix&&!u.suffix?-1:!l.suffix&&u.suffix?1:l.caseSensitive&&!u.caseSensitive?-1:!l.caseSensitive&&u.caseSensitive?1:0}function _n(l){if(l.pathless)for(const u of l.pathless)_n(u);if(l.static)for(const u of l.static.values())_n(u);if(l.staticInsensitive)for(const u of l.staticInsensitive.values())_n(u);if(l.dynamic?.length){l.dynamic.sort(gr);for(const u of l.dynamic)_n(u)}if(l.optional?.length){l.optional.sort(gr);for(const u of l.optional)_n(u)}if(l.wildcard?.length){l.wildcard.sort(gr);for(const u of l.wildcard)_n(u)}}function sl(l){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:l,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function vr(l,u,i,r,f){return{kind:l,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:u,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:i,prefix:r,suffix:f}}function Eg(l,u){const i=sl("/"),r=new Uint16Array(6);for(const f of l)Xu(!1,r,f,1,i,0);_n(i),u.masksTree=i,u.flatCache=ii(1e3)}function Cg(l,u){l||="/";const i=u.flatCache.get(l);if(i)return i;const r=qr(l,u.masksTree);return u.flatCache.set(l,r),r}function Ag(l,u,i,r,f){l||="/",r||="/";const h=u?`case\0${l}`:l;let g=f.singleCache.get(h);return g||(g=sl("/"),Xu(u,new Uint16Array(6),{from:l},1,g,0),f.singleCache.set(h,g)),qr(r,g,i)}function wg(l,u,i=!1){const r=i?l:`nofuzz\0${l}`,f=u.matchCache.get(r);if(f!==void 0)return f;l||="/";let h;try{h=qr(l,u.segmentTree,i)}catch(g){if(g instanceof URIError)h=null;else throw g}return h&&(h.branch=Dg(h.route)),u.matchCache.set(r,h),h}function Og(l){return l==="/"?l:l.replace(/\/{1,}$/,"")}function zg(l,u=!1,i){const r=sl(l.fullPath),f=new Uint16Array(6),h={},g={};let v=0;return Xu(u,f,l,1,r,0,p=>{if(i?.(p,v),p.id in h&&Qa(),h[p.id]=p,v!==0&&p.path){const m=Og(p.fullPath);(!g[m]||p.fullPath.endsWith("/"))&&(g[m]=p)}v++}),_n(r),{processedTree:{segmentTree:r,singleCache:ii(1e3),matchCache:ii(1e3),flatCache:null,masksTree:null},routesById:h,routesByPath:g}}function qr(l,u,i=!1){const r=l.split("/"),f=Ug(l,r,u,i);if(!f)return null;const[h]=_p(l,r,f);return{route:f.node.route,rawParams:h,parsedParams:f.parsedParams}}function _p(l,u,i){const r=Lg(i.node);let f=null;const h=Object.create(null);let g=i.extract?.part??0,v=i.extract?.node??0,p=i.extract?.path??0,m=i.extract?.segment??0;for(;v<r.length;g++,v++,p++,m++){const S=r[v];if(S.kind===ll)break;if(S.kind===Tp){m--,g--,p--;continue}const y=u[g],x=p;if(y&&(p+=y.length),S.kind===1){f??=i.node.fullPath.split("/");const j=f[m],_=S.prefix?.length??0;if(j.charCodeAt(_)===123){const E=S.suffix?.length??0,A=j.substring(_+2,j.length-E-1),C=y.substring(_,y.length-E);h[A]=decodeURIComponent(C)}else{const E=j.substring(1);h[E]=decodeURIComponent(y)}}else if(S.kind===3){if(i.skipped&1<<v){g--,p=x-1;continue}f??=i.node.fullPath.split("/");const j=f[m],_=S.prefix?.length??0,E=S.suffix?.length??0,A=j.substring(_+3,j.length-E-1),C=S.suffix||S.prefix?y.substring(_,y.length-E):y;C&&(h[A]=decodeURIComponent(C))}else if(S.kind===2){const j=S,_=l.substring(x+(j.prefix?.length??0),l.length-(j.suffix?.length??0)),E=decodeURIComponent(_);h["*"]=E,h._splat=E;break}}return i.rawParams&&Object.assign(h,i.rawParams),[h,{part:g,node:v,path:p,segment:m}]}function Dg(l){const u=[l];for(;l.parentRoute;)l=l.parentRoute,u.push(l);return u.reverse(),u}function Lg(l){const u=Array(l.depth+1);do u[l.depth]=l,l=l.parent;while(l);return u}function Ug(l,u,i,r){if(l==="/"&&i.index)return{node:i.index,skipped:0};const f=!li(u),h=f&&l!=="/",g=u.length-(f?1:0),v=[{node:i,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let p=null,m=null,S=null;for(;v.length;){const y=v.pop(),{node:x,index:j,skipped:_,depth:E,statics:A,dynamics:C,optionals:X}=y;let{extract:Z,rawParams:J,parsedParams:I}=y;if(x.skipOnParamError){if(!yr(l,u,y))continue;J=y.rawParams,Z=y.extract,I=y.parsedParams}r&&x.route&&x.kind!==ll&&Is(m,y)&&(m=y);const P=j===g;if(P&&(x.route&&!h&&Is(S,y)&&(S=y),!x.optional&&!x.wildcard&&!x.index&&!x.pathless))continue;const Q=P?void 0:u[j];let q;if(P&&x.index){const B={node:x.index,index:j,skipped:_,depth:E+1,statics:A,dynamics:C,optionals:X,extract:Z,rawParams:J,parsedParams:I};let se=!0;if(x.index.skipOnParamError&&(yr(l,u,B)||(se=!1)),se){if(A===g&&!C&&!X&&!_)return B;Is(S,B)&&(S=B)}}if(x.wildcard&&Is(p,y))for(const B of x.wildcard){const{prefix:se,suffix:ee}=B;if(se&&(P||!(B.caseSensitive?Q:q??=Q.toLowerCase()).startsWith(se)))continue;if(ee){if(P)continue;const be=u.slice(j).join("/").slice(-ee.length);if((B.caseSensitive?be:be.toLowerCase())!==ee)continue}const ce={node:B,index:g,skipped:_,depth:E,statics:A,dynamics:C,optionals:X,extract:Z,rawParams:J,parsedParams:I};if(!(B.skipOnParamError&&!yr(l,u,ce))){p=ce;break}}if(x.optional){const B=_|1<<E,se=E+1;for(let ee=x.optional.length-1;ee>=0;ee--){const ce=x.optional[ee];v.push({node:ce,index:j,skipped:B,depth:se,statics:A,dynamics:C,optionals:X,extract:Z,rawParams:J,parsedParams:I})}if(!P)for(let ee=x.optional.length-1;ee>=0;ee--){const ce=x.optional[ee],{prefix:be,suffix:Ye}=ce;if(be||Ye){const Ee=ce.caseSensitive?Q:q??=Q.toLowerCase();if(be&&!Ee.startsWith(be)||Ye&&!Ee.endsWith(Ye))continue}v.push({node:ce,index:j+1,skipped:_,depth:se,statics:A,dynamics:C,optionals:X+1,extract:Z,rawParams:J,parsedParams:I})}}if(!P&&x.dynamic&&Q)for(let B=x.dynamic.length-1;B>=0;B--){const se=x.dynamic[B],{prefix:ee,suffix:ce}=se;if(ee||ce){const be=se.caseSensitive?Q:q??=Q.toLowerCase();if(ee&&!be.startsWith(ee)||ce&&!be.endsWith(ce))continue}v.push({node:se,index:j+1,skipped:_,depth:E+1,statics:A,dynamics:C+1,optionals:X,extract:Z,rawParams:J,parsedParams:I})}if(!P&&x.staticInsensitive){const B=x.staticInsensitive.get(q??=Q.toLowerCase());B&&v.push({node:B,index:j+1,skipped:_,depth:E+1,statics:A+1,dynamics:C,optionals:X,extract:Z,rawParams:J,parsedParams:I})}if(!P&&x.static){const B=x.static.get(Q);B&&v.push({node:B,index:j+1,skipped:_,depth:E+1,statics:A+1,dynamics:C,optionals:X,extract:Z,rawParams:J,parsedParams:I})}if(x.pathless){const B=E+1;for(let se=x.pathless.length-1;se>=0;se--){const ee=x.pathless[se];v.push({node:ee,index:j,skipped:_,depth:B,statics:A,dynamics:C,optionals:X,extract:Z,rawParams:J,parsedParams:I})}}}if(S&&p)return Is(p,S)?S:p;if(S)return S;if(p)return p;if(r&&m){let y=m.index;for(let j=0;j<m.index;j++)y+=u[j].length;const x=y===l.length?"/":l.slice(y);return m.rawParams??=Object.create(null),m.rawParams["**"]=decodeURIComponent(x),m}return null}function yr(l,u,i){try{const[r,f]=_p(l,u,i);i.rawParams=r,i.extract=f;const h=i.node.parse(r);return i.parsedParams=Object.assign(Object.create(null),i.parsedParams,h),!0}catch{return null}}function Is(l,u){return l?u.statics>l.statics||u.statics===l.statics&&(u.dynamics>l.dynamics||u.dynamics===l.dynamics&&(u.optionals>l.optionals||u.optionals===l.optionals&&((u.node.kind===ll)>(l.node.kind===ll)||u.node.kind===ll==(l.node.kind===ll)&&u.depth>l.depth))):!0}function Du(l){return Yr(l.filter(u=>u!==void 0).join("/"))}function Yr(l){return l.replace(/\/{2,}/g,"/")}function Mp(l){return l==="/"?l:l.replace(/^\/{1,}/,"")}function An(l){const u=l.length;return u>1&&l[u-1]==="/"?l.replace(/\/{1,}$/,""):l}function Ep(l){return An(Mp(l))}function qu(l,u){return l?.endsWith("/")&&l!=="/"&&l!==`${u}/`?l.slice(0,-1):l}function Bg(l,u,i){return qu(l,i)===qu(u,i)}function Hg({base:l,to:u,trailingSlash:i="never",cache:r}){const f=u.startsWith("/"),h=!f&&u===".";let g;if(r){g=f?u:h?l:l+"\0"+u;const y=r.get(g);if(y)return y}let v;if(h)v=l.split("/");else if(f)v=u.split("/");else{for(v=l.split("/");v.length>1&&li(v)==="";)v.pop();const y=u.split("/");for(let x=0,j=y.length;x<j;x++){const _=y[x];_===""?x?x===j-1&&v.push(_):v=[_]:_===".."?v.pop():_==="."||v.push(_)}}v.length>1&&(li(v)===""?i==="never"&&v.pop():i==="always"&&v.push(""));let p,m="";for(let y=0;y<v.length;y++){y>0&&(m+="/");const x=v[y];if(!x)continue;p=kr(x,0,p);const j=p[0];if(j===0){m+=x;continue}const _=p[5],E=x.substring(0,p[1]),A=x.substring(p[4],_),C=x.substring(p[2],p[3]);j===1?m+=E||A?`${E}{$${C}}${A}`:`$${C}`:j===2?m+=E||A?`${E}{$}${A}`:"$":m+=`${E}{-$${C}}${A}`}m=Yr(m);const S=m||"/";return g&&r&&r.set(g,S),S}function kg(l){const u=new Map(l.map(f=>[encodeURIComponent(f),f])),i=Array.from(u.keys()).map(f=>f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return f=>f.replace(r,h=>u.get(h)??h)}function xr(l,u,i){const r=u[l];return typeof r!="string"?r:l==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(f=>$m(f,i)).join("/"):$m(r,i)}function Jm({path:l,params:u,decoder:i,...r}){let f=!1;const h=Object.create(null);if(!l||l==="/")return{interpolatedPath:"/",usedParams:h,isMissingParams:f};if(!l.includes("$"))return{interpolatedPath:l,usedParams:h,isMissingParams:f};const g=l.length;let v=0,p,m="";for(;v<g;){const S=v;p=kr(l,S,p);const y=p[5];if(v=y+1,S===y)continue;const x=p[0];if(x===0){m+="/"+l.substring(S,y);continue}if(x===2){const j=u._splat;h._splat=j,h["*"]=j;const _=l.substring(S,p[1]),E=l.substring(p[4],y);if(!j){f=!0,(_||E)&&(m+="/"+_+E);continue}const A=xr("_splat",u,i);m+="/"+_+A+E;continue}if(x===1){const j=l.substring(p[2],p[3]);!f&&!(j in u)&&(f=!0),h[j]=u[j];const _=l.substring(S,p[1]),E=l.substring(p[4],y),A=xr(j,u,i)??"undefined";m+="/"+_+A+E;continue}if(x===3){const j=l.substring(p[2],p[3]),_=u[j];if(_==null)continue;h[j]=_;const E=l.substring(S,p[1]),A=l.substring(p[4],y),C=xr(j,u,i)??"";m+="/"+E+C+A;continue}}return l.endsWith("/")&&(m+="/"),{usedParams:h,interpolatedPath:m||"/",isMissingParams:f}}function $m(l,u){const i=encodeURIComponent(l);return u?.(i)??i}function xt(l){return!!l?.isNotFound}function qg(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var Yg="tsr-scroll-restoration-v1_3";function Gg(){const l=qg();if(!l)return null;let u={};try{const r=JSON.parse(l.getItem("tsr-scroll-restoration-v1_3")||"{}");Wl(r)&&(u=r)}catch{}return{get state(){return u},set:r=>{u=Mn(r,u)||u},persist:()=>{try{l.setItem(Yg,JSON.stringify(u))}catch{}}}}var Fm=Gg(),Vg=l=>l.state.__TSR_key||l.href;function Qg(l){const u=[];let i;for(;i=l.parentNode;)u.push(`${l.tagName}:nth-child(${Array.prototype.indexOf.call(i.children,l)+1})`),l=i;return`${u.reverse().join(" > ")}`.toLowerCase()}var Cu=!1,Ps="window",Im="data-scroll-restoration-id";function Xg(l,u){if(!Fm)return;const i=Fm;if((l.options.scrollRestoration??!1)&&(l.isScrollRestoring=!0),l.isScrollRestorationSetup||!i)return;l.isScrollRestorationSetup=!0,Cu=!1;const r=l.options.getScrollRestorationKey||Vg,f=new Map;window.history.scrollRestoration="manual";const h=v=>{if(!(Cu||!l.isScrollRestoring))if(v.target===document||v.target===window)f.set(Ps,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=v.target;f.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},g=v=>{if(!l.isScrollRestoring||!v||f.size===0||!i)return;const p=i.state[v]||={};for(const[m,S]of f){let y;if(m===Ps)y=Ps;else if(m.isConnected){const x=m.getAttribute(Im);y=x?`[${Im}="${x}"]`:Qg(m)}y&&(p[y]=S)}};document.addEventListener("scroll",h,!0),l.subscribe("onBeforeLoad",v=>{g(v.fromLocation?r(v.fromLocation):void 0),f.clear()}),window.addEventListener("pagehide",()=>{g(r(l.stores.resolvedLocation.state??l.stores.location.state)),i.persist()}),l.subscribe("onRendered",v=>{const p=r(v.toLocation),m=l.options.scrollRestorationBehavior,S=l.options.scrollToTopSelectors;if(f.clear(),!l.resetNextScroll){l.resetNextScroll=!0;return}if(!(typeof l.options.scrollRestoration=="function"&&!l.options.scrollRestoration({location:l.latestLocation}))){Cu=!0;try{const y=l.isScrollRestoring?i.state[p]:void 0;let x=!1;if(y)for(const j in y){const _=y[j];if(!Wl(_))continue;const{scrollX:E,scrollY:A}=_;if(!(!Number.isFinite(E)||!Number.isFinite(A))){if(j===Ps)window.scrollTo({top:A,left:E,behavior:m}),x=!0;else if(j){let C;try{C=document.querySelector(j)}catch{continue}C&&(C.scrollLeft=E,C.scrollTop=A,x=!0)}}}if(!x){const j=l.history.location.hash.slice(1);if(j){const _=window.history.state?.__hashScrollIntoViewOptions??!0;if(_){const E=document.getElementById(j);E&&E.scrollIntoView(_)}}else{const _={top:0,left:0,behavior:m};if(window.scrollTo(_),S)for(const E of S){if(E===Ps)continue;const A=typeof E=="function"?E():document.querySelector(E);A&&A.scrollTo(_)}}}}finally{Cu=!1}l.isScrollRestoring&&i.set(y=>(y[p]||={},y))}})}function Zg(l,u=String){const i=new URLSearchParams;for(const r in l){const f=l[r];f!==void 0&&i.set(r,u(f))}return i.toString()}function Sr(l){return l?l==="false"?!1:l==="true"?!0:+l*0===0&&+l+""===l?+l:l:""}function Kg(l){const u=new URLSearchParams(l),i=Object.create(null);for(const[r,f]of u.entries()){const h=i[r];h==null?i[r]=Sr(f):Array.isArray(h)?h.push(Sr(f)):i[r]=[h,Sr(f)]}return i}var Jg=Fg(JSON.parse),$g=Ig(JSON.stringify,JSON.parse);function Fg(l){return u=>{u[0]==="?"&&(u=u.substring(1));const i=Kg(u);for(const r in i){const f=i[r];if(typeof f=="string")try{i[r]=l(f)}catch{}}return i}}function Ig(l,u){const i=typeof u=="function";function r(f){if(typeof f=="object"&&f!==null)try{return l(f)}catch{}else if(i&&typeof f=="string")try{return u(f),l(f)}catch{}return f}return f=>{const h=Zg(f,r);return h?`?${h}`:""}}var ul="__root__";function ui(l){if(l.statusCode=l.statusCode||l.code||307,!l._builtLocation&&!l.reloadDocument&&typeof l.href=="string")try{new URL(l.href),l.reloadDocument=!0}catch{}const u=new Headers(l.headers);l.href&&u.get("Location")===null&&u.set("Location",l.href);const i=new Response(null,{status:l.statusCode,headers:u});if(i.options=l,l.throw)throw i;return i}function Ct(l){return l instanceof Response&&!!l.options}function Pg(l){return{input:({url:u})=>{for(const i of l)u=wr(i,u);return u},output:({url:u})=>{for(let i=l.length-1;i>=0;i--)u=Cp(l[i],u);return u}}}function Wg(l){const u=Ep(l.basepath),i=`/${u}`,r=`${i}/`,f=l.caseSensitive?i:i.toLowerCase(),h=l.caseSensitive?r:r.toLowerCase();return{input:({url:g})=>{const v=l.caseSensitive?g.pathname:g.pathname.toLowerCase();return v===f?g.pathname="/":v.startsWith(h)&&(g.pathname=g.pathname.slice(i.length)),g},output:({url:g})=>(g.pathname=Du(["/",u,g.pathname]),g)}}function wr(l,u){const i=l?.input?.({url:u});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return u}function Cp(l,u){const i=l?.output?.({url:u});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return u}function ev(l,u){const{createMutableStore:i,createReadonlyStore:r,batch:f,init:h}=u,g=new Map,v=new Map,p=new Map,m=i(l.status),S=i(l.loadedAt),y=i(l.isLoading),x=i(l.isTransitioning),j=i(l.location),_=i(l.resolvedLocation),E=i(l.statusCode),A=i(l.redirect),C=i([]),X=i([]),Z=i([]),J=r(()=>jr(g,C.state)),I=r(()=>jr(v,X.state)),P=r(()=>jr(p,Z.state)),Q=r(()=>C.state[0]),q=r(()=>C.state.some($=>g.get($)?.state.status==="pending")),B=r(()=>({locationHref:j.state.href,resolvedLocationHref:_.state?.href,status:m.state})),se=r(()=>({status:m.state,loadedAt:S.state,isLoading:y.state,isTransitioning:x.state,matches:J.state,location:j.state,resolvedLocation:_.state,statusCode:E.state,redirect:A.state})),ee=ii(64);function ce($){let le=ee.get($);return le||(le=r(()=>{const Te=C.state;for(const ye of Te){const R=g.get(ye);if(R&&R.routeId===$)return R.state}}),ee.set($,le)),le}const be={status:m,loadedAt:S,isLoading:y,isTransitioning:x,location:j,resolvedLocation:_,statusCode:E,redirect:A,matchesId:C,pendingMatchesId:X,cachedMatchesId:Z,activeMatchesSnapshot:J,pendingMatchesSnapshot:I,cachedMatchesSnapshot:P,firstMatchId:Q,hasPendingMatches:q,matchRouteReactivity:B,activeMatchStoresById:g,pendingMatchStoresById:v,cachedMatchStoresById:p,__store:se,getMatchStoreByRouteId:ce,setActiveMatches:Ye,setPendingMatches:Ee,setCachedMatches:H};Ye(l.matches),h?.(be);function Ye($){Nr($,g,C,i,f)}function Ee($){Nr($,v,X,i,f)}function H($){Nr($,p,Z,i,f)}return be}function jr(l,u){const i=[];for(const r of u){const f=l.get(r);f&&i.push(f.state)}return i}function Nr(l,u,i,r,f){const h=l.map(v=>v.id),g=new Set(h);f(()=>{for(const v of u.keys())g.has(v)||u.delete(v);for(const v of l){const p=u.get(v.id);if(!p){const m=r(v);m.routeId=v.routeId,u.set(v.id,m);continue}p.routeId=v.routeId,p.state!==v&&p.setState(()=>v)}_g(i.state,h)||i.setState(()=>h)})}var Or=l=>{if(!l.rendered)return l.rendered=!0,l.onReady?.()},tv=l=>l.stores.matchesId.state.some(u=>l.stores.activeMatchStoresById.get(u)?.state._forcePending),Zu=(l,u)=>!!(l.preload&&!l.router.stores.activeMatchStoresById.has(u)),cl=(l,u,i=!0)=>{const r={...l.router.options.context??{}},f=i?u:u-1;for(let h=0;h<=f;h++){const g=l.matches[h];if(!g)continue;const v=l.router.getMatch(g.id);v&&Object.assign(r,v.__routeContext,v.__beforeLoadContext)}return r},Pm=(l,u)=>{if(!l.matches.length)return;const i=u.routeId,r=l.matches.findIndex(g=>g.routeId===l.router.routeTree.id),f=r>=0?r:0;let h=i?l.matches.findIndex(g=>g.routeId===i):l.firstBadMatchIndex??l.matches.length-1;h<0&&(h=f);for(let g=h;g>=0;g--){const v=l.matches[g];if(l.router.looseRoutesById[v.routeId].options.notFoundComponent)return g}return i?h:f},En=(l,u,i)=>{if(!(!Ct(i)&&!xt(i)))throw Ct(i)&&i.redirectHandled&&!i.options.reloadDocument||(u&&(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.loaderPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loaderPromise=void 0,u._nonReactive.error=i,l.updateMatch(u.id,r=>({...r,status:Ct(i)?"redirected":r.status==="pending"?"success":r.status,context:cl(l,u.index),isFetching:!1,error:i})),xt(i)&&!i.routeId&&(i.routeId=u.routeId),u._nonReactive.loadPromise?.resolve()),Ct(i)&&(l.rendered=!0,i.options._fromLocation=l.location,i.redirectHandled=!0,i=l.router.resolveRedirect(i))),i},Ap=(l,u)=>{const i=l.router.getMatch(u);return!!(!i||i._nonReactive.dehydrated)},Wm=(l,u,i)=>{const r=cl(l,i);l.updateMatch(u,f=>({...f,context:r}))},Ws=(l,u,i,r)=>{const{id:f,routeId:h}=l.matches[u],g=l.router.looseRoutesById[h];if(i instanceof Promise)throw i;i.routerCode=r,l.firstBadMatchIndex??=u,En(l,l.router.getMatch(f),i);try{g.options.onError?.(i)}catch(v){i=v,En(l,l.router.getMatch(f),i)}l.updateMatch(f,v=>(v._nonReactive.beforeLoadPromise?.resolve(),v._nonReactive.beforeLoadPromise=void 0,v._nonReactive.loadPromise?.resolve(),{...v,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!l.preload&&!Ct(i)&&!xt(i)&&(l.serialError??=i)},wp=(l,u,i,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const f=i.options.pendingMs??l.router.options.defaultPendingMs;if(l.onReady&&!Zu(l,u)&&(i.options.loader||i.options.beforeLoad||zp(i))&&typeof f=="number"&&f!==1/0&&(i.options.pendingComponent??l.router.options?.defaultPendingComponent)){const h=setTimeout(()=>{Or(l)},f);r._nonReactive.pendingTimeout=h}},av=(l,u,i)=>{const r=l.router.getMatch(u);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;wp(l,u,i,r);const f=()=>{const h=l.router.getMatch(u);h.preload&&(h.status==="redirected"||h.status==="notFound")&&En(l,h,h.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(f):f()},nv=(l,u,i,r)=>{const f=l.router.getMatch(u);let h=f._nonReactive.loadPromise;f._nonReactive.loadPromise=es(()=>{h?.resolve(),h=void 0});const{paramsError:g,searchError:v}=f;g&&Ws(l,i,g,"PARSE_PARAMS"),v&&Ws(l,i,v,"VALIDATE_SEARCH"),wp(l,u,r,f);const p=new AbortController;let m=!1;const S=()=>{m||(m=!0,l.updateMatch(u,J=>({...J,isFetching:"beforeLoad",fetchCount:J.fetchCount+1,abortController:p})))},y=()=>{f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,l.updateMatch(u,J=>({...J,isFetching:!1}))};if(!r.options.beforeLoad){l.router.batch(()=>{S(),y()});return}f._nonReactive.beforeLoadPromise=es();const x={...cl(l,i,!1),...f.__routeContext},{search:j,params:_,cause:E}=f,A=Zu(l,u),C={search:j,abortController:p,params:_,preload:A,context:x,location:l.location,navigate:J=>l.router.navigate({...J,_fromLocation:l.location}),buildLocation:l.router.buildLocation,cause:A?"preload":E,matches:l.matches,routeId:r.id,...l.router.options.additionalContext},X=J=>{if(J===void 0){l.router.batch(()=>{S(),y()});return}(Ct(J)||xt(J))&&(S(),Ws(l,i,J,"BEFORE_LOAD")),l.router.batch(()=>{S(),l.updateMatch(u,I=>({...I,__beforeLoadContext:J})),y()})};let Z;try{if(Z=r.options.beforeLoad(C),si(Z))return S(),Z.catch(J=>{Ws(l,i,J,"BEFORE_LOAD")}).then(X)}catch(J){S(),Ws(l,i,J,"BEFORE_LOAD")}X(Z)},lv=(l,u)=>{const{id:i,routeId:r}=l.matches[u],f=l.router.looseRoutesById[r],h=()=>v(),g=()=>nv(l,i,u,f),v=()=>{if(Ap(l,i))return;const p=av(l,i,f);return si(p)?p.then(g):g()};return h()},sv=(l,u,i)=>{const r=l.router.getMatch(u);if(!r||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const f={ssr:l.router.options.ssr,matches:l.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([i.options.head?.(f),i.options.scripts?.(f),i.options.headers?.(f)]).then(([h,g,v])=>({meta:h?.meta,links:h?.links,headScripts:h?.scripts,headers:v,scripts:g,styles:h?.styles}))},Op=(l,u,i,r,f)=>{const h=u[r-1],{params:g,loaderDeps:v,abortController:p,cause:m}=l.router.getMatch(i),S=cl(l,r),y=Zu(l,i);return{params:g,deps:v,preload:!!y,parentMatchPromise:h,abortController:p,context:S,location:l.location,navigate:x=>l.router.navigate({...x,_fromLocation:l.location}),cause:y?"preload":m,route:f,...l.router.options.additionalContext}},ep=async(l,u,i,r,f)=>{try{const h=l.router.getMatch(i);try{(!(Rp??l.router.isServer)||h.ssr===!0)&&ci(f);const g=f.options.loader,v=typeof g=="function"?g:g?.handler,p=v?.(Op(l,u,i,r,f)),m=!!v&&si(p);if((m||f._lazyPromise||f._componentsPromise||f.options.head||f.options.scripts||f.options.headers||h._nonReactive.minPendingPromise)&&l.updateMatch(i,y=>({...y,isFetching:"loader"})),v){const y=m?await p:p;En(l,l.router.getMatch(i),y),y!==void 0&&l.updateMatch(i,x=>({...x,loaderData:y}))}f._lazyPromise&&await f._lazyPromise;const S=h._nonReactive.minPendingPromise;S&&await S,f._componentsPromise&&await f._componentsPromise,l.updateMatch(i,y=>({...y,error:void 0,context:cl(l,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(g){let v=g;if(v?.name==="AbortError"){if(h.abortController.signal.aborted){h._nonReactive.loaderPromise?.resolve(),h._nonReactive.loaderPromise=void 0;return}l.updateMatch(i,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:cl(l,r)}));return}const p=h._nonReactive.minPendingPromise;p&&await p,xt(g)&&await f.options.notFoundComponent?.preload?.(),En(l,l.router.getMatch(i),g);try{f.options.onError?.(g)}catch(m){v=m,En(l,l.router.getMatch(i),m)}!Ct(v)&&!xt(v)&&await ci(f,["errorComponent"]),l.updateMatch(i,m=>({...m,error:v,context:cl(l,r),status:"error",isFetching:!1}))}}catch(h){const g=l.router.getMatch(i);g&&(g._nonReactive.loaderPromise=void 0),En(l,g,h)}},iv=async(l,u,i)=>{async function r(j,_,E,A,C){const X=Date.now()-_.updatedAt,Z=j?C.options.preloadStaleTime??l.router.options.defaultPreloadStaleTime??3e4:C.options.staleTime??l.router.options.defaultStaleTime??0,J=C.options.shouldReload,I=typeof J=="function"?J(Op(l,u,f,i,C)):J,{status:P,invalid:Q}=A,q=X>=Z&&(!!l.forceStaleReload||A.cause==="enter"||E!==void 0&&E!==A.id);g=P==="success"&&(Q||(I??q)),j&&C.options.preload===!1||(g&&!l.sync&&S?(v=!0,(async()=>{try{await ep(l,u,f,i,C);const B=l.router.getMatch(f);B._nonReactive.loaderPromise?.resolve(),B._nonReactive.loadPromise?.resolve(),B._nonReactive.loaderPromise=void 0,B._nonReactive.loadPromise=void 0}catch(B){Ct(B)&&await l.router.navigate(B.options)}})()):P!=="success"||g?await ep(l,u,f,i,C):Wm(l,f,i))}const{id:f,routeId:h}=l.matches[i];let g=!1,v=!1;const p=l.router.looseRoutesById[h],m=p.options.loader,S=((typeof m=="function"?void 0:m?.staleReloadMode)??l.router.options.defaultStaleReloadMode)!=="blocking";if(Ap(l,f)){if(!l.router.getMatch(f))return l.matches[i];Wm(l,f,i)}else{const j=l.router.getMatch(f),_=l.router.stores.matchesId.state[i],E=(_&&l.router.stores.activeMatchStoresById.get(_)||null)?.routeId===h?_:l.router.stores.activeMatchesSnapshot.state.find(C=>C.routeId===h)?.id,A=Zu(l,f);if(j._nonReactive.loaderPromise){if(j.status==="success"&&!l.sync&&!j.preload&&S)return j;await j._nonReactive.loaderPromise;const C=l.router.getMatch(f),X=C._nonReactive.error||C.error;X&&En(l,C,X),C.status==="pending"&&await r(A,j,E,C,p)}else{const C=A&&!l.router.stores.activeMatchStoresById.has(f),X=l.router.getMatch(f);X._nonReactive.loaderPromise=es(),C!==X.preload&&l.updateMatch(f,Z=>({...Z,preload:C})),await r(A,j,E,X,p)}}const y=l.router.getMatch(f);v||(y._nonReactive.loaderPromise?.resolve(),y._nonReactive.loadPromise?.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,v||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const x=v?y.isFetching:!1;return x!==y.isFetching||y.invalid!==!1?(l.updateMatch(f,j=>({...j,isFetching:x,invalid:!1})),l.router.getMatch(f)):y};async function tp(l){const u=l,i=[];tv(u.router)&&Or(u);let r;for(let x=0;x<u.matches.length;x++){try{const j=lv(u,x);si(j)&&await j}catch(j){if(Ct(j))throw j;if(xt(j))r=j;else if(!u.preload)throw j;break}if(u.serialError||u.firstBadMatchIndex!=null)break}const f=u.firstBadMatchIndex??u.matches.length,h=r&&!u.preload?Pm(u,r):void 0,g=r&&u.preload?0:h!==void 0?Math.min(h+1,f):f;let v,p;for(let x=0;x<g;x++)i.push(iv(u,i,x));try{await Promise.all(i)}catch{const x=await Promise.allSettled(i);for(const j of x){if(j.status!=="rejected")continue;const _=j.reason;if(Ct(_))throw _;xt(_)?v??=_:p??=_}if(p!==void 0)throw p}const m=v??(r&&!u.preload?r:void 0);let S=u.firstBadMatchIndex!==void 0?u.firstBadMatchIndex:u.matches.length-1;if(!m&&r&&u.preload)return u.matches;if(m){const x=Pm(u,m);x===void 0&&Qa();const j=u.matches[x],_=u.router.looseRoutesById[j.routeId],E=u.router.options?.defaultNotFoundComponent;!_.options.notFoundComponent&&E&&(_.options.notFoundComponent=E),m.routeId=j.routeId;const A=j.routeId===u.router.routeTree.id;u.updateMatch(j.id,C=>({...C,...A?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),S=x,await ci(_,["notFoundComponent"])}else if(!u.preload){const x=u.matches[0];x.globalNotFound||u.router.getMatch(x.id)?.globalNotFound&&u.updateMatch(x.id,j=>({...j,globalNotFound:!1,error:void 0}))}if(u.serialError&&u.firstBadMatchIndex!==void 0){const x=u.router.looseRoutesById[u.matches[u.firstBadMatchIndex].routeId];await ci(x,["errorComponent"])}for(let x=0;x<=S;x++){const{id:j,routeId:_}=u.matches[x],E=u.router.looseRoutesById[_];try{const A=sv(u,j,E);if(A){const C=await A;u.updateMatch(j,X=>({...X,...C}))}}catch(A){console.error(`Error executing head for route ${_}:`,A)}}const y=Or(u);if(si(y)&&await y,m)throw m;if(u.serialError&&!u.preload&&!u.onReady)throw u.serialError;return u.matches}function ap(l,u){const i=u.map(r=>l.options[r]?.preload?.()).filter(Boolean);if(i.length!==0)return Promise.all(i)}function ci(l,u=Lu){!l._lazyLoaded&&l._lazyPromise===void 0&&(l.lazyFn?l._lazyPromise=l.lazyFn().then(r=>{const{id:f,...h}=r.options;Object.assign(l.options,h),l._lazyLoaded=!0,l._lazyPromise=void 0}):l._lazyLoaded=!0);const i=()=>l._componentsLoaded?void 0:u===Lu?(()=>{if(l._componentsPromise===void 0){const r=ap(l,Lu);r?l._componentsPromise=r.then(()=>{l._componentsLoaded=!0,l._componentsPromise=void 0}):l._componentsLoaded=!0}return l._componentsPromise})():ap(l,u);return l._lazyPromise?l._lazyPromise.then(i):i()}function zp(l){for(const u of Lu)if(l.options[u]?.preload)return!0;return!1}var Lu=["component","errorComponent","pendingComponent","notFoundComponent"],wn="__TSR_index",np="popstate",lp="beforeunload";function Dp(l){let u=l.getLocation();const i=new Set,r=g=>{u=l.getLocation(),i.forEach(v=>v({location:u,action:g}))},f=g=>{l.notifyOnIndexChange??!0?r(g):u=l.getLocation()},h=async({task:g,navigateOpts:v,...p})=>{if(v?.ignoreBlocker??!1){g();return}const m=l.getBlockers?.()??[],S=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&S)for(const y of m){const x=oi(p.path,p.state);if(await y.blockerFn({currentLocation:u,nextLocation:x,action:p.type})){l.onBlocked?.();return}}g()};return{get location(){return u},get length(){return l.getLength()},subscribers:i,subscribe:g=>(i.add(g),()=>{i.delete(g)}),push:(g,v,p)=>{const m=u.state[wn];v=zr(m+1,v),h({task:()=>{l.pushState(g,v),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:g,state:v})},replace:(g,v,p)=>{const m=u.state[wn];v=zr(m,v),h({task:()=>{l.replaceState(g,v),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:g,state:v})},go:(g,v)=>{h({task:()=>{l.go(g),f({type:"GO",index:g})},navigateOpts:v,type:"GO"})},back:g=>{h({task:()=>{l.back(g?.ignoreBlocker??!1),f({type:"BACK"})},navigateOpts:g,type:"BACK"})},forward:g=>{h({task:()=>{l.forward(g?.ignoreBlocker??!1),f({type:"FORWARD"})},navigateOpts:g,type:"FORWARD"})},canGoBack:()=>u.state[wn]!==0,createHref:g=>l.createHref(g),block:g=>{if(!l.setBlockers)return()=>{};const v=l.getBlockers?.()??[];return l.setBlockers([...v,g]),()=>{const p=l.getBlockers?.()??[];l.setBlockers?.(p.filter(m=>m!==g))}},flush:()=>l.flush?.(),destroy:()=>l.destroy?.(),notify:r}}function zr(l,u){u||(u={});const i=Gr();return{...u,key:i,__TSR_key:i,[wn]:l}}function Lp(l){const u=typeof document<"u"?window:void 0,i=u.history.pushState,r=u.history.replaceState;let f=[];const h=()=>f,g=q=>f=q,v=(q=>q),p=(()=>oi(`${u.location.pathname}${u.location.search}${u.location.hash}`,u.history.state));if(!u.history.state?.__TSR_key&&!u.history.state?.key){const q=Gr();u.history.replaceState({[wn]:0,key:q,__TSR_key:q},"")}let m=p(),S,y=!1,x=!1,j=!1,_=!1;const E=()=>m;let A,C;const X=()=>{A&&(Q._ignoreSubscribers=!0,(A.isPush?u.history.pushState:u.history.replaceState)(A.state,"",A.href),Q._ignoreSubscribers=!1,A=void 0,C=void 0,S=void 0)},Z=(q,B,se)=>{const ee=v(B);C||(S=m),m=oi(B,se),A={href:ee,state:se,isPush:A?.isPush||q==="push"},C||(C=Promise.resolve().then(()=>X()))},J=q=>{m=p(),Q.notify({type:q})},I=async()=>{if(x){x=!1;return}const q=p(),B=q.state[wn]-m.state[wn],se=B===1,ee=B===-1,ce=!se&&!ee||y;y=!1;const be=ce?"GO":ee?"BACK":"FORWARD",Ye=ce?{type:"GO",index:B}:{type:ee?"BACK":"FORWARD"};if(j)j=!1;else{const Ee=h();if(typeof document<"u"&&Ee.length){for(const H of Ee)if(await H.blockerFn({currentLocation:m,nextLocation:q,action:be})){x=!0,u.history.go(1),Q.notify(Ye);return}}}m=p(),Q.notify(Ye)},P=q=>{if(_){_=!1;return}let B=!1;const se=h();if(typeof document<"u"&&se.length)for(const ee of se){const ce=ee.enableBeforeUnload??!0;if(ce===!0){B=!0;break}if(typeof ce=="function"&&ce()===!0){B=!0;break}}if(B)return q.preventDefault(),q.returnValue=""},Q=Dp({getLocation:E,getLength:()=>u.history.length,pushState:(q,B)=>Z("push",q,B),replaceState:(q,B)=>Z("replace",q,B),back:q=>(q&&(j=!0),_=!0,u.history.back()),forward:q=>{q&&(j=!0),_=!0,u.history.forward()},go:q=>{y=!0,u.history.go(q)},createHref:q=>v(q),flush:X,destroy:()=>{u.history.pushState=i,u.history.replaceState=r,u.removeEventListener(lp,P,{capture:!0}),u.removeEventListener(np,I)},onBlocked:()=>{S&&m!==S&&(m=S)},getBlockers:h,setBlockers:g,notifyOnIndexChange:!1});return u.addEventListener(lp,P,{capture:!0}),u.addEventListener(np,I),u.history.pushState=function(...q){const B=i.apply(u.history,q);return Q._ignoreSubscribers||J("PUSH"),B},u.history.replaceState=function(...q){const B=r.apply(u.history,q);return Q._ignoreSubscribers||J("REPLACE"),B},Q}function uv(l={initialEntries:["/"]}){const u=l.initialEntries;let i=l.initialIndex?Math.min(Math.max(l.initialIndex,0),u.length-1):u.length-1;const r=u.map((p,m)=>zr(m,void 0)),f=()=>oi(u[i],r[i]);let h=[];return Dp({getLocation:f,getLength:()=>u.length,pushState:(p,m)=>{i<u.length-1&&(u.splice(i+1),r.splice(i+1)),r.push(m),u.push(p),i=Math.max(u.length-1,0)},replaceState:(p,m)=>{r[i]=m,u[i]=p},back:()=>{i=Math.max(i-1,0)},forward:()=>{i=Math.min(i+1,u.length-1)},go:p=>{i=Math.min(Math.max(i+p,0),u.length-1)},createHref:p=>p,getBlockers:()=>h,setBlockers:p=>h=p})}function cv(l){let u=l.replace(/[\x00-\x1f\x7f]/g,"");return u.startsWith("//")&&(u="/"+u.replace(/^\/+/,"")),u}function oi(l,u){const i=cv(l),r=i.indexOf("#"),f=i.indexOf("?"),h=Gr();return{href:i,pathname:i.substring(0,r>0?f>0?Math.min(r,f):r:f>0?f:i.length),hash:r>-1?i.substring(r):"",search:f>-1?i.slice(f,r===-1?void 0:r):"",state:u||{[wn]:0,key:h,__TSR_key:h}}}function Gr(){return(Math.random()+1).toString(36).substring(7)}function Il(l,u){const i=u,r=l;return{fromLocation:i,toLocation:r,pathChanged:i?.pathname!==r.pathname,hrefChanged:i?.href!==r.href,hashChanged:i?.hash!==r.hash}}var ov=class{constructor(l,u){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=i=>i(),this.update=i=>{const r=this.options,f=this.basepath??r?.basepath??"/",h=this.basepath===void 0,g=r?.rewrite;if(this.options={...r,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=kg(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Lp()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let S;this.resolvePathCache=ii(1e3),S=this.buildRouteTree(),this.setRoutes(S)}if(!this.stores&&this.latestLocation){const S=this.getStoreConfig(this);this.batch=S.batch,this.stores=ev(fv(this.latestLocation),S),Xg(this)}let v=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(h||f!==p||g!==m){this.basepath=p;const S=[],y=Ep(p);y&&y!=="/"&&S.push(Wg({basepath:p})),m&&S.push(m),this.rewrite=S.length===0?void 0:S.length===1?S[0]:Pg(S),this.history&&this.updateLatestLocation(),v=!0}v&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=zg(this.routeTree,this.options.caseSensitive,(r,f)=>{r.init({originalIndex:f})});return this.options.routeMasks&&Eg(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const f={eventType:i,fn:r};return this.subscribers.add(f),()=>{this.subscribers.delete(f)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const f=({pathname:p,search:m,hash:S,href:y,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const C=this.options.parseSearch(m),X=this.options.stringifySearch(C);return{href:p+X+S,publicHref:p+X+S,pathname:Fs(p).path,external:!1,searchStr:X,search:al(r?.search,C),hash:Fs(S.slice(1)).path,state:nl(r?.state,x)}}const j=new URL(y,this.origin),_=wr(this.rewrite,j),E=this.options.parseSearch(_.search),A=this.options.stringifySearch(E);return _.search=A,{href:_.href.replace(_.origin,""),publicHref:y,pathname:Fs(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:A,search:al(r?.search,E),hash:Fs(_.hash.slice(1)).path,state:nl(r?.state,x)}},h=f(i),{__tempLocation:g,__tempKey:v}=h.state;if(g&&(!v||v===this.tempLocationKey)){const p=f(g);return p.state.key=h.state.key,p.state.__TSR_key=h.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:h}}return h},this.resolvePathWithBase=(i,r)=>Hg({base:i,to:Yr(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,f)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},f):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>dv({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.state.forEach(i=>{if(this.stores.pendingMatchStoresById.has(i))return;const r=this.stores.activeMatchStoresById.get(i)?.state;r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const r=(h={})=>{const g=h._fromLocation||this.pendingBuiltLocation||this.latestLocation,v=this.matchRoutesLightweight(g);h.from;const p=h.unsafeRelative==="path"?g.pathname:h.from??v.fullPath,m=this.resolvePathWithBase(p,"."),S=v.search,y=Object.assign(Object.create(null),v.params),x=h.to?this.resolvePathWithBase(m,`${h.to}`):this.resolvePathWithBase(m,"."),j=h.params===!1||h.params===null?Object.create(null):(h.params??!0)===!0?y:Object.assign(y,Mn(h.params,y)),_=this.getMatchedRoutes(x);let E=_.matchedRoutes;if((!_.foundRoute||_.foundRoute.path!=="/"&&_.routeParams["**"])&&this.options.notFoundRoute&&(E=[...E,this.options.notFoundRoute]),Object.keys(j).length>0)for(const se of E){const ee=se.options.params?.stringify??se.options.stringifyParams;if(ee)try{Object.assign(j,ee(j))}catch{}}const A=i.leaveParams?x:Fs(Jm({path:x,params:j,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let C=S;if(i._includeValidateSearch&&this.options.search?.strict){const se={};E.forEach(ee=>{if(ee.options.validateSearch)try{Object.assign(se,Uu(ee.options.validateSearch,{...se,...C}))}catch{}}),C=se}C=hv({search:C,dest:h,destRoutes:E,_includeValidateSearch:i._includeValidateSearch}),C=al(S,C);const X=this.options.stringifySearch(C),Z=h.hash===!0?g.hash:h.hash?Mn(h.hash,g.hash):void 0,J=Z?`#${Z}`:"";let I=h.state===!0?g.state:h.state?Mn(h.state,g.state):{};I=nl(g.state,I);const P=`${A}${X}${J}`;let Q,q,B=!1;if(this.rewrite){const se=new URL(P,this.origin),ee=Cp(this.rewrite,se);Q=se.href.replace(se.origin,""),ee.origin!==this.origin?(q=ee.href,B=!0):q=ee.pathname+ee.search+ee.hash}else Q=Tg(P),q=Q;return{publicHref:q,href:Q,pathname:A,search:C,searchStr:X,state:I,hash:Z??"",external:B,unmaskOnReload:h.unmaskOnReload}},f=(h={},g)=>{const v=r(h);let p=g?r(g):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const S=Cg(v.pathname,this.processedTree);if(S){Object.assign(m,S.rawParams);const{from:y,params:x,...j}=S.route,_=x===!1||x===null?Object.create(null):(x??!0)===!0?m:Object.assign(m,Mn(x,m));g={from:i.from,...j,params:_},p=r(g)}}}return p&&(v.maskedLocation=p),v};return i.mask?f(i,{from:i.from,...i.mask}):f(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...f})=>{const h=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(S=>{f.state[S]=this.latestLocation.state[S]});const m=il(f.state,this.latestLocation.state);return p.forEach(S=>{delete f.state[S]}),m},g=An(this.latestLocation.href)===An(f.href);let v=this.commitLocationPromise;if(this.commitLocationPromise=es(()=>{v?.resolve(),v=void 0}),g&&h())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...S}=f;p&&(S={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...S,search:S.searchStr,state:{...S.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(S.unmaskOnReload??this.options.unmaskOnReload??!1)&&(S.state.__tempKey=this.tempLocationKey)),S.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,this.history[f.replace?"replace":"push"](S.publicHref,S.state,{ignoreBlocker:r})}return this.resetNextScroll=f.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:f,viewTransition:h,ignoreBlocker:g,href:v,...p}={})=>{if(v){const y=this.history.location.state.__TSR_index,x=oi(v,{__TSR_index:i?y:y+1}),j=new URL(x.pathname,this.origin);p.to=wr(this.rewrite,j).pathname,p.search=this.options.parseSearch(x.search),p.hash=x.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const S=this.commitLocation({...m,viewTransition:h,replace:i,resetScroll:r,hashScrollIntoView:f,ignoreBlocker:g});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),S},this.navigate=async({to:i,reloadDocument:r,href:f,publicHref:h,...g})=>{let v=!1;if(f)try{new URL(`${f}`),v=!0}catch{}if(v&&!r&&(r=!0),r){if(i!==void 0||!f){const m=this.buildLocation({to:i,...g});f=f??m.publicHref,h=h??m.publicHref}const p=!v&&h?h:f;if(ku(p,this.protocolAllowlist))return Promise.resolve();if(!g.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const S of m)if(S?.blockerFn&&await S.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return g.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...g,href:f,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatchesSnapshot.state.filter(f=>!i.some(h=>h.id===f.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(i),this.stores.setCachedMatches(r)})},this.load=async i=>{let r,f,h;const g=this.stores.resolvedLocation.state??this.stores.location.state;for(h=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,S=this.stores.resolvedLocation.state,y=Il(m,S);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await tp({router:this,sync:i?.sync,forceStaleReload:g.href===m.href,matches:this.stores.pendingMatchesSnapshot.state,location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let x=null,j=null,_=null,E=null;this.batch(()=>{const A=this.stores.pendingMatchesSnapshot.state,C=A.length,X=this.stores.activeMatchesSnapshot.state;x=C?X.filter(I=>!this.stores.pendingMatchStoresById.has(I.id)):null;const Z=new Set;for(const I of this.stores.pendingMatchStoresById.values())I.routeId&&Z.add(I.routeId);const J=new Set;for(const I of this.stores.activeMatchStoresById.values())I.routeId&&J.add(I.routeId);j=C?X.filter(I=>!Z.has(I.routeId)):null,_=C?A.filter(I=>!J.has(I.routeId)):null,E=C?A.filter(I=>J.has(I.routeId)):X,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),C&&(this.stores.setActiveMatches(A),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...x.filter(I=>I.status!=="error"&&I.status!=="notFound"&&I.status!=="redirected")]),this.clearExpiredCache())});for(const[A,C]of[[j,"onLeave"],[_,"onEnter"],[E,"onStay"]])if(A)for(const X of A)this.looseRoutesById[X.routeId].options[C]?.(X)})})}})}catch(m){Ct(m)?(r=m,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):xt(m)&&(f=m);const S=r?r.status:f?404:this.stores.activeMatchesSnapshot.state.some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>S),this.stores.redirect.setState(()=>r)})}this.latestLoadPromise===h&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=h,await h;this.latestLoadPromise&&h!==this.latestLoadPromise;)await this.latestLoadPromise;let v;this.hasNotFoundMatch()?v=404:this.stores.activeMatchesSnapshot.state.some(p=>p.status==="error")&&(v=500),v!==void 0&&this.stores.statusCode.setState(()=>v)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let f;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const h=this.latestLocation,g=this.stores.resolvedLocation.state,v=typeof r.types=="function"?r.types(Il(h,g)):r.types;if(v===!1){i();return}f={update:i,types:v}}else f=i;document.startViewTransition(f)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const f=this.stores.pendingMatchStoresById.get(i);if(f){f.setState(r);return}const h=this.stores.activeMatchStoresById.get(i);if(h){h.setState(r);return}const g=this.stores.cachedMatchStoresById.get(i);if(g){const v=r(g.state);v.status==="redirected"?this.stores.cachedMatchStoresById.delete(i)&&this.stores.cachedMatchesId.setState(p=>p.filter(m=>m!==i)):g.setState(()=>v)}})},this.getMatch=i=>this.stores.cachedMatchStoresById.get(i)?.state??this.stores.pendingMatchStoresById.get(i)?.state??this.stores.activeMatchStoresById.get(i)?.state,this.invalidate=i=>{const r=f=>i?.filter?.(f)??!0?{...f,invalid:!0,...i?.forcePending||f.status==="error"||f.status==="notFound"?{status:"pending",error:void 0}:void 0}:f;return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(r)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(r)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(r))}),this.shouldViewTransition=!1,this.load({sync:i?.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const f=i.options._builtLocation??this.buildLocation(i.options),h=this.getParsedLocationHref(f);i.options.href=h,i.headers.set("Location",h)}else if(r)try{const f=new URL(r);if(this.origin&&f.origin===this.origin){const h=f.pathname+f.search+f.hash;i.options.href=h,i.headers.set("Location",h)}}catch{}if(i.options.href&&!i.options._builtLocation&&ku(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i?.filter;r!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(f=>!r(f))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const i=Date.now(),r=f=>{const h=this.looseRoutesById[f.routeId];if(!h.options.loader)return!0;const g=(f.preload?h.options.preloadGcTime??this.options.defaultPreloadGcTime:h.options.gcTime??this.options.defaultGcTime)??300*1e3;return f.status==="error"?!0:i-f.updatedAt>=g};this.clearCache({filter:r})},this.loadRouteChunk=ci,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let f=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});const h=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),g=new Set([...h,...this.stores.cachedMatchesId.state]),v=f.filter(p=>!g.has(p.id));if(v.length){const p=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...p,...v])}try{return f=await tp({router:this,matches:f,location:r,preload:!0,updateMatch:(p,m)=>{h.has(p)?f=f.map(S=>S.id===p?m(S):S):this.updateMatch(p,m)}}),f}catch(p){if(Ct(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});xt(p)||console.error(p);return}},this.matchRoute=(i,r)=>{const f={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},h=this.buildLocation(f);if(r?.pending&&this.stores.status.state!=="pending")return!1;const g=(r?.pending===void 0?!this.stores.isLoading.state:r.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,v=Ag(h.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,g.pathname,this.processedTree);return!v||i.params&&!il(v.rawParams,i.params,{partial:!0})?!1:r?.includeSearch??!0?il(g.search,h.search,{partial:!0})?v.rawParams:!1:v.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=u,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...l,caseSensitive:l.caseSensitive??!1,notFoundMode:l.notFoundMode??"fuzzy",stringifySearch:l.stringifySearch??$g,parseSearch:l.parseSearch??Jg,protocolAllowlist:l.protocolAllowlist??Rg}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:l,routesByPath:u,processedTree:i}){this.routesById=l,this.routesByPath=u,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(l){return l?.id?l.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(l,u){const i=this.getMatchedRoutes(l.pathname),{foundRoute:r,routeParams:f,parsedParams:h}=i;let{matchedRoutes:g}=i,v=!1;(r?r.path!=="/"&&f["**"]:An(l.pathname))&&(this.options.notFoundRoute?g=[...g,this.options.notFoundRoute]:v=!0);const p=v?pv(this.options.notFoundMode,g):void 0,m=new Array(g.length),S=new Map;for(const y of this.stores.activeMatchStoresById.values())y.routeId&&S.set(y.routeId,y.state);for(let y=0;y<g.length;y++){const x=g[y],j=m[y-1];let _,E,A;{const be=j?.search??l.search,Ye=j?._strictSearch??void 0;try{const Ee=Uu(x.options.validateSearch,{...be})??void 0;_={...be,...Ee},E={...Ye,...Ee},A=void 0}catch(Ee){let H=Ee;if(Ee instanceof Yu||(H=new Yu(Ee.message,{cause:Ee})),u?.throwOnError)throw H;_=be,E={},A=H}}const C=x.options.loaderDeps?.({search:_})??"",X=C?JSON.stringify(C):"",{interpolatedPath:Z,usedParams:J}=Jm({path:x.fullPath,params:f,decoder:this.pathParamsDecoder,server:this.isServer}),I=x.id+Z+X,P=this.getMatch(I),Q=S.get(x.id),q=P?._strictParams??J;let B;if(!P)try{sp(x,J,h,q)}catch(be){if(xt(be)||Ct(be)?B=be:B=new rv(be.message,{cause:be}),u?.throwOnError)throw B}Object.assign(f,q);const se=Q?"stay":"enter";let ee;if(P)ee={...P,cause:se,params:Q?.params??f,_strictParams:q,search:al(Q?Q.search:P.search,_),_strictSearch:E};else{const be=x.options.loader||x.options.beforeLoad||x.lazyFn||zp(x)?"pending":"success";ee={id:I,ssr:x.options.ssr,index:y,routeId:x.id,params:Q?.params??f,_strictParams:q,pathname:Z,updatedAt:Date.now(),search:Q?al(Q.search,_):_,_strictSearch:E,searchError:void 0,status:be,isFetching:!1,error:void 0,paramsError:B,__routeContext:void 0,_nonReactive:{loadPromise:es()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:se,loaderDeps:Q?nl(Q.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:x.options.staticData||{},fullPath:x.fullPath}}u?.preload||(ee.globalNotFound=p===x.id),ee.searchError=A;const ce=this.getParentContext(j);ee.context={...ce,...ee.__routeContext,...ee.__beforeLoadContext},m[y]=ee}for(let y=0;y<m.length;y++){const x=m[y],j=this.looseRoutesById[x.routeId],_=this.getMatch(x.id),E=S.get(x.routeId);if(x.params=E?al(E.params,f):f,!_){const A=m[y-1],C=this.getParentContext(A);if(j.options.context){const X={deps:x.loaderDeps,params:x.params,context:C??{},location:l,navigate:Z=>this.navigate({...Z,_fromLocation:l}),buildLocation:this.buildLocation,cause:x.cause,abortController:x.abortController,preload:!!x.preload,matches:m,routeId:j.id};x.__routeContext=j.options.context(X)??void 0}x.context={...C,...x.__routeContext,...x.__beforeLoadContext}}}return m}matchRoutesLightweight(l){const{matchedRoutes:u,routeParams:i,parsedParams:r}=this.getMatchedRoutes(l.pathname),f=li(u),h={...l.search};for(const S of u)try{Object.assign(h,Uu(S.options.validateSearch,h))}catch{}const g=li(this.stores.matchesId.state),v=g&&this.stores.activeMatchStoresById.get(g)?.state,p=v&&v.routeId===f.id&&v.pathname===l.pathname;let m;if(p)m=v.params;else{const S=Object.assign(Object.create(null),i);for(const y of u)try{sp(y,i,r??{},S)}catch{}m=S}return{matchedRoutes:u,fullPath:f.fullPath,search:h,params:m}}},Yu=class extends Error{},rv=class extends Error{};function fv(l){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:l,matches:[],statusCode:200}}function Uu(l,u){if(l==null)return{};if("~standard"in l){const i=l["~standard"].validate(u);if(i instanceof Promise)throw new Yu("Async validation not supported");if(i.issues)throw new Yu(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in l?l.parse(u):typeof l=="function"?l(u):{}}function dv({pathname:l,routesById:u,processedTree:i}){const r=Object.create(null),f=An(l);let h,g;const v=wg(f,i,!0);return v&&(h=v.route,Object.assign(r,v.rawParams),g=Object.assign(Object.create(null),v.parsedParams)),{matchedRoutes:v?.branch||[u.__root__],routeParams:r,foundRoute:h,parsedParams:g}}function hv({search:l,dest:u,destRoutes:i,_includeValidateSearch:r}){return mv(i)(l,u,r??!1)}function mv(l){const u={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const f of l){if("search"in f.options)f.options.search?.middlewares&&u.middlewares.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const h=({search:g,next:v})=>{let p=g;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(p=f.options.preSearchFilters.reduce((S,y)=>y(S),g));const m=v(p);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((S,y)=>y(S),m):m};u.middlewares.push(h)}if(f.options.validateSearch){const h=({search:g,next:v})=>{const p=v(g);if(!u._includeValidateSearch)return p;try{return{...p,...Uu(f.options.validateSearch,p)??void 0}}catch{return p}};u.middlewares.push(h)}}const i=({search:f})=>{const h=u.dest;return h.search?h.search===!0?f:Mn(h.search,f):{}};u.middlewares.push(i);const r=(f,h,g)=>{if(f>=g.length)return h;const v=g[f];return v({search:h,next:m=>r(f+1,m,g)})};return function(h,g,v){return u.dest=g,u._includeValidateSearch=v,r(0,h,u.middlewares)}}function pv(l,u){if(l!=="root")for(let i=u.length-1;i>=0;i--){const r=u[i];if(r.children)return r.id}return ul}function sp(l,u,i,r){const f=l.options.params?.parse??l.options.parseParams;if(f)if(l.options.skipRouteOnParseError)for(const h in u)h in i&&(r[h]=i[h]);else{const h=f(r);Object.assign(r,h)}}var bv="Error preloading route! ☝️",Up=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(l){if(this.init=u=>{this.originalIndex=u.originalIndex;const i=this.options,r=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=ul:this.parentRoute||Qa();let f=r?ul:i?.path;f&&f!=="/"&&(f=Mp(f));const h=i?.id||f;let g=r?ul:Du([this.parentRoute.id==="__root__"?"":this.parentRoute.id,h]);f==="__root__"&&(f="/"),g!=="__root__"&&(g=Du(["/",g]));const v=g==="__root__"?"/":Du([this.parentRoute.fullPath,f]);this._path=f,this._id=g,this._fullPath=v,this._to=An(v)},this.addChildren=u=>this._addFileChildren(u),this._addFileChildren=u=>(Array.isArray(u)&&(this.children=u),typeof u=="object"&&u!==null&&(this.children=Object.values(u)),this),this._addFileTypes=()=>this,this.updateLoader=u=>(Object.assign(this.options,u),this),this.update=u=>(Object.assign(this.options,u),this),this.lazy=u=>(this.lazyFn=u,this),this.redirect=u=>ui({from:this.fullPath,...u}),this.options=l||{},this.isRoot=!l?.getParentRoute,l?.id&&l?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},gv=class extends Up{constructor(l){super(l)}};function vv(l){if(typeof document<"u"&&document.querySelector){const u=l.stores.location.state,i=u.state.__hashScrollIntoViewOptions??!0;if(i&&u.hash!==""){const r=document.getElementById(u.hash);r&&r.scrollIntoView(i)}}}function Vr(l){const u=l.errorComponent??Qr;return o.jsx(yv,{getResetKey:l.getResetKey,onCatch:l.onCatch,children:({error:i,reset:r})=>i?U.createElement(u,{error:i,reset:r}):l.children})}var yv=class extends U.Component{constructor(...l){super(...l),this.state={error:null}}static getDerivedStateFromProps(l){return{resetKey:l.getResetKey()}}static getDerivedStateFromError(l){return{error:l}}reset(){this.setState({error:null})}componentDidUpdate(l,u){u.error&&u.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(l,u){this.props.onCatch&&this.props.onCatch(l,u)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function Qr({error:l}){const[u,i]=U.useState(!1);return o.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[o.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),o.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:u?"Hide Error":"Show Error"})]}),o.jsx("div",{style:{height:".25rem"}}),u?o.jsx("div",{children:o.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:l.message?o.jsx("code",{children:l.message}):null})}):null]})}function xv({children:l,fallback:u=null}){return Bp()?o.jsx(Pl.Fragment,{children:l}):o.jsx(Pl.Fragment,{children:u})}function Bp(){return Pl.useSyncExternalStore(Sv,()=>!0,()=>!1)}function Sv(){return()=>{}}var Hp=U.createContext(null);function It(l){return U.useContext(Hp)}var Ku=U.createContext(void 0),jv=U.createContext(void 0),Xe=(l=>(l[l.None=0]="None",l[l.Mutable=1]="Mutable",l[l.Watching=2]="Watching",l[l.RecursedCheck=4]="RecursedCheck",l[l.Recursed=8]="Recursed",l[l.Dirty=16]="Dirty",l[l.Pending=32]="Pending",l))(Xe||{});function Nv({update:l,notify:u,unwatched:i}){return{link:r,unlink:f,propagate:h,checkDirty:g,shallowPropagate:v};function r(m,S,y){const x=S.depsTail;if(x!==void 0&&x.dep===m)return;const j=x!==void 0?x.nextDep:S.deps;if(j!==void 0&&j.dep===m){j.version=y,S.depsTail=j;return}const _=m.subsTail;if(_!==void 0&&_.version===y&&_.sub===S)return;const E=S.depsTail=m.subsTail={version:y,dep:m,sub:S,prevDep:x,nextDep:j,prevSub:_,nextSub:void 0};j!==void 0&&(j.prevDep=E),x!==void 0?x.nextDep=E:S.deps=E,_!==void 0?_.nextSub=E:m.subs=E}function f(m,S=m.sub){const y=m.dep,x=m.prevDep,j=m.nextDep,_=m.nextSub,E=m.prevSub;return j!==void 0?j.prevDep=x:S.depsTail=x,x!==void 0?x.nextDep=j:S.deps=j,_!==void 0?_.prevSub=E:y.subsTail=E,E!==void 0?E.nextSub=_:(y.subs=_)===void 0&&i(y),j}function h(m){let S=m.nextSub,y;e:do{const x=m.sub;let j=x.flags;if(j&60?j&12?j&4?!(j&48)&&p(m,x)?(x.flags=j|40,j&=1):j=0:x.flags=j&-9|32:j=0:x.flags=j|32,j&2&&u(x),j&1){const _=x.subs;if(_!==void 0){const E=(m=_).nextSub;E!==void 0&&(y={value:S,prev:y},S=E);continue}}if((m=S)!==void 0){S=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){S=m.nextSub;continue e}break}while(!0)}function g(m,S){let y,x=0,j=!1;e:do{const _=m.dep,E=_.flags;if(S.flags&16)j=!0;else if((E&17)===17){if(l(_)){const A=_.subs;A.nextSub!==void 0&&v(A),j=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=_.deps,S=_,++x;continue}if(!j){const A=m.nextDep;if(A!==void 0){m=A;continue}}for(;x--;){const A=S.subs,C=A.nextSub!==void 0;if(C?(m=y.value,y=y.prev):m=A,j){if(l(S)){C&&v(A),S=m.sub;continue}j=!1}else S.flags&=-33;S=m.sub;const X=m.nextDep;if(X!==void 0){m=X;continue e}}return j}while(!0)}function v(m){do{const S=m.sub,y=S.flags;(y&48)===32&&(S.flags=y|16,(y&6)===2&&u(S))}while((m=m.nextSub)!==void 0)}function p(m,S){let y=S.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}function Xr(l,u,i){const r=typeof l=="object",f=r?l:void 0;return{next:(r?l.next:l)?.bind(f),error:(r?l.error:u)?.bind(f),complete:(r?l.complete:i)?.bind(f)}}const Dr=[];let Bu=0;const{link:ip,unlink:Rv,propagate:Tv,checkDirty:kp,shallowPropagate:up}=Nv({update(l){return l._update()},notify(l){Dr[Lr++]=l,l.flags&=~Xe.Watching},unwatched(l){l.depsTail!==void 0&&(l.depsTail=void 0,l.flags=Xe.Mutable|Xe.Dirty,Gu(l))}});let Au=0,Lr=0,ba,Ur=0;function qp(l){try{++Ur,l()}finally{--Ur||Yp()}}function Gu(l){const u=l.depsTail;let i=u!==void 0?u.nextDep:l.deps;for(;i!==void 0;)i=Rv(i,l)}function Yp(){if(!(Ur>0)){for(;Au<Lr;){const l=Dr[Au];Dr[Au++]=void 0,l.notify()}Au=0,Lr=0}}function Gp(l,u){const i=typeof l=="function",r=l,f={_snapshot:i?void 0:l,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?Xe.None:Xe.Mutable,get(){return ba!==void 0&&ip(f,ba,Bu),f._snapshot},subscribe(h){const g=Xr(h),v={current:!1},p=_v(()=>{f.get(),v.current?g.next?.(f._snapshot):v.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(h){const g=ba,v=Object.is;if(i)ba=f,++Bu,f.depsTail=void 0;else if(h===void 0)return!1;i&&(f.flags=Xe.Mutable|Xe.RecursedCheck);try{const p=f._snapshot,m=typeof h=="function"?h(p):h===void 0&&i?r(p):h;return p===void 0||!v(p,m)?(f._snapshot=m,!0):!1}finally{ba=g,i&&(f.flags&=~Xe.RecursedCheck),Gu(f)}}};return i?(f.flags=Xe.Mutable|Xe.Dirty,f.get=function(){const h=f.flags;if(h&Xe.Dirty||h&Xe.Pending&&kp(f.deps,f)){if(f._update()){const g=f.subs;g!==void 0&&up(g)}}else h&Xe.Pending&&(f.flags=h&~Xe.Pending);return ba!==void 0&&ip(f,ba,Bu),f._snapshot}):f.set=function(h){if(f._update(h)){const g=f.subs;g!==void 0&&(Tv(g),up(g),Yp())}},f}function _v(l){const u=()=>{const r=ba;ba=i,++Bu,i.depsTail=void 0,i.flags=Xe.Watching|Xe.RecursedCheck;try{return l()}finally{ba=r,i.flags&=~Xe.RecursedCheck,Gu(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Xe.Watching|Xe.RecursedCheck,notify(){const r=this.flags;r&Xe.Dirty||r&Xe.Pending&&kp(this.deps,this)?u():this.flags=Xe.Watching},stop(){this.flags=Xe.None,this.depsTail=void 0,Gu(this)}};return u(),i}class Mv{constructor(u){this.atom=Gp(u)}setState(u){this.atom.set(u)}get state(){return this.atom.get()}get(){return this.state}subscribe(u){return this.atom.subscribe(Xr(u))}}class Ev{constructor(u){this.atom=Gp(u)}get state(){return this.atom.get()}get(){return this.state}subscribe(u){return this.atom.subscribe(Xr(u))}}function cp(l){return typeof l=="function"?new Ev(l):new Mv(l)}var Rr={exports:{}},Tr={},_r={exports:{}},Mr={};var op;function Cv(){if(op)return Mr;op=1;var l=ri();function u(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var i=typeof Object.is=="function"?Object.is:u,r=l.useState,f=l.useEffect,h=l.useLayoutEffect,g=l.useDebugValue;function v(y,x){var j=x(),_=r({inst:{value:j,getSnapshot:x}}),E=_[0].inst,A=_[1];return h(function(){E.value=j,E.getSnapshot=x,p(E)&&A({inst:E})},[y,j,x]),f(function(){return p(E)&&A({inst:E}),y(function(){p(E)&&A({inst:E})})},[y]),g(j),j}function p(y){var x=y.getSnapshot;y=y.value;try{var j=x();return!i(y,j)}catch{return!0}}function m(y,x){return x()}var S=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:v;return Mr.useSyncExternalStore=l.useSyncExternalStore!==void 0?l.useSyncExternalStore:S,Mr}var rp;function Av(){return rp||(rp=1,_r.exports=Cv()),_r.exports}var fp;function wv(){if(fp)return Tr;fp=1;var l=ri(),u=Av();function i(m,S){return m===S&&(m!==0||1/m===1/S)||m!==m&&S!==S}var r=typeof Object.is=="function"?Object.is:i,f=u.useSyncExternalStore,h=l.useRef,g=l.useEffect,v=l.useMemo,p=l.useDebugValue;return Tr.useSyncExternalStoreWithSelector=function(m,S,y,x,j){var _=h(null);if(_.current===null){var E={hasValue:!1,value:null};_.current=E}else E=_.current;_=v(function(){function C(P){if(!X){if(X=!0,Z=P,P=x(P),j!==void 0&&E.hasValue){var Q=E.value;if(j(Q,P))return J=Q}return J=P}if(Q=J,r(Z,P))return Q;var q=x(P);return j!==void 0&&j(Q,q)?(Z=P,Q):(Z=P,J=q)}var X=!1,Z,J,I=y===void 0?null:y;return[function(){return C(S())},I===null?void 0:function(){return C(I())}]},[S,y,x,j]);var A=f(m,_[0],_[1]);return g(function(){E.hasValue=!0,E.value=A},[A]),p(A),A},Tr}var dp;function Ov(){return dp||(dp=1,Rr.exports=wv()),Rr.exports}var zv=Ov();function Dv(l,u){return l===u}function Bt(l,u,i=Dv){const r=U.useCallback(g=>{if(!l)return()=>{};const{unsubscribe:v}=l.subscribe(g);return v},[l]),f=U.useCallback(()=>l?.get(),[l]);return zv.useSyncExternalStoreWithSelector(r,f,f,u,i)}var Lv={state:void 0,get:()=>{},subscribe:()=>()=>{}};function ol(l){const u=It(),i=U.useContext(l.from?jv:Ku),r=l.from??i,f=r?l.from?u.stores.getMatchStoreByRouteId(r):u.stores.activeMatchStoresById.get(r):void 0,h=U.useRef(void 0);return Bt(f??Lv,g=>{if((l.shouldThrow??!0)&&!g&&Qa(),g===void 0)return;const v=l.select?l.select(g):g;if(l.structuralSharing??u.options.defaultStructuralSharing){const p=nl(h.current,v);return h.current=p,p}return v})}function Vp(l){return ol({from:l.from,strict:l.strict,structuralSharing:l.structuralSharing,select:u=>l.select?l.select(u.loaderData):u.loaderData})}function Qp(l){const{select:u,...i}=l;return ol({...i,select:r=>u?u(r.loaderDeps):r.loaderDeps})}function Ju(l){return ol({from:l.from,shouldThrow:l.shouldThrow,structuralSharing:l.structuralSharing,strict:l.strict,select:u=>{const i=l.strict===!1?u.params:u._strictParams;return l.select?l.select(i):i}})}function Xp(l){return ol({from:l.from,strict:l.strict,shouldThrow:l.shouldThrow,structuralSharing:l.structuralSharing,select:u=>l.select?l.select(u.search):u.search})}function Zr(l){const u=It();return U.useCallback(i=>u.navigate({...i,from:i.from??l?.from}),[l?.from,u])}function Zp(l){return ol({...l,select:u=>l.select?l.select(u.context):u.context})}var Kp=Np();function Uv(l,u){const i=It(),r=yg(u),{activeProps:f,inactiveProps:h,activeOptions:g,to:v,preload:p,preloadDelay:m,hashScrollIntoView:S,replace:y,startTransition:x,resetScroll:j,viewTransition:_,children:E,target:A,disabled:C,style:X,className:Z,onClick:J,onBlur:I,onFocus:P,onMouseEnter:Q,onMouseLeave:q,onTouchStart:B,ignoreBlocker:se,params:ee,search:ce,hash:be,state:Ye,mask:Ee,reloadDocument:H,unsafeRelative:$,from:le,_fromLocation:Te,...ye}=l,R=Bp(),Y=U.useMemo(()=>l,[i,l.from,l._fromLocation,l.hash,l.to,l.search,l.params,l.state,l.mask,l.unsafeRelative]),F=Bt(i.stores.location,fe=>fe,(fe,Pe)=>fe.href===Pe.href),K=U.useMemo(()=>{const fe={_fromLocation:F,...Y};return i.buildLocation(fe)},[i,F,Y]),oe=K.maskedLocation?K.maskedLocation.publicHref:K.publicHref,re=K.maskedLocation?K.maskedLocation.external:K.external,pe=U.useMemo(()=>Gv(oe,re,i.history,C),[C,re,oe,i.history]),He=U.useMemo(()=>{if(pe?.external)return ku(pe.href,i.protocolAllowlist)?void 0:pe.href;if(!Vv(v)&&!(typeof v!="string"||v.indexOf(":")===-1))try{return new URL(v),ku(v,i.protocolAllowlist)?void 0:v}catch{}},[v,pe,i.protocolAllowlist]),Ue=U.useMemo(()=>{if(He)return!1;if(g?.exact){if(!Bg(F.pathname,K.pathname,i.basepath))return!1}else{const fe=qu(F.pathname,i.basepath),Pe=qu(K.pathname,i.basepath);if(!(fe.startsWith(Pe)&&(fe.length===Pe.length||fe[Pe.length]==="/")))return!1}return(g?.includeSearch??!0)&&!il(F.search,K.search,{partial:!g?.exact,ignoreUndefined:!g?.explicitUndefined})?!1:g?.includeHash?R&&F.hash===K.hash:!0},[g?.exact,g?.explicitUndefined,g?.includeHash,g?.includeSearch,F,He,R,K.hash,K.pathname,K.search,i.basepath]),St=Ue?Mn(f,{})??Bv:Er,Pt=Ue?Er:Mn(h,{})??Er,la=[Z,St.className,Pt.className].filter(Boolean).join(" "),On=(X||St.style||Pt.style)&&{...X,...St.style,...Pt.style},[gt,sa]=U.useState(!1),ia=U.useRef(!1),ua=l.reloadDocument||He?!1:p??i.options.defaultPreload,Ht=m??i.options.defaultPreloadDelay??0,vt=U.useCallback(()=>{i.preloadRoute({...Y,_builtLocation:K}).catch(fe=>{console.warn(fe),console.warn(bv)})},[i,Y,K]);vg(r,U.useCallback(fe=>{fe?.isIntersecting&&vt()},[vt]),Yv,{disabled:!!C||ua!=="viewport"}),U.useEffect(()=>{ia.current||!C&&ua==="render"&&(vt(),ia.current=!0)},[C,vt,ua]);const ga=fe=>{const Pe=fe.currentTarget.getAttribute("target"),jt=A!==void 0?A:Pe;if(!C&&!Qv(fe)&&!fe.defaultPrevented&&(!jt||jt==="_self")&&fe.button===0){fe.preventDefault(),Kp.flushSync(()=>{sa(!0)});const rl=i.subscribe("onResolved",()=>{rl(),sa(!1)});i.navigate({...Y,replace:y,resetScroll:j,hashScrollIntoView:S,startTransition:x,viewTransition:_,ignoreBlocker:se})}};if(He)return{...ye,ref:r,href:He,...E&&{children:E},...A&&{target:A},...C&&{disabled:C},...X&&{style:X},...Z&&{className:Z},...J&&{onClick:J},...I&&{onBlur:I},...P&&{onFocus:P},...Q&&{onMouseEnter:Q},...q&&{onMouseLeave:q},...B&&{onTouchStart:B}};const Za=fe=>{if(C||ua!=="intent")return;if(!Ht){vt();return}const Pe=fe.currentTarget;if(ei.has(Pe))return;const jt=setTimeout(()=>{ei.delete(Pe),vt()},Ht);ei.set(Pe,jt)},va=fe=>{C||ua!=="intent"||vt()},Ka=fe=>{if(C||!ua||!Ht)return;const Pe=fe.currentTarget,jt=ei.get(Pe);jt&&(clearTimeout(jt),ei.delete(Pe))};return{...ye,...St,...Pt,href:pe?.href,ref:r,onClick:Zl([J,ga]),onBlur:Zl([I,Ka]),onFocus:Zl([P,Za]),onMouseEnter:Zl([Q,Za]),onMouseLeave:Zl([q,Ka]),onTouchStart:Zl([B,va]),disabled:!!C,target:A,...On&&{style:On},...la&&{className:la},...C&&Hv,...Ue&&kv,...R&&gt&&qv}}var Er={},Bv={className:"active"},Hv={role:"link","aria-disabled":!0},kv={"data-status":"active","aria-current":"page"},qv={"data-transitioning":"transitioning"},ei=new WeakMap,Yv={rootMargin:"100px"},Zl=l=>u=>{for(const i of l)if(i){if(u.defaultPrevented)return;i(u)}};function Gv(l,u,i,r){if(!r)return u?{href:l,external:!0}:{href:i.createHref(l)||"/",external:!1}}function Vv(l){if(typeof l!="string")return!1;const u=l.charCodeAt(0);return u===47?l.charCodeAt(1)!==47:u===46}var Jp=U.forwardRef((l,u)=>{const{_asChild:i,...r}=l,{type:f,...h}=Uv(r,u),g=typeof r.children=="function"?r.children({isActive:h["data-status"]==="active"}):r.children;if(!i){const{disabled:v,...p}=h;return U.createElement("a",p,g)}return U.createElement(i,h,g)});function Qv(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}var Xv=class extends Up{constructor(l){super(l),this.useMatch=u=>ol({select:u?.select,from:this.id,structuralSharing:u?.structuralSharing}),this.useRouteContext=u=>Zp({...u,from:this.id}),this.useSearch=u=>Xp({select:u?.select,structuralSharing:u?.structuralSharing,from:this.id}),this.useParams=u=>Ju({select:u?.select,structuralSharing:u?.structuralSharing,from:this.id}),this.useLoaderDeps=u=>Qp({...u,from:this.id}),this.useLoaderData=u=>Vp({...u,from:this.id}),this.useNavigate=()=>Zr({from:this.fullPath}),this.Link=Pl.forwardRef((u,i)=>o.jsx(Jp,{ref:i,from:this.fullPath,...u}))}};function Kr(l){return new Xv(l)}var Zv=class extends gv{constructor(l){super(l),this.useMatch=u=>ol({select:u?.select,from:this.id,structuralSharing:u?.structuralSharing}),this.useRouteContext=u=>Zp({...u,from:this.id}),this.useSearch=u=>Xp({select:u?.select,structuralSharing:u?.structuralSharing,from:this.id}),this.useParams=u=>Ju({select:u?.select,structuralSharing:u?.structuralSharing,from:this.id}),this.useLoaderDeps=u=>Qp({...u,from:this.id}),this.useLoaderData=u=>Vp({...u,from:this.id}),this.useNavigate=()=>Zr({from:this.fullPath}),this.Link=Pl.forwardRef((u,i)=>o.jsx(Jp,{ref:i,from:this.fullPath,...u}))}};function Kv(l){return new Zv(l)}function Jv(l){const u=It(),i=`not-found-${Bt(u.stores.location,r=>r.pathname)}-${Bt(u.stores.status,r=>r)}`;return o.jsx(Vr,{getResetKey:()=>i,onCatch:(r,f)=>{if(xt(r))l.onCatch?.(r,f);else throw r},errorComponent:({error:r})=>{if(xt(r))return l.fallback?.(r);throw r},children:l.children})}function $v(){return o.jsx("p",{children:"Not Found"})}function Fl(l){return o.jsx(o.Fragment,{children:l.children})}function $p(l,u,i){return u.options.notFoundComponent?o.jsx(u.options.notFoundComponent,{...i}):l.options.defaultNotFoundComponent?o.jsx(l.options.defaultNotFoundComponent,{...i}):o.jsx($v,{})}function Fv(l){return null}function Iv(){return Fv(It()),null}var Fp=U.memo(function({matchId:u}){const i=It(),r=i.stores.activeMatchStoresById.get(u);r||Qa();const f=Bt(i.stores.loadedAt,g=>g),h=Bt(r,g=>g);return o.jsx(Pv,{router:i,matchId:u,resetKey:f,matchState:U.useMemo(()=>{const g=h.routeId,v=i.routesById[g].parentRoute?.id;return{routeId:g,ssr:h.ssr,_displayPending:h._displayPending,parentRouteId:v}},[h._displayPending,h.routeId,h.ssr,i.routesById])})});function Pv({router:l,matchId:u,resetKey:i,matchState:r}){const f=l.routesById[r.routeId],h=f.options.pendingComponent??l.options.defaultPendingComponent,g=h?o.jsx(h,{}):null,v=f.options.errorComponent??l.options.defaultErrorComponent,p=f.options.onCatch??l.options.defaultOnCatch,m=f.isRoot?f.options.notFoundComponent??l.options.notFoundRoute?.options.component:f.options.notFoundComponent,S=r.ssr===!1||r.ssr==="data-only",y=(!f.isRoot||f.options.wrapInSuspense||S)&&(f.options.wrapInSuspense??h??(f.options.errorComponent?.preload||S))?U.Suspense:Fl,x=v?Vr:Fl,j=m?Jv:Fl;return o.jsxs(f.isRoot?f.options.shellComponent??Fl:Fl,{children:[o.jsx(Ku.Provider,{value:u,children:o.jsx(y,{fallback:g,children:o.jsx(x,{getResetKey:()=>i,errorComponent:v||Qr,onCatch:(_,E)=>{if(xt(_))throw _.routeId??=r.routeId,_;p?.(_,E)},children:o.jsx(j,{fallback:_=>{if(_.routeId??=r.routeId,!m||_.routeId&&_.routeId!==r.routeId||!_.routeId&&!f.isRoot)throw _;return U.createElement(m,_)},children:S||r._displayPending?o.jsx(xv,{fallback:g,children:o.jsx(hp,{matchId:u})}):o.jsx(hp,{matchId:u})})})})}),r.parentRouteId===ul?o.jsxs(o.Fragment,{children:[o.jsx(Wv,{resetKey:i}),l.options.scrollRestoration&&Rp?o.jsx(Iv,{}):null]}):null]})}function Wv({resetKey:l}){const u=It(),i=U.useRef(void 0);return ni(()=>{const r=u.latestLocation.href;(i.current===void 0||i.current!==r)&&(u.emit({type:"onRendered",...Il(u.stores.location.state,u.stores.resolvedLocation.state)}),i.current=r)},[u.latestLocation.state.__TSR_key,l,u]),null}var hp=U.memo(function({matchId:u}){const i=It(),r=i.stores.activeMatchStoresById.get(u);r||Qa();const f=Bt(r,m=>m),h=f.routeId,g=i.routesById[h],v=U.useMemo(()=>{const m=(i.routesById[h].options.remountDeps??i.options.defaultRemountDeps)?.({routeId:h,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return m?JSON.stringify(m):void 0},[h,f.loaderDeps,f._strictParams,f._strictSearch,i.options.defaultRemountDeps,i.routesById]),p=U.useMemo(()=>{const m=g.options.component??i.options.defaultComponent;return m?o.jsx(m,{},v):o.jsx(Ip,{})},[v,g.options.component,i.options.defaultComponent]);if(f._displayPending)throw i.getMatch(f.id)?._nonReactive.displayPendingPromise;if(f._forcePending)throw i.getMatch(f.id)?._nonReactive.minPendingPromise;if(f.status==="pending"){const m=g.options.pendingMinMs??i.options.defaultPendingMinMs;if(m){const S=i.getMatch(f.id);if(S&&!S._nonReactive.minPendingPromise){const y=es();S._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),S._nonReactive.minPendingPromise=void 0},m)}}throw i.getMatch(f.id)?._nonReactive.loadPromise}if(f.status==="notFound")return xt(f.error)||Qa(),$p(i,g,f.error);if(f.status==="redirected")throw Ct(f.error)||Qa(),i.getMatch(f.id)?._nonReactive.loadPromise;if(f.status==="error")throw f.error;return p}),Ip=U.memo(function(){const u=It(),i=U.useContext(Ku);let r,f=!1,h;{const m=i?u.stores.activeMatchStoresById.get(i):void 0;[r,f]=Bt(m,S=>[S?.routeId,S?.globalNotFound??!1]),h=Bt(u.stores.matchesId,S=>S[S.findIndex(y=>y===i)+1])}const g=r?u.routesById[r]:void 0,v=u.options.defaultPendingComponent?o.jsx(u.options.defaultPendingComponent,{}):null;if(f)return g||Qa(),$p(u,g,void 0);if(!h)return null;const p=o.jsx(Fp,{matchId:h});return r===ul?o.jsx(U.Suspense,{fallback:v,children:p}):p});function ey(){const l=It(),u=U.useRef({router:l,mounted:!1}),[i,r]=U.useState(!1),f=Bt(l.stores.isLoading,y=>y),h=Bt(l.stores.hasPendingMatches,y=>y),g=br(f),v=f||i||h,p=br(v),m=f||h,S=br(m);return l.startTransition=y=>{r(!0),U.startTransition(()=>{y(),r(!1)})},U.useEffect(()=>{const y=l.history.subscribe(l.load),x=l.buildLocation({to:l.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return An(l.latestLocation.publicHref)!==An(x.publicHref)&&l.commitLocation({...x,replace:!0}),()=>{y()}},[l,l.history]),ni(()=>{if(typeof window<"u"&&l.ssr||u.current.router===l&&u.current.mounted)return;u.current={router:l,mounted:!0},(async()=>{try{await l.load()}catch(x){console.error(x)}})()},[l]),ni(()=>{g&&!f&&l.emit({type:"onLoad",...Il(l.stores.location.state,l.stores.resolvedLocation.state)})},[g,l,f]),ni(()=>{S&&!m&&l.emit({type:"onBeforeRouteMount",...Il(l.stores.location.state,l.stores.resolvedLocation.state)})},[m,S,l]),ni(()=>{if(p&&!v){const y=Il(l.stores.location.state,l.stores.resolvedLocation.state);l.emit({type:"onResolved",...y}),qp(()=>{l.stores.status.setState(()=>"idle"),l.stores.resolvedLocation.setState(()=>l.stores.location.state)}),y.hrefChanged&&vv(l)}},[v,p,l]),null}function ty(){const l=It(),u=l.routesById[ul].options.pendingComponent??l.options.defaultPendingComponent,i=u?o.jsx(u,{}):null,r=o.jsxs(typeof document<"u"&&l.ssr?Fl:U.Suspense,{fallback:i,children:[o.jsx(ey,{}),o.jsx(ay,{})]});return l.options.InnerWrap?o.jsx(l.options.InnerWrap,{children:r}):r}function ay(){const l=It(),u=Bt(l.stores.firstMatchId,f=>f),i=Bt(l.stores.loadedAt,f=>f),r=u?o.jsx(Fp,{matchId:u}):null;return o.jsx(Ku.Provider,{value:u,children:l.options.disableGlobalCatchBoundary?r:o.jsx(Vr,{getResetKey:()=>i,errorComponent:Qr,onCatch:void 0,children:r})})}var ny=l=>({createMutableStore:cp,createReadonlyStore:cp,batch:qp}),ly=l=>new sy(l),sy=class extends ov{constructor(l){super(l,ny)}};function iy({router:l,children:u,...i}){Object.keys(i).length>0&&l.update({...l.options,...i,context:{...l.options.context,...i.context}});const r=o.jsx(Hp.Provider,{value:l,children:u});return l.options.Wrap?o.jsx(l.options.Wrap,{children:r}):r}function uy({router:l,...u}){return o.jsx(iy,{router:l,...u,children:o.jsx(ty,{})})}const cy={neutral:"btn-neutral",primary:"btn-primary",info:"btn-info",error:"btn-error",ghost:"btn-ghost"},oy={xs:"btn-xs",sm:"btn-sm",md:null},ry={default:null,circle:"btn-circle"},fy={neutral:"white",primary:"blue",info:"cyan",error:"red",ghost:"gray"};function dy(l){const u=l.tone??"neutral",i=l.variant??"solid",r=l.size??"md",f=l.shape??"default",h=["btn",cy[u],oy[r],ry[f]];return i==="outline"&&u!=="ghost"&&h.push("btn-outline"),l.fullWidth&&h.push("w-full"),l.className!==void 0&&l.className.trim().length>0&&h.push(l.className.trim()),{tone:u,variant:i,size:r,shape:f,webClassName:h.filter(g=>g!==null).join(" "),tuiColor:fy[u]}}function Cn(l){const u=dy(l);return o.jsx("button",{type:l.type??"button",className:u.webClassName,disabled:l.disabled,"aria-label":l.ariaLabel,onClick:l.onClick,children:l.children})}function hy(l){const u=l.message;if(typeof u=="string"&&u.trim())return u;const i=l.reason;return typeof i=="string"&&i.trim()?i:null}function Je(l){return Number.isFinite(l)?l.toFixed(2):"0.00"}function Xa(l){const u=new Date(l);return Number.isNaN(u.getTime())?l:u.toLocaleString()}function my(l){return l.endedAt?`Ended ${Xa(l.endedAt)}`:l.startedAt?`Started ${Xa(l.startedAt)}`:"Not started"}function py(l){if(!l)return"No payload";if(typeof l.text=="string"&&l.text.trim())return Ft(l.text,220);if(typeof l.toolName=="string")return`Tool: ${l.toolName}`;if(typeof l.error=="string")return Ft(l.error,220);try{return Ft(JSON.stringify(l),220)}catch{return"Unserializable event payload"}}function Ft(l,u){return l.length<=u?l:`${l.slice(0,u-3)}...`}function by({baseDailyBudgetUsd:l,dailyBudgetOverrideUsd:u,effectiveDailyBudgetUsd:i,todayCostUsd:r,activeOperation:f,dailyDraft:h,onDailyDraftChange:g,onDailySubmit:v,onDailyClear:p,issueDraft:m,repos:S,onIssueDraftChange:y,onIssueSubmit:x,onIssueClear:j}){const _=f==="daily-cost-override:set"||f==="daily-cost-override:clear",E=f==="cost-override:set"||f==="cost-override:clear",A=u!==null;return o.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-6 sm:p-8",children:[o.jsx("h2",{className:"card-title text-2xl font-semibold capitalize text-base-content",children:"budget overrides"}),o.jsx("p",{className:"max-w-3xl text-sm text-base-content/75",children:"Unblock runs that were stopped by a cost cap without changing your saved limits. The daily override auto-expires at 00:00 UTC."}),o.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[o.jsxs("div",{className:"rounded-box border border-base-300/60 bg-base-100/40 p-4",children:[o.jsx("h3",{className:"font-semibold text-base-content",children:"Today's daily cap"}),o.jsxs("dl",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-1 text-xs text-base-content/75",children:[o.jsx("dt",{children:"Spent today"}),o.jsxs("dd",{className:"font-mono text-base-content",children:["$",Je(r)]}),o.jsx("dt",{children:"Base cap"}),o.jsxs("dd",{className:"font-mono text-base-content",children:["$",Je(l)]}),o.jsx("dt",{children:"Effective cap"}),o.jsxs("dd",{className:"font-mono text-base-content",children:["$",Je(i),A&&o.jsx("span",{className:"ml-2 badge badge-warning badge-xs",children:"override"})]})]}),o.jsxs("form",{className:"mt-3 flex flex-wrap items-end gap-2",onSubmit:v,children:[o.jsxs("label",{className:"form-control",children:[o.jsx("span",{className:"label label-text text-xs",children:"New cap (USD)"}),o.jsx("input",{className:"input input-bordered input-xs w-32 font-mono",type:"number",min:1,max:1e4,step:1,value:h,onChange:C=>g(C.target.value),disabled:_,required:!0})]}),o.jsx(Cn,{type:"submit",tone:"info",size:"xs",disabled:_,children:"raise cap"}),o.jsx(Cn,{type:"button",tone:"ghost",size:"xs",onClick:p,disabled:_||!A,children:"clear"})]}),o.jsx("p",{className:"mt-2 text-xs text-base-content/60",children:"Scoped to the current UTC day. Blocks every queued run until today's spend hits the new cap."})]}),o.jsxs("div",{className:"rounded-box border border-base-300/60 bg-base-100/40 p-4",children:[o.jsx("h3",{className:"font-semibold text-base-content",children:"Per-issue override"}),o.jsxs("p",{className:"mt-2 text-xs text-base-content/75",children:["Grant a single stuck run extra headroom. Replaces the per-run cap ",o.jsx("em",{children:"and"})," exempts the run from the daily cap."]}),o.jsxs("form",{className:"mt-3 flex flex-wrap items-end gap-2",onSubmit:x,children:[o.jsxs("label",{className:"form-control",children:[o.jsx("span",{className:"label label-text text-xs",children:"Repo"}),o.jsxs("select",{className:"select select-bordered select-xs w-48",value:m.repo,onChange:C=>y({repo:C.target.value}),disabled:E,required:!0,children:[o.jsx("option",{value:"",children:"(select)"}),S.map(C=>o.jsx("option",{value:C,children:C},C))]})]}),o.jsxs("label",{className:"form-control",children:[o.jsx("span",{className:"label label-text text-xs",children:"Issue #"}),o.jsx("input",{className:"input input-bordered input-xs w-24 font-mono",type:"number",min:1,step:1,value:m.issueNumber,onChange:C=>y({issueNumber:C.target.value}),disabled:E,required:!0})]}),o.jsxs("label",{className:"form-control",children:[o.jsx("span",{className:"label label-text text-xs",children:"Amount (USD)"}),o.jsx("input",{className:"input input-bordered input-xs w-28 font-mono",type:"number",min:.1,step:.5,value:m.amount,onChange:C=>y({amount:C.target.value}),disabled:E,required:!0})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Cn,{type:"submit",tone:"info",size:"xs",disabled:E,children:"set"}),o.jsx(Cn,{type:"button",tone:"ghost",size:"xs",onClick:C=>{C.preventDefault(),j(C)},disabled:E,children:"clear"})]})]})]})]})]})})}function mp(l){const u=(l??"unknown").trim().toLowerCase();return u.length>0?u:"unknown"}function gy(l,u){const i=mp(l),r=mp(u);return i==="unknown"||r==="unknown"?i===r:i===r||i.startsWith(r)||r.startsWith(i)}function pp(l){const u=(l??"unknown").trim();return u.length===0||u.toLowerCase()==="unknown"?"unknown":u.slice(0,12)}function vy({currentStateLabel:l,currentStateToneClass:u,isWorking:i,socketConnected:r,lastRefreshAt:f,pollIntervalSeconds:h,reposCount:g,activeRuns:v,runningRuns:p,queuedRuns:m,frontendVersion:S,frontendGitSha:y,backendVersion:x,backendGitSha:j,operationsEnabled:_,activeOperation:E,isRefreshing:A,onRefresh:C,onPoll:X,onSync:Z,onGoToSettings:J}){const I=pp(y),P=pp(j),Q=gy(y,j),B=_&&!(E!==null),se=yy(f),ee=Q?`v${x} · ${P}`:`fe ${I} / be ${P}`;return o.jsx("header",{className:"sticky top-0 z-50 border-b border-base-300/60 bg-base-300/88 backdrop-blur",children:o.jsx("div",{className:"mx-auto w-full max-w-[1500px] px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"flex flex-col gap-3 py-3 lg:flex-row lg:items-start lg:justify-between",children:[o.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[o.jsx("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:o.jsx("p",{className:"text-lg font-semibold tracking-wide text-base-content sm:text-xl",children:"night-orch"})}),o.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-base-content/75",children:[o.jsx("span",{className:"text-[10px] uppercase tracking-[0.22em] text-base-content/65",children:"State"}),o.jsx("span",{className:`badge badge-sm capitalize ${u} ${i?"orch-working-pulse":""}`,children:l}),o.jsx("span",{className:r?"text-success":"text-warning",children:r?"stream online":"stream reconnecting"}),o.jsxs("span",{children:["Last refresh ",se]}),o.jsxs("span",{children:["Poll ",h??"--","s"]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 text-[10px]",children:[o.jsx(ti,{label:"active",value:v}),o.jsx(ti,{label:"running",value:p}),o.jsx(ti,{label:"queued",value:m}),o.jsx(ti,{label:"repos",value:g}),o.jsx(ti,{label:"git",value:ee,monospace:!0})]})]}),o.jsxs("div",{className:"flex items-center gap-2 self-end lg:self-start",children:[o.jsx(wu,{label:A?"Refreshing...":"Refresh data",onClick:C,disabled:A,busy:A,children:o.jsx(xy,{})}),o.jsx(wu,{label:E==="poll"?"Polling...":"Trigger poll",onClick:X,disabled:!B,busy:E==="poll",children:o.jsx(Sy,{})}),o.jsx(wu,{label:E==="sync"?"Syncing...":"Run sync",onClick:Z,disabled:!B,busy:E==="sync",children:o.jsx(jy,{})}),o.jsx(wu,{label:"Open settings",onClick:J,children:o.jsx(Ny,{})})]})]})})})}function yy(l){if(!l)return"--";const u=new Date(l);return Number.isNaN(u.getTime())?l:u.toLocaleTimeString()}function ti({label:l,value:u,monospace:i=!1}){return o.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-base-100/45 bg-base-100/35 px-1.5 py-0.5",children:[o.jsx("span",{className:"text-[9px] uppercase tracking-[0.16em] text-base-content/65",children:l}),o.jsx("span",{className:i?"font-mono text-base-content":"font-semibold text-base-content",children:u})]})}function wu({label:l,onClick:u,disabled:i=!1,busy:r=!1,children:f}){return o.jsx("button",{type:"button",className:"btn btn-ghost btn-sm btn-circle border border-base-100/45 bg-base-100/30 hover:bg-base-100/50",onClick:u,disabled:i,title:l,"aria-label":l,children:r?o.jsx("span",{className:"loading loading-spinner loading-xs","aria-hidden":"true"}):f})}function $u(l){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4","aria-hidden":"true",children:l})}function xy(){return $u(o.jsxs(o.Fragment,{children:[o.jsx("path",{d:"M20 11a8 8 0 0 0-13.8-5.4"}),o.jsx("path",{d:"M4 4v4h4"}),o.jsx("path",{d:"M4 13a8 8 0 0 0 13.8 5.4"}),o.jsx("path",{d:"M20 20v-4h-4"})]}))}function Sy(){return $u(o.jsxs(o.Fragment,{children:[o.jsx("circle",{cx:"12",cy:"12",r:"7.25"}),o.jsx("circle",{cx:"12",cy:"12",r:"2.25"}),o.jsx("path",{d:"m20 4-3.4 3.4"}),o.jsx("path",{d:"M20 7V4h-3"})]}))}function jy(){return $u(o.jsxs(o.Fragment,{children:[o.jsx("path",{d:"M10.2 6.2a4.4 4.4 0 1 0-2.8 6.5"}),o.jsx("path",{d:"M10.4 8.8V5.7H7.3"}),o.jsx("path",{d:"M13.8 17.8a4.4 4.4 0 1 0 2.8-6.5"}),o.jsx("path",{d:"M13.6 15.2v3.1h3.1"})]}))}function Ny(){return $u(o.jsxs(o.Fragment,{children:[o.jsx("circle",{cx:"12",cy:"12",r:"3"}),o.jsx("path",{d:"M19 12a1.3 1.3 0 0 0 .9 1.25l.12.03a1.9 1.9 0 0 1 0 3.44l-.12.04A1.3 1.3 0 0 0 19 18a1.3 1.3 0 0 0-.23.75l.01.12a1.9 1.9 0 0 1-2.98 1.72l-.1-.07a1.3 1.3 0 0 0-1.5 0l-.1.07a1.9 1.9 0 0 1-2.98-1.72l.01-.12a1.3 1.3 0 0 0-.23-.75 1.3 1.3 0 0 0-.9-.56l-.12-.04a1.9 1.9 0 0 1 0-3.44l.12-.03A1.3 1.3 0 0 0 9 12a1.3 1.3 0 0 0-.23-.75l-.01-.12a1.9 1.9 0 0 1 2.98-1.72l.1.07a1.3 1.3 0 0 0 1.5 0l.1-.07a1.9 1.9 0 0 1 2.98 1.72l-.01.12c0 .27.08.53.23.75.2.28.51.48.86.56l.12.03A1.3 1.3 0 0 0 19 12Z"})]}))}function Ou({label:l,value:u,accent:i,subValue:r}){const f=i==="amber"?"border-warning/50 bg-warning/10":i==="emerald"?"border-success/50 bg-success/10":i==="sky"?"border-accent/50 bg-accent/10":"border-info/50 bg-info/10";return o.jsxs("article",{className:`stat min-h-0 gap-1 rounded-box border px-3 py-2 shadow-panel ${f}`,children:[o.jsx("div",{className:"stat-title text-[10px] uppercase tracking-[0.12em] text-base-content/70",children:l}),o.jsx("div",{className:"stat-value text-xl leading-tight text-base-content",children:u}),r&&o.jsx("div",{className:"stat-desc text-[10px] text-base-content/70",children:r})]})}function Br({snapshot:l}){const u=l?.stats.cost.model==="subscription",i=l?.cost.dailyBudgetOverrideUsd??null,r=l?.cost.effectiveDailyBudgetUsd??l?.cost.dailyBudgetUsd??0,f=l?.status.dailyCostUsd??0,h=r-f,g=i!==null?`Budget $${Je(r)} (override)`:`Budget $${Je(l?.cost.dailyBudgetUsd??0)}`;return o.jsxs("section",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-4",children:[o.jsx(Ou,{label:u?"Daily Usage":"Daily Cost",value:u?Ry(l?.stats.usage.todayTotalTokens??0):`$${Je(f)}`,accent:"emerald",subValue:u?`Est. $${Je(f)} today`:g}),o.jsx(Ou,{label:"Budget Headroom",value:Ty(h),accent:h>=0?"cyan":"amber",subValue:`Daily cap $${Je(r)}`}),o.jsx(Ou,{label:"24h Throughput",value:l?.stats.throughput.runs24h??0,accent:"cyan",subValue:`${(l?.stats.throughput.successRate7d??0).toFixed(1)}% success (7d)`}),o.jsx(Ou,{label:"Review Ready",value:l?.stats.overview.reviewReadyRuns??0,accent:"sky",subValue:`${l?.stats.overview.completedRuns??0} completed`})]})}function Ry(l){return!Number.isFinite(l)||l<=0?"0":l>=1e9?`${(l/1e9).toFixed(2)}B`:l>=1e6?`${(l/1e6).toFixed(2)}M`:l>=1e3?`${(l/1e3).toFixed(1)}k`:String(Math.round(l))}function Ty(l){const u=`$${Je(Math.abs(l))}`;return l>=0?`+${u}`:`-${u}`}const bp=[{id:"issues",label:"issues",shortLabel:"issues",Icon:My},{id:"stats",label:"stats",shortLabel:"stats",Icon:Ey},{id:"projects",label:"projects",shortLabel:"projects",Icon:Cy},{id:"settings",label:"settings",shortLabel:"settings",Icon:Ay}];function _y({activePage:l,onPageChange:u}){return o.jsxs(o.Fragment,{children:[o.jsx("aside",{className:"hidden md:block md:min-h-0",children:o.jsx("nav",{className:"sticky top-[4.55rem] flex h-[calc(100dvh-4.9rem)] min-h-[560px] w-20 flex-col gap-1 border-r border-base-300/70 bg-base-200/45 px-2 py-4 lg:w-56 lg:px-3","aria-label":"Dashboard pages",children:bp.map(i=>{const r=l===i.id;return o.jsxs("button",{type:"button",onClick:()=>u(i.id),"aria-current":r?"page":void 0,"aria-label":i.label,title:i.label,className:`btn btn-sm h-11 w-full rounded-lg border border-transparent px-2 ${r?"btn-primary text-primary-content":"btn-ghost bg-base-100/25 text-base-content/75 hover:bg-base-100/45 hover:text-base-content"} justify-center lg:justify-start lg:gap-3 lg:px-3`,children:[o.jsx(i.Icon,{className:"size-4 shrink-0"}),o.jsx("span",{className:"hidden text-sm capitalize lg:inline",children:i.label})]},i.id)})})}),o.jsx("nav",{className:"dock dock-sm shadow-nav-dock z-40 border-t border-base-300/70 bg-base-200/95 backdrop-blur md:hidden","aria-label":"Dashboard pages",children:bp.map(i=>{const r=l===i.id;return o.jsxs("button",{type:"button",onClick:()=>u(i.id),"aria-label":i.label,title:i.label,className:r?"dock-active text-primary":"text-base-content/70","aria-current":r?"page":void 0,children:[o.jsx(i.Icon,{className:"size-[1.1rem]"}),o.jsx("span",{className:"dock-label text-[11px] capitalize",children:i.shortLabel})]},i.id)})})]})}function Fu({className:l,children:u}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:l??"size-4","aria-hidden":"true",children:u})}function My({className:l}){return Fu({className:l,children:o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2.5"}),o.jsx("path",{d:"M7 9h10"}),o.jsx("path",{d:"M7 13h6.5"})]})})}function Ey({className:l}){return Fu({className:l,children:o.jsxs(o.Fragment,{children:[o.jsx("path",{d:"M4 19.5h16"}),o.jsx("rect",{x:"6.25",y:"11.25",width:"2.5",height:"6.25",rx:"1"}),o.jsx("rect",{x:"10.75",y:"8.25",width:"2.5",height:"9.25",rx:"1"}),o.jsx("rect",{x:"15.25",y:"5.25",width:"2.5",height:"12.25",rx:"1"})]})})}function Cy({className:l}){return Fu({className:l,children:o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"3.5",y:"5",width:"17",height:"14",rx:"2.5"}),o.jsx("path",{d:"M3.75 9.5h16.5"}),o.jsx("path",{d:"M8.25 5v4.5"})]})})}function Ay({className:l}){return Fu({className:l,children:o.jsxs(o.Fragment,{children:[o.jsx("circle",{cx:"12",cy:"12",r:"3"}),o.jsx("path",{d:"M19 12a1.3 1.3 0 0 0 .9 1.25l.12.03a1.9 1.9 0 0 1 0 3.44l-.12.04A1.3 1.3 0 0 0 19 18a1.3 1.3 0 0 0-.23.75l.01.12a1.9 1.9 0 0 1-2.98 1.72l-.1-.07a1.3 1.3 0 0 0-1.5 0l-.1.07a1.9 1.9 0 0 1-2.98-1.72l.01-.12a1.3 1.3 0 0 0-.23-.75 1.3 1.3 0 0 0-.9-.56l-.12-.04a1.9 1.9 0 0 1 0-3.44l.12-.03A1.3 1.3 0 0 0 9 12a1.3 1.3 0 0 0-.23-.75l-.01-.12a1.9 1.9 0 0 1 2.98-1.72l.1.07a1.3 1.3 0 0 0 1.5 0l.1-.07a1.9 1.9 0 0 1 2.98 1.72l-.01.12c0 .27.08.53.23.75.2.28.51.48.86.56l.12.03A1.3 1.3 0 0 0 19 12Z"})]})})}const wy=20;function Oy({run:l,runId:u,runEvents:i,onBack:r}){const[f,h]=U.useState(!0),g=U.useRef(null),v=U.useMemo(()=>i.slice(-400),[i]);return U.useEffect(()=>{const p=g.current;!p||!f||(p.scrollTop=p.scrollHeight)},[f,v.length]),U.useEffect(()=>{h(!0)},[u]),o.jsx("section",{className:"card min-w-0 overflow-hidden border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"card-title text-lg",children:"Issue Detail"}),o.jsx("p",{className:"break-all text-xs text-base-content/70",children:l?`${l.repo} #${l.issue}`:`Run ${u}`})]}),o.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[o.jsxs("button",{type:"button",className:`btn btn-sm ${f?"btn-primary":"btn-ghost"}`,onClick:()=>h(p=>!p),children:["Auto-scroll ",f?"on":"off"]}),o.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:r,children:"Back to issues"})]})]}),l?o.jsxs("div",{className:"mt-4 space-y-4",children:[o.jsxs("section",{className:"min-w-0 rounded-box border border-base-300/70 bg-base-100/70 px-3 py-3",children:[o.jsx("p",{className:"break-words text-sm font-semibold text-base-content",children:Ft(zy(l.issueTitle),200)}),o.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-base-content/80",children:[o.jsx("span",{className:"badge badge-sm",children:l.status.replaceAll("_"," ")}),o.jsxs("span",{className:"badge badge-sm",children:["phase ",Ft(l.phase?.trim()||"-",28)]}),o.jsxs("span",{className:"badge badge-sm",children:["iter ",l.iterations]}),o.jsxs("span",{className:"badge badge-sm",children:["$",l.costUsd.toFixed(2)]}),o.jsx("span",{className:"badge badge-sm",children:l.prNumber!==null?`PR #${l.prNumber}`:"no PR"})]}),l.lastError&&o.jsx("p",{className:"mt-2 whitespace-pre-wrap break-words rounded-md border border-error/30 bg-error/10 px-2 py-1 text-xs text-error",children:Ft(l.lastError,2e3)}),o.jsxs("p",{className:"mt-2 text-[11px] text-base-content/65",children:["started ",l.startedAt?Xa(l.startedAt):"-"," · ","ended ",l.endedAt?Xa(l.endedAt):"-"]})]}),l.hasRun?v.length===0?o.jsx("div",{className:"alert border border-base-300/60 bg-base-100/70 text-sm",children:o.jsx("span",{children:"No events yet for this run."})}):o.jsxs("section",{className:"min-w-0 rounded-box border border-base-300/70 bg-base-100/70 px-3 py-3",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[o.jsx("h3",{className:"text-sm font-semibold text-base-content",children:"Event Stream"}),o.jsxs("p",{className:"text-xs text-base-content/65",children:["Showing ",v.length," events",i.length>v.length?` (latest ${v.length})`:""]})]}),o.jsx("div",{ref:g,onScroll:()=>{const p=g.current;if(!p)return;const m=p.scrollHeight-p.scrollTop-p.clientHeight;h(m<=wy)},className:"mt-3 max-h-[70vh] min-w-0 space-y-2 overflow-x-hidden overflow-y-auto pr-1",children:v.map(p=>o.jsxs("div",{className:"min-w-0 rounded-box border border-base-300/70 bg-base-200/70 px-3 py-2",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-base-content/70",children:[o.jsx("span",{children:Xa(p.timestamp)}),o.jsxs("span",{className:"break-all",children:[p.phase," / ",p.role]})]}),o.jsx("p",{className:"mt-1 break-words text-sm font-semibold text-info",children:p.type}),o.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-base-content/85",children:py(p.data)})]},p.id))})]}):o.jsx("div",{className:"alert border border-base-300/60 bg-base-100/70 text-sm",children:o.jsx("span",{children:"This issue is tracked but has no run yet."})})]}):o.jsx("div",{className:"alert mt-4 border border-base-300/60 bg-base-100/70 text-sm",children:o.jsxs("span",{children:['Run "',u,'" is not in the current dashboard snapshot.']})})]})})}function zy(l){const u=l?.trim();return u&&u.length>0?u:"(title unavailable)"}function Ga({label:l,busy:u,onClick:i,submit:r=!1}){return o.jsx(Cn,{type:r?"submit":"button",onClick:i,tone:"info",size:"sm",variant:r?"solid":"outline",fullWidth:!0,className:"justify-between",disabled:u,children:u?"Working...":l})}function Dy({operationsEnabled:l,activeOperation:u,updateStatus:i,repos:r,retryForm:f,rebaseForm:h,continueForm:g,deleteEntryForm:v,labelsInitForm:p,onRetryFormChange:m,onRebaseFormChange:S,onContinueFormChange:y,onDeleteEntryFormChange:x,onLabelsInitFormChange:j,onPoll:_,onSync:E,onCleanup:A,onLabelsInitSubmit:C,onRetrySubmit:X,onRebaseSubmit:Z,onContinueSubmit:J,onDeleteEntrySubmit:I,onUpdate:P}){const Q=u==="update"||i!=null&&i.state!=="idle"&&i.state!=="failed";return o.jsx("div",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"Operations"}),!l&&o.jsx("div",{className:"alert alert-warning mt-1 text-xs",children:o.jsx("span",{children:"Operations are disabled by server policy for this web instance."})}),o.jsxs("fieldset",{disabled:!l,className:`space-y-4 ${l?"":"opacity-60"}`,children:[o.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[o.jsx(Ga,{busy:u==="poll",onClick:_,label:"Trigger Poll"}),o.jsx(Ga,{busy:u==="sync",onClick:E,label:"Run Sync"}),o.jsx(Ga,{busy:u==="cleanup",onClick:A,label:"Run Cleanup"})]}),o.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:C,children:[o.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Labels Init"}),o.jsxs("div",{className:"mt-2 space-y-2",children:[o.jsxs("label",{className:"form-control",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs",children:"Repo"})}),o.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:p.repo,onChange:q=>j({repo:q.target.value}),children:r.map(q=>o.jsx("option",{value:q,children:q},q))})]}),o.jsx(Ga,{busy:u==="labels-init",label:"Bootstrap Labels",submit:!0})]})]}),o.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:X,children:[o.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Retry"}),o.jsxs("div",{className:"mt-2 space-y-2",children:[o.jsxs("label",{className:"form-control",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs",children:"Repo"})}),o.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:f.repo,onChange:q=>m({repo:q.target.value}),children:r.map(q=>o.jsx("option",{value:q,children:q},q))})]}),o.jsxs("label",{className:"form-control",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs",children:"Issue Number"})}),o.jsx("input",{className:"input input-bordered input-sm w-full bg-base-100/90",value:f.issueNumber,onChange:q=>m({issueNumber:q.target.value}),inputMode:"numeric",placeholder:"123"})]}),o.jsxs("label",{className:"label cursor-pointer justify-start gap-2 py-0",children:[o.jsx("input",{type:"checkbox",className:"checkbox checkbox-info checkbox-sm",checked:f.resetPlan,onChange:q=>m({resetPlan:q.target.checked})}),o.jsx("span",{className:"label-text text-xs",children:"Reset saved plan"})]}),o.jsxs("label",{className:"label cursor-pointer justify-start gap-2 py-0",children:[o.jsx("input",{type:"checkbox",className:"checkbox checkbox-info checkbox-sm",checked:f.fresh,onChange:q=>m({fresh:q.target.checked})}),o.jsx("span",{className:"label-text text-xs",children:"Fresh branch reset"})]}),o.jsx(Ga,{busy:u==="retry",label:"Queue Retry",submit:!0})]})]}),o.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:Z,children:[o.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Rebase"}),o.jsxs("div",{className:"mt-2 space-y-2",children:[o.jsxs("label",{className:"form-control",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs",children:"Repo"})}),o.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:h.repo,onChange:q=>S({repo:q.target.value}),children:r.map(q=>o.jsx("option",{value:q,children:q},q))})]}),o.jsxs("label",{className:"form-control",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs",children:"Issue Number"})}),o.jsx("input",{className:"input input-bordered input-sm w-full bg-base-100/90",value:h.issueNumber,onChange:q=>S({issueNumber:q.target.value}),inputMode:"numeric",placeholder:"123"})]}),o.jsx(Ga,{busy:u==="rebase",label:"Queue Rebase",submit:!0})]})]}),o.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:J,children:[o.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Continue"}),o.jsxs("div",{className:"mt-2 space-y-2",children:[o.jsxs("label",{className:"form-control",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs",children:"Repo"})}),o.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:g.repo,onChange:q=>y({repo:q.target.value}),children:r.map(q=>o.jsx("option",{value:q,children:q},q))})]}),o.jsxs("label",{className:"form-control",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs",children:"Issue Number"})}),o.jsx("input",{className:"input input-bordered input-sm w-full bg-base-100/90",value:g.issueNumber,onChange:q=>y({issueNumber:q.target.value}),inputMode:"numeric",placeholder:"123"})]}),o.jsx(Ga,{busy:u==="continue",label:"Queue Continue Pass",submit:!0})]})]}),o.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:I,children:[o.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Delete Entry"}),o.jsxs("div",{className:"mt-2 space-y-2",children:[o.jsxs("label",{className:"form-control",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs",children:"Repo"})}),o.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:v.repo,onChange:q=>x({repo:q.target.value}),children:r.map(q=>o.jsx("option",{value:q,children:q},q))})]}),o.jsxs("label",{className:"form-control",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs",children:"Issue Number"})}),o.jsx("input",{className:"input input-bordered input-sm w-full bg-base-100/90",value:v.issueNumber,onChange:q=>x({issueNumber:q.target.value}),inputMode:"numeric",placeholder:"123"})]}),o.jsxs("label",{className:"label cursor-pointer justify-start gap-2 py-0",children:[o.jsx("input",{type:"checkbox",className:"checkbox checkbox-warning checkbox-sm",checked:v.force,onChange:q=>x({force:q.target.checked})}),o.jsx("span",{className:"label-text text-xs",children:"Force delete if running"})]}),o.jsx(Ga,{busy:u==="delete-entry",label:"Delete Local Entry",submit:!0})]})]})]}),o.jsxs("div",{className:"mt-4 rounded-box border border-base-300/70 bg-base-100/60 p-3",children:[o.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Deploy"}),o.jsxs("div",{className:"mt-2 space-y-2",children:[o.jsx(Ga,{busy:Q,onClick:P,label:i&&i.state!=="idle"&&i.state!=="failed"?`Updating (${i.state})...`:"Pull & Restart"}),i&&i.state==="failed"&&o.jsx("div",{className:"text-xs text-error",children:i.error})]})]})]})})}function Ly(l,u){return l.forge==="forgejo"?{tokenEnv:l.tokenEnv??"FORGEJO_TOKEN (default)",apiBaseUrl:l.apiBaseUrl??"(missing: required for forgejo)",apiMissing:!l.apiBaseUrl}:{tokenEnv:l.tokenEnv??`${u?.githubDefaults.tokenEnv??"GITHUB_TOKEN"} (global github.tokenEnv)`,apiBaseUrl:l.apiBaseUrl??`${u?.githubDefaults.apiBaseUrl??"https://api.github.com"} (global github.apiBaseUrl)`,apiMissing:!1}}function Cr(l,u,i){const r=l.defaults[u],f=l.agents[r],h=f?i[f]:void 0,g=Object.values(i).find(m=>m.type===r),v=h??g;if(!v)return`${r} (no worker profile found)`;const p=f||`type:${v.type}`;return`${r} -> ${p} (${Uy(v)})`}function Uy(l){const u=l.args.map(Pp).join(" ");return u?`${l.command} ${u}`:l.command}function By(l){const u=new Set;for(const i of l.labels.ready)u.add(i);u.add(l.labels.running),u.add(l.labels.blocked),u.add(l.labels.needsHuman),u.add(l.labels.reviewReady),u.add(l.labels.error),u.add(l.labels.retry),u.add(l.labels.planning),u.add(l.labels.mergeQueued),u.add(l.labels.merging),u.add(l.labels.mergeFailed);for(const i of l.selectors.includeLabelsAny)u.add(i);for(const i of l.selectors.excludeLabelsAny)u.add(i);return[...u]}function Hy(l){return l.length===0?"(none)":l.map((u,i)=>`${i+1}:${fi(u)}`).join(" | ")}function fi(l){return typeof l=="string"?l:l.map(Pp).join(" ")}function ky(l){const u=l.environment?.bootstrap??[];return u.length===0?"(none)":u.map(i=>`${i.when}:${fi(i.command)}`).join(" | ")}function qy(l){const u=l.environment?.cleanup??[];return u.length===0?"(none)":u.map(i=>`${i.when}:${fi(i.command)}`).join(" | ")}function Yy(l){const u=l.environment?.shared;if(!u)return"(not configured)";const i=u.healthcheck?fi(u.healthcheck):"(none)";return`requireRunning=${u.requireRunning?"yes":"no"} healthcheck=${i}`}function Gy(l){const u=l.environment?.dedicated;if(!u)return"(not configured)";const i=u.compose.services.length>0?u.compose.services.join(","):"(all)",r=u.healthcheck?fi(u.healthcheck):"(none)";return`compose=${u.compose.file} services=${i} project=${u.compose.projectName} copyFrom=${u.env.copyFrom} overrideKeys=${u.env.overrideKeys.length} overrideFiles=${u.env.overrideFiles.length} healthcheck=${r} teardown=${u.teardownOnComplete?"yes":"no"}`}function Vy(l){const u=Object.entries(l.labelConfig);return u.length===0?"(none)":u.map(([i,r])=>{const f=[];return r.color&&f.push(`color:${r.color}`),r.description&&f.push(`desc:${r.description}`),`${i}[${f.join(",")}]`}).join(" | ")}function Kl(l){return l.length===0?"(none)":l.join(", ")}function Ar(l){return l?"custom":"default"}function Pp(l){return/^[A-Za-z0-9_./:@=-]+$/.test(l)?l:JSON.stringify(l)}function Qy({snapshot:l,repo:u,isLoading:i,onBack:r}){const f=l?.repos.find(g=>g.repo===u)??null,h=f?Ly(f,l):null;return i&&!l?o.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("div",{className:"skeleton h-5 w-44"}),o.jsxs("div",{className:"mt-4 grid gap-3",children:[o.jsx("div",{className:"skeleton h-16 w-full"}),o.jsx("div",{className:"skeleton h-16 w-full"}),o.jsx("div",{className:"skeleton h-16 w-full"})]})]})}):l?o.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"card-title text-lg",children:"Project Details"}),o.jsxs("p",{className:"text-xs text-base-content/60",children:["Updated ",Xa(l.generatedAt)]})]}),o.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:r,children:"Back to projects"})]}),f?o.jsx(Xy,{selectedProject:f,workerProfiles:l.workerProfiles,authDisplay:h}):o.jsx("div",{className:"alert mt-4 border border-base-300/60 bg-base-100/70 text-sm",children:o.jsxs("span",{children:['Repository "',u,'" is not configured.']})})]})}):o.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-6",children:[o.jsx("h2",{className:"card-title text-2xl font-semibold text-base-content",children:"Project Details"}),o.jsx("div",{className:"alert mt-3 border border-base-300/60 bg-base-100/70 text-sm",children:o.jsx("span",{children:"Project configuration is currently unavailable."})}),o.jsx("div",{className:"mt-4",children:o.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:r,children:"Back to projects"})})]})})}function Xy({selectedProject:l,workerProfiles:u,authDisplay:i}){return i?o.jsxs("div",{className:"mt-4 space-y-4",children:[o.jsxs("section",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[o.jsx("h3",{className:"text-sm font-semibold text-base-content",children:l.repo}),o.jsxs("p",{className:"mt-1 text-xs text-base-content/65",children:["path ",Ft(l.localPath,140)]}),o.jsxs("div",{className:"mt-3 grid gap-2 text-xs text-base-content/80 sm:grid-cols-2",children:[o.jsxs("p",{children:["forge ",l.forge]}),o.jsxs("p",{children:["base branch ",l.baseBranch]}),o.jsxs("p",{children:["branch prefix ",l.branchPrefix]}),o.jsxs("p",{children:["workflow ",l.workflow??"default"]}),o.jsxs("p",{children:["max concurrency ",l.maxConcurrentRuns]}),o.jsxs("p",{children:["linked projects ",Kl(l.linkedProjects)]})]})]}),o.jsxs("section",{className:"grid gap-3 lg:grid-cols-2",children:[o.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Auth"}),o.jsxs("p",{className:"mt-2 text-xs text-base-content/85",children:["token ",i.tokenEnv]}),o.jsxs("p",{className:"mt-1 text-xs text-base-content/85",children:["api ",i.apiBaseUrl]}),i.apiMissing&&o.jsx("p",{className:"mt-2 rounded-md border border-warning/40 bg-warning/10 px-2 py-1 text-xs text-warning",children:"apiBaseUrl is required for Forgejo repositories."})]}),o.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Tools"}),o.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[o.jsxs("p",{children:["planner ",Cr(l,"planner",u)]}),o.jsxs("p",{children:["coder ",Cr(l,"coder",u)]}),o.jsxs("p",{children:["reviewer ",Cr(l,"reviewer",u)]}),o.jsxs("p",{children:["mentions ",Kl(l.defaults.prMentions)]})]})]}),o.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Labels"}),o.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[o.jsxs("p",{children:["all tags ",Kl(By(l))]}),o.jsxs("p",{children:["include ",Kl(l.selectors.includeLabelsAny)]}),o.jsxs("p",{children:["exclude ",Kl(l.selectors.excludeLabelsAny)]}),o.jsxs("p",{children:["lanes ready:",Kl(l.labels.ready)," ","running:",l.labels.running," ","review:",l.labels.reviewReady," ","blocked:",l.labels.blocked]}),l.kanban&&o.jsxs("p",{children:["kanban trigger:",l.kanban.triggerLabel," ","blocked:",l.kanban.labels.blocked]})]})]}),o.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Execution"}),o.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[o.jsxs("p",{children:["verify ",Hy(l.verify)]}),o.jsxs("p",{children:["planning PRD dir ",l.planning.prdDirectory]}),o.jsxs("p",{children:["prompts planner:",Ar(l.prompts.plannerSystem)," ","coder:",Ar(l.prompts.coderSystem)," ","reviewer:",Ar(l.prompts.reviewerSystem)]})]})]})]}),o.jsxs("section",{className:"grid gap-3 lg:grid-cols-2",children:[o.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Environment"}),o.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[o.jsxs("p",{children:["mode ",l.environment?.defaultMode??"shared (implicit default)"]}),o.jsxs("p",{children:["bootstrap ",ky(l)]}),o.jsxs("p",{children:["cleanup ",qy(l)]}),o.jsxs("p",{children:["shared ",Yy(l)]}),o.jsxs("p",{children:["dedicated ",Gy(l)]})]})]}),o.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Merge Queue"}),o.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[o.jsxs("p",{children:["merge queue ",l.mergeQueue.enabled?"enabled":"disabled"," ","batch ",l.mergeQueue.batchSize," ","method ",l.mergeQueue.mergeMethod," ","approval ",l.mergeQueue.requireApproval?"required":"optional"," ","retryFlakyOnce ",l.mergeQueue.retryFlakyOnce?"yes":"no"]}),o.jsxs("p",{children:["staging branch ",l.mergeQueue.stagingBranchPrefix]}),o.jsxs("p",{children:["label presentation ",Vy(l)]})]})]})]}),o.jsxs("details",{className:"collapse collapse-arrow rounded-box border border-base-300/70 bg-base-100/65",children:[o.jsx("summary",{className:"collapse-title py-3 text-sm font-semibold text-base-content",children:"Raw Sanitized Config"}),o.jsx("div",{className:"collapse-content pt-0",children:o.jsx("pre",{className:"overflow-x-auto rounded-md border border-base-300/70 bg-base-300/30 p-3 text-[11px] leading-relaxed text-base-content/85",children:JSON.stringify(l,null,2)})})]})]}):o.jsx(o.Fragment,{})}function Zy({snapshot:l,isLoading:u,onOpenRepo:i}){const r=l?.repos??[];return u&&!l?o.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("div",{className:"skeleton h-5 w-36"}),o.jsxs("div",{className:"mt-4 space-y-2",children:[o.jsx("div",{className:"skeleton h-14 w-full"}),o.jsx("div",{className:"skeleton h-14 w-full"}),o.jsx("div",{className:"skeleton h-14 w-full"})]})]})}):l?o.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("h2",{className:"card-title text-lg",children:["Projects (",r.length,")"]}),o.jsxs("span",{className:"text-[11px] text-base-content/60",children:["Updated ",Xa(l.generatedAt)]})]}),r.length===0?o.jsx("div",{className:"alert mt-4 border border-base-300/60 bg-base-100/70 text-sm",children:o.jsx("span",{children:"No repositories are configured."})}):o.jsx("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 2xl:grid-cols-3",children:r.map(f=>o.jsxs("button",{type:"button",onClick:()=>i(f.repo),className:"rounded-box border border-base-300/70 bg-base-100/55 px-3 py-3 text-left transition-colors hover:border-info/45 hover:bg-base-100/80",children:[o.jsx("p",{className:"text-sm font-semibold text-base-content",children:f.repo}),o.jsxs("p",{className:"mt-0.5 text-xs text-base-content/70",children:[f.forge," · ","base ",f.baseBranch]}),o.jsxs("p",{className:"mt-0.5 text-xs text-base-content/55",children:["workflow ",f.workflow??"default"," · ","coder ",f.defaults.coder]}),o.jsx("p",{className:"mt-2 text-[11px] text-info/85",children:"Open project details"})]},f.repo))})]})}):o.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-6",children:[o.jsx("h2",{className:"card-title text-2xl font-semibold text-base-content",children:"Projects"}),o.jsx("div",{className:"alert mt-3 border border-base-300/60 bg-base-100/70 text-sm",children:o.jsx("span",{children:"Project configuration is currently unavailable."})})]})})}const gp={queued:"cyan",plan:"cyan",planner:"cyan",planning:"cyan",code:"yellow",coder:"yellow",review:"magenta",reviewer:"magenta",verify:"green",verification:"green",publish:"green",merge:"green",merged:"green"},Ky={running:"badge-warning",queued:"badge-info",review_ready:"badge-secondary",completed:"badge-success",blocked:"badge-error",error:"badge-error"};function Jy(l){return Iu(Py(l))}function $y(l){return Iu(ex(l))}function Fy(l){return Iu(tx(l))}function Iy(l){return Iu(Wy(l))}function Py(l){const u=ax(l);if(!u)return"gray";const i=gp[u];if(i)return i;const r=u.split(/[\s:_-]+/);for(const f of r){const h=gp[f];if(h)return h}return r.some(f=>f.includes("error")||f.includes("fail")||f.includes("block"))?"red":r.some(f=>f.includes("queue")||f.includes("wait")||f.includes("pending"))?"cyan":r.some(f=>f.includes("review"))?"magenta":r.some(f=>f.includes("plan"))?"cyan":r.some(f=>f.includes("code")||f.includes("implement")||f.includes("fix"))?"yellow":r.some(f=>f.includes("verify")||f.includes("test")||f.includes("check"))||r.some(f=>f.includes("publish")||f.includes("merge")||f.includes("release"))?"green":"white"}function Wy(l){return typeof l=="number"?"cyan":"gray"}function ex(l){const u=l??0;return u<=1?"green":u<=2?"yellow":"red"}function tx(l){const u=l??0;return u<=0?"gray":u<.5?"green":u<2?"yellow":"red"}function ax(l){return l?.trim().toLowerCase()??""}function Iu(l){switch(l){case"red":return"badge-error";case"yellow":return"badge-warning";case"cyan":return"badge-info";case"magenta":return"badge-secondary";case"green":return"badge-success";case"gray":return"badge-neutral";default:return"badge-ghost"}}function nx({isLoading:l,repos:u,selectedRepo:i,onSelectedRepoChange:r,filteredRuns:f,selectedRunId:h,onOpenRun:g,statusTone:v}){return o.jsx("div",{className:"card min-w-0 overflow-hidden border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"card-title text-lg",children:"Runs"}),o.jsx("p",{className:"text-xs text-base-content/70",children:"Live and recent execution history."})]}),o.jsxs("label",{className:"form-control max-w-sm",children:[o.jsx("div",{className:"label py-0 pb-1",children:o.jsx("span",{className:"label-text text-xs uppercase tracking-wide text-base-content/70",children:"Repo Filter"})}),o.jsxs("select",{className:"select select-bordered select-sm w-full bg-base-100/80",value:i,onChange:p=>r(p.target.value),children:[o.jsx("option",{value:"all",children:"All repos"}),u.map(p=>o.jsx("option",{value:p,children:p},p))]})]})]}),l?o.jsxs("div",{className:"mt-4 space-y-2",children:[o.jsx("div",{className:"skeleton h-20 w-full"}),o.jsx("div",{className:"skeleton h-20 w-full"})]}):f.length===0?o.jsx("div",{className:"alert mt-4 border border-base-300/60 bg-base-100/70 text-sm",children:o.jsx("span",{children:"No runs for the current filter."})}):o.jsx("div",{className:"mt-4 grid max-h-[540px] min-w-0 gap-3 overflow-x-hidden overflow-y-auto pr-1",children:f.map(p=>{const m=p.status==="running";return o.jsx("button",{type:"button",onClick:()=>g(p.runId),className:`card w-full min-w-0 overflow-hidden border text-left transition-all ${h===p.runId?"border-primary/65 bg-primary/10 shadow-md":"border-base-300/70 bg-base-100/50 hover:border-primary/40 hover:bg-base-100/80"} ${m?"orch-running-card":""}`,children:o.jsxs("div",{className:"card-body min-w-0 gap-2.5 p-3",children:[o.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("p",{className:"break-all text-xs font-medium uppercase tracking-wide text-base-content/70",children:[p.repo," #",p.issue]}),o.jsx("p",{className:"mt-0.5 break-words text-sm font-semibold text-base-content",children:Ft(lx(p.issueTitle),110)}),o.jsx("p",{className:"mt-0.5 break-all text-xs text-base-content/55",children:p.hasRun?p.runId:"Tracked issue (no run yet)"})]}),o.jsx("span",{className:`badge badge-sm capitalize ${v[p.status]} ${m?"orch-working-pulse":""}`,children:p.status.replaceAll("_"," ")})]}),o.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5 text-xs",children:[o.jsxs("span",{className:`badge badge-xs ${Jy(p.phase)}`,children:["phase ",Ft(sx(p.phase),18)]}),o.jsxs("span",{className:`badge badge-xs ${$y(p.iterations)}`,children:["iter ",p.iterations]}),o.jsxs("span",{className:`badge badge-xs ${Fy(p.costUsd)}`,children:["$",Je(p.costUsd)]}),o.jsx("span",{className:`badge badge-xs ${Iy(p.prNumber)}`,children:p.prNumber!==null?`PR #${p.prNumber}`:"no PR"}),o.jsx("span",{className:"max-w-full text-[11px] text-base-content/65 sm:ml-auto",children:my(p)})]}),p.lastError&&o.jsx("p",{className:"whitespace-pre-wrap break-words rounded-md border border-error/30 bg-error/10 px-2 py-1 text-xs text-error",children:Ft(p.lastError,500)})]})},p.runId)})})]})})}function lx(l){const u=l?.trim();return u&&u.length>0?u:"(title unavailable)"}function sx(l){const u=l?.trim();return u&&u.length>0?u:"-"}const ix="max-w-xl";function ux(l){const u=U.useId(),i=U.useId(),r=ox(l),f=l.widthClassName??ix,h=cx(l.actions),g=l.closeButtonLabel??"Close dialog",v=fx(l),p=l.ariaLabel!==void 0?void 0:l.title?u:void 0,m=U.useCallback(()=>{Wp(r.canRequestClose,l.onClose)},[r.canRequestClose,l.onClose]);return U.useEffect(()=>{if(!l.open||!r.canRequestClose)return;const S=hx();if(S===null)return;const y=x=>{dx(x)&&rx(x,r.canRequestClose,l.onClose)};return S.addEventListener("keydown",y),()=>{S.removeEventListener("keydown",y)}},[l.open,r.canRequestClose,l.onClose]),l.open?o.jsxs("div",{className:"modal modal-open bg-slate-950/78 px-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-labelledby":p,"aria-describedby":l.description?i:void 0,"aria-label":v,children:[o.jsxs("section",{className:`modal-box relative w-full ${f} rounded-box border border-base-300/80 bg-base-100/95 p-5 shadow-2xl`,children:[r.canRequestClose?o.jsx(Cn,{type:"button",tone:"ghost",size:"sm",shape:"circle",className:"absolute right-3 top-3",onClick:m,ariaLabel:g,children:"x"}):null,l.title?o.jsx("h2",{id:u,className:"pr-10 text-lg font-semibold",children:l.title}):null,l.description?o.jsx("p",{id:i,className:"mt-1 text-sm text-base-content/75",children:l.description}):null,l.children,h?o.jsx("footer",{className:"mt-5 flex justify-end gap-2",children:l.actions}):null]}),r.shouldCloseOnBackdropClick?o.jsx("button",{type:"button",className:"modal-backdrop","aria-label":g,onClick:m,children:"close"}):o.jsx("div",{className:"modal-backdrop cursor-default","aria-hidden":"true"})]}):null}function cx(l){return l!=null&&typeof l!="boolean"}function ox(l){const u=typeof l.onClose=="function"&&!l.blocking,i=u&&(l.closeOnBackdropClick??!0);return{canRequestClose:u,shouldCloseOnBackdropClick:i}}function Wp(l,u){return!l||u===void 0?!1:(u(),!0)}function rx(l,u,i){return!u||l.key!=="Escape"?!1:(l.preventDefault(),Wp(u,i))}function fx(l){if(l.ariaLabel!==void 0)return l.ariaLabel;if(l.title===void 0)return"Modal dialog"}function dx(l){if(typeof l!="object"||l===null)return!1;const u=l;return typeof u.key=="string"&&typeof u.preventDefault=="function"}function hx(){const l=globalThis;return typeof l.addEventListener!="function"||typeof l.removeEventListener!="function"?null:l}function mx({settings:l,generatedAt:u,isLoading:i,activeOperation:r,drafts:f,onDraftChange:h,onApply:g,onClear:v}){const[p,m]=U.useState(null),[S,y]=U.useState({}),x=U.useMemo(()=>l.find(A=>A.key===p)??null,[p,l]),j=x?f[x.key]??Jl(x.effectiveValue):"",_=x?S[x.key]??x.overrideValue!==null:!1,E=x?px(r,x.key):!1;return U.useEffect(()=>{y(Object.fromEntries(l.map(A=>[A.key,A.overrideValue!==null]))),p&&!l.some(A=>A.key===p)&&m(null)},[p,l]),o.jsxs("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:[o.jsxs("div",{className:"card-body p-5 sm:p-8",children:[o.jsx("h2",{className:"card-title text-2xl font-semibold capitalize text-base-content",children:"settings"}),o.jsx("p",{className:"max-w-3xl text-sm text-base-content/75",children:"Runtime overrides are stored in SQLite and applied on top of YAML/default values."}),o.jsxs("p",{className:"text-xs text-base-content/60",children:["Last refresh: ",u??"-"]}),i?o.jsx("p",{className:"text-sm text-base-content/70",children:"Loading settings…"}):l.length===0?o.jsx("p",{className:"text-sm text-base-content/70",children:"No curated settings available."}):o.jsx("ul",{className:"mt-2 grid gap-3",children:l.map(A=>o.jsx("li",{children:o.jsx("button",{type:"button",className:"group w-full rounded-box border border-base-300/80 bg-base-100/60 p-4 text-left transition hover:border-info/40 hover:bg-base-100/85 focus:outline-none focus-visible:ring-2 focus-visible:ring-info/70",onClick:()=>{m(A.key)},children:o.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx("span",{className:"font-semibold text-base-content",children:A.label}),o.jsx("span",{className:`badge badge-xs ${A.source==="override"?"badge-info":"badge-ghost"}`,children:A.source==="override"?"overwritten":"default/yaml"})]}),o.jsx("p",{className:"mt-1 break-all font-mono text-[11px] text-base-content/55",children:A.key}),o.jsx("p",{className:"mt-2 text-sm text-base-content/75",children:A.description})]}),o.jsxs("div",{className:"shrink-0 rounded-lg border border-base-300/80 bg-base-100/60 px-3 py-2 sm:min-w-[150px] sm:text-right",children:[o.jsx("p",{className:"text-[11px] uppercase tracking-wide text-base-content/55",children:"Applied"}),o.jsx("p",{className:"mt-1 font-mono text-sm font-semibold text-base-content",children:Jl(A.effectiveValue)})]})]})})},A.key))})]}),o.jsx(ux,{open:x!==null,title:x?.label,description:x?.details,widthClassName:"max-w-2xl",onClose:()=>{m(null)},actions:x?o.jsxs(o.Fragment,{children:[o.jsx(Cn,{type:"button",tone:"ghost",onClick:()=>{m(null)},children:"close"}),o.jsx(Cn,{type:"button",tone:_?"info":"neutral",onClick:()=>{if(x){if(_){g(x.key);return}v(x.key)}},disabled:E,children:E?"saving...":_?"apply override":"clear override"})]}):null,children:x?o.jsxs("div",{className:"mt-4 space-y-4",children:[o.jsxs("dl",{className:"grid gap-2 rounded-box border border-base-300/70 bg-base-200/50 p-3 text-sm sm:grid-cols-2",children:[o.jsx(zu,{label:"Night-orch default",value:Jl(x.defaultValue)}),o.jsx(zu,{label:"YAML value",value:x.hasYamlValue&&x.yamlValue!==null?Jl(x.yamlValue):"Not set"}),o.jsx(zu,{label:"Effective value",value:Jl(x.effectiveValue)}),o.jsx(zu,{label:"Current override",value:x.overrideValue===null?"None":Jl(x.overrideValue)})]}),o.jsxs("label",{className:"flex items-center gap-3 rounded-box border border-base-300/70 bg-base-200/45 p-3",children:[o.jsx("input",{type:"checkbox",className:"checkbox checkbox-sm checkbox-info",checked:_,disabled:E,onChange:A=>{y(C=>({...C,[x.key]:A.target.checked}))}}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-base-content",children:"Overwrite this value"}),o.jsx("p",{className:"text-xs text-base-content/65",children:"Disable to use YAML/default value. Enable to set a DB runtime override."})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-base-content/60",children:"Override value"}),x.type==="boolean"?o.jsxs("select",{className:"select select-bordered w-full max-w-xs font-mono",value:bx(j),onChange:A=>{h(x.key,A.target.value)},disabled:!_||E,children:[o.jsx("option",{value:"true",children:"true"}),o.jsx("option",{value:"false",children:"false"})]}):o.jsx("input",{className:"input input-bordered w-full max-w-xs font-mono",type:"number",value:j,min:x.min,max:x.max,step:x.step,onChange:A=>{h(x.key,A.target.value)},disabled:!_||E})]})]}):null})]})}function zu({label:l,value:u}){return o.jsxs("div",{children:[o.jsx("dt",{className:"text-[11px] uppercase tracking-wide text-base-content/55",children:l}),o.jsx("dd",{className:"mt-1 font-mono text-sm text-base-content",children:u})]})}function px(l,u){return l===`setting:set:${u}`||l===`setting:clear:${u}`}function Jl(l){return typeof l=="boolean"?l?"true":"false":String(l)}function bx(l){return l.trim().toLowerCase()==="false"?"false":"true"}function gx({snapshot:l,socketConnected:u}){if(!l)return o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsx(Br,{snapshot:l}),o.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-6",children:[o.jsx("h2",{className:"card-title text-lg",children:"Stats"}),o.jsx("p",{className:"text-sm text-base-content/75",children:"Stats snapshot is loading."}),o.jsxs("div",{className:"mt-2 space-y-2",children:[o.jsx("div",{className:"skeleton h-16 w-full"}),o.jsx("div",{className:"skeleton h-16 w-full"}),o.jsx("div",{className:"skeleton h-16 w-full"})]})]})})]});const{stats:i}=l,r=yp(i.throughput.successRate7d,80,60),f=$l(i.reliability.failureRate7d,10,25),h=Va(i.overview.blockedRuns,1,2),g=Va(i.overview.errorRuns,1,2),v=Va(i.throughput.blocked7d,1,2),p=Va(i.throughput.error7d,1,2),m=xp(i.cost.todayCostUsd,i.cost.avgDailyCost7d,1.05,1.35),S=xp(i.usage.todayTotalTokens,i.usage.avgDailyTokens7d,1.05,1.35),y=$l(i.efficiency.avgCostPerRun7d,1.5,3),x=$l(i.efficiency.avgCostPerSuccess7d,3,6),j=$l(i.efficiency.avgTokensPerRun7d,8e3,16e3),_=$l(i.efficiency.avgTokensPerSuccess7d,16e3,32e3),E=Va(i.resources.expiringLeases,1,3),A=Va(i.resources.expiredLeases,1,2),C=Va(i.resources.missingWorktrees,1,2),X=Va(i.resources.staleWorktrees,1,2),Z=i.cost.model==="subscription",J=i.timing.sampleSize30d>0&&i.timing.p50Minutes>0,I=J?i.timing.p90Minutes/i.timing.p50Minutes:0,P=$l(I,2.5,4.5),Q=Sp(i.cost.dailyHistory.slice().reverse().map(B=>B.totalCostUsd)),q=Sp(i.usage.dailyHistory.slice().reverse().map(B=>B.totalTokens));return o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsx(Br,{snapshot:l}),o.jsxs("section",{className:"grid gap-5 xl:grid-cols-2",children:[o.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"System Signals"}),o.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[o.jsx(ne,{label:"Stats Updated",value:Xa(i.updatedAt)}),o.jsx(ne,{label:"Dashboard Generated",value:Xa(l.generatedAt)}),o.jsx(ne,{label:"Poll Interval",value:`${l.config.pollIntervalSeconds}s`}),o.jsx(ne,{label:"Tracked Repositories",value:l.config.repos.length}),o.jsx(ne,{label:"Websocket",value:u?"Connected":"Reconnecting"})]})]})}),o.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"Run Health"}),o.jsxs("div",{className:"mt-2 grid gap-3 sm:grid-cols-2",children:[o.jsx(Tn,{label:"Total Runs",value:i.overview.totalRuns}),o.jsx(Tn,{label:"Active Runs",value:i.overview.activeRuns}),o.jsx(Tn,{label:"Running Runs",value:i.overview.runningRuns}),o.jsx(Tn,{label:"Queued Runs",value:i.overview.queuedRuns}),o.jsx(Tn,{label:"Review Ready",value:i.overview.reviewReadyRuns}),o.jsx(Tn,{label:"Completed Runs",value:i.overview.completedRuns}),o.jsx(Tn,{label:"Blocked Runs",value:i.overview.blockedRuns,toneClass:Qe(h)}),o.jsx(Tn,{label:"Error Runs",value:i.overview.errorRuns,toneClass:Qe(g)})]}),o.jsxs("p",{className:"mt-3 text-xs text-base-content/65",children:["Status mix ",vp(i.statusCounts)]})]})})]}),o.jsxs("section",{className:"grid gap-5 xl:grid-cols-2",children:[o.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"Throughput"}),o.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[o.jsx(ne,{label:"Runs (24h / 7d / 30d)",value:`${i.throughput.runs24h} / ${i.throughput.runs7d} / ${i.throughput.runs30d}`}),o.jsx(ne,{label:"Completed (7d)",value:i.throughput.completed7d}),o.jsx(ne,{label:"Blocked (7d)",value:i.throughput.blocked7d,valueClassName:Qe(v)}),o.jsx(ne,{label:"Errors (7d)",value:i.throughput.error7d,valueClassName:Qe(p)}),o.jsx(ne,{label:"Success Rate (7d)",value:`${i.throughput.successRate7d.toFixed(1)}%`,valueClassName:Qe(r)}),o.jsx(ne,{label:"Failure Rate (7d)",value:`${i.reliability.failureRate7d.toFixed(1)}%`,valueClassName:Qe(f)}),o.jsx(ne,{label:"Average Duration (7d)",value:ai(i.throughput.avgDurationMinutes7d)}),o.jsx(ne,{label:"Average Iterations (7d)",value:i.throughput.avgIterations7d.toFixed(2)}),o.jsx(ne,{label:"Latency (p50 / p90 / p99)",value:`${ai(i.timing.p50Minutes)} / ${ai(i.timing.p90Minutes)} / ${ai(i.timing.p99Minutes)}`}),o.jsx(ne,{label:"Tail Ratio (p90 / p50)",value:J?`${I.toFixed(2)}x`:"-",valueClassName:Qe(P)}),o.jsx(ne,{label:"Timing Sample Size (30d)",value:i.timing.sampleSize30d})]})]})}),o.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"Cost & Usage"}),Z?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[o.jsx(ne,{label:"Cost Model",value:"subscription"}),o.jsx(ne,{label:"Today Tokens",value:`${pa(i.usage.todayTotalTokens)} (${i.cost.todayRunCount} runs)`,valueClassName:Qe(S)}),o.jsx(ne,{label:"Tokens (7d)",value:pa(i.usage.tokens7d)}),o.jsx(ne,{label:"Tokens (30d)",value:pa(i.usage.tokens30d)}),o.jsx(ne,{label:"Average Daily Tokens (7d)",value:pa(i.usage.avgDailyTokens7d)}),o.jsx(ne,{label:"Tokens Per Run (7d)",value:pa(i.efficiency.avgTokensPerRun7d),valueClassName:Qe(j)}),o.jsx(ne,{label:"Tokens Per Success (7d)",value:pa(i.efficiency.avgTokensPerSuccess7d),valueClassName:Qe(_)}),o.jsx(ne,{label:"Tokens Per Iteration (7d)",value:pa(i.efficiency.avgTokensPerIteration7d)}),o.jsx(ne,{label:"Est. Cost Today",value:`$${Je(i.cost.todayCostUsd)}`,valueClassName:Qe(m)}),o.jsx(ne,{label:"Est. Cost (7d)",value:`$${Je(i.cost.cost7d)}`}),o.jsx(ne,{label:"Usage Trend (7d)",value:q})]}),o.jsxs("div",{className:"mt-3 space-y-1",children:[i.usage.dailyHistory.length===0&&o.jsx("p",{className:"text-xs text-base-content/60",children:"No daily usage rows in the last 7 days."}),i.usage.dailyHistory.map(B=>o.jsxs("p",{className:"text-xs text-base-content/70",children:[B.date," ",pa(B.totalTokens)," (",B.runCount,")"]},B.date))]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[o.jsx(ne,{label:"Cost Model",value:"pay-per-use"}),o.jsx(ne,{label:"Today",value:`$${Je(i.cost.todayCostUsd)} (${i.cost.todayRunCount} runs)`,valueClassName:Qe(m)}),o.jsx(ne,{label:"Cost (7d)",value:`$${Je(i.cost.cost7d)}`}),o.jsx(ne,{label:"Cost (30d)",value:`$${Je(i.cost.cost30d)}`}),o.jsx(ne,{label:"Average Daily Cost (7d)",value:`$${Je(i.cost.avgDailyCost7d)}`}),o.jsx(ne,{label:"Total Cost (7d)",value:`$${Je(i.efficiency.totalCostUsd7d)}`}),o.jsx(ne,{label:"Cost Per Run (7d)",value:`$${Je(i.efficiency.avgCostPerRun7d)}`,valueClassName:Qe(y)}),o.jsx(ne,{label:"Cost Per Success (7d)",value:`$${Je(i.efficiency.avgCostPerSuccess7d)}`,valueClassName:Qe(x)}),o.jsx(ne,{label:"Cost Per Iteration (7d)",value:`$${Je(i.efficiency.avgCostPerIteration7d)}`}),o.jsx(ne,{label:"Completed Per Dollar (7d)",value:i.efficiency.completedPerDollar7d.toFixed(2)}),o.jsx(ne,{label:"Today Tokens",value:pa(i.usage.todayTotalTokens),valueClassName:Qe(S)}),o.jsx(ne,{label:"Tokens (7d)",value:pa(i.usage.tokens7d)}),o.jsx(ne,{label:"Cost Trend (7d)",value:Q})]}),o.jsxs("div",{className:"mt-3 space-y-1",children:[i.cost.dailyHistory.length===0&&o.jsx("p",{className:"text-xs text-base-content/60",children:"No daily cost rows in the last 7 days."}),i.cost.dailyHistory.map(B=>o.jsxs("p",{className:"text-xs text-base-content/70",children:[B.date," $",Je(B.totalCostUsd)," (",B.runCount,")"]},B.date))]})]})]})})]}),o.jsxs("section",{className:"grid gap-5 xl:grid-cols-2",children:[o.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"Agent Activity"}),o.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[o.jsx(ne,{label:"Events Total",value:i.agents.eventsTotal}),o.jsx(ne,{label:"Events (24h)",value:i.agents.events24h}),o.jsx(ne,{label:"Events (7d)",value:i.agents.events7d}),o.jsx(ne,{label:"Tool Calls (24h)",value:i.agents.toolCalls24h}),o.jsx(ne,{label:"Thinking Events (24h)",value:i.agents.thinking24h}),o.jsx(ne,{label:"Unique Runs (7d)",value:i.agents.uniqueRuns7d})]}),o.jsxs("div",{className:"mt-3 space-y-1",children:[o.jsx("p",{className:"text-xs uppercase tracking-wide text-base-content/60",children:"Role breakdown (7d)"}),i.agents.roleBreakdown7d.length===0&&o.jsx("p",{className:"text-xs text-base-content/60",children:"No agent activity in the last 7 days."}),i.agents.roleBreakdown7d.map(B=>o.jsxs("p",{className:"text-xs text-base-content/80",children:[B.role,": ",B.events," events, ",B.toolCalls," tool calls"]},B.role))]})]})}),o.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"Reliability"}),o.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[o.jsx(ne,{label:"Failures (7d)",value:i.reliability.failureCount7d,valueClassName:Qe(f)}),o.jsx(ne,{label:"Failure Rate (7d)",value:`${i.reliability.failureRate7d.toFixed(1)}%`,valueClassName:Qe(f)}),o.jsx(ne,{label:"Median Duration",value:ai(i.timing.p50Minutes)}),o.jsx(ne,{label:"Tail Latency (p90 / p50)",value:J?`${I.toFixed(2)}x`:"-",valueClassName:Qe(P)})]}),o.jsxs("div",{className:"mt-3 space-y-1",children:[o.jsx("p",{className:"text-xs uppercase tracking-wide text-base-content/60",children:"Top error patterns (7d)"}),i.reliability.topErrorPatterns7d.length===0&&o.jsx("p",{className:"text-xs text-base-content/60",children:"None in the last 7 days."}),i.reliability.topErrorPatterns7d.map(B=>o.jsxs("p",{className:"text-xs text-base-content/80",children:[o.jsxs("span",{className:Qe(Va(B.count,2,4)),children:[B.count,"x"]})," ",Ft(B.pattern,120)]},`${B.pattern}-${B.count}`))]})]})})]}),o.jsxs("section",{className:"grid gap-5 xl:grid-cols-2",children:[o.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"Resources"}),o.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[o.jsx(ne,{label:"Active Leases",value:i.resources.activeLeases}),o.jsx(ne,{label:"Leased Repositories",value:i.resources.leasedRepos}),o.jsx(ne,{label:"Expiring Leases",value:i.resources.expiringLeases,valueClassName:Qe(E)}),o.jsx(ne,{label:"Expired Leases",value:i.resources.expiredLeases,valueClassName:Qe(A)}),o.jsx(ne,{label:"Active Worktrees",value:i.resources.activeWorktrees}),o.jsx(ne,{label:"Missing Worktrees",value:i.resources.missingWorktrees,valueClassName:Qe(C)}),o.jsx(ne,{label:"Stale Completed Worktrees",value:i.resources.staleWorktrees,valueClassName:Qe(X)})]})]})}),o.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"Merge Queue"}),o.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[o.jsx(ne,{label:"Active Batches",value:i.queue.activeBatches}),o.jsx(ne,{label:"Batch Statuses",value:vp(i.queue.statuses)}),o.jsx(ne,{label:"Active Phases",value:i.phaseCounts.length>0?i.phaseCounts.map(B=>`${B.phase}:${B.count}`).join(" | "):"-"})]})]})})]}),o.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:o.jsxs("div",{className:"card-body p-4 sm:p-5",children:[o.jsx("h2",{className:"card-title text-lg",children:"Top Repositories (30d)"}),i.topRepos30d.length===0?o.jsx("p",{className:"mt-2 text-sm text-base-content/70",children:"No repository run history in the last 30 days."}):o.jsx("div",{className:"mt-3 grid gap-2",children:i.topRepos30d.map(B=>{const se=B.completedRuns+B.blockedRuns+B.errorRuns,ee=se>0?B.completedRuns/se*100:0,ce=Qe(yp(ee,80,60));return o.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/70 px-3 py-2 text-sm",children:[o.jsx("p",{className:"font-semibold text-base-content",children:Ft(B.repo,96)}),o.jsxs("p",{className:"mt-1 text-xs text-base-content/80",children:["runs ",B.totalRuns," | completed ",B.completedRuns," | blocked ",B.blockedRuns," | error ",B.errorRuns]}),o.jsxs("p",{className:"mt-1 text-xs text-base-content/80",children:["success ",o.jsxs("span",{className:ce,children:[ee.toFixed(0),"%"]})," | ","cost $",Je(B.totalCostUsd)," | ","avg iterations ",B.avgIterations.toFixed(1)]})]},B.repo)})})]})})]})}function Tn({label:l,value:u,toneClass:i}){return o.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/70 px-3 py-2",children:[o.jsx("p",{className:"text-xs uppercase tracking-wide text-base-content/60",children:l}),o.jsx("p",{className:`mt-1 text-2xl font-semibold ${i??"text-base-content"}`,children:u})]})}function ne({label:l,value:u,valueClassName:i}){return o.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-box border border-base-300/70 bg-base-100/70 px-3 py-2",children:[o.jsx("span",{className:"text-base-content/70",children:l}),o.jsx("span",{className:`text-right font-medium ${i??"text-base-content"}`,children:u})]})}function vp(l){return l.length===0?"-":l.map(u=>`${u.status}:${u.count}`).join(" | ")}function ai(l){if(l<=0)return"-";if(l<1)return`${Math.round(l*60)}s`;if(l<60)return`${l.toFixed(1)}m`;const u=Math.floor(l/60),i=Math.round(l%60);return`${u}h${String(i).padStart(2,"0")}m`}function pa(l){return!Number.isFinite(l)||l<=0?"0":l>=1e9?`${(l/1e9).toFixed(2)}B`:l>=1e6?`${(l/1e6).toFixed(2)}M`:l>=1e3?`${(l/1e3).toFixed(1)}k`:String(Math.round(l))}function yp(l,u,i){return l>=u?"success":l>=i?"warning":"error"}function $l(l,u,i){return l<=u?"success":l<=i?"warning":"error"}function Va(l,u=1,i=3){return l<u?"success":l<i?"warning":"error"}function xp(l,u,i,r){if(u<=0)return l<=0?"success":"warning";const f=l/u;return f<=i?"success":f<=r?"warning":"error"}function Qe(l){switch(l){case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return"text-base-content"}}function Sp(l){if(l.length===0)return"-";const u=Math.max(...l,0);if(u<=0)return".".repeat(l.length);const i=".:-=+*#%@";return l.map(r=>{const f=Math.max(0,Math.min(1,r/u)),h=Math.round(f*(i.length-1));return i[h]??"."}).join("")}const Hr=[{id:"draining",label:"Draining running services"},{id:"pulling",label:"Pulling latest code"},{id:"building",label:"Installing and building"},{id:"restarting",label:"Restarting supervisor children"},{id:"health-checking",label:"Running health checks"}];function vx(l){return l.replace(/-/g," ").replace(/\b\w/g,u=>u.toUpperCase())}function yx(l,u){const i=Hr.findIndex(f=>f.id===u);if(i<0)return"pending";const r=Hr.findIndex(f=>f.id===l);return r<i?"done":r===i?"active":"pending"}function xx({status:l,serverUnreachable:u=!1}){return o.jsx("div",{"data-theme":"black",style:{position:"fixed",inset:0,zIndex:9999,display:"grid",placeItems:"center",backgroundColor:"rgba(0, 0, 0, 0.78)",backdropFilter:"blur(4px)",padding:"1rem"},role:"dialog","aria-modal":"true","aria-label":"Self update in progress",children:o.jsxs("section",{className:"w-full max-w-xl rounded-box border border-base-300/80 bg-base-100/95 p-5 shadow-2xl",children:[o.jsx("h2",{className:"text-lg font-semibold",children:"Applying self-update"}),o.jsxs("p",{className:"mt-1 text-sm text-base-content/75",children:["Current stage: ",vx(l.state)]}),o.jsxs("div",{className:"mt-3 flex items-center gap-3 text-sm text-base-content/80",children:[o.jsx("span",{className:"loading loading-spinner loading-md text-info"}),o.jsx("span",{children:"Update workflow is running and cannot be interrupted."})]}),o.jsx("ul",{className:"mt-4 space-y-2",children:Hr.map(i=>{const r=yx(i.id,l.state),f=r==="active"?"badge-info":r==="done"?"badge-success":"badge-ghost",h=r==="active"?"live":r==="done"?"done":"pending";return o.jsxs("li",{className:"flex items-center justify-between gap-3 text-sm",children:[o.jsx("span",{className:r==="pending"?"text-base-content/65":void 0,children:i.label}),o.jsx("span",{className:`badge badge-sm ${f}`,children:h})]},i.id)})}),u&&o.jsx("div",{className:"mt-4 rounded border border-info/35 bg-info/10 p-2 text-xs text-info-content",children:"Server is restarting — status will refresh automatically when it comes back."}),l.state==="rolling-back"&&o.jsx("div",{className:"mt-4 rounded border border-warning/35 bg-warning/10 p-2 text-xs text-warning-content",children:"Health checks failed. Rolling back to the previous known-good build."}),o.jsx("p",{className:"mt-4 text-xs text-base-content/70",children:"Dashboard controls are temporarily blocked. This page refreshes automatically after a healthy restart."})]})})}function Sx(l){return Kp.createPortal(o.jsx(xx,{...l}),document.body)}function jx(l){if(!l||typeof l!="object")return null;const u=l.runId,i=l.events,r=l.lastEventId;return typeof u!="string"||!Array.isArray(i)||typeof r!="number"?null:{runId:u,events:i.filter(f=>!f||typeof f!="object"?!1:typeof f.id=="number"),lastEventId:r}}function Nx(l,u){const i=new Set(l.map(f=>f.id)),r=[...l];for(const f of u)i.has(f.id)||(i.add(f.id),r.push(f));return r.sort((f,h)=>f.id-h.id),r}const Rx="Start self-update now? This pulls latest code, rebuilds, and restarts Night-Orch services.";function Tx(l){return l(Rx)}const _x=6e3;function Mx(l){return{startedAtMs:l,sawActiveState:!1}}function Vu(){return{startedAtMs:null,sawActiveState:!1}}function Qu(l){return l!=null&&l.state!=="idle"&&l.state!=="failed"}function Ex(l){return Qu(l)?l:null}function Cx(l,u,i){return l.startedAtMs==null||l.sawActiveState?!0:u-l.startedAtMs>=i}function Ax(l,u,i,r){return Qu(l)?{nextTransition:{startedAtMs:u.startedAtMs,sawActiveState:!0},nextStatus:l,errorMessage:null,shouldReload:!1}:Cx(u,i,r)?l.state==="failed"?{nextTransition:Vu(),nextStatus:l,errorMessage:`Update failed: ${l.error??"unknown error"}`,shouldReload:!1}:{nextTransition:Vu(),nextStatus:l,errorMessage:null,shouldReload:l.state==="idle"}:{nextTransition:u,nextStatus:null,errorMessage:null,shouldReload:!1}}async function wx(l){const u=await l.fetchUpdateStatus();if(!u)return l.transition;const i=Ax(u,l.transition,l.nowMs?l.nowMs():Date.now(),l.graceMs??_x);return i.nextStatus&&l.onStatus(i.nextStatus),i.errorMessage&&l.onError(i.errorMessage),i.shouldReload&&l.onReload(),i.nextTransition}const Ox="x-night-orch-intent",zx="mutate",Dx="x-night-orch-web-token",Lx="0.3.1",Ux="6971b15cdb33f0a04b032003450add52f6aba219";function jp(l){if(!l)return null;try{return decodeURIComponent(l)}catch{return l}}function Hu({activePage:l,issueDetailRunId:u=null,projectDetailRepo:i=null}){const r=Zr(),[f,h]=U.useState(null),[g,v]=U.useState(null),[p,m]=U.useState(null),[S,y]=U.useState(!0),[x,j]=U.useState(!0),[_,E]=U.useState(!0),[A,C]=U.useState(!1),[X,Z]=U.useState("all"),[J,I]=U.useState(""),[P,Q]=U.useState([]),[q,B]=U.useState(null),[se,ee]=U.useState(null),[ce,be]=U.useState(null),[Ye,Ee]=U.useState(!1),[H,$]=U.useState(null),[le,Te]=U.useState(!0),[ye,R]=U.useState({}),[Y,F]=U.useState(""),[K,oe]=U.useState({repo:"",issueNumber:"",amount:""}),[re,pe]=U.useState(""),[He,Ue]=U.useState(""),[St,Pt]=U.useState(!1),[la,On]=U.useState(!1),[gt,sa]=U.useState(""),[ia,ua]=U.useState(""),[Ht,vt]=U.useState(""),[ga,Za]=U.useState(""),[va,Ka]=U.useState(""),[fe,Pe]=U.useState(""),[jt,rl]=U.useState(""),[Ja,Wu]=U.useState(!1),[ya,zn]=U.useState(null),ca=U.useRef(null),xa=U.useRef(null),ot=U.useRef(""),kt=U.useRef(""),$e=U.useRef(Vu()),lt=f?.config.repos??[],Dn=f?.runs.runs??[],fl=f?.stats.overview.runningRuns??0,$a=f?.stats.overview.queuedRuns??0,Wt=Qu(ya),dl=U.useMemo(()=>X==="all"?Dn:Dn.filter(w=>w.repo===X),[Dn,X]),pt=U.useMemo(()=>jp(u),[u]),Ln=U.useMemo(()=>jp(i),[i]),Sa=U.useMemo(()=>pt?Dn.find(w=>w.runId===pt)??null:null,[Dn,pt]),ja=Sa?.hasRun?Sa.runId:"",ts=U.useMemo(()=>Wt?{label:`updating ${ya?.state??"starting"}`,toneClass:"badge-warning"}:A?fl>0?{label:"processing",toneClass:"badge-success"}:$a>0?{label:"queued",toneClass:"badge-info"}:{label:"idle",toneClass:"badge-neutral"}:{label:"reconnecting",toneClass:"badge-error"},[$a,fl,A,Wt,ya?.state]),oa=U.useCallback(async()=>{const w=await fetch("/api/dashboard");if(!w.ok)throw new Error(`Failed to load dashboard (${w.status})`);const W=await w.json();h(W)},[]),qt=U.useCallback(async()=>{const w=await fetch("/api/update-status");return w.ok?await w.json():null},[]),di=U.useCallback(async()=>{const w=await fetch("/api/session");if(!w.ok)throw new Error(`Failed to initialize web session (${w.status})`);const W=await w.json();if(!W.mutationToken)throw new Error("Missing mutation token in session response");$(W.mutationToken),Te(W.operationsEnabled??!0)},[]),Un=U.useCallback(async()=>{const w=await fetch("/api/projects");if(!w.ok)throw new Error(`Failed to load projects (${w.status})`);const W=await w.json();v(W)},[]),Na=U.useCallback(async()=>{const w=await fetch("/api/settings");if(!w.ok)throw new Error(`Failed to load settings (${w.status})`);const W=await w.json();m(W),R(Object.fromEntries(W.settings.map(Ge=>[Ge.key,String(Ge.effectiveValue)])))},[]);U.useEffect(()=>{(async()=>{try{y(!0),j(!0),E(!0),await Promise.all([oa(),di(),Un(),Na()])}catch(w){B(w.message)}finally{y(!1),j(!1),E(!1)}})()},[oa,Un,di,Na]),U.useEffect(()=>{let w=!1;return(async()=>{try{const W=await qt();if(!W||w)return;Qu(W)?$e.current={startedAtMs:null,sawActiveState:!0}:$e.current=Vu(),zn(W)}catch{}})(),()=>{w=!0}},[qt]),U.useEffect(()=>{if(lt.length===0){pe(""),sa(""),vt(""),Ka(""),Pe("");return}pe(w=>w&&lt.includes(w)?w:lt[0]??""),sa(w=>w&&lt.includes(w)?w:lt[0]??""),vt(w=>w&&lt.includes(w)?w:lt[0]??""),Ka(w=>w&&lt.includes(w)?w:lt[0]??""),Pe(w=>w&&lt.includes(w)?w:lt[0]??""),Z(w=>w==="all"||lt.includes(w)?w:"all")},[lt]),U.useEffect(()=>{pt&&I(pt)},[pt]),U.useEffect(()=>{let w=!1;const W=()=>{const Ge=window.location.protocol==="https:"?"wss":"ws",ut=new WebSocket(`${Ge}://${window.location.host}/ws`);ca.current=ut,ut.onopen=()=>{if(w)return;C(!0),ut.send(JSON.stringify({type:"refresh"}));const Oe=ot.current;Oe&&ut.send(JSON.stringify({type:"subscribe-run-events",runId:Oe,since:0}))},ut.onmessage=Oe=>{try{const xe=JSON.parse(Oe.data);if(xe.type==="snapshot"&&xe.payload){h(xe.payload);return}if(xe.type==="run-events"&&xe.payload){const ra=jx(xe.payload);if(!ra||ra.runId!==ot.current)return;Q(ss=>Nx(ss,ra.events));return}xe.type==="error"&&xe.error&&ee(xe.error)}catch{}},ut.onclose=()=>{ca.current===ut&&(ca.current=null),C(!1),!w&&(xa.current=window.setTimeout(W,2e3))},ut.onerror=()=>{ut.close()}};return W(),()=>{w=!0,xa.current!==null&&window.clearTimeout(xa.current),ca.current?.close(),ca.current=null}},[]),U.useEffect(()=>{ot.current=ja,Q([]);const w=ca.current;if(!w||w.readyState!==WebSocket.OPEN){kt.current=ja;return}const W=kt.current;W&&W!==ja&&w.send(JSON.stringify({type:"unsubscribe-run-events",runId:W})),ja&&w.send(JSON.stringify({type:"subscribe-run-events",runId:ja,since:0})),kt.current=ja},[ja,A]);const[hi,Bn]=U.useState(!1);U.useEffect(()=>{if(!Wt)return;let w=!1,W=0;const Ge=async()=>{try{const Oe=await wx({fetchUpdateStatus:qt,transition:$e.current,onStatus:xe=>{w||(W=0,Bn(!1),zn(xe))},onError:xe=>{w||(W=0,Bn(!1),B(xe))},onReload:()=>{w||window.location.reload()}});w||($e.current=Oe)}catch{W++,!w&&W>=2&&(Bn(!0),zn(Oe=>{if(!Oe)return Oe;const xe=W*2;return xe>=12&&Oe.state==="draining"?{...Oe,state:"restarting"}:xe>=8&&Oe.state==="draining"?{...Oe,state:"building"}:xe>=4&&Oe.state==="draining"?{...Oe,state:"pulling"}:Oe}))}};Ge();const ut=window.setInterval(()=>{Ge()},2e3);return()=>{w=!0,window.clearInterval(ut)}},[qt,Wt]);const Re=U.useCallback(async(w,W,Ge,ut,Oe)=>{try{if(be(w),B(null),!H)throw new Error("Web session is not initialized yet. Refresh the page and try again.");if(!le)throw new Error("Web operations are disabled by server policy.");const xe=await fetch(W,{method:"POST",headers:{"Content-Type":"application/json",[Ox]:zx,[Dx]:H},body:JSON.stringify(Ge)}),ra=await xe.json();if(!xe.ok){const is=typeof ra.error=="string"?ra.error:`Operation failed (${xe.status})`;throw new Error(is)}const ss=hy(ra)??ut;return ee(ss),(Oe?.refreshAfterSuccess??!0)&&await Promise.all([oa(),Na()]),!0}catch(xe){return B(xe.message),!1}finally{be(null)}},[oa,Na,le,H]),mi=U.useCallback(async()=>{try{Ee(!0),B(null),await Promise.all([oa(),Un(),Na()]),ca.current?.readyState===WebSocket.OPEN&&ca.current.send(JSON.stringify({type:"refresh"}))}catch(w){B(w.message)}finally{Ee(!1)}},[oa,Un,Na]),as=U.useCallback(()=>{Re("poll","/api/operations/poll",{},"Manual poll requested")},[Re]),ea=U.useCallback(()=>{Re("sync","/api/operations/sync",{},"Sync completed")},[Re]),st=U.useCallback(()=>{Re("cleanup","/api/operations/cleanup",{},"Cleanup completed")},[Re]),rt=U.useCallback(w=>{r({to:"/$page",params:{page:w}})},[r]),Fa=U.useCallback(w=>{I(w),r({to:"/$page/$detailId",params:{page:"issues",detailId:w}})},[r]),ns=U.useCallback(()=>{r({to:"/$page",params:{page:"issues"}})},[r]),ec=U.useCallback(w=>{r({to:"/$page/$detailId",params:{page:"projects",detailId:w}})},[r]),tc=U.useCallback(()=>{r({to:"/$page",params:{page:"projects"}})},[r]),pi=U.useCallback(async()=>{if(!(!Tx(W=>window.confirm(W))||!await Re("update","/api/operations/update",{},"Update initiated - pulling and rebuilding...",{refreshAfterSuccess:!1}))){$e.current=Mx(Date.now()),zn({state:"draining"});try{const W=await qt();if(!W)return;const Ge=Ex(W);Ge&&($e.current={startedAtMs:$e.current.startedAtMs,sawActiveState:!0},zn(Ge))}catch{}}},[qt,Re]),Hn=U.useCallback(async w=>{w.preventDefault();const W=Number.parseInt(He,10);if(!re||!Number.isFinite(W)||W<=0){B("Retry requires a repo and a positive issue number");return}await Re("retry","/api/operations/retry",{repo:re,issueNumber:W,resetPlan:St,fresh:la},`Retry queued for ${re}#${W}`)},[la,He,re,St,Re]),ls=U.useCallback(async w=>{w.preventDefault();const W=Number.parseInt(ia,10);if(!gt||!Number.isFinite(W)||W<=0){B("Rebase requires a repo and a positive issue number");return}await Re("rebase","/api/operations/rebase",{repo:gt,issueNumber:W},`Rebase queued for ${gt}#${W}`)},[ia,gt,Re]),Ia=U.useCallback(async w=>{w.preventDefault();const W=Number.parseInt(jt,10);if(!fe||!Number.isFinite(W)||W<=0){B("Delete entry requires a repo and a positive issue number");return}await Re("delete-entry","/api/operations/delete-entry",{repo:fe,issueNumber:W,force:Ja},`Deleted local entry for ${fe}#${W}`)},[Ja,jt,fe,Re]),Pa=U.useCallback(async w=>{if(w.preventDefault(),!va){B("Labels init requires a repo");return}await Re("labels-init","/api/operations/labels-init",{repo:va},`Labels initialized for ${va}`)},[va,Re]),kn=U.useCallback(async w=>{w.preventDefault();const W=Number.parseInt(ga,10);if(!Ht||!Number.isFinite(W)||W<=0){B("Continue requires a repo and a positive issue number");return}await Re("continue","/api/operations/continue",{repo:Ht,issueNumber:W},`Continue pass queued for ${Ht}#${W}`)},[ga,Ht,Re]),Wa=U.useCallback(async w=>{const W=ye[w];if(W===void 0){B(`No draft value found for ${w}`);return}await Re(`setting:set:${w}`,"/api/operations/settings/set",{key:w,value:W},`Updated ${w}`)},[Re,ye]),We=U.useCallback(async w=>{await Re(`setting:clear:${w}`,"/api/operations/settings/clear",{key:w},`Cleared override for ${w}`)},[Re]),bi=U.useCallback(async w=>{w.preventDefault();const W=Number.parseFloat(Y);if(!Number.isFinite(W)||W<=0){B("Daily override requires a positive number (USD)");return}await Re("daily-cost-override:set","/api/operations/daily-cost-override/set",{amountUsd:W},`Raised today's daily cap to $${W.toFixed(2)}`)},[Y,Re]),gi=U.useCallback(async()=>{await Re("daily-cost-override:clear","/api/operations/daily-cost-override/clear",{},"Cleared today's daily cap override")},[Re]),Ra=U.useCallback(async w=>{w.preventDefault();const W=Number.parseInt(K.issueNumber,10),Ge=Number.parseFloat(K.amount);if(!K.repo||!Number.isFinite(W)||W<=0){B("Per-issue override requires a repo and a positive issue number");return}if(!Number.isFinite(Ge)||Ge<=0){B("Per-issue override requires a positive amount (USD)");return}await Re("cost-override:set","/api/operations/cost-override/set",{repo:K.repo,issueNumber:W,amountUsd:Ge},`Set cost override for ${K.repo}#${W} to $${Ge.toFixed(2)}`)},[K,Re]),en=U.useCallback(async()=>{const w=Number.parseInt(K.issueNumber,10);if(!K.repo||!Number.isFinite(w)||w<=0){B("Clearing a per-issue override requires a repo and a positive issue number");return}await Re("cost-override:clear","/api/operations/cost-override/clear",{repo:K.repo,issueNumber:w},`Cleared cost override for ${K.repo}#${w}`)},[K,Re]),ac=l==="issues"&&pt!==null,vi=l==="projects"&&Ln!==null;return o.jsxs("main",{"data-theme":"black",className:"min-h-screen bg-orch-admin",children:[o.jsx(vy,{currentStateLabel:ts.label,currentStateToneClass:ts.toneClass,isWorking:fl>0||ce!==null||Wt,socketConnected:A,lastRefreshAt:f?.generatedAt??null,pollIntervalSeconds:f?.config.pollIntervalSeconds??null,reposCount:lt.length,activeRuns:f?.status.activeRuns??0,runningRuns:fl,queuedRuns:$a,frontendVersion:Lx,frontendGitSha:Ux,backendVersion:f?.build?.version??"unknown",backendGitSha:f?.build?.gitSha??null,operationsEnabled:le,activeOperation:ce,isRefreshing:Ye,onRefresh:()=>{mi()},onPoll:as,onSync:ea,onGoToSettings:()=>{rt("settings")}}),o.jsxs("div",{className:"mx-auto flex w-full max-w-[1550px] flex-col gap-5 px-4 pb-24 pt-5 sm:px-6 md:pb-6 lg:px-8",children:[q&&o.jsx("div",{className:"alert alert-error shadow-sm",children:o.jsx("span",{children:q})}),se&&o.jsx("div",{className:"alert alert-info shadow-sm",children:o.jsx("span",{children:se})}),o.jsxs("div",{className:"grid gap-5 md:grid-cols-[auto_minmax(0,1fr)] md:items-stretch md:gap-0",children:[o.jsx(_y,{activePage:l,onPageChange:rt}),o.jsxs("div",{className:"flex min-w-0 flex-col gap-5 md:pl-6",children:[l==="issues"&&(ac?o.jsx(Oy,{run:Sa,runId:pt??"",runEvents:P,onBack:ns}):o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsx(Br,{snapshot:f}),o.jsxs("section",{className:"grid gap-5 xl:grid-cols-[1.65fr_1fr]",children:[o.jsx(nx,{isLoading:S,repos:lt,selectedRepo:X,onSelectedRepoChange:Z,filteredRuns:dl,selectedRunId:J,onOpenRun:Fa,statusTone:Ky}),o.jsx(Dy,{operationsEnabled:le,activeOperation:ce,updateStatus:ya,repos:lt,retryForm:{repo:re,issueNumber:He,resetPlan:St,fresh:la},rebaseForm:{repo:gt,issueNumber:ia},continueForm:{repo:Ht,issueNumber:ga},deleteEntryForm:{repo:fe,issueNumber:jt,force:Ja},labelsInitForm:{repo:va},onRetryFormChange:w=>{w.repo!==void 0&&pe(w.repo),w.issueNumber!==void 0&&Ue(w.issueNumber),w.resetPlan!==void 0&&Pt(w.resetPlan),w.fresh!==void 0&&On(w.fresh)},onRebaseFormChange:w=>{w.repo!==void 0&&sa(w.repo),w.issueNumber!==void 0&&ua(w.issueNumber)},onContinueFormChange:w=>{w.repo!==void 0&&vt(w.repo),w.issueNumber!==void 0&&Za(w.issueNumber)},onDeleteEntryFormChange:w=>{w.repo!==void 0&&Pe(w.repo),w.issueNumber!==void 0&&rl(w.issueNumber),w.force!==void 0&&Wu(w.force)},onLabelsInitFormChange:w=>{w.repo!==void 0&&Ka(w.repo)},onPoll:as,onSync:ea,onCleanup:st,onLabelsInitSubmit:w=>{Pa(w)},onRetrySubmit:w=>{Hn(w)},onRebaseSubmit:w=>{ls(w)},onContinueSubmit:w=>{kn(w)},onDeleteEntrySubmit:w=>{Ia(w)},onUpdate:()=>{pi()}})]})]})),l==="stats"&&o.jsx(gx,{snapshot:f,socketConnected:A}),l==="projects"&&(vi?o.jsx(Qy,{snapshot:g,repo:Ln??"",isLoading:x,onBack:tc}):o.jsx(Zy,{snapshot:g,isLoading:x,onOpenRepo:ec})),l==="settings"&&o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsx(by,{baseDailyBudgetUsd:f?.cost.dailyBudgetUsd??0,dailyBudgetOverrideUsd:f?.cost.dailyBudgetOverrideUsd??null,effectiveDailyBudgetUsd:f?.cost.effectiveDailyBudgetUsd??f?.cost.dailyBudgetUsd??0,todayCostUsd:f?.status.dailyCostUsd??0,activeOperation:ce,dailyDraft:Y,onDailyDraftChange:F,onDailySubmit:w=>{bi(w)},onDailyClear:()=>{gi()},issueDraft:K,repos:lt,onIssueDraftChange:w=>{oe(W=>({...W,...w}))},onIssueSubmit:w=>{Ra(w)},onIssueClear:()=>{en()}}),o.jsx(mx,{settings:p?.settings??[],generatedAt:p?.generatedAt??null,isLoading:_,activeOperation:ce,drafts:ye,onDraftChange:(w,W)=>{R(Ge=>({...Ge,[w]:W}))},onApply:w=>{Wa(w)},onClear:w=>{We(w)}})]})]})]}),o.jsx("div",{className:"flex justify-center pb-16 pt-1 md:pb-2",children:o.jsx("button",{type:"button",className:"btn btn-outline btn-sm border-primary/55 bg-base-200/45 text-primary hover:bg-primary/15",onClick:()=>{window.location.reload()},children:"UI reload"})})]}),Wt&&ya&&o.jsx(Sx,{status:ya,serverUnreachable:hi})]})}const Bx=["issues","stats","projects","settings"];function eb(l){return Bx.some(u=>u===l)}function Hx(){return o.jsx(Ip,{})}function kx(){const{page:l}=Ju({from:"/$page"});return o.jsx(Hu,{activePage:l})}function qx(){const{page:l,detailId:u}=Ju({from:"/$page/$detailId"});return l==="issues"?o.jsx(Hu,{activePage:"issues",issueDetailRunId:u}):l==="projects"?o.jsx(Hu,{activePage:"projects",projectDetailRepo:u}):o.jsx(Hu,{activePage:l})}const Pu=Kv({component:Hx}),Yx=Kr({getParentRoute:()=>Pu,path:"/",loader:()=>ui({to:"/$page",params:{page:"issues"},replace:!0,throw:!0}),component:()=>null}),Gx=Kr({getParentRoute:()=>Pu,path:"$page",loader:({params:l})=>{if(!eb(l.page))return ui({to:"/$page",params:{page:"issues"},replace:!0,throw:!0})},component:kx}),Vx=Kr({getParentRoute:()=>Pu,path:"$page/$detailId",loader:({params:l})=>{if(!eb(l.page))return ui({to:"/$page",params:{page:"issues"},replace:!0,throw:!0});if(l.page!=="issues"&&l.page!=="projects")return ui({to:"/$page",params:{page:l.page},replace:!0,throw:!0})},component:qx}),Qx=Pu.addChildren([Yx,Gx,Vx]);function Xx(){return typeof window>"u"?uv({initialEntries:["/issues"]}):Lp()}function Zx(l={}){return ly({routeTree:Qx,history:l.history??Xx(),isServer:l.isServer})}const Kx=Zx(),tb=document.getElementById("root");if(!tb)throw new Error("Root container not found");gg.createRoot(tb).render(o.jsx(Pl.StrictMode,{children:o.jsx(uy,{router:Kx})}));"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(()=>{})});