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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,370 @@
1
+ (function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))r(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"&&r(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 r(m){if(m.ep)return;m.ep=!0;const x=d(m);fetch(m.href,x)}})();function Ec(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var uc={exports:{}},rs={};/**
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 km;function Np(){if(km)return rs;km=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function d(r,m,x){var f=null;if(x!==void 0&&(f=""+x),m.key!==void 0&&(f=""+m.key),"key"in m){x={};for(var v in m)v!=="key"&&(x[v]=m[v])}else x=m;return m=x.ref,{$$typeof:u,type:r,key:f,ref:m!==void 0?m:null,props:x}}return rs.Fragment=c,rs.jsx=d,rs.jsxs=d,rs}var Ym;function Ep(){return Ym||(Ym=1,uc.exports=Np()),uc.exports}var s=Ep(),rc={exports:{}},fe={};/**
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 Gm;function wp(){if(Gm)return fe;Gm=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),f=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),M=Symbol.iterator;function D(N){return N===null||typeof N!="object"?null:(N=M&&N[M]||N["@@iterator"],typeof N=="function"?N:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,k={};function E(N,B,$){this.props=N,this.context=B,this.refs=k,this.updater=$||U}E.prototype.isReactComponent={},E.prototype.setState=function(N,B){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,B,"setState")},E.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function G(){}G.prototype=E.prototype;function q(N,B,$){this.props=N,this.context=B,this.refs=k,this.updater=$||U}var te=q.prototype=new G;te.constructor=q,O(te,E.prototype),te.isPureReactComponent=!0;var Z=Array.isArray;function J(){}var I={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function ue(N,B,$){var P=$.ref;return{$$typeof:u,type:N,key:B,ref:P!==void 0?P:null,props:$}}function X(N,B){return ue(N.type,B,N.props)}function pe(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function ye(N){var B={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function($){return B[$]})}var we=/\/+/g;function F(N,B){return typeof N=="object"&&N!==null&&N.key!=null?ye(""+N.key):B.toString(36)}function Pe(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(J,J):(N.status="pending",N.then(function(B){N.status==="pending"&&(N.status="fulfilled",N.value=B)},function(B){N.status==="pending"&&(N.status="rejected",N.reason=B)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function H(N,B,$,P,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 c:Ne=!0;break;case g:return Ne=N._init,H(Ne(N._payload),B,$,P,ce)}}if(Ne)return ce=ce(N),Ne=P===""?"."+F(N,0):P,Z(ce)?($="",Ne!=null&&($=Ne.replace(we,"$&/")+"/"),H(ce,B,$,"",function(tl){return tl})):ce!=null&&(pe(ce)&&(ce=X(ce,$+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(we,"$&/")+"/")+Ne)),B.push(ce)),1;Ne=0;var We=P===""?".":P+":";if(Z(N))for(var Ge=0;Ge<N.length;Ge++)P=N[Ge],me=We+F(P,Ge),Ne+=H(P,B,$,me,ce);else if(Ge=D(N),typeof Ge=="function")for(N=Ge.call(N),Ge=0;!(P=N.next()).done;)P=P.value,me=We+F(P,Ge++),Ne+=H(P,B,$,me,ce);else if(me==="object"){if(typeof N.then=="function")return H(Pe(N),B,$,P,ce);throw B=String(N),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function K(N,B,$){if(N==null)return N;var P=[],ce=0;return H(N,P,"","",function(me){return B.call($,me,ce++)}),P}function ae(N){if(N._status===-1){var B=N._result;B=B(),B.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=B)}if(N._status===1)return N._result.default;throw N._result}var Re=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=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(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},De={map:K,forEach:function(N,B,$){K(N,function(){B.apply(this,arguments)},$)},count:function(N){var B=0;return K(N,function(){B++}),B},toArray:function(N){return K(N,function(B){return B})||[]},only:function(N){if(!pe(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return fe.Activity=y,fe.Children=De,fe.Component=E,fe.Fragment=d,fe.Profiler=m,fe.PureComponent=q,fe.StrictMode=r,fe.Suspense=b,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,fe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return I.H.useMemoCache(N)}},fe.cache=function(N){return function(){return N.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(N,B,$){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=O({},N.props),ce=N.key;if(B!=null)for(me in B.key!==void 0&&(ce=""+B.key),B)!ie.call(B,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&B.ref===void 0||(P[me]=B[me]);var me=arguments.length-2;if(me===1)P.children=$;else if(1<me){for(var Ne=Array(me),We=0;We<me;We++)Ne[We]=arguments[We+2];P.children=Ne}return ue(N.type,ce,P)},fe.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},fe.createElement=function(N,B,$){var P,ce={},me=null;if(B!=null)for(P in B.key!==void 0&&(me=""+B.key),B)ie.call(B,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(ce[P]=B[P]);var Ne=arguments.length-2;if(Ne===1)ce.children=$;else if(1<Ne){for(var We=Array(Ne),Ge=0;Ge<Ne;Ge++)We[Ge]=arguments[Ge+2];ce.children=We}if(N&&N.defaultProps)for(P in Ne=N.defaultProps,Ne)ce[P]===void 0&&(ce[P]=Ne[P]);return ue(N,me,ce)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(N){return{$$typeof:v,render:N}},fe.isValidElement=pe,fe.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:ae}},fe.memo=function(N,B){return{$$typeof:p,type:N,compare:B===void 0?null:B}},fe.startTransition=function(N){var B=I.T,$={};I.T=$;try{var P=N(),ce=I.S;ce!==null&&ce($,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(J,Re)}catch(me){Re(me)}finally{B!==null&&$.types!==null&&(B.types=$.types),I.T=B}},fe.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},fe.use=function(N){return I.H.use(N)},fe.useActionState=function(N,B,$){return I.H.useActionState(N,B,$)},fe.useCallback=function(N,B){return I.H.useCallback(N,B)},fe.useContext=function(N){return I.H.useContext(N)},fe.useDebugValue=function(){},fe.useDeferredValue=function(N,B){return I.H.useDeferredValue(N,B)},fe.useEffect=function(N,B){return I.H.useEffect(N,B)},fe.useEffectEvent=function(N){return I.H.useEffectEvent(N)},fe.useId=function(){return I.H.useId()},fe.useImperativeHandle=function(N,B,$){return I.H.useImperativeHandle(N,B,$)},fe.useInsertionEffect=function(N,B){return I.H.useInsertionEffect(N,B)},fe.useLayoutEffect=function(N,B){return I.H.useLayoutEffect(N,B)},fe.useMemo=function(N,B){return I.H.useMemo(N,B)},fe.useOptimistic=function(N,B){return I.H.useOptimistic(N,B)},fe.useReducer=function(N,B,$){return I.H.useReducer(N,B,$)},fe.useRef=function(N){return I.H.useRef(N)},fe.useState=function(N){return I.H.useState(N)},fe.useSyncExternalStore=function(N,B,$){return I.H.useSyncExternalStore(N,B,$)},fe.useTransition=function(){return I.H.useTransition()},fe.version="19.2.4",fe}var Qm;function wc(){return Qm||(Qm=1,rc.exports=wp()),rc.exports}var w=wc();const be=Ec(w);var cc={exports:{}},cs={},oc={exports:{}},dc={};/**
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 Vm;function Cp(){return Vm||(Vm=1,(function(u){function c(H,K){var ae=H.length;H.push(K);e:for(;0<ae;){var Re=ae-1>>>1,De=H[Re];if(0<m(De,K))H[Re]=K,H[ae]=De,ae=Re;else break e}}function d(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var K=H[0],ae=H.pop();if(ae!==K){H[0]=ae;e:for(var Re=0,De=H.length,N=De>>>1;Re<N;){var B=2*(Re+1)-1,$=H[B],P=B+1,ce=H[P];if(0>m($,ae))P<De&&0>m(ce,$)?(H[Re]=ce,H[P]=ae,Re=P):(H[Re]=$,H[B]=ae,Re=B);else if(P<De&&0>m(ce,ae))H[Re]=ce,H[P]=ae,Re=P;else break e}}return K}function m(H,K){var ae=H.sortIndex-K.sortIndex;return ae!==0?ae:H.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,v=f.now();u.unstable_now=function(){return f.now()-v}}var b=[],p=[],g=1,y=null,M=3,D=!1,U=!1,O=!1,k=!1,E=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function te(H){for(var K=d(p);K!==null;){if(K.callback===null)r(p);else if(K.startTime<=H)r(p),K.sortIndex=K.expirationTime,c(b,K);else break;K=d(p)}}function Z(H){if(O=!1,te(H),!U)if(d(b)!==null)U=!0,J||(J=!0,ye());else{var K=d(p);K!==null&&Pe(Z,K.startTime-H)}}var J=!1,I=-1,ie=5,ue=-1;function X(){return k?!0:!(u.unstable_now()-ue<ie)}function pe(){if(k=!1,J){var H=u.unstable_now();ue=H;var K=!0;try{e:{U=!1,O&&(O=!1,G(I),I=-1),D=!0;var ae=M;try{t:{for(te(H),y=d(b);y!==null&&!(y.expirationTime>H&&X());){var Re=y.callback;if(typeof Re=="function"){y.callback=null,M=y.priorityLevel;var De=Re(y.expirationTime<=H);if(H=u.unstable_now(),typeof De=="function"){y.callback=De,te(H),K=!0;break t}y===d(b)&&r(b),te(H)}else r(b);y=d(b)}if(y!==null)K=!0;else{var N=d(p);N!==null&&Pe(Z,N.startTime-H),K=!1}}break e}finally{y=null,M=ae,D=!1}K=void 0}}finally{K?ye():J=!1}}}var ye;if(typeof q=="function")ye=function(){q(pe)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,F=we.port2;we.port1.onmessage=pe,ye=function(){F.postMessage(null)}}else ye=function(){E(pe,0)};function Pe(H,K){I=E(function(){H(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(H){H.callback=null},u.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<H?Math.floor(1e3/H):5},u.unstable_getCurrentPriorityLevel=function(){return M},u.unstable_next=function(H){switch(M){case 1:case 2:case 3:var K=3;break;default:K=M}var ae=M;M=K;try{return H()}finally{M=ae}},u.unstable_requestPaint=function(){k=!0},u.unstable_runWithPriority=function(H,K){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ae=M;M=H;try{return K()}finally{M=ae}},u.unstable_scheduleCallback=function(H,K,ae){var Re=u.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Re+ae:Re):ae=Re,H){case 1:var De=-1;break;case 2:De=250;break;case 5:De=1073741823;break;case 4:De=1e4;break;default:De=5e3}return De=ae+De,H={id:g++,callback:K,priorityLevel:H,startTime:ae,expirationTime:De,sortIndex:-1},ae>Re?(H.sortIndex=ae,c(p,H),d(b)===null&&H===d(p)&&(O?(G(I),I=-1):O=!0,Pe(Z,ae-Re))):(H.sortIndex=De,c(b,H),U||D||(U=!0,J||(J=!0,ye()))),H},u.unstable_shouldYield=X,u.unstable_wrapCallback=function(H){var K=M;return function(){var ae=M;M=K;try{return H.apply(this,arguments)}finally{M=ae}}}})(dc)),dc}var Xm;function Tp(){return Xm||(Xm=1,oc.exports=Cp()),oc.exports}var fc={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 Zm;function Rp(){if(Zm)return ht;Zm=1;var u=wc();function c(b){var p="https://react.dev/errors/"+b;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+b+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var r={d:{f:d,r:function(){throw Error(c(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,p,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:y==null?null:""+y,children:b,containerInfo:p,implementation:g}}var f=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(b,p){if(b==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ht.createPortal=function(b,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(c(299));return x(b,p,null,g)},ht.flushSync=function(b){var p=f.T,g=r.p;try{if(f.T=null,r.p=2,b)return b()}finally{f.T=p,r.p=g,r.d.f()}},ht.preconnect=function(b,p){typeof b=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(b,p))},ht.prefetchDNS=function(b){typeof b=="string"&&r.d.D(b)},ht.preinit=function(b,p){if(typeof b=="string"&&p&&typeof p.as=="string"){var g=p.as,y=v(g,p.crossOrigin),M=typeof p.integrity=="string"?p.integrity:void 0,D=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?r.d.S(b,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:M,fetchPriority:D}):g==="script"&&r.d.X(b,{crossOrigin:y,integrity:M,fetchPriority:D,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},ht.preinitModule=function(b,p){if(typeof b=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=v(p.as,p.crossOrigin);r.d.M(b,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(b)},ht.preload=function(b,p){if(typeof b=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,y=v(g,p.crossOrigin);r.d.L(b,g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},ht.preloadModule=function(b,p){if(typeof b=="string")if(p){var g=v(p.as,p.crossOrigin);r.d.m(b,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(b)},ht.requestFormReset=function(b){r.d.r(b)},ht.unstable_batchedUpdates=function(b,p){return b(p)},ht.useFormState=function(b,p,g){return f.H.useFormState(b,p,g)},ht.useFormStatus=function(){return f.H.useHostTransitionStatus()},ht.version="19.2.4",ht}var $m;function xh(){if($m)return fc.exports;$m=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(c){console.error(c)}}return u(),fc.exports=Rp(),fc.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 Km;function Ap(){if(Km)return cs;Km=1;var u=Tp(),c=wc(),d=xh();function r(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 v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(x(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(r(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(r(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(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(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,M=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),q=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),ue=Symbol.for("react.activity"),X=Symbol.for("react.memo_cache_sentinel"),pe=Symbol.iterator;function ye(e){return e===null||typeof e!="object"?null:(e=pe&&e[pe]||e["@@iterator"],typeof e=="function"?e:null)}var we=Symbol.for("react.client.reference");function F(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===we?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 Z:return"Suspense";case J:return"SuspenseList";case ue:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case q:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:F(e.type)||"Memo";case ie:t=e._payload,e=e._init;try{return F(e(t))}catch{}}return null}var Pe=Array.isArray,H=c.__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},Re=[],De=-1;function N(e){return{current:e}}function B(e){0>De||(e.current=Re[De],Re[De]=null,De--)}function $(e,t){De++,Re[De]=e.current,e.current=t}var P=N(null),ce=N(null),me=N(null),Ne=N(null);function We(e,t){switch($(me,t),$(ce,e),$(P,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=om(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(P),$(P,e)}function Ge(){B(P),B(ce),B(me)}function tl(e){e.memoizedState!==null&&$(Ne,e);var t=P.current,l=om(t,e.type);t!==l&&($(ce,e),$(P,l))}function C(e){ce.current===e&&(B(P),B(ce)),Ne.current===e&&(B(Ne),ns._currentValue=ae)}var W,de;function Ce(e){if(W===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||"",de=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+W+e+de}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 Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(z){var _=z}Reflect.construct(e,[],Q)}else{try{Q.call()}catch(z){_=z}e.call(Q.prototype)}}else{try{throw Error()}catch(z){_=z}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(z){if(z&&_&&typeof z.stack=="string")return[z.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 L=`
46
+ `+j[a].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=a&&0<=n);break}}}finally{V=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ce(l):""}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce("Lazy");case 13:return e.child!==t&&t!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("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 Ce("Activity");default:return""}}function rt(e){try{var t="",l=null;do t+=Ae(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var pt=Object.prototype.hasOwnProperty,Ht=u.unstable_scheduleCallback,Lt=u.unstable_cancelCallback,Al=u.unstable_shouldYield,l0=u.unstable_requestPaint,Ct=u.unstable_now,a0=u.unstable_getCurrentPriorityLevel,Bc=u.unstable_ImmediatePriority,kc=u.unstable_UserBlockingPriority,bs=u.unstable_NormalPriority,n0=u.unstable_LowPriority,Yc=u.unstable_IdlePriority,s0=u.log,i0=u.unstable_setDisableYieldValue,pn=null,Tt=null;function Ml(e){if(typeof s0=="function"&&i0(e),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(pn,e)}catch{}}var Rt=Math.clz32?Math.clz32:c0,u0=Math.log,r0=Math.LN2;function c0(e){return e>>>=0,e===0?32:31-(u0(e)/r0|0)|0}var ys=256,js=262144,Ss=4194304;function na(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=na(a):(o&=h,o!==0?n=na(o):l||(l=h&~e,l!==0&&(n=na(l))))):(h=a&~i,h!==0?n=na(h):o!==0?n=na(o):l||(l=a&~e,l!==0&&(n=na(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 vn(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 Gc(){var e=Ss;return Ss<<=1,(Ss&62914560)===0&&(Ss=4194304),e}function Ji(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 L=31-Rt(l),Q=1<<L;h[L]=0,j[L]=-1;var _=A[L];if(_!==null)for(A[L]=null,L=0;L<_.length;L++){var z=_[L];z!==null&&(z.lane&=-536870913)}l&=~Q}a!==0&&Qc(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Qc(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 Vc(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 Xc(e,t){var l=t&-t;return l=(l&42)!==0?1:Fi(l),(l&(e.suspendedLanes|t))!==0?0:l}function Fi(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 Pi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Zc(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:zm(e.type))}function $c(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var _l=Math.random().toString(36).slice(2),ct="__reactFiber$"+_l,gt="__reactProps$"+_l,Na="__reactContainer$"+_l,Wi="__reactEvents$"+_l,f0="__reactListeners$"+_l,m0="__reactHandles$"+_l,Kc="__reactResources$"+_l,bn="__reactMarker$"+_l;function Ii(e){delete e[ct],delete e[gt],delete e[Wi],delete e[f0],delete e[m0]}function Ea(e){var t=e[ct];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Na]||l[ct]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=vm(e);e!==null;){if(l=e[ct])return l;e=vm(e)}return t}e=l,l=e.parentNode}return null}function wa(e){if(e=e[ct]||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(r(33))}function Ca(e){var t=e[Kc];return t||(t=e[Kc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function it(e){e[bn]=!0}var Jc=new Set,Fc={};function sa(e,t){Ta(e,t),Ta(e+"Capture",t)}function Ta(e,t){for(Fc[e]=t,e=0;e<t.length;e++)Jc.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]*$"),Pc={},Wc={};function x0(e){return pt.call(Wc,e)?!0:pt.call(Pc,e)?!1:h0.test(e)?Wc[e]=!0:(Pc[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 Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ic(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function p0(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 eu(e){if(!e._valueTracker){var t=Ic(e)?"checked":"value";e._valueTracker=p0(e,t,""+e[t])}}function eo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Ic(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 v0=/[\n"\\]/g;function kt(e){return e.replace(v0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function tu(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=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?lu(e,o,Bt(t)):l!=null?lu(e,o,Bt(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=""+Bt(h):e.removeAttribute("name")}function to(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)){eu(e);return}l=l!=null?""+Bt(l):"",t=t!=null?""+Bt(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),eu(e)}function lu(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=""+Bt(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 lo(e,t,l){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Bt(l):""}function ao(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(Pe(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Bt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),eu(e)}function Aa(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 no(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 so(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(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&&no(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&no(e,i,t[i])}function au(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 rl(){}var nu=null;function su(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ma=null,_a=null;function io(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(tu(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="'+kt(""+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(r(90));tu(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&&eo(a)}break e;case"textarea":lo(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ra(e,!!l.multiple,t,!1)}}}var iu=!1;function uo(e,t,l){if(iu)return e(t,l);iu=!0;try{var a=e(t);return a}finally{if(iu=!1,(Ma!==null||_a!==null)&&(hi(),Ma&&(t=Ma,e=_a,_a=Ma=null,io(t),e)))for(t=0;t<e.length;t++)io(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(r(231,t,typeof l));return l}var cl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=!1;if(cl)try{var Sn={};Object.defineProperty(Sn,"passive",{get:function(){uu=!0}}),window.addEventListener("test",Sn,Sn),window.removeEventListener("test",Sn,Sn)}catch{uu=!1}var Dl=null,ru=null,Rs=null;function ro(){if(Rs)return Rs;var e,t=ru,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 As(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ms(){return!0}function 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)?Ms: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=Ms)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ms)},persist:function(){},isPersistent:Ms}),t}var ia={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_s=bt(ia),Nn=y({},ia,{view:0,detail:0}),j0=bt(Nn),cu,ou,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:fu,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,ou=e.screenY-En.screenY):ou=cu=0,En=e),cu)},movementY:function(e){return"movementY"in e?e.movementY:ou}}),oo=bt(Ds),S0=y({},Ds,{dataTransfer:0}),N0=bt(S0),E0=y({},Nn,{relatedTarget:0}),du=bt(E0),w0=y({},ia,{animationName:0,elapsedTime:0,pseudoElement:0}),C0=bt(w0),T0=y({},ia,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),R0=bt(T0),A0=y({},ia,{data:0}),fo=bt(A0),M0={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 fu(){return z0}var O0=y({},Nn,{key:function(e){if(e.key){var t=M0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=As(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:fu,charCode:function(e){return e.type==="keypress"?As(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?As(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}),mo=bt(q0),H0=y({},Nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fu}),L0=bt(H0),B0=y({},ia,{propertyName:0,elapsedTime:0,pseudoElement:0}),k0=bt(B0),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({},ia,{newState:0,oldState:0}),V0=bt(Q0),X0=[9,13,27,32],mu=cl&&"CompositionEvent"in window,wn=null;cl&&"documentMode"in document&&(wn=document.documentMode);var Z0=cl&&"TextEvent"in window&&!wn,ho=cl&&(!mu||wn&&8<wn&&11>=wn),xo=" ",po=!1;function vo(e,t){switch(e){case"keyup":return X0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function go(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 go(t);case"keypress":return t.which!==32?null:(po=!0,xo);case"textInput":return e=t.data,e===xo&&po?null:e;default:return null}}function K0(e,t){if(Da)return e==="compositionend"||!mu&&vo(e,t)?(e=ro(),Rs=ru=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 ho&&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 bo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!J0[e.type]:t==="textarea"}function yo(e,t,l,a){Ma?_a?_a.push(a):_a=[a]:Ma=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){am(e,0)}function zs(e){var t=yn(e);if(eo(t))return e}function jo(e,t){if(e==="change")return t}var So=!1;if(cl){var hu;if(cl){var xu="oninput"in document;if(!xu){var No=document.createElement("div");No.setAttribute("oninput","return;"),xu=typeof No.oninput=="function"}hu=xu}else hu=!1;So=hu&&(!document.documentMode||9<document.documentMode)}function Eo(){Cn&&(Cn.detachEvent("onpropertychange",wo),Tn=Cn=null)}function wo(e){if(e.propertyName==="value"&&zs(Tn)){var t=[];yo(t,Tn,e,su(e)),uo(F0,t)}}function P0(e,t,l){e==="focusin"?(Eo(),Cn=t,Tn=l,Cn.attachEvent("onpropertychange",wo)):e==="focusout"&&Eo()}function W0(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 At=typeof Object.is=="function"?Object.is:tx;function Rn(e,t){if(At(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(!pt.call(t,n)||!At(e[n],t[n]))return!1}return!0}function Co(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function To(e,t){var l=Co(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=Co(l)}}function Ro(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ro(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ao(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 pu(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=cl&&"documentMode"in document&&11>=document.documentMode,za=null,vu=null,An=null,gu=!1;function Mo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;gu||za==null||za!==Cs(a)||(a=za,"selectionStart"in a&&pu(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}),An&&Rn(An,a)||(An=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 ua(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Oa={animationend:ua("Animation","AnimationEnd"),animationiteration:ua("Animation","AnimationIteration"),animationstart:ua("Animation","AnimationStart"),transitionrun:ua("Transition","TransitionRun"),transitionstart:ua("Transition","TransitionStart"),transitioncancel:ua("Transition","TransitionCancel"),transitionend:ua("Transition","TransitionEnd")},bu={},_o={};cl&&(_o=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 ra(e){if(bu[e])return bu[e];if(!Oa[e])return e;var t=Oa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in _o)return bu[e]=t[l];return e}var Do=ra("animationend"),zo=ra("animationiteration"),Oo=ra("animationstart"),ax=ra("transitionrun"),nx=ra("transitionstart"),sx=ra("transitioncancel"),Uo=ra("transitionend"),qo=new Map,yu="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(" ");yu.push("scrollEnd");function Pt(e,t){qo.set(e,t),sa(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)},Yt=[],Ua=0,ju=0;function Us(){for(var e=Ua,t=ju=Ua=0;t<e;){var l=Yt[t];Yt[t++]=null;var a=Yt[t];Yt[t++]=null;var n=Yt[t];Yt[t++]=null;var i=Yt[t];if(Yt[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&&Ho(l,n,i)}}function qs(e,t,l,a){Yt[Ua++]=e,Yt[Ua++]=t,Yt[Ua++]=l,Yt[Ua++]=a,ju|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Su(e,t,l,a){return qs(e,t,l,a),Hs(e)}function ca(e,t){return qs(e,null,null,t),Hs(e)}function Ho(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 Hs(e){if(50<Pn)throw Pn=0,_r=null,Error(r(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 Mt(e,t,l,a){return new ix(e,t,l,a)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ol(e,t){var l=e.alternate;return l===null?(l=Mt(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 Lo(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 Ls(e,t,l,a,n,i){var o=0;if(a=e,typeof e=="function")Nu(e)&&(o=1);else if(typeof e=="string")o=dp(e,l,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ue:return e=Mt(31,l,t,n),e.elementType=ue,e.lanes=i,e;case O:return oa(l.children,n,i,t);case k:o=8,n|=24;break;case E:return e=Mt(12,l,t,n|2),e.elementType=E,e.lanes=i,e;case Z:return e=Mt(13,l,t,n),e.elementType=Z,e.lanes=i,e;case J:return e=Mt(19,l,t,n),e.elementType=J,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:o=10;break e;case G:o=9;break e;case te:o=11;break e;case I:o=14;break e;case ie:o=16,a=null;break e}o=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=Mt(o,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function oa(e,t,l,a){return e=Mt(7,e,a,t),e.lanes=l,e}function Eu(e,t,l){return e=Mt(6,e,null,t),e.lanes=l,e}function Bo(e){var t=Mt(18,null,null,0);return t.stateNode=e,t}function wu(e,t,l){return t=Mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ko=new WeakMap;function Gt(e,t){if(typeof e=="object"&&e!==null){var l=ko.get(e);return l!==void 0?l:(t={value:e,source:t,stack:rt(t)},ko.set(e,t),t)}return{value:e,source:t,stack:rt(t)}}var Ha=[],La=0,Bs=null,Mn=0,Qt=[],Vt=0,zl=null,ll=1,al="";function dl(e,t){Ha[La++]=Mn,Ha[La++]=Bs,Bs=e,Mn=t}function Yo(e,t,l){Qt[Vt++]=ll,Qt[Vt++]=al,Qt[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 Cu(e){e.return!==null&&(dl(e,1),Yo(e,1,0))}function Tu(e){for(;e===Bs;)Bs=Ha[--La],Ha[La]=null,Mn=Ha[--La],Ha[La]=null;for(;e===zl;)zl=Qt[--Vt],Qt[Vt]=null,al=Qt[--Vt],Qt[Vt]=null,ll=Qt[--Vt],Qt[Vt]=null}function Go(e,t){Qt[Vt++]=ll,Qt[Vt++]=al,Qt[Vt++]=zl,ll=t.id,al=t.overflow,zl=e}var ot=null,Qe=null,Ee=!1,Ol=null,Xt=!1,Ru=Error(r(519));function Ul(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _n(Gt(t,e)),Ru}function Qo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[ct]=e,t[gt]=a,l){case"dialog":ge("cancel",t),ge("close",t);break;case"iframe":case"object":case"embed":ge("load",t);break;case"video":case"audio":for(l=0;l<In.length;l++)ge(In[l],t);break;case"source":ge("error",t);break;case"img":case"image":case"link":ge("error",t),ge("load",t);break;case"details":ge("toggle",t);break;case"input":ge("invalid",t),to(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ge("invalid",t);break;case"textarea":ge("invalid",t),ao(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||um(t.textContent,l)?(a.popover!=null&&(ge("beforetoggle",t),ge("toggle",t)),a.onScroll!=null&&ge("scroll",t),a.onScrollEnd!=null&&ge("scrollend",t),a.onClick!=null&&(t.onclick=rl),t=!0):t=!1,t||Ul(e,!0)}function Vo(e){for(ot=e.return;ot;)switch(ot.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:ot=ot.return}}function Ba(e){if(e!==ot)return!1;if(!Ee)return Vo(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")||Zr(e.type,e.memoizedProps)),l=!l),l&&Qe&&Ul(e),Vo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=pm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=pm(e)}else t===27?(t=Qe,Jl(e.type)?(e=Pr,Pr=null,Qe=e):Qe=t):Qe=ot?$t(e.stateNode.nextSibling):null;return!0}function da(){Qe=ot=null,Ee=!1}function Au(){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),fa=null,fl=null;function ql(e,t,l){$(Mu,t._currentValue),t._currentValue=l}function ml(e){e._currentValue=Mu.current,B(Mu)}function _u(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 Du(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),_u(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(r(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),_u(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(r(387));if(o=o.memoizedProps,o!==null){var h=n.type;At(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(r(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(ns):e=[ns])}n=n.return}e!==null&&Du(t,e,l,a),t.flags|=262144}function ks(e){for(e=e.firstContext;e!==null;){if(!At(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){fa=e,fl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function dt(e){return Xo(fa,e)}function Ys(e,t){return fa===null&&ma(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(r(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()})}},rx=u.unstable_scheduleCallback,cx=u.unstable_NormalPriority,Ie={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zu(){return{controller:new ux,data:new Map,refCount:0}}function Dn(e){e.refCount--,e.refCount===0&&rx(cx,function(){e.controller.abort()})}var zn=null,Ou=0,Ya=0,Ga=null;function ox(e,t){if(zn===null){var l=zn=[];Ou=0,Ya=Hr(),Ga={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Ou++,t.then(Zo,Zo),t}function Zo(){if(--Ou===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 $o=H.S;H.S=function(e,t){_f=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ox(e,t),$o!==null&&$o(e,t)};var ha=N(null);function Uu(){var e=ha.current;return e!==null?e:Ye.pooledCache}function Gs(e,t){t===null?$(ha,ha.current):$(ha,t.pool)}function Ko(){var e=Uu();return e===null?null:{parent:Ie._currentValue,pool:e}}var Qa=Error(r(460)),qu=Error(r(474)),Qs=Error(r(542)),Vs={then:function(){}};function Jo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Fo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(rl,rl),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(rl,rl);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(r(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 pa=t,Qa}}function xa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(pa=l,Qa):l}}var pa=null;function Po(){if(pa===null)throw Error(r(459));var e=pa;return pa=null,e}function Wo(e){if(e===Qa||e===Qs)throw Error(r(483))}var Va=null,On=0;function Xs(e){var t=On;return On+=1,Va===null&&(Va=[]),Fo(Va,e,t)}function Un(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zs(e,t){throw t.$$typeof===M?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Io(e){function t(T,S){if(e){var R=T.deletions;R===null?(T.deletions=[S],T.flags|=16):R.push(S)}}function l(T,S){if(!e)return null;for(;S!==null;)t(T,S),S=S.sibling;return null}function a(T){for(var S=new Map;T!==null;)T.key!==null?S.set(T.key,T):S.set(T.index,T),T=T.sibling;return S}function n(T,S){return T=ol(T,S),T.index=0,T.sibling=null,T}function i(T,S,R){return T.index=R,e?(R=T.alternate,R!==null?(R=R.index,R<S?(T.flags|=67108866,S):R):(T.flags|=67108866,S)):(T.flags|=1048576,S)}function o(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function h(T,S,R,Y){return S===null||S.tag!==6?(S=Eu(R,T.mode,Y),S.return=T,S):(S=n(S,R),S.return=T,S)}function j(T,S,R,Y){var se=R.type;return se===O?L(T,S,R.props.children,Y,R.key):S!==null&&(S.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===ie&&xa(se)===S.type)?(S=n(S,R.props),Un(S,R),S.return=T,S):(S=Ls(R.type,R.key,R.props,null,T.mode,Y),Un(S,R),S.return=T,S)}function A(T,S,R,Y){return S===null||S.tag!==4||S.stateNode.containerInfo!==R.containerInfo||S.stateNode.implementation!==R.implementation?(S=wu(R,T.mode,Y),S.return=T,S):(S=n(S,R.children||[]),S.return=T,S)}function L(T,S,R,Y,se){return S===null||S.tag!==7?(S=oa(R,T.mode,Y,se),S.return=T,S):(S=n(S,R),S.return=T,S)}function Q(T,S,R){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Eu(""+S,T.mode,R),S.return=T,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case D:return R=Ls(S.type,S.key,S.props,null,T.mode,R),Un(R,S),R.return=T,R;case U:return S=wu(S,T.mode,R),S.return=T,S;case ie:return S=xa(S),Q(T,S,R)}if(Pe(S)||ye(S))return S=oa(S,T.mode,R,null),S.return=T,S;if(typeof S.then=="function")return Q(T,Xs(S),R);if(S.$$typeof===q)return Q(T,Ys(T,S),R);Zs(T,S)}return null}function _(T,S,R,Y){var se=S!==null?S.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return se!==null?null:h(T,S,""+R,Y);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case D:return R.key===se?j(T,S,R,Y):null;case U:return R.key===se?A(T,S,R,Y):null;case ie:return R=xa(R),_(T,S,R,Y)}if(Pe(R)||ye(R))return se!==null?null:L(T,S,R,Y,null);if(typeof R.then=="function")return _(T,S,Xs(R),Y);if(R.$$typeof===q)return _(T,S,Ys(T,R),Y);Zs(T,R)}return null}function z(T,S,R,Y,se){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return T=T.get(R)||null,h(S,T,""+Y,se);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case D:return T=T.get(Y.key===null?R:Y.key)||null,j(S,T,Y,se);case U:return T=T.get(Y.key===null?R:Y.key)||null,A(S,T,Y,se);case ie:return Y=xa(Y),z(T,S,R,Y,se)}if(Pe(Y)||ye(Y))return T=T.get(R)||null,L(S,T,Y,se,null);if(typeof Y.then=="function")return z(T,S,R,Xs(Y),se);if(Y.$$typeof===q)return z(T,S,R,Ys(S,Y),se);Zs(S,Y)}return null}function ee(T,S,R,Y){for(var se=null,Me=null,le=S,xe=S=0,Se=null;le!==null&&xe<R.length;xe++){le.index>xe?(Se=le,le=null):Se=le.sibling;var _e=_(T,le,R[xe],Y);if(_e===null){le===null&&(le=Se);break}e&&le&&_e.alternate===null&&t(T,le),S=i(_e,S,xe),Me===null?se=_e:Me.sibling=_e,Me=_e,le=Se}if(xe===R.length)return l(T,le),Ee&&dl(T,xe),se;if(le===null){for(;xe<R.length;xe++)le=Q(T,R[xe],Y),le!==null&&(S=i(le,S,xe),Me===null?se=le:Me.sibling=le,Me=le);return Ee&&dl(T,xe),se}for(le=a(le);xe<R.length;xe++)Se=z(le,T,xe,R[xe],Y),Se!==null&&(e&&Se.alternate!==null&&le.delete(Se.key===null?xe:Se.key),S=i(Se,S,xe),Me===null?se=Se:Me.sibling=Se,Me=Se);return e&&le.forEach(function(ea){return t(T,ea)}),Ee&&dl(T,xe),se}function re(T,S,R,Y){if(R==null)throw Error(r(151));for(var se=null,Me=null,le=S,xe=S=0,Se=null,_e=R.next();le!==null&&!_e.done;xe++,_e=R.next()){le.index>xe?(Se=le,le=null):Se=le.sibling;var ea=_(T,le,_e.value,Y);if(ea===null){le===null&&(le=Se);break}e&&le&&ea.alternate===null&&t(T,le),S=i(ea,S,xe),Me===null?se=ea:Me.sibling=ea,Me=ea,le=Se}if(_e.done)return l(T,le),Ee&&dl(T,xe),se;if(le===null){for(;!_e.done;xe++,_e=R.next())_e=Q(T,_e.value,Y),_e!==null&&(S=i(_e,S,xe),Me===null?se=_e:Me.sibling=_e,Me=_e);return Ee&&dl(T,xe),se}for(le=a(le);!_e.done;xe++,_e=R.next())_e=z(le,T,xe,_e.value,Y),_e!==null&&(e&&_e.alternate!==null&&le.delete(_e.key===null?xe:_e.key),S=i(_e,S,xe),Me===null?se=_e:Me.sibling=_e,Me=_e);return e&&le.forEach(function(Sp){return t(T,Sp)}),Ee&&dl(T,xe),se}function Be(T,S,R,Y){if(typeof R=="object"&&R!==null&&R.type===O&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case D:e:{for(var se=R.key;S!==null;){if(S.key===se){if(se=R.type,se===O){if(S.tag===7){l(T,S.sibling),Y=n(S,R.props.children),Y.return=T,T=Y;break e}}else if(S.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===ie&&xa(se)===S.type){l(T,S.sibling),Y=n(S,R.props),Un(Y,R),Y.return=T,T=Y;break e}l(T,S);break}else t(T,S);S=S.sibling}R.type===O?(Y=oa(R.props.children,T.mode,Y,R.key),Y.return=T,T=Y):(Y=Ls(R.type,R.key,R.props,null,T.mode,Y),Un(Y,R),Y.return=T,T=Y)}return o(T);case U:e:{for(se=R.key;S!==null;){if(S.key===se)if(S.tag===4&&S.stateNode.containerInfo===R.containerInfo&&S.stateNode.implementation===R.implementation){l(T,S.sibling),Y=n(S,R.children||[]),Y.return=T,T=Y;break e}else{l(T,S);break}else t(T,S);S=S.sibling}Y=wu(R,T.mode,Y),Y.return=T,T=Y}return o(T);case ie:return R=xa(R),Be(T,S,R,Y)}if(Pe(R))return ee(T,S,R,Y);if(ye(R)){if(se=ye(R),typeof se!="function")throw Error(r(150));return R=se.call(R),re(T,S,R,Y)}if(typeof R.then=="function")return Be(T,S,Xs(R),Y);if(R.$$typeof===q)return Be(T,S,Ys(T,R),Y);Zs(T,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,S!==null&&S.tag===6?(l(T,S.sibling),Y=n(S,R),Y.return=T,T=Y):(l(T,S),Y=Eu(R,T.mode,Y),Y.return=T,T=Y),o(T)):l(T,S)}return function(T,S,R,Y){try{On=0;var se=Be(T,S,R,Y);return Va=null,se}catch(le){if(le===Qa||le===Qs)throw le;var Me=Mt(29,le,null,T.mode);return Me.lanes=Y,Me.return=T,Me}finally{}}}var va=Io(!0),ed=Io(!1),Hl=!1;function Hu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lu(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 Ll(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Bl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ze&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Hs(e),Ho(e,null,l),t}return qs(e,a,t,l),Hs(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,Vc(e,l)}}function Bu(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 ku=!1;function Hn(){if(ku){var e=Ga;if(e!==null)throw e}}function Ln(e,t,l,a){ku=!1;var n=e.updateQueue;Hl=!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 L=e.alternate;L!==null&&(L=L.updateQueue,h=L.lastBaseUpdate,h!==o&&(h===null?L.firstBaseUpdate=A:h.next=A,L.lastBaseUpdate=j))}if(i!==null){var Q=n.baseState;o=0,L=A=j=null,h=i;do{var _=h.lane&-536870913,z=_!==h.lane;if(z?(je&_)===_:(a&_)===_){_!==0&&_===Ya&&(ku=!0),L!==null&&(L=L.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var ee=e,re=h;_=t;var Be=l;switch(re.tag){case 1:if(ee=re.payload,typeof ee=="function"){Q=ee.call(Be,Q,_);break e}Q=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=re.payload,_=typeof ee=="function"?ee.call(Be,Q,_):ee,_==null)break e;Q=y({},Q,_);break e;case 2:Hl=!0}}_=h.callback,_!==null&&(e.flags|=64,z&&(e.flags|=8192),z=n.callbacks,z===null?n.callbacks=[_]:z.push(_))}else z={lane:_,tag:h.tag,payload:h.payload,callback:h.callback,next:null},L===null?(A=L=z,j=Q):L=L.next=z,o|=_;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;z=h,h=z.next,z.next=null,n.lastBaseUpdate=z,n.shared.pending=null}}while(!0);L===null&&(j=Q),n.baseState=j,n.firstBaseUpdate=A,n.lastBaseUpdate=L,i===null&&(n.shared.lanes=0),Vl|=o,e.lanes=o,e.memoizedState=Q}}function td(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function ld(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)td(l[e],t)}var Xa=N(null),$s=N(0);function ad(e,t){e=Sl,$($s,e),$(Xa,t),Sl=e|t.baseLanes}function Yu(){$($s,Sl),$(Xa,Xa.current)}function Gu(){Sl=$s.current,B(Xa),B($s)}var _t=N(null),Zt=null;function kl(e){var t=e.alternate;$(Je,Je.current&1),$(_t,e),Zt===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(Zt=e)}function Qu(e){$(Je,Je.current),$(_t,e),Zt===null&&(Zt=e)}function nd(e){e.tag===22?($(Je,Je.current),$(_t,e),Zt===null&&(Zt=e)):Yl()}function Yl(){$(Je,Je.current),$(_t,_t.current)}function Dt(e){B(_t),Zt===e&&(Zt=null),B(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||Jr(l)||Fr(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,He=null,et=null,Js=!1,Za=!1,ga=!1,Fs=0,Bn=0,$a=null,fx=0;function $e(){throw Error(r(321))}function Vu(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!At(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,H.H=e===null||e.memoizedState===null?Yd:ir,ga=!1,i=l(a,n),ga=!1,Za&&(i=id(t,l,a,n)),sd(e),i}function sd(e){H.H=Gn;var t=He!==null&&He.next!==null;if(hl=0,et=He=he=null,Js=!1,Bn=0,$a=null,t)throw Error(r(300));e===null||tt||(e=e.dependencies,e!==null&&ks(e)&&(tt=!0))}function id(e,t,l,a){he=e;var n=0;do{if(Za&&($a=null),Bn=0,Za=!1,25<=n)throw Error(r(301));if(n+=1,et=He=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}H.H=Gd,i=t(l,a)}while(Za);return i}function mx(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?kn(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(he.flags|=1024),t}function Zu(){var e=Fs!==0;return Fs=0,e}function $u(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Ku(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=He=he=null,Za=!1,Bn=Fs=0,$a=null}function vt(){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(He===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=et===null?he.memoizedState:et.next;if(t!==null)et=t,He=e;else{if(e===null)throw he.alternate===null?Error(r(467)):Error(r(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},et===null?he.memoizedState=et=e:et=et.next=e}return et}function Ps(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kn(e){var t=Bn;return Bn+=1,$a===null&&($a=[]),e=Fo($a,e,t),t=he,(et===null?t.memoizedState:et.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?Yd:ir),e}function Ws(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kn(e);if(e.$$typeof===q)return dt(e)}throw Error(r(438,String(e)))}function Ju(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=Ps(),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]=X;return t.index++,l}function xl(e,t){return typeof t=="function"?t(e):t}function Is(e){var t=Fe();return Fu(t,He,e)}function Fu(e,t,l){var a=e.queue;if(a===null)throw Error(r(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,L=!1;do{var Q=A.lane&-536870913;if(Q!==A.lane?(je&Q)===Q:(hl&Q)===Q){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}),Q===Ya&&(L=!0);else if((hl&_)===_){A=A.next,_===Ya&&(L=!0);continue}else Q={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(h=j=Q,o=i):j=j.next=Q,he.lanes|=_,Vl|=_;Q=A.action,ga&&l(i,Q),i=A.hasEagerState?A.eagerState:l(i,Q)}else _={lane:Q,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|=Q,Vl|=Q;A=A.next}while(A!==null&&A!==t);if(j===null?o=i:j.next=h,!At(i,e.memoizedState)&&(tt=!0,L&&(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 Pu(e){var t=Fe(),l=t.queue;if(l===null)throw Error(r(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);At(i,t.memoizedState)||(tt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function ud(e,t,l){var a=he,n=Fe(),i=Ee;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var o=!At((He||n).memoizedState,l);if(o&&(n.memoizedState=l,tt=!0),n=n.queue,er(od.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),Ye===null)throw Error(r(349));i||(hl&127)!==0||rd(a,t,l)}return l}function rd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=he.updateQueue,t===null?(t=Ps(),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,dd(t)&&fd(e)}function od(e,t,l){return l(function(){dd(t)&&fd(e)})}function dd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!At(e,l)}catch{return!0}}function fd(e){var t=ca(e,2);t!==null&&Et(t,e,2)}function Wu(e){var t=vt();if(typeof e=="function"){var l=e;if(e=l(),ga){Ml(!0);try{l()}finally{Ml(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xl,lastRenderedState:e},t}function md(e,t,l,a){return e.baseState=l,Fu(e,He,typeof a=="function"?a:xl)}function hx(e,t,l,a,n){if(li(e))throw Error(r(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)}};H.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,hd(t,i)):(i.next=l.next,t.pending=l.next=i)}}function hd(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=H.T,o={};H.T=o;try{var h=l(n,a),j=H.S;j!==null&&j(o,h),xd(e,t,h)}catch(A){Iu(e,t,A)}finally{i!==null&&o.types!==null&&(i.types=o.types),H.T=i}}else try{i=l(n,a),xd(e,t,i)}catch(A){Iu(e,t,A)}}function xd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){pd(e,t,a)},function(a){return Iu(e,t,a)}):pd(e,t,l)}function pd(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,hd(e,l)))}function Iu(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 gd(e,t){return t}function bd(e,t){if(Ee){var l=Ye.formState;if(l!==null){e:{var a=he;if(Ee){if(Qe){t:{for(var n=Qe,i=Xt;n.nodeType!==8;){if(!i){n=null;break t}if(n=$t(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Qe=$t(n.nextSibling),a=n.data==="F!";break e}}Ul(a)}a=!1}a&&(t=l[0])}}return l=vt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gd,lastRenderedState:t},l.queue=a,l=Ld.bind(null,he,a),a.dispatch=l,a=Wu(!1),i=sr.bind(null,he,!1,a.queue),a=vt(),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 yd(e){var t=Fe();return jd(t,He,e)}function jd(e,t,l){if(t=Fu(e,t,gd)[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 Sd(e){var t=Fe(),l=He;if(l!==null)return jd(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=Ps(),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 Nd(){return Fe().memoizedState}function ei(e,t,l,a){var n=vt();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;He!==null&&a!==null&&Vu(a,He.memoizedState.deps)?n.memoizedState=Ka(t,i,l,a):(he.flags|=e,n.memoizedState=Ka(1|t,i,l,a))}function Ed(e,t){ei(8390656,8,e,t)}function er(e,t){ti(2048,8,e,t)}function px(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=Ps(),he.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function wd(e){var t=Fe().memoizedState;return px({ref:t,nextImpl:e}),function(){if((ze&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Cd(e,t){return ti(4,2,e,t)}function Td(e,t){return ti(4,4,e,t)}function Rd(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 Ad(e,t,l){l=l!=null?l.concat([e]):null,ti(4,4,Rd.bind(null,t,e),l)}function tr(){}function Md(e,t){var l=Fe();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Vu(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function _d(e,t){var l=Fe();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Vu(t,a[1]))return a[0];if(a=e(),ga){Ml(!0);try{e()}finally{Ml(!1)}}return l.memoizedState=[a,t],a}function lr(e,t,l){return l===void 0||(hl&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=zf(),he.lanes|=e,Vl|=e,l)}function Dd(e,t,l,a){return At(l,t)?l:Xa.current!==null?(e=lr(e,l,a),At(e,t)||(tt=!0),e):(hl&42)===0||(hl&1073741824)!==0&&(je&261930)===0?(tt=!0,e.memoizedState=l):(e=zf(),he.lanes|=e,Vl|=e,t)}function zd(e,t,l,a,n){var i=K.p;K.p=i!==0&&8>i?i:8;var o=H.T,h={};H.T=h,sr(e,!1,t,l);try{var j=n(),A=H.S;if(A!==null&&A(h,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var L=dx(j,a);Yn(e,t,L,Ut(e))}else Yn(e,t,a,Ut(e))}catch(Q){Yn(e,t,{then:function(){},status:"rejected",reason:Q},Ut())}finally{K.p=i,o!==null&&h.types!==null&&(o.types=h.types),H.T=o}}function vx(){}function ar(e,t,l,a){if(e.tag!==5)throw Error(r(476));var n=Od(e).queue;zd(e,n,t,ae,l===null?vx:function(){return Ud(e),l(a)})}function Od(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 Ud(e){var t=Od(e);t.next===null&&(t=e.alternate.memoizedState),Yn(e,t.next.queue,{},Ut())}function nr(){return dt(ns)}function qd(){return Fe().memoizedState}function Hd(){return Fe().memoizedState}function gx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Ut();e=Ll(l);var a=Bl(t,e,l);a!==null&&(Et(a,t,l),qn(a,t,l)),t={cache:zu()},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)?Bd(t,l):(l=Su(e,t,l,a),l!==null&&(Et(l,e,a),kd(l,t,a)))}function Ld(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))Bd(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,At(h,o))return qs(e,t,n,0),Ye===null&&Us(),!1}catch{}finally{}if(l=Su(e,t,n,a),l!==null)return Et(l,e,a),kd(l,t,a),!0}return!1}function sr(e,t,l,a){if(a={lane:2,revertLane:Hr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},li(e)){if(t)throw Error(r(479))}else t=Su(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 Bd(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 kd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Vc(e,l)}}var Gn={readContext:dt,use:Ws,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 Yd={readContext:dt,use:Ws,useCallback:function(e,t){return vt().memoizedState=[e,t===void 0?null:t],e},useContext:dt,useEffect:Ed,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ei(4194308,4,Rd.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=vt();t=t===void 0?null:t;var a=e();if(ga){Ml(!0);try{e()}finally{Ml(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=vt();if(l!==void 0){var n=l(t);if(ga){Ml(!0);try{l(t)}finally{Ml(!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=vt();return e={current:e},t.memoizedState=e},useState:function(e){e=Wu(e);var t=e.queue,l=Ld.bind(null,he,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:tr,useDeferredValue:function(e,t){var l=vt();return lr(l,e,t)},useTransition:function(){var e=Wu(!1);return e=zd.bind(null,he,e.queue,!0,!1),vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=he,n=vt();if(Ee){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Ye===null)throw Error(r(349));(je&127)!==0||rd(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,Ed(od.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=vt(),t=Ye.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:nr,useFormState:bd,useActionState:bd,useOptimistic:function(e){var t=vt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=sr.bind(null,he,!0,l),l.dispatch=t,[e,t]},useMemoCache:Ju,useCacheRefresh:function(){return vt().memoizedState=gx.bind(null,he)},useEffectEvent:function(e){var t=vt(),l={impl:e};return t.memoizedState=l,function(){if((ze&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},ir={readContext:dt,use:Ws,useCallback:Md,useContext:dt,useEffect:er,useImperativeHandle:Ad,useInsertionEffect:Cd,useLayoutEffect:Td,useMemo:_d,useReducer:Is,useRef:Nd,useState:function(){return Is(xl)},useDebugValue:tr,useDeferredValue:function(e,t){var l=Fe();return Dd(l,He.memoizedState,e,t)},useTransition:function(){var e=Is(xl)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:kn(e),t]},useSyncExternalStore:ud,useId:qd,useHostTransitionStatus:nr,useFormState:yd,useActionState:yd,useOptimistic:function(e,t){var l=Fe();return md(l,He,e,t)},useMemoCache:Ju,useCacheRefresh:Hd};ir.useEffectEvent=wd;var Gd={readContext:dt,use:Ws,useCallback:Md,useContext:dt,useEffect:er,useImperativeHandle:Ad,useInsertionEffect:Cd,useLayoutEffect:Td,useMemo:_d,useReducer:Pu,useRef:Nd,useState:function(){return Pu(xl)},useDebugValue:tr,useDeferredValue:function(e,t){var l=Fe();return He===null?lr(l,e,t):Dd(l,He.memoizedState,e,t)},useTransition:function(){var e=Pu(xl)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:kn(e),t]},useSyncExternalStore:ud,useId:qd,useHostTransitionStatus:nr,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,t){var l=Fe();return He!==null?md(l,He,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Ju,useCacheRefresh:Hd};Gd.useEffectEvent=wd;function ur(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 rr={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Ut(),n=Ll(a);n.payload=t,l!=null&&(n.callback=l),t=Bl(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=Ll(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Bl(e,n,a),t!==null&&(Et(t,e,a),qn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Ut(),a=Ll(l);a.tag=2,t!=null&&(a.callback=t),t=Bl(e,a,l),t!==null&&(Et(t,e,l),qn(t,e,l))}};function Qd(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 Vd(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&&rr.enqueueReplaceState(t,t.state,null)}function ba(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 Zd(e){console.error(e)}function $d(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 Kd(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 cr(e,t,l){return l=Ll(l),l.tag=3,l.payload={element:null},l.callback=function(){ai(e,t)},l}function Jd(e){return e=Ll(e),e.tag=3,e}function Fd(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(){Kd(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Kd(t,l,a),typeof n!="function"&&(Xl===null?Xl=new Set([this]):Xl.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 Zt===null?xi():l.alternate===null&&Ke===0&&(Ke=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Vs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Or(e,a,n)),!1;case 22:return l.flags|=65536,a===Vs?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)),Or(e,a,n)),!1}throw Error(r(435,l.tag))}return Or(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!==Ru&&(e=Error(r(422),{cause:a}),_n(Gt(e,l)))):(a!==Ru&&(t=Error(r(423),{cause:a}),_n(Gt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Gt(a,l),n=cr(e.stateNode,a,n),Bu(e,n),Ke!==4&&(Ke=2)),!1;var i=Error(r(520),{cause:a});if(i=Gt(i,l),Fn===null?Fn=[i]:Fn.push(i),Ke!==4&&(Ke=2),t===null)return!0;a=Gt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=cr(l.stateNode,a,e),Bu(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"&&(Xl===null||!Xl.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Jd(n),Fd(n,e,l,a),Bu(l,n),!1}l=l.return}while(l!==null);return!1}var or=Error(r(461)),tt=!1;function ft(e,t,l,a){t.child=e===null?ed(t,null,l,a):va(t,e.child,l,a)}function Pd(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 ma(t),a=Xu(e,t,l,o,i,n),h=Zu(),e!==null&&!tt?($u(e,t,n),pl(e,t,n)):(Ee&&h&&Cu(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"&&!Nu(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Id(e,t,i,a,n)):(e=Ls(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!gr(e,n)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:Rn,l(o,a)&&e.ref===t.ref)return pl(e,t,n)}return t.flags|=1,e=ol(i,a),e.ref=t.ref,e.return=t,t.child=e}function Id(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,gr(e,n))(e.flags&131072)!==0&&(tt=!0);else return t.lanes=e.lanes,pl(e,t,n)}return dr(e,t,l,a,n)}function ef(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 tf(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?ad(t,i):Yu(),nd(t);else return a=t.lanes=536870912,tf(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(Gs(t,i.cachePool),ad(t,i),Yl(),t.memoizedState=null):(e!==null&&Gs(t,null),Yu(),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 tf(e,t,l,a,n){var i=Uu();return i=i===null?null:{parent:Ie._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&Gs(t,null),Yu(),nd(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 lf(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(Qu(t),(e=Qe)?(e=xm(e,Xt),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=Bo(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(Qu(t),n)if(t.flags&256)t.flags&=-257,t=lf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(tt||ka(e,t,l,!1),n=(l&e.childLanes)!==0,tt||n){if(a=Ye,a!==null&&(o=Xc(a,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,ca(e,o),Et(a,e,o),or;xi(),t=lf(e,t,l)}else e=i.treeContext,Qe=$t(o.nextSibling),ot=t,Ee=!0,Ol=null,Xt=!1,e!==null&&Go(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(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function dr(e,t,l,a,n){return ma(t),l=Xu(e,t,l,a,void 0,n),a=Zu(),e!==null&&!tt?($u(e,t,n),pl(e,t,n)):(Ee&&a&&Cu(t),t.flags|=1,ft(e,t,l,n),t.child)}function af(e,t,l,a,n,i){return ma(t),t.updateQueue=null,l=id(t,a,l,n),sd(e),a=Zu(),e!==null&&!tt?($u(e,t,i),pl(e,t,i)):(Ee&&a&&Cu(t),t.flags|=1,ft(e,t,l,i),t.child)}function nf(e,t,l,a,n){if(ma(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=rr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Hu(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?dt(o):qa,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(ur(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&&rr.enqueueReplaceState(i,i.state,null),Ln(t,a,i,n),Hn(),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=ba(l,h);i.props=j;var A=i.context,L=l.contextType;o=qa,typeof L=="object"&&L!==null&&(o=dt(L));var Q=l.getDerivedStateFromProps;L=typeof Q=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,L||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||A!==o)&&Vd(t,i,a,o),Hl=!1;var _=t.memoizedState;i.state=_,Ln(t,a,i,n),Hn(),A=t.memoizedState,h||_!==A||Hl?(typeof Q=="function"&&(ur(t,l,Q,a),A=t.memoizedState),(j=Hl||Qd(t,l,j,a,_,A,o))?(L||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,Lu(e,t),o=t.memoizedProps,L=ba(l,o),i.props=L,Q=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!==Q||_!==j)&&Vd(t,i,a,j),Hl=!1,_=t.memoizedState,i.state=_,Ln(t,a,i,n),Hn();var z=t.memoizedState;o!==Q||_!==z||Hl||e!==null&&e.dependencies!==null&&ks(e.dependencies)?(typeof h=="function"&&(ur(t,l,h,a),z=t.memoizedState),(L=Hl||Qd(t,l,L,a,_,z,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,z,j),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,z,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=z),i.props=a,i.state=z,i.context=j,a=L):(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=pl(e,t,n),e}function sf(e,t,l,a){return da(),t.flags|=256,ft(e,t,l,a),t.child}var fr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mr(e){return{baseLanes:e,cachePool:Ko()}}function hr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ot),e}function uf(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=xm(e,Xt),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=Bo(e),l.return=t,t.child=l,ot=t,Qe=null)):e=null,e===null)throw Ul(t);return Fr(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=oa(a,n,l,null),h.return=t,a.return=t,h.sibling=a,t.child=h,a=t.child,a.memoizedState=mr(l),a.childLanes=hr(e,o,l),t.memoizedState=fr,Qn(null,a)):(kl(t),xr(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=pr(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=oa(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=mr(l),a.childLanes=hr(e,o,l),t.memoizedState=fr,t=Qn(null,a));else if(kl(t),Fr(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var A=o.dgst;o=A,a=Error(r(419)),a.stack="",a.digest=o,_n({value:a,source:null,stack:null}),t=pr(e,t,l)}else if(tt||ka(e,t,l,!1),o=(l&e.childLanes)!==0,tt||o){if(o=Ye,o!==null&&(a=Xc(o,l),a!==0&&a!==j.retryLane))throw j.retryLane=a,ca(e,a),Et(o,e,a),or;Jr(h)||xi(),t=pr(e,t,l)}else Jr(h)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Qe=$t(h.nextSibling),ot=t,Ee=!0,Ol=null,Xt=!1,e!==null&&Go(t,e),t=xr(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=oa(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=mr(l):(n=h.cachePool,n!==null?(j=Ie._currentValue,n=n.parent!==j?{parent:j,pool:j}:n):n=Ko(),h={baseLanes:h.baseLanes|l,cachePool:n}),a.memoizedState=h,a.childLanes=hr(e,o,l),t.memoizedState=fr,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 xr(e,t){return t=ii({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ii(e,t){return e=Mt(22,e,null,t),e.lanes=0,e}function pr(e,t,l){return va(t,e.child,null,l),e=xr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),_u(e.return,t,l)}function vr(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?Mn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rf(e,l,t);else if(e.tag===19)rf(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),vr(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}vr(t,!0,l,null,i,a);break;case"together":vr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function pl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Vl|=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(r(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 gr(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:We(t,t.stateNode.containerInfo),ql(t,Ie,e.memoizedState.cache),da();break;case 27:case 5:tl(t);break;case 4:We(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,Qu(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?uf(e,t,l):(kl(t),e=pl(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,ef(e,t,l,t.pendingProps);case 24:ql(t,Ie,e.memoizedState.cache)}return pl(e,t,l)}function of(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)tt=!0;else{if(!gr(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&&Yo(t,Mn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=xa(t.elementType),t.type=e,typeof e=="function")Nu(e)?(a=ba(e,a),t.tag=1,t=nf(null,t,e,a,l)):(t.tag=0,t=dr(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===te){t.tag=11,t=Pd(null,t,e,a,l);break e}else if(n===I){t.tag=14,t=Wd(null,t,e,a,l);break e}}throw t=F(e)||e,Error(r(306,t,""))}}return t;case 0:return dr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=ba(a,t.pendingProps),nf(e,t,a,n,l);case 3:e:{if(We(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,Lu(e,t),Ln(t,a,null,l);var o=t.memoizedState;if(a=o.cache,ql(t,Ie,a),a!==i.cache&&Du(t,[Ie],l,!0),Hn(),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=sf(e,t,a,l);break e}else if(a!==n){n=Gt(Error(r(424)),t),_n(n),t=sf(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=$t(e.firstChild),ot=t,Ee=!0,Ol=null,Xt=!0,l=ed(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(da(),a===n){t=pl(e,t,l);break e}ft(e,t,a,l)}t=t.child}return t;case 26:return si(e,t),e===null?(l=jm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ee||(l=t.type,e=t.pendingProps,a=Si(me.current).createElement(l),a[ct]=t,a[gt]=e,mt(a,l,e),it(a),t.stateNode=a):t.memoizedState=jm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return tl(t),e===null&&Ee&&(a=t.stateNode=gm(t.type,t.pendingProps,me.current),ot=t,Xt=!0,n=Qe,Jl(t.type)?(Pr=n,Qe=$t(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=Wx(a,t.type,t.pendingProps,Xt),a!==null?(t.stateNode=a,ot=t,Qe=$t(a.firstChild),Xt=!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,Zr(n,i)?a=null:o!==null&&Zr(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,Xt),l!==null?(t.stateNode=l,ot=t,Qe=null,e=!0):e=!1),e||Ul(t)),null;case 13:return uf(e,t,l);case 4:return We(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 Pd(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,ma(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 Id(e,t,t.type,t.pendingProps,l);case 19:return cf(e,t,l);case 31:return jx(e,t,l);case 22:return ef(e,t,l,t.pendingProps);case 24:return ma(t),a=dt(Ie),e===null?(n=Uu(),n===null&&(n=Ye,i=zu(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},Hu(t),ql(t,Ie,n)):((e.lanes&l)!==0&&(Lu(e,t),Ln(t,null,null,l),Hn()),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&&Du(t,[Ie],l,!0))),ft(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function vl(e){e.flags|=4}function br(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(Hf())e.flags|=8192;else throw pa=Vs,qu}else e.flags&=-16777217}function df(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cm(t))if(Hf())e.flags|=8192;else throw pa=Vs,qu}function ui(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Gc():536870912,e.lanes|=t,Wa|=t)}function Vn(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 Ve(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(Tu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ve(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)&&(Ba(t)?vl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Au())),Ve(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(vl(t),i!==null?(Ve(t),df(t,i)):(Ve(t),br(t,n,null,a,l))):i?i!==e.memoizedState?(vl(t),Ve(t),df(t,i)):(Ve(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&vl(t),Ve(t),br(t,n,e,a,l)),null;case 27:if(C(t),l=me.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&vl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ve(t),null}e=P.current,Ba(t)?Qo(t):(e=gm(n,a,l),t.stateNode=e,vl(t))}return Ve(t),null;case 5:if(C(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&vl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ve(t),null}if(i=P.current,Ba(t))Qo(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[ct]=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&&vl(t)}}return Ve(t),br(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&vl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=me.current,Ba(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[ct]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||um(e.nodeValue,l)),e||Ul(t,!0)}else e=Si(e).createTextNode(a),e[ct]=t,t.stateNode=e}return Ve(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ba(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ct]=t}else da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),e=!1}else l=Au(),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(r(558))}return Ve(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ba(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(r(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[ct]=t}else da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),n=!1}else n=Au(),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),Ve(t),null);case 4:return Ge(),e===null&&Yr(t.stateNode.containerInfo),Ve(t),null;case 10:return ml(t.type),Ve(t),null;case 19:if(B(Je),a=t.memoizedState,a===null)return Ve(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)Vn(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,Vn(a,!1),e=i.updateQueue,t.updateQueue=e,ui(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Lo(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,Vn(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),Vn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Ee)return Ve(t),null}else 2*Ct()-a.renderingStartTime>fi&&l!==536870912&&(t.flags|=128,n=!0,Vn(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):(Ve(t),null);case 22:case 23:return Dt(t),Gu(),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&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(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&&B(ha),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ml(Ie),Ve(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Ex(e,t){switch(Tu(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 C(t),null;case 31:if(t.memoizedState!==null){if(Dt(t),t.alternate===null)throw Error(r(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Dt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Je),null;case 4:return Ge(),null;case 10:return ml(t.type),null;case 22:case 23:return Dt(t),Gu(),e!==null&&B(ha),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 ff(e,t){switch(Tu(t),t.tag){case 3:ml(Ie),Ge();break;case 26:case 27:case 5:C(t);break;case 4:Ge();break;case 31:t.memoizedState!==null&&Dt(t);break;case 13:Dt(t);break;case 19:B(Je);break;case 10:ml(t.type);break;case 22:case 23:Dt(t),Gu(),e!==null&&B(ha);break;case 24:ml(Ie)}}function Xn(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){qe(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(L){qe(n,j,L)}}}a=a.next}while(a!==i)}}catch(L){qe(t,t.return,L)}}function mf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ld(t,l)}catch(a){qe(e,e.return,a)}}}function hf(e,t,l){l.props=ba(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){qe(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){qe(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){qe(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){qe(e,t,n)}else l.current=null}function xf(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){qe(e,e.return,n)}}function yr(e,t,l){try{var a=e.stateNode;Zx(a,e.type,l,t),a[gt]=t}catch(n){qe(e,e.return,n)}}function pf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Jl(e.type)||e.tag===4}function jr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pf(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 Sr(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=rl));else if(a!==4&&(a===27&&Jl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Sr(e,t,l),e=e.sibling;e!==null;)Sr(e,t,l),e=e.sibling}function ri(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(ri(e,t,l),e=e.sibling;e!==null;)ri(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[ct]=e,t[gt]=l}catch(i){qe(e,e.return,i)}}var gl=!1,lt=!1,Nr=!1,gf=typeof WeakSet=="function"?WeakSet:Set,ut=null;function wx(e,t){if(e=e.containerInfo,Vr=Ai,e=Ao(e),pu(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,L=0,Q=e,_=null;t:for(;;){for(var z;Q!==l||n!==0&&Q.nodeType!==3||(h=o+n),Q!==i||a!==0&&Q.nodeType!==3||(j=o+a),Q.nodeType===3&&(o+=Q.nodeValue.length),(z=Q.firstChild)!==null;)_=Q,Q=z;for(;;){if(Q===e)break t;if(_===l&&++A===n&&(h=o),_===i&&++L===a&&(j=o),(z=Q.nextSibling)!==null)break;Q=_,_=Q.parentNode}Q=z}l=h===-1||j===-1?null:{start:h,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(Xr={focusedElem:e,selectionRange:l},Ai=!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 ee=ba(l.type,n);e=a.getSnapshotBeforeUpdate(ee,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(re){qe(l,l.return,re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Kr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Kr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,ut=e;break}ut=t.return}}function bf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:yl(e,l),a&4&&Xn(5,l);break;case 1:if(yl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){qe(l,l.return,o)}else{var n=ba(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){qe(l,l.return,o)}}a&64&&mf(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{ld(e,t)}catch(o){qe(l,l.return,o)}}break;case 27:t===null&&a&4&&vf(l);case 26:case 5:yl(e,l),t===null&&a&4&&xf(l),a&512&&Zn(l,l.return);break;case 12:yl(e,l);break;case 31:yl(e,l),a&4&&Sf(e,l);break;case 13:yl(e,l),a&4&&Nf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ox.bind(null,l),ep(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 yf(e){var t=e.alternate;t!==null&&(e.alternate=null,yf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ii(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 Xe=null,yt=!1;function bl(e,t,l){for(l=l.child;l!==null;)jf(e,t,l),l=l.sibling}function jf(e,t,l){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(pn,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=Xe,n=yt;Jl(l.type)&&(Xe=l.stateNode,yt=!1),bl(e,t,l),ts(l.stateNode),Xe=a,yt=n;break;case 5:lt||nl(l,t);case 6:if(a=Xe,n=yt,Xe=null,bl(e,t,l),Xe=a,yt=n,Xe!==null)if(yt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(l.stateNode)}catch(i){qe(l,t,i)}else try{Xe.removeChild(l.stateNode)}catch(i){qe(l,t,i)}break;case 18:Xe!==null&&(yt?(e=Xe,mm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),un(e)):mm(Xe,l.stateNode));break;case 4:a=Xe,n=yt,Xe=l.stateNode.containerInfo,yt=!0,bl(e,t,l),Xe=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"&&hf(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 Sf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{un(e)}catch(l){qe(t,t.return,l)}}}function Nf(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){qe(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 gf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new gf),t;default:throw Error(r(435,e.tag))}}function ci(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)){Xe=h.stateNode,yt=!1;break e}break;case 5:Xe=h.stateNode,yt=!1;break e;case 3:case 4:Xe=h.stateNode.containerInfo,yt=!0;break e}h=h.return}if(Xe===null)throw Error(r(160));jf(i,o,n),Xe=null,yt=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ef(t,e),t=t.sibling}var Wt=null;function Ef(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),Xn(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=Wt;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[ct]||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[ct]=e,it(i),a=i;break e;case"link":var o=Em("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=Em("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(r(468,a))}i[ct]=e,it(i),a=i}e.stateNode=a}else wm(n,e.type,e.stateNode);else e.stateNode=Nm(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?wm(n,e.type,e.stateNode):Nm(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&yr(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&&yr(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{Aa(n,"")}catch(ee){qe(e,e.return,ee)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,yr(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Nr=!0);break;case 6:if(jt(t,e),St(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ee){qe(e,e.return,ee)}}break;case 3:if(wi=null,n=Wt,Wt=Ni(t.containerInfo),jt(t,e),Wt=n,St(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{un(t.containerInfo)}catch(ee){qe(e,e.return,ee)}Nr&&(Nr=!1,wf(e));break;case 4:a=Wt,Wt=Ni(e.stateNode.containerInfo),jt(t,e),St(e),Wt=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,ci(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,ci(e,a)));break;case 22:n=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,A=gl,L=lt;if(gl=A||n,lt=L||j,jt(t,e),lt=L,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||ya(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 Q=j.memoizedProps.style,_=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;h.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(ee){qe(j,j.return,ee)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=n?"":j.memoizedProps}catch(ee){qe(j,j.return,ee)}}}else if(t.tag===18){if(l===null){j=t;try{var z=j.stateNode;n?hm(z,!0):hm(j.stateNode,!1)}catch(ee){qe(j,j.return,ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,ci(e,l))));break;case 19:jt(t,e),St(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ci(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(pf(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var n=l.stateNode,i=jr(e);ri(e,i,n);break;case 5:var o=l.stateNode;l.flags&32&&(Aa(o,""),l.flags&=-33);var h=jr(e);ri(e,h,o);break;case 3:case 4:var j=l.stateNode.containerInfo,A=jr(e);Sr(e,A,j);break;default:throw Error(r(161))}}catch(L){qe(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wf(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;)bf(e,t.alternate,t),t=t.sibling}function ya(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),ya(t);break;case 1:nl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&hf(t,t.return,l),ya(t);break;case 27:ts(t.stateNode);case 26:case 5:nl(t,t.return),ya(t);break;case 22:t.memoizedState===null&&ya(t);break;case 30:ya(t);break;default:ya(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),Xn(4,i);break;case 1:if(jl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(A){qe(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++)td(j[n],h)}catch(A){qe(a,a.return,A)}}l&&o&64&&mf(i),Zn(i,i.return);break;case 27:vf(i);case 26:case 5:jl(n,i,l),l&&a===null&&o&4&&xf(i),Zn(i,i.return);break;case 12:jl(n,i,l);break;case 31:jl(n,i,l),l&&o&4&&Sf(n,i);break;case 13:jl(n,i,l),l&&o&4&&Nf(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 Er(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 wr(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;)Cf(e,t,l,a),t=t.sibling}function Cf(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:It(e,t,l,a),n&2048&&Xn(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){qe(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&&Er(o,t);break;case 24:It(e,t,l,a),n&2048&&wr(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),Xn(8,o);break;case 23:break;case 22:var L=o.stateNode;o.memoizedState!==null?L._visibility&2?Ja(i,o,h,j,n):$n(i,o):(L._visibility|=2,Ja(i,o,h,j,n)),n&&A&2048&&Er(o.alternate,o);break;case 24:Ja(i,o,h,j,n),n&&A&2048&&wr(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&&Er(a.alternate,a);break;case 24:$n(l,a),n&2048&&wr(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;)Tf(e,t,l),e=e.sibling}function Tf(e,t,l){switch(e.tag){case 26:Fa(e,t,l),e.flags&Kn&&e.memoizedState!==null&&fp(l,Wt,e.memoizedState,e.memoizedProps);break;case 5:Fa(e,t,l);break;case 3:case 4:var a=Wt;Wt=Ni(e.stateNode.containerInfo),Fa(e,t,l),Wt=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 Rf(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)}Rf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Af(e),e=e.sibling}function Af(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)}Rf(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(yf(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,ze=0,Ye=null,ve=null,je=0,Ue=0,zt=null,Ql=!1,Pa=!1,Cr=!1,Sl=0,Ke=0,Vl=0,ja=0,Tr=0,Ot=0,Wa=0,Fn=null,Nt=null,Rr=!1,di=0,_f=0,fi=1/0,mi=null,Xl=null,st=0,Zl=null,Ia=null,Nl=0,Ar=0,Mr=null,Df=null,Pn=0,_r=null;function Ut(){return(ze&2)!==0&&je!==0?je&-je:H.T!==null?Hr():Zc()}function zf(){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===Ye&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(en(e,0),$l(e,je,Ot,!1)),gn(e,l),((ze&2)===0||e!==Ye)&&(e===Ye&&((ze&2)===0&&(ja|=l),Ke===4&&$l(e,je,Ot,!1)),sl(e))}function Of(e,t,l){if((ze&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||vn(e,t),n=a?_x(e,t):zr(e,t,!0),i=a;do{if(n===0){Pa&&!a&&$l(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Ax(l)){n=zr(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=zr(h,o,!1),o!==2){if(Cr&&!j){h.errorRecoveryDisabledLanes|=i,ja|=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(r(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(r(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=dm(Uf.bind(null,a,l,Nt,mi,Rr,t,Ot,ja,Wa,Ql,i,"Throttled",-0,0),n);break e}Uf(a,l,Nt,mi,Rr,t,Ot,ja,Wa,Ql,i,null,-0,0)}}break}while(!0);sl(e)}function Uf(e,t,l,a,n,i,o,h,j,A,L,Q,_,z){if(e.timeoutHandle=-1,Q=t.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:rl},Tf(t,i,Q);var ee=(i&62914560)===i?di-Ct():(i&4194048)===i?_f-Ct():0;if(ee=mp(Q,ee),ee!==null){Nl=i,e.cancelPendingCommit=ee(Qf.bind(null,e,t,i,l,a,n,o,h,j,L,Q,null,_,z)),$l(e,i,o,!A);return}}Qf(e,t,i,l,a,n,o,h,j)}function Ax(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(!At(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&=~Tr,t&=~ja,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&&Qc(e,l,t)}function hi(){return(ze&6)===0?(Wn(0),!1):!0}function Dr(){if(ve!==null){if(Ue===0)var e=ve.return;else e=ve,fl=fa=null,Ku(e),Va=null,On=0,e=ve;for(;e!==null;)ff(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,Dr(),Ye=e,ve=l=ol(e.current,null),je=t,Ue=0,zt=null,Ql=!1,Pa=vn(e,t),Cr=!1,Wa=Ot=Tr=ja=Vl=Ke=0,Nt=Fn=null,Rr=!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 qf(e,t){he=null,H.H=Gn,t===Qa||t===Qs?(t=Po(),Ue=3):t===qu?(t=Po(),Ue=4):Ue=t===or?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,zt=t,ve===null&&(Ke=1,ai(e,Gt(t,e.current)))}function Hf(){var e=_t.current;return e===null?!0:(je&4194048)===je?Zt===null:(je&62914560)===je||(je&536870912)!==0?e===Zt:!1}function Lf(){var e=H.H;return H.H=Gn,e===null?Gn:e}function Bf(){var e=H.A;return H.A=Tx,e}function xi(){Ke=4,Ql||(je&4194048)!==je&&_t.current!==null||(Pa=!0),(Vl&134217727)===0&&(ja&134217727)===0||Ye===null||$l(Ye,je,Ot,!1)}function zr(e,t,l){var a=ze;ze|=2;var n=Lf(),i=Bf();(Ye!==e||je!==t)&&(mi=null,en(e,t)),t=!1;var o=Ke;e:do try{if(Ue!==0&&ve!==null){var h=ve,j=zt;switch(Ue){case 8:Dr(),o=6;break e;case 3:case 2:case 9:case 6:_t.current===null&&(t=!0);var A=Ue;if(Ue=0,zt=null,tn(e,h,j,A),l&&Pa){o=0;break e}break;default:A=Ue,Ue=0,zt=null,tn(e,h,j,A)}}Mx(),o=Ke;break}catch(L){qf(e,L)}while(!0);return t&&e.shellSuspendCounter++,fl=fa=null,ze=a,H.H=n,H.A=i,ve===null&&(Ye=null,je=0,Us()),o}function Mx(){for(;ve!==null;)kf(ve)}function _x(e,t){var l=ze;ze|=2;var a=Lf(),n=Bf();Ye!==e||je!==t?(mi=null,fi=Ct()+500,en(e,t)):Pa=vn(e,t);e:do try{if(Ue!==0&&ve!==null){t=ve;var i=zt;t:switch(Ue){case 1:Ue=0,zt=null,tn(e,t,i,1);break;case 2:case 9:if(Jo(i)){Ue=0,zt=null,Yf(t);break}t=function(){Ue!==2&&Ue!==9||Ye!==e||(Ue=7),sl(e)},i.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:Jo(i)?(Ue=0,zt=null,Yf(t)):(Ue=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?Cm(o):h.stateNode.complete){Ue=0,zt=null;var j=h.sibling;if(j!==null)ve=j;else{var A=h.return;A!==null?(ve=A,pi(A)):ve=null}break t}}Ue=0,zt=null,tn(e,t,i,5);break;case 6:Ue=0,zt=null,tn(e,t,i,6);break;case 8:Dr(),Ke=6;break e;default:throw Error(r(462))}}Dx();break}catch(L){qf(e,L)}while(!0);return fl=fa=null,H.H=a,H.A=n,ze=l,ve!==null?0:(Ye=null,je=0,Us(),Ke)}function Dx(){for(;ve!==null&&!Al();)kf(ve)}function kf(e){var t=of(e.alternate,e,Sl);e.memoizedProps=e.pendingProps,t===null?pi(e):ve=t}function Yf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=af(l,t,t.pendingProps,t.type,void 0,je);break;case 11:t=af(l,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:Ku(t);default:ff(l,t),t=ve=Lo(t,Sl),t=of(l,t,Sl)}e.memoizedProps=e.pendingProps,t===null?pi(e):ve=t}function tn(e,t,l,a){fl=fa=null,Ku(t),Va=null,On=0;var n=t.return;try{if(yx(e,n,t,l,je)){Ke=1,ai(e,Gt(l,e.current)),ve=null;return}}catch(i){if(n!==null)throw ve=n,i;Ke=1,ai(e,Gt(l,e.current)),ve=null;return}t.flags&32768?(Ee||a===1?e=!0:Pa||(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))),Gf(t,e)):pi(t)}function pi(e){var t=e;do{if((t.flags&32768)!==0){Gf(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 Gf(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 Qf(e,t,l,a,n,i,o,h,j){e.cancelPendingCommit=null;do vi();while(st!==0);if((ze&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=ju,d0(e,l,i,o,h,j),e===Ye&&(ve=Ye=null,je=0),Ia=t,Zl=e,Nl=l,Ar=i,Mr=n,Df=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,qx(bs,function(){return Kf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=H.T,H.T=null,n=K.p,K.p=2,o=ze,ze|=4;try{wx(e,t,l)}finally{ze=o,K.p=n,H.T=a}}st=1,Vf(),Xf(),Zf()}}function Vf(){if(st===1){st=0;var e=Zl,t=Ia,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var a=K.p;K.p=2;var n=ze;ze|=4;try{Ef(t,e);var i=Xr,o=Ao(e.containerInfo),h=i.focusedElem,j=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&Ro(h.ownerDocument.documentElement,h)){if(j!==null&&pu(h)){var A=j.start,L=j.end;if(L===void 0&&(L=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(L,h.value.length);else{var Q=h.ownerDocument||document,_=Q&&Q.defaultView||window;if(_.getSelection){var z=_.getSelection(),ee=h.textContent.length,re=Math.min(j.start,ee),Be=j.end===void 0?re:Math.min(j.end,ee);!z.extend&&re>Be&&(o=Be,Be=re,re=o);var T=To(h,re),S=To(h,Be);if(T&&S&&(z.rangeCount!==1||z.anchorNode!==T.node||z.anchorOffset!==T.offset||z.focusNode!==S.node||z.focusOffset!==S.offset)){var R=Q.createRange();R.setStart(T.node,T.offset),z.removeAllRanges(),re>Be?(z.addRange(R),z.extend(S.node,S.offset)):(R.setEnd(S.node,S.offset),z.addRange(R))}}}}for(Q=[],z=h;z=z.parentNode;)z.nodeType===1&&Q.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<Q.length;h++){var Y=Q[h];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Ai=!!Vr,Xr=Vr=null}finally{ze=n,K.p=a,H.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=H.T,H.T=null;var a=K.p;K.p=2;var n=ze;ze|=4;try{bf(e,t.alternate,t)}finally{ze=n,K.p=a,H.T=l}}st=3}}function Zf(){if(st===4||st===3){st=0,l0();var e=Zl,t=Ia,l=Nl,a=Df;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?st=5:(st=0,Ia=Zl=null,$f(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Xl=null),Pi(l),t=t.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(pn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=H.T,n=K.p,K.p=2,H.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{H.T=t,K.p=n}}(Nl&3)!==0&&vi(),sl(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===_r?Pn++:(Pn=0,_r=e):Pn=0,Wn(0)}}function $f(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Dn(t)))}function vi(){return Vf(),Xf(),Zf(),Kf()}function Kf(){if(st!==5)return!1;var e=Zl,t=Ar;Ar=0;var l=Pi(Nl),a=H.T,n=K.p;try{K.p=32>l?32:l,H.T=null,l=Mr,Mr=null;var i=Zl,o=Nl;if(st=0,Ia=Zl=null,Nl=0,(ze&6)!==0)throw Error(r(331));var h=ze;if(ze|=4,Af(i.current),Cf(i,i.current,o,l),ze=h,Wn(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(pn,i)}catch{}return!0}finally{K.p=n,H.T=a,$f(e,t)}}function Jf(e,t,l){t=Gt(l,t),t=cr(e.stateNode,t,2),e=Bl(e,t,2),e!==null&&(gn(e,2),sl(e))}function qe(e,t,l){if(e.tag===3)Jf(e,e,l);else for(;t!==null;){if(t.tag===3){Jf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Xl===null||!Xl.has(a))){e=Gt(l,e),l=Jd(2),a=Bl(t,l,2),a!==null&&(Fd(l,a,t,e),gn(a,2),sl(a));break}}t=t.return}}function Or(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)||(Cr=!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,Ye===e&&(je&l)===l&&(Ke===4||Ke===3&&(je&62914560)===je&&300>Ct()-di?(ze&2)===0&&en(e,0):Tr|=l,Wa===je&&(Wa=0)),sl(e)}function Ff(e,t){t===0&&(t=Gc()),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),Ff(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(r(314))}a!==null&&a.delete(t),Ff(e,l)}function qx(e,t){return Ht(e,t)}var gi=null,ln=null,Ur=!1,bi=!1,qr=!1,Kl=0;function sl(e){e!==ln&&e.next===null&&(ln===null?gi=ln=e:ln=ln.next=e),bi=!0,Ur||(Ur=!0,Lx())}function Wn(e,t){if(!qr&&bi){qr=!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,em(a,i))}else i=je,i=Ns(a,a===Ye?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||vn(a,i)||(l=!0,em(a,i));a=a.next}while(l);qr=!1}}function Hx(){Pf()}function Pf(){bi=Ur=!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||Wn(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=Ye,l=je,l=Ns(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Lt(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||vn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Lt(a),Pi(l)){case 2:case 8:l=kc;break;case 32:l=bs;break;case 268435456:l=Yc;break;default:l=bs}return a=If.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 If(e,t){if(st!==0&&st!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(vi()&&e.callbackNode!==l)return null;var a=je;return a=Ns(e,e===Ye?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Of(e,a,t),Wf(e,Ct()),e.callbackNode!=null&&e.callbackNode===l?If.bind(null,e):null)}function em(e,t){if(vi())return null;Of(e,t,!0)}function Lx(){Fx(function(){(ze&6)!==0?Ht(Bc,Hx):Pf()})}function Hr(){if(Kl===0){var e=Ya;e===0&&(e=ys,ys<<=1,(ys&261888)===0&&(ys=256)),Kl=e}return Kl}function tm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ts(""+e)}function lm(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 Bx(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=tm((n[gt]||null).action),o=a.submitter;o&&(t=(t=o[gt]||null)?tm(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?lm(n,o):new FormData(n);ar(l,{pending:!0,data:j,method:n.method,action:i},null,j)}}else typeof i=="function"&&(h.preventDefault(),j=o?lm(n,o):new FormData(n),ar(l,{pending:!0,data:j,method:n.method,action:i},i,j))},currentTarget:n}]})}}for(var Lr=0;Lr<yu.length;Lr++){var Br=yu[Lr],kx=Br.toLowerCase(),Yx=Br[0].toUpperCase()+Br.slice(1);Pt(kx,"on"+Yx)}Pt(Do,"onAnimationEnd"),Pt(zo,"onAnimationIteration"),Pt(Oo,"onAnimationStart"),Pt("dblclick","onDoubleClick"),Pt("focusin","onFocus"),Pt("focusout","onBlur"),Pt(ax,"onTransitionRun"),Pt(nx,"onTransitionStart"),Pt(sx,"onTransitionCancel"),Pt(Uo,"onTransitionEnd"),Ta("onMouseEnter",["mouseout","mouseover"]),Ta("onMouseLeave",["mouseout","mouseover"]),Ta("onPointerEnter",["pointerout","pointerover"]),Ta("onPointerLeave",["pointerout","pointerover"]),sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sa("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 am(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(L){Os(L)}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(L){Os(L)}n.currentTarget=null,i=j}}}}function ge(e,t){var l=t[Wi];l===void 0&&(l=t[Wi]=new Set);var a=e+"__bubble";l.has(a)||(nm(t,e,2,!1),l.add(a))}function kr(e,t,l){var a=0;t&&(a|=4),nm(l,e,a,t)}var yi="_reactListening"+Math.random().toString(36).slice(2);function Yr(e){if(!e[yi]){e[yi]=!0,Jc.forEach(function(l){l!=="selectionchange"&&(Gx.has(l)||kr(l,!1,e),kr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yi]||(t[yi]=!0,kr("selectionchange",!1,t))}}function nm(e,t,l,a){switch(zm(t)){case 2:var n=pp;break;case 8:n=vp;break;default:n=lc}l=n.bind(null,t,l,e),n=void 0,!uu||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 Gr(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}uo(function(){var A=i,L=su(l),Q=[];e:{var _=qo.get(e);if(_!==void 0){var z=_s,ee=e;switch(e){case"keypress":if(As(l)===0)break e;case"keydown":case"keyup":z=U0;break;case"focusin":ee="focus",z=du;break;case"focusout":ee="blur",z=du;break;case"beforeblur":case"afterblur":z=du;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":z=oo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=N0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=L0;break;case Do:case zo:case Oo:z=C0;break;case Uo:z=k0;break;case"scroll":case"scrollend":z=j0;break;case"wheel":z=G0;break;case"copy":case"cut":case"paste":z=R0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=mo;break;case"toggle":case"beforetoggle":z=V0}var re=(t&4)!==0,Be=!re&&(e==="scroll"||e==="scrollend"),T=re?_!==null?_+"Capture":null:_;re=[];for(var S=A,R;S!==null;){var Y=S;if(R=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||R===null||T===null||(Y=jn(S,T),Y!=null&&re.push(es(S,Y,R))),Be)break;S=S.return}0<re.length&&(_=new z(_,ee,null,l,L),Q.push({event:_,listeners:re}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",_&&l!==nu&&(ee=l.relatedTarget||l.fromElement)&&(Ea(ee)||ee[Na]))break e;if((z||_)&&(_=L.window===L?L:(_=L.ownerDocument)?_.defaultView||_.parentWindow:window,z?(ee=l.relatedTarget||l.toElement,z=A,ee=ee?Ea(ee):null,ee!==null&&(Be=x(ee),re=ee.tag,ee!==Be||re!==5&&re!==27&&re!==6)&&(ee=null)):(z=null,ee=A),z!==ee)){if(re=oo,Y="onMouseLeave",T="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(re=mo,Y="onPointerLeave",T="onPointerEnter",S="pointer"),Be=z==null?_:yn(z),R=ee==null?_:yn(ee),_=new re(Y,S+"leave",z,l,L),_.target=Be,_.relatedTarget=R,Y=null,Ea(L)===A&&(re=new re(T,S+"enter",ee,l,L),re.target=R,re.relatedTarget=Be,Y=re),Be=Y,z&&ee)t:{for(re=Qx,T=z,S=ee,R=0,Y=T;Y;Y=re(Y))R++;Y=0;for(var se=S;se;se=re(se))Y++;for(;0<R-Y;)T=re(T),R--;for(;0<Y-R;)S=re(S),Y--;for(;R--;){if(T===S||S!==null&&T===S.alternate){re=T;break t}T=re(T),S=re(S)}re=null}else re=null;z!==null&&sm(Q,_,z,re,!1),ee!==null&&Be!==null&&sm(Q,Be,ee,re,!0)}}e:{if(_=A?yn(A):window,z=_.nodeName&&_.nodeName.toLowerCase(),z==="select"||z==="input"&&_.type==="file")var Me=jo;else if(bo(_))if(So)Me=ex;else{Me=W0;var le=P0}else z=_.nodeName,!z||z.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?A&&au(A.elementType)&&(Me=jo):Me=I0;if(Me&&(Me=Me(e,A))){yo(Q,Me,l,L);break e}le&&le(e,_,A),e==="focusout"&&A&&_.type==="number"&&A.memoizedProps.value!=null&&lu(_,"number",_.value)}switch(le=A?yn(A):window,e){case"focusin":(bo(le)||le.contentEditable==="true")&&(za=le,vu=A,An=null);break;case"focusout":An=vu=za=null;break;case"mousedown":gu=!0;break;case"contextmenu":case"mouseup":case"dragend":gu=!1,Mo(Q,l,L);break;case"selectionchange":if(lx)break;case"keydown":case"keyup":Mo(Q,l,L)}var xe;if(mu)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&&(ho&&l.locale!=="ko"&&(Da||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Da&&(xe=ro()):(Dl=L,ru="value"in Dl?Dl.value:Dl.textContent,Da=!0)),le=ji(A,Se),0<le.length&&(Se=new fo(Se,e,null,l,L),Q.push({event:Se,listeners:le}),xe?Se.data=xe:(xe=go(l),xe!==null&&(Se.data=xe)))),(xe=Z0?$0(e,l):K0(e,l))&&(Se=ji(A,"onBeforeInput"),0<Se.length&&(le=new fo("onBeforeInput","beforeinput",null,l,L),Q.push({event:le,listeners:Se}),le.data=xe)),Bx(Q,e,A,l,L)}am(Q,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 sm(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 Vx=/\r\n?/g,Xx=/\u0000|\uFFFD/g;function im(e){return(typeof e=="string"?e:""+e).replace(Vx,`
49
+ `).replace(Xx,"")}function um(e,t){return t=im(t),im(e)===t}function Le(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Aa(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Aa(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":so(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"&&Le(e,t,"name",n.name,n,null),Le(e,t,"formEncType",n.formEncType,n,null),Le(e,t,"formMethod",n.formMethod,n,null),Le(e,t,"formTarget",n.formTarget,n,null)):(Le(e,t,"encType",n.encType,n,null),Le(e,t,"method",n.method,n,null),Le(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=rl);break;case"onScroll":a!=null&&ge("scroll",e);break;case"onScrollEnd":a!=null&&ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(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":ge("beforetoggle",e),ge("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 Qr(e,t,l,a,n,i){switch(l){case"style":so(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Aa(e,a):(typeof a=="number"||typeof a=="bigint")&&Aa(e,""+a);break;case"onScroll":a!=null&&ge("scroll",e);break;case"onScrollEnd":a!=null&&ge("scrollend",e);break;case"onClick":a!=null&&(e.onclick=rl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fc.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":ge("error",e),ge("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(r(137,t));default:Le(e,t,i,o,l,null)}}n&&Le(e,t,"srcSet",l.srcSet,l,null),a&&Le(e,t,"src",l.src,l,null);return;case"input":ge("invalid",e);var h=i=o=n=null,j=null,A=null;for(a in l)if(l.hasOwnProperty(a)){var L=l[a];if(L!=null)switch(a){case"name":n=L;break;case"type":o=L;break;case"checked":j=L;break;case"defaultChecked":A=L;break;case"value":i=L;break;case"defaultValue":h=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(137,t));break;default:Le(e,t,a,L,l,null)}}to(e,i,h,j,A,o,n,!1);return;case"select":ge("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:Le(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":ge("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(r(91));break;default:Le(e,t,o,h,l,null)}ao(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:Le(e,t,j,a,l,null)}return;case"dialog":ge("beforetoggle",e),ge("toggle",e),ge("cancel",e),ge("close",e);break;case"iframe":case"object":ge("load",e);break;case"video":case"audio":for(a=0;a<In.length;a++)ge(In[a],e);break;case"image":ge("error",e),ge("load",e);break;case"details":ge("toggle",e);break;case"embed":case"source":case"link":ge("error",e),ge("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(r(137,t));default:Le(e,t,A,a,l,null)}return;default:if(au(t)){for(L in l)l.hasOwnProperty(L)&&(a=l[L],a!==void 0&&Qr(e,t,L,a,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!=null&&Le(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,L=null;for(z in l){var Q=l[z];if(l.hasOwnProperty(z)&&Q!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":j=Q;default:a.hasOwnProperty(z)||Le(e,t,z,null,a,Q)}}for(var _ in a){var z=a[_];if(Q=l[_],a.hasOwnProperty(_)&&(z!=null||Q!=null))switch(_){case"type":i=z;break;case"name":n=z;break;case"checked":A=z;break;case"defaultChecked":L=z;break;case"value":o=z;break;case"defaultValue":h=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:z!==Q&&Le(e,t,_,z,a,Q)}}tu(e,o,h,j,A,L,i,n);return;case"select":z=o=h=_=null;for(i in l)if(j=l[i],l.hasOwnProperty(i)&&j!=null)switch(i){case"value":break;case"multiple":z=j;default:a.hasOwnProperty(i)||Le(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&&Le(e,t,n,i,a,j)}t=h,l=o,a=z,_!=null?Ra(e,!!l,_,!1):!!a!=!!l&&(t!=null?Ra(e,!!l,t,!0):Ra(e,!!l,l?[]:"",!1));return;case"textarea":z=_=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:Le(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":z=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(r(91));break;default:n!==i&&Le(e,t,o,n,a,i)}lo(e,_,z);return;case"option":for(var ee in l)if(_=l[ee],l.hasOwnProperty(ee)&&_!=null&&!a.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Le(e,t,ee,null,a,_)}for(j in a)if(_=a[j],z=l[j],a.hasOwnProperty(j)&&_!==z&&(_!=null||z!=null))switch(j){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Le(e,t,j,_,a,z)}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 re in l)_=l[re],l.hasOwnProperty(re)&&_!=null&&!a.hasOwnProperty(re)&&Le(e,t,re,null,a,_);for(A in a)if(_=a[A],z=l[A],a.hasOwnProperty(A)&&_!==z&&(_!=null||z!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(137,t));break;default:Le(e,t,A,_,a,z)}return;default:if(au(t)){for(var Be in l)_=l[Be],l.hasOwnProperty(Be)&&_!==void 0&&!a.hasOwnProperty(Be)&&Qr(e,t,Be,void 0,a,_);for(L in a)_=a[L],z=l[L],!a.hasOwnProperty(L)||_===z||_===void 0&&z===void 0||Qr(e,t,L,_,a,z);return}}for(var T in l)_=l[T],l.hasOwnProperty(T)&&_!=null&&!a.hasOwnProperty(T)&&Le(e,t,T,null,a,_);for(Q in a)_=a[Q],z=l[Q],!a.hasOwnProperty(Q)||_===z||_==null&&z==null||Le(e,t,Q,_,a,z)}function rm(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&&rm(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 L=j.transferSize,Q=j.initiatorType;L&&rm(Q)&&(j=j.responseEnd,o+=L*(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 Vr=null,Xr=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 om(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 Zr(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 $r=null;function Kx(){var e=window.event;return e&&e.type==="popstate"?e===$r?!1:($r=e,!0):($r=null,!1)}var dm=typeof setTimeout=="function"?setTimeout:void 0,Jx=typeof clearTimeout=="function"?clearTimeout:void 0,fm=typeof Promise=="function"?Promise:void 0,Fx=typeof queueMicrotask=="function"?queueMicrotask:typeof fm<"u"?function(e){return fm.resolve(null).then(e).catch(Px)}:dm;function Px(e){setTimeout(function(){throw e})}function Jl(e){return e==="head"}function mm(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 hm(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 Kr(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":Kr(l),Ii(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Wx(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=$t(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=$t(e.nextSibling),e===null))return null;return e}function xm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=$t(e.nextSibling),e===null))return null;return e}function Jr(e){return e.data==="$?"||e.data==="$~"}function Fr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ep(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 $t(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 Pr=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return $t(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 gm(e,t,l){switch(t=Si(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function ts(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ii(e)}var Kt=new Map,bm=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:tp,r:lp,D:ap,C:np,L:sp,m:ip,X:rp,S:up,M:cp};function tp(){var e=El.f(),t=hi();return e||t}function lp(e){var t=wa(e);t!==null&&t.tag===5&&t.type==="form"?Ud(t):El.r(e)}var an=typeof document>"u"?null:document;function ym(e,t,l){var a=an;if(a&&typeof t=="string"&&t){var n=kt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),bm.has(n)||(bm.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 ap(e){El.D(e),ym("dns-prefetch",e,null)}function np(e,t){El.C(e,t),ym("preconnect",e,t)}function sp(e,t,l){El.L(e,t,l);var a=an;if(a&&e&&t){var n='link[rel="preload"][as="'+kt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+kt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+kt(l.imageSizes)+'"]')):n+='[href="'+kt(e)+'"]';var i=n;switch(t){case"style":i=nn(e);break;case"script":i=sn(e)}Kt.has(i)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Kt.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 ip(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="'+kt(a)+'"][href="'+kt(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=sn(e)}if(!Kt.has(i)&&(e=y({rel:"modulepreload",href:e},t),Kt.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 up(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=Kt.get(i))&&Wr(e,l);var j=o=a.createElement("link");it(j),mt(j,"link",e),j._p=new Promise(function(A,L){j.onload=A,j.onerror=L}),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 rp(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=Kt.get(n))&&Ir(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 cp(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=Kt.get(n))&&Ir(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 jm(e,t,l,a){var n=(n=me.current)?Ni(n):null;if(!n)throw Error(r(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),Kt.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},Kt.set(e,l),i||op(n,e,l,o.state))),t&&a===null)throw Error(r(528,""));return o}if(t&&a!==null)throw Error(r(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(r(444,e))}}function nn(e){return'href="'+kt(e)+'"'}function ls(e){return'link[rel="stylesheet"]['+e+"]"}function Sm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function op(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="'+kt(e)+'"]'}function as(e){return"script[async]"+e}function Nm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+kt(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=Sm(l),(n=Kt.get(n))&&Wr(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=Kt.get(i))&&(a=y({},l),Ir(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(r(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 Wr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ir(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 Em(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[ct]||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 wm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function dp(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 Cm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fp(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=Sm(a),(n=Kt.get(n))&&Wr(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 ec=0;function mp(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&&ec===0&&(ec=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>ec?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(hp,e),Ti=null,Ci.call(e))}function hp(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:q,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function xp(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=Ji(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ji(0),this.hiddenUpdates=Ji(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 Tm(e,t,l,a,n,i,o,h,j,A,L,Q){return e=new xp(e,t,l,o,j,A,L,Q,h),t=1,i===!0&&(t|=24),i=Mt(3,null,null,t),e.current=i,i.stateNode=e,t=zu(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Hu(i),e}function Rm(e){return e?(e=qa,e):qa}function Am(e,t,l,a,n,i){n=Rm(n),a.context===null?a.context=n:a.pendingContext=n,a=Ll(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Bl(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 tc(e,t){Mm(e,t),(e=e.alternate)&&Mm(e,t)}function _m(e){if(e.tag===13||e.tag===31){var t=ca(e,67108864);t!==null&&Et(t,e,67108864),tc(e,67108864)}}function Dm(e){if(e.tag===13||e.tag===31){var t=Ut();t=Fi(t);var l=ca(e,t);l!==null&&Et(l,e,t),tc(e,t)}}var Ai=!0;function pp(e,t,l,a){var n=H.T;H.T=null;var i=K.p;try{K.p=2,lc(e,t,l,a)}finally{K.p=i,H.T=n}}function vp(e,t,l,a){var n=H.T;H.T=null;var i=K.p;try{K.p=8,lc(e,t,l,a)}finally{K.p=i,H.T=n}}function lc(e,t,l,a){if(Ai){var n=ac(a);if(n===null)Gr(e,t,a,Mi,l),Om(e,a);else if(bp(n,e,t,l,a))a.stopPropagation();else if(Om(e,a),t&4&&-1<gp.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=na(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),(ze&6)===0&&(fi=Ct()+500,Wn(0))}}break;case 31:case 13:h=ca(i,2),h!==null&&Et(h,i,2),hi(),tc(i,2)}if(i=ac(a),i===null&&Gr(e,t,a,Mi,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Gr(e,t,a,null,l)}}function ac(e){return e=su(e),nc(e)}var Mi=null;function nc(e){if(Mi=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=v(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Mi=e,null}function zm(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 Bc:return 2;case kc:return 8;case bs:case n0:return 32;case Yc:return 268435456;default:return 32}default:return 32}}var sc=!1,Fl=null,Pl=null,Wl=null,ss=new Map,is=new Map,Il=[],gp="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 Om(e,t){switch(e){case"focusin":case"focusout":Fl=null;break;case"dragenter":case"dragleave":Pl=null;break;case"mouseover":case"mouseout":Wl=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&&_m(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function bp(e,t,l,a,n){switch(t){case"focusin":return Fl=us(Fl,e,t,l,a,n),!0;case"dragenter":return Pl=us(Pl,e,t,l,a,n),!0;case"mouseover":return Wl=us(Wl,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 Um(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,$c(e.priority,function(){Dm(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,$c(e.priority,function(){Dm(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=ac(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);nu=a,l.target.dispatchEvent(a),nu=null}else return t=wa(l),t!==null&&_m(t),e.blockedOn=l,!1;t.shift()}return!0}function qm(e,t,l){_i(e)&&l.delete(t)}function yp(){sc=!1,Fl!==null&&_i(Fl)&&(Fl=null),Pl!==null&&_i(Pl)&&(Pl=null),Wl!==null&&_i(Wl)&&(Wl=null),ss.forEach(qm),is.forEach(qm)}function Di(e,t){e.blockedOn===t&&(e.blockedOn=null,sc||(sc=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,yp)))}var zi=null;function Hm(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(nc(a||l)===null)continue;break}var i=wa(l);i!==null&&(e.splice(t,3),t-=3,ar(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),Pl!==null&&Di(Pl,e),Wl!==null&&Di(Wl,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);)Um(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||Hm(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[gt]||null)h=o.formAction;else if(nc(n)!==null)continue}else h=o.action;typeof h=="function"?l[a+1]=h:(l.splice(a,3),a-=3),Hm(l)}}}function Lm(){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 ic(e){this._internalRoot=e}Oi.prototype.render=ic.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Ut();Am(l,a,e,t,null,null)},Oi.prototype.unmount=ic.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Am(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=Zc();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&&Um(e)}};var Bm=c.version;if(Bm!=="19.2.4")throw Error(r(527,Bm,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var jp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ui=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ui.isDisabled&&Ui.supportsFiber)try{pn=Ui.inject(jp),Tt=Ui}catch{}}return cs.createRoot=function(e,t){if(!m(e))throw Error(r(299));var l=!1,a="",n=Xd,i=Zd,o=$d;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=Tm(e,1,!1,null,null,l,a,null,n,i,o,Lm),e[Na]=t.current,Yr(e),new ic(t)},cs.hydrateRoot=function(e,t,l){if(!m(e))throw Error(r(299));var a=!1,n="",i=Xd,o=Zd,h=$d,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=Tm(e,1,!0,t,l??null,a,n,j,i,o,h,Lm),t.context=Rm(null),l=t.current,a=Ut(),a=Fi(a),n=Ll(a),n.callback=null,Bl(l,n,a),l=a,t.current.lanes=l,gn(t,l),sl(t),e[Na]=t.current,Yr(e),new Oi(t)},cs.version="19.2.4",cs}var Jm;function Mp(){if(Jm)return cc.exports;Jm=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(c){console.error(c)}}return u(),cc.exports=Ap(),cc.exports}var _p=Mp();const Dp=Ec(_p);/**
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 Fm="popstate";function zp(u={}){function c(m,x){let{pathname:f="/",search:v="",hash:b=""}=Sa(m.location.hash.substring(1));return!f.startsWith("/")&&!f.startsWith(".")&&(f="/"+f),bc("",{pathname:f,search:v,hash:b},x.state&&x.state.usr||null,x.state&&x.state.key||"default")}function d(m,x){let f=m.document.querySelector("base"),v="";if(f&&f.getAttribute("href")){let b=m.location.href,p=b.indexOf("#");v=p===-1?b:b.slice(0,p)}return v+"#"+(typeof x=="string"?x:xs(x))}function r(m,x){Ft(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(x)})`)}return Up(c,d,r,u)}function Ze(u,c){if(u===!1||u===null||typeof u>"u")throw new Error(c)}function Ft(u,c){if(!u){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function Op(){return Math.random().toString(36).substring(2,10)}function Pm(u,c){return{usr:u.state,key:u.key,idx:c}}function bc(u,c,d=null,r){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof c=="string"?Sa(c):c,state:d,key:c&&c.key||r||Op()}}function xs({pathname:u="/",search:c="",hash:d=""}){return c&&c!=="?"&&(u+=c.charAt(0)==="?"?c:"?"+c),d&&d!=="#"&&(u+=d.charAt(0)==="#"?d:"#"+d),u}function Sa(u){let c={};if(u){let d=u.indexOf("#");d>=0&&(c.hash=u.substring(d),u=u.substring(0,d));let r=u.indexOf("?");r>=0&&(c.search=u.substring(r),u=u.substring(0,r)),u&&(c.pathname=u)}return c}function Up(u,c,d,r={}){let{window:m=document.defaultView,v5Compat:x=!1}=r,f=m.history,v="POP",b=null,p=g();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function g(){return(f.state||{idx:null}).idx}function y(){v="POP";let k=g(),E=k==null?null:k-p;p=k,b&&b({action:v,location:O.location,delta:E})}function M(k,E){v="PUSH";let G=bc(O.location,k,E);d&&d(G,k),p=g()+1;let q=Pm(G,p),te=O.createHref(G);try{f.pushState(q,"",te)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;m.location.assign(te)}x&&b&&b({action:v,location:O.location,delta:1})}function D(k,E){v="REPLACE";let G=bc(O.location,k,E);d&&d(G,k),p=g();let q=Pm(G,p),te=O.createHref(G);f.replaceState(q,"",te),x&&b&&b({action:v,location:O.location,delta:0})}function U(k){return qp(k)}let O={get action(){return v},get location(){return u(m,f)},listen(k){if(b)throw new Error("A history only accepts one active listener");return m.addEventListener(Fm,y),b=k,()=>{m.removeEventListener(Fm,y),b=null}},createHref(k){return c(m,k)},createURL:U,encodeLocation(k){let E=U(k);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:M,replace:D,go(k){return f.go(k)}};return O}function qp(u,c=!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 r=typeof u=="string"?u:xs(u);return r=r.replace(/ $/,"%20"),!c&&r.startsWith("//")&&(r=d+r),new URL(r,d)}function ph(u,c,d="/"){return Hp(u,c,d,!1)}function Hp(u,c,d,r){let m=typeof c=="string"?Sa(c):c,x=Tl(m.pathname||"/",d);if(x==null)return null;let f=vh(u);Lp(f);let v=null;for(let b=0;v==null&&b<f.length;++b){let p=Jp(x);v=$p(f[b],p,r)}return v}function vh(u,c=[],d=[],r="",m=!1){let x=(f,v,b=m,p)=>{let g={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:v,route:f};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(r)&&b)return;Ze(g.relativePath.startsWith(r),`Absolute route path "${g.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(r.length)}let y=Cl([r,g.relativePath]),M=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,c,M,y,b)),!(f.path==null&&!f.index)&&c.push({path:y,score:Xp(y,f.index),routesMeta:M})};return u.forEach((f,v)=>{var b;if(f.path===""||!((b=f.path)!=null&&b.includes("?")))x(f,v);else for(let p of gh(f.path))x(f,v,!0,p)}),c}function gh(u){let c=u.split("/");if(c.length===0)return[];let[d,...r]=c,m=d.endsWith("?"),x=d.replace(/\?$/,"");if(r.length===0)return m?[x,""]:[x];let f=gh(r.join("/")),v=[];return v.push(...f.map(b=>b===""?x:[x,b].join("/"))),m&&v.push(...f),v.map(b=>u.startsWith("/")&&b===""?"/":b)}function Lp(u){u.sort((c,d)=>c.score!==d.score?d.score-c.score:Zp(c.routesMeta.map(r=>r.childrenIndex),d.routesMeta.map(r=>r.childrenIndex)))}var Bp=/^:[\w-]+$/,kp=3,Yp=2,Gp=1,Qp=10,Vp=-2,Wm=u=>u==="*";function Xp(u,c){let d=u.split("/"),r=d.length;return d.some(Wm)&&(r+=Vp),c&&(r+=Yp),d.filter(m=>!Wm(m)).reduce((m,x)=>m+(Bp.test(x)?kp:x===""?Gp:Qp),r)}function Zp(u,c){return u.length===c.length&&u.slice(0,-1).every((r,m)=>r===c[m])?u[u.length-1]-c[c.length-1]:0}function $p(u,c,d=!1){let{routesMeta:r}=u,m={},x="/",f=[];for(let v=0;v<r.length;++v){let b=r[v],p=v===r.length-1,g=x==="/"?c:c.slice(x.length)||"/",y=Yi({path:b.relativePath,caseSensitive:b.caseSensitive,end:p},g),M=b.route;if(!y&&p&&d&&!r[r.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:Ip(Cl([x,y.pathnameBase])),route:M}),y.pathnameBase!=="/"&&(x=Cl([x,y.pathnameBase]))}return f}function Yi(u,c){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[d,r]=Kp(u.path,u.caseSensitive,u.end),m=c.match(d);if(!m)return null;let x=m[0],f=x.replace(/(.)\/+$/,"$1"),v=m.slice(1);return{params:r.reduce((p,{paramName:g,isOptional:y},M)=>{if(g==="*"){let U=v[M]||"";f=x.slice(0,x.length-U.length).replace(/(.)\/+$/,"$1")}const D=v[M];return y&&!D?p[g]=void 0:p[g]=(D||"").replace(/%2F/g,"/"),p},{}),pathname:x,pathnameBase:f,pattern:u}}function Kp(u,c=!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 r=[],m="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,v,b)=>(r.push({paramName:v,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(r.push({paramName:"*"}),m+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":u!==""&&u!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,c?void 0:"i"),r]}function Jp(u){try{return u.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){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 (${c}).`),u}}function Tl(u,c){if(c==="/")return u;if(!u.toLowerCase().startsWith(c.toLowerCase()))return null;let d=c.endsWith("/")?c.length-1:c.length,r=u.charAt(d);return r&&r!=="/"?null:u.slice(d)||"/"}var Fp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Pp(u,c="/"){let{pathname:d,search:r="",hash:m=""}=typeof u=="string"?Sa(u):u,x;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?x=Im(d.substring(1),"/"):x=Im(d,c)):x=c,{pathname:x,search:ev(r),hash:tv(m)}}function Im(u,c){let d=c.replace(/\/+$/,"").split("/");return u.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function mc(u,c,d,r){return`Cannot include a '${u}' character in a manually specified \`to.${c}\` field [${JSON.stringify(r)}]. 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 Wp(u){return u.filter((c,d)=>d===0||c.route.path&&c.route.path.length>0)}function Cc(u){let c=Wp(u);return c.map((d,r)=>r===c.length-1?d.pathname:d.pathnameBase)}function Tc(u,c,d,r=!1){let m;typeof u=="string"?m=Sa(u):(m={...u},Ze(!m.pathname||!m.pathname.includes("?"),mc("?","pathname","search",m)),Ze(!m.pathname||!m.pathname.includes("#"),mc("#","pathname","hash",m)),Ze(!m.search||!m.search.includes("#"),mc("#","search","hash",m)));let x=u===""||m.pathname==="",f=x?"/":m.pathname,v;if(f==null)v=d;else{let y=c.length-1;if(!r&&f.startsWith("..")){let M=f.split("/");for(;M[0]==="..";)M.shift(),y-=1;m.pathname=M.join("/")}v=y>=0?c[y]:"/"}let b=Pp(m,v),p=f&&f!=="/"&&f.endsWith("/"),g=(x||f===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(p||g)&&(b.pathname+="/"),b}var Cl=u=>u.join("/").replace(/\/\/+/g,"/"),Ip=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),ev=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,tv=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u,lv=class{constructor(u,c,d,r=!1){this.status=u,this.statusText=c||"",this.internal=r,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function av(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}function nv(u){return u.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var bh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yh(u,c){let d=u;if(typeof d!="string"||!Fp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let r=d,m=!1;if(bh)try{let x=new URL(window.location.href),f=d.startsWith("//")?new URL(x.protocol+d):new URL(d),v=Tl(f.pathname,c);f.origin===x.origin&&v!=null?d=v+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:r,isExternal:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var jh=["POST","PUT","PATCH","DELETE"];new Set(jh);var sv=["GET",...jh];new Set(sv);var fn=w.createContext(null);fn.displayName="DataRouter";var Vi=w.createContext(null);Vi.displayName="DataRouterState";var iv=w.createContext(!1),Sh=w.createContext({isTransitioning:!1});Sh.displayName="ViewTransition";var uv=w.createContext(new Map);uv.displayName="Fetchers";var rv=w.createContext(null);rv.displayName="Await";var qt=w.createContext(null);qt.displayName="Navigation";var ps=w.createContext(null);ps.displayName="Location";var il=w.createContext({outlet:null,matches:[],isDataRoute:!1});il.displayName="Route";var Rc=w.createContext(null);Rc.displayName="RouteError";var Nh="REACT_ROUTER_ERROR",cv="REDIRECT",ov="ROUTE_ERROR_RESPONSE";function dv(u){if(u.startsWith(`${Nh}:${cv}:{`))try{let c=JSON.parse(u.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function fv(u){if(u.startsWith(`${Nh}:${ov}:{`))try{let c=JSON.parse(u.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new lv(c.status,c.statusText,c.data)}catch{}}function mv(u,{relative:c}={}){Ze(mn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:r}=w.useContext(qt),{hash:m,pathname:x,search:f}=vs(u,{relative:c}),v=x;return d!=="/"&&(v=x==="/"?d:Cl([d,x])),r.createHref({pathname:v,search:f,hash:m})}function mn(){return w.useContext(ps)!=null}function aa(){return Ze(mn(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(ps).location}var Eh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wh(u){w.useContext(qt).static||w.useLayoutEffect(u)}function Ac(){let{isDataRoute:u}=w.useContext(il);return u?Cv():hv()}function hv(){Ze(mn(),"useNavigate() may be used only in the context of a <Router> component.");let u=w.useContext(fn),{basename:c,navigator:d}=w.useContext(qt),{matches:r}=w.useContext(il),{pathname:m}=aa(),x=JSON.stringify(Cc(r)),f=w.useRef(!1);return wh(()=>{f.current=!0}),w.useCallback((b,p={})=>{if(Ft(f.current,Eh),!f.current)return;if(typeof b=="number"){d.go(b);return}let g=Tc(b,JSON.parse(x),m,p.relative==="path");u==null&&c!=="/"&&(g.pathname=g.pathname==="/"?c:Cl([c,g.pathname])),(p.replace?d.replace:d.push)(g,p.state,p)},[c,d,x,m,u])}w.createContext(null);function vs(u,{relative:c}={}){let{matches:d}=w.useContext(il),{pathname:r}=aa(),m=JSON.stringify(Cc(d));return w.useMemo(()=>Tc(u,JSON.parse(m),r,c==="path"),[u,m,r,c])}function xv(u,c){return Ch(u,c)}function Ch(u,c,d,r,m){var G;Ze(mn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=w.useContext(qt),{matches:f}=w.useContext(il),v=f[f.length-1],b=v?v.params:{},p=v?v.pathname:"/",g=v?v.pathnameBase:"/",y=v&&v.route;{let q=y&&y.path||"";Rh(p,!y||q.endsWith("*")||q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${q}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${q}"> to <Route path="${q==="/"?"*":`${q}/*`}">.`)}let M=aa(),D;if(c){let q=typeof c=="string"?Sa(c):c;Ze(g==="/"||((G=q.pathname)==null?void 0:G.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 "${q.pathname}" was given in the \`location\` prop.`),D=q}else D=M;let U=D.pathname||"/",O=U;if(g!=="/"){let q=g.replace(/^\//,"").split("/");O="/"+U.replace(/^\//,"").split("/").slice(q.length).join("/")}let k=ph(u,{pathname:O});Ft(y||k!=null,`No routes matched location "${D.pathname}${D.search}${D.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 "${D.pathname}${D.search}${D.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=yv(k&&k.map(q=>Object.assign({},q,{params:Object.assign({},b,q.params),pathname:Cl([g,x.encodeLocation?x.encodeLocation(q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathname]),pathnameBase:q.pathnameBase==="/"?g:Cl([g,x.encodeLocation?x.encodeLocation(q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathnameBase])})),f,d,r,m);return c&&E?w.createElement(ps.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},E):E}function pv(){let u=wv(),c=av(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),d=u instanceof Error?u.stack:null,r="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:r},x={padding:"2px 4px",backgroundColor:r},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"}},c),d?w.createElement("pre",{style:m},d):null,f)}var vv=w.createElement(pv,null),Th=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,c){return c.location!==u.location||c.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:c.error,location:c.location,revalidation:u.revalidation||c.revalidation}}componentDidCatch(u,c){this.props.onError?this.props.onError(u,c):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=fv(u.digest);d&&(u=d)}let c=u!==void 0?w.createElement(il.Provider,{value:this.props.routeContext},w.createElement(Rc.Provider,{value:u,children:this.props.component})):this.props.children;return this.context?w.createElement(gv,{error:u},c):c}};Th.contextType=iv;var hc=new WeakMap;function gv({children:u,error:c}){let{basename:d}=w.useContext(qt);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let r=dv(c.digest);if(r){let m=hc.get(c);if(m)throw m;let x=yh(r.location,d);if(bh&&!hc.get(c))if(x.isExternal||r.reloadDocument)window.location.href=x.absoluteURL||x.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(x.to,{replace:r.replace}));throw hc.set(c,f),f}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return u}function bv({routeContext:u,match:c,children:d}){let r=w.useContext(fn);return r&&r.static&&r.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=c.route.id),w.createElement(il.Provider,{value:u},d)}function yv(u,c=[],d=null,r=null,m=null){if(u==null){if(!d)return null;if(d.errors)u=d.matches;else if(c.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 v=!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:M,errors:D}=d,U=y.route.loader&&!M.hasOwnProperty(y.route.id)&&(!D||D[y.route.id]===void 0);if(y.route.lazy||U){v=!0,b>=0?x=x.slice(0,b+1):x=[x[0]];break}}}let p=d&&r?(g,y)=>{var M,D;r(g,{location:d.location,params:((D=(M=d.matches)==null?void 0:M[0])==null?void 0:D.params)??{},unstable_pattern:nv(d.matches),errorInfo:y})}:void 0;return x.reduceRight((g,y,M)=>{let D,U=!1,O=null,k=null;d&&(D=f&&y.route.id?f[y.route.id]:void 0,O=y.route.errorElement||vv,v&&(b<0&&M===0?(Rh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,k=null):b===M&&(U=!0,k=y.route.hydrateFallbackElement||null)));let E=c.concat(x.slice(0,M+1)),G=()=>{let q;return D?q=O:U?q=k:y.route.Component?q=w.createElement(y.route.Component,null):y.route.element?q=y.route.element:q=g,w.createElement(bv,{match:y,routeContext:{outlet:g,matches:E,isDataRoute:d!=null},children:q})};return d&&(y.route.ErrorBoundary||y.route.errorElement||M===0)?w.createElement(Th,{location:d.location,revalidation:d.revalidation,component:O,error:D,children:G(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:p}):G()},null)}function Mc(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jv(u){let c=w.useContext(fn);return Ze(c,Mc(u)),c}function Sv(u){let c=w.useContext(Vi);return Ze(c,Mc(u)),c}function Nv(u){let c=w.useContext(il);return Ze(c,Mc(u)),c}function _c(u){let c=Nv(u),d=c.matches[c.matches.length-1];return Ze(d.route.id,`${u} can only be used on routes that contain a unique "id"`),d.route.id}function Ev(){return _c("useRouteId")}function wv(){var r;let u=w.useContext(Rc),c=Sv("useRouteError"),d=_c("useRouteError");return u!==void 0?u:(r=c.errors)==null?void 0:r[d]}function Cv(){let{router:u}=jv("useNavigate"),c=_c("useNavigate"),d=w.useRef(!1);return wh(()=>{d.current=!0}),w.useCallback(async(m,x={})=>{Ft(d.current,Eh),d.current&&(typeof m=="number"?await u.navigate(m):await u.navigate(m,{fromRouteId:c,...x}))},[u,c])}var eh={};function Rh(u,c,d){!c&&!eh[u]&&(eh[u]=!0,Ft(!1,d))}w.memo(Tv);function Tv({routes:u,future:c,state:d,onError:r}){return Ch(u,void 0,d,r,c)}function Rv({to:u,replace:c,state:d,relative:r}){Ze(mn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=w.useContext(qt);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}=aa(),v=Ac(),b=Tc(u,Cc(x),f,r==="path"),p=JSON.stringify(b);return w.useEffect(()=>{v(JSON.parse(p),{replace:c,state:d,relative:r})},[v,p,r,c,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 Av({basename:u="/",children:c=null,location:d,navigationType:r="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 v=u.replace(/^\/*/,"/"),b=w.useMemo(()=>({basename:v,navigator:m,static:x,unstable_useTransitions:f,future:{}}),[v,m,x,f]);typeof d=="string"&&(d=Sa(d));let{pathname:p="/",search:g="",hash:y="",state:M=null,key:D="default"}=d,U=w.useMemo(()=>{let O=Tl(p,v);return O==null?null:{location:{pathname:O,search:g,hash:y,state:M,key:D},navigationType:r}},[v,p,g,y,M,D,r]);return Ft(U!=null,`<Router basename="${v}"> is not able to match the URL "${p}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),U==null?null:w.createElement(qt.Provider,{value:b},w.createElement(ps.Provider,{children:c,value:U}))}function Mv({children:u,location:c}){return xv(yc(u),c)}function yc(u,c=[]){let d=[];return w.Children.forEach(u,(r,m)=>{if(!w.isValidElement(r))return;let x=[...c,m];if(r.type===w.Fragment){d.push.apply(d,yc(r.props.children,x));return}Ze(r.type===wl,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ze(!r.props.index||!r.props.children,"An index route cannot have child routes.");let f={id:r.props.id||x.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(f.children=yc(r.props.children,x)),d.push(f)}),d}var Bi="get",ki="application/x-www-form-urlencoded";function Xi(u){return typeof HTMLElement<"u"&&u instanceof HTMLElement}function _v(u){return Xi(u)&&u.tagName.toLowerCase()==="button"}function Dv(u){return Xi(u)&&u.tagName.toLowerCase()==="form"}function zv(u){return Xi(u)&&u.tagName.toLowerCase()==="input"}function Ov(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Uv(u,c){return u.button===0&&(!c||c==="_self")&&!Ov(u)}var qi=null;function qv(){if(qi===null)try{new FormData(document.createElement("form"),0),qi=!1}catch{qi=!0}return qi}var Hv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xc(u){return u!=null&&!Hv.has(u)?(Ft(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ki}"`),null):u}function Lv(u,c){let d,r,m,x,f;if(Dv(u)){let v=u.getAttribute("action");r=v?Tl(v,c):null,d=u.getAttribute("method")||Bi,m=xc(u.getAttribute("enctype"))||ki,x=new FormData(u)}else if(_v(u)||zv(u)&&(u.type==="submit"||u.type==="image")){let v=u.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=u.getAttribute("formaction")||v.getAttribute("action");if(r=b?Tl(b,c):null,d=u.getAttribute("formmethod")||v.getAttribute("method")||Bi,m=xc(u.getAttribute("formenctype"))||xc(v.getAttribute("enctype"))||ki,x=new FormData(v,u),!qv()){let{name:p,type:g,value:y}=u;if(g==="image"){let M=p?`${p}.`:"";x.append(`${M}x`,"0"),x.append(`${M}y`,"0")}else p&&x.append(p,y)}}else{if(Xi(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Bi,r=null,m=ki,f=u}return x&&m==="text/plain"&&(f=x,x=void 0),{action:r,method:d.toLowerCase(),encType:m,formData:x,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Dc(u,c){if(u===!1||u===null||typeof u>"u")throw new Error(c)}function Bv(u,c,d,r){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}_.${r}`:m.pathname=`${m.pathname}.${r}`:m.pathname==="/"?m.pathname=`_root.${r}`:c&&Tl(m.pathname,c)==="/"?m.pathname=`${c.replace(/\/$/,"")}/_root.${r}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${r}`,m}async function kv(u,c){if(u.id in c)return c[u.id];try{let d=await import(u.module);return c[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 Yv(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Gv(u,c,d){let r=await Promise.all(u.map(async m=>{let x=c.routes[m.route.id];if(x){let f=await kv(x,d);return f.links?f.links():[]}return[]}));return Zv(r.flat(1).filter(Yv).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function th(u,c,d,r,m,x){let f=(b,p)=>d[p]?b.route.id!==d[p].route.id:!0,v=(b,p)=>{var g;return d[p].pathname!==b.pathname||((g=d[p].route.path)==null?void 0:g.endsWith("*"))&&d[p].params["*"]!==b.params["*"]};return x==="assets"?c.filter((b,p)=>f(b,p)||v(b,p)):x==="data"?c.filter((b,p)=>{var y;let g=r.routes[b.route.id];if(!g||!g.hasLoader)return!1;if(f(b,p)||v(b,p))return!0;if(b.route.shouldRevalidate){let M=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 M=="boolean")return M}return!0}):[]}function Qv(u,c,{includeHydrateFallback:d}={}){return Vv(u.map(r=>{let m=c.routes[r.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 Vv(u){return[...new Set(u)]}function Xv(u){let c={},d=Object.keys(u).sort();for(let r of d)c[r]=u[r];return c}function Zv(u,c){let d=new Set;return new Set(c),u.reduce((r,m)=>{let x=JSON.stringify(Xv(m));return d.has(x)||(d.add(x),r.push({key:x,link:m})),r},[])}function Ah(){let u=w.useContext(fn);return Dc(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function $v(){let u=w.useContext(Vi);return Dc(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var zc=w.createContext(void 0);zc.displayName="FrameworkContext";function Mh(){let u=w.useContext(zc);return Dc(u,"You must render this element inside a <HydratedRouter> element"),u}function Kv(u,c){let d=w.useContext(zc),[r,m]=w.useState(!1),[x,f]=w.useState(!1),{onFocus:v,onBlur:b,onMouseEnter:p,onMouseLeave:g,onTouchStart:y}=c,M=w.useRef(null);w.useEffect(()=>{if(u==="render"&&f(!0),u==="viewport"){let O=E=>{E.forEach(G=>{f(G.isIntersecting)})},k=new IntersectionObserver(O,{threshold:.5});return M.current&&k.observe(M.current),()=>{k.disconnect()}}},[u]),w.useEffect(()=>{if(r){let O=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(O)}}},[r]);let D=()=>{m(!0)},U=()=>{m(!1),f(!1)};return d?u!=="intent"?[x,M,{}]:[x,M,{onFocus:os(v,D),onBlur:os(b,U),onMouseEnter:os(p,D),onMouseLeave:os(g,U),onTouchStart:os(y,D)}]:[!1,M,{}]}function os(u,c){return d=>{u&&u(d),d.defaultPrevented||c(d)}}function Jv({page:u,...c}){let{router:d}=Ah(),r=w.useMemo(()=>ph(d.routes,u,d.basename),[d.routes,u,d.basename]);return r?w.createElement(Pv,{page:u,matches:r,...c}):null}function Fv(u){let{manifest:c,routeModules:d}=Mh(),[r,m]=w.useState([]);return w.useEffect(()=>{let x=!1;return Gv(u,c,d).then(f=>{x||m(f)}),()=>{x=!0}},[u,c,d]),r}function Pv({page:u,matches:c,...d}){let r=aa(),{future:m,manifest:x,routeModules:f}=Mh(),{basename:v}=Ah(),{loaderData:b,matches:p}=$v(),g=w.useMemo(()=>th(u,c,p,x,r,"data"),[u,c,p,x,r]),y=w.useMemo(()=>th(u,c,p,x,r,"assets"),[u,c,p,x,r]),M=w.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let O=new Set,k=!1;if(c.forEach(G=>{var te;let q=x.routes[G.route.id];!q||!q.hasLoader||(!g.some(Z=>Z.route.id===G.route.id)&&G.route.id in b&&((te=f[G.route.id])!=null&&te.shouldRevalidate)||q.hasClientLoader?k=!0:O.add(G.route.id))}),O.size===0)return[];let E=Bv(u,v,m.unstable_trailingSlashAwareDataRequests,"data");return k&&O.size>0&&E.searchParams.set("_routes",c.filter(G=>O.has(G.route.id)).map(G=>G.route.id).join(",")),[E.pathname+E.search]},[v,m.unstable_trailingSlashAwareDataRequests,b,r,x,g,c,u,f]),D=w.useMemo(()=>Qv(y,x),[y,x]),U=Fv(y);return w.createElement(w.Fragment,null,M.map(O=>w.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...d})),D.map(O=>w.createElement("link",{key:O,rel:"modulepreload",href:O,...d})),U.map(({key:O,link:k})=>w.createElement("link",{key:O,nonce:d.nonce,...k,crossOrigin:k.crossOrigin??d.crossOrigin})))}function Wv(...u){return c=>{u.forEach(d=>{typeof d=="function"?d(c):d!=null&&(d.current=c)})}}var Iv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Iv&&(window.__reactRouterVersion="7.13.0")}catch{}function eg({basename:u,children:c,unstable_useTransitions:d,window:r}){let m=w.useRef();m.current==null&&(m.current=zp({window:r,v5Compat:!0}));let x=m.current,[f,v]=w.useState({action:x.action,location:x.location}),b=w.useCallback(p=>{d===!1?v(p):w.startTransition(()=>v(p))},[d]);return w.useLayoutEffect(()=>x.listen(b),[x,b]),w.createElement(Av,{basename:u,children:c,location:f.location,navigationType:f.action,navigator:x,unstable_useTransitions:d})}var _h=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dh=w.forwardRef(function({onClick:c,discover:d="render",prefetch:r="none",relative:m,reloadDocument:x,replace:f,state:v,target:b,to:p,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:M,...D},U){let{basename:O,unstable_useTransitions:k}=w.useContext(qt),E=typeof p=="string"&&_h.test(p),G=yh(p,O);p=G.to;let q=mv(p,{relative:m}),[te,Z,J]=Kv(r,D),I=ag(p,{replace:f,state:v,target:b,preventScrollReset:g,relative:m,viewTransition:y,unstable_defaultShouldRevalidate:M,unstable_useTransitions:k});function ie(X){c&&c(X),X.defaultPrevented||I(X)}let ue=w.createElement("a",{...D,...J,href:G.absoluteURL||q,onClick:G.isExternal||x?c:ie,ref:Wv(U,Z),target:b,"data-discover":!E&&d==="render"?"true":void 0});return te&&!E?w.createElement(w.Fragment,null,ue,w.createElement(Jv,{page:q})):ue});Dh.displayName="Link";var zh=w.forwardRef(function({"aria-current":c="page",caseSensitive:d=!1,className:r="",end:m=!1,style:x,to:f,viewTransition:v,children:b,...p},g){let y=vs(f,{relative:p.relative}),M=aa(),D=w.useContext(Vi),{navigator:U,basename:O}=w.useContext(qt),k=D!=null&&rg(y)&&v===!0,E=U.encodeLocation?U.encodeLocation(y).pathname:y.pathname,G=M.pathname,q=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;d||(G=G.toLowerCase(),q=q?q.toLowerCase():null,E=E.toLowerCase()),q&&O&&(q=Tl(q,O)||q);const te=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let Z=G===E||!m&&G.startsWith(E)&&G.charAt(te)==="/",J=q!=null&&(q===E||!m&&q.startsWith(E)&&q.charAt(E.length)==="/"),I={isActive:Z,isPending:J,isTransitioning:k},ie=Z?c:void 0,ue;typeof r=="function"?ue=r(I):ue=[r,Z?"active":null,J?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let X=typeof x=="function"?x(I):x;return w.createElement(Dh,{...p,"aria-current":ie,className:ue,ref:g,style:X,to:f,viewTransition:v},typeof b=="function"?b(I):b)});zh.displayName="NavLink";var tg=w.forwardRef(({discover:u="render",fetcherKey:c,navigate:d,reloadDocument:r,replace:m,state:x,method:f=Bi,action:v,onSubmit:b,relative:p,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:M,...D},U)=>{let{unstable_useTransitions:O}=w.useContext(qt),k=ig(),E=ug(v,{relative:p}),G=f.toLowerCase()==="get"?"get":"post",q=typeof v=="string"&&_h.test(v),te=Z=>{if(b&&b(Z),Z.defaultPrevented)return;Z.preventDefault();let J=Z.nativeEvent.submitter,I=(J==null?void 0:J.getAttribute("formmethod"))||f,ie=()=>k(J||Z.currentTarget,{fetcherKey:c,method:I,navigate:d,replace:m,state:x,relative:p,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:M});O&&d!==!1?w.startTransition(()=>ie()):ie()};return w.createElement("form",{ref:U,method:G,action:E,onSubmit:r?b:te,...D,"data-discover":!q&&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 Oh(u){let c=w.useContext(fn);return Ze(c,lg(u)),c}function ag(u,{target:c,replace:d,state:r,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:v,unstable_useTransitions:b}={}){let p=Ac(),g=aa(),y=vs(u,{relative:x});return w.useCallback(M=>{if(Uv(M,c)){M.preventDefault();let D=d!==void 0?d:xs(g)===xs(y),U=()=>p(u,{replace:D,state:r,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:v});b?w.startTransition(()=>U()):U()}},[g,p,y,d,r,c,u,m,x,f,v,b])}var ng=0,sg=()=>`__${String(++ng)}__`;function ig(){let{router:u}=Oh("useSubmit"),{basename:c}=w.useContext(qt),d=Ev(),r=u.fetch,m=u.navigate;return w.useCallback(async(x,f={})=>{let{action:v,method:b,encType:p,formData:g,body:y}=Lv(x,c);if(f.navigate===!1){let M=f.fetcherKey||sg();await r(M,d,f.action||v,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:y,formMethod:f.method||b,formEncType:f.encType||p,flushSync:f.flushSync})}else await m(f.action||v,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:y,formMethod:f.method||b,formEncType:f.encType||p,replace:f.replace,state:f.state,fromRouteId:d,flushSync:f.flushSync,viewTransition:f.viewTransition})},[r,m,c,d])}function ug(u,{relative:c}={}){let{basename:d}=w.useContext(qt),r=w.useContext(il);Ze(r,"useFormAction must be used inside a RouteContext");let[m]=r.matches.slice(-1),x={...vs(u||".",{relative:c})},f=aa();if(u==null){x.search=f.search;let v=new URLSearchParams(x.search),b=v.getAll("index");if(b.some(g=>g==="")){v.delete("index"),b.filter(y=>y).forEach(y=>v.append("index",y));let g=v.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 rg(u,{relative:c}={}){let d=w.useContext(Sh);Ze(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Oh("useViewTransitionState"),m=vs(u,{relative:c});if(!d.isTransitioning)return!1;let x=Tl(d.currentLocation.pathname,r)||d.currentLocation.pathname,f=Tl(d.nextLocation.pathname,r)||d.nextLocation.pathname;return Yi(m.pathname,f)!=null||Yi(m.pathname,x)!=null}var cg=xh();const og=Ec(cg);/**
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 Uh=(...u)=>u.filter((c,d,r)=>!!c&&c.trim()!==""&&r.indexOf(c)===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,(c,d,r)=>r?r.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 lh=u=>{const c=fg(u);return c.charAt(0).toUpperCase()+c.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 c in u)if(c.startsWith("aria-")||c==="role"||c==="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:c=24,strokeWidth:d=2,absoluteStrokeWidth:r,className:m="",children:x,iconNode:f,...v},b)=>w.createElement("svg",{ref:b,...mg,width:c,height:c,stroke:u,strokeWidth:r?Number(d)*24/Number(c):d,className:Uh("lucide",m),...!x&&!hg(v)&&{"aria-hidden":"true"},...v},[...f.map(([p,g])=>w.createElement(p,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,c)=>{const d=w.forwardRef(({className:r,...m},x)=>w.createElement(xg,{ref:x,iconNode:c,className:Uh(`lucide-${dg(lh(u))}`,`lucide-${u}`,r),...m}));return d.displayName=lh(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 pg=[["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"}]],qh=oe("activity",pg);/**
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 vg=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],gg=oe("arrow-down",vg);/**
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"}]],ah=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"}]],nh=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"}]],Oc=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"}]],jc=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 Ag=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Hh=oe("chevron-down",Ag);/**
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 Mg=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_g=oe("chevron-left",Mg);/**
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"}]],Hg=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 Lg=[["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",Lg);/**
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 Bg=[["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"}]],sh=oe("circle-arrow-down",Bg);/**
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"}]],ih=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 Vg=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Gi=oe("clock",Vg);/**
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 Xg=[["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"}]],Lh=oe("external-link",Xg);/**
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"}]],Sc=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 Pg=[["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"}]],Wg=oe("git-pull-request",Pg);/**
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"}]],Bh=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"}]],kh=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"}]],rb=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 cb=[["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"}]],Yh=oe("pause",cb);/**
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"}]],Uc=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"}]],Gh=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 pb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$i=oe("search",pb);/**
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 vb=[["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",vb);/**
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"}]],uh=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"}]],qc=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"}]],Ki=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),Hc="";let Qh=!1,Nc=null;function Ab(u){Qh=u}function Mb(u){Nc=u}function _b(u){return encodeURIComponent(u.replace(/\//g,"~"))}function at(u){return Qh&&Nc?u.replace("/api/",`/api/projects/${_b(Nc)}/`):u}function Db(){return nt("/api/mode")}function zb(){return nt("/api/projects")}async function nt(u,c){const d=`${Hc}${u}`,r=await fetch(d,{headers:{"Content-Type":"application/json",...c==null?void 0:c.headers},...c});if(!r.ok){const m=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${r.status}: ${r.statusText}`)}return r.json()}function pc(){return nt(at("/api/status"))}function Vh(){return nt(at("/api/prs"))}function Ob(u,c){const d=`?lines=${encodeURIComponent(c)}`;return nt(at(`/api/logs/${encodeURIComponent(u)}${d}`))}function Xh(){return nt(at("/api/config"))}function ta(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 Hb(){return nt(at("/api/actions/uninstall-cron"),{method:"POST"})}function Lb(u="all"){return nt(at("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:u})})}const la=["Draft","Ready","In Progress","Review","Done"];function $h(){return nt(at("/api/board/status"))}function Bb(u){return nt(at("/api/board/issues"),{method:"POST",body:JSON.stringify(u)})}function Kh(u,c){return nt(at(`/api/board/issues/${u}/move`),{method:"PATCH",body:JSON.stringify({column:c})})}async function kb(u){const c=`${Hc}${at(`/api/board/issues/${u}`)}`,d=await fetch(c,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const r=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(r.error||`HTTP ${d.status}: ${d.statusText}`)}}function Yb(){return nt(at("/api/actions/clear-lock"),{method:"POST"})}function Gb(u,c=[],d){const r=(d==null?void 0:d.enabled)??!0,m=w.useRef(u);m.current=u,w.useEffect(()=>{if(!r)return;const x=`${Hc}${at("/api/status/events")}`,f=new EventSource(x);return f.addEventListener("status_changed",v=>{try{const b=JSON.parse(v.data);m.current(b)}catch{}}),()=>{f.close()}},[r,...c])}function Qb(){return nt(at("/api/roadmap"))}function Vb(){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,c=[],d){const r=(d==null?void 0:d.enabled)??!0,[m,x]=w.useState(null),[f,v]=w.useState(!0),[b,p]=w.useState(null),g=w.useRef(u);g.current=u;const y=w.useRef(()=>{(async()=>{p(null);try{const D=await g.current();x(D)}catch(D){p(D instanceof Error?D:new Error("Unknown error"))}})()});return y.current=y.current.bind(y),w.useEffect(()=>{if(!r)return;let M=!1;return v(!0),p(null),(async()=>{try{const U=await g.current();M||x(U)}catch(U){M||p(U instanceof Error?U:new Error("Unknown error"))}finally{M||v(!1)}})(),()=>{M=!0}},[...c,r]),{data:m,loading:f,error:b,refetch:y.current}}const rh=u=>{let c;const d=new Set,r=(p,g)=>{const y=typeof p=="function"?p(c):p;if(!Object.is(y,c)){const M=c;c=g??(typeof y!="object"||y===null)?y:Object.assign({},c,y),d.forEach(D=>D(c,M))}},m=()=>c,v={setState:r,getState:m,getInitialState:()=>b,subscribe:p=>(d.add(p),()=>d.delete(p))},b=c=u(r,m,v);return v},Xb=u=>u?rh(u):rh,Zb=u=>u;function $b(u,c=Zb){const d=be.useSyncExternalStore(u.subscribe,()=>c(u.getState()),()=>c(u.getInitialState()));return be.useDebugValue(d),d}const ch=u=>{const c=Xb(u),d=r=>$b(c,r);return Object.assign(d,c),d},Kb=u=>u?ch(u):ch,Jb=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,xt=Kb(u=>({projectName:"Night Watch",setProjectName:c=>u({projectName:c}),toasts:[],addToast:c=>{const d=Math.random().toString(36).substring(7);u(r=>({toasts:[...r.toasts,{...c,id:d}]})),setTimeout(()=>{u(r=>({toasts:r.toasts.filter(m=>m.id!==d)}))},5e3)},removeToast:c=>u(d=>({toasts:d.toasts.filter(r=>r.id!==c)})),status:null,setStatus:c=>u(d=>!d.status||new Date(c.timestamp)>new Date(d.status.timestamp)?{status:c}:d),globalModeLoading:!0,setGlobalModeLoading:c=>u({globalModeLoading:c}),isGlobalMode:!1,setGlobalMode:c=>{Ab(c),u({isGlobalMode:c})},projects:[],setProjects:c=>u({projects:c}),selectedProjectId:Jb,selectProject:c=>{Mb(c),c?localStorage.setItem("nw-selected-project",c):localStorage.removeItem("nw-selected-project"),u(d=>{const r=d.projects.find(m=>m.name===c);return{selectedProjectId:c,...r?{projectName:r.name}:{}}})}})),Fb=()=>{const[u,c]=w.useState(!1),{projectName:d,isGlobalMode:r,projects:m,selectedProjectId:x,selectProject:f,globalModeLoading:v}=xt(),{data:b}=el(Vh,[x],{enabled:!v}),p=(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:Wg,label:"Pull Requests",path:"/prs",badge:p},{icon:kh,label:"Roadmap",path:"/roadmap"},{icon:Oc,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:gb,label:"Settings",path:"/settings",section:"Config"}],[p]);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:r?"Projects":"Workspace"}),r?s.jsxs("div",{className:"relative",children:[s.jsx(nh,{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(Hg,{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(nh,{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(be.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(zh,{to:y.path,className:({isActive:M})=>`
335
+ flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
336
+ ${M?"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:M})=>s.jsxs(s.Fragment,{children:[s.jsx(y.icon,{className:`h-5 w-5 transition-colors ${M?"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 ${M?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:y.badge})),M&&!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:()=>c(!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"})})})]})},Pb=()=>{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"})]})]})},Wb=({toast:u,onDismiss:c})=>{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(Ki,{className:"h-5 w-5 text-amber-400"})},r={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 ${r[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:()=>c(u.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(xn,{className:"h-5 w-5"})]})})]})})})},Ib=()=>{const{toasts:u,removeToast:c}=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(Wb,{toast:d,onDismiss:c},d.id))})};function ey(){const{setGlobalMode:u,setGlobalModeLoading:c,setProjects:d,selectProject:r,selectedProjectId:m}=xt();w.useEffect(()=>{c(!0),Db().then(async({globalMode:x})=>{if(u(x),!x)return;const f=await zb();d(f);const v=f.filter(b=>b.valid);m&&v.some(b=>b.name===m)?r(m):v.length>0&&r(v[0].name)}).catch(()=>{u(!1)}).finally(()=>{c(!1)})},[])}function oh(u){if(!(u!=null&&u.timestamp))return Number.NEGATIVE_INFINITY;const c=new Date(u.timestamp).getTime();return Number.isNaN(c)?Number.NEGATIVE_INFINITY:c}function Hi(u,c){return u?c?oh(u)>=oh(c)?u:c:u:c}function ty(){const{setStatus:u,setProjectName:c,selectedProjectId:d,globalModeLoading:r,status:m}=xt(),x=w.useRef(null);x.current=xt.getState().status,Gb(f=>{Hi(f,x.current)===f&&u(f)},[d,r],{enabled:!r}),w.useEffect(()=>{if(r)return;pc().then(v=>{Hi(v,x.current)===v&&u(v)}).catch(()=>{});const f=setInterval(()=>{pc().then(v=>{Hi(v,x.current)===v&&u(v)}).catch(()=>{})},3e4);return()=>clearInterval(f)},[d,r,u]),w.useEffect(()=>{const f=()=>{pc().then(v=>{Hi(v,x.current)===v&&u(v)}).catch(()=>{})};return window.addEventListener("focus",f),()=>window.removeEventListener("focus",f)},[d,u]),w.useEffect(()=>{m!=null&&m.projectName&&c(m.projectName)},[m==null?void 0:m.projectName,c])}const Oe=({children:u,className:c="",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
+ ${c}
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})]}),ke=({children:u,variant:c="primary",size:d="md",loading:r=!1,className:m="",disabled:x,...f})=>{const v="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"},p={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:`${v} ${b[c]} ${p[d]} ${m}`,disabled:x||r,...f,children:[r&&s.jsx(Bh,{className:"mr-2 h-4 w-4 animate-spin"}),u]})},on=({children:u,variant:c="default",className:d=""})=>{const r={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 ${r[c]} ${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:c,onCreated:d})=>{const[r,m]=w.useState(""),[x,f]=w.useState(""),[v,b]=w.useState(u),[p,g]=w.useState(!1),[y,M]=w.useState(null),{addToast:D}=xt(),U=async O=>{if(O.preventDefault(),!!r.trim()){g(!0),M(null);try{await Bb({title:r.trim(),body:x,column:v}),D({title:"Issue created",message:`"${r.trim()}" added to ${v}`,type:"success"}),d(),c()}catch(k){M(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:c}),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:c,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:U,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:r,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:v,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:la.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(ke,{variant:"ghost",type:"button",onClick:c,children:"Cancel"}),s.jsx(ke,{type:"submit",disabled:p||!r.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},ay=({issue:u,onClose:c,onMoved:d,onClosed:r})=>{const[m,x]=w.useState(!1),[f,v]=w.useState(!1),{addToast:b}=xt(),p=async M=>{if(M!==u.column){x(!0);try{await Kh(u.number,M),b({title:"Issue moved",message:`#${u.number} moved to ${M}`,type:"success"}),d(),c()}catch(D){b({title:"Move failed",message:D instanceof Error?D.message:"Failed to move issue",type:"error"})}finally{x(!1)}}},g=async()=>{if(confirm(`Close issue #${u.number}: "${u.title}"?`)){v(!0);try{await kb(u.number),b({title:"Issue closed",message:`#${u.number} closed on GitHub`,type:"success"}),r(),c()}catch(M){b({title:"Close failed",message:M instanceof Error?M.message:"Failed to close issue",type:"error"})}finally{v(!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:c}),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:c,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:"}),la.filter(M=>M!==u.column).map(M=>s.jsx("button",{onClick:()=>p(M),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:M},M))]}),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(Lh,{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:c,onDragStart:d})=>{const[r,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(Oe,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${r?"opacity-30":""}`,onClick:c,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:c,draggingIssue:d,onIssueClick:r,onNewIssue:m,onMoveIssue:x,onDragStart:f})=>{const v=Fh[u],[b,p]=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",p(!0))},onDragLeave:()=>p(!1),onDrop:y=>{y.preventDefault(),p(!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 ${v.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:c.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:c.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"})}):c.map(y=>s.jsx(ny,{issue:y,onClick:()=>r(y),onDragStart:f},y.id))})]})},iy=()=>{const[u,c]=w.useState(null),[d,r]=w.useState(null),[m,x]=w.useState(null),[f,v]=w.useState(null),b=w.useRef(!1),{addToast:p,selectedProjectId:g,globalModeLoading:y}=xt(),{data:M,loading:D,error:U,refetch:O}=el($h,[g],{enabled:!y});w.useEffect(()=>{const G=setInterval(()=>{b.current||O()},3e4);return()=>clearInterval(G)},[O]);const k=w.useCallback(async(G,q)=>{x(null);const te=f??(M==null?void 0:M.columns);if(!te)return;const Z=te,J={};for(const ie of la)J[ie]=(te[ie]??[]).filter(ue=>ue.number!==G.number);const I={...G,column:q};J[q]=[...J[q]??[],I],v(J),c(ie=>(ie==null?void 0:ie.number)===G.number?I:ie),b.current=!0;try{await Kh(G.number,q),O(),setTimeout(()=>{v(null),b.current=!1},800)}catch(ie){v(Z),c(ue=>(ue==null?void 0:ue.number)===G.number?G:ue),b.current=!1,p({title:"Move failed",message:ie instanceof Error?ie.message:"Failed to move issue",type:"error"})}},[p,O,f,M]);if(y||D)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(U&&U.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(U)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:U.message}),s.jsx(ke,{onClick:()=>O(),children:"Retry"})]});if(!M)return null;const E=f??M.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:[la.reduce((G,q)=>{var te;return G+(((te=E[q])==null?void 0:te.length)??0)},0)," issues across ",la.length," columns"]})]}),s.jsxs(ke,{onClick:()=>r("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:`${la.length*236}px`},children:la.map(G=>s.jsx(sy,{name:G,issues:E[G]??[],draggingIssue:m,onIssueClick:c,onNewIssue:r,onMoveIssue:k,onDragStart:x},G))})}),u&&s.jsx(ay,{issue:u,onClose:()=>c(null),onMoved:()=>O(),onClosed:()=>O()}),d&&s.jsx(ly,{defaultColumn:d,onClose:()=>r(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"}],ry=({processes:u,activePrd:c,onCancelProcess:d,onForceClear:r,onViewLog:m,cancellingProcess:x,clearingLock:f})=>{const v=p=>u.find(g=>g.name===p),b=(p,g)=>p.length<=g?p:p.slice(0,g-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:uy.map(p=>{const g=v(p.processName),y=(g==null?void 0:g.running)??!1,M=g==null?void 0:g.pid,D=x===p.cancelType,U=y&&p.cancelType,O=!y&&p.name==="executor"&&c,k=y?M?`PID: ${M}`:p.runningLabel:p.idleLabel,E=y&&p.name==="executor"&&c?b(c,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:p.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(Sc,{className:"h-3 w-3 flex-shrink-0"}),E]}):k})]}),s.jsxs("div",{className:"flex-shrink-0",children:[U&&s.jsx("button",{onClick:()=>p.cancelType&&d(p.cancelType),disabled:D,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(uh,{className:"h-3.5 w-3.5"})}),O&&s.jsx("button",{onClick:r,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(uh,{className:"h-3.5 w-3.5"})}),!U&&!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(Sc,{className:"h-3.5 w-3.5"})})]})]},p.name)})})},cy={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 I,ie;const u=Ac(),[c,d]=w.useState(null),[r,m]=w.useState(!1),{setProjectName:x,addToast:f,selectedProjectId:v,globalModeLoading:b,status:p}=xt(),{data:g}=el(Zh,[v],{enabled:!b}),{data:y,loading:M}=el(()=>$h().catch(()=>null),[v],{enabled:!b}),D=p;if(be.useEffect(()=>{D!=null&&D.projectName&&x(D.projectName)},[D,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(!D)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const U=D.prs.length,O=D.prs.filter(ue=>ue.reviewScore!==null&&ue.reviewScore<70).length,k=((I=y==null?void 0:y.columns.Ready)==null?void 0:I.length)??0,E=((ie=y==null?void 0:y.columns["In Progress"])==null?void 0:ie.length)??0,G=async ue=>{d(ue);try{const X=await Lb(ue),pe=X.results.every(ye=>ye.success);f({title:pe?"Process Cancelled":"Cancel Failed",message:X.results.map(ye=>ye.message).join("; "),type:pe?"success":"error"})}catch(X){f({title:"Cancel Failed",message:X instanceof Error?X.message:"Failed to cancel process",type:"error"})}finally{d(null)}},q=async()=>{m(!0);try{await Yb(),f({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(ue){f({title:"Clear Failed",message:ue instanceof Error?ue.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},te=ue=>{if(!ue)return"Not scheduled";try{const X=new Date(ue),pe=new Date,ye=X.getTime()-pe.getTime(),we=Math.floor(ye/6e4);return we<0?"Running now...":we<60?`in ${we} min`:we<1440?`in ${Math.floor(we/60)} hr${we>=120?"s":""}`:`in ${Math.floor(we/1440)} day${we>=2880?"s":""}`}catch{return"Unknown"}},J=(()=>{var pe,ye,we;if(g!=null&&g.paused)return null;const ue=[{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:((pe=g==null?void 0:g.qa)==null?void 0:pe.nextRun)??null},{agent:"Auditor",nextRun:((ye=g==null?void 0:g.audit)==null?void 0:ye.nextRun)??null},{agent:"Planner",nextRun:((we=g==null?void 0:g.planner)==null?void 0:we.nextRun)??null}];let X=null;for(const F of ue)F.nextRun&&(!X||new Date(F.nextRun)<new Date(X.nextRun))&&(X=F);return X?{agent:X.agent,time:te(X.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(Oe,{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:k})]}),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(Oe,{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:E})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(qh,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(Oe,{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:U})]}),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 ${O>0?"text-red-400 font-medium":"text-slate-500"}`,children:O>0?`${O} need work`:"All passing"})]}),s.jsxs(Oe,{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":D.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${g!=null&&g.paused?"bg-amber-500/10 text-amber-400":D.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Oc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:g!=null&&g.paused?"All schedules paused":D.crontab.installed?`${D.crontab.entries.length} entr${D.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(Oe,{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(ry,{processes:D.processes,activePrd:D.activePrd,onCancelProcess:G,onForceClear:q,onViewLog:()=>u("/logs"),cancellingProcess:c,clearingLock:r})]}),J&&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:J.agent}),s.jsx("span",{children:J.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(ah,{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(ah,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(Oe,{className:"p-4",children:M?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):y?s.jsx("div",{className:"flex flex-wrap gap-3",children:la.map(ue=>{var pe;const X=((pe=y.columns[ue])==null?void 0:pe.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 ${cy[ue]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:ue}),s.jsx("span",{className:"text-xs font-bold",children:X})]},ue)})}):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,c]=w.useState(!0),[d,r]=w.useState(""),[m,x]=w.useState("executor"),f=w.useRef(null),{selectedProjectId:v,globalModeLoading:b}=xt(),p=xt(G=>G.status),{data:g,loading:y,error:M,refetch:D}=el(()=>Ob(m,500),[m,v],{enabled:!b}),U=(g==null?void 0:g.lines)||[];w.useEffect(()=>{u&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[U,u]),w.useEffect(()=>{if(!u)return;const G=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(G)},[u,m,D]);const O=U.filter(G=>G.toLowerCase().includes(d.toLowerCase())),k=G=>{x(G),r("")},E=G=>{if(!(p!=null&&p.processes))return!1;const q=p.processes.find(te=>te.name===G);return(q==null?void 0:q.running)??!1};return M?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:M.message}),s.jsx(ke,{onClick:()=>D(),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:G=>r(G.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(ke,{size:"sm",variant:"ghost",onClick:()=>D(),children:[s.jsx(sh,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(ke,{size:"sm",variant:"ghost",onClick:()=>c(!u),children:[u?s.jsx(Yh,{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((G,q)=>{const te=G.includes("[ERROR]"),Z=G.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${te?"text-red-400":Z?"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:q+1}),G]},q)}),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:()=>c(!0),children:[s.jsx(sh,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},fy=()=>{const[u,c]=w.useState(null),[d,r]=w.useState(!1),[m,x]=w.useState("all"),[f,v]=w.useState("number"),[b,p]=w.useState("desc"),{addToast:g,selectedProjectId:y,globalModeLoading:M}=xt(),{data:D,loading:U,error:O,refetch:k}=el(Vh,[y],{enabled:!M}),E=D??[],G=X=>{switch(X){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(Bh,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Rl,{className:"h-4 w-4 text-slate-500"})}},q=X=>{switch(X){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},te=X=>X===null?"No review decision yet":X===100?"PR has been approved":X===0?"Changes have been requested":`Review score: ${X}`,Z=w.useMemo(()=>E.filter(X=>{switch(m){case"needs-work":return X.ciStatus==="fail"||X.reviewScore===0;case"pending":return X.ciStatus==="pending"||X.ciStatus==="unknown"||X.reviewScore===null;case"passed":return X.ciStatus==="pass"&&X.reviewScore===100;case"all":default:return!0}}),[E,m]),J=w.useMemo(()=>[...Z].sort((pe,ye)=>{let we=0;switch(f){case"number":we=pe.number-ye.number;break;case"title":we=pe.title.localeCompare(ye.title);break;case"branch":we=pe.branch.localeCompare(ye.branch);break;case"ciStatus":{const F={fail:0,pending:1,unknown:2,pass:3};we=(F[pe.ciStatus]??2)-(F[ye.ciStatus]??2);break}case"reviewScore":{const F=pe.reviewScore??-1,Pe=ye.reviewScore??-1;we=F-Pe;break}}return b==="asc"?we:-we}),[Z,f,b]),I=X=>{f===X?p(b==="asc"?"desc":"asc"):(v(X),p("desc"))},ie=X=>f!==X?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(U)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(ke,{onClick:()=>k(),children:"Retry"})]});const ue=async()=>{r(!0);try{const X=await qb();g({title:"Reviewer Started",message:X.pid?`Started with PID ${X.pid}`:"Reviewer started",type:"success"})}catch(X){g({title:"Reviewer Failed",message:X instanceof Error?X.message:"Failed to start reviewer",type:"error"})}finally{r(!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(ke,{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:()=>I("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),ie("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:()=>I("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),ie("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:()=>I("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),ie("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:()=>I("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),ie("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:[J.map(X=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>c(u===X.number?null:X.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:["#",X.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:X.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:X.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:q(X.ciStatus),children:[G(X.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:X.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:X.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:te(X.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${X.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${X.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${X.reviewScore>=70?"text-green-500":"text-red-500"}`,children:X.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:X.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:pe=>pe.stopPropagation(),children:s.jsx(Lh,{className:"h-4 w-4"})})})]},X.number)),J.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(Oe,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const X=E.find(pe=>pe.number===u);return X?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:X.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:X.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:q(X.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:[G(X.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:X.ciStatus})]})]}),X.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:te(X.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${X.reviewScore>=70?"text-green-500":"text-red-500"}`,children:X.reviewScore})]})]})]}):null})()})]})},Jt=be.forwardRef(({className:u="",label:c,checked:d,onChange:r,...m},x)=>{const f=v=>{r&&r(v.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"})]}),c&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:c})]})});Jt.displayName="Switch";const my=()=>{const{addToast:u,selectedProjectId:c,globalModeLoading:d}=xt(),[r,m]=w.useState(!1),[x,f]=w.useState(!1),{data:v,loading:b,error:p,refetch:g}=el(Qb,[c],{enabled:!d});w.useEffect(()=>{if(!(v!=null&&v.enabled))return;const G=setInterval(()=>{g()},1e4);return()=>clearInterval(G)},[v==null?void 0:v.enabled,g]);const y=async G=>{f(!0);try{await Jh(G),u({title:G?"Scanner Enabled":"Scanner Disabled",message:G?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:G?"success":"info"}),g()}catch(q){u({title:"Toggle Failed",message:q instanceof Error?q.message:"Failed to toggle scanner",type:"error"})}finally{f(!1)}},M=async()=>{m(!0);try{const G=await Vb();G.created.length>0?u({title:"Scan Complete",message:`Created ${G.created.length} PRD(s): ${G.created.join(", ")}`,type:"success"}):u({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),G.errors.length>0&&u({title:"Scan Errors",message:G.errors.join("; "),type:"warning"}),g()}catch(G){u({title:"Scan Failed",message:G instanceof Error?G.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(p)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:p.message}),s.jsx(ke,{onClick:()=>g(),children:"Retry"})]});if(!v)return null;if(v.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(Oe,{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(kh,{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 D=v.totalItems>0?Math.round(v.processedItems/v.totalItems*100):0,U=xy(v.status),O=py(v.items),k=v.lastScan?vy(v.lastScan):"Never",E=v.autoScanInterval?Math.round(v.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(Jt,{label:v.enabled?"Enabled":"Disabled",checked:v.enabled,onChange:y,disabled:x}),s.jsxs(ke,{onClick:M,loading:r,disabled:!v.enabled||v.status==="complete",children:[s.jsx(Zi,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(Oe,{className:`p-6 border-2 ${U.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(U.icon,{className:`h-8 w-8 ${U.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 ${U.textColor}`,children:U.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})]}),v.enabled&&v.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",E," min"]})]}),v.enabled&&v.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(Oe,{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:[v.processedItems," / ",v.totalItems," items (",D,"%)"]})]}),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 ${D===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${D}%`}})})]}),Object.entries(O).map(([G,q])=>s.jsxs(Oe,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:G}),s.jsx("div",{className:"space-y-2",children:q.map(te=>s.jsx(hy,{item:te},te.hash))})]},G))]})};function hy({item:u}){const c=u.checked,d=u.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${c?"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:[c?s.jsx(rb,{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(Sc,{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 ${c?"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:c?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 py(u){const c={};for(const d of u){const r=d.section||"General";c[r]||(c[r]=[]),c[r].push(d)}return c}function vy(u){try{const c=new Date(u),r=new Date().getTime()-c.getTime(),m=Math.floor(r/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 Ph=({tabs:u,activeTab:c,onChange:d,className:r=""})=>{var b,p;const[m,x]=be.useState((b=u[0])==null?void 0:b.id),f=c||m,v=g=>{d?d(g):x(g)};return s.jsxs("div",{className:`flex flex-col ${r}`,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:()=>v(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:(p=u.find(g=>g.id===f))==null?void 0:p.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"}],Lc=[{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 rn(u,c){return dn(u)===dn(c)}function gy(u){if(u)return Lc.find(c=>c.id===u)}function Wh(u,c,d,r,m,x){return rn(u.schedules.executor,c)&&rn(u.schedules.reviewer,d)&&rn(u.schedules.qa,r)&&rn(u.schedules.audit,m)&&rn(u.schedules.slicer,x)}function by(u,c,d,r,m){return Lc.find(x=>Wh(x,u,c,d,r,m))}function ms(u,c,d,r,m,x){const f=gy(u);return f&&Wh(f,c,d,r,m,x)?f:by(c,d,r,m,x)}function dh(u){const c=dn(u),d=c.split(/\s+/);if(d.length!==5)return c;const[r,m,x,f,v]=d,b=/^\d+$/.test(r),p=Qi.find(g=>dn(g.value)===c);if(p)return p.label;if(r==="*/30"&&m==="*")return"Every 30 minutes";if(r==="0"&&m==="*")return"Every hour";if(r.startsWith("*/"))return`Every ${parseInt(r.replace("*/",""),10)} minutes`;if(b&&m.startsWith("*/")&&x==="*"&&f==="*"&&v==="*"){const g=parseInt(m.replace("*/",""),10);return r==="0"?`Every ${g} hours`:`Every ${g} hours at :${r.padStart(2,"0")}`}if(r==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(r==="0"&&m.includes("-")){const[g,y]=m.split("-");return`Every hour from ${ds(g)} to ${ds(y)}`}if(b&&m.includes("-")&&x==="*"&&f==="*"&&v==="*"){const[g,y]=m.split("-");return`Every hour from ${fs(g,r)} to ${fs(y,r)}`}if(r==="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==="*"&&(v==="*"||v==="1-5")){const g=m.split(",").map(M=>fs(M,r)),y=v==="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 r==="0"&&m!=="*"&&x==="*"&&f==="*"&&v==="*"?`Daily at ${ds(m)}`:b&&m!=="*"&&x==="*"&&f==="*"&&v==="*"?`Daily at ${fs(m,r)}`:r==="0"&&m!=="*"&&x==="*"&&f==="*"&&v==="1-5"?`Weekdays at ${ds(m)}`:b&&m!=="*"&&x==="*"&&f==="*"&&v==="1-5"?`Weekdays at ${fs(m,r)}`:c}function ds(u){const c=parseInt(u,10);return c===0?"12 AM":c<12?`${c} AM`:c===12?"12 PM":`${c-12} PM`}function fs(u,c){const d=c.padStart(2,"0"),r=parseInt(u,10);return Number.isNaN(r)?`${u}:${d}`:r===0?`12:${d} AM`:r<12?`${r}:${d} AM`:r===12?`12:${d} PM`:`${r-12}:${d} PM`}function yy(u){const c=dn(u),d=Qi.find(r=>dn(r.value)===c);return(d==null?void 0:d.value)??"__custom__"}function jy(u){const c=new Date,d=u.getTime()-c.getTime(),r=Math.floor(d/6e4),m=Math.floor(r/60),x=Math.floor(m/24);return r<1?"less than a minute":r<60?`in ${r} minute${r>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${x} day${x>1?"s":""}`}function Sy(u){const c={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return u.toLocaleDateString("en-US",c)}function Ny(u){const c=new Date,d=u.getTime()-c.getTime(),r=Math.floor(d/6e4);return r>=0&&r<30}const Te=be.forwardRef(({className:u="",label:c,error:d,helperText:r,rightIcon:m,...x},f)=>{const v=be.useId(),b=x.id??v,p=d?`${b}-error`:void 0,g=!d&&r?`${b}-help`:void 0,y=[p,g].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[c&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:c}),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:p,className:"mt-1.5 text-xs text-red-400",children:d}):r?s.jsx("p",{id:g,className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});Te.displayName="Input";const wt=be.forwardRef(({className:u="",label:c,error:d,helperText:r,options:m,value:x,onChange:f,children:v,...b},p)=>{const g=be.useId(),y=b.id??g,M=d?`${y}-error`:void 0,D=!d&&r?`${y}-help`:void 0,U=[M,D].filter(Boolean).join(" ")||void 0,O=k=>{f&&f(k.target.value)};return s.jsxs("div",{className:"w-full",children:[c&&s.jsx("label",{htmlFor:y,className:"block text-sm font-medium text-slate-400 mb-1.5",children:c}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:p,id:y,"aria-describedby":U,"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)):v}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Hh,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:M,className:"mt-1.5 text-xs text-red-400",children:d}):r?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});wt.displayName="Select";const cn=({label:u,value:c,onChange:d,helperText:r,placeholder:m="5 */3 * * *"})=>{const x=yy(c),f=x==="__custom__",v=g=>{g!=="__custom__"&&d(g)},b=g=>{d(g.target.value)},p=Qi.find(g=>g.value===x);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(wt,{label:u,value:x,onChange:v,options:Qi.map(g=>({label:g.label,value:g.value})),helperText:f?void 0:(p==null?void 0:p.description)||r}),f&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Te,{label:"Cron Expression",value:c,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:c,selectedTemplateId:d,onFieldChange:r,onSwitchToTemplate:m,onSwitchToCustom:x,onApplyTemplate:f})=>s.jsxs(Oe,{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 ${c==="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 ${c==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:x,children:"Custom"})]})]}),c==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Lc.map(v=>{const b=d===v.id;return s.jsxs("button",{type:"button",onClick:()=>f(v),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:v.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:v.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",v.hints.executor],["Reviewer",v.hints.reviewer],["QA",v.hints.qa],["Audit",v.hints.audit],["Slicer",v.hints.slicer]].map(([p,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:p}),s.jsx("span",{className:"text-xs text-slate-400",children:g})]},p))})]},v.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(cn,{label:"PRD Execution Schedule",value:u.cronSchedule,onChange:v=>r("cronSchedule",v)}),s.jsx(cn,{label:"PR Review Schedule",value:u.reviewerSchedule,onChange:v=>r("reviewerSchedule",v)}),s.jsx(cn,{label:"QA Schedule",value:u.qa.schedule,onChange:v=>r("qa",{...u.qa,schedule:v})}),s.jsx(cn,{label:"Audit Schedule",value:u.audit.schedule,onChange:v=>r("audit",{...u.audit,schedule:v})}),u.roadmapScanner.enabled&&s.jsx(cn,{label:"Planner Schedule",value:u.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:v=>r("roadmapScanner",{...u.roadmapScanner,slicerSchedule:v})})]}),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:v=>r("schedulingPriority",Number(v)),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(Jt,{checked:u.globalQueueEnabled??!0,onChange:v=>r("globalQueueEnabled",v)})]})}),s.jsx(Te,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(u.cronScheduleOffset),onChange:v=>{const b=Math.min(59,Math.max(0,Number(v.target.value||0)));r("cronScheduleOffset",b)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),Ey=()=>{var B,$,P,ce,me,Ne,We,Ge,tl,C,W,de,Ce;const{addToast:u,selectedProjectId:c,globalModeLoading:d}=xt(),[r,m]=w.useState("overview"),[x,f]=w.useState(!1),[v,b]=w.useState(!1),[p,g]=w.useState(null),[y,M]=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:D,loading:U,error:O,refetch:k}=el(Zh,[c],{enabled:!d}),{data:E,loading:G,refetch:q}=el(Xh,[c],{enabled:!d});w.useEffect(()=>{const V=setInterval(()=>{k()},3e4);return()=>clearInterval(V)},[k]),w.useEffect(()=>{var V,ne,Ae,rt,pt,Ht;if(E&&!y.isDirty){const Al=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",((Ae=E.roadmapScanner)==null?void 0:Ae.slicerSchedule)||"35 */12 * * *");M({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:((rt=E.roadmapScanner)==null?void 0:rt.enabled)??!0,slicerSchedule:((pt=E.roadmapScanner)==null?void 0:pt.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:Al?"template":"custom",selectedTemplateId:(Al==null?void 0:Al.id)??"",isDirty:!1})}},[E,y.isDirty]);const te=()=>{q(),k()},Z=(V,ne)=>V instanceof Error?V.message:ne,J=async()=>{if(D){f(!0);try{D.paused?(await hs(),u({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Hb(),u({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),te()}catch(V){u({title:"Action Failed",message:Z(V,"Failed to toggle schedule state"),type:"error"})}finally{f(!1)}}},I=async(V,ne)=>{if(E){g(V);try{V==="executor"?await ta({executorEnabled:ne}):V==="reviewer"?await ta({reviewerEnabled:ne}):V==="qa"?await ta({qa:{...E.qa,enabled:ne}}):V==="audit"?await ta({audit:{...E.audit,enabled:ne}}):await ta({roadmapScanner:{...E.roadmapScanner,enabled:ne}});let Ae="";try{await hs()}catch(rt){Ae=Z(rt,"Failed to reinstall cron schedules")}te(),u(Ae?{title:"Job Saved (Cron Reinstall Failed)",message:Ae,type:"warning"}:{title:"Job Updated",message:`${V[0].toUpperCase()+V.slice(1)} ${ne?"enabled":"disabled"}.`,type:"success"})}catch(Ae){u({title:"Update Failed",message:Z(Ae,"Failed to update job configuration"),type:"error"})}finally{g(null)}}},ie=(V,ne)=>{M(Ae=>({...Ae,form:{...Ae.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 * * *");M(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}))},X=()=>{M(V=>({...V,scheduleMode:"custom",selectedTemplateId:"",form:{...V.form,scheduleBundleId:null},isDirty:!0}))},pe=V=>{M(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 ta({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=Z(ne,"Failed to reinstall cron schedules")}M(ne=>({...ne,isDirty:!1})),te(),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:Z(V,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},we=V=>{if(!V)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const ne=new Date(V),Ae=Ny(ne);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Ae&&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),")"]})]})]})},F=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(U||G)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||!D||!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(ke,{onClick:()=>{k(),q()},children:"Retry"})]});const Pe=D.paused,H=Pe?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",K=Pe?"Paused":"Active",ae=ms(E.scheduleBundleId,E.cronSchedule,E.reviewerSchedule,((B=E.qa)==null?void 0:B.schedule)||"45 2,14 * * *",(($=E.audit)==null?void 0:$.schedule)||"50 3 * * 1",((P=E.roadmapScanner)==null?void 0:P.slicerSchedule)||"35 */12 * * *"),Re=(V,ne,Ae)=>!ae||!rn(ae.schedules[V],ne)?dh(Ae):`${ae.label} - ${ae.hints[V]}`,De=[{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:D.executor.schedule,nextRun:D.executor.nextRun,delayInfo:D.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:D.reviewer.schedule,nextRun:D.reviewer.nextRun,delayInfo:D.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=D.qa)==null?void 0:me.schedule,nextRun:(Ne=D.qa)==null?void 0:Ne.nextRun,delayInfo:D.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(ih,{className:"h-4 w-4"}),enabled:((We=E==null?void 0:E.audit)==null?void 0:We.enabled)??!1,schedule:(Ge=D.audit)==null?void 0:Ge.schedule,nextRun:(tl=D.audit)==null?void 0:tl.nextRun,delayInfo:D.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(ih,{className:"h-4 w-4"}),enabled:((C=E==null?void 0:E.roadmapScanner)==null?void 0:C.enabled)??!1,schedule:((W=D.planner)==null?void 0:W.schedule)||((de=E.roadmapScanner)==null?void 0:de.slicerSchedule)||"35 */12 * * *",nextRun:(Ce=D.planner)==null?void 0:Ce.nextRun,delayInfo:D.planner}],N=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Oe,{className:`p-6 border-2 ${H}`,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(ke,{variant:Pe?"primary":"outline",size:"lg",onClick:J,loading:x,children:Pe?s.jsxs(s.Fragment,{children:[s.jsx(Zi,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Yh,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(Oe,{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:De.map(V=>{var ne,Ae,rt,pt,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(Jt,{checked:V.enabled,disabled:p!==null,"aria-label":`Toggle ${V.name.toLowerCase()} automation`,onChange:Al=>I(V.id,Al)})]}),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:Re(V.id==="planner"?"slicer":V.id,V.id==="qa"?((ne=E==null?void 0:E.qa)==null?void 0:ne.schedule)||"":V.id==="audit"?((Ae=E==null?void 0:E.audit)==null?void 0:Ae.schedule)||"":V.id==="planner"?((rt=E==null?void 0:E.roadmapScanner)==null?void 0:rt.slicerSchedule)||"35 */12 * * *":V.schedule,V.id==="qa"?((pt=E==null?void 0:E.qa)==null?void 0:pt.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)})]}),F(V.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),we(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(jc,{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:ie,onSwitchToTemplate:ue,onSwitchToCustom:X,onApplyTemplate:pe}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(ke,{variant:"ghost",onClick:()=>{var V,ne,Ae,rt,pt,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",((Ae=E.roadmapScanner)==null?void 0:Ae.slicerSchedule)||"35 */12 * * *");M({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:((rt=E.roadmapScanner)==null?void 0:rt.enabled)??!0,slicerSchedule:((pt=E.roadmapScanner)==null?void 0:pt.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(ke,{onClick:ye,loading:v,disabled:!y.isDirty,children:[s.jsx(jc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(Oe,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Oc,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),D.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:D.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 ",D.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(Ph,{tabs:N,activeTab:r,onChange:m})]})},fh=({presetId:u,preset:c,isBuiltIn:d,onEdit:r,onDelete:m,onReset:x})=>{var p,g,y;const f=c.envVars?Object.keys(c.envVars).length:0,b=(u.startsWith("glm-")||((p=c.model)==null?void 0:p.startsWith("glm-")))&&!((y=(g=c.envVars)==null?void 0:g.ANTHROPIC_API_KEY)!=null&&y.trim());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:c.name}),d&&s.jsx(on,{variant:"info",className:"text-[10px]",children:"Built-in"}),b&&s.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] bg-amber-900/40 text-amber-400 border border-amber-800/50",title:"GLM presets require ANTHROPIC_API_KEY in env vars",children:[s.jsx(Ki,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:r,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${c.name} preset`,title:"Edit preset",children:s.jsx(Uc,{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 ${c.name} to defaults`,title:"Reset to defaults",children:s.jsx(Gh,{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 ${c.name} preset`,title:"Delete preset",children:s.jsx(qc,{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:[c.command,c.subcommand&&` ${c.subcommand}`]})]}),c.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:c.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:c,title:d,children:r})=>(w.useEffect(()=>{const m=x=>{x.key==="Escape"&&c()};return u&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[u,c]),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:c,"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:c,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:r})]})]}),document.body):null),Cy=u=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>u.toUpperCase().includes(d)),Ty=({value:u,isSensitive:c})=>{const[d,r]=be.useState(!1);return c?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:()=>r(!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:c,compact:d=!1})=>{const[r,m]=be.useState(""),[x,f]=be.useState(""),[v,b]=be.useState(null),[p,g]=be.useState(""),y=()=>{if(r.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(r)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}c({...u,[r]:x}),m(""),f("")}},M=E=>{const G={...u};delete G[E],c(G)},D=E=>{b(E),g(u[E]??"")},U=()=>{v&&(c({...u,[v]:p}),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,G])=>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}),v===E?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:p,onChange:q=>g(q.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:U,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${E} value`,title:`Save ${E} value`,children:s.jsx(jc,{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:G,isSensitive:Cy(E)})]}),v!==E&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>D(E),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${E}`,title:`Edit ${E}`,children:s.jsx(Uc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>M(E),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${E}`,title:`Delete ${E}`,children:s.jsx(qc,{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:r,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(ke,{onClick:y,disabled:!r.trim(),size:d?"sm":"md",children:[s.jsx(hn,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Ry(u,c){var d;return!!(u!=null&&u.startsWith("glm-")||(d=c==null?void 0:c.model)!=null&&d.startsWith("glm-"))}function Ay(u,c){var d,r;return Ry(u,c)?!((r=(d=c==null?void 0:c.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&r.trim()):!1}const mh={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:""}},My=({isOpen:u,onClose:c,onSave:d,presetId:r,preset:m,isBuiltIn:x,existingIds:f})=>{const[v,b]=be.useState(""),[p,g]=be.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[y,M]=be.useState(!1),[D,U]=be.useState("custom"),[O,k]=be.useState(null),E=Ay(r??v,p);be.useEffect(()=>{u&&(r&&m?(b(r),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??{}}),r==="claude"||m.command==="claude"?U("claude"):r==="codex"||m.command==="codex"?U("codex"):U("custom")):(b(""),g({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),U("custom")),k(null),M(!!(m!=null&&m.envVars&&Object.keys(m.envVars).length>0)))},[u,r,m]);const G=J=>{if(U(J),J!=="custom"&&mh[J]){const I=mh[J];g(ie=>({...ie,...I,envVars:ie.envVars})),!r&&!v&&b(J)}},q=(J,I)=>{g(ie=>({...ie,[J]:I})),k(null)},te=()=>{if(!p.name.trim())return k("Name is required"),!1;if(!p.command.trim())return k("Command is required"),!1;if(!r){if(!v.trim())return k("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(v))return k("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(f.includes(v))return k("A preset with this ID already exists"),!1}return!0},Z=()=>{var I,ie,ue,X,pe,ye;if(!te())return;const J={name:p.name.trim(),command:p.command.trim()};(I=p.subcommand)!=null&&I.trim()&&(J.subcommand=p.subcommand.trim()),(ie=p.promptFlag)!=null&&ie.trim()&&(J.promptFlag=p.promptFlag.trim()),(ue=p.autoApproveFlag)!=null&&ue.trim()&&(J.autoApproveFlag=p.autoApproveFlag.trim()),(X=p.workdirFlag)!=null&&X.trim()&&(J.workdirFlag=p.workdirFlag.trim()),(pe=p.modelFlag)!=null&&pe.trim()&&(J.modelFlag=p.modelFlag.trim()),(ye=p.model)!=null&&ye.trim()&&(J.model=p.model.trim()),p.envVars&&Object.keys(p.envVars).length>0&&(J.envVars=p.envVars),d(r||v,J),c()};return s.jsx(wy,{isOpen:u,onClose:c,title:r?`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}),E&&s.jsx("div",{className:"p-3 rounded-md bg-amber-500/10 border border-amber-500/20 text-amber-300 text-sm",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Ki,{className:"h-4 w-4 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"GLM presets require `ANTHROPIC_API_KEY`."}),s.jsx("div",{className:"text-amber-200/80",children:"Add `ANTHROPIC_API_KEY` in Environment Variables before using this preset."})]})]})}),!x&&s.jsx("div",{children:s.jsx(wt,{label:"Template",value:D,onChange:G,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"})}),!r&&s.jsx(Te,{label:"Preset ID",value:v,onChange:J=>b(J.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(Te,{label:"Display Name",value:p.name,onChange:J=>q("name",J.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Te,{label:"Command",value:p.command,onChange:J=>q("command",J.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(Te,{label:"Model",value:p.model??"",onChange:J=>q("model",J.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Te,{label:"Model Flag",value:p.modelFlag??"",onChange:J=>q("modelFlag",J.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:()=>M(!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(Hh,{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(Te,{label:"Subcommand",value:p.subcommand??"",onChange:J=>q("subcommand",J.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Te,{label:"Prompt Flag",value:p.promptFlag??"",onChange:J=>q("promptFlag",J.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(Te,{label:"Auto-Approve Flag",value:p.autoApproveFlag??"",onChange:J=>q("autoApproveFlag",J.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Te,{label:"Workdir Flag",value:p.workdirFlag??"",onChange:J=>q("workdirFlag",J.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:p.envVars??{},onChange:J=>q("envVars",J),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(ke,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(ke,{onClick:Z,children:r?"Save Changes":"Add Preset"})]})]})})},Li=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],vc=u=>{var c,d,r,m,x,f,v;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:((c=u.roadmapScanner)==null?void 0:c.enabled)??!0,roadmapPath:((d=u.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((r=u.roadmapScanner)==null?void 0:r.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:((v=u.roadmapScanner)==null?void 0:v.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",primaryFallbackPreset:u.primaryFallbackPreset??"",secondaryFallbackPreset:u.secondaryFallbackPreset??"",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}}}},hh=u=>{const c=ms(u.scheduleBundleId,u.cronSchedule,u.reviewerSchedule,u.qa.schedule,u.audit.schedule,u.roadmapScanner.slicerSchedule??"35 */12 * * *");return c?{mode:"template",selectedTemplateId:c.id}:{mode:"custom",selectedTemplateId:""}},_y=({notifications:u,onChange:c})=>{const[d,r]=be.useState(null),[m,x]=be.useState(!1),[f,v]=be.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"}],p=()=>{c({webhooks:[...u.webhooks,f]}),v({type:"slack",url:"",events:[]}),x(!1)},g=(U,O)=>{const k=[...u.webhooks];k[U]=O,c({webhooks:k})},y=U=>{c({webhooks:u.webhooks.filter((O,k)=>k!==U)})},M=(U,O)=>U.includes(O)?U.filter(k=>k!==O):[...U,O],D=({webhook:U,onChange:O,onSave:k,onCancel:E,isNew:G})=>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:U.type,onChange:q=>{const te=q;O(te==="telegram"?{type:te,botToken:"",chatId:"",events:U.events}:{type:te,url:"",events:U.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),U.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(Te,{label:"Bot Token",type:"password",value:U.botToken||"",onChange:q=>O({...U,botToken:q.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Te,{label:"Chat ID",value:U.chatId||"",onChange:q=>O({...U,chatId:q.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Te,{label:"Webhook URL",type:"password",value:U.url||"",onChange:q=>O({...U,url:q.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(q=>s.jsx("button",{type:"button",onClick:()=>O({...U,events:M(U.events,q.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${U.events.includes(q.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:q.label},q.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(ke,{variant:"ghost",onClick:E,children:"Cancel"}),s.jsx(ke,{onClick:k,disabled:U.events.length===0||(U.type==="telegram"?!U.botToken||!U.chatId:!U.url),children:G?"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((U,O)=>s.jsx("div",{children:d===O?s.jsx(D,{webhook:U,onChange:k=>g(O,k),onSave:()=>r(null),onCancel:()=>r(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:U.type}),U.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",U.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:U.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:()=>r(O),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${U.type} webhook`,title:`Edit ${U.type} webhook`,children:s.jsx(Uc,{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 ${U.type} webhook`,title:`Delete ${U.type} webhook`,children:s.jsx(qc,{className:"h-4 w-4"})})]})]})},O))}),m?s.jsx(D,{webhook:f,onChange:v,onSave:p,onCancel:()=>x(!1),isNew:!0}):s.jsxs(ke,{variant:"ghost",onClick:()=>x(!0),children:[s.jsx(hn,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},gc=({label:u,value:c,onChange:d,placeholder:r,helpText:m})=>{const[x,f]=be.useState(""),v=()=>{x.trim()&&!c.includes(x.trim())&&(d([...c,x.trim()]),f(""))},b=g=>{d(c.filter(y=>y!==g))},p=g=>{g.key==="Enter"&&(g.preventDefault(),v())};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:c.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:p,placeholder:r,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(ke,{onClick:v,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})]})},Dy=()=>{const{addToast:u,projectName:c,selectedProjectId:d,globalModeLoading:r}=xt(),[m,x]=be.useState(!1),[f,v]=be.useState(null),b=be.useRef(!1),[p,g]=be.useState("template"),[y,M]=be.useState("always-on"),[D,U]=be.useState(!1),[O,k]=be.useState(null),[E,G]=be.useState(null),[q,te]=be.useState(null),{data:Z,loading:J,error:I,refetch:ie}=el(Xh,[d],{enabled:!r}),{data:ue,loading:X,refetch:pe}=el(Ub,[d],{enabled:!r}),ye=ue??[],we=be.useCallback(C=>{const W=hh(C);g(W.mode),M(W.selectedTemplateId)},[]);be.useEffect(()=>{if(Z)if(b.current)b.current=!1;else{const C=vc(Z);v(C),we(C)}},[Z,we]);const F=(C,W)=>{v(de=>de&&{...de,[C]:W})},Pe=()=>{if(g("template"),!f)return;const C=hh(f);C.mode==="template"&&(M(C.selectedTemplateId),F("scheduleBundleId",C.selectedTemplateId))},H=()=>{g("custom"),F("scheduleBundleId",null),M("")},K=C=>{M(C.id),v(W=>W&&{...W,cronSchedule:C.schedules.executor,reviewerSchedule:C.schedules.reviewer,scheduleBundleId:C.id,qa:{...W.qa,schedule:C.schedules.qa},audit:{...W.audit,schedule:C.schedules.audit},roadmapScanner:{...W.roadmapScanner,slicerSchedule:C.schedules.slicer},fallbackOnRateLimit:!0})},ae=async()=>{var de,Ce,V;if(!f)return;const C=f.cronSchedule!==(Z==null?void 0:Z.cronSchedule)||f.reviewerSchedule!==(Z==null?void 0:Z.reviewerSchedule)||f.cronScheduleOffset!==((Z==null?void 0:Z.cronScheduleOffset)??0)||f.schedulingPriority!==((Z==null?void 0:Z.schedulingPriority)??3)||f.executorEnabled!==((Z==null?void 0:Z.executorEnabled)??!0)||f.reviewerEnabled!==((Z==null?void 0:Z.reviewerEnabled)??!0)||f.queue.enabled!==(((de=Z==null?void 0:Z.queue)==null?void 0:de.enabled)??!0)||f.qa.enabled!==((Z==null?void 0:Z.qa.enabled)??!0)||f.qa.schedule!==(Z==null?void 0:Z.qa.schedule)||f.audit.enabled!==((Z==null?void 0:Z.audit.enabled)??!0)||f.audit.schedule!==(Z==null?void 0:Z.audit.schedule)||f.roadmapScanner.enabled!==(((Ce=Z==null?void 0:Z.roadmapScanner)==null?void 0:Ce.enabled)??!0)||(f.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((V=Z==null?void 0:Z.roadmapScanner)==null?void 0:V.slicerSchedule)||"35 */12 * * *"),W={};for(const[ne,Ae]of Object.entries(f.jobProviders))Ae!=null&&Ae!==""&&(W[ne]=Ae);x(!0);try{const ne=await ta({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:p==="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:W,autoMerge:f.autoMerge,autoMergeMethod:f.autoMergeMethod,fallbackOnRateLimit:f.fallbackOnRateLimit,primaryFallbackModel:f.primaryFallbackModel,secondaryFallbackModel:f.secondaryFallbackModel,primaryFallbackPreset:f.primaryFallbackPreset||void 0,secondaryFallbackPreset:f.secondaryFallbackPreset||void 0,claudeModel:f.primaryFallbackModel,qa:f.qa,audit:f.audit,queue:f.queue}),Ae=vc(ne);v(Ae),we(Ae);let rt="";if(C)try{await hs()}catch(pt){rt=pt instanceof Error?pt.message:"failed to reinstall cron schedules"}u(rt?{title:"Settings Saved (Cron Reinstall Failed)",message:rt,type:"warning"}:{title:"Settings Saved",message:C?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),b.current=!0,ie(),pe()}catch(ne){u({title:"Save Failed",message:ne instanceof Error?ne.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},Re=()=>{if(Z){const C=vc(Z);v(C),we(C),u({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},De=async C=>{try{const W=await Jh(C);F("roadmapScanner",W.roadmapScanner);let de="";try{await hs()}catch(Ce){de=Ce instanceof Error?Ce.message:"Failed to reinstall cron schedules"}u(de?{title:"Planner Saved (Cron Reinstall Failed)",message:de,type:"warning"}:{title:C?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${C?"enabled":"disabled"}.`,type:"success"})}catch(W){u({title:"Toggle Failed",message:W instanceof Error?W.message:"Failed to toggle roadmap scanner",type:"error"})}},N=C=>({claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}})[C]??null,B=()=>({...{claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}},...f==null?void 0:f.providerPresets}),$=C=>{const W=B();return Object.entries(W).map(([de,Ce])=>({label:Ce.name,value:de}))},P=(C,W)=>{const de=[];W.provider===C&&de.push("Global Provider");const Ce={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner"};for(const[V,ne]of Object.entries(W.jobProviders))ne===C&&de.push(Ce[V]??V);return de},ce=C=>{const de=B()[C];de&&(k(C),G(de),U(!0))},me=async(C,W)=>{if(!f)return;const de=!O,Ce={...f.providerPresets,[C]:W};F("providerPresets",Ce);try{await ta({providerPresets:{[C]:W}}),u({title:de?"Preset Added":"Preset Updated",message:de?`${W.name} has been added. You can now assign it to jobs.`:`${W.name} has been saved.`,type:"success"})}catch(V){u({title:"Save Failed",message:V instanceof Error?V.message:"Failed to save preset",type:"error"}),F("providerPresets",f.providerPresets)}},Ne=C=>{var Ce,V;if(!f)return;if(Li.includes(C)){u({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const W=P(C,f);if(W.length>0){te({presetId:C,presetName:((Ce=B()[C])==null?void 0:Ce.name)??C,references:W});return}const de={...f.providerPresets};delete de[C],F("providerPresets",de),u({title:"Preset Deleted",message:`${((V=B()[C])==null?void 0:V.name)??C} has been removed.`,type:"success"})},We=C=>{if(!f)return;const W={...f.providerPresets};delete W[C],F("providerPresets",W),u({title:"Preset Reset",message:`${C} has been reset to built-in defaults.`,type:"success"})},Ge=()=>{if(!q||!f)return;const{presetId:C}=q,W={...f.providerPresets};delete W[C],F("providerPresets",W);const de={...f.jobProviders};for(const Ce of Object.keys(de))de[Ce]===C&&delete de[Ce];F("jobProviders",de),f.provider===C&&F("provider","claude"),te(null),u({title:"Preset Deleted",message:`${q.presetName} has been removed and all references cleared.`,type:"success"})};if(J||!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(I)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:I.message}),s.jsx(ke,{onClick:()=>ie(),children:"Retry"})]});const tl=[{id:"general",label:"General",content:s.jsx(Oe,{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(Te,{label:"Project Name",value:c,disabled:!0}),s.jsx(Te,{label:"Default Branch",value:f.defaultBranch,onChange:C=>F("defaultBranch",C.target.value)}),s.jsx(Te,{label:"PRD Directory",value:f.prdDir,onChange:C=>F("prdDir",C.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Te,{label:"Branch Prefix",value:f.branchPrefix,onChange:C=>F("branchPrefix",C.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Jt,{label:"Enable PRD Executor",checked:f.executorEnabled,onChange:C=>F("executorEnabled",C)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Jt,{label:"Enable Automated Reviews",checked:f.reviewerEnabled,onChange:C=>F("reviewerEnabled",C)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Jt,{label:"Auto-merge approved PRs",checked:f.autoMerge,onChange:C=>F("autoMerge",C)})}),f.autoMerge&&s.jsx(wt,{label:"Merge Method",value:f.autoMergeMethod,onChange:C=>F("autoMergeMethod",C),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(gc,{label:"Branch Patterns",value:f.branchPatterns,onChange:C=>F("branchPatterns",C),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(Oe,{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(ke,{onClick:()=>{k(null),G(null),U(!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:[Li.map(C=>{const de=f.providerPresets[C]||N(C);return de?s.jsx(fh,{presetId:C,preset:de,isBuiltIn:!0,onEdit:()=>ce(C),onReset:()=>We(C)},C):null}),Object.entries(f.providerPresets).filter(([C])=>!Li.includes(C)).map(([C,W])=>s.jsx(fh,{presetId:C,preset:W,isBuiltIn:!1,onEdit:()=>ce(C),onDelete:()=>Ne(C)},C))]})]}),s.jsxs(Oe,{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:C=>F("provider",C),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:C,label:W})=>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:W}),s.jsx("div",{className:"w-64",children:s.jsx(wt,{value:f.jobProviders[C]??"",onChange:de=>{const Ce={...f.jobProviders};de===""?delete Ce[C]:Ce[C]=de,F("jobProviders",Ce)},options:[{label:"Use Global (default)",value:""},...$(f.providerPresets)]})})]},C))]})]}),s.jsxs(Oe,{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:"Preset to use when the active provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(wt,{label:"Primary Fallback Preset",value:f.primaryFallbackPreset,onChange:C=>F("primaryFallbackPreset",C),options:[{label:"— None —",value:""},...Object.entries(B()).map(([C,W])=>({label:W.name,value:C}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(wt,{label:"Secondary Fallback Preset",value:f.secondaryFallbackPreset,onChange:C=>F("secondaryFallbackPreset",C),options:[{label:"— None —",value:""},...Object.entries(B()).map(([C,W])=>({label:W.name,value:C}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(Oe,{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:C=>F("providerEnv",C)})]})]})},{id:"runtime",label:"Runtime",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Oe,{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:C=>F("minReviewScore",Number(C.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(Te,{label:"Max Runtime (Executor)",type:"number",value:String(f.maxRuntime),onChange:C=>F("maxRuntime",Number(C.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Te,{label:"Max Runtime (Reviewer)",type:"number",value:String(f.reviewerMaxRuntime),onChange:C=>F("reviewerMaxRuntime",Number(C.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Te,{label:"Max Log Size",type:"number",value:String(f.maxLogSize),onChange:C=>F("maxLogSize",Number(C.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(Oe,{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(Te,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(f.reviewerMaxRetries),onChange:C=>{const W=Math.min(10,Math.max(0,Number(C.target.value||0)));F("reviewerMaxRetries",W)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(Te,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(f.reviewerRetryDelay),onChange:C=>{const W=Math.min(300,Math.max(0,Number(C.target.value||0)));F("reviewerRetryDelay",W)},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:p,selectedTemplateId:y,onFieldChange:(C,W)=>{C==="globalQueueEnabled"?F("queue",{...f.queue,enabled:W}):F(C,W)},onSwitchToTemplate:Pe,onSwitchToCustom:H,onApplyTemplate:K})},{id:"notifications",label:"Notifications",content:s.jsxs(Oe,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(_y,{notifications:f.notifications,onChange:C=>F("notifications",C)})]})},{id:"roadmap",label:"Planner",content:s.jsxs(Oe,{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(Jt,{checked:f.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:De})]}),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(Te,{label:"Roadmap File Path",value:f.roadmapScanner.roadmapPath,onChange:C=>F("roadmapScanner",{...f.roadmapScanner,roadmapPath:C.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(cn,{label:"Planner Schedule",value:f.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:C=>F("roadmapScanner",{...f.roadmapScanner,slicerSchedule:C})})]}),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(Te,{label:"Planner Max Runtime",type:"number",value:String(f.roadmapScanner.slicerMaxRuntime||""),onChange:C=>F("roadmapScanner",{...f.roadmapScanner,slicerMaxRuntime:Number(C.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:C=>F("roadmapScanner",{...f.roadmapScanner,priorityMode:C==="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:C=>F("roadmapScanner",{...f.roadmapScanner,issueColumn:C==="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(Oe,{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(Jt,{checked:f.boardProvider.enabled,onChange:C=>F("boardProvider",{...f.boardProvider,enabled:C})})]}),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:C=>F("boardProvider",{...f.boardProvider,provider:C}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),f.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Te,{label:"Project Number",type:"number",value:String(f.boardProvider.projectNumber||""),onChange:C=>F("boardProvider",{...f.boardProvider,projectNumber:C.target.value?Number(C.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Te,{label:"Repository",value:f.boardProvider.repo||"",onChange:C=>F("boardProvider",{...f.boardProvider,repo:C.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(Oe,{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(Jt,{checked:f.qa.enabled,onChange:C=>F("qa",{...f.qa,enabled:C})})]}),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(Te,{label:"Max Runtime",type:"number",value:String(f.qa.maxRuntime),onChange:C=>F("qa",{...f.qa,maxRuntime:Number(C.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:C=>F("qa",{...f.qa,artifacts:C}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(Te,{label:"Skip Label",value:f.qa.skipLabel,onChange:C=>F("qa",{...f.qa,skipLabel:C.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(gc,{label:"QA Branch Patterns",value:f.qa.branchPatterns,onChange:C=>F("qa",{...f.qa,branchPatterns:C}),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(Jt,{checked:f.qa.autoInstallPlaywright,onChange:C=>F("qa",{...f.qa,autoInstallPlaywright:C})})]})]})]})]})},{id:"audit",label:"Audit",content:s.jsxs(Oe,{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(Jt,{checked:f.audit.enabled,onChange:C=>F("audit",{...f.audit,enabled:C})})]}),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(Te,{label:"Max Runtime",type:"number",value:String(f.audit.maxRuntime),onChange:C=>F("audit",{...f.audit,maxRuntime:Number(C.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(Oe,{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(Te,{label:"Templates Directory",value:f.templatesDir,onChange:C=>F("templatesDir",C.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Te,{label:"Max Retries",type:"number",min:"1",value:String(f.maxRetries),onChange:C=>{const W=Math.max(1,Number(C.target.value||1));F("maxRetries",W)},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(gc,{label:"PRD Priority",value:f.prdPriority,onChange:C=>F("prdPriority",C),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(Ph,{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(ke,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:Re,children:[s.jsx(Gh,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(ke,{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(qh,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),s.jsx(Oe,{className:"divide-y divide-slate-800",children:X?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):ye.map((C,W)=>{const de=C.status==="pass",Ce=C.status==="warn",V=de?"bg-green-500/10 text-green-400 border-green-500/20":Ce?"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:C.name}),s.jsx("p",{className:"text-xs text-slate-500",children:C.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${V}`,children:C.status.toUpperCase()})]},`${C.name}-${W}`)})})]}),s.jsx(My,{isOpen:D,onClose:()=>{U(!1),k(null),G(null)},onSave:me,presetId:O,preset:E,isBuiltIn:O?Li.includes(O):!1,existingIds:Object.keys(B())}),q&&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:()=>te(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(Ki,{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:q.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:q.references.map(C=>s.jsx("li",{children:C},C))}),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(ke,{variant:"ghost",onClick:()=>te(null),children:"Cancel"}),s.jsx(ke,{variant:"secondary",onClick:Ge,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},zy=()=>(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(Pb,{}),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(Mv,{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(Dy,{})}),s.jsx(wl,{path:"*",element:s.jsx(Rv,{to:"/",replace:!0})})]})})})]}),s.jsx(Ib,{})]})})),t0=document.getElementById("root");if(!t0)throw new Error("Could not find root element to mount to");const Oy=Dp.createRoot(t0);Oy.render(s.jsx(be.StrictMode,{children:s.jsx(zy,{})}));