@jonit-dev/night-watch-cli 1.7.87 → 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,370 @@
1
+ (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))c(m);new MutationObserver(m=>{for(const x of m)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(m){const x={};return m.integrity&&(x.integrity=m.integrity),m.referrerPolicy&&(x.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?x.credentials="include":m.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function c(m){if(m.ep)return;m.ep=!0;const x=d(m);fetch(m.href,x)}})();function Nr(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ir={exports:{}},cs={};/**
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 Lm;function Nv(){if(Lm)return cs;Lm=1;var u=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function d(c,m,x){var f=null;if(x!==void 0&&(f=""+x),m.key!==void 0&&(f=""+m.key),"key"in m){x={};for(var p in m)p!=="key"&&(x[p]=m[p])}else x=m;return m=x.ref,{$$typeof:u,type:c,key:f,ref:m!==void 0?m:null,props:x}}return cs.Fragment=r,cs.jsx=d,cs.jsxs=d,cs}var km;function Ev(){return km||(km=1,ir.exports=Nv()),ir.exports}var s=Ev(),ur={exports:{}},de={};/**
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 Ym;function wv(){if(Ym)return de;Ym=1;var u=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),m=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"),R=Symbol.iterator;function q(N){return N===null||typeof N!="object"?null:(N=R&&N[R]||N["@@iterator"],typeof N=="function"?N:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,k={};function E(N,G,$){this.props=N,this.context=G,this.refs=k,this.updater=$||z}E.prototype.isReactComponent={},E.prototype.setState=function(N,G){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,G,"setState")},E.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function L(){}L.prototype=E.prototype;function Y(N,G,$){this.props=N,this.context=G,this.refs=k,this.updater=$||z}var le=Y.prototype=new L;le.constructor=Y,O(le,E.prototype),le.isPureReactComponent=!0;var U=Array.isArray;function re(){}var F={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function ue(N,G,$){var W=$.ref;return{$$typeof:u,type:N,key:G,ref:W!==void 0?W:null,props:$}}function Z(N,G){return ue(N.type,G,N.props)}function be(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function ye(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function($){return G[$]})}var Ye=/\/+/g;function J(N,G){return typeof N=="object"&&N!==null&&N.key!=null?ye(""+N.key):G.toString(36)}function We(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(re,re):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function B(N,G,$,W,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 r:Ne=!0;break;case g:return Ne=N._init,B(Ne(N._payload),G,$,W,ce)}}if(Ne)return ce=ce(N),Ne=W===""?"."+J(N,0):W,U(ce)?($="",Ne!=null&&($=Ne.replace(Ye,"$&/")+"/"),B(ce,G,$,"",function(tl){return tl})):ce!=null&&(be(ce)&&(ce=Z(ce,$+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(Ye,"$&/")+"/")+Ne)),G.push(ce)),1;Ne=0;var Pe=W===""?".":W+":";if(U(N))for(var Ge=0;Ge<N.length;Ge++)W=N[Ge],me=Pe+J(W,Ge),Ne+=B(W,G,$,me,ce);else if(Ge=q(N),typeof Ge=="function")for(N=Ge.call(N),Ge=0;!(W=N.next()).done;)W=W.value,me=Pe+J(W,Ge++),Ne+=B(W,G,$,me,ce);else if(me==="object"){if(typeof N.then=="function")return B(We(N),G,$,W,ce);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function K(N,G,$){if(N==null)return N;var W=[],ce=0;return B(N,W,"","",function(me){return G.call($,me,ce++)}),W}function ae(N){if(N._status===-1){var G=N._result;G=G(),G.then(function($){(N._status===0||N._status===-1)&&(N._status=1,N._result=$)},function($){(N._status===0||N._status===-1)&&(N._status=2,N._result=$)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var Ce=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=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(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},_e={map:K,forEach:function(N,G,$){K(N,function(){G.apply(this,arguments)},$)},count:function(N){var G=0;return K(N,function(){G++}),G},toArray:function(N){return K(N,function(G){return G})||[]},only:function(N){if(!be(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return de.Activity=y,de.Children=_e,de.Component=E,de.Fragment=d,de.Profiler=m,de.PureComponent=Y,de.StrictMode=c,de.Suspense=b,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,de.__COMPILER_RUNTIME={__proto__:null,c:function(N){return F.H.useMemoCache(N)}},de.cache=function(N){return function(){return N.apply(null,arguments)}},de.cacheSignal=function(){return null},de.cloneElement=function(N,G,$){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var W=O({},N.props),ce=N.key;if(G!=null)for(me in G.key!==void 0&&(ce=""+G.key),G)!I.call(G,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&G.ref===void 0||(W[me]=G[me]);var me=arguments.length-2;if(me===1)W.children=$;else if(1<me){for(var Ne=Array(me),Pe=0;Pe<me;Pe++)Ne[Pe]=arguments[Pe+2];W.children=Ne}return ue(N.type,ce,W)},de.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},de.createElement=function(N,G,$){var W,ce={},me=null;if(G!=null)for(W in G.key!==void 0&&(me=""+G.key),G)I.call(G,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ce[W]=G[W]);var Ne=arguments.length-2;if(Ne===1)ce.children=$;else if(1<Ne){for(var Pe=Array(Ne),Ge=0;Ge<Ne;Ge++)Pe[Ge]=arguments[Ge+2];ce.children=Pe}if(N&&N.defaultProps)for(W in Ne=N.defaultProps,Ne)ce[W]===void 0&&(ce[W]=Ne[W]);return ue(N,me,ce)},de.createRef=function(){return{current:null}},de.forwardRef=function(N){return{$$typeof:p,render:N}},de.isValidElement=be,de.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:ae}},de.memo=function(N,G){return{$$typeof:v,type:N,compare:G===void 0?null:G}},de.startTransition=function(N){var G=F.T,$={};F.T=$;try{var W=N(),ce=F.S;ce!==null&&ce($,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(re,Ce)}catch(me){Ce(me)}finally{G!==null&&$.types!==null&&(G.types=$.types),F.T=G}},de.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},de.use=function(N){return F.H.use(N)},de.useActionState=function(N,G,$){return F.H.useActionState(N,G,$)},de.useCallback=function(N,G){return F.H.useCallback(N,G)},de.useContext=function(N){return F.H.useContext(N)},de.useDebugValue=function(){},de.useDeferredValue=function(N,G){return F.H.useDeferredValue(N,G)},de.useEffect=function(N,G){return F.H.useEffect(N,G)},de.useEffectEvent=function(N){return F.H.useEffectEvent(N)},de.useId=function(){return F.H.useId()},de.useImperativeHandle=function(N,G,$){return F.H.useImperativeHandle(N,G,$)},de.useInsertionEffect=function(N,G){return F.H.useInsertionEffect(N,G)},de.useLayoutEffect=function(N,G){return F.H.useLayoutEffect(N,G)},de.useMemo=function(N,G){return F.H.useMemo(N,G)},de.useOptimistic=function(N,G){return F.H.useOptimistic(N,G)},de.useReducer=function(N,G,$){return F.H.useReducer(N,G,$)},de.useRef=function(N){return F.H.useRef(N)},de.useState=function(N){return F.H.useState(N)},de.useSyncExternalStore=function(N,G,$){return F.H.useSyncExternalStore(N,G,$)},de.useTransition=function(){return F.H.useTransition()},de.version="19.2.4",de}var Gm;function Er(){return Gm||(Gm=1,ur.exports=wv()),ur.exports}var w=Er();const ge=Nr(w);var cr={exports:{}},rs={},rr={exports:{}},or={};/**
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 Qm;function Cv(){return Qm||(Qm=1,(function(u){function r(B,K){var ae=B.length;B.push(K);e:for(;0<ae;){var Ce=ae-1>>>1,_e=B[Ce];if(0<m(_e,K))B[Ce]=K,B[ae]=_e,ae=Ce;else break e}}function d(B){return B.length===0?null:B[0]}function c(B){if(B.length===0)return null;var K=B[0],ae=B.pop();if(ae!==K){B[0]=ae;e:for(var Ce=0,_e=B.length,N=_e>>>1;Ce<N;){var G=2*(Ce+1)-1,$=B[G],W=G+1,ce=B[W];if(0>m($,ae))W<_e&&0>m(ce,$)?(B[Ce]=ce,B[W]=ae,Ce=W):(B[Ce]=$,B[G]=ae,Ce=G);else if(W<_e&&0>m(ce,ae))B[Ce]=ce,B[W]=ae,Ce=W;else break e}}return K}function m(B,K){var ae=B.sortIndex-K.sortIndex;return ae!==0?ae:B.id-K.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,R=3,q=!1,z=!1,O=!1,k=!1,E=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function le(B){for(var K=d(v);K!==null;){if(K.callback===null)c(v);else if(K.startTime<=B)c(v),K.sortIndex=K.expirationTime,r(b,K);else break;K=d(v)}}function U(B){if(O=!1,le(B),!z)if(d(b)!==null)z=!0,re||(re=!0,ye());else{var K=d(v);K!==null&&We(U,K.startTime-B)}}var re=!1,F=-1,I=5,ue=-1;function Z(){return k?!0:!(u.unstable_now()-ue<I)}function be(){if(k=!1,re){var B=u.unstable_now();ue=B;var K=!0;try{e:{z=!1,O&&(O=!1,L(F),F=-1),q=!0;var ae=R;try{t:{for(le(B),y=d(b);y!==null&&!(y.expirationTime>B&&Z());){var Ce=y.callback;if(typeof Ce=="function"){y.callback=null,R=y.priorityLevel;var _e=Ce(y.expirationTime<=B);if(B=u.unstable_now(),typeof _e=="function"){y.callback=_e,le(B),K=!0;break t}y===d(b)&&c(b),le(B)}else c(b);y=d(b)}if(y!==null)K=!0;else{var N=d(v);N!==null&&We(U,N.startTime-B),K=!1}}break e}finally{y=null,R=ae,q=!1}K=void 0}}finally{K?ye():re=!1}}}var ye;if(typeof Y=="function")ye=function(){Y(be)};else if(typeof MessageChannel<"u"){var Ye=new MessageChannel,J=Ye.port2;Ye.port1.onmessage=be,ye=function(){J.postMessage(null)}}else ye=function(){E(be,0)};function We(B,K){F=E(function(){B(u.unstable_now())},K)}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(B){B.callback=null},u.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<B?Math.floor(1e3/B):5},u.unstable_getCurrentPriorityLevel=function(){return R},u.unstable_next=function(B){switch(R){case 1:case 2:case 3:var K=3;break;default:K=R}var ae=R;R=K;try{return B()}finally{R=ae}},u.unstable_requestPaint=function(){k=!0},u.unstable_runWithPriority=function(B,K){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ae=R;R=B;try{return K()}finally{R=ae}},u.unstable_scheduleCallback=function(B,K,ae){var Ce=u.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Ce+ae:Ce):ae=Ce,B){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=ae+_e,B={id:g++,callback:K,priorityLevel:B,startTime:ae,expirationTime:_e,sortIndex:-1},ae>Ce?(B.sortIndex=ae,r(v,B),d(b)===null&&B===d(v)&&(O?(L(F),F=-1):O=!0,We(U,ae-Ce))):(B.sortIndex=_e,r(b,B),z||q||(z=!0,re||(re=!0,ye()))),B},u.unstable_shouldYield=Z,u.unstable_wrapCallback=function(B){var K=R;return function(){var ae=R;R=K;try{return B.apply(this,arguments)}finally{R=ae}}}})(or)),or}var Xm;function Tv(){return Xm||(Xm=1,rr.exports=Cv()),rr.exports}var dr={exports:{}},ht={};/**
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 Vm;function Rv(){if(Vm)return ht;Vm=1;var u=Er();function r(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(r(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function x(b,v,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,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 ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,ht.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(r(299));return x(b,v,null,g)},ht.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()}},ht.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))},ht.prefetchDNS=function(b){typeof b=="string"&&c.d.D(b)},ht.preinit=function(b,v){if(typeof b=="string"&&v&&typeof v.as=="string"){var g=v.as,y=p(g,v.crossOrigin),R=typeof v.integrity=="string"?v.integrity:void 0,q=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:R,fetchPriority:q}):g==="script"&&c.d.X(b,{crossOrigin:y,integrity:R,fetchPriority:q,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},ht.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)},ht.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})}},ht.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)},ht.requestFormReset=function(b){c.d.r(b)},ht.unstable_batchedUpdates=function(b,v){return b(v)},ht.useFormState=function(b,v,g){return f.H.useFormState(b,v,g)},ht.useFormStatus=function(){return f.H.useHostTransitionStatus()},ht.version="19.2.4",ht}var Zm;function hh(){if(Zm)return dr.exports;Zm=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(r){console.error(r)}}return u(),dr.exports=Rv(),dr.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 $m;function Mv(){if($m)return rs;$m=1;var u=Tv(),r=Er(),d=hh();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 m(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 i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return b(n),e;if(i===a)return b(n),t;i=i.sibling}throw Error(c(188))}if(l.return!==a.return)l=n,a=i;else{for(var o=!1,h=n.child;h;){if(h===l){o=!0,l=n,a=i;break}if(h===a){o=!0,a=n,l=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===l){o=!0,l=i,a=n;break}if(h===a){o=!0,a=i,l=n;break}h=h.sibling}if(!o)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,R=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),ue=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),be=Symbol.iterator;function ye(e){return e===null||typeof e!="object"?null:(e=be&&e[be]||e["@@iterator"],typeof e=="function"?e:null)}var Ye=Symbol.for("react.client.reference");function J(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case E:return"Profiler";case k:return"StrictMode";case U:return"Suspense";case re:return"SuspenseList";case ue:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case Y:return e.displayName||"Context";case L:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:J(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return J(e(t))}catch{}}return null}var We=Array.isArray,B=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Ce=[],_e=-1;function N(e){return{current:e}}function G(e){0>_e||(e.current=Ce[_e],Ce[_e]=null,_e--)}function $(e,t){_e++,Ce[_e]=e.current,e.current=t}var W=N(null),ce=N(null),me=N(null),Ne=N(null);function Pe(e,t){switch($(me,t),$(ce,e),$(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=cm(t),e=rm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(W),$(W,e)}function Ge(){G(W),G(ce),G(me)}function tl(e){e.memoizedState!==null&&$(Ne,e);var t=W.current,l=rm(t,e.type);t!==l&&($(ce,e),$(W,l))}function T(e){ce.current===e&&(G(W),G(ce)),Ne.current===e&&(G(Ne),ns._currentValue=ae)}var ee,fe;function Te(e){if(ee===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ee=t&&t[1]||"",fe=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ee+e+fe}var V=!1;function ne(e,t){if(!e||V)return"";V=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(D){var _=D}Reflect.construct(e,[],X)}else{try{X.call()}catch(D){_=D}e.call(X.prototype)}}else{try{throw Error()}catch(D){_=D}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(D){if(D&&_&&typeof D.stack=="string")return[D.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 i=a.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var j=o.split(`
44
+ `),A=h.split(`
45
+ `);for(n=a=0;a<j.length&&!j[a].includes("DetermineComponentFrameRoot");)a++;for(;n<A.length&&!A[n].includes("DetermineComponentFrameRoot");)n++;if(a===j.length||n===A.length)for(a=j.length-1,n=A.length-1;1<=a&&0<=n&&j[a]!==A[n];)n--;for(;1<=a&&0<=n;a--,n--)if(j[a]!==A[n]){if(a!==1||n!==1)do if(a--,n--,0>n||j[a]!==A[n]){var H=`
46
+ `+j[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{V=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Te(l):""}function Re(e,t){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te("Lazy");case 13:return e.child!==t&&t!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return ne(e.type,!1);case 11:return ne(e.type.render,!1);case 1:return ne(e.type,!0);case 31:return Te("Activity");default:return""}}function ct(e){try{var t="",l=null;do t+=Re(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var vt=Object.prototype.hasOwnProperty,Ht=u.unstable_scheduleCallback,Lt=u.unstable_cancelCallback,Ml=u.unstable_shouldYield,l0=u.unstable_requestPaint,Ct=u.unstable_now,a0=u.unstable_getCurrentPriorityLevel,Hr=u.unstable_ImmediatePriority,Lr=u.unstable_UserBlockingPriority,bs=u.unstable_NormalPriority,n0=u.unstable_LowPriority,kr=u.unstable_IdlePriority,s0=u.log,i0=u.unstable_setDisableYieldValue,vn=null,Tt=null;function Al(e){if(typeof s0=="function"&&i0(e),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(vn,e)}catch{}}var Rt=Math.clz32?Math.clz32:r0,u0=Math.log,c0=Math.LN2;function r0(e){return e>>>=0,e===0?32:31-(u0(e)/c0|0)|0}var ys=256,js=262144,Ss=4194304;function aa(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 Ns(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=a&134217727;return h!==0?(a=h&~i,a!==0?n=aa(a):(o&=h,o!==0?n=aa(o):l||(l=h&~e,l!==0&&(n=aa(l))))):(h=a&~i,h!==0?n=aa(h):o!==0?n=aa(o):l||(l=a&~e,l!==0&&(n=aa(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function pn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function o0(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 Yr(){var e=Ss;return Ss<<=1,(Ss&62914560)===0&&(Ss=4194304),e}function Ki(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function gn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function d0(e,t,l,a,n,i){var o=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 h=e.entanglements,j=e.expirationTimes,A=e.hiddenUpdates;for(l=o&~l;0<l;){var H=31-Rt(l),X=1<<H;h[H]=0,j[H]=-1;var _=A[H];if(_!==null)for(A[H]=null,H=0;H<_.length;H++){var D=_[H];D!==null&&(D.lane&=-536870913)}l&=~X}a!==0&&Gr(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Gr(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Rt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Qr(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Rt(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Xr(e,t){var l=t&-t;return l=(l&42)!==0?1:Ji(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ji(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 Fi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vr(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Dm(e.type))}function Zr(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var _l=Math.random().toString(36).slice(2),rt="__reactFiber$"+_l,gt="__reactProps$"+_l,Na="__reactContainer$"+_l,Wi="__reactEvents$"+_l,f0="__reactListeners$"+_l,m0="__reactHandles$"+_l,$r="__reactResources$"+_l,bn="__reactMarker$"+_l;function Pi(e){delete e[rt],delete e[gt],delete e[Wi],delete e[f0],delete e[m0]}function Ea(e){var t=e[rt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Na]||l[rt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=vm(e);e!==null;){if(l=e[rt])return l;e=vm(e)}return t}e=l,l=e.parentNode}return null}function wa(e){if(e=e[rt]||e[Na]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Ca(e){var t=e[$r];return t||(t=e[$r]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function it(e){e[bn]=!0}var Kr=new Set,Jr={};function na(e,t){Ta(e,t),Ta(e+"Capture",t)}function Ta(e,t){for(Jr[e]=t,e=0;e<t.length;e++)Kr.add(t[e])}var h0=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]*$"),Fr={},Wr={};function x0(e){return vt.call(Wr,e)?!0:vt.call(Fr,e)?!1:h0.test(e)?Wr[e]=!0:(Fr[e]=!0,!1)}function Es(e,t,l){if(x0(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 ws(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 ul(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 kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function v0(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,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(o){l=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ii(e){if(!e._valueTracker){var t=Pr(e)?"checked":"value";e._valueTracker=v0(e,t,""+e[t])}}function Ir(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Pr(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Cs(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 p0=/[\n"\\]/g;function Yt(e){return e.replace(p0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function eu(e,t,l,a,n,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?tu(e,o,kt(t)):l!=null?tu(e,o,kt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+kt(h):e.removeAttribute("name")}function eo(e,t,l,a,n,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Ii(e);return}l=l!=null?""+kt(l):"",t=t!=null?""+kt(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=h?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Ii(e)}function tu(e,t,l){t==="number"&&Cs(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ra(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=""+kt(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 to(e,t,l){if(t!=null&&(t=""+kt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+kt(l):""}function lo(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(c(92));if(We(a)){if(1<a.length)throw Error(c(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=kt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Ii(e)}function Ma(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var g0=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 ao(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||g0.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function no(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&&ao(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&ao(e,i,t[i])}function lu(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 b0=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"]]),y0=/^[\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 Ts(e){return y0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function cl(){}var au=null;function nu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Aa=null,_a=null;function so(e){var t=wa(e);if(t&&(e=t.stateNode)){var l=e[gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(eu(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="'+Yt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[gt]||null;if(!n)throw Error(c(90));eu(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&&Ir(a)}break e;case"textarea":to(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ra(e,!!l.multiple,t,!1)}}}var su=!1;function io(e,t,l){if(su)return e(t,l);su=!0;try{var a=e(t);return a}finally{if(su=!1,(Aa!==null||_a!==null)&&(hi(),Aa&&(t=Aa,e=_a,_a=Aa=null,so(t),e)))for(t=0;t<e.length;t++)so(e[t])}}function jn(e,t){var l=e.stateNode;if(l===null)return null;var a=l[gt]||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 rl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iu=!1;if(rl)try{var Sn={};Object.defineProperty(Sn,"passive",{get:function(){iu=!0}}),window.addEventListener("test",Sn,Sn),window.removeEventListener("test",Sn,Sn)}catch{iu=!1}var Dl=null,uu=null,Rs=null;function uo(){if(Rs)return Rs;var e,t=uu,l=t.length,a,n="value"in Dl?Dl.value:Dl.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var o=l-e;for(a=1;a<=o&&t[l-a]===n[i-a];a++);return Rs=n.slice(e,1<a?1-a:void 0)}function Ms(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 As(){return!0}function co(){return!1}function bt(e){function t(l,a,n,i,o){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?As:co,this.isPropagationStopped=co,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=As)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=As)},persist:function(){},isPersistent:As}),t}var sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_s=bt(sa),Nn=y({},sa,{view:0,detail:0}),j0=bt(Nn),cu,ru,En,Ds=y({},Nn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:du,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!==En&&(En&&e.type==="mousemove"?(cu=e.screenX-En.screenX,ru=e.screenY-En.screenY):ru=cu=0,En=e),cu)},movementY:function(e){return"movementY"in e?e.movementY:ru}}),ro=bt(Ds),S0=y({},Ds,{dataTransfer:0}),N0=bt(S0),E0=y({},Nn,{relatedTarget:0}),ou=bt(E0),w0=y({},sa,{animationName:0,elapsedTime:0,pseudoElement:0}),C0=bt(w0),T0=y({},sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),R0=bt(T0),M0=y({},sa,{data:0}),oo=bt(M0),A0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_0={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"},D0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function z0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=D0[e])?!!t[e]:!1}function du(){return z0}var O0=y({},Nn,{key:function(e){if(e.key){var t=A0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ms(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:du,charCode:function(e){return e.type==="keypress"?Ms(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ms(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),U0=bt(O0),q0=y({},Ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fo=bt(q0),B0=y({},Nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:du}),H0=bt(B0),L0=y({},sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),k0=bt(L0),Y0=y({},Ds,{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}),G0=bt(Y0),Q0=y({},sa,{newState:0,oldState:0}),X0=bt(Q0),V0=[9,13,27,32],fu=rl&&"CompositionEvent"in window,wn=null;rl&&"documentMode"in document&&(wn=document.documentMode);var Z0=rl&&"TextEvent"in window&&!wn,mo=rl&&(!fu||wn&&8<wn&&11>=wn),ho=" ",xo=!1;function vo(e,t){switch(e){case"keyup":return V0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function po(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Da=!1;function $0(e,t){switch(e){case"compositionend":return po(t);case"keypress":return t.which!==32?null:(xo=!0,ho);case"textInput":return e=t.data,e===ho&&xo?null:e;default:return null}}function K0(e,t){if(Da)return e==="compositionend"||!fu&&vo(e,t)?(e=uo(),Rs=uu=Dl=null,Da=!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 mo&&t.locale!=="ko"?null:t.data;default:return null}}var J0={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 go(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!J0[e.type]:t==="textarea"}function bo(e,t,l,a){Aa?_a?_a.push(a):_a=[a]:Aa=a,t=ji(t,"onChange"),0<t.length&&(l=new _s("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Cn=null,Tn=null;function F0(e){lm(e,0)}function zs(e){var t=yn(e);if(Ir(t))return e}function yo(e,t){if(e==="change")return t}var jo=!1;if(rl){var mu;if(rl){var hu="oninput"in document;if(!hu){var So=document.createElement("div");So.setAttribute("oninput","return;"),hu=typeof So.oninput=="function"}mu=hu}else mu=!1;jo=mu&&(!document.documentMode||9<document.documentMode)}function No(){Cn&&(Cn.detachEvent("onpropertychange",Eo),Tn=Cn=null)}function Eo(e){if(e.propertyName==="value"&&zs(Tn)){var t=[];bo(t,Tn,e,nu(e)),io(F0,t)}}function W0(e,t,l){e==="focusin"?(No(),Cn=t,Tn=l,Cn.attachEvent("onpropertychange",Eo)):e==="focusout"&&No()}function P0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zs(Tn)}function I0(e,t){if(e==="click")return zs(t)}function ex(e,t){if(e==="input"||e==="change")return zs(t)}function tx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:tx;function Rn(e,t){if(Mt(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(!vt.call(t,n)||!Mt(e[n],t[n]))return!1}return!0}function wo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Co(e,t){var l=wo(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=wo(l)}}function To(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?To(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ro(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Cs(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=Cs(e.document)}return t}function xu(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 lx=rl&&"documentMode"in document&&11>=document.documentMode,za=null,vu=null,Mn=null,pu=!1;function Mo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;pu||za==null||za!==Cs(a)||(a=za,"selectionStart"in a&&xu(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}),Mn&&Rn(Mn,a)||(Mn=a,a=ji(vu,"onSelect"),0<a.length&&(t=new _s("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=za)))}function ia(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Oa={animationend:ia("Animation","AnimationEnd"),animationiteration:ia("Animation","AnimationIteration"),animationstart:ia("Animation","AnimationStart"),transitionrun:ia("Transition","TransitionRun"),transitionstart:ia("Transition","TransitionStart"),transitioncancel:ia("Transition","TransitionCancel"),transitionend:ia("Transition","TransitionEnd")},gu={},Ao={};rl&&(Ao=document.createElement("div").style,"AnimationEvent"in window||(delete Oa.animationend.animation,delete Oa.animationiteration.animation,delete Oa.animationstart.animation),"TransitionEvent"in window||delete Oa.transitionend.transition);function ua(e){if(gu[e])return gu[e];if(!Oa[e])return e;var t=Oa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Ao)return gu[e]=t[l];return e}var _o=ua("animationend"),Do=ua("animationiteration"),zo=ua("animationstart"),ax=ua("transitionrun"),nx=ua("transitionstart"),sx=ua("transitioncancel"),Oo=ua("transitionend"),Uo=new Map,bu="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(" ");bu.push("scrollEnd");function Wt(e,t){Uo.set(e,t),na(t,[e])}var Os=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Gt=[],Ua=0,yu=0;function Us(){for(var e=Ua,t=yu=Ua=0;t<e;){var l=Gt[t];Gt[t++]=null;var a=Gt[t];Gt[t++]=null;var n=Gt[t];Gt[t++]=null;var i=Gt[t];if(Gt[t++]=null,a!==null&&n!==null){var o=a.pending;o===null?n.next=n:(n.next=o.next,o.next=n),a.pending=n}i!==0&&qo(l,n,i)}}function qs(e,t,l,a){Gt[Ua++]=e,Gt[Ua++]=t,Gt[Ua++]=l,Gt[Ua++]=a,yu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ju(e,t,l,a){return qs(e,t,l,a),Bs(e)}function ca(e,t){return qs(e,null,null,t),Bs(e)}function qo(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-Rt(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function Bs(e){if(50<Wn)throw Wn=0,Ac=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var qa={};function ix(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 At(e,t,l,a){return new ix(e,t,l,a)}function Su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ol(e,t){var l=e.alternate;return l===null?(l=At(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 Bo(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,i){var o=0;if(a=e,typeof e=="function")Su(e)&&(o=1);else if(typeof e=="string")o=dv(e,l,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ue:return e=At(31,l,t,n),e.elementType=ue,e.lanes=i,e;case O:return ra(l.children,n,i,t);case k:o=8,n|=24;break;case E:return e=At(12,l,t,n|2),e.elementType=E,e.lanes=i,e;case U:return e=At(13,l,t,n),e.elementType=U,e.lanes=i,e;case re:return e=At(19,l,t,n),e.elementType=re,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:o=10;break e;case L:o=9;break e;case le:o=11;break e;case F:o=14;break e;case I:o=16,a=null;break e}o=29,l=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=At(o,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function ra(e,t,l,a){return e=At(7,e,a,t),e.lanes=l,e}function Nu(e,t,l){return e=At(6,e,null,t),e.lanes=l,e}function Ho(e){var t=At(18,null,null,0);return t.stateNode=e,t}function Eu(e,t,l){return t=At(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Lo=new WeakMap;function Qt(e,t){if(typeof e=="object"&&e!==null){var l=Lo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:ct(t)},Lo.set(e,t),t)}return{value:e,source:t,stack:ct(t)}}var Ba=[],Ha=0,Ls=null,An=0,Xt=[],Vt=0,zl=null,ll=1,al="";function dl(e,t){Ba[Ha++]=An,Ba[Ha++]=Ls,Ls=e,An=t}function ko(e,t,l){Xt[Vt++]=ll,Xt[Vt++]=al,Xt[Vt++]=zl,zl=e;var a=ll;e=al;var n=32-Rt(a)-1;a&=~(1<<n),l+=1;var i=32-Rt(t)+n;if(30<i){var o=n-n%5;i=(a&(1<<o)-1).toString(32),a>>=o,n-=o,ll=1<<32-Rt(t)+n|l<<n|a,al=i+e}else ll=1<<i|l<<n|a,al=e}function wu(e){e.return!==null&&(dl(e,1),ko(e,1,0))}function Cu(e){for(;e===Ls;)Ls=Ba[--Ha],Ba[Ha]=null,An=Ba[--Ha],Ba[Ha]=null;for(;e===zl;)zl=Xt[--Vt],Xt[Vt]=null,al=Xt[--Vt],Xt[Vt]=null,ll=Xt[--Vt],Xt[Vt]=null}function Yo(e,t){Xt[Vt++]=ll,Xt[Vt++]=al,Xt[Vt++]=zl,ll=t.id,al=t.overflow,zl=e}var ot=null,Qe=null,Ee=!1,Ol=null,Zt=!1,Tu=Error(c(519));function Ul(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _n(Qt(t,e)),Tu}function Go(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[rt]=e,t[gt]=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<In.length;l++)pe(In[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),eo(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),lo(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||im(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=cl),t=!0):t=!1,t||Ul(e,!0)}function Qo(e){for(ot=e.return;ot;)switch(ot.tag){case 5:case 31:case 13:Zt=!1;return;case 27:case 3:Zt=!0;return;default:ot=ot.return}}function La(e){if(e!==ot)return!1;if(!Ee)return Qo(e),Ee=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Vc(e.type,e.memoizedProps)),l=!l),l&&Qe&&Ul(e),Qo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Qe=xm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Qe=xm(e)}else t===27?(t=Qe,Jl(e.type)?(e=Fc,Fc=null,Qe=e):Qe=t):Qe=ot?Kt(e.stateNode.nextSibling):null;return!0}function oa(){Qe=ot=null,Ee=!1}function Ru(){var e=Ol;return e!==null&&(Nt===null?Nt=e:Nt.push.apply(Nt,e),Ol=null),e}function _n(e){Ol===null?Ol=[e]:Ol.push(e)}var Mu=N(null),da=null,fl=null;function ql(e,t,l){$(Mu,t._currentValue),t._currentValue=l}function ml(e){e._currentValue=Mu.current,G(Mu)}function Au(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 _u(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var o=n.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=n;for(var j=0;j<t.length;j++)if(h.context===t[j]){i.lanes|=l,h=i.alternate,h!==null&&(h.lanes|=l),Au(i.return,l,e),a||(o=null);break e}i=h.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(c(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),Au(o,l,e),o=null}else o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===e){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function ka(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var o=n.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var h=n.type;Mt(n.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(n===Ne.current){if(o=n.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(ns):e=[ns])}n=n.return}e!==null&&_u(t,e,l,a),t.flags|=262144}function ks(e){for(e=e.firstContext;e!==null;){if(!Mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fa(e){da=e,fl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function dt(e){return Xo(da,e)}function Ys(e,t){return da===null&&fa(e),Xo(e,t)}function Xo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},fl===null){if(e===null)throw Error(c(308));fl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fl=fl.next=t;return l}var ux=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()})}},cx=u.unstable_scheduleCallback,rx=u.unstable_NormalPriority,Ie={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Du(){return{controller:new ux,data:new Map,refCount:0}}function Dn(e){e.refCount--,e.refCount===0&&cx(rx,function(){e.controller.abort()})}var zn=null,zu=0,Ya=0,Ga=null;function ox(e,t){if(zn===null){var l=zn=[];zu=0,Ya=qc(),Ga={status:"pending",value:void 0,then:function(a){l.push(a)}}}return zu++,t.then(Vo,Vo),t}function Vo(){if(--zu===0&&zn!==null){Ga!==null&&(Ga.status="fulfilled");var e=zn;zn=null,Ya=0,Ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function dx(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 Zo=B.S;B.S=function(e,t){Af=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ox(e,t),Zo!==null&&Zo(e,t)};var ma=N(null);function Ou(){var e=ma.current;return e!==null?e:ke.pooledCache}function Gs(e,t){t===null?$(ma,ma.current):$(ma,t.pool)}function $o(){var e=Ou();return e===null?null:{parent:Ie._currentValue,pool:e}}var Qa=Error(c(460)),Uu=Error(c(474)),Qs=Error(c(542)),Xs={then:function(){}};function Ko(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(cl,cl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Wo(e),e;default:if(typeof t.status=="string")t.then(cl,cl);else{if(e=ke,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,Wo(e),e}throw xa=t,Qa}}function ha(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(xa=l,Qa):l}}var xa=null;function Fo(){if(xa===null)throw Error(c(459));var e=xa;return xa=null,e}function Wo(e){if(e===Qa||e===Qs)throw Error(c(483))}var Xa=null,On=0;function Vs(e){var t=On;return On+=1,Xa===null&&(Xa=[]),Jo(Xa,e,t)}function Un(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zs(e,t){throw t.$$typeof===R?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Po(e){function t(C,S){if(e){var M=C.deletions;M===null?(C.deletions=[S],C.flags|=16):M.push(S)}}function l(C,S){if(!e)return null;for(;S!==null;)t(C,S),S=S.sibling;return null}function a(C){for(var S=new Map;C!==null;)C.key!==null?S.set(C.key,C):S.set(C.index,C),C=C.sibling;return S}function n(C,S){return C=ol(C,S),C.index=0,C.sibling=null,C}function i(C,S,M){return C.index=M,e?(M=C.alternate,M!==null?(M=M.index,M<S?(C.flags|=67108866,S):M):(C.flags|=67108866,S)):(C.flags|=1048576,S)}function o(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function h(C,S,M,Q){return S===null||S.tag!==6?(S=Nu(M,C.mode,Q),S.return=C,S):(S=n(S,M),S.return=C,S)}function j(C,S,M,Q){var se=M.type;return se===O?H(C,S,M.props.children,Q,M.key):S!==null&&(S.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===I&&ha(se)===S.type)?(S=n(S,M.props),Un(S,M),S.return=C,S):(S=Hs(M.type,M.key,M.props,null,C.mode,Q),Un(S,M),S.return=C,S)}function A(C,S,M,Q){return S===null||S.tag!==4||S.stateNode.containerInfo!==M.containerInfo||S.stateNode.implementation!==M.implementation?(S=Eu(M,C.mode,Q),S.return=C,S):(S=n(S,M.children||[]),S.return=C,S)}function H(C,S,M,Q,se){return S===null||S.tag!==7?(S=ra(M,C.mode,Q,se),S.return=C,S):(S=n(S,M),S.return=C,S)}function X(C,S,M){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Nu(""+S,C.mode,M),S.return=C,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case q:return M=Hs(S.type,S.key,S.props,null,C.mode,M),Un(M,S),M.return=C,M;case z:return S=Eu(S,C.mode,M),S.return=C,S;case I:return S=ha(S),X(C,S,M)}if(We(S)||ye(S))return S=ra(S,C.mode,M,null),S.return=C,S;if(typeof S.then=="function")return X(C,Vs(S),M);if(S.$$typeof===Y)return X(C,Ys(C,S),M);Zs(C,S)}return null}function _(C,S,M,Q){var se=S!==null?S.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return se!==null?null:h(C,S,""+M,Q);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case q:return M.key===se?j(C,S,M,Q):null;case z:return M.key===se?A(C,S,M,Q):null;case I:return M=ha(M),_(C,S,M,Q)}if(We(M)||ye(M))return se!==null?null:H(C,S,M,Q,null);if(typeof M.then=="function")return _(C,S,Vs(M),Q);if(M.$$typeof===Y)return _(C,S,Ys(C,M),Q);Zs(C,M)}return null}function D(C,S,M,Q,se){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return C=C.get(M)||null,h(S,C,""+Q,se);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case q:return C=C.get(Q.key===null?M:Q.key)||null,j(S,C,Q,se);case z:return C=C.get(Q.key===null?M:Q.key)||null,A(S,C,Q,se);case I:return Q=ha(Q),D(C,S,M,Q,se)}if(We(Q)||ye(Q))return C=C.get(M)||null,H(S,C,Q,se,null);if(typeof Q.then=="function")return D(C,S,M,Vs(Q),se);if(Q.$$typeof===Y)return D(C,S,M,Ys(S,Q),se);Zs(S,Q)}return null}function P(C,S,M,Q){for(var se=null,Me=null,te=S,xe=S=0,Se=null;te!==null&&xe<M.length;xe++){te.index>xe?(Se=te,te=null):Se=te.sibling;var Ae=_(C,te,M[xe],Q);if(Ae===null){te===null&&(te=Se);break}e&&te&&Ae.alternate===null&&t(C,te),S=i(Ae,S,xe),Me===null?se=Ae:Me.sibling=Ae,Me=Ae,te=Se}if(xe===M.length)return l(C,te),Ee&&dl(C,xe),se;if(te===null){for(;xe<M.length;xe++)te=X(C,M[xe],Q),te!==null&&(S=i(te,S,xe),Me===null?se=te:Me.sibling=te,Me=te);return Ee&&dl(C,xe),se}for(te=a(te);xe<M.length;xe++)Se=D(te,C,xe,M[xe],Q),Se!==null&&(e&&Se.alternate!==null&&te.delete(Se.key===null?xe:Se.key),S=i(Se,S,xe),Me===null?se=Se:Me.sibling=Se,Me=Se);return e&&te.forEach(function(ea){return t(C,ea)}),Ee&&dl(C,xe),se}function ie(C,S,M,Q){if(M==null)throw Error(c(151));for(var se=null,Me=null,te=S,xe=S=0,Se=null,Ae=M.next();te!==null&&!Ae.done;xe++,Ae=M.next()){te.index>xe?(Se=te,te=null):Se=te.sibling;var ea=_(C,te,Ae.value,Q);if(ea===null){te===null&&(te=Se);break}e&&te&&ea.alternate===null&&t(C,te),S=i(ea,S,xe),Me===null?se=ea:Me.sibling=ea,Me=ea,te=Se}if(Ae.done)return l(C,te),Ee&&dl(C,xe),se;if(te===null){for(;!Ae.done;xe++,Ae=M.next())Ae=X(C,Ae.value,Q),Ae!==null&&(S=i(Ae,S,xe),Me===null?se=Ae:Me.sibling=Ae,Me=Ae);return Ee&&dl(C,xe),se}for(te=a(te);!Ae.done;xe++,Ae=M.next())Ae=D(te,C,xe,Ae.value,Q),Ae!==null&&(e&&Ae.alternate!==null&&te.delete(Ae.key===null?xe:Ae.key),S=i(Ae,S,xe),Me===null?se=Ae:Me.sibling=Ae,Me=Ae);return e&&te.forEach(function(Sv){return t(C,Sv)}),Ee&&dl(C,xe),se}function He(C,S,M,Q){if(typeof M=="object"&&M!==null&&M.type===O&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case q:e:{for(var se=M.key;S!==null;){if(S.key===se){if(se=M.type,se===O){if(S.tag===7){l(C,S.sibling),Q=n(S,M.props.children),Q.return=C,C=Q;break e}}else if(S.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===I&&ha(se)===S.type){l(C,S.sibling),Q=n(S,M.props),Un(Q,M),Q.return=C,C=Q;break e}l(C,S);break}else t(C,S);S=S.sibling}M.type===O?(Q=ra(M.props.children,C.mode,Q,M.key),Q.return=C,C=Q):(Q=Hs(M.type,M.key,M.props,null,C.mode,Q),Un(Q,M),Q.return=C,C=Q)}return o(C);case z:e:{for(se=M.key;S!==null;){if(S.key===se)if(S.tag===4&&S.stateNode.containerInfo===M.containerInfo&&S.stateNode.implementation===M.implementation){l(C,S.sibling),Q=n(S,M.children||[]),Q.return=C,C=Q;break e}else{l(C,S);break}else t(C,S);S=S.sibling}Q=Eu(M,C.mode,Q),Q.return=C,C=Q}return o(C);case I:return M=ha(M),He(C,S,M,Q)}if(We(M))return P(C,S,M,Q);if(ye(M)){if(se=ye(M),typeof se!="function")throw Error(c(150));return M=se.call(M),ie(C,S,M,Q)}if(typeof M.then=="function")return He(C,S,Vs(M),Q);if(M.$$typeof===Y)return He(C,S,Ys(C,M),Q);Zs(C,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,S!==null&&S.tag===6?(l(C,S.sibling),Q=n(S,M),Q.return=C,C=Q):(l(C,S),Q=Nu(M,C.mode,Q),Q.return=C,C=Q),o(C)):l(C,S)}return function(C,S,M,Q){try{On=0;var se=He(C,S,M,Q);return Xa=null,se}catch(te){if(te===Qa||te===Qs)throw te;var Me=At(29,te,null,C.mode);return Me.lanes=Q,Me.return=C,Me}finally{}}}var va=Po(!0),Io=Po(!1),Bl=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bu(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 Hl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ll(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(De&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Bs(e),qo(e,null,l),t}return qs(e,a,t,l),Bs(e)}function qn(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,Qr(e,l)}}function Hu(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,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 Lu=!1;function Bn(){if(Lu){var e=Ga;if(e!==null)throw e}}function Hn(e,t,l,a){Lu=!1;var n=e.updateQueue;Bl=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var j=h,A=j.next;j.next=null,o===null?i=A:o.next=A,o=j;var H=e.alternate;H!==null&&(H=H.updateQueue,h=H.lastBaseUpdate,h!==o&&(h===null?H.firstBaseUpdate=A:h.next=A,H.lastBaseUpdate=j))}if(i!==null){var X=n.baseState;o=0,H=A=j=null,h=i;do{var _=h.lane&-536870913,D=_!==h.lane;if(D?(je&_)===_:(a&_)===_){_!==0&&_===Ya&&(Lu=!0),H!==null&&(H=H.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var P=e,ie=h;_=t;var He=l;switch(ie.tag){case 1:if(P=ie.payload,typeof P=="function"){X=P.call(He,X,_);break e}X=P;break e;case 3:P.flags=P.flags&-65537|128;case 0:if(P=ie.payload,_=typeof P=="function"?P.call(He,X,_):P,_==null)break e;X=y({},X,_);break e;case 2:Bl=!0}}_=h.callback,_!==null&&(e.flags|=64,D&&(e.flags|=8192),D=n.callbacks,D===null?n.callbacks=[_]:D.push(_))}else D={lane:_,tag:h.tag,payload:h.payload,callback:h.callback,next:null},H===null?(A=H=D,j=X):H=H.next=D,o|=_;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;D=h,h=D.next,D.next=null,n.lastBaseUpdate=D,n.shared.pending=null}}while(!0);H===null&&(j=X),n.baseState=j,n.firstBaseUpdate=A,n.lastBaseUpdate=H,i===null&&(n.shared.lanes=0),Xl|=o,e.lanes=o,e.memoizedState=X}}function ed(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function td(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ed(l[e],t)}var Va=N(null),$s=N(0);function ld(e,t){e=Sl,$($s,e),$(Va,t),Sl=e|t.baseLanes}function ku(){$($s,Sl),$(Va,Va.current)}function Yu(){Sl=$s.current,G(Va),G($s)}var _t=N(null),$t=null;function kl(e){var t=e.alternate;$(Je,Je.current&1),$(_t,e),$t===null&&(t===null||Va.current!==null||t.memoizedState!==null)&&($t=e)}function Gu(e){$(Je,Je.current),$(_t,e),$t===null&&($t=e)}function ad(e){e.tag===22?($(Je,Je.current),$(_t,e),$t===null&&($t=e)):Yl()}function Yl(){$(Je,Je.current),$(_t,_t.current)}function Dt(e){G(_t),$t===e&&($t=null),G(Je)}var Je=N(0);function Ks(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Kc(l)||Jc(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 hl=0,he=null,qe=null,et=null,Js=!1,Za=!1,pa=!1,Fs=0,Ln=0,$a=null,fx=0;function $e(){throw Error(c(321))}function Qu(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Mt(e[l],t[l]))return!1;return!0}function Xu(e,t,l,a,n,i){return hl=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?kd:sc,pa=!1,i=l(a,n),pa=!1,Za&&(i=sd(t,l,a,n)),nd(e),i}function nd(e){B.H=Gn;var t=qe!==null&&qe.next!==null;if(hl=0,et=qe=he=null,Js=!1,Ln=0,$a=null,t)throw Error(c(300));e===null||tt||(e=e.dependencies,e!==null&&ks(e)&&(tt=!0))}function sd(e,t,l,a){he=e;var n=0;do{if(Za&&($a=null),Ln=0,Za=!1,25<=n)throw Error(c(301));if(n+=1,et=qe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}B.H=Yd,i=t(l,a)}while(Za);return i}function mx(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?kn(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(he.flags|=1024),t}function Vu(){var e=Fs!==0;return Fs=0,e}function Zu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function $u(e){if(Js){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Js=!1}hl=0,et=qe=he=null,Za=!1,Ln=Fs=0,$a=null}function pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?he.memoizedState=et=e:et=et.next=e,et}function Fe(){if(qe===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=et===null?he.memoizedState:et.next;if(t!==null)et=t,qe=e;else{if(e===null)throw he.alternate===null?Error(c(467)):Error(c(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},et===null?he.memoizedState=et=e:et=et.next=e}return et}function Ws(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kn(e){var t=Ln;return Ln+=1,$a===null&&($a=[]),e=Jo($a,e,t),t=he,(et===null?t.memoizedState:et.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?kd:sc),e}function Ps(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kn(e);if(e.$$typeof===Y)return dt(e)}throw Error(c(438,String(e)))}function Ku(e){var t=null,l=he.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=he.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=Ws(),he.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]=Z;return t.index++,l}function xl(e,t){return typeof t=="function"?t(e):t}function Is(e){var t=Fe();return Ju(t,qe,e)}function Ju(e,t,l){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var o=n.next;n.next=i.next,i.next=o}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var h=o=null,j=null,A=t,H=!1;do{var X=A.lane&-536870913;if(X!==A.lane?(je&X)===X:(hl&X)===X){var _=A.revertLane;if(_===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),X===Ya&&(H=!0);else if((hl&_)===_){A=A.next,_===Ya&&(H=!0);continue}else X={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(h=j=X,o=i):j=j.next=X,he.lanes|=_,Xl|=_;X=A.action,pa&&l(i,X),i=A.hasEagerState?A.eagerState:l(i,X)}else _={lane:X,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(h=j=_,o=i):j=j.next=_,he.lanes|=X,Xl|=X;A=A.next}while(A!==null&&A!==t);if(j===null?o=i:j.next=h,!Mt(i,e.memoizedState)&&(tt=!0,H&&(l=Ga,l!==null)))throw l;e.memoizedState=i,e.baseState=o,e.baseQueue=j,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Fu(e){var t=Fe(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var o=n=n.next;do i=e(i,o.action),o=o.next;while(o!==n);Mt(i,t.memoizedState)||(tt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function id(e,t,l){var a=he,n=Fe(),i=Ee;if(i){if(l===void 0)throw Error(c(407));l=l()}else l=t();var o=!Mt((qe||n).memoizedState,l);if(o&&(n.memoizedState=l,tt=!0),n=n.queue,Iu(rd.bind(null,a,n,e),[e]),n.getSnapshot!==t||o||et!==null&&et.memoizedState.tag&1){if(a.flags|=2048,Ka(9,{destroy:void 0},cd.bind(null,a,n,l,t),null),ke===null)throw Error(c(349));i||(hl&127)!==0||ud(a,t,l)}return l}function ud(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=he.updateQueue,t===null?(t=Ws(),he.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function cd(e,t,l,a){t.value=l,t.getSnapshot=a,od(t)&&dd(e)}function rd(e,t,l){return l(function(){od(t)&&dd(e)})}function od(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Mt(e,l)}catch{return!0}}function dd(e){var t=ca(e,2);t!==null&&Et(t,e,2)}function Wu(e){var t=pt();if(typeof e=="function"){var l=e;if(e=l(),pa){Al(!0);try{l()}finally{Al(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xl,lastRenderedState:e},t}function fd(e,t,l,a){return e.baseState=l,Ju(e,qe,typeof a=="function"?a:xl)}function hx(e,t,l,a,n){if(li(e))throw Error(c(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};B.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,md(t,i)):(i.next=l.next,t.pending=l.next=i)}}function md(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=B.T,o={};B.T=o;try{var h=l(n,a),j=B.S;j!==null&&j(o,h),hd(e,t,h)}catch(A){Pu(e,t,A)}finally{i!==null&&o.types!==null&&(i.types=o.types),B.T=i}}else try{i=l(n,a),hd(e,t,i)}catch(A){Pu(e,t,A)}}function hd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){xd(e,t,a)},function(a){return Pu(e,t,a)}):xd(e,t,l)}function xd(e,t,l){t.status="fulfilled",t.value=l,vd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,md(e,l)))}function Pu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,vd(t),t=t.next;while(t!==a)}e.action=null}function vd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function pd(e,t){return t}function gd(e,t){if(Ee){var l=ke.formState;if(l!==null){e:{var a=he;if(Ee){if(Qe){t:{for(var n=Qe,i=Zt;n.nodeType!==8;){if(!i){n=null;break t}if(n=Kt(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Qe=Kt(n.nextSibling),a=n.data==="F!";break e}}Ul(a)}a=!1}a&&(t=l[0])}}return l=pt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pd,lastRenderedState:t},l.queue=a,l=Bd.bind(null,he,a),a.dispatch=l,a=Wu(!1),i=nc.bind(null,he,!1,a.queue),a=pt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=hx.bind(null,he,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function bd(e){var t=Fe();return yd(t,qe,e)}function yd(e,t,l){if(t=Ju(e,t,pd)[0],e=Is(xl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=kn(t)}catch(o){throw o===Qa?Qs:o}else a=t;t=Fe();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(he.flags|=2048,Ka(9,{destroy:void 0},xx.bind(null,n,l),null)),[a,i,e]}function xx(e,t){e.action=t}function jd(e){var t=Fe(),l=qe;if(l!==null)return yd(t,l,e);Fe(),t=t.memoizedState,l=Fe();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Ka(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=he.updateQueue,t===null&&(t=Ws(),he.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 Sd(){return Fe().memoizedState}function ei(e,t,l,a){var n=pt();he.flags|=e,n.memoizedState=Ka(1|t,{destroy:void 0},l,a===void 0?null:a)}function ti(e,t,l,a){var n=Fe();a=a===void 0?null:a;var i=n.memoizedState.inst;qe!==null&&a!==null&&Qu(a,qe.memoizedState.deps)?n.memoizedState=Ka(t,i,l,a):(he.flags|=e,n.memoizedState=Ka(1|t,i,l,a))}function Nd(e,t){ei(8390656,8,e,t)}function Iu(e,t){ti(2048,8,e,t)}function vx(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=Ws(),he.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ed(e){var t=Fe().memoizedState;return vx({ref:t,nextImpl:e}),function(){if((De&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function wd(e,t){return ti(4,2,e,t)}function Cd(e,t){return ti(4,4,e,t)}function Td(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 Rd(e,t,l){l=l!=null?l.concat([e]):null,ti(4,4,Td.bind(null,t,e),l)}function ec(){}function Md(e,t){var l=Fe();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Qu(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Ad(e,t){var l=Fe();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Qu(t,a[1]))return a[0];if(a=e(),pa){Al(!0);try{e()}finally{Al(!1)}}return l.memoizedState=[a,t],a}function tc(e,t,l){return l===void 0||(hl&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Df(),he.lanes|=e,Xl|=e,l)}function _d(e,t,l,a){return Mt(l,t)?l:Va.current!==null?(e=tc(e,l,a),Mt(e,t)||(tt=!0),e):(hl&42)===0||(hl&1073741824)!==0&&(je&261930)===0?(tt=!0,e.memoizedState=l):(e=Df(),he.lanes|=e,Xl|=e,t)}function Dd(e,t,l,a,n){var i=K.p;K.p=i!==0&&8>i?i:8;var o=B.T,h={};B.T=h,nc(e,!1,t,l);try{var j=n(),A=B.S;if(A!==null&&A(h,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var H=dx(j,a);Yn(e,t,H,Ut(e))}else Yn(e,t,a,Ut(e))}catch(X){Yn(e,t,{then:function(){},status:"rejected",reason:X},Ut())}finally{K.p=i,o!==null&&h.types!==null&&(o.types=h.types),B.T=o}}function px(){}function lc(e,t,l,a){if(e.tag!==5)throw Error(c(476));var n=zd(e).queue;Dd(e,n,t,ae,l===null?px:function(){return Od(e),l(a)})}function zd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xl,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Od(e){var t=zd(e);t.next===null&&(t=e.alternate.memoizedState),Yn(e,t.next.queue,{},Ut())}function ac(){return dt(ns)}function Ud(){return Fe().memoizedState}function qd(){return Fe().memoizedState}function gx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Ut();e=Hl(l);var a=Ll(t,e,l);a!==null&&(Et(a,t,l),qn(a,t,l)),t={cache:Du()},e.payload=t;return}t=t.return}}function bx(e,t,l){var a=Ut();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},li(e)?Hd(t,l):(l=ju(e,t,l,a),l!==null&&(Et(l,e,a),Ld(l,t,a)))}function Bd(e,t,l){var a=Ut();Yn(e,t,l,a)}function Yn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(li(e))Hd(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,l);if(n.hasEagerState=!0,n.eagerState=h,Mt(h,o))return qs(e,t,n,0),ke===null&&Us(),!1}catch{}finally{}if(l=ju(e,t,n,a),l!==null)return Et(l,e,a),Ld(l,t,a),!0}return!1}function nc(e,t,l,a){if(a={lane:2,revertLane:qc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},li(e)){if(t)throw Error(c(479))}else t=ju(e,l,a,2),t!==null&&Et(t,e,2)}function li(e){var t=e.alternate;return e===he||t!==null&&t===he}function Hd(e,t){Za=Js=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Ld(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Qr(e,l)}}var Gn={readContext:dt,use:Ps,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};Gn.useEffectEvent=$e;var kd={readContext:dt,use:Ps,useCallback:function(e,t){return pt().memoizedState=[e,t===void 0?null:t],e},useContext:dt,useEffect:Nd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ei(4194308,4,Td.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ei(4194308,4,e,t)},useInsertionEffect:function(e,t){ei(4,2,e,t)},useMemo:function(e,t){var l=pt();t=t===void 0?null:t;var a=e();if(pa){Al(!0);try{e()}finally{Al(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=pt();if(l!==void 0){var n=l(t);if(pa){Al(!0);try{l(t)}finally{Al(!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=bx.bind(null,he,e),[a.memoizedState,e]},useRef:function(e){var t=pt();return e={current:e},t.memoizedState=e},useState:function(e){e=Wu(e);var t=e.queue,l=Bd.bind(null,he,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:ec,useDeferredValue:function(e,t){var l=pt();return tc(l,e,t)},useTransition:function(){var e=Wu(!1);return e=Dd.bind(null,he,e.queue,!0,!1),pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=he,n=pt();if(Ee){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),ke===null)throw Error(c(349));(je&127)!==0||ud(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,Nd(rd.bind(null,a,i,e),[e]),a.flags|=2048,Ka(9,{destroy:void 0},cd.bind(null,a,i,l,t),null),l},useId:function(){var e=pt(),t=ke.identifierPrefix;if(Ee){var l=al,a=ll;l=(a&~(1<<32-Rt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Fs++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=fx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ac,useFormState:gd,useActionState:gd,useOptimistic:function(e){var t=pt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=nc.bind(null,he,!0,l),l.dispatch=t,[e,t]},useMemoCache:Ku,useCacheRefresh:function(){return pt().memoizedState=gx.bind(null,he)},useEffectEvent:function(e){var t=pt(),l={impl:e};return t.memoizedState=l,function(){if((De&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},sc={readContext:dt,use:Ps,useCallback:Md,useContext:dt,useEffect:Iu,useImperativeHandle:Rd,useInsertionEffect:wd,useLayoutEffect:Cd,useMemo:Ad,useReducer:Is,useRef:Sd,useState:function(){return Is(xl)},useDebugValue:ec,useDeferredValue:function(e,t){var l=Fe();return _d(l,qe.memoizedState,e,t)},useTransition:function(){var e=Is(xl)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:kn(e),t]},useSyncExternalStore:id,useId:Ud,useHostTransitionStatus:ac,useFormState:bd,useActionState:bd,useOptimistic:function(e,t){var l=Fe();return fd(l,qe,e,t)},useMemoCache:Ku,useCacheRefresh:qd};sc.useEffectEvent=Ed;var Yd={readContext:dt,use:Ps,useCallback:Md,useContext:dt,useEffect:Iu,useImperativeHandle:Rd,useInsertionEffect:wd,useLayoutEffect:Cd,useMemo:Ad,useReducer:Fu,useRef:Sd,useState:function(){return Fu(xl)},useDebugValue:ec,useDeferredValue:function(e,t){var l=Fe();return qe===null?tc(l,e,t):_d(l,qe.memoizedState,e,t)},useTransition:function(){var e=Fu(xl)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:kn(e),t]},useSyncExternalStore:id,useId:Ud,useHostTransitionStatus:ac,useFormState:jd,useActionState:jd,useOptimistic:function(e,t){var l=Fe();return qe!==null?fd(l,qe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Ku,useCacheRefresh:qd};Yd.useEffectEvent=Ed;function ic(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 uc={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Ut(),n=Hl(a);n.payload=t,l!=null&&(n.callback=l),t=Ll(e,n,a),t!==null&&(Et(t,e,a),qn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Ut(),n=Hl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Ll(e,n,a),t!==null&&(Et(t,e,a),qn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Ut(),a=Hl(l);a.tag=2,t!=null&&(a.callback=t),t=Ll(e,a,l),t!==null&&(Et(t,e,l),qn(t,e,l))}};function Gd(e,t,l,a,n,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!Rn(l,a)||!Rn(n,i):!0}function Qd(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&&uc.enqueueReplaceState(t,t.state,null)}function ga(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 Xd(e){Os(e)}function Vd(e){console.error(e)}function Zd(e){Os(e)}function ai(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function $d(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 cc(e,t,l){return l=Hl(l),l.tag=3,l.payload={element:null},l.callback=function(){ai(e,t)},l}function Kd(e){return e=Hl(e),e.tag=3,e}function Jd(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){$d(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){$d(t,l,a),typeof n!="function"&&(Vl===null?Vl=new Set([this]):Vl.add(this));var h=a.stack;this.componentDidCatch(a.value,{componentStack:h!==null?h:""})})}function yx(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&ka(t,l,n,!0),l=_t.current,l!==null){switch(l.tag){case 31:case 13:return $t===null?xi():l.alternate===null&&Ke===0&&(Ke=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Xs?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===Xs?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),xi(),!1}if(Ee)return t=_t.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Tu&&(e=Error(c(422),{cause:a}),_n(Qt(e,l)))):(a!==Tu&&(t=Error(c(423),{cause:a}),_n(Qt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Qt(a,l),n=cc(e.stateNode,a,n),Hu(e,n),Ke!==4&&(Ke=2)),!1;var i=Error(c(520),{cause:a});if(i=Qt(i,l),Fn===null?Fn=[i]:Fn.push(i),Ke!==4&&(Ke=2),t===null)return!0;a=Qt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=cc(l.stateNode,a,e),Hu(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Vl===null||!Vl.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Kd(n),Jd(n,e,l,a),Hu(l,n),!1}l=l.return}while(l!==null);return!1}var rc=Error(c(461)),tt=!1;function ft(e,t,l,a){t.child=e===null?Io(t,null,l,a):va(t,e.child,l,a)}function Fd(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var o={};for(var h in a)h!=="ref"&&(o[h]=a[h])}else o=a;return fa(t),a=Xu(e,t,l,o,i,n),h=Vu(),e!==null&&!tt?(Zu(e,t,n),vl(e,t,n)):(Ee&&h&&wu(t),t.flags|=1,ft(e,t,a,n),t.child)}function Wd(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!Su(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Pd(e,t,i,a,n)):(e=Hs(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!pc(e,n)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:Rn,l(o,a)&&e.ref===t.ref)return vl(e,t,n)}return t.flags|=1,e=ol(i,a),e.ref=t.ref,e.return=t,t.child=e}function Pd(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(Rn(i,a)&&e.ref===t.ref)if(tt=!1,t.pendingProps=a=i,pc(e,n))(e.flags&131072)!==0&&(tt=!0);else return t.lanes=e.lanes,vl(e,t,n)}return oc(e,t,l,a,n)}function Id(e,t,l,a){var n=a.children,i=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(i=i!==null?i.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&~i}else a=0,t.child=null;return ef(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gs(t,i!==null?i.cachePool:null),i!==null?ld(t,i):ku(),ad(t);else return a=t.lanes=536870912,ef(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(Gs(t,i.cachePool),ld(t,i),Yl(),t.memoizedState=null):(e!==null&&Gs(t,null),ku(),Yl());return ft(e,t,n,l),t.child}function Qn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ef(e,t,l,a,n){var i=Ou();return i=i===null?null:{parent:Ie._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&Gs(t,null),ku(),ad(t),e!==null&&ka(e,t,a,!0),t.childLanes=n,null}function ni(e,t){return t=ii({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function tf(e,t,l){return va(t,e.child,null,l),e=ni(t,t.pendingProps),e.flags|=2,Dt(t),t.memoizedState=null,e}function jx(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ee){if(a.mode==="hidden")return e=ni(t,a),t.lanes=536870912,Qn(null,e);if(Gu(t),(e=Qe)?(e=hm(e,Zt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zl!==null?{id:ll,overflow:al}:null,retryLane:536870912,hydrationErrors:null},l=Ho(e),l.return=t,t.child=l,ot=t,Qe=null)):e=null,e===null)throw Ul(t);return t.lanes=536870912,null}return ni(t,a)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Gu(t),n)if(t.flags&256)t.flags&=-257,t=tf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(tt||ka(e,t,l,!1),n=(l&e.childLanes)!==0,tt||n){if(a=ke,a!==null&&(o=Xr(a,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,ca(e,o),Et(a,e,o),rc;xi(),t=tf(e,t,l)}else e=i.treeContext,Qe=Kt(o.nextSibling),ot=t,Ee=!0,Ol=null,Zt=!1,e!==null&&Yo(t,e),t=ni(t,a),t.flags|=4096;return t}return e=ol(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function si(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 oc(e,t,l,a,n){return fa(t),l=Xu(e,t,l,a,void 0,n),a=Vu(),e!==null&&!tt?(Zu(e,t,n),vl(e,t,n)):(Ee&&a&&wu(t),t.flags|=1,ft(e,t,l,n),t.child)}function lf(e,t,l,a,n,i){return fa(t),t.updateQueue=null,l=sd(t,a,l,n),nd(e),a=Vu(),e!==null&&!tt?(Zu(e,t,i),vl(e,t,i)):(Ee&&a&&wu(t),t.flags|=1,ft(e,t,l,i),t.child)}function af(e,t,l,a,n){if(fa(t),t.stateNode===null){var i=qa,o=l.contextType;typeof o=="object"&&o!==null&&(i=dt(o)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=uc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},qu(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?dt(o):qa,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(ic(t,l,o,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&uc.enqueueReplaceState(i,i.state,null),Hn(t,a,i,n),Bn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,j=ga(l,h);i.props=j;var A=i.context,H=l.contextType;o=qa,typeof H=="object"&&H!==null&&(o=dt(H));var X=l.getDerivedStateFromProps;H=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||A!==o)&&Qd(t,i,a,o),Bl=!1;var _=t.memoizedState;i.state=_,Hn(t,a,i,n),Bn(),A=t.memoizedState,h||_!==A||Bl?(typeof X=="function"&&(ic(t,l,X,a),A=t.memoizedState),(j=Bl||Gd(t,l,j,a,_,A,o))?(H||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=A),i.props=a,i.state=A,i.context=o,a=j):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Bu(e,t),o=t.memoizedProps,H=ga(l,o),i.props=H,X=t.pendingProps,_=i.context,A=l.contextType,j=qa,typeof A=="object"&&A!==null&&(j=dt(A)),h=l.getDerivedStateFromProps,(A=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==X||_!==j)&&Qd(t,i,a,j),Bl=!1,_=t.memoizedState,i.state=_,Hn(t,a,i,n),Bn();var D=t.memoizedState;o!==X||_!==D||Bl||e!==null&&e.dependencies!==null&&ks(e.dependencies)?(typeof h=="function"&&(ic(t,l,h,a),D=t.memoizedState),(H=Bl||Gd(t,l,H,a,_,D,j)||e!==null&&e.dependencies!==null&&ks(e.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,D,j),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,D,j)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=D),i.props=a,i.state=D,i.context=j,a=H):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,si(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=va(t,e.child,null,n),t.child=va(t,null,l,n)):ft(e,t,l,n),t.memoizedState=i.state,e=t.child):e=vl(e,t,n),e}function nf(e,t,l,a){return oa(),t.flags|=256,ft(e,t,l,a),t.child}var dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fc(e){return{baseLanes:e,cachePool:$o()}}function mc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ot),e}function sf(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(Je.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ee){if(n?kl(t):Yl(),(e=Qe)?(e=hm(e,Zt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zl!==null?{id:ll,overflow:al}:null,retryLane:536870912,hydrationErrors:null},l=Ho(e),l.return=t,t.child=l,ot=t,Qe=null)):e=null,e===null)throw Ul(t);return Jc(e)?t.lanes=32:t.lanes=536870912,null}var h=a.children;return a=a.fallback,n?(Yl(),n=t.mode,h=ii({mode:"hidden",children:h},n),a=ra(a,n,l,null),h.return=t,a.return=t,h.sibling=a,t.child=h,a=t.child,a.memoizedState=fc(l),a.childLanes=mc(e,o,l),t.memoizedState=dc,Qn(null,a)):(kl(t),hc(t,h))}var j=e.memoizedState;if(j!==null&&(h=j.dehydrated,h!==null)){if(i)t.flags&256?(kl(t),t.flags&=-257,t=xc(e,t,l)):t.memoizedState!==null?(Yl(),t.child=e.child,t.flags|=128,t=null):(Yl(),h=a.fallback,n=t.mode,a=ii({mode:"visible",children:a.children},n),h=ra(h,n,l,null),h.flags|=2,a.return=t,h.return=t,a.sibling=h,t.child=a,va(t,e.child,null,l),a=t.child,a.memoizedState=fc(l),a.childLanes=mc(e,o,l),t.memoizedState=dc,t=Qn(null,a));else if(kl(t),Jc(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var A=o.dgst;o=A,a=Error(c(419)),a.stack="",a.digest=o,_n({value:a,source:null,stack:null}),t=xc(e,t,l)}else if(tt||ka(e,t,l,!1),o=(l&e.childLanes)!==0,tt||o){if(o=ke,o!==null&&(a=Xr(o,l),a!==0&&a!==j.retryLane))throw j.retryLane=a,ca(e,a),Et(o,e,a),rc;Kc(h)||xi(),t=xc(e,t,l)}else Kc(h)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Qe=Kt(h.nextSibling),ot=t,Ee=!0,Ol=null,Zt=!1,e!==null&&Yo(t,e),t=hc(t,a.children),t.flags|=4096);return t}return n?(Yl(),h=a.fallback,n=t.mode,j=e.child,A=j.sibling,a=ol(j,{mode:"hidden",children:a.children}),a.subtreeFlags=j.subtreeFlags&65011712,A!==null?h=ol(A,h):(h=ra(h,n,l,null),h.flags|=2),h.return=t,a.return=t,a.sibling=h,t.child=a,Qn(null,a),a=t.child,h=e.child.memoizedState,h===null?h=fc(l):(n=h.cachePool,n!==null?(j=Ie._currentValue,n=n.parent!==j?{parent:j,pool:j}:n):n=$o(),h={baseLanes:h.baseLanes|l,cachePool:n}),a.memoizedState=h,a.childLanes=mc(e,o,l),t.memoizedState=dc,Qn(e.child,a)):(kl(t),l=e.child,e=l.sibling,l=ol(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=l,t.memoizedState=null,l)}function hc(e,t){return t=ii({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ii(e,t){return e=At(22,e,null,t),e.lanes=0,e}function xc(e,t,l){return va(t,e.child,null,l),e=hc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Au(e.return,t,l)}function vc(e,t,l,a,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=l,o.tailMode=n,o.treeForkCount=i)}function cf(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var o=Je.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,$(Je,o),ft(e,t,a,l),a=Ee?An:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uf(e,l,t);else if(e.tag===19)uf(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&&Ks(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),vc(t,!1,n,l,i,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&&Ks(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}vc(t,!0,l,null,i,a);break;case"together":vc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function vl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ka(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=ol(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=ol(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ks(e)))}function Sx(e,t,l){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),ql(t,Ie,e.memoizedState.cache),oa();break;case 27:case 5:tl(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:ql(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Gu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(kl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?sf(e,t,l):(kl(t),e=vl(e,t,l),e!==null?e.sibling:null);kl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(ka(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return cf(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),$(Je,Je.current),a)break;return null;case 22:return t.lanes=0,Id(e,t,l,t.pendingProps);case 24:ql(t,Ie,e.memoizedState.cache)}return vl(e,t,l)}function rf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)tt=!0;else{if(!pc(e,l)&&(t.flags&128)===0)return tt=!1,Sx(e,t,l);tt=(e.flags&131072)!==0}else tt=!1,Ee&&(t.flags&1048576)!==0&&ko(t,An,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ha(t.elementType),t.type=e,typeof e=="function")Su(e)?(a=ga(e,a),t.tag=1,t=af(null,t,e,a,l)):(t.tag=0,t=oc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===le){t.tag=11,t=Fd(null,t,e,a,l);break e}else if(n===F){t.tag=14,t=Wd(null,t,e,a,l);break e}}throw t=J(e)||e,Error(c(306,t,""))}}return t;case 0:return oc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=ga(a,t.pendingProps),af(e,t,a,n,l);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,Bu(e,t),Hn(t,a,null,l);var o=t.memoizedState;if(a=o.cache,ql(t,Ie,a),a!==i.cache&&_u(t,[Ie],l,!0),Bn(),a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=nf(e,t,a,l);break e}else if(a!==n){n=Qt(Error(c(424)),t),_n(n),t=nf(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(Qe=Kt(e.firstChild),ot=t,Ee=!0,Ol=null,Zt=!0,l=Io(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(oa(),a===n){t=vl(e,t,l);break e}ft(e,t,a,l)}t=t.child}return t;case 26:return si(e,t),e===null?(l=ym(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ee||(l=t.type,e=t.pendingProps,a=Si(me.current).createElement(l),a[rt]=t,a[gt]=e,mt(a,l,e),it(a),t.stateNode=a):t.memoizedState=ym(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return tl(t),e===null&&Ee&&(a=t.stateNode=pm(t.type,t.pendingProps,me.current),ot=t,Zt=!0,n=Qe,Jl(t.type)?(Fc=n,Qe=Kt(a.firstChild)):Qe=n),ft(e,t,t.pendingProps.children,l),si(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ee&&((n=a=Qe)&&(a=Px(a,t.type,t.pendingProps,Zt),a!==null?(t.stateNode=a,ot=t,Qe=Kt(a.firstChild),Zt=!1,n=!0):n=!1),n||Ul(t)),tl(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Vc(n,i)?a=null:o!==null&&Vc(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=Xu(e,t,mx,null,null,l),ns._currentValue=n),si(e,t),ft(e,t,a,l),t.child;case 6:return e===null&&Ee&&((e=l=Qe)&&(l=Ix(l,t.pendingProps,Zt),l!==null?(t.stateNode=l,ot=t,Qe=null,e=!0):e=!1),e||Ul(t)),null;case 13:return sf(e,t,l);case 4:return Pe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=va(t,null,a,l):ft(e,t,a,l),t.child;case 11:return Fd(e,t,t.type,t.pendingProps,l);case 7:return ft(e,t,t.pendingProps,l),t.child;case 8:return ft(e,t,t.pendingProps.children,l),t.child;case 12:return ft(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,ql(t,t.type,a.value),ft(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,fa(t),n=dt(n),a=a(n),t.flags|=1,ft(e,t,a,l),t.child;case 14:return Wd(e,t,t.type,t.pendingProps,l);case 15:return Pd(e,t,t.type,t.pendingProps,l);case 19:return cf(e,t,l);case 31:return jx(e,t,l);case 22:return Id(e,t,l,t.pendingProps);case 24:return fa(t),a=dt(Ie),e===null?(n=Ou(),n===null&&(n=ke,i=Du(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},qu(t),ql(t,Ie,n)):((e.lanes&l)!==0&&(Bu(e,t),Hn(t,null,null,l),Bn()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),ql(t,Ie,a)):(a=i.cache,ql(t,Ie,a),a!==n.cache&&_u(t,[Ie],l,!0))),ft(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function pl(e){e.flags|=4}function gc(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(qf())e.flags|=8192;else throw xa=Xs,Uu}else e.flags&=-16777217}function of(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wm(t))if(qf())e.flags|=8192;else throw xa=Xs,Uu}function ui(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Yr():536870912,e.lanes|=t,Pa|=t)}function Xn(e,t){if(!Ee)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 Xe(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 Nx(e,t,l){var a=t.pendingProps;switch(Cu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ml(Ie),Ge(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(La(t)?pl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ru())),Xe(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(pl(t),i!==null?(Xe(t),of(t,i)):(Xe(t),gc(t,n,null,a,l))):i?i!==e.memoizedState?(pl(t),Xe(t),of(t,i)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&pl(t),Xe(t),gc(t,n,e,a,l)),null;case 27:if(T(t),l=me.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&pl(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Xe(t),null}e=W.current,La(t)?Go(t):(e=pm(n,a,l),t.stateNode=e,pl(t))}return Xe(t),null;case 5:if(T(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&pl(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Xe(t),null}if(i=W.current,La(t))Go(t);else{var o=Si(me.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?o.createElement(n,{is:a.is}):o.createElement(n)}}i[rt]=t,i[gt]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(mt(i,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&&pl(t)}}return Xe(t),gc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&pl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=me.current,La(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=ot,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[rt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||im(e.nodeValue,l)),e||Ul(t,!0)}else e=Si(e).createTextNode(a),e[rt]=t,t.stateNode=e}return Xe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=La(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[rt]=t}else oa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else l=Ru(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Dt(t),t):(Dt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Xe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=La(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[rt]=t}else oa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),n=!1}else n=Ru(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Dt(t),t):(Dt(t),null)}return Dt(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),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ui(t,t.updateQueue),Xe(t),null);case 4:return Ge(),e===null&&kc(t.stateNode.containerInfo),Xe(t),null;case 10:return ml(t.type),Xe(t),null;case 19:if(G(Je),a=t.memoizedState,a===null)return Xe(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)Xn(a,!1);else{if(Ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ks(e),i!==null){for(t.flags|=128,Xn(a,!1),e=i.updateQueue,t.updateQueue=e,ui(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Bo(l,e),l=l.sibling;return $(Je,Je.current&1|2),Ee&&dl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Ct()>fi&&(t.flags|=128,n=!0,Xn(a,!1),t.lanes=4194304)}else{if(!n)if(e=Ks(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ui(t,e),Xn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Ee)return Xe(t),null}else 2*Ct()-a.renderingStartTime>fi&&l!==536870912&&(t.flags|=128,n=!0,Xn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Ct(),e.sibling=null,l=Je.current,$(Je,n?l&1|2:l&1),Ee&&dl(t,a.treeForkCount),e):(Xe(t),null);case 22:case 23:return Dt(t),Yu(),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&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),l=t.updateQueue,l!==null&&ui(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&&G(ma),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ml(Ie),Xe(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Ex(e,t){switch(Cu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ml(Ie),Ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return T(t),null;case 31:if(t.memoizedState!==null){if(Dt(t),t.alternate===null)throw Error(c(340));oa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Dt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));oa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Je),null;case 4:return Ge(),null;case 10:return ml(t.type),null;case 22:case 23:return Dt(t),Yu(),e!==null&&G(ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ml(Ie),null;case 25:return null;default:return null}}function df(e,t){switch(Cu(t),t.tag){case 3:ml(Ie),Ge();break;case 26:case 27:case 5:T(t);break;case 4:Ge();break;case 31:t.memoizedState!==null&&Dt(t);break;case 13:Dt(t);break;case 19:G(Je);break;case 10:ml(t.type);break;case 22:case 23:Dt(t),Yu(),e!==null&&G(ma);break;case 24:ml(Ie)}}function Vn(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 i=l.create,o=l.inst;a=i(),o.destroy=a}l=l.next}while(l!==n)}}catch(h){Ue(t,t.return,h)}}function Gl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var o=a.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,n=t;var j=l,A=h;try{A()}catch(H){Ue(n,j,H)}}}a=a.next}while(a!==i)}}catch(H){Ue(t,t.return,H)}}function ff(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{td(t,l)}catch(a){Ue(e,e.return,a)}}}function mf(e,t,l){l.props=ga(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ue(e,t,a)}}function Zn(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){Ue(e,t,n)}}function nl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ue(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){Ue(e,t,n)}else l.current=null}function hf(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){Ue(e,e.return,n)}}function bc(e,t,l){try{var a=e.stateNode;Zx(a,e.type,l,t),a[gt]=t}catch(n){Ue(e,e.return,n)}}function xf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Jl(e.type)||e.tag===4}function yc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xf(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&&Jl(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 jc(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=cl));else if(a!==4&&(a===27&&Jl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(jc(e,t,l),e=e.sibling;e!==null;)jc(e,t,l),e=e.sibling}function ci(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&&Jl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ci(e,t,l),e=e.sibling;e!==null;)ci(e,t,l),e=e.sibling}function vf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);mt(t,a,l),t[rt]=e,t[gt]=l}catch(i){Ue(e,e.return,i)}}var gl=!1,lt=!1,Sc=!1,pf=typeof WeakSet=="function"?WeakSet:Set,ut=null;function wx(e,t){if(e=e.containerInfo,Qc=Mi,e=Ro(e),xu(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,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var o=0,h=-1,j=-1,A=0,H=0,X=e,_=null;t:for(;;){for(var D;X!==l||n!==0&&X.nodeType!==3||(h=o+n),X!==i||a!==0&&X.nodeType!==3||(j=o+a),X.nodeType===3&&(o+=X.nodeValue.length),(D=X.firstChild)!==null;)_=X,X=D;for(;;){if(X===e)break t;if(_===l&&++A===n&&(h=o),_===i&&++H===a&&(j=o),(D=X.nextSibling)!==null)break;X=_,_=X.parentNode}X=D}l=h===-1||j===-1?null:{start:h,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(Xc={focusedElem:e,selectionRange:l},Mi=!1,ut=t;ut!==null;)if(t=ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ut=e;else for(;ut!==null;){switch(t=ut,i=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&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var P=ga(l.type,n);e=a.getSnapshotBeforeUpdate(P,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ie){Ue(l,l.return,ie)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)$c(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":$c(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,ut=e;break}ut=t.return}}function gf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:yl(e,l),a&4&&Vn(5,l);break;case 1:if(yl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){Ue(l,l.return,o)}else{var n=ga(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ue(l,l.return,o)}}a&64&&ff(l),a&512&&Zn(l,l.return);break;case 3:if(yl(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{td(e,t)}catch(o){Ue(l,l.return,o)}}break;case 27:t===null&&a&4&&vf(l);case 26:case 5:yl(e,l),t===null&&a&4&&hf(l),a&512&&Zn(l,l.return);break;case 12:yl(e,l);break;case 31:yl(e,l),a&4&&jf(e,l);break;case 13:yl(e,l),a&4&&Sf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ox.bind(null,l),ev(e,l))));break;case 22:if(a=l.memoizedState!==null||gl,!a){t=t!==null&&t.memoizedState!==null||lt,n=gl;var i=lt;gl=a,(lt=t)&&!i?jl(e,l,(l.subtreeFlags&8772)!==0):yl(e,l),gl=n,lt=i}break;case 30:break;default:yl(e,l)}}function bf(e){var t=e.alternate;t!==null&&(e.alternate=null,bf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ve=null,yt=!1;function bl(e,t,l){for(l=l.child;l!==null;)yf(e,t,l),l=l.sibling}function yf(e,t,l){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(vn,l)}catch{}switch(l.tag){case 26:lt||nl(l,t),bl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:lt||nl(l,t);var a=Ve,n=yt;Jl(l.type)&&(Ve=l.stateNode,yt=!1),bl(e,t,l),ts(l.stateNode),Ve=a,yt=n;break;case 5:lt||nl(l,t);case 6:if(a=Ve,n=yt,Ve=null,bl(e,t,l),Ve=a,yt=n,Ve!==null)if(yt)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(l.stateNode)}catch(i){Ue(l,t,i)}else try{Ve.removeChild(l.stateNode)}catch(i){Ue(l,t,i)}break;case 18:Ve!==null&&(yt?(e=Ve,fm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),un(e)):fm(Ve,l.stateNode));break;case 4:a=Ve,n=yt,Ve=l.stateNode.containerInfo,yt=!0,bl(e,t,l),Ve=a,yt=n;break;case 0:case 11:case 14:case 15:Gl(2,l,t),lt||Gl(4,l,t),bl(e,t,l);break;case 1:lt||(nl(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&mf(l,t,a)),bl(e,t,l);break;case 21:bl(e,t,l);break;case 22:lt=(a=lt)||l.memoizedState!==null,bl(e,t,l),lt=a;break;default:bl(e,t,l)}}function jf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{un(e)}catch(l){Ue(t,t.return,l)}}}function Sf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{un(e)}catch(l){Ue(t,t.return,l)}}function Cx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pf),t;default:throw Error(c(435,e.tag))}}function ri(e,t){var l=Cx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Ux.bind(null,e,a);a.then(n,n)}})}function jt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Jl(h.type)){Ve=h.stateNode,yt=!1;break e}break;case 5:Ve=h.stateNode,yt=!1;break e;case 3:case 4:Ve=h.stateNode.containerInfo,yt=!0;break e}h=h.return}if(Ve===null)throw Error(c(160));yf(i,o,n),Ve=null,yt=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nf(t,e),t=t.sibling}var Pt=null;function Nf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jt(t,e),St(e),a&4&&(Gl(3,e,e.return),Vn(3,e),Gl(5,e,e.return));break;case 1:jt(t,e),St(e),a&512&&(lt||l===null||nl(l,l.return)),a&64&&gl&&(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=Pt;if(jt(t,e),St(e),a&512&&(lt||l===null||nl(l,l.return)),a&4){var i=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":i=n.getElementsByTagName("title")[0],(!i||i[bn]||i[rt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),mt(i,a,l),i[rt]=e,it(i),a=i;break e;case"link":var o=Nm("link","href",n).get(a+(l.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){o.splice(h,1);break t}}i=n.createElement(a),mt(i,a,l),n.head.appendChild(i);break;case"meta":if(o=Nm("meta","content",n).get(a+(l.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){o.splice(h,1);break t}}i=n.createElement(a),mt(i,a,l),n.head.appendChild(i);break;default:throw Error(c(468,a))}i[rt]=e,it(i),a=i}e.stateNode=a}else Em(n,e.type,e.stateNode);else e.stateNode=Sm(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Em(n,e.type,e.stateNode):Sm(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&bc(e,e.memoizedProps,l.memoizedProps)}break;case 27:jt(t,e),St(e),a&512&&(lt||l===null||nl(l,l.return)),l!==null&&a&4&&bc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(jt(t,e),St(e),a&512&&(lt||l===null||nl(l,l.return)),e.flags&32){n=e.stateNode;try{Ma(n,"")}catch(P){Ue(e,e.return,P)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,bc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Sc=!0);break;case 6:if(jt(t,e),St(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(P){Ue(e,e.return,P)}}break;case 3:if(wi=null,n=Pt,Pt=Ni(t.containerInfo),jt(t,e),Pt=n,St(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{un(t.containerInfo)}catch(P){Ue(e,e.return,P)}Sc&&(Sc=!1,Ef(e));break;case 4:a=Pt,Pt=Ni(e.stateNode.containerInfo),jt(t,e),St(e),Pt=a;break;case 12:jt(t,e),St(e);break;case 31:jt(t,e),St(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ri(e,a)));break;case 13:jt(t,e),St(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(di=Ct()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ri(e,a)));break;case 22:n=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,A=gl,H=lt;if(gl=A||n,lt=H||j,jt(t,e),lt=H,gl=A,St(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||j||gl||lt||ba(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){j=l=t;try{if(i=j.stateNode,n)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=j.stateNode;var X=j.memoizedProps.style,_=X!=null&&X.hasOwnProperty("display")?X.display:null;h.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(P){Ue(j,j.return,P)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=n?"":j.memoizedProps}catch(P){Ue(j,j.return,P)}}}else if(t.tag===18){if(l===null){j=t;try{var D=j.stateNode;n?mm(D,!0):mm(j.stateNode,!1)}catch(P){Ue(j,j.return,P)}}}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,ri(e,l))));break;case 19:jt(t,e),St(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ri(e,a)));break;case 30:break;case 21:break;default:jt(t,e),St(e)}}function St(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(xf(a)){l=a;break}a=a.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var n=l.stateNode,i=yc(e);ci(e,i,n);break;case 5:var o=l.stateNode;l.flags&32&&(Ma(o,""),l.flags&=-33);var h=yc(e);ci(e,h,o);break;case 3:case 4:var j=l.stateNode.containerInfo,A=yc(e);jc(e,A,j);break;default:throw Error(c(161))}}catch(H){Ue(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ef(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ef(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function yl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gf(e,t.alternate,t),t=t.sibling}function ba(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gl(4,t,t.return),ba(t);break;case 1:nl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&mf(t,t.return,l),ba(t);break;case 27:ts(t.stateNode);case 26:case 5:nl(t,t.return),ba(t);break;case 22:t.memoizedState===null&&ba(t);break;case 30:ba(t);break;default:ba(t)}e=e.sibling}}function jl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:jl(n,i,l),Vn(4,i);break;case 1:if(jl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(A){Ue(a,a.return,A)}if(a=i,n=a.updateQueue,n!==null){var h=a.stateNode;try{var j=n.shared.hiddenCallbacks;if(j!==null)for(n.shared.hiddenCallbacks=null,n=0;n<j.length;n++)ed(j[n],h)}catch(A){Ue(a,a.return,A)}}l&&o&64&&ff(i),Zn(i,i.return);break;case 27:vf(i);case 26:case 5:jl(n,i,l),l&&a===null&&o&4&&hf(i),Zn(i,i.return);break;case 12:jl(n,i,l);break;case 31:jl(n,i,l),l&&o&4&&jf(n,i);break;case 13:jl(n,i,l),l&&o&4&&Sf(n,i);break;case 22:i.memoizedState===null&&jl(n,i,l),Zn(i,i.return);break;case 30:break;default:jl(n,i,l)}t=t.sibling}}function Nc(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&&Dn(l))}function Ec(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Dn(e))}function It(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wf(e,t,l,a),t=t.sibling}function wf(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:It(e,t,l,a),n&2048&&Vn(9,t);break;case 1:It(e,t,l,a);break;case 3:It(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&&Dn(e)));break;case 12:if(n&2048){It(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Ue(t,t.return,j)}}else It(e,t,l,a);break;case 31:It(e,t,l,a);break;case 13:It(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?It(e,t,l,a):$n(e,t):i._visibility&2?It(e,t,l,a):(i._visibility|=2,Ja(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Nc(o,t);break;case 24:It(e,t,l,a),n&2048&&Ec(t.alternate,t);break;default:It(e,t,l,a)}}function Ja(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=l,j=a,A=o.flags;switch(o.tag){case 0:case 11:case 15:Ja(i,o,h,j,n),Vn(8,o);break;case 23:break;case 22:var H=o.stateNode;o.memoizedState!==null?H._visibility&2?Ja(i,o,h,j,n):$n(i,o):(H._visibility|=2,Ja(i,o,h,j,n)),n&&A&2048&&Nc(o.alternate,o);break;case 24:Ja(i,o,h,j,n),n&&A&2048&&Ec(o.alternate,o);break;default:Ja(i,o,h,j,n)}t=t.sibling}}function $n(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:$n(l,a),n&2048&&Nc(a.alternate,a);break;case 24:$n(l,a),n&2048&&Ec(a.alternate,a);break;default:$n(l,a)}t=t.sibling}}var Kn=8192;function Fa(e,t,l){if(e.subtreeFlags&Kn)for(e=e.child;e!==null;)Cf(e,t,l),e=e.sibling}function Cf(e,t,l){switch(e.tag){case 26:Fa(e,t,l),e.flags&Kn&&e.memoizedState!==null&&fv(l,Pt,e.memoizedState,e.memoizedProps);break;case 5:Fa(e,t,l);break;case 3:case 4:var a=Pt;Pt=Ni(e.stateNode.containerInfo),Fa(e,t,l),Pt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Kn,Kn=16777216,Fa(e,t,l),Kn=a):Fa(e,t,l));break;default:Fa(e,t,l)}}function Tf(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 Jn(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];ut=a,Mf(a,e)}Tf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rf(e),e=e.sibling}function Rf(e){switch(e.tag){case 0:case 11:case 15:Jn(e),e.flags&2048&&Gl(9,e,e.return);break;case 3:Jn(e);break;case 12:Jn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,oi(e)):Jn(e);break;default:Jn(e)}}function oi(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];ut=a,Mf(a,e)}Tf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gl(8,t,t.return),oi(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,oi(t));break;default:oi(t)}e=e.sibling}}function Mf(e,t){for(;ut!==null;){var l=ut;switch(l.tag){case 0:case 11:case 15:Gl(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:Dn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,ut=a;else e:for(l=e;ut!==null;){a=ut;var n=a.sibling,i=a.return;if(bf(a),a===l){ut=null;break e}if(n!==null){n.return=i,ut=n;break e}ut=i}}}var Tx={getCacheForType:function(e){var t=dt(Ie),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return dt(Ie).controller.signal}},Rx=typeof WeakMap=="function"?WeakMap:Map,De=0,ke=null,ve=null,je=0,Oe=0,zt=null,Ql=!1,Wa=!1,wc=!1,Sl=0,Ke=0,Xl=0,ya=0,Cc=0,Ot=0,Pa=0,Fn=null,Nt=null,Tc=!1,di=0,Af=0,fi=1/0,mi=null,Vl=null,st=0,Zl=null,Ia=null,Nl=0,Rc=0,Mc=null,_f=null,Wn=0,Ac=null;function Ut(){return(De&2)!==0&&je!==0?je&-je:B.T!==null?qc():Vr()}function Df(){if(Ot===0)if((je&536870912)===0||Ee){var e=js;js<<=1,(js&3932160)===0&&(js=262144),Ot=e}else Ot=536870912;return e=_t.current,e!==null&&(e.flags|=32),Ot}function Et(e,t,l){(e===ke&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(en(e,0),$l(e,je,Ot,!1)),gn(e,l),((De&2)===0||e!==ke)&&(e===ke&&((De&2)===0&&(ya|=l),Ke===4&&$l(e,je,Ot,!1)),sl(e))}function zf(e,t,l){if((De&6)!==0)throw Error(c(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||pn(e,t),n=a?_x(e,t):Dc(e,t,!0),i=a;do{if(n===0){Wa&&!a&&$l(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Mx(l)){n=Dc(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;n=Fn;var j=h.current.memoizedState.isDehydrated;if(j&&(en(h,o).flags|=256),o=Dc(h,o,!1),o!==2){if(wc&&!j){h.errorRecoveryDisabledLanes|=i,ya|=i,n=4;break e}i=Nt,Nt=n,i!==null&&(Nt===null?Nt=i:Nt.push.apply(Nt,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){en(e,0),$l(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:$l(a,t,Ot,!Ql);break e;case 2:Nt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(n=di+300-Ct(),10<n)){if($l(a,t,Ot,!Ql),Ns(a,0,!0)!==0)break e;Nl=t,a.timeoutHandle=om(Of.bind(null,a,l,Nt,mi,Tc,t,Ot,ya,Pa,Ql,i,"Throttled",-0,0),n);break e}Of(a,l,Nt,mi,Tc,t,Ot,ya,Pa,Ql,i,null,-0,0)}}break}while(!0);sl(e)}function Of(e,t,l,a,n,i,o,h,j,A,H,X,_,D){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cl},Cf(t,i,X);var P=(i&62914560)===i?di-Ct():(i&4194048)===i?Af-Ct():0;if(P=mv(X,P),P!==null){Nl=i,e.cancelPendingCommit=P(Gf.bind(null,e,t,i,l,a,n,o,h,j,H,X,null,_,D)),$l(e,i,o,!A);return}}Gf(e,t,i,l,a,n,o,h,j)}function Mx(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],i=n.getSnapshot;n=n.value;try{if(!Mt(i(),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 $l(e,t,l,a){t&=~Cc,t&=~ya,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-Rt(n),o=1<<i;a[i]=-1,n&=~o}l!==0&&Gr(e,l,t)}function hi(){return(De&6)===0?(Pn(0),!1):!0}function _c(){if(ve!==null){if(Oe===0)var e=ve.return;else e=ve,fl=da=null,$u(e),Xa=null,On=0,e=ve;for(;e!==null;)df(e.alternate,e),e=e.return;ve=null}}function en(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Jx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Nl=0,_c(),ke=e,ve=l=ol(e.current,null),je=t,Oe=0,zt=null,Ql=!1,Wa=pn(e,t),wc=!1,Pa=Ot=Cc=ya=Xl=Ke=0,Nt=Fn=null,Tc=!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-Rt(a),i=1<<n;t|=e[n],a&=~i}return Sl=t,Us(),l}function Uf(e,t){he=null,B.H=Gn,t===Qa||t===Qs?(t=Fo(),Oe=3):t===Uu?(t=Fo(),Oe=4):Oe=t===rc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,zt=t,ve===null&&(Ke=1,ai(e,Qt(t,e.current)))}function qf(){var e=_t.current;return e===null?!0:(je&4194048)===je?$t===null:(je&62914560)===je||(je&536870912)!==0?e===$t:!1}function Bf(){var e=B.H;return B.H=Gn,e===null?Gn:e}function Hf(){var e=B.A;return B.A=Tx,e}function xi(){Ke=4,Ql||(je&4194048)!==je&&_t.current!==null||(Wa=!0),(Xl&134217727)===0&&(ya&134217727)===0||ke===null||$l(ke,je,Ot,!1)}function Dc(e,t,l){var a=De;De|=2;var n=Bf(),i=Hf();(ke!==e||je!==t)&&(mi=null,en(e,t)),t=!1;var o=Ke;e:do try{if(Oe!==0&&ve!==null){var h=ve,j=zt;switch(Oe){case 8:_c(),o=6;break e;case 3:case 2:case 9:case 6:_t.current===null&&(t=!0);var A=Oe;if(Oe=0,zt=null,tn(e,h,j,A),l&&Wa){o=0;break e}break;default:A=Oe,Oe=0,zt=null,tn(e,h,j,A)}}Ax(),o=Ke;break}catch(H){Uf(e,H)}while(!0);return t&&e.shellSuspendCounter++,fl=da=null,De=a,B.H=n,B.A=i,ve===null&&(ke=null,je=0,Us()),o}function Ax(){for(;ve!==null;)Lf(ve)}function _x(e,t){var l=De;De|=2;var a=Bf(),n=Hf();ke!==e||je!==t?(mi=null,fi=Ct()+500,en(e,t)):Wa=pn(e,t);e:do try{if(Oe!==0&&ve!==null){t=ve;var i=zt;t:switch(Oe){case 1:Oe=0,zt=null,tn(e,t,i,1);break;case 2:case 9:if(Ko(i)){Oe=0,zt=null,kf(t);break}t=function(){Oe!==2&&Oe!==9||ke!==e||(Oe=7),sl(e)},i.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:Ko(i)?(Oe=0,zt=null,kf(t)):(Oe=0,zt=null,tn(e,t,i,7));break;case 5:var o=null;switch(ve.tag){case 26:o=ve.memoizedState;case 5:case 27:var h=ve;if(o?wm(o):h.stateNode.complete){Oe=0,zt=null;var j=h.sibling;if(j!==null)ve=j;else{var A=h.return;A!==null?(ve=A,vi(A)):ve=null}break t}}Oe=0,zt=null,tn(e,t,i,5);break;case 6:Oe=0,zt=null,tn(e,t,i,6);break;case 8:_c(),Ke=6;break e;default:throw Error(c(462))}}Dx();break}catch(H){Uf(e,H)}while(!0);return fl=da=null,B.H=a,B.A=n,De=l,ve!==null?0:(ke=null,je=0,Us(),Ke)}function Dx(){for(;ve!==null&&!Ml();)Lf(ve)}function Lf(e){var t=rf(e.alternate,e,Sl);e.memoizedProps=e.pendingProps,t===null?vi(e):ve=t}function kf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=lf(l,t,t.pendingProps,t.type,void 0,je);break;case 11:t=lf(l,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:$u(t);default:df(l,t),t=ve=Bo(t,Sl),t=rf(l,t,Sl)}e.memoizedProps=e.pendingProps,t===null?vi(e):ve=t}function tn(e,t,l,a){fl=da=null,$u(t),Xa=null,On=0;var n=t.return;try{if(yx(e,n,t,l,je)){Ke=1,ai(e,Qt(l,e.current)),ve=null;return}}catch(i){if(n!==null)throw ve=n,i;Ke=1,ai(e,Qt(l,e.current)),ve=null;return}t.flags&32768?(Ee||a===1?e=!0:Wa||(je&536870912)!==0?e=!1:(Ql=e=!0,(a===2||a===9||a===3||a===6)&&(a=_t.current,a!==null&&a.tag===13&&(a.flags|=16384))),Yf(t,e)):vi(t)}function vi(e){var t=e;do{if((t.flags&32768)!==0){Yf(t,Ql);return}e=t.return;var l=Nx(t.alternate,t,Sl);if(l!==null){ve=l;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Ke===0&&(Ke=5)}function Yf(e,t){do{var l=Ex(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);Ke=6,ve=null}function Gf(e,t,l,a,n,i,o,h,j){e.cancelPendingCommit=null;do pi();while(st!==0);if((De&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(i=t.lanes|t.childLanes,i|=yu,d0(e,l,i,o,h,j),e===ke&&(ve=ke=null,je=0),Ia=t,Zl=e,Nl=l,Rc=i,Mc=n,_f=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,qx(bs,function(){return $f(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=B.T,B.T=null,n=K.p,K.p=2,o=De,De|=4;try{wx(e,t,l)}finally{De=o,K.p=n,B.T=a}}st=1,Qf(),Xf(),Vf()}}function Qf(){if(st===1){st=0;var e=Zl,t=Ia,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=B.T,B.T=null;var a=K.p;K.p=2;var n=De;De|=4;try{Nf(t,e);var i=Xc,o=Ro(e.containerInfo),h=i.focusedElem,j=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&To(h.ownerDocument.documentElement,h)){if(j!==null&&xu(h)){var A=j.start,H=j.end;if(H===void 0&&(H=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(H,h.value.length);else{var X=h.ownerDocument||document,_=X&&X.defaultView||window;if(_.getSelection){var D=_.getSelection(),P=h.textContent.length,ie=Math.min(j.start,P),He=j.end===void 0?ie:Math.min(j.end,P);!D.extend&&ie>He&&(o=He,He=ie,ie=o);var C=Co(h,ie),S=Co(h,He);if(C&&S&&(D.rangeCount!==1||D.anchorNode!==C.node||D.anchorOffset!==C.offset||D.focusNode!==S.node||D.focusOffset!==S.offset)){var M=X.createRange();M.setStart(C.node,C.offset),D.removeAllRanges(),ie>He?(D.addRange(M),D.extend(S.node,S.offset)):(M.setEnd(S.node,S.offset),D.addRange(M))}}}}for(X=[],D=h;D=D.parentNode;)D.nodeType===1&&X.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<X.length;h++){var Q=X[h];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Mi=!!Qc,Xc=Qc=null}finally{De=n,K.p=a,B.T=l}}e.current=t,st=2}}function Xf(){if(st===2){st=0;var e=Zl,t=Ia,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=B.T,B.T=null;var a=K.p;K.p=2;var n=De;De|=4;try{gf(e,t.alternate,t)}finally{De=n,K.p=a,B.T=l}}st=3}}function Vf(){if(st===4||st===3){st=0,l0();var e=Zl,t=Ia,l=Nl,a=_f;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?st=5:(st=0,Ia=Zl=null,Zf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Vl=null),Fi(l),t=t.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(vn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=B.T,n=K.p,K.p=2,B.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var h=a[o];i(h.value,{componentStack:h.stack})}}finally{B.T=t,K.p=n}}(Nl&3)!==0&&pi(),sl(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===Ac?Wn++:(Wn=0,Ac=e):Wn=0,Pn(0)}}function Zf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Dn(t)))}function pi(){return Qf(),Xf(),Vf(),$f()}function $f(){if(st!==5)return!1;var e=Zl,t=Rc;Rc=0;var l=Fi(Nl),a=B.T,n=K.p;try{K.p=32>l?32:l,B.T=null,l=Mc,Mc=null;var i=Zl,o=Nl;if(st=0,Ia=Zl=null,Nl=0,(De&6)!==0)throw Error(c(331));var h=De;if(De|=4,Rf(i.current),wf(i,i.current,o,l),De=h,Pn(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(vn,i)}catch{}return!0}finally{K.p=n,B.T=a,Zf(e,t)}}function Kf(e,t,l){t=Qt(l,t),t=cc(e.stateNode,t,2),e=Ll(e,t,2),e!==null&&(gn(e,2),sl(e))}function Ue(e,t,l){if(e.tag===3)Kf(e,e,l);else for(;t!==null;){if(t.tag===3){Kf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Vl===null||!Vl.has(a))){e=Qt(l,e),l=Kd(2),a=Ll(t,l,2),a!==null&&(Jd(l,a,t,e),gn(a,2),sl(a));break}}t=t.return}}function zc(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Rx;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)||(wc=!0,n.add(l),e=zx.bind(null,e,t,l),t.then(e,e))}function zx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,ke===e&&(je&l)===l&&(Ke===4||Ke===3&&(je&62914560)===je&&300>Ct()-di?(De&2)===0&&en(e,0):Cc|=l,Pa===je&&(Pa=0)),sl(e)}function Jf(e,t){t===0&&(t=Yr()),e=ca(e,t),e!==null&&(gn(e,t),sl(e))}function Ox(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Jf(e,l)}function Ux(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),Jf(e,l)}function qx(e,t){return Ht(e,t)}var gi=null,ln=null,Oc=!1,bi=!1,Uc=!1,Kl=0;function sl(e){e!==ln&&e.next===null&&(ln===null?gi=ln=e:ln=ln.next=e),bi=!0,Oc||(Oc=!0,Hx())}function Pn(e,t){if(!Uc&&bi){Uc=!0;do for(var l=!1,a=gi;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var o=a.suspendedLanes,h=a.pingedLanes;i=(1<<31-Rt(42|e)+1)-1,i&=n&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,If(a,i))}else i=je,i=Ns(a,a===ke?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||pn(a,i)||(l=!0,If(a,i));a=a.next}while(l);Uc=!1}}function Bx(){Ff()}function Ff(){bi=Oc=!1;var e=0;Kl!==0&&Kx()&&(e=Kl);for(var t=Ct(),l=null,a=gi;a!==null;){var n=a.next,i=Wf(a,t);i===0?(a.next=null,l===null?gi=n:l.next=n,n===null&&(ln=l)):(l=a,(e!==0||(i&3)!==0)&&(bi=!0)),a=n}st!==0&&st!==5||Pn(e),Kl!==0&&(Kl=0)}function Wf(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-Rt(i),h=1<<o,j=n[o];j===-1?((h&l)===0||(h&a)!==0)&&(n[o]=o0(h,t)):j<=t&&(e.expiredLanes|=h),i&=~h}if(t=ke,l=je,l=Ns(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Lt(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||pn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Lt(a),Fi(l)){case 2:case 8:l=Lr;break;case 32:l=bs;break;case 268435456:l=kr;break;default:l=bs}return a=Pf.bind(null,e),l=Ht(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Lt(a),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(st!==0&&st!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(pi()&&e.callbackNode!==l)return null;var a=je;return a=Ns(e,e===ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(zf(e,a,t),Wf(e,Ct()),e.callbackNode!=null&&e.callbackNode===l?Pf.bind(null,e):null)}function If(e,t){if(pi())return null;zf(e,t,!0)}function Hx(){Fx(function(){(De&6)!==0?Ht(Hr,Bx):Ff()})}function qc(){if(Kl===0){var e=Ya;e===0&&(e=ys,ys<<=1,(ys&261888)===0&&(ys=256)),Kl=e}return Kl}function em(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ts(""+e)}function tm(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 Lx(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=em((n[gt]||null).action),o=a.submitter;o&&(t=(t=o[gt]||null)?em(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new _s("action","action",null,a,n);e.push({event:h,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Kl!==0){var j=o?tm(n,o):new FormData(n);lc(l,{pending:!0,data:j,method:n.method,action:i},null,j)}}else typeof i=="function"&&(h.preventDefault(),j=o?tm(n,o):new FormData(n),lc(l,{pending:!0,data:j,method:n.method,action:i},i,j))},currentTarget:n}]})}}for(var Bc=0;Bc<bu.length;Bc++){var Hc=bu[Bc],kx=Hc.toLowerCase(),Yx=Hc[0].toUpperCase()+Hc.slice(1);Wt(kx,"on"+Yx)}Wt(_o,"onAnimationEnd"),Wt(Do,"onAnimationIteration"),Wt(zo,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(ax,"onTransitionRun"),Wt(nx,"onTransitionStart"),Wt(sx,"onTransitionCancel"),Wt(Oo,"onTransitionEnd"),Ta("onMouseEnter",["mouseout","mouseover"]),Ta("onMouseLeave",["mouseout","mouseover"]),Ta("onPointerEnter",["pointerout","pointerover"]),Ta("onPointerLeave",["pointerout","pointerover"]),na("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),na("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),na("onBeforeInput",["compositionend","keypress","textInput","paste"]),na("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),na("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),na("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var In="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(" "),Gx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(In));function lm(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 i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var h=a[o],j=h.instance,A=h.currentTarget;if(h=h.listener,j!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=A;try{i(n)}catch(H){Os(H)}n.currentTarget=null,i=j}else for(o=0;o<a.length;o++){if(h=a[o],j=h.instance,A=h.currentTarget,h=h.listener,j!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=A;try{i(n)}catch(H){Os(H)}n.currentTarget=null,i=j}}}}function pe(e,t){var l=t[Wi];l===void 0&&(l=t[Wi]=new Set);var a=e+"__bubble";l.has(a)||(am(t,e,2,!1),l.add(a))}function Lc(e,t,l){var a=0;t&&(a|=4),am(l,e,a,t)}var yi="_reactListening"+Math.random().toString(36).slice(2);function kc(e){if(!e[yi]){e[yi]=!0,Kr.forEach(function(l){l!=="selectionchange"&&(Gx.has(l)||Lc(l,!1,e),Lc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yi]||(t[yi]=!0,Lc("selectionchange",!1,t))}}function am(e,t,l,a){switch(Dm(t)){case 2:var n=vv;break;case 8:n=pv;break;default:n=tr}l=n.bind(null,t,l,e),n=void 0,!iu||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 Yc(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var h=a.stateNode.containerInfo;if(h===n)break;if(o===4)for(o=a.return;o!==null;){var j=o.tag;if((j===3||j===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;h!==null;){if(o=Ea(h),o===null)return;if(j=o.tag,j===5||j===6||j===26||j===27){a=i=o;continue e}h=h.parentNode}}a=a.return}io(function(){var A=i,H=nu(l),X=[];e:{var _=Uo.get(e);if(_!==void 0){var D=_s,P=e;switch(e){case"keypress":if(Ms(l)===0)break e;case"keydown":case"keyup":D=U0;break;case"focusin":P="focus",D=ou;break;case"focusout":P="blur",D=ou;break;case"beforeblur":case"afterblur":D=ou;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":D=ro;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=N0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=H0;break;case _o:case Do:case zo:D=C0;break;case Oo:D=k0;break;case"scroll":case"scrollend":D=j0;break;case"wheel":D=G0;break;case"copy":case"cut":case"paste":D=R0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=fo;break;case"toggle":case"beforetoggle":D=X0}var ie=(t&4)!==0,He=!ie&&(e==="scroll"||e==="scrollend"),C=ie?_!==null?_+"Capture":null:_;ie=[];for(var S=A,M;S!==null;){var Q=S;if(M=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||M===null||C===null||(Q=jn(S,C),Q!=null&&ie.push(es(S,Q,M))),He)break;S=S.return}0<ie.length&&(_=new D(_,P,null,l,H),X.push({event:_,listeners:ie}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",_&&l!==au&&(P=l.relatedTarget||l.fromElement)&&(Ea(P)||P[Na]))break e;if((D||_)&&(_=H.window===H?H:(_=H.ownerDocument)?_.defaultView||_.parentWindow:window,D?(P=l.relatedTarget||l.toElement,D=A,P=P?Ea(P):null,P!==null&&(He=x(P),ie=P.tag,P!==He||ie!==5&&ie!==27&&ie!==6)&&(P=null)):(D=null,P=A),D!==P)){if(ie=ro,Q="onMouseLeave",C="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ie=fo,Q="onPointerLeave",C="onPointerEnter",S="pointer"),He=D==null?_:yn(D),M=P==null?_:yn(P),_=new ie(Q,S+"leave",D,l,H),_.target=He,_.relatedTarget=M,Q=null,Ea(H)===A&&(ie=new ie(C,S+"enter",P,l,H),ie.target=M,ie.relatedTarget=He,Q=ie),He=Q,D&&P)t:{for(ie=Qx,C=D,S=P,M=0,Q=C;Q;Q=ie(Q))M++;Q=0;for(var se=S;se;se=ie(se))Q++;for(;0<M-Q;)C=ie(C),M--;for(;0<Q-M;)S=ie(S),Q--;for(;M--;){if(C===S||S!==null&&C===S.alternate){ie=C;break t}C=ie(C),S=ie(S)}ie=null}else ie=null;D!==null&&nm(X,_,D,ie,!1),P!==null&&He!==null&&nm(X,He,P,ie,!0)}}e:{if(_=A?yn(A):window,D=_.nodeName&&_.nodeName.toLowerCase(),D==="select"||D==="input"&&_.type==="file")var Me=yo;else if(go(_))if(jo)Me=ex;else{Me=P0;var te=W0}else D=_.nodeName,!D||D.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?A&&lu(A.elementType)&&(Me=yo):Me=I0;if(Me&&(Me=Me(e,A))){bo(X,Me,l,H);break e}te&&te(e,_,A),e==="focusout"&&A&&_.type==="number"&&A.memoizedProps.value!=null&&tu(_,"number",_.value)}switch(te=A?yn(A):window,e){case"focusin":(go(te)||te.contentEditable==="true")&&(za=te,vu=A,Mn=null);break;case"focusout":Mn=vu=za=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,Mo(X,l,H);break;case"selectionchange":if(lx)break;case"keydown":case"keyup":Mo(X,l,H)}var xe;if(fu)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Da?vo(e,l)&&(Se="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(mo&&l.locale!=="ko"&&(Da||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Da&&(xe=uo()):(Dl=H,uu="value"in Dl?Dl.value:Dl.textContent,Da=!0)),te=ji(A,Se),0<te.length&&(Se=new oo(Se,e,null,l,H),X.push({event:Se,listeners:te}),xe?Se.data=xe:(xe=po(l),xe!==null&&(Se.data=xe)))),(xe=Z0?$0(e,l):K0(e,l))&&(Se=ji(A,"onBeforeInput"),0<Se.length&&(te=new oo("onBeforeInput","beforeinput",null,l,H),X.push({event:te,listeners:Se}),te.data=xe)),Lx(X,e,A,l,H)}lm(X,t)})}function es(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ji(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=jn(e,l),n!=null&&a.unshift(es(e,n,i)),n=jn(e,t),n!=null&&a.push(es(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Qx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function nm(e,t,l,a,n){for(var i=t._reactName,o=[];l!==null&&l!==a;){var h=l,j=h.alternate,A=h.stateNode;if(h=h.tag,j!==null&&j===a)break;h!==5&&h!==26&&h!==27||A===null||(j=A,n?(A=jn(l,i),A!=null&&o.unshift(es(l,A,j))):n||(A=jn(l,i),A!=null&&o.push(es(l,A,j)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var Xx=/\r\n?/g,Vx=/\u0000|\uFFFD/g;function sm(e){return(typeof e=="string"?e:""+e).replace(Xx,`
49
+ `).replace(Vx,"")}function im(e,t){return t=sm(t),sm(e)===t}function Be(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ma(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ma(e,""+a);break;case"className":ws(e,"class",a);break;case"tabIndex":ws(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ws(e,l,a);break;case"style":no(e,a,i);break;case"data":if(t!=="object"){ws(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=Ts(""+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 i=="function"&&(l==="formAction"?(t!=="input"&&Be(e,t,"name",n.name,n,null),Be(e,t,"formEncType",n.formEncType,n,null),Be(e,t,"formMethod",n.formMethod,n,null),Be(e,t,"formTarget",n.formTarget,n,null)):(Be(e,t,"encType",n.encType,n,null),Be(e,t,"method",n.method,n,null),Be(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Ts(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=cl);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=Ts(""+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),Es(e,"popover",a);break;case"xlinkActuate":ul(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ul(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ul(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ul(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ul(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ul(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ul(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ul(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ul(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Es(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=b0.get(l)||l,Es(e,l,a))}}function Gc(e,t,l,a,n,i){switch(l){case"style":no(e,a,i);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"?Ma(e,a):(typeof a=="number"||typeof a=="bigint")&&Ma(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=cl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Jr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[gt]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==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,""):Es(e,l,a)}}}function mt(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,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Be(e,t,i,o,l,null)}}n&&Be(e,t,"srcSet",l.srcSet,l,null),a&&Be(e,t,"src",l.src,l,null);return;case"input":pe("invalid",e);var h=i=o=n=null,j=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":o=H;break;case"checked":j=H;break;case"defaultChecked":A=H;break;case"value":i=H;break;case"defaultValue":h=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(c(137,t));break;default:Be(e,t,a,H,l,null)}}eo(e,i,h,j,A,o,n,!1);return;case"select":pe("invalid",e),a=o=i=null;for(n in l)if(l.hasOwnProperty(n)&&(h=l[n],h!=null))switch(n){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":a=h;default:Be(e,t,n,h,l,null)}t=i,l=o,e.multiple=!!a,t!=null?Ra(e,!!a,t,!1):l!=null&&Ra(e,!!a,l,!0);return;case"textarea":pe("invalid",e),i=n=a=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":a=h;break;case"defaultValue":n=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:Be(e,t,o,h,l,null)}lo(e,a,n,i);return;case"option":for(j in l)if(l.hasOwnProperty(j)&&(a=l[j],a!=null))switch(j){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Be(e,t,j,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<In.length;a++)pe(In[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:Be(e,t,A,a,l,null)}return;default:if(lu(t)){for(H in l)l.hasOwnProperty(H)&&(a=l[H],a!==void 0&&Gc(e,t,H,a,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!=null&&Be(e,t,h,a,l,null))}function Zx(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,i=null,o=null,h=null,j=null,A=null,H=null;for(D in l){var X=l[D];if(l.hasOwnProperty(D)&&X!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":j=X;default:a.hasOwnProperty(D)||Be(e,t,D,null,a,X)}}for(var _ in a){var D=a[_];if(X=l[_],a.hasOwnProperty(_)&&(D!=null||X!=null))switch(_){case"type":i=D;break;case"name":n=D;break;case"checked":A=D;break;case"defaultChecked":H=D;break;case"value":o=D;break;case"defaultValue":h=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(c(137,t));break;default:D!==X&&Be(e,t,_,D,a,X)}}eu(e,o,h,j,A,H,i,n);return;case"select":D=o=h=_=null;for(i in l)if(j=l[i],l.hasOwnProperty(i)&&j!=null)switch(i){case"value":break;case"multiple":D=j;default:a.hasOwnProperty(i)||Be(e,t,i,null,a,j)}for(n in a)if(i=a[n],j=l[n],a.hasOwnProperty(n)&&(i!=null||j!=null))switch(n){case"value":_=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==j&&Be(e,t,n,i,a,j)}t=h,l=o,a=D,_!=null?Ra(e,!!l,_,!1):!!a!=!!l&&(t!=null?Ra(e,!!l,t,!0):Ra(e,!!l,l?[]:"",!1));return;case"textarea":D=_=null;for(h in l)if(n=l[h],l.hasOwnProperty(h)&&n!=null&&!a.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Be(e,t,h,null,a,n)}for(o in a)if(n=a[o],i=l[o],a.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":_=n;break;case"defaultValue":D=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(c(91));break;default:n!==i&&Be(e,t,o,n,a,i)}to(e,_,D);return;case"option":for(var P in l)if(_=l[P],l.hasOwnProperty(P)&&_!=null&&!a.hasOwnProperty(P))switch(P){case"selected":e.selected=!1;break;default:Be(e,t,P,null,a,_)}for(j in a)if(_=a[j],D=l[j],a.hasOwnProperty(j)&&_!==D&&(_!=null||D!=null))switch(j){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Be(e,t,j,_,a,D)}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 ie in l)_=l[ie],l.hasOwnProperty(ie)&&_!=null&&!a.hasOwnProperty(ie)&&Be(e,t,ie,null,a,_);for(A in a)if(_=a[A],D=l[A],a.hasOwnProperty(A)&&_!==D&&(_!=null||D!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,t));break;default:Be(e,t,A,_,a,D)}return;default:if(lu(t)){for(var He in l)_=l[He],l.hasOwnProperty(He)&&_!==void 0&&!a.hasOwnProperty(He)&&Gc(e,t,He,void 0,a,_);for(H in a)_=a[H],D=l[H],!a.hasOwnProperty(H)||_===D||_===void 0&&D===void 0||Gc(e,t,H,_,a,D);return}}for(var C in l)_=l[C],l.hasOwnProperty(C)&&_!=null&&!a.hasOwnProperty(C)&&Be(e,t,C,null,a,_);for(X in a)_=a[X],D=l[X],!a.hasOwnProperty(X)||_===D||_==null&&D==null||Be(e,t,X,_,a,D)}function um(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $x(){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],i=n.transferSize,o=n.initiatorType,h=n.duration;if(i&&h&&um(o)){for(o=0,h=n.responseEnd,a+=1;a<l.length;a++){var j=l[a],A=j.startTime;if(A>h)break;var H=j.transferSize,X=j.initiatorType;H&&um(X)&&(j=j.responseEnd,o+=H*(j<h?1:(h-A)/(j-A)))}if(--a,t+=8*(i+o)/(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 Qc=null,Xc=null;function Si(e){return e.nodeType===9?e:e.ownerDocument}function cm(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 rm(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 Vc(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 Zc=null;function Kx(){var e=window.event;return e&&e.type==="popstate"?e===Zc?!1:(Zc=e,!0):(Zc=null,!1)}var om=typeof setTimeout=="function"?setTimeout:void 0,Jx=typeof clearTimeout=="function"?clearTimeout:void 0,dm=typeof Promise=="function"?Promise:void 0,Fx=typeof queueMicrotask=="function"?queueMicrotask:typeof dm<"u"?function(e){return dm.resolve(null).then(e).catch(Wx)}:om;function Wx(e){setTimeout(function(){throw e})}function Jl(e){return e==="head"}function fm(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),un(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")ts(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ts(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[bn]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&ts(e.ownerDocument.body);l=n}while(l);un(t)}function mm(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 $c(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":$c(l),Pi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Px(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[bn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==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(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Kt(e.nextSibling),e===null)break}return null}function Ix(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Kt(e.nextSibling),e===null))return null;return e}function hm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Kt(e.nextSibling),e===null))return null;return e}function Kc(e){return e.data==="$?"||e.data==="$~"}function Jc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ev(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 Kt(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 Fc=null;function xm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Kt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function vm(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 pm(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 ts(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pi(e)}var Jt=new Map,gm=new Set;function Ni(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var El=K.d;K.d={f:tv,r:lv,D:av,C:nv,L:sv,m:iv,X:cv,S:uv,M:rv};function tv(){var e=El.f(),t=hi();return e||t}function lv(e){var t=wa(e);t!==null&&t.tag===5&&t.type==="form"?Od(t):El.r(e)}var an=typeof document>"u"?null:document;function bm(e,t,l){var a=an;if(a&&typeof t=="string"&&t){var n=Yt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),gm.has(n)||(gm.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),mt(t,"link",e),it(t),a.head.appendChild(t)))}}function av(e){El.D(e),bm("dns-prefetch",e,null)}function nv(e,t){El.C(e,t),bm("preconnect",e,t)}function sv(e,t,l){El.L(e,t,l);var a=an;if(a&&e&&t){var n='link[rel="preload"][as="'+Yt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Yt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Yt(l.imageSizes)+'"]')):n+='[href="'+Yt(e)+'"]';var i=n;switch(t){case"style":i=nn(e);break;case"script":i=sn(e)}Jt.has(i)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Jt.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(ls(i))||t==="script"&&a.querySelector(as(i))||(t=a.createElement("link"),mt(t,"link",e),it(t),a.head.appendChild(t)))}}function iv(e,t){El.m(e,t);var l=an;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Yt(a)+'"][href="'+Yt(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=sn(e)}if(!Jt.has(i)&&(e=y({rel:"modulepreload",href:e},t),Jt.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(as(i)))return}a=l.createElement("link"),mt(a,"link",e),it(a),l.head.appendChild(a)}}}function uv(e,t,l){El.S(e,t,l);var a=an;if(a&&e){var n=Ca(a).hoistableStyles,i=nn(e);t=t||"default";var o=n.get(i);if(!o){var h={loading:0,preload:null};if(o=a.querySelector(ls(i)))h.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Jt.get(i))&&Wc(e,l);var j=o=a.createElement("link");it(j),mt(j,"link",e),j._p=new Promise(function(A,H){j.onload=A,j.onerror=H}),j.addEventListener("load",function(){h.loading|=1}),j.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Ei(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:h},n.set(i,o)}}}function cv(e,t){El.X(e,t);var l=an;if(l&&e){var a=Ca(l).hoistableScripts,n=sn(e),i=a.get(n);i||(i=l.querySelector(as(n)),i||(e=y({src:e,async:!0},t),(t=Jt.get(n))&&Pc(e,t),i=l.createElement("script"),it(i),mt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function rv(e,t){El.M(e,t);var l=an;if(l&&e){var a=Ca(l).hoistableScripts,n=sn(e),i=a.get(n);i||(i=l.querySelector(as(n)),i||(e=y({src:e,async:!0,type:"module"},t),(t=Jt.get(n))&&Pc(e,t),i=l.createElement("script"),it(i),mt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function ym(e,t,l,a){var n=(n=me.current)?Ni(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=nn(l.href),l=Ca(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=nn(l.href);var i=Ca(n).hoistableStyles,o=i.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=n.querySelector(ls(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Jt.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},Jt.set(e,l),i||ov(n,e,l,o.state))),t&&a===null)throw Error(c(528,""));return o}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=sn(l),l=Ca(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 nn(e){return'href="'+Yt(e)+'"'}function ls(e){return'link[rel="stylesheet"]['+e+"]"}function jm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function ov(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}),mt(t,"link",l),it(t),e.head.appendChild(t))}function sn(e){return'[src="'+Yt(e)+'"]'}function as(e){return"script[async]"+e}function Sm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Yt(l.href)+'"]');if(a)return t.instance=a,it(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"),it(a),mt(a,"style",n),Ei(a,l.precedence,e),t.instance=a;case"stylesheet":n=nn(l.href);var i=e.querySelector(ls(n));if(i)return t.state.loading|=4,t.instance=i,it(i),i;a=jm(l),(n=Jt.get(n))&&Wc(a,n),i=(e.ownerDocument||e).createElement("link"),it(i);var o=i;return o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),mt(i,"link",a),t.state.loading|=4,Ei(i,l.precedence,e),t.instance=i;case"script":return i=sn(l.src),(n=e.querySelector(as(i)))?(t.instance=n,it(n),n):(a=l,(n=Jt.get(i))&&(a=y({},l),Pc(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),it(n),mt(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,Ei(a,l.precedence,e));return t.instance}function Ei(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,o=0;o<a.length;o++){var h=a[o];if(h.dataset.precedence===t)i=h;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Pc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var wi=null;function Nm(e,t,l){if(wi===null){var a=new Map,n=wi=new Map;n.set(l,a)}else n=wi,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 i=l[n];if(!(i[bn]||i[rt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=a.get(o);h?h.push(i):a.set(o,[i])}}return a}function Em(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function dv(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 wm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fv(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=nn(a.href),i=t.querySelector(ls(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ci.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,it(i);return}i=t.ownerDocument||t,a=jm(a),(n=Jt.get(n))&&Wc(a,n),i=i.createElement("link"),it(i);var o=i;o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),mt(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Ci.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ic=0;function mv(e,t){return e.stylesheets&&e.count===0&&Ri(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Ri(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Ic===0&&(Ic=62500*$x());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ri(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Ic?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ci(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ri(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ti=null;function Ri(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ti=new Map,t.forEach(hv,e),Ti=null,Ci.call(e))}function hv(e,t){if(!(t.state.loading&4)){var l=Ti.get(e);if(l)var a=l.get(null);else{l=new Map,Ti.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),a=o)}a&&l.set(null,a)}n=t.instance,o=n.getAttribute("data-precedence"),i=l.get(o)||a,i===a&&l.set(null,n),l.set(o,n),this.count++,a=Ci.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var ns={$$typeof:Y,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function xv(e,t,l,a,n,i,o,h,j){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=Ki(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ki(0),this.hiddenUpdates=Ki(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Cm(e,t,l,a,n,i,o,h,j,A,H,X){return e=new xv(e,t,l,o,j,A,H,X,h),t=1,i===!0&&(t|=24),i=At(3,null,null,t),e.current=i,i.stateNode=e,t=Du(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},qu(i),e}function Tm(e){return e?(e=qa,e):qa}function Rm(e,t,l,a,n,i){n=Tm(n),a.context===null?a.context=n:a.pendingContext=n,a=Hl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Ll(e,a,t),l!==null&&(Et(l,e,t),qn(l,e,t))}function Mm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function er(e,t){Mm(e,t),(e=e.alternate)&&Mm(e,t)}function Am(e){if(e.tag===13||e.tag===31){var t=ca(e,67108864);t!==null&&Et(t,e,67108864),er(e,67108864)}}function _m(e){if(e.tag===13||e.tag===31){var t=Ut();t=Ji(t);var l=ca(e,t);l!==null&&Et(l,e,t),er(e,t)}}var Mi=!0;function vv(e,t,l,a){var n=B.T;B.T=null;var i=K.p;try{K.p=2,tr(e,t,l,a)}finally{K.p=i,B.T=n}}function pv(e,t,l,a){var n=B.T;B.T=null;var i=K.p;try{K.p=8,tr(e,t,l,a)}finally{K.p=i,B.T=n}}function tr(e,t,l,a){if(Mi){var n=lr(a);if(n===null)Yc(e,t,a,Ai,l),zm(e,a);else if(bv(n,e,t,l,a))a.stopPropagation();else if(zm(e,a),t&4&&-1<gv.indexOf(e)){for(;n!==null;){var i=wa(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=aa(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var j=1<<31-Rt(o);h.entanglements[1]|=j,o&=~j}sl(i),(De&6)===0&&(fi=Ct()+500,Pn(0))}}break;case 31:case 13:h=ca(i,2),h!==null&&Et(h,i,2),hi(),er(i,2)}if(i=lr(a),i===null&&Yc(e,t,a,Ai,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Yc(e,t,a,null,l)}}function lr(e){return e=nu(e),ar(e)}var Ai=null;function ar(e){if(Ai=null,e=Ea(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 Ai=e,null}function Dm(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(a0()){case Hr:return 2;case Lr:return 8;case bs:case n0:return 32;case kr:return 268435456;default:return 32}default:return 32}}var nr=!1,Fl=null,Wl=null,Pl=null,ss=new Map,is=new Map,Il=[],gv="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 zm(e,t){switch(e){case"focusin":case"focusout":Fl=null;break;case"dragenter":case"dragleave":Wl=null;break;case"mouseover":case"mouseout":Pl=null;break;case"pointerover":case"pointerout":ss.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":is.delete(t.pointerId)}}function us(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=wa(t),t!==null&&Am(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function bv(e,t,l,a,n){switch(t){case"focusin":return Fl=us(Fl,e,t,l,a,n),!0;case"dragenter":return Wl=us(Wl,e,t,l,a,n),!0;case"mouseover":return Pl=us(Pl,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return ss.set(i,us(ss.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,is.set(i,us(is.get(i)||null,e,t,l,a,n)),!0}return!1}function Om(e){var t=Ea(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,Zr(e.priority,function(){_m(l)});return}}else if(t===31){if(t=p(l),t!==null){e.blockedOn=t,Zr(e.priority,function(){_m(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 _i(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=lr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);au=a,l.target.dispatchEvent(a),au=null}else return t=wa(l),t!==null&&Am(t),e.blockedOn=l,!1;t.shift()}return!0}function Um(e,t,l){_i(e)&&l.delete(t)}function yv(){nr=!1,Fl!==null&&_i(Fl)&&(Fl=null),Wl!==null&&_i(Wl)&&(Wl=null),Pl!==null&&_i(Pl)&&(Pl=null),ss.forEach(Um),is.forEach(Um)}function Di(e,t){e.blockedOn===t&&(e.blockedOn=null,nr||(nr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,yv)))}var zi=null;function qm(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(ar(a||l)===null)continue;break}var i=wa(l);i!==null&&(e.splice(t,3),t-=3,lc(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function un(e){function t(j){return Di(j,e)}Fl!==null&&Di(Fl,e),Wl!==null&&Di(Wl,e),Pl!==null&&Di(Pl,e),ss.forEach(t),is.forEach(t);for(var l=0;l<Il.length;l++){var a=Il[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Il.length&&(l=Il[0],l.blockedOn===null);)Om(l),l.blockedOn===null&&Il.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],o=n[gt]||null;if(typeof i=="function")o||qm(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[gt]||null)h=o.formAction;else if(ar(n)!==null)continue}else h=o.action;typeof h=="function"?l[a+1]=h:(l.splice(a,3),a-=3),qm(l)}}}function Bm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.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 sr(e){this._internalRoot=e}Oi.prototype.render=sr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,a=Ut();Rm(l,a,e,t,null,null)},Oi.prototype.unmount=sr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rm(e.current,2,null,e,null,null),hi(),t[Na]=null}};function Oi(e){this._internalRoot=e}Oi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vr();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Il.length&&t!==0&&t<Il[l].priority;l++);Il.splice(l,0,e),l===0&&Om(e)}};var Hm=r.version;if(Hm!=="19.2.4")throw Error(c(527,Hm,"19.2.4"));K.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 jv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ui=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ui.isDisabled&&Ui.supportsFiber)try{vn=Ui.inject(jv),Tt=Ui}catch{}}return rs.createRoot=function(e,t){if(!m(e))throw Error(c(299));var l=!1,a="",n=Xd,i=Vd,o=Zd;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&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Cm(e,1,!1,null,null,l,a,null,n,i,o,Bm),e[Na]=t.current,kc(e),new sr(t)},rs.hydrateRoot=function(e,t,l){if(!m(e))throw Error(c(299));var a=!1,n="",i=Xd,o=Vd,h=Zd,j=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),t=Cm(e,1,!0,t,l??null,a,n,j,i,o,h,Bm),t.context=Tm(null),l=t.current,a=Ut(),a=Ji(a),n=Hl(a),n.callback=null,Ll(l,n,a),l=a,t.current.lanes=l,gn(t,l),sl(t),e[Na]=t.current,kc(e),new Oi(t)},rs.version="19.2.4",rs}var Km;function Av(){if(Km)return cr.exports;Km=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(r){console.error(r)}}return u(),cr.exports=Mv(),cr.exports}var _v=Av();const Dv=Nr(_v);/**
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 Jm="popstate";function zv(u={}){function r(m,x){let{pathname:f="/",search:p="",hash:b=""}=Sa(m.location.hash.substring(1));return!f.startsWith("/")&&!f.startsWith(".")&&(f="/"+f),gr("",{pathname:f,search:p,hash:b},x.state&&x.state.usr||null,x.state&&x.state.key||"default")}function d(m,x){let f=m.document.querySelector("base"),p="";if(f&&f.getAttribute("href")){let b=m.location.href,v=b.indexOf("#");p=v===-1?b:b.slice(0,v)}return p+"#"+(typeof x=="string"?x:xs(x))}function c(m,x){Ft(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(x)})`)}return Uv(r,d,c,u)}function Ze(u,r){if(u===!1||u===null||typeof u>"u")throw new Error(r)}function Ft(u,r){if(!u){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Ov(){return Math.random().toString(36).substring(2,10)}function Fm(u,r){return{usr:u.state,key:u.key,idx:r}}function gr(u,r,d=null,c){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof r=="string"?Sa(r):r,state:d,key:r&&r.key||c||Ov()}}function xs({pathname:u="/",search:r="",hash:d=""}){return r&&r!=="?"&&(u+=r.charAt(0)==="?"?r:"?"+r),d&&d!=="#"&&(u+=d.charAt(0)==="#"?d:"#"+d),u}function Sa(u){let r={};if(u){let d=u.indexOf("#");d>=0&&(r.hash=u.substring(d),u=u.substring(0,d));let c=u.indexOf("?");c>=0&&(r.search=u.substring(c),u=u.substring(0,c)),u&&(r.pathname=u)}return r}function Uv(u,r,d,c={}){let{window:m=document.defaultView,v5Compat:x=!1}=c,f=m.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 k=g(),E=k==null?null:k-v;v=k,b&&b({action:p,location:O.location,delta:E})}function R(k,E){p="PUSH";let L=gr(O.location,k,E);d&&d(L,k),v=g()+1;let Y=Fm(L,v),le=O.createHref(L);try{f.pushState(Y,"",le)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;m.location.assign(le)}x&&b&&b({action:p,location:O.location,delta:1})}function q(k,E){p="REPLACE";let L=gr(O.location,k,E);d&&d(L,k),v=g();let Y=Fm(L,v),le=O.createHref(L);f.replaceState(Y,"",le),x&&b&&b({action:p,location:O.location,delta:0})}function z(k){return qv(k)}let O={get action(){return p},get location(){return u(m,f)},listen(k){if(b)throw new Error("A history only accepts one active listener");return m.addEventListener(Jm,y),b=k,()=>{m.removeEventListener(Jm,y),b=null}},createHref(k){return r(m,k)},createURL:z,encodeLocation(k){let E=z(k);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:R,replace:q,go(k){return f.go(k)}};return O}function qv(u,r=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Ze(d,"No window.location.(origin|href) available to create URL");let c=typeof u=="string"?u:xs(u);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=d+c),new URL(c,d)}function xh(u,r,d="/"){return Bv(u,r,d,!1)}function Bv(u,r,d,c){let m=typeof r=="string"?Sa(r):r,x=Tl(m.pathname||"/",d);if(x==null)return null;let f=vh(u);Hv(f);let p=null;for(let b=0;p==null&&b<f.length;++b){let v=Jv(x);p=$v(f[b],v,c)}return p}function vh(u,r=[],d=[],c="",m=!1){let x=(f,p,b=m,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;Ze(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=Cl([c,g.relativePath]),R=d.concat(g);f.children&&f.children.length>0&&(Ze(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),vh(f.children,r,R,y,b)),!(f.path==null&&!f.index)&&r.push({path:y,score:Vv(y,f.index),routesMeta:R})};return u.forEach((f,p)=>{var b;if(f.path===""||!((b=f.path)!=null&&b.includes("?")))x(f,p);else for(let v of ph(f.path))x(f,p,!0,v)}),r}function ph(u){let r=u.split("/");if(r.length===0)return[];let[d,...c]=r,m=d.endsWith("?"),x=d.replace(/\?$/,"");if(c.length===0)return m?[x,""]:[x];let f=ph(c.join("/")),p=[];return p.push(...f.map(b=>b===""?x:[x,b].join("/"))),m&&p.push(...f),p.map(b=>u.startsWith("/")&&b===""?"/":b)}function Hv(u){u.sort((r,d)=>r.score!==d.score?d.score-r.score:Zv(r.routesMeta.map(c=>c.childrenIndex),d.routesMeta.map(c=>c.childrenIndex)))}var Lv=/^:[\w-]+$/,kv=3,Yv=2,Gv=1,Qv=10,Xv=-2,Wm=u=>u==="*";function Vv(u,r){let d=u.split("/"),c=d.length;return d.some(Wm)&&(c+=Xv),r&&(c+=Yv),d.filter(m=>!Wm(m)).reduce((m,x)=>m+(Lv.test(x)?kv:x===""?Gv:Qv),c)}function Zv(u,r){return u.length===r.length&&u.slice(0,-1).every((c,m)=>c===r[m])?u[u.length-1]-r[r.length-1]:0}function $v(u,r,d=!1){let{routesMeta:c}=u,m={},x="/",f=[];for(let p=0;p<c.length;++p){let b=c[p],v=p===c.length-1,g=x==="/"?r:r.slice(x.length)||"/",y=Yi({path:b.relativePath,caseSensitive:b.caseSensitive,end:v},g),R=b.route;if(!y&&v&&d&&!c[c.length-1].route.index&&(y=Yi({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},g)),!y)return null;Object.assign(m,y.params),f.push({params:m,pathname:Cl([x,y.pathname]),pathnameBase:Iv(Cl([x,y.pathnameBase])),route:R}),y.pathnameBase!=="/"&&(x=Cl([x,y.pathnameBase]))}return f}function Yi(u,r){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[d,c]=Kv(u.path,u.caseSensitive,u.end),m=r.match(d);if(!m)return null;let x=m[0],f=x.replace(/(.)\/+$/,"$1"),p=m.slice(1);return{params:c.reduce((v,{paramName:g,isOptional:y},R)=>{if(g==="*"){let z=p[R]||"";f=x.slice(0,x.length-z.length).replace(/(.)\/+$/,"$1")}const q=p[R];return y&&!q?v[g]=void 0:v[g]=(q||"").replace(/%2F/g,"/"),v},{}),pathname:x,pathnameBase:f,pattern:u}}function Kv(u,r=!1,d=!0){Ft(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=[],m="^"+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:"*"}),m+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":u!==""&&u!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,r?void 0:"i"),c]}function Jv(u){try{return u.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ft(!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 (${r}).`),u}}function Tl(u,r){if(r==="/")return u;if(!u.toLowerCase().startsWith(r.toLowerCase()))return null;let d=r.endsWith("/")?r.length-1:r.length,c=u.charAt(d);return c&&c!=="/"?null:u.slice(d)||"/"}var Fv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Wv(u,r="/"){let{pathname:d,search:c="",hash:m=""}=typeof u=="string"?Sa(u):u,x;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?x=Pm(d.substring(1),"/"):x=Pm(d,r)):x=r,{pathname:x,search:ep(c),hash:tp(m)}}function Pm(u,r){let d=r.replace(/\/+$/,"").split("/");return u.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function fr(u,r,d,c){return`Cannot include a '${u}' character in a manually specified \`to.${r}\` 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 Pv(u){return u.filter((r,d)=>d===0||r.route.path&&r.route.path.length>0)}function wr(u){let r=Pv(u);return r.map((d,c)=>c===r.length-1?d.pathname:d.pathnameBase)}function Cr(u,r,d,c=!1){let m;typeof u=="string"?m=Sa(u):(m={...u},Ze(!m.pathname||!m.pathname.includes("?"),fr("?","pathname","search",m)),Ze(!m.pathname||!m.pathname.includes("#"),fr("#","pathname","hash",m)),Ze(!m.search||!m.search.includes("#"),fr("#","search","hash",m)));let x=u===""||m.pathname==="",f=x?"/":m.pathname,p;if(f==null)p=d;else{let y=r.length-1;if(!c&&f.startsWith("..")){let R=f.split("/");for(;R[0]==="..";)R.shift(),y-=1;m.pathname=R.join("/")}p=y>=0?r[y]:"/"}let b=Wv(m,p),v=f&&f!=="/"&&f.endsWith("/"),g=(x||f===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(v||g)&&(b.pathname+="/"),b}var Cl=u=>u.join("/").replace(/\/\/+/g,"/"),Iv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),ep=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,tp=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u,lp=class{constructor(u,r,d,c=!1){this.status=u,this.statusText=r||"",this.internal=c,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function ap(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}function np(u){return u.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var gh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function bh(u,r){let d=u;if(typeof d!="string"||!Fv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let c=d,m=!1;if(gh)try{let x=new URL(window.location.href),f=d.startsWith("//")?new URL(x.protocol+d):new URL(d),p=Tl(f.pathname,r);f.origin===x.origin&&p!=null?d=p+f.search+f.hash:m=!0}catch{Ft(!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:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var yh=["POST","PUT","PATCH","DELETE"];new Set(yh);var sp=["GET",...yh];new Set(sp);var fn=w.createContext(null);fn.displayName="DataRouter";var Xi=w.createContext(null);Xi.displayName="DataRouterState";var ip=w.createContext(!1),jh=w.createContext({isTransitioning:!1});jh.displayName="ViewTransition";var up=w.createContext(new Map);up.displayName="Fetchers";var cp=w.createContext(null);cp.displayName="Await";var Bt=w.createContext(null);Bt.displayName="Navigation";var vs=w.createContext(null);vs.displayName="Location";var il=w.createContext({outlet:null,matches:[],isDataRoute:!1});il.displayName="Route";var Tr=w.createContext(null);Tr.displayName="RouteError";var Sh="REACT_ROUTER_ERROR",rp="REDIRECT",op="ROUTE_ERROR_RESPONSE";function dp(u){if(u.startsWith(`${Sh}:${rp}:{`))try{let r=JSON.parse(u.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function fp(u){if(u.startsWith(`${Sh}:${op}:{`))try{let r=JSON.parse(u.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new lp(r.status,r.statusText,r.data)}catch{}}function mp(u,{relative:r}={}){Ze(mn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:c}=w.useContext(Bt),{hash:m,pathname:x,search:f}=ps(u,{relative:r}),p=x;return d!=="/"&&(p=x==="/"?d:Cl([d,x])),c.createHref({pathname:p,search:f,hash:m})}function mn(){return w.useContext(vs)!=null}function la(){return Ze(mn(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(vs).location}var Nh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Eh(u){w.useContext(Bt).static||w.useLayoutEffect(u)}function Rr(){let{isDataRoute:u}=w.useContext(il);return u?Cp():hp()}function hp(){Ze(mn(),"useNavigate() may be used only in the context of a <Router> component.");let u=w.useContext(fn),{basename:r,navigator:d}=w.useContext(Bt),{matches:c}=w.useContext(il),{pathname:m}=la(),x=JSON.stringify(wr(c)),f=w.useRef(!1);return Eh(()=>{f.current=!0}),w.useCallback((b,v={})=>{if(Ft(f.current,Nh),!f.current)return;if(typeof b=="number"){d.go(b);return}let g=Cr(b,JSON.parse(x),m,v.relative==="path");u==null&&r!=="/"&&(g.pathname=g.pathname==="/"?r:Cl([r,g.pathname])),(v.replace?d.replace:d.push)(g,v.state,v)},[r,d,x,m,u])}w.createContext(null);function ps(u,{relative:r}={}){let{matches:d}=w.useContext(il),{pathname:c}=la(),m=JSON.stringify(wr(d));return w.useMemo(()=>Cr(u,JSON.parse(m),c,r==="path"),[u,m,c,r])}function xp(u,r){return wh(u,r)}function wh(u,r,d,c,m){var L;Ze(mn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=w.useContext(Bt),{matches:f}=w.useContext(il),p=f[f.length-1],b=p?p.params:{},v=p?p.pathname:"/",g=p?p.pathnameBase:"/",y=p&&p.route;{let Y=y&&y.path||"";Th(v,!y||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${Y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let R=la(),q;if(r){let Y=typeof r=="string"?Sa(r):r;Ze(g==="/"||((L=Y.pathname)==null?void 0:L.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 "${Y.pathname}" was given in the \`location\` prop.`),q=Y}else q=R;let z=q.pathname||"/",O=z;if(g!=="/"){let Y=g.replace(/^\//,"").split("/");O="/"+z.replace(/^\//,"").split("/").slice(Y.length).join("/")}let k=xh(u,{pathname:O});Ft(y||k!=null,`No routes matched location "${q.pathname}${q.search}${q.hash}" `),Ft(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${q.pathname}${q.search}${q.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 E=yp(k&&k.map(Y=>Object.assign({},Y,{params:Object.assign({},b,Y.params),pathname:Cl([g,x.encodeLocation?x.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?g:Cl([g,x.encodeLocation?x.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),f,d,c,m);return r&&E?w.createElement(vs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...q},navigationType:"POP"}},E):E}function vp(){let u=wp(),r=ap(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)",m={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=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:x},"ErrorBoundary")," or"," ",w.createElement("code",{style:x},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},r),d?w.createElement("pre",{style:m},d):null,f)}var pp=w.createElement(vp,null),Ch=class extends w.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,r){return r.location!==u.location||r.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:r.error,location:r.location,revalidation:u.revalidation||r.revalidation}}componentDidCatch(u,r){this.props.onError?this.props.onError(u,r):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=fp(u.digest);d&&(u=d)}let r=u!==void 0?w.createElement(il.Provider,{value:this.props.routeContext},w.createElement(Tr.Provider,{value:u,children:this.props.component})):this.props.children;return this.context?w.createElement(gp,{error:u},r):r}};Ch.contextType=ip;var mr=new WeakMap;function gp({children:u,error:r}){let{basename:d}=w.useContext(Bt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=dp(r.digest);if(c){let m=mr.get(r);if(m)throw m;let x=bh(c.location,d);if(gh&&!mr.get(r))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 mr.set(r,f),f}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return u}function bp({routeContext:u,match:r,children:d}){let c=w.useContext(fn);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(il.Provider,{value:u},d)}function yp(u,r=[],d=null,c=null,m=null){if(u==null){if(!d)return null;if(d.errors)u=d.matches;else if(r.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);Ze(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:R,errors:q}=d,z=y.route.loader&&!R.hasOwnProperty(y.route.id)&&(!q||q[y.route.id]===void 0);if(y.route.lazy||z){p=!0,b>=0?x=x.slice(0,b+1):x=[x[0]];break}}}let v=d&&c?(g,y)=>{var R,q;c(g,{location:d.location,params:((q=(R=d.matches)==null?void 0:R[0])==null?void 0:q.params)??{},unstable_pattern:np(d.matches),errorInfo:y})}:void 0;return x.reduceRight((g,y,R)=>{let q,z=!1,O=null,k=null;d&&(q=f&&y.route.id?f[y.route.id]:void 0,O=y.route.errorElement||pp,p&&(b<0&&R===0?(Th("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,k=null):b===R&&(z=!0,k=y.route.hydrateFallbackElement||null)));let E=r.concat(x.slice(0,R+1)),L=()=>{let Y;return q?Y=O:z?Y=k:y.route.Component?Y=w.createElement(y.route.Component,null):y.route.element?Y=y.route.element:Y=g,w.createElement(bp,{match:y,routeContext:{outlet:g,matches:E,isDataRoute:d!=null},children:Y})};return d&&(y.route.ErrorBoundary||y.route.errorElement||R===0)?w.createElement(Ch,{location:d.location,revalidation:d.revalidation,component:O,error:q,children:L(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:v}):L()},null)}function Mr(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jp(u){let r=w.useContext(fn);return Ze(r,Mr(u)),r}function Sp(u){let r=w.useContext(Xi);return Ze(r,Mr(u)),r}function Np(u){let r=w.useContext(il);return Ze(r,Mr(u)),r}function Ar(u){let r=Np(u),d=r.matches[r.matches.length-1];return Ze(d.route.id,`${u} can only be used on routes that contain a unique "id"`),d.route.id}function Ep(){return Ar("useRouteId")}function wp(){var c;let u=w.useContext(Tr),r=Sp("useRouteError"),d=Ar("useRouteError");return u!==void 0?u:(c=r.errors)==null?void 0:c[d]}function Cp(){let{router:u}=jp("useNavigate"),r=Ar("useNavigate"),d=w.useRef(!1);return Eh(()=>{d.current=!0}),w.useCallback(async(m,x={})=>{Ft(d.current,Nh),d.current&&(typeof m=="number"?await u.navigate(m):await u.navigate(m,{fromRouteId:r,...x}))},[u,r])}var Im={};function Th(u,r,d){!r&&!Im[u]&&(Im[u]=!0,Ft(!1,d))}w.memo(Tp);function Tp({routes:u,future:r,state:d,onError:c}){return wh(u,void 0,d,c,r)}function Rp({to:u,replace:r,state:d,relative:c}){Ze(mn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=w.useContext(Bt);Ft(!m,"<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}=w.useContext(il),{pathname:f}=la(),p=Rr(),b=Cr(u,wr(x),f,c==="path"),v=JSON.stringify(b);return w.useEffect(()=>{p(JSON.parse(v),{replace:r,state:d,relative:c})},[p,v,c,r,d]),null}function wl(u){Ze(!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 Mp({basename:u="/",children:r=null,location:d,navigationType:c="POP",navigator:m,static:x=!1,unstable_useTransitions:f}){Ze(!mn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=u.replace(/^\/*/,"/"),b=w.useMemo(()=>({basename:p,navigator:m,static:x,unstable_useTransitions:f,future:{}}),[p,m,x,f]);typeof d=="string"&&(d=Sa(d));let{pathname:v="/",search:g="",hash:y="",state:R=null,key:q="default"}=d,z=w.useMemo(()=>{let O=Tl(v,p);return O==null?null:{location:{pathname:O,search:g,hash:y,state:R,key:q},navigationType:c}},[p,v,g,y,R,q,c]);return Ft(z!=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.`),z==null?null:w.createElement(Bt.Provider,{value:b},w.createElement(vs.Provider,{children:r,value:z}))}function Ap({children:u,location:r}){return xp(br(u),r)}function br(u,r=[]){let d=[];return w.Children.forEach(u,(c,m)=>{if(!w.isValidElement(c))return;let x=[...r,m];if(c.type===w.Fragment){d.push.apply(d,br(c.props.children,x));return}Ze(c.type===wl,`[${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>`),Ze(!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=br(c.props.children,x)),d.push(f)}),d}var Li="get",ki="application/x-www-form-urlencoded";function Vi(u){return typeof HTMLElement<"u"&&u instanceof HTMLElement}function _p(u){return Vi(u)&&u.tagName.toLowerCase()==="button"}function Dp(u){return Vi(u)&&u.tagName.toLowerCase()==="form"}function zp(u){return Vi(u)&&u.tagName.toLowerCase()==="input"}function Op(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Up(u,r){return u.button===0&&(!r||r==="_self")&&!Op(u)}var qi=null;function qp(){if(qi===null)try{new FormData(document.createElement("form"),0),qi=!1}catch{qi=!0}return qi}var Bp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hr(u){return u!=null&&!Bp.has(u)?(Ft(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ki}"`),null):u}function Hp(u,r){let d,c,m,x,f;if(Dp(u)){let p=u.getAttribute("action");c=p?Tl(p,r):null,d=u.getAttribute("method")||Li,m=hr(u.getAttribute("enctype"))||ki,x=new FormData(u)}else if(_p(u)||zp(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?Tl(b,r):null,d=u.getAttribute("formmethod")||p.getAttribute("method")||Li,m=hr(u.getAttribute("formenctype"))||hr(p.getAttribute("enctype"))||ki,x=new FormData(p,u),!qp()){let{name:v,type:g,value:y}=u;if(g==="image"){let R=v?`${v}.`:"";x.append(`${R}x`,"0"),x.append(`${R}y`,"0")}else v&&x.append(v,y)}}else{if(Vi(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Li,c=null,m=ki,f=u}return x&&m==="text/plain"&&(f=x,x=void 0),{action:c,method:d.toLowerCase(),encType:m,formData:x,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function _r(u,r){if(u===!1||u===null||typeof u>"u")throw new Error(r)}function Lp(u,r,d,c){let m=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return d?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${c}`:m.pathname=`${m.pathname}.${c}`:m.pathname==="/"?m.pathname=`_root.${c}`:r&&Tl(m.pathname,r)==="/"?m.pathname=`${r.replace(/\/$/,"")}/_root.${c}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${c}`,m}async function kp(u,r){if(u.id in r)return r[u.id];try{let d=await import(u.module);return r[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 Yp(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 Gp(u,r,d){let c=await Promise.all(u.map(async m=>{let x=r.routes[m.route.id];if(x){let f=await kp(x,d);return f.links?f.links():[]}return[]}));return Zp(c.flat(1).filter(Yp).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function eh(u,r,d,c,m,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"?r.filter((b,v)=>f(b,v)||p(b,v)):x==="data"?r.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 R=b.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.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 R=="boolean")return R}return!0}):[]}function Qp(u,r,{includeHydrateFallback:d}={}){return Xp(u.map(c=>{let m=r.routes[c.route.id];if(!m)return[];let x=[m.module];return m.clientActionModule&&(x=x.concat(m.clientActionModule)),m.clientLoaderModule&&(x=x.concat(m.clientLoaderModule)),d&&m.hydrateFallbackModule&&(x=x.concat(m.hydrateFallbackModule)),m.imports&&(x=x.concat(m.imports)),x}).flat(1))}function Xp(u){return[...new Set(u)]}function Vp(u){let r={},d=Object.keys(u).sort();for(let c of d)r[c]=u[c];return r}function Zp(u,r){let d=new Set;return new Set(r),u.reduce((c,m)=>{let x=JSON.stringify(Vp(m));return d.has(x)||(d.add(x),c.push({key:x,link:m})),c},[])}function Rh(){let u=w.useContext(fn);return _r(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function $p(){let u=w.useContext(Xi);return _r(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Dr=w.createContext(void 0);Dr.displayName="FrameworkContext";function Mh(){let u=w.useContext(Dr);return _r(u,"You must render this element inside a <HydratedRouter> element"),u}function Kp(u,r){let d=w.useContext(Dr),[c,m]=w.useState(!1),[x,f]=w.useState(!1),{onFocus:p,onBlur:b,onMouseEnter:v,onMouseLeave:g,onTouchStart:y}=r,R=w.useRef(null);w.useEffect(()=>{if(u==="render"&&f(!0),u==="viewport"){let O=E=>{E.forEach(L=>{f(L.isIntersecting)})},k=new IntersectionObserver(O,{threshold:.5});return R.current&&k.observe(R.current),()=>{k.disconnect()}}},[u]),w.useEffect(()=>{if(c){let O=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(O)}}},[c]);let q=()=>{m(!0)},z=()=>{m(!1),f(!1)};return d?u!=="intent"?[x,R,{}]:[x,R,{onFocus:os(p,q),onBlur:os(b,z),onMouseEnter:os(v,q),onMouseLeave:os(g,z),onTouchStart:os(y,q)}]:[!1,R,{}]}function os(u,r){return d=>{u&&u(d),d.defaultPrevented||r(d)}}function Jp({page:u,...r}){let{router:d}=Rh(),c=w.useMemo(()=>xh(d.routes,u,d.basename),[d.routes,u,d.basename]);return c?w.createElement(Wp,{page:u,matches:c,...r}):null}function Fp(u){let{manifest:r,routeModules:d}=Mh(),[c,m]=w.useState([]);return w.useEffect(()=>{let x=!1;return Gp(u,r,d).then(f=>{x||m(f)}),()=>{x=!0}},[u,r,d]),c}function Wp({page:u,matches:r,...d}){let c=la(),{future:m,manifest:x,routeModules:f}=Mh(),{basename:p}=Rh(),{loaderData:b,matches:v}=$p(),g=w.useMemo(()=>eh(u,r,v,x,c,"data"),[u,r,v,x,c]),y=w.useMemo(()=>eh(u,r,v,x,c,"assets"),[u,r,v,x,c]),R=w.useMemo(()=>{if(u===c.pathname+c.search+c.hash)return[];let O=new Set,k=!1;if(r.forEach(L=>{var le;let Y=x.routes[L.route.id];!Y||!Y.hasLoader||(!g.some(U=>U.route.id===L.route.id)&&L.route.id in b&&((le=f[L.route.id])!=null&&le.shouldRevalidate)||Y.hasClientLoader?k=!0:O.add(L.route.id))}),O.size===0)return[];let E=Lp(u,p,m.unstable_trailingSlashAwareDataRequests,"data");return k&&O.size>0&&E.searchParams.set("_routes",r.filter(L=>O.has(L.route.id)).map(L=>L.route.id).join(",")),[E.pathname+E.search]},[p,m.unstable_trailingSlashAwareDataRequests,b,c,x,g,r,u,f]),q=w.useMemo(()=>Qp(y,x),[y,x]),z=Fp(y);return w.createElement(w.Fragment,null,R.map(O=>w.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...d})),q.map(O=>w.createElement("link",{key:O,rel:"modulepreload",href:O,...d})),z.map(({key:O,link:k})=>w.createElement("link",{key:O,nonce:d.nonce,...k,crossOrigin:k.crossOrigin??d.crossOrigin})))}function Pp(...u){return r=>{u.forEach(d=>{typeof d=="function"?d(r):d!=null&&(d.current=r)})}}var Ip=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ip&&(window.__reactRouterVersion="7.13.0")}catch{}function eg({basename:u,children:r,unstable_useTransitions:d,window:c}){let m=w.useRef();m.current==null&&(m.current=zv({window:c,v5Compat:!0}));let x=m.current,[f,p]=w.useState({action:x.action,location:x.location}),b=w.useCallback(v=>{d===!1?p(v):w.startTransition(()=>p(v))},[d]);return w.useLayoutEffect(()=>x.listen(b),[x,b]),w.createElement(Mp,{basename:u,children:r,location:f.location,navigationType:f.action,navigator:x,unstable_useTransitions:d})}var Ah=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_h=w.forwardRef(function({onClick:r,discover:d="render",prefetch:c="none",relative:m,reloadDocument:x,replace:f,state:p,target:b,to:v,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:R,...q},z){let{basename:O,unstable_useTransitions:k}=w.useContext(Bt),E=typeof v=="string"&&Ah.test(v),L=bh(v,O);v=L.to;let Y=mp(v,{relative:m}),[le,U,re]=Kp(c,q),F=ag(v,{replace:f,state:p,target:b,preventScrollReset:g,relative:m,viewTransition:y,unstable_defaultShouldRevalidate:R,unstable_useTransitions:k});function I(Z){r&&r(Z),Z.defaultPrevented||F(Z)}let ue=w.createElement("a",{...q,...re,href:L.absoluteURL||Y,onClick:L.isExternal||x?r:I,ref:Pp(z,U),target:b,"data-discover":!E&&d==="render"?"true":void 0});return le&&!E?w.createElement(w.Fragment,null,ue,w.createElement(Jp,{page:Y})):ue});_h.displayName="Link";var Dh=w.forwardRef(function({"aria-current":r="page",caseSensitive:d=!1,className:c="",end:m=!1,style:x,to:f,viewTransition:p,children:b,...v},g){let y=ps(f,{relative:v.relative}),R=la(),q=w.useContext(Xi),{navigator:z,basename:O}=w.useContext(Bt),k=q!=null&&cg(y)&&p===!0,E=z.encodeLocation?z.encodeLocation(y).pathname:y.pathname,L=R.pathname,Y=q&&q.navigation&&q.navigation.location?q.navigation.location.pathname:null;d||(L=L.toLowerCase(),Y=Y?Y.toLowerCase():null,E=E.toLowerCase()),Y&&O&&(Y=Tl(Y,O)||Y);const le=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let U=L===E||!m&&L.startsWith(E)&&L.charAt(le)==="/",re=Y!=null&&(Y===E||!m&&Y.startsWith(E)&&Y.charAt(E.length)==="/"),F={isActive:U,isPending:re,isTransitioning:k},I=U?r:void 0,ue;typeof c=="function"?ue=c(F):ue=[c,U?"active":null,re?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let Z=typeof x=="function"?x(F):x;return w.createElement(_h,{...v,"aria-current":I,className:ue,ref:g,style:Z,to:f,viewTransition:p},typeof b=="function"?b(F):b)});Dh.displayName="NavLink";var tg=w.forwardRef(({discover:u="render",fetcherKey:r,navigate:d,reloadDocument:c,replace:m,state:x,method:f=Li,action:p,onSubmit:b,relative:v,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:R,...q},z)=>{let{unstable_useTransitions:O}=w.useContext(Bt),k=ig(),E=ug(p,{relative:v}),L=f.toLowerCase()==="get"?"get":"post",Y=typeof p=="string"&&Ah.test(p),le=U=>{if(b&&b(U),U.defaultPrevented)return;U.preventDefault();let re=U.nativeEvent.submitter,F=(re==null?void 0:re.getAttribute("formmethod"))||f,I=()=>k(re||U.currentTarget,{fetcherKey:r,method:F,navigate:d,replace:m,state:x,relative:v,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:R});O&&d!==!1?w.startTransition(()=>I()):I()};return w.createElement("form",{ref:z,method:L,action:E,onSubmit:c?b:le,...q,"data-discover":!Y&&u==="render"?"true":void 0})});tg.displayName="Form";function lg(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zh(u){let r=w.useContext(fn);return Ze(r,lg(u)),r}function ag(u,{target:r,replace:d,state:c,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:p,unstable_useTransitions:b}={}){let v=Rr(),g=la(),y=ps(u,{relative:x});return w.useCallback(R=>{if(Up(R,r)){R.preventDefault();let q=d!==void 0?d:xs(g)===xs(y),z=()=>v(u,{replace:q,state:c,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:p});b?w.startTransition(()=>z()):z()}},[g,v,y,d,c,r,u,m,x,f,p,b])}var ng=0,sg=()=>`__${String(++ng)}__`;function ig(){let{router:u}=zh("useSubmit"),{basename:r}=w.useContext(Bt),d=Ep(),c=u.fetch,m=u.navigate;return w.useCallback(async(x,f={})=>{let{action:p,method:b,encType:v,formData:g,body:y}=Hp(x,r);if(f.navigate===!1){let R=f.fetcherKey||sg();await c(R,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 m(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,m,r,d])}function ug(u,{relative:r}={}){let{basename:d}=w.useContext(Bt),c=w.useContext(il);Ze(c,"useFormAction must be used inside a RouteContext");let[m]=c.matches.slice(-1),x={...ps(u||".",{relative:r})},f=la();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===".")&&m.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(x.pathname=x.pathname==="/"?d:Cl([d,x.pathname])),xs(x)}function cg(u,{relative:r}={}){let d=w.useContext(jh);Ze(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=zh("useViewTransitionState"),m=ps(u,{relative:r});if(!d.isTransitioning)return!1;let x=Tl(d.currentLocation.pathname,c)||d.currentLocation.pathname,f=Tl(d.nextLocation.pathname,c)||d.nextLocation.pathname;return Yi(m.pathname,f)!=null||Yi(m.pathname,x)!=null}var rg=hh();const og=Nr(rg);/**
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 Oh=(...u)=>u.filter((r,d,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===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 dg=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 fg=u=>u.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,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 th=u=>{const r=fg(u);return r.charAt(0).toUpperCase()+r.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 mg={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 hg=u=>{for(const r in u)if(r.startsWith("aria-")||r==="role"||r==="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 xg=w.forwardRef(({color:u="currentColor",size:r=24,strokeWidth:d=2,absoluteStrokeWidth:c,className:m="",children:x,iconNode:f,...p},b)=>w.createElement("svg",{ref:b,...mg,width:r,height:r,stroke:u,strokeWidth:c?Number(d)*24/Number(r):d,className:Oh("lucide",m),...!x&&!hg(p)&&{"aria-hidden":"true"},...p},[...f.map(([v,g])=>w.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 oe=(u,r)=>{const d=w.forwardRef(({className:c,...m},x)=>w.createElement(xg,{ref:x,iconNode:r,className:Oh(`lucide-${dg(th(u))}`,`lucide-${u}`,c),...m}));return d.displayName=th(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 vg=[["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"}]],Uh=oe("activity",vg);/**
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 pg=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],gg=oe("arrow-down",pg);/**
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 bg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],lh=oe("arrow-right",bg);/**
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 yg=[["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"}]],jg=oe("arrow-up-down",yg);/**
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 Sg=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Ng=oe("arrow-up",Sg);/**
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 Eg=[["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"}]],wg=oe("bell",Eg);/**
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 Cg=[["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"}]],ah=oe("briefcase",Cg);/**
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 Tg=[["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"}]],zr=oe("calendar",Tg);/**
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 Rg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yr=oe("check",Rg);/**
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 Mg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qh=oe("chevron-down",Mg);/**
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 Ag=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_g=oe("chevron-left",Ag);/**
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 Dg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zg=oe("chevron-right",Dg);/**
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 Og=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ug=oe("chevron-up",Og);/**
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 qg=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Bg=oe("chevrons-up-down",qg);/**
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 Hg=[["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"}]],Rl=oe("circle-alert",Hg);/**
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 Lg=[["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"}]],nh=oe("circle-arrow-down",Lg);/**
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 kg=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],gs=oe("circle-check-big",kg);/**
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 Yg=[["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"}]],Gg=oe("circle-x",Yg);/**
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 Qg=[["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"}]],sh=oe("clipboard-list",Qg);/**
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 Xg=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Gi=oe("clock",Xg);/**
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 Vg=[["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"}]],Bh=oe("external-link",Vg);/**
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 Zg=[["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"}]],$g=oe("eye-off",Zg);/**
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:"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"}]],Jg=oe("eye",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 Fg=[["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"}]],jr=oe("file-text",Fg);/**
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 Wg=[["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"}]],Pg=oe("git-pull-request",Wg);/**
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 Ig=[["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"}]],eb=oe("house",Ig);/**
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 tb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],lb=oe("info",tb);/**
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 ab=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],nb=oe("kanban",ab);/**
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 sb=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hh=oe("loader-circle",sb);/**
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 ib=[["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"}]],Lh=oe("map",ib);/**
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 ub=[["path",{d:"M5 12h14",key:"1ays0h"}]],cb=oe("minus",ub);/**
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 rb=[["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"}]],kh=oe("pause",rb);/**
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 ob=[["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"}]],Or=oe("pen",ob);/**
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 db=[["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"}]],Zi=oe("play",db);/**
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 fb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],hn=oe("plus",fb);/**
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 mb=[["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"}]],Yh=oe("rotate-ccw",mb);/**
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 hb=[["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"}]],xb=oe("save",hb);/**
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 vb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$i=oe("search",vb);/**
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 pb=[["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"}]],gb=oe("settings",pb);/**
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 bb=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ih=oe("square",bb);/**
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 yb=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],jb=oe("terminal",yb);/**
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 Sb=[["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"}]],Nb=oe("test-tube-diagonal",Sb);/**
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 Eb=[["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"}]],Ur=oe("trash-2",Eb);/**
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 wb=[["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"}]],Gh=oe("triangle-alert",wb);/**
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 Cb=[["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"}]],Tb=oe("wifi",Cb);/**
326
+ * @license lucide-react v0.564.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const Rb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xn=oe("x",Rb),qr="";let Qh=!1,Sr=null;function Mb(u){Qh=u}function Ab(u){Sr=u}function _b(u){return encodeURIComponent(u.replace(/\//g,"~"))}function at(u){return Qh&&Sr?u.replace("/api/",`/api/projects/${_b(Sr)}/`):u}function Db(){return nt("/api/mode")}function zb(){return nt("/api/projects")}async function nt(u,r){const d=`${qr}${u}`,c=await fetch(d,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!c.ok){const m=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${c.status}: ${c.statusText}`)}return c.json()}function xr(){return nt(at("/api/status"))}function Xh(){return nt(at("/api/prs"))}function Ob(u,r){const d=`?lines=${encodeURIComponent(r)}`;return nt(at(`/api/logs/${encodeURIComponent(u)}${d}`))}function Vh(){return nt(at("/api/config"))}function ja(u){return nt(at("/api/config"),{method:"PUT",body:JSON.stringify(u)})}function Ub(){return nt(at("/api/doctor"))}function Zh(){return nt(at("/api/schedule-info"))}function qb(){return nt(at("/api/actions/review"),{method:"POST"})}function hs(){return nt(at("/api/actions/install-cron"),{method:"POST"})}function Bb(){return nt(at("/api/actions/uninstall-cron"),{method:"POST"})}function Hb(u="all"){return nt(at("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:u})})}const ta=["Draft","Ready","In Progress","Review","Done"];function $h(){return nt(at("/api/board/status"))}function Lb(u){return nt(at("/api/board/issues"),{method:"POST",body:JSON.stringify(u)})}function Kh(u,r){return nt(at(`/api/board/issues/${u}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function kb(u){const r=`${qr}${at(`/api/board/issues/${u}`)}`,d=await fetch(r,{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 Yb(){return nt(at("/api/actions/clear-lock"),{method:"POST"})}function Gb(u,r=[],d){const c=(d==null?void 0:d.enabled)??!0,m=w.useRef(u);m.current=u,w.useEffect(()=>{if(!c)return;const x=`${qr}${at("/api/status/events")}`,f=new EventSource(x);return f.addEventListener("status_changed",p=>{try{const b=JSON.parse(p.data);m.current(b)}catch{}}),()=>{f.close()}},[c,...r])}function Qb(){return nt(at("/api/roadmap"))}function Xb(){return nt(at("/api/roadmap/scan"),{method:"POST"})}function Jh(u){return nt(at("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:u})})}function el(u,r=[],d){const c=(d==null?void 0:d.enabled)??!0,[m,x]=w.useState(null),[f,p]=w.useState(!0),[b,v]=w.useState(null),g=w.useRef(u);g.current=u;const y=w.useRef(()=>{(async()=>{v(null);try{const q=await g.current();x(q)}catch(q){v(q instanceof Error?q:new Error("Unknown error"))}})()});return y.current=y.current.bind(y),w.useEffect(()=>{if(!c)return;let R=!1;return p(!0),v(null),(async()=>{try{const z=await g.current();R||x(z)}catch(z){R||v(z instanceof Error?z:new Error("Unknown error"))}finally{R||p(!1)}})(),()=>{R=!0}},[...r,c]),{data:m,loading:f,error:b,refetch:y.current}}const uh=u=>{let r;const d=new Set,c=(v,g)=>{const y=typeof v=="function"?v(r):v;if(!Object.is(y,r)){const R=r;r=g??(typeof y!="object"||y===null)?y:Object.assign({},r,y),d.forEach(q=>q(r,R))}},m=()=>r,p={setState:c,getState:m,getInitialState:()=>b,subscribe:v=>(d.add(v),()=>d.delete(v))},b=r=u(c,m,p);return p},Vb=u=>u?uh(u):uh,Zb=u=>u;function $b(u,r=Zb){const d=ge.useSyncExternalStore(u.subscribe,()=>r(u.getState()),()=>r(u.getInitialState()));return ge.useDebugValue(d),d}const ch=u=>{const r=Vb(u),d=c=>$b(r,c);return Object.assign(d,r),d},Kb=u=>u?ch(u):ch,Jb=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,xt=Kb(u=>({projectName:"Night Watch",setProjectName:r=>u({projectName:r}),toasts:[],addToast:r=>{const d=Math.random().toString(36).substring(7);u(c=>({toasts:[...c.toasts,{...r,id:d}]})),setTimeout(()=>{u(c=>({toasts:c.toasts.filter(m=>m.id!==d)}))},5e3)},removeToast:r=>u(d=>({toasts:d.toasts.filter(c=>c.id!==r)})),status:null,setStatus:r=>u(d=>!d.status||new Date(r.timestamp)>new Date(d.status.timestamp)?{status:r}:d),globalModeLoading:!0,setGlobalModeLoading:r=>u({globalModeLoading:r}),isGlobalMode:!1,setGlobalMode:r=>{Mb(r),u({isGlobalMode:r})},projects:[],setProjects:r=>u({projects:r}),selectedProjectId:Jb,selectProject:r=>{Ab(r),r?localStorage.setItem("nw-selected-project",r):localStorage.removeItem("nw-selected-project"),u(d=>{const c=d.projects.find(m=>m.name===r);return{selectedProjectId:r,...c?{projectName:c.name}:{}}})}})),Fb=()=>{const[u,r]=w.useState(!1),{projectName:d,isGlobalMode:c,projects:m,selectedProjectId:x,selectProject:f,globalModeLoading:p}=xt(),{data:b}=el(Xh,[x],{enabled:!p}),v=(b==null?void 0:b.length)??0,g=w.useMemo(()=>[{icon:eb,label:"Dashboard",path:"/",section:"Overview"},{icon:jb,label:"Logs",path:"/logs"},{icon:nb,label:"Board",path:"/board",section:"Work"},{icon:Pg,label:"Pull Requests",path:"/prs",badge:v},{icon:Lh,label:"Roadmap",path:"/roadmap"},{icon:zr,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:gb,label:"Settings",path:"/settings",section:"Config"}],[v]);return s.jsxs("aside",{className:`
331
+ relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
332
+ ${u?"w-20":"w-72"} h-screen flex-shrink-0 z-50
333
+ bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
334
+ `,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${u?"items-center justify-center flex":""}`,children:u?s.jsx("div",{className:"relative group",children:s.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"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:c?"Projects":"Workspace"}),c?s.jsxs("div",{className:"relative",children:[s.jsx(ah,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.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:m.filter(y=>y.valid).map(y=>s.jsx("option",{value:y.name,children:y.name},y.name))}),s.jsx(Bg,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):s.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:[s.jsx(ah,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:d})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:g.map(y=>s.jsxs(ge.Fragment,{children:[y.section&&!u&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:y.section}),s.jsx("li",{children:s.jsx(Dh,{to:y.path,className:({isActive:R})=>`
335
+ flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
336
+ ${R?"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"}
337
+ ${u?"justify-center":""}
338
+ `,children:({isActive:R})=>s.jsxs(s.Fragment,{children:[s.jsx(y.icon,{className:`h-5 w-5 transition-colors ${R?"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&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:y.label}),y.badge&&(u?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${R?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:y.badge})),R&&!u&&s.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&&s.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))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!u),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:u?s.jsx(zg,{className:"h-5 w-5"}):s.jsx(_g,{className:"h-5 w-5"})})})]})},Wb=()=>{const{projectName:u}=xt();return s.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:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:u})]}),s.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),s.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:[s.jsx(Tb,{className:"h-3.5 w-3.5"}),s.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),s.jsxs("div",{className:"flex items-center space-x-5",children:[s.jsxs("div",{className:"relative hidden md:block group",children:[s.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]"}),s.jsx($i,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),s.jsx("div",{className:"flex items-center space-x-3",children:s.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[s.jsx(wg,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),s.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"})]})]})},Pb=({toast:u,onDismiss:r})=>{const d={success:s.jsx(gs,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Rl,{className:"h-5 w-5 text-red-400"}),info:s.jsx(lb,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Gh,{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 s.jsx("div",{className:`
339
+ pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
340
+ bg-slate-900 border border-slate-800 border-l-4 ${c[u.type]}
341
+ shadow-lg ring-1 ring-black ring-opacity-5 transition-all
342
+ animate-in slide-in-from-right-full fade-in duration-300
343
+ `,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:d[u.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:u.title}),u.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:u.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.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:()=>r(u.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(xn,{className:"h-5 w-5"})]})})]})})})},Ib=()=>{const{toasts:u,removeToast:r}=xt();return s.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=>s.jsx(Pb,{toast:d,onDismiss:r},d.id))})};function ey(){const{setGlobalMode:u,setGlobalModeLoading:r,setProjects:d,selectProject:c,selectedProjectId:m}=xt();w.useEffect(()=>{r(!0),Db().then(async({globalMode:x})=>{if(u(x),!x)return;const f=await zb();d(f);const p=f.filter(b=>b.valid);m&&p.some(b=>b.name===m)?c(m):p.length>0&&c(p[0].name)}).catch(()=>{u(!1)}).finally(()=>{r(!1)})},[])}function rh(u){if(!(u!=null&&u.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(u.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function Bi(u,r){return u?r?rh(u)>=rh(r)?u:r:u:r}function ty(){const{setStatus:u,setProjectName:r,selectedProjectId:d,globalModeLoading:c,status:m}=xt(),x=w.useRef(null);x.current=xt.getState().status,Gb(f=>{Bi(f,x.current)===f&&u(f)},[d,c],{enabled:!c}),w.useEffect(()=>{if(c)return;xr().then(p=>{Bi(p,x.current)===p&&u(p)}).catch(()=>{});const f=setInterval(()=>{xr().then(p=>{Bi(p,x.current)===p&&u(p)}).catch(()=>{})},3e4);return()=>clearInterval(f)},[d,c,u]),w.useEffect(()=>{const f=()=>{xr().then(p=>{Bi(p,x.current)===p&&u(p)}).catch(()=>{})};return window.addEventListener("focus",f),()=>window.removeEventListener("focus",f)},[d,u]),w.useEffect(()=>{m!=null&&m.projectName&&r(m.projectName)},[m==null?void 0:m.projectName,r])}const ze=({children:u,className:r="",onClick:d})=>s.jsxs("div",{className:`
344
+ relative bg-[#0b101b] rounded-xl border border-white/5
345
+ shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
346
+ transition-all duration-300
347
+ ${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
348
+ ${r}
349
+ `,onClick:d,children:[d&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:u})]}),Le=({children:u,variant:r="primary",size:d="md",loading:c=!1,className:m="",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 s.jsxs("button",{className:`${p} ${b[r]} ${v[d]} ${m}`,disabled:x||c,...f,children:[c&&s.jsx(Hh,{className:"mr-2 h-4 w-4 animate-spin"}),u]})},on=({children:u,variant:r="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 s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${c[r]} ${d}`,children:u})},Fh={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"}},ly=({defaultColumn:u,onClose:r,onCreated:d})=>{const[c,m]=w.useState(""),[x,f]=w.useState(""),[p,b]=w.useState(u),[v,g]=w.useState(!1),[y,R]=w.useState(null),{addToast:q}=xt(),z=async O=>{if(O.preventDefault(),!!c.trim()){g(!0),R(null);try{await Lb({title:c.trim(),body:x,column:p}),q({title:"Issue created",message:`"${c.trim()}" added to ${p}`,type:"success"}),d(),r()}catch(k){R(k instanceof Error?k.message:"Failed to create issue")}finally{g(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(xn,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:z,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:c,onChange:O=>m(O.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"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:p,onChange:O=>b(O.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:ta.map(O=>s.jsx("option",{value:O,children:O},O))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:x,onChange:O=>f(O.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&&s.jsx("p",{className:"text-sm text-red-400",children:y}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Le,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Le,{type:"submit",disabled:v||!c.trim(),children:v?"Creating...":"Create Issue"})]})]})]})]})},ay=({issue:u,onClose:r,onMoved:d,onClosed:c})=>{const[m,x]=w.useState(!1),[f,p]=w.useState(!1),{addToast:b}=xt(),v=async R=>{if(R!==u.column){x(!0);try{await Kh(u.number,R),b({title:"Issue moved",message:`#${u.number} moved to ${R}`,type:"success"}),d(),r()}catch(q){b({title:"Move failed",message:q instanceof Error?q.message:"Failed to move issue",type:"error"})}finally{x(!1)}}},g=async()=>{if(confirm(`Close issue #${u.number}: "${u.title}"?`)){p(!0);try{await kb(u.number),b({title:"Issue closed",message:`#${u.number} closed on GitHub`,type:"success"}),c(),r()}catch(R){b({title:"Close failed",message:R instanceof Error?R.message:"Failed to close issue",type:"error"})}finally{p(!1)}}},y=u.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",u.number]}),s.jsx(on,{variant:Fh[y].badge,children:y})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:u.title}),u.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",u.assignees.join(", ")]})]}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(xn,{className:"h-5 w-5"})})]}),s.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:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),ta.filter(R=>R!==u.column).map(R=>s.jsx("button",{onClick:()=>v(R),disabled:m,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:R},R))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[u.url&&!u.url.startsWith("local://")&&s.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:[s.jsx(Bh,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.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"})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:u.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:u.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},ny=({issue:u,onClick:r,onDragStart:d})=>{const[c,m]=w.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:x=>{x.dataTransfer.setData("issueNumber",String(u.number)),x.dataTransfer.effectAllowed="move",m(!0),d(u)},onDragEnd:()=>m(!1),children:s.jsxs(ze,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${c?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",u.number]}),s.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&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:u.assignees.join(", ")})]})})},sy=({name:u,issues:r,draggingIssue:d,onIssueClick:c,onNewIssue:m,onMoveIssue:x,onDragStart:f})=>{const p=Fh[u],[b,v]=w.useState(!1),g=d!==null&&d.column!==u;return s.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:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${p.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:u}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:r.length})]}),s.jsx("button",{onClick:()=>m(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:s.jsx(hn,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:r.length===0?s.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:s.jsx("span",{className:"text-xs text-slate-700",children:b&&g?"Drop here":"No issues"})}):r.map(y=>s.jsx(ny,{issue:y,onClick:()=>c(y),onDragStart:f},y.id))})]})},iy=()=>{const[u,r]=w.useState(null),[d,c]=w.useState(null),[m,x]=w.useState(null),[f,p]=w.useState(null),b=w.useRef(!1),{addToast:v,selectedProjectId:g,globalModeLoading:y}=xt(),{data:R,loading:q,error:z,refetch:O}=el($h,[g],{enabled:!y});w.useEffect(()=>{const L=setInterval(()=>{b.current||O()},3e4);return()=>clearInterval(L)},[O]);const k=w.useCallback(async(L,Y)=>{x(null);const le=f??(R==null?void 0:R.columns);if(!le)return;const U=le,re={};for(const I of ta)re[I]=(le[I]??[]).filter(ue=>ue.number!==L.number);const F={...L,column:Y};re[Y]=[...re[Y]??[],F],p(re),r(I=>(I==null?void 0:I.number)===L.number?F:I),b.current=!0;try{await Kh(L.number,Y),O(),setTimeout(()=>{p(null),b.current=!1},800)}catch(I){p(U),r(ue=>(ue==null?void 0:ue.number)===L.number?L:ue),b.current=!1,v({title:"Move failed",message:I instanceof Error?I.message:"Failed to move issue",type:"error"})}},[v,O,f,R]);if(y||q)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(z&&z.message.includes("Board not configured"))return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"📋"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),s.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",s.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(z)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),s.jsx("div",{className:"text-sm text-slate-500",children:z.message}),s.jsx(Le,{onClick:()=>O(),children:"Retry"})]});if(!R)return null;const E=f??R.columns;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),s.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[ta.reduce((L,Y)=>{var le;return L+(((le=E[Y])==null?void 0:le.length)??0)},0)," issues across ",ta.length," columns"]})]}),s.jsxs(Le,{onClick:()=>c("Ready"),children:[s.jsx(hn,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>x(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${ta.length*236}px`},children:ta.map(L=>s.jsx(sy,{name:L,issues:E[L]??[],draggingIssue:m,onIssueClick:r,onNewIssue:c,onMoveIssue:k,onDragStart:x},L))})}),u&&s.jsx(ay,{issue:u,onClose:()=>r(null),onMoved:()=>O(),onClosed:()=>O()}),d&&s.jsx(ly,{defaultColumn:d,onClose:()=>c(null),onCreated:()=>O()})]})},uy=[{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"}],cy=({processes:u,activePrd:r,onCancelProcess:d,onForceClear:c,onViewLog:m,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 s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:uy.map(v=>{const g=p(v.processName),y=(g==null?void 0:g.running)??!1,R=g==null?void 0:g.pid,q=x===v.cancelType,z=y&&v.cancelType,O=!y&&v.name==="executor"&&r,k=y?R?`PID: ${R}`:v.runningLabel:v.idleLabel,E=y&&v.name==="executor"&&r?b(r,20):null;return s.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:[s.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"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${y?"text-slate-200":"text-slate-400"}`,children:v.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:E?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(jr,{className:"h-3 w-3 flex-shrink-0"}),E]}):k})]}),s.jsxs("div",{className:"flex-shrink-0",children:[z&&s.jsx("button",{onClick:()=>v.cancelType&&d(v.cancelType),disabled:q,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:s.jsx(ih,{className:"h-3.5 w-3.5"})}),O&&s.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:s.jsx(ih,{className:"h-3.5 w-3.5"})}),!z&&!O&&y&&s.jsx("button",{onClick:m,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(jr,{className:"h-3.5 w-3.5"})})]})]},v.name)})})},ry={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"},oy=()=>{var re,F;const u=Rr(),[r,d]=w.useState(null),[c,m]=w.useState(!1),{setProjectName:x,addToast:f,selectedProjectId:p,globalModeLoading:b,status:v}=xt(),{data:g}=el(Zh,[p],{enabled:!b}),{data:y}=el(()=>$h().catch(()=>null),[p],{enabled:!b}),R=v;if(ge.useEffect(()=>{R!=null&&R.projectName&&x(R.projectName)},[R,x]),b)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!R)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const q=R.prs.length,z=R.prs.filter(I=>I.reviewScore!==null&&I.reviewScore<70).length,O=((re=y==null?void 0:y.columns.Ready)==null?void 0:re.length)??0,k=((F=y==null?void 0:y.columns["In Progress"])==null?void 0:F.length)??0,E=async I=>{d(I);try{const ue=await Hb(I),Z=ue.results.every(be=>be.success);f({title:Z?"Process Cancelled":"Cancel Failed",message:ue.results.map(be=>be.message).join("; "),type:Z?"success":"error"})}catch(ue){f({title:"Cancel Failed",message:ue instanceof Error?ue.message:"Failed to cancel process",type:"error"})}finally{d(null)}},L=async()=>{m(!0);try{await Yb(),f({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(I){f({title:"Clear Failed",message:I instanceof Error?I.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},Y=I=>{if(!I)return"Not scheduled";try{const ue=new Date(I),Z=new Date,be=ue.getTime()-Z.getTime(),ye=Math.floor(be/6e4);return ye<0?"Running now...":ye<60?`in ${ye} min`:ye<1440?`in ${Math.floor(ye/60)} hr${ye>=120?"s":""}`:`in ${Math.floor(ye/1440)} day${ye>=2880?"s":""}`}catch{return"Unknown"}},U=(()=>{var Z,be,ye;if(g!=null&&g.paused)return null;const I=[{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:((Z=g==null?void 0:g.qa)==null?void 0:Z.nextRun)??null},{agent:"Auditor",nextRun:((be=g==null?void 0:g.audit)==null?void 0:be.nextRun)??null},{agent:"Planner",nextRun:((ye=g==null?void 0:g.planner)==null?void 0:ye.nextRun)??null}];let ue=null;for(const Ye of I)Ye.nextRun&&(!ue||new Date(Ye.nextRun)<new Date(ue.nextRun))&&(ue=Ye);return ue?{agent:ue.agent,time:Y(ue.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(ze,{className:"p-5",onClick:()=>u("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:O})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(gs,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(ze,{className:"p-5",onClick:()=>u("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:k})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Uh,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(ze,{className:"p-5",onClick:()=>u("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:q})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Gi,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${z>0?"text-red-400 font-medium":"text-slate-500"}`,children:z>0?`${z} need work`:"All passing"})]}),s.jsxs(ze,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:g!=null&&g.paused?"Paused":R.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${g!=null&&g.paused?"bg-amber-500/10 text-amber-400":R.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(zr,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:g!=null&&g.paused?"All schedules paused":R.crontab.installed?`${R.crontab.entries.length} entr${R.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(ze,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>u("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(cy,{processes:R.processes,activePrd:R.activePrd,onCancelProcess:E,onForceClear:L,onViewLog:()=>u("/logs"),cancellingProcess:r,clearingLock:c})]}),U&&s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:U.agent}),s.jsx("span",{children:U.time})]}),s.jsxs("button",{onClick:()=>u("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(lh,{className:"ml-1 h-3 w-3"})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>u("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(lh,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(ze,{className:"p-4",children:y?s.jsx("div",{className:"flex flex-wrap gap-3",children:ta.map(I=>{var Z;const ue=((Z=y.columns[I])==null?void 0:Z.length)??0;return s.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 ${ry[I]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:I}),s.jsx("span",{className:"text-xs font-bold",children:ue})]},I)})}):s.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",s.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."]})})]})]})},dy=()=>{const[u,r]=w.useState(!0),[d,c]=w.useState(""),[m,x]=w.useState("executor"),f=w.useRef(null),{selectedProjectId:p,globalModeLoading:b}=xt(),v=xt(L=>L.status),{data:g,loading:y,error:R,refetch:q}=el(()=>Ob(m,500),[m,p],{enabled:!b}),z=(g==null?void 0:g.lines)||[];w.useEffect(()=>{u&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[z,u]),w.useEffect(()=>{if(!u)return;const L=window.setInterval(()=>{q()},3e3);return()=>window.clearInterval(L)},[u,m,q]);const O=z.filter(L=>L.toLowerCase().includes(d.toLowerCase())),k=L=>{x(L),c("")},E=L=>{if(!(v!=null&&v.processes))return!1;const Y=v.processes.find(le=>le.name===L);return(Y==null?void 0:Y.running)??!1};return R?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Rl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),s.jsx("div",{className:"text-sm text-slate-500",children:R.message}),s.jsx(Le,{onClick:()=>q(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.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:L=>c(L.target.value)}),s.jsx($i,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),s.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>k("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="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:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Executor"}),E("executor")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>k("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="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:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Reviewer"}),E("reviewer")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>k("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="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:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"QA"}),E("qa")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>k("audit"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="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:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Auditor"}),E("audit")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>k("planner"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="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:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Planner"}),E("planner")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Le,{size:"sm",variant:"ghost",onClick:()=>q(),children:[s.jsx(nh,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Le,{size:"sm",variant:"ghost",onClick:()=>r(!u),children:[u?s.jsx(kh,{className:"h-4 w-4 mr-2"}):s.jsx(Zi,{className:"h-4 w-4 mr-2"}),u?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.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:[s.jsxs("span",{children:["File: ",m,".log"]}),s.jsxs("span",{children:[O.length," lines"]})]}),s.jsxs("div",{ref:f,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[y?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):O.length===0?s.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"}):O.map((L,Y)=>{const le=L.includes("[ERROR]"),U=L.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${le?"text-red-400":U?"text-amber-400":"text-slate-300"}`,children:[s.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:Y+1}),L]},Y)}),u&&s.jsx("div",{className:"h-4"})," "]}),!u&&s.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:()=>r(!0),children:[s.jsx(nh,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},fy=()=>{const[u,r]=w.useState(null),[d,c]=w.useState(!1),[m,x]=w.useState("all"),[f,p]=w.useState("number"),[b,v]=w.useState("desc"),{addToast:g,selectedProjectId:y,globalModeLoading:R}=xt(),{data:q,loading:z,error:O,refetch:k}=el(Xh,[y],{enabled:!R}),E=q??[],L=Z=>{switch(Z){case"pass":return s.jsx(gs,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(Gg,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Hh,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Rl,{className:"h-4 w-4 text-slate-500"})}},Y=Z=>{switch(Z){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"}},le=Z=>Z===null?"No review decision yet":Z===100?"PR has been approved":Z===0?"Changes have been requested":`Review score: ${Z}`,U=w.useMemo(()=>E.filter(Z=>{switch(m){case"needs-work":return Z.ciStatus==="fail"||Z.reviewScore===0;case"pending":return Z.ciStatus==="pending"||Z.ciStatus==="unknown"||Z.reviewScore===null;case"passed":return Z.ciStatus==="pass"&&Z.reviewScore===100;case"all":default:return!0}}),[E,m]),re=w.useMemo(()=>[...U].sort((be,ye)=>{let Ye=0;switch(f){case"number":Ye=be.number-ye.number;break;case"title":Ye=be.title.localeCompare(ye.title);break;case"branch":Ye=be.branch.localeCompare(ye.branch);break;case"ciStatus":{const J={fail:0,pending:1,unknown:2,pass:3};Ye=(J[be.ciStatus]??2)-(J[ye.ciStatus]??2);break}case"reviewScore":{const J=be.reviewScore??-1,We=ye.reviewScore??-1;Ye=J-We;break}}return b==="asc"?Ye:-Ye}),[U,f,b]),F=Z=>{f===Z?v(b==="asc"?"desc":"asc"):(p(Z),v("desc"))},I=Z=>f!==Z?s.jsx(jg,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx(Ng,{className:"h-3 w-3 text-indigo-400"}):s.jsx(gg,{className:"h-3 w-3 text-indigo-400"});if(z)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(O)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Rl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:O.message}),s.jsx(Le,{onClick:()=>k(),children:"Retry"})]});const ue=async()=>{c(!0);try{const Z=await qb();g({title:"Reviewer Started",message:Z.pid?`Started with PID ${Z.pid}`:"Reviewer started",type:"success"})}catch(Z){g({title:"Reviewer Failed",message:Z instanceof Error?Z.message:"Failed to start reviewer",type:"error"})}finally{c(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>x("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="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"}),s.jsx("button",{onClick:()=>x("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="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"}),s.jsx("button",{onClick:()=>x("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="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"}),s.jsx("button",{onClick:()=>x("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="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"})]}),s.jsxs(Le,{size:"sm",onClick:ue,disabled:d,children:[s.jsx($i,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.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:()=>F("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),I("number")]})}),s.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:()=>F("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),I("branch")]})}),s.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:()=>F("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),I("ciStatus")]})}),s.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:()=>F("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),I("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[re.map(Z=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(u===Z.number?null:Z.number),children:[s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center",children:[s.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",Z.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:Z.title})]})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:Z.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:Y(Z.ciStatus),children:[L(Z.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:Z.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:Z.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:le(Z.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${Z.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${Z.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]}):s.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("a",{href:Z.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:be=>be.stopPropagation(),children:s.jsx(Bh,{className:"h-4 w-4"})})})]},Z.number)),re.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:E.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),u&&s.jsx(ze,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const Z=E.find(be=>be.number===u);return Z?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:Z.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:Z.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:Y(Z.ciStatus),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),s.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[L(Z.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:Z.ciStatus})]})]}),Z.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:le(Z.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]})]})]}):null})()})]})},qt=ge.forwardRef(({className:u="",label:r,checked:d,onChange:c,...m},x)=>{const f=p=>{c&&c(p.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${u}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:x,checked:d,onChange:f,...m}),s.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"})]}),r&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:r})]})});qt.displayName="Switch";const my=()=>{const{addToast:u,selectedProjectId:r,globalModeLoading:d}=xt(),[c,m]=w.useState(!1),[x,f]=w.useState(!1),{data:p,loading:b,error:v,refetch:g}=el(Qb,[r],{enabled:!d});w.useEffect(()=>{if(!(p!=null&&p.enabled))return;const L=setInterval(()=>{g()},1e4);return()=>clearInterval(L)},[p==null?void 0:p.enabled,g]);const y=async L=>{f(!0);try{await Jh(L),u({title:L?"Scanner Enabled":"Scanner Disabled",message:L?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:L?"success":"info"}),g()}catch(Y){u({title:"Toggle Failed",message:Y instanceof Error?Y.message:"Failed to toggle scanner",type:"error"})}finally{f(!1)}},R=async()=>{m(!0);try{const L=await Xb();L.created.length>0?u({title:"Scan Complete",message:`Created ${L.created.length} PRD(s): ${L.created.join(", ")}`,type:"success"}):u({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),L.errors.length>0&&u({title:"Scan Errors",message:L.errors.join("; "),type:"warning"}),g()}catch(L){u({title:"Scan Failed",message:L instanceof Error?L.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(b)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(v)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Rl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:v.message}),s.jsx(Le,{onClick:()=>g(),children:"Retry"})]});if(!p)return null;if(p.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(ze,{className:"p-12",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:s.jsx(Lh,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.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 (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const q=p.totalItems>0?Math.round(p.processedItems/p.totalItems*100):0,z=xy(p.status),O=vy(p.items),k=p.lastScan?py(p.lastScan):"Never",E=p.autoScanInterval?Math.round(p.autoScanInterval/60):5;return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(qt,{label:p.enabled?"Enabled":"Disabled",checked:p.enabled,onChange:y,disabled:x}),s.jsxs(Le,{onClick:R,loading:c,disabled:!p.enabled||p.status==="complete",children:[s.jsx(Zi,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(ze,{className:`p-6 border-2 ${z.borderColor}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(z.icon,{className:`h-8 w-8 ${z.textColor}`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),s.jsx("div",{className:`text-2xl font-bold ${z.textColor}`,children:z.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:k})]}),p.enabled&&p.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",E," min"]})]}),p.enabled&&p.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(ze,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[p.processedItems," / ",p.totalItems," items (",q,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${q===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${q}%`}})})]}),Object.entries(O).map(([L,Y])=>s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:L}),s.jsx("div",{className:"space-y-2",children:Y.map(le=>s.jsx(hy,{item:le},le.hash))})]},L))]})};function hy({item:u}){const r=u.checked,d=u.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"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:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx(cb,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(gs,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(jr,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${r?"line-through text-slate-600":"text-slate-200"}`,children:u.title}),u.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:u.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:r?s.jsx(on,{variant:"neutral",children:"Skipped"}):d?s.jsx(on,{variant:"success",children:u.prdFile||"Processed"}):s.jsx(on,{variant:"warning",children:"Pending"})})]})}function xy(u){switch(u){case"complete":return{label:"Complete",icon:gs,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Gi,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Zi,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Rl,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Rl,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function vy(u){const r={};for(const d of u){const c=d.section||"General";r[c]||(r[c]=[]),r[c].push(d)}return r}function py(u){try{const r=new Date(u),c=new Date().getTime()-r.getTime(),m=Math.floor(c/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const x=Math.floor(m/60);return x<24?`${x} hr ago`:`${Math.floor(x/24)} day(s) ago`}catch{return"Unknown"}}const Wh=({tabs:u,activeTab:r,onChange:d,className:c=""})=>{var b,v;const[m,x]=ge.useState((b=u[0])==null?void 0:b.id),f=r||m,p=g=>{d?d(g):x(g)};return s.jsxs("div",{className:`flex flex-col ${c}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:u.map(g=>s.jsx("button",{onClick:()=>p(g.id),className:`
350
+ whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
351
+ ${f===g.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
352
+ `,children:g.label},g.id))})}),s.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})]})},Qi=[{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"}],Br=[{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 dn(u){return u?u.trim().replace(/\s+/g," "):""}function cn(u,r){return dn(u)===dn(r)}function gy(u){if(u)return Br.find(r=>r.id===u)}function Ph(u,r,d,c,m,x){return cn(u.schedules.executor,r)&&cn(u.schedules.reviewer,d)&&cn(u.schedules.qa,c)&&cn(u.schedules.audit,m)&&cn(u.schedules.slicer,x)}function by(u,r,d,c,m){return Br.find(x=>Ph(x,u,r,d,c,m))}function ms(u,r,d,c,m,x){const f=gy(u);return f&&Ph(f,r,d,c,m,x)?f:by(r,d,c,m,x)}function oh(u){const r=dn(u),d=r.split(/\s+/);if(d.length!==5)return r;const[c,m,x,f,p]=d,b=/^\d+$/.test(c),v=Qi.find(g=>dn(g.value)===r);if(v)return v.label;if(c==="*/30"&&m==="*")return"Every 30 minutes";if(c==="0"&&m==="*")return"Every hour";if(c.startsWith("*/"))return`Every ${parseInt(c.replace("*/",""),10)} minutes`;if(b&&m.startsWith("*/")&&x==="*"&&f==="*"&&p==="*"){const g=parseInt(m.replace("*/",""),10);return c==="0"?`Every ${g} hours`:`Every ${g} hours at :${c.padStart(2,"0")}`}if(c==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(c==="0"&&m.includes("-")){const[g,y]=m.split("-");return`Every hour from ${ds(g)} to ${ds(y)}`}if(b&&m.includes("-")&&x==="*"&&f==="*"&&p==="*"){const[g,y]=m.split("-");return`Every hour from ${fs(g,c)} to ${fs(y,c)}`}if(c==="0"&&m.includes(",")){const g=m.split(",").map(ds);return g.length<=3?`At ${g.join(" and ")}`:`At ${g.slice(0,-1).join(", ")}, and ${g[g.length-1]}`}if(b&&m.includes(",")&&x==="*"&&f==="*"&&(p==="*"||p==="1-5")){const g=m.split(",").map(R=>fs(R,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"&&m!=="*"&&x==="*"&&f==="*"&&p==="*"?`Daily at ${ds(m)}`:b&&m!=="*"&&x==="*"&&f==="*"&&p==="*"?`Daily at ${fs(m,c)}`:c==="0"&&m!=="*"&&x==="*"&&f==="*"&&p==="1-5"?`Weekdays at ${ds(m)}`:b&&m!=="*"&&x==="*"&&f==="*"&&p==="1-5"?`Weekdays at ${fs(m,c)}`:r}function ds(u){const r=parseInt(u,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function fs(u,r){const d=r.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 yy(u){const r=dn(u),d=Qi.find(c=>dn(c.value)===r);return(d==null?void 0:d.value)??"__custom__"}function jy(u){const r=new Date,d=u.getTime()-r.getTime(),c=Math.floor(d/6e4),m=Math.floor(c/60),x=Math.floor(m/24);return c<1?"less than a minute":c<60?`in ${c} minute${c>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${x} day${x>1?"s":""}`}function Sy(u){const r={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return u.toLocaleDateString("en-US",r)}function Ny(u){const r=new Date,d=u.getTime()-r.getTime(),c=Math.floor(d/6e4);return c>=0&&c<30}const we=ge.forwardRef(({className:u="",label:r,error:d,helperText:c,rightIcon:m,...x},f)=>{const p=ge.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 s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:f,id:b,"aria-describedby":y,"aria-invalid":d?!0:x["aria-invalid"],className:`
353
+ w-full rounded-lg bg-slate-950 border border-slate-800
354
+ px-3 py-2 text-sm text-slate-200
355
+ placeholder:text-slate-600
356
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
357
+ disabled:opacity-50 disabled:cursor-not-allowed
358
+ transition-all duration-200
359
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
360
+ ${m?"pr-10":""}
361
+ ${u}
362
+ `,...x}),m&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),d?s.jsx("p",{id:v,className:"mt-1.5 text-xs text-red-400",children:d}):c?s.jsx("p",{id:g,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});we.displayName="Input";const wt=ge.forwardRef(({className:u="",label:r,error:d,helperText:c,options:m,value:x,onChange:f,children:p,...b},v)=>{const g=ge.useId(),y=b.id??g,R=d?`${y}-error`:void 0,q=!d&&c?`${y}-help`:void 0,z=[R,q].filter(Boolean).join(" ")||void 0,O=k=>{f&&f(k.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:y,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:v,id:y,"aria-describedby":z,"aria-invalid":d?!0:b["aria-invalid"],className:`
363
+ w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
364
+ px-3 py-2 pr-10 text-sm text-slate-200
365
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
366
+ disabled:opacity-50 disabled:cursor-not-allowed
367
+ transition-all duration-200
368
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
369
+ ${u}
370
+ `,value:x,onChange:O,...b,children:m?m.map(k=>s.jsx("option",{value:k.value,children:k.label},k.value)):p}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(qh,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:R,className:"mt-1.5 text-xs text-red-400",children:d}):c?s.jsx("p",{id:q,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});wt.displayName="Select";const rn=({label:u,value:r,onChange:d,helperText:c,placeholder:m="5 */3 * * *"})=>{const x=yy(r),f=x==="__custom__",p=g=>{g!=="__custom__"&&d(g)},b=g=>{d(g.target.value)},v=Qi.find(g=>g.value===x);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(wt,{label:u,value:x,onChange:p,options:Qi.map(g=>({label:g.label,value:g.value})),helperText:f?void 0:(v==null?void 0:v.description)||c}),f&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(we,{label:"Cron Expression",value:r,onChange:b,placeholder:m}),s.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[s.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",s.jsx("br",{}),s.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})},Ih=({form:u,scheduleMode:r,selectedTemplateId:d,onFieldChange:c,onSwitchToTemplate:m,onSwitchToCustom:x,onApplyTemplate:f})=>s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:m,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:x,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Br.map(p=>{const b=d===p.id;return s.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:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:p.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:p.description}),s.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])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:v}),s.jsx("span",{className:"text-xs text-slate-400",children:g})]},v))})]},p.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(rn,{label:"PRD Execution Schedule",value:u.cronSchedule,onChange:p=>c("cronSchedule",p)}),s.jsx(rn,{label:"PR Review Schedule",value:u.reviewerSchedule,onChange:p=>c("reviewerSchedule",p)}),s.jsx(rn,{label:"QA Schedule",value:u.qa.schedule,onChange:p=>c("qa",{...u.qa,schedule:p})}),s.jsx(rn,{label:"Audit Schedule",value:u.audit.schedule,onChange:p=>c("audit",{...u.audit,schedule:p})}),u.roadmapScanner.enabled&&s.jsx(rn,{label:"Planner Schedule",value:u.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:p=>c("roadmapScanner",{...u.roadmapScanner,slicerSchedule:p})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(wt,{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."}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),s.jsx(qt,{checked:u.globalQueueEnabled??!0,onChange:p=>c("globalQueueEnabled",p)})]})}),s.jsx(we,{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."})]})]}),Ey=()=>{var G,$,W,ce,me,Ne,Pe,Ge,tl,T,ee,fe,Te;const{addToast:u,selectedProjectId:r,globalModeLoading:d}=xt(),[c,m]=w.useState("overview"),[x,f]=w.useState(!1),[p,b]=w.useState(!1),[v,g]=w.useState(null),[y,R]=w.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:q,loading:z,error:O,refetch:k}=el(Zh,[r],{enabled:!d}),{data:E,loading:L,refetch:Y}=el(Vh,[r],{enabled:!d});w.useEffect(()=>{const V=setInterval(()=>{k()},3e4);return()=>clearInterval(V)},[k]),w.useEffect(()=>{var V,ne,Re,ct,vt,Ht;if(E&&!y.isDirty){const Ml=ms(E.scheduleBundleId,E.cronSchedule,E.reviewerSchedule,((V=E.qa)==null?void 0:V.schedule)||"45 2,14 * * *",((ne=E.audit)==null?void 0:ne.schedule)||"50 3 * * 1",((Re=E.roadmapScanner)==null?void 0:Re.slicerSchedule)||"35 */12 * * *");R({form:{cronSchedule:E.cronSchedule||"5 */3 * * *",reviewerSchedule:E.reviewerSchedule||"25 */6 * * *",qa:E.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:E.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((ct=E.roadmapScanner)==null?void 0:ct.enabled)??!0,slicerSchedule:((vt=E.roadmapScanner)==null?void 0:vt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:E.scheduleBundleId??null,schedulingPriority:E.schedulingPriority??3,cronScheduleOffset:E.cronScheduleOffset??0,globalQueueEnabled:((Ht=E.queue)==null?void 0:Ht.enabled)??!0},scheduleMode:Ml?"template":"custom",selectedTemplateId:(Ml==null?void 0:Ml.id)??"",isDirty:!1})}},[E,y.isDirty]);const le=()=>{Y(),k()},U=(V,ne)=>V instanceof Error?V.message:ne,re=async()=>{if(q){f(!0);try{q.paused?(await hs(),u({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Bb(),u({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),le()}catch(V){u({title:"Action Failed",message:U(V,"Failed to toggle schedule state"),type:"error"})}finally{f(!1)}}},F=async(V,ne)=>{if(E){g(V);try{V==="executor"?await ja({executorEnabled:ne}):V==="reviewer"?await ja({reviewerEnabled:ne}):V==="qa"?await ja({qa:{...E.qa,enabled:ne}}):V==="audit"?await ja({audit:{...E.audit,enabled:ne}}):await ja({roadmapScanner:{...E.roadmapScanner,enabled:ne}});let Re="";try{await hs()}catch(ct){Re=U(ct,"Failed to reinstall cron schedules")}le(),u(Re?{title:"Job Saved (Cron Reinstall Failed)",message:Re,type:"warning"}:{title:"Job Updated",message:`${V[0].toUpperCase()+V.slice(1)} ${ne?"enabled":"disabled"}.`,type:"success"})}catch(Re){u({title:"Update Failed",message:U(Re,"Failed to update job configuration"),type:"error"})}finally{g(null)}}},I=(V,ne)=>{R(Re=>({...Re,form:{...Re.form,[V]:ne},isDirty:!0}))},ue=()=>{if(!y.form)return;const V=ms(y.form.scheduleBundleId,y.form.cronSchedule,y.form.reviewerSchedule,y.form.qa.schedule,y.form.audit.schedule,y.form.roadmapScanner.slicerSchedule||"35 */12 * * *");R(ne=>({...ne,scheduleMode:"template",selectedTemplateId:(V==null?void 0:V.id)??"always-on",form:{...ne.form,scheduleBundleId:(V==null?void 0:V.id)??null},isDirty:!0}))},Z=()=>{R(V=>({...V,scheduleMode:"custom",selectedTemplateId:"",form:{...V.form,scheduleBundleId:null},isDirty:!0}))},be=V=>{R(ne=>({...ne,selectedTemplateId:V.id,scheduleMode:"template",form:{...ne.form,cronSchedule:V.schedules.executor,reviewerSchedule:V.schedules.reviewer,scheduleBundleId:V.id,qa:{...ne.form.qa,schedule:V.schedules.qa},audit:{...ne.form.audit,schedule:V.schedules.audit},roadmapScanner:{...ne.form.roadmapScanner,slicerSchedule:V.schedules.slicer}},isDirty:!0}))},ye=async()=>{if(E){b(!0);try{await ja({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:{...E.qa,schedule:y.form.qa.schedule},audit:{...E.audit,schedule:y.form.audit.schedule},roadmapScanner:{...E.roadmapScanner,slicerSchedule:y.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...E.queue,enabled:y.form.globalQueueEnabled??!0},executorEnabled:E.executorEnabled,reviewerEnabled:E.reviewerEnabled});let V="";try{await hs()}catch(ne){V=U(ne,"Failed to reinstall cron schedules")}R(ne=>({...ne,isDirty:!1})),le(),u(V?{title:"Schedules Saved (Cron Reinstall Failed)",message:V,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(V){u({title:"Save Failed",message:U(V,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},Ye=V=>{if(!V)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const ne=new Date(V),Re=Ny(ne);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Re&&s.jsxs("span",{className:"relative flex h-3 w-3",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-slate-200 font-medium",children:jy(ne)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",Sy(ne),")"]})]})]})},J=V=>{if(!V||V.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const ne=[];return V.balancedDelayMinutes>0&&ne.push(`auto +${V.balancedDelayMinutes}m`),V.manualDelayMinutes>0&&ne.push(`manual +${V.manualDelayMinutes}m`),s.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",s.jsxs("span",{className:"text-slate-300",children:[" ",ne.join(" - ")]})]})};if(z||L)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(O||!q||!E)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Rl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),s.jsx("div",{className:"text-sm text-slate-500",children:(O==null?void 0:O.message)||"Unknown error"}),s.jsx(Le,{onClick:()=>{k(),Y()},children:"Retry"})]});const We=q.paused,B=We?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",K=We?"Paused":"Active",ae=ms(E.scheduleBundleId,E.cronSchedule,E.reviewerSchedule,((G=E.qa)==null?void 0:G.schedule)||"45 2,14 * * *",(($=E.audit)==null?void 0:$.schedule)||"50 3 * * 1",((W=E.roadmapScanner)==null?void 0:W.slicerSchedule)||"35 */12 * * *"),Ce=(V,ne,Re)=>!ae||!cn(ae.schedules[V],ne)?oh(Re):`${ae.label} - ${ae.hints[V]}`,_e=[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Gi,{className:"h-4 w-4"}),enabled:(E==null?void 0:E.executorEnabled)!==!1,schedule:q.executor.schedule,nextRun:q.executor.nextRun,delayInfo:q.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx($i,{className:"h-4 w-4"}),enabled:(E==null?void 0:E.reviewerEnabled)??!1,schedule:q.reviewer.schedule,nextRun:q.reviewer.nextRun,delayInfo:q.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(Nb,{className:"h-4 w-4"}),enabled:((ce=E==null?void 0:E.qa)==null?void 0:ce.enabled)??!1,schedule:(me=q.qa)==null?void 0:me.schedule,nextRun:(Ne=q.qa)==null?void 0:Ne.nextRun,delayInfo:q.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(sh,{className:"h-4 w-4"}),enabled:((Pe=E==null?void 0:E.audit)==null?void 0:Pe.enabled)??!1,schedule:(Ge=q.audit)==null?void 0:Ge.schedule,nextRun:(tl=q.audit)==null?void 0:tl.nextRun,delayInfo:q.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(sh,{className:"h-4 w-4"}),enabled:((T=E==null?void 0:E.roadmapScanner)==null?void 0:T.enabled)??!1,schedule:((ee=q.planner)==null?void 0:ee.schedule)||((fe=E.roadmapScanner)==null?void 0:fe.slicerSchedule)||"35 */12 * * *",nextRun:(Te=q.planner)==null?void 0:Te.nextRun,delayInfo:q.planner}],N=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(ze,{className:`p-6 border-2 ${B}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Gi,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),s.jsx("div",{className:"text-2xl font-bold",children:K}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Le,{variant:We?"primary":"outline",size:"lg",onClick:re,loading:x,children:We?s.jsxs(s.Fragment,{children:[s.jsx(Zi,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(kh,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:_e.map(V=>{var ne,Re,ct,vt,Ht,Lt;return s.jsxs("div",{className:`p-4 rounded-lg border ${V.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[V.icon,s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:V.name})]}),s.jsx(qt,{checked:V.enabled,disabled:v!==null,"aria-label":`Toggle ${V.name.toLowerCase()} automation`,onChange:Ml=>F(V.id,Ml)})]}),V.enabled?s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),s.jsx("div",{className:"text-sm text-slate-200 font-medium",children:Ce(V.id==="planner"?"slicer":V.id,V.id==="qa"?((ne=E==null?void 0:E.qa)==null?void 0:ne.schedule)||"":V.id==="audit"?((Re=E==null?void 0:E.audit)==null?void 0:Re.schedule)||"":V.id==="planner"?((ct=E==null?void 0:E.roadmapScanner)==null?void 0:ct.slicerSchedule)||"35 */12 * * *":V.schedule,V.id==="qa"?((vt=E==null?void 0:E.qa)==null?void 0:vt.schedule)||"":V.id==="audit"?((Ht=E==null?void 0:E.audit)==null?void 0:Ht.schedule)||"":V.id==="planner"?((Lt=E==null?void 0:E.roadmapScanner)==null?void 0:Lt.slicerSchedule)||"35 */12 * * *":V.schedule)})]}),J(V.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),Ye(V.nextRun)]}),s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${V.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(yr,{className:"h-4 w-4"}),s.jsx("span",{children:V.enabled?"Active":"Disabled"})]})]}):s.jsxs("div",{className:"text-slate-500 text-sm",children:[V.name," is disabled."]})]},V.id)})})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ih,{form:y.form,scheduleMode:y.scheduleMode,selectedTemplateId:y.selectedTemplateId,onFieldChange:I,onSwitchToTemplate:ue,onSwitchToCustom:Z,onApplyTemplate:be}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Le,{variant:"ghost",onClick:()=>{var V,ne,Re,ct,vt,Ht;if(E){const Lt=ms(E.scheduleBundleId,E.cronSchedule,E.reviewerSchedule,((V=E.qa)==null?void 0:V.schedule)||"45 2,14 * * *",((ne=E.audit)==null?void 0:ne.schedule)||"50 3 * * 1",((Re=E.roadmapScanner)==null?void 0:Re.slicerSchedule)||"35 */12 * * *");R({form:{cronSchedule:E.cronSchedule||"5 */3 * * *",reviewerSchedule:E.reviewerSchedule||"25 */6 * * *",qa:E.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:E.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((ct=E.roadmapScanner)==null?void 0:ct.enabled)??!0,slicerSchedule:((vt=E.roadmapScanner)==null?void 0:vt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:E.scheduleBundleId??null,schedulingPriority:E.schedulingPriority??3,cronScheduleOffset:E.cronScheduleOffset??0,globalQueueEnabled:((Ht=E.queue)==null?void 0:Ht.enabled)??!0},scheduleMode:Lt?"template":"custom",selectedTemplateId:(Lt==null?void 0:Lt.id)??"",isDirty:!1})}},disabled:!y.isDirty,children:"Reset"}),s.jsxs(Le,{onClick:ye,loading:p,disabled:!y.isDirty,children:[s.jsx(yr,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(ze,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(zr,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),q.entries.length===0?s.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):s.jsx("div",{className:"space-y-2",children:q.entries.map((V,ne)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:V},ne))})]})}];return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),ae&&s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),s.jsx("div",{className:"text-sm font-medium text-indigo-300",children:ae.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",q.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(Wh,{tabs:N,activeTab:c,onChange:m})]})},dh=({presetId:u,preset:r,isBuiltIn:d,onEdit:c,onDelete:m,onReset:x})=>{const f=r.envVars?Object.keys(r.envVars).length:0;return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:r.name}),d&&s.jsx(on,{variant:"info",className:"text-[10px]",children:"Built-in"})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:c,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${r.name} preset`,title:"Edit preset",children:s.jsx(Or,{className:"h-4 w-4"})}),d?x&&s.jsx("button",{type:"button",onClick:x,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${r.name} to defaults`,title:"Reset to defaults",children:s.jsx(Yh,{className:"h-4 w-4"})}):m&&s.jsx("button",{type:"button",onClick:m,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${r.name} preset`,title:"Delete preset",children:s.jsx(Ur,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[r.command,r.subcommand&&` ${r.subcommand}`]})]}),r.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(on,{variant:"neutral",className:"text-[10px] font-mono",children:r.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",u]}),f>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[f," env var",f!==1?"s":""]})]})]})},wy=({isOpen:u,onClose:r,title:d,children:c})=>(w.useEffect(()=>{const m=x=>{x.key==="Escape"&&r()};return u&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[u,r]),u?og.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:r,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:d}),s.jsx("button",{onClick:r,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(xn,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:c})]})]}),document.body):null),Cy=u=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>u.toUpperCase().includes(d)),Ty=({value:u,isSensitive:r})=>{const[d,c]=ge.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?u:"***********"}),s.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?s.jsx($g,{className:"h-4 w-4"}):s.jsx(Jg,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:u})},e0=({envVars:u,onChange:r,compact:d=!1})=>{const[c,m]=ge.useState(""),[x,f]=ge.useState(""),[p,b]=ge.useState(null),[v,g]=ge.useState(""),y=()=>{if(c.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(c)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}r({...u,[c]:x}),m(""),f("")}},R=E=>{const L={...u};delete L[E],r(L)},q=E=>{b(E),g(u[E]??"")},z=()=>{p&&(r({...u,[p]:v}),b(null),g(""))},O=()=>{b(null),g("")},k=Object.entries(u);return s.jsxs("div",{className:"space-y-4",children:[!d&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:k.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):k.map(([E,L])=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:E}),p===E?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:v,onChange:Y=>g(Y.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:z,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${E} value`,title:`Save ${E} value`,children:s.jsx(yr,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:O,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${E}`,title:`Cancel editing ${E}`,children:s.jsx(xn,{className:"h-4 w-4"})})]}):s.jsx(Ty,{value:L,isSensitive:Cy(E)})]}),p!==E&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>q(E),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${E}`,title:`Edit ${E}`,children:s.jsx(Or,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>R(E),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${E}`,title:`Delete ${E}`,children:s.jsx(Ur,{className:"h-4 w-4"})})]})]},E))}),s.jsxs("div",{className:`flex items-end gap-3 ${d?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:c,onChange:E=>m(E.target.value.toUpperCase()),placeholder:d?"ENV_VAR_NAME":"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"})]}),s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:x,onChange:E=>f(E.target.value),placeholder:d?"value":"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"})]}),s.jsxs(Le,{onClick:y,disabled:!c.trim(),size:d?"sm":"md",children:[s.jsx(hn,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},fh={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},custom:{name:"",command:""}},Ry=({isOpen:u,onClose:r,onSave:d,presetId:c,preset:m,isBuiltIn:x,existingIds:f})=>{const[p,b]=ge.useState(""),[v,g]=ge.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[y,R]=ge.useState(!1),[q,z]=ge.useState("custom"),[O,k]=ge.useState(null);ge.useEffect(()=>{u&&(c&&m?(b(c),g({name:m.name,command:m.command,subcommand:m.subcommand??"",promptFlag:m.promptFlag??"",autoApproveFlag:m.autoApproveFlag??"",workdirFlag:m.workdirFlag??"",modelFlag:m.modelFlag??"",model:m.model??"",envVars:m.envVars??{}}),c==="claude"||m.command==="claude"?z("claude"):c==="codex"||m.command==="codex"?z("codex"):z("custom")):(b(""),g({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),z("custom")),k(null),R(!1))},[u,c,m]);const E=U=>{if(z(U),U!=="custom"&&fh[U]){const re=fh[U];g(F=>({...F,...re,envVars:F.envVars})),!c&&!p&&b(U)}},L=(U,re)=>{g(F=>({...F,[U]:re})),k(null)},Y=()=>{if(!v.name.trim())return k("Name is required"),!1;if(!v.command.trim())return k("Command is required"),!1;if(!c){if(!p.trim())return k("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(p))return k("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(f.includes(p))return k("A preset with this ID already exists"),!1}return!0},le=()=>{var re,F,I,ue,Z,be;if(!Y())return;const U={name:v.name.trim(),command:v.command.trim()};(re=v.subcommand)!=null&&re.trim()&&(U.subcommand=v.subcommand.trim()),(F=v.promptFlag)!=null&&F.trim()&&(U.promptFlag=v.promptFlag.trim()),(I=v.autoApproveFlag)!=null&&I.trim()&&(U.autoApproveFlag=v.autoApproveFlag.trim()),(ue=v.workdirFlag)!=null&&ue.trim()&&(U.workdirFlag=v.workdirFlag.trim()),(Z=v.modelFlag)!=null&&Z.trim()&&(U.modelFlag=v.modelFlag.trim()),(be=v.model)!=null&&be.trim()&&(U.model=v.model.trim()),v.envVars&&Object.keys(v.envVars).length>0&&(U.envVars=v.envVars),d(c||p,U),r()};return s.jsx(wy,{isOpen:u,onClose:r,title:c?`Edit Preset: ${m==null?void 0:m.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[O&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:O}),!x&&s.jsx("div",{children:s.jsx(wt,{label:"Template",value:q,onChange:E,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!c&&s.jsx(we,{label:"Preset ID",value:p,onChange:U=>b(U.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(we,{label:"Display Name",value:v.name,onChange:U=>L("name",U.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(we,{label:"Command",value:v.command,onChange:U=>L("command",U.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(we,{label:"Model",value:v.model??"",onChange:U=>L("model",U.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(we,{label:"Model Flag",value:v.modelFlag??"",onChange:U=>L("modelFlag",U.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>R(!y),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[y?s.jsx(Ug,{className:"h-4 w-4"}):s.jsx(qh,{className:"h-4 w-4"}),"Advanced Options"]}),y&&s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(we,{label:"Subcommand",value:v.subcommand??"",onChange:U=>L("subcommand",U.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(we,{label:"Prompt Flag",value:v.promptFlag??"",onChange:U=>L("promptFlag",U.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(we,{label:"Auto-Approve Flag",value:v.autoApproveFlag??"",onChange:U=>L("autoApproveFlag",U.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(we,{label:"Workdir Flag",value:v.workdirFlag??"",onChange:U=>L("workdirFlag",U.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(e0,{envVars:v.envVars??{},onChange:U=>L("envVars",U),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Le,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Le,{onClick:le,children:c?"Save Changes":"Add Preset"})]})]})})},Hi=["claude","codex"],vr=u=>{var r,d,c,m,x,f,p;return{provider:u.provider,providerLabel:u.providerLabel??"",providerPresets:u.providerPresets??{},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:((r=u.roadmapScanner)==null?void 0:r.enabled)??!0,roadmapPath:((d=u.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((c=u.roadmapScanner)==null?void 0:c.autoScanInterval)??300,slicerSchedule:((m=u.roadmapScanner)==null?void 0:m.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}}}},mh=u=>{const r=ms(u.scheduleBundleId,u.cronSchedule,u.reviewerSchedule,u.qa.schedule,u.audit.schedule,u.roadmapScanner.slicerSchedule??"35 */12 * * *");return r?{mode:"template",selectedTemplateId:r.id}:{mode:"custom",selectedTemplateId:""}},My=({notifications:u,onChange:r})=>{const[d,c]=ge.useState(null),[m,x]=ge.useState(!1),[f,p]=ge.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=()=>{r({webhooks:[...u.webhooks,f]}),p({type:"slack",url:"",events:[]}),x(!1)},g=(z,O)=>{const k=[...u.webhooks];k[z]=O,r({webhooks:k})},y=z=>{r({webhooks:u.webhooks.filter((O,k)=>k!==z)})},R=(z,O)=>z.includes(O)?z.filter(k=>k!==O):[...z,O],q=({webhook:z,onChange:O,onSave:k,onCancel:E,isNew:L})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(wt,{label:"Type",value:z.type,onChange:Y=>{const le=Y;O(le==="telegram"?{type:le,botToken:"",chatId:"",events:z.events}:{type:le,url:"",events:z.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),z.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(we,{label:"Bot Token",type:"password",value:z.botToken||"",onChange:Y=>O({...z,botToken:Y.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(we,{label:"Chat ID",value:z.chatId||"",onChange:Y=>O({...z,chatId:Y.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(we,{label:"Webhook URL",type:"password",value:z.url||"",onChange:Y=>O({...z,url:Y.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:b.map(Y=>s.jsx("button",{type:"button",onClick:()=>O({...z,events:R(z.events,Y.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${z.events.includes(Y.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Y.label},Y.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Le,{variant:"ghost",onClick:E,children:"Cancel"}),s.jsx(Le,{onClick:k,disabled:z.events.length===0||(z.type==="telegram"?!z.botToken||!z.chatId:!z.url),children:L?"Add Webhook":"Save Changes"})]})]});return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:u.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):u.webhooks.map((z,O)=>s.jsx("div",{children:d===O?s.jsx(q,{webhook:z,onChange:k=>g(O,k),onSave:()=>c(null),onCancel:()=>c(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:z.type}),z.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",z.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:z.events.map(k=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:k.replace("_"," ")},k))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>c(O),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${z.type} webhook`,title:`Edit ${z.type} webhook`,children:s.jsx(Or,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>y(O),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${z.type} webhook`,title:`Delete ${z.type} webhook`,children:s.jsx(Ur,{className:"h-4 w-4"})})]})]})},O))}),m?s.jsx(q,{webhook:f,onChange:p,onSave:v,onCancel:()=>x(!1),isNew:!0}):s.jsxs(Le,{variant:"ghost",onClick:()=>x(!0),children:[s.jsx(hn,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},pr=({label:u,value:r,onChange:d,placeholder:c,helpText:m})=>{const[x,f]=ge.useState(""),p=()=>{x.trim()&&!r.includes(x.trim())&&(d([...r,x.trim()]),f(""))},b=g=>{d(r.filter(y=>y!==g))},v=g=>{g.key==="Enter"&&(g.preventDefault(),p())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:u}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(g=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[g,s.jsx("button",{type:"button",onClick:()=>b(g),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${g}`,title:`Remove ${g}`,children:s.jsx(xn,{className:"h-3 w-3"})})]},g))}),s.jsxs("div",{className:"flex gap-2",children:[s.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"}),s.jsx(Le,{onClick:p,disabled:!x.trim(),"aria-label":`Add ${u.toLowerCase()} value`,children:s.jsx(hn,{className:"h-4 w-4"})})]}),m&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},Ay=()=>{const{addToast:u,projectName:r,selectedProjectId:d,globalModeLoading:c}=xt(),[m,x]=ge.useState(!1),[f,p]=ge.useState(null),b=ge.useRef(!1),[v,g]=ge.useState("template"),[y,R]=ge.useState("always-on"),[q,z]=ge.useState(!1),[O,k]=ge.useState(null),[E,L]=ge.useState(null),[Y,le]=ge.useState(null),{data:U,loading:re,error:F,refetch:I}=el(Vh,[d],{enabled:!c}),{data:ue,loading:Z,refetch:be}=el(Ub,[d],{enabled:!c}),ye=ue??[],Ye=ge.useCallback(T=>{const ee=mh(T);g(ee.mode),R(ee.selectedTemplateId)},[]);ge.useEffect(()=>{if(U)if(b.current)b.current=!1;else{const T=vr(U);p(T),Ye(T)}},[U,Ye]);const J=(T,ee)=>{p(fe=>fe&&{...fe,[T]:ee})},We=()=>{if(g("template"),!f)return;const T=mh(f);T.mode==="template"&&(R(T.selectedTemplateId),J("scheduleBundleId",T.selectedTemplateId))},B=()=>{g("custom"),J("scheduleBundleId",null),R("")},K=T=>{R(T.id),p(ee=>ee&&{...ee,cronSchedule:T.schedules.executor,reviewerSchedule:T.schedules.reviewer,scheduleBundleId:T.id,qa:{...ee.qa,schedule:T.schedules.qa},audit:{...ee.audit,schedule:T.schedules.audit},roadmapScanner:{...ee.roadmapScanner,slicerSchedule:T.schedules.slicer},fallbackOnRateLimit:!0})},ae=async()=>{var fe,Te,V;if(!f)return;const T=f.cronSchedule!==(U==null?void 0:U.cronSchedule)||f.reviewerSchedule!==(U==null?void 0:U.reviewerSchedule)||f.cronScheduleOffset!==((U==null?void 0:U.cronScheduleOffset)??0)||f.schedulingPriority!==((U==null?void 0:U.schedulingPriority)??3)||f.executorEnabled!==((U==null?void 0:U.executorEnabled)??!0)||f.reviewerEnabled!==((U==null?void 0:U.reviewerEnabled)??!0)||f.queue.enabled!==(((fe=U==null?void 0:U.queue)==null?void 0:fe.enabled)??!0)||f.qa.enabled!==((U==null?void 0:U.qa.enabled)??!0)||f.qa.schedule!==(U==null?void 0:U.qa.schedule)||f.audit.enabled!==((U==null?void 0:U.audit.enabled)??!0)||f.audit.schedule!==(U==null?void 0:U.audit.schedule)||f.roadmapScanner.enabled!==(((Te=U==null?void 0:U.roadmapScanner)==null?void 0:Te.enabled)??!0)||(f.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((V=U==null?void 0:U.roadmapScanner)==null?void 0:V.slicerSchedule)||"35 */12 * * *"),ee={};for(const[ne,Re]of Object.entries(f.jobProviders))Re!=null&&Re!==""&&(ee[ne]=Re);x(!0);try{const ne=await ja({provider:f.provider,providerLabel:f.providerLabel.trim(),providerPresets:Object.keys(f.providerPresets).length>0?f.providerPresets:void 0,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:ee,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}),Re=vr(ne);p(Re),Ye(Re);let ct="";if(T)try{await hs()}catch(vt){ct=vt instanceof Error?vt.message:"failed to reinstall cron schedules"}u(ct?{title:"Settings Saved (Cron Reinstall Failed)",message:ct,type:"warning"}:{title:"Settings Saved",message:T?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),b.current=!0,I(),be()}catch(ne){u({title:"Save Failed",message:ne instanceof Error?ne.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},Ce=()=>{if(U){const T=vr(U);p(T),Ye(T),u({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},_e=async T=>{try{const ee=await Jh(T);J("roadmapScanner",ee.roadmapScanner);let fe="";try{await hs()}catch(Te){fe=Te instanceof Error?Te.message:"Failed to reinstall cron schedules"}u(fe?{title:"Planner Saved (Cron Reinstall Failed)",message:fe,type:"warning"}:{title:T?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${T?"enabled":"disabled"}.`,type:"success"})}catch(ee){u({title:"Toggle Failed",message:ee instanceof Error?ee.message:"Failed to toggle roadmap scanner",type:"error"})}},N=T=>({claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"}})[T]??null,G=()=>({...{claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"}},...f==null?void 0:f.providerPresets}),$=T=>{const ee=G();return Object.entries(ee).map(([fe,Te])=>({label:Te.name,value:fe}))},W=(T,ee)=>{const fe=[];ee.provider===T&&fe.push("Global Provider");const Te={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner"};for(const[V,ne]of Object.entries(ee.jobProviders))ne===T&&fe.push(Te[V]??V);return fe},ce=T=>{const fe=G()[T];fe&&(k(T),L(fe),z(!0))},me=(T,ee)=>{if(!f)return;const fe={...f.providerPresets,[T]:ee};J("providerPresets",fe),O||u({title:"Preset Added",message:`${ee.name} has been added. You can now assign it to jobs.`,type:"success"})},Ne=T=>{var Te,V;if(!f)return;if(Hi.includes(T)){u({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const ee=W(T,f);if(ee.length>0){le({presetId:T,presetName:((Te=G()[T])==null?void 0:Te.name)??T,references:ee});return}const fe={...f.providerPresets};delete fe[T],J("providerPresets",fe),u({title:"Preset Deleted",message:`${((V=G()[T])==null?void 0:V.name)??T} has been removed.`,type:"success"})},Pe=T=>{if(!f)return;const ee={...f.providerPresets};delete ee[T],J("providerPresets",ee),u({title:"Preset Reset",message:`${T} has been reset to built-in defaults.`,type:"success"})},Ge=()=>{if(!Y||!f)return;const{presetId:T}=Y,ee={...f.providerPresets};delete ee[T],J("providerPresets",ee);const fe={...f.jobProviders};for(const Te of Object.keys(fe))fe[Te]===T&&delete fe[Te];J("jobProviders",fe),f.provider===T&&J("provider","claude"),le(null),u({title:"Preset Deleted",message:`${Y.presetName} has been removed and all references cleared.`,type:"success"})};if(re||!f)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(F)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Rl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),s.jsx("div",{className:"text-sm text-slate-500",children:F.message}),s.jsx(Le,{onClick:()=>I(),children:"Retry"})]});const tl=[{id:"general",label:"General",content:s.jsx(ze,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(we,{label:"Project Name",value:r,disabled:!0}),s.jsx(we,{label:"Default Branch",value:f.defaultBranch,onChange:T=>J("defaultBranch",T.target.value)}),s.jsx(we,{label:"PRD Directory",value:f.prdDir,onChange:T=>J("prdDir",T.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(we,{label:"Branch Prefix",value:f.branchPrefix,onChange:T=>J("branchPrefix",T.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(qt,{label:"Enable PRD Executor",checked:f.executorEnabled,onChange:T=>J("executorEnabled",T)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(qt,{label:"Enable Automated Reviews",checked:f.reviewerEnabled,onChange:T=>J("reviewerEnabled",T)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(qt,{label:"Auto-merge approved PRs",checked:f.autoMerge,onChange:T=>J("autoMerge",T)})}),f.autoMerge&&s.jsx(wt,{label:"Merge Method",value:f.autoMergeMethod,onChange:T=>J("autoMergeMethod",T),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(pr,{label:"Branch Patterns",value:f.branchPatterns,onChange:T=>J("branchPatterns",T),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})})},{id:"providers",label:"Providers",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),s.jsxs(Le,{onClick:()=>{k(null),L(null),z(!0)},children:[s.jsx(hn,{className:"h-4 w-4 mr-2"}),"Add Provider"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[Hi.map(T=>{const fe=f.providerPresets[T]||N(T);return fe?s.jsx(dh,{presetId:T,preset:fe,isBuiltIn:!0,onEdit:()=>ce(T),onReset:()=>Pe(T)},T):null}),Object.entries(f.providerPresets).filter(([T])=>!Hi.includes(T)).map(([T,ee])=>s.jsx(dh,{presetId:T,preset:ee,isBuiltIn:!1,onEdit:()=>ce(T),onDelete:()=>Ne(T)},T))]})]}),s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),s.jsx("div",{className:"w-64",children:s.jsx(wt,{value:f.provider,onChange:T=>J("provider",T),options:$(f.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"}].map(({key:T,label:ee})=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:ee}),s.jsx("div",{className:"w-64",children:s.jsx(wt,{value:f.jobProviders[T]??"",onChange:fe=>{const Te={...f.jobProviders};fe===""?delete Te[T]:Te[T]=fe,J("jobProviders",Te)},options:[{label:"Use Global (default)",value:""},...$(f.providerPresets)]})})]},T))]})]}),s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Native Claude fallback settings for when a Claude proxy is rate-limited"})]}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/70 p-4",children:s.jsx("p",{className:"text-sm text-slate-300",children:"These settings control native Claude retry behavior after a Claude proxy rate limit. They apply globally regardless of which preset is assigned."})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(wt,{label:"Primary Native Claude Fallback",value:f.primaryFallbackModel,onChange:T=>{const ee=T;J("primaryFallbackModel",ee),J("claudeModel",ee)},options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"First native Claude model used for the rate-limit fallback attempt"}),s.jsx(wt,{label:"Secondary Native Claude Fallback",value:f.secondaryFallbackModel,onChange:T=>J("secondaryFallbackModel",T),options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"Used only if the primary native Claude fallback is also rate-limited"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx(qt,{label:"Fallback on Rate Limit",checked:f.fallbackOnRateLimit,onChange:T=>J("fallbackOnRateLimit",T)}),s.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"})]})]})]}),s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),s.jsx(e0,{envVars:f.providerEnv,onChange:T=>J("providerEnv",T)})]})]})},{id:"runtime",label:"Runtime",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:f.minReviewScore,onChange:T=>J("minReviewScore",Number(T.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),s.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:f.minReviewScore})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(we,{label:"Max Runtime (Executor)",type:"number",value:String(f.maxRuntime),onChange:T=>J("maxRuntime",Number(T.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(we,{label:"Max Runtime (Reviewer)",type:"number",value:String(f.reviewerMaxRuntime),onChange:T=>J("reviewerMaxRuntime",Number(T.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(we,{label:"Max Log Size",type:"number",value:String(f.maxLogSize),onChange:T=>J("maxLogSize",Number(T.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.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."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(we,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(f.reviewerMaxRetries),onChange:T=>{const ee=Math.min(10,Math.max(0,Number(T.target.value||0)));J("reviewerMaxRetries",ee)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(we,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(f.reviewerRetryDelay),onChange:T=>{const ee=Math.min(300,Math.max(0,Number(T.target.value||0)));J("reviewerRetryDelay",ee)},helperText:"Wait time between retry attempts to let CI settle."})]})]})]})},{id:"schedules",label:"Schedules",content:s.jsx(Ih,{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:(T,ee)=>{T==="globalQueueEnabled"?J("queue",{...f.queue,enabled:ee}):J(T,ee)},onSwitchToTemplate:We,onSwitchToCustom:B,onApplyTemplate:K})},{id:"notifications",label:"Notifications",content:s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(My,{notifications:f.notifications,onChange:T=>J("notifications",T)})]})},{id:"roadmap",label:"Planner",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.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"})]}),s.jsx(qt,{checked:f.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:_e})]}),f.roadmapScanner.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(we,{label:"Roadmap File Path",value:f.roadmapScanner.roadmapPath,onChange:T=>J("roadmapScanner",{...f.roadmapScanner,roadmapPath:T.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(rn,{label:"Planner Schedule",value:f.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:T=>J("roadmapScanner",{...f.roadmapScanner,slicerSchedule:T})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800",children:[s.jsx("h4",{className:"text-md font-medium text-slate-200 mb-4",children:"Planner Execution"}),s.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."}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(we,{label:"Planner Max Runtime",type:"number",value:String(f.roadmapScanner.slicerMaxRuntime||""),onChange:T=>J("roadmapScanner",{...f.roadmapScanner,slicerMaxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(wt,{label:"Planner Priority Mode",value:f.roadmapScanner.priorityMode||"roadmap-first",onChange:T=>J("roadmapScanner",{...f.roadmapScanner,priorityMode:T==="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."}),s.jsx(wt,{label:"Planner Issue Column",value:f.roadmapScanner.issueColumn||"Draft",onChange:T=>J("roadmapScanner",{...f.roadmapScanner,issueColumn:T==="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:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(qt,{checked:f.boardProvider.enabled,onChange:T=>J("boardProvider",{...f.boardProvider,enabled:T})})]}),f.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(wt,{label:"Board Provider",value:f.boardProvider.provider,onChange:T=>J("boardProvider",{...f.boardProvider,provider:T}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),f.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(we,{label:"Project Number",type:"number",value:String(f.boardProvider.projectNumber||""),onChange:T=>J("boardProvider",{...f.boardProvider,projectNumber:T.target.value?Number(T.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(we,{label:"Repository",value:f.boardProvider.repo||"",onChange:T=>J("boardProvider",{...f.boardProvider,repo:T.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),f.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]})},{id:"qa",label:"QA",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(qt,{checked:f.qa.enabled,onChange:T=>J("qa",{...f.qa,enabled:T})})]}),f.qa.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(we,{label:"Max Runtime",type:"number",value:String(f.qa.maxRuntime),onChange:T=>J("qa",{...f.qa,maxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(wt,{label:"Artifacts",value:f.qa.artifacts,onChange:T=>J("qa",{...f.qa,artifacts:T}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(we,{label:"Skip Label",value:f.qa.skipLabel,onChange:T=>J("qa",{...f.qa,skipLabel:T.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[s.jsx(pr,{label:"QA Branch Patterns",value:f.qa.branchPatterns,onChange:T=>J("qa",{...f.qa,branchPatterns:T}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),s.jsx(qt,{checked:f.qa.autoInstallPlaywright,onChange:T=>J("qa",{...f.qa,autoInstallPlaywright:T})})]})]})]})]})},{id:"audit",label:"Audit",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(qt,{checked:f.audit.enabled,onChange:T=>J("audit",{...f.audit,enabled:T})})]}),f.audit.enabled&&s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:s.jsx(we,{label:"Max Runtime",type:"number",value:String(f.audit.maxRuntime),onChange:T=>J("audit",{...f.audit,maxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})})]})},{id:"advanced",label:"Advanced",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(we,{label:"Templates Directory",value:f.templatesDir,onChange:T=>J("templatesDir",T.target.value),helperText:"Directory for custom template overrides"}),s.jsx(we,{label:"Max Retries",type:"number",min:"1",value:String(f.maxRetries),onChange:T=>{const ee=Math.max(1,Number(T.target.value||1));J("maxRetries",ee)},helperText:"Retry attempts for rate-limited API calls"})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:s.jsx(pr,{label:"PRD Priority",value:f.prdPriority,onChange:T=>J("prdPriority",T),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),s.jsx(Wh,{tabs:tl}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Le,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:Ce,children:[s.jsx(Yh,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Le,{onClick:ae,loading:m,children:[s.jsx(xb,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),s.jsxs("div",{className:"mt-12",children:[s.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[s.jsx(Uh,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),s.jsx(ze,{className:"divide-y divide-slate-800",children:Z?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):ye.map((T,ee)=>{const fe=T.status==="pass",Te=T.status==="warn",V=fe?"bg-green-500/10 text-green-400 border-green-500/20":Te?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:T.name}),s.jsx("p",{className:"text-xs text-slate-500",children:T.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${V}`,children:T.status.toUpperCase()})]},`${T.name}-${ee}`)})})]}),s.jsx(Ry,{isOpen:q,onClose:()=>{z(!1),k(null),L(null)},onSave:me,presetId:O,preset:E,isBuiltIn:O?Hi.includes(O):!1,existingIds:Object.keys(G())}),Y&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>le(null),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Gh,{className:"h-6 w-6 text-amber-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),s.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[s.jsx("strong",{children:Y.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:Y.references.map(T=>s.jsx("li",{children:T},T))}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:'Please remove these assignments before deleting the preset, or use "Force Delete" to remove the preset and clear all references.'}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>le(null),children:"Cancel"}),s.jsx(Le,{variant:"secondary",onClick:Ge,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},_y=()=>(ey(),ty(),s.jsx(eg,{children:s.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[s.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"}),s.jsx(Fb,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(Wb,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:s.jsx("div",{className:"max-w-7xl mx-auto w-full",children:s.jsxs(Ap,{children:[s.jsx(wl,{path:"/",element:s.jsx(oy,{})}),s.jsx(wl,{path:"/prs",element:s.jsx(fy,{})}),s.jsx(wl,{path:"/board",element:s.jsx(iy,{})}),s.jsx(wl,{path:"/scheduling",element:s.jsx(Ey,{})}),s.jsx(wl,{path:"/logs",element:s.jsx(dy,{})}),s.jsx(wl,{path:"/roadmap",element:s.jsx(my,{})}),s.jsx(wl,{path:"/settings",element:s.jsx(Ay,{})}),s.jsx(wl,{path:"*",element:s.jsx(Rp,{to:"/",replace:!0})})]})})})]}),s.jsx(Ib,{})]})})),t0=document.getElementById("root");if(!t0)throw new Error("Could not find root element to mount to");const Dy=Dv.createRoot(t0);Dy.render(s.jsx(ge.StrictMode,{children:s.jsx(_y,{})}));