@jonit-dev/night-watch-cli 1.7.91 → 1.7.94
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.
- package/dist/cli.js +52 -33
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +11 -0
- package/dist/commands/run.js.map +1 -1
- package/dist/web/assets/index-Bvh8XI8_.js +370 -0
- package/dist/web/assets/index-IKrZymWk.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
|
@@ -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 Tc(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var cc={exports:{}},ds={};/**
|
|
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 Qm;function Rp(){if(Qm)return ds;Qm=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 ds.Fragment=c,ds.jsx=d,ds.jsxs=d,ds}var Vm;function Ap(){return Vm||(Vm=1,cc.exports=Rp()),cc.exports}var s=Ap(),oc={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 Xm;function Mp(){if(Xm)return fe;Xm=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"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),T=Symbol.iterator;function z(N){return N===null||typeof N!="object"?null:(N=T&&N[T]||N["@@iterator"],typeof N=="function"?N:null)}var q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,k={};function Q(N,B,J){this.props=N,this.context=B,this.refs=k,this.updater=J||q}Q.prototype.isReactComponent={},Q.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")},Q.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function L(){}L.prototype=Q.prototype;function S(N,B,J){this.props=N,this.context=B,this.refs=k,this.updater=J||q}var le=S.prototype=new L;le.constructor=S,A(le,Q.prototype),le.isPureReactComponent=!0;var X=Array.isArray;function F(){}var P={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function ve(N,B,J){var I=J.ref;return{$$typeof:u,type:N,key:B,ref:I!==void 0?I:null,props:J}}function K(N,B){return ve(N.type,B,N.props)}function De(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function ie(N){var B={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(J){return B[J]})}var me=/\/+/g;function $(N,B){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):B.toString(36)}function Ye(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(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 U(N,B,J,I,ce){var he=typeof N;(he==="undefined"||he==="boolean")&&(N=null);var Ne=!1;if(N===null)Ne=!0;else switch(he){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(N.$$typeof){case u:case c:Ne=!0;break;case y:return Ne=N._init,U(Ne(N._payload),B,J,I,ce)}}if(Ne)return ce=ce(N),Ne=I===""?"."+$(N,0):I,X(ce)?(J="",Ne!=null&&(J=Ne.replace(me,"$&/")+"/"),U(ce,B,J,"",function(tl){return tl})):ce!=null&&(De(ce)&&(ce=K(ce,J+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(me,"$&/")+"/")+Ne)),B.push(ce)),1;Ne=0;var tt=I===""?".":I+":";if(X(N))for(var Ge=0;Ge<N.length;Ge++)I=N[Ge],he=tt+$(I,Ge),Ne+=U(I,B,J,he,ce);else if(Ge=z(N),typeof Ge=="function")for(N=Ge.call(N),Ge=0;!(I=N.next()).done;)I=I.value,he=tt+$(I,Ge++),Ne+=U(I,B,J,he,ce);else if(he==="object"){if(typeof N.then=="function")return U(Ye(N),B,J,I,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 Z(N,B,J){if(N==null)return N;var I=[],ce=0;return U(N,I,"","",function(he){return B.call(J,he,ce++)}),I}function ae(N){if(N._status===-1){var B=N._result;B=B(),B.then(function(J){(N._status===0||N._status===-1)&&(N._status=1,N._result=J)},function(J){(N._status===0||N._status===-1)&&(N._status=2,N._result=J)}),N._status===-1&&(N._status=0,N._result=B)}if(N._status===1)return N._result.default;throw N._result}var Ce=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var 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)},Me={map:Z,forEach:function(N,B,J){Z(N,function(){B.apply(this,arguments)},J)},count:function(N){var B=0;return Z(N,function(){B++}),B},toArray:function(N){return Z(N,function(B){return B})||[]},only:function(N){if(!De(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return fe.Activity=b,fe.Children=Me,fe.Component=Q,fe.Fragment=d,fe.Profiler=m,fe.PureComponent=S,fe.StrictMode=r,fe.Suspense=g,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,fe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return P.H.useMemoCache(N)}},fe.cache=function(N){return function(){return N.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(N,B,J){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var I=A({},N.props),ce=N.key;if(B!=null)for(he in B.key!==void 0&&(ce=""+B.key),B)!ue.call(B,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&B.ref===void 0||(I[he]=B[he]);var he=arguments.length-2;if(he===1)I.children=J;else if(1<he){for(var Ne=Array(he),tt=0;tt<he;tt++)Ne[tt]=arguments[tt+2];I.children=Ne}return ve(N.type,ce,I)},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,J){var I,ce={},he=null;if(B!=null)for(I in B.key!==void 0&&(he=""+B.key),B)ue.call(B,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ce[I]=B[I]);var Ne=arguments.length-2;if(Ne===1)ce.children=J;else if(1<Ne){for(var tt=Array(Ne),Ge=0;Ge<Ne;Ge++)tt[Ge]=arguments[Ge+2];ce.children=tt}if(N&&N.defaultProps)for(I in Ne=N.defaultProps,Ne)ce[I]===void 0&&(ce[I]=Ne[I]);return ve(N,he,ce)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(N){return{$$typeof:v,render:N}},fe.isValidElement=De,fe.lazy=function(N){return{$$typeof:y,_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=P.T,J={};P.T=J;try{var I=N(),ce=P.S;ce!==null&&ce(J,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(F,Ce)}catch(he){Ce(he)}finally{B!==null&&J.types!==null&&(B.types=J.types),P.T=B}},fe.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},fe.use=function(N){return P.H.use(N)},fe.useActionState=function(N,B,J){return P.H.useActionState(N,B,J)},fe.useCallback=function(N,B){return P.H.useCallback(N,B)},fe.useContext=function(N){return P.H.useContext(N)},fe.useDebugValue=function(){},fe.useDeferredValue=function(N,B){return P.H.useDeferredValue(N,B)},fe.useEffect=function(N,B){return P.H.useEffect(N,B)},fe.useEffectEvent=function(N){return P.H.useEffectEvent(N)},fe.useId=function(){return P.H.useId()},fe.useImperativeHandle=function(N,B,J){return P.H.useImperativeHandle(N,B,J)},fe.useInsertionEffect=function(N,B){return P.H.useInsertionEffect(N,B)},fe.useLayoutEffect=function(N,B){return P.H.useLayoutEffect(N,B)},fe.useMemo=function(N,B){return P.H.useMemo(N,B)},fe.useOptimistic=function(N,B){return P.H.useOptimistic(N,B)},fe.useReducer=function(N,B,J){return P.H.useReducer(N,B,J)},fe.useRef=function(N){return P.H.useRef(N)},fe.useState=function(N){return P.H.useState(N)},fe.useSyncExternalStore=function(N,B,J){return P.H.useSyncExternalStore(N,B,J)},fe.useTransition=function(){return P.H.useTransition()},fe.version="19.2.4",fe}var Zm;function Cc(){return Zm||(Zm=1,oc.exports=Mp()),oc.exports}var w=Cc();const ye=Tc(w);var dc={exports:{}},fs={},fc={exports:{}},mc={};/**
|
|
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 $m;function _p(){return $m||($m=1,(function(u){function c(U,Z){var ae=U.length;U.push(Z);e:for(;0<ae;){var Ce=ae-1>>>1,Me=U[Ce];if(0<m(Me,Z))U[Ce]=Z,U[ae]=Me,ae=Ce;else break e}}function d(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var Z=U[0],ae=U.pop();if(ae!==Z){U[0]=ae;e:for(var Ce=0,Me=U.length,N=Me>>>1;Ce<N;){var B=2*(Ce+1)-1,J=U[B],I=B+1,ce=U[I];if(0>m(J,ae))I<Me&&0>m(ce,J)?(U[Ce]=ce,U[I]=ae,Ce=I):(U[Ce]=J,U[B]=ae,Ce=B);else if(I<Me&&0>m(ce,ae))U[Ce]=ce,U[I]=ae,Ce=I;else break e}}return Z}function m(U,Z){var ae=U.sortIndex-Z.sortIndex;return ae!==0?ae:U.id-Z.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 g=[],p=[],y=1,b=null,T=3,z=!1,q=!1,A=!1,k=!1,Q=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function le(U){for(var Z=d(p);Z!==null;){if(Z.callback===null)r(p);else if(Z.startTime<=U)r(p),Z.sortIndex=Z.expirationTime,c(g,Z);else break;Z=d(p)}}function X(U){if(A=!1,le(U),!q)if(d(g)!==null)q=!0,F||(F=!0,ie());else{var Z=d(p);Z!==null&&Ye(X,Z.startTime-U)}}var F=!1,P=-1,ue=5,ve=-1;function K(){return k?!0:!(u.unstable_now()-ve<ue)}function De(){if(k=!1,F){var U=u.unstable_now();ve=U;var Z=!0;try{e:{q=!1,A&&(A=!1,L(P),P=-1),z=!0;var ae=T;try{t:{for(le(U),b=d(g);b!==null&&!(b.expirationTime>U&&K());){var Ce=b.callback;if(typeof Ce=="function"){b.callback=null,T=b.priorityLevel;var Me=Ce(b.expirationTime<=U);if(U=u.unstable_now(),typeof Me=="function"){b.callback=Me,le(U),Z=!0;break t}b===d(g)&&r(g),le(U)}else r(g);b=d(g)}if(b!==null)Z=!0;else{var N=d(p);N!==null&&Ye(X,N.startTime-U),Z=!1}}break e}finally{b=null,T=ae,z=!1}Z=void 0}}finally{Z?ie():F=!1}}}var ie;if(typeof S=="function")ie=function(){S(De)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,$=me.port2;me.port1.onmessage=De,ie=function(){$.postMessage(null)}}else ie=function(){Q(De,0)};function Ye(U,Z){P=Q(function(){U(u.unstable_now())},Z)}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(U){U.callback=null},u.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<U?Math.floor(1e3/U):5},u.unstable_getCurrentPriorityLevel=function(){return T},u.unstable_next=function(U){switch(T){case 1:case 2:case 3:var Z=3;break;default:Z=T}var ae=T;T=Z;try{return U()}finally{T=ae}},u.unstable_requestPaint=function(){k=!0},u.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ae=T;T=U;try{return Z()}finally{T=ae}},u.unstable_scheduleCallback=function(U,Z,ae){var Ce=u.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Ce+ae:Ce):ae=Ce,U){case 1:var Me=-1;break;case 2:Me=250;break;case 5:Me=1073741823;break;case 4:Me=1e4;break;default:Me=5e3}return Me=ae+Me,U={id:y++,callback:Z,priorityLevel:U,startTime:ae,expirationTime:Me,sortIndex:-1},ae>Ce?(U.sortIndex=ae,c(p,U),d(g)===null&&U===d(p)&&(A?(L(P),P=-1):A=!0,Ye(X,ae-Ce))):(U.sortIndex=Me,c(g,U),q||z||(q=!0,F||(F=!0,ie()))),U},u.unstable_shouldYield=K,u.unstable_wrapCallback=function(U){var Z=T;return function(){var ae=T;T=Z;try{return U.apply(this,arguments)}finally{T=ae}}}})(mc)),mc}var Km;function Dp(){return Km||(Km=1,fc.exports=_p()),fc.exports}var hc={exports:{}},xt={};/**
|
|
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 Jm;function zp(){if(Jm)return xt;Jm=1;var u=Cc();function c(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; 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(g,p,y){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:b==null?null:""+b,children:g,containerInfo:p,implementation:y}}var f=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,xt.createPortal=function(g,p){var y=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(g,p,null,y)},xt.flushSync=function(g){var p=f.T,y=r.p;try{if(f.T=null,r.p=2,g)return g()}finally{f.T=p,r.p=y,r.d.f()}},xt.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(g,p))},xt.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},xt.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,b=v(y,p.crossOrigin),T=typeof p.integrity=="string"?p.integrity:void 0,z=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?r.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:T,fetchPriority:z}):y==="script"&&r.d.X(g,{crossOrigin:b,integrity:T,fetchPriority:z,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},xt.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=v(p.as,p.crossOrigin);r.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(g)},xt.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,b=v(y,p.crossOrigin);r.d.L(g,y,{crossOrigin:b,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})}},xt.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=v(p.as,p.crossOrigin);r.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(g)},xt.requestFormReset=function(g){r.d.r(g)},xt.unstable_batchedUpdates=function(g,p){return g(p)},xt.useFormState=function(g,p,y){return f.H.useFormState(g,p,y)},xt.useFormStatus=function(){return f.H.useHostTransitionStatus()},xt.version="19.2.4",xt}var Fm;function gh(){if(Fm)return hc.exports;Fm=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(),hc.exports=zp(),hc.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 Pm;function Op(){if(Pm)return fs;Pm=1;var u=Dp(),c=Cc(),d=gh();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 g(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 g(n),e;if(i===a)return g(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 y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,T=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),q=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),S=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),ve=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),De=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=De&&e[De]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function $(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case Q:return"Profiler";case k:return"StrictMode";case X:return"Suspense";case F:return"SuspenseList";case ve:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case q:return"Portal";case S:return e.displayName||"Context";case L:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:$(e.type)||"Memo";case ue:t=e._payload,e=e._init;try{return $(e(t))}catch{}}return null}var Ye=Array.isArray,U=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Ce=[],Me=-1;function N(e){return{current:e}}function B(e){0>Me||(e.current=Ce[Me],Ce[Me]=null,Me--)}function J(e,t){Me++,Ce[Me]=e.current,e.current=t}var I=N(null),ce=N(null),he=N(null),Ne=N(null);function tt(e,t){switch(J(he,t),J(ce,e),J(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fm(t),e=mm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(I),J(I,e)}function Ge(){B(I),B(ce),B(he)}function tl(e){e.memoizedState!==null&&J(Ne,e);var t=I.current,l=mm(t,e.type);t!==l&&(J(ce,e),J(I,l))}function C(e){ce.current===e&&(B(I),B(ce)),Ne.current===e&&(B(Ne),us._currentValue=ae)}var W,de;function we(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 lt=!1;function vt(e,t){if(!e||lt)return"";lt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(O){var D=O}Reflect.construct(e,[],G)}else{try{G.call()}catch(O){D=O}e.call(G.prototype)}}else{try{throw Error()}catch(O){D=O}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(O){if(O&&D&&typeof O.stack=="string")return[O.stack,D.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
|
+
`),_=h.split(`
|
|
45
|
+
`);for(n=a=0;a<j.length&&!j[a].includes("DetermineComponentFrameRoot");)a++;for(;n<_.length&&!_[n].includes("DetermineComponentFrameRoot");)n++;if(a===j.length||n===_.length)for(a=j.length-1,n=_.length-1;1<=a&&0<=n&&j[a]!==_[n];)n--;for(;1<=a&&0<=n;a--,n--)if(j[a]!==_[n]){if(a!==1||n!==1)do if(a--,n--,0>n||j[a]!==_[n]){var H=`
|
|
46
|
+
`+j[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=n);break}}}finally{lt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?we(l):""}function Lt(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return vt(e.type,!1);case 11:return vt(e.type.render,!1);case 1:return vt(e.type,!0);case 31:return we("Activity");default:return""}}function V(e){try{var t="",l=null;do t+=Lt(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var se=Object.prototype.hasOwnProperty,Qe=u.unstable_scheduleCallback,bt=u.unstable_cancelCallback,ll=u.unstable_shouldYield,al=u.unstable_requestPaint,Fe=u.unstable_now,_l=u.unstable_getCurrentPriorityLevel,Gc=u.unstable_ImmediatePriority,Qc=u.unstable_UserBlockingPriority,Ss=u.unstable_NormalPriority,c0=u.unstable_LowPriority,Vc=u.unstable_IdlePriority,o0=u.log,d0=u.unstable_setDisableYieldValue,bn=null,Rt=null;function Dl(e){if(typeof o0=="function"&&d0(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(bn,e)}catch{}}var At=Math.clz32?Math.clz32:h0,f0=Math.log,m0=Math.LN2;function h0(e){return e>>>=0,e===0?32:31-(f0(e)/m0|0)|0}var Ns=256,Es=262144,ws=4194304;function ia(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 Ts(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=ia(a):(o&=h,o!==0?n=ia(o):l||(l=h&~e,l!==0&&(n=ia(l))))):(h=a&~i,h!==0?n=ia(h):o!==0?n=ia(o):l||(l=a&~e,l!==0&&(n=ia(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 yn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function x0(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 Xc(){var e=ws;return ws<<=1,(ws&62914560)===0&&(ws=4194304),e}function Pi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function jn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function p0(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,_=e.hiddenUpdates;for(l=o&~l;0<l;){var H=31-At(l),G=1<<H;h[H]=0,j[H]=-1;var D=_[H];if(D!==null)for(_[H]=null,H=0;H<D.length;H++){var O=D[H];O!==null&&(O.lane&=-536870913)}l&=~G}a!==0&&Zc(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Zc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-At(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function $c(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-At(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Kc(e,t){var l=t&-t;return l=(l&42)!==0?1:Wi(l),(l&(e.suspendedLanes|t))!==0?0:l}function Wi(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 Ii(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Jc(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:qm(e.type))}function Fc(e,t){var l=Z.p;try{return Z.p=e,t()}finally{Z.p=l}}var zl=Math.random().toString(36).slice(2),ot="__reactFiber$"+zl,yt="__reactProps$"+zl,wa="__reactContainer$"+zl,eu="__reactEvents$"+zl,v0="__reactListeners$"+zl,g0="__reactHandles$"+zl,Pc="__reactResources$"+zl,Sn="__reactMarker$"+zl;function tu(e){delete e[ot],delete e[yt],delete e[eu],delete e[v0],delete e[g0]}function Ta(e){var t=e[ot];if(t)return t;for(var l=e.parentNode;l;){if(t=l[wa]||l[ot]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=ym(e);e!==null;){if(l=e[ot])return l;e=ym(e)}return t}e=l,l=e.parentNode}return null}function Ca(e){if(e=e[ot]||e[wa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Ra(e){var t=e[Pc];return t||(t=e[Pc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function rt(e){e[Sn]=!0}var Wc=new Set,Ic={};function ua(e,t){Aa(e,t),Aa(e+"Capture",t)}function Aa(e,t){for(Ic[e]=t,e=0;e<t.length;e++)Wc.add(t[e])}var b0=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]*$"),eo={},to={};function y0(e){return se.call(to,e)?!0:se.call(eo,e)?!1:b0.test(e)?to[e]=!0:(eo[e]=!0,!1)}function Cs(e,t,l){if(y0(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 Rs(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 cl(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 lo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j0(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 lu(e){if(!e._valueTracker){var t=lo(e)?"checked":"value";e._valueTracker=j0(e,t,""+e[t])}}function ao(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=lo(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function As(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 S0=/[\n"\\]/g;function kt(e){return e.replace(S0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function au(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?nu(e,o,Bt(t)):l!=null?nu(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 no(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)){lu(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),lu(e)}function nu(e,t,l){t==="number"&&As(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ma(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 so(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 io(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(Ye(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),lu(e)}function _a(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var N0=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 uo(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||N0.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function ro(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&&uo(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&uo(e,i,t[i])}function su(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 E0=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"]]),w0=/^[\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 Ms(e){return w0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ol(){}var iu=null;function uu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Da=null,za=null;function co(e){var t=Ca(e);if(t&&(e=t.stateNode)){var l=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(au(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[yt]||null;if(!n)throw Error(r(90));au(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&&ao(a)}break e;case"textarea":so(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ma(e,!!l.multiple,t,!1)}}}var ru=!1;function oo(e,t,l){if(ru)return e(t,l);ru=!0;try{var a=e(t);return a}finally{if(ru=!1,(Da!==null||za!==null)&&(vi(),Da&&(t=Da,e=za,za=Da=null,co(t),e)))for(t=0;t<e.length;t++)co(e[t])}}function En(e,t){var l=e.stateNode;if(l===null)return null;var a=l[yt]||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 dl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cu=!1;if(dl)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){cu=!0}}),window.addEventListener("test",wn,wn),window.removeEventListener("test",wn,wn)}catch{cu=!1}var Ol=null,ou=null,_s=null;function fo(){if(_s)return _s;var e,t=ou,l=t.length,a,n="value"in Ol?Ol.value:Ol.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 _s=n.slice(e,1<a?1-a:void 0)}function Ds(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 zs(){return!0}function mo(){return!1}function jt(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)?zs:mo,this.isPropagationStopped=mo,this}return b(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=zs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=zs)},persist:function(){},isPersistent:zs}),t}var ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Os=jt(ra),Tn=b({},ra,{view:0,detail:0}),T0=jt(Tn),du,fu,Cn,Us=b({},Tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,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!==Cn&&(Cn&&e.type==="mousemove"?(du=e.screenX-Cn.screenX,fu=e.screenY-Cn.screenY):fu=du=0,Cn=e),du)},movementY:function(e){return"movementY"in e?e.movementY:fu}}),ho=jt(Us),C0=b({},Us,{dataTransfer:0}),R0=jt(C0),A0=b({},Tn,{relatedTarget:0}),mu=jt(A0),M0=b({},ra,{animationName:0,elapsedTime:0,pseudoElement:0}),_0=jt(M0),D0=b({},ra,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),z0=jt(D0),O0=b({},ra,{data:0}),xo=jt(O0),U0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q0={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"},H0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=H0[e])?!!t[e]:!1}function hu(){return L0}var B0=b({},Tn,{key:function(e){if(e.key){var t=U0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?q0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),k0=jt(B0),Y0=b({},Us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),po=jt(Y0),G0=b({},Tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),Q0=jt(G0),V0=b({},ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),X0=jt(V0),Z0=b({},Us,{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}),$0=jt(Z0),K0=b({},ra,{newState:0,oldState:0}),J0=jt(K0),F0=[9,13,27,32],xu=dl&&"CompositionEvent"in window,Rn=null;dl&&"documentMode"in document&&(Rn=document.documentMode);var P0=dl&&"TextEvent"in window&&!Rn,vo=dl&&(!xu||Rn&&8<Rn&&11>=Rn),go=" ",bo=!1;function yo(e,t){switch(e){case"keyup":return F0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oa=!1;function W0(e,t){switch(e){case"compositionend":return jo(t);case"keypress":return t.which!==32?null:(bo=!0,go);case"textInput":return e=t.data,e===go&&bo?null:e;default:return null}}function I0(e,t){if(Oa)return e==="compositionend"||!xu&&yo(e,t)?(e=fo(),_s=ou=Ol=null,Oa=!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 vo&&t.locale!=="ko"?null:t.data;default:return null}}var ex={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 So(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ex[e.type]:t==="textarea"}function No(e,t,l,a){Da?za?za.push(a):za=[a]:Da=a,t=Ei(t,"onChange"),0<t.length&&(l=new Os("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var An=null,Mn=null;function tx(e){im(e,0)}function qs(e){var t=Nn(e);if(ao(t))return e}function Eo(e,t){if(e==="change")return t}var wo=!1;if(dl){var pu;if(dl){var vu="oninput"in document;if(!vu){var To=document.createElement("div");To.setAttribute("oninput","return;"),vu=typeof To.oninput=="function"}pu=vu}else pu=!1;wo=pu&&(!document.documentMode||9<document.documentMode)}function Co(){An&&(An.detachEvent("onpropertychange",Ro),Mn=An=null)}function Ro(e){if(e.propertyName==="value"&&qs(Mn)){var t=[];No(t,Mn,e,uu(e)),oo(tx,t)}}function lx(e,t,l){e==="focusin"?(Co(),An=t,Mn=l,An.attachEvent("onpropertychange",Ro)):e==="focusout"&&Co()}function ax(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qs(Mn)}function nx(e,t){if(e==="click")return qs(t)}function sx(e,t){if(e==="input"||e==="change")return qs(t)}function ix(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:ix;function _n(e,t){if(Mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!se.call(t,n)||!Mt(e[n],t[n]))return!1}return!0}function Ao(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mo(e,t){var l=Ao(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=Ao(l)}}function _o(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_o(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Do(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=As(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=As(e.document)}return t}function gu(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 ux=dl&&"documentMode"in document&&11>=document.documentMode,Ua=null,bu=null,Dn=null,yu=!1;function zo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;yu||Ua==null||Ua!==As(a)||(a=Ua,"selectionStart"in a&&gu(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}),Dn&&_n(Dn,a)||(Dn=a,a=Ei(bu,"onSelect"),0<a.length&&(t=new Os("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ua)))}function ca(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var qa={animationend:ca("Animation","AnimationEnd"),animationiteration:ca("Animation","AnimationIteration"),animationstart:ca("Animation","AnimationStart"),transitionrun:ca("Transition","TransitionRun"),transitionstart:ca("Transition","TransitionStart"),transitioncancel:ca("Transition","TransitionCancel"),transitionend:ca("Transition","TransitionEnd")},ju={},Oo={};dl&&(Oo=document.createElement("div").style,"AnimationEvent"in window||(delete qa.animationend.animation,delete qa.animationiteration.animation,delete qa.animationstart.animation),"TransitionEvent"in window||delete qa.transitionend.transition);function oa(e){if(ju[e])return ju[e];if(!qa[e])return e;var t=qa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Oo)return ju[e]=t[l];return e}var Uo=oa("animationend"),qo=oa("animationiteration"),Ho=oa("animationstart"),rx=oa("transitionrun"),cx=oa("transitionstart"),ox=oa("transitioncancel"),Lo=oa("transitionend"),Bo=new Map,Su="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(" ");Su.push("scrollEnd");function Pt(e,t){Bo.set(e,t),ua(t,[e])}var Hs=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=[],Ha=0,Nu=0;function Ls(){for(var e=Ha,t=Nu=Ha=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&&ko(l,n,i)}}function Bs(e,t,l,a){Yt[Ha++]=e,Yt[Ha++]=t,Yt[Ha++]=l,Yt[Ha++]=a,Nu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Eu(e,t,l,a){return Bs(e,t,l,a),ks(e)}function da(e,t){return Bs(e,null,null,t),ks(e)}function ko(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-At(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function ks(e){if(50<es)throw es=0,zr=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var La={};function dx(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 _t(e,t,l,a){return new dx(e,t,l,a)}function wu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fl(e,t){var l=e.alternate;return l===null?(l=_t(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 Yo(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 Ys(e,t,l,a,n,i){var o=0;if(a=e,typeof e=="function")wu(e)&&(o=1);else if(typeof e=="string")o=pp(e,l,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ve:return e=_t(31,l,t,n),e.elementType=ve,e.lanes=i,e;case A:return fa(l.children,n,i,t);case k:o=8,n|=24;break;case Q:return e=_t(12,l,t,n|2),e.elementType=Q,e.lanes=i,e;case X:return e=_t(13,l,t,n),e.elementType=X,e.lanes=i,e;case F:return e=_t(19,l,t,n),e.elementType=F,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case S:o=10;break e;case L:o=9;break e;case le:o=11;break e;case P:o=14;break e;case ue:o=16,a=null;break e}o=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=_t(o,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function fa(e,t,l,a){return e=_t(7,e,a,t),e.lanes=l,e}function Tu(e,t,l){return e=_t(6,e,null,t),e.lanes=l,e}function Go(e){var t=_t(18,null,null,0);return t.stateNode=e,t}function Cu(e,t,l){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qo=new WeakMap;function Gt(e,t){if(typeof e=="object"&&e!==null){var l=Qo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:V(t)},Qo.set(e,t),t)}return{value:e,source:t,stack:V(t)}}var Ba=[],ka=0,Gs=null,zn=0,Qt=[],Vt=0,Ul=null,nl=1,sl="";function ml(e,t){Ba[ka++]=zn,Ba[ka++]=Gs,Gs=e,zn=t}function Vo(e,t,l){Qt[Vt++]=nl,Qt[Vt++]=sl,Qt[Vt++]=Ul,Ul=e;var a=nl;e=sl;var n=32-At(a)-1;a&=~(1<<n),l+=1;var i=32-At(t)+n;if(30<i){var o=n-n%5;i=(a&(1<<o)-1).toString(32),a>>=o,n-=o,nl=1<<32-At(t)+n|l<<n|a,sl=i+e}else nl=1<<i|l<<n|a,sl=e}function Ru(e){e.return!==null&&(ml(e,1),Vo(e,1,0))}function Au(e){for(;e===Gs;)Gs=Ba[--ka],Ba[ka]=null,zn=Ba[--ka],Ba[ka]=null;for(;e===Ul;)Ul=Qt[--Vt],Qt[Vt]=null,sl=Qt[--Vt],Qt[Vt]=null,nl=Qt[--Vt],Qt[Vt]=null}function Xo(e,t){Qt[Vt++]=nl,Qt[Vt++]=sl,Qt[Vt++]=Ul,nl=t.id,sl=t.overflow,Ul=e}var dt=null,Ve=null,Ee=!1,ql=null,Xt=!1,Mu=Error(r(519));function Hl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw On(Gt(t,e)),Mu}function Zo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[ot]=e,t[yt]=a,l){case"dialog":be("cancel",t),be("close",t);break;case"iframe":case"object":case"embed":be("load",t);break;case"video":case"audio":for(l=0;l<ls.length;l++)be(ls[l],t);break;case"source":be("error",t);break;case"img":case"image":case"link":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"input":be("invalid",t),no(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":be("invalid",t);break;case"textarea":be("invalid",t),io(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||om(t.textContent,l)?(a.popover!=null&&(be("beforetoggle",t),be("toggle",t)),a.onScroll!=null&&be("scroll",t),a.onScrollEnd!=null&&be("scrollend",t),a.onClick!=null&&(t.onclick=ol),t=!0):t=!1,t||Hl(e,!0)}function $o(e){for(dt=e.return;dt;)switch(dt.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:dt=dt.return}}function Ya(e){if(e!==dt)return!1;if(!Ee)return $o(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")||Kr(e.type,e.memoizedProps)),l=!l),l&&Ve&&Hl(e),$o(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ve=bm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ve=bm(e)}else t===27?(t=Ve,Pl(e.type)?(e=Ir,Ir=null,Ve=e):Ve=t):Ve=dt?$t(e.stateNode.nextSibling):null;return!0}function ma(){Ve=dt=null,Ee=!1}function _u(){var e=ql;return e!==null&&(wt===null?wt=e:wt.push.apply(wt,e),ql=null),e}function On(e){ql===null?ql=[e]:ql.push(e)}var Du=N(null),ha=null,hl=null;function Ll(e,t,l){J(Du,t._currentValue),t._currentValue=l}function xl(e){e._currentValue=Du.current,B(Du)}function zu(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 Ou(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),zu(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),zu(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 Ga(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;Mt(n.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(n===Ne.current){if(o=n.alternate,o===null)throw Error(r(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(us):e=[us])}n=n.return}e!==null&&Ou(t,e,l,a),t.flags|=262144}function Qs(e){for(e=e.firstContext;e!==null;){if(!Mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xa(e){ha=e,hl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ft(e){return Ko(ha,e)}function Vs(e,t){return ha===null&&xa(e),Ko(e,t)}function Ko(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},hl===null){if(e===null)throw Error(r(308));hl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else hl=hl.next=t;return l}var fx=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()})}},mx=u.unstable_scheduleCallback,hx=u.unstable_NormalPriority,at={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Uu(){return{controller:new fx,data:new Map,refCount:0}}function Un(e){e.refCount--,e.refCount===0&&mx(hx,function(){e.controller.abort()})}var qn=null,qu=0,Qa=0,Va=null;function xx(e,t){if(qn===null){var l=qn=[];qu=0,Qa=Br(),Va={status:"pending",value:void 0,then:function(a){l.push(a)}}}return qu++,t.then(Jo,Jo),t}function Jo(){if(--qu===0&&qn!==null){Va!==null&&(Va.status="fulfilled");var e=qn;qn=null,Qa=0,Va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function px(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 Fo=U.S;U.S=function(e,t){Of=Fe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&xx(e,t),Fo!==null&&Fo(e,t)};var pa=N(null);function Hu(){var e=pa.current;return e!==null?e:ke.pooledCache}function Xs(e,t){t===null?J(pa,pa.current):J(pa,t.pool)}function Po(){var e=Hu();return e===null?null:{parent:at._currentValue,pool:e}}var Xa=Error(r(460)),Lu=Error(r(474)),Zs=Error(r(542)),$s={then:function(){}};function Wo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Io(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(ol,ol),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,td(e),e;default:if(typeof t.status=="string")t.then(ol,ol);else{if(e=ke,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,td(e),e}throw ga=t,Xa}}function va(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ga=l,Xa):l}}var ga=null;function ed(){if(ga===null)throw Error(r(459));var e=ga;return ga=null,e}function td(e){if(e===Xa||e===Zs)throw Error(r(483))}var Za=null,Hn=0;function Ks(e){var t=Hn;return Hn+=1,Za===null&&(Za=[]),Io(Za,e,t)}function Ln(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Js(e,t){throw t.$$typeof===T?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ld(e){function t(R,E){if(e){var M=R.deletions;M===null?(R.deletions=[E],R.flags|=16):M.push(E)}}function l(R,E){if(!e)return null;for(;E!==null;)t(R,E),E=E.sibling;return null}function a(R){for(var E=new Map;R!==null;)R.key!==null?E.set(R.key,R):E.set(R.index,R),R=R.sibling;return E}function n(R,E){return R=fl(R,E),R.index=0,R.sibling=null,R}function i(R,E,M){return R.index=M,e?(M=R.alternate,M!==null?(M=M.index,M<E?(R.flags|=67108866,E):M):(R.flags|=67108866,E)):(R.flags|=1048576,E)}function o(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function h(R,E,M,Y){return E===null||E.tag!==6?(E=Tu(M,R.mode,Y),E.return=R,E):(E=n(E,M),E.return=R,E)}function j(R,E,M,Y){var ne=M.type;return ne===A?H(R,E,M.props.children,Y,M.key):E!==null&&(E.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===ue&&va(ne)===E.type)?(E=n(E,M.props),Ln(E,M),E.return=R,E):(E=Ys(M.type,M.key,M.props,null,R.mode,Y),Ln(E,M),E.return=R,E)}function _(R,E,M,Y){return E===null||E.tag!==4||E.stateNode.containerInfo!==M.containerInfo||E.stateNode.implementation!==M.implementation?(E=Cu(M,R.mode,Y),E.return=R,E):(E=n(E,M.children||[]),E.return=R,E)}function H(R,E,M,Y,ne){return E===null||E.tag!==7?(E=fa(M,R.mode,Y,ne),E.return=R,E):(E=n(E,M),E.return=R,E)}function G(R,E,M){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Tu(""+E,R.mode,M),E.return=R,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case z:return M=Ys(E.type,E.key,E.props,null,R.mode,M),Ln(M,E),M.return=R,M;case q:return E=Cu(E,R.mode,M),E.return=R,E;case ue:return E=va(E),G(R,E,M)}if(Ye(E)||ie(E))return E=fa(E,R.mode,M,null),E.return=R,E;if(typeof E.then=="function")return G(R,Ks(E),M);if(E.$$typeof===S)return G(R,Vs(R,E),M);Js(R,E)}return null}function D(R,E,M,Y){var ne=E!==null?E.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ne!==null?null:h(R,E,""+M,Y);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case z:return M.key===ne?j(R,E,M,Y):null;case q:return M.key===ne?_(R,E,M,Y):null;case ue:return M=va(M),D(R,E,M,Y)}if(Ye(M)||ie(M))return ne!==null?null:H(R,E,M,Y,null);if(typeof M.then=="function")return D(R,E,Ks(M),Y);if(M.$$typeof===S)return D(R,E,Vs(R,M),Y);Js(R,M)}return null}function O(R,E,M,Y,ne){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return R=R.get(M)||null,h(E,R,""+Y,ne);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case z:return R=R.get(Y.key===null?M:Y.key)||null,j(E,R,Y,ne);case q:return R=R.get(Y.key===null?M:Y.key)||null,_(E,R,Y,ne);case ue:return Y=va(Y),O(R,E,M,Y,ne)}if(Ye(Y)||ie(Y))return R=R.get(M)||null,H(E,R,Y,ne,null);if(typeof Y.then=="function")return O(R,E,M,Ks(Y),ne);if(Y.$$typeof===S)return O(R,E,M,Vs(E,Y),ne);Js(E,Y)}return null}function ee(R,E,M,Y){for(var ne=null,Re=null,te=E,pe=E=0,Se=null;te!==null&&pe<M.length;pe++){te.index>pe?(Se=te,te=null):Se=te.sibling;var Ae=D(R,te,M[pe],Y);if(Ae===null){te===null&&(te=Se);break}e&&te&&Ae.alternate===null&&t(R,te),E=i(Ae,E,pe),Re===null?ne=Ae:Re.sibling=Ae,Re=Ae,te=Se}if(pe===M.length)return l(R,te),Ee&&ml(R,pe),ne;if(te===null){for(;pe<M.length;pe++)te=G(R,M[pe],Y),te!==null&&(E=i(te,E,pe),Re===null?ne=te:Re.sibling=te,Re=te);return Ee&&ml(R,pe),ne}for(te=a(te);pe<M.length;pe++)Se=O(te,R,pe,M[pe],Y),Se!==null&&(e&&Se.alternate!==null&&te.delete(Se.key===null?pe:Se.key),E=i(Se,E,pe),Re===null?ne=Se:Re.sibling=Se,Re=Se);return e&&te.forEach(function(la){return t(R,la)}),Ee&&ml(R,pe),ne}function re(R,E,M,Y){if(M==null)throw Error(r(151));for(var ne=null,Re=null,te=E,pe=E=0,Se=null,Ae=M.next();te!==null&&!Ae.done;pe++,Ae=M.next()){te.index>pe?(Se=te,te=null):Se=te.sibling;var la=D(R,te,Ae.value,Y);if(la===null){te===null&&(te=Se);break}e&&te&&la.alternate===null&&t(R,te),E=i(la,E,pe),Re===null?ne=la:Re.sibling=la,Re=la,te=Se}if(Ae.done)return l(R,te),Ee&&ml(R,pe),ne;if(te===null){for(;!Ae.done;pe++,Ae=M.next())Ae=G(R,Ae.value,Y),Ae!==null&&(E=i(Ae,E,pe),Re===null?ne=Ae:Re.sibling=Ae,Re=Ae);return Ee&&ml(R,pe),ne}for(te=a(te);!Ae.done;pe++,Ae=M.next())Ae=O(te,R,pe,Ae.value,Y),Ae!==null&&(e&&Ae.alternate!==null&&te.delete(Ae.key===null?pe:Ae.key),E=i(Ae,E,pe),Re===null?ne=Ae:Re.sibling=Ae,Re=Ae);return e&&te.forEach(function(Cp){return t(R,Cp)}),Ee&&ml(R,pe),ne}function Le(R,E,M,Y){if(typeof M=="object"&&M!==null&&M.type===A&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case z:e:{for(var ne=M.key;E!==null;){if(E.key===ne){if(ne=M.type,ne===A){if(E.tag===7){l(R,E.sibling),Y=n(E,M.props.children),Y.return=R,R=Y;break e}}else if(E.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===ue&&va(ne)===E.type){l(R,E.sibling),Y=n(E,M.props),Ln(Y,M),Y.return=R,R=Y;break e}l(R,E);break}else t(R,E);E=E.sibling}M.type===A?(Y=fa(M.props.children,R.mode,Y,M.key),Y.return=R,R=Y):(Y=Ys(M.type,M.key,M.props,null,R.mode,Y),Ln(Y,M),Y.return=R,R=Y)}return o(R);case q:e:{for(ne=M.key;E!==null;){if(E.key===ne)if(E.tag===4&&E.stateNode.containerInfo===M.containerInfo&&E.stateNode.implementation===M.implementation){l(R,E.sibling),Y=n(E,M.children||[]),Y.return=R,R=Y;break e}else{l(R,E);break}else t(R,E);E=E.sibling}Y=Cu(M,R.mode,Y),Y.return=R,R=Y}return o(R);case ue:return M=va(M),Le(R,E,M,Y)}if(Ye(M))return ee(R,E,M,Y);if(ie(M)){if(ne=ie(M),typeof ne!="function")throw Error(r(150));return M=ne.call(M),re(R,E,M,Y)}if(typeof M.then=="function")return Le(R,E,Ks(M),Y);if(M.$$typeof===S)return Le(R,E,Vs(R,M),Y);Js(R,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,E!==null&&E.tag===6?(l(R,E.sibling),Y=n(E,M),Y.return=R,R=Y):(l(R,E),Y=Tu(M,R.mode,Y),Y.return=R,R=Y),o(R)):l(R,E)}return function(R,E,M,Y){try{Hn=0;var ne=Le(R,E,M,Y);return Za=null,ne}catch(te){if(te===Xa||te===Zs)throw te;var Re=_t(29,te,null,R.mode);return Re.lanes=Y,Re.return=R,Re}finally{}}}var ba=ld(!0),ad=ld(!1),Bl=!1;function Bu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(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 kl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(_e&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=ks(e),ko(e,null,l),t}return Bs(e,a,t,l),ks(e)}function Bn(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,$c(e,l)}}function Yu(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 Gu=!1;function kn(){if(Gu){var e=Va;if(e!==null)throw e}}function Yn(e,t,l,a){Gu=!1;var n=e.updateQueue;Bl=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var j=h,_=j.next;j.next=null,o===null?i=_:o.next=_,o=j;var H=e.alternate;H!==null&&(H=H.updateQueue,h=H.lastBaseUpdate,h!==o&&(h===null?H.firstBaseUpdate=_:h.next=_,H.lastBaseUpdate=j))}if(i!==null){var G=n.baseState;o=0,H=_=j=null,h=i;do{var D=h.lane&-536870913,O=D!==h.lane;if(O?(je&D)===D:(a&D)===D){D!==0&&D===Qa&&(Gu=!0),H!==null&&(H=H.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var ee=e,re=h;D=t;var Le=l;switch(re.tag){case 1:if(ee=re.payload,typeof ee=="function"){G=ee.call(Le,G,D);break e}G=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=re.payload,D=typeof ee=="function"?ee.call(Le,G,D):ee,D==null)break e;G=b({},G,D);break e;case 2:Bl=!0}}D=h.callback,D!==null&&(e.flags|=64,O&&(e.flags|=8192),O=n.callbacks,O===null?n.callbacks=[D]:O.push(D))}else O={lane:D,tag:h.tag,payload:h.payload,callback:h.callback,next:null},H===null?(_=H=O,j=G):H=H.next=O,o|=D;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;O=h,h=O.next,O.next=null,n.lastBaseUpdate=O,n.shared.pending=null}}while(!0);H===null&&(j=G),n.baseState=j,n.firstBaseUpdate=_,n.lastBaseUpdate=H,i===null&&(n.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=G}}function nd(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function sd(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)nd(l[e],t)}var $a=N(null),Fs=N(0);function id(e,t){e=El,J(Fs,e),J($a,t),El=e|t.baseLanes}function Qu(){J(Fs,El),J($a,$a.current)}function Vu(){El=Fs.current,B($a),B(Fs)}var Dt=N(null),Zt=null;function Gl(e){var t=e.alternate;J(Ie,Ie.current&1),J(Dt,e),Zt===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(Zt=e)}function Xu(e){J(Ie,Ie.current),J(Dt,e),Zt===null&&(Zt=e)}function ud(e){e.tag===22?(J(Ie,Ie.current),J(Dt,e),Zt===null&&(Zt=e)):Ql()}function Ql(){J(Ie,Ie.current),J(Dt,Dt.current)}function zt(e){B(Dt),Zt===e&&(Zt=null),B(Ie)}var Ie=N(0);function Ps(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Pr(l)||Wr(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 pl=0,xe=null,qe=null,nt=null,Ws=!1,Ka=!1,ya=!1,Is=0,Gn=0,Ja=null,vx=0;function Pe(){throw Error(r(321))}function Zu(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Mt(e[l],t[l]))return!1;return!0}function $u(e,t,l,a,n,i){return pl=i,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Vd:rr,ya=!1,i=l(a,n),ya=!1,Ka&&(i=cd(t,l,a,n)),rd(e),i}function rd(e){U.H=Xn;var t=qe!==null&&qe.next!==null;if(pl=0,nt=qe=xe=null,Ws=!1,Gn=0,Ja=null,t)throw Error(r(300));e===null||st||(e=e.dependencies,e!==null&&Qs(e)&&(st=!0))}function cd(e,t,l,a){xe=e;var n=0;do{if(Ka&&(Ja=null),Gn=0,Ka=!1,25<=n)throw Error(r(301));if(n+=1,nt=qe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}U.H=Xd,i=t(l,a)}while(Ka);return i}function gx(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Qn(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(xe.flags|=1024),t}function Ku(){var e=Is!==0;return Is=0,e}function Ju(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Fu(e){if(Ws){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ws=!1}pl=0,nt=qe=xe=null,Ka=!1,Gn=Is=0,Ja=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?xe.memoizedState=nt=e:nt=nt.next=e,nt}function et(){if(qe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=nt===null?xe.memoizedState:nt.next;if(t!==null)nt=t,qe=e;else{if(e===null)throw xe.alternate===null?Error(r(467)):Error(r(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},nt===null?xe.memoizedState=nt=e:nt=nt.next=e}return nt}function ei(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qn(e){var t=Gn;return Gn+=1,Ja===null&&(Ja=[]),e=Io(Ja,e,t),t=xe,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Vd:rr),e}function ti(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Qn(e);if(e.$$typeof===S)return ft(e)}throw Error(r(438,String(e)))}function Pu(e){var t=null,l=xe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=xe.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=ei(),xe.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]=K;return t.index++,l}function vl(e,t){return typeof t=="function"?t(e):t}function li(e){var t=et();return Wu(t,qe,e)}function Wu(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,_=t,H=!1;do{var G=_.lane&-536870913;if(G!==_.lane?(je&G)===G:(pl&G)===G){var D=_.revertLane;if(D===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),G===Qa&&(H=!0);else if((pl&D)===D){_=_.next,D===Qa&&(H=!0);continue}else G={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},j===null?(h=j=G,o=i):j=j.next=G,xe.lanes|=D,Zl|=D;G=_.action,ya&&l(i,G),i=_.hasEagerState?_.eagerState:l(i,G)}else D={lane:G,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},j===null?(h=j=D,o=i):j=j.next=D,xe.lanes|=G,Zl|=G;_=_.next}while(_!==null&&_!==t);if(j===null?o=i:j.next=h,!Mt(i,e.memoizedState)&&(st=!0,H&&(l=Va,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 Iu(e){var t=et(),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);Mt(i,t.memoizedState)||(st=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function od(e,t,l){var a=xe,n=et(),i=Ee;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var o=!Mt((qe||n).memoizedState,l);if(o&&(n.memoizedState=l,st=!0),n=n.queue,lr(md.bind(null,a,n,e),[e]),n.getSnapshot!==t||o||nt!==null&&nt.memoizedState.tag&1){if(a.flags|=2048,Fa(9,{destroy:void 0},fd.bind(null,a,n,l,t),null),ke===null)throw Error(r(349));i||(pl&127)!==0||dd(a,t,l)}return l}function dd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=xe.updateQueue,t===null?(t=ei(),xe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function fd(e,t,l,a){t.value=l,t.getSnapshot=a,hd(t)&&xd(e)}function md(e,t,l){return l(function(){hd(t)&&xd(e)})}function hd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Mt(e,l)}catch{return!0}}function xd(e){var t=da(e,2);t!==null&&Tt(t,e,2)}function er(e){var t=gt();if(typeof e=="function"){var l=e;if(e=l(),ya){Dl(!0);try{l()}finally{Dl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:e},t}function pd(e,t,l,a){return e.baseState=l,Wu(e,qe,typeof a=="function"?a:vl)}function bx(e,t,l,a,n){if(si(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)}};U.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,vd(t,i)):(i.next=l.next,t.pending=l.next=i)}}function vd(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=U.T,o={};U.T=o;try{var h=l(n,a),j=U.S;j!==null&&j(o,h),gd(e,t,h)}catch(_){tr(e,t,_)}finally{i!==null&&o.types!==null&&(i.types=o.types),U.T=i}}else try{i=l(n,a),gd(e,t,i)}catch(_){tr(e,t,_)}}function gd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){bd(e,t,a)},function(a){return tr(e,t,a)}):bd(e,t,l)}function bd(e,t,l){t.status="fulfilled",t.value=l,yd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,vd(e,l)))}function tr(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,yd(t),t=t.next;while(t!==a)}e.action=null}function yd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function jd(e,t){return t}function Sd(e,t){if(Ee){var l=ke.formState;if(l!==null){e:{var a=xe;if(Ee){if(Ve){t:{for(var n=Ve,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){Ve=$t(n.nextSibling),a=n.data==="F!";break e}}Hl(a)}a=!1}a&&(t=l[0])}}return l=gt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jd,lastRenderedState:t},l.queue=a,l=Yd.bind(null,xe,a),a.dispatch=l,a=er(!1),i=ur.bind(null,xe,!1,a.queue),a=gt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=bx.bind(null,xe,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function Nd(e){var t=et();return Ed(t,qe,e)}function Ed(e,t,l){if(t=Wu(e,t,jd)[0],e=li(vl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Qn(t)}catch(o){throw o===Xa?Zs:o}else a=t;t=et();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(xe.flags|=2048,Fa(9,{destroy:void 0},yx.bind(null,n,l),null)),[a,i,e]}function yx(e,t){e.action=t}function wd(e){var t=et(),l=qe;if(l!==null)return Ed(t,l,e);et(),t=t.memoizedState,l=et();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Fa(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=xe.updateQueue,t===null&&(t=ei(),xe.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 Td(){return et().memoizedState}function ai(e,t,l,a){var n=gt();xe.flags|=e,n.memoizedState=Fa(1|t,{destroy:void 0},l,a===void 0?null:a)}function ni(e,t,l,a){var n=et();a=a===void 0?null:a;var i=n.memoizedState.inst;qe!==null&&a!==null&&Zu(a,qe.memoizedState.deps)?n.memoizedState=Fa(t,i,l,a):(xe.flags|=e,n.memoizedState=Fa(1|t,i,l,a))}function Cd(e,t){ai(8390656,8,e,t)}function lr(e,t){ni(2048,8,e,t)}function jx(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=ei(),xe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Rd(e){var t=et().memoizedState;return jx({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Ad(e,t){return ni(4,2,e,t)}function Md(e,t){return ni(4,4,e,t)}function _d(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 Dd(e,t,l){l=l!=null?l.concat([e]):null,ni(4,4,_d.bind(null,t,e),l)}function ar(){}function zd(e,t){var l=et();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Zu(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Od(e,t){var l=et();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Zu(t,a[1]))return a[0];if(a=e(),ya){Dl(!0);try{e()}finally{Dl(!1)}}return l.memoizedState=[a,t],a}function nr(e,t,l){return l===void 0||(pl&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=qf(),xe.lanes|=e,Zl|=e,l)}function Ud(e,t,l,a){return Mt(l,t)?l:$a.current!==null?(e=nr(e,l,a),Mt(e,t)||(st=!0),e):(pl&42)===0||(pl&1073741824)!==0&&(je&261930)===0?(st=!0,e.memoizedState=l):(e=qf(),xe.lanes|=e,Zl|=e,t)}function qd(e,t,l,a,n){var i=Z.p;Z.p=i!==0&&8>i?i:8;var o=U.T,h={};U.T=h,ur(e,!1,t,l);try{var j=n(),_=U.S;if(_!==null&&_(h,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var H=px(j,a);Vn(e,t,H,qt(e))}else Vn(e,t,a,qt(e))}catch(G){Vn(e,t,{then:function(){},status:"rejected",reason:G},qt())}finally{Z.p=i,o!==null&&h.types!==null&&(o.types=h.types),U.T=o}}function Sx(){}function sr(e,t,l,a){if(e.tag!==5)throw Error(r(476));var n=Hd(e).queue;qd(e,n,t,ae,l===null?Sx:function(){return Ld(e),l(a)})}function Hd(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:vl,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ld(e){var t=Hd(e);t.next===null&&(t=e.alternate.memoizedState),Vn(e,t.next.queue,{},qt())}function ir(){return ft(us)}function Bd(){return et().memoizedState}function kd(){return et().memoizedState}function Nx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=qt();e=kl(l);var a=Yl(t,e,l);a!==null&&(Tt(a,t,l),Bn(a,t,l)),t={cache:Uu()},e.payload=t;return}t=t.return}}function Ex(e,t,l){var a=qt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},si(e)?Gd(t,l):(l=Eu(e,t,l,a),l!==null&&(Tt(l,e,a),Qd(l,t,a)))}function Yd(e,t,l){var a=qt();Vn(e,t,l,a)}function Vn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(si(e))Gd(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,l);if(n.hasEagerState=!0,n.eagerState=h,Mt(h,o))return Bs(e,t,n,0),ke===null&&Ls(),!1}catch{}finally{}if(l=Eu(e,t,n,a),l!==null)return Tt(l,e,a),Qd(l,t,a),!0}return!1}function ur(e,t,l,a){if(a={lane:2,revertLane:Br(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},si(e)){if(t)throw Error(r(479))}else t=Eu(e,l,a,2),t!==null&&Tt(t,e,2)}function si(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Gd(e,t){Ka=Ws=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Qd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,$c(e,l)}}var Xn={readContext:ft,use:ti,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe};Xn.useEffectEvent=Pe;var Vd={readContext:ft,use:ti,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:Cd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ai(4194308,4,_d.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ai(4194308,4,e,t)},useInsertionEffect:function(e,t){ai(4,2,e,t)},useMemo:function(e,t){var l=gt();t=t===void 0?null:t;var a=e();if(ya){Dl(!0);try{e()}finally{Dl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=gt();if(l!==void 0){var n=l(t);if(ya){Dl(!0);try{l(t)}finally{Dl(!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=Ex.bind(null,xe,e),[a.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:function(e){e=er(e);var t=e.queue,l=Yd.bind(null,xe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:ar,useDeferredValue:function(e,t){var l=gt();return nr(l,e,t)},useTransition:function(){var e=er(!1);return e=qd.bind(null,xe,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=xe,n=gt();if(Ee){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),ke===null)throw Error(r(349));(je&127)!==0||dd(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,Cd(md.bind(null,a,i,e),[e]),a.flags|=2048,Fa(9,{destroy:void 0},fd.bind(null,a,i,l,t),null),l},useId:function(){var e=gt(),t=ke.identifierPrefix;if(Ee){var l=sl,a=nl;l=(a&~(1<<32-At(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Is++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=vx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ir,useFormState:Sd,useActionState:Sd,useOptimistic:function(e){var t=gt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=ur.bind(null,xe,!0,l),l.dispatch=t,[e,t]},useMemoCache:Pu,useCacheRefresh:function(){return gt().memoizedState=Nx.bind(null,xe)},useEffectEvent:function(e){var t=gt(),l={impl:e};return t.memoizedState=l,function(){if((_e&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},rr={readContext:ft,use:ti,useCallback:zd,useContext:ft,useEffect:lr,useImperativeHandle:Dd,useInsertionEffect:Ad,useLayoutEffect:Md,useMemo:Od,useReducer:li,useRef:Td,useState:function(){return li(vl)},useDebugValue:ar,useDeferredValue:function(e,t){var l=et();return Ud(l,qe.memoizedState,e,t)},useTransition:function(){var e=li(vl)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Qn(e),t]},useSyncExternalStore:od,useId:Bd,useHostTransitionStatus:ir,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var l=et();return pd(l,qe,e,t)},useMemoCache:Pu,useCacheRefresh:kd};rr.useEffectEvent=Rd;var Xd={readContext:ft,use:ti,useCallback:zd,useContext:ft,useEffect:lr,useImperativeHandle:Dd,useInsertionEffect:Ad,useLayoutEffect:Md,useMemo:Od,useReducer:Iu,useRef:Td,useState:function(){return Iu(vl)},useDebugValue:ar,useDeferredValue:function(e,t){var l=et();return qe===null?nr(l,e,t):Ud(l,qe.memoizedState,e,t)},useTransition:function(){var e=Iu(vl)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Qn(e),t]},useSyncExternalStore:od,useId:Bd,useHostTransitionStatus:ir,useFormState:wd,useActionState:wd,useOptimistic:function(e,t){var l=et();return qe!==null?pd(l,qe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:kd};Xd.useEffectEvent=Rd;function cr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:b({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var or={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=qt(),n=kl(a);n.payload=t,l!=null&&(n.callback=l),t=Yl(e,n,a),t!==null&&(Tt(t,e,a),Bn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=qt(),n=kl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Yl(e,n,a),t!==null&&(Tt(t,e,a),Bn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=qt(),a=kl(l);a.tag=2,t!=null&&(a.callback=t),t=Yl(e,a,l),t!==null&&(Tt(t,e,l),Bn(t,e,l))}};function Zd(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?!_n(l,a)||!_n(n,i):!0}function $d(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&&or.enqueueReplaceState(t,t.state,null)}function ja(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=b({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function Kd(e){Hs(e)}function Jd(e){console.error(e)}function Fd(e){Hs(e)}function ii(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Pd(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 dr(e,t,l){return l=kl(l),l.tag=3,l.payload={element:null},l.callback=function(){ii(e,t)},l}function Wd(e){return e=kl(e),e.tag=3,e}function Id(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(){Pd(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Pd(t,l,a),typeof n!="function"&&($l===null?$l=new Set([this]):$l.add(this));var h=a.stack;this.componentDidCatch(a.value,{componentStack:h!==null?h:""})})}function wx(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ga(t,l,n,!0),l=Dt.current,l!==null){switch(l.tag){case 31:case 13:return Zt===null?gi():l.alternate===null&&We===0&&(We=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===$s?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),qr(e,a,n)),!1;case 22:return l.flags|=65536,a===$s?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)),qr(e,a,n)),!1}throw Error(r(435,l.tag))}return qr(e,a,n),gi(),!1}if(Ee)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Mu&&(e=Error(r(422),{cause:a}),On(Gt(e,l)))):(a!==Mu&&(t=Error(r(423),{cause:a}),On(Gt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Gt(a,l),n=dr(e.stateNode,a,n),Yu(e,n),We!==4&&(We=2)),!1;var i=Error(r(520),{cause:a});if(i=Gt(i,l),In===null?In=[i]:In.push(i),We!==4&&(We=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=dr(l.stateNode,a,e),Yu(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"&&($l===null||!$l.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Wd(n),Id(n,e,l,a),Yu(l,n),!1}l=l.return}while(l!==null);return!1}var fr=Error(r(461)),st=!1;function mt(e,t,l,a){t.child=e===null?ad(t,null,l,a):ba(t,e.child,l,a)}function ef(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 xa(t),a=$u(e,t,l,o,i,n),h=Ku(),e!==null&&!st?(Ju(e,t,n),gl(e,t,n)):(Ee&&h&&Ru(t),t.flags|=1,mt(e,t,a,n),t.child)}function tf(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!wu(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,lf(e,t,i,a,n)):(e=Ys(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!yr(e,n)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:_n,l(o,a)&&e.ref===t.ref)return gl(e,t,n)}return t.flags|=1,e=fl(i,a),e.ref=t.ref,e.return=t,t.child=e}function lf(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(_n(i,a)&&e.ref===t.ref)if(st=!1,t.pendingProps=a=i,yr(e,n))(e.flags&131072)!==0&&(st=!0);else return t.lanes=e.lanes,gl(e,t,n)}return mr(e,t,l,a,n)}function af(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 nf(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xs(t,i!==null?i.cachePool:null),i!==null?id(t,i):Qu(),ud(t);else return a=t.lanes=536870912,nf(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(Xs(t,i.cachePool),id(t,i),Ql(),t.memoizedState=null):(e!==null&&Xs(t,null),Qu(),Ql());return mt(e,t,n,l),t.child}function Zn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nf(e,t,l,a,n){var i=Hu();return i=i===null?null:{parent:at._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&Xs(t,null),Qu(),ud(t),e!==null&&Ga(e,t,a,!0),t.childLanes=n,null}function ui(e,t){return t=ci({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sf(e,t,l){return ba(t,e.child,null,l),e=ui(t,t.pendingProps),e.flags|=2,zt(t),t.memoizedState=null,e}function Tx(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=ui(t,a),t.lanes=536870912,Zn(null,e);if(Xu(t),(e=Ve)?(e=gm(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ul!==null?{id:nl,overflow:sl}:null,retryLane:536870912,hydrationErrors:null},l=Go(e),l.return=t,t.child=l,dt=t,Ve=null)):e=null,e===null)throw Hl(t);return t.lanes=536870912,null}return ui(t,a)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Xu(t),n)if(t.flags&256)t.flags&=-257,t=sf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(st||Ga(e,t,l,!1),n=(l&e.childLanes)!==0,st||n){if(a=ke,a!==null&&(o=Kc(a,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,da(e,o),Tt(a,e,o),fr;gi(),t=sf(e,t,l)}else e=i.treeContext,Ve=$t(o.nextSibling),dt=t,Ee=!0,ql=null,Xt=!1,e!==null&&Xo(t,e),t=ui(t,a),t.flags|=4096;return t}return e=fl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ri(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 mr(e,t,l,a,n){return xa(t),l=$u(e,t,l,a,void 0,n),a=Ku(),e!==null&&!st?(Ju(e,t,n),gl(e,t,n)):(Ee&&a&&Ru(t),t.flags|=1,mt(e,t,l,n),t.child)}function uf(e,t,l,a,n,i){return xa(t),t.updateQueue=null,l=cd(t,a,l,n),rd(e),a=Ku(),e!==null&&!st?(Ju(e,t,i),gl(e,t,i)):(Ee&&a&&Ru(t),t.flags|=1,mt(e,t,l,i),t.child)}function rf(e,t,l,a,n){if(xa(t),t.stateNode===null){var i=La,o=l.contextType;typeof o=="object"&&o!==null&&(i=ft(o)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=or,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Bu(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?ft(o):La,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(cr(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&&or.enqueueReplaceState(i,i.state,null),Yn(t,a,i,n),kn(),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=ja(l,h);i.props=j;var _=i.context,H=l.contextType;o=La,typeof H=="object"&&H!==null&&(o=ft(H));var G=l.getDerivedStateFromProps;H=typeof G=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||_!==o)&&$d(t,i,a,o),Bl=!1;var D=t.memoizedState;i.state=D,Yn(t,a,i,n),kn(),_=t.memoizedState,h||D!==_||Bl?(typeof G=="function"&&(cr(t,l,G,a),_=t.memoizedState),(j=Bl||Zd(t,l,j,a,D,_,o))?(H||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=_),i.props=a,i.state=_,i.context=o,a=j):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,ku(e,t),o=t.memoizedProps,H=ja(l,o),i.props=H,G=t.pendingProps,D=i.context,_=l.contextType,j=La,typeof _=="object"&&_!==null&&(j=ft(_)),h=l.getDerivedStateFromProps,(_=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==G||D!==j)&&$d(t,i,a,j),Bl=!1,D=t.memoizedState,i.state=D,Yn(t,a,i,n),kn();var O=t.memoizedState;o!==G||D!==O||Bl||e!==null&&e.dependencies!==null&&Qs(e.dependencies)?(typeof h=="function"&&(cr(t,l,h,a),O=t.memoizedState),(H=Bl||Zd(t,l,H,a,D,O,j)||e!==null&&e.dependencies!==null&&Qs(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,j),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,j)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=j,a=H):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,ri(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=ba(t,e.child,null,n),t.child=ba(t,null,l,n)):mt(e,t,l,n),t.memoizedState=i.state,e=t.child):e=gl(e,t,n),e}function cf(e,t,l,a){return ma(),t.flags|=256,mt(e,t,l,a),t.child}var hr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xr(e){return{baseLanes:e,cachePool:Po()}}function pr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ut),e}function of(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:(Ie.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ee){if(n?Gl(t):Ql(),(e=Ve)?(e=gm(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ul!==null?{id:nl,overflow:sl}:null,retryLane:536870912,hydrationErrors:null},l=Go(e),l.return=t,t.child=l,dt=t,Ve=null)):e=null,e===null)throw Hl(t);return Wr(e)?t.lanes=32:t.lanes=536870912,null}var h=a.children;return a=a.fallback,n?(Ql(),n=t.mode,h=ci({mode:"hidden",children:h},n),a=fa(a,n,l,null),h.return=t,a.return=t,h.sibling=a,t.child=h,a=t.child,a.memoizedState=xr(l),a.childLanes=pr(e,o,l),t.memoizedState=hr,Zn(null,a)):(Gl(t),vr(t,h))}var j=e.memoizedState;if(j!==null&&(h=j.dehydrated,h!==null)){if(i)t.flags&256?(Gl(t),t.flags&=-257,t=gr(e,t,l)):t.memoizedState!==null?(Ql(),t.child=e.child,t.flags|=128,t=null):(Ql(),h=a.fallback,n=t.mode,a=ci({mode:"visible",children:a.children},n),h=fa(h,n,l,null),h.flags|=2,a.return=t,h.return=t,a.sibling=h,t.child=a,ba(t,e.child,null,l),a=t.child,a.memoizedState=xr(l),a.childLanes=pr(e,o,l),t.memoizedState=hr,t=Zn(null,a));else if(Gl(t),Wr(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var _=o.dgst;o=_,a=Error(r(419)),a.stack="",a.digest=o,On({value:a,source:null,stack:null}),t=gr(e,t,l)}else if(st||Ga(e,t,l,!1),o=(l&e.childLanes)!==0,st||o){if(o=ke,o!==null&&(a=Kc(o,l),a!==0&&a!==j.retryLane))throw j.retryLane=a,da(e,a),Tt(o,e,a),fr;Pr(h)||gi(),t=gr(e,t,l)}else Pr(h)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Ve=$t(h.nextSibling),dt=t,Ee=!0,ql=null,Xt=!1,e!==null&&Xo(t,e),t=vr(t,a.children),t.flags|=4096);return t}return n?(Ql(),h=a.fallback,n=t.mode,j=e.child,_=j.sibling,a=fl(j,{mode:"hidden",children:a.children}),a.subtreeFlags=j.subtreeFlags&65011712,_!==null?h=fl(_,h):(h=fa(h,n,l,null),h.flags|=2),h.return=t,a.return=t,a.sibling=h,t.child=a,Zn(null,a),a=t.child,h=e.child.memoizedState,h===null?h=xr(l):(n=h.cachePool,n!==null?(j=at._currentValue,n=n.parent!==j?{parent:j,pool:j}:n):n=Po(),h={baseLanes:h.baseLanes|l,cachePool:n}),a.memoizedState=h,a.childLanes=pr(e,o,l),t.memoizedState=hr,Zn(e.child,a)):(Gl(t),l=e.child,e=l.sibling,l=fl(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 vr(e,t){return t=ci({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ci(e,t){return e=_t(22,e,null,t),e.lanes=0,e}function gr(e,t,l){return ba(t,e.child,null,l),e=vr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function df(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),zu(e.return,t,l)}function br(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 ff(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var o=Ie.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,J(Ie,o),mt(e,t,a,l),a=Ee?zn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&df(e,l,t);else if(e.tag===19)df(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&&Ps(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),br(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&&Ps(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}br(t,!0,l,null,i,a);break;case"together":br(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function gl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Zl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ga(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=fl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=fl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function yr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Qs(e)))}function Cx(e,t,l){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),Ll(t,at,e.memoizedState.cache),ma();break;case 27:case 5:tl(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:Ll(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Gl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?of(e,t,l):(Gl(t),e=gl(e,t,l),e!==null?e.sibling:null);Gl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Ga(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return ff(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),J(Ie,Ie.current),a)break;return null;case 22:return t.lanes=0,af(e,t,l,t.pendingProps);case 24:Ll(t,at,e.memoizedState.cache)}return gl(e,t,l)}function mf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)st=!0;else{if(!yr(e,l)&&(t.flags&128)===0)return st=!1,Cx(e,t,l);st=(e.flags&131072)!==0}else st=!1,Ee&&(t.flags&1048576)!==0&&Vo(t,zn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=va(t.elementType),t.type=e,typeof e=="function")wu(e)?(a=ja(e,a),t.tag=1,t=rf(null,t,e,a,l)):(t.tag=0,t=mr(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===le){t.tag=11,t=ef(null,t,e,a,l);break e}else if(n===P){t.tag=14,t=tf(null,t,e,a,l);break e}}throw t=$(e)||e,Error(r(306,t,""))}}return t;case 0:return mr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=ja(a,t.pendingProps),rf(e,t,a,n,l);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,ku(e,t),Yn(t,a,null,l);var o=t.memoizedState;if(a=o.cache,Ll(t,at,a),a!==i.cache&&Ou(t,[at],l,!0),kn(),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=cf(e,t,a,l);break e}else if(a!==n){n=Gt(Error(r(424)),t),On(n),t=cf(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(Ve=$t(e.firstChild),dt=t,Ee=!0,ql=null,Xt=!0,l=ad(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ma(),a===n){t=gl(e,t,l);break e}mt(e,t,a,l)}t=t.child}return t;case 26:return ri(e,t),e===null?(l=Em(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ee||(l=t.type,e=t.pendingProps,a=wi(he.current).createElement(l),a[ot]=t,a[yt]=e,ht(a,l,e),rt(a),t.stateNode=a):t.memoizedState=Em(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return tl(t),e===null&&Ee&&(a=t.stateNode=jm(t.type,t.pendingProps,he.current),dt=t,Xt=!0,n=Ve,Pl(t.type)?(Ir=n,Ve=$t(a.firstChild)):Ve=n),mt(e,t,t.pendingProps.children,l),ri(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ee&&((n=a=Ve)&&(a=ap(a,t.type,t.pendingProps,Xt),a!==null?(t.stateNode=a,dt=t,Ve=$t(a.firstChild),Xt=!1,n=!0):n=!1),n||Hl(t)),tl(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Kr(n,i)?a=null:o!==null&&Kr(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=$u(e,t,gx,null,null,l),us._currentValue=n),ri(e,t),mt(e,t,a,l),t.child;case 6:return e===null&&Ee&&((e=l=Ve)&&(l=np(l,t.pendingProps,Xt),l!==null?(t.stateNode=l,dt=t,Ve=null,e=!0):e=!1),e||Hl(t)),null;case 13:return of(e,t,l);case 4:return tt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ba(t,null,a,l):mt(e,t,a,l),t.child;case 11:return ef(e,t,t.type,t.pendingProps,l);case 7:return mt(e,t,t.pendingProps,l),t.child;case 8:return mt(e,t,t.pendingProps.children,l),t.child;case 12:return mt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Ll(t,t.type,a.value),mt(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,xa(t),n=ft(n),a=a(n),t.flags|=1,mt(e,t,a,l),t.child;case 14:return tf(e,t,t.type,t.pendingProps,l);case 15:return lf(e,t,t.type,t.pendingProps,l);case 19:return ff(e,t,l);case 31:return Tx(e,t,l);case 22:return af(e,t,l,t.pendingProps);case 24:return xa(t),a=ft(at),e===null?(n=Hu(),n===null&&(n=ke,i=Uu(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},Bu(t),Ll(t,at,n)):((e.lanes&l)!==0&&(ku(e,t),Yn(t,null,null,l),kn()),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),Ll(t,at,a)):(a=i.cache,Ll(t,at,a),a!==n.cache&&Ou(t,[at],l,!0))),mt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function bl(e){e.flags|=4}function jr(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(kf())e.flags|=8192;else throw ga=$s,Lu}else e.flags&=-16777217}function hf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Am(t))if(kf())e.flags|=8192;else throw ga=$s,Lu}function oi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xc():536870912,e.lanes|=t,en|=t)}function $n(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Rx(e,t,l){var a=t.pendingProps;switch(Au(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xl(at),Ge(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ya(t)?bl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_u())),Xe(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(bl(t),i!==null?(Xe(t),hf(t,i)):(Xe(t),jr(t,n,null,a,l))):i?i!==e.memoizedState?(bl(t),Xe(t),hf(t,i)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&bl(t),Xe(t),jr(t,n,e,a,l)),null;case 27:if(C(t),l=he.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&bl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Xe(t),null}e=I.current,Ya(t)?Zo(t):(e=jm(n,a,l),t.stateNode=e,bl(t))}return Xe(t),null;case 5:if(C(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&bl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Xe(t),null}if(i=I.current,Ya(t))Zo(t);else{var o=wi(he.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[ot]=t,i[yt]=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(ht(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&&bl(t)}}return Xe(t),jr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&bl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=he.current,Ya(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=dt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[ot]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||om(e.nodeValue,l)),e||Hl(t,!0)}else e=wi(e).createTextNode(a),e[ot]=t,t.stateNode=e}return Xe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ya(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[ot]=t}else ma(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else l=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(zt(t),t):(zt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Xe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ya(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[ot]=t}else ma(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),n=!1}else n=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(zt(t),t):(zt(t),null)}return zt(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),oi(t,t.updateQueue),Xe(t),null);case 4:return Ge(),e===null&&Qr(t.stateNode.containerInfo),Xe(t),null;case 10:return xl(t.type),Xe(t),null;case 19:if(B(Ie),a=t.memoizedState,a===null)return Xe(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)$n(a,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ps(e),i!==null){for(t.flags|=128,$n(a,!1),e=i.updateQueue,t.updateQueue=e,oi(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Yo(l,e),l=l.sibling;return J(Ie,Ie.current&1|2),Ee&&ml(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Fe()>xi&&(t.flags|=128,n=!0,$n(a,!1),t.lanes=4194304)}else{if(!n)if(e=Ps(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,oi(t,e),$n(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Ee)return Xe(t),null}else 2*Fe()-a.renderingStartTime>xi&&l!==536870912&&(t.flags|=128,n=!0,$n(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=Fe(),e.sibling=null,l=Ie.current,J(Ie,n?l&1|2:l&1),Ee&&ml(t,a.treeForkCount),e):(Xe(t),null);case 22:case 23:return zt(t),Vu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),l=t.updateQueue,l!==null&&oi(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(pa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),xl(at),Xe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Ax(e,t){switch(Au(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xl(at),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(zt(t),t.alternate===null)throw Error(r(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Ie),null;case 4:return Ge(),null;case 10:return xl(t.type),null;case 22:case 23:return zt(t),Vu(),e!==null&&B(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xl(at),null;case 25:return null;default:return null}}function xf(e,t){switch(Au(t),t.tag){case 3:xl(at),Ge();break;case 26:case 27:case 5:C(t);break;case 4:Ge();break;case 31:t.memoizedState!==null&&zt(t);break;case 13:zt(t);break;case 19:B(Ie);break;case 10:xl(t.type);break;case 22:case 23:zt(t),Vu(),e!==null&&B(pa);break;case 24:xl(at)}}function Kn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,o=l.inst;a=i(),o.destroy=a}l=l.next}while(l!==n)}}catch(h){Ue(t,t.return,h)}}function Vl(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,_=h;try{_()}catch(H){Ue(n,j,H)}}}a=a.next}while(a!==i)}}catch(H){Ue(t,t.return,H)}}function pf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{sd(t,l)}catch(a){Ue(e,e.return,a)}}}function vf(e,t,l){l.props=ja(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ue(e,t,a)}}function Jn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Ue(e,t,n)}}function il(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ue(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ue(e,t,n)}else l.current=null}function gf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Ue(e,e.return,n)}}function Sr(e,t,l){try{var a=e.stateNode;Px(a,e.type,l,t),a[yt]=t}catch(n){Ue(e,e.return,n)}}function bf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pl(e.type)||e.tag===4}function Nr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bf(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&&Pl(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 Er(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=ol));else if(a!==4&&(a===27&&Pl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Er(e,t,l),e=e.sibling;e!==null;)Er(e,t,l),e=e.sibling}function di(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&&Pl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(di(e,t,l),e=e.sibling;e!==null;)di(e,t,l),e=e.sibling}function yf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);ht(t,a,l),t[ot]=e,t[yt]=l}catch(i){Ue(e,e.return,i)}}var yl=!1,it=!1,wr=!1,jf=typeof WeakSet=="function"?WeakSet:Set,ct=null;function Mx(e,t){if(e=e.containerInfo,Zr=Di,e=Do(e),gu(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,_=0,H=0,G=e,D=null;t:for(;;){for(var O;G!==l||n!==0&&G.nodeType!==3||(h=o+n),G!==i||a!==0&&G.nodeType!==3||(j=o+a),G.nodeType===3&&(o+=G.nodeValue.length),(O=G.firstChild)!==null;)D=G,G=O;for(;;){if(G===e)break t;if(D===l&&++_===n&&(h=o),D===i&&++H===a&&(j=o),(O=G.nextSibling)!==null)break;G=D,D=G.parentNode}G=O}l=h===-1||j===-1?null:{start:h,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for($r={focusedElem:e,selectionRange:l},Di=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,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=ja(l.type,n);e=a.getSnapshotBeforeUpdate(ee,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(re){Ue(l,l.return,re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Fr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,ct=e;break}ct=t.return}}function Sf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Sl(e,l),a&4&&Kn(5,l);break;case 1:if(Sl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){Ue(l,l.return,o)}else{var n=ja(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ue(l,l.return,o)}}a&64&&pf(l),a&512&&Jn(l,l.return);break;case 3:if(Sl(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{sd(e,t)}catch(o){Ue(l,l.return,o)}}break;case 27:t===null&&a&4&&yf(l);case 26:case 5:Sl(e,l),t===null&&a&4&&gf(l),a&512&&Jn(l,l.return);break;case 12:Sl(e,l);break;case 31:Sl(e,l),a&4&&wf(e,l);break;case 13:Sl(e,l),a&4&&Tf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Bx.bind(null,l),sp(e,l))));break;case 22:if(a=l.memoizedState!==null||yl,!a){t=t!==null&&t.memoizedState!==null||it,n=yl;var i=it;yl=a,(it=t)&&!i?Nl(e,l,(l.subtreeFlags&8772)!==0):Sl(e,l),yl=n,it=i}break;case 30:break;default:Sl(e,l)}}function Nf(e){var t=e.alternate;t!==null&&(e.alternate=null,Nf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&tu(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 Ze=null,St=!1;function jl(e,t,l){for(l=l.child;l!==null;)Ef(e,t,l),l=l.sibling}function Ef(e,t,l){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(bn,l)}catch{}switch(l.tag){case 26:it||il(l,t),jl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:it||il(l,t);var a=Ze,n=St;Pl(l.type)&&(Ze=l.stateNode,St=!1),jl(e,t,l),ns(l.stateNode),Ze=a,St=n;break;case 5:it||il(l,t);case 6:if(a=Ze,n=St,Ze=null,jl(e,t,l),Ze=a,St=n,Ze!==null)if(St)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(l.stateNode)}catch(i){Ue(l,t,i)}else try{Ze.removeChild(l.stateNode)}catch(i){Ue(l,t,i)}break;case 18:Ze!==null&&(St?(e=Ze,pm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),cn(e)):pm(Ze,l.stateNode));break;case 4:a=Ze,n=St,Ze=l.stateNode.containerInfo,St=!0,jl(e,t,l),Ze=a,St=n;break;case 0:case 11:case 14:case 15:Vl(2,l,t),it||Vl(4,l,t),jl(e,t,l);break;case 1:it||(il(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&vf(l,t,a)),jl(e,t,l);break;case 21:jl(e,t,l);break;case 22:it=(a=it)||l.memoizedState!==null,jl(e,t,l),it=a;break;default:jl(e,t,l)}}function wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{cn(e)}catch(l){Ue(t,t.return,l)}}}function Tf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cn(e)}catch(l){Ue(t,t.return,l)}}function _x(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new jf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new jf),t;default:throw Error(r(435,e.tag))}}function fi(e,t){var l=_x(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=kx.bind(null,e,a);a.then(n,n)}})}function Nt(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(Pl(h.type)){Ze=h.stateNode,St=!1;break e}break;case 5:Ze=h.stateNode,St=!1;break e;case 3:case 4:Ze=h.stateNode.containerInfo,St=!0;break e}h=h.return}if(Ze===null)throw Error(r(160));Ef(i,o,n),Ze=null,St=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cf(t,e),t=t.sibling}var Wt=null;function Cf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Nt(t,e),Et(e),a&4&&(Vl(3,e,e.return),Kn(3,e),Vl(5,e,e.return));break;case 1:Nt(t,e),Et(e),a&512&&(it||l===null||il(l,l.return)),a&64&&yl&&(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(Nt(t,e),Et(e),a&512&&(it||l===null||il(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[Sn]||i[ot]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),ht(i,a,l),i[ot]=e,rt(i),a=i;break e;case"link":var o=Cm("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),ht(i,a,l),n.head.appendChild(i);break;case"meta":if(o=Cm("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),ht(i,a,l),n.head.appendChild(i);break;default:throw Error(r(468,a))}i[ot]=e,rt(i),a=i}e.stateNode=a}else Rm(n,e.type,e.stateNode);else e.stateNode=Tm(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Rm(n,e.type,e.stateNode):Tm(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Sr(e,e.memoizedProps,l.memoizedProps)}break;case 27:Nt(t,e),Et(e),a&512&&(it||l===null||il(l,l.return)),l!==null&&a&4&&Sr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Nt(t,e),Et(e),a&512&&(it||l===null||il(l,l.return)),e.flags&32){n=e.stateNode;try{_a(n,"")}catch(ee){Ue(e,e.return,ee)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Sr(e,n,l!==null?l.memoizedProps:n)),a&1024&&(wr=!0);break;case 6:if(Nt(t,e),Et(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ee){Ue(e,e.return,ee)}}break;case 3:if(Ri=null,n=Wt,Wt=Ti(t.containerInfo),Nt(t,e),Wt=n,Et(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{cn(t.containerInfo)}catch(ee){Ue(e,e.return,ee)}wr&&(wr=!1,Rf(e));break;case 4:a=Wt,Wt=Ti(e.stateNode.containerInfo),Nt(t,e),Et(e),Wt=a;break;case 12:Nt(t,e),Et(e);break;case 31:Nt(t,e),Et(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,fi(e,a)));break;case 13:Nt(t,e),Et(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(hi=Fe()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,fi(e,a)));break;case 22:n=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,_=yl,H=it;if(yl=_||n,it=H||j,Nt(t,e),it=H,yl=_,Et(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||j||yl||it||Sa(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 G=j.memoizedProps.style,D=G!=null&&G.hasOwnProperty("display")?G.display:null;h.style.display=D==null||typeof D=="boolean"?"":(""+D).trim()}}catch(ee){Ue(j,j.return,ee)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=n?"":j.memoizedProps}catch(ee){Ue(j,j.return,ee)}}}else if(t.tag===18){if(l===null){j=t;try{var O=j.stateNode;n?vm(O,!0):vm(j.stateNode,!1)}catch(ee){Ue(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,fi(e,l))));break;case 19:Nt(t,e),Et(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,fi(e,a)));break;case 30:break;case 21:break;default:Nt(t,e),Et(e)}}function Et(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(bf(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var n=l.stateNode,i=Nr(e);di(e,i,n);break;case 5:var o=l.stateNode;l.flags&32&&(_a(o,""),l.flags&=-33);var h=Nr(e);di(e,h,o);break;case 3:case 4:var j=l.stateNode.containerInfo,_=Nr(e);Er(e,_,j);break;default:throw Error(r(161))}}catch(H){Ue(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Rf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sf(e,t.alternate,t),t=t.sibling}function Sa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vl(4,t,t.return),Sa(t);break;case 1:il(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&vf(t,t.return,l),Sa(t);break;case 27:ns(t.stateNode);case 26:case 5:il(t,t.return),Sa(t);break;case 22:t.memoizedState===null&&Sa(t);break;case 30:Sa(t);break;default:Sa(t)}e=e.sibling}}function Nl(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:Nl(n,i,l),Kn(4,i);break;case 1:if(Nl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(_){Ue(a,a.return,_)}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++)nd(j[n],h)}catch(_){Ue(a,a.return,_)}}l&&o&64&&pf(i),Jn(i,i.return);break;case 27:yf(i);case 26:case 5:Nl(n,i,l),l&&a===null&&o&4&&gf(i),Jn(i,i.return);break;case 12:Nl(n,i,l);break;case 31:Nl(n,i,l),l&&o&4&&wf(n,i);break;case 13:Nl(n,i,l),l&&o&4&&Tf(n,i);break;case 22:i.memoizedState===null&&Nl(n,i,l),Jn(i,i.return);break;case 30:break;default:Nl(n,i,l)}t=t.sibling}}function Tr(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&&Un(l))}function Cr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Un(e))}function It(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Af(e,t,l,a),t=t.sibling}function Af(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:It(e,t,l,a),n&2048&&Kn(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&&Un(e)));break;case 12:if(n&2048){It(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Ue(t,t.return,j)}}else It(e,t,l,a);break;case 31:It(e,t,l,a);break;case 13:It(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?It(e,t,l,a):Fn(e,t):i._visibility&2?It(e,t,l,a):(i._visibility|=2,Pa(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Tr(o,t);break;case 24:It(e,t,l,a),n&2048&&Cr(t.alternate,t);break;default:It(e,t,l,a)}}function Pa(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,_=o.flags;switch(o.tag){case 0:case 11:case 15:Pa(i,o,h,j,n),Kn(8,o);break;case 23:break;case 22:var H=o.stateNode;o.memoizedState!==null?H._visibility&2?Pa(i,o,h,j,n):Fn(i,o):(H._visibility|=2,Pa(i,o,h,j,n)),n&&_&2048&&Tr(o.alternate,o);break;case 24:Pa(i,o,h,j,n),n&&_&2048&&Cr(o.alternate,o);break;default:Pa(i,o,h,j,n)}t=t.sibling}}function Fn(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:Fn(l,a),n&2048&&Tr(a.alternate,a);break;case 24:Fn(l,a),n&2048&&Cr(a.alternate,a);break;default:Fn(l,a)}t=t.sibling}}var Pn=8192;function Wa(e,t,l){if(e.subtreeFlags&Pn)for(e=e.child;e!==null;)Mf(e,t,l),e=e.sibling}function Mf(e,t,l){switch(e.tag){case 26:Wa(e,t,l),e.flags&Pn&&e.memoizedState!==null&&vp(l,Wt,e.memoizedState,e.memoizedProps);break;case 5:Wa(e,t,l);break;case 3:case 4:var a=Wt;Wt=Ti(e.stateNode.containerInfo),Wa(e,t,l),Wt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Pn,Pn=16777216,Wa(e,t,l),Pn=a):Wa(e,t,l));break;default:Wa(e,t,l)}}function _f(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 Wn(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];ct=a,zf(a,e)}_f(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Df(e),e=e.sibling}function Df(e){switch(e.tag){case 0:case 11:case 15:Wn(e),e.flags&2048&&Vl(9,e,e.return);break;case 3:Wn(e);break;case 12:Wn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mi(e)):Wn(e);break;default:Wn(e)}}function mi(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];ct=a,zf(a,e)}_f(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vl(8,t,t.return),mi(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,mi(t));break;default:mi(t)}e=e.sibling}}function zf(e,t){for(;ct!==null;){var l=ct;switch(l.tag){case 0:case 11:case 15:Vl(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:Un(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,ct=a;else e:for(l=e;ct!==null;){a=ct;var n=a.sibling,i=a.return;if(Nf(a),a===l){ct=null;break e}if(n!==null){n.return=i,ct=n;break e}ct=i}}}var Dx={getCacheForType:function(e){var t=ft(at),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return ft(at).controller.signal}},zx=typeof WeakMap=="function"?WeakMap:Map,_e=0,ke=null,ge=null,je=0,Oe=0,Ot=null,Xl=!1,Ia=!1,Rr=!1,El=0,We=0,Zl=0,Na=0,Ar=0,Ut=0,en=0,In=null,wt=null,Mr=!1,hi=0,Of=0,xi=1/0,pi=null,$l=null,ut=0,Kl=null,tn=null,wl=0,_r=0,Dr=null,Uf=null,es=0,zr=null;function qt(){return(_e&2)!==0&&je!==0?je&-je:U.T!==null?Br():Jc()}function qf(){if(Ut===0)if((je&536870912)===0||Ee){var e=Es;Es<<=1,(Es&3932160)===0&&(Es=262144),Ut=e}else Ut=536870912;return e=Dt.current,e!==null&&(e.flags|=32),Ut}function Tt(e,t,l){(e===ke&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(ln(e,0),Jl(e,je,Ut,!1)),jn(e,l),((_e&2)===0||e!==ke)&&(e===ke&&((_e&2)===0&&(Na|=l),We===4&&Jl(e,je,Ut,!1)),ul(e))}function Hf(e,t,l){if((_e&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||yn(e,t),n=a?qx(e,t):Ur(e,t,!0),i=a;do{if(n===0){Ia&&!a&&Jl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Ox(l)){n=Ur(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=In;var j=h.current.memoizedState.isDehydrated;if(j&&(ln(h,o).flags|=256),o=Ur(h,o,!1),o!==2){if(Rr&&!j){h.errorRecoveryDisabledLanes|=i,Na|=i,n=4;break e}i=wt,wt=n,i!==null&&(wt===null?wt=i:wt.push.apply(wt,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){ln(e,0),Jl(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:Jl(a,t,Ut,!Xl);break e;case 2:wt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(n=hi+300-Fe(),10<n)){if(Jl(a,t,Ut,!Xl),Ts(a,0,!0)!==0)break e;wl=t,a.timeoutHandle=hm(Lf.bind(null,a,l,wt,pi,Mr,t,Ut,Na,en,Xl,i,"Throttled",-0,0),n);break e}Lf(a,l,wt,pi,Mr,t,Ut,Na,en,Xl,i,null,-0,0)}}break}while(!0);ul(e)}function Lf(e,t,l,a,n,i,o,h,j,_,H,G,D,O){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},Mf(t,i,G);var ee=(i&62914560)===i?hi-Fe():(i&4194048)===i?Of-Fe():0;if(ee=gp(G,ee),ee!==null){wl=i,e.cancelPendingCommit=ee(Zf.bind(null,e,t,i,l,a,n,o,h,j,H,G,null,D,O)),Jl(e,i,o,!_);return}}Zf(e,t,i,l,a,n,o,h,j)}function Ox(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!Mt(i(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Jl(e,t,l,a){t&=~Ar,t&=~Na,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-At(n),o=1<<i;a[i]=-1,n&=~o}l!==0&&Zc(e,l,t)}function vi(){return(_e&6)===0?(ts(0),!1):!0}function Or(){if(ge!==null){if(Oe===0)var e=ge.return;else e=ge,hl=ha=null,Fu(e),Za=null,Hn=0,e=ge;for(;e!==null;)xf(e.alternate,e),e=e.return;ge=null}}function ln(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,ep(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),wl=0,Or(),ke=e,ge=l=fl(e.current,null),je=t,Oe=0,Ot=null,Xl=!1,Ia=yn(e,t),Rr=!1,en=Ut=Ar=Na=Zl=We=0,wt=In=null,Mr=!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-At(a),i=1<<n;t|=e[n],a&=~i}return El=t,Ls(),l}function Bf(e,t){xe=null,U.H=Xn,t===Xa||t===Zs?(t=ed(),Oe=3):t===Lu?(t=ed(),Oe=4):Oe=t===fr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ot=t,ge===null&&(We=1,ii(e,Gt(t,e.current)))}function kf(){var e=Dt.current;return e===null?!0:(je&4194048)===je?Zt===null:(je&62914560)===je||(je&536870912)!==0?e===Zt:!1}function Yf(){var e=U.H;return U.H=Xn,e===null?Xn:e}function Gf(){var e=U.A;return U.A=Dx,e}function gi(){We=4,Xl||(je&4194048)!==je&&Dt.current!==null||(Ia=!0),(Zl&134217727)===0&&(Na&134217727)===0||ke===null||Jl(ke,je,Ut,!1)}function Ur(e,t,l){var a=_e;_e|=2;var n=Yf(),i=Gf();(ke!==e||je!==t)&&(pi=null,ln(e,t)),t=!1;var o=We;e:do try{if(Oe!==0&&ge!==null){var h=ge,j=Ot;switch(Oe){case 8:Or(),o=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var _=Oe;if(Oe=0,Ot=null,an(e,h,j,_),l&&Ia){o=0;break e}break;default:_=Oe,Oe=0,Ot=null,an(e,h,j,_)}}Ux(),o=We;break}catch(H){Bf(e,H)}while(!0);return t&&e.shellSuspendCounter++,hl=ha=null,_e=a,U.H=n,U.A=i,ge===null&&(ke=null,je=0,Ls()),o}function Ux(){for(;ge!==null;)Qf(ge)}function qx(e,t){var l=_e;_e|=2;var a=Yf(),n=Gf();ke!==e||je!==t?(pi=null,xi=Fe()+500,ln(e,t)):Ia=yn(e,t);e:do try{if(Oe!==0&&ge!==null){t=ge;var i=Ot;t:switch(Oe){case 1:Oe=0,Ot=null,an(e,t,i,1);break;case 2:case 9:if(Wo(i)){Oe=0,Ot=null,Vf(t);break}t=function(){Oe!==2&&Oe!==9||ke!==e||(Oe=7),ul(e)},i.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:Wo(i)?(Oe=0,Ot=null,Vf(t)):(Oe=0,Ot=null,an(e,t,i,7));break;case 5:var o=null;switch(ge.tag){case 26:o=ge.memoizedState;case 5:case 27:var h=ge;if(o?Am(o):h.stateNode.complete){Oe=0,Ot=null;var j=h.sibling;if(j!==null)ge=j;else{var _=h.return;_!==null?(ge=_,bi(_)):ge=null}break t}}Oe=0,Ot=null,an(e,t,i,5);break;case 6:Oe=0,Ot=null,an(e,t,i,6);break;case 8:Or(),We=6;break e;default:throw Error(r(462))}}Hx();break}catch(H){Bf(e,H)}while(!0);return hl=ha=null,U.H=a,U.A=n,_e=l,ge!==null?0:(ke=null,je=0,Ls(),We)}function Hx(){for(;ge!==null&&!ll();)Qf(ge)}function Qf(e){var t=mf(e.alternate,e,El);e.memoizedProps=e.pendingProps,t===null?bi(e):ge=t}function Vf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=uf(l,t,t.pendingProps,t.type,void 0,je);break;case 11:t=uf(l,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:Fu(t);default:xf(l,t),t=ge=Yo(t,El),t=mf(l,t,El)}e.memoizedProps=e.pendingProps,t===null?bi(e):ge=t}function an(e,t,l,a){hl=ha=null,Fu(t),Za=null,Hn=0;var n=t.return;try{if(wx(e,n,t,l,je)){We=1,ii(e,Gt(l,e.current)),ge=null;return}}catch(i){if(n!==null)throw ge=n,i;We=1,ii(e,Gt(l,e.current)),ge=null;return}t.flags&32768?(Ee||a===1?e=!0:Ia||(je&536870912)!==0?e=!1:(Xl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Dt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Xf(t,e)):bi(t)}function bi(e){var t=e;do{if((t.flags&32768)!==0){Xf(t,Xl);return}e=t.return;var l=Rx(t.alternate,t,El);if(l!==null){ge=l;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);We===0&&(We=5)}function Xf(e,t){do{var l=Ax(e.alternate,e);if(l!==null){l.flags&=32767,ge=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=l}while(e!==null);We=6,ge=null}function Zf(e,t,l,a,n,i,o,h,j){e.cancelPendingCommit=null;do yi();while(ut!==0);if((_e&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=Nu,p0(e,l,i,o,h,j),e===ke&&(ge=ke=null,je=0),tn=t,Kl=e,wl=l,_r=i,Dr=n,Uf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Yx(Ss,function(){return Pf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null,n=Z.p,Z.p=2,o=_e,_e|=4;try{Mx(e,t,l)}finally{_e=o,Z.p=n,U.T=a}}ut=1,$f(),Kf(),Jf()}}function $f(){if(ut===1){ut=0;var e=Kl,t=tn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null;var a=Z.p;Z.p=2;var n=_e;_e|=4;try{Cf(t,e);var i=$r,o=Do(e.containerInfo),h=i.focusedElem,j=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&_o(h.ownerDocument.documentElement,h)){if(j!==null&&gu(h)){var _=j.start,H=j.end;if(H===void 0&&(H=_),"selectionStart"in h)h.selectionStart=_,h.selectionEnd=Math.min(H,h.value.length);else{var G=h.ownerDocument||document,D=G&&G.defaultView||window;if(D.getSelection){var O=D.getSelection(),ee=h.textContent.length,re=Math.min(j.start,ee),Le=j.end===void 0?re:Math.min(j.end,ee);!O.extend&&re>Le&&(o=Le,Le=re,re=o);var R=Mo(h,re),E=Mo(h,Le);if(R&&E&&(O.rangeCount!==1||O.anchorNode!==R.node||O.anchorOffset!==R.offset||O.focusNode!==E.node||O.focusOffset!==E.offset)){var M=G.createRange();M.setStart(R.node,R.offset),O.removeAllRanges(),re>Le?(O.addRange(M),O.extend(E.node,E.offset)):(M.setEnd(E.node,E.offset),O.addRange(M))}}}}for(G=[],O=h;O=O.parentNode;)O.nodeType===1&&G.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<G.length;h++){var Y=G[h];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Di=!!Zr,$r=Zr=null}finally{_e=n,Z.p=a,U.T=l}}e.current=t,ut=2}}function Kf(){if(ut===2){ut=0;var e=Kl,t=tn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=U.T,U.T=null;var a=Z.p;Z.p=2;var n=_e;_e|=4;try{Sf(e,t.alternate,t)}finally{_e=n,Z.p=a,U.T=l}}ut=3}}function Jf(){if(ut===4||ut===3){ut=0,al();var e=Kl,t=tn,l=wl,a=Uf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,tn=Kl=null,Ff(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&($l=null),Ii(l),t=t.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(bn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=U.T,n=Z.p,Z.p=2,U.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{U.T=t,Z.p=n}}(wl&3)!==0&&yi(),ul(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===zr?es++:(es=0,zr=e):es=0,ts(0)}}function Ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Un(t)))}function yi(){return $f(),Kf(),Jf(),Pf()}function Pf(){if(ut!==5)return!1;var e=Kl,t=_r;_r=0;var l=Ii(wl),a=U.T,n=Z.p;try{Z.p=32>l?32:l,U.T=null,l=Dr,Dr=null;var i=Kl,o=wl;if(ut=0,tn=Kl=null,wl=0,(_e&6)!==0)throw Error(r(331));var h=_e;if(_e|=4,Df(i.current),Af(i,i.current,o,l),_e=h,ts(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(bn,i)}catch{}return!0}finally{Z.p=n,U.T=a,Ff(e,t)}}function Wf(e,t,l){t=Gt(l,t),t=dr(e.stateNode,t,2),e=Yl(e,t,2),e!==null&&(jn(e,2),ul(e))}function Ue(e,t,l){if(e.tag===3)Wf(e,e,l);else for(;t!==null;){if(t.tag===3){Wf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&($l===null||!$l.has(a))){e=Gt(l,e),l=Wd(2),a=Yl(t,l,2),a!==null&&(Id(l,a,t,e),jn(a,2),ul(a));break}}t=t.return}}function qr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new zx;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)||(Rr=!0,n.add(l),e=Lx.bind(null,e,t,l),t.then(e,e))}function Lx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,ke===e&&(je&l)===l&&(We===4||We===3&&(je&62914560)===je&&300>Fe()-hi?(_e&2)===0&&ln(e,0):Ar|=l,en===je&&(en=0)),ul(e)}function If(e,t){t===0&&(t=Xc()),e=da(e,t),e!==null&&(jn(e,t),ul(e))}function Bx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),If(e,l)}function kx(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),If(e,l)}function Yx(e,t){return Qe(e,t)}var ji=null,nn=null,Hr=!1,Si=!1,Lr=!1,Fl=0;function ul(e){e!==nn&&e.next===null&&(nn===null?ji=nn=e:nn=nn.next=e),Si=!0,Hr||(Hr=!0,Qx())}function ts(e,t){if(!Lr&&Si){Lr=!0;do for(var l=!1,a=ji;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-At(42|e)+1)-1,i&=n&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,am(a,i))}else i=je,i=Ts(a,a===ke?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||yn(a,i)||(l=!0,am(a,i));a=a.next}while(l);Lr=!1}}function Gx(){em()}function em(){Si=Hr=!1;var e=0;Fl!==0&&Ix()&&(e=Fl);for(var t=Fe(),l=null,a=ji;a!==null;){var n=a.next,i=tm(a,t);i===0?(a.next=null,l===null?ji=n:l.next=n,n===null&&(nn=l)):(l=a,(e!==0||(i&3)!==0)&&(Si=!0)),a=n}ut!==0&&ut!==5||ts(e),Fl!==0&&(Fl=0)}function tm(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-At(i),h=1<<o,j=n[o];j===-1?((h&l)===0||(h&a)!==0)&&(n[o]=x0(h,t)):j<=t&&(e.expiredLanes|=h),i&=~h}if(t=ke,l=je,l=Ts(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&bt(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||yn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&bt(a),Ii(l)){case 2:case 8:l=Qc;break;case 32:l=Ss;break;case 268435456:l=Vc;break;default:l=Ss}return a=lm.bind(null,e),l=Qe(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&bt(a),e.callbackPriority=2,e.callbackNode=null,2}function lm(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(yi()&&e.callbackNode!==l)return null;var a=je;return a=Ts(e,e===ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Hf(e,a,t),tm(e,Fe()),e.callbackNode!=null&&e.callbackNode===l?lm.bind(null,e):null)}function am(e,t){if(yi())return null;Hf(e,t,!0)}function Qx(){tp(function(){(_e&6)!==0?Qe(Gc,Gx):em()})}function Br(){if(Fl===0){var e=Qa;e===0&&(e=Ns,Ns<<=1,(Ns&261888)===0&&(Ns=256)),Fl=e}return Fl}function nm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ms(""+e)}function sm(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 Vx(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=nm((n[yt]||null).action),o=a.submitter;o&&(t=(t=o[yt]||null)?nm(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new Os("action","action",null,a,n);e.push({event:h,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Fl!==0){var j=o?sm(n,o):new FormData(n);sr(l,{pending:!0,data:j,method:n.method,action:i},null,j)}}else typeof i=="function"&&(h.preventDefault(),j=o?sm(n,o):new FormData(n),sr(l,{pending:!0,data:j,method:n.method,action:i},i,j))},currentTarget:n}]})}}for(var kr=0;kr<Su.length;kr++){var Yr=Su[kr],Xx=Yr.toLowerCase(),Zx=Yr[0].toUpperCase()+Yr.slice(1);Pt(Xx,"on"+Zx)}Pt(Uo,"onAnimationEnd"),Pt(qo,"onAnimationIteration"),Pt(Ho,"onAnimationStart"),Pt("dblclick","onDoubleClick"),Pt("focusin","onFocus"),Pt("focusout","onBlur"),Pt(rx,"onTransitionRun"),Pt(cx,"onTransitionStart"),Pt(ox,"onTransitionCancel"),Pt(Lo,"onTransitionEnd"),Aa("onMouseEnter",["mouseout","mouseover"]),Aa("onMouseLeave",["mouseout","mouseover"]),Aa("onPointerEnter",["pointerout","pointerover"]),Aa("onPointerLeave",["pointerout","pointerover"]),ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ua("onBeforeInput",["compositionend","keypress","textInput","paste"]),ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ls="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(" "),$x=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ls));function im(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,_=h.currentTarget;if(h=h.listener,j!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=_;try{i(n)}catch(H){Hs(H)}n.currentTarget=null,i=j}else for(o=0;o<a.length;o++){if(h=a[o],j=h.instance,_=h.currentTarget,h=h.listener,j!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=_;try{i(n)}catch(H){Hs(H)}n.currentTarget=null,i=j}}}}function be(e,t){var l=t[eu];l===void 0&&(l=t[eu]=new Set);var a=e+"__bubble";l.has(a)||(um(t,e,2,!1),l.add(a))}function Gr(e,t,l){var a=0;t&&(a|=4),um(l,e,a,t)}var Ni="_reactListening"+Math.random().toString(36).slice(2);function Qr(e){if(!e[Ni]){e[Ni]=!0,Wc.forEach(function(l){l!=="selectionchange"&&($x.has(l)||Gr(l,!1,e),Gr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ni]||(t[Ni]=!0,Gr("selectionchange",!1,t))}}function um(e,t,l,a){switch(qm(t)){case 2:var n=jp;break;case 8:n=Sp;break;default:n=nc}l=n.bind(null,t,l,e),n=void 0,!cu||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 Vr(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=Ta(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}oo(function(){var _=i,H=uu(l),G=[];e:{var D=Bo.get(e);if(D!==void 0){var O=Os,ee=e;switch(e){case"keypress":if(Ds(l)===0)break e;case"keydown":case"keyup":O=k0;break;case"focusin":ee="focus",O=mu;break;case"focusout":ee="blur",O=mu;break;case"beforeblur":case"afterblur":O=mu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=ho;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=R0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Q0;break;case Uo:case qo:case Ho:O=_0;break;case Lo:O=X0;break;case"scroll":case"scrollend":O=T0;break;case"wheel":O=$0;break;case"copy":case"cut":case"paste":O=z0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=po;break;case"toggle":case"beforetoggle":O=J0}var re=(t&4)!==0,Le=!re&&(e==="scroll"||e==="scrollend"),R=re?D!==null?D+"Capture":null:D;re=[];for(var E=_,M;E!==null;){var Y=E;if(M=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||M===null||R===null||(Y=En(E,R),Y!=null&&re.push(as(E,Y,M))),Le)break;E=E.return}0<re.length&&(D=new O(D,ee,null,l,H),G.push({event:D,listeners:re}))}}if((t&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",D&&l!==iu&&(ee=l.relatedTarget||l.fromElement)&&(Ta(ee)||ee[wa]))break e;if((O||D)&&(D=H.window===H?H:(D=H.ownerDocument)?D.defaultView||D.parentWindow:window,O?(ee=l.relatedTarget||l.toElement,O=_,ee=ee?Ta(ee):null,ee!==null&&(Le=x(ee),re=ee.tag,ee!==Le||re!==5&&re!==27&&re!==6)&&(ee=null)):(O=null,ee=_),O!==ee)){if(re=ho,Y="onMouseLeave",R="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(re=po,Y="onPointerLeave",R="onPointerEnter",E="pointer"),Le=O==null?D:Nn(O),M=ee==null?D:Nn(ee),D=new re(Y,E+"leave",O,l,H),D.target=Le,D.relatedTarget=M,Y=null,Ta(H)===_&&(re=new re(R,E+"enter",ee,l,H),re.target=M,re.relatedTarget=Le,Y=re),Le=Y,O&&ee)t:{for(re=Kx,R=O,E=ee,M=0,Y=R;Y;Y=re(Y))M++;Y=0;for(var ne=E;ne;ne=re(ne))Y++;for(;0<M-Y;)R=re(R),M--;for(;0<Y-M;)E=re(E),Y--;for(;M--;){if(R===E||E!==null&&R===E.alternate){re=R;break t}R=re(R),E=re(E)}re=null}else re=null;O!==null&&rm(G,D,O,re,!1),ee!==null&&Le!==null&&rm(G,Le,ee,re,!0)}}e:{if(D=_?Nn(_):window,O=D.nodeName&&D.nodeName.toLowerCase(),O==="select"||O==="input"&&D.type==="file")var Re=Eo;else if(So(D))if(wo)Re=sx;else{Re=ax;var te=lx}else O=D.nodeName,!O||O.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?_&&su(_.elementType)&&(Re=Eo):Re=nx;if(Re&&(Re=Re(e,_))){No(G,Re,l,H);break e}te&&te(e,D,_),e==="focusout"&&_&&D.type==="number"&&_.memoizedProps.value!=null&&nu(D,"number",D.value)}switch(te=_?Nn(_):window,e){case"focusin":(So(te)||te.contentEditable==="true")&&(Ua=te,bu=_,Dn=null);break;case"focusout":Dn=bu=Ua=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,zo(G,l,H);break;case"selectionchange":if(ux)break;case"keydown":case"keyup":zo(G,l,H)}var pe;if(xu)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 Oa?yo(e,l)&&(Se="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(vo&&l.locale!=="ko"&&(Oa||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Oa&&(pe=fo()):(Ol=H,ou="value"in Ol?Ol.value:Ol.textContent,Oa=!0)),te=Ei(_,Se),0<te.length&&(Se=new xo(Se,e,null,l,H),G.push({event:Se,listeners:te}),pe?Se.data=pe:(pe=jo(l),pe!==null&&(Se.data=pe)))),(pe=P0?W0(e,l):I0(e,l))&&(Se=Ei(_,"onBeforeInput"),0<Se.length&&(te=new xo("onBeforeInput","beforeinput",null,l,H),G.push({event:te,listeners:Se}),te.data=pe)),Vx(G,e,_,l,H)}im(G,t)})}function as(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Ei(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=En(e,l),n!=null&&a.unshift(as(e,n,i)),n=En(e,t),n!=null&&a.push(as(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Kx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rm(e,t,l,a,n){for(var i=t._reactName,o=[];l!==null&&l!==a;){var h=l,j=h.alternate,_=h.stateNode;if(h=h.tag,j!==null&&j===a)break;h!==5&&h!==26&&h!==27||_===null||(j=_,n?(_=En(l,i),_!=null&&o.unshift(as(l,_,j))):n||(_=En(l,i),_!=null&&o.push(as(l,_,j)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var Jx=/\r\n?/g,Fx=/\u0000|\uFFFD/g;function cm(e){return(typeof e=="string"?e:""+e).replace(Jx,`
|
|
49
|
+
`).replace(Fx,"")}function om(e,t){return t=cm(t),cm(e)===t}function He(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||_a(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&_a(e,""+a);break;case"className":Rs(e,"class",a);break;case"tabIndex":Rs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Rs(e,l,a);break;case"style":ro(e,a,i);break;case"data":if(t!=="object"){Rs(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=Ms(""+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"&&He(e,t,"name",n.name,n,null),He(e,t,"formEncType",n.formEncType,n,null),He(e,t,"formMethod",n.formMethod,n,null),He(e,t,"formTarget",n.formTarget,n,null)):(He(e,t,"encType",n.encType,n,null),He(e,t,"method",n.method,n,null),He(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Ms(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=ol);break;case"onScroll":a!=null&&be("scroll",e);break;case"onScrollEnd":a!=null&&be("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=Ms(""+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":be("beforetoggle",e),be("toggle",e),Cs(e,"popover",a);break;case"xlinkActuate":cl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":cl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":cl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":cl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":cl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":cl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":cl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":cl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":cl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Cs(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=E0.get(l)||l,Cs(e,l,a))}}function Xr(e,t,l,a,n,i){switch(l){case"style":ro(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"?_a(e,a):(typeof a=="number"||typeof a=="bigint")&&_a(e,""+a);break;case"onScroll":a!=null&&be("scroll",e);break;case"onScrollEnd":a!=null&&be("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ol);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ic.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[yt]||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,""):Cs(e,l,a)}}}function ht(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("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:He(e,t,i,o,l,null)}}n&&He(e,t,"srcSet",l.srcSet,l,null),a&&He(e,t,"src",l.src,l,null);return;case"input":be("invalid",e);var h=i=o=n=null,j=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var H=l[a];if(H!=null)switch(a){case"name":n=H;break;case"type":o=H;break;case"checked":j=H;break;case"defaultChecked":_=H;break;case"value":i=H;break;case"defaultValue":h=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:He(e,t,a,H,l,null)}}no(e,i,h,j,_,o,n,!1);return;case"select":be("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:He(e,t,n,h,l,null)}t=i,l=o,e.multiple=!!a,t!=null?Ma(e,!!a,t,!1):l!=null&&Ma(e,!!a,l,!0);return;case"textarea":be("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:He(e,t,o,h,l,null)}io(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:He(e,t,j,a,l,null)}return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(a=0;a<ls.length;a++)be(ls[a],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("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(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:He(e,t,_,a,l,null)}return;default:if(su(t)){for(H in l)l.hasOwnProperty(H)&&(a=l[H],a!==void 0&&Xr(e,t,H,a,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!=null&&He(e,t,h,a,l,null))}function Px(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,_=null,H=null;for(O in l){var G=l[O];if(l.hasOwnProperty(O)&&G!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":j=G;default:a.hasOwnProperty(O)||He(e,t,O,null,a,G)}}for(var D in a){var O=a[D];if(G=l[D],a.hasOwnProperty(D)&&(O!=null||G!=null))switch(D){case"type":i=O;break;case"name":n=O;break;case"checked":_=O;break;case"defaultChecked":H=O;break;case"value":o=O;break;case"defaultValue":h=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==G&&He(e,t,D,O,a,G)}}au(e,o,h,j,_,H,i,n);return;case"select":O=o=h=D=null;for(i in l)if(j=l[i],l.hasOwnProperty(i)&&j!=null)switch(i){case"value":break;case"multiple":O=j;default:a.hasOwnProperty(i)||He(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":D=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==j&&He(e,t,n,i,a,j)}t=h,l=o,a=O,D!=null?Ma(e,!!l,D,!1):!!a!=!!l&&(t!=null?Ma(e,!!l,t,!0):Ma(e,!!l,l?[]:"",!1));return;case"textarea":O=D=null;for(h in l)if(n=l[h],l.hasOwnProperty(h)&&n!=null&&!a.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:He(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":D=n;break;case"defaultValue":O=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(r(91));break;default:n!==i&&He(e,t,o,n,a,i)}so(e,D,O);return;case"option":for(var ee in l)if(D=l[ee],l.hasOwnProperty(ee)&&D!=null&&!a.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:He(e,t,ee,null,a,D)}for(j in a)if(D=a[j],O=l[j],a.hasOwnProperty(j)&&D!==O&&(D!=null||O!=null))switch(j){case"selected":e.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:He(e,t,j,D,a,O)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var re in l)D=l[re],l.hasOwnProperty(re)&&D!=null&&!a.hasOwnProperty(re)&&He(e,t,re,null,a,D);for(_ in a)if(D=a[_],O=l[_],a.hasOwnProperty(_)&&D!==O&&(D!=null||O!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:He(e,t,_,D,a,O)}return;default:if(su(t)){for(var Le in l)D=l[Le],l.hasOwnProperty(Le)&&D!==void 0&&!a.hasOwnProperty(Le)&&Xr(e,t,Le,void 0,a,D);for(H in a)D=a[H],O=l[H],!a.hasOwnProperty(H)||D===O||D===void 0&&O===void 0||Xr(e,t,H,D,a,O);return}}for(var R in l)D=l[R],l.hasOwnProperty(R)&&D!=null&&!a.hasOwnProperty(R)&&He(e,t,R,null,a,D);for(G in a)D=a[G],O=l[G],!a.hasOwnProperty(G)||D===O||D==null&&O==null||He(e,t,G,D,a,O)}function dm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Wx(){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&&dm(o)){for(o=0,h=n.responseEnd,a+=1;a<l.length;a++){var j=l[a],_=j.startTime;if(_>h)break;var H=j.transferSize,G=j.initiatorType;H&&dm(G)&&(j=j.responseEnd,o+=H*(j<h?1:(h-_)/(j-_)))}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 Zr=null,$r=null;function wi(e){return e.nodeType===9?e:e.ownerDocument}function fm(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 mm(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 Kr(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 Jr=null;function Ix(){var e=window.event;return e&&e.type==="popstate"?e===Jr?!1:(Jr=e,!0):(Jr=null,!1)}var hm=typeof setTimeout=="function"?setTimeout:void 0,ep=typeof clearTimeout=="function"?clearTimeout:void 0,xm=typeof Promise=="function"?Promise:void 0,tp=typeof queueMicrotask=="function"?queueMicrotask:typeof xm<"u"?function(e){return xm.resolve(null).then(e).catch(lp)}:hm;function lp(e){setTimeout(function(){throw e})}function Pl(e){return e==="head"}function pm(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),cn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")ns(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ns(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[Sn]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&ns(e.ownerDocument.body);l=n}while(l);cn(t)}function vm(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 Fr(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":Fr(l),tu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function ap(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[Sn])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 np(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 gm(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 Pr(e){return e.data==="$?"||e.data==="$~"}function Wr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function sp(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 Ir=null;function bm(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 ym(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 jm(e,t,l){switch(t=wi(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 ns(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);tu(e)}var Kt=new Map,Sm=new Set;function Ti(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tl=Z.d;Z.d={f:ip,r:up,D:rp,C:cp,L:op,m:dp,X:mp,S:fp,M:hp};function ip(){var e=Tl.f(),t=vi();return e||t}function up(e){var t=Ca(e);t!==null&&t.tag===5&&t.type==="form"?Ld(t):Tl.r(e)}var sn=typeof document>"u"?null:document;function Nm(e,t,l){var a=sn;if(a&&typeof t=="string"&&t){var n=kt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Sm.has(n)||(Sm.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),ht(t,"link",e),rt(t),a.head.appendChild(t)))}}function rp(e){Tl.D(e),Nm("dns-prefetch",e,null)}function cp(e,t){Tl.C(e,t),Nm("preconnect",e,t)}function op(e,t,l){Tl.L(e,t,l);var a=sn;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=un(e);break;case"script":i=rn(e)}Kt.has(i)||(e=b({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(ss(i))||t==="script"&&a.querySelector(is(i))||(t=a.createElement("link"),ht(t,"link",e),rt(t),a.head.appendChild(t)))}}function dp(e,t){Tl.m(e,t);var l=sn;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=rn(e)}if(!Kt.has(i)&&(e=b({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(is(i)))return}a=l.createElement("link"),ht(a,"link",e),rt(a),l.head.appendChild(a)}}}function fp(e,t,l){Tl.S(e,t,l);var a=sn;if(a&&e){var n=Ra(a).hoistableStyles,i=un(e);t=t||"default";var o=n.get(i);if(!o){var h={loading:0,preload:null};if(o=a.querySelector(ss(i)))h.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Kt.get(i))&&ec(e,l);var j=o=a.createElement("link");rt(j),ht(j,"link",e),j._p=new Promise(function(_,H){j.onload=_,j.onerror=H}),j.addEventListener("load",function(){h.loading|=1}),j.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Ci(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:h},n.set(i,o)}}}function mp(e,t){Tl.X(e,t);var l=sn;if(l&&e){var a=Ra(l).hoistableScripts,n=rn(e),i=a.get(n);i||(i=l.querySelector(is(n)),i||(e=b({src:e,async:!0},t),(t=Kt.get(n))&&tc(e,t),i=l.createElement("script"),rt(i),ht(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function hp(e,t){Tl.M(e,t);var l=sn;if(l&&e){var a=Ra(l).hoistableScripts,n=rn(e),i=a.get(n);i||(i=l.querySelector(is(n)),i||(e=b({src:e,async:!0,type:"module"},t),(t=Kt.get(n))&&tc(e,t),i=l.createElement("script"),rt(i),ht(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function Em(e,t,l,a){var n=(n=he.current)?Ti(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=un(l.href),l=Ra(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=un(l.href);var i=Ra(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(ss(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||xp(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=rn(l),l=Ra(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 un(e){return'href="'+kt(e)+'"'}function ss(e){return'link[rel="stylesheet"]['+e+"]"}function wm(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function xp(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}),ht(t,"link",l),rt(t),e.head.appendChild(t))}function rn(e){return'[src="'+kt(e)+'"]'}function is(e){return"script[async]"+e}function Tm(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,rt(a),a;var n=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),rt(a),ht(a,"style",n),Ci(a,l.precedence,e),t.instance=a;case"stylesheet":n=un(l.href);var i=e.querySelector(ss(n));if(i)return t.state.loading|=4,t.instance=i,rt(i),i;a=wm(l),(n=Kt.get(n))&&ec(a,n),i=(e.ownerDocument||e).createElement("link"),rt(i);var o=i;return o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),ht(i,"link",a),t.state.loading|=4,Ci(i,l.precedence,e),t.instance=i;case"script":return i=rn(l.src),(n=e.querySelector(is(i)))?(t.instance=n,rt(n),n):(a=l,(n=Kt.get(i))&&(a=b({},l),tc(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),rt(n),ht(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,Ci(a,l.precedence,e));return t.instance}function Ci(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 ec(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ri=null;function Cm(e,t,l){if(Ri===null){var a=new Map,n=Ri=new Map;n.set(l,a)}else n=Ri,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[Sn]||i[ot]||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 Rm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function pp(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 Am(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function vp(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=un(a.href),i=t.querySelector(ss(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ai.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,rt(i);return}i=t.ownerDocument||t,a=wm(a),(n=Kt.get(n))&&ec(a,n),i=i.createElement("link"),rt(i);var o=i;o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),ht(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=Ai.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var lc=0;function gp(e,t){return e.stylesheets&&e.count===0&&_i(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&_i(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&lc===0&&(lc=62500*Wx());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&_i(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>lc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ai(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_i(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mi=null;function _i(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mi=new Map,t.forEach(bp,e),Mi=null,Ai.call(e))}function bp(e,t){if(!(t.state.loading&4)){var l=Mi.get(e);if(l)var a=l.get(null);else{l=new Map,Mi.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=Ai.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 us={$$typeof:S,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function yp(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=Pi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pi(0),this.hiddenUpdates=Pi(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 Mm(e,t,l,a,n,i,o,h,j,_,H,G){return e=new yp(e,t,l,o,j,_,H,G,h),t=1,i===!0&&(t|=24),i=_t(3,null,null,t),e.current=i,i.stateNode=e,t=Uu(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Bu(i),e}function _m(e){return e?(e=La,e):La}function Dm(e,t,l,a,n,i){n=_m(n),a.context===null?a.context=n:a.pendingContext=n,a=kl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Yl(e,a,t),l!==null&&(Tt(l,e,t),Bn(l,e,t))}function zm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ac(e,t){zm(e,t),(e=e.alternate)&&zm(e,t)}function Om(e){if(e.tag===13||e.tag===31){var t=da(e,67108864);t!==null&&Tt(t,e,67108864),ac(e,67108864)}}function Um(e){if(e.tag===13||e.tag===31){var t=qt();t=Wi(t);var l=da(e,t);l!==null&&Tt(l,e,t),ac(e,t)}}var Di=!0;function jp(e,t,l,a){var n=U.T;U.T=null;var i=Z.p;try{Z.p=2,nc(e,t,l,a)}finally{Z.p=i,U.T=n}}function Sp(e,t,l,a){var n=U.T;U.T=null;var i=Z.p;try{Z.p=8,nc(e,t,l,a)}finally{Z.p=i,U.T=n}}function nc(e,t,l,a){if(Di){var n=sc(a);if(n===null)Vr(e,t,a,zi,l),Hm(e,a);else if(Ep(n,e,t,l,a))a.stopPropagation();else if(Hm(e,a),t&4&&-1<Np.indexOf(e)){for(;n!==null;){var i=Ca(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=ia(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var j=1<<31-At(o);h.entanglements[1]|=j,o&=~j}ul(i),(_e&6)===0&&(xi=Fe()+500,ts(0))}}break;case 31:case 13:h=da(i,2),h!==null&&Tt(h,i,2),vi(),ac(i,2)}if(i=sc(a),i===null&&Vr(e,t,a,zi,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Vr(e,t,a,null,l)}}function sc(e){return e=uu(e),ic(e)}var zi=null;function ic(e){if(zi=null,e=Ta(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 zi=e,null}function qm(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(_l()){case Gc:return 2;case Qc:return 8;case Ss:case c0:return 32;case Vc:return 268435456;default:return 32}default:return 32}}var uc=!1,Wl=null,Il=null,ea=null,rs=new Map,cs=new Map,ta=[],Np="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 Hm(e,t){switch(e){case"focusin":case"focusout":Wl=null;break;case"dragenter":case"dragleave":Il=null;break;case"mouseover":case"mouseout":ea=null;break;case"pointerover":case"pointerout":rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":cs.delete(t.pointerId)}}function os(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=Ca(t),t!==null&&Om(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Ep(e,t,l,a,n){switch(t){case"focusin":return Wl=os(Wl,e,t,l,a,n),!0;case"dragenter":return Il=os(Il,e,t,l,a,n),!0;case"mouseover":return ea=os(ea,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return rs.set(i,os(rs.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,cs.set(i,os(cs.get(i)||null,e,t,l,a,n)),!0}return!1}function Lm(e){var t=Ta(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,Fc(e.priority,function(){Um(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Fc(e.priority,function(){Um(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 Oi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=sc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);iu=a,l.target.dispatchEvent(a),iu=null}else return t=Ca(l),t!==null&&Om(t),e.blockedOn=l,!1;t.shift()}return!0}function Bm(e,t,l){Oi(e)&&l.delete(t)}function wp(){uc=!1,Wl!==null&&Oi(Wl)&&(Wl=null),Il!==null&&Oi(Il)&&(Il=null),ea!==null&&Oi(ea)&&(ea=null),rs.forEach(Bm),cs.forEach(Bm)}function Ui(e,t){e.blockedOn===t&&(e.blockedOn=null,uc||(uc=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,wp)))}var qi=null;function km(e){qi!==e&&(qi=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){qi===e&&(qi=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(ic(a||l)===null)continue;break}var i=Ca(l);i!==null&&(e.splice(t,3),t-=3,sr(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function cn(e){function t(j){return Ui(j,e)}Wl!==null&&Ui(Wl,e),Il!==null&&Ui(Il,e),ea!==null&&Ui(ea,e),rs.forEach(t),cs.forEach(t);for(var l=0;l<ta.length;l++){var a=ta[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ta.length&&(l=ta[0],l.blockedOn===null);)Lm(l),l.blockedOn===null&&ta.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[yt]||null;if(typeof i=="function")o||km(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[yt]||null)h=o.formAction;else if(ic(n)!==null)continue}else h=o.action;typeof h=="function"?l[a+1]=h:(l.splice(a,3),a-=3),km(l)}}}function Ym(){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 rc(e){this._internalRoot=e}Hi.prototype.render=rc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=qt();Dm(l,a,e,t,null,null)},Hi.prototype.unmount=rc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dm(e.current,2,null,e,null,null),vi(),t[wa]=null}};function Hi(e){this._internalRoot=e}Hi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ta.length&&t!==0&&t<ta[l].priority;l++);ta.splice(l,0,e),l===0&&Lm(e)}};var Gm=c.version;if(Gm!=="19.2.4")throw Error(r(527,Gm,"19.2.4"));Z.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?y(e):null,e=e===null?null:e.stateNode,e};var Tp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Li=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Li.isDisabled&&Li.supportsFiber)try{bn=Li.inject(Tp),Rt=Li}catch{}}return fs.createRoot=function(e,t){if(!m(e))throw Error(r(299));var l=!1,a="",n=Kd,i=Jd,o=Fd;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=Mm(e,1,!1,null,null,l,a,null,n,i,o,Ym),e[wa]=t.current,Qr(e),new rc(t)},fs.hydrateRoot=function(e,t,l){if(!m(e))throw Error(r(299));var a=!1,n="",i=Kd,o=Jd,h=Fd,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=Mm(e,1,!0,t,l??null,a,n,j,i,o,h,Ym),t.context=_m(null),l=t.current,a=qt(),a=Wi(a),n=kl(a),n.callback=null,Yl(l,n,a),l=a,t.current.lanes=l,jn(t,l),ul(t),e[wa]=t.current,Qr(e),new Hi(t)},fs.version="19.2.4",fs}var Wm;function Up(){if(Wm)return dc.exports;Wm=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(),dc.exports=Op(),dc.exports}var qp=Up();const Hp=Tc(qp);/**
|
|
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 Im="popstate";function Lp(u={}){function c(m,x){let{pathname:f="/",search:v="",hash:g=""}=Ea(m.location.hash.substring(1));return!f.startsWith("/")&&!f.startsWith(".")&&(f="/"+f),jc("",{pathname:f,search:v,hash:g},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 g=m.location.href,p=g.indexOf("#");v=p===-1?g:g.slice(0,p)}return v+"#"+(typeof x=="string"?x:gs(x))}function r(m,x){Ft(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(x)})`)}return kp(c,d,r,u)}function $e(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 Bp(){return Math.random().toString(36).substring(2,10)}function eh(u,c){return{usr:u.state,key:u.key,idx:c}}function jc(u,c,d=null,r){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof c=="string"?Ea(c):c,state:d,key:c&&c.key||r||Bp()}}function gs({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 Ea(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 kp(u,c,d,r={}){let{window:m=document.defaultView,v5Compat:x=!1}=r,f=m.history,v="POP",g=null,p=y();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function y(){return(f.state||{idx:null}).idx}function b(){v="POP";let k=y(),Q=k==null?null:k-p;p=k,g&&g({action:v,location:A.location,delta:Q})}function T(k,Q){v="PUSH";let L=jc(A.location,k,Q);d&&d(L,k),p=y()+1;let S=eh(L,p),le=A.createHref(L);try{f.pushState(S,"",le)}catch(X){if(X instanceof DOMException&&X.name==="DataCloneError")throw X;m.location.assign(le)}x&&g&&g({action:v,location:A.location,delta:1})}function z(k,Q){v="REPLACE";let L=jc(A.location,k,Q);d&&d(L,k),p=y();let S=eh(L,p),le=A.createHref(L);f.replaceState(S,"",le),x&&g&&g({action:v,location:A.location,delta:0})}function q(k){return Yp(k)}let A={get action(){return v},get location(){return u(m,f)},listen(k){if(g)throw new Error("A history only accepts one active listener");return m.addEventListener(Im,b),g=k,()=>{m.removeEventListener(Im,b),g=null}},createHref(k){return c(m,k)},createURL:q,encodeLocation(k){let Q=q(k);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:T,replace:z,go(k){return f.go(k)}};return A}function Yp(u,c=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),$e(d,"No window.location.(origin|href) available to create URL");let r=typeof u=="string"?u:gs(u);return r=r.replace(/ $/,"%20"),!c&&r.startsWith("//")&&(r=d+r),new URL(r,d)}function bh(u,c,d="/"){return Gp(u,c,d,!1)}function Gp(u,c,d,r){let m=typeof c=="string"?Ea(c):c,x=Al(m.pathname||"/",d);if(x==null)return null;let f=yh(u);Qp(f);let v=null;for(let g=0;v==null&&g<f.length;++g){let p=ev(x);v=Wp(f[g],p,r)}return v}function yh(u,c=[],d=[],r="",m=!1){let x=(f,v,g=m,p)=>{let y={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:v,route:f};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&g)return;$e(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let b=Rl([r,y.relativePath]),T=d.concat(y);f.children&&f.children.length>0&&($e(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),yh(f.children,c,T,b,g)),!(f.path==null&&!f.index)&&c.push({path:b,score:Fp(b,f.index),routesMeta:T})};return u.forEach((f,v)=>{var g;if(f.path===""||!((g=f.path)!=null&&g.includes("?")))x(f,v);else for(let p of jh(f.path))x(f,v,!0,p)}),c}function jh(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=jh(r.join("/")),v=[];return v.push(...f.map(g=>g===""?x:[x,g].join("/"))),m&&v.push(...f),v.map(g=>u.startsWith("/")&&g===""?"/":g)}function Qp(u){u.sort((c,d)=>c.score!==d.score?d.score-c.score:Pp(c.routesMeta.map(r=>r.childrenIndex),d.routesMeta.map(r=>r.childrenIndex)))}var Vp=/^:[\w-]+$/,Xp=3,Zp=2,$p=1,Kp=10,Jp=-2,th=u=>u==="*";function Fp(u,c){let d=u.split("/"),r=d.length;return d.some(th)&&(r+=Jp),c&&(r+=Zp),d.filter(m=>!th(m)).reduce((m,x)=>m+(Vp.test(x)?Xp:x===""?$p:Kp),r)}function Pp(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 Wp(u,c,d=!1){let{routesMeta:r}=u,m={},x="/",f=[];for(let v=0;v<r.length;++v){let g=r[v],p=v===r.length-1,y=x==="/"?c:c.slice(x.length)||"/",b=Vi({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},y),T=g.route;if(!b&&p&&d&&!r[r.length-1].route.index&&(b=Vi({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!b)return null;Object.assign(m,b.params),f.push({params:m,pathname:Rl([x,b.pathname]),pathnameBase:nv(Rl([x,b.pathnameBase])),route:T}),b.pathnameBase!=="/"&&(x=Rl([x,b.pathnameBase]))}return f}function Vi(u,c){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[d,r]=Ip(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:y,isOptional:b},T)=>{if(y==="*"){let q=v[T]||"";f=x.slice(0,x.length-q.length).replace(/(.)\/+$/,"$1")}const z=v[T];return b&&!z?p[y]=void 0:p[y]=(z||"").replace(/%2F/g,"/"),p},{}),pathname:x,pathnameBase:f,pattern:u}}function Ip(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,g)=>(r.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).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 ev(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 Al(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 tv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function lv(u,c="/"){let{pathname:d,search:r="",hash:m=""}=typeof u=="string"?Ea(u):u,x;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?x=lh(d.substring(1),"/"):x=lh(d,c)):x=c,{pathname:x,search:sv(r),hash:iv(m)}}function lh(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 xc(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 av(u){return u.filter((c,d)=>d===0||c.route.path&&c.route.path.length>0)}function Rc(u){let c=av(u);return c.map((d,r)=>r===c.length-1?d.pathname:d.pathnameBase)}function Ac(u,c,d,r=!1){let m;typeof u=="string"?m=Ea(u):(m={...u},$e(!m.pathname||!m.pathname.includes("?"),xc("?","pathname","search",m)),$e(!m.pathname||!m.pathname.includes("#"),xc("#","pathname","hash",m)),$e(!m.search||!m.search.includes("#"),xc("#","search","hash",m)));let x=u===""||m.pathname==="",f=x?"/":m.pathname,v;if(f==null)v=d;else{let b=c.length-1;if(!r&&f.startsWith("..")){let T=f.split("/");for(;T[0]==="..";)T.shift(),b-=1;m.pathname=T.join("/")}v=b>=0?c[b]:"/"}let g=lv(m,v),p=f&&f!=="/"&&f.endsWith("/"),y=(x||f===".")&&d.endsWith("/");return!g.pathname.endsWith("/")&&(p||y)&&(g.pathname+="/"),g}var Rl=u=>u.join("/").replace(/\/\/+/g,"/"),nv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),sv=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,iv=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u,uv=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 rv(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}function cv(u){return u.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Sh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nh(u,c){let d=u;if(typeof d!="string"||!tv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let r=d,m=!1;if(Sh)try{let x=new URL(window.location.href),f=d.startsWith("//")?new URL(x.protocol+d):new URL(d),v=Al(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 Eh=["POST","PUT","PATCH","DELETE"];new Set(Eh);var ov=["GET",...Eh];new Set(ov);var xn=w.createContext(null);xn.displayName="DataRouter";var $i=w.createContext(null);$i.displayName="DataRouterState";var dv=w.createContext(!1),wh=w.createContext({isTransitioning:!1});wh.displayName="ViewTransition";var fv=w.createContext(new Map);fv.displayName="Fetchers";var mv=w.createContext(null);mv.displayName="Await";var Ht=w.createContext(null);Ht.displayName="Navigation";var bs=w.createContext(null);bs.displayName="Location";var rl=w.createContext({outlet:null,matches:[],isDataRoute:!1});rl.displayName="Route";var Mc=w.createContext(null);Mc.displayName="RouteError";var Th="REACT_ROUTER_ERROR",hv="REDIRECT",xv="ROUTE_ERROR_RESPONSE";function pv(u){if(u.startsWith(`${Th}:${hv}:{`))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 vv(u){if(u.startsWith(`${Th}:${xv}:{`))try{let c=JSON.parse(u.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new uv(c.status,c.statusText,c.data)}catch{}}function gv(u,{relative:c}={}){$e(pn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:r}=w.useContext(Ht),{hash:m,pathname:x,search:f}=ys(u,{relative:c}),v=x;return d!=="/"&&(v=x==="/"?d:Rl([d,x])),r.createHref({pathname:v,search:f,hash:m})}function pn(){return w.useContext(bs)!=null}function sa(){return $e(pn(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(bs).location}var Ch="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Rh(u){w.useContext(Ht).static||w.useLayoutEffect(u)}function _c(){let{isDataRoute:u}=w.useContext(rl);return u?_v():bv()}function bv(){$e(pn(),"useNavigate() may be used only in the context of a <Router> component.");let u=w.useContext(xn),{basename:c,navigator:d}=w.useContext(Ht),{matches:r}=w.useContext(rl),{pathname:m}=sa(),x=JSON.stringify(Rc(r)),f=w.useRef(!1);return Rh(()=>{f.current=!0}),w.useCallback((g,p={})=>{if(Ft(f.current,Ch),!f.current)return;if(typeof g=="number"){d.go(g);return}let y=Ac(g,JSON.parse(x),m,p.relative==="path");u==null&&c!=="/"&&(y.pathname=y.pathname==="/"?c:Rl([c,y.pathname])),(p.replace?d.replace:d.push)(y,p.state,p)},[c,d,x,m,u])}w.createContext(null);function ys(u,{relative:c}={}){let{matches:d}=w.useContext(rl),{pathname:r}=sa(),m=JSON.stringify(Rc(d));return w.useMemo(()=>Ac(u,JSON.parse(m),r,c==="path"),[u,m,r,c])}function yv(u,c){return Ah(u,c)}function Ah(u,c,d,r,m){var L;$e(pn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=w.useContext(Ht),{matches:f}=w.useContext(rl),v=f[f.length-1],g=v?v.params:{},p=v?v.pathname:"/",y=v?v.pathnameBase:"/",b=v&&v.route;{let S=b&&b.path||"";_h(p,!b||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${S}">) 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="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let T=sa(),z;if(c){let S=typeof c=="string"?Ea(c):c;$e(y==="/"||((L=S.pathname)==null?void 0:L.startsWith(y)),`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 "${y}" but pathname "${S.pathname}" was given in the \`location\` prop.`),z=S}else z=T;let q=z.pathname||"/",A=q;if(y!=="/"){let S=y.replace(/^\//,"").split("/");A="/"+q.replace(/^\//,"").split("/").slice(S.length).join("/")}let k=bh(u,{pathname:A});Ft(b||k!=null,`No routes matched location "${z.pathname}${z.search}${z.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 "${z.pathname}${z.search}${z.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let Q=wv(k&&k.map(S=>Object.assign({},S,{params:Object.assign({},g,S.params),pathname:Rl([y,x.encodeLocation?x.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?y:Rl([y,x.encodeLocation?x.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),f,d,r,m);return c&&Q?w.createElement(bs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},Q):Q}function jv(){let u=Mv(),c=rv(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 Sv=w.createElement(jv,null),Mh=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=vv(u.digest);d&&(u=d)}let c=u!==void 0?w.createElement(rl.Provider,{value:this.props.routeContext},w.createElement(Mc.Provider,{value:u,children:this.props.component})):this.props.children;return this.context?w.createElement(Nv,{error:u},c):c}};Mh.contextType=dv;var pc=new WeakMap;function Nv({children:u,error:c}){let{basename:d}=w.useContext(Ht);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let r=pv(c.digest);if(r){let m=pc.get(c);if(m)throw m;let x=Nh(r.location,d);if(Sh&&!pc.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 pc.set(c,f),f}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return u}function Ev({routeContext:u,match:c,children:d}){let r=w.useContext(xn);return r&&r.static&&r.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=c.route.id),w.createElement(rl.Provider,{value:u},d)}function wv(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 y=x.findIndex(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);$e(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),x=x.slice(0,Math.min(x.length,y+1))}let v=!1,g=-1;if(d)for(let y=0;y<x.length;y++){let b=x[y];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(g=y),b.route.id){let{loaderData:T,errors:z}=d,q=b.route.loader&&!T.hasOwnProperty(b.route.id)&&(!z||z[b.route.id]===void 0);if(b.route.lazy||q){v=!0,g>=0?x=x.slice(0,g+1):x=[x[0]];break}}}let p=d&&r?(y,b)=>{var T,z;r(y,{location:d.location,params:((z=(T=d.matches)==null?void 0:T[0])==null?void 0:z.params)??{},unstable_pattern:cv(d.matches),errorInfo:b})}:void 0;return x.reduceRight((y,b,T)=>{let z,q=!1,A=null,k=null;d&&(z=f&&b.route.id?f[b.route.id]:void 0,A=b.route.errorElement||Sv,v&&(g<0&&T===0?(_h("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),q=!0,k=null):g===T&&(q=!0,k=b.route.hydrateFallbackElement||null)));let Q=c.concat(x.slice(0,T+1)),L=()=>{let S;return z?S=A:q?S=k:b.route.Component?S=w.createElement(b.route.Component,null):b.route.element?S=b.route.element:S=y,w.createElement(Ev,{match:b,routeContext:{outlet:y,matches:Q,isDataRoute:d!=null},children:S})};return d&&(b.route.ErrorBoundary||b.route.errorElement||T===0)?w.createElement(Mh,{location:d.location,revalidation:d.revalidation,component:A,error:z,children:L(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:p}):L()},null)}function Dc(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tv(u){let c=w.useContext(xn);return $e(c,Dc(u)),c}function Cv(u){let c=w.useContext($i);return $e(c,Dc(u)),c}function Rv(u){let c=w.useContext(rl);return $e(c,Dc(u)),c}function zc(u){let c=Rv(u),d=c.matches[c.matches.length-1];return $e(d.route.id,`${u} can only be used on routes that contain a unique "id"`),d.route.id}function Av(){return zc("useRouteId")}function Mv(){var r;let u=w.useContext(Mc),c=Cv("useRouteError"),d=zc("useRouteError");return u!==void 0?u:(r=c.errors)==null?void 0:r[d]}function _v(){let{router:u}=Tv("useNavigate"),c=zc("useNavigate"),d=w.useRef(!1);return Rh(()=>{d.current=!0}),w.useCallback(async(m,x={})=>{Ft(d.current,Ch),d.current&&(typeof m=="number"?await u.navigate(m):await u.navigate(m,{fromRouteId:c,...x}))},[u,c])}var ah={};function _h(u,c,d){!c&&!ah[u]&&(ah[u]=!0,Ft(!1,d))}w.memo(Dv);function Dv({routes:u,future:c,state:d,onError:r}){return Ah(u,void 0,d,r,c)}function zv({to:u,replace:c,state:d,relative:r}){$e(pn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=w.useContext(Ht);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(rl),{pathname:f}=sa(),v=_c(),g=Ac(u,Rc(x),f,r==="path"),p=JSON.stringify(g);return w.useEffect(()=>{v(JSON.parse(p),{replace:c,state:d,relative:r})},[v,p,r,c,d]),null}function Cl(u){$e(!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 Ov({basename:u="/",children:c=null,location:d,navigationType:r="POP",navigator:m,static:x=!1,unstable_useTransitions:f}){$e(!pn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=u.replace(/^\/*/,"/"),g=w.useMemo(()=>({basename:v,navigator:m,static:x,unstable_useTransitions:f,future:{}}),[v,m,x,f]);typeof d=="string"&&(d=Ea(d));let{pathname:p="/",search:y="",hash:b="",state:T=null,key:z="default"}=d,q=w.useMemo(()=>{let A=Al(p,v);return A==null?null:{location:{pathname:A,search:y,hash:b,state:T,key:z},navigationType:r}},[v,p,y,b,T,z,r]);return Ft(q!=null,`<Router basename="${v}"> is not able to match the URL "${p}${y}${b}" because it does not start with the basename, so the <Router> won't render anything.`),q==null?null:w.createElement(Ht.Provider,{value:g},w.createElement(bs.Provider,{children:c,value:q}))}function Uv({children:u,location:c}){return yv(Sc(u),c)}function Sc(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,Sc(r.props.children,x));return}$e(r.type===Cl,`[${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>`),$e(!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=Sc(r.props.children,x)),d.push(f)}),d}var Gi="get",Qi="application/x-www-form-urlencoded";function Ki(u){return typeof HTMLElement<"u"&&u instanceof HTMLElement}function qv(u){return Ki(u)&&u.tagName.toLowerCase()==="button"}function Hv(u){return Ki(u)&&u.tagName.toLowerCase()==="form"}function Lv(u){return Ki(u)&&u.tagName.toLowerCase()==="input"}function Bv(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function kv(u,c){return u.button===0&&(!c||c==="_self")&&!Bv(u)}var Bi=null;function Yv(){if(Bi===null)try{new FormData(document.createElement("form"),0),Bi=!1}catch{Bi=!0}return Bi}var Gv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vc(u){return u!=null&&!Gv.has(u)?(Ft(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qi}"`),null):u}function Qv(u,c){let d,r,m,x,f;if(Hv(u)){let v=u.getAttribute("action");r=v?Al(v,c):null,d=u.getAttribute("method")||Gi,m=vc(u.getAttribute("enctype"))||Qi,x=new FormData(u)}else if(qv(u)||Lv(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 g=u.getAttribute("formaction")||v.getAttribute("action");if(r=g?Al(g,c):null,d=u.getAttribute("formmethod")||v.getAttribute("method")||Gi,m=vc(u.getAttribute("formenctype"))||vc(v.getAttribute("enctype"))||Qi,x=new FormData(v,u),!Yv()){let{name:p,type:y,value:b}=u;if(y==="image"){let T=p?`${p}.`:"";x.append(`${T}x`,"0"),x.append(`${T}y`,"0")}else p&&x.append(p,b)}}else{if(Ki(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Gi,r=null,m=Qi,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 Oc(u,c){if(u===!1||u===null||typeof u>"u")throw new Error(c)}function Vv(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&&Al(m.pathname,c)==="/"?m.pathname=`${c.replace(/\/$/,"")}/_root.${r}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${r}`,m}async function Xv(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 Zv(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 $v(u,c,d){let r=await Promise.all(u.map(async m=>{let x=c.routes[m.route.id];if(x){let f=await Xv(x,d);return f.links?f.links():[]}return[]}));return Pv(r.flat(1).filter(Zv).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function nh(u,c,d,r,m,x){let f=(g,p)=>d[p]?g.route.id!==d[p].route.id:!0,v=(g,p)=>{var y;return d[p].pathname!==g.pathname||((y=d[p].route.path)==null?void 0:y.endsWith("*"))&&d[p].params["*"]!==g.params["*"]};return x==="assets"?c.filter((g,p)=>f(g,p)||v(g,p)):x==="data"?c.filter((g,p)=>{var b;let y=r.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(f(g,p)||v(g,p))return!0;if(g.route.shouldRevalidate){let T=g.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((b=d[0])==null?void 0:b.params)||{},nextUrl:new URL(u,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function Kv(u,c,{includeHydrateFallback:d}={}){return Jv(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 Jv(u){return[...new Set(u)]}function Fv(u){let c={},d=Object.keys(u).sort();for(let r of d)c[r]=u[r];return c}function Pv(u,c){let d=new Set;return new Set(c),u.reduce((r,m)=>{let x=JSON.stringify(Fv(m));return d.has(x)||(d.add(x),r.push({key:x,link:m})),r},[])}function Dh(){let u=w.useContext(xn);return Oc(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function Wv(){let u=w.useContext($i);return Oc(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Uc=w.createContext(void 0);Uc.displayName="FrameworkContext";function zh(){let u=w.useContext(Uc);return Oc(u,"You must render this element inside a <HydratedRouter> element"),u}function Iv(u,c){let d=w.useContext(Uc),[r,m]=w.useState(!1),[x,f]=w.useState(!1),{onFocus:v,onBlur:g,onMouseEnter:p,onMouseLeave:y,onTouchStart:b}=c,T=w.useRef(null);w.useEffect(()=>{if(u==="render"&&f(!0),u==="viewport"){let A=Q=>{Q.forEach(L=>{f(L.isIntersecting)})},k=new IntersectionObserver(A,{threshold:.5});return T.current&&k.observe(T.current),()=>{k.disconnect()}}},[u]),w.useEffect(()=>{if(r){let A=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(A)}}},[r]);let z=()=>{m(!0)},q=()=>{m(!1),f(!1)};return d?u!=="intent"?[x,T,{}]:[x,T,{onFocus:ms(v,z),onBlur:ms(g,q),onMouseEnter:ms(p,z),onMouseLeave:ms(y,q),onTouchStart:ms(b,z)}]:[!1,T,{}]}function ms(u,c){return d=>{u&&u(d),d.defaultPrevented||c(d)}}function eg({page:u,...c}){let{router:d}=Dh(),r=w.useMemo(()=>bh(d.routes,u,d.basename),[d.routes,u,d.basename]);return r?w.createElement(lg,{page:u,matches:r,...c}):null}function tg(u){let{manifest:c,routeModules:d}=zh(),[r,m]=w.useState([]);return w.useEffect(()=>{let x=!1;return $v(u,c,d).then(f=>{x||m(f)}),()=>{x=!0}},[u,c,d]),r}function lg({page:u,matches:c,...d}){let r=sa(),{future:m,manifest:x,routeModules:f}=zh(),{basename:v}=Dh(),{loaderData:g,matches:p}=Wv(),y=w.useMemo(()=>nh(u,c,p,x,r,"data"),[u,c,p,x,r]),b=w.useMemo(()=>nh(u,c,p,x,r,"assets"),[u,c,p,x,r]),T=w.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let A=new Set,k=!1;if(c.forEach(L=>{var le;let S=x.routes[L.route.id];!S||!S.hasLoader||(!y.some(X=>X.route.id===L.route.id)&&L.route.id in g&&((le=f[L.route.id])!=null&&le.shouldRevalidate)||S.hasClientLoader?k=!0:A.add(L.route.id))}),A.size===0)return[];let Q=Vv(u,v,m.unstable_trailingSlashAwareDataRequests,"data");return k&&A.size>0&&Q.searchParams.set("_routes",c.filter(L=>A.has(L.route.id)).map(L=>L.route.id).join(",")),[Q.pathname+Q.search]},[v,m.unstable_trailingSlashAwareDataRequests,g,r,x,y,c,u,f]),z=w.useMemo(()=>Kv(b,x),[b,x]),q=tg(b);return w.createElement(w.Fragment,null,T.map(A=>w.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...d})),z.map(A=>w.createElement("link",{key:A,rel:"modulepreload",href:A,...d})),q.map(({key:A,link:k})=>w.createElement("link",{key:A,nonce:d.nonce,...k,crossOrigin:k.crossOrigin??d.crossOrigin})))}function ag(...u){return c=>{u.forEach(d=>{typeof d=="function"?d(c):d!=null&&(d.current=c)})}}var ng=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ng&&(window.__reactRouterVersion="7.13.0")}catch{}function sg({basename:u,children:c,unstable_useTransitions:d,window:r}){let m=w.useRef();m.current==null&&(m.current=Lp({window:r,v5Compat:!0}));let x=m.current,[f,v]=w.useState({action:x.action,location:x.location}),g=w.useCallback(p=>{d===!1?v(p):w.startTransition(()=>v(p))},[d]);return w.useLayoutEffect(()=>x.listen(g),[x,g]),w.createElement(Ov,{basename:u,children:c,location:f.location,navigationType:f.action,navigator:x,unstable_useTransitions:d})}var Oh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Uh=w.forwardRef(function({onClick:c,discover:d="render",prefetch:r="none",relative:m,reloadDocument:x,replace:f,state:v,target:g,to:p,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:T,...z},q){let{basename:A,unstable_useTransitions:k}=w.useContext(Ht),Q=typeof p=="string"&&Oh.test(p),L=Nh(p,A);p=L.to;let S=gv(p,{relative:m}),[le,X,F]=Iv(r,z),P=rg(p,{replace:f,state:v,target:g,preventScrollReset:y,relative:m,viewTransition:b,unstable_defaultShouldRevalidate:T,unstable_useTransitions:k});function ue(K){c&&c(K),K.defaultPrevented||P(K)}let ve=w.createElement("a",{...z,...F,href:L.absoluteURL||S,onClick:L.isExternal||x?c:ue,ref:ag(q,X),target:g,"data-discover":!Q&&d==="render"?"true":void 0});return le&&!Q?w.createElement(w.Fragment,null,ve,w.createElement(eg,{page:S})):ve});Uh.displayName="Link";var qh=w.forwardRef(function({"aria-current":c="page",caseSensitive:d=!1,className:r="",end:m=!1,style:x,to:f,viewTransition:v,children:g,...p},y){let b=ys(f,{relative:p.relative}),T=sa(),z=w.useContext($i),{navigator:q,basename:A}=w.useContext(Ht),k=z!=null&&mg(b)&&v===!0,Q=q.encodeLocation?q.encodeLocation(b).pathname:b.pathname,L=T.pathname,S=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;d||(L=L.toLowerCase(),S=S?S.toLowerCase():null,Q=Q.toLowerCase()),S&&A&&(S=Al(S,A)||S);const le=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let X=L===Q||!m&&L.startsWith(Q)&&L.charAt(le)==="/",F=S!=null&&(S===Q||!m&&S.startsWith(Q)&&S.charAt(Q.length)==="/"),P={isActive:X,isPending:F,isTransitioning:k},ue=X?c:void 0,ve;typeof r=="function"?ve=r(P):ve=[r,X?"active":null,F?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let K=typeof x=="function"?x(P):x;return w.createElement(Uh,{...p,"aria-current":ue,className:ve,ref:y,style:K,to:f,viewTransition:v},typeof g=="function"?g(P):g)});qh.displayName="NavLink";var ig=w.forwardRef(({discover:u="render",fetcherKey:c,navigate:d,reloadDocument:r,replace:m,state:x,method:f=Gi,action:v,onSubmit:g,relative:p,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:T,...z},q)=>{let{unstable_useTransitions:A}=w.useContext(Ht),k=dg(),Q=fg(v,{relative:p}),L=f.toLowerCase()==="get"?"get":"post",S=typeof v=="string"&&Oh.test(v),le=X=>{if(g&&g(X),X.defaultPrevented)return;X.preventDefault();let F=X.nativeEvent.submitter,P=(F==null?void 0:F.getAttribute("formmethod"))||f,ue=()=>k(F||X.currentTarget,{fetcherKey:c,method:P,navigate:d,replace:m,state:x,relative:p,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:T});A&&d!==!1?w.startTransition(()=>ue()):ue()};return w.createElement("form",{ref:q,method:L,action:Q,onSubmit:r?g:le,...z,"data-discover":!S&&u==="render"?"true":void 0})});ig.displayName="Form";function ug(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hh(u){let c=w.useContext(xn);return $e(c,ug(u)),c}function rg(u,{target:c,replace:d,state:r,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:v,unstable_useTransitions:g}={}){let p=_c(),y=sa(),b=ys(u,{relative:x});return w.useCallback(T=>{if(kv(T,c)){T.preventDefault();let z=d!==void 0?d:gs(y)===gs(b),q=()=>p(u,{replace:z,state:r,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:v});g?w.startTransition(()=>q()):q()}},[y,p,b,d,r,c,u,m,x,f,v,g])}var cg=0,og=()=>`__${String(++cg)}__`;function dg(){let{router:u}=Hh("useSubmit"),{basename:c}=w.useContext(Ht),d=Av(),r=u.fetch,m=u.navigate;return w.useCallback(async(x,f={})=>{let{action:v,method:g,encType:p,formData:y,body:b}=Qv(x,c);if(f.navigate===!1){let T=f.fetcherKey||og();await r(T,d,f.action||v,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||g,formEncType:f.encType||p,flushSync:f.flushSync})}else await m(f.action||v,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||g,formEncType:f.encType||p,replace:f.replace,state:f.state,fromRouteId:d,flushSync:f.flushSync,viewTransition:f.viewTransition})},[r,m,c,d])}function fg(u,{relative:c}={}){let{basename:d}=w.useContext(Ht),r=w.useContext(rl);$e(r,"useFormAction must be used inside a RouteContext");let[m]=r.matches.slice(-1),x={...ys(u||".",{relative:c})},f=sa();if(u==null){x.search=f.search;let v=new URLSearchParams(x.search),g=v.getAll("index");if(g.some(y=>y==="")){v.delete("index"),g.filter(b=>b).forEach(b=>v.append("index",b));let y=v.toString();x.search=y?`?${y}`:""}}return(!u||u===".")&&m.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(x.pathname=x.pathname==="/"?d:Rl([d,x.pathname])),gs(x)}function mg(u,{relative:c}={}){let d=w.useContext(wh);$e(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Hh("useViewTransitionState"),m=ys(u,{relative:c});if(!d.isTransitioning)return!1;let x=Al(d.currentLocation.pathname,r)||d.currentLocation.pathname,f=Al(d.nextLocation.pathname,r)||d.nextLocation.pathname;return Vi(m.pathname,f)!=null||Vi(m.pathname,x)!=null}var hg=gh();const xg=Tc(hg);/**
|
|
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 Lh=(...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 pg=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 vg=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 sh=u=>{const c=vg(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 gg={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 bg=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 yg=w.forwardRef(({color:u="currentColor",size:c=24,strokeWidth:d=2,absoluteStrokeWidth:r,className:m="",children:x,iconNode:f,...v},g)=>w.createElement("svg",{ref:g,...gg,width:c,height:c,stroke:u,strokeWidth:r?Number(d)*24/Number(c):d,className:Lh("lucide",m),...!x&&!bg(v)&&{"aria-hidden":"true"},...v},[...f.map(([p,y])=>w.createElement(p,y)),...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(yg,{ref:x,iconNode:c,className:Lh(`lucide-${pg(sh(u))}`,`lucide-${u}`,r),...m}));return d.displayName=sh(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 jg=[["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"}]],Bh=oe("activity",jg);/**
|
|
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 Sg=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ng=oe("arrow-down",Sg);/**
|
|
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 Eg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ih=oe("arrow-right",Eg);/**
|
|
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 wg=[["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"}]],Tg=oe("arrow-up-down",wg);/**
|
|
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 Cg=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Rg=oe("arrow-up",Cg);/**
|
|
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 Ag=[["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"}]],Mg=oe("bell",Ag);/**
|
|
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 _g=[["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"}]],uh=oe("briefcase",_g);/**
|
|
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 Dg=[["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"}]],qc=oe("calendar",Dg);/**
|
|
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 zg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Nc=oe("check",zg);/**
|
|
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 Og=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kh=oe("chevron-down",Og);/**
|
|
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 Ug=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qg=oe("chevron-left",Ug);/**
|
|
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 Hg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Lg=oe("chevron-right",Hg);/**
|
|
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 Bg=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],kg=oe("chevron-up",Bg);/**
|
|
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 Yg=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Gg=oe("chevrons-up-down",Yg);/**
|
|
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 Qg=[["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"}]],Ml=oe("circle-alert",Qg);/**
|
|
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 Vg=[["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"}]],rh=oe("circle-arrow-down",Vg);/**
|
|
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 Xg=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],js=oe("circle-check-big",Xg);/**
|
|
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 Zg=[["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"}]],$g=oe("circle-x",Zg);/**
|
|
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 Kg=[["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"}]],ch=oe("clipboard-list",Kg);/**
|
|
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 Jg=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Xi=oe("clock",Jg);/**
|
|
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 Fg=[["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"}]],Yh=oe("external-link",Fg);/**
|
|
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 Pg=[["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"}]],Wg=oe("eye-off",Pg);/**
|
|
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 Ig=[["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"}]],eb=oe("eye",Ig);/**
|
|
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 tb=[["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"}]],Ec=oe("file-text",tb);/**
|
|
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 lb=[["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"}]],ab=oe("git-pull-request",lb);/**
|
|
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 nb=[["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"}]],sb=oe("house",nb);/**
|
|
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 ib=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ub=oe("info",ib);/**
|
|
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 rb=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],cb=oe("kanban",rb);/**
|
|
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 ob=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Gh=oe("loader-circle",ob);/**
|
|
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 db=[["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"}]],Qh=oe("map",db);/**
|
|
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 fb=[["path",{d:"M5 12h14",key:"1ays0h"}]],mb=oe("minus",fb);/**
|
|
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 hb=[["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"}]],Vh=oe("pause",hb);/**
|
|
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 xb=[["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"}]],Hc=oe("pen",xb);/**
|
|
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 pb=[["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"}]],mn=oe("play",pb);/**
|
|
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 vb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vn=oe("plus",vb);/**
|
|
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 gb=[["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"}]],Xh=oe("rotate-ccw",gb);/**
|
|
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 bb=[["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"}]],yb=oe("save",bb);/**
|
|
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 jb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ji=oe("search",jb);/**
|
|
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 Sb=[["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"}]],Nb=oe("settings",Sb);/**
|
|
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 Eb=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],oh=oe("square",Eb);/**
|
|
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 wb=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Tb=oe("terminal",wb);/**
|
|
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 Cb=[["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"}]],Rb=oe("test-tube-diagonal",Cb);/**
|
|
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 Ab=[["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"}]],Lc=oe("trash-2",Ab);/**
|
|
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 Mb=[["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"}]],Fi=oe("triangle-alert",Mb);/**
|
|
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 _b=[["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"}]],Db=oe("wifi",_b);/**
|
|
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 zb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gn=oe("x",zb),Bc="";let Zh=!1,wc=null;function Ob(u){Zh=u}function Ub(u){wc=u}function qb(u){return encodeURIComponent(u.replace(/\//g,"~"))}function Ke(u){return Zh&&wc?u.replace("/api/",`/api/projects/${qb(wc)}/`):u}function Hb(){return Je("/api/mode")}function Lb(){return Je("/api/projects")}async function Je(u,c){const d=`${Bc}${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 gc(){return Je(Ke("/api/status"))}function $h(){return Je(Ke("/api/prs"))}function Bb(u,c){const d=`?lines=${encodeURIComponent(c)}`;return Je(Ke(`/api/logs/${encodeURIComponent(u)}${d}`))}function Kh(){return Je(Ke("/api/config"))}function aa(u){return Je(Ke("/api/config"),{method:"PUT",body:JSON.stringify(u)})}function kb(){return Je(Ke("/api/doctor"))}function Jh(){return Je(Ke("/api/schedule-info"))}function Fh(){return Je(Ke("/api/actions/run"),{method:"POST"})}function kc(){return Je(Ke("/api/actions/review"),{method:"POST"})}function Ph(){return Je(Ke("/api/actions/qa"),{method:"POST"})}function Wh(){return Je(Ke("/api/actions/audit"),{method:"POST"})}function Ih(){return Je(Ke("/api/actions/planner"),{method:"POST"})}function vs(){return Je(Ke("/api/actions/install-cron"),{method:"POST"})}function Yb(){return Je(Ke("/api/actions/uninstall-cron"),{method:"POST"})}function Gb(u="all"){return Je(Ke("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:u})})}const na=["Draft","Ready","In Progress","Review","Done"];function e0(){return Je(Ke("/api/board/status"))}function Qb(u){return Je(Ke("/api/board/issues"),{method:"POST",body:JSON.stringify(u)})}function t0(u,c){return Je(Ke(`/api/board/issues/${u}/move`),{method:"PATCH",body:JSON.stringify({column:c})})}async function Vb(u){const c=`${Bc}${Ke(`/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 Xb(){return Je(Ke("/api/actions/clear-lock"),{method:"POST"})}function Zb(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=`${Bc}${Ke("/api/status/events")}`,f=new EventSource(x);return f.addEventListener("status_changed",v=>{try{const g=JSON.parse(v.data);m.current(g)}catch{}}),()=>{f.close()}},[r,...c])}function $b(){return Je(Ke("/api/roadmap"))}function Kb(){return Je(Ke("/api/roadmap/scan"),{method:"POST"})}function l0(u){return Je(Ke("/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),[g,p]=w.useState(null),y=w.useRef(u);y.current=u;const b=w.useRef(()=>{(async()=>{p(null);try{const z=await y.current();x(z)}catch(z){p(z instanceof Error?z:new Error("Unknown error"))}})()});return b.current=b.current.bind(b),w.useEffect(()=>{if(!r)return;let T=!1;return v(!0),p(null),(async()=>{try{const q=await y.current();T||x(q)}catch(q){T||p(q instanceof Error?q:new Error("Unknown error"))}finally{T||v(!1)}})(),()=>{T=!0}},[...c,r]),{data:m,loading:f,error:g,refetch:b.current}}const dh=u=>{let c;const d=new Set,r=(p,y)=>{const b=typeof p=="function"?p(c):p;if(!Object.is(b,c)){const T=c;c=y??(typeof b!="object"||b===null)?b:Object.assign({},c,b),d.forEach(z=>z(c,T))}},m=()=>c,v={setState:r,getState:m,getInitialState:()=>g,subscribe:p=>(d.add(p),()=>d.delete(p))},g=c=u(r,m,v);return v},Jb=u=>u?dh(u):dh,Fb=u=>u;function Pb(u,c=Fb){const d=ye.useSyncExternalStore(u.subscribe,()=>c(u.getState()),()=>c(u.getInitialState()));return ye.useDebugValue(d),d}const fh=u=>{const c=Jb(u),d=r=>Pb(c,r);return Object.assign(d,c),d},Wb=u=>u?fh(u):fh,Ib=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,pt=Wb(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=>{Ob(c),u({isGlobalMode:c})},projects:[],setProjects:c=>u({projects:c}),selectedProjectId:Ib,selectProject:c=>{Ub(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}:{}}})}})),ey=()=>{const[u,c]=w.useState(!1),{projectName:d,isGlobalMode:r,projects:m,selectedProjectId:x,selectProject:f,globalModeLoading:v}=pt(),{data:g}=el($h,[x],{enabled:!v}),p=(g==null?void 0:g.length)??0,y=w.useMemo(()=>[{icon:sb,label:"Dashboard",path:"/",section:"Overview"},{icon:Tb,label:"Logs",path:"/logs"},{icon:cb,label:"Board",path:"/board",section:"Work"},{icon:ab,label:"Pull Requests",path:"/prs",badge:p},{icon:Qh,label:"Roadmap",path:"/roadmap"},{icon:qc,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:Nb,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(uh,{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:b=>f(b.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(b=>b.valid).map(b=>s.jsx("option",{value:b.name,children:b.name},b.name))}),s.jsx(Gg,{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(uh,{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:y.map(b=>s.jsxs(ye.Fragment,{children:[b.section&&!u&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:b.section}),s.jsx("li",{children:s.jsx(qh,{to:b.path,className:({isActive:T})=>`
|
|
335
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
336
|
+
${T?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
|
|
337
|
+
${u?"justify-center":""}
|
|
338
|
+
`,children:({isActive:T})=>s.jsxs(s.Fragment,{children:[s.jsx(b.icon,{className:`h-5 w-5 transition-colors ${T?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${u?"":"mr-3.5"}`}),!u&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:b.label}),b.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 ${T?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:b.badge})),T&&!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:b.label})]})})})]},b.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(Lg,{className:"h-5 w-5"}):s.jsx(qg,{className:"h-5 w-5"})})})]})},ty=()=>{const{projectName:u}=pt();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(Db,{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(Ji,{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(Mg,{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"})]})]})},ly=({toast:u,onDismiss:c})=>{const d={success:s.jsx(js,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Ml,{className:"h-5 w-5 text-red-400"}),info:s.jsx(ub,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Fi,{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(gn,{className:"h-5 w-5"})]})})]})})})},ay=()=>{const{toasts:u,removeToast:c}=pt();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(ly,{toast:d,onDismiss:c},d.id))})};function ny(){const{setGlobalMode:u,setGlobalModeLoading:c,setProjects:d,selectProject:r,selectedProjectId:m}=pt();w.useEffect(()=>{c(!0),Hb().then(async({globalMode:x})=>{if(u(x),!x)return;const f=await Lb();d(f);const v=f.filter(g=>g.valid);m&&v.some(g=>g.name===m)?r(m):v.length>0&&r(v[0].name)}).catch(()=>{u(!1)}).finally(()=>{c(!1)})},[])}function mh(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 ki(u,c){return u?c?mh(u)>=mh(c)?u:c:u:c}function sy(){const{setStatus:u,setProjectName:c,selectedProjectId:d,globalModeLoading:r,status:m}=pt(),x=w.useRef(null);x.current=pt.getState().status,Zb(f=>{ki(f,x.current)===f&&u(f)},[d,r],{enabled:!r}),w.useEffect(()=>{if(r)return;gc().then(v=>{ki(v,x.current)===v&&u(v)}).catch(()=>{});const f=setInterval(()=>{gc().then(v=>{ki(v,x.current)===v&&u(v)}).catch(()=>{})},3e4);return()=>clearInterval(f)},[d,r,u]),w.useEffect(()=>{const f=()=>{gc().then(v=>{ki(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 ze=({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})]}),Be=({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]",g={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} ${g[c]} ${p[d]} ${m}`,disabled:x||r,...f,children:[r&&s.jsx(Gh,{className:"mr-2 h-4 w-4 animate-spin"}),u]})},fn=({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})},a0={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"}},iy=({defaultColumn:u,onClose:c,onCreated:d})=>{const[r,m]=w.useState(""),[x,f]=w.useState(""),[v,g]=w.useState(u),[p,y]=w.useState(!1),[b,T]=w.useState(null),{addToast:z}=pt(),q=async A=>{if(A.preventDefault(),!!r.trim()){y(!0),T(null);try{await Qb({title:r.trim(),body:x,column:v}),z({title:"Issue created",message:`"${r.trim()}" added to ${v}`,type:"success"}),d(),c()}catch(k){T(k instanceof Error?k.message:"Failed to create issue")}finally{y(!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(gn,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:q,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:A=>m(A.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:A=>g(A.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:na.map(A=>s.jsx("option",{value:A,children:A},A))})]}),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:A=>f(A.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"})]}),b&&s.jsx("p",{className:"text-sm text-red-400",children:b}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Be,{variant:"ghost",type:"button",onClick:c,children:"Cancel"}),s.jsx(Be,{type:"submit",disabled:p||!r.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},uy=({issue:u,onClose:c,onMoved:d,onClosed:r})=>{const[m,x]=w.useState(!1),[f,v]=w.useState(!1),{addToast:g}=pt(),p=async T=>{if(T!==u.column){x(!0);try{await t0(u.number,T),g({title:"Issue moved",message:`#${u.number} moved to ${T}`,type:"success"}),d(),c()}catch(z){g({title:"Move failed",message:z instanceof Error?z.message:"Failed to move issue",type:"error"})}finally{x(!1)}}},y=async()=>{if(confirm(`Close issue #${u.number}: "${u.title}"?`)){v(!0);try{await Vb(u.number),g({title:"Issue closed",message:`#${u.number} closed on GitHub`,type:"success"}),r(),c()}catch(T){g({title:"Close failed",message:T instanceof Error?T.message:"Failed to close issue",type:"error"})}finally{v(!1)}}},b=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(fn,{variant:a0[b].badge,children:b})]}),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(gn,{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:"}),na.filter(T=>T!==u.column).map(T=>s.jsx("button",{onClick:()=>p(T),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:T},T))]}),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(Yh,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:y,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."})})]})]})},ry=({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(ze,{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(", ")})]})})},cy=({name:u,issues:c,draggingIssue:d,onIssueClick:r,onNewIssue:m,onMoveIssue:x,onDragStart:f})=>{const v=a0[u],[g,p]=w.useState(!1),y=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 ${g&&y?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:b=>{y&&(b.preventDefault(),b.dataTransfer.dropEffect="move",p(!0))},onDragLeave:()=>p(!1),onDrop:b=>{b.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(vn,{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 ${g&&y?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:g&&y?"Drop here":"No issues"})}):c.map(b=>s.jsx(ry,{issue:b,onClick:()=>r(b),onDragStart:f},b.id))})]})},oy=()=>{const[u,c]=w.useState(null),[d,r]=w.useState(null),[m,x]=w.useState(null),[f,v]=w.useState(null),g=w.useRef(!1),{addToast:p,selectedProjectId:y,globalModeLoading:b}=pt(),{data:T,loading:z,error:q,refetch:A}=el(e0,[y],{enabled:!b});w.useEffect(()=>{const L=setInterval(()=>{g.current||A()},3e4);return()=>clearInterval(L)},[A]);const k=w.useCallback(async(L,S)=>{x(null);const le=f??(T==null?void 0:T.columns);if(!le)return;const X=le,F={};for(const ue of na)F[ue]=(le[ue]??[]).filter(ve=>ve.number!==L.number);const P={...L,column:S};F[S]=[...F[S]??[],P],v(F),c(ue=>(ue==null?void 0:ue.number)===L.number?P:ue),g.current=!0;try{await t0(L.number,S),A(),setTimeout(()=>{v(null),g.current=!1},800)}catch(ue){v(X),c(ve=>(ve==null?void 0:ve.number)===L.number?L:ve),g.current=!1,p({title:"Move failed",message:ue instanceof Error?ue.message:"Failed to move issue",type:"error"})}},[p,A,f,T]);if(b||z)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(q&&q.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(q)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:q.message}),s.jsx(Be,{onClick:()=>A(),children:"Retry"})]});if(!T)return null;const Q=f??T.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:[na.reduce((L,S)=>{var le;return L+(((le=Q[S])==null?void 0:le.length)??0)},0)," issues across ",na.length," columns"]})]}),s.jsxs(Be,{onClick:()=>r("Ready"),children:[s.jsx(vn,{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:`${na.length*236}px`},children:na.map(L=>s.jsx(cy,{name:L,issues:Q[L]??[],draggingIssue:m,onIssueClick:c,onNewIssue:r,onMoveIssue:k,onDragStart:x},L))})}),u&&s.jsx(uy,{issue:u,onClose:()=>c(null),onMoved:()=>A(),onClosed:()=>A()}),d&&s.jsx(iy,{defaultColumn:d,onClose:()=>r(null),onCreated:()=>A()})]})},dy=[{name:"executor",displayName:"Executor",processName:"executor",triggerId:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",triggerId:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",triggerId:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",triggerId:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",triggerId:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"}],fy=({processes:u,activePrd:c,onCancelProcess:d,onForceClear:r,onViewLog:m,cancellingProcess:x,clearingLock:f,onTriggerJob:v,triggeringJob:g})=>{const p=b=>u.find(T=>T.name===b),y=(b,T)=>b.length<=T?b:b.slice(0,T-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:dy.map(b=>{const T=p(b.processName),z=(T==null?void 0:T.running)??!1,q=T==null?void 0:T.pid,A=x===b.cancelType,k=z&&b.cancelType,Q=!z&&b.name==="executor"&&c,L=z?q?`PID: ${q}`:b.runningLabel:b.idleLabel,S=z&&b.name==="executor"&&c?y(c,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${z?"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 ${z?"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 ${z?"text-slate-200":"text-slate-400"}`,children:b.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:S?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ec,{className:"h-3 w-3 flex-shrink-0"}),S]}):L})]}),s.jsxs("div",{className:"flex-shrink-0",children:[k&&s.jsx("button",{onClick:()=>b.cancelType&&d(b.cancelType),disabled:A,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(oh,{className:"h-3.5 w-3.5"})}),Q&&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(oh,{className:"h-3.5 w-3.5"})}),!k&&!Q&&z&&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(Ec,{className:"h-3.5 w-3.5"})}),!z&&!Q&&s.jsx("button",{onClick:()=>v(b.triggerId),disabled:g!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${b.displayName}`,children:g===b.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(mn,{className:"h-3.5 w-3.5"})})]})]},b.name)})})},my={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"},hy=()=>{var K,De;const u=_c(),[c,d]=w.useState(null),[r,m]=w.useState(!1),[x,f]=w.useState(null),{setProjectName:v,addToast:g,selectedProjectId:p,globalModeLoading:y,status:b}=pt(),{data:T}=el(Jh,[p],{enabled:!y}),{data:z,loading:q}=el(()=>e0().catch(()=>null),[p],{enabled:!y}),A=b;if(ye.useEffect(()=>{A!=null&&A.projectName&&v(A.projectName)},[A,v]),y)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!A)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const k=A.prs.length,Q=A.prs.filter(ie=>ie.reviewScore!==null&&ie.reviewScore<70).length,L=((K=z==null?void 0:z.columns.Ready)==null?void 0:K.length)??0,S=((De=z==null?void 0:z.columns["In Progress"])==null?void 0:De.length)??0,le=async ie=>{d(ie);try{const me=await Gb(ie),$=me.results.every(Ye=>Ye.success);g({title:$?"Process Cancelled":"Cancel Failed",message:me.results.map(Ye=>Ye.message).join("; "),type:$?"success":"error"})}catch(me){g({title:"Cancel Failed",message:me instanceof Error?me.message:"Failed to cancel process",type:"error"})}finally{d(null)}},X=async()=>{m(!0);try{await Xb(),g({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(ie){g({title:"Clear Failed",message:ie instanceof Error?ie.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},F=async ie=>{f(ie);try{await{executor:Fh,reviewer:kc,qa:Ph,audit:Wh,planner:Ih}[ie](),g({title:"Job Triggered",message:`${ie[0].toUpperCase()+ie.slice(1)} job has been queued.`,type:"success"})}catch(me){g({title:"Trigger Failed",message:me instanceof Error?me.message:`Failed to trigger ${ie}`,type:"error"})}finally{f(null)}},P=ie=>{if(!ie)return"Not scheduled";try{const me=new Date(ie),$=new Date,Ye=me.getTime()-$.getTime(),U=Math.floor(Ye/6e4);return U<0?"Running now...":U<60?`in ${U} min`:U<1440?`in ${Math.floor(U/60)} hr${U>=120?"s":""}`:`in ${Math.floor(U/1440)} day${U>=2880?"s":""}`}catch{return"Unknown"}},ve=(()=>{var $,Ye,U;if(T!=null&&T.paused)return null;const ie=[{agent:"Executor",nextRun:(T==null?void 0:T.executor.nextRun)??null},{agent:"Reviewer",nextRun:(T==null?void 0:T.reviewer.nextRun)??null},{agent:"QA",nextRun:(($=T==null?void 0:T.qa)==null?void 0:$.nextRun)??null},{agent:"Auditor",nextRun:((Ye=T==null?void 0:T.audit)==null?void 0:Ye.nextRun)??null},{agent:"Planner",nextRun:((U=T==null?void 0:T.planner)==null?void 0:U.nextRun)??null}];let me=null;for(const Z of ie)Z.nextRun&&(!me||new Date(Z.nextRun)<new Date(me.nextRun))&&(me=Z);return me?{agent:me.agent,time:P(me.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(ze,{className:"p-5",onClick:()=>u("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:L})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(js,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(ze,{className:"p-5",onClick:()=>u("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:S})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Bh,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(ze,{className:"p-5",onClick:()=>u("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:k})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Xi,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${Q>0?"text-red-400 font-medium":"text-slate-500"}`,children:Q>0?`${Q} need work`:"All passing"})]}),s.jsxs(ze,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:T!=null&&T.paused?"Paused":A.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${T!=null&&T.paused?"bg-amber-500/10 text-amber-400":A.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(qc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:T!=null&&T.paused?"All schedules paused":A.crontab.installed?`${A.crontab.entries.length} entr${A.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(ze,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>u("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(fy,{processes:A.processes,activePrd:A.activePrd,onCancelProcess:le,onForceClear:X,onViewLog:()=>u("/logs"),cancellingProcess:c,clearingLock:r,onTriggerJob:F,triggeringJob:x})]}),ve&&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:ve.agent}),s.jsx("span",{children:ve.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(ih,{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(ih,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(ze,{className:"p-4",children:q?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):z?s.jsx("div",{className:"flex flex-wrap gap-3",children:na.map(ie=>{var $;const me=(($=z.columns[ie])==null?void 0:$.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 ${my[ie]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:ie}),s.jsx("span",{className:"text-xs font-bold",children:me})]},ie)})}):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."]})})]})]})},xy=()=>{const[u,c]=w.useState(!0),[d,r]=w.useState(""),[m,x]=w.useState("executor"),f=w.useRef(null),{selectedProjectId:v,globalModeLoading:g}=pt(),p=pt(L=>L.status),{data:y,loading:b,error:T,refetch:z}=el(()=>Bb(m,500),[m,v],{enabled:!g}),q=(y==null?void 0:y.lines)||[];w.useEffect(()=>{u&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[q,u]),w.useEffect(()=>{if(!u)return;const L=window.setInterval(()=>{z()},3e3);return()=>window.clearInterval(L)},[u,m,z]);const A=q.filter(L=>L.toLowerCase().includes(d.toLowerCase())),k=L=>{x(L),r("")},Q=L=>{if(!(p!=null&&p.processes))return!1;const S=p.processes.find(le=>le.name===L);return(S==null?void 0:S.running)??!1};return T?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Ml,{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:T.message}),s.jsx(Be,{onClick:()=>z(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:L=>r(L.target.value)}),s.jsx(Ji,{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"}),Q("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"}),Q("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"}),Q("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"}),Q("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"}),Q("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(Be,{size:"sm",variant:"ghost",onClick:()=>z(),children:[s.jsx(rh,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>c(!u),children:[u?s.jsx(Vh,{className:"h-4 w-4 mr-2"}):s.jsx(mn,{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:[A.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:[b?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):A.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"}):A.map((L,S)=>{const le=L.includes("[ERROR]"),X=L.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${le?"text-red-400":X?"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:S+1}),L]},S)}),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(rh,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},py=()=>{const[u,c]=w.useState(null),[d,r]=w.useState(!1),[m,x]=w.useState("all"),[f,v]=w.useState("number"),[g,p]=w.useState("desc"),{addToast:y,selectedProjectId:b,globalModeLoading:T}=pt(),{data:z,loading:q,error:A,refetch:k}=el($h,[b],{enabled:!T}),Q=z??[],L=K=>{switch(K){case"pass":return s.jsx(js,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx($g,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Gh,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Ml,{className:"h-4 w-4 text-slate-500"})}},S=K=>{switch(K){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},le=K=>K===null?"No review decision yet":K===100?"PR has been approved":K===0?"Changes have been requested":`Review score: ${K}`,X=w.useMemo(()=>Q.filter(K=>{switch(m){case"needs-work":return K.ciStatus==="fail"||K.reviewScore===0;case"pending":return K.ciStatus==="pending"||K.ciStatus==="unknown"||K.reviewScore===null;case"passed":return K.ciStatus==="pass"&&K.reviewScore===100;case"all":default:return!0}}),[Q,m]),F=w.useMemo(()=>[...X].sort((De,ie)=>{let me=0;switch(f){case"number":me=De.number-ie.number;break;case"title":me=De.title.localeCompare(ie.title);break;case"branch":me=De.branch.localeCompare(ie.branch);break;case"ciStatus":{const $={fail:0,pending:1,unknown:2,pass:3};me=($[De.ciStatus]??2)-($[ie.ciStatus]??2);break}case"reviewScore":{const $=De.reviewScore??-1,Ye=ie.reviewScore??-1;me=$-Ye;break}}return g==="asc"?me:-me}),[X,f,g]),P=K=>{f===K?p(g==="asc"?"desc":"asc"):(v(K),p("desc"))},ue=K=>f!==K?s.jsx(Tg,{className:"h-3 w-3 text-slate-600"}):g==="asc"?s.jsx(Rg,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Ng,{className:"h-3 w-3 text-indigo-400"});if(q)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(A)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Ml,{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:A.message}),s.jsx(Be,{onClick:()=>k(),children:"Retry"})]});const ve=async()=>{r(!0);try{const K=await kc();y({title:"Reviewer Started",message:K.pid?`Started with PID ${K.pid}`:"Reviewer started",type:"success"})}catch(K){y({title:"Reviewer Failed",message:K instanceof Error?K.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(Be,{size:"sm",onClick:ve,disabled:d,children:[s.jsx(Ji,{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:()=>P("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),ue("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:()=>P("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),ue("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:()=>P("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),ue("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:()=>P("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),ue("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:[F.map(K=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>c(u===K.number?null:K.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:["#",K.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:K.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:K.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:S(K.ciStatus),children:[L(K.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:K.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:K.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:le(K.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${K.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${K.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${K.reviewScore>=70?"text-green-500":"text-red-500"}`,children:K.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:K.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:De=>De.stopPropagation(),children:s.jsx(Yh,{className:"h-4 w-4"})})})]},K.number)),F.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Q.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),u&&s.jsx(ze,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const K=Q.find(De=>De.number===u);return K?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:K.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:K.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:S(K.ciStatus),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),s.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[L(K.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:K.ciStatus})]})]}),K.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:le(K.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${K.reviewScore>=70?"text-green-500":"text-red-500"}`,children:K.reviewScore})]})]})]}):null})()})]})},Jt=ye.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 vy=()=>{const{addToast:u,selectedProjectId:c,globalModeLoading:d}=pt(),[r,m]=w.useState(!1),[x,f]=w.useState(!1),{data:v,loading:g,error:p,refetch:y}=el($b,[c],{enabled:!d});w.useEffect(()=>{if(!(v!=null&&v.enabled))return;const L=setInterval(()=>{y()},1e4);return()=>clearInterval(L)},[v==null?void 0:v.enabled,y]);const b=async L=>{f(!0);try{await l0(L),u({title:L?"Scanner Enabled":"Scanner Disabled",message:L?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:L?"success":"info"}),y()}catch(S){u({title:"Toggle Failed",message:S instanceof Error?S.message:"Failed to toggle scanner",type:"error"})}finally{f(!1)}},T=async()=>{m(!0);try{const L=await Kb();L.created.length>0?u({title:"Scan Complete",message:`Created ${L.created.length} PRD(s): ${L.created.join(", ")}`,type:"success"}):u({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),L.errors.length>0&&u({title:"Scan Errors",message:L.errors.join("; "),type:"warning"}),y()}catch(L){u({title:"Scan Failed",message:L instanceof Error?L.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(g)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(Ml,{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(Be,{onClick:()=>y(),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(ze,{className:"p-12",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:s.jsx(Qh,{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 z=v.totalItems>0?Math.round(v.processedItems/v.totalItems*100):0,q=by(v.status),A=yy(v.items),k=v.lastScan?jy(v.lastScan):"Never",Q=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:b,disabled:x}),s.jsxs(Be,{onClick:T,loading:r,disabled:!v.enabled||v.status==="complete",children:[s.jsx(mn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(ze,{className:`p-6 border-2 ${q.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(q.icon,{className:`h-8 w-8 ${q.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 ${q.textColor}`,children:q.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 ",Q," min"]})]}),v.enabled&&v.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(ze,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[v.processedItems," / ",v.totalItems," items (",z,"%)"]})]}),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 ${z===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${z}%`}})})]}),Object.entries(A).map(([L,S])=>s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:L}),s.jsx("div",{className:"space-y-2",children:S.map(le=>s.jsx(gy,{item:le},le.hash))})]},L))]})};function gy({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(mb,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(js,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Ec,{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(fn,{variant:"neutral",children:"Skipped"}):d?s.jsx(fn,{variant:"success",children:u.prdFile||"Processed"}):s.jsx(fn,{variant:"warning",children:"Pending"})})]})}function by(u){switch(u){case"complete":return{label:"Complete",icon:js,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Xi,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:mn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Ml,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Ml,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function yy(u){const c={};for(const d of u){const r=d.section||"General";c[r]||(c[r]=[]),c[r].push(d)}return c}function jy(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 n0=({tabs:u,activeTab:c,onChange:d,className:r=""})=>{var g,p;const[m,x]=ye.useState((g=u[0])==null?void 0:g.id),f=c||m,v=y=>{d?d(y):x(y)};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(y=>s.jsx("button",{onClick:()=>v(y.id),className:`
|
|
350
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
351
|
+
${f===y.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
352
|
+
`,children:y.label},y.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=u.find(y=>y.id===f))==null?void 0:p.content})]})},Zi=[{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"}],Yc=[{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 hn(u){return u?u.trim().replace(/\s+/g," "):""}function on(u,c){return hn(u)===hn(c)}function Sy(u){if(u)return Yc.find(c=>c.id===u)}function s0(u,c,d,r,m,x){return on(u.schedules.executor,c)&&on(u.schedules.reviewer,d)&&on(u.schedules.qa,r)&&on(u.schedules.audit,m)&&on(u.schedules.slicer,x)}function Ny(u,c,d,r,m){return Yc.find(x=>s0(x,u,c,d,r,m))}function ps(u,c,d,r,m,x){const f=Sy(u);return f&&s0(f,c,d,r,m,x)?f:Ny(c,d,r,m,x)}function hh(u){const c=hn(u),d=c.split(/\s+/);if(d.length!==5)return c;const[r,m,x,f,v]=d,g=/^\d+$/.test(r),p=Zi.find(y=>hn(y.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(g&&m.startsWith("*/")&&x==="*"&&f==="*"&&v==="*"){const y=parseInt(m.replace("*/",""),10);return r==="0"?`Every ${y} hours`:`Every ${y} hours at :${r.padStart(2,"0")}`}if(r==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(r==="0"&&m.includes("-")){const[y,b]=m.split("-");return`Every hour from ${hs(y)} to ${hs(b)}`}if(g&&m.includes("-")&&x==="*"&&f==="*"&&v==="*"){const[y,b]=m.split("-");return`Every hour from ${xs(y,r)} to ${xs(b,r)}`}if(r==="0"&&m.includes(",")){const y=m.split(",").map(hs);return y.length<=3?`At ${y.join(" and ")}`:`At ${y.slice(0,-1).join(", ")}, and ${y[y.length-1]}`}if(g&&m.includes(",")&&x==="*"&&f==="*"&&(v==="*"||v==="1-5")){const y=m.split(",").map(T=>xs(T,r)),b=v==="1-5"?"Weekdays at ":"At ";return y.length<=3?`${b}${y.join(" and ")}`:`${b}${y.slice(0,-1).join(", ")}, and ${y[y.length-1]}`}return r==="0"&&m!=="*"&&x==="*"&&f==="*"&&v==="*"?`Daily at ${hs(m)}`:g&&m!=="*"&&x==="*"&&f==="*"&&v==="*"?`Daily at ${xs(m,r)}`:r==="0"&&m!=="*"&&x==="*"&&f==="*"&&v==="1-5"?`Weekdays at ${hs(m)}`:g&&m!=="*"&&x==="*"&&f==="*"&&v==="1-5"?`Weekdays at ${xs(m,r)}`:c}function hs(u){const c=parseInt(u,10);return c===0?"12 AM":c<12?`${c} AM`:c===12?"12 PM":`${c-12} PM`}function xs(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 Ey(u){const c=hn(u),d=Zi.find(r=>hn(r.value)===c);return(d==null?void 0:d.value)??"__custom__"}function wy(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 Ty(u){const c={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return u.toLocaleDateString("en-US",c)}function Cy(u){const c=new Date,d=u.getTime()-c.getTime(),r=Math.floor(d/6e4);return r>=0&&r<30}const Te=ye.forwardRef(({className:u="",label:c,error:d,helperText:r,rightIcon:m,...x},f)=>{const v=ye.useId(),g=x.id??v,p=d?`${g}-error`:void 0,y=!d&&r?`${g}-help`:void 0,b=[p,y].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[c&&s.jsx("label",{htmlFor:g,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:g,"aria-describedby":b,"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:y,className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});Te.displayName="Input";const Ct=ye.forwardRef(({className:u="",label:c,error:d,helperText:r,options:m,value:x,onChange:f,children:v,...g},p)=>{const y=ye.useId(),b=g.id??y,T=d?`${b}-error`:void 0,z=!d&&r?`${b}-help`:void 0,q=[T,z].filter(Boolean).join(" ")||void 0,A=k=>{f&&f(k.target.value)};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("select",{ref:p,id:b,"aria-describedby":q,"aria-invalid":d?!0:g["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:A,...g,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(kh,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:T,className:"mt-1.5 text-xs text-red-400",children:d}):r?s.jsx("p",{id:z,className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});Ct.displayName="Select";const dn=({label:u,value:c,onChange:d,helperText:r,placeholder:m="5 */3 * * *"})=>{const x=Ey(c),f=x==="__custom__",v=y=>{y!=="__custom__"&&d(y)},g=y=>{d(y.target.value)},p=Zi.find(y=>y.value===x);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ct,{label:u,value:x,onChange:v,options:Zi.map(y=>({label:y.label,value:y.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:g,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)"]})]})]})},i0=({form:u,scheduleMode:c,selectedTemplateId:d,onFieldChange:r,onSwitchToTemplate:m,onSwitchToCustom:x,onApplyTemplate:f})=>s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${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:Yc.map(v=>{const g=d===v.id;return s.jsxs("button",{type:"button",onClick:()=>f(v),className:`text-left p-4 rounded-lg border transition-colors ${g?"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,y])=>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:y})]},p))})]},v.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(dn,{label:"PRD Execution Schedule",value:u.cronSchedule,onChange:v=>r("cronSchedule",v)}),s.jsx(dn,{label:"PR Review Schedule",value:u.reviewerSchedule,onChange:v=>r("reviewerSchedule",v)}),s.jsx(dn,{label:"QA Schedule",value:u.qa.schedule,onChange:v=>r("qa",{...u.qa,schedule:v})}),s.jsx(dn,{label:"Audit Schedule",value:u.audit.schedule,onChange:v=>r("audit",{...u.audit,schedule:v})}),u.roadmapScanner.enabled&&s.jsx(dn,{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(Ct,{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 g=Math.min(59,Math.max(0,Number(v.target.value||0)));r("cronScheduleOffset",g)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),Ry=()=>{var ce,he,Ne,tt,Ge,tl,C,W,de,we,lt,vt,Lt;const{addToast:u,selectedProjectId:c,globalModeLoading:d}=pt(),[r,m]=w.useState("overview"),[x,f]=w.useState(!1),[v,g]=w.useState(!1),[p,y]=w.useState(null),[b,T]=w.useState(null),[z,q]=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:A,loading:k,error:Q,refetch:L}=el(Jh,[c],{enabled:!d}),{data:S,loading:le,refetch:X}=el(Kh,[c],{enabled:!d});w.useEffect(()=>{const V=setInterval(()=>{L()},3e4);return()=>clearInterval(V)},[L]),w.useEffect(()=>{var V,se,Qe,bt,ll,al;if(S&&!z.isDirty){const _l=ps(S.scheduleBundleId,S.cronSchedule,S.reviewerSchedule,((V=S.qa)==null?void 0:V.schedule)||"45 2,14 * * *",((se=S.audit)==null?void 0:se.schedule)||"50 3 * * 1",((Qe=S.roadmapScanner)==null?void 0:Qe.slicerSchedule)||"35 */12 * * *");q({form:{cronSchedule:S.cronSchedule||"5 */3 * * *",reviewerSchedule:S.reviewerSchedule||"25 */6 * * *",qa:S.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:S.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((bt=S.roadmapScanner)==null?void 0:bt.enabled)??!0,slicerSchedule:((ll=S.roadmapScanner)==null?void 0:ll.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:S.scheduleBundleId??null,schedulingPriority:S.schedulingPriority??3,cronScheduleOffset:S.cronScheduleOffset??0,globalQueueEnabled:((al=S.queue)==null?void 0:al.enabled)??!0},scheduleMode:_l?"template":"custom",selectedTemplateId:(_l==null?void 0:_l.id)??"",isDirty:!1})}},[S,z.isDirty]);const F=()=>{X(),L()},P=(V,se)=>V instanceof Error?V.message:se,ue=async()=>{if(A){f(!0);try{A.paused?(await vs(),u({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Yb(),u({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),F()}catch(V){u({title:"Action Failed",message:P(V,"Failed to toggle schedule state"),type:"error"})}finally{f(!1)}}},ve=async(V,se)=>{if(S){y(V);try{V==="executor"?await aa({executorEnabled:se}):V==="reviewer"?await aa({reviewerEnabled:se}):V==="qa"?await aa({qa:{...S.qa,enabled:se}}):V==="audit"?await aa({audit:{...S.audit,enabled:se}}):await aa({roadmapScanner:{...S.roadmapScanner,enabled:se}});let Qe="";try{await vs()}catch(bt){Qe=P(bt,"Failed to reinstall cron schedules")}F(),u(Qe?{title:"Job Saved (Cron Reinstall Failed)",message:Qe,type:"warning"}:{title:"Job Updated",message:`${V[0].toUpperCase()+V.slice(1)} ${se?"enabled":"disabled"}.`,type:"success"})}catch(Qe){u({title:"Update Failed",message:P(Qe,"Failed to update job configuration"),type:"error"})}finally{y(null)}}},K=async V=>{T(V);try{await{executor:Fh,reviewer:kc,qa:Ph,audit:Wh,planner:Ih}[V](),u({title:"Job Triggered",message:`${V[0].toUpperCase()+V.slice(1)} job has been queued.`,type:"success"}),L()}catch(se){u({title:"Trigger Failed",message:P(se,`Failed to trigger ${V} job`),type:"error"})}finally{T(null)}},De=(V,se)=>{q(Qe=>({...Qe,form:{...Qe.form,[V]:se},isDirty:!0}))},ie=()=>{if(!z.form)return;const V=ps(z.form.scheduleBundleId,z.form.cronSchedule,z.form.reviewerSchedule,z.form.qa.schedule,z.form.audit.schedule,z.form.roadmapScanner.slicerSchedule||"35 */12 * * *");q(se=>({...se,scheduleMode:"template",selectedTemplateId:(V==null?void 0:V.id)??"always-on",form:{...se.form,scheduleBundleId:(V==null?void 0:V.id)??null},isDirty:!0}))},me=()=>{q(V=>({...V,scheduleMode:"custom",selectedTemplateId:"",form:{...V.form,scheduleBundleId:null},isDirty:!0}))},$=V=>{q(se=>({...se,selectedTemplateId:V.id,scheduleMode:"template",form:{...se.form,cronSchedule:V.schedules.executor,reviewerSchedule:V.schedules.reviewer,scheduleBundleId:V.id,qa:{...se.form.qa,schedule:V.schedules.qa},audit:{...se.form.audit,schedule:V.schedules.audit},roadmapScanner:{...se.form.roadmapScanner,slicerSchedule:V.schedules.slicer}},isDirty:!0}))},Ye=async()=>{if(S){g(!0);try{await aa({cronSchedule:z.form.cronSchedule,reviewerSchedule:z.form.reviewerSchedule,scheduleBundleId:z.scheduleMode==="template"?z.form.scheduleBundleId:null,cronScheduleOffset:z.form.cronScheduleOffset,schedulingPriority:z.form.schedulingPriority,qa:{...S.qa,schedule:z.form.qa.schedule},audit:{...S.audit,schedule:z.form.audit.schedule},roadmapScanner:{...S.roadmapScanner,slicerSchedule:z.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...S.queue,enabled:z.form.globalQueueEnabled??!0},executorEnabled:S.executorEnabled,reviewerEnabled:S.reviewerEnabled});let V="";try{await vs()}catch(se){V=P(se,"Failed to reinstall cron schedules")}q(se=>({...se,isDirty:!1})),F(),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:P(V,"Failed to save schedules"),type:"error"})}finally{g(!1)}}},U=V=>{if(!V)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const se=new Date(V),Qe=Cy(se);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Qe&&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:wy(se)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",Ty(se),")"]})]})]})},Z=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 se=[];return V.balancedDelayMinutes>0&&se.push(`auto +${V.balancedDelayMinutes}m`),V.manualDelayMinutes>0&&se.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:[" ",se.join(" - ")]})]})};if(k||le)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(Q||!A||!S)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Ml,{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:(Q==null?void 0:Q.message)||"Unknown error"}),s.jsx(Be,{onClick:()=>{L(),X()},children:"Retry"})]});const ae=A.paused,Ce=ae?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",Me=ae?"Paused":"Active",N=ps(S.scheduleBundleId,S.cronSchedule,S.reviewerSchedule,((ce=S.qa)==null?void 0:ce.schedule)||"45 2,14 * * *",((he=S.audit)==null?void 0:he.schedule)||"50 3 * * 1",((Ne=S.roadmapScanner)==null?void 0:Ne.slicerSchedule)||"35 */12 * * *"),B=(V,se,Qe)=>!N||!on(N.schedules[V],se)?hh(Qe):`${N.label} - ${N.hints[V]}`,J=[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Xi,{className:"h-4 w-4"}),enabled:(S==null?void 0:S.executorEnabled)!==!1,schedule:A.executor.schedule,nextRun:A.executor.nextRun,delayInfo:A.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(Ji,{className:"h-4 w-4"}),enabled:(S==null?void 0:S.reviewerEnabled)??!1,schedule:A.reviewer.schedule,nextRun:A.reviewer.nextRun,delayInfo:A.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(Rb,{className:"h-4 w-4"}),enabled:((tt=S==null?void 0:S.qa)==null?void 0:tt.enabled)??!1,schedule:(Ge=A.qa)==null?void 0:Ge.schedule,nextRun:(tl=A.qa)==null?void 0:tl.nextRun,delayInfo:A.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(ch,{className:"h-4 w-4"}),enabled:((C=S==null?void 0:S.audit)==null?void 0:C.enabled)??!1,schedule:(W=A.audit)==null?void 0:W.schedule,nextRun:(de=A.audit)==null?void 0:de.nextRun,delayInfo:A.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(ch,{className:"h-4 w-4"}),enabled:((we=S==null?void 0:S.roadmapScanner)==null?void 0:we.enabled)??!1,schedule:((lt=A.planner)==null?void 0:lt.schedule)||((vt=S.roadmapScanner)==null?void 0:vt.slicerSchedule)||"35 */12 * * *",nextRun:(Lt=A.planner)==null?void 0:Lt.nextRun,delayInfo:A.planner}],I=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(ze,{className:`p-6 border-2 ${Ce}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Xi,{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:Me}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Be,{variant:ae?"primary":"outline",size:"lg",onClick:ue,loading:x,children:ae?s.jsxs(s.Fragment,{children:[s.jsx(mn,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Vh,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:J.map(V=>{var se,Qe,bt,ll,al,Fe;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:_l=>ve(V.id,_l)})]}),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:B(V.id==="planner"?"slicer":V.id,V.id==="qa"?((se=S==null?void 0:S.qa)==null?void 0:se.schedule)||"":V.id==="audit"?((Qe=S==null?void 0:S.audit)==null?void 0:Qe.schedule)||"":V.id==="planner"?((bt=S==null?void 0:S.roadmapScanner)==null?void 0:bt.slicerSchedule)||"35 */12 * * *":V.schedule,V.id==="qa"?((ll=S==null?void 0:S.qa)==null?void 0:ll.schedule)||"":V.id==="audit"?((al=S==null?void 0:S.audit)==null?void 0:al.schedule)||"":V.id==="planner"?((Fe=S==null?void 0:S.roadmapScanner)==null?void 0:Fe.slicerSchedule)||"35 */12 * * *":V.schedule)})]}),Z(V.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),U(V.nextRun)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${V.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(Nc,{className:"h-4 w-4"}),s.jsx("span",{children:V.enabled?"Active":"Disabled"})]}),s.jsxs("button",{disabled:b!==null,onClick:()=>K(V.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium text-green-400 bg-green-500/10 hover:bg-green-500/20 border border-green-500/30 hover:border-green-500/50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[b===V.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(mn,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]}):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(i0,{form:z.form,scheduleMode:z.scheduleMode,selectedTemplateId:z.selectedTemplateId,onFieldChange:De,onSwitchToTemplate:ie,onSwitchToCustom:me,onApplyTemplate:$}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Be,{variant:"ghost",onClick:()=>{var V,se,Qe,bt,ll,al;if(S){const Fe=ps(S.scheduleBundleId,S.cronSchedule,S.reviewerSchedule,((V=S.qa)==null?void 0:V.schedule)||"45 2,14 * * *",((se=S.audit)==null?void 0:se.schedule)||"50 3 * * 1",((Qe=S.roadmapScanner)==null?void 0:Qe.slicerSchedule)||"35 */12 * * *");q({form:{cronSchedule:S.cronSchedule||"5 */3 * * *",reviewerSchedule:S.reviewerSchedule||"25 */6 * * *",qa:S.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:S.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((bt=S.roadmapScanner)==null?void 0:bt.enabled)??!0,slicerSchedule:((ll=S.roadmapScanner)==null?void 0:ll.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:S.scheduleBundleId??null,schedulingPriority:S.schedulingPriority??3,cronScheduleOffset:S.cronScheduleOffset??0,globalQueueEnabled:((al=S.queue)==null?void 0:al.enabled)??!0},scheduleMode:Fe?"template":"custom",selectedTemplateId:(Fe==null?void 0:Fe.id)??"",isDirty:!1})}},disabled:!z.isDirty,children:"Reset"}),s.jsxs(Be,{onClick:Ye,loading:v,disabled:!z.isDirty,children:[s.jsx(Nc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(ze,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(qc,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),A.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:A.entries.map((V,se)=>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},se))})]})}];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"}),N&&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:N.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",A.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(n0,{tabs:I,activeTab:r,onChange:m})]})},xh=({presetId:u,preset:c,isBuiltIn:d,onEdit:r,onDelete:m,onReset:x})=>{var p,y,b;const f=c.envVars?Object.keys(c.envVars).length:0,g=(u.startsWith("glm-")||((p=c.model)==null?void 0:p.startsWith("glm-")))&&!((b=(y=c.envVars)==null?void 0:y.ANTHROPIC_API_KEY)!=null&&b.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(fn,{variant:"info",className:"text-[10px]",children:"Built-in"}),g&&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(Fi,{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(Hc,{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(Xh,{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(Lc,{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(fn,{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":""]})]})]})},Ay=({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?xg.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(gn,{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),My=u=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>u.toUpperCase().includes(d)),_y=({value:u,isSensitive:c})=>{const[d,r]=ye.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(Wg,{className:"h-4 w-4"}):s.jsx(eb,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:u})},u0=({envVars:u,onChange:c,compact:d=!1})=>{const[r,m]=ye.useState(""),[x,f]=ye.useState(""),[v,g]=ye.useState(null),[p,y]=ye.useState(""),b=()=>{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("")}},T=Q=>{const L={...u};delete L[Q],c(L)},z=Q=>{g(Q),y(u[Q]??"")},q=()=>{v&&(c({...u,[v]:p}),g(null),y(""))},A=()=>{g(null),y("")},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(([Q,L])=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:Q}),v===Q?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:p,onChange:S=>y(S.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:q,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${Q} value`,title:`Save ${Q} value`,children:s.jsx(Nc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:A,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${Q}`,title:`Cancel editing ${Q}`,children:s.jsx(gn,{className:"h-4 w-4"})})]}):s.jsx(_y,{value:L,isSensitive:My(Q)})]}),v!==Q&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>z(Q),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${Q}`,title:`Edit ${Q}`,children:s.jsx(Hc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>T(Q),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${Q}`,title:`Delete ${Q}`,children:s.jsx(Lc,{className:"h-4 w-4"})})]})]},Q))}),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:Q=>m(Q.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:Q=>f(Q.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(Be,{onClick:b,disabled:!r.trim(),size:d?"sm":"md",children:[s.jsx(vn,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Dy(u,c){var d;return!!(u!=null&&u.startsWith("glm-")||(d=c==null?void 0:c.model)!=null&&d.startsWith("glm-"))}function zy(u,c){var d,r;return Dy(u,c)?!((r=(d=c==null?void 0:c.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&r.trim()):!1}const ph={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:""}},Oy=({isOpen:u,onClose:c,onSave:d,presetId:r,preset:m,isBuiltIn:x,existingIds:f})=>{const[v,g]=ye.useState(""),[p,y]=ye.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[b,T]=ye.useState(!1),[z,q]=ye.useState("custom"),[A,k]=ye.useState(null),Q=zy(r??v,p);ye.useEffect(()=>{u&&(r&&m?(g(r),y({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"?q("claude"):r==="codex"||m.command==="codex"?q("codex"):q("custom")):(g(""),y({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),q("custom")),k(null),T(!!(m!=null&&m.envVars&&Object.keys(m.envVars).length>0)))},[u,r,m]);const L=F=>{if(q(F),F!=="custom"&&ph[F]){const P=ph[F];y(ue=>({...ue,...P,envVars:ue.envVars})),!r&&!v&&g(F)}},S=(F,P)=>{y(ue=>({...ue,[F]:P})),k(null)},le=()=>{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},X=()=>{var P,ue,ve,K,De,ie;if(!le())return;const F={name:p.name.trim(),command:p.command.trim()};(P=p.subcommand)!=null&&P.trim()&&(F.subcommand=p.subcommand.trim()),(ue=p.promptFlag)!=null&&ue.trim()&&(F.promptFlag=p.promptFlag.trim()),(ve=p.autoApproveFlag)!=null&&ve.trim()&&(F.autoApproveFlag=p.autoApproveFlag.trim()),(K=p.workdirFlag)!=null&&K.trim()&&(F.workdirFlag=p.workdirFlag.trim()),(De=p.modelFlag)!=null&&De.trim()&&(F.modelFlag=p.modelFlag.trim()),(ie=p.model)!=null&&ie.trim()&&(F.model=p.model.trim()),p.envVars&&Object.keys(p.envVars).length>0&&(F.envVars=p.envVars),d(r||v,F),c()};return s.jsx(Ay,{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:[A&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:A}),Q&&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(Fi,{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(Ct,{label:"Template",value:z,onChange:L,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:F=>g(F.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:F=>S("name",F.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Te,{label:"Command",value:p.command,onChange:F=>S("command",F.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:F=>S("model",F.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Te,{label:"Model Flag",value:p.modelFlag??"",onChange:F=>S("modelFlag",F.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:()=>T(!b),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[b?s.jsx(kg,{className:"h-4 w-4"}):s.jsx(kh,{className:"h-4 w-4"}),"Advanced Options"]}),b&&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:F=>S("subcommand",F.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Te,{label:"Prompt Flag",value:p.promptFlag??"",onChange:F=>S("promptFlag",F.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:F=>S("autoApproveFlag",F.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:F=>S("workdirFlag",F.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(u0,{envVars:p.envVars??{},onChange:F=>S("envVars",F),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Be,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Be,{onClick:X,children:r?"Save Changes":"Add Preset"})]})]})})},Yi=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],bc=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}}}},vh=u=>{const c=ps(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:""}},Uy=({notifications:u,onChange:c})=>{const[d,r]=ye.useState(null),[m,x]=ye.useState(!1),[f,v]=ye.useState({type:"slack",url:"",events:[]}),g=[{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)},y=(q,A)=>{const k=[...u.webhooks];k[q]=A,c({webhooks:k})},b=q=>{c({webhooks:u.webhooks.filter((A,k)=>k!==q)})},T=(q,A)=>q.includes(A)?q.filter(k=>k!==A):[...q,A],z=({webhook:q,onChange:A,onSave:k,onCancel:Q,isNew:L})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ct,{label:"Type",value:q.type,onChange:S=>{const le=S;A(le==="telegram"?{type:le,botToken:"",chatId:"",events:q.events}:{type:le,url:"",events:q.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),q.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(Te,{label:"Bot Token",type:"password",value:q.botToken||"",onChange:S=>A({...q,botToken:S.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Te,{label:"Chat ID",value:q.chatId||"",onChange:S=>A({...q,chatId:S.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Te,{label:"Webhook URL",type:"password",value:q.url||"",onChange:S=>A({...q,url:S.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:g.map(S=>s.jsx("button",{type:"button",onClick:()=>A({...q,events:T(q.events,S.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${q.events.includes(S.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:S.label},S.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Be,{variant:"ghost",onClick:Q,children:"Cancel"}),s.jsx(Be,{onClick:k,disabled:q.events.length===0||(q.type==="telegram"?!q.botToken||!q.chatId:!q.url),children:L?"Add Webhook":"Save Changes"})]})]});return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:u.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):u.webhooks.map((q,A)=>s.jsx("div",{children:d===A?s.jsx(z,{webhook:q,onChange:k=>y(A,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:q.type}),q.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",q.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:q.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(A),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${q.type} webhook`,title:`Edit ${q.type} webhook`,children:s.jsx(Hc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>b(A),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${q.type} webhook`,title:`Delete ${q.type} webhook`,children:s.jsx(Lc,{className:"h-4 w-4"})})]})]})},A))}),m?s.jsx(z,{webhook:f,onChange:v,onSave:p,onCancel:()=>x(!1),isNew:!0}):s.jsxs(Be,{variant:"ghost",onClick:()=>x(!0),children:[s.jsx(vn,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},yc=({label:u,value:c,onChange:d,placeholder:r,helpText:m})=>{const[x,f]=ye.useState(""),v=()=>{x.trim()&&!c.includes(x.trim())&&(d([...c,x.trim()]),f(""))},g=y=>{d(c.filter(b=>b!==y))},p=y=>{y.key==="Enter"&&(y.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(y=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[y,s.jsx("button",{type:"button",onClick:()=>g(y),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${y}`,title:`Remove ${y}`,children:s.jsx(gn,{className:"h-3 w-3"})})]},y))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:x,onChange:y=>f(y.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(Be,{onClick:v,disabled:!x.trim(),"aria-label":`Add ${u.toLowerCase()} value`,children:s.jsx(vn,{className:"h-4 w-4"})})]}),m&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},qy=()=>{const{addToast:u,projectName:c,selectedProjectId:d,globalModeLoading:r}=pt(),[m,x]=ye.useState(!1),[f,v]=ye.useState(null),g=ye.useRef(!1),[p,y]=ye.useState("template"),[b,T]=ye.useState("always-on"),[z,q]=ye.useState(!1),[A,k]=ye.useState(null),[Q,L]=ye.useState(null),[S,le]=ye.useState(null),{data:X,loading:F,error:P,refetch:ue}=el(Kh,[d],{enabled:!r}),{data:ve,loading:K,refetch:De}=el(kb,[d],{enabled:!r}),ie=ve??[],me=ye.useCallback(C=>{const W=vh(C);y(W.mode),T(W.selectedTemplateId)},[]);ye.useEffect(()=>{if(X)if(g.current)g.current=!1;else{const C=bc(X);v(C),me(C)}},[X,me]);const $=(C,W)=>{v(de=>de&&{...de,[C]:W})},Ye=()=>{if(y("template"),!f)return;const C=vh(f);C.mode==="template"&&(T(C.selectedTemplateId),$("scheduleBundleId",C.selectedTemplateId))},U=()=>{y("custom"),$("scheduleBundleId",null),T("")},Z=C=>{T(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,we,lt;if(!f)return;const C=f.cronSchedule!==(X==null?void 0:X.cronSchedule)||f.reviewerSchedule!==(X==null?void 0:X.reviewerSchedule)||f.cronScheduleOffset!==((X==null?void 0:X.cronScheduleOffset)??0)||f.schedulingPriority!==((X==null?void 0:X.schedulingPriority)??3)||f.executorEnabled!==((X==null?void 0:X.executorEnabled)??!0)||f.reviewerEnabled!==((X==null?void 0:X.reviewerEnabled)??!0)||f.queue.enabled!==(((de=X==null?void 0:X.queue)==null?void 0:de.enabled)??!0)||f.qa.enabled!==((X==null?void 0:X.qa.enabled)??!0)||f.qa.schedule!==(X==null?void 0:X.qa.schedule)||f.audit.enabled!==((X==null?void 0:X.audit.enabled)??!0)||f.audit.schedule!==(X==null?void 0:X.audit.schedule)||f.roadmapScanner.enabled!==(((we=X==null?void 0:X.roadmapScanner)==null?void 0:we.enabled)??!0)||(f.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((lt=X==null?void 0:X.roadmapScanner)==null?void 0:lt.slicerSchedule)||"35 */12 * * *"),W={};for(const[vt,Lt]of Object.entries(f.jobProviders))Lt!=null&&Lt!==""&&(W[vt]=Lt);x(!0);try{const vt=await aa({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}),Lt=bc(vt);v(Lt),me(Lt);let V="";if(C)try{await vs()}catch(se){V=se instanceof Error?se.message:"failed to reinstall cron schedules"}u(V?{title:"Settings Saved (Cron Reinstall Failed)",message:V,type:"warning"}:{title:"Settings Saved",message:C?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),g.current=!0,ue(),De()}catch(vt){u({title:"Save Failed",message:vt instanceof Error?vt.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},Ce=()=>{if(X){const C=bc(X);v(C),me(C),u({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},Me=async C=>{try{const W=await l0(C);$("roadmapScanner",W.roadmapScanner);let de="";try{await vs()}catch(we){de=we instanceof Error?we.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}),J=C=>{const W=B();return Object.entries(W).map(([de,we])=>({label:we.name,value:de}))},I=(C,W)=>{const de=[];W.provider===C&&de.push("Global Provider");const we={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner"};for(const[lt,vt]of Object.entries(W.jobProviders))vt===C&&de.push(we[lt]??lt);return de},ce=C=>{const de=B()[C];de&&(k(C),L(de),q(!0))},he=async(C,W)=>{if(!f)return;const de=!A,we={...f.providerPresets,[C]:W};$("providerPresets",we);try{await aa({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(lt){u({title:"Save Failed",message:lt instanceof Error?lt.message:"Failed to save preset",type:"error"}),$("providerPresets",f.providerPresets)}},Ne=C=>{var we,lt;if(!f)return;if(Yi.includes(C)){u({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const W=I(C,f);if(W.length>0){le({presetId:C,presetName:((we=B()[C])==null?void 0:we.name)??C,references:W});return}const de={...f.providerPresets};delete de[C],$("providerPresets",de),u({title:"Preset Deleted",message:`${((lt=B()[C])==null?void 0:lt.name)??C} has been removed.`,type:"success"})},tt=C=>{if(!f)return;const W={...f.providerPresets};delete W[C],$("providerPresets",W),u({title:"Preset Reset",message:`${C} has been reset to built-in defaults.`,type:"success"})},Ge=()=>{if(!S||!f)return;const{presetId:C}=S,W={...f.providerPresets};delete W[C],$("providerPresets",W);const de={...f.jobProviders};for(const we of Object.keys(de))de[we]===C&&delete de[we];$("jobProviders",de),f.provider===C&&$("provider","claude"),le(null),u({title:"Preset Deleted",message:`${S.presetName} has been removed and all references cleared.`,type:"success"})};if(F||!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(P)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Ml,{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:P.message}),s.jsx(Be,{onClick:()=>ue(),children:"Retry"})]});const tl=[{id:"general",label:"General",content:s.jsx(ze,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(Te,{label:"Project Name",value:c,disabled:!0}),s.jsx(Te,{label:"Default Branch",value:f.defaultBranch,onChange:C=>$("defaultBranch",C.target.value)}),s.jsx(Te,{label:"PRD Directory",value:f.prdDir,onChange:C=>$("prdDir",C.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Te,{label:"Branch Prefix",value:f.branchPrefix,onChange:C=>$("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=>$("executorEnabled",C)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Jt,{label:"Enable Automated Reviews",checked:f.reviewerEnabled,onChange:C=>$("reviewerEnabled",C)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Jt,{label:"Auto-merge approved PRs",checked:f.autoMerge,onChange:C=>$("autoMerge",C)})}),f.autoMerge&&s.jsx(Ct,{label:"Merge Method",value:f.autoMergeMethod,onChange:C=>$("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(yc,{label:"Branch Patterns",value:f.branchPatterns,onChange:C=>$("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(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),s.jsxs(Be,{onClick:()=>{k(null),L(null),q(!0)},children:[s.jsx(vn,{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:[Yi.map(C=>{const de=f.providerPresets[C]||N(C);return de?s.jsx(xh,{presetId:C,preset:de,isBuiltIn:!0,onEdit:()=>ce(C),onReset:()=>tt(C)},C):null}),Object.entries(f.providerPresets).filter(([C])=>!Yi.includes(C)).map(([C,W])=>s.jsx(xh,{presetId:C,preset:W,isBuiltIn:!1,onEdit:()=>ce(C),onDelete:()=>Ne(C)},C))]})]}),s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),s.jsx("div",{className:"w-64",children:s.jsx(Ct,{value:f.provider,onChange:C=>$("provider",C),options:J(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(Ct,{value:f.jobProviders[C]??"",onChange:de=>{const we={...f.jobProviders};de===""?delete we[C]:we[C]=de,$("jobProviders",we)},options:[{label:"Use Global (default)",value:""},...J(f.providerPresets)]})})]},C))]})]}),s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"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(Ct,{label:"Primary Fallback Preset",value:f.primaryFallbackPreset,onChange:C=>$("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(Ct,{label:"Secondary Fallback Preset",value:f.secondaryFallbackPreset,onChange:C=>$("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(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),s.jsx(u0,{envVars:f.providerEnv,onChange:C=>$("providerEnv",C)})]})]})},{id:"runtime",label:"Runtime",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:f.minReviewScore,onChange:C=>$("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=>$("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=>$("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=>$("maxLogSize",Number(C.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(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)));$("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)));$("reviewerRetryDelay",W)},helperText:"Wait time between retry attempts to let CI settle."})]})]})]})},{id:"schedules",label:"Schedules",content:s.jsx(i0,{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:b,onFieldChange:(C,W)=>{C==="globalQueueEnabled"?$("queue",{...f.queue,enabled:W}):$(C,W)},onSwitchToTemplate:Ye,onSwitchToCustom:U,onApplyTemplate:Z})},{id:"notifications",label:"Notifications",content:s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Uy,{notifications:f.notifications,onChange:C=>$("notifications",C)})]})},{id:"roadmap",label:"Planner",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),s.jsx(Jt,{checked:f.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:Me})]}),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=>$("roadmapScanner",{...f.roadmapScanner,roadmapPath:C.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(dn,{label:"Planner Schedule",value:f.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:C=>$("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=>$("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(Ct,{label:"Planner Priority Mode",value:f.roadmapScanner.priorityMode||"roadmap-first",onChange:C=>$("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(Ct,{label:"Planner Issue Column",value:f.roadmapScanner.issueColumn||"Draft",onChange:C=>$("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(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(Jt,{checked:f.boardProvider.enabled,onChange:C=>$("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(Ct,{label:"Board Provider",value:f.boardProvider.provider,onChange:C=>$("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=>$("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=>$("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(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(Jt,{checked:f.qa.enabled,onChange:C=>$("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=>$("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(Ct,{label:"Artifacts",value:f.qa.artifacts,onChange:C=>$("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=>$("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(yc,{label:"QA Branch Patterns",value:f.qa.branchPatterns,onChange:C=>$("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=>$("qa",{...f.qa,autoInstallPlaywright:C})})]})]})]})]})},{id:"audit",label:"Audit",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(Jt,{checked:f.audit.enabled,onChange:C=>$("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=>$("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(ze,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Te,{label:"Templates Directory",value:f.templatesDir,onChange:C=>$("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));$("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(yc,{label:"PRD Priority",value:f.prdPriority,onChange:C=>$("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(n0,{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(Be,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:Ce,children:[s.jsx(Xh,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Be,{onClick:ae,loading:m,children:[s.jsx(yb,{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(Bh,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),s.jsx(ze,{className:"divide-y divide-slate-800",children:K?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):ie.map((C,W)=>{const de=C.status==="pass",we=C.status==="warn",lt=de?"bg-green-500/10 text-green-400 border-green-500/20":we?"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 ${lt}`,children:C.status.toUpperCase()})]},`${C.name}-${W}`)})})]}),s.jsx(Oy,{isOpen:z,onClose:()=>{q(!1),k(null),L(null)},onSave:he,presetId:A,preset:Q,isBuiltIn:A?Yi.includes(A):!1,existingIds:Object.keys(B())}),S&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>le(null),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Fi,{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:S.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:S.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(Be,{variant:"ghost",onClick:()=>le(null),children:"Cancel"}),s.jsx(Be,{variant:"secondary",onClick:Ge,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},Hy=()=>(ny(),sy(),s.jsx(sg,{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(ey,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(ty,{}),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(Uv,{children:[s.jsx(Cl,{path:"/",element:s.jsx(hy,{})}),s.jsx(Cl,{path:"/prs",element:s.jsx(py,{})}),s.jsx(Cl,{path:"/board",element:s.jsx(oy,{})}),s.jsx(Cl,{path:"/scheduling",element:s.jsx(Ry,{})}),s.jsx(Cl,{path:"/logs",element:s.jsx(xy,{})}),s.jsx(Cl,{path:"/roadmap",element:s.jsx(vy,{})}),s.jsx(Cl,{path:"/settings",element:s.jsx(qy,{})}),s.jsx(Cl,{path:"*",element:s.jsx(zv,{to:"/",replace:!0})})]})})})]}),s.jsx(ay,{})]})})),r0=document.getElementById("root");if(!r0)throw new Error("Could not find root element to mount to");const Ly=Hp.createRoot(r0);Ly.render(s.jsx(ye.StrictMode,{children:s.jsx(Hy,{})}));
|