@jonit-dev/night-watch-cli 1.7.86 → 1.7.88

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.
@@ -0,0 +1,365 @@
1
+ (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))c(h);new MutationObserver(h=>{for(const x of h)if(x.type==="childList")for(const f of x.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&c(f)}).observe(document,{childList:!0,subtree:!0});function d(h){const x={};return h.integrity&&(x.integrity=h.integrity),h.referrerPolicy&&(x.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?x.credentials="include":h.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function c(h){if(h.ep)return;h.ep=!0;const x=d(h);fetch(h.href,x)}})();function ch(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var sr={exports:{}},ss={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Um;function xv(){if(Um)return ss;Um=1;var u=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function d(c,h,x){var f=null;if(x!==void 0&&(f=""+x),h.key!==void 0&&(f=""+h.key),"key"in h){x={};for(var p in h)p!=="key"&&(x[p]=h[p])}else x=h;return h=x.ref,{$$typeof:u,type:c,key:f,ref:h!==void 0?h:null,props:x}}return ss.Fragment=o,ss.jsx=d,ss.jsxs=d,ss}var qm;function vv(){return qm||(qm=1,sr.exports=xv()),sr.exports}var i=vv(),ir={exports:{}},oe={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Hm;function pv(){if(Hm)return oe;Hm=1;var u=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),T=Symbol.iterator;function C(N){return N===null||typeof N!="object"?null:(N=T&&N[T]||N["@@iterator"],typeof N=="function"?N:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,U={};function R(N,k,K){this.props=N,this.context=k,this.refs=U,this.updater=K||B}R.prototype.isReactComponent={},R.prototype.setState=function(N,k){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,k,"setState")},R.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function Q(){}Q.prototype=R.prototype;function G(N,k,K){this.props=N,this.context=k,this.refs=U,this.updater=K||B}var te=G.prototype=new Q;te.constructor=G,q(te,R.prototype),te.isPureReactComponent=!0;var se=Array.isArray;function Z(){}var ee={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function ue(N,k,K){var J=K.ref;return{$$typeof:u,type:N,key:k,ref:J!==void 0?J:null,props:K}}function $(N,k){return ue(N.type,k,N.props)}function je(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function ge(N){var k={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(K){return k[K]})}var Ge=/\/+/g;function z(N,k){return typeof N=="object"&&N!==null&&N.key!=null?ge(""+N.key):k.toString(36)}function ae(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(Z,Z):(N.status="pending",N.then(function(k){N.status==="pending"&&(N.status="fulfilled",N.value=k)},function(k){N.status==="pending"&&(N.status="rejected",N.reason=k)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,k,K,J,ce){var me=typeof N;(me==="undefined"||me==="boolean")&&(N=null);var Ne=!1;if(N===null)Ne=!0;else switch(me){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(N.$$typeof){case u:case o:Ne=!0;break;case g:return Ne=N._init,D(Ne(N._payload),k,K,J,ce)}}if(Ne)return ce=ce(N),Ne=J===""?"."+z(N,0):J,se(ce)?(K="",Ne!=null&&(K=Ne.replace(Ge,"$&/")+"/"),D(ce,k,K,"",function(wl){return wl})):ce!=null&&(je(ce)&&(ce=$(ce,K+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(Ge,"$&/")+"/")+Ne)),k.push(ce)),1;Ne=0;var tt=J===""?".":J+":";if(se(N))for(var Be=0;Be<N.length;Be++)J=N[Be],me=tt+z(J,Be),Ne+=D(J,k,K,me,ce);else if(Be=C(N),typeof Be=="function")for(N=Be.call(N),Be=0;!(J=N.next()).done;)J=J.value,me=tt+z(J,Be++),Ne+=D(J,k,K,me,ce);else if(me==="object"){if(typeof N.then=="function")return D(ae(N),k,K,J,ce);throw k=String(N),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function V(N,k,K){if(N==null)return N;var J=[],ce=0;return D(N,J,"","",function(me){return k.call(K,me,ce++)}),J}function I(N){if(N._status===-1){var k=N._result;k=k(),k.then(function(K){(N._status===0||N._status===-1)&&(N._status=1,N._result=K)},function(K){(N._status===0||N._status===-1)&&(N._status=2,N._result=K)}),N._status===-1&&(N._status=0,N._result=k)}if(N._status===1)return N._result.default;throw N._result}var he=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},xe={map:V,forEach:function(N,k,K){V(N,function(){k.apply(this,arguments)},K)},count:function(N){var k=0;return V(N,function(){k++}),k},toArray:function(N){return V(N,function(k){return k})||[]},only:function(N){if(!je(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return oe.Activity=y,oe.Children=xe,oe.Component=R,oe.Fragment=d,oe.Profiler=h,oe.PureComponent=G,oe.StrictMode=c,oe.Suspense=b,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ee,oe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return ee.H.useMemoCache(N)}},oe.cache=function(N){return function(){return N.apply(null,arguments)}},oe.cacheSignal=function(){return null},oe.cloneElement=function(N,k,K){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var J=q({},N.props),ce=N.key;if(k!=null)for(me in k.key!==void 0&&(ce=""+k.key),k)!P.call(k,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&k.ref===void 0||(J[me]=k[me]);var me=arguments.length-2;if(me===1)J.children=K;else if(1<me){for(var Ne=Array(me),tt=0;tt<me;tt++)Ne[tt]=arguments[tt+2];J.children=Ne}return ue(N.type,ce,J)},oe.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:x,_context:N},N},oe.createElement=function(N,k,K){var J,ce={},me=null;if(k!=null)for(J in k.key!==void 0&&(me=""+k.key),k)P.call(k,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ce[J]=k[J]);var Ne=arguments.length-2;if(Ne===1)ce.children=K;else if(1<Ne){for(var tt=Array(Ne),Be=0;Be<Ne;Be++)tt[Be]=arguments[Be+2];ce.children=tt}if(N&&N.defaultProps)for(J in Ne=N.defaultProps,Ne)ce[J]===void 0&&(ce[J]=Ne[J]);return ue(N,me,ce)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(N){return{$$typeof:p,render:N}},oe.isValidElement=je,oe.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:I}},oe.memo=function(N,k){return{$$typeof:v,type:N,compare:k===void 0?null:k}},oe.startTransition=function(N){var k=ee.T,K={};ee.T=K;try{var J=N(),ce=ee.S;ce!==null&&ce(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(Z,he)}catch(me){he(me)}finally{k!==null&&K.types!==null&&(k.types=K.types),ee.T=k}},oe.unstable_useCacheRefresh=function(){return ee.H.useCacheRefresh()},oe.use=function(N){return ee.H.use(N)},oe.useActionState=function(N,k,K){return ee.H.useActionState(N,k,K)},oe.useCallback=function(N,k){return ee.H.useCallback(N,k)},oe.useContext=function(N){return ee.H.useContext(N)},oe.useDebugValue=function(){},oe.useDeferredValue=function(N,k){return ee.H.useDeferredValue(N,k)},oe.useEffect=function(N,k){return ee.H.useEffect(N,k)},oe.useEffectEvent=function(N){return ee.H.useEffectEvent(N)},oe.useId=function(){return ee.H.useId()},oe.useImperativeHandle=function(N,k,K){return ee.H.useImperativeHandle(N,k,K)},oe.useInsertionEffect=function(N,k){return ee.H.useInsertionEffect(N,k)},oe.useLayoutEffect=function(N,k){return ee.H.useLayoutEffect(N,k)},oe.useMemo=function(N,k){return ee.H.useMemo(N,k)},oe.useOptimistic=function(N,k){return ee.H.useOptimistic(N,k)},oe.useReducer=function(N,k,K){return ee.H.useReducer(N,k,K)},oe.useRef=function(N){return ee.H.useRef(N)},oe.useState=function(N){return ee.H.useState(N)},oe.useSyncExternalStore=function(N,k,K){return ee.H.useSyncExternalStore(N,k,K)},oe.useTransition=function(){return ee.H.useTransition()},oe.version="19.2.4",oe}var Bm;function jr(){return Bm||(Bm=1,ir.exports=pv()),ir.exports}var E=jr();const Oe=ch(E);var ur={exports:{}},is={},cr={exports:{}},rr={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Lm;function gv(){return Lm||(Lm=1,(function(u){function o(D,V){var I=D.length;D.push(V);e:for(;0<I;){var he=I-1>>>1,xe=D[he];if(0<h(xe,V))D[he]=V,D[I]=xe,I=he;else break e}}function d(D){return D.length===0?null:D[0]}function c(D){if(D.length===0)return null;var V=D[0],I=D.pop();if(I!==V){D[0]=I;e:for(var he=0,xe=D.length,N=xe>>>1;he<N;){var k=2*(he+1)-1,K=D[k],J=k+1,ce=D[J];if(0>h(K,I))J<xe&&0>h(ce,K)?(D[he]=ce,D[J]=I,he=J):(D[he]=K,D[k]=I,he=k);else if(J<xe&&0>h(ce,I))D[he]=ce,D[J]=I,he=J;else break e}}return V}function h(D,V){var I=D.sortIndex-V.sortIndex;return I!==0?I:D.id-V.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;u.unstable_now=function(){return x.now()}}else{var f=Date,p=f.now();u.unstable_now=function(){return f.now()-p}}var b=[],v=[],g=1,y=null,T=3,C=!1,B=!1,q=!1,U=!1,R=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function te(D){for(var V=d(v);V!==null;){if(V.callback===null)c(v);else if(V.startTime<=D)c(v),V.sortIndex=V.expirationTime,o(b,V);else break;V=d(v)}}function se(D){if(q=!1,te(D),!B)if(d(b)!==null)B=!0,Z||(Z=!0,ge());else{var V=d(v);V!==null&&ae(se,V.startTime-D)}}var Z=!1,ee=-1,P=5,ue=-1;function $(){return U?!0:!(u.unstable_now()-ue<P)}function je(){if(U=!1,Z){var D=u.unstable_now();ue=D;var V=!0;try{e:{B=!1,q&&(q=!1,Q(ee),ee=-1),C=!0;var I=T;try{t:{for(te(D),y=d(b);y!==null&&!(y.expirationTime>D&&$());){var he=y.callback;if(typeof he=="function"){y.callback=null,T=y.priorityLevel;var xe=he(y.expirationTime<=D);if(D=u.unstable_now(),typeof xe=="function"){y.callback=xe,te(D),V=!0;break t}y===d(b)&&c(b),te(D)}else c(b);y=d(b)}if(y!==null)V=!0;else{var N=d(v);N!==null&&ae(se,N.startTime-D),V=!1}}break e}finally{y=null,T=I,C=!1}V=void 0}}finally{V?ge():Z=!1}}}var ge;if(typeof G=="function")ge=function(){G(je)};else if(typeof MessageChannel<"u"){var Ge=new MessageChannel,z=Ge.port2;Ge.port1.onmessage=je,ge=function(){z.postMessage(null)}}else ge=function(){R(je,0)};function ae(D,V){ee=R(function(){D(u.unstable_now())},V)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<D?Math.floor(1e3/D):5},u.unstable_getCurrentPriorityLevel=function(){return T},u.unstable_next=function(D){switch(T){case 1:case 2:case 3:var V=3;break;default:V=T}var I=T;T=V;try{return D()}finally{T=I}},u.unstable_requestPaint=function(){U=!0},u.unstable_runWithPriority=function(D,V){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var I=T;T=D;try{return V()}finally{T=I}},u.unstable_scheduleCallback=function(D,V,I){var he=u.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?he+I:he):I=he,D){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=I+xe,D={id:g++,callback:V,priorityLevel:D,startTime:I,expirationTime:xe,sortIndex:-1},I>he?(D.sortIndex=I,o(v,D),d(b)===null&&D===d(v)&&(q?(Q(ee),ee=-1):q=!0,ae(se,I-he))):(D.sortIndex=xe,o(b,D),B||C||(B=!0,Z||(Z=!0,ge()))),D},u.unstable_shouldYield=$,u.unstable_wrapCallback=function(D){var V=T;return function(){var I=T;T=V;try{return D.apply(this,arguments)}finally{T=I}}}})(rr)),rr}var km;function yv(){return km||(km=1,cr.exports=gv()),cr.exports}var or={exports:{}},rt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Ym;function bv(){if(Ym)return rt;Ym=1;var u=jr();function o(b){var v="https://react.dev/errors/"+b;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)v+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+b+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var c={d:{f:d,r:function(){throw Error(o(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},h=Symbol.for("react.portal");function x(b,v,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:y==null?null:""+y,children:b,containerInfo:v,implementation:g}}var f=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(b,v){if(b==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,rt.createPortal=function(b,v){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(o(299));return x(b,v,null,g)},rt.flushSync=function(b){var v=f.T,g=c.p;try{if(f.T=null,c.p=2,b)return b()}finally{f.T=v,c.p=g,c.d.f()}},rt.preconnect=function(b,v){typeof b=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,c.d.C(b,v))},rt.prefetchDNS=function(b){typeof b=="string"&&c.d.D(b)},rt.preinit=function(b,v){if(typeof b=="string"&&v&&typeof v.as=="string"){var g=v.as,y=p(g,v.crossOrigin),T=typeof v.integrity=="string"?v.integrity:void 0,C=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;g==="style"?c.d.S(b,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:y,integrity:T,fetchPriority:C}):g==="script"&&c.d.X(b,{crossOrigin:y,integrity:T,fetchPriority:C,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},rt.preinitModule=function(b,v){if(typeof b=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var g=p(v.as,v.crossOrigin);c.d.M(b,{crossOrigin:g,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&c.d.M(b)},rt.preload=function(b,v){if(typeof b=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var g=v.as,y=p(g,v.crossOrigin);c.d.L(b,g,{crossOrigin:y,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},rt.preloadModule=function(b,v){if(typeof b=="string")if(v){var g=p(v.as,v.crossOrigin);c.d.m(b,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:g,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else c.d.m(b)},rt.requestFormReset=function(b){c.d.r(b)},rt.unstable_batchedUpdates=function(b,v){return b(v)},rt.useFormState=function(b,v,g){return f.H.useFormState(b,v,g)},rt.useFormStatus=function(){return f.H.useHostTransitionStatus()},rt.version="19.2.4",rt}var Gm;function Sv(){if(Gm)return or.exports;Gm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(o){console.error(o)}}return u(),or.exports=bv(),or.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Qm;function jv(){if(Qm)return is;Qm=1;var u=yv(),o=jr(),d=Sv();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function f(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 p(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 b(e){if(x(e)!==e)throw Error(c(188))}function v(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(c(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var s=n.alternate;if(s===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===s.child){for(s=n.child;s;){if(s===l)return b(n),e;if(s===a)return b(n),t;s=s.sibling}throw Error(c(188))}if(l.return!==a.return)l=n,a=s;else{for(var r=!1,m=n.child;m;){if(m===l){r=!0,l=n,a=s;break}if(m===a){r=!0,a=n,l=s;break}m=m.sibling}if(!r){for(m=s.child;m;){if(m===l){r=!0,l=s,a=n;break}if(m===a){r=!0,a=s,l=n;break}m=m.sibling}if(!r)throw Error(c(189))}}if(l.alternate!==a)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,T=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),G=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),ue=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),je=Symbol.iterator;function ge(e){return e===null||typeof e!="object"?null:(e=je&&e[je]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Symbol.for("react.client.reference");function z(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case q:return"Fragment";case R:return"Profiler";case U:return"StrictMode";case se:return"Suspense";case Z:return"SuspenseList";case ue:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case B:return"Portal";case G:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:z(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return z(e(t))}catch{}}return null}var ae=Array.isArray,D=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},he=[],xe=-1;function N(e){return{current:e}}function k(e){0>xe||(e.current=he[xe],he[xe]=null,xe--)}function K(e,t){xe++,he[xe]=e.current,e.current=t}var J=N(null),ce=N(null),me=N(null),Ne=N(null);function tt(e,t){switch(K(me,t),K(ce,e),K(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?nm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=nm(t),e=sm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}k(J),K(J,e)}function Be(){k(J),k(ce),k(me)}function wl(e){e.memoizedState!==null&&K(Ne,e);var t=J.current,l=sm(t,e.type);t!==l&&(K(ce,e),K(J,l))}function ea(e){ce.current===e&&(k(J),k(ce)),Ne.current===e&&(k(Ne),ts._currentValue=I)}var Sa,fn;function Wt(e){if(Sa===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Sa=t&&t[1]||"",fn=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Sa+e+fn}var X=!1;function ie(e,t){if(!e||X)return"";X=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(O){var _=O}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(O){_=O}e.call(Y.prototype)}}else{try{throw Error()}catch(O){_=O}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(O){if(O&&_&&typeof O.stack=="string")return[O.stack,_.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),r=s[0],m=s[1];if(r&&m){var S=r.split(`
44
+ `),A=m.split(`
45
+ `);for(n=a=0;a<S.length&&!S[a].includes("DetermineComponentFrameRoot");)a++;for(;n<A.length&&!A[n].includes("DetermineComponentFrameRoot");)n++;if(a===S.length||n===A.length)for(a=S.length-1,n=A.length-1;1<=a&&0<=n&&S[a]!==A[n];)n--;for(;1<=a&&0<=n;a--,n--)if(S[a]!==A[n]){if(a!==1||n!==1)do if(a--,n--,0>n||S[a]!==A[n]){var H=`
46
+ `+S[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=n);break}}}finally{X=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Wt(l):""}function Le(e,t){switch(e.tag){case 26:case 27:case 5:return Wt(e.type);case 16:return Wt("Lazy");case 13:return e.child!==t&&t!==null?Wt("Suspense Fallback"):Wt("Suspense");case 19:return Wt("SuspenseList");case 0:case 15:return ie(e.type,!1);case 11:return ie(e.type.render,!1);case 1:return ie(e.type,!0);case 31:return Wt("Activity");default:return""}}function yt(e){try{var t="",l=null;do t+=Le(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var Dt=Object.prototype.hasOwnProperty,Ot=u.unstable_scheduleCallback,Ut=u.unstable_cancelCallback,Rl=u.unstable_shouldYield,Kh=u.unstable_requestPaint,bt=u.unstable_now,Jh=u.unstable_getCurrentPriorityLevel,Or=u.unstable_ImmediatePriority,Ur=u.unstable_UserBlockingPriority,gs=u.unstable_NormalPriority,Fh=u.unstable_LowPriority,qr=u.unstable_IdlePriority,Wh=u.log,Ph=u.unstable_setDisableYieldValue,mn=null,St=null;function Cl(e){if(typeof Wh=="function"&&Ph(e),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(mn,e)}catch{}}var jt=Math.clz32?Math.clz32:t0,Ih=Math.log,e0=Math.LN2;function t0(e){return e>>>=0,e===0?32:31-(Ih(e)/e0|0)|0}var ys=256,bs=262144,Ss=4194304;function ta(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 js(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,s=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~s,a!==0?n=ta(a):(r&=m,r!==0?n=ta(r):l||(l=m&~e,l!==0&&(n=ta(l))))):(m=a&~s,m!==0?n=ta(m):r!==0?n=ta(r):l||(l=a&~e,l!==0&&(n=ta(l)))),n===0?0:t!==0&&t!==n&&(t&s)===0&&(s=n&-n,l=t&-t,s>=l||s===32&&(l&4194048)!==0)?t:n}function hn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function l0(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 Hr(){var e=Ss;return Ss<<=1,(Ss&62914560)===0&&(Ss=4194304),e}function $i(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function xn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function a0(e,t,l,a,n,s){var r=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var m=e.entanglements,S=e.expirationTimes,A=e.hiddenUpdates;for(l=r&~l;0<l;){var H=31-jt(l),Y=1<<H;m[H]=0,S[H]=-1;var _=A[H];if(_!==null)for(A[H]=null,H=0;H<_.length;H++){var O=_[H];O!==null&&(O.lane&=-536870913)}l&=~Y}a!==0&&Br(e,a,0),s!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=s&~(r&~t))}function Br(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-jt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Lr(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-jt(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function kr(e,t){var l=t&-t;return l=(l&42)!==0?1:Ki(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ki(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 Ji(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yr(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:Tm(e.type))}function Gr(e,t){var l=V.p;try{return V.p=e,t()}finally{V.p=l}}var Tl=Math.random().toString(36).slice(2),nt="__reactFiber$"+Tl,ft="__reactProps$"+Tl,ja="__reactContainer$"+Tl,Fi="__reactEvents$"+Tl,n0="__reactListeners$"+Tl,s0="__reactHandles$"+Tl,Qr="__reactResources$"+Tl,vn="__reactMarker$"+Tl;function Wi(e){delete e[nt],delete e[ft],delete e[Fi],delete e[n0],delete e[s0]}function Na(e){var t=e[nt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ja]||l[nt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=fm(e);e!==null;){if(l=e[nt])return l;e=fm(e)}return t}e=l,l=e.parentNode}return null}function Ea(e){if(e=e[nt]||e[ja]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function wa(e){var t=e[Qr];return t||(t=e[Qr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function lt(e){e[vn]=!0}var Xr=new Set,Vr={};function la(e,t){Ra(e,t),Ra(e+"Capture",t)}function Ra(e,t){for(Vr[e]=t,e=0;e<t.length;e++)Xr.add(t[e])}var i0=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]*$"),Zr={},$r={};function u0(e){return Dt.call($r,e)?!0:Dt.call(Zr,e)?!1:i0.test(e)?$r[e]=!0:(Zr[e]=!0,!1)}function Ns(e,t,l){if(u0(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Es(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function al(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function c0(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(r){l=""+r,s.call(this,r)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(r){l=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pi(e){if(!e._valueTracker){var t=Kr(e)?"checked":"value";e._valueTracker=c0(e,t,""+e[t])}}function Jr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Kr(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function ws(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 r0=/[\n"\\]/g;function Ht(e){return e.replace(r0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ii(e,t,l,a,n,s,r,m){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+qt(t)):e.value!==""+qt(t)&&(e.value=""+qt(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?eu(e,r,qt(t)):l!=null?eu(e,r,qt(l)):a!=null&&e.removeAttribute("value"),n==null&&s!=null&&(e.defaultChecked=!!s),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+qt(m):e.removeAttribute("name")}function Fr(e,t,l,a,n,s,r,m){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||l!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Pi(e);return}l=l!=null?""+qt(l):"",t=t!=null?""+qt(t):l,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),Pi(e)}function eu(e,t,l){t==="number"&&ws(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ca(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+qt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Wr(e,t,l){if(t!=null&&(t=""+qt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+qt(l):""}function Pr(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(c(92));if(ae(a)){if(1<a.length)throw Error(c(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=qt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Pi(e)}function Ta(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var o0=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 Ir(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||o0.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function eo(e,t,l){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&Ir(e,n,a)}else for(var s in t)t.hasOwnProperty(s)&&Ir(e,s,t[s])}function tu(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 d0=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"]]),f0=/^[\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 Rs(e){return f0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function nl(){}var lu=null;function au(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ma=null,Aa=null;function to(e){var t=Ea(e);if(t&&(e=t.stateNode)){var l=e[ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ii(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ht(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[ft]||null;if(!n)throw Error(c(90));Ii(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Jr(a)}break e;case"textarea":Wr(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ca(e,!!l.multiple,t,!1)}}}var nu=!1;function lo(e,t,l){if(nu)return e(t,l);nu=!0;try{var a=e(t);return a}finally{if(nu=!1,(Ma!==null||Aa!==null)&&(mi(),Ma&&(t=Ma,e=Aa,Aa=Ma=null,to(t),e)))for(t=0;t<e.length;t++)to(e[t])}}function gn(e,t){var l=e.stateNode;if(l===null)return null;var a=l[ft]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(c(231,t,typeof l));return l}var sl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),su=!1;if(sl)try{var yn={};Object.defineProperty(yn,"passive",{get:function(){su=!0}}),window.addEventListener("test",yn,yn),window.removeEventListener("test",yn,yn)}catch{su=!1}var Ml=null,iu=null,Cs=null;function ao(){if(Cs)return Cs;var e,t=iu,l=t.length,a,n="value"in Ml?Ml.value:Ml.textContent,s=n.length;for(e=0;e<l&&t[e]===n[e];e++);var r=l-e;for(a=1;a<=r&&t[l-a]===n[s-a];a++);return Cs=n.slice(e,1<a?1-a:void 0)}function Ts(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 Ms(){return!0}function no(){return!1}function mt(e){function t(l,a,n,s,r){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=s,this.target=r,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(l=e[m],this[m]=l?l(s):s[m]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ms:no,this.isPropagationStopped=no,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ms)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ms)},persist:function(){},isPersistent:Ms}),t}var aa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},As=mt(aa),bn=y({},aa,{view:0,detail:0}),m0=mt(bn),uu,cu,Sn,_s=y({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ou,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!==Sn&&(Sn&&e.type==="mousemove"?(uu=e.screenX-Sn.screenX,cu=e.screenY-Sn.screenY):cu=uu=0,Sn=e),uu)},movementY:function(e){return"movementY"in e?e.movementY:cu}}),so=mt(_s),h0=y({},_s,{dataTransfer:0}),x0=mt(h0),v0=y({},bn,{relatedTarget:0}),ru=mt(v0),p0=y({},aa,{animationName:0,elapsedTime:0,pseudoElement:0}),g0=mt(p0),y0=y({},aa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),b0=mt(y0),S0=y({},aa,{data:0}),io=mt(S0),j0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N0={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"},E0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function w0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=E0[e])?!!t[e]:!1}function ou(){return w0}var R0=y({},bn,{key:function(e){if(e.key){var t=j0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ts(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?N0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ou,charCode:function(e){return e.type==="keypress"?Ts(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ts(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),C0=mt(R0),T0=y({},_s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uo=mt(T0),M0=y({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ou}),A0=mt(M0),_0=y({},aa,{propertyName:0,elapsedTime:0,pseudoElement:0}),z0=mt(_0),D0=y({},_s,{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}),O0=mt(D0),U0=y({},aa,{newState:0,oldState:0}),q0=mt(U0),H0=[9,13,27,32],du=sl&&"CompositionEvent"in window,jn=null;sl&&"documentMode"in document&&(jn=document.documentMode);var B0=sl&&"TextEvent"in window&&!jn,co=sl&&(!du||jn&&8<jn&&11>=jn),ro=" ",oo=!1;function fo(e,t){switch(e){case"keyup":return H0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _a=!1;function L0(e,t){switch(e){case"compositionend":return mo(t);case"keypress":return t.which!==32?null:(oo=!0,ro);case"textInput":return e=t.data,e===ro&&oo?null:e;default:return null}}function k0(e,t){if(_a)return e==="compositionend"||!du&&fo(e,t)?(e=ao(),Cs=iu=Ml=null,_a=!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 co&&t.locale!=="ko"?null:t.data;default:return null}}var Y0={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 ho(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Y0[e.type]:t==="textarea"}function xo(e,t,l,a){Ma?Aa?Aa.push(a):Aa=[a]:Ma=a,t=bi(t,"onChange"),0<t.length&&(l=new As("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Nn=null,En=null;function G0(e){Pf(e,0)}function zs(e){var t=pn(e);if(Jr(t))return e}function vo(e,t){if(e==="change")return t}var po=!1;if(sl){var fu;if(sl){var mu="oninput"in document;if(!mu){var go=document.createElement("div");go.setAttribute("oninput","return;"),mu=typeof go.oninput=="function"}fu=mu}else fu=!1;po=fu&&(!document.documentMode||9<document.documentMode)}function yo(){Nn&&(Nn.detachEvent("onpropertychange",bo),En=Nn=null)}function bo(e){if(e.propertyName==="value"&&zs(En)){var t=[];xo(t,En,e,au(e)),lo(G0,t)}}function Q0(e,t,l){e==="focusin"?(yo(),Nn=t,En=l,Nn.attachEvent("onpropertychange",bo)):e==="focusout"&&yo()}function X0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zs(En)}function V0(e,t){if(e==="click")return zs(t)}function Z0(e,t){if(e==="input"||e==="change")return zs(t)}function $0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nt=typeof Object.is=="function"?Object.is:$0;function wn(e,t){if(Nt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!Dt.call(t,n)||!Nt(e[n],t[n]))return!1}return!0}function So(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jo(e,t){var l=So(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=So(l)}}function No(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?No(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Eo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ws(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=ws(e.document)}return t}function hu(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 K0=sl&&"documentMode"in document&&11>=document.documentMode,za=null,xu=null,Rn=null,vu=!1;function wo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;vu||za==null||za!==ws(a)||(a=za,"selectionStart"in a&&hu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Rn&&wn(Rn,a)||(Rn=a,a=bi(xu,"onSelect"),0<a.length&&(t=new As("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=za)))}function na(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Da={animationend:na("Animation","AnimationEnd"),animationiteration:na("Animation","AnimationIteration"),animationstart:na("Animation","AnimationStart"),transitionrun:na("Transition","TransitionRun"),transitionstart:na("Transition","TransitionStart"),transitioncancel:na("Transition","TransitionCancel"),transitionend:na("Transition","TransitionEnd")},pu={},Ro={};sl&&(Ro=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function sa(e){if(pu[e])return pu[e];if(!Da[e])return e;var t=Da[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Ro)return pu[e]=t[l];return e}var Co=sa("animationend"),To=sa("animationiteration"),Mo=sa("animationstart"),J0=sa("transitionrun"),F0=sa("transitionstart"),W0=sa("transitioncancel"),Ao=sa("transitionend"),_o=new Map,gu="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(" ");gu.push("scrollEnd");function $t(e,t){_o.set(e,t),la(t,[e])}var Ds=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bt=[],Oa=0,yu=0;function Os(){for(var e=Oa,t=yu=Oa=0;t<e;){var l=Bt[t];Bt[t++]=null;var a=Bt[t];Bt[t++]=null;var n=Bt[t];Bt[t++]=null;var s=Bt[t];if(Bt[t++]=null,a!==null&&n!==null){var r=a.pending;r===null?n.next=n:(n.next=r.next,r.next=n),a.pending=n}s!==0&&zo(l,n,s)}}function Us(e,t,l,a){Bt[Oa++]=e,Bt[Oa++]=t,Bt[Oa++]=l,Bt[Oa++]=a,yu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function bu(e,t,l,a){return Us(e,t,l,a),qs(e)}function ia(e,t){return Us(e,null,null,t),qs(e)}function zo(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,s=e.return;s!==null;)s.childLanes|=l,a=s.alternate,a!==null&&(a.childLanes|=l),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(n=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,n&&t!==null&&(n=31-jt(l),e=s.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),s):null}function qs(e){if(50<Kn)throw Kn=0,Mc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ua={};function P0(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,l,a){return new P0(e,t,l,a)}function Su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function il(e,t){var l=e.alternate;return l===null?(l=Et(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Do(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hs(e,t,l,a,n,s){var r=0;if(a=e,typeof e=="function")Su(e)&&(r=1);else if(typeof e=="string")r=av(e,l,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ue:return e=Et(31,l,t,n),e.elementType=ue,e.lanes=s,e;case q:return ua(l.children,n,s,t);case U:r=8,n|=24;break;case R:return e=Et(12,l,t,n|2),e.elementType=R,e.lanes=s,e;case se:return e=Et(13,l,t,n),e.elementType=se,e.lanes=s,e;case Z:return e=Et(19,l,t,n),e.elementType=Z,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:r=10;break e;case Q:r=9;break e;case te:r=11;break e;case ee:r=14;break e;case P:r=16,a=null;break e}r=29,l=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=Et(r,l,t,n),t.elementType=e,t.type=a,t.lanes=s,t}function ua(e,t,l,a){return e=Et(7,e,a,t),e.lanes=l,e}function ju(e,t,l){return e=Et(6,e,null,t),e.lanes=l,e}function Oo(e){var t=Et(18,null,null,0);return t.stateNode=e,t}function Nu(e,t,l){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Uo=new WeakMap;function Lt(e,t){if(typeof e=="object"&&e!==null){var l=Uo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:yt(t)},Uo.set(e,t),t)}return{value:e,source:t,stack:yt(t)}}var qa=[],Ha=0,Bs=null,Cn=0,kt=[],Yt=0,Al=null,Pt=1,It="";function ul(e,t){qa[Ha++]=Cn,qa[Ha++]=Bs,Bs=e,Cn=t}function qo(e,t,l){kt[Yt++]=Pt,kt[Yt++]=It,kt[Yt++]=Al,Al=e;var a=Pt;e=It;var n=32-jt(a)-1;a&=~(1<<n),l+=1;var s=32-jt(t)+n;if(30<s){var r=n-n%5;s=(a&(1<<r)-1).toString(32),a>>=r,n-=r,Pt=1<<32-jt(t)+n|l<<n|a,It=s+e}else Pt=1<<s|l<<n|a,It=e}function Eu(e){e.return!==null&&(ul(e,1),qo(e,1,0))}function wu(e){for(;e===Bs;)Bs=qa[--Ha],qa[Ha]=null,Cn=qa[--Ha],qa[Ha]=null;for(;e===Al;)Al=kt[--Yt],kt[Yt]=null,It=kt[--Yt],kt[Yt]=null,Pt=kt[--Yt],kt[Yt]=null}function Ho(e,t){kt[Yt++]=Pt,kt[Yt++]=It,kt[Yt++]=Al,Pt=t.id,It=t.overflow,Al=e}var st=null,Ue=null,Se=!1,_l=null,Gt=!1,Ru=Error(c(519));function zl(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Tn(Lt(t,e)),Ru}function Bo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[nt]=e,t[ft]=a,l){case"dialog":pe("cancel",t),pe("close",t);break;case"iframe":case"object":case"embed":pe("load",t);break;case"video":case"audio":for(l=0;l<Fn.length;l++)pe(Fn[l],t);break;case"source":pe("error",t);break;case"img":case"image":case"link":pe("error",t),pe("load",t);break;case"details":pe("toggle",t);break;case"input":pe("invalid",t),Fr(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":pe("invalid",t);break;case"textarea":pe("invalid",t),Pr(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||lm(t.textContent,l)?(a.popover!=null&&(pe("beforetoggle",t),pe("toggle",t)),a.onScroll!=null&&pe("scroll",t),a.onScrollEnd!=null&&pe("scrollend",t),a.onClick!=null&&(t.onclick=nl),t=!0):t=!1,t||zl(e,!0)}function Lo(e){for(st=e.return;st;)switch(st.tag){case 5:case 31:case 13:Gt=!1;return;case 27:case 3:Gt=!0;return;default:st=st.return}}function Ba(e){if(e!==st)return!1;if(!Se)return Lo(e),Se=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Xc(e.type,e.memoizedProps)),l=!l),l&&Ue&&zl(e),Lo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ue=dm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ue=dm(e)}else t===27?(t=Ue,Zl(e.type)?(e=Jc,Jc=null,Ue=e):Ue=t):Ue=st?Xt(e.stateNode.nextSibling):null;return!0}function ca(){Ue=st=null,Se=!1}function Cu(){var e=_l;return e!==null&&(pt===null?pt=e:pt.push.apply(pt,e),_l=null),e}function Tn(e){_l===null?_l=[e]:_l.push(e)}var Tu=N(null),ra=null,cl=null;function Dl(e,t,l){K(Tu,t._currentValue),t._currentValue=l}function rl(e){e._currentValue=Tu.current,k(Tu)}function Mu(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Au(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var s=n.dependencies;if(s!==null){var r=n.child;s=s.firstContext;e:for(;s!==null;){var m=s;s=n;for(var S=0;S<t.length;S++)if(m.context===t[S]){s.lanes|=l,m=s.alternate,m!==null&&(m.lanes|=l),Mu(s.return,l,e),a||(r=null);break e}s=m.next}}else if(n.tag===18){if(r=n.return,r===null)throw Error(c(341));r.lanes|=l,s=r.alternate,s!==null&&(s.lanes|=l),Mu(r,l,e),r=null}else r=n.child;if(r!==null)r.return=n;else for(r=n;r!==null;){if(r===e){r=null;break}if(n=r.sibling,n!==null){n.return=r.return,r=n;break}r=r.return}n=r}}function La(e,t,l,a){e=null;for(var n=t,s=!1;n!==null;){if(!s){if((n.flags&524288)!==0)s=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var r=n.alternate;if(r===null)throw Error(c(387));if(r=r.memoizedProps,r!==null){var m=n.type;Nt(n.pendingProps.value,r.value)||(e!==null?e.push(m):e=[m])}}else if(n===Ne.current){if(r=n.alternate,r===null)throw Error(c(387));r.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(ts):e=[ts])}n=n.return}e!==null&&Au(t,e,l,a),t.flags|=262144}function Ls(e){for(e=e.firstContext;e!==null;){if(!Nt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){ra=e,cl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function it(e){return ko(ra,e)}function ks(e,t){return ra===null&&oa(e),ko(e,t)}function ko(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},cl===null){if(e===null)throw Error(c(308));cl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else cl=cl.next=t;return l}var I0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},ex=u.unstable_scheduleCallback,tx=u.unstable_NormalPriority,Ke={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _u(){return{controller:new I0,data:new Map,refCount:0}}function Mn(e){e.refCount--,e.refCount===0&&ex(tx,function(){e.controller.abort()})}var An=null,zu=0,ka=0,Ya=null;function lx(e,t){if(An===null){var l=An=[];zu=0,ka=Uc(),Ya={status:"pending",value:void 0,then:function(a){l.push(a)}}}return zu++,t.then(Yo,Yo),t}function Yo(){if(--zu===0&&An!==null){Ya!==null&&(Ya.status="fulfilled");var e=An;An=null,ka=0,Ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ax(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var Go=D.S;D.S=function(e,t){Rf=bt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&lx(e,t),Go!==null&&Go(e,t)};var da=N(null);function Du(){var e=da.current;return e!==null?e:De.pooledCache}function Ys(e,t){t===null?K(da,da.current):K(da,t.pool)}function Qo(){var e=Du();return e===null?null:{parent:Ke._currentValue,pool:e}}var Ga=Error(c(460)),Ou=Error(c(474)),Gs=Error(c(542)),Qs={then:function(){}};function Xo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(nl,nl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,$o(e),e;default:if(typeof t.status=="string")t.then(nl,nl);else{if(e=De,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,$o(e),e}throw ma=t,Ga}}function fa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ma=l,Ga):l}}var ma=null;function Zo(){if(ma===null)throw Error(c(459));var e=ma;return ma=null,e}function $o(e){if(e===Ga||e===Gs)throw Error(c(483))}var Qa=null,_n=0;function Xs(e){var t=_n;return _n+=1,Qa===null&&(Qa=[]),Vo(Qa,e,t)}function zn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Vs(e,t){throw t.$$typeof===T?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ko(e){function t(w,j){if(e){var M=w.deletions;M===null?(w.deletions=[j],w.flags|=16):M.push(j)}}function l(w,j){if(!e)return null;for(;j!==null;)t(w,j),j=j.sibling;return null}function a(w){for(var j=new Map;w!==null;)w.key!==null?j.set(w.key,w):j.set(w.index,w),w=w.sibling;return j}function n(w,j){return w=il(w,j),w.index=0,w.sibling=null,w}function s(w,j,M){return w.index=M,e?(M=w.alternate,M!==null?(M=M.index,M<j?(w.flags|=67108866,j):M):(w.flags|=67108866,j)):(w.flags|=1048576,j)}function r(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function m(w,j,M,L){return j===null||j.tag!==6?(j=ju(M,w.mode,L),j.return=w,j):(j=n(j,M),j.return=w,j)}function S(w,j,M,L){var le=M.type;return le===q?H(w,j,M.props.children,L,M.key):j!==null&&(j.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===P&&fa(le)===j.type)?(j=n(j,M.props),zn(j,M),j.return=w,j):(j=Hs(M.type,M.key,M.props,null,w.mode,L),zn(j,M),j.return=w,j)}function A(w,j,M,L){return j===null||j.tag!==4||j.stateNode.containerInfo!==M.containerInfo||j.stateNode.implementation!==M.implementation?(j=Nu(M,w.mode,L),j.return=w,j):(j=n(j,M.children||[]),j.return=w,j)}function H(w,j,M,L,le){return j===null||j.tag!==7?(j=ua(M,w.mode,L,le),j.return=w,j):(j=n(j,M),j.return=w,j)}function Y(w,j,M){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=ju(""+j,w.mode,M),j.return=w,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case C:return M=Hs(j.type,j.key,j.props,null,w.mode,M),zn(M,j),M.return=w,M;case B:return j=Nu(j,w.mode,M),j.return=w,j;case P:return j=fa(j),Y(w,j,M)}if(ae(j)||ge(j))return j=ua(j,w.mode,M,null),j.return=w,j;if(typeof j.then=="function")return Y(w,Xs(j),M);if(j.$$typeof===G)return Y(w,ks(w,j),M);Vs(w,j)}return null}function _(w,j,M,L){var le=j!==null?j.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return le!==null?null:m(w,j,""+M,L);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case C:return M.key===le?S(w,j,M,L):null;case B:return M.key===le?A(w,j,M,L):null;case P:return M=fa(M),_(w,j,M,L)}if(ae(M)||ge(M))return le!==null?null:H(w,j,M,L,null);if(typeof M.then=="function")return _(w,j,Xs(M),L);if(M.$$typeof===G)return _(w,j,ks(w,M),L);Vs(w,M)}return null}function O(w,j,M,L,le){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return w=w.get(M)||null,m(j,w,""+L,le);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case C:return w=w.get(L.key===null?M:L.key)||null,S(j,w,L,le);case B:return w=w.get(L.key===null?M:L.key)||null,A(j,w,L,le);case P:return L=fa(L),O(w,j,M,L,le)}if(ae(L)||ge(L))return w=w.get(M)||null,H(j,w,L,le,null);if(typeof L.then=="function")return O(w,j,M,Xs(L),le);if(L.$$typeof===G)return O(w,j,M,ks(j,L),le);Vs(j,L)}return null}function F(w,j,M,L){for(var le=null,Ee=null,W=j,fe=j=0,be=null;W!==null&&fe<M.length;fe++){W.index>fe?(be=W,W=null):be=W.sibling;var we=_(w,W,M[fe],L);if(we===null){W===null&&(W=be);break}e&&W&&we.alternate===null&&t(w,W),j=s(we,j,fe),Ee===null?le=we:Ee.sibling=we,Ee=we,W=be}if(fe===M.length)return l(w,W),Se&&ul(w,fe),le;if(W===null){for(;fe<M.length;fe++)W=Y(w,M[fe],L),W!==null&&(j=s(W,j,fe),Ee===null?le=W:Ee.sibling=W,Ee=W);return Se&&ul(w,fe),le}for(W=a(W);fe<M.length;fe++)be=O(W,w,fe,M[fe],L),be!==null&&(e&&be.alternate!==null&&W.delete(be.key===null?fe:be.key),j=s(be,j,fe),Ee===null?le=be:Ee.sibling=be,Ee=be);return e&&W.forEach(function(Wl){return t(w,Wl)}),Se&&ul(w,fe),le}function ne(w,j,M,L){if(M==null)throw Error(c(151));for(var le=null,Ee=null,W=j,fe=j=0,be=null,we=M.next();W!==null&&!we.done;fe++,we=M.next()){W.index>fe?(be=W,W=null):be=W.sibling;var Wl=_(w,W,we.value,L);if(Wl===null){W===null&&(W=be);break}e&&W&&Wl.alternate===null&&t(w,W),j=s(Wl,j,fe),Ee===null?le=Wl:Ee.sibling=Wl,Ee=Wl,W=be}if(we.done)return l(w,W),Se&&ul(w,fe),le;if(W===null){for(;!we.done;fe++,we=M.next())we=Y(w,we.value,L),we!==null&&(j=s(we,j,fe),Ee===null?le=we:Ee.sibling=we,Ee=we);return Se&&ul(w,fe),le}for(W=a(W);!we.done;fe++,we=M.next())we=O(W,w,fe,we.value,L),we!==null&&(e&&we.alternate!==null&&W.delete(we.key===null?fe:we.key),j=s(we,j,fe),Ee===null?le=we:Ee.sibling=we,Ee=we);return e&&W.forEach(function(hv){return t(w,hv)}),Se&&ul(w,fe),le}function ze(w,j,M,L){if(typeof M=="object"&&M!==null&&M.type===q&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case C:e:{for(var le=M.key;j!==null;){if(j.key===le){if(le=M.type,le===q){if(j.tag===7){l(w,j.sibling),L=n(j,M.props.children),L.return=w,w=L;break e}}else if(j.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===P&&fa(le)===j.type){l(w,j.sibling),L=n(j,M.props),zn(L,M),L.return=w,w=L;break e}l(w,j);break}else t(w,j);j=j.sibling}M.type===q?(L=ua(M.props.children,w.mode,L,M.key),L.return=w,w=L):(L=Hs(M.type,M.key,M.props,null,w.mode,L),zn(L,M),L.return=w,w=L)}return r(w);case B:e:{for(le=M.key;j!==null;){if(j.key===le)if(j.tag===4&&j.stateNode.containerInfo===M.containerInfo&&j.stateNode.implementation===M.implementation){l(w,j.sibling),L=n(j,M.children||[]),L.return=w,w=L;break e}else{l(w,j);break}else t(w,j);j=j.sibling}L=Nu(M,w.mode,L),L.return=w,w=L}return r(w);case P:return M=fa(M),ze(w,j,M,L)}if(ae(M))return F(w,j,M,L);if(ge(M)){if(le=ge(M),typeof le!="function")throw Error(c(150));return M=le.call(M),ne(w,j,M,L)}if(typeof M.then=="function")return ze(w,j,Xs(M),L);if(M.$$typeof===G)return ze(w,j,ks(w,M),L);Vs(w,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,j!==null&&j.tag===6?(l(w,j.sibling),L=n(j,M),L.return=w,w=L):(l(w,j),L=ju(M,w.mode,L),L.return=w,w=L),r(w)):l(w,j)}return function(w,j,M,L){try{_n=0;var le=ze(w,j,M,L);return Qa=null,le}catch(W){if(W===Ga||W===Gs)throw W;var Ee=Et(29,W,null,w.mode);return Ee.lanes=L,Ee.return=w,Ee}finally{}}}var ha=Ko(!0),Jo=Ko(!1),Ol=!1;function Uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ul(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ql(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Re&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=qs(e),zo(e,null,l),t}return Us(e,a,t,l),qs(e)}function Dn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Lr(e,l)}}function Hu(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,s=null;if(l=l.firstBaseUpdate,l!==null){do{var r={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};s===null?n=s=r:s=s.next=r,l=l.next}while(l!==null);s===null?n=s=t:s=s.next=t}else n=s=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Bu=!1;function On(){if(Bu){var e=Ya;if(e!==null)throw e}}function Un(e,t,l,a){Bu=!1;var n=e.updateQueue;Ol=!1;var s=n.firstBaseUpdate,r=n.lastBaseUpdate,m=n.shared.pending;if(m!==null){n.shared.pending=null;var S=m,A=S.next;S.next=null,r===null?s=A:r.next=A,r=S;var H=e.alternate;H!==null&&(H=H.updateQueue,m=H.lastBaseUpdate,m!==r&&(m===null?H.firstBaseUpdate=A:m.next=A,H.lastBaseUpdate=S))}if(s!==null){var Y=n.baseState;r=0,H=A=S=null,m=s;do{var _=m.lane&-536870913,O=_!==m.lane;if(O?(ye&_)===_:(a&_)===_){_!==0&&_===ka&&(Bu=!0),H!==null&&(H=H.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var F=e,ne=m;_=t;var ze=l;switch(ne.tag){case 1:if(F=ne.payload,typeof F=="function"){Y=F.call(ze,Y,_);break e}Y=F;break e;case 3:F.flags=F.flags&-65537|128;case 0:if(F=ne.payload,_=typeof F=="function"?F.call(ze,Y,_):F,_==null)break e;Y=y({},Y,_);break e;case 2:Ol=!0}}_=m.callback,_!==null&&(e.flags|=64,O&&(e.flags|=8192),O=n.callbacks,O===null?n.callbacks=[_]:O.push(_))}else O={lane:_,tag:m.tag,payload:m.payload,callback:m.callback,next:null},H===null?(A=H=O,S=Y):H=H.next=O,r|=_;if(m=m.next,m===null){if(m=n.shared.pending,m===null)break;O=m,m=O.next,O.next=null,n.lastBaseUpdate=O,n.shared.pending=null}}while(!0);H===null&&(S=Y),n.baseState=S,n.firstBaseUpdate=A,n.lastBaseUpdate=H,s===null&&(n.shared.lanes=0),Yl|=r,e.lanes=r,e.memoizedState=Y}}function Fo(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Wo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Fo(l[e],t)}var Xa=N(null),Zs=N(0);function Po(e,t){e=gl,K(Zs,e),K(Xa,t),gl=e|t.baseLanes}function Lu(){K(Zs,gl),K(Xa,Xa.current)}function ku(){gl=Zs.current,k(Xa),k(Zs)}var wt=N(null),Qt=null;function Hl(e){var t=e.alternate;K(Ze,Ze.current&1),K(wt,e),Qt===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(Qt=e)}function Yu(e){K(Ze,Ze.current),K(wt,e),Qt===null&&(Qt=e)}function Io(e){e.tag===22?(K(Ze,Ze.current),K(wt,e),Qt===null&&(Qt=e)):Bl()}function Bl(){K(Ze,Ze.current),K(wt,wt.current)}function Rt(e){k(wt),Qt===e&&(Qt=null),k(Ze)}var Ze=N(0);function $s(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||$c(l)||Kc(l)))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 ol=0,de=null,Ae=null,Je=null,Ks=!1,Va=!1,xa=!1,Js=0,qn=0,Za=null,nx=0;function Xe(){throw Error(c(321))}function Gu(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Nt(e[l],t[l]))return!1;return!0}function Qu(e,t,l,a,n,s){return ol=s,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?qd:nc,xa=!1,s=l(a,n),xa=!1,Va&&(s=td(t,l,a,n)),ed(e),s}function ed(e){D.H=Ln;var t=Ae!==null&&Ae.next!==null;if(ol=0,Je=Ae=de=null,Ks=!1,qn=0,Za=null,t)throw Error(c(300));e===null||Fe||(e=e.dependencies,e!==null&&Ls(e)&&(Fe=!0))}function td(e,t,l,a){de=e;var n=0;do{if(Va&&(Za=null),qn=0,Va=!1,25<=n)throw Error(c(301));if(n+=1,Je=Ae=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}D.H=Hd,s=t(l,a)}while(Va);return s}function sx(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Hn(t):t,e=e.useState()[0],(Ae!==null?Ae.memoizedState:null)!==e&&(de.flags|=1024),t}function Xu(){var e=Js!==0;return Js=0,e}function Vu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Zu(e){if(Ks){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ks=!1}ol=0,Je=Ae=de=null,Va=!1,qn=Js=0,Za=null}function dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?de.memoizedState=Je=e:Je=Je.next=e,Je}function $e(){if(Ae===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Je===null?de.memoizedState:Je.next;if(t!==null)Je=t,Ae=e;else{if(e===null)throw de.alternate===null?Error(c(467)):Error(c(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},Je===null?de.memoizedState=Je=e:Je=Je.next=e}return Je}function Fs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hn(e){var t=qn;return qn+=1,Za===null&&(Za=[]),e=Vo(Za,e,t),t=de,(Je===null?t.memoizedState:Je.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?qd:nc),e}function Ws(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hn(e);if(e.$$typeof===G)return it(e)}throw Error(c(438,String(e)))}function $u(e){var t=null,l=de.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=de.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Fs(),de.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=$;return t.index++,l}function dl(e,t){return typeof t=="function"?t(e):t}function Ps(e){var t=$e();return Ku(t,Ae,e)}function Ku(e,t,l){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=l;var n=e.baseQueue,s=a.pending;if(s!==null){if(n!==null){var r=n.next;n.next=s.next,s.next=r}t.baseQueue=n=s,a.pending=null}if(s=e.baseState,n===null)e.memoizedState=s;else{t=n.next;var m=r=null,S=null,A=t,H=!1;do{var Y=A.lane&-536870913;if(Y!==A.lane?(ye&Y)===Y:(ol&Y)===Y){var _=A.revertLane;if(_===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),Y===ka&&(H=!0);else if((ol&_)===_){A=A.next,_===ka&&(H=!0);continue}else Y={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},S===null?(m=S=Y,r=s):S=S.next=Y,de.lanes|=_,Yl|=_;Y=A.action,xa&&l(s,Y),s=A.hasEagerState?A.eagerState:l(s,Y)}else _={lane:Y,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},S===null?(m=S=_,r=s):S=S.next=_,de.lanes|=Y,Yl|=Y;A=A.next}while(A!==null&&A!==t);if(S===null?r=s:S.next=m,!Nt(s,e.memoizedState)&&(Fe=!0,H&&(l=Ya,l!==null)))throw l;e.memoizedState=s,e.baseState=r,e.baseQueue=S,a.lastRenderedState=s}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ju(e){var t=$e(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,s=t.memoizedState;if(n!==null){l.pending=null;var r=n=n.next;do s=e(s,r.action),r=r.next;while(r!==n);Nt(s,t.memoizedState)||(Fe=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),l.lastRenderedState=s}return[s,a]}function ld(e,t,l){var a=de,n=$e(),s=Se;if(s){if(l===void 0)throw Error(c(407));l=l()}else l=t();var r=!Nt((Ae||n).memoizedState,l);if(r&&(n.memoizedState=l,Fe=!0),n=n.queue,Pu(sd.bind(null,a,n,e),[e]),n.getSnapshot!==t||r||Je!==null&&Je.memoizedState.tag&1){if(a.flags|=2048,$a(9,{destroy:void 0},nd.bind(null,a,n,l,t),null),De===null)throw Error(c(349));s||(ol&127)!==0||ad(a,t,l)}return l}function ad(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=de.updateQueue,t===null?(t=Fs(),de.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function nd(e,t,l,a){t.value=l,t.getSnapshot=a,id(t)&&ud(e)}function sd(e,t,l){return l(function(){id(t)&&ud(e)})}function id(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Nt(e,l)}catch{return!0}}function ud(e){var t=ia(e,2);t!==null&&gt(t,e,2)}function Fu(e){var t=dt();if(typeof e=="function"){var l=e;if(e=l(),xa){Cl(!0);try{l()}finally{Cl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:e},t}function cd(e,t,l,a){return e.baseState=l,Ku(e,Ae,typeof a=="function"?a:dl)}function ix(e,t,l,a,n){if(ti(e))throw Error(c(485));if(e=t.action,e!==null){var s={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){s.listeners.push(r)}};D.T!==null?l(!0):s.isTransition=!1,a(s),l=t.pending,l===null?(s.next=t.pending=s,rd(t,s)):(s.next=l.next,t.pending=l.next=s)}}function rd(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var s=D.T,r={};D.T=r;try{var m=l(n,a),S=D.S;S!==null&&S(r,m),od(e,t,m)}catch(A){Wu(e,t,A)}finally{s!==null&&r.types!==null&&(s.types=r.types),D.T=s}}else try{s=l(n,a),od(e,t,s)}catch(A){Wu(e,t,A)}}function od(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){dd(e,t,a)},function(a){return Wu(e,t,a)}):dd(e,t,l)}function dd(e,t,l){t.status="fulfilled",t.value=l,fd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,rd(e,l)))}function Wu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,fd(t),t=t.next;while(t!==a)}e.action=null}function fd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function md(e,t){return t}function hd(e,t){if(Se){var l=De.formState;if(l!==null){e:{var a=de;if(Se){if(Ue){t:{for(var n=Ue,s=Gt;n.nodeType!==8;){if(!s){n=null;break t}if(n=Xt(n.nextSibling),n===null){n=null;break t}}s=n.data,n=s==="F!"||s==="F"?n:null}if(n){Ue=Xt(n.nextSibling),a=n.data==="F!";break e}}zl(a)}a=!1}a&&(t=l[0])}}return l=dt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:md,lastRenderedState:t},l.queue=a,l=Dd.bind(null,de,a),a.dispatch=l,a=Fu(!1),s=ac.bind(null,de,!1,a.queue),a=dt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=ix.bind(null,de,n,s,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function xd(e){var t=$e();return vd(t,Ae,e)}function vd(e,t,l){if(t=Ku(e,t,md)[0],e=Ps(dl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Hn(t)}catch(r){throw r===Ga?Gs:r}else a=t;t=$e();var n=t.queue,s=n.dispatch;return l!==t.memoizedState&&(de.flags|=2048,$a(9,{destroy:void 0},ux.bind(null,n,l),null)),[a,s,e]}function ux(e,t){e.action=t}function pd(e){var t=$e(),l=Ae;if(l!==null)return vd(t,l,e);$e(),t=t.memoizedState,l=$e();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function $a(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=de.updateQueue,t===null&&(t=Fs(),de.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function gd(){return $e().memoizedState}function Is(e,t,l,a){var n=dt();de.flags|=e,n.memoizedState=$a(1|t,{destroy:void 0},l,a===void 0?null:a)}function ei(e,t,l,a){var n=$e();a=a===void 0?null:a;var s=n.memoizedState.inst;Ae!==null&&a!==null&&Gu(a,Ae.memoizedState.deps)?n.memoizedState=$a(t,s,l,a):(de.flags|=e,n.memoizedState=$a(1|t,s,l,a))}function yd(e,t){Is(8390656,8,e,t)}function Pu(e,t){ei(2048,8,e,t)}function cx(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=Fs(),de.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function bd(e){var t=$e().memoizedState;return cx({ref:t,nextImpl:e}),function(){if((Re&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Sd(e,t){return ei(4,2,e,t)}function jd(e,t){return ei(4,4,e,t)}function Nd(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ed(e,t,l){l=l!=null?l.concat([e]):null,ei(4,4,Nd.bind(null,t,e),l)}function Iu(){}function wd(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Gu(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Rd(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Gu(t,a[1]))return a[0];if(a=e(),xa){Cl(!0);try{e()}finally{Cl(!1)}}return l.memoizedState=[a,t],a}function ec(e,t,l){return l===void 0||(ol&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Tf(),de.lanes|=e,Yl|=e,l)}function Cd(e,t,l,a){return Nt(l,t)?l:Xa.current!==null?(e=ec(e,l,a),Nt(e,t)||(Fe=!0),e):(ol&42)===0||(ol&1073741824)!==0&&(ye&261930)===0?(Fe=!0,e.memoizedState=l):(e=Tf(),de.lanes|=e,Yl|=e,t)}function Td(e,t,l,a,n){var s=V.p;V.p=s!==0&&8>s?s:8;var r=D.T,m={};D.T=m,ac(e,!1,t,l);try{var S=n(),A=D.S;if(A!==null&&A(m,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var H=ax(S,a);Bn(e,t,H,Mt(e))}else Bn(e,t,a,Mt(e))}catch(Y){Bn(e,t,{then:function(){},status:"rejected",reason:Y},Mt())}finally{V.p=s,r!==null&&m.types!==null&&(r.types=m.types),D.T=r}}function rx(){}function tc(e,t,l,a){if(e.tag!==5)throw Error(c(476));var n=Md(e).queue;Td(e,n,t,I,l===null?rx:function(){return Ad(e),l(a)})}function Md(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:I},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ad(e){var t=Md(e);t.next===null&&(t=e.alternate.memoizedState),Bn(e,t.next.queue,{},Mt())}function lc(){return it(ts)}function _d(){return $e().memoizedState}function zd(){return $e().memoizedState}function ox(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Mt();e=Ul(l);var a=ql(t,e,l);a!==null&&(gt(a,t,l),Dn(a,t,l)),t={cache:_u()},e.payload=t;return}t=t.return}}function dx(e,t,l){var a=Mt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ti(e)?Od(t,l):(l=bu(e,t,l,a),l!==null&&(gt(l,e,a),Ud(l,t,a)))}function Dd(e,t,l){var a=Mt();Bn(e,t,l,a)}function Bn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ti(e))Od(t,n);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var r=t.lastRenderedState,m=s(r,l);if(n.hasEagerState=!0,n.eagerState=m,Nt(m,r))return Us(e,t,n,0),De===null&&Os(),!1}catch{}finally{}if(l=bu(e,t,n,a),l!==null)return gt(l,e,a),Ud(l,t,a),!0}return!1}function ac(e,t,l,a){if(a={lane:2,revertLane:Uc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ti(e)){if(t)throw Error(c(479))}else t=bu(e,l,a,2),t!==null&&gt(t,e,2)}function ti(e){var t=e.alternate;return e===de||t!==null&&t===de}function Od(e,t){Va=Ks=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Ud(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Lr(e,l)}}var Ln={readContext:it,use:Ws,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};Ln.useEffectEvent=Xe;var qd={readContext:it,use:Ws,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:yd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Is(4194308,4,Nd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){Is(4,2,e,t)},useMemo:function(e,t){var l=dt();t=t===void 0?null:t;var a=e();if(xa){Cl(!0);try{e()}finally{Cl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=dt();if(l!==void 0){var n=l(t);if(xa){Cl(!0);try{l(t)}finally{Cl(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=dx.bind(null,de,e),[a.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:function(e){e=Fu(e);var t=e.queue,l=Dd.bind(null,de,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Iu,useDeferredValue:function(e,t){var l=dt();return ec(l,e,t)},useTransition:function(){var e=Fu(!1);return e=Td.bind(null,de,e.queue,!0,!1),dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=de,n=dt();if(Se){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),De===null)throw Error(c(349));(ye&127)!==0||ad(a,t,l)}n.memoizedState=l;var s={value:l,getSnapshot:t};return n.queue=s,yd(sd.bind(null,a,s,e),[e]),a.flags|=2048,$a(9,{destroy:void 0},nd.bind(null,a,s,l,t),null),l},useId:function(){var e=dt(),t=De.identifierPrefix;if(Se){var l=It,a=Pt;l=(a&~(1<<32-jt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Js++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=nx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:lc,useFormState:hd,useActionState:hd,useOptimistic:function(e){var t=dt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=ac.bind(null,de,!0,l),l.dispatch=t,[e,t]},useMemoCache:$u,useCacheRefresh:function(){return dt().memoizedState=ox.bind(null,de)},useEffectEvent:function(e){var t=dt(),l={impl:e};return t.memoizedState=l,function(){if((Re&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},nc={readContext:it,use:Ws,useCallback:wd,useContext:it,useEffect:Pu,useImperativeHandle:Ed,useInsertionEffect:Sd,useLayoutEffect:jd,useMemo:Rd,useReducer:Ps,useRef:gd,useState:function(){return Ps(dl)},useDebugValue:Iu,useDeferredValue:function(e,t){var l=$e();return Cd(l,Ae.memoizedState,e,t)},useTransition:function(){var e=Ps(dl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Hn(e),t]},useSyncExternalStore:ld,useId:_d,useHostTransitionStatus:lc,useFormState:xd,useActionState:xd,useOptimistic:function(e,t){var l=$e();return cd(l,Ae,e,t)},useMemoCache:$u,useCacheRefresh:zd};nc.useEffectEvent=bd;var Hd={readContext:it,use:Ws,useCallback:wd,useContext:it,useEffect:Pu,useImperativeHandle:Ed,useInsertionEffect:Sd,useLayoutEffect:jd,useMemo:Rd,useReducer:Ju,useRef:gd,useState:function(){return Ju(dl)},useDebugValue:Iu,useDeferredValue:function(e,t){var l=$e();return Ae===null?ec(l,e,t):Cd(l,Ae.memoizedState,e,t)},useTransition:function(){var e=Ju(dl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Hn(e),t]},useSyncExternalStore:ld,useId:_d,useHostTransitionStatus:lc,useFormState:pd,useActionState:pd,useOptimistic:function(e,t){var l=$e();return Ae!==null?cd(l,Ae,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:$u,useCacheRefresh:zd};Hd.useEffectEvent=bd;function sc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:y({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var ic={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Mt(),n=Ul(a);n.payload=t,l!=null&&(n.callback=l),t=ql(e,n,a),t!==null&&(gt(t,e,a),Dn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Mt(),n=Ul(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=ql(e,n,a),t!==null&&(gt(t,e,a),Dn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Mt(),a=Ul(l);a.tag=2,t!=null&&(a.callback=t),t=ql(e,a,l),t!==null&&(gt(t,e,l),Dn(t,e,l))}};function Bd(e,t,l,a,n,s,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,r):t.prototype&&t.prototype.isPureReactComponent?!wn(l,a)||!wn(n,s):!0}function Ld(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&ic.enqueueReplaceState(t,t.state,null)}function va(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=y({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function kd(e){Ds(e)}function Yd(e){console.error(e)}function Gd(e){Ds(e)}function li(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Qd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function uc(e,t,l){return l=Ul(l),l.tag=3,l.payload={element:null},l.callback=function(){li(e,t)},l}function Xd(e){return e=Ul(e),e.tag=3,e}function Vd(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var s=a.value;e.payload=function(){return n(s)},e.callback=function(){Qd(t,l,a)}}var r=l.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Qd(t,l,a),typeof n!="function"&&(Gl===null?Gl=new Set([this]):Gl.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function fx(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&La(t,l,n,!0),l=wt.current,l!==null){switch(l.tag){case 31:case 13:return Qt===null?hi():l.alternate===null&&Ve===0&&(Ve=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Qs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),zc(e,a,n)),!1;case 22:return l.flags|=65536,a===Qs?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),zc(e,a,n)),!1}throw Error(c(435,l.tag))}return zc(e,a,n),hi(),!1}if(Se)return t=wt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Ru&&(e=Error(c(422),{cause:a}),Tn(Lt(e,l)))):(a!==Ru&&(t=Error(c(423),{cause:a}),Tn(Lt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Lt(a,l),n=uc(e.stateNode,a,n),Hu(e,n),Ve!==4&&(Ve=2)),!1;var s=Error(c(520),{cause:a});if(s=Lt(s,l),$n===null?$n=[s]:$n.push(s),Ve!==4&&(Ve=2),t===null)return!0;a=Lt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=uc(l.stateNode,a,e),Hu(l,e),!1;case 1:if(t=l.type,s=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Gl===null||!Gl.has(s))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Xd(n),Vd(n,e,l,a),Hu(l,n),!1}l=l.return}while(l!==null);return!1}var cc=Error(c(461)),Fe=!1;function ut(e,t,l,a){t.child=e===null?Jo(t,null,l,a):ha(t,e.child,l,a)}function Zd(e,t,l,a,n){l=l.render;var s=t.ref;if("ref"in a){var r={};for(var m in a)m!=="ref"&&(r[m]=a[m])}else r=a;return oa(t),a=Qu(e,t,l,r,s,n),m=Xu(),e!==null&&!Fe?(Vu(e,t,n),fl(e,t,n)):(Se&&m&&Eu(t),t.flags|=1,ut(e,t,a,n),t.child)}function $d(e,t,l,a,n){if(e===null){var s=l.type;return typeof s=="function"&&!Su(s)&&s.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=s,Kd(e,t,s,a,n)):(e=Hs(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!vc(e,n)){var r=s.memoizedProps;if(l=l.compare,l=l!==null?l:wn,l(r,a)&&e.ref===t.ref)return fl(e,t,n)}return t.flags|=1,e=il(s,a),e.ref=t.ref,e.return=t,t.child=e}function Kd(e,t,l,a,n){if(e!==null){var s=e.memoizedProps;if(wn(s,a)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=a=s,vc(e,n))(e.flags&131072)!==0&&(Fe=!0);else return t.lanes=e.lanes,fl(e,t,n)}return rc(e,t,l,a,n)}function Jd(e,t,l,a){var n=a.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~s}else a=0,t.child=null;return Fd(e,t,s,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ys(t,s!==null?s.cachePool:null),s!==null?Po(t,s):Lu(),Io(t);else return a=t.lanes=536870912,Fd(e,t,s!==null?s.baseLanes|l:l,l,a)}else s!==null?(Ys(t,s.cachePool),Po(t,s),Bl(),t.memoizedState=null):(e!==null&&Ys(t,null),Lu(),Bl());return ut(e,t,n,l),t.child}function kn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fd(e,t,l,a,n){var s=Du();return s=s===null?null:{parent:Ke._currentValue,pool:s},t.memoizedState={baseLanes:l,cachePool:s},e!==null&&Ys(t,null),Lu(),Io(t),e!==null&&La(e,t,a,!0),t.childLanes=n,null}function ai(e,t){return t=si({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Wd(e,t,l){return ha(t,e.child,null,l),e=ai(t,t.pendingProps),e.flags|=2,Rt(t),t.memoizedState=null,e}function mx(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(a.mode==="hidden")return e=ai(t,a),t.lanes=536870912,kn(null,e);if(Yu(t),(e=Ue)?(e=om(e,Gt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Al!==null?{id:Pt,overflow:It}:null,retryLane:536870912,hydrationErrors:null},l=Oo(e),l.return=t,t.child=l,st=t,Ue=null)):e=null,e===null)throw zl(t);return t.lanes=536870912,null}return ai(t,a)}var s=e.memoizedState;if(s!==null){var r=s.dehydrated;if(Yu(t),n)if(t.flags&256)t.flags&=-257,t=Wd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Fe||La(e,t,l,!1),n=(l&e.childLanes)!==0,Fe||n){if(a=De,a!==null&&(r=kr(a,l),r!==0&&r!==s.retryLane))throw s.retryLane=r,ia(e,r),gt(a,e,r),cc;hi(),t=Wd(e,t,l)}else e=s.treeContext,Ue=Xt(r.nextSibling),st=t,Se=!0,_l=null,Gt=!1,e!==null&&Ho(t,e),t=ai(t,a),t.flags|=4096;return t}return e=il(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ni(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function rc(e,t,l,a,n){return oa(t),l=Qu(e,t,l,a,void 0,n),a=Xu(),e!==null&&!Fe?(Vu(e,t,n),fl(e,t,n)):(Se&&a&&Eu(t),t.flags|=1,ut(e,t,l,n),t.child)}function Pd(e,t,l,a,n,s){return oa(t),t.updateQueue=null,l=td(t,a,l,n),ed(e),a=Xu(),e!==null&&!Fe?(Vu(e,t,s),fl(e,t,s)):(Se&&a&&Eu(t),t.flags|=1,ut(e,t,l,s),t.child)}function Id(e,t,l,a,n){if(oa(t),t.stateNode===null){var s=Ua,r=l.contextType;typeof r=="object"&&r!==null&&(s=it(r)),s=new l(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ic,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},Uu(t),r=l.contextType,s.context=typeof r=="object"&&r!==null?it(r):Ua,s.state=t.memoizedState,r=l.getDerivedStateFromProps,typeof r=="function"&&(sc(t,l,r,a),s.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(r=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),r!==s.state&&ic.enqueueReplaceState(s,s.state,null),Un(t,a,s,n),On(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var m=t.memoizedProps,S=va(l,m);s.props=S;var A=s.context,H=l.contextType;r=Ua,typeof H=="object"&&H!==null&&(r=it(H));var Y=l.getDerivedStateFromProps;H=typeof Y=="function"||typeof s.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,H||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(m||A!==r)&&Ld(t,s,a,r),Ol=!1;var _=t.memoizedState;s.state=_,Un(t,a,s,n),On(),A=t.memoizedState,m||_!==A||Ol?(typeof Y=="function"&&(sc(t,l,Y,a),A=t.memoizedState),(S=Ol||Bd(t,l,S,a,_,A,r))?(H||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=A),s.props=a,s.state=A,s.context=r,a=S):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,qu(e,t),r=t.memoizedProps,H=va(l,r),s.props=H,Y=t.pendingProps,_=s.context,A=l.contextType,S=Ua,typeof A=="object"&&A!==null&&(S=it(A)),m=l.getDerivedStateFromProps,(A=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(r!==Y||_!==S)&&Ld(t,s,a,S),Ol=!1,_=t.memoizedState,s.state=_,Un(t,a,s,n),On();var O=t.memoizedState;r!==Y||_!==O||Ol||e!==null&&e.dependencies!==null&&Ls(e.dependencies)?(typeof m=="function"&&(sc(t,l,m,a),O=t.memoizedState),(H=Ol||Bd(t,l,H,a,_,O,S)||e!==null&&e.dependencies!==null&&Ls(e.dependencies))?(A||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,O,S),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,O,S)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),s.props=a,s.state=O,s.context=S,a=H):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,ni(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=ha(t,e.child,null,n),t.child=ha(t,null,l,n)):ut(e,t,l,n),t.memoizedState=s.state,e=t.child):e=fl(e,t,n),e}function ef(e,t,l,a){return ca(),t.flags|=256,ut(e,t,l,a),t.child}var oc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dc(e){return{baseLanes:e,cachePool:Qo()}}function fc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Tt),e}function tf(e,t,l){var a=t.pendingProps,n=!1,s=(t.flags&128)!==0,r;if((r=s)||(r=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),r&&(n=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(n?Hl(t):Bl(),(e=Ue)?(e=om(e,Gt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Al!==null?{id:Pt,overflow:It}:null,retryLane:536870912,hydrationErrors:null},l=Oo(e),l.return=t,t.child=l,st=t,Ue=null)):e=null,e===null)throw zl(t);return Kc(e)?t.lanes=32:t.lanes=536870912,null}var m=a.children;return a=a.fallback,n?(Bl(),n=t.mode,m=si({mode:"hidden",children:m},n),a=ua(a,n,l,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=dc(l),a.childLanes=fc(e,r,l),t.memoizedState=oc,kn(null,a)):(Hl(t),mc(t,m))}var S=e.memoizedState;if(S!==null&&(m=S.dehydrated,m!==null)){if(s)t.flags&256?(Hl(t),t.flags&=-257,t=hc(e,t,l)):t.memoizedState!==null?(Bl(),t.child=e.child,t.flags|=128,t=null):(Bl(),m=a.fallback,n=t.mode,a=si({mode:"visible",children:a.children},n),m=ua(m,n,l,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,ha(t,e.child,null,l),a=t.child,a.memoizedState=dc(l),a.childLanes=fc(e,r,l),t.memoizedState=oc,t=kn(null,a));else if(Hl(t),Kc(m)){if(r=m.nextSibling&&m.nextSibling.dataset,r)var A=r.dgst;r=A,a=Error(c(419)),a.stack="",a.digest=r,Tn({value:a,source:null,stack:null}),t=hc(e,t,l)}else if(Fe||La(e,t,l,!1),r=(l&e.childLanes)!==0,Fe||r){if(r=De,r!==null&&(a=kr(r,l),a!==0&&a!==S.retryLane))throw S.retryLane=a,ia(e,a),gt(r,e,a),cc;$c(m)||hi(),t=hc(e,t,l)}else $c(m)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,Ue=Xt(m.nextSibling),st=t,Se=!0,_l=null,Gt=!1,e!==null&&Ho(t,e),t=mc(t,a.children),t.flags|=4096);return t}return n?(Bl(),m=a.fallback,n=t.mode,S=e.child,A=S.sibling,a=il(S,{mode:"hidden",children:a.children}),a.subtreeFlags=S.subtreeFlags&65011712,A!==null?m=il(A,m):(m=ua(m,n,l,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,kn(null,a),a=t.child,m=e.child.memoizedState,m===null?m=dc(l):(n=m.cachePool,n!==null?(S=Ke._currentValue,n=n.parent!==S?{parent:S,pool:S}:n):n=Qo(),m={baseLanes:m.baseLanes|l,cachePool:n}),a.memoizedState=m,a.childLanes=fc(e,r,l),t.memoizedState=oc,kn(e.child,a)):(Hl(t),l=e.child,e=l.sibling,l=il(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=l,t.memoizedState=null,l)}function mc(e,t){return t=si({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function si(e,t){return e=Et(22,e,null,t),e.lanes=0,e}function hc(e,t,l){return ha(t,e.child,null,l),e=mc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Mu(e.return,t,l)}function xc(e,t,l,a,n,s){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:s}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=a,r.tail=l,r.tailMode=n,r.treeForkCount=s)}function af(e,t,l){var a=t.pendingProps,n=a.revealOrder,s=a.tail;a=a.children;var r=Ze.current,m=(r&2)!==0;if(m?(r=r&1|2,t.flags|=128):r&=1,K(Ze,r),ut(e,t,a,l),a=Se?Cn:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lf(e,l,t);else if(e.tag===19)lf(e,l,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(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&$s(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),xc(t,!1,n,l,s,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&$s(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}xc(t,!0,l,null,s,a);break;case"together":xc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function fl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Yl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(La(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,l=il(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=il(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function vc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ls(e)))}function hx(e,t,l){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),Dl(t,Ke,e.memoizedState.cache),ca();break;case 27:case 5:wl(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:Dl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Hl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?tf(e,t,l):(Hl(t),e=fl(e,t,l),e!==null?e.sibling:null);Hl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(La(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return af(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),K(Ze,Ze.current),a)break;return null;case 22:return t.lanes=0,Jd(e,t,l,t.pendingProps);case 24:Dl(t,Ke,e.memoizedState.cache)}return fl(e,t,l)}function nf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Fe=!0;else{if(!vc(e,l)&&(t.flags&128)===0)return Fe=!1,hx(e,t,l);Fe=(e.flags&131072)!==0}else Fe=!1,Se&&(t.flags&1048576)!==0&&qo(t,Cn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=fa(t.elementType),t.type=e,typeof e=="function")Su(e)?(a=va(e,a),t.tag=1,t=Id(null,t,e,a,l)):(t.tag=0,t=rc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===te){t.tag=11,t=Zd(null,t,e,a,l);break e}else if(n===ee){t.tag=14,t=$d(null,t,e,a,l);break e}}throw t=z(e)||e,Error(c(306,t,""))}}return t;case 0:return rc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=va(a,t.pendingProps),Id(e,t,a,n,l);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var s=t.memoizedState;n=s.element,qu(e,t),Un(t,a,null,l);var r=t.memoizedState;if(a=r.cache,Dl(t,Ke,a),a!==s.cache&&Au(t,[Ke],l,!0),On(),a=r.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=ef(e,t,a,l);break e}else if(a!==n){n=Lt(Error(c(424)),t),Tn(n),t=ef(e,t,a,l);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(Ue=Xt(e.firstChild),st=t,Se=!0,_l=null,Gt=!0,l=Jo(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ca(),a===n){t=fl(e,t,l);break e}ut(e,t,a,l)}t=t.child}return t;case 26:return ni(e,t),e===null?(l=vm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Se||(l=t.type,e=t.pendingProps,a=Si(me.current).createElement(l),a[nt]=t,a[ft]=e,ct(a,l,e),lt(a),t.stateNode=a):t.memoizedState=vm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wl(t),e===null&&Se&&(a=t.stateNode=mm(t.type,t.pendingProps,me.current),st=t,Gt=!0,n=Ue,Zl(t.type)?(Jc=n,Ue=Xt(a.firstChild)):Ue=n),ut(e,t,t.pendingProps.children,l),ni(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((n=a=Ue)&&(a=Xx(a,t.type,t.pendingProps,Gt),a!==null?(t.stateNode=a,st=t,Ue=Xt(a.firstChild),Gt=!1,n=!0):n=!1),n||zl(t)),wl(t),n=t.type,s=t.pendingProps,r=e!==null?e.memoizedProps:null,a=s.children,Xc(n,s)?a=null:r!==null&&Xc(n,r)&&(t.flags|=32),t.memoizedState!==null&&(n=Qu(e,t,sx,null,null,l),ts._currentValue=n),ni(e,t),ut(e,t,a,l),t.child;case 6:return e===null&&Se&&((e=l=Ue)&&(l=Vx(l,t.pendingProps,Gt),l!==null?(t.stateNode=l,st=t,Ue=null,e=!0):e=!1),e||zl(t)),null;case 13:return tf(e,t,l);case 4:return tt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ha(t,null,a,l):ut(e,t,a,l),t.child;case 11:return Zd(e,t,t.type,t.pendingProps,l);case 7:return ut(e,t,t.pendingProps,l),t.child;case 8:return ut(e,t,t.pendingProps.children,l),t.child;case 12:return ut(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Dl(t,t.type,a.value),ut(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,oa(t),n=it(n),a=a(n),t.flags|=1,ut(e,t,a,l),t.child;case 14:return $d(e,t,t.type,t.pendingProps,l);case 15:return Kd(e,t,t.type,t.pendingProps,l);case 19:return af(e,t,l);case 31:return mx(e,t,l);case 22:return Jd(e,t,l,t.pendingProps);case 24:return oa(t),a=it(Ke),e===null?(n=Du(),n===null&&(n=De,s=_u(),n.pooledCache=s,s.refCount++,s!==null&&(n.pooledCacheLanes|=l),n=s),t.memoizedState={parent:a,cache:n},Uu(t),Dl(t,Ke,n)):((e.lanes&l)!==0&&(qu(e,t),Un(t,null,null,l),On()),n=e.memoizedState,s=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Dl(t,Ke,a)):(a=s.cache,Dl(t,Ke,a),a!==n.cache&&Au(t,[Ke],l,!0))),ut(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ml(e){e.flags|=4}function pc(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(zf())e.flags|=8192;else throw ma=Qs,Ou}else e.flags&=-16777217}function sf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Sm(t))if(zf())e.flags|=8192;else throw ma=Qs,Ou}function ii(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Hr():536870912,e.lanes|=t,Wa|=t)}function Yn(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function xx(e,t,l){var a=t.pendingProps;switch(wu(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 l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),rl(Ke),Be(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ba(t)?ml(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Cu())),qe(t),null;case 26:var n=t.type,s=t.memoizedState;return e===null?(ml(t),s!==null?(qe(t),sf(t,s)):(qe(t),pc(t,n,null,a,l))):s?s!==e.memoizedState?(ml(t),qe(t),sf(t,s)):(qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ml(t),qe(t),pc(t,n,e,a,l)),null;case 27:if(ea(t),l=me.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ml(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return qe(t),null}e=J.current,Ba(t)?Bo(t):(e=mm(n,a,l),t.stateNode=e,ml(t))}return qe(t),null;case 5:if(ea(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ml(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return qe(t),null}if(s=J.current,Ba(t))Bo(t);else{var r=Si(me.current);switch(s){case 1:s=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:s=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":s=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":s=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":s=r.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof a.is=="string"?r.createElement("select",{is:a.is}):r.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s=typeof a.is=="string"?r.createElement(n,{is:a.is}):r.createElement(n)}}s[nt]=t,s[ft]=a;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)s.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=s;e:switch(ct(s,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ml(t)}}return qe(t),pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ml(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=me.current,Ba(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=st,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[nt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||lm(e.nodeValue,l)),e||zl(t,!0)}else e=Si(e).createTextNode(a),e[nt]=t,t.stateNode=e}return qe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ba(t),l!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[nt]=t}else ca(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else l=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Rt(t),t):(Rt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return qe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ba(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(c(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));n[nt]=t}else ca(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),n=!1}else n=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Rt(t),t):(Rt(t),null)}return Rt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ii(t,t.updateQueue),qe(t),null);case 4:return Be(),e===null&&Lc(t.stateNode.containerInfo),qe(t),null;case 10:return rl(t.type),qe(t),null;case 19:if(k(Ze),a=t.memoizedState,a===null)return qe(t),null;if(n=(t.flags&128)!==0,s=a.rendering,s===null)if(n)Yn(a,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=$s(e),s!==null){for(t.flags|=128,Yn(a,!1),e=s.updateQueue,t.updateQueue=e,ii(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Do(l,e),l=l.sibling;return K(Ze,Ze.current&1|2),Se&&ul(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&bt()>di&&(t.flags|=128,n=!0,Yn(a,!1),t.lanes=4194304)}else{if(!n)if(e=$s(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ii(t,e),Yn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!Se)return qe(t),null}else 2*bt()-a.renderingStartTime>di&&l!==536870912&&(t.flags|=128,n=!0,Yn(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(e=a.last,e!==null?e.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=bt(),e.sibling=null,l=Ze.current,K(Ze,n?l&1|2:l&1),Se&&ul(t,a.treeForkCount),e):(qe(t),null);case 22:case 23:return Rt(t),ku(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),l=t.updateQueue,l!==null&&ii(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&k(da),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),rl(Ke),qe(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function vx(e,t){switch(wu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rl(Ke),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ea(t),null;case 31:if(t.memoizedState!==null){if(Rt(t),t.alternate===null)throw Error(c(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Rt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(Ze),null;case 4:return Be(),null;case 10:return rl(t.type),null;case 22:case 23:return Rt(t),ku(),e!==null&&k(da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return rl(Ke),null;case 25:return null;default:return null}}function uf(e,t){switch(wu(t),t.tag){case 3:rl(Ke),Be();break;case 26:case 27:case 5:ea(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&Rt(t);break;case 13:Rt(t);break;case 19:k(Ze);break;case 10:rl(t.type);break;case 22:case 23:Rt(t),ku(),e!==null&&k(da);break;case 24:rl(Ke)}}function Gn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var s=l.create,r=l.inst;a=s(),r.destroy=a}l=l.next}while(l!==n)}}catch(m){Te(t,t.return,m)}}function Ll(e,t,l){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){var r=a.inst,m=r.destroy;if(m!==void 0){r.destroy=void 0,n=t;var S=l,A=m;try{A()}catch(H){Te(n,S,H)}}}a=a.next}while(a!==s)}}catch(H){Te(t,t.return,H)}}function cf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Wo(t,l)}catch(a){Te(e,e.return,a)}}}function rf(e,t,l){l.props=va(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Te(e,t,a)}}function Qn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Te(e,t,n)}}function el(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Te(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Te(e,t,n)}else l.current=null}function of(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Te(e,e.return,n)}}function gc(e,t,l){try{var a=e.stateNode;Bx(a,e.type,l,t),a[ft]=t}catch(n){Te(e,e.return,n)}}function df(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zl(e.type)||e.tag===4}function yc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||df(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&&Zl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=nl));else if(a!==4&&(a===27&&Zl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(bc(e,t,l),e=e.sibling;e!==null;)bc(e,t,l),e=e.sibling}function ui(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Zl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ui(e,t,l),e=e.sibling;e!==null;)ui(e,t,l),e=e.sibling}function ff(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);ct(t,a,l),t[nt]=e,t[ft]=l}catch(s){Te(e,e.return,s)}}var hl=!1,We=!1,Sc=!1,mf=typeof WeakSet=="function"?WeakSet:Set,at=null;function px(e,t){if(e=e.containerInfo,Gc=Ti,e=Eo(e),hu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{l.nodeType,s.nodeType}catch{l=null;break e}var r=0,m=-1,S=-1,A=0,H=0,Y=e,_=null;t:for(;;){for(var O;Y!==l||n!==0&&Y.nodeType!==3||(m=r+n),Y!==s||a!==0&&Y.nodeType!==3||(S=r+a),Y.nodeType===3&&(r+=Y.nodeValue.length),(O=Y.firstChild)!==null;)_=Y,Y=O;for(;;){if(Y===e)break t;if(_===l&&++A===n&&(m=r),_===s&&++H===a&&(S=r),(O=Y.nextSibling)!==null)break;Y=_,_=Y.parentNode}Y=O}l=m===-1||S===-1?null:{start:m,end:S}}else l=null}l=l||{start:0,end:0}}else l=null;for(Qc={focusedElem:e,selectionRange:l},Ti=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){switch(t=at,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,l=t,n=s.memoizedProps,s=s.memoizedState,a=l.stateNode;try{var F=va(l.type,n);e=a.getSnapshotBeforeUpdate(F,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(ne){Te(l,l.return,ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Zc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Zc(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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}}function hf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:vl(e,l),a&4&&Gn(5,l);break;case 1:if(vl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(r){Te(l,l.return,r)}else{var n=va(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){Te(l,l.return,r)}}a&64&&cf(l),a&512&&Qn(l,l.return);break;case 3:if(vl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Wo(e,t)}catch(r){Te(l,l.return,r)}}break;case 27:t===null&&a&4&&ff(l);case 26:case 5:vl(e,l),t===null&&a&4&&of(l),a&512&&Qn(l,l.return);break;case 12:vl(e,l);break;case 31:vl(e,l),a&4&&pf(e,l);break;case 13:vl(e,l),a&4&&gf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Rx.bind(null,l),Zx(e,l))));break;case 22:if(a=l.memoizedState!==null||hl,!a){t=t!==null&&t.memoizedState!==null||We,n=hl;var s=We;hl=a,(We=t)&&!s?pl(e,l,(l.subtreeFlags&8772)!==0):vl(e,l),hl=n,We=s}break;case 30:break;default:vl(e,l)}}function xf(e){var t=e.alternate;t!==null&&(e.alternate=null,xf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Wi(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 ke=null,ht=!1;function xl(e,t,l){for(l=l.child;l!==null;)vf(e,t,l),l=l.sibling}function vf(e,t,l){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(mn,l)}catch{}switch(l.tag){case 26:We||el(l,t),xl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:We||el(l,t);var a=ke,n=ht;Zl(l.type)&&(ke=l.stateNode,ht=!1),xl(e,t,l),Pn(l.stateNode),ke=a,ht=n;break;case 5:We||el(l,t);case 6:if(a=ke,n=ht,ke=null,xl(e,t,l),ke=a,ht=n,ke!==null)if(ht)try{(ke.nodeType===9?ke.body:ke.nodeName==="HTML"?ke.ownerDocument.body:ke).removeChild(l.stateNode)}catch(s){Te(l,t,s)}else try{ke.removeChild(l.stateNode)}catch(s){Te(l,t,s)}break;case 18:ke!==null&&(ht?(e=ke,cm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),sn(e)):cm(ke,l.stateNode));break;case 4:a=ke,n=ht,ke=l.stateNode.containerInfo,ht=!0,xl(e,t,l),ke=a,ht=n;break;case 0:case 11:case 14:case 15:Ll(2,l,t),We||Ll(4,l,t),xl(e,t,l);break;case 1:We||(el(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&rf(l,t,a)),xl(e,t,l);break;case 21:xl(e,t,l);break;case 22:We=(a=We)||l.memoizedState!==null,xl(e,t,l),We=a;break;default:xl(e,t,l)}}function pf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{sn(e)}catch(l){Te(t,t.return,l)}}}function gf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{sn(e)}catch(l){Te(t,t.return,l)}}function gx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new mf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new mf),t;default:throw Error(c(435,e.tag))}}function ci(e,t){var l=gx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Cx.bind(null,e,a);a.then(n,n)}})}function xt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],s=e,r=t,m=r;e:for(;m!==null;){switch(m.tag){case 27:if(Zl(m.type)){ke=m.stateNode,ht=!1;break e}break;case 5:ke=m.stateNode,ht=!1;break e;case 3:case 4:ke=m.stateNode.containerInfo,ht=!0;break e}m=m.return}if(ke===null)throw Error(c(160));vf(s,r,n),ke=null,ht=!1,s=n.alternate,s!==null&&(s.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yf(t,e),t=t.sibling}var Kt=null;function yf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xt(t,e),vt(e),a&4&&(Ll(3,e,e.return),Gn(3,e),Ll(5,e,e.return));break;case 1:xt(t,e),vt(e),a&512&&(We||l===null||el(l,l.return)),a&64&&hl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Kt;if(xt(t,e),vt(e),a&512&&(We||l===null||el(l,l.return)),a&4){var s=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":s=n.getElementsByTagName("title")[0],(!s||s[vn]||s[nt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=n.createElement(a),n.head.insertBefore(s,n.querySelector("head > title"))),ct(s,a,l),s[nt]=e,lt(s),a=s;break e;case"link":var r=ym("link","href",n).get(a+(l.href||""));if(r){for(var m=0;m<r.length;m++)if(s=r[m],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){r.splice(m,1);break t}}s=n.createElement(a),ct(s,a,l),n.head.appendChild(s);break;case"meta":if(r=ym("meta","content",n).get(a+(l.content||""))){for(m=0;m<r.length;m++)if(s=r[m],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){r.splice(m,1);break t}}s=n.createElement(a),ct(s,a,l),n.head.appendChild(s);break;default:throw Error(c(468,a))}s[nt]=e,lt(s),a=s}e.stateNode=a}else bm(n,e.type,e.stateNode);else e.stateNode=gm(n,a,e.memoizedProps);else s!==a?(s===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):s.count--,a===null?bm(n,e.type,e.stateNode):gm(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&gc(e,e.memoizedProps,l.memoizedProps)}break;case 27:xt(t,e),vt(e),a&512&&(We||l===null||el(l,l.return)),l!==null&&a&4&&gc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(xt(t,e),vt(e),a&512&&(We||l===null||el(l,l.return)),e.flags&32){n=e.stateNode;try{Ta(n,"")}catch(F){Te(e,e.return,F)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,gc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Sc=!0);break;case 6:if(xt(t,e),vt(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(F){Te(e,e.return,F)}}break;case 3:if(Ei=null,n=Kt,Kt=ji(t.containerInfo),xt(t,e),Kt=n,vt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{sn(t.containerInfo)}catch(F){Te(e,e.return,F)}Sc&&(Sc=!1,bf(e));break;case 4:a=Kt,Kt=ji(e.stateNode.containerInfo),xt(t,e),vt(e),Kt=a;break;case 12:xt(t,e),vt(e);break;case 31:xt(t,e),vt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ci(e,a)));break;case 13:xt(t,e),vt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(oi=bt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ci(e,a)));break;case 22:n=e.memoizedState!==null;var S=l!==null&&l.memoizedState!==null,A=hl,H=We;if(hl=A||n,We=H||S,xt(t,e),We=H,hl=A,vt(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||S||hl||We||pa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){S=l=t;try{if(s=S.stateNode,n)r=s.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{m=S.stateNode;var Y=S.memoizedProps.style,_=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;m.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(F){Te(S,S.return,F)}}}else if(t.tag===6){if(l===null){S=t;try{S.stateNode.nodeValue=n?"":S.memoizedProps}catch(F){Te(S,S.return,F)}}}else if(t.tag===18){if(l===null){S=t;try{var O=S.stateNode;n?rm(O,!0):rm(S.stateNode,!1)}catch(F){Te(S,S.return,F)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,ci(e,l))));break;case 19:xt(t,e),vt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ci(e,a)));break;case 30:break;case 21:break;default:xt(t,e),vt(e)}}function vt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(df(a)){l=a;break}a=a.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var n=l.stateNode,s=yc(e);ui(e,s,n);break;case 5:var r=l.stateNode;l.flags&32&&(Ta(r,""),l.flags&=-33);var m=yc(e);ui(e,m,r);break;case 3:case 4:var S=l.stateNode.containerInfo,A=yc(e);bc(e,A,S);break;default:throw Error(c(161))}}catch(H){Te(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hf(e,t.alternate,t),t=t.sibling}function pa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ll(4,t,t.return),pa(t);break;case 1:el(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&rf(t,t.return,l),pa(t);break;case 27:Pn(t.stateNode);case 26:case 5:el(t,t.return),pa(t);break;case 22:t.memoizedState===null&&pa(t);break;case 30:pa(t);break;default:pa(t)}e=e.sibling}}function pl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,s=t,r=s.flags;switch(s.tag){case 0:case 11:case 15:pl(n,s,l),Gn(4,s);break;case 1:if(pl(n,s,l),a=s,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(A){Te(a,a.return,A)}if(a=s,n=a.updateQueue,n!==null){var m=a.stateNode;try{var S=n.shared.hiddenCallbacks;if(S!==null)for(n.shared.hiddenCallbacks=null,n=0;n<S.length;n++)Fo(S[n],m)}catch(A){Te(a,a.return,A)}}l&&r&64&&cf(s),Qn(s,s.return);break;case 27:ff(s);case 26:case 5:pl(n,s,l),l&&a===null&&r&4&&of(s),Qn(s,s.return);break;case 12:pl(n,s,l);break;case 31:pl(n,s,l),l&&r&4&&pf(n,s);break;case 13:pl(n,s,l),l&&r&4&&gf(n,s);break;case 22:s.memoizedState===null&&pl(n,s,l),Qn(s,s.return);break;case 30:break;default:pl(n,s,l)}t=t.sibling}}function jc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Mn(l))}function Nc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Mn(e))}function Jt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sf(e,t,l,a),t=t.sibling}function Sf(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Jt(e,t,l,a),n&2048&&Gn(9,t);break;case 1:Jt(e,t,l,a);break;case 3:Jt(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Mn(e)));break;case 12:if(n&2048){Jt(e,t,l,a),e=t.stateNode;try{var s=t.memoizedProps,r=s.id,m=s.onPostCommit;typeof m=="function"&&m(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Te(t,t.return,S)}}else Jt(e,t,l,a);break;case 31:Jt(e,t,l,a);break;case 13:Jt(e,t,l,a);break;case 23:break;case 22:s=t.stateNode,r=t.alternate,t.memoizedState!==null?s._visibility&2?Jt(e,t,l,a):Xn(e,t):s._visibility&2?Jt(e,t,l,a):(s._visibility|=2,Ka(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&jc(r,t);break;case 24:Jt(e,t,l,a),n&2048&&Nc(t.alternate,t);break;default:Jt(e,t,l,a)}}function Ka(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,r=t,m=l,S=a,A=r.flags;switch(r.tag){case 0:case 11:case 15:Ka(s,r,m,S,n),Gn(8,r);break;case 23:break;case 22:var H=r.stateNode;r.memoizedState!==null?H._visibility&2?Ka(s,r,m,S,n):Xn(s,r):(H._visibility|=2,Ka(s,r,m,S,n)),n&&A&2048&&jc(r.alternate,r);break;case 24:Ka(s,r,m,S,n),n&&A&2048&&Nc(r.alternate,r);break;default:Ka(s,r,m,S,n)}t=t.sibling}}function Xn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:Xn(l,a),n&2048&&jc(a.alternate,a);break;case 24:Xn(l,a),n&2048&&Nc(a.alternate,a);break;default:Xn(l,a)}t=t.sibling}}var Vn=8192;function Ja(e,t,l){if(e.subtreeFlags&Vn)for(e=e.child;e!==null;)jf(e,t,l),e=e.sibling}function jf(e,t,l){switch(e.tag){case 26:Ja(e,t,l),e.flags&Vn&&e.memoizedState!==null&&nv(l,Kt,e.memoizedState,e.memoizedProps);break;case 5:Ja(e,t,l);break;case 3:case 4:var a=Kt;Kt=ji(e.stateNode.containerInfo),Ja(e,t,l),Kt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Vn,Vn=16777216,Ja(e,t,l),Vn=a):Ja(e,t,l));break;default:Ja(e,t,l)}}function Nf(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 Zn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];at=a,wf(a,e)}Nf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ef(e),e=e.sibling}function Ef(e){switch(e.tag){case 0:case 11:case 15:Zn(e),e.flags&2048&&Ll(9,e,e.return);break;case 3:Zn(e);break;case 12:Zn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ri(e)):Zn(e);break;default:Zn(e)}}function ri(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];at=a,wf(a,e)}Nf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ll(8,t,t.return),ri(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ri(t));break;default:ri(t)}e=e.sibling}}function wf(e,t){for(;at!==null;){var l=at;switch(l.tag){case 0:case 11:case 15:Ll(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Mn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,at=a;else e:for(l=e;at!==null;){a=at;var n=a.sibling,s=a.return;if(xf(a),a===l){at=null;break e}if(n!==null){n.return=s,at=n;break e}at=s}}}var yx={getCacheForType:function(e){var t=it(Ke),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return it(Ke).controller.signal}},bx=typeof WeakMap=="function"?WeakMap:Map,Re=0,De=null,ve=null,ye=0,Ce=0,Ct=null,kl=!1,Fa=!1,Ec=!1,gl=0,Ve=0,Yl=0,ga=0,wc=0,Tt=0,Wa=0,$n=null,pt=null,Rc=!1,oi=0,Rf=0,di=1/0,fi=null,Gl=null,et=0,Ql=null,Pa=null,yl=0,Cc=0,Tc=null,Cf=null,Kn=0,Mc=null;function Mt(){return(Re&2)!==0&&ye!==0?ye&-ye:D.T!==null?Uc():Yr()}function Tf(){if(Tt===0)if((ye&536870912)===0||Se){var e=bs;bs<<=1,(bs&3932160)===0&&(bs=262144),Tt=e}else Tt=536870912;return e=wt.current,e!==null&&(e.flags|=32),Tt}function gt(e,t,l){(e===De&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Ia(e,0),Xl(e,ye,Tt,!1)),xn(e,l),((Re&2)===0||e!==De)&&(e===De&&((Re&2)===0&&(ga|=l),Ve===4&&Xl(e,ye,Tt,!1)),tl(e))}function Mf(e,t,l){if((Re&6)!==0)throw Error(c(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||hn(e,t),n=a?Nx(e,t):_c(e,t,!0),s=a;do{if(n===0){Fa&&!a&&Xl(e,t,0,!1);break}else{if(l=e.current.alternate,s&&!Sx(l)){n=_c(e,t,!1),s=!1;continue}if(n===2){if(s=t,e.errorRecoveryDisabledLanes&s)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var m=e;n=$n;var S=m.current.memoizedState.isDehydrated;if(S&&(Ia(m,r).flags|=256),r=_c(m,r,!1),r!==2){if(Ec&&!S){m.errorRecoveryDisabledLanes|=s,ga|=s,n=4;break e}s=pt,pt=n,s!==null&&(pt===null?pt=s:pt.push.apply(pt,s))}n=r}if(s=!1,n!==2)continue}}if(n===1){Ia(e,0),Xl(e,t,0,!0);break}e:{switch(a=e,s=n,s){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Xl(a,t,Tt,!kl);break e;case 2:pt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(n=oi+300-bt(),10<n)){if(Xl(a,t,Tt,!kl),js(a,0,!0)!==0)break e;yl=t,a.timeoutHandle=im(Af.bind(null,a,l,pt,fi,Rc,t,Tt,ga,Wa,kl,s,"Throttled",-0,0),n);break e}Af(a,l,pt,fi,Rc,t,Tt,ga,Wa,kl,s,null,-0,0)}}break}while(!0);tl(e)}function Af(e,t,l,a,n,s,r,m,S,A,H,Y,_,O){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nl},jf(t,s,Y);var F=(s&62914560)===s?oi-bt():(s&4194048)===s?Rf-bt():0;if(F=sv(Y,F),F!==null){yl=s,e.cancelPendingCommit=F(Bf.bind(null,e,t,s,l,a,n,r,m,S,H,Y,null,_,O)),Xl(e,s,r,!A);return}}Bf(e,t,s,l,a,n,r,m,S)}function Sx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],s=n.getSnapshot;n=n.value;try{if(!Nt(s(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Xl(e,t,l,a){t&=~wc,t&=~ga,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var s=31-jt(n),r=1<<s;a[s]=-1,n&=~r}l!==0&&Br(e,l,t)}function mi(){return(Re&6)===0?(Jn(0),!1):!0}function Ac(){if(ve!==null){if(Ce===0)var e=ve.return;else e=ve,cl=ra=null,Zu(e),Qa=null,_n=0,e=ve;for(;e!==null;)uf(e.alternate,e),e=e.return;ve=null}}function Ia(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Yx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),yl=0,Ac(),De=e,ve=l=il(e.current,null),ye=t,Ce=0,Ct=null,kl=!1,Fa=hn(e,t),Ec=!1,Wa=Tt=wc=ga=Yl=Ve=0,pt=$n=null,Rc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-jt(a),s=1<<n;t|=e[n],a&=~s}return gl=t,Os(),l}function _f(e,t){de=null,D.H=Ln,t===Ga||t===Gs?(t=Zo(),Ce=3):t===Ou?(t=Zo(),Ce=4):Ce=t===cc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ct=t,ve===null&&(Ve=1,li(e,Lt(t,e.current)))}function zf(){var e=wt.current;return e===null?!0:(ye&4194048)===ye?Qt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Qt:!1}function Df(){var e=D.H;return D.H=Ln,e===null?Ln:e}function Of(){var e=D.A;return D.A=yx,e}function hi(){Ve=4,kl||(ye&4194048)!==ye&&wt.current!==null||(Fa=!0),(Yl&134217727)===0&&(ga&134217727)===0||De===null||Xl(De,ye,Tt,!1)}function _c(e,t,l){var a=Re;Re|=2;var n=Df(),s=Of();(De!==e||ye!==t)&&(fi=null,Ia(e,t)),t=!1;var r=Ve;e:do try{if(Ce!==0&&ve!==null){var m=ve,S=Ct;switch(Ce){case 8:Ac(),r=6;break e;case 3:case 2:case 9:case 6:wt.current===null&&(t=!0);var A=Ce;if(Ce=0,Ct=null,en(e,m,S,A),l&&Fa){r=0;break e}break;default:A=Ce,Ce=0,Ct=null,en(e,m,S,A)}}jx(),r=Ve;break}catch(H){_f(e,H)}while(!0);return t&&e.shellSuspendCounter++,cl=ra=null,Re=a,D.H=n,D.A=s,ve===null&&(De=null,ye=0,Os()),r}function jx(){for(;ve!==null;)Uf(ve)}function Nx(e,t){var l=Re;Re|=2;var a=Df(),n=Of();De!==e||ye!==t?(fi=null,di=bt()+500,Ia(e,t)):Fa=hn(e,t);e:do try{if(Ce!==0&&ve!==null){t=ve;var s=Ct;t:switch(Ce){case 1:Ce=0,Ct=null,en(e,t,s,1);break;case 2:case 9:if(Xo(s)){Ce=0,Ct=null,qf(t);break}t=function(){Ce!==2&&Ce!==9||De!==e||(Ce=7),tl(e)},s.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:Xo(s)?(Ce=0,Ct=null,qf(t)):(Ce=0,Ct=null,en(e,t,s,7));break;case 5:var r=null;switch(ve.tag){case 26:r=ve.memoizedState;case 5:case 27:var m=ve;if(r?Sm(r):m.stateNode.complete){Ce=0,Ct=null;var S=m.sibling;if(S!==null)ve=S;else{var A=m.return;A!==null?(ve=A,xi(A)):ve=null}break t}}Ce=0,Ct=null,en(e,t,s,5);break;case 6:Ce=0,Ct=null,en(e,t,s,6);break;case 8:Ac(),Ve=6;break e;default:throw Error(c(462))}}Ex();break}catch(H){_f(e,H)}while(!0);return cl=ra=null,D.H=a,D.A=n,Re=l,ve!==null?0:(De=null,ye=0,Os(),Ve)}function Ex(){for(;ve!==null&&!Rl();)Uf(ve)}function Uf(e){var t=nf(e.alternate,e,gl);e.memoizedProps=e.pendingProps,t===null?xi(e):ve=t}function qf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Pd(l,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=Pd(l,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Zu(t);default:uf(l,t),t=ve=Do(t,gl),t=nf(l,t,gl)}e.memoizedProps=e.pendingProps,t===null?xi(e):ve=t}function en(e,t,l,a){cl=ra=null,Zu(t),Qa=null,_n=0;var n=t.return;try{if(fx(e,n,t,l,ye)){Ve=1,li(e,Lt(l,e.current)),ve=null;return}}catch(s){if(n!==null)throw ve=n,s;Ve=1,li(e,Lt(l,e.current)),ve=null;return}t.flags&32768?(Se||a===1?e=!0:Fa||(ye&536870912)!==0?e=!1:(kl=e=!0,(a===2||a===9||a===3||a===6)&&(a=wt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Hf(t,e)):xi(t)}function xi(e){var t=e;do{if((t.flags&32768)!==0){Hf(t,kl);return}e=t.return;var l=xx(t.alternate,t,gl);if(l!==null){ve=l;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Ve===0&&(Ve=5)}function Hf(e,t){do{var l=vx(e.alternate,e);if(l!==null){l.flags&=32767,ve=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ve=e;return}ve=e=l}while(e!==null);Ve=6,ve=null}function Bf(e,t,l,a,n,s,r,m,S){e.cancelPendingCommit=null;do vi();while(et!==0);if((Re&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(s=t.lanes|t.childLanes,s|=yu,a0(e,l,s,r,m,S),e===De&&(ve=De=null,ye=0),Pa=t,Ql=e,yl=l,Cc=s,Tc=n,Cf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tx(gs,function(){return Qf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null,n=V.p,V.p=2,r=Re,Re|=4;try{px(e,t,l)}finally{Re=r,V.p=n,D.T=a}}et=1,Lf(),kf(),Yf()}}function Lf(){if(et===1){et=0;var e=Ql,t=Pa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var a=V.p;V.p=2;var n=Re;Re|=4;try{yf(t,e);var s=Qc,r=Eo(e.containerInfo),m=s.focusedElem,S=s.selectionRange;if(r!==m&&m&&m.ownerDocument&&No(m.ownerDocument.documentElement,m)){if(S!==null&&hu(m)){var A=S.start,H=S.end;if(H===void 0&&(H=A),"selectionStart"in m)m.selectionStart=A,m.selectionEnd=Math.min(H,m.value.length);else{var Y=m.ownerDocument||document,_=Y&&Y.defaultView||window;if(_.getSelection){var O=_.getSelection(),F=m.textContent.length,ne=Math.min(S.start,F),ze=S.end===void 0?ne:Math.min(S.end,F);!O.extend&&ne>ze&&(r=ze,ze=ne,ne=r);var w=jo(m,ne),j=jo(m,ze);if(w&&j&&(O.rangeCount!==1||O.anchorNode!==w.node||O.anchorOffset!==w.offset||O.focusNode!==j.node||O.focusOffset!==j.offset)){var M=Y.createRange();M.setStart(w.node,w.offset),O.removeAllRanges(),ne>ze?(O.addRange(M),O.extend(j.node,j.offset)):(M.setEnd(j.node,j.offset),O.addRange(M))}}}}for(Y=[],O=m;O=O.parentNode;)O.nodeType===1&&Y.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<Y.length;m++){var L=Y[m];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}Ti=!!Gc,Qc=Gc=null}finally{Re=n,V.p=a,D.T=l}}e.current=t,et=2}}function kf(){if(et===2){et=0;var e=Ql,t=Pa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var a=V.p;V.p=2;var n=Re;Re|=4;try{hf(e,t.alternate,t)}finally{Re=n,V.p=a,D.T=l}}et=3}}function Yf(){if(et===4||et===3){et=0,Kh();var e=Ql,t=Pa,l=yl,a=Cf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,Pa=Ql=null,Gf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Gl=null),Ji(l),t=t.stateNode,St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(mn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=D.T,n=V.p,V.p=2,D.T=null;try{for(var s=e.onRecoverableError,r=0;r<a.length;r++){var m=a[r];s(m.value,{componentStack:m.stack})}}finally{D.T=t,V.p=n}}(yl&3)!==0&&vi(),tl(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===Mc?Kn++:(Kn=0,Mc=e):Kn=0,Jn(0)}}function Gf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Mn(t)))}function vi(){return Lf(),kf(),Yf(),Qf()}function Qf(){if(et!==5)return!1;var e=Ql,t=Cc;Cc=0;var l=Ji(yl),a=D.T,n=V.p;try{V.p=32>l?32:l,D.T=null,l=Tc,Tc=null;var s=Ql,r=yl;if(et=0,Pa=Ql=null,yl=0,(Re&6)!==0)throw Error(c(331));var m=Re;if(Re|=4,Ef(s.current),Sf(s,s.current,r,l),Re=m,Jn(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(mn,s)}catch{}return!0}finally{V.p=n,D.T=a,Gf(e,t)}}function Xf(e,t,l){t=Lt(l,t),t=uc(e.stateNode,t,2),e=ql(e,t,2),e!==null&&(xn(e,2),tl(e))}function Te(e,t,l){if(e.tag===3)Xf(e,e,l);else for(;t!==null;){if(t.tag===3){Xf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Gl===null||!Gl.has(a))){e=Lt(l,e),l=Xd(2),a=ql(t,l,2),a!==null&&(Vd(l,a,t,e),xn(a,2),tl(a));break}}t=t.return}}function zc(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new bx;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Ec=!0,n.add(l),e=wx.bind(null,e,t,l),t.then(e,e))}function wx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,De===e&&(ye&l)===l&&(Ve===4||Ve===3&&(ye&62914560)===ye&&300>bt()-oi?(Re&2)===0&&Ia(e,0):wc|=l,Wa===ye&&(Wa=0)),tl(e)}function Vf(e,t){t===0&&(t=Hr()),e=ia(e,t),e!==null&&(xn(e,t),tl(e))}function Rx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Vf(e,l)}function Cx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),Vf(e,l)}function Tx(e,t){return Ot(e,t)}var pi=null,tn=null,Dc=!1,gi=!1,Oc=!1,Vl=0;function tl(e){e!==tn&&e.next===null&&(tn===null?pi=tn=e:tn=tn.next=e),gi=!0,Dc||(Dc=!0,Ax())}function Jn(e,t){if(!Oc&&gi){Oc=!0;do for(var l=!1,a=pi;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var s=0;else{var r=a.suspendedLanes,m=a.pingedLanes;s=(1<<31-jt(42|e)+1)-1,s&=n&~(r&~m),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,Jf(a,s))}else s=ye,s=js(a,a===De?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(s&3)===0||hn(a,s)||(l=!0,Jf(a,s));a=a.next}while(l);Oc=!1}}function Mx(){Zf()}function Zf(){gi=Dc=!1;var e=0;Vl!==0&&kx()&&(e=Vl);for(var t=bt(),l=null,a=pi;a!==null;){var n=a.next,s=$f(a,t);s===0?(a.next=null,l===null?pi=n:l.next=n,n===null&&(tn=l)):(l=a,(e!==0||(s&3)!==0)&&(gi=!0)),a=n}et!==0&&et!==5||Jn(e),Vl!==0&&(Vl=0)}function $f(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var r=31-jt(s),m=1<<r,S=n[r];S===-1?((m&l)===0||(m&a)!==0)&&(n[r]=l0(m,t)):S<=t&&(e.expiredLanes|=m),s&=~m}if(t=De,l=ye,l=js(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ut(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||hn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ut(a),Ji(l)){case 2:case 8:l=Ur;break;case 32:l=gs;break;case 268435456:l=qr;break;default:l=gs}return a=Kf.bind(null,e),l=Ot(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ut(a),e.callbackPriority=2,e.callbackNode=null,2}function Kf(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(vi()&&e.callbackNode!==l)return null;var a=ye;return a=js(e,e===De?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Mf(e,a,t),$f(e,bt()),e.callbackNode!=null&&e.callbackNode===l?Kf.bind(null,e):null)}function Jf(e,t){if(vi())return null;Mf(e,t,!0)}function Ax(){Gx(function(){(Re&6)!==0?Ot(Or,Mx):Zf()})}function Uc(){if(Vl===0){var e=ka;e===0&&(e=ys,ys<<=1,(ys&261888)===0&&(ys=256)),Vl=e}return Vl}function Ff(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rs(""+e)}function Wf(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function _x(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var s=Ff((n[ft]||null).action),r=a.submitter;r&&(t=(t=r[ft]||null)?Ff(t.formAction):r.getAttribute("formAction"),t!==null&&(s=t,r=null));var m=new As("action","action",null,a,n);e.push({event:m,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Vl!==0){var S=r?Wf(n,r):new FormData(n);tc(l,{pending:!0,data:S,method:n.method,action:s},null,S)}}else typeof s=="function"&&(m.preventDefault(),S=r?Wf(n,r):new FormData(n),tc(l,{pending:!0,data:S,method:n.method,action:s},s,S))},currentTarget:n}]})}}for(var qc=0;qc<gu.length;qc++){var Hc=gu[qc],zx=Hc.toLowerCase(),Dx=Hc[0].toUpperCase()+Hc.slice(1);$t(zx,"on"+Dx)}$t(Co,"onAnimationEnd"),$t(To,"onAnimationIteration"),$t(Mo,"onAnimationStart"),$t("dblclick","onDoubleClick"),$t("focusin","onFocus"),$t("focusout","onBlur"),$t(J0,"onTransitionRun"),$t(F0,"onTransitionStart"),$t(W0,"onTransitionCancel"),$t(Ao,"onTransitionEnd"),Ra("onMouseEnter",["mouseout","mouseover"]),Ra("onMouseLeave",["mouseout","mouseover"]),Ra("onPointerEnter",["pointerout","pointerover"]),Ra("onPointerLeave",["pointerout","pointerover"]),la("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),la("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),la("onBeforeInput",["compositionend","keypress","textInput","paste"]),la("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),la("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),la("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fn="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(" "),Ox=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fn));function Pf(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var r=a.length-1;0<=r;r--){var m=a[r],S=m.instance,A=m.currentTarget;if(m=m.listener,S!==s&&n.isPropagationStopped())break e;s=m,n.currentTarget=A;try{s(n)}catch(H){Ds(H)}n.currentTarget=null,s=S}else for(r=0;r<a.length;r++){if(m=a[r],S=m.instance,A=m.currentTarget,m=m.listener,S!==s&&n.isPropagationStopped())break e;s=m,n.currentTarget=A;try{s(n)}catch(H){Ds(H)}n.currentTarget=null,s=S}}}}function pe(e,t){var l=t[Fi];l===void 0&&(l=t[Fi]=new Set);var a=e+"__bubble";l.has(a)||(If(t,e,2,!1),l.add(a))}function Bc(e,t,l){var a=0;t&&(a|=4),If(l,e,a,t)}var yi="_reactListening"+Math.random().toString(36).slice(2);function Lc(e){if(!e[yi]){e[yi]=!0,Xr.forEach(function(l){l!=="selectionchange"&&(Ox.has(l)||Bc(l,!1,e),Bc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yi]||(t[yi]=!0,Bc("selectionchange",!1,t))}}function If(e,t,l,a){switch(Tm(t)){case 2:var n=cv;break;case 8:n=rv;break;default:n=er}l=n.bind(null,t,l,e),n=void 0,!su||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function kc(e,t,l,a,n){var s=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var r=a.tag;if(r===3||r===4){var m=a.stateNode.containerInfo;if(m===n)break;if(r===4)for(r=a.return;r!==null;){var S=r.tag;if((S===3||S===4)&&r.stateNode.containerInfo===n)return;r=r.return}for(;m!==null;){if(r=Na(m),r===null)return;if(S=r.tag,S===5||S===6||S===26||S===27){a=s=r;continue e}m=m.parentNode}}a=a.return}lo(function(){var A=s,H=au(l),Y=[];e:{var _=_o.get(e);if(_!==void 0){var O=As,F=e;switch(e){case"keypress":if(Ts(l)===0)break e;case"keydown":case"keyup":O=C0;break;case"focusin":F="focus",O=ru;break;case"focusout":F="blur",O=ru;break;case"beforeblur":case"afterblur":O=ru;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=so;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=x0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=A0;break;case Co:case To:case Mo:O=g0;break;case Ao:O=z0;break;case"scroll":case"scrollend":O=m0;break;case"wheel":O=O0;break;case"copy":case"cut":case"paste":O=b0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=uo;break;case"toggle":case"beforetoggle":O=q0}var ne=(t&4)!==0,ze=!ne&&(e==="scroll"||e==="scrollend"),w=ne?_!==null?_+"Capture":null:_;ne=[];for(var j=A,M;j!==null;){var L=j;if(M=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||M===null||w===null||(L=gn(j,w),L!=null&&ne.push(Wn(j,L,M))),ze)break;j=j.return}0<ne.length&&(_=new O(_,F,null,l,H),Y.push({event:_,listeners:ne}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",_&&l!==lu&&(F=l.relatedTarget||l.fromElement)&&(Na(F)||F[ja]))break e;if((O||_)&&(_=H.window===H?H:(_=H.ownerDocument)?_.defaultView||_.parentWindow:window,O?(F=l.relatedTarget||l.toElement,O=A,F=F?Na(F):null,F!==null&&(ze=x(F),ne=F.tag,F!==ze||ne!==5&&ne!==27&&ne!==6)&&(F=null)):(O=null,F=A),O!==F)){if(ne=so,L="onMouseLeave",w="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(ne=uo,L="onPointerLeave",w="onPointerEnter",j="pointer"),ze=O==null?_:pn(O),M=F==null?_:pn(F),_=new ne(L,j+"leave",O,l,H),_.target=ze,_.relatedTarget=M,L=null,Na(H)===A&&(ne=new ne(w,j+"enter",F,l,H),ne.target=M,ne.relatedTarget=ze,L=ne),ze=L,O&&F)t:{for(ne=Ux,w=O,j=F,M=0,L=w;L;L=ne(L))M++;L=0;for(var le=j;le;le=ne(le))L++;for(;0<M-L;)w=ne(w),M--;for(;0<L-M;)j=ne(j),L--;for(;M--;){if(w===j||j!==null&&w===j.alternate){ne=w;break t}w=ne(w),j=ne(j)}ne=null}else ne=null;O!==null&&em(Y,_,O,ne,!1),F!==null&&ze!==null&&em(Y,ze,F,ne,!0)}}e:{if(_=A?pn(A):window,O=_.nodeName&&_.nodeName.toLowerCase(),O==="select"||O==="input"&&_.type==="file")var Ee=vo;else if(ho(_))if(po)Ee=Z0;else{Ee=X0;var W=Q0}else O=_.nodeName,!O||O.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?A&&tu(A.elementType)&&(Ee=vo):Ee=V0;if(Ee&&(Ee=Ee(e,A))){xo(Y,Ee,l,H);break e}W&&W(e,_,A),e==="focusout"&&A&&_.type==="number"&&A.memoizedProps.value!=null&&eu(_,"number",_.value)}switch(W=A?pn(A):window,e){case"focusin":(ho(W)||W.contentEditable==="true")&&(za=W,xu=A,Rn=null);break;case"focusout":Rn=xu=za=null;break;case"mousedown":vu=!0;break;case"contextmenu":case"mouseup":case"dragend":vu=!1,wo(Y,l,H);break;case"selectionchange":if(K0)break;case"keydown":case"keyup":wo(Y,l,H)}var fe;if(du)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else _a?fo(e,l)&&(be="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(be="onCompositionStart");be&&(co&&l.locale!=="ko"&&(_a||be!=="onCompositionStart"?be==="onCompositionEnd"&&_a&&(fe=ao()):(Ml=H,iu="value"in Ml?Ml.value:Ml.textContent,_a=!0)),W=bi(A,be),0<W.length&&(be=new io(be,e,null,l,H),Y.push({event:be,listeners:W}),fe?be.data=fe:(fe=mo(l),fe!==null&&(be.data=fe)))),(fe=B0?L0(e,l):k0(e,l))&&(be=bi(A,"onBeforeInput"),0<be.length&&(W=new io("onBeforeInput","beforeinput",null,l,H),Y.push({event:W,listeners:be}),W.data=fe)),_x(Y,e,A,l,H)}Pf(Y,t)})}function Wn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function bi(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,s=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||s===null||(n=gn(e,l),n!=null&&a.unshift(Wn(e,n,s)),n=gn(e,t),n!=null&&a.push(Wn(e,n,s))),e.tag===3)return a;e=e.return}return[]}function Ux(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function em(e,t,l,a,n){for(var s=t._reactName,r=[];l!==null&&l!==a;){var m=l,S=m.alternate,A=m.stateNode;if(m=m.tag,S!==null&&S===a)break;m!==5&&m!==26&&m!==27||A===null||(S=A,n?(A=gn(l,s),A!=null&&r.unshift(Wn(l,A,S))):n||(A=gn(l,s),A!=null&&r.push(Wn(l,A,S)))),l=l.return}r.length!==0&&e.push({event:t,listeners:r})}var qx=/\r\n?/g,Hx=/\u0000|\uFFFD/g;function tm(e){return(typeof e=="string"?e:""+e).replace(qx,`
49
+ `).replace(Hx,"")}function lm(e,t){return t=tm(t),tm(e)===t}function _e(e,t,l,a,n,s){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ta(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ta(e,""+a);break;case"className":Es(e,"class",a);break;case"tabIndex":Es(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Es(e,l,a);break;case"style":eo(e,a,s);break;case"data":if(t!=="object"){Es(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Rs(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(l==="formAction"?(t!=="input"&&_e(e,t,"name",n.name,n,null),_e(e,t,"formEncType",n.formEncType,n,null),_e(e,t,"formMethod",n.formMethod,n,null),_e(e,t,"formTarget",n.formTarget,n,null)):(_e(e,t,"encType",n.encType,n,null),_e(e,t,"method",n.method,n,null),_e(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Rs(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=nl);break;case"onScroll":a!=null&&pe("scroll",e);break;case"onScrollEnd":a!=null&&pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Rs(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":pe("beforetoggle",e),pe("toggle",e),Ns(e,"popover",a);break;case"xlinkActuate":al(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":al(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":al(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":al(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":al(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":al(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":al(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":al(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":al(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Ns(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=d0.get(l)||l,Ns(e,l,a))}}function Yc(e,t,l,a,n,s){switch(l){case"style":eo(e,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Ta(e,a):(typeof a=="number"||typeof a=="bigint")&&Ta(e,""+a);break;case"onScroll":a!=null&&pe("scroll",e);break;case"onScrollEnd":a!=null&&pe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=nl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),s=e[ft]||null,s=s!=null?s[l]:null,typeof s=="function"&&e.removeEventListener(t,s,n),typeof a=="function")){typeof s!="function"&&s!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Ns(e,l,a)}}}function ct(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",e),pe("load",e);var a=!1,n=!1,s;for(s in l)if(l.hasOwnProperty(s)){var r=l[s];if(r!=null)switch(s){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:_e(e,t,s,r,l,null)}}n&&_e(e,t,"srcSet",l.srcSet,l,null),a&&_e(e,t,"src",l.src,l,null);return;case"input":pe("invalid",e);var m=s=r=n=null,S=null,A=null;for(a in l)if(l.hasOwnProperty(a)){var H=l[a];if(H!=null)switch(a){case"name":n=H;break;case"type":r=H;break;case"checked":S=H;break;case"defaultChecked":A=H;break;case"value":s=H;break;case"defaultValue":m=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(c(137,t));break;default:_e(e,t,a,H,l,null)}}Fr(e,s,m,S,A,r,n,!1);return;case"select":pe("invalid",e),a=r=s=null;for(n in l)if(l.hasOwnProperty(n)&&(m=l[n],m!=null))switch(n){case"value":s=m;break;case"defaultValue":r=m;break;case"multiple":a=m;default:_e(e,t,n,m,l,null)}t=s,l=r,e.multiple=!!a,t!=null?Ca(e,!!a,t,!1):l!=null&&Ca(e,!!a,l,!0);return;case"textarea":pe("invalid",e),s=n=a=null;for(r in l)if(l.hasOwnProperty(r)&&(m=l[r],m!=null))switch(r){case"value":a=m;break;case"defaultValue":n=m;break;case"children":s=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(c(91));break;default:_e(e,t,r,m,l,null)}Pr(e,a,n,s);return;case"option":for(S in l)if(l.hasOwnProperty(S)&&(a=l[S],a!=null))switch(S){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:_e(e,t,S,a,l,null)}return;case"dialog":pe("beforetoggle",e),pe("toggle",e),pe("cancel",e),pe("close",e);break;case"iframe":case"object":pe("load",e);break;case"video":case"audio":for(a=0;a<Fn.length;a++)pe(Fn[a],e);break;case"image":pe("error",e),pe("load",e);break;case"details":pe("toggle",e);break;case"embed":case"source":case"link":pe("error",e),pe("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(A in l)if(l.hasOwnProperty(A)&&(a=l[A],a!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:_e(e,t,A,a,l,null)}return;default:if(tu(t)){for(H in l)l.hasOwnProperty(H)&&(a=l[H],a!==void 0&&Yc(e,t,H,a,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(a=l[m],a!=null&&_e(e,t,m,a,l,null))}function Bx(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,s=null,r=null,m=null,S=null,A=null,H=null;for(O in l){var Y=l[O];if(l.hasOwnProperty(O)&&Y!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":S=Y;default:a.hasOwnProperty(O)||_e(e,t,O,null,a,Y)}}for(var _ in a){var O=a[_];if(Y=l[_],a.hasOwnProperty(_)&&(O!=null||Y!=null))switch(_){case"type":s=O;break;case"name":n=O;break;case"checked":A=O;break;case"defaultChecked":H=O;break;case"value":r=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,t));break;default:O!==Y&&_e(e,t,_,O,a,Y)}}Ii(e,r,m,S,A,H,s,n);return;case"select":O=r=m=_=null;for(s in l)if(S=l[s],l.hasOwnProperty(s)&&S!=null)switch(s){case"value":break;case"multiple":O=S;default:a.hasOwnProperty(s)||_e(e,t,s,null,a,S)}for(n in a)if(s=a[n],S=l[n],a.hasOwnProperty(n)&&(s!=null||S!=null))switch(n){case"value":_=s;break;case"defaultValue":m=s;break;case"multiple":r=s;default:s!==S&&_e(e,t,n,s,a,S)}t=m,l=r,a=O,_!=null?Ca(e,!!l,_,!1):!!a!=!!l&&(t!=null?Ca(e,!!l,t,!0):Ca(e,!!l,l?[]:"",!1));return;case"textarea":O=_=null;for(m in l)if(n=l[m],l.hasOwnProperty(m)&&n!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:_e(e,t,m,null,a,n)}for(r in a)if(n=a[r],s=l[r],a.hasOwnProperty(r)&&(n!=null||s!=null))switch(r){case"value":_=n;break;case"defaultValue":O=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(c(91));break;default:n!==s&&_e(e,t,r,n,a,s)}Wr(e,_,O);return;case"option":for(var F in l)if(_=l[F],l.hasOwnProperty(F)&&_!=null&&!a.hasOwnProperty(F))switch(F){case"selected":e.selected=!1;break;default:_e(e,t,F,null,a,_)}for(S in a)if(_=a[S],O=l[S],a.hasOwnProperty(S)&&_!==O&&(_!=null||O!=null))switch(S){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:_e(e,t,S,_,a,O)}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 ne in l)_=l[ne],l.hasOwnProperty(ne)&&_!=null&&!a.hasOwnProperty(ne)&&_e(e,t,ne,null,a,_);for(A in a)if(_=a[A],O=l[A],a.hasOwnProperty(A)&&_!==O&&(_!=null||O!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,t));break;default:_e(e,t,A,_,a,O)}return;default:if(tu(t)){for(var ze in l)_=l[ze],l.hasOwnProperty(ze)&&_!==void 0&&!a.hasOwnProperty(ze)&&Yc(e,t,ze,void 0,a,_);for(H in a)_=a[H],O=l[H],!a.hasOwnProperty(H)||_===O||_===void 0&&O===void 0||Yc(e,t,H,_,a,O);return}}for(var w in l)_=l[w],l.hasOwnProperty(w)&&_!=null&&!a.hasOwnProperty(w)&&_e(e,t,w,null,a,_);for(Y in a)_=a[Y],O=l[Y],!a.hasOwnProperty(Y)||_===O||_==null&&O==null||_e(e,t,Y,_,a,O)}function am(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Lx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],s=n.transferSize,r=n.initiatorType,m=n.duration;if(s&&m&&am(r)){for(r=0,m=n.responseEnd,a+=1;a<l.length;a++){var S=l[a],A=S.startTime;if(A>m)break;var H=S.transferSize,Y=S.initiatorType;H&&am(Y)&&(S=S.responseEnd,r+=H*(S<m?1:(m-A)/(S-A)))}if(--a,t+=8*(s+r)/(n.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 Gc=null,Qc=null;function Si(e){return e.nodeType===9?e:e.ownerDocument}function nm(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 sm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Xc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vc=null;function kx(){var e=window.event;return e&&e.type==="popstate"?e===Vc?!1:(Vc=e,!0):(Vc=null,!1)}var im=typeof setTimeout=="function"?setTimeout:void 0,Yx=typeof clearTimeout=="function"?clearTimeout:void 0,um=typeof Promise=="function"?Promise:void 0,Gx=typeof queueMicrotask=="function"?queueMicrotask:typeof um<"u"?function(e){return um.resolve(null).then(e).catch(Qx)}:im;function Qx(e){setTimeout(function(){throw e})}function Zl(e){return e==="head"}function cm(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),sn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Pn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Pn(l);for(var s=l.firstChild;s;){var r=s.nextSibling,m=s.nodeName;s[vn]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&s.rel.toLowerCase()==="stylesheet"||l.removeChild(s),s=r}}else l==="body"&&Pn(e.ownerDocument.body);l=n}while(l);sn(t)}function rm(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Zc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Zc(l),Wi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Xx(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[vn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Xt(e.nextSibling),e===null)break}return null}function Vx(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Xt(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xt(e.nextSibling),e===null))return null;return e}function $c(e){return e.data==="$?"||e.data==="$~"}function Kc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Zx(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Xt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Jc=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Xt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function fm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function mm(e,t,l){switch(t=Si(l),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Pn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Wi(e)}var Vt=new Map,hm=new Set;function ji(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bl=V.d;V.d={f:$x,r:Kx,D:Jx,C:Fx,L:Wx,m:Px,X:ev,S:Ix,M:tv};function $x(){var e=bl.f(),t=mi();return e||t}function Kx(e){var t=Ea(e);t!==null&&t.tag===5&&t.type==="form"?Ad(t):bl.r(e)}var ln=typeof document>"u"?null:document;function xm(e,t,l){var a=ln;if(a&&typeof t=="string"&&t){var n=Ht(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),hm.has(n)||(hm.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),ct(t,"link",e),lt(t),a.head.appendChild(t)))}}function Jx(e){bl.D(e),xm("dns-prefetch",e,null)}function Fx(e,t){bl.C(e,t),xm("preconnect",e,t)}function Wx(e,t,l){bl.L(e,t,l);var a=ln;if(a&&e&&t){var n='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Ht(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Ht(l.imageSizes)+'"]')):n+='[href="'+Ht(e)+'"]';var s=n;switch(t){case"style":s=an(e);break;case"script":s=nn(e)}Vt.has(s)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Vt.set(s,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(In(s))||t==="script"&&a.querySelector(es(s))||(t=a.createElement("link"),ct(t,"link",e),lt(t),a.head.appendChild(t)))}}function Px(e,t){bl.m(e,t);var l=ln;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Ht(a)+'"][href="'+Ht(e)+'"]',s=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=nn(e)}if(!Vt.has(s)&&(e=y({rel:"modulepreload",href:e},t),Vt.set(s,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(es(s)))return}a=l.createElement("link"),ct(a,"link",e),lt(a),l.head.appendChild(a)}}}function Ix(e,t,l){bl.S(e,t,l);var a=ln;if(a&&e){var n=wa(a).hoistableStyles,s=an(e);t=t||"default";var r=n.get(s);if(!r){var m={loading:0,preload:null};if(r=a.querySelector(In(s)))m.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Vt.get(s))&&Fc(e,l);var S=r=a.createElement("link");lt(S),ct(S,"link",e),S._p=new Promise(function(A,H){S.onload=A,S.onerror=H}),S.addEventListener("load",function(){m.loading|=1}),S.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Ni(r,t,a)}r={type:"stylesheet",instance:r,count:1,state:m},n.set(s,r)}}}function ev(e,t){bl.X(e,t);var l=ln;if(l&&e){var a=wa(l).hoistableScripts,n=nn(e),s=a.get(n);s||(s=l.querySelector(es(n)),s||(e=y({src:e,async:!0},t),(t=Vt.get(n))&&Wc(e,t),s=l.createElement("script"),lt(s),ct(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(n,s))}}function tv(e,t){bl.M(e,t);var l=ln;if(l&&e){var a=wa(l).hoistableScripts,n=nn(e),s=a.get(n);s||(s=l.querySelector(es(n)),s||(e=y({src:e,async:!0,type:"module"},t),(t=Vt.get(n))&&Wc(e,t),s=l.createElement("script"),lt(s),ct(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(n,s))}}function vm(e,t,l,a){var n=(n=me.current)?ji(n):null;if(!n)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=an(l.href),l=wa(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=an(l.href);var s=wa(n).hoistableStyles,r=s.get(e);if(r||(n=n.ownerDocument||n,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,r),(s=n.querySelector(In(e)))&&!s._p&&(r.instance=s,r.state.loading=5),Vt.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Vt.set(e,l),s||lv(n,e,l,r.state))),t&&a===null)throw Error(c(528,""));return r}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=nn(l),l=wa(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function an(e){return'href="'+Ht(e)+'"'}function In(e){return'link[rel="stylesheet"]['+e+"]"}function pm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function lv(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),ct(t,"link",l),lt(t),e.head.appendChild(t))}function nn(e){return'[src="'+Ht(e)+'"]'}function es(e){return"script[async]"+e}function gm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Ht(l.href)+'"]');if(a)return t.instance=a,lt(a),a;var n=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),lt(a),ct(a,"style",n),Ni(a,l.precedence,e),t.instance=a;case"stylesheet":n=an(l.href);var s=e.querySelector(In(n));if(s)return t.state.loading|=4,t.instance=s,lt(s),s;a=pm(l),(n=Vt.get(n))&&Fc(a,n),s=(e.ownerDocument||e).createElement("link"),lt(s);var r=s;return r._p=new Promise(function(m,S){r.onload=m,r.onerror=S}),ct(s,"link",a),t.state.loading|=4,Ni(s,l.precedence,e),t.instance=s;case"script":return s=nn(l.src),(n=e.querySelector(es(s)))?(t.instance=n,lt(n),n):(a=l,(n=Vt.get(s))&&(a=y({},l),Wc(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),lt(n),ct(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ni(a,l.precedence,e));return t.instance}function Ni(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,s=n,r=0;r<a.length;r++){var m=a[r];if(m.dataset.precedence===t)s=m;else if(s!==n)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ei=null;function ym(e,t,l){if(Ei===null){var a=new Map,n=Ei=new Map;n.set(l,a)}else n=Ei,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var s=l[n];if(!(s[vn]||s[nt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var r=s.getAttribute(t)||"";r=e+r;var m=a.get(r);m?m.push(s):a.set(r,[s])}}return a}function bm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function av(e,t,l){if(l===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 Sm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function nv(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=an(a.href),s=t.querySelector(In(n));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=wi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=s,lt(s);return}s=t.ownerDocument||t,a=pm(a),(n=Vt.get(n))&&Fc(a,n),s=s.createElement("link"),lt(s);var r=s;r._p=new Promise(function(m,S){r.onload=m,r.onerror=S}),ct(s,"link",a),l.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=wi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Pc=0;function sv(e,t){return e.stylesheets&&e.count===0&&Ci(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Ci(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Pc===0&&(Pc=62500*Lx());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ci(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Pc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function wi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ci(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ri=null;function Ci(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ri=new Map,t.forEach(iv,e),Ri=null,wi.call(e))}function iv(e,t){if(!(t.state.loading&4)){var l=Ri.get(e);if(l)var a=l.get(null);else{l=new Map,Ri.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<n.length;s++){var r=n[s];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(l.set(r.dataset.precedence,r),a=r)}a&&l.set(null,a)}n=t.instance,r=n.getAttribute("data-precedence"),s=l.get(r)||a,s===a&&l.set(null,n),l.set(r,n),this.count++,a=wi.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),s?s.parentNode.insertBefore(n,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var ts={$$typeof:G,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function uv(e,t,l,a,n,s,r,m,S){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=$i(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$i(0),this.hiddenUpdates=$i(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=s,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function jm(e,t,l,a,n,s,r,m,S,A,H,Y){return e=new uv(e,t,l,r,S,A,H,Y,m),t=1,s===!0&&(t|=24),s=Et(3,null,null,t),e.current=s,s.stateNode=e,t=_u(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:l,cache:t},Uu(s),e}function Nm(e){return e?(e=Ua,e):Ua}function Em(e,t,l,a,n,s){n=Nm(n),a.context===null?a.context=n:a.pendingContext=n,a=Ul(t),a.payload={element:l},s=s===void 0?null:s,s!==null&&(a.callback=s),l=ql(e,a,t),l!==null&&(gt(l,e,t),Dn(l,e,t))}function wm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Ic(e,t){wm(e,t),(e=e.alternate)&&wm(e,t)}function Rm(e){if(e.tag===13||e.tag===31){var t=ia(e,67108864);t!==null&&gt(t,e,67108864),Ic(e,67108864)}}function Cm(e){if(e.tag===13||e.tag===31){var t=Mt();t=Ki(t);var l=ia(e,t);l!==null&&gt(l,e,t),Ic(e,t)}}var Ti=!0;function cv(e,t,l,a){var n=D.T;D.T=null;var s=V.p;try{V.p=2,er(e,t,l,a)}finally{V.p=s,D.T=n}}function rv(e,t,l,a){var n=D.T;D.T=null;var s=V.p;try{V.p=8,er(e,t,l,a)}finally{V.p=s,D.T=n}}function er(e,t,l,a){if(Ti){var n=tr(a);if(n===null)kc(e,t,a,Mi,l),Mm(e,a);else if(dv(n,e,t,l,a))a.stopPropagation();else if(Mm(e,a),t&4&&-1<ov.indexOf(e)){for(;n!==null;){var s=Ea(n);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var r=ta(s.pendingLanes);if(r!==0){var m=s;for(m.pendingLanes|=2,m.entangledLanes|=2;r;){var S=1<<31-jt(r);m.entanglements[1]|=S,r&=~S}tl(s),(Re&6)===0&&(di=bt()+500,Jn(0))}}break;case 31:case 13:m=ia(s,2),m!==null&&gt(m,s,2),mi(),Ic(s,2)}if(s=tr(a),s===null&&kc(e,t,a,Mi,l),s===n)break;n=s}n!==null&&a.stopPropagation()}else kc(e,t,a,null,l)}}function tr(e){return e=au(e),lr(e)}var Mi=null;function lr(e){if(Mi=null,e=Na(e),e!==null){var t=x(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=f(t),e!==null)return e;e=null}else if(l===31){if(e=p(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Mi=e,null}function Tm(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(Jh()){case Or:return 2;case Ur:return 8;case gs:case Fh:return 32;case qr:return 268435456;default:return 32}default:return 32}}var ar=!1,$l=null,Kl=null,Jl=null,ls=new Map,as=new Map,Fl=[],ov="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":$l=null;break;case"dragenter":case"dragleave":Kl=null;break;case"mouseover":case"mouseout":Jl=null;break;case"pointerover":case"pointerout":ls.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":as.delete(t.pointerId)}}function ns(e,t,l,a,n,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:s,targetContainers:[n]},t!==null&&(t=Ea(t),t!==null&&Rm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function dv(e,t,l,a,n){switch(t){case"focusin":return $l=ns($l,e,t,l,a,n),!0;case"dragenter":return Kl=ns(Kl,e,t,l,a,n),!0;case"mouseover":return Jl=ns(Jl,e,t,l,a,n),!0;case"pointerover":var s=n.pointerId;return ls.set(s,ns(ls.get(s)||null,e,t,l,a,n)),!0;case"gotpointercapture":return s=n.pointerId,as.set(s,ns(as.get(s)||null,e,t,l,a,n)),!0}return!1}function Am(e){var t=Na(e.target);if(t!==null){var l=x(t);if(l!==null){if(t=l.tag,t===13){if(t=f(l),t!==null){e.blockedOn=t,Gr(e.priority,function(){Cm(l)});return}}else if(t===31){if(t=p(l),t!==null){e.blockedOn=t,Gr(e.priority,function(){Cm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ai(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=tr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);lu=a,l.target.dispatchEvent(a),lu=null}else return t=Ea(l),t!==null&&Rm(t),e.blockedOn=l,!1;t.shift()}return!0}function _m(e,t,l){Ai(e)&&l.delete(t)}function fv(){ar=!1,$l!==null&&Ai($l)&&($l=null),Kl!==null&&Ai(Kl)&&(Kl=null),Jl!==null&&Ai(Jl)&&(Jl=null),ls.forEach(_m),as.forEach(_m)}function _i(e,t){e.blockedOn===t&&(e.blockedOn=null,ar||(ar=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,fv)))}var zi=null;function zm(e){zi!==e&&(zi=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){zi===e&&(zi=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(lr(a||l)===null)continue;break}var s=Ea(l);s!==null&&(e.splice(t,3),t-=3,tc(s,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function sn(e){function t(S){return _i(S,e)}$l!==null&&_i($l,e),Kl!==null&&_i(Kl,e),Jl!==null&&_i(Jl,e),ls.forEach(t),as.forEach(t);for(var l=0;l<Fl.length;l++){var a=Fl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Fl.length&&(l=Fl[0],l.blockedOn===null);)Am(l),l.blockedOn===null&&Fl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],s=l[a+1],r=n[ft]||null;if(typeof s=="function")r||zm(l);else if(r){var m=null;if(s&&s.hasAttribute("formAction")){if(n=s,r=s[ft]||null)m=r.formAction;else if(lr(n)!==null)continue}else m=r.action;typeof m=="function"?l[a+1]=m:(l.splice(a,3),a-=3),zm(l)}}}function Dm(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(r){return n=r})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function nr(e){this._internalRoot=e}Di.prototype.render=nr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,a=Mt();Em(l,a,e,t,null,null)},Di.prototype.unmount=nr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Em(e.current,2,null,e,null,null),mi(),t[ja]=null}};function Di(e){this._internalRoot=e}Di.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yr();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Fl.length&&t!==0&&t<Fl[l].priority;l++);Fl.splice(l,0,e),l===0&&Am(e)}};var Om=o.version;if(Om!=="19.2.4")throw Error(c(527,Om,"19.2.4"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=v(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var mv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oi.isDisabled&&Oi.supportsFiber)try{mn=Oi.inject(mv),St=Oi}catch{}}return is.createRoot=function(e,t){if(!h(e))throw Error(c(299));var l=!1,a="",n=kd,s=Yd,r=Gd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=jm(e,1,!1,null,null,l,a,null,n,s,r,Dm),e[ja]=t.current,Lc(e),new nr(t)},is.hydrateRoot=function(e,t,l){if(!h(e))throw Error(c(299));var a=!1,n="",s=kd,r=Yd,m=Gd,S=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(s=l.onUncaughtError),l.onCaughtError!==void 0&&(r=l.onCaughtError),l.onRecoverableError!==void 0&&(m=l.onRecoverableError),l.formState!==void 0&&(S=l.formState)),t=jm(e,1,!0,t,l??null,a,n,S,s,r,m,Dm),t.context=Nm(null),l=t.current,a=Mt(),a=Ki(a),n=Ul(a),n.callback=null,ql(l,n,a),l=a,t.current.lanes=l,xn(t,l),tl(t),e[ja]=t.current,Lc(e),new Di(t)},is.version="19.2.4",is}var Xm;function Nv(){if(Xm)return ur.exports;Xm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(o){console.error(o)}}return u(),ur.exports=jv(),ur.exports}var Ev=Nv();const wv=ch(Ev);/**
50
+ * react-router v7.13.0
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var Vm="popstate";function Rv(u={}){function o(h,x){let{pathname:f="/",search:p="",hash:b=""}=ba(h.location.hash.substring(1));return!f.startsWith("/")&&!f.startsWith(".")&&(f="/"+f),pr("",{pathname:f,search:p,hash:b},x.state&&x.state.usr||null,x.state&&x.state.key||"default")}function d(h,x){let f=h.document.querySelector("base"),p="";if(f&&f.getAttribute("href")){let b=h.location.href,v=b.indexOf("#");p=v===-1?b:b.slice(0,v)}return p+"#"+(typeof x=="string"?x:fs(x))}function c(h,x){Zt(h.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(x)})`)}return Tv(o,d,c,u)}function Ye(u,o){if(u===!1||u===null||typeof u>"u")throw new Error(o)}function Zt(u,o){if(!u){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Cv(){return Math.random().toString(36).substring(2,10)}function Zm(u,o){return{usr:u.state,key:u.key,idx:o}}function pr(u,o,d=null,c){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof o=="string"?ba(o):o,state:d,key:o&&o.key||c||Cv()}}function fs({pathname:u="/",search:o="",hash:d=""}){return o&&o!=="?"&&(u+=o.charAt(0)==="?"?o:"?"+o),d&&d!=="#"&&(u+=d.charAt(0)==="#"?d:"#"+d),u}function ba(u){let o={};if(u){let d=u.indexOf("#");d>=0&&(o.hash=u.substring(d),u=u.substring(0,d));let c=u.indexOf("?");c>=0&&(o.search=u.substring(c),u=u.substring(0,c)),u&&(o.pathname=u)}return o}function Tv(u,o,d,c={}){let{window:h=document.defaultView,v5Compat:x=!1}=c,f=h.history,p="POP",b=null,v=g();v==null&&(v=0,f.replaceState({...f.state,idx:v},""));function g(){return(f.state||{idx:null}).idx}function y(){p="POP";let U=g(),R=U==null?null:U-v;v=U,b&&b({action:p,location:q.location,delta:R})}function T(U,R){p="PUSH";let Q=pr(q.location,U,R);d&&d(Q,U),v=g()+1;let G=Zm(Q,v),te=q.createHref(Q);try{f.pushState(G,"",te)}catch(se){if(se instanceof DOMException&&se.name==="DataCloneError")throw se;h.location.assign(te)}x&&b&&b({action:p,location:q.location,delta:1})}function C(U,R){p="REPLACE";let Q=pr(q.location,U,R);d&&d(Q,U),v=g();let G=Zm(Q,v),te=q.createHref(Q);f.replaceState(G,"",te),x&&b&&b({action:p,location:q.location,delta:0})}function B(U){return Mv(U)}let q={get action(){return p},get location(){return u(h,f)},listen(U){if(b)throw new Error("A history only accepts one active listener");return h.addEventListener(Vm,y),b=U,()=>{h.removeEventListener(Vm,y),b=null}},createHref(U){return o(h,U)},createURL:B,encodeLocation(U){let R=B(U);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:T,replace:C,go(U){return f.go(U)}};return q}function Mv(u,o=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(d,"No window.location.(origin|href) available to create URL");let c=typeof u=="string"?u:fs(u);return c=c.replace(/ $/,"%20"),!o&&c.startsWith("//")&&(c=d+c),new URL(c,d)}function rh(u,o,d="/"){return Av(u,o,d,!1)}function Av(u,o,d,c){let h=typeof o=="string"?ba(o):o,x=Nl(h.pathname||"/",d);if(x==null)return null;let f=oh(u);_v(f);let p=null;for(let b=0;p==null&&b<f.length;++b){let v=Gv(x);p=kv(f[b],v,c)}return p}function oh(u,o=[],d=[],c="",h=!1){let x=(f,p,b=h,v)=>{let g={relativePath:v===void 0?f.path||"":v,caseSensitive:f.caseSensitive===!0,childrenIndex:p,route:f};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(c)&&b)return;Ye(g.relativePath.startsWith(c),`Absolute route path "${g.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(c.length)}let y=jl([c,g.relativePath]),T=d.concat(g);f.children&&f.children.length>0&&(Ye(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),oh(f.children,o,T,y,b)),!(f.path==null&&!f.index)&&o.push({path:y,score:Bv(y,f.index),routesMeta:T})};return u.forEach((f,p)=>{var b;if(f.path===""||!((b=f.path)!=null&&b.includes("?")))x(f,p);else for(let v of dh(f.path))x(f,p,!0,v)}),o}function dh(u){let o=u.split("/");if(o.length===0)return[];let[d,...c]=o,h=d.endsWith("?"),x=d.replace(/\?$/,"");if(c.length===0)return h?[x,""]:[x];let f=dh(c.join("/")),p=[];return p.push(...f.map(b=>b===""?x:[x,b].join("/"))),h&&p.push(...f),p.map(b=>u.startsWith("/")&&b===""?"/":b)}function _v(u){u.sort((o,d)=>o.score!==d.score?d.score-o.score:Lv(o.routesMeta.map(c=>c.childrenIndex),d.routesMeta.map(c=>c.childrenIndex)))}var zv=/^:[\w-]+$/,Dv=3,Ov=2,Uv=1,qv=10,Hv=-2,$m=u=>u==="*";function Bv(u,o){let d=u.split("/"),c=d.length;return d.some($m)&&(c+=Hv),o&&(c+=Ov),d.filter(h=>!$m(h)).reduce((h,x)=>h+(zv.test(x)?Dv:x===""?Uv:qv),c)}function Lv(u,o){return u.length===o.length&&u.slice(0,-1).every((c,h)=>c===o[h])?u[u.length-1]-o[o.length-1]:0}function kv(u,o,d=!1){let{routesMeta:c}=u,h={},x="/",f=[];for(let p=0;p<c.length;++p){let b=c[p],v=p===c.length-1,g=x==="/"?o:o.slice(x.length)||"/",y=ki({path:b.relativePath,caseSensitive:b.caseSensitive,end:v},g),T=b.route;if(!y&&v&&d&&!c[c.length-1].route.index&&(y=ki({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},g)),!y)return null;Object.assign(h,y.params),f.push({params:h,pathname:jl([x,y.pathname]),pathnameBase:Zv(jl([x,y.pathnameBase])),route:T}),y.pathnameBase!=="/"&&(x=jl([x,y.pathnameBase]))}return f}function ki(u,o){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[d,c]=Yv(u.path,u.caseSensitive,u.end),h=o.match(d);if(!h)return null;let x=h[0],f=x.replace(/(.)\/+$/,"$1"),p=h.slice(1);return{params:c.reduce((v,{paramName:g,isOptional:y},T)=>{if(g==="*"){let B=p[T]||"";f=x.slice(0,x.length-B.length).replace(/(.)\/+$/,"$1")}const C=p[T];return y&&!C?v[g]=void 0:v[g]=(C||"").replace(/%2F/g,"/"),v},{}),pathname:x,pathnameBase:f,pattern:u}}function Yv(u,o=!1,d=!0){Zt(u==="*"||!u.endsWith("*")||u.endsWith("/*"),`Route path "${u}" will be treated as if it were "${u.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${u.replace(/\*$/,"/*")}".`);let c=[],h="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,p,b)=>(c.push({paramName:p,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(c.push({paramName:"*"}),h+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?h+="\\/*$":u!==""&&u!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,o?void 0:"i"),c]}function Gv(u){try{return u.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Zt(!1,`The URL path "${u}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),u}}function Nl(u,o){if(o==="/")return u;if(!u.toLowerCase().startsWith(o.toLowerCase()))return null;let d=o.endsWith("/")?o.length-1:o.length,c=u.charAt(d);return c&&c!=="/"?null:u.slice(d)||"/"}var Qv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Xv(u,o="/"){let{pathname:d,search:c="",hash:h=""}=typeof u=="string"?ba(u):u,x;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?x=Km(d.substring(1),"/"):x=Km(d,o)):x=o,{pathname:x,search:$v(c),hash:Kv(h)}}function Km(u,o){let d=o.replace(/\/+$/,"").split("/");return u.split("/").forEach(h=>{h===".."?d.length>1&&d.pop():h!=="."&&d.push(h)}),d.length>1?d.join("/"):"/"}function dr(u,o,d,c){return`Cannot include a '${u}' character in a manually specified \`to.${o}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Vv(u){return u.filter((o,d)=>d===0||o.route.path&&o.route.path.length>0)}function Nr(u){let o=Vv(u);return o.map((d,c)=>c===o.length-1?d.pathname:d.pathnameBase)}function Er(u,o,d,c=!1){let h;typeof u=="string"?h=ba(u):(h={...u},Ye(!h.pathname||!h.pathname.includes("?"),dr("?","pathname","search",h)),Ye(!h.pathname||!h.pathname.includes("#"),dr("#","pathname","hash",h)),Ye(!h.search||!h.search.includes("#"),dr("#","search","hash",h)));let x=u===""||h.pathname==="",f=x?"/":h.pathname,p;if(f==null)p=d;else{let y=o.length-1;if(!c&&f.startsWith("..")){let T=f.split("/");for(;T[0]==="..";)T.shift(),y-=1;h.pathname=T.join("/")}p=y>=0?o[y]:"/"}let b=Xv(h,p),v=f&&f!=="/"&&f.endsWith("/"),g=(x||f===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(v||g)&&(b.pathname+="/"),b}var jl=u=>u.join("/").replace(/\/\/+/g,"/"),Zv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),$v=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,Kv=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u,Jv=class{constructor(u,o,d,c=!1){this.status=u,this.statusText=o||"",this.internal=c,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function Fv(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}function Wv(u){return u.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var fh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function mh(u,o){let d=u;if(typeof d!="string"||!Qv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let c=d,h=!1;if(fh)try{let x=new URL(window.location.href),f=d.startsWith("//")?new URL(x.protocol+d):new URL(d),p=Nl(f.pathname,o);f.origin===x.origin&&p!=null?d=p+f.search+f.hash:h=!0}catch{Zt(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:h,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var hh=["POST","PUT","PATCH","DELETE"];new Set(hh);var Pv=["GET",...hh];new Set(Pv);var on=E.createContext(null);on.displayName="DataRouter";var Qi=E.createContext(null);Qi.displayName="DataRouterState";var Iv=E.createContext(!1),xh=E.createContext({isTransitioning:!1});xh.displayName="ViewTransition";var ep=E.createContext(new Map);ep.displayName="Fetchers";var tp=E.createContext(null);tp.displayName="Await";var zt=E.createContext(null);zt.displayName="Navigation";var ms=E.createContext(null);ms.displayName="Location";var ll=E.createContext({outlet:null,matches:[],isDataRoute:!1});ll.displayName="Route";var wr=E.createContext(null);wr.displayName="RouteError";var vh="REACT_ROUTER_ERROR",lp="REDIRECT",ap="ROUTE_ERROR_RESPONSE";function np(u){if(u.startsWith(`${vh}:${lp}:{`))try{let o=JSON.parse(u.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function sp(u){if(u.startsWith(`${vh}:${ap}:{`))try{let o=JSON.parse(u.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new Jv(o.status,o.statusText,o.data)}catch{}}function ip(u,{relative:o}={}){Ye(dn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:c}=E.useContext(zt),{hash:h,pathname:x,search:f}=hs(u,{relative:o}),p=x;return d!=="/"&&(p=x==="/"?d:jl([d,x])),c.createHref({pathname:p,search:f,hash:h})}function dn(){return E.useContext(ms)!=null}function Il(){return Ye(dn(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(ms).location}var ph="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gh(u){E.useContext(zt).static||E.useLayoutEffect(u)}function Rr(){let{isDataRoute:u}=E.useContext(ll);return u?yp():up()}function up(){Ye(dn(),"useNavigate() may be used only in the context of a <Router> component.");let u=E.useContext(on),{basename:o,navigator:d}=E.useContext(zt),{matches:c}=E.useContext(ll),{pathname:h}=Il(),x=JSON.stringify(Nr(c)),f=E.useRef(!1);return gh(()=>{f.current=!0}),E.useCallback((b,v={})=>{if(Zt(f.current,ph),!f.current)return;if(typeof b=="number"){d.go(b);return}let g=Er(b,JSON.parse(x),h,v.relative==="path");u==null&&o!=="/"&&(g.pathname=g.pathname==="/"?o:jl([o,g.pathname])),(v.replace?d.replace:d.push)(g,v.state,v)},[o,d,x,h,u])}E.createContext(null);function hs(u,{relative:o}={}){let{matches:d}=E.useContext(ll),{pathname:c}=Il(),h=JSON.stringify(Nr(d));return E.useMemo(()=>Er(u,JSON.parse(h),c,o==="path"),[u,h,c,o])}function cp(u,o){return yh(u,o)}function yh(u,o,d,c,h){var Q;Ye(dn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=E.useContext(zt),{matches:f}=E.useContext(ll),p=f[f.length-1],b=p?p.params:{},v=p?p.pathname:"/",g=p?p.pathnameBase:"/",y=p&&p.route;{let G=y&&y.path||"";Sh(v,!y||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${G}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let T=Il(),C;if(o){let G=typeof o=="string"?ba(o):o;Ye(g==="/"||((Q=G.pathname)==null?void 0:Q.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${G.pathname}" was given in the \`location\` prop.`),C=G}else C=T;let B=C.pathname||"/",q=B;if(g!=="/"){let G=g.replace(/^\//,"").split("/");q="/"+B.replace(/^\//,"").split("/").slice(G.length).join("/")}let U=rh(u,{pathname:q});Zt(y||U!=null,`No routes matched location "${C.pathname}${C.search}${C.hash}" `),Zt(U==null||U[U.length-1].route.element!==void 0||U[U.length-1].route.Component!==void 0||U[U.length-1].route.lazy!==void 0,`Matched leaf route at location "${C.pathname}${C.search}${C.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let R=mp(U&&U.map(G=>Object.assign({},G,{params:Object.assign({},b,G.params),pathname:jl([g,x.encodeLocation?x.encodeLocation(G.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?g:jl([g,x.encodeLocation?x.encodeLocation(G.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),f,d,c,h);return o&&R?E.createElement(ms.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},R):R}function rp(){let u=gp(),o=Fv(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),d=u instanceof Error?u.stack:null,c="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:c},x={padding:"2px 4px",backgroundColor:c},f=null;return console.error("Error handled by React Router default ErrorBoundary:",u),f=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:x},"ErrorBoundary")," or"," ",E.createElement("code",{style:x},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},o),d?E.createElement("pre",{style:h},d):null,f)}var op=E.createElement(rp,null),bh=class extends E.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,o){return o.location!==u.location||o.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:o.error,location:o.location,revalidation:u.revalidation||o.revalidation}}componentDidCatch(u,o){this.props.onError?this.props.onError(u,o):console.error("React Router caught the following error during render",u)}render(){let u=this.state.error;if(this.context&&typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){const d=sp(u.digest);d&&(u=d)}let o=u!==void 0?E.createElement(ll.Provider,{value:this.props.routeContext},E.createElement(wr.Provider,{value:u,children:this.props.component})):this.props.children;return this.context?E.createElement(dp,{error:u},o):o}};bh.contextType=Iv;var fr=new WeakMap;function dp({children:u,error:o}){let{basename:d}=E.useContext(zt);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let c=np(o.digest);if(c){let h=fr.get(o);if(h)throw h;let x=mh(c.location,d);if(fh&&!fr.get(o))if(x.isExternal||c.reloadDocument)window.location.href=x.absoluteURL||x.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(x.to,{replace:c.replace}));throw fr.set(o,f),f}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return u}function fp({routeContext:u,match:o,children:d}){let c=E.useContext(on);return c&&c.static&&c.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=o.route.id),E.createElement(ll.Provider,{value:u},d)}function mp(u,o=[],d=null,c=null,h=null){if(u==null){if(!d)return null;if(d.errors)u=d.matches;else if(o.length===0&&!d.initialized&&d.matches.length>0)u=d.matches;else return null}let x=u,f=d==null?void 0:d.errors;if(f!=null){let g=x.findIndex(y=>y.route.id&&(f==null?void 0:f[y.route.id])!==void 0);Ye(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),x=x.slice(0,Math.min(x.length,g+1))}let p=!1,b=-1;if(d)for(let g=0;g<x.length;g++){let y=x[g];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(b=g),y.route.id){let{loaderData:T,errors:C}=d,B=y.route.loader&&!T.hasOwnProperty(y.route.id)&&(!C||C[y.route.id]===void 0);if(y.route.lazy||B){p=!0,b>=0?x=x.slice(0,b+1):x=[x[0]];break}}}let v=d&&c?(g,y)=>{var T,C;c(g,{location:d.location,params:((C=(T=d.matches)==null?void 0:T[0])==null?void 0:C.params)??{},unstable_pattern:Wv(d.matches),errorInfo:y})}:void 0;return x.reduceRight((g,y,T)=>{let C,B=!1,q=null,U=null;d&&(C=f&&y.route.id?f[y.route.id]:void 0,q=y.route.errorElement||op,p&&(b<0&&T===0?(Sh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),B=!0,U=null):b===T&&(B=!0,U=y.route.hydrateFallbackElement||null)));let R=o.concat(x.slice(0,T+1)),Q=()=>{let G;return C?G=q:B?G=U:y.route.Component?G=E.createElement(y.route.Component,null):y.route.element?G=y.route.element:G=g,E.createElement(fp,{match:y,routeContext:{outlet:g,matches:R,isDataRoute:d!=null},children:G})};return d&&(y.route.ErrorBoundary||y.route.errorElement||T===0)?E.createElement(bh,{location:d.location,revalidation:d.revalidation,component:q,error:C,children:Q(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:v}):Q()},null)}function Cr(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hp(u){let o=E.useContext(on);return Ye(o,Cr(u)),o}function xp(u){let o=E.useContext(Qi);return Ye(o,Cr(u)),o}function vp(u){let o=E.useContext(ll);return Ye(o,Cr(u)),o}function Tr(u){let o=vp(u),d=o.matches[o.matches.length-1];return Ye(d.route.id,`${u} can only be used on routes that contain a unique "id"`),d.route.id}function pp(){return Tr("useRouteId")}function gp(){var c;let u=E.useContext(wr),o=xp("useRouteError"),d=Tr("useRouteError");return u!==void 0?u:(c=o.errors)==null?void 0:c[d]}function yp(){let{router:u}=hp("useNavigate"),o=Tr("useNavigate"),d=E.useRef(!1);return gh(()=>{d.current=!0}),E.useCallback(async(h,x={})=>{Zt(d.current,ph),d.current&&(typeof h=="number"?await u.navigate(h):await u.navigate(h,{fromRouteId:o,...x}))},[u,o])}var Jm={};function Sh(u,o,d){!o&&!Jm[u]&&(Jm[u]=!0,Zt(!1,d))}E.memo(bp);function bp({routes:u,future:o,state:d,onError:c}){return yh(u,void 0,d,c,o)}function Sp({to:u,replace:o,state:d,relative:c}){Ye(dn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=E.useContext(zt);Zt(!h,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:x}=E.useContext(ll),{pathname:f}=Il(),p=Rr(),b=Er(u,Nr(x),f,c==="path"),v=JSON.stringify(b);return E.useEffect(()=>{p(JSON.parse(v),{replace:o,state:d,relative:c})},[p,v,c,o,d]),null}function Sl(u){Ye(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function jp({basename:u="/",children:o=null,location:d,navigationType:c="POP",navigator:h,static:x=!1,unstable_useTransitions:f}){Ye(!dn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=u.replace(/^\/*/,"/"),b=E.useMemo(()=>({basename:p,navigator:h,static:x,unstable_useTransitions:f,future:{}}),[p,h,x,f]);typeof d=="string"&&(d=ba(d));let{pathname:v="/",search:g="",hash:y="",state:T=null,key:C="default"}=d,B=E.useMemo(()=>{let q=Nl(v,p);return q==null?null:{location:{pathname:q,search:g,hash:y,state:T,key:C},navigationType:c}},[p,v,g,y,T,C,c]);return Zt(B!=null,`<Router basename="${p}"> is not able to match the URL "${v}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),B==null?null:E.createElement(zt.Provider,{value:b},E.createElement(ms.Provider,{children:o,value:B}))}function Np({children:u,location:o}){return cp(gr(u),o)}function gr(u,o=[]){let d=[];return E.Children.forEach(u,(c,h)=>{if(!E.isValidElement(c))return;let x=[...o,h];if(c.type===E.Fragment){d.push.apply(d,gr(c.props.children,x));return}Ye(c.type===Sl,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ye(!c.props.index||!c.props.children,"An index route cannot have child routes.");let f={id:c.props.id||x.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(f.children=gr(c.props.children,x)),d.push(f)}),d}var Hi="get",Bi="application/x-www-form-urlencoded";function Xi(u){return typeof HTMLElement<"u"&&u instanceof HTMLElement}function Ep(u){return Xi(u)&&u.tagName.toLowerCase()==="button"}function wp(u){return Xi(u)&&u.tagName.toLowerCase()==="form"}function Rp(u){return Xi(u)&&u.tagName.toLowerCase()==="input"}function Cp(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Tp(u,o){return u.button===0&&(!o||o==="_self")&&!Cp(u)}var Ui=null;function Mp(){if(Ui===null)try{new FormData(document.createElement("form"),0),Ui=!1}catch{Ui=!0}return Ui}var Ap=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function mr(u){return u!=null&&!Ap.has(u)?(Zt(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bi}"`),null):u}function _p(u,o){let d,c,h,x,f;if(wp(u)){let p=u.getAttribute("action");c=p?Nl(p,o):null,d=u.getAttribute("method")||Hi,h=mr(u.getAttribute("enctype"))||Bi,x=new FormData(u)}else if(Ep(u)||Rp(u)&&(u.type==="submit"||u.type==="image")){let p=u.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=u.getAttribute("formaction")||p.getAttribute("action");if(c=b?Nl(b,o):null,d=u.getAttribute("formmethod")||p.getAttribute("method")||Hi,h=mr(u.getAttribute("formenctype"))||mr(p.getAttribute("enctype"))||Bi,x=new FormData(p,u),!Mp()){let{name:v,type:g,value:y}=u;if(g==="image"){let T=v?`${v}.`:"";x.append(`${T}x`,"0"),x.append(`${T}y`,"0")}else v&&x.append(v,y)}}else{if(Xi(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Hi,c=null,h=Bi,f=u}return x&&h==="text/plain"&&(f=x,x=void 0),{action:c,method:d.toLowerCase(),encType:h,formData:x,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Mr(u,o){if(u===!1||u===null||typeof u>"u")throw new Error(o)}function zp(u,o,d,c){let h=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return d?h.pathname.endsWith("/")?h.pathname=`${h.pathname}_.${c}`:h.pathname=`${h.pathname}.${c}`:h.pathname==="/"?h.pathname=`_root.${c}`:o&&Nl(h.pathname,o)==="/"?h.pathname=`${o.replace(/\/$/,"")}/_root.${c}`:h.pathname=`${h.pathname.replace(/\/$/,"")}.${c}`,h}async function Dp(u,o){if(u.id in o)return o[u.id];try{let d=await import(u.module);return o[u.id]=d,d}catch(d){return console.error(`Error loading route module \`${u.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Op(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Up(u,o,d){let c=await Promise.all(u.map(async h=>{let x=o.routes[h.route.id];if(x){let f=await Dp(x,d);return f.links?f.links():[]}return[]}));return Lp(c.flat(1).filter(Op).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function Fm(u,o,d,c,h,x){let f=(b,v)=>d[v]?b.route.id!==d[v].route.id:!0,p=(b,v)=>{var g;return d[v].pathname!==b.pathname||((g=d[v].route.path)==null?void 0:g.endsWith("*"))&&d[v].params["*"]!==b.params["*"]};return x==="assets"?o.filter((b,v)=>f(b,v)||p(b,v)):x==="data"?o.filter((b,v)=>{var y;let g=c.routes[b.route.id];if(!g||!g.hasLoader)return!1;if(f(b,v)||p(b,v))return!0;if(b.route.shouldRevalidate){let T=b.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((y=d[0])==null?void 0:y.params)||{},nextUrl:new URL(u,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function qp(u,o,{includeHydrateFallback:d}={}){return Hp(u.map(c=>{let h=o.routes[c.route.id];if(!h)return[];let x=[h.module];return h.clientActionModule&&(x=x.concat(h.clientActionModule)),h.clientLoaderModule&&(x=x.concat(h.clientLoaderModule)),d&&h.hydrateFallbackModule&&(x=x.concat(h.hydrateFallbackModule)),h.imports&&(x=x.concat(h.imports)),x}).flat(1))}function Hp(u){return[...new Set(u)]}function Bp(u){let o={},d=Object.keys(u).sort();for(let c of d)o[c]=u[c];return o}function Lp(u,o){let d=new Set;return new Set(o),u.reduce((c,h)=>{let x=JSON.stringify(Bp(h));return d.has(x)||(d.add(x),c.push({key:x,link:h})),c},[])}function jh(){let u=E.useContext(on);return Mr(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function kp(){let u=E.useContext(Qi);return Mr(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Ar=E.createContext(void 0);Ar.displayName="FrameworkContext";function Nh(){let u=E.useContext(Ar);return Mr(u,"You must render this element inside a <HydratedRouter> element"),u}function Yp(u,o){let d=E.useContext(Ar),[c,h]=E.useState(!1),[x,f]=E.useState(!1),{onFocus:p,onBlur:b,onMouseEnter:v,onMouseLeave:g,onTouchStart:y}=o,T=E.useRef(null);E.useEffect(()=>{if(u==="render"&&f(!0),u==="viewport"){let q=R=>{R.forEach(Q=>{f(Q.isIntersecting)})},U=new IntersectionObserver(q,{threshold:.5});return T.current&&U.observe(T.current),()=>{U.disconnect()}}},[u]),E.useEffect(()=>{if(c){let q=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(q)}}},[c]);let C=()=>{h(!0)},B=()=>{h(!1),f(!1)};return d?u!=="intent"?[x,T,{}]:[x,T,{onFocus:us(p,C),onBlur:us(b,B),onMouseEnter:us(v,C),onMouseLeave:us(g,B),onTouchStart:us(y,C)}]:[!1,T,{}]}function us(u,o){return d=>{u&&u(d),d.defaultPrevented||o(d)}}function Gp({page:u,...o}){let{router:d}=jh(),c=E.useMemo(()=>rh(d.routes,u,d.basename),[d.routes,u,d.basename]);return c?E.createElement(Xp,{page:u,matches:c,...o}):null}function Qp(u){let{manifest:o,routeModules:d}=Nh(),[c,h]=E.useState([]);return E.useEffect(()=>{let x=!1;return Up(u,o,d).then(f=>{x||h(f)}),()=>{x=!0}},[u,o,d]),c}function Xp({page:u,matches:o,...d}){let c=Il(),{future:h,manifest:x,routeModules:f}=Nh(),{basename:p}=jh(),{loaderData:b,matches:v}=kp(),g=E.useMemo(()=>Fm(u,o,v,x,c,"data"),[u,o,v,x,c]),y=E.useMemo(()=>Fm(u,o,v,x,c,"assets"),[u,o,v,x,c]),T=E.useMemo(()=>{if(u===c.pathname+c.search+c.hash)return[];let q=new Set,U=!1;if(o.forEach(Q=>{var te;let G=x.routes[Q.route.id];!G||!G.hasLoader||(!g.some(se=>se.route.id===Q.route.id)&&Q.route.id in b&&((te=f[Q.route.id])!=null&&te.shouldRevalidate)||G.hasClientLoader?U=!0:q.add(Q.route.id))}),q.size===0)return[];let R=zp(u,p,h.unstable_trailingSlashAwareDataRequests,"data");return U&&q.size>0&&R.searchParams.set("_routes",o.filter(Q=>q.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[R.pathname+R.search]},[p,h.unstable_trailingSlashAwareDataRequests,b,c,x,g,o,u,f]),C=E.useMemo(()=>qp(y,x),[y,x]),B=Qp(y);return E.createElement(E.Fragment,null,T.map(q=>E.createElement("link",{key:q,rel:"prefetch",as:"fetch",href:q,...d})),C.map(q=>E.createElement("link",{key:q,rel:"modulepreload",href:q,...d})),B.map(({key:q,link:U})=>E.createElement("link",{key:q,nonce:d.nonce,...U,crossOrigin:U.crossOrigin??d.crossOrigin})))}function Vp(...u){return o=>{u.forEach(d=>{typeof d=="function"?d(o):d!=null&&(d.current=o)})}}var Zp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Zp&&(window.__reactRouterVersion="7.13.0")}catch{}function $p({basename:u,children:o,unstable_useTransitions:d,window:c}){let h=E.useRef();h.current==null&&(h.current=Rv({window:c,v5Compat:!0}));let x=h.current,[f,p]=E.useState({action:x.action,location:x.location}),b=E.useCallback(v=>{d===!1?p(v):E.startTransition(()=>p(v))},[d]);return E.useLayoutEffect(()=>x.listen(b),[x,b]),E.createElement(jp,{basename:u,children:o,location:f.location,navigationType:f.action,navigator:x,unstable_useTransitions:d})}var Eh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wh=E.forwardRef(function({onClick:o,discover:d="render",prefetch:c="none",relative:h,reloadDocument:x,replace:f,state:p,target:b,to:v,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:T,...C},B){let{basename:q,unstable_useTransitions:U}=E.useContext(zt),R=typeof v=="string"&&Eh.test(v),Q=mh(v,q);v=Q.to;let G=ip(v,{relative:h}),[te,se,Z]=Yp(c,C),ee=Fp(v,{replace:f,state:p,target:b,preventScrollReset:g,relative:h,viewTransition:y,unstable_defaultShouldRevalidate:T,unstable_useTransitions:U});function P($){o&&o($),$.defaultPrevented||ee($)}let ue=E.createElement("a",{...C,...Z,href:Q.absoluteURL||G,onClick:Q.isExternal||x?o:P,ref:Vp(B,se),target:b,"data-discover":!R&&d==="render"?"true":void 0});return te&&!R?E.createElement(E.Fragment,null,ue,E.createElement(Gp,{page:G})):ue});wh.displayName="Link";var Rh=E.forwardRef(function({"aria-current":o="page",caseSensitive:d=!1,className:c="",end:h=!1,style:x,to:f,viewTransition:p,children:b,...v},g){let y=hs(f,{relative:v.relative}),T=Il(),C=E.useContext(Qi),{navigator:B,basename:q}=E.useContext(zt),U=C!=null&&tg(y)&&p===!0,R=B.encodeLocation?B.encodeLocation(y).pathname:y.pathname,Q=T.pathname,G=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;d||(Q=Q.toLowerCase(),G=G?G.toLowerCase():null,R=R.toLowerCase()),G&&q&&(G=Nl(G,q)||G);const te=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let se=Q===R||!h&&Q.startsWith(R)&&Q.charAt(te)==="/",Z=G!=null&&(G===R||!h&&G.startsWith(R)&&G.charAt(R.length)==="/"),ee={isActive:se,isPending:Z,isTransitioning:U},P=se?o:void 0,ue;typeof c=="function"?ue=c(ee):ue=[c,se?"active":null,Z?"pending":null,U?"transitioning":null].filter(Boolean).join(" ");let $=typeof x=="function"?x(ee):x;return E.createElement(wh,{...v,"aria-current":P,className:ue,ref:g,style:$,to:f,viewTransition:p},typeof b=="function"?b(ee):b)});Rh.displayName="NavLink";var Kp=E.forwardRef(({discover:u="render",fetcherKey:o,navigate:d,reloadDocument:c,replace:h,state:x,method:f=Hi,action:p,onSubmit:b,relative:v,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:T,...C},B)=>{let{unstable_useTransitions:q}=E.useContext(zt),U=Ip(),R=eg(p,{relative:v}),Q=f.toLowerCase()==="get"?"get":"post",G=typeof p=="string"&&Eh.test(p),te=se=>{if(b&&b(se),se.defaultPrevented)return;se.preventDefault();let Z=se.nativeEvent.submitter,ee=(Z==null?void 0:Z.getAttribute("formmethod"))||f,P=()=>U(Z||se.currentTarget,{fetcherKey:o,method:ee,navigate:d,replace:h,state:x,relative:v,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:T});q&&d!==!1?E.startTransition(()=>P()):P()};return E.createElement("form",{ref:B,method:Q,action:R,onSubmit:c?b:te,...C,"data-discover":!G&&u==="render"?"true":void 0})});Kp.displayName="Form";function Jp(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ch(u){let o=E.useContext(on);return Ye(o,Jp(u)),o}function Fp(u,{target:o,replace:d,state:c,preventScrollReset:h,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:p,unstable_useTransitions:b}={}){let v=Rr(),g=Il(),y=hs(u,{relative:x});return E.useCallback(T=>{if(Tp(T,o)){T.preventDefault();let C=d!==void 0?d:fs(g)===fs(y),B=()=>v(u,{replace:C,state:c,preventScrollReset:h,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:p});b?E.startTransition(()=>B()):B()}},[g,v,y,d,c,o,u,h,x,f,p,b])}var Wp=0,Pp=()=>`__${String(++Wp)}__`;function Ip(){let{router:u}=Ch("useSubmit"),{basename:o}=E.useContext(zt),d=pp(),c=u.fetch,h=u.navigate;return E.useCallback(async(x,f={})=>{let{action:p,method:b,encType:v,formData:g,body:y}=_p(x,o);if(f.navigate===!1){let T=f.fetcherKey||Pp();await c(T,d,f.action||p,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:y,formMethod:f.method||b,formEncType:f.encType||v,flushSync:f.flushSync})}else await h(f.action||p,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:y,formMethod:f.method||b,formEncType:f.encType||v,replace:f.replace,state:f.state,fromRouteId:d,flushSync:f.flushSync,viewTransition:f.viewTransition})},[c,h,o,d])}function eg(u,{relative:o}={}){let{basename:d}=E.useContext(zt),c=E.useContext(ll);Ye(c,"useFormAction must be used inside a RouteContext");let[h]=c.matches.slice(-1),x={...hs(u||".",{relative:o})},f=Il();if(u==null){x.search=f.search;let p=new URLSearchParams(x.search),b=p.getAll("index");if(b.some(g=>g==="")){p.delete("index"),b.filter(y=>y).forEach(y=>p.append("index",y));let g=p.toString();x.search=g?`?${g}`:""}}return(!u||u===".")&&h.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(x.pathname=x.pathname==="/"?d:jl([d,x.pathname])),fs(x)}function tg(u,{relative:o}={}){let d=E.useContext(xh);Ye(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=Ch("useViewTransitionState"),h=hs(u,{relative:o});if(!d.isTransitioning)return!1;let x=Nl(d.currentLocation.pathname,c)||d.currentLocation.pathname,f=Nl(d.nextLocation.pathname,c)||d.nextLocation.pathname;return ki(h.pathname,f)!=null||ki(h.pathname,x)!=null}/**
61
+ * @license lucide-react v0.564.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const Th=(...u)=>u.filter((o,d,c)=>!!o&&o.trim()!==""&&c.indexOf(o)===d).join(" ").trim();/**
66
+ * @license lucide-react v0.564.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const lg=u=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
71
+ * @license lucide-react v0.564.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const ag=u=>u.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,d,c)=>c?c.toUpperCase():d.toLowerCase());/**
76
+ * @license lucide-react v0.564.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const Wm=u=>{const o=ag(u);return o.charAt(0).toUpperCase()+o.slice(1)};/**
81
+ * @license lucide-react v0.564.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */var ng={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
86
+ * @license lucide-react v0.564.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const sg=u=>{for(const o in u)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};/**
91
+ * @license lucide-react v0.564.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const ig=E.forwardRef(({color:u="currentColor",size:o=24,strokeWidth:d=2,absoluteStrokeWidth:c,className:h="",children:x,iconNode:f,...p},b)=>E.createElement("svg",{ref:b,...ng,width:o,height:o,stroke:u,strokeWidth:c?Number(d)*24/Number(o):d,className:Th("lucide",h),...!x&&!sg(p)&&{"aria-hidden":"true"},...p},[...f.map(([v,g])=>E.createElement(v,g)),...Array.isArray(x)?x:[x]]));/**
96
+ * @license lucide-react v0.564.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const re=(u,o)=>{const d=E.forwardRef(({className:c,...h},x)=>E.createElement(ig,{ref:x,iconNode:o,className:Th(`lucide-${lg(Wm(u))}`,`lucide-${u}`,c),...h}));return d.displayName=Wm(u),d};/**
101
+ * @license lucide-react v0.564.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const ug=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Mh=re("activity",ug);/**
106
+ * @license lucide-react v0.564.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const cg=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],rg=re("arrow-down",cg);/**
111
+ * @license lucide-react v0.564.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const og=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Pm=re("arrow-right",og);/**
116
+ * @license lucide-react v0.564.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const dg=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],fg=re("arrow-up-down",dg);/**
121
+ * @license lucide-react v0.564.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const mg=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],hg=re("arrow-up",mg);/**
126
+ * @license lucide-react v0.564.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const xg=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],vg=re("bell",xg);/**
131
+ * @license lucide-react v0.564.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const pg=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Im=re("briefcase",pg);/**
136
+ * @license lucide-react v0.564.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const gg=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],_r=re("calendar",gg);/**
141
+ * @license lucide-react v0.564.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const yg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yr=re("check",yg);/**
146
+ * @license lucide-react v0.564.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const bg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Sg=re("chevron-down",bg);/**
151
+ * @license lucide-react v0.564.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const jg=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ng=re("chevron-left",jg);/**
156
+ * @license lucide-react v0.564.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const Eg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wg=re("chevron-right",Eg);/**
161
+ * @license lucide-react v0.564.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const Rg=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Cg=re("chevrons-up-down",Rg);/**
166
+ * @license lucide-react v0.564.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const Tg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],El=re("circle-alert",Tg);/**
171
+ * @license lucide-react v0.564.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const Mg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]],eh=re("circle-arrow-down",Mg);/**
176
+ * @license lucide-react v0.564.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const Ag=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],xs=re("circle-check-big",Ag);/**
181
+ * @license lucide-react v0.564.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const _g=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],zg=re("circle-x",_g);/**
186
+ * @license lucide-react v0.564.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const Dg=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],th=re("clipboard-list",Dg);/**
191
+ * @license lucide-react v0.564.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const Og=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Yi=re("clock",Og);/**
196
+ * @license lucide-react v0.564.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const Ug=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ah=re("external-link",Ug);/**
201
+ * @license lucide-react v0.564.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const qg=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Hg=re("eye-off",qg);/**
206
+ * @license lucide-react v0.564.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const Bg=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Lg=re("eye",Bg);/**
211
+ * @license lucide-react v0.564.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const kg=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],br=re("file-text",kg);/**
216
+ * @license lucide-react v0.564.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const Yg=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],Gg=re("git-pull-request",Yg);/**
221
+ * @license lucide-react v0.564.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const Qg=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Xg=re("house",Qg);/**
226
+ * @license lucide-react v0.564.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const Vg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Zg=re("info",Vg);/**
231
+ * @license lucide-react v0.564.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const $g=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],Kg=re("kanban",$g);/**
236
+ * @license lucide-react v0.564.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const Jg=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],_h=re("loader-circle",Jg);/**
241
+ * @license lucide-react v0.564.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const Fg=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],zh=re("map",Fg);/**
246
+ * @license lucide-react v0.564.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const Wg=[["path",{d:"M5 12h14",key:"1ays0h"}]],Pg=re("minus",Wg);/**
251
+ * @license lucide-react v0.564.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const Ig=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Dh=re("pause",Ig);/**
256
+ * @license lucide-react v0.564.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const ey=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Oh=re("pen",ey);/**
261
+ * @license lucide-react v0.564.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const ty=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Vi=re("play",ty);/**
266
+ * @license lucide-react v0.564.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const ly=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vs=re("plus",ly);/**
271
+ * @license lucide-react v0.564.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const ay=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],ny=re("rotate-ccw",ay);/**
276
+ * @license lucide-react v0.564.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const sy=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],iy=re("save",sy);/**
281
+ * @license lucide-react v0.564.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const uy=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Zi=re("search",uy);/**
286
+ * @license lucide-react v0.564.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const cy=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ry=re("settings",cy);/**
291
+ * @license lucide-react v0.564.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const oy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],lh=re("square",oy);/**
296
+ * @license lucide-react v0.564.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const dy=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],fy=re("terminal",dy);/**
301
+ * @license lucide-react v0.564.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const my=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],hy=re("test-tube-diagonal",my);/**
306
+ * @license lucide-react v0.564.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const xy=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Uh=re("trash-2",xy);/**
311
+ * @license lucide-react v0.564.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const vy=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],py=re("triangle-alert",vy);/**
316
+ * @license lucide-react v0.564.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const gy=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],yy=re("wifi",gy);/**
321
+ * @license lucide-react v0.564.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const by=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ps=re("x",by),zr="";let qh=!1,Sr=null;function Sy(u){qh=u}function jy(u){Sr=u}function Ny(u){return encodeURIComponent(u.replace(/\//g,"~"))}function Pe(u){return qh&&Sr?u.replace("/api/",`/api/projects/${Ny(Sr)}/`):u}function Ey(){return Ie("/api/mode")}function wy(){return Ie("/api/projects")}async function Ie(u,o){const d=`${zr}${u}`,c=await fetch(d,{headers:{"Content-Type":"application/json",...o==null?void 0:o.headers},...o});if(!c.ok){const h=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(h.error||`HTTP ${c.status}: ${c.statusText}`)}return c.json()}function hr(){return Ie(Pe("/api/status"))}function Hh(){return Ie(Pe("/api/prs"))}function Ry(u,o){const d=`?lines=${encodeURIComponent(o)}`;return Ie(Pe(`/api/logs/${encodeURIComponent(u)}${d}`))}function Bh(){return Ie(Pe("/api/config"))}function ya(u){return Ie(Pe("/api/config"),{method:"PUT",body:JSON.stringify(u)})}function Cy(){return Ie(Pe("/api/doctor"))}function Lh(){return Ie(Pe("/api/schedule-info"))}function Ty(){return Ie(Pe("/api/actions/review"),{method:"POST"})}function ds(){return Ie(Pe("/api/actions/install-cron"),{method:"POST"})}function My(){return Ie(Pe("/api/actions/uninstall-cron"),{method:"POST"})}function Ay(u="all"){return Ie(Pe("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:u})})}const Pl=["Draft","Ready","In Progress","Review","Done"];function kh(){return Ie(Pe("/api/board/status"))}function _y(u){return Ie(Pe("/api/board/issues"),{method:"POST",body:JSON.stringify(u)})}function Yh(u,o){return Ie(Pe(`/api/board/issues/${u}/move`),{method:"PATCH",body:JSON.stringify({column:o})})}async function zy(u){const o=`${zr}${Pe(`/api/board/issues/${u}`)}`,d=await fetch(o,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const c=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`HTTP ${d.status}: ${d.statusText}`)}}function Dy(){return Ie(Pe("/api/actions/clear-lock"),{method:"POST"})}function Oy(u,o=[],d){const c=(d==null?void 0:d.enabled)??!0,h=E.useRef(u);h.current=u,E.useEffect(()=>{if(!c)return;const x=`${zr}${Pe("/api/status/events")}`,f=new EventSource(x);return f.addEventListener("status_changed",p=>{try{const b=JSON.parse(p.data);h.current(b)}catch{}}),()=>{f.close()}},[c,...o])}function Uy(){return Ie(Pe("/api/roadmap"))}function qy(){return Ie(Pe("/api/roadmap/scan"),{method:"POST"})}function Gh(u){return Ie(Pe("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:u})})}function Ft(u,o=[],d){const c=(d==null?void 0:d.enabled)??!0,[h,x]=E.useState(null),[f,p]=E.useState(!0),[b,v]=E.useState(null),g=E.useRef(u);g.current=u;const y=E.useRef(()=>{(async()=>{v(null);try{const C=await g.current();x(C)}catch(C){v(C instanceof Error?C:new Error("Unknown error"))}})()});return y.current=y.current.bind(y),E.useEffect(()=>{if(!c)return;let T=!1;return p(!0),v(null),(async()=>{try{const B=await g.current();T||x(B)}catch(B){T||v(B instanceof Error?B:new Error("Unknown error"))}finally{T||p(!1)}})(),()=>{T=!0}},[...o,c]),{data:h,loading:f,error:b,refetch:y.current}}const ah=u=>{let o;const d=new Set,c=(v,g)=>{const y=typeof v=="function"?v(o):v;if(!Object.is(y,o)){const T=o;o=g??(typeof y!="object"||y===null)?y:Object.assign({},o,y),d.forEach(C=>C(o,T))}},h=()=>o,p={setState:c,getState:h,getInitialState:()=>b,subscribe:v=>(d.add(v),()=>d.delete(v))},b=o=u(c,h,p);return p},Hy=u=>u?ah(u):ah,By=u=>u;function Ly(u,o=By){const d=Oe.useSyncExternalStore(u.subscribe,()=>o(u.getState()),()=>o(u.getInitialState()));return Oe.useDebugValue(d),d}const nh=u=>{const o=Hy(u),d=c=>Ly(o,c);return Object.assign(d,o),d},ky=u=>u?nh(u):nh,Yy=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,ot=ky(u=>({projectName:"Night Watch",setProjectName:o=>u({projectName:o}),toasts:[],addToast:o=>{const d=Math.random().toString(36).substring(7);u(c=>({toasts:[...c.toasts,{...o,id:d}]})),setTimeout(()=>{u(c=>({toasts:c.toasts.filter(h=>h.id!==d)}))},5e3)},removeToast:o=>u(d=>({toasts:d.toasts.filter(c=>c.id!==o)})),status:null,setStatus:o=>u(d=>!d.status||new Date(o.timestamp)>new Date(d.status.timestamp)?{status:o}:d),globalModeLoading:!0,setGlobalModeLoading:o=>u({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{Sy(o),u({isGlobalMode:o})},projects:[],setProjects:o=>u({projects:o}),selectedProjectId:Yy,selectProject:o=>{jy(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),u(d=>{const c=d.projects.find(h=>h.name===o);return{selectedProjectId:o,...c?{projectName:c.name}:{}}})}})),Gy=()=>{const[u,o]=E.useState(!1),{projectName:d,isGlobalMode:c,projects:h,selectedProjectId:x,selectProject:f,globalModeLoading:p}=ot(),{data:b}=Ft(Hh,[x],{enabled:!p}),v=(b==null?void 0:b.length)??0,g=E.useMemo(()=>[{icon:Xg,label:"Dashboard",path:"/",section:"Overview"},{icon:fy,label:"Logs",path:"/logs"},{icon:Kg,label:"Board",path:"/board",section:"Work"},{icon:Gg,label:"Pull Requests",path:"/prs",badge:v},{icon:zh,label:"Roadmap",path:"/roadmap"},{icon:_r,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:ry,label:"Settings",path:"/settings",section:"Config"}],[v]);return i.jsxs("aside",{className:`
326
+ relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
327
+ ${u?"w-20":"w-72"} h-screen flex-shrink-0 z-50
328
+ bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
329
+ `,children:[i.jsx("div",{className:`p-6 border-b border-white/5 ${u?"items-center justify-center flex":""}`,children:u?i.jsx("div",{className:"relative group",children:i.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):i.jsxs("div",{className:"relative w-full",children:[i.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:c?"Projects":"Workspace"}),c?i.jsxs("div",{className:"relative",children:[i.jsx(Im,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),i.jsx("select",{value:x||"",onChange:y=>f(y.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:h.filter(y=>y.valid).map(y=>i.jsx("option",{value:y.name,children:y.name},y.name))}),i.jsx(Cg,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):i.jsxs("div",{className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 px-3.5 text-sm font-medium shadow-sm flex items-center",children:[i.jsx(Im,{className:"h-4 w-4 text-indigo-400 mr-3"}),i.jsx("span",{className:"truncate",children:d})]})]})}),i.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:i.jsx("ul",{className:"space-y-1.5 px-4",children:g.map(y=>i.jsxs(Oe.Fragment,{children:[y.section&&!u&&i.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:y.section}),i.jsx("li",{children:i.jsx(Rh,{to:y.path,className:({isActive:T})=>`
330
+ flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
331
+ ${T?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
332
+ ${u?"justify-center":""}
333
+ `,children:({isActive:T})=>i.jsxs(i.Fragment,{children:[i.jsx(y.icon,{className:`h-5 w-5 transition-colors ${T?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${u?"":"mr-3.5"}`}),!u&&i.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:y.label}),y.badge&&(u?i.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):i.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${T?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:y.badge})),T&&!u&&i.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),u&&i.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:y.label})]})})})]},y.path))})}),i.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:i.jsx("button",{onClick:()=>o(!u),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:u?i.jsx(wg,{className:"h-5 w-5"}):i.jsx(Ng,{className:"h-5 w-5"})})})]})},Qy=()=>{const{projectName:u}=ot();return i.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[i.jsxs("div",{className:"flex items-center space-x-6",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),i.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:u})]}),i.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),i.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[i.jsx(yy,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),i.jsxs("div",{className:"flex items-center space-x-5",children:[i.jsxs("div",{className:"relative hidden md:block group",children:[i.jsx("input",{type:"text",placeholder:"Search ( / )",className:"w-72 pl-10 pr-4 py-2 rounded-lg border border-white/5 bg-white/5 text-sm text-slate-200 focus:outline-none focus:ring-1 focus:ring-indigo-500/50 focus:border-indigo-500/50 transition-all placeholder:text-slate-600 focus:bg-[#0b101b]"}),i.jsx(Zi,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),i.jsx("div",{className:"flex items-center space-x-3",children:i.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[i.jsx(vg,{className:"h-5 w-5"}),i.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),i.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},Xy=({toast:u,onDismiss:o})=>{const d={success:i.jsx(xs,{className:"h-5 w-5 text-green-400"}),error:i.jsx(El,{className:"h-5 w-5 text-red-400"}),info:i.jsx(Zg,{className:"h-5 w-5 text-blue-400"}),warning:i.jsx(py,{className:"h-5 w-5 text-amber-400"})},c={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return i.jsx("div",{className:`
334
+ pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
335
+ bg-slate-900 border border-slate-800 border-l-4 ${c[u.type]}
336
+ shadow-lg ring-1 ring-black ring-opacity-5 transition-all
337
+ animate-in slide-in-from-right-full fade-in duration-300
338
+ `,children:i.jsx("div",{className:"p-4",children:i.jsxs("div",{className:"flex items-start",children:[i.jsx("div",{className:"flex-shrink-0",children:d[u.type]}),i.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[i.jsx("p",{className:"text-sm font-medium text-slate-200",children:u.title}),u.message&&i.jsx("p",{className:"mt-1 text-sm text-slate-400",children:u.message})]}),i.jsx("div",{className:"ml-4 flex flex-shrink-0",children:i.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>o(u.id),children:[i.jsx("span",{className:"sr-only",children:"Close"}),i.jsx(ps,{className:"h-5 w-5"})]})})]})})})},Vy=()=>{const{toasts:u,removeToast:o}=ot();return i.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:u.map(d=>i.jsx(Xy,{toast:d,onDismiss:o},d.id))})};function Zy(){const{setGlobalMode:u,setGlobalModeLoading:o,setProjects:d,selectProject:c,selectedProjectId:h}=ot();E.useEffect(()=>{o(!0),Ey().then(async({globalMode:x})=>{if(u(x),!x)return;const f=await wy();d(f);const p=f.filter(b=>b.valid);h&&p.some(b=>b.name===h)?c(h):p.length>0&&c(p[0].name)}).catch(()=>{u(!1)}).finally(()=>{o(!1)})},[])}function sh(u){if(!(u!=null&&u.timestamp))return Number.NEGATIVE_INFINITY;const o=new Date(u.timestamp).getTime();return Number.isNaN(o)?Number.NEGATIVE_INFINITY:o}function qi(u,o){return u?o?sh(u)>=sh(o)?u:o:u:o}function $y(){const{setStatus:u,setProjectName:o,selectedProjectId:d,globalModeLoading:c,status:h}=ot(),x=E.useRef(null);x.current=ot.getState().status,Oy(f=>{qi(f,x.current)===f&&u(f)},[d,c],{enabled:!c}),E.useEffect(()=>{if(c)return;hr().then(p=>{qi(p,x.current)===p&&u(p)}).catch(()=>{});const f=setInterval(()=>{hr().then(p=>{qi(p,x.current)===p&&u(p)}).catch(()=>{})},3e4);return()=>clearInterval(f)},[d,c,u]),E.useEffect(()=>{const f=()=>{hr().then(p=>{qi(p,x.current)===p&&u(p)}).catch(()=>{})};return window.addEventListener("focus",f),()=>window.removeEventListener("focus",f)},[d,u]),E.useEffect(()=>{h!=null&&h.projectName&&o(h.projectName)},[h==null?void 0:h.projectName,o])}const Me=({children:u,className:o="",onClick:d})=>i.jsxs("div",{className:`
339
+ relative bg-[#0b101b] rounded-xl border border-white/5
340
+ shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
341
+ transition-all duration-300
342
+ ${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
343
+ ${o}
344
+ `,onClick:d,children:[d&&i.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),i.jsx("div",{className:"relative z-10",children:u})]}),Qe=({children:u,variant:o="primary",size:d="md",loading:c=!1,className:h="",disabled:x,...f})=>{const p="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",b={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},v={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return i.jsxs("button",{className:`${p} ${b[o]} ${v[d]} ${h}`,disabled:x||c,...f,children:[c&&i.jsx(_h,{className:"mr-2 h-4 w-4 animate-spin"}),u]})},Li=({children:u,variant:o="default",className:d=""})=>{const c={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return i.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${c[o]} ${d}`,children:u})},Qh={Draft:{dot:"bg-slate-500",badge:"neutral"},Ready:{dot:"bg-green-500",badge:"success"},"In Progress":{dot:"bg-blue-500",badge:"info"},Review:{dot:"bg-amber-500",badge:"warning"},Done:{dot:"bg-slate-600",badge:"neutral"}},Ky=({defaultColumn:u,onClose:o,onCreated:d})=>{const[c,h]=E.useState(""),[x,f]=E.useState(""),[p,b]=E.useState(u),[v,g]=E.useState(!1),[y,T]=E.useState(null),{addToast:C}=ot(),B=async q=>{if(q.preventDefault(),!!c.trim()){g(!0),T(null);try{await _y({title:c.trim(),body:x,column:p}),C({title:"Issue created",message:`"${c.trim()}" added to ${p}`,type:"success"}),d(),o()}catch(U){T(U instanceof Error?U.message:"Failed to create issue")}finally{g(!1)}}};return i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),i.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[i.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[i.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),i.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:i.jsx(ps,{className:"h-5 w-5"})})]}),i.jsxs("form",{onSubmit:B,className:"p-6 space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),i.jsx("input",{type:"text",value:c,onChange:q=>h(q.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),i.jsx("select",{value:p,onChange:q=>b(q.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Pl.map(q=>i.jsx("option",{value:q,children:q},q))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),i.jsx("textarea",{value:x,onChange:q=>f(q.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),y&&i.jsx("p",{className:"text-sm text-red-400",children:y}),i.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[i.jsx(Qe,{variant:"ghost",type:"button",onClick:o,children:"Cancel"}),i.jsx(Qe,{type:"submit",disabled:v||!c.trim(),children:v?"Creating...":"Create Issue"})]})]})]})]})},Jy=({issue:u,onClose:o,onMoved:d,onClosed:c})=>{const[h,x]=E.useState(!1),[f,p]=E.useState(!1),{addToast:b}=ot(),v=async T=>{if(T!==u.column){x(!0);try{await Yh(u.number,T),b({title:"Issue moved",message:`#${u.number} moved to ${T}`,type:"success"}),d(),o()}catch(C){b({title:"Move failed",message:C instanceof Error?C.message:"Failed to move issue",type:"error"})}finally{x(!1)}}},g=async()=>{if(confirm(`Close issue #${u.number}: "${u.title}"?`)){p(!0);try{await zy(u.number),b({title:"Issue closed",message:`#${u.number} closed on GitHub`,type:"success"}),c(),o()}catch(T){b({title:"Close failed",message:T instanceof Error?T.message:"Failed to close issue",type:"error"})}finally{p(!1)}}},y=u.column??"Draft";return i.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[i.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:o}),i.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[i.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[i.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[i.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[i.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",u.number]}),i.jsx(Li,{variant:Qh[y].badge,children:y})]}),i.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:u.title}),u.assignees.length>0&&i.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",u.assignees.join(", ")]})]}),i.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:i.jsx(ps,{className:"h-5 w-5"})})]}),i.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Pl.filter(T=>T!==u.column).map(T=>i.jsx("button",{onClick:()=>v(T),disabled:h,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:T},T))]}),i.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[u.url&&!u.url.startsWith("local://")&&i.jsxs("a",{href:u.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[i.jsx(Ah,{className:"h-3.5 w-3.5"}),i.jsx("span",{children:"GitHub"})]}),i.jsx("button",{onClick:g,disabled:f,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:f?"Closing...":"Close Issue"})]})]}),i.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:u.body?i.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:u.body}):i.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},Fy=({issue:u,onClick:o,onDragStart:d})=>{const[c,h]=E.useState(!1);return i.jsx("div",{className:"relative",draggable:!0,onDragStart:x=>{x.dataTransfer.setData("issueNumber",String(u.number)),x.dataTransfer.effectAllowed="move",h(!0),d(u)},onDragEnd:()=>h(!1),children:i.jsxs(Me,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${c?"opacity-30":""}`,onClick:o,children:[i.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",u.number]}),i.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:u.title}),u.assignees.length>0&&i.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:u.assignees.join(", ")})]})})},Wy=({name:u,issues:o,draggingIssue:d,onIssueClick:c,onNewIssue:h,onMoveIssue:x,onDragStart:f})=>{const p=Qh[u],[b,v]=E.useState(!1),g=d!==null&&d.column!==u;return i.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&g?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:y=>{g&&(y.preventDefault(),y.dataTransfer.dropEffect="move",v(!0))},onDragLeave:()=>v(!1),onDrop:y=>{y.preventDefault(),v(!1),d&&d.column!==u&&x(d,u)},children:[i.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${p.dot}`}),i.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:u}),i.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:o.length})]}),i.jsx("button",{onClick:()=>h(u),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${u}`,children:i.jsx(vs,{className:"h-3.5 w-3.5"})})]}),i.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:o.length===0?i.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${b&&g?"border-indigo-500/40":"border-slate-800"}`,children:i.jsx("span",{className:"text-xs text-slate-700",children:b&&g?"Drop here":"No issues"})}):o.map(y=>i.jsx(Fy,{issue:y,onClick:()=>c(y),onDragStart:f},y.id))})]})},Py=()=>{const[u,o]=E.useState(null),[d,c]=E.useState(null),[h,x]=E.useState(null),[f,p]=E.useState(null),b=E.useRef(!1),{addToast:v,selectedProjectId:g,globalModeLoading:y}=ot(),{data:T,loading:C,error:B,refetch:q}=Ft(kh,[g],{enabled:!y});E.useEffect(()=>{const Q=setInterval(()=>{b.current||q()},3e4);return()=>clearInterval(Q)},[q]);const U=E.useCallback(async(Q,G)=>{x(null);const te=f??(T==null?void 0:T.columns);if(!te)return;const se=te,Z={};for(const P of Pl)Z[P]=(te[P]??[]).filter(ue=>ue.number!==Q.number);const ee={...Q,column:G};Z[G]=[...Z[G]??[],ee],p(Z),o(P=>(P==null?void 0:P.number)===Q.number?ee:P),b.current=!0;try{await Yh(Q.number,G),q(),setTimeout(()=>{p(null),b.current=!1},800)}catch(P){p(se),o(ue=>(ue==null?void 0:ue.number)===Q.number?Q:ue),b.current=!1,v({title:"Move failed",message:P instanceof Error?P.message:"Failed to move issue",type:"error"})}},[v,q,f,T]);if(y||C)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(B&&B.message.includes("Board not configured"))return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx("div",{className:"text-4xl",children:"📋"}),i.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),i.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",i.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(B)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),i.jsx("div",{className:"text-sm text-slate-500",children:B.message}),i.jsx(Qe,{onClick:()=>q(),children:"Retry"})]});if(!T)return null;const R=f??T.columns;return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),i.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Pl.reduce((Q,G)=>{var te;return Q+(((te=R[G])==null?void 0:te.length)??0)},0)," issues across ",Pl.length," columns"]})]}),i.jsxs(Qe,{onClick:()=>c("Ready"),children:[i.jsx(vs,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),i.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>x(null),children:i.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Pl.length*236}px`},children:Pl.map(Q=>i.jsx(Wy,{name:Q,issues:R[Q]??[],draggingIssue:h,onIssueClick:o,onNewIssue:c,onMoveIssue:U,onDragStart:x},Q))})}),u&&i.jsx(Jy,{issue:u,onClose:()=>o(null),onMoved:()=>q(),onClosed:()=>q()}),d&&i.jsx(Ky,{defaultColumn:d,onClose:()=>c(null),onCreated:()=>q()})]})},Iy=[{name:"executor",displayName:"Executor",processName:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"}],eb=({processes:u,activePrd:o,onCancelProcess:d,onForceClear:c,onViewLog:h,cancellingProcess:x,clearingLock:f})=>{const p=v=>u.find(g=>g.name===v),b=(v,g)=>v.length<=g?v:v.slice(0,g-1)+"...";return i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:Iy.map(v=>{const g=p(v.processName),y=(g==null?void 0:g.running)??!1,T=g==null?void 0:g.pid,C=x===v.cancelType,B=y&&v.cancelType,q=!y&&v.name==="executor"&&o,U=y?T?`PID: ${T}`:v.runningLabel:v.idleLabel,R=y&&v.name==="executor"&&o?b(o,20):null;return i.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${y?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[i.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${y?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:`text-sm font-medium ${y?"text-slate-200":"text-slate-400"}`,children:v.displayName}),i.jsx("div",{className:"text-xs text-slate-500 truncate",children:R?i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(br,{className:"h-3 w-3 flex-shrink-0"}),R]}):U})]}),i.jsxs("div",{className:"flex-shrink-0",children:[B&&i.jsx("button",{onClick:()=>v.cancelType&&d(v.cancelType),disabled:C,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:i.jsx(lh,{className:"h-3.5 w-3.5"})}),q&&i.jsx("button",{onClick:c,disabled:f,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:i.jsx(lh,{className:"h-3.5 w-3.5"})}),!B&&!q&&y&&i.jsx("button",{onClick:h,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:i.jsx(br,{className:"h-3.5 w-3.5"})})]})]},v.name)})})},tb={Draft:"text-slate-400 bg-slate-500/10 ring-slate-500/20",Ready:"text-green-400 bg-green-500/10 ring-green-500/20","In Progress":"text-blue-400 bg-blue-500/10 ring-blue-500/20",Review:"text-amber-400 bg-amber-500/10 ring-amber-500/20",Done:"text-slate-500 bg-slate-600/10 ring-slate-600/20"},lb=()=>{var Z,ee;const u=Rr(),[o,d]=E.useState(null),[c,h]=E.useState(!1),{setProjectName:x,addToast:f,selectedProjectId:p,globalModeLoading:b,status:v}=ot(),{data:g}=Ft(Lh,[p],{enabled:!b}),{data:y}=Ft(()=>kh().catch(()=>null),[p],{enabled:!b}),T=v;if(Oe.useEffect(()=>{T!=null&&T.projectName&&x(T.projectName)},[T,x]),b)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!T)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading..."})});const C=T.prs.length,B=T.prs.filter(P=>P.reviewScore!==null&&P.reviewScore<70).length,q=((Z=y==null?void 0:y.columns.Ready)==null?void 0:Z.length)??0,U=((ee=y==null?void 0:y.columns["In Progress"])==null?void 0:ee.length)??0,R=async P=>{d(P);try{const ue=await Ay(P),$=ue.results.every(je=>je.success);f({title:$?"Process Cancelled":"Cancel Failed",message:ue.results.map(je=>je.message).join("; "),type:$?"success":"error"})}catch(ue){f({title:"Cancel Failed",message:ue instanceof Error?ue.message:"Failed to cancel process",type:"error"})}finally{d(null)}},Q=async()=>{h(!0);try{await Dy(),f({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(P){f({title:"Clear Failed",message:P instanceof Error?P.message:"Failed to clear lock",type:"error"})}finally{h(!1)}},G=P=>{if(!P)return"Not scheduled";try{const ue=new Date(P),$=new Date,je=ue.getTime()-$.getTime(),ge=Math.floor(je/6e4);return ge<0?"Running now...":ge<60?`in ${ge} min`:ge<1440?`in ${Math.floor(ge/60)} hr${ge>=120?"s":""}`:`in ${Math.floor(ge/1440)} day${ge>=2880?"s":""}`}catch{return"Unknown"}},se=(()=>{var $,je,ge;if(g!=null&&g.paused)return null;const P=[{agent:"Executor",nextRun:(g==null?void 0:g.executor.nextRun)??null},{agent:"Reviewer",nextRun:(g==null?void 0:g.reviewer.nextRun)??null},{agent:"QA",nextRun:(($=g==null?void 0:g.qa)==null?void 0:$.nextRun)??null},{agent:"Auditor",nextRun:((je=g==null?void 0:g.audit)==null?void 0:je.nextRun)??null},{agent:"Planner",nextRun:((ge=g==null?void 0:g.planner)==null?void 0:ge.nextRun)??null}];let ue=null;for(const Ge of P)Ge.nextRun&&(!ue||new Date(Ge.nextRun)<new Date(ue.nextRun))&&(ue=Ge);return ue?{agent:ue.agent,time:G(ue.nextRun)}:null})();return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[i.jsxs(Me,{className:"p-5",onClick:()=>u("/board"),children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),i.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:q})]}),i.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:i.jsx(xs,{className:"h-5 w-5"})})]}),i.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),i.jsxs(Me,{className:"p-5",onClick:()=>u("/board"),children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),i.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:U})]}),i.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:i.jsx(Mh,{className:"h-5 w-5"})})]}),i.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),i.jsxs(Me,{className:"p-5",onClick:()=>u("/prs"),children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),i.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:C})]}),i.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:i.jsx(Yi,{className:"h-5 w-5"})})]}),i.jsx("p",{className:`text-xs mt-4 ${B>0?"text-red-400 font-medium":"text-slate-500"}`,children:B>0?`${B} need work`:"All passing"})]}),i.jsxs(Me,{className:"p-5",children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),i.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:g!=null&&g.paused?"Paused":T.crontab.installed?"Active":"Inactive"})]}),i.jsx("div",{className:`p-2 rounded-lg ${g!=null&&g.paused?"bg-amber-500/10 text-amber-400":T.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:i.jsx(_r,{className:"h-5 w-5"})})]}),i.jsx("p",{className:"text-xs text-slate-500 mt-4",children:g!=null&&g.paused?"All schedules paused":T.crontab.installed?`${T.crontab.entries.length} entr${T.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),i.jsxs(Me,{className:"p-4",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),i.jsx("button",{onClick:()=>u("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),i.jsx(eb,{processes:T.processes,activePrd:T.activePrd,onCancelProcess:R,onForceClear:Q,onViewLog:()=>u("/logs"),cancellingProcess:o,clearingLock:c})]}),se&&i.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[i.jsx("span",{children:"Next automation:"}),i.jsx("span",{className:"text-slate-200 font-medium",children:se.agent}),i.jsx("span",{children:se.time})]}),i.jsxs("button",{onClick:()=>u("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",i.jsx(Pm,{className:"ml-1 h-3 w-3"})]})]}),i.jsxs("div",{className:"mt-6",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),i.jsxs("button",{onClick:()=>u("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",i.jsx(Pm,{className:"ml-1 h-3 w-3"})]})]}),i.jsx(Me,{className:"p-4",children:y?i.jsx("div",{className:"flex flex-wrap gap-3",children:Pl.map(P=>{var $;const ue=(($=y.columns[P])==null?void 0:$.length)??0;return i.jsxs("button",{onClick:()=>u("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${tb[P]}`,children:[i.jsx("span",{className:"text-xs font-medium",children:P}),i.jsx("span",{className:"text-xs font-bold",children:ue})]},P)})}):i.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",i.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},ab=()=>{const[u,o]=E.useState(!0),[d,c]=E.useState(""),[h,x]=E.useState("executor"),f=E.useRef(null),{selectedProjectId:p,globalModeLoading:b}=ot(),v=ot(Q=>Q.status),{data:g,loading:y,error:T,refetch:C}=Ft(()=>Ry(h,500),[h,p],{enabled:!b}),B=(g==null?void 0:g.lines)||[];E.useEffect(()=>{u&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[B,u]),E.useEffect(()=>{if(!u)return;const Q=window.setInterval(()=>{C()},3e3);return()=>window.clearInterval(Q)},[u,h,C]);const q=B.filter(Q=>Q.toLowerCase().includes(d.toLowerCase())),U=Q=>{x(Q),c("")},R=Q=>{if(!(v!=null&&v.processes))return!1;const G=v.processes.find(te=>te.name===Q);return(G==null?void 0:G.running)??!1};return T?i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),i.jsx("div",{className:"text-sm text-slate-500",children:T.message}),i.jsx(Qe,{onClick:()=>C(),children:"Retry"})]}):i.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsxs("div",{className:"relative group",children:[i.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:Q=>c(Q.target.value)}),i.jsx(Zi,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),i.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),i.jsxs("div",{className:"flex space-x-1",children:[i.jsx("button",{onClick:()=>U("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="executor"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Executor"}),R("executor")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),i.jsx("button",{onClick:()=>U("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="reviewer"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Reviewer"}),R("reviewer")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),i.jsx("button",{onClick:()=>U("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="qa"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"QA"}),R("qa")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),i.jsx("button",{onClick:()=>U("audit"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="audit"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Auditor"}),R("audit")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),i.jsx("button",{onClick:()=>U("planner"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="planner"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Planner"}),R("planner")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsxs(Qe,{size:"sm",variant:"ghost",onClick:()=>C(),children:[i.jsx(eh,{className:"h-4 w-4 mr-2"}),"Refresh"]}),i.jsxs(Qe,{size:"sm",variant:"ghost",onClick:()=>o(!u),children:[u?i.jsx(Dh,{className:"h-4 w-4 mr-2"}):i.jsx(Vi,{className:"h-4 w-4 mr-2"}),u?"Pause":"Resume"]})]})]}),i.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[i.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[i.jsxs("span",{children:["File: ",h,".log"]}),i.jsxs("span",{children:[q.length," lines"]})]}),i.jsxs("div",{ref:f,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[y?i.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):q.length===0?i.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):q.map((Q,G)=>{const te=Q.includes("[ERROR]"),se=Q.includes("[WARN]");return i.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${te?"text-red-400":se?"text-amber-400":"text-slate-300"}`,children:[i.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:G+1}),Q]},G)}),u&&i.jsx("div",{className:"h-4"})," "]}),!u&&i.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>o(!0),children:[i.jsx(eh,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},nb=()=>{const[u,o]=E.useState(null),[d,c]=E.useState(!1),[h,x]=E.useState("all"),[f,p]=E.useState("number"),[b,v]=E.useState("desc"),{addToast:g,selectedProjectId:y,globalModeLoading:T}=ot(),{data:C,loading:B,error:q,refetch:U}=Ft(Hh,[y],{enabled:!T}),R=C??[],Q=$=>{switch($){case"pass":return i.jsx(xs,{className:"h-4 w-4 text-green-500"});case"fail":return i.jsx(zg,{className:"h-4 w-4 text-red-500"});case"pending":return i.jsx(_h,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return i.jsx(El,{className:"h-4 w-4 text-slate-500"})}},G=$=>{switch($){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},te=$=>$===null?"No review decision yet":$===100?"PR has been approved":$===0?"Changes have been requested":`Review score: ${$}`,se=E.useMemo(()=>R.filter($=>{switch(h){case"needs-work":return $.ciStatus==="fail"||$.reviewScore===0;case"pending":return $.ciStatus==="pending"||$.ciStatus==="unknown"||$.reviewScore===null;case"passed":return $.ciStatus==="pass"&&$.reviewScore===100;case"all":default:return!0}}),[R,h]),Z=E.useMemo(()=>[...se].sort((je,ge)=>{let Ge=0;switch(f){case"number":Ge=je.number-ge.number;break;case"title":Ge=je.title.localeCompare(ge.title);break;case"branch":Ge=je.branch.localeCompare(ge.branch);break;case"ciStatus":{const z={fail:0,pending:1,unknown:2,pass:3};Ge=(z[je.ciStatus]??2)-(z[ge.ciStatus]??2);break}case"reviewScore":{const z=je.reviewScore??-1,ae=ge.reviewScore??-1;Ge=z-ae;break}}return b==="asc"?Ge:-Ge}),[se,f,b]),ee=$=>{f===$?v(b==="asc"?"desc":"asc"):(p($),v("desc"))},P=$=>f!==$?i.jsx(fg,{className:"h-3 w-3 text-slate-600"}):b==="asc"?i.jsx(hg,{className:"h-3 w-3 text-indigo-400"}):i.jsx(rg,{className:"h-3 w-3 text-indigo-400"});if(B)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(q)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),i.jsx("div",{className:"text-sm text-slate-500",children:q.message}),i.jsx(Qe,{onClick:()=>U(),children:"Retry"})]});const ue=async()=>{c(!0);try{const $=await Ty();g({title:"Reviewer Started",message:$.pid?`Started with PID ${$.pid}`:"Reviewer started",type:"success"})}catch($){g({title:"Reviewer Failed",message:$ instanceof Error?$.message:"Failed to start reviewer",type:"error"})}finally{c(!1)}};return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex space-x-1",children:[i.jsx("button",{onClick:()=>x("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),i.jsx("button",{onClick:()=>x("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),i.jsx("button",{onClick:()=>x("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),i.jsx("button",{onClick:()=>x("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),i.jsxs(Qe,{size:"sm",onClick:ue,disabled:d,children:[i.jsx(Zi,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),i.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:i.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[i.jsx("thead",{className:"bg-slate-950/50",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>ee("number"),children:i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("span",{children:"Title"}),P("number")]})}),i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>ee("branch"),children:i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("span",{children:"Branch"}),P("branch")]})}),i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>ee("ciStatus"),children:i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("span",{children:"CI Status"}),P("ciStatus")]})}),i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>ee("reviewScore"),children:i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("span",{children:"Review Score"}),P("reviewScore")]})}),i.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),i.jsxs("tbody",{className:"divide-y divide-slate-800",children:[Z.map($=>i.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>o(u===$.number?null:$.number),children:[i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center",children:[i.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",$.number]}),i.jsx("span",{className:"font-medium text-slate-200",children:$.title})]})}),i.jsx("td",{className:"px-6 py-4",children:i.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:$.branch})}),i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center space-x-2",title:G($.ciStatus),children:[Q($.ciStatus),i.jsx("span",{className:"text-sm capitalize text-slate-400",children:$.ciStatus})]})}),i.jsx("td",{className:"px-6 py-4",children:$.reviewScore!==null?i.jsxs("div",{className:"flex items-center space-x-2",title:te($.reviewScore),children:[i.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full ${$.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${$.reviewScore}%`}})}),i.jsx("span",{className:`text-sm font-bold ${$.reviewScore>=70?"text-green-500":"text-red-500"}`,children:$.reviewScore})]}):i.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),i.jsx("td",{className:"px-6 py-4 text-right",children:i.jsx("a",{href:$.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:je=>je.stopPropagation(),children:i.jsx(Ah,{className:"h-4 w-4"})})})]},$.number)),Z.length===0&&i.jsx("tr",{children:i.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:R.length===0?"No open PRs found.":`No PRs match the "${h}" filter.`})})]})]})}),u&&i.jsx(Me,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const $=R.find(je=>je.number===u);return $?i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-bold text-slate-200",children:$.title}),i.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",i.jsx("span",{className:"font-mono",children:$.branch})]})]}),i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsxs("div",{className:"text-center",title:G($.ciStatus),children:[i.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),i.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[Q($.ciStatus),i.jsx("span",{className:"text-sm capitalize text-slate-300",children:$.ciStatus})]})]}),$.reviewScore!==null&&i.jsxs("div",{className:"text-center",title:te($.reviewScore),children:[i.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),i.jsx("div",{className:`text-xl font-bold mt-1 ${$.reviewScore>=70?"text-green-500":"text-red-500"}`,children:$.reviewScore})]})]})]}):null})()})]})},At=Oe.forwardRef(({className:u="",label:o,checked:d,onChange:c,...h},x)=>{const f=p=>{c&&c(p.target.checked)};return i.jsxs("label",{className:`inline-flex items-center cursor-pointer ${u}`,children:[i.jsxs("div",{className:"relative",children:[i.jsx("input",{type:"checkbox",className:"sr-only peer",ref:x,checked:d,onChange:f,...h}),i.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),o&&i.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:o})]})});At.displayName="Switch";const sb=()=>{const{addToast:u,selectedProjectId:o,globalModeLoading:d}=ot(),[c,h]=E.useState(!1),[x,f]=E.useState(!1),{data:p,loading:b,error:v,refetch:g}=Ft(Uy,[o],{enabled:!d});E.useEffect(()=>{if(!(p!=null&&p.enabled))return;const Q=setInterval(()=>{g()},1e4);return()=>clearInterval(Q)},[p==null?void 0:p.enabled,g]);const y=async Q=>{f(!0);try{await Gh(Q),u({title:Q?"Scanner Enabled":"Scanner Disabled",message:Q?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Q?"success":"info"}),g()}catch(G){u({title:"Toggle Failed",message:G instanceof Error?G.message:"Failed to toggle scanner",type:"error"})}finally{f(!1)}},T=async()=>{h(!0);try{const Q=await qy();Q.created.length>0?u({title:"Scan Complete",message:`Created ${Q.created.length} PRD(s): ${Q.created.join(", ")}`,type:"success"}):u({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),Q.errors.length>0&&u({title:"Scan Errors",message:Q.errors.join("; "),type:"warning"}),g()}catch(Q){u({title:"Scan Failed",message:Q instanceof Error?Q.message:"Failed to scan roadmap",type:"error"})}finally{h(!1)}};if(b)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(v)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),i.jsx("div",{className:"text-sm text-slate-500",children:v.message}),i.jsx(Qe,{onClick:()=>g(),children:"Retry"})]});if(!p)return null;if(p.status==="no-roadmap")return i.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[i.jsx("div",{className:"flex items-center justify-between",children:i.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),i.jsx(Me,{className:"p-12",children:i.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[i.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:i.jsx(zh,{className:"h-10 w-10 text-slate-500"})}),i.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),i.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",i.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",i.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",i.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const C=p.totalItems>0?Math.round(p.processedItems/p.totalItems*100):0,B=ub(p.status),q=cb(p.items),U=p.lastScan?rb(p.lastScan):"Never",R=p.autoScanInterval?Math.round(p.autoScanInterval/60):5;return i.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx(At,{label:p.enabled?"Enabled":"Disabled",checked:p.enabled,onChange:y,disabled:x}),i.jsxs(Qe,{onClick:T,loading:c,disabled:!p.enabled||p.status==="complete",children:[i.jsx(Vi,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),i.jsx(Me,{className:`p-6 border-2 ${B.borderColor}`,children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx(B.icon,{className:`h-8 w-8 ${B.textColor}`}),i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),i.jsx("div",{className:`text-2xl font-bold ${B.textColor}`,children:B.label})]})]}),i.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[i.jsxs("div",{children:["Last scan: ",i.jsx("span",{className:"text-slate-300",children:U})]}),p.enabled&&p.status!=="complete"&&i.jsxs("div",{children:["Auto-scan: ",i.jsxs("span",{className:"text-slate-300",children:["every ",R," min"]})]}),p.enabled&&p.status==="complete"&&i.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),i.jsxs(Me,{className:"p-6",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),i.jsxs("span",{className:"text-sm text-slate-400",children:[p.processedItems," / ",p.totalItems," items (",C,"%)"]})]}),i.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${C===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${C}%`}})})]}),Object.entries(q).map(([Q,G])=>i.jsxs(Me,{className:"p-6",children:[i.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Q}),i.jsx("div",{className:"space-y-2",children:G.map(te=>i.jsx(ib,{item:te},te.hash))})]},Q))]})};function ib({item:u}){const o=u.checked,d=u.processed;return i.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${o?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[i.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[o?i.jsx(Pg,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?i.jsx(xs,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):i.jsx(br,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:`text-sm font-medium truncate ${o?"line-through text-slate-600":"text-slate-200"}`,children:u.title}),u.description&&i.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:u.description})]})]}),i.jsx("div",{className:"flex-shrink-0 ml-3",children:o?i.jsx(Li,{variant:"neutral",children:"Skipped"}):d?i.jsx(Li,{variant:"success",children:u.prdFile||"Processed"}):i.jsx(Li,{variant:"warning",children:"Pending"})})]})}function ub(u){switch(u){case"complete":return{label:"Complete",icon:xs,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Yi,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Vi,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:El,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:El,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function cb(u){const o={};for(const d of u){const c=d.section||"General";o[c]||(o[c]=[]),o[c].push(d)}return o}function rb(u){try{const o=new Date(u),c=new Date().getTime()-o.getTime(),h=Math.floor(c/6e4);if(h<1)return"Just now";if(h<60)return`${h} min ago`;const x=Math.floor(h/60);return x<24?`${x} hr ago`:`${Math.floor(x/24)} day(s) ago`}catch{return"Unknown"}}const Xh=({tabs:u,activeTab:o,onChange:d,className:c=""})=>{var b,v;const[h,x]=Oe.useState((b=u[0])==null?void 0:b.id),f=o||h,p=g=>{d?d(g):x(g)};return i.jsxs("div",{className:`flex flex-col ${c}`,children:[i.jsx("div",{className:"border-b border-slate-800 mb-6",children:i.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:u.map(g=>i.jsx("button",{onClick:()=>p(g.id),className:`
345
+ whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
346
+ ${f===g.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
347
+ `,children:g.label},g.id))})}),i.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(v=u.find(g=>g.id===f))==null?void 0:v.content})]})},Gi=[{label:"Balanced (recommended)",value:"5 */2 * * *",description:"Every 2 hours at minute 5"},{label:"Every 6 hours (very safe)",value:"10 */6 * * *",description:"Every 6 hours at minute 10"},{label:"Every 4 hours",value:"10 */4 * * *",description:"Every 4 hours at minute 10"},{label:"Twice daily",value:"20 2,14 * * *",description:"At 02:20 and 14:20 UTC"},{label:"Daily",value:"30 3 * * *",description:"Once per day at 03:30 UTC"},{label:"Weekdays only",value:"30 9 * * 1-5",description:"At 09:30 UTC, Monday to Friday"},{label:"Weekly (Monday)",value:"40 3 * * 1",description:"At 03:40 UTC every Monday"},{label:"Custom",value:"__custom__",description:"Enter your own cron expression"}],Dr=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am"}}];function rn(u){return u?u.trim().replace(/\s+/g," "):""}function un(u,o){return rn(u)===rn(o)}function ob(u){if(u)return Dr.find(o=>o.id===u)}function Vh(u,o,d,c,h,x){return un(u.schedules.executor,o)&&un(u.schedules.reviewer,d)&&un(u.schedules.qa,c)&&un(u.schedules.audit,h)&&un(u.schedules.slicer,x)}function db(u,o,d,c,h){return Dr.find(x=>Vh(x,u,o,d,c,h))}function os(u,o,d,c,h,x){const f=ob(u);return f&&Vh(f,o,d,c,h,x)?f:db(o,d,c,h,x)}function ih(u){const o=rn(u),d=o.split(/\s+/);if(d.length!==5)return o;const[c,h,x,f,p]=d,b=/^\d+$/.test(c),v=Gi.find(g=>rn(g.value)===o);if(v)return v.label;if(c==="*/30"&&h==="*")return"Every 30 minutes";if(c==="0"&&h==="*")return"Every hour";if(c.startsWith("*/"))return`Every ${parseInt(c.replace("*/",""),10)} minutes`;if(b&&h.startsWith("*/")&&x==="*"&&f==="*"&&p==="*"){const g=parseInt(h.replace("*/",""),10);return c==="0"?`Every ${g} hours`:`Every ${g} hours at :${c.padStart(2,"0")}`}if(c==="0"&&h.startsWith("*/"))return`Every ${parseInt(h.replace("*/",""),10)} hours`;if(c==="0"&&h.includes("-")){const[g,y]=h.split("-");return`Every hour from ${cs(g)} to ${cs(y)}`}if(b&&h.includes("-")&&x==="*"&&f==="*"&&p==="*"){const[g,y]=h.split("-");return`Every hour from ${rs(g,c)} to ${rs(y,c)}`}if(c==="0"&&h.includes(",")){const g=h.split(",").map(cs);return g.length<=3?`At ${g.join(" and ")}`:`At ${g.slice(0,-1).join(", ")}, and ${g[g.length-1]}`}if(b&&h.includes(",")&&x==="*"&&f==="*"&&(p==="*"||p==="1-5")){const g=h.split(",").map(T=>rs(T,c)),y=p==="1-5"?"Weekdays at ":"At ";return g.length<=3?`${y}${g.join(" and ")}`:`${y}${g.slice(0,-1).join(", ")}, and ${g[g.length-1]}`}return c==="0"&&h!=="*"&&x==="*"&&f==="*"&&p==="*"?`Daily at ${cs(h)}`:b&&h!=="*"&&x==="*"&&f==="*"&&p==="*"?`Daily at ${rs(h,c)}`:c==="0"&&h!=="*"&&x==="*"&&f==="*"&&p==="1-5"?`Weekdays at ${cs(h)}`:b&&h!=="*"&&x==="*"&&f==="*"&&p==="1-5"?`Weekdays at ${rs(h,c)}`:o}function cs(u){const o=parseInt(u,10);return o===0?"12 AM":o<12?`${o} AM`:o===12?"12 PM":`${o-12} PM`}function rs(u,o){const d=o.padStart(2,"0"),c=parseInt(u,10);return Number.isNaN(c)?`${u}:${d}`:c===0?`12:${d} AM`:c<12?`${c}:${d} AM`:c===12?`12:${d} PM`:`${c-12}:${d} PM`}function fb(u){const o=rn(u),d=Gi.find(c=>rn(c.value)===o);return(d==null?void 0:d.value)??"__custom__"}function mb(u){const o=new Date,d=u.getTime()-o.getTime(),c=Math.floor(d/6e4),h=Math.floor(c/60),x=Math.floor(h/24);return c<1?"less than a minute":c<60?`in ${c} minute${c>1?"s":""}`:h<24?`in ${h} hour${h>1?"s":""}`:`in ${x} day${x>1?"s":""}`}function hb(u){const o={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return u.toLocaleDateString("en-US",o)}function xb(u){const o=new Date,d=u.getTime()-o.getTime(),c=Math.floor(d/6e4);return c>=0&&c<30}const He=Oe.forwardRef(({className:u="",label:o,error:d,helperText:c,rightIcon:h,...x},f)=>{const p=Oe.useId(),b=x.id??p,v=d?`${b}-error`:void 0,g=!d&&c?`${b}-help`:void 0,y=[v,g].filter(Boolean).join(" ")||void 0;return i.jsxs("div",{className:"w-full",children:[o&&i.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),i.jsxs("div",{className:"relative",children:[i.jsx("input",{ref:f,id:b,"aria-describedby":y,"aria-invalid":d?!0:x["aria-invalid"],className:`
348
+ w-full rounded-lg bg-slate-950 border border-slate-800
349
+ px-3 py-2 text-sm text-slate-200
350
+ placeholder:text-slate-600
351
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
352
+ disabled:opacity-50 disabled:cursor-not-allowed
353
+ transition-all duration-200
354
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
355
+ ${h?"pr-10":""}
356
+ ${u}
357
+ `,...x}),h&&i.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:h})]}),d?i.jsx("p",{id:v,className:"mt-1.5 text-xs text-red-400",children:d}):c?i.jsx("p",{id:g,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});He.displayName="Input";const _t=Oe.forwardRef(({className:u="",label:o,error:d,helperText:c,options:h,value:x,onChange:f,children:p,...b},v)=>{const g=Oe.useId(),y=b.id??g,T=d?`${y}-error`:void 0,C=!d&&c?`${y}-help`:void 0,B=[T,C].filter(Boolean).join(" ")||void 0,q=U=>{f&&f(U.target.value)};return i.jsxs("div",{className:"w-full",children:[o&&i.jsx("label",{htmlFor:y,className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),i.jsxs("div",{className:"relative",children:[i.jsx("select",{ref:v,id:y,"aria-describedby":B,"aria-invalid":d?!0:b["aria-invalid"],className:`
358
+ w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
359
+ px-3 py-2 pr-10 text-sm text-slate-200
360
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
361
+ disabled:opacity-50 disabled:cursor-not-allowed
362
+ transition-all duration-200
363
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
364
+ ${u}
365
+ `,value:x,onChange:q,...b,children:h?h.map(U=>i.jsx("option",{value:U.value,children:U.label},U.value)):p}),i.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:i.jsx(Sg,{className:"h-4 w-4"})})]}),d?i.jsx("p",{id:T,className:"mt-1.5 text-xs text-red-400",children:d}):c?i.jsx("p",{id:C,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});_t.displayName="Select";const cn=({label:u,value:o,onChange:d,helperText:c,placeholder:h="5 */3 * * *"})=>{const x=fb(o),f=x==="__custom__",p=g=>{g!=="__custom__"&&d(g)},b=g=>{d(g.target.value)},v=Gi.find(g=>g.value===x);return i.jsxs("div",{className:"space-y-3",children:[i.jsx(_t,{label:u,value:x,onChange:p,options:Gi.map(g=>({label:g.label,value:g.value})),helperText:f?void 0:(v==null?void 0:v.description)||c}),f&&i.jsxs("div",{className:"space-y-2 mt-2",children:[i.jsx(He,{label:"Cron Expression",value:o,onChange:b,placeholder:h}),i.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[i.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",i.jsx("br",{}),i.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",i.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",i.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})},Zh=({form:u,scheduleMode:o,selectedTemplateId:d,onFieldChange:c,onSwitchToTemplate:h,onSwitchToCustom:x,onApplyTemplate:f})=>i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),i.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[i.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${o==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:h,children:"Template"}),i.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${o==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:x,children:"Custom"})]})]}),o==="template"?i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Dr.map(p=>{const b=d===p.id;return i.jsxs("button",{type:"button",onClick:()=>f(p),className:`text-left p-4 rounded-lg border transition-colors ${b?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[i.jsx("div",{className:"font-medium text-slate-200 mb-1",children:p.label}),i.jsx("p",{className:"text-xs text-slate-400 mb-3",children:p.description}),i.jsx("div",{className:"space-y-0.5",children:[["Executor",p.hints.executor],["Reviewer",p.hints.reviewer],["QA",p.hints.qa],["Audit",p.hints.audit],["Slicer",p.hints.slicer]].map(([v,g])=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:v}),i.jsx("span",{className:"text-xs text-slate-400",children:g})]},v))})]},p.id)})}):i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(cn,{label:"PRD Execution Schedule",value:u.cronSchedule,onChange:p=>c("cronSchedule",p)}),i.jsx(cn,{label:"PR Review Schedule",value:u.reviewerSchedule,onChange:p=>c("reviewerSchedule",p)}),i.jsx(cn,{label:"QA Schedule",value:u.qa.schedule,onChange:p=>c("qa",{...u.qa,schedule:p})}),i.jsx(cn,{label:"Audit Schedule",value:u.audit.schedule,onChange:p=>c("audit",{...u.audit,schedule:p})}),u.roadmapScanner.enabled&&i.jsx(cn,{label:"Planner Schedule",value:u.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:p=>c("roadmapScanner",{...u.roadmapScanner,slicerSchedule:p})})]}),i.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[i.jsx(_t,{label:"Scheduling Priority",value:String(u.schedulingPriority),onChange:p=>c("schedulingPriority",Number(p)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),i.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),i.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),i.jsx(At,{checked:u.globalQueueEnabled??!0,onChange:p=>c("globalQueueEnabled",p)})]})}),i.jsx(He,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(u.cronScheduleOffset),onChange:p=>{const b=Math.min(59,Math.max(0,Number(p.target.value||0)));c("cronScheduleOffset",b)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),vb=()=>{var k,K,J,ce,me,Ne,tt,Be,wl,ea,Sa,fn,Wt;const{addToast:u,selectedProjectId:o,globalModeLoading:d}=ot(),[c,h]=E.useState("overview"),[x,f]=E.useState(!1),[p,b]=E.useState(!1),[v,g]=E.useState(null),[y,T]=E.useState({form:{cronSchedule:"5 */3 * * *",reviewerSchedule:"25 */6 * * *",qa:{schedule:"45 2,14 * * *",enabled:!0},audit:{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{slicerSchedule:"35 */12 * * *",enabled:!0},scheduleBundleId:null,schedulingPriority:3,cronScheduleOffset:0,globalQueueEnabled:!0},scheduleMode:"template",selectedTemplateId:"always-on",isDirty:!1}),{data:C,loading:B,error:q,refetch:U}=Ft(Lh,[o],{enabled:!d}),{data:R,loading:Q,refetch:G}=Ft(Bh,[o],{enabled:!d});E.useEffect(()=>{const X=setInterval(()=>{U()},3e4);return()=>clearInterval(X)},[U]),E.useEffect(()=>{var X,ie,Le,yt,Dt,Ot;if(R&&!y.isDirty){const Rl=os(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,((X=R.qa)==null?void 0:X.schedule)||"45 2,14 * * *",((ie=R.audit)==null?void 0:ie.schedule)||"50 3 * * 1",((Le=R.roadmapScanner)==null?void 0:Le.slicerSchedule)||"35 */12 * * *");T({form:{cronSchedule:R.cronSchedule||"5 */3 * * *",reviewerSchedule:R.reviewerSchedule||"25 */6 * * *",qa:R.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:R.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((yt=R.roadmapScanner)==null?void 0:yt.enabled)??!0,slicerSchedule:((Dt=R.roadmapScanner)==null?void 0:Dt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:R.scheduleBundleId??null,schedulingPriority:R.schedulingPriority??3,cronScheduleOffset:R.cronScheduleOffset??0,globalQueueEnabled:((Ot=R.queue)==null?void 0:Ot.enabled)??!0},scheduleMode:Rl?"template":"custom",selectedTemplateId:(Rl==null?void 0:Rl.id)??"",isDirty:!1})}},[R,y.isDirty]);const te=()=>{G(),U()},se=(X,ie)=>X instanceof Error?X.message:ie,Z=async()=>{if(C){f(!0);try{C.paused?(await ds(),u({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await My(),u({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),te()}catch(X){u({title:"Action Failed",message:se(X,"Failed to toggle schedule state"),type:"error"})}finally{f(!1)}}},ee=async(X,ie)=>{if(R){g(X);try{X==="executor"?await ya({executorEnabled:ie}):X==="reviewer"?await ya({reviewerEnabled:ie}):X==="qa"?await ya({qa:{...R.qa,enabled:ie}}):X==="audit"?await ya({audit:{...R.audit,enabled:ie}}):await ya({roadmapScanner:{...R.roadmapScanner,enabled:ie}});let Le="";try{await ds()}catch(yt){Le=se(yt,"Failed to reinstall cron schedules")}te(),u(Le?{title:"Job Saved (Cron Reinstall Failed)",message:Le,type:"warning"}:{title:"Job Updated",message:`${X[0].toUpperCase()+X.slice(1)} ${ie?"enabled":"disabled"}.`,type:"success"})}catch(Le){u({title:"Update Failed",message:se(Le,"Failed to update job configuration"),type:"error"})}finally{g(null)}}},P=(X,ie)=>{T(Le=>({...Le,form:{...Le.form,[X]:ie},isDirty:!0}))},ue=()=>{if(!y.form)return;const X=os(y.form.scheduleBundleId,y.form.cronSchedule,y.form.reviewerSchedule,y.form.qa.schedule,y.form.audit.schedule,y.form.roadmapScanner.slicerSchedule||"35 */12 * * *");T(ie=>({...ie,scheduleMode:"template",selectedTemplateId:(X==null?void 0:X.id)??"always-on",form:{...ie.form,scheduleBundleId:(X==null?void 0:X.id)??null},isDirty:!0}))},$=()=>{T(X=>({...X,scheduleMode:"custom",selectedTemplateId:"",form:{...X.form,scheduleBundleId:null},isDirty:!0}))},je=X=>{T(ie=>({...ie,selectedTemplateId:X.id,scheduleMode:"template",form:{...ie.form,cronSchedule:X.schedules.executor,reviewerSchedule:X.schedules.reviewer,scheduleBundleId:X.id,qa:{...ie.form.qa,schedule:X.schedules.qa},audit:{...ie.form.audit,schedule:X.schedules.audit},roadmapScanner:{...ie.form.roadmapScanner,slicerSchedule:X.schedules.slicer}},isDirty:!0}))},ge=async()=>{if(R){b(!0);try{await ya({cronSchedule:y.form.cronSchedule,reviewerSchedule:y.form.reviewerSchedule,scheduleBundleId:y.scheduleMode==="template"?y.form.scheduleBundleId:null,cronScheduleOffset:y.form.cronScheduleOffset,schedulingPriority:y.form.schedulingPriority,qa:{...R.qa,schedule:y.form.qa.schedule},audit:{...R.audit,schedule:y.form.audit.schedule},roadmapScanner:{...R.roadmapScanner,slicerSchedule:y.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...R.queue,enabled:y.form.globalQueueEnabled??!0},executorEnabled:R.executorEnabled,reviewerEnabled:R.reviewerEnabled});let X="";try{await ds()}catch(ie){X=se(ie,"Failed to reinstall cron schedules")}T(ie=>({...ie,isDirty:!1})),te(),u(X?{title:"Schedules Saved (Cron Reinstall Failed)",message:X,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(X){u({title:"Save Failed",message:se(X,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},Ge=X=>{if(!X)return i.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const ie=new Date(X),Le=xb(ie);return i.jsxs("div",{className:"flex items-center space-x-2",children:[Le&&i.jsxs("span",{className:"relative flex h-3 w-3",children:[i.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),i.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"text-slate-200 font-medium",children:mb(ie)}),i.jsxs("span",{className:"text-slate-500 ml-2",children:["(",hb(ie),")"]})]})]})},z=X=>{if(!X||X.delayMinutes<=0)return i.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const ie=[];return X.balancedDelayMinutes>0&&ie.push(`auto +${X.balancedDelayMinutes}m`),X.manualDelayMinutes>0&&ie.push(`manual +${X.manualDelayMinutes}m`),i.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",i.jsxs("span",{className:"text-slate-300",children:[" ",ie.join(" - ")]})]})};if(B||Q)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(q||!C||!R)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),i.jsx("div",{className:"text-sm text-slate-500",children:(q==null?void 0:q.message)||"Unknown error"}),i.jsx(Qe,{onClick:()=>{U(),G()},children:"Retry"})]});const ae=C.paused,D=ae?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",V=ae?"Paused":"Active",I=os(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,((k=R.qa)==null?void 0:k.schedule)||"45 2,14 * * *",((K=R.audit)==null?void 0:K.schedule)||"50 3 * * 1",((J=R.roadmapScanner)==null?void 0:J.slicerSchedule)||"35 */12 * * *"),he=(X,ie,Le)=>!I||!un(I.schedules[X],ie)?ih(Le):`${I.label} - ${I.hints[X]}`,xe=[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:i.jsx(Yi,{className:"h-4 w-4"}),enabled:(R==null?void 0:R.executorEnabled)!==!1,schedule:C.executor.schedule,nextRun:C.executor.nextRun,delayInfo:C.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:i.jsx(Zi,{className:"h-4 w-4"}),enabled:(R==null?void 0:R.reviewerEnabled)??!1,schedule:C.reviewer.schedule,nextRun:C.reviewer.nextRun,delayInfo:C.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:i.jsx(hy,{className:"h-4 w-4"}),enabled:((ce=R==null?void 0:R.qa)==null?void 0:ce.enabled)??!1,schedule:(me=C.qa)==null?void 0:me.schedule,nextRun:(Ne=C.qa)==null?void 0:Ne.nextRun,delayInfo:C.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:i.jsx(th,{className:"h-4 w-4"}),enabled:((tt=R==null?void 0:R.audit)==null?void 0:tt.enabled)??!1,schedule:(Be=C.audit)==null?void 0:Be.schedule,nextRun:(wl=C.audit)==null?void 0:wl.nextRun,delayInfo:C.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:i.jsx(th,{className:"h-4 w-4"}),enabled:((ea=R==null?void 0:R.roadmapScanner)==null?void 0:ea.enabled)??!1,schedule:((Sa=C.planner)==null?void 0:Sa.schedule)||((fn=R.roadmapScanner)==null?void 0:fn.slicerSchedule)||"35 */12 * * *",nextRun:(Wt=C.planner)==null?void 0:Wt.nextRun,delayInfo:C.planner}],N=[{id:"overview",label:"Overview",content:i.jsxs("div",{className:"space-y-6",children:[i.jsx(Me,{className:`p-6 border-2 ${D}`,children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx(Yi,{className:"h-8 w-8"}),i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),i.jsx("div",{className:"text-2xl font-bold",children:V}),i.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),i.jsx(Qe,{variant:ae?"primary":"outline",size:"lg",onClick:Z,loading:x,children:ae?i.jsxs(i.Fragment,{children:[i.jsx(Vi,{className:"h-5 w-5 mr-2"}),"Resume"]}):i.jsxs(i.Fragment,{children:[i.jsx(Dh,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),i.jsxs(Me,{className:"p-6",children:[i.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:xe.map(X=>{var ie,Le,yt,Dt,Ot,Ut;return i.jsxs("div",{className:`p-4 rounded-lg border ${X.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[X.icon,i.jsx("h4",{className:"text-base font-semibold text-slate-200",children:X.name})]}),i.jsx(At,{checked:X.enabled,disabled:v!==null,"aria-label":`Toggle ${X.name.toLowerCase()} automation`,onChange:Rl=>ee(X.id,Rl)})]}),X.enabled?i.jsxs("div",{className:"space-y-3 mt-3",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),i.jsx("div",{className:"text-sm text-slate-200 font-medium",children:he(X.id==="planner"?"slicer":X.id,X.id==="qa"?((ie=R==null?void 0:R.qa)==null?void 0:ie.schedule)||"":X.id==="audit"?((Le=R==null?void 0:R.audit)==null?void 0:Le.schedule)||"":X.id==="planner"?((yt=R==null?void 0:R.roadmapScanner)==null?void 0:yt.slicerSchedule)||"35 */12 * * *":X.schedule,X.id==="qa"?((Dt=R==null?void 0:R.qa)==null?void 0:Dt.schedule)||"":X.id==="audit"?((Ot=R==null?void 0:R.audit)==null?void 0:Ot.schedule)||"":X.id==="planner"?((Ut=R==null?void 0:R.roadmapScanner)==null?void 0:Ut.slicerSchedule)||"35 */12 * * *":X.schedule)})]}),z(X.delayInfo),i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),Ge(X.nextRun)]}),i.jsxs("div",{className:`flex items-center space-x-2 text-sm ${X.enabled?"text-green-400":"text-amber-400"}`,children:[i.jsx(yr,{className:"h-4 w-4"}),i.jsx("span",{children:X.enabled?"Active":"Disabled"})]})]}):i.jsxs("div",{className:"text-slate-500 text-sm",children:[X.name," is disabled."]})]},X.id)})})]})]})},{id:"schedules",label:"Schedules",content:i.jsxs("div",{className:"space-y-6",children:[i.jsx(Zh,{form:y.form,scheduleMode:y.scheduleMode,selectedTemplateId:y.selectedTemplateId,onFieldChange:P,onSwitchToTemplate:ue,onSwitchToCustom:$,onApplyTemplate:je}),i.jsxs("div",{className:"flex justify-end pt-4",children:[i.jsx(Qe,{variant:"ghost",onClick:()=>{var X,ie,Le,yt,Dt,Ot;if(R){const Ut=os(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,((X=R.qa)==null?void 0:X.schedule)||"45 2,14 * * *",((ie=R.audit)==null?void 0:ie.schedule)||"50 3 * * 1",((Le=R.roadmapScanner)==null?void 0:Le.slicerSchedule)||"35 */12 * * *");T({form:{cronSchedule:R.cronSchedule||"5 */3 * * *",reviewerSchedule:R.reviewerSchedule||"25 */6 * * *",qa:R.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:R.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((yt=R.roadmapScanner)==null?void 0:yt.enabled)??!0,slicerSchedule:((Dt=R.roadmapScanner)==null?void 0:Dt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:R.scheduleBundleId??null,schedulingPriority:R.schedulingPriority??3,cronScheduleOffset:R.cronScheduleOffset??0,globalQueueEnabled:((Ot=R.queue)==null?void 0:Ot.enabled)??!0},scheduleMode:Ut?"template":"custom",selectedTemplateId:(Ut==null?void 0:Ut.id)??"",isDirty:!1})}},disabled:!y.isDirty,children:"Reset"}),i.jsxs(Qe,{onClick:ge,loading:p,disabled:!y.isDirty,children:[i.jsx(yr,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:i.jsxs(Me,{className:"p-6",children:[i.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[i.jsx(_r,{className:"h-5 w-5 text-slate-400"}),i.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),C.entries.length===0?i.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):i.jsx("div",{className:"space-y-2",children:C.entries.map((X,ie)=>i.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:X},ie))})]})}];return i.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),I&&i.jsxs("div",{className:"text-right",children:[i.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),i.jsx("div",{className:"text-sm font-medium text-indigo-300",children:I.label}),i.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",C.schedulingPriority,"/5 across registered projects"]})]})]}),i.jsx(Xh,{tabs:N,activeTab:c,onChange:h})]})},xr=u=>{var o,d,c,h,x,f,p;return{provider:u.provider,providerLabel:u.providerLabel??"",defaultBranch:u.defaultBranch,prdDir:u.prdDir||"docs/prds",branchPrefix:u.branchPrefix,branchPatterns:u.branchPatterns||[],executorEnabled:u.executorEnabled??!0,reviewerEnabled:u.reviewerEnabled,minReviewScore:u.minReviewScore,maxRuntime:u.maxRuntime,reviewerMaxRuntime:u.reviewerMaxRuntime,maxLogSize:u.maxLogSize,cronSchedule:u.cronSchedule||"5 */3 * * *",reviewerSchedule:u.reviewerSchedule||"25 */6 * * *",scheduleBundleId:u.scheduleBundleId??null,cronScheduleOffset:u.cronScheduleOffset??0,schedulingPriority:u.schedulingPriority??3,maxRetries:u.maxRetries??3,reviewerMaxRetries:u.reviewerMaxRetries??2,reviewerRetryDelay:u.reviewerRetryDelay??30,providerEnv:u.providerEnv||{},notifications:u.notifications||{webhooks:[]},prdPriority:u.prdPriority||[],roadmapScanner:{enabled:((o=u.roadmapScanner)==null?void 0:o.enabled)??!0,roadmapPath:((d=u.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((c=u.roadmapScanner)==null?void 0:c.autoScanInterval)??300,slicerSchedule:((h=u.roadmapScanner)==null?void 0:h.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((x=u.roadmapScanner)==null?void 0:x.slicerMaxRuntime)??600,priorityMode:((f=u.roadmapScanner)==null?void 0:f.priorityMode)??"roadmap-first",issueColumn:((p=u.roadmapScanner)==null?void 0:p.issueColumn)??"Draft"},templatesDir:u.templatesDir||".night-watch/templates",boardProvider:u.boardProvider||{enabled:!0,provider:"github"},jobProviders:u.jobProviders||{},autoMerge:u.autoMerge??!1,autoMergeMethod:u.autoMergeMethod??"squash",fallbackOnRateLimit:u.fallbackOnRateLimit??!0,primaryFallbackModel:u.primaryFallbackModel??u.claudeModel??"sonnet",secondaryFallbackModel:u.secondaryFallbackModel??u.primaryFallbackModel??u.claudeModel??"sonnet",claudeModel:u.primaryFallbackModel??u.claudeModel??"sonnet",qa:u.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:u.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},queue:u.queue||{enabled:!0,maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10}}}},uh=u=>{const o=os(u.scheduleBundleId,u.cronSchedule,u.reviewerSchedule,u.qa.schedule,u.audit.schedule,u.roadmapScanner.slicerSchedule??"35 */12 * * *");return o?{mode:"template",selectedTemplateId:o.id}:{mode:"custom",selectedTemplateId:""}},pb=u=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>u.toUpperCase().includes(d)),gb=({value:u,isSensitive:o})=>{const[d,c]=Oe.useState(!1);return o?i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?u:"••••••••••••"}),i.jsx("button",{type:"button",onClick:()=>c(!d),className:"text-slate-500 hover:text-slate-300","aria-label":d?"Hide sensitive value":"Show sensitive value",title:d?"Hide sensitive value":"Show sensitive value",children:d?i.jsx(Hg,{className:"h-4 w-4"}):i.jsx(Lg,{className:"h-4 w-4"})})]}):i.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:u})},yb=({envVars:u,onChange:o})=>{const[d,c]=Oe.useState(""),[h,x]=Oe.useState(""),[f,p]=Oe.useState(null),[b,v]=Oe.useState(""),g=()=>{if(d.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(d)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}o({...u,[d]:h}),c(""),x("")}},y=U=>{const R={...u};delete R[U],o(R)},T=U=>{p(U),v(u[U])},C=()=>{f&&(o({...u,[f]:b}),p(null),v(""))},B=()=>{p(null),v("")},q=Object.entries(u);return i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),i.jsx("div",{className:"space-y-2",children:q.length===0?i.jsx("p",{className:"text-slate-500 text-sm italic",children:"No provider environment variables configured."}):q.map(([U,R])=>i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[i.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[i.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:U}),f===U?i.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[i.jsx("input",{type:"text",value:b,onChange:Q=>v(Q.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),i.jsx("button",{type:"button",onClick:C,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${U} value`,title:`Save ${U} value`,children:i.jsx(yr,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:B,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${U}`,title:`Cancel editing ${U}`,children:i.jsx(ps,{className:"h-4 w-4"})})]}):i.jsx(gb,{value:R,isSensitive:pb(U)})]}),f!==U&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{type:"button",onClick:()=>T(U),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${U}`,title:`Edit ${U}`,children:i.jsx(Oh,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:()=>y(U),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${U}`,title:`Delete ${U}`,children:i.jsx(Uh,{className:"h-4 w-4"})})]})]},U))}),i.jsxs("div",{className:"flex items-end gap-3 pt-4 border-t border-slate-800",children:[i.jsxs("div",{className:"flex-1",children:[i.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),i.jsx("input",{type:"text",value:d,onChange:U=>c(U.target.value.toUpperCase()),placeholder:"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),i.jsxs("div",{className:"flex-1",children:[i.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),i.jsx("input",{type:"text",value:h,onChange:U=>x(U.target.value),placeholder:"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),i.jsxs(Qe,{onClick:g,disabled:!d.trim(),children:[i.jsx(vs,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},bb=({notifications:u,onChange:o})=>{const[d,c]=Oe.useState(null),[h,x]=Oe.useState(!1),[f,p]=Oe.useState({type:"slack",url:"",events:[]}),b=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],v=()=>{o({webhooks:[...u.webhooks,f]}),p({type:"slack",url:"",events:[]}),x(!1)},g=(B,q)=>{const U=[...u.webhooks];U[B]=q,o({webhooks:U})},y=B=>{o({webhooks:u.webhooks.filter((q,U)=>U!==B)})},T=(B,q)=>B.includes(q)?B.filter(U=>U!==q):[...B,q],C=({webhook:B,onChange:q,onSave:U,onCancel:R,isNew:Q})=>i.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsx(_t,{label:"Type",value:B.type,onChange:G=>{const te=G;q(te==="telegram"?{type:te,botToken:"",chatId:"",events:B.events}:{type:te,url:"",events:B.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),B.type==="telegram"?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"relative",children:i.jsx(He,{label:"Bot Token",type:"password",value:B.botToken||"",onChange:G=>q({...B,botToken:G.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),i.jsx(He,{label:"Chat ID",value:B.chatId||"",onChange:G=>q({...B,chatId:G.target.value}),placeholder:"123456789"})]}):i.jsx("div",{className:"md:col-span-2",children:i.jsx(He,{label:"Webhook URL",type:"password",value:B.url||"",onChange:G=>q({...B,url:G.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:b.map(G=>i.jsx("button",{type:"button",onClick:()=>q({...B,events:T(B.events,G.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${B.events.includes(G.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:G.label},G.value))})]}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx(Qe,{variant:"ghost",onClick:R,children:"Cancel"}),i.jsx(Qe,{onClick:U,disabled:B.events.length===0||(B.type==="telegram"?!B.botToken||!B.chatId:!B.url),children:Q?"Add Webhook":"Save Changes"})]})]});return i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),i.jsx("div",{className:"space-y-3",children:u.webhooks.length===0?i.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):u.webhooks.map((B,q)=>i.jsx("div",{children:d===q?i.jsx(C,{webhook:B,onChange:U=>g(q,U),onSave:()=>c(null),onCancel:()=>c(null)}):i.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:B.type}),B.type==="telegram"&&i.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",B.chatId]})]}),i.jsx("div",{className:"flex flex-wrap gap-1",children:B.events.map(U=>i.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:U.replace("_"," ")},U))})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{type:"button",onClick:()=>c(q),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${B.type} webhook`,title:`Edit ${B.type} webhook`,children:i.jsx(Oh,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:()=>y(q),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${B.type} webhook`,title:`Delete ${B.type} webhook`,children:i.jsx(Uh,{className:"h-4 w-4"})})]})]})},q))}),h?i.jsx(C,{webhook:f,onChange:p,onSave:v,onCancel:()=>x(!1),isNew:!0}):i.jsxs(Qe,{variant:"ghost",onClick:()=>x(!0),children:[i.jsx(vs,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},vr=({label:u,value:o,onChange:d,placeholder:c,helpText:h})=>{const[x,f]=Oe.useState(""),p=()=>{x.trim()&&!o.includes(x.trim())&&(d([...o,x.trim()]),f(""))},b=g=>{d(o.filter(y=>y!==g))},v=g=>{g.key==="Enter"&&(g.preventDefault(),p())};return i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:u}),i.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:o.map(g=>i.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[g,i.jsx("button",{type:"button",onClick:()=>b(g),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${g}`,title:`Remove ${g}`,children:i.jsx(ps,{className:"h-3 w-3"})})]},g))}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"text",value:x,onChange:g=>f(g.target.value),onKeyDown:v,placeholder:c,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),i.jsx(Qe,{onClick:p,disabled:!x.trim(),"aria-label":`Add ${u.toLowerCase()} value`,children:i.jsx(vs,{className:"h-4 w-4"})})]}),h&&i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:h})]})},Sb=()=>{const{addToast:u,projectName:o,selectedProjectId:d,globalModeLoading:c}=ot(),[h,x]=Oe.useState(!1),[f,p]=Oe.useState(null),b=Oe.useRef(!1),[v,g]=Oe.useState("template"),[y,T]=Oe.useState("always-on"),{data:C,loading:B,error:q,refetch:U}=Ft(Bh,[d],{enabled:!c}),{data:R,loading:Q,refetch:G}=Ft(Cy,[d],{enabled:!c}),te=R??[],se=Oe.useCallback(z=>{const ae=uh(z);g(ae.mode),T(ae.selectedTemplateId)},[]);Oe.useEffect(()=>{if(C)if(b.current)b.current=!1;else{const z=xr(C);p(z),se(z)}},[C,se]);const Z=(z,ae)=>{p(D=>D&&{...D,[z]:ae})},ee=()=>{if(g("template"),!f)return;const z=uh(f);z.mode==="template"&&(T(z.selectedTemplateId),Z("scheduleBundleId",z.selectedTemplateId))},P=()=>{g("custom"),Z("scheduleBundleId",null),T("")},ue=z=>{T(z.id),p(ae=>ae&&{...ae,cronSchedule:z.schedules.executor,reviewerSchedule:z.schedules.reviewer,scheduleBundleId:z.id,qa:{...ae.qa,schedule:z.schedules.qa},audit:{...ae.audit,schedule:z.schedules.audit},roadmapScanner:{...ae.roadmapScanner,slicerSchedule:z.schedules.slicer},fallbackOnRateLimit:!0})},$=async()=>{var D,V,I;if(!f)return;const z=f.cronSchedule!==(C==null?void 0:C.cronSchedule)||f.reviewerSchedule!==(C==null?void 0:C.reviewerSchedule)||f.cronScheduleOffset!==((C==null?void 0:C.cronScheduleOffset)??0)||f.schedulingPriority!==((C==null?void 0:C.schedulingPriority)??3)||f.executorEnabled!==((C==null?void 0:C.executorEnabled)??!0)||f.reviewerEnabled!==((C==null?void 0:C.reviewerEnabled)??!0)||f.queue.enabled!==(((D=C==null?void 0:C.queue)==null?void 0:D.enabled)??!0)||f.qa.enabled!==((C==null?void 0:C.qa.enabled)??!0)||f.qa.schedule!==(C==null?void 0:C.qa.schedule)||f.audit.enabled!==((C==null?void 0:C.audit.enabled)??!0)||f.audit.schedule!==(C==null?void 0:C.audit.schedule)||f.roadmapScanner.enabled!==(((V=C==null?void 0:C.roadmapScanner)==null?void 0:V.enabled)??!0)||(f.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((I=C==null?void 0:C.roadmapScanner)==null?void 0:I.slicerSchedule)||"35 */12 * * *"),ae={};for(const[he,xe]of Object.entries(f.jobProviders))xe!=null&&xe!==""&&(ae[he]=xe);x(!0);try{const he=await ya({provider:f.provider,providerLabel:f.providerLabel.trim(),defaultBranch:f.defaultBranch,prdDir:f.prdDir,branchPrefix:f.branchPrefix,branchPatterns:f.branchPatterns,executorEnabled:f.executorEnabled,reviewerEnabled:f.reviewerEnabled,minReviewScore:f.minReviewScore,maxRuntime:f.maxRuntime,reviewerMaxRuntime:f.reviewerMaxRuntime,maxLogSize:f.maxLogSize,cronSchedule:f.cronSchedule,reviewerSchedule:f.reviewerSchedule,scheduleBundleId:v==="template"?f.scheduleBundleId:null,cronScheduleOffset:f.cronScheduleOffset,schedulingPriority:f.schedulingPriority,maxRetries:f.maxRetries,reviewerMaxRetries:f.reviewerMaxRetries,reviewerRetryDelay:f.reviewerRetryDelay,providerEnv:f.providerEnv,notifications:f.notifications,prdPriority:f.prdPriority,roadmapScanner:f.roadmapScanner,templatesDir:f.templatesDir,boardProvider:f.boardProvider,jobProviders:ae,autoMerge:f.autoMerge,autoMergeMethod:f.autoMergeMethod,fallbackOnRateLimit:f.fallbackOnRateLimit,primaryFallbackModel:f.primaryFallbackModel,secondaryFallbackModel:f.secondaryFallbackModel,claudeModel:f.primaryFallbackModel,qa:f.qa,audit:f.audit,queue:f.queue}),xe=xr(he);p(xe),se(xe);let N="";if(z)try{await ds()}catch(k){N=k instanceof Error?k.message:"failed to reinstall cron schedules"}u(N?{title:"Settings Saved (Cron Reinstall Failed)",message:N,type:"warning"}:{title:"Settings Saved",message:z?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),b.current=!0,U(),G()}catch(he){u({title:"Save Failed",message:he instanceof Error?he.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},je=()=>{if(C){const z=xr(C);p(z),se(z),u({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},ge=async z=>{try{const ae=await Gh(z);Z("roadmapScanner",ae.roadmapScanner);let D="";try{await ds()}catch(V){D=V instanceof Error?V.message:"Failed to reinstall cron schedules"}u(D?{title:"Planner Saved (Cron Reinstall Failed)",message:D,type:"warning"}:{title:z?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${z?"enabled":"disabled"}.`,type:"success"})}catch(ae){u({title:"Toggle Failed",message:ae instanceof Error?ae.message:"Failed to toggle roadmap scanner",type:"error"})}};if(B||!f)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(q)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),i.jsx("div",{className:"text-sm text-slate-500",children:q.message}),i.jsx(Qe,{onClick:()=>U(),children:"Retry"})]});const Ge=[{id:"general",label:"General",content:i.jsx(Me,{className:"p-6 space-y-6",children:i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[i.jsx(He,{label:"Project Name",value:o,disabled:!0}),i.jsx(He,{label:"Default Branch",value:f.defaultBranch,onChange:z=>Z("defaultBranch",z.target.value)}),i.jsx(He,{label:"PRD Directory",value:f.prdDir,onChange:z=>Z("prdDir",z.target.value),helperText:"Directory containing PRD files (relative to project root)"}),i.jsx(He,{label:"Branch Prefix",value:f.branchPrefix,onChange:z=>Z("branchPrefix",z.target.value)}),i.jsx("div",{className:"md:col-span-2",children:i.jsx(At,{label:"Enable PRD Executor",checked:f.executorEnabled,onChange:z=>Z("executorEnabled",z)})}),i.jsx("div",{className:"md:col-span-2",children:i.jsx(At,{label:"Enable Automated Reviews",checked:f.reviewerEnabled,onChange:z=>Z("reviewerEnabled",z)})}),i.jsx("div",{className:"md:col-span-2",children:i.jsx(At,{label:"Auto-merge approved PRs",checked:f.autoMerge,onChange:z=>Z("autoMerge",z)})}),f.autoMerge&&i.jsx(_t,{label:"Merge Method",value:f.autoMergeMethod,onChange:z=>Z("autoMergeMethod",z),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),i.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:i.jsx(vr,{label:"Branch Patterns",value:f.branchPatterns,onChange:z=>Z("branchPatterns",z),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})})},{id:"providers",label:"Providers",content:i.jsxs("div",{className:"space-y-6",children:[i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Global Provider"}),i.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Default AI provider used for all jobs unless overridden below"})]}),i.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/70 p-4",children:i.jsx("p",{className:"text-sm text-slate-300",children:"Primary and secondary fallback settings only control native Claude retry behavior after a Claude proxy rate limit. To use Codex, set the global provider above or assign Codex in the per-job provider overrides below."})}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(_t,{label:"Provider",value:f.provider,onChange:z=>Z("provider",z),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),i.jsx(He,{label:"Provider Label",value:f.providerLabel,onChange:z=>Z("providerLabel",z.target.value),placeholder:"e.g. GLM-5 (auto-derived if blank)",helperText:"Human-friendly name shown in PR comments, review footers, and commit attribution"}),i.jsx(_t,{label:"Primary Native Claude Fallback",value:f.primaryFallbackModel,onChange:z=>{const ae=z;Z("primaryFallbackModel",ae),Z("claudeModel",ae)},options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"Claude-only. First native Claude model used for direct Claude execution and the first rate-limit fallback attempt"}),i.jsx(_t,{label:"Secondary Native Claude Fallback",value:f.secondaryFallbackModel,onChange:z=>Z("secondaryFallbackModel",z),options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"Claude-only. Used only if the primary native Claude fallback is also rate-limited"}),i.jsxs("div",{className:"md:col-span-2",children:[i.jsx(At,{label:"Fallback on Rate Limit",checked:f.fallbackOnRateLimit,onChange:z=>Z("fallbackOnRateLimit",z)}),i.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"When enabled, Night Watch retries with the primary native Claude fallback model, then the secondary one if the primary is also rate-limited"})]})]})]}),i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Per-Job Provider Overrides"}),i.jsx("p",{className:"text-sm text-slate-400 mt-1",children:'Override the AI provider for specific job types. Leave as "Use Global" to use the default provider.'})]}),i.jsx("div",{className:"space-y-4",children:[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"}].map(({key:z,label:ae})=>i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[i.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:ae}),i.jsx("div",{className:"w-64",children:i.jsx(_t,{value:f.jobProviders[z]??"",onChange:D=>{const V={...f.jobProviders};D===""?delete V[z]:V[z]=D,Z("jobProviders",V)},options:[{label:"Use Global (default)",value:""},{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]})})]},z))})]}),i.jsxs(Me,{className:"p-6",children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),i.jsx(yb,{envVars:f.providerEnv,onChange:z=>Z("providerEnv",z)})]})]})},{id:"runtime",label:"Runtime",content:i.jsxs("div",{className:"space-y-6",children:[i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx("input",{type:"range",min:"0",max:"100",value:f.minReviewScore,onChange:z=>Z("minReviewScore",Number(z.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),i.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:f.minReviewScore})]}),i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(He,{label:"Max Runtime (Executor)",type:"number",value:String(f.maxRuntime),onChange:z=>Z("maxRuntime",Number(z.target.value||0)),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"})}),i.jsx(He,{label:"Max Runtime (Reviewer)",type:"number",value:String(f.reviewerMaxRuntime),onChange:z=>Z("reviewerMaxRuntime",Number(z.target.value||0)),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"})}),i.jsx(He,{label:"Max Log Size",type:"number",value:String(f.maxLogSize),onChange:z=>Z("maxLogSize",Number(z.target.value||0)),rightIcon:i.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),i.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(He,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(f.reviewerMaxRetries),onChange:z=>{const ae=Math.min(10,Math.max(0,Number(z.target.value||0)));Z("reviewerMaxRetries",ae)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),i.jsx(He,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(f.reviewerRetryDelay),onChange:z=>{const ae=Math.min(300,Math.max(0,Number(z.target.value||0)));Z("reviewerRetryDelay",ae)},helperText:"Wait time between retry attempts to let CI settle."})]})]})]})},{id:"schedules",label:"Schedules",content:i.jsx(Zh,{form:{cronSchedule:f.cronSchedule,reviewerSchedule:f.reviewerSchedule,qa:f.qa,audit:f.audit,roadmapScanner:{enabled:f.roadmapScanner.enabled,slicerSchedule:f.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:f.scheduleBundleId,schedulingPriority:f.schedulingPriority,cronScheduleOffset:f.cronScheduleOffset,globalQueueEnabled:f.queue.enabled},scheduleMode:v,selectedTemplateId:y,onFieldChange:(z,ae)=>{z==="globalQueueEnabled"?Z("queue",{...f.queue,enabled:ae}):Z(z,ae)},onSwitchToTemplate:ee,onSwitchToCustom:P,onApplyTemplate:ue})},{id:"notifications",label:"Notifications",content:i.jsxs(Me,{className:"p-6",children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),i.jsx(bb,{notifications:f.notifications,onChange:z=>Z("notifications",z)})]})},{id:"roadmap",label:"Planner",content:i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),i.jsx(At,{checked:f.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:ge})]}),f.roadmapScanner.enabled&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[i.jsx(He,{label:"Roadmap File Path",value:f.roadmapScanner.roadmapPath,onChange:z=>Z("roadmapScanner",{...f.roadmapScanner,roadmapPath:z.target.value}),helperText:"Primary planning source (relative to project root)."}),i.jsx(cn,{label:"Planner Schedule",value:f.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:z=>Z("roadmapScanner",{...f.roadmapScanner,slicerSchedule:z})})]}),i.jsxs("div",{className:"pt-4 border-t border-slate-800",children:[i.jsx("h4",{className:"text-md font-medium text-slate-200 mb-4",children:"Planner Execution"}),i.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Planner creates one PRD at a time and can auto-create a board issue for handoff."}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(He,{label:"Planner Max Runtime",type:"number",value:String(f.roadmapScanner.slicerMaxRuntime||""),onChange:z=>Z("roadmapScanner",{...f.roadmapScanner,slicerMaxRuntime:Number(z.target.value||0)}),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),i.jsx(_t,{label:"Planner Priority Mode",value:f.roadmapScanner.priorityMode||"roadmap-first",onChange:z=>Z("roadmapScanner",{...f.roadmapScanner,priorityMode:z==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}],helperText:"Choose whether planner consumes roadmap items or audit findings first."}),i.jsx(_t,{label:"Planner Issue Column",value:f.roadmapScanner.issueColumn||"Draft",onChange:z=>Z("roadmapScanner",{...f.roadmapScanner,issueColumn:z==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})]})]})},{id:"board",label:"Board",content:i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),i.jsx(At,{checked:f.boardProvider.enabled,onChange:z=>Z("boardProvider",{...f.boardProvider,enabled:z})})]}),f.boardProvider.enabled&&i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[i.jsx(_t,{label:"Board Provider",value:f.boardProvider.provider,onChange:z=>Z("boardProvider",{...f.boardProvider,provider:z}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),f.boardProvider.provider==="github"&&i.jsxs(i.Fragment,{children:[i.jsx(He,{label:"Project Number",type:"number",value:String(f.boardProvider.projectNumber||""),onChange:z=>Z("boardProvider",{...f.boardProvider,projectNumber:z.target.value?Number(z.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),i.jsx(He,{label:"Repository",value:f.boardProvider.repo||"",onChange:z=>Z("boardProvider",{...f.boardProvider,repo:z.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),f.boardProvider.provider==="local"&&i.jsx("div",{className:"md:col-span-2",children:i.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]})},{id:"qa",label:"QA",content:i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),i.jsx(At,{checked:f.qa.enabled,onChange:z=>Z("qa",{...f.qa,enabled:z})})]}),f.qa.enabled&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[i.jsx(He,{label:"Max Runtime",type:"number",value:String(f.qa.maxRuntime),onChange:z=>Z("qa",{...f.qa,maxRuntime:Number(z.target.value||0)}),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),i.jsx(_t,{label:"Artifacts",value:f.qa.artifacts,onChange:z=>Z("qa",{...f.qa,artifacts:z}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),i.jsx(He,{label:"Skip Label",value:f.qa.skipLabel,onChange:z=>Z("qa",{...f.qa,skipLabel:z.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),i.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[i.jsx(vr,{label:"QA Branch Patterns",value:f.qa.branchPatterns,onChange:z=>Z("qa",{...f.qa,branchPatterns:z}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),i.jsx(At,{checked:f.qa.autoInstallPlaywright,onChange:z=>Z("qa",{...f.qa,autoInstallPlaywright:z})})]})]})]})]})},{id:"audit",label:"Audit",content:i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),i.jsx(At,{checked:f.audit.enabled,onChange:z=>Z("audit",{...f.audit,enabled:z})})]}),f.audit.enabled&&i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:i.jsx(He,{label:"Max Runtime",type:"number",value:String(f.audit.maxRuntime),onChange:z=>Z("audit",{...f.audit,maxRuntime:Number(z.target.value||0)}),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})})]})},{id:"advanced",label:"Advanced",content:i.jsxs(Me,{className:"p-6 space-y-6",children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(He,{label:"Templates Directory",value:f.templatesDir,onChange:z=>Z("templatesDir",z.target.value),helperText:"Directory for custom template overrides"}),i.jsx(He,{label:"Max Retries",type:"number",min:"1",value:String(f.maxRetries),onChange:z=>{const ae=Math.max(1,Number(z.target.value||1));Z("maxRetries",ae)},helperText:"Retry attempts for rate-limited API calls"})]}),i.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:i.jsx(vr,{label:"PRD Priority",value:f.prdPriority,onChange:z=>Z("prdPriority",z),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]})}];return i.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[i.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),i.jsx(Xh,{tabs:Ge}),i.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[i.jsxs(Qe,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:je,children:[i.jsx(ny,{className:"h-4 w-4 mr-2"}),"Reset"]}),i.jsxs(Qe,{onClick:$,loading:h,children:[i.jsx(iy,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),i.jsxs("div",{className:"mt-12",children:[i.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[i.jsx(Mh,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),i.jsx(Me,{className:"divide-y divide-slate-800",children:Q?i.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):te.map((z,ae)=>{const D=z.status==="pass",V=z.status==="warn",I=D?"bg-green-500/10 text-green-400 border-green-500/20":V?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return i.jsxs("div",{className:"p-4 flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-200",children:z.name}),i.jsx("p",{className:"text-xs text-slate-500",children:z.detail})]}),i.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${I}`,children:z.status.toUpperCase()})]},`${z.name}-${ae}`)})})]})]})},jb=()=>(Zy(),$y(),i.jsx($p,{children:i.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[i.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),i.jsx(Gy,{}),i.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[i.jsx(Qy,{}),i.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:i.jsx("div",{className:"max-w-7xl mx-auto w-full",children:i.jsxs(Np,{children:[i.jsx(Sl,{path:"/",element:i.jsx(lb,{})}),i.jsx(Sl,{path:"/prs",element:i.jsx(nb,{})}),i.jsx(Sl,{path:"/board",element:i.jsx(Py,{})}),i.jsx(Sl,{path:"/scheduling",element:i.jsx(vb,{})}),i.jsx(Sl,{path:"/logs",element:i.jsx(ab,{})}),i.jsx(Sl,{path:"/roadmap",element:i.jsx(sb,{})}),i.jsx(Sl,{path:"/settings",element:i.jsx(Sb,{})}),i.jsx(Sl,{path:"*",element:i.jsx(Sp,{to:"/",replace:!0})})]})})})]}),i.jsx(Vy,{})]})})),$h=document.getElementById("root");if(!$h)throw new Error("Could not find root element to mount to");const Nb=wv.createRoot($h);Nb.render(i.jsx(Oe.StrictMode,{children:i.jsx(jb,{})}));