@jonit-dev/night-watch-cli 1.8.16 → 1.8.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,447 @@
1
+ var ky=Object.defineProperty;var wg=n=>{throw TypeError(n)};var Ay=(n,r,u)=>r in n?ky(n,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):n[r]=u;var Sg=(n,r,u)=>Ay(n,typeof r!="symbol"?r+"":r,u),Of=(n,r,u)=>r.has(n)||wg("Cannot "+u);var ee=(n,r,u)=>(Of(n,r,"read from private field"),u?u.call(n):r.get(n)),at=(n,r,u)=>r.has(n)?wg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,u),Oe=(n,r,u,o)=>(Of(n,r,"write to private field"),o?o.call(n,u):r.set(n,u),u),Te=(n,r,u)=>(Of(n,r,"access private method"),u);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))o(h);new MutationObserver(h=>{for(const f of h)if(f.type==="childList")for(const j of f.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&o(j)}).observe(document,{childList:!0,subtree:!0});function u(h){const f={};return h.integrity&&(f.integrity=h.integrity),h.referrerPolicy&&(f.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?f.credentials="include":h.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(h){if(h.ep)return;h.ep=!0;const f=u(h);fetch(h.href,f)}})();function sh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function _y(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var r=n.default;if(typeof r=="function"){var u=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};u.prototype=r.prototype}else u={};return Object.defineProperty(u,"__esModule",{value:!0}),Object.keys(n).forEach(function(o){var h=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(u,o,h.get?h:{enumerable:!0,get:function(){return n[o]}})}),u}var Rf={exports:{}},ac={};/**
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 Cg;function zy(){if(Cg)return ac;Cg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function u(o,h,f){var j=null;if(f!==void 0&&(j=""+f),h.key!==void 0&&(j=""+h.key),"key"in h){f={};for(var b in h)b!=="key"&&(f[b]=h[b])}else f=h;return h=f.ref,{$$typeof:n,type:o,key:j,ref:h!==void 0?h:null,props:f}}return ac.Fragment=r,ac.jsx=u,ac.jsxs=u,ac}var Eg;function Ly(){return Eg||(Eg=1,Rf.exports=zy()),Rf.exports}var s=Ly(),Df={exports:{}},He={};/**
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 Tg;function Uy(){if(Tg)return He;Tg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),j=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),D=Symbol.iterator;function A(H){return H===null||typeof H!="object"?null:(H=D&&H[D]||H["@@iterator"],typeof H=="function"?H:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,k={};function Z(H,se,he){this.props=H,this.context=se,this.refs=k,this.updater=he||N}Z.prototype.isReactComponent={},Z.prototype.setState=function(H,se){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,se,"setState")},Z.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function B(){}B.prototype=Z.prototype;function K(H,se,he){this.props=H,this.context=se,this.refs=k,this.updater=he||N}var R=K.prototype=new B;R.constructor=K,O(R,Z.prototype),R.isPureReactComponent=!0;var w=Array.isArray;function U(){}var G={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function le(H,se,he){var ye=he.ref;return{$$typeof:n,type:H,key:se,ref:ye!==void 0?ye:null,props:he}}function S(H,se){return le(H.type,se,H.props)}function te(H){return typeof H=="object"&&H!==null&&H.$$typeof===n}function ae(H){var se={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(he){return se[he]})}var ie=/\/+/g;function ge(H,se){return typeof H=="object"&&H!==null&&H.key!=null?ae(""+H.key):se.toString(36)}function pe(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(U,U):(H.status="pending",H.then(function(se){H.status==="pending"&&(H.status="fulfilled",H.value=se)},function(se){H.status==="pending"&&(H.status="rejected",H.reason=se)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function $(H,se,he,ye,Re){var xe=typeof H;(xe==="undefined"||xe==="boolean")&&(H=null);var Se=!1;if(H===null)Se=!0;else switch(xe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(H.$$typeof){case n:case r:Se=!0;break;case C:return Se=H._init,$(Se(H._payload),se,he,ye,Re)}}if(Se)return Re=Re(H),Se=ye===""?"."+ge(H,0):ye,w(Re)?(he="",Se!=null&&(he=Se.replace(ie,"$&/")+"/"),$(Re,se,he,"",function(wt){return wt})):Re!=null&&(te(Re)&&(Re=S(Re,he+(Re.key==null||H&&H.key===Re.key?"":(""+Re.key).replace(ie,"$&/")+"/")+Se)),se.push(Re)),1;Se=0;var lt=ye===""?".":ye+":";if(w(H))for(var Ye=0;Ye<H.length;Ye++)ye=H[Ye],xe=lt+ge(ye,Ye),Se+=$(ye,se,he,xe,Re);else if(Ye=A(H),typeof Ye=="function")for(H=Ye.call(H),Ye=0;!(ye=H.next()).done;)ye=ye.value,xe=lt+ge(ye,Ye++),Se+=$(ye,se,he,xe,Re);else if(xe==="object"){if(typeof H.then=="function")return $(pe(H),se,he,ye,Re);throw se=String(H),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Se}function J(H,se,he){if(H==null)return H;var ye=[],Re=0;return $(H,ye,"","",function(xe){return se.call(he,xe,Re++)}),ye}function fe(H){if(H._status===-1){var se=H._result;se=se(),se.then(function(he){(H._status===0||H._status===-1)&&(H._status=1,H._result=he)},function(he){(H._status===0||H._status===-1)&&(H._status=2,H._result=he)}),H._status===-1&&(H._status=0,H._result=se)}if(H._status===1)return H._result.default;throw H._result}var me=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},be={map:J,forEach:function(H,se,he){J(H,function(){se.apply(this,arguments)},he)},count:function(H){var se=0;return J(H,function(){se++}),se},toArray:function(H){return J(H,function(se){return se})||[]},only:function(H){if(!te(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return He.Activity=M,He.Children=be,He.Component=Z,He.Fragment=u,He.Profiler=h,He.PureComponent=K,He.StrictMode=o,He.Suspense=y,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,He.__COMPILER_RUNTIME={__proto__:null,c:function(H){return G.H.useMemoCache(H)}},He.cache=function(H){return function(){return H.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(H,se,he){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var ye=O({},H.props),Re=H.key;if(se!=null)for(xe in se.key!==void 0&&(Re=""+se.key),se)!I.call(se,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&se.ref===void 0||(ye[xe]=se[xe]);var xe=arguments.length-2;if(xe===1)ye.children=he;else if(1<xe){for(var Se=Array(xe),lt=0;lt<xe;lt++)Se[lt]=arguments[lt+2];ye.children=Se}return le(H.type,Re,ye)},He.createContext=function(H){return H={$$typeof:j,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:f,_context:H},H},He.createElement=function(H,se,he){var ye,Re={},xe=null;if(se!=null)for(ye in se.key!==void 0&&(xe=""+se.key),se)I.call(se,ye)&&ye!=="key"&&ye!=="__self"&&ye!=="__source"&&(Re[ye]=se[ye]);var Se=arguments.length-2;if(Se===1)Re.children=he;else if(1<Se){for(var lt=Array(Se),Ye=0;Ye<Se;Ye++)lt[Ye]=arguments[Ye+2];Re.children=lt}if(H&&H.defaultProps)for(ye in Se=H.defaultProps,Se)Re[ye]===void 0&&(Re[ye]=Se[ye]);return le(H,xe,Re)},He.createRef=function(){return{current:null}},He.forwardRef=function(H){return{$$typeof:b,render:H}},He.isValidElement=te,He.lazy=function(H){return{$$typeof:C,_payload:{_status:-1,_result:H},_init:fe}},He.memo=function(H,se){return{$$typeof:x,type:H,compare:se===void 0?null:se}},He.startTransition=function(H){var se=G.T,he={};G.T=he;try{var ye=H(),Re=G.S;Re!==null&&Re(he,ye),typeof ye=="object"&&ye!==null&&typeof ye.then=="function"&&ye.then(U,me)}catch(xe){me(xe)}finally{se!==null&&he.types!==null&&(se.types=he.types),G.T=se}},He.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},He.use=function(H){return G.H.use(H)},He.useActionState=function(H,se,he){return G.H.useActionState(H,se,he)},He.useCallback=function(H,se){return G.H.useCallback(H,se)},He.useContext=function(H){return G.H.useContext(H)},He.useDebugValue=function(){},He.useDeferredValue=function(H,se){return G.H.useDeferredValue(H,se)},He.useEffect=function(H,se){return G.H.useEffect(H,se)},He.useEffectEvent=function(H){return G.H.useEffectEvent(H)},He.useId=function(){return G.H.useId()},He.useImperativeHandle=function(H,se,he){return G.H.useImperativeHandle(H,se,he)},He.useInsertionEffect=function(H,se){return G.H.useInsertionEffect(H,se)},He.useLayoutEffect=function(H,se){return G.H.useLayoutEffect(H,se)},He.useMemo=function(H,se){return G.H.useMemo(H,se)},He.useOptimistic=function(H,se){return G.H.useOptimistic(H,se)},He.useReducer=function(H,se,he){return G.H.useReducer(H,se,he)},He.useRef=function(H){return G.H.useRef(H)},He.useState=function(H){return G.H.useState(H)},He.useSyncExternalStore=function(H,se,he){return G.H.useSyncExternalStore(H,se,he)},He.useTransition=function(){return G.H.useTransition()},He.version="19.2.4",He}var Mg;function rh(){return Mg||(Mg=1,Df.exports=Uy()),Df.exports}var z=rh();const ze=sh(z);var kf={exports:{}},nc={},Af={exports:{}},_f={};/**
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 Og;function Hy(){return Og||(Og=1,(function(n){function r($,J){var fe=$.length;$.push(J);e:for(;0<fe;){var me=fe-1>>>1,be=$[me];if(0<h(be,J))$[me]=J,$[fe]=be,fe=me;else break e}}function u($){return $.length===0?null:$[0]}function o($){if($.length===0)return null;var J=$[0],fe=$.pop();if(fe!==J){$[0]=fe;e:for(var me=0,be=$.length,H=be>>>1;me<H;){var se=2*(me+1)-1,he=$[se],ye=se+1,Re=$[ye];if(0>h(he,fe))ye<be&&0>h(Re,he)?($[me]=Re,$[ye]=fe,me=ye):($[me]=he,$[se]=fe,me=se);else if(ye<be&&0>h(Re,fe))$[me]=Re,$[ye]=fe,me=ye;else break e}}return J}function h($,J){var fe=$.sortIndex-J.sortIndex;return fe!==0?fe:$.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var j=Date,b=j.now();n.unstable_now=function(){return j.now()-b}}var y=[],x=[],C=1,M=null,D=3,A=!1,N=!1,O=!1,k=!1,Z=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function R($){for(var J=u(x);J!==null;){if(J.callback===null)o(x);else if(J.startTime<=$)o(x),J.sortIndex=J.expirationTime,r(y,J);else break;J=u(x)}}function w($){if(O=!1,R($),!N)if(u(y)!==null)N=!0,U||(U=!0,ae());else{var J=u(x);J!==null&&pe(w,J.startTime-$)}}var U=!1,G=-1,I=5,le=-1;function S(){return k?!0:!(n.unstable_now()-le<I)}function te(){if(k=!1,U){var $=n.unstable_now();le=$;var J=!0;try{e:{N=!1,O&&(O=!1,B(G),G=-1),A=!0;var fe=D;try{t:{for(R($),M=u(y);M!==null&&!(M.expirationTime>$&&S());){var me=M.callback;if(typeof me=="function"){M.callback=null,D=M.priorityLevel;var be=me(M.expirationTime<=$);if($=n.unstable_now(),typeof be=="function"){M.callback=be,R($),J=!0;break t}M===u(y)&&o(y),R($)}else o(y);M=u(y)}if(M!==null)J=!0;else{var H=u(x);H!==null&&pe(w,H.startTime-$),J=!1}}break e}finally{M=null,D=fe,A=!1}J=void 0}}finally{J?ae():U=!1}}}var ae;if(typeof K=="function")ae=function(){K(te)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ge=ie.port2;ie.port1.onmessage=te,ae=function(){ge.postMessage(null)}}else ae=function(){Z(te,0)};function pe($,J){G=Z(function(){$(n.unstable_now())},J)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function($){$.callback=null},n.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<$?Math.floor(1e3/$):5},n.unstable_getCurrentPriorityLevel=function(){return D},n.unstable_next=function($){switch(D){case 1:case 2:case 3:var J=3;break;default:J=D}var fe=D;D=J;try{return $()}finally{D=fe}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function($,J){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var fe=D;D=$;try{return J()}finally{D=fe}},n.unstable_scheduleCallback=function($,J,fe){var me=n.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?me+fe:me):fe=me,$){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=fe+be,$={id:C++,callback:J,priorityLevel:$,startTime:fe,expirationTime:be,sortIndex:-1},fe>me?($.sortIndex=fe,r(x,$),u(y)===null&&$===u(x)&&(O?(B(G),G=-1):O=!0,pe(w,fe-me))):($.sortIndex=be,r(y,$),N||A||(N=!0,U||(U=!0,ae()))),$},n.unstable_shouldYield=S,n.unstable_wrapCallback=function($){var J=D;return function(){var fe=D;D=J;try{return $.apply(this,arguments)}finally{D=fe}}}})(_f)),_f}var Rg;function qy(){return Rg||(Rg=1,Af.exports=Hy()),Af.exports}var zf={exports:{}},da={};/**
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 Dg;function Vy(){if(Dg)return da;Dg=1;var n=rh();function r(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var C=2;C<arguments.length;C++)x+="&args[]="+encodeURIComponent(arguments[C])}return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var o={d:{f:u,r:function(){throw Error(r(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},h=Symbol.for("react.portal");function f(y,x,C){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:M==null?null:""+M,children:y,containerInfo:x,implementation:C}}var j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return da.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,da.createPortal=function(y,x){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return f(y,x,null,C)},da.flushSync=function(y){var x=j.T,C=o.p;try{if(j.T=null,o.p=2,y)return y()}finally{j.T=x,o.p=C,o.d.f()}},da.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(y,x))},da.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},da.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var C=x.as,M=b(C,x.crossOrigin),D=typeof x.integrity=="string"?x.integrity:void 0,A=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;C==="style"?o.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:M,integrity:D,fetchPriority:A}):C==="script"&&o.d.X(y,{crossOrigin:M,integrity:D,fetchPriority:A,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},da.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var C=b(x.as,x.crossOrigin);o.d.M(y,{crossOrigin:C,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(y)},da.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var C=x.as,M=b(C,x.crossOrigin);o.d.L(y,C,{crossOrigin:M,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},da.preloadModule=function(y,x){if(typeof y=="string")if(x){var C=b(x.as,x.crossOrigin);o.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:C,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(y)},da.requestFormReset=function(y){o.d.r(y)},da.unstable_batchedUpdates=function(y,x){return y(x)},da.useFormState=function(y,x,C){return j.H.useFormState(y,x,C)},da.useFormStatus=function(){return j.H.useHostTransitionStatus()},da.version="19.2.4",da}var kg;function Wx(){if(kg)return zf.exports;kg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),zf.exports=Vy(),zf.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 Ag;function Py(){if(Ag)return nc;Ag=1;var n=qy(),r=rh(),u=Wx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function j(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 b(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 y(e){if(f(e)!==e)throw Error(o(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,l=t;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return y(c),e;if(d===l)return y(c),t;d=d.sibling}throw Error(o(188))}if(a.return!==l.return)a=c,l=d;else{for(var p=!1,T=c.child;T;){if(T===a){p=!0,a=c,l=d;break}if(T===l){p=!0,l=c,a=d;break}T=T.sibling}if(!p){for(T=d.child;T;){if(T===a){p=!0,a=d,l=c;break}if(T===l){p=!0,l=d,a=c;break}T=T.sibling}if(!p)throw Error(o(189))}}if(a.alternate!==l)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function C(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C(e),t!==null)return t;e=e.sibling}return null}var M=Object.assign,D=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),K=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),S=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case Z:return"Profiler";case k:return"StrictMode";case w:return"Suspense";case U:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case K:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case R:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var pe=Array.isArray,$=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},me=[],be=-1;function H(e){return{current:e}}function se(e){0>be||(e.current=me[be],me[be]=null,be--)}function he(e,t){be++,me[be]=e.current,e.current=t}var ye=H(null),Re=H(null),xe=H(null),Se=H(null);function lt(e,t){switch(he(xe,t),he(Re,e),he(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?F0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=F0(t),e=I0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(ye),he(ye,e)}function Ye(){se(ye),se(Re),se(xe)}function wt(e){e.memoizedState!==null&&he(Se,e);var t=ye.current,a=I0(t,e.type);t!==a&&(he(Re,e),he(ye,a))}function fa(e){Re.current===e&&(se(ye),se(Re)),Se.current===e&&(se(Se),Ji._currentValue=fe)}var Oa,Ba;function ha(e){if(Oa===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Oa=t&&t[1]||"",Ba=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Oa+e+Ba}var xa=!1;function wn(e,t){if(!e||xa)return"";xa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ne){var X=ne}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ne){X=ne}e.call(ue.prototype)}}else{try{throw Error()}catch(ne){X=ne}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ne){if(ne&&X&&typeof ne.stack=="string")return[ne.stack,X.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),p=d[0],T=d[1];if(p&&T){var L=p.split(`
44
+ `),Q=T.split(`
45
+ `);for(c=l=0;l<L.length&&!L[l].includes("DetermineComponentFrameRoot");)l++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(l===L.length||c===Q.length)for(l=L.length-1,c=Q.length-1;1<=l&&0<=c&&L[l]!==Q[c];)c--;for(;1<=l&&0<=c;l--,c--)if(L[l]!==Q[c]){if(l!==1||c!==1)do if(l--,c--,0>c||L[l]!==Q[c]){var re=`
46
+ `+L[l].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=l&&0<=c);break}}}finally{xa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ha(a):""}function Sn(e,t){switch(e.tag){case 26:case 27:case 5:return ha(e.type);case 16:return ha("Lazy");case 13:return e.child!==t&&t!==null?ha("Suspense Fallback"):ha("Suspense");case 19:return ha("SuspenseList");case 0:case 15:return wn(e.type,!1);case 11:return wn(e.type.render,!1);case 1:return wn(e.type,!0);case 31:return ha("Activity");default:return""}}function Cn(e){try{var t="",a=null;do t+=Sn(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var $a=Object.prototype.hasOwnProperty,Ya=n.unstable_scheduleCallback,Wt=n.unstable_cancelCallback,Ga=n.unstable_shouldYield,ns=n.unstable_requestPaint,vt=n.unstable_now,Kt=n.unstable_getCurrentPriorityLevel,Bn=n.unstable_ImmediatePriority,Js=n.unstable_UserBlockingPriority,ls=n.unstable_NormalPriority,ti=n.unstable_LowPriority,xl=n.unstable_IdlePriority,Qe=n.log,pl=n.unstable_setDisableYieldValue,gt=null,$t=null;function _t(e){if(typeof Qe=="function"&&pl(e),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(gt,e)}catch{}}var zt=Math.clz32?Math.clz32:er,ss=Math.log,Ks=Math.LN2;function er(e){return e>>>=0,e===0?32:31-(ss(e)/Ks|0)|0}var sn=256,oe=262144,ve=4194304;function Pe(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 St(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var c=0,d=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var T=l&134217727;return T!==0?(l=T&~d,l!==0?c=Pe(l):(p&=T,p!==0?c=Pe(p):a||(a=T&~e,a!==0&&(c=Pe(a))))):(T=l&~d,T!==0?c=Pe(T):p!==0?c=Pe(p):a||(a=l&~e,a!==0&&(c=Pe(a)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:c}function ht(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function En(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 rs(){var e=ve;return ve<<=1,(ve&62914560)===0&&(ve=4194304),e}function tr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function vl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Tc(e,t,a,l,c,d){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var T=e.entanglements,L=e.expirationTimes,Q=e.hiddenUpdates;for(a=p&~a;0<a;){var re=31-zt(a),ue=1<<re;T[re]=0,L[re]=-1;var X=Q[re];if(X!==null)for(Q[re]=null,re=0;re<X.length;re++){var ne=X[re];ne!==null&&(ne.lane&=-536870913)}a&=~ue}l!==0&&mt(e,l,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(p&~t))}function mt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-zt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function pa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-zt(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function ai(e,t){var a=t&-t;return a=(a&42)!==0?1:ar(a),(a&(e.suspendedLanes|t))!==0?0:a}function ar(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 ca(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function nr(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:xg(e.type))}function ni(e,t){var a=J.p;try{return J.p=e,t()}finally{J.p=a}}var rn=Math.random().toString(36).slice(2),Mt="__reactFiber$"+rn,Yt="__reactProps$"+rn,$n="__reactContainer$"+rn,is="__reactEvents$"+rn,Mc="__reactListeners$"+rn,Oc="__reactHandles$"+rn,Rc="__reactResources$"+rn,cs="__reactMarker$"+rn;function lr(e){delete e[Mt],delete e[Yt],delete e[is],delete e[Mc],delete e[Oc]}function Yn(e){var t=e[Mt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[$n]||a[Mt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=eg(e);e!==null;){if(a=e[Mt])return a;e=eg(e)}return t}e=a,a=e.parentNode}return null}function ke(e){if(e=e[Mt]||e[$n]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function va(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function cn(e){var t=e[Rc];return t||(t=e[Rc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Lt(e){e[cs]=!0}var Dc=new Set,li={};function Tn(e,t){yl(e,t),yl(e+"Capture",t)}function yl(e,t){for(li[e]=t,e=0;e<t.length;e++)Dc.add(t[e])}var kc=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]*$"),Ac={},Gn={};function si(e){return $a.call(Gn,e)?!0:$a.call(Ac,e)?!1:kc.test(e)?Gn[e]=!0:(Ac[e]=!0,!1)}function ea(e,t,a){if(si(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function sr(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function st(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Ot(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ri(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,d=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(p){a=""+p,d.call(this,p)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function os(e){if(!e._valueTracker){var t=Mn(e)?"checked":"value";e._valueTracker=ri(e,t,""+e[t])}}function bl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Mn(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function on(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 rr=/[\n"\\]/g;function ta(e){return e.replace(rr,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ir(e,t,a,l,c,d,p,T){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ot(t)):e.value!==""+Ot(t)&&(e.value=""+Ot(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?us(e,p,Ot(t)):a!=null?us(e,p,Ot(a)):l!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+Ot(T):e.removeAttribute("name")}function jl(e,t,a,l,c,d,p,T){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){os(e);return}a=a!=null?""+Ot(a):"",t=t!=null?""+Ot(t):a,T||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=T?e.checked:!!l,e.defaultChecked=!!l,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),os(e)}function us(e,t,a){t==="number"&&on(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Fn(e,t,a,l){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Ot(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function ds(e,t,a){if(t!=null&&(t=""+Ot(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ot(a):""}function ii(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(o(92));if(pe(l)){if(1<l.length)throw Error(o(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Ot(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),os(e)}function un(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var fs=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 hs(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||fs.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function _c(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&a[c]!==l&&hs(e,c,l)}else for(var d in t)t.hasOwnProperty(d)&&hs(e,d,t[d])}function cr(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 Eu=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"]]),zc=/^[\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 zc.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Fa(){}var ci=null;function or(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var In=null,Nl=null;function Lc(e){var t=ke(e);if(t&&(e=t.stateNode)){var a=e[Yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ir(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ta(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[Yt]||null;if(!c)throw Error(o(90));ir(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&bl(l)}break e;case"textarea":ds(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Fn(e,!!a.multiple,t,!1)}}}var oi=!1;function ui(e,t,a){if(oi)return e(t,a);oi=!0;try{var l=e(t);return l}finally{if(oi=!1,(In!==null||Nl!==null)&&(Do(),In&&(t=In,e=Nl,Nl=In=null,Lc(t),e)))for(t=0;t<e.length;t++)Lc(e[t])}}function gs(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Yt]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var dn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),di=!1;if(dn)try{var xs={};Object.defineProperty(xs,"passive",{get:function(){di=!0}}),window.addEventListener("test",xs,xs),window.removeEventListener("test",xs,xs)}catch{di=!1}var On=null,ur=null,dr=null;function Gt(){if(dr)return dr;var e,t=ur,a=t.length,l,c="value"in On?On.value:On.textContent,d=c.length;for(e=0;e<a&&t[e]===c[e];e++);var p=a-e;for(l=1;l<=p&&t[a-l]===c[d-l];l++);return dr=c.slice(e,1<l?1-l:void 0)}function ps(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 fn(){return!0}function Zn(){return!1}function Rt(e){function t(a,l,c,d,p){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=d,this.target=p,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(a=e[T],this[T]=a?a(d):d[T]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?fn:Zn,this.isPropagationStopped=Zn,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=fn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=fn)},persist:function(){},isPersistent:fn}),t}var Rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vs=Rt(Rn),ys=M({},Rn,{view:0,detail:0}),fi=Rt(ys),fr,bs,js,hr=M({},ys,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ws,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!==js&&(js&&e.type==="mousemove"?(fr=e.screenX-js.screenX,bs=e.screenY-js.screenY):bs=fr=0,js=e),fr)},movementY:function(e){return"movementY"in e?e.movementY:bs}}),Uc=Rt(hr),Tu=M({},hr,{dataTransfer:0}),Mu=Rt(Tu),Ou=M({},ys,{relatedTarget:0}),mr=Rt(Ou),Ru=M({},Rn,{animationName:0,elapsedTime:0,pseudoElement:0}),wl=Rt(Ru),Du=M({},Rn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sl=Rt(Du),Ns=M({},Rn,{data:0}),Cl=Rt(Ns),ku={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Au={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"},_u={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zu(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_u[e])?!!t[e]:!1}function ws(){return zu}var Lu=M({},ys,{key:function(e){if(e.key){var t=ku[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ps(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Au[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ws,charCode:function(e){return e.type==="keypress"?ps(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ps(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uu=Rt(Lu),Hu=M({},hr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hc=Rt(Hu),qu=M({},ys,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ws}),Vu=Rt(qu),qc=M({},Rn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pu=Rt(qc),Bu=M({},hr,{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}),$u=Rt(Bu),Yu=M({},Rn,{newState:0,oldState:0}),Gu=Rt(Yu),Vc=[9,13,27,32],hi=dn&&"CompositionEvent"in window,Ss=null;dn&&"documentMode"in document&&(Ss=document.documentMode);var Fu=dn&&"TextEvent"in window&&!Ss,Pc=dn&&(!hi||Ss&&8<Ss&&11>=Ss),Bc=" ",$c=!1;function Yc(e,t){switch(e){case"keyup":return Vc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var El=!1;function Iu(e,t){switch(e){case"compositionend":return Gc(t);case"keypress":return t.which!==32?null:($c=!0,Bc);case"textInput":return e=t.data,e===Bc&&$c?null:e;default:return null}}function Zu(e,t){if(El)return e==="compositionend"||!hi&&Yc(e,t)?(e=Gt(),dr=ur=On=null,El=!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 Pc&&t.locale!=="ko"?null:t.data;default:return null}}var Wu={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 Fc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Wu[e.type]:t==="textarea"}function mi(e,t,a,l){In?Nl?Nl.push(l):Nl=[l]:In=l,t=Ho(t,"onChange"),0<t.length&&(a=new vs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Tl=null,Cs=null;function ya(e){V0(e,0)}function hn(e){var t=va(e);if(bl(t))return e}function Ic(e,t){if(e==="change")return t}var Dn=!1;if(dn){var gi;if(dn){var Ra="oninput"in document;if(!Ra){var xi=document.createElement("div");xi.setAttribute("oninput","return;"),Ra=typeof xi.oninput=="function"}gi=Ra}else gi=!1;Dn=gi&&(!document.documentMode||9<document.documentMode)}function pi(){Tl&&(Tl.detachEvent("onpropertychange",vi),Cs=Tl=null)}function vi(e){if(e.propertyName==="value"&&hn(Cs)){var t=[];mi(t,Cs,e,or(e)),ui(ya,t)}}function Ge(e,t,a){e==="focusin"?(pi(),Tl=t,Cs=a,Tl.attachEvent("onpropertychange",vi)):e==="focusout"&&pi()}function Ml(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hn(Cs)}function Qu(e,t){if(e==="click")return hn(t)}function xt(e,t){if(e==="input"||e==="change")return hn(t)}function Es(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oa=typeof Object.is=="function"?Object.is:Es;function Ts(e,t){if(oa(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!$a.call(t,c)||!oa(e[c],t[c]))return!1}return!0}function Zc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wc(e,t){var a=Zc(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zc(a)}}function Xe(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xe(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=on(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=on(e.document)}return t}function gr(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 Qc=dn&&"documentMode"in document&&11>=document.documentMode,Ol=null,xr=null,aa=null,pr=!1;function Ms(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;pr||Ol==null||Ol!==on(l)||(l=Ol,"selectionStart"in l&&gr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),aa&&Ts(aa,l)||(aa=l,l=Ho(xr,"onSelect"),0<l.length&&(t=new vs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Ol)))}function Wn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Rl={animationend:Wn("Animation","AnimationEnd"),animationiteration:Wn("Animation","AnimationIteration"),animationstart:Wn("Animation","AnimationStart"),transitionrun:Wn("Transition","TransitionRun"),transitionstart:Wn("Transition","TransitionStart"),transitioncancel:Wn("Transition","TransitionCancel"),transitionend:Wn("Transition","TransitionEnd")},yi={},Xc={};dn&&(Xc=document.createElement("div").style,"AnimationEvent"in window||(delete Rl.animationend.animation,delete Rl.animationiteration.animation,delete Rl.animationstart.animation),"TransitionEvent"in window||delete Rl.transitionend.transition);function Qn(e){if(yi[e])return yi[e];if(!Rl[e])return e;var t=Rl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Xc)return yi[e]=t[a];return e}var Jc=Qn("animationend"),Kc=Qn("animationiteration"),vr=Qn("animationstart"),Ju=Qn("transitionrun"),Ku=Qn("transitionstart"),eo=Qn("transitioncancel"),bi=Qn("transitionend"),ji=new Map,Ni="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(" ");Ni.push("scrollEnd");function ba(e,t){ji.set(e,t),Tn(t,[e])}var Dl=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)},ma=[],Ia=0,Os=0;function kl(){for(var e=Ia,t=Os=Ia=0;t<e;){var a=ma[t];ma[t++]=null;var l=ma[t];ma[t++]=null;var c=ma[t];ma[t++]=null;var d=ma[t];if(ma[t++]=null,l!==null&&c!==null){var p=l.pending;p===null?c.next=c:(c.next=p.next,p.next=c),l.pending=c}d!==0&&Rs(a,c,d)}}function Za(e,t,a,l){ma[Ia++]=e,ma[Ia++]=t,ma[Ia++]=a,ma[Ia++]=l,Os|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function yr(e,t,a,l){return Za(e,t,a,l),Ds(e)}function Wa(e,t){return Za(e,null,null,t),Ds(e)}function Rs(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,l=d.alternate,l!==null&&(l.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-zt(a),e=d.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),d):null}function Ds(e){if(50<Gi)throw Gi=0,Jd=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Da={};function br(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function na(e,t,a,l){return new br(e,t,a,l)}function jr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qa(e,t){var a=e.alternate;return a===null?(a=na(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function to(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Nr(e,t,a,l,c,d){var p=0;if(l=e,typeof e=="function")jr(e)&&(p=1);else if(typeof e=="string")p=by(e,a,ye.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case le:return e=na(31,a,t,c),e.elementType=le,e.lanes=d,e;case O:return Xa(a.children,c,d,t);case k:p=8,c|=24;break;case Z:return e=na(12,a,t,c|2),e.elementType=Z,e.lanes=d,e;case w:return e=na(13,a,t,c),e.elementType=w,e.lanes=d,e;case U:return e=na(19,a,t,c),e.elementType=U,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K:p=10;break e;case B:p=9;break e;case R:p=11;break e;case G:p=14;break e;case I:p=16,l=null;break e}p=29,a=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=na(p,a,t,c),t.elementType=e,t.type=l,t.lanes=d,t}function Xa(e,t,a,l){return e=na(7,e,l,t),e.lanes=a,e}function wi(e,t,a){return e=na(6,e,null,t),e.lanes=a,e}function ao(e){var t=na(18,null,null,0);return t.stateNode=e,t}function Al(e,t,a){return t=na(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Si=new WeakMap;function ja(e,t){if(typeof e=="object"&&e!==null){var a=Si.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Cn(t)},Si.set(e,t),t)}return{value:e,source:t,stack:Cn(t)}}var Xn=[],Jn=0,ks=null,mn=0,ua=[],Me=0,Na=null,Ja=1,g="";function i(e,t){Xn[Jn++]=mn,Xn[Jn++]=ks,ks=e,mn=t}function m(e,t,a){ua[Me++]=Ja,ua[Me++]=g,ua[Me++]=Na,Na=e;var l=Ja;e=g;var c=32-zt(l)-1;l&=~(1<<c),a+=1;var d=32-zt(t)+c;if(30<d){var p=c-c%5;d=(l&(1<<p)-1).toString(32),l>>=p,c-=p,Ja=1<<32-zt(t)+c|a<<c|l,g=d+e}else Ja=1<<d|a<<c|l,g=e}function v(e){e.return!==null&&(i(e,1),m(e,1,0))}function E(e){for(;e===ks;)ks=Xn[--Jn],Xn[Jn]=null,mn=Xn[--Jn],Xn[Jn]=null;for(;e===Na;)Na=ua[--Me],ua[Me]=null,g=ua[--Me],ua[Me]=null,Ja=ua[--Me],ua[Me]=null}function _(e,t){ua[Me++]=Ja,ua[Me++]=g,ua[Me++]=Na,Ja=t.id,g=t.overflow,Na=e}var q=null,V=null,Y=!1,de=null,Ne=!1,Ue=Error(o(519));function Fe(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gn(ja(t,e)),Ue}function Ae(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Mt]=e,t[Yt]=l,a){case"dialog":$e("cancel",t),$e("close",t);break;case"iframe":case"object":case"embed":$e("load",t);break;case"video":case"audio":for(a=0;a<Ii.length;a++)$e(Ii[a],t);break;case"source":$e("error",t);break;case"img":case"image":case"link":$e("error",t),$e("load",t);break;case"details":$e("toggle",t);break;case"input":$e("invalid",t),jl(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":$e("invalid",t);break;case"textarea":$e("invalid",t),ii(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Y0(t.textContent,a)?(l.popover!=null&&($e("beforetoggle",t),$e("toggle",t)),l.onScroll!=null&&$e("scroll",t),l.onScrollEnd!=null&&$e("scrollend",t),l.onClick!=null&&(t.onclick=Fa),t=!0):t=!1,t||Fe(e,!0)}function Nt(e){for(q=e.return;q;)switch(q.tag){case 5:case 31:case 13:Ne=!1;return;case 27:case 3:Ne=!0;return;default:q=q.return}}function Qt(e){if(e!==q)return!1;if(!Y)return Nt(e),Y=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||mf(e.type,e.memoizedProps)),a=!a),a&&V&&Fe(e),Nt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));V=K0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));V=K0(e)}else t===27?(t=V,Fl(e.type)?(e=yf,yf=null,V=e):V=t):V=q?an(e.stateNode.nextSibling):null;return!0}function Xt(){V=q=null,Y=!1}function kn(){var e=de;return e!==null&&(Ea===null?Ea=e:Ea.push.apply(Ea,e),de=null),e}function gn(e){de===null?de=[e]:de.push(e)}var wr=H(null),Kn=null,Ka=null;function An(e,t,a){he(wr,t._currentValue),t._currentValue=a}function xn(e){e._currentValue=wr.current,se(wr)}function Ci(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function el(e,t,a,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var p=c.child;d=d.firstContext;e:for(;d!==null;){var T=d;d=c;for(var L=0;L<t.length;L++)if(T.context===t[L]){d.lanes|=a,T=d.alternate,T!==null&&(T.lanes|=a),Ci(d.return,a,e),l||(p=null);break e}d=T.next}}else if(c.tag===18){if(p=c.return,p===null)throw Error(o(341));p.lanes|=a,d=p.alternate,d!==null&&(d.lanes|=a),Ci(p,a,e),p=null}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===e){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}}function en(e,t,a,l){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var p=c.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var T=c.type;oa(c.pendingProps.value,p.value)||(e!==null?e.push(T):e=[T])}}else if(c===Se.current){if(p=c.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ji):e=[Ji])}c=c.return}e!==null&&el(t,e,a,l),t.flags|=262144}function Sr(e){for(e=e.firstContext;e!==null;){if(!oa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function As(e){Kn=e,Ka=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function la(e){return Oh(Kn,e)}function no(e,t){return Kn===null&&As(e),Oh(e,t)}function Oh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ka===null){if(e===null)throw Error(o(308));Ka=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ka=Ka.next=t;return a}var xv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},pv=n.unstable_scheduleCallback,vv=n.unstable_NormalPriority,Ut={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ed(){return{controller:new xv,data:new Map,refCount:0}}function Ei(e){e.refCount--,e.refCount===0&&pv(vv,function(){e.controller.abort()})}var Ti=null,td=0,Cr=0,Er=null;function yv(e,t){if(Ti===null){var a=Ti=[];td=0,Cr=lf(),Er={status:"pending",value:void 0,then:function(l){a.push(l)}}}return td++,t.then(Rh,Rh),t}function Rh(){if(--td===0&&Ti!==null){Er!==null&&(Er.status="fulfilled");var e=Ti;Ti=null,Cr=0,Er=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function bv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var Dh=$.S;$.S=function(e,t){m0=vt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&yv(e,t),Dh!==null&&Dh(e,t)};var _s=H(null);function ad(){var e=_s.current;return e!==null?e:ft.pooledCache}function lo(e,t){t===null?he(_s,_s.current):he(_s,t.pool)}function kh(){var e=ad();return e===null?null:{parent:Ut._currentValue,pool:e}}var Tr=Error(o(460)),nd=Error(o(474)),so=Error(o(542)),ro={then:function(){}};function Ah(e){return e=e.status,e==="fulfilled"||e==="rejected"}function _h(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Fa,Fa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lh(e),e;default:if(typeof t.status=="string")t.then(Fa,Fa);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lh(e),e}throw Ls=t,Tr}}function zs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ls=a,Tr):a}}var Ls=null;function zh(){if(Ls===null)throw Error(o(459));var e=Ls;return Ls=null,e}function Lh(e){if(e===Tr||e===so)throw Error(o(483))}var Mr=null,Mi=0;function io(e){var t=Mi;return Mi+=1,Mr===null&&(Mr=[]),_h(Mr,e,t)}function Oi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function co(e,t){throw t.$$typeof===D?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Uh(e){function t(F,P){if(e){var W=F.deletions;W===null?(F.deletions=[P],F.flags|=16):W.push(P)}}function a(F,P){if(!e)return null;for(;P!==null;)t(F,P),P=P.sibling;return null}function l(F){for(var P=new Map;F!==null;)F.key!==null?P.set(F.key,F):P.set(F.index,F),F=F.sibling;return P}function c(F,P){return F=Qa(F,P),F.index=0,F.sibling=null,F}function d(F,P,W){return F.index=W,e?(W=F.alternate,W!==null?(W=W.index,W<P?(F.flags|=67108866,P):W):(F.flags|=67108866,P)):(F.flags|=1048576,P)}function p(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function T(F,P,W,ce){return P===null||P.tag!==6?(P=wi(W,F.mode,ce),P.return=F,P):(P=c(P,W),P.return=F,P)}function L(F,P,W,ce){var De=W.type;return De===O?re(F,P,W.props.children,ce,W.key):P!==null&&(P.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===I&&zs(De)===P.type)?(P=c(P,W.props),Oi(P,W),P.return=F,P):(P=Nr(W.type,W.key,W.props,null,F.mode,ce),Oi(P,W),P.return=F,P)}function Q(F,P,W,ce){return P===null||P.tag!==4||P.stateNode.containerInfo!==W.containerInfo||P.stateNode.implementation!==W.implementation?(P=Al(W,F.mode,ce),P.return=F,P):(P=c(P,W.children||[]),P.return=F,P)}function re(F,P,W,ce,De){return P===null||P.tag!==7?(P=Xa(W,F.mode,ce,De),P.return=F,P):(P=c(P,W),P.return=F,P)}function ue(F,P,W){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=wi(""+P,F.mode,W),P.return=F,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case A:return W=Nr(P.type,P.key,P.props,null,F.mode,W),Oi(W,P),W.return=F,W;case N:return P=Al(P,F.mode,W),P.return=F,P;case I:return P=zs(P),ue(F,P,W)}if(pe(P)||ae(P))return P=Xa(P,F.mode,W,null),P.return=F,P;if(typeof P.then=="function")return ue(F,io(P),W);if(P.$$typeof===K)return ue(F,no(F,P),W);co(F,P)}return null}function X(F,P,W,ce){var De=P!==null?P.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return De!==null?null:T(F,P,""+W,ce);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case A:return W.key===De?L(F,P,W,ce):null;case N:return W.key===De?Q(F,P,W,ce):null;case I:return W=zs(W),X(F,P,W,ce)}if(pe(W)||ae(W))return De!==null?null:re(F,P,W,ce,null);if(typeof W.then=="function")return X(F,P,io(W),ce);if(W.$$typeof===K)return X(F,P,no(F,W),ce);co(F,W)}return null}function ne(F,P,W,ce,De){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return F=F.get(W)||null,T(P,F,""+ce,De);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case A:return F=F.get(ce.key===null?W:ce.key)||null,L(P,F,ce,De);case N:return F=F.get(ce.key===null?W:ce.key)||null,Q(P,F,ce,De);case I:return ce=zs(ce),ne(F,P,W,ce,De)}if(pe(ce)||ae(ce))return F=F.get(W)||null,re(P,F,ce,De,null);if(typeof ce.then=="function")return ne(F,P,W,io(ce),De);if(ce.$$typeof===K)return ne(F,P,W,no(P,ce),De);co(P,ce)}return null}function we(F,P,W,ce){for(var De=null,Je=null,Ce=P,Ve=P=0,Ze=null;Ce!==null&&Ve<W.length;Ve++){Ce.index>Ve?(Ze=Ce,Ce=null):Ze=Ce.sibling;var Ke=X(F,Ce,W[Ve],ce);if(Ke===null){Ce===null&&(Ce=Ze);break}e&&Ce&&Ke.alternate===null&&t(F,Ce),P=d(Ke,P,Ve),Je===null?De=Ke:Je.sibling=Ke,Je=Ke,Ce=Ze}if(Ve===W.length)return a(F,Ce),Y&&i(F,Ve),De;if(Ce===null){for(;Ve<W.length;Ve++)Ce=ue(F,W[Ve],ce),Ce!==null&&(P=d(Ce,P,Ve),Je===null?De=Ce:Je.sibling=Ce,Je=Ce);return Y&&i(F,Ve),De}for(Ce=l(Ce);Ve<W.length;Ve++)Ze=ne(Ce,F,Ve,W[Ve],ce),Ze!==null&&(e&&Ze.alternate!==null&&Ce.delete(Ze.key===null?Ve:Ze.key),P=d(Ze,P,Ve),Je===null?De=Ze:Je.sibling=Ze,Je=Ze);return e&&Ce.forEach(function(Xl){return t(F,Xl)}),Y&&i(F,Ve),De}function _e(F,P,W,ce){if(W==null)throw Error(o(151));for(var De=null,Je=null,Ce=P,Ve=P=0,Ze=null,Ke=W.next();Ce!==null&&!Ke.done;Ve++,Ke=W.next()){Ce.index>Ve?(Ze=Ce,Ce=null):Ze=Ce.sibling;var Xl=X(F,Ce,Ke.value,ce);if(Xl===null){Ce===null&&(Ce=Ze);break}e&&Ce&&Xl.alternate===null&&t(F,Ce),P=d(Xl,P,Ve),Je===null?De=Xl:Je.sibling=Xl,Je=Xl,Ce=Ze}if(Ke.done)return a(F,Ce),Y&&i(F,Ve),De;if(Ce===null){for(;!Ke.done;Ve++,Ke=W.next())Ke=ue(F,Ke.value,ce),Ke!==null&&(P=d(Ke,P,Ve),Je===null?De=Ke:Je.sibling=Ke,Je=Ke);return Y&&i(F,Ve),De}for(Ce=l(Ce);!Ke.done;Ve++,Ke=W.next())Ke=ne(Ce,F,Ve,Ke.value,ce),Ke!==null&&(e&&Ke.alternate!==null&&Ce.delete(Ke.key===null?Ve:Ke.key),P=d(Ke,P,Ve),Je===null?De=Ke:Je.sibling=Ke,Je=Ke);return e&&Ce.forEach(function(Dy){return t(F,Dy)}),Y&&i(F,Ve),De}function dt(F,P,W,ce){if(typeof W=="object"&&W!==null&&W.type===O&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case A:e:{for(var De=W.key;P!==null;){if(P.key===De){if(De=W.type,De===O){if(P.tag===7){a(F,P.sibling),ce=c(P,W.props.children),ce.return=F,F=ce;break e}}else if(P.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===I&&zs(De)===P.type){a(F,P.sibling),ce=c(P,W.props),Oi(ce,W),ce.return=F,F=ce;break e}a(F,P);break}else t(F,P);P=P.sibling}W.type===O?(ce=Xa(W.props.children,F.mode,ce,W.key),ce.return=F,F=ce):(ce=Nr(W.type,W.key,W.props,null,F.mode,ce),Oi(ce,W),ce.return=F,F=ce)}return p(F);case N:e:{for(De=W.key;P!==null;){if(P.key===De)if(P.tag===4&&P.stateNode.containerInfo===W.containerInfo&&P.stateNode.implementation===W.implementation){a(F,P.sibling),ce=c(P,W.children||[]),ce.return=F,F=ce;break e}else{a(F,P);break}else t(F,P);P=P.sibling}ce=Al(W,F.mode,ce),ce.return=F,F=ce}return p(F);case I:return W=zs(W),dt(F,P,W,ce)}if(pe(W))return we(F,P,W,ce);if(ae(W)){if(De=ae(W),typeof De!="function")throw Error(o(150));return W=De.call(W),_e(F,P,W,ce)}if(typeof W.then=="function")return dt(F,P,io(W),ce);if(W.$$typeof===K)return dt(F,P,no(F,W),ce);co(F,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,P!==null&&P.tag===6?(a(F,P.sibling),ce=c(P,W),ce.return=F,F=ce):(a(F,P),ce=wi(W,F.mode,ce),ce.return=F,F=ce),p(F)):a(F,P)}return function(F,P,W,ce){try{Mi=0;var De=dt(F,P,W,ce);return Mr=null,De}catch(Ce){if(Ce===Tr||Ce===so)throw Ce;var Je=na(29,Ce,null,F.mode);return Je.lanes=ce,Je.return=F,Je}finally{}}}var Us=Uh(!0),Hh=Uh(!1),_l=!1;function ld(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sd(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 zl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ll(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(tt&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Ds(e),Rs(e,null,a),t}return Za(e,l,t,a),Ds(e)}function Ri(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,pa(e,a)}}function rd(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=p:d=d.next=p,a=a.next}while(a!==null);d===null?c=d=t:d=d.next=t}else c=d=t;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var id=!1;function Di(){if(id){var e=Er;if(e!==null)throw e}}function ki(e,t,a,l){id=!1;var c=e.updateQueue;_l=!1;var d=c.firstBaseUpdate,p=c.lastBaseUpdate,T=c.shared.pending;if(T!==null){c.shared.pending=null;var L=T,Q=L.next;L.next=null,p===null?d=Q:p.next=Q,p=L;var re=e.alternate;re!==null&&(re=re.updateQueue,T=re.lastBaseUpdate,T!==p&&(T===null?re.firstBaseUpdate=Q:T.next=Q,re.lastBaseUpdate=L))}if(d!==null){var ue=c.baseState;p=0,re=Q=L=null,T=d;do{var X=T.lane&-536870913,ne=X!==T.lane;if(ne?(Ie&X)===X:(l&X)===X){X!==0&&X===Cr&&(id=!0),re!==null&&(re=re.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var we=e,_e=T;X=t;var dt=a;switch(_e.tag){case 1:if(we=_e.payload,typeof we=="function"){ue=we.call(dt,ue,X);break e}ue=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=_e.payload,X=typeof we=="function"?we.call(dt,ue,X):we,X==null)break e;ue=M({},ue,X);break e;case 2:_l=!0}}X=T.callback,X!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=c.callbacks,ne===null?c.callbacks=[X]:ne.push(X))}else ne={lane:X,tag:T.tag,payload:T.payload,callback:T.callback,next:null},re===null?(Q=re=ne,L=ue):re=re.next=ne,p|=X;if(T=T.next,T===null){if(T=c.shared.pending,T===null)break;ne=T,T=ne.next,ne.next=null,c.lastBaseUpdate=ne,c.shared.pending=null}}while(!0);re===null&&(L=ue),c.baseState=L,c.firstBaseUpdate=Q,c.lastBaseUpdate=re,d===null&&(c.shared.lanes=0),Pl|=p,e.lanes=p,e.memoizedState=ue}}function qh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Vh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)qh(a[e],t)}var Or=H(null),oo=H(0);function Ph(e,t){e=ol,he(oo,e),he(Or,t),ol=e|t.baseLanes}function cd(){he(oo,ol),he(Or,Or.current)}function od(){ol=oo.current,se(Or),se(oo)}var ka=H(null),tn=null;function Ul(e){var t=e.alternate;he(Dt,Dt.current&1),he(ka,e),tn===null&&(t===null||Or.current!==null||t.memoizedState!==null)&&(tn=e)}function ud(e){he(Dt,Dt.current),he(ka,e),tn===null&&(tn=e)}function Bh(e){e.tag===22?(he(Dt,Dt.current),he(ka,e),tn===null&&(tn=e)):Hl()}function Hl(){he(Dt,Dt.current),he(ka,ka.current)}function Aa(e){se(ka),tn===e&&(tn=null),se(Dt)}var Dt=H(0);function uo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||pf(a)||vf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var tl=0,qe=null,ot=null,Ht=null,fo=!1,Rr=!1,Hs=!1,ho=0,Ai=0,Dr=null,jv=0;function Ct(){throw Error(o(321))}function dd(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!oa(e[a],t[a]))return!1;return!0}function fd(e,t,a,l,c,d){return tl=d,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?Cm:Td,Hs=!1,d=a(l,c),Hs=!1,Rr&&(d=Yh(t,a,l,c)),$h(e),d}function $h(e){$.H=Li;var t=ot!==null&&ot.next!==null;if(tl=0,Ht=ot=qe=null,fo=!1,Ai=0,Dr=null,t)throw Error(o(300));e===null||qt||(e=e.dependencies,e!==null&&Sr(e)&&(qt=!0))}function Yh(e,t,a,l){qe=e;var c=0;do{if(Rr&&(Dr=null),Ai=0,Rr=!1,25<=c)throw Error(o(301));if(c+=1,Ht=ot=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}$.H=Em,d=t(a,l)}while(Rr);return d}function Nv(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?_i(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(qe.flags|=1024),t}function hd(){var e=ho!==0;return ho=0,e}function md(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function gd(e){if(fo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fo=!1}tl=0,Ht=ot=qe=null,Rr=!1,Ai=ho=0,Dr=null}function ga(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?qe.memoizedState=Ht=e:Ht=Ht.next=e,Ht}function kt(){if(ot===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=Ht===null?qe.memoizedState:Ht.next;if(t!==null)Ht=t,ot=e;else{if(e===null)throw qe.alternate===null?Error(o(467)):Error(o(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},Ht===null?qe.memoizedState=Ht=e:Ht=Ht.next=e}return Ht}function mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _i(e){var t=Ai;return Ai+=1,Dr===null&&(Dr=[]),e=_h(Dr,e,t),t=qe,(Ht===null?t.memoizedState:Ht.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?Cm:Td),e}function go(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _i(e);if(e.$$typeof===K)return la(e)}throw Error(o(438,String(e)))}function xd(e){var t=null,a=qe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=qe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=mo(),qe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=S;return t.index++,a}function al(e,t){return typeof t=="function"?t(e):t}function xo(e){var t=kt();return pd(t,ot,e)}function pd(e,t,a){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=a;var c=e.baseQueue,d=l.pending;if(d!==null){if(c!==null){var p=c.next;c.next=d.next,d.next=p}t.baseQueue=c=d,l.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var T=p=null,L=null,Q=t,re=!1;do{var ue=Q.lane&-536870913;if(ue!==Q.lane?(Ie&ue)===ue:(tl&ue)===ue){var X=Q.revertLane;if(X===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ue===Cr&&(re=!0);else if((tl&X)===X){Q=Q.next,X===Cr&&(re=!0);continue}else ue={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},L===null?(T=L=ue,p=d):L=L.next=ue,qe.lanes|=X,Pl|=X;ue=Q.action,Hs&&a(d,ue),d=Q.hasEagerState?Q.eagerState:a(d,ue)}else X={lane:ue,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},L===null?(T=L=X,p=d):L=L.next=X,qe.lanes|=ue,Pl|=ue;Q=Q.next}while(Q!==null&&Q!==t);if(L===null?p=d:L.next=T,!oa(d,e.memoizedState)&&(qt=!0,re&&(a=Er,a!==null)))throw a;e.memoizedState=d,e.baseState=p,e.baseQueue=L,l.lastRenderedState=d}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function vd(e){var t=kt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var l=a.dispatch,c=a.pending,d=t.memoizedState;if(c!==null){a.pending=null;var p=c=c.next;do d=e(d,p.action),p=p.next;while(p!==c);oa(d,t.memoizedState)||(qt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,l]}function Gh(e,t,a){var l=qe,c=kt(),d=Y;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=t();var p=!oa((ot||c).memoizedState,a);if(p&&(c.memoizedState=a,qt=!0),c=c.queue,jd(Zh.bind(null,l,c,e),[e]),c.getSnapshot!==t||p||Ht!==null&&Ht.memoizedState.tag&1){if(l.flags|=2048,kr(9,{destroy:void 0},Ih.bind(null,l,c,a,t),null),ft===null)throw Error(o(349));d||(tl&127)!==0||Fh(l,t,a)}return a}function Fh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=mo(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Ih(e,t,a,l){t.value=a,t.getSnapshot=l,Wh(t)&&Qh(e)}function Zh(e,t,a){return a(function(){Wh(t)&&Qh(e)})}function Wh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!oa(e,a)}catch{return!0}}function Qh(e){var t=Wa(e,2);t!==null&&Ta(t,e,2)}function yd(e){var t=ga();if(typeof e=="function"){var a=e;if(e=a(),Hs){_t(!0);try{a()}finally{_t(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:e},t}function Xh(e,t,a,l){return e.baseState=a,pd(e,ot,typeof l=="function"?l:al)}function wv(e,t,a,l,c){if(yo(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){d.listeners.push(p)}};$.T!==null?a(!0):d.isTransition=!1,l(d),a=t.pending,a===null?(d.next=t.pending=d,Jh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Jh(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var d=$.T,p={};$.T=p;try{var T=a(c,l),L=$.S;L!==null&&L(p,T),Kh(e,t,T)}catch(Q){bd(e,t,Q)}finally{d!==null&&p.types!==null&&(d.types=p.types),$.T=d}}else try{d=a(c,l),Kh(e,t,d)}catch(Q){bd(e,t,Q)}}function Kh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){em(e,t,l)},function(l){return bd(e,t,l)}):em(e,t,a)}function em(e,t,a){t.status="fulfilled",t.value=a,tm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Jh(e,a)))}function bd(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,tm(t),t=t.next;while(t!==l)}e.action=null}function tm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function am(e,t){return t}function nm(e,t){if(Y){var a=ft.formState;if(a!==null){e:{var l=qe;if(Y){if(V){t:{for(var c=V,d=Ne;c.nodeType!==8;){if(!d){c=null;break t}if(c=an(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){V=an(c.nextSibling),l=c.data==="F!";break e}}Fe(l)}l=!1}l&&(t=a[0])}}return a=ga(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:am,lastRenderedState:t},a.queue=l,a=Nm.bind(null,qe,l),l.dispatch=a,l=yd(!1),d=Ed.bind(null,qe,!1,l.queue),l=ga(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=wv.bind(null,qe,c,d,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function lm(e){var t=kt();return sm(t,ot,e)}function sm(e,t,a){if(t=pd(e,t,am)[0],e=xo(al)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=_i(t)}catch(p){throw p===Tr?so:p}else l=t;t=kt();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,kr(9,{destroy:void 0},Sv.bind(null,c,a),null)),[l,d,e]}function Sv(e,t){e.action=t}function rm(e){var t=kt(),a=ot;if(a!==null)return sm(t,a,e);kt(),t=t.memoizedState,a=kt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function kr(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=qe.updateQueue,t===null&&(t=mo(),qe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function im(){return kt().memoizedState}function po(e,t,a,l){var c=ga();qe.flags|=e,c.memoizedState=kr(1|t,{destroy:void 0},a,l===void 0?null:l)}function vo(e,t,a,l){var c=kt();l=l===void 0?null:l;var d=c.memoizedState.inst;ot!==null&&l!==null&&dd(l,ot.memoizedState.deps)?c.memoizedState=kr(t,d,a,l):(qe.flags|=e,c.memoizedState=kr(1|t,d,a,l))}function cm(e,t){po(8390656,8,e,t)}function jd(e,t){vo(2048,8,e,t)}function Cv(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=mo(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function om(e){var t=kt().memoizedState;return Cv({ref:t,nextImpl:e}),function(){if((tt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function um(e,t){return vo(4,2,e,t)}function dm(e,t){return vo(4,4,e,t)}function fm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hm(e,t,a){a=a!=null?a.concat([e]):null,vo(4,4,fm.bind(null,t,e),a)}function Nd(){}function mm(e,t){var a=kt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&dd(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function gm(e,t){var a=kt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&dd(t,l[1]))return l[0];if(l=e(),Hs){_t(!0);try{e()}finally{_t(!1)}}return a.memoizedState=[l,t],l}function wd(e,t,a){return a===void 0||(tl&1073741824)!==0&&(Ie&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=x0(),qe.lanes|=e,Pl|=e,a)}function xm(e,t,a,l){return oa(a,t)?a:Or.current!==null?(e=wd(e,a,l),oa(e,t)||(qt=!0),e):(tl&42)===0||(tl&1073741824)!==0&&(Ie&261930)===0?(qt=!0,e.memoizedState=a):(e=x0(),qe.lanes|=e,Pl|=e,t)}function pm(e,t,a,l,c){var d=J.p;J.p=d!==0&&8>d?d:8;var p=$.T,T={};$.T=T,Ed(e,!1,t,a);try{var L=c(),Q=$.S;if(Q!==null&&Q(T,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var re=bv(L,l);zi(e,t,re,La(e))}else zi(e,t,l,La(e))}catch(ue){zi(e,t,{then:function(){},status:"rejected",reason:ue},La())}finally{J.p=d,p!==null&&T.types!==null&&(p.types=T.types),$.T=p}}function Ev(){}function Sd(e,t,a,l){if(e.tag!==5)throw Error(o(476));var c=vm(e).queue;pm(e,c,t,fe,a===null?Ev:function(){return ym(e),a(l)})}function vm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:fe},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ym(e){var t=vm(e);t.next===null&&(t=e.alternate.memoizedState),zi(e,t.next.queue,{},La())}function Cd(){return la(Ji)}function bm(){return kt().memoizedState}function jm(){return kt().memoizedState}function Tv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=La();e=zl(a);var l=Ll(t,e,a);l!==null&&(Ta(l,t,a),Ri(l,t,a)),t={cache:ed()},e.payload=t;return}t=t.return}}function Mv(e,t,a){var l=La();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},yo(e)?wm(t,a):(a=yr(e,t,a,l),a!==null&&(Ta(a,e,l),Sm(a,t,l)))}function Nm(e,t,a){var l=La();zi(e,t,a,l)}function zi(e,t,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(yo(e))wm(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var p=t.lastRenderedState,T=d(p,a);if(c.hasEagerState=!0,c.eagerState=T,oa(T,p))return Za(e,t,c,0),ft===null&&kl(),!1}catch{}finally{}if(a=yr(e,t,c,l),a!==null)return Ta(a,e,l),Sm(a,t,l),!0}return!1}function Ed(e,t,a,l){if(l={lane:2,revertLane:lf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},yo(e)){if(t)throw Error(o(479))}else t=yr(e,a,l,2),t!==null&&Ta(t,e,2)}function yo(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function wm(e,t){Rr=fo=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Sm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,pa(e,a)}}var Li={readContext:la,use:go,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};Li.useEffectEvent=Ct;var Cm={readContext:la,use:go,useCallback:function(e,t){return ga().memoizedState=[e,t===void 0?null:t],e},useContext:la,useEffect:cm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,po(4194308,4,fm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return po(4194308,4,e,t)},useInsertionEffect:function(e,t){po(4,2,e,t)},useMemo:function(e,t){var a=ga();t=t===void 0?null:t;var l=e();if(Hs){_t(!0);try{e()}finally{_t(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=ga();if(a!==void 0){var c=a(t);if(Hs){_t(!0);try{a(t)}finally{_t(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=Mv.bind(null,qe,e),[l.memoizedState,e]},useRef:function(e){var t=ga();return e={current:e},t.memoizedState=e},useState:function(e){e=yd(e);var t=e.queue,a=Nm.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Nd,useDeferredValue:function(e,t){var a=ga();return wd(a,e,t)},useTransition:function(){var e=yd(!1);return e=pm.bind(null,qe,e.queue,!0,!1),ga().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=qe,c=ga();if(Y){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),ft===null)throw Error(o(349));(Ie&127)!==0||Fh(l,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,cm(Zh.bind(null,l,d,e),[e]),l.flags|=2048,kr(9,{destroy:void 0},Ih.bind(null,l,d,a,t),null),a},useId:function(){var e=ga(),t=ft.identifierPrefix;if(Y){var a=g,l=Ja;a=(l&~(1<<32-zt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ho++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=jv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Cd,useFormState:nm,useActionState:nm,useOptimistic:function(e){var t=ga();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Ed.bind(null,qe,!0,a),a.dispatch=t,[e,t]},useMemoCache:xd,useCacheRefresh:function(){return ga().memoizedState=Tv.bind(null,qe)},useEffectEvent:function(e){var t=ga(),a={impl:e};return t.memoizedState=a,function(){if((tt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Td={readContext:la,use:go,useCallback:mm,useContext:la,useEffect:jd,useImperativeHandle:hm,useInsertionEffect:um,useLayoutEffect:dm,useMemo:gm,useReducer:xo,useRef:im,useState:function(){return xo(al)},useDebugValue:Nd,useDeferredValue:function(e,t){var a=kt();return xm(a,ot.memoizedState,e,t)},useTransition:function(){var e=xo(al)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:_i(e),t]},useSyncExternalStore:Gh,useId:bm,useHostTransitionStatus:Cd,useFormState:lm,useActionState:lm,useOptimistic:function(e,t){var a=kt();return Xh(a,ot,e,t)},useMemoCache:xd,useCacheRefresh:jm};Td.useEffectEvent=om;var Em={readContext:la,use:go,useCallback:mm,useContext:la,useEffect:jd,useImperativeHandle:hm,useInsertionEffect:um,useLayoutEffect:dm,useMemo:gm,useReducer:vd,useRef:im,useState:function(){return vd(al)},useDebugValue:Nd,useDeferredValue:function(e,t){var a=kt();return ot===null?wd(a,e,t):xm(a,ot.memoizedState,e,t)},useTransition:function(){var e=vd(al)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:_i(e),t]},useSyncExternalStore:Gh,useId:bm,useHostTransitionStatus:Cd,useFormState:rm,useActionState:rm,useOptimistic:function(e,t){var a=kt();return ot!==null?Xh(a,ot,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:xd,useCacheRefresh:jm};Em.useEffectEvent=om;function Md(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:M({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Od={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=La(),c=zl(l);c.payload=t,a!=null&&(c.callback=a),t=Ll(e,c,l),t!==null&&(Ta(t,e,l),Ri(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=La(),c=zl(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Ll(e,c,l),t!==null&&(Ta(t,e,l),Ri(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=La(),l=zl(a);l.tag=2,t!=null&&(l.callback=t),t=Ll(e,l,a),t!==null&&(Ta(t,e,a),Ri(t,e,a))}};function Tm(e,t,a,l,c,d,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,d,p):t.prototype&&t.prototype.isPureReactComponent?!Ts(a,l)||!Ts(c,d):!0}function Mm(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Od.enqueueReplaceState(t,t.state,null)}function qs(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=M({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function Om(e){Dl(e)}function Rm(e){console.error(e)}function Dm(e){Dl(e)}function bo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function km(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Rd(e,t,a){return a=zl(a),a.tag=3,a.payload={element:null},a.callback=function(){bo(e,t)},a}function Am(e){return e=zl(e),e.tag=3,e}function _m(e,t,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=l.value;e.payload=function(){return c(d)},e.callback=function(){km(t,a,l)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){km(t,a,l),typeof c!="function"&&(Bl===null?Bl=new Set([this]):Bl.add(this));var T=l.stack;this.componentDidCatch(l.value,{componentStack:T!==null?T:""})})}function Ov(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&en(t,a,c,!0),a=ka.current,a!==null){switch(a.tag){case 31:case 13:return tn===null?ko():a.alternate===null&&Et===0&&(Et=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===ro?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),tf(e,l,c)),!1;case 22:return a.flags|=65536,l===ro?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),tf(e,l,c)),!1}throw Error(o(435,a.tag))}return tf(e,l,c),ko(),!1}if(Y)return t=ka.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Ue&&(e=Error(o(422),{cause:l}),gn(ja(e,a)))):(l!==Ue&&(t=Error(o(423),{cause:l}),gn(ja(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=ja(l,a),c=Rd(e.stateNode,l,c),rd(e,c),Et!==4&&(Et=2)),!1;var d=Error(o(520),{cause:l});if(d=ja(d,a),Yi===null?Yi=[d]:Yi.push(d),Et!==4&&(Et=2),t===null)return!0;l=ja(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Rd(a.stateNode,l,e),rd(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Bl===null||!Bl.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Am(c),_m(c,e,a,l),rd(a,c),!1}a=a.return}while(a!==null);return!1}var Dd=Error(o(461)),qt=!1;function sa(e,t,a,l){t.child=e===null?Hh(t,null,a,l):Us(t,e.child,a,l)}function zm(e,t,a,l,c){a=a.render;var d=t.ref;if("ref"in l){var p={};for(var T in l)T!=="ref"&&(p[T]=l[T])}else p=l;return As(t),l=fd(e,t,a,p,d,c),T=hd(),e!==null&&!qt?(md(e,t,c),nl(e,t,c)):(Y&&T&&v(t),t.flags|=1,sa(e,t,l,c),t.child)}function Lm(e,t,a,l,c){if(e===null){var d=a.type;return typeof d=="function"&&!jr(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,Um(e,t,d,l,c)):(e=Nr(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!qd(e,c)){var p=d.memoizedProps;if(a=a.compare,a=a!==null?a:Ts,a(p,l)&&e.ref===t.ref)return nl(e,t,c)}return t.flags|=1,e=Qa(d,l),e.ref=t.ref,e.return=t,t.child=e}function Um(e,t,a,l,c){if(e!==null){var d=e.memoizedProps;if(Ts(d,l)&&e.ref===t.ref)if(qt=!1,t.pendingProps=l=d,qd(e,c))(e.flags&131072)!==0&&(qt=!0);else return t.lanes=e.lanes,nl(e,t,c)}return kd(e,t,a,l,c)}function Hm(e,t,a,l){var c=l.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~d}else l=0,t.child=null;return qm(e,t,d,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&lo(t,d!==null?d.cachePool:null),d!==null?Ph(t,d):cd(),Bh(t);else return l=t.lanes=536870912,qm(e,t,d!==null?d.baseLanes|a:a,a,l)}else d!==null?(lo(t,d.cachePool),Ph(t,d),Hl(),t.memoizedState=null):(e!==null&&lo(t,null),cd(),Hl());return sa(e,t,c,a),t.child}function Ui(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function qm(e,t,a,l,c){var d=ad();return d=d===null?null:{parent:Ut._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&lo(t,null),cd(),Bh(t),e!==null&&en(e,t,l,!0),t.childLanes=c,null}function jo(e,t){return t=wo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Vm(e,t,a){return Us(t,e.child,null,a),e=jo(t,t.pendingProps),e.flags|=2,Aa(t),t.memoizedState=null,e}function Rv(e,t,a){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Y){if(l.mode==="hidden")return e=jo(t,l),t.lanes=536870912,Ui(null,e);if(ud(t),(e=V)?(e=J0(e,Ne),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Ja,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=ao(e),a.return=t,t.child=a,q=t,V=null)):e=null,e===null)throw Fe(t);return t.lanes=536870912,null}return jo(t,l)}var d=e.memoizedState;if(d!==null){var p=d.dehydrated;if(ud(t),c)if(t.flags&256)t.flags&=-257,t=Vm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(qt||en(e,t,a,!1),c=(a&e.childLanes)!==0,qt||c){if(l=ft,l!==null&&(p=ai(l,a),p!==0&&p!==d.retryLane))throw d.retryLane=p,Wa(e,p),Ta(l,e,p),Dd;ko(),t=Vm(e,t,a)}else e=d.treeContext,V=an(p.nextSibling),q=t,Y=!0,de=null,Ne=!1,e!==null&&_(t,e),t=jo(t,l),t.flags|=4096;return t}return e=Qa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function No(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function kd(e,t,a,l,c){return As(t),a=fd(e,t,a,l,void 0,c),l=hd(),e!==null&&!qt?(md(e,t,c),nl(e,t,c)):(Y&&l&&v(t),t.flags|=1,sa(e,t,a,c),t.child)}function Pm(e,t,a,l,c,d){return As(t),t.updateQueue=null,a=Yh(t,l,a,c),$h(e),l=hd(),e!==null&&!qt?(md(e,t,d),nl(e,t,d)):(Y&&l&&v(t),t.flags|=1,sa(e,t,a,d),t.child)}function Bm(e,t,a,l,c){if(As(t),t.stateNode===null){var d=Da,p=a.contextType;typeof p=="object"&&p!==null&&(d=la(p)),d=new a(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Od,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},ld(t),p=a.contextType,d.context=typeof p=="object"&&p!==null?la(p):Da,d.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(Md(t,a,p,l),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(p=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),p!==d.state&&Od.enqueueReplaceState(d,d.state,null),ki(t,l,d,c),Di(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var T=t.memoizedProps,L=qs(a,T);d.props=L;var Q=d.context,re=a.contextType;p=Da,typeof re=="object"&&re!==null&&(p=la(re));var ue=a.getDerivedStateFromProps;re=typeof ue=="function"||typeof d.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(T||Q!==p)&&Mm(t,d,l,p),_l=!1;var X=t.memoizedState;d.state=X,ki(t,l,d,c),Di(),Q=t.memoizedState,T||X!==Q||_l?(typeof ue=="function"&&(Md(t,a,ue,l),Q=t.memoizedState),(L=_l||Tm(t,a,L,l,X,Q,p))?(re||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=Q),d.props=l,d.state=Q,d.context=p,l=L):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,sd(e,t),p=t.memoizedProps,re=qs(a,p),d.props=re,ue=t.pendingProps,X=d.context,Q=a.contextType,L=Da,typeof Q=="object"&&Q!==null&&(L=la(Q)),T=a.getDerivedStateFromProps,(Q=typeof T=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==ue||X!==L)&&Mm(t,d,l,L),_l=!1,X=t.memoizedState,d.state=X,ki(t,l,d,c),Di();var ne=t.memoizedState;p!==ue||X!==ne||_l||e!==null&&e.dependencies!==null&&Sr(e.dependencies)?(typeof T=="function"&&(Md(t,a,T,l),ne=t.memoizedState),(re=_l||Tm(t,a,re,l,X,ne,L)||e!==null&&e.dependencies!==null&&Sr(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,ne,L),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,ne,L)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ne),d.props=l,d.state=ne,d.context=L,l=re):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),l=!1)}return d=l,No(e,t),l=(t.flags&128)!==0,d||l?(d=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&l?(t.child=Us(t,e.child,null,c),t.child=Us(t,null,a,c)):sa(e,t,a,c),t.memoizedState=d.state,e=t.child):e=nl(e,t,c),e}function $m(e,t,a,l){return Xt(),t.flags|=256,sa(e,t,a,l),t.child}var Ad={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _d(e){return{baseLanes:e,cachePool:kh()}}function zd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=za),e}function Ym(e,t,a){var l=t.pendingProps,c=!1,d=(t.flags&128)!==0,p;if((p=d)||(p=e!==null&&e.memoizedState===null?!1:(Dt.current&2)!==0),p&&(c=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Y){if(c?Ul(t):Hl(),(e=V)?(e=J0(e,Ne),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Ja,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=ao(e),a.return=t,t.child=a,q=t,V=null)):e=null,e===null)throw Fe(t);return vf(e)?t.lanes=32:t.lanes=536870912,null}var T=l.children;return l=l.fallback,c?(Hl(),c=t.mode,T=wo({mode:"hidden",children:T},c),l=Xa(l,c,a,null),T.return=t,l.return=t,T.sibling=l,t.child=T,l=t.child,l.memoizedState=_d(a),l.childLanes=zd(e,p,a),t.memoizedState=Ad,Ui(null,l)):(Ul(t),Ld(t,T))}var L=e.memoizedState;if(L!==null&&(T=L.dehydrated,T!==null)){if(d)t.flags&256?(Ul(t),t.flags&=-257,t=Ud(e,t,a)):t.memoizedState!==null?(Hl(),t.child=e.child,t.flags|=128,t=null):(Hl(),T=l.fallback,c=t.mode,l=wo({mode:"visible",children:l.children},c),T=Xa(T,c,a,null),T.flags|=2,l.return=t,T.return=t,l.sibling=T,t.child=l,Us(t,e.child,null,a),l=t.child,l.memoizedState=_d(a),l.childLanes=zd(e,p,a),t.memoizedState=Ad,t=Ui(null,l));else if(Ul(t),vf(T)){if(p=T.nextSibling&&T.nextSibling.dataset,p)var Q=p.dgst;p=Q,l=Error(o(419)),l.stack="",l.digest=p,gn({value:l,source:null,stack:null}),t=Ud(e,t,a)}else if(qt||en(e,t,a,!1),p=(a&e.childLanes)!==0,qt||p){if(p=ft,p!==null&&(l=ai(p,a),l!==0&&l!==L.retryLane))throw L.retryLane=l,Wa(e,l),Ta(p,e,l),Dd;pf(T)||ko(),t=Ud(e,t,a)}else pf(T)?(t.flags|=192,t.child=e.child,t=null):(e=L.treeContext,V=an(T.nextSibling),q=t,Y=!0,de=null,Ne=!1,e!==null&&_(t,e),t=Ld(t,l.children),t.flags|=4096);return t}return c?(Hl(),T=l.fallback,c=t.mode,L=e.child,Q=L.sibling,l=Qa(L,{mode:"hidden",children:l.children}),l.subtreeFlags=L.subtreeFlags&65011712,Q!==null?T=Qa(Q,T):(T=Xa(T,c,a,null),T.flags|=2),T.return=t,l.return=t,l.sibling=T,t.child=l,Ui(null,l),l=t.child,T=e.child.memoizedState,T===null?T=_d(a):(c=T.cachePool,c!==null?(L=Ut._currentValue,c=c.parent!==L?{parent:L,pool:L}:c):c=kh(),T={baseLanes:T.baseLanes|a,cachePool:c}),l.memoizedState=T,l.childLanes=zd(e,p,a),t.memoizedState=Ad,Ui(e.child,l)):(Ul(t),a=e.child,e=a.sibling,a=Qa(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function Ld(e,t){return t=wo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wo(e,t){return e=na(22,e,null,t),e.lanes=0,e}function Ud(e,t,a){return Us(t,e.child,null,a),e=Ld(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gm(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ci(e.return,t,a)}function Hd(e,t,a,l,c,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c,treeForkCount:d}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=a,p.tailMode=c,p.treeForkCount=d)}function Fm(e,t,a){var l=t.pendingProps,c=l.revealOrder,d=l.tail;l=l.children;var p=Dt.current,T=(p&2)!==0;if(T?(p=p&1|2,t.flags|=128):p&=1,he(Dt,p),sa(e,t,l,a),l=Y?mn:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gm(e,a,t);else if(e.tag===19)Gm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&uo(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Hd(t,!1,c,a,d,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&uo(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Hd(t,!0,a,null,d,l);break;case"together":Hd(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function nl(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Pl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(en(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Qa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Qa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function qd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Sr(e)))}function Dv(e,t,a){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),An(t,Ut,e.memoizedState.cache),Xt();break;case 27:case 5:wt(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:An(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ud(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ul(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Ym(e,t,a):(Ul(t),e=nl(e,t,a),e!==null?e.sibling:null);Ul(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(en(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return Fm(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),he(Dt,Dt.current),l)break;return null;case 22:return t.lanes=0,Hm(e,t,a,t.pendingProps);case 24:An(t,Ut,e.memoizedState.cache)}return nl(e,t,a)}function Im(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)qt=!0;else{if(!qd(e,a)&&(t.flags&128)===0)return qt=!1,Dv(e,t,a);qt=(e.flags&131072)!==0}else qt=!1,Y&&(t.flags&1048576)!==0&&m(t,mn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=zs(t.elementType),t.type=e,typeof e=="function")jr(e)?(l=qs(e,l),t.tag=1,t=Bm(null,t,e,l,a)):(t.tag=0,t=kd(null,t,e,l,a));else{if(e!=null){var c=e.$$typeof;if(c===R){t.tag=11,t=zm(null,t,e,l,a);break e}else if(c===G){t.tag=14,t=Lm(null,t,e,l,a);break e}}throw t=ge(e)||e,Error(o(306,t,""))}}return t;case 0:return kd(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=qs(l,t.pendingProps),Bm(e,t,l,c,a);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var d=t.memoizedState;c=d.element,sd(e,t),ki(t,l,null,a);var p=t.memoizedState;if(l=p.cache,An(t,Ut,l),l!==d.cache&&el(t,[Ut],a,!0),Di(),l=p.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=$m(e,t,l,a);break e}else if(l!==c){c=ja(Error(o(424)),t),gn(c),t=$m(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(V=an(e.firstChild),q=t,Y=!0,de=null,Ne=!0,a=Hh(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Xt(),l===c){t=nl(e,t,a);break e}sa(e,t,l,a)}t=t.child}return t;case 26:return No(e,t),e===null?(a=lg(t.type,null,t.pendingProps,null))?t.memoizedState=a:Y||(a=t.type,e=t.pendingProps,l=qo(xe.current).createElement(a),l[Mt]=t,l[Yt]=e,ra(l,a,e),Lt(l),t.stateNode=l):t.memoizedState=lg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wt(t),e===null&&Y&&(l=t.stateNode=tg(t.type,t.pendingProps,xe.current),q=t,Ne=!0,c=V,Fl(t.type)?(yf=c,V=an(l.firstChild)):V=c),sa(e,t,t.pendingProps.children,a),No(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Y&&((c=l=V)&&(l=iy(l,t.type,t.pendingProps,Ne),l!==null?(t.stateNode=l,q=t,V=an(l.firstChild),Ne=!1,c=!0):c=!1),c||Fe(t)),wt(t),c=t.type,d=t.pendingProps,p=e!==null?e.memoizedProps:null,l=d.children,mf(c,d)?l=null:p!==null&&mf(c,p)&&(t.flags|=32),t.memoizedState!==null&&(c=fd(e,t,Nv,null,null,a),Ji._currentValue=c),No(e,t),sa(e,t,l,a),t.child;case 6:return e===null&&Y&&((e=a=V)&&(a=cy(a,t.pendingProps,Ne),a!==null?(t.stateNode=a,q=t,V=null,e=!0):e=!1),e||Fe(t)),null;case 13:return Ym(e,t,a);case 4:return lt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Us(t,null,l,a):sa(e,t,l,a),t.child;case 11:return zm(e,t,t.type,t.pendingProps,a);case 7:return sa(e,t,t.pendingProps,a),t.child;case 8:return sa(e,t,t.pendingProps.children,a),t.child;case 12:return sa(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,An(t,t.type,l.value),sa(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,As(t),c=la(c),l=l(c),t.flags|=1,sa(e,t,l,a),t.child;case 14:return Lm(e,t,t.type,t.pendingProps,a);case 15:return Um(e,t,t.type,t.pendingProps,a);case 19:return Fm(e,t,a);case 31:return Rv(e,t,a);case 22:return Hm(e,t,a,t.pendingProps);case 24:return As(t),l=la(Ut),e===null?(c=ad(),c===null&&(c=ft,d=ed(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:l,cache:c},ld(t),An(t,Ut,c)):((e.lanes&a)!==0&&(sd(e,t),ki(t,null,null,a),Di()),c=e.memoizedState,d=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),An(t,Ut,l)):(l=d.cache,An(t,Ut,l),l!==c.cache&&el(t,[Ut],a,!0))),sa(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ll(e){e.flags|=4}function Vd(e,t,a,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(b0())e.flags|=8192;else throw Ls=ro,nd}else e.flags&=-16777217}function Zm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!og(t))if(b0())e.flags|=8192;else throw Ls=ro,nd}function So(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?rs():536870912,e.lanes|=t,Lr|=t)}function Hi(e,t){if(!Y)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function kv(e,t,a){var l=t.pendingProps;switch(E(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return pt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),xn(Ut),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Qt(t)?ll(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,kn())),pt(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(ll(t),d!==null?(pt(t),Zm(t,d)):(pt(t),Vd(t,c,null,l,a))):d?d!==e.memoizedState?(ll(t),pt(t),Zm(t,d)):(pt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ll(t),pt(t),Vd(t,c,e,l,a)),null;case 27:if(fa(t),a=xe.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ll(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return pt(t),null}e=ye.current,Qt(t)?Ae(t):(e=tg(c,l,a),t.stateNode=e,ll(t))}return pt(t),null;case 5:if(fa(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ll(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return pt(t),null}if(d=ye.current,Qt(t))Ae(t);else{var p=qo(xe.current);switch(d){case 1:d=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=p.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof l.is=="string"?p.createElement("select",{is:l.is}):p.createElement("select"),l.multiple?d.multiple=!0:l.size&&(d.size=l.size);break;default:d=typeof l.is=="string"?p.createElement(c,{is:l.is}):p.createElement(c)}}d[Mt]=t,d[Yt]=l;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)d.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=d;e:switch(ra(d,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ll(t)}}return pt(t),Vd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ll(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=xe.current,Qt(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=q,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Y0(e.nodeValue,a)),e||Fe(t,!0)}else e=qo(e).createTextNode(l),e[Mt]=t,t.stateNode=e}return pt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Qt(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Mt]=t}else Xt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),e=!1}else a=kn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Aa(t),t):(Aa(t),null);if((t.flags&128)!==0)throw Error(o(558))}return pt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Qt(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Mt]=t}else Xt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),c=!1}else c=kn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Aa(t),t):(Aa(t),null)}return Aa(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==c&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),So(t,t.updateQueue),pt(t),null);case 4:return Ye(),e===null&&of(t.stateNode.containerInfo),pt(t),null;case 10:return xn(t.type),pt(t),null;case 19:if(se(Dt),l=t.memoizedState,l===null)return pt(t),null;if(c=(t.flags&128)!==0,d=l.rendering,d===null)if(c)Hi(l,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=uo(e),d!==null){for(t.flags|=128,Hi(l,!1),e=d.updateQueue,t.updateQueue=e,So(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)to(a,e),a=a.sibling;return he(Dt,Dt.current&1|2),Y&&i(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&vt()>Oo&&(t.flags|=128,c=!0,Hi(l,!1),t.lanes=4194304)}else{if(!c)if(e=uo(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,So(t,e),Hi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!Y)return pt(t),null}else 2*vt()-l.renderingStartTime>Oo&&a!==536870912&&(t.flags|=128,c=!0,Hi(l,!1),t.lanes=4194304);l.isBackwards?(d.sibling=t.child,t.child=d):(e=l.last,e!==null?e.sibling=d:t.child=d,l.last=d)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=vt(),e.sibling=null,a=Dt.current,he(Dt,c?a&1|2:a&1),Y&&i(t,l.treeForkCount),e):(pt(t),null);case 22:case 23:return Aa(t),od(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),a=t.updateQueue,a!==null&&So(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&se(_s),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xn(Ut),pt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Av(e,t){switch(E(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xn(Ut),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fa(t),null;case 31:if(t.memoizedState!==null){if(Aa(t),t.alternate===null)throw Error(o(340));Xt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Aa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Xt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(Dt),null;case 4:return Ye(),null;case 10:return xn(t.type),null;case 22:case 23:return Aa(t),od(),e!==null&&se(_s),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xn(Ut),null;case 25:return null;default:return null}}function Wm(e,t){switch(E(t),t.tag){case 3:xn(Ut),Ye();break;case 26:case 27:case 5:fa(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&Aa(t);break;case 13:Aa(t);break;case 19:se(Dt);break;case 10:xn(t.type);break;case 22:case 23:Aa(t),od(),e!==null&&se(_s);break;case 24:xn(Ut)}}function qi(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&e)===e){l=void 0;var d=a.create,p=a.inst;l=d(),p.destroy=l}a=a.next}while(a!==c)}}catch(T){it(t,t.return,T)}}function ql(e,t,a){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var d=c.next;l=d;do{if((l.tag&e)===e){var p=l.inst,T=p.destroy;if(T!==void 0){p.destroy=void 0,c=t;var L=a,Q=T;try{Q()}catch(re){it(c,L,re)}}}l=l.next}while(l!==d)}}catch(re){it(t,t.return,re)}}function Qm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Vh(t,a)}catch(l){it(e,e.return,l)}}}function Xm(e,t,a){a.props=qs(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){it(e,t,l)}}function Vi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(c){it(e,t,c)}}function _n(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){it(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){it(e,t,c)}else a.current=null}function Jm(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){it(e,e.return,c)}}function Pd(e,t,a){try{var l=e.stateNode;ty(l,e.type,a,t),l[Yt]=t}catch(c){it(e,e.return,c)}}function Km(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fl(e.type)||e.tag===4}function Bd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Km(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&&Fl(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 $d(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Fa));else if(l!==4&&(l===27&&Fl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for($d(e,t,a),e=e.sibling;e!==null;)$d(e,t,a),e=e.sibling}function Co(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Fl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Co(e,t,a),e=e.sibling;e!==null;)Co(e,t,a),e=e.sibling}function e0(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);ra(t,l,a),t[Mt]=e,t[Yt]=a}catch(d){it(e,e.return,d)}}var sl=!1,Vt=!1,Yd=!1,t0=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function _v(e,t){if(e=e.containerInfo,ff=Fo,e=Xu(e),gr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var p=0,T=-1,L=-1,Q=0,re=0,ue=e,X=null;t:for(;;){for(var ne;ue!==a||c!==0&&ue.nodeType!==3||(T=p+c),ue!==d||l!==0&&ue.nodeType!==3||(L=p+l),ue.nodeType===3&&(p+=ue.nodeValue.length),(ne=ue.firstChild)!==null;)X=ue,ue=ne;for(;;){if(ue===e)break t;if(X===a&&++Q===c&&(T=p),X===d&&++re===l&&(L=p),(ne=ue.nextSibling)!==null)break;ue=X,X=ue.parentNode}ue=ne}a=T===-1||L===-1?null:{start:T,end:L}}else a=null}a=a||{start:0,end:0}}else a=null;for(hf={focusedElem:e,selectionRange:a},Fo=!1,Jt=t;Jt!==null;)if(t=Jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Jt=e;else for(;Jt!==null;){switch(t=Jt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,c=d.memoizedProps,d=d.memoizedState,l=a.stateNode;try{var we=qs(a.type,c);e=l.getSnapshotBeforeUpdate(we,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(_e){it(a,a.return,_e)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)xf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":xf(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Jt=e;break}Jt=t.return}}function a0(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:il(e,a),l&4&&qi(5,a);break;case 1:if(il(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){it(a,a.return,p)}else{var c=qs(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){it(a,a.return,p)}}l&64&&Qm(a),l&512&&Vi(a,a.return);break;case 3:if(il(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Vh(e,t)}catch(p){it(a,a.return,p)}}break;case 27:t===null&&l&4&&e0(a);case 26:case 5:il(e,a),t===null&&l&4&&Jm(a),l&512&&Vi(a,a.return);break;case 12:il(e,a);break;case 31:il(e,a),l&4&&s0(e,a);break;case 13:il(e,a),l&4&&r0(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=$v.bind(null,a),oy(e,a))));break;case 22:if(l=a.memoizedState!==null||sl,!l){t=t!==null&&t.memoizedState!==null||Vt,c=sl;var d=Vt;sl=l,(Vt=t)&&!d?cl(e,a,(a.subtreeFlags&8772)!==0):il(e,a),sl=c,Vt=d}break;case 30:break;default:il(e,a)}}function n0(e){var t=e.alternate;t!==null&&(e.alternate=null,n0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&lr(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 yt=null,wa=!1;function rl(e,t,a){for(a=a.child;a!==null;)l0(e,t,a),a=a.sibling}function l0(e,t,a){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(gt,a)}catch{}switch(a.tag){case 26:Vt||_n(a,t),rl(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Vt||_n(a,t);var l=yt,c=wa;Fl(a.type)&&(yt=a.stateNode,wa=!1),rl(e,t,a),Wi(a.stateNode),yt=l,wa=c;break;case 5:Vt||_n(a,t);case 6:if(l=yt,c=wa,yt=null,rl(e,t,a),yt=l,wa=c,yt!==null)if(wa)try{(yt.nodeType===9?yt.body:yt.nodeName==="HTML"?yt.ownerDocument.body:yt).removeChild(a.stateNode)}catch(d){it(a,t,d)}else try{yt.removeChild(a.stateNode)}catch(d){it(a,t,d)}break;case 18:yt!==null&&(wa?(e=yt,Q0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Yr(e)):Q0(yt,a.stateNode));break;case 4:l=yt,c=wa,yt=a.stateNode.containerInfo,wa=!0,rl(e,t,a),yt=l,wa=c;break;case 0:case 11:case 14:case 15:ql(2,a,t),Vt||ql(4,a,t),rl(e,t,a);break;case 1:Vt||(_n(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Xm(a,t,l)),rl(e,t,a);break;case 21:rl(e,t,a);break;case 22:Vt=(l=Vt)||a.memoizedState!==null,rl(e,t,a),Vt=l;break;default:rl(e,t,a)}}function s0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yr(e)}catch(a){it(t,t.return,a)}}}function r0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yr(e)}catch(a){it(t,t.return,a)}}function zv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new t0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new t0),t;default:throw Error(o(435,e.tag))}}function Eo(e,t){var a=zv(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var c=Yv.bind(null,e,l);l.then(c,c)}})}function Sa(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],d=e,p=t,T=p;e:for(;T!==null;){switch(T.tag){case 27:if(Fl(T.type)){yt=T.stateNode,wa=!1;break e}break;case 5:yt=T.stateNode,wa=!1;break e;case 3:case 4:yt=T.stateNode.containerInfo,wa=!0;break e}T=T.return}if(yt===null)throw Error(o(160));l0(d,p,c),yt=null,wa=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)i0(t,e),t=t.sibling}var pn=null;function i0(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sa(t,e),Ca(e),l&4&&(ql(3,e,e.return),qi(3,e),ql(5,e,e.return));break;case 1:Sa(t,e),Ca(e),l&512&&(Vt||a===null||_n(a,a.return)),l&64&&sl&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=pn;if(Sa(t,e),Ca(e),l&512&&(Vt||a===null||_n(a,a.return)),l&4){var d=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":d=c.getElementsByTagName("title")[0],(!d||d[cs]||d[Mt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(l),c.head.insertBefore(d,c.querySelector("head > title"))),ra(d,l,a),d[Mt]=e,Lt(d),l=d;break e;case"link":var p=ig("link","href",c).get(l+(a.href||""));if(p){for(var T=0;T<p.length;T++)if(d=p[T],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(T,1);break t}}d=c.createElement(l),ra(d,l,a),c.head.appendChild(d);break;case"meta":if(p=ig("meta","content",c).get(l+(a.content||""))){for(T=0;T<p.length;T++)if(d=p[T],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(T,1);break t}}d=c.createElement(l),ra(d,l,a),c.head.appendChild(d);break;default:throw Error(o(468,l))}d[Mt]=e,Lt(d),l=d}e.stateNode=l}else cg(c,e.type,e.stateNode);else e.stateNode=rg(c,l,e.memoizedProps);else d!==l?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,l===null?cg(c,e.type,e.stateNode):rg(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Pd(e,e.memoizedProps,a.memoizedProps)}break;case 27:Sa(t,e),Ca(e),l&512&&(Vt||a===null||_n(a,a.return)),a!==null&&l&4&&Pd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Sa(t,e),Ca(e),l&512&&(Vt||a===null||_n(a,a.return)),e.flags&32){c=e.stateNode;try{un(c,"")}catch(we){it(e,e.return,we)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Pd(e,c,a!==null?a.memoizedProps:c)),l&1024&&(Yd=!0);break;case 6:if(Sa(t,e),Ca(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(we){it(e,e.return,we)}}break;case 3:if(Bo=null,c=pn,pn=Vo(t.containerInfo),Sa(t,e),pn=c,Ca(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Yr(t.containerInfo)}catch(we){it(e,e.return,we)}Yd&&(Yd=!1,c0(e));break;case 4:l=pn,pn=Vo(e.stateNode.containerInfo),Sa(t,e),Ca(e),pn=l;break;case 12:Sa(t,e),Ca(e);break;case 31:Sa(t,e),Ca(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Eo(e,l)));break;case 13:Sa(t,e),Ca(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Mo=vt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Eo(e,l)));break;case 22:c=e.memoizedState!==null;var L=a!==null&&a.memoizedState!==null,Q=sl,re=Vt;if(sl=Q||c,Vt=re||L,Sa(t,e),Vt=re,sl=Q,Ca(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||L||sl||Vt||Vs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){L=a=t;try{if(d=L.stateNode,c)p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{T=L.stateNode;var ue=L.memoizedProps.style,X=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;T.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(we){it(L,L.return,we)}}}else if(t.tag===6){if(a===null){L=t;try{L.stateNode.nodeValue=c?"":L.memoizedProps}catch(we){it(L,L.return,we)}}}else if(t.tag===18){if(a===null){L=t;try{var ne=L.stateNode;c?X0(ne,!0):X0(L.stateNode,!1)}catch(we){it(L,L.return,we)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Eo(e,a))));break;case 19:Sa(t,e),Ca(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Eo(e,l)));break;case 30:break;case 21:break;default:Sa(t,e),Ca(e)}}function Ca(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Km(l)){a=l;break}l=l.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var c=a.stateNode,d=Bd(e);Co(e,d,c);break;case 5:var p=a.stateNode;a.flags&32&&(un(p,""),a.flags&=-33);var T=Bd(e);Co(e,T,p);break;case 3:case 4:var L=a.stateNode.containerInfo,Q=Bd(e);$d(e,Q,L);break;default:throw Error(o(161))}}catch(re){it(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function c0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;c0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function il(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)a0(e,t.alternate,t),t=t.sibling}function Vs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ql(4,t,t.return),Vs(t);break;case 1:_n(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Xm(t,t.return,a),Vs(t);break;case 27:Wi(t.stateNode);case 26:case 5:_n(t,t.return),Vs(t);break;case 22:t.memoizedState===null&&Vs(t);break;case 30:Vs(t);break;default:Vs(t)}e=e.sibling}}function cl(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,d=t,p=d.flags;switch(d.tag){case 0:case 11:case 15:cl(c,d,a),qi(4,d);break;case 1:if(cl(c,d,a),l=d,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Q){it(l,l.return,Q)}if(l=d,c=l.updateQueue,c!==null){var T=l.stateNode;try{var L=c.shared.hiddenCallbacks;if(L!==null)for(c.shared.hiddenCallbacks=null,c=0;c<L.length;c++)qh(L[c],T)}catch(Q){it(l,l.return,Q)}}a&&p&64&&Qm(d),Vi(d,d.return);break;case 27:e0(d);case 26:case 5:cl(c,d,a),a&&l===null&&p&4&&Jm(d),Vi(d,d.return);break;case 12:cl(c,d,a);break;case 31:cl(c,d,a),a&&p&4&&s0(c,d);break;case 13:cl(c,d,a),a&&p&4&&r0(c,d);break;case 22:d.memoizedState===null&&cl(c,d,a),Vi(d,d.return);break;case 30:break;default:cl(c,d,a)}t=t.sibling}}function Gd(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ei(a))}function Fd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ei(e))}function vn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)o0(e,t,a,l),t=t.sibling}function o0(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:vn(e,t,a,l),c&2048&&qi(9,t);break;case 1:vn(e,t,a,l);break;case 3:vn(e,t,a,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ei(e)));break;case 12:if(c&2048){vn(e,t,a,l),e=t.stateNode;try{var d=t.memoizedProps,p=d.id,T=d.onPostCommit;typeof T=="function"&&T(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){it(t,t.return,L)}}else vn(e,t,a,l);break;case 31:vn(e,t,a,l);break;case 13:vn(e,t,a,l);break;case 23:break;case 22:d=t.stateNode,p=t.alternate,t.memoizedState!==null?d._visibility&2?vn(e,t,a,l):Pi(e,t):d._visibility&2?vn(e,t,a,l):(d._visibility|=2,Ar(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Gd(p,t);break;case 24:vn(e,t,a,l),c&2048&&Fd(t.alternate,t);break;default:vn(e,t,a,l)}}function Ar(e,t,a,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,p=t,T=a,L=l,Q=p.flags;switch(p.tag){case 0:case 11:case 15:Ar(d,p,T,L,c),qi(8,p);break;case 23:break;case 22:var re=p.stateNode;p.memoizedState!==null?re._visibility&2?Ar(d,p,T,L,c):Pi(d,p):(re._visibility|=2,Ar(d,p,T,L,c)),c&&Q&2048&&Gd(p.alternate,p);break;case 24:Ar(d,p,T,L,c),c&&Q&2048&&Fd(p.alternate,p);break;default:Ar(d,p,T,L,c)}t=t.sibling}}function Pi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,c=l.flags;switch(l.tag){case 22:Pi(a,l),c&2048&&Gd(l.alternate,l);break;case 24:Pi(a,l),c&2048&&Fd(l.alternate,l);break;default:Pi(a,l)}t=t.sibling}}var Bi=8192;function _r(e,t,a){if(e.subtreeFlags&Bi)for(e=e.child;e!==null;)u0(e,t,a),e=e.sibling}function u0(e,t,a){switch(e.tag){case 26:_r(e,t,a),e.flags&Bi&&e.memoizedState!==null&&jy(a,pn,e.memoizedState,e.memoizedProps);break;case 5:_r(e,t,a);break;case 3:case 4:var l=pn;pn=Vo(e.stateNode.containerInfo),_r(e,t,a),pn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Bi,Bi=16777216,_r(e,t,a),Bi=l):_r(e,t,a));break;default:_r(e,t,a)}}function d0(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 $i(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Jt=l,h0(l,e)}d0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)f0(e),e=e.sibling}function f0(e){switch(e.tag){case 0:case 11:case 15:$i(e),e.flags&2048&&ql(9,e,e.return);break;case 3:$i(e);break;case 12:$i(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,To(e)):$i(e);break;default:$i(e)}}function To(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Jt=l,h0(l,e)}d0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ql(8,t,t.return),To(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,To(t));break;default:To(t)}e=e.sibling}}function h0(e,t){for(;Jt!==null;){var a=Jt;switch(a.tag){case 0:case 11:case 15:ql(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ei(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Jt=l;else e:for(a=e;Jt!==null;){l=Jt;var c=l.sibling,d=l.return;if(n0(l),l===a){Jt=null;break e}if(c!==null){c.return=d,Jt=c;break e}Jt=d}}}var Lv={getCacheForType:function(e){var t=la(Ut),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return la(Ut).controller.signal}},Uv=typeof WeakMap=="function"?WeakMap:Map,tt=0,ft=null,Be=null,Ie=0,rt=0,_a=null,Vl=!1,zr=!1,Id=!1,ol=0,Et=0,Pl=0,Ps=0,Zd=0,za=0,Lr=0,Yi=null,Ea=null,Wd=!1,Mo=0,m0=0,Oo=1/0,Ro=null,Bl=null,Ft=0,$l=null,Ur=null,ul=0,Qd=0,Xd=null,g0=null,Gi=0,Jd=null;function La(){return(tt&2)!==0&&Ie!==0?Ie&-Ie:$.T!==null?lf():nr()}function x0(){if(za===0)if((Ie&536870912)===0||Y){var e=oe;oe<<=1,(oe&3932160)===0&&(oe=262144),za=e}else za=536870912;return e=ka.current,e!==null&&(e.flags|=32),za}function Ta(e,t,a){(e===ft&&(rt===2||rt===9)||e.cancelPendingCommit!==null)&&(Hr(e,0),Yl(e,Ie,za,!1)),vl(e,a),((tt&2)===0||e!==ft)&&(e===ft&&((tt&2)===0&&(Ps|=a),Et===4&&Yl(e,Ie,za,!1)),zn(e))}function p0(e,t,a){if((tt&6)!==0)throw Error(o(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ht(e,t),c=l?Vv(e,t):ef(e,t,!0),d=l;do{if(c===0){zr&&!l&&Yl(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!Hv(a)){c=ef(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var T=e;c=Yi;var L=T.current.memoizedState.isDehydrated;if(L&&(Hr(T,p).flags|=256),p=ef(T,p,!1),p!==2){if(Id&&!L){T.errorRecoveryDisabledLanes|=d,Ps|=d,c=4;break e}d=Ea,Ea=c,d!==null&&(Ea===null?Ea=d:Ea.push.apply(Ea,d))}c=p}if(d=!1,c!==2)continue}}if(c===1){Hr(e,0),Yl(e,t,0,!0);break}e:{switch(l=e,d=c,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Yl(l,t,za,!Vl);break e;case 2:Ea=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=Mo+300-vt(),10<c)){if(Yl(l,t,za,!Vl),St(l,0,!0)!==0)break e;ul=t,l.timeoutHandle=Z0(v0.bind(null,l,a,Ea,Ro,Wd,t,za,Ps,Lr,Vl,d,"Throttled",-0,0),c);break e}v0(l,a,Ea,Ro,Wd,t,za,Ps,Lr,Vl,d,null,-0,0)}}break}while(!0);zn(e)}function v0(e,t,a,l,c,d,p,T,L,Q,re,ue,X,ne){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fa},u0(t,d,ue);var we=(d&62914560)===d?Mo-vt():(d&4194048)===d?m0-vt():0;if(we=Ny(ue,we),we!==null){ul=d,e.cancelPendingCommit=we(E0.bind(null,e,t,d,a,l,c,p,T,L,re,ue,null,X,ne)),Yl(e,d,p,!Q);return}}E0(e,t,d,a,l,c,p,T,L)}function Hv(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],d=c.getSnapshot;c=c.value;try{if(!oa(d(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yl(e,t,a,l){t&=~Zd,t&=~Ps,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var d=31-zt(c),p=1<<d;l[d]=-1,c&=~p}a!==0&&mt(e,a,t)}function Do(){return(tt&6)===0?(Fi(0),!1):!0}function Kd(){if(Be!==null){if(rt===0)var e=Be.return;else e=Be,Ka=Kn=null,gd(e),Mr=null,Mi=0,e=Be;for(;e!==null;)Wm(e.alternate,e),e=e.return;Be=null}}function Hr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,ly(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ul=0,Kd(),ft=e,Be=a=Qa(e.current,null),Ie=t,rt=0,_a=null,Vl=!1,zr=ht(e,t),Id=!1,Lr=za=Zd=Ps=Pl=Et=0,Ea=Yi=null,Wd=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-zt(l),d=1<<c;t|=e[c],l&=~d}return ol=t,kl(),a}function y0(e,t){qe=null,$.H=Li,t===Tr||t===so?(t=zh(),rt=3):t===nd?(t=zh(),rt=4):rt=t===Dd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_a=t,Be===null&&(Et=1,bo(e,ja(t,e.current)))}function b0(){var e=ka.current;return e===null?!0:(Ie&4194048)===Ie?tn===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?e===tn:!1}function j0(){var e=$.H;return $.H=Li,e===null?Li:e}function N0(){var e=$.A;return $.A=Lv,e}function ko(){Et=4,Vl||(Ie&4194048)!==Ie&&ka.current!==null||(zr=!0),(Pl&134217727)===0&&(Ps&134217727)===0||ft===null||Yl(ft,Ie,za,!1)}function ef(e,t,a){var l=tt;tt|=2;var c=j0(),d=N0();(ft!==e||Ie!==t)&&(Ro=null,Hr(e,t)),t=!1;var p=Et;e:do try{if(rt!==0&&Be!==null){var T=Be,L=_a;switch(rt){case 8:Kd(),p=6;break e;case 3:case 2:case 9:case 6:ka.current===null&&(t=!0);var Q=rt;if(rt=0,_a=null,qr(e,T,L,Q),a&&zr){p=0;break e}break;default:Q=rt,rt=0,_a=null,qr(e,T,L,Q)}}qv(),p=Et;break}catch(re){y0(e,re)}while(!0);return t&&e.shellSuspendCounter++,Ka=Kn=null,tt=l,$.H=c,$.A=d,Be===null&&(ft=null,Ie=0,kl()),p}function qv(){for(;Be!==null;)w0(Be)}function Vv(e,t){var a=tt;tt|=2;var l=j0(),c=N0();ft!==e||Ie!==t?(Ro=null,Oo=vt()+500,Hr(e,t)):zr=ht(e,t);e:do try{if(rt!==0&&Be!==null){t=Be;var d=_a;t:switch(rt){case 1:rt=0,_a=null,qr(e,t,d,1);break;case 2:case 9:if(Ah(d)){rt=0,_a=null,S0(t);break}t=function(){rt!==2&&rt!==9||ft!==e||(rt=7),zn(e)},d.then(t,t);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:Ah(d)?(rt=0,_a=null,S0(t)):(rt=0,_a=null,qr(e,t,d,7));break;case 5:var p=null;switch(Be.tag){case 26:p=Be.memoizedState;case 5:case 27:var T=Be;if(p?og(p):T.stateNode.complete){rt=0,_a=null;var L=T.sibling;if(L!==null)Be=L;else{var Q=T.return;Q!==null?(Be=Q,Ao(Q)):Be=null}break t}}rt=0,_a=null,qr(e,t,d,5);break;case 6:rt=0,_a=null,qr(e,t,d,6);break;case 8:Kd(),Et=6;break e;default:throw Error(o(462))}}Pv();break}catch(re){y0(e,re)}while(!0);return Ka=Kn=null,$.H=l,$.A=c,tt=a,Be!==null?0:(ft=null,Ie=0,kl(),Et)}function Pv(){for(;Be!==null&&!Ga();)w0(Be)}function w0(e){var t=Im(e.alternate,e,ol);e.memoizedProps=e.pendingProps,t===null?Ao(e):Be=t}function S0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Pm(a,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=Pm(a,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:gd(t);default:Wm(a,t),t=Be=to(t,ol),t=Im(a,t,ol)}e.memoizedProps=e.pendingProps,t===null?Ao(e):Be=t}function qr(e,t,a,l){Ka=Kn=null,gd(t),Mr=null,Mi=0;var c=t.return;try{if(Ov(e,c,t,a,Ie)){Et=1,bo(e,ja(a,e.current)),Be=null;return}}catch(d){if(c!==null)throw Be=c,d;Et=1,bo(e,ja(a,e.current)),Be=null;return}t.flags&32768?(Y||l===1?e=!0:zr||(Ie&536870912)!==0?e=!1:(Vl=e=!0,(l===2||l===9||l===3||l===6)&&(l=ka.current,l!==null&&l.tag===13&&(l.flags|=16384))),C0(t,e)):Ao(t)}function Ao(e){var t=e;do{if((t.flags&32768)!==0){C0(t,Vl);return}e=t.return;var a=kv(t.alternate,t,ol);if(a!==null){Be=a;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);Et===0&&(Et=5)}function C0(e,t){do{var a=Av(e.alternate,e);if(a!==null){a.flags&=32767,Be=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=a}while(e!==null);Et=6,Be=null}function E0(e,t,a,l,c,d,p,T,L){e.cancelPendingCommit=null;do _o();while(Ft!==0);if((tt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=Os,Tc(e,a,d,p,T,L),e===ft&&(Be=ft=null,Ie=0),Ur=t,$l=e,ul=a,Qd=d,Xd=c,g0=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Gv(ls,function(){return D0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=$.T,$.T=null,c=J.p,J.p=2,p=tt,tt|=4;try{_v(e,t,a)}finally{tt=p,J.p=c,$.T=l}}Ft=1,T0(),M0(),O0()}}function T0(){if(Ft===1){Ft=0;var e=$l,t=Ur,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=$.T,$.T=null;var l=J.p;J.p=2;var c=tt;tt|=4;try{i0(t,e);var d=hf,p=Xu(e.containerInfo),T=d.focusedElem,L=d.selectionRange;if(p!==T&&T&&T.ownerDocument&&Xe(T.ownerDocument.documentElement,T)){if(L!==null&&gr(T)){var Q=L.start,re=L.end;if(re===void 0&&(re=Q),"selectionStart"in T)T.selectionStart=Q,T.selectionEnd=Math.min(re,T.value.length);else{var ue=T.ownerDocument||document,X=ue&&ue.defaultView||window;if(X.getSelection){var ne=X.getSelection(),we=T.textContent.length,_e=Math.min(L.start,we),dt=L.end===void 0?_e:Math.min(L.end,we);!ne.extend&&_e>dt&&(p=dt,dt=_e,_e=p);var F=Wc(T,_e),P=Wc(T,dt);if(F&&P&&(ne.rangeCount!==1||ne.anchorNode!==F.node||ne.anchorOffset!==F.offset||ne.focusNode!==P.node||ne.focusOffset!==P.offset)){var W=ue.createRange();W.setStart(F.node,F.offset),ne.removeAllRanges(),_e>dt?(ne.addRange(W),ne.extend(P.node,P.offset)):(W.setEnd(P.node,P.offset),ne.addRange(W))}}}}for(ue=[],ne=T;ne=ne.parentNode;)ne.nodeType===1&&ue.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<ue.length;T++){var ce=ue[T];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Fo=!!ff,hf=ff=null}finally{tt=c,J.p=l,$.T=a}}e.current=t,Ft=2}}function M0(){if(Ft===2){Ft=0;var e=$l,t=Ur,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=$.T,$.T=null;var l=J.p;J.p=2;var c=tt;tt|=4;try{a0(e,t.alternate,t)}finally{tt=c,J.p=l,$.T=a}}Ft=3}}function O0(){if(Ft===4||Ft===3){Ft=0,ns();var e=$l,t=Ur,a=ul,l=g0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ft=5:(Ft=0,Ur=$l=null,R0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Bl=null),ca(a),t=t.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(gt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=$.T,c=J.p,J.p=2,$.T=null;try{for(var d=e.onRecoverableError,p=0;p<l.length;p++){var T=l[p];d(T.value,{componentStack:T.stack})}}finally{$.T=t,J.p=c}}(ul&3)!==0&&_o(),zn(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Jd?Gi++:(Gi=0,Jd=e):Gi=0,Fi(0)}}function R0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ei(t)))}function _o(){return T0(),M0(),O0(),D0()}function D0(){if(Ft!==5)return!1;var e=$l,t=Qd;Qd=0;var a=ca(ul),l=$.T,c=J.p;try{J.p=32>a?32:a,$.T=null,a=Xd,Xd=null;var d=$l,p=ul;if(Ft=0,Ur=$l=null,ul=0,(tt&6)!==0)throw Error(o(331));var T=tt;if(tt|=4,f0(d.current),o0(d,d.current,p,a),tt=T,Fi(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(gt,d)}catch{}return!0}finally{J.p=c,$.T=l,R0(e,t)}}function k0(e,t,a){t=ja(a,t),t=Rd(e.stateNode,t,2),e=Ll(e,t,2),e!==null&&(vl(e,2),zn(e))}function it(e,t,a){if(e.tag===3)k0(e,e,a);else for(;t!==null;){if(t.tag===3){k0(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Bl===null||!Bl.has(l))){e=ja(a,e),a=Am(2),l=Ll(t,a,2),l!==null&&(_m(a,l,t,e),vl(l,2),zn(l));break}}t=t.return}}function tf(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Uv;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(a)||(Id=!0,c.add(a),e=Bv.bind(null,e,t,a),t.then(e,e))}function Bv(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ft===e&&(Ie&a)===a&&(Et===4||Et===3&&(Ie&62914560)===Ie&&300>vt()-Mo?(tt&2)===0&&Hr(e,0):Zd|=a,Lr===Ie&&(Lr=0)),zn(e)}function A0(e,t){t===0&&(t=rs()),e=Wa(e,t),e!==null&&(vl(e,t),zn(e))}function $v(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),A0(e,a)}function Yv(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),A0(e,a)}function Gv(e,t){return Ya(e,t)}var zo=null,Vr=null,af=!1,Lo=!1,nf=!1,Gl=0;function zn(e){e!==Vr&&e.next===null&&(Vr===null?zo=Vr=e:Vr=Vr.next=e),Lo=!0,af||(af=!0,Iv())}function Fi(e,t){if(!nf&&Lo){nf=!0;do for(var a=!1,l=zo;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var d=0;else{var p=l.suspendedLanes,T=l.pingedLanes;d=(1<<31-zt(42|e)+1)-1,d&=c&~(p&~T),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,U0(l,d))}else d=Ie,d=St(l,l===ft?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||ht(l,d)||(a=!0,U0(l,d));l=l.next}while(a);nf=!1}}function Fv(){_0()}function _0(){Lo=af=!1;var e=0;Gl!==0&&ny()&&(e=Gl);for(var t=vt(),a=null,l=zo;l!==null;){var c=l.next,d=z0(l,t);d===0?(l.next=null,a===null?zo=c:a.next=c,c===null&&(Vr=a)):(a=l,(e!==0||(d&3)!==0)&&(Lo=!0)),l=c}Ft!==0&&Ft!==5||Fi(e),Gl!==0&&(Gl=0)}function z0(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var p=31-zt(d),T=1<<p,L=c[p];L===-1?((T&a)===0||(T&l)!==0)&&(c[p]=En(T,t)):L<=t&&(e.expiredLanes|=T),d&=~T}if(t=ft,a=Ie,a=St(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(rt===2||rt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Wt(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ht(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Wt(l),ca(a)){case 2:case 8:a=Js;break;case 32:a=ls;break;case 268435456:a=xl;break;default:a=ls}return l=L0.bind(null,e),a=Ya(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Wt(l),e.callbackPriority=2,e.callbackNode=null,2}function L0(e,t){if(Ft!==0&&Ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_o()&&e.callbackNode!==a)return null;var l=Ie;return l=St(e,e===ft?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(p0(e,l,t),z0(e,vt()),e.callbackNode!=null&&e.callbackNode===a?L0.bind(null,e):null)}function U0(e,t){if(_o())return null;p0(e,t,!0)}function Iv(){sy(function(){(tt&6)!==0?Ya(Bn,Fv):_0()})}function lf(){if(Gl===0){var e=Cr;e===0&&(e=sn,sn<<=1,(sn&261888)===0&&(sn=256)),Gl=e}return Gl}function H0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ms(""+e)}function q0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Zv(e,t,a,l,c){if(t==="submit"&&a&&a.stateNode===c){var d=H0((c[Yt]||null).action),p=l.submitter;p&&(t=(t=p[Yt]||null)?H0(t.formAction):p.getAttribute("formAction"),t!==null&&(d=t,p=null));var T=new vs("action","action",null,l,c);e.push({event:T,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Gl!==0){var L=p?q0(c,p):new FormData(c);Sd(a,{pending:!0,data:L,method:c.method,action:d},null,L)}}else typeof d=="function"&&(T.preventDefault(),L=p?q0(c,p):new FormData(c),Sd(a,{pending:!0,data:L,method:c.method,action:d},d,L))},currentTarget:c}]})}}for(var sf=0;sf<Ni.length;sf++){var rf=Ni[sf],Wv=rf.toLowerCase(),Qv=rf[0].toUpperCase()+rf.slice(1);ba(Wv,"on"+Qv)}ba(Jc,"onAnimationEnd"),ba(Kc,"onAnimationIteration"),ba(vr,"onAnimationStart"),ba("dblclick","onDoubleClick"),ba("focusin","onFocus"),ba("focusout","onBlur"),ba(Ju,"onTransitionRun"),ba(Ku,"onTransitionStart"),ba(eo,"onTransitionCancel"),ba(bi,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),Tn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Tn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Tn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Tn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Tn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Tn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="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(" "),Xv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ii));function V0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],c=l.event;l=l.listeners;e:{var d=void 0;if(t)for(var p=l.length-1;0<=p;p--){var T=l[p],L=T.instance,Q=T.currentTarget;if(T=T.listener,L!==d&&c.isPropagationStopped())break e;d=T,c.currentTarget=Q;try{d(c)}catch(re){Dl(re)}c.currentTarget=null,d=L}else for(p=0;p<l.length;p++){if(T=l[p],L=T.instance,Q=T.currentTarget,T=T.listener,L!==d&&c.isPropagationStopped())break e;d=T,c.currentTarget=Q;try{d(c)}catch(re){Dl(re)}c.currentTarget=null,d=L}}}}function $e(e,t){var a=t[is];a===void 0&&(a=t[is]=new Set);var l=e+"__bubble";a.has(l)||(P0(t,e,2,!1),a.add(l))}function cf(e,t,a){var l=0;t&&(l|=4),P0(a,e,l,t)}var Uo="_reactListening"+Math.random().toString(36).slice(2);function of(e){if(!e[Uo]){e[Uo]=!0,Dc.forEach(function(a){a!=="selectionchange"&&(Xv.has(a)||cf(a,!1,e),cf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uo]||(t[Uo]=!0,cf("selectionchange",!1,t))}}function P0(e,t,a,l){switch(xg(t)){case 2:var c=Cy;break;case 8:c=Ey;break;default:c=Sf}a=c.bind(null,t,a,e),c=void 0,!di||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function uf(e,t,a,l,c){var d=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var p=l.tag;if(p===3||p===4){var T=l.stateNode.containerInfo;if(T===c)break;if(p===4)for(p=l.return;p!==null;){var L=p.tag;if((L===3||L===4)&&p.stateNode.containerInfo===c)return;p=p.return}for(;T!==null;){if(p=Yn(T),p===null)return;if(L=p.tag,L===5||L===6||L===26||L===27){l=d=p;continue e}T=T.parentNode}}l=l.return}ui(function(){var Q=d,re=or(a),ue=[];e:{var X=ji.get(e);if(X!==void 0){var ne=vs,we=e;switch(e){case"keypress":if(ps(a)===0)break e;case"keydown":case"keyup":ne=Uu;break;case"focusin":we="focus",ne=mr;break;case"focusout":we="blur",ne=mr;break;case"beforeblur":case"afterblur":ne=mr;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Uc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Mu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=Vu;break;case Jc:case Kc:case vr:ne=wl;break;case bi:ne=Pu;break;case"scroll":case"scrollend":ne=fi;break;case"wheel":ne=$u;break;case"copy":case"cut":case"paste":ne=Sl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Hc;break;case"toggle":case"beforetoggle":ne=Gu}var _e=(t&4)!==0,dt=!_e&&(e==="scroll"||e==="scrollend"),F=_e?X!==null?X+"Capture":null:X;_e=[];for(var P=Q,W;P!==null;){var ce=P;if(W=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||W===null||F===null||(ce=gs(P,F),ce!=null&&_e.push(Zi(P,ce,W))),dt)break;P=P.return}0<_e.length&&(X=new ne(X,we,null,a,re),ue.push({event:X,listeners:_e}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",X&&a!==ci&&(we=a.relatedTarget||a.fromElement)&&(Yn(we)||we[$n]))break e;if((ne||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,ne?(we=a.relatedTarget||a.toElement,ne=Q,we=we?Yn(we):null,we!==null&&(dt=f(we),_e=we.tag,we!==dt||_e!==5&&_e!==27&&_e!==6)&&(we=null)):(ne=null,we=Q),ne!==we)){if(_e=Uc,ce="onMouseLeave",F="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(_e=Hc,ce="onPointerLeave",F="onPointerEnter",P="pointer"),dt=ne==null?X:va(ne),W=we==null?X:va(we),X=new _e(ce,P+"leave",ne,a,re),X.target=dt,X.relatedTarget=W,ce=null,Yn(re)===Q&&(_e=new _e(F,P+"enter",we,a,re),_e.target=W,_e.relatedTarget=dt,ce=_e),dt=ce,ne&&we)t:{for(_e=Jv,F=ne,P=we,W=0,ce=F;ce;ce=_e(ce))W++;ce=0;for(var De=P;De;De=_e(De))ce++;for(;0<W-ce;)F=_e(F),W--;for(;0<ce-W;)P=_e(P),ce--;for(;W--;){if(F===P||P!==null&&F===P.alternate){_e=F;break t}F=_e(F),P=_e(P)}_e=null}else _e=null;ne!==null&&B0(ue,X,ne,_e,!1),we!==null&&dt!==null&&B0(ue,dt,we,_e,!0)}}e:{if(X=Q?va(Q):window,ne=X.nodeName&&X.nodeName.toLowerCase(),ne==="select"||ne==="input"&&X.type==="file")var Je=Ic;else if(Fc(X))if(Dn)Je=xt;else{Je=Ml;var Ce=Ge}else ne=X.nodeName,!ne||ne.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&cr(Q.elementType)&&(Je=Ic):Je=Qu;if(Je&&(Je=Je(e,Q))){mi(ue,Je,a,re);break e}Ce&&Ce(e,X,Q),e==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&us(X,"number",X.value)}switch(Ce=Q?va(Q):window,e){case"focusin":(Fc(Ce)||Ce.contentEditable==="true")&&(Ol=Ce,xr=Q,aa=null);break;case"focusout":aa=xr=Ol=null;break;case"mousedown":pr=!0;break;case"contextmenu":case"mouseup":case"dragend":pr=!1,Ms(ue,a,re);break;case"selectionchange":if(Qc)break;case"keydown":case"keyup":Ms(ue,a,re)}var Ve;if(hi)e:{switch(e){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else El?Yc(e,a)&&(Ze="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ze="onCompositionStart");Ze&&(Pc&&a.locale!=="ko"&&(El||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&El&&(Ve=Gt()):(On=re,ur="value"in On?On.value:On.textContent,El=!0)),Ce=Ho(Q,Ze),0<Ce.length&&(Ze=new Cl(Ze,e,null,a,re),ue.push({event:Ze,listeners:Ce}),Ve?Ze.data=Ve:(Ve=Gc(a),Ve!==null&&(Ze.data=Ve)))),(Ve=Fu?Iu(e,a):Zu(e,a))&&(Ze=Ho(Q,"onBeforeInput"),0<Ze.length&&(Ce=new Cl("onBeforeInput","beforeinput",null,a,re),ue.push({event:Ce,listeners:Ze}),Ce.data=Ve)),Zv(ue,e,Q,a,re)}V0(ue,t)})}function Zi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ho(e,t){for(var a=t+"Capture",l=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=gs(e,a),c!=null&&l.unshift(Zi(e,c,d)),c=gs(e,t),c!=null&&l.push(Zi(e,c,d))),e.tag===3)return l;e=e.return}return[]}function Jv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function B0(e,t,a,l,c){for(var d=t._reactName,p=[];a!==null&&a!==l;){var T=a,L=T.alternate,Q=T.stateNode;if(T=T.tag,L!==null&&L===l)break;T!==5&&T!==26&&T!==27||Q===null||(L=Q,c?(Q=gs(a,d),Q!=null&&p.unshift(Zi(a,Q,L))):c||(Q=gs(a,d),Q!=null&&p.push(Zi(a,Q,L)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var Kv=/\r\n?/g,ey=/\u0000|\uFFFD/g;function $0(e){return(typeof e=="string"?e:""+e).replace(Kv,`
49
+ `).replace(ey,"")}function Y0(e,t){return t=$0(t),$0(e)===t}function ut(e,t,a,l,c,d){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||un(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&un(e,""+l);break;case"className":sr(e,"class",l);break;case"tabIndex":sr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":sr(e,a,l);break;case"style":_c(e,l,d);break;case"data":if(t!=="object"){sr(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ms(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&ut(e,t,"name",c.name,c,null),ut(e,t,"formEncType",c.formEncType,c,null),ut(e,t,"formMethod",c.formMethod,c,null),ut(e,t,"formTarget",c.formTarget,c,null)):(ut(e,t,"encType",c.encType,c,null),ut(e,t,"method",c.method,c,null),ut(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ms(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Fa);break;case"onScroll":l!=null&&$e("scroll",e);break;case"onScrollEnd":l!=null&&$e("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=ms(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":$e("beforetoggle",e),$e("toggle",e),ea(e,"popover",l);break;case"xlinkActuate":st(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":st(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":st(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":st(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":st(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":st(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":st(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":st(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":st(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ea(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Eu.get(a)||a,ea(e,a,l))}}function df(e,t,a,l,c,d){switch(a){case"style":_c(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof l=="string"?un(e,l):(typeof l=="number"||typeof l=="bigint")&&un(e,""+l);break;case"onScroll":l!=null&&$e("scroll",e);break;case"onScrollEnd":l!=null&&$e("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Fa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!li.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),d=e[Yt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof l=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,c);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ea(e,a,l)}}}function ra(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",e),$e("load",e);var l=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var p=a[d];if(p!=null)switch(d){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ut(e,t,d,p,a,null)}}c&&ut(e,t,"srcSet",a.srcSet,a,null),l&&ut(e,t,"src",a.src,a,null);return;case"input":$e("invalid",e);var T=d=p=c=null,L=null,Q=null;for(l in a)if(a.hasOwnProperty(l)){var re=a[l];if(re!=null)switch(l){case"name":c=re;break;case"type":p=re;break;case"checked":L=re;break;case"defaultChecked":Q=re;break;case"value":d=re;break;case"defaultValue":T=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(o(137,t));break;default:ut(e,t,l,re,a,null)}}jl(e,d,T,L,Q,p,c,!1);return;case"select":$e("invalid",e),l=p=d=null;for(c in a)if(a.hasOwnProperty(c)&&(T=a[c],T!=null))switch(c){case"value":d=T;break;case"defaultValue":p=T;break;case"multiple":l=T;default:ut(e,t,c,T,a,null)}t=d,a=p,e.multiple=!!l,t!=null?Fn(e,!!l,t,!1):a!=null&&Fn(e,!!l,a,!0);return;case"textarea":$e("invalid",e),d=c=l=null;for(p in a)if(a.hasOwnProperty(p)&&(T=a[p],T!=null))switch(p){case"value":l=T;break;case"defaultValue":c=T;break;case"children":d=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(91));break;default:ut(e,t,p,T,a,null)}ii(e,l,c,d);return;case"option":for(L in a)if(a.hasOwnProperty(L)&&(l=a[L],l!=null))switch(L){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:ut(e,t,L,l,a,null)}return;case"dialog":$e("beforetoggle",e),$e("toggle",e),$e("cancel",e),$e("close",e);break;case"iframe":case"object":$e("load",e);break;case"video":case"audio":for(l=0;l<Ii.length;l++)$e(Ii[l],e);break;case"image":$e("error",e),$e("load",e);break;case"details":$e("toggle",e);break;case"embed":case"source":case"link":$e("error",e),$e("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(Q in a)if(a.hasOwnProperty(Q)&&(l=a[Q],l!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ut(e,t,Q,l,a,null)}return;default:if(cr(t)){for(re in a)a.hasOwnProperty(re)&&(l=a[re],l!==void 0&&df(e,t,re,l,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(l=a[T],l!=null&&ut(e,t,T,l,a,null))}function ty(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,p=null,T=null,L=null,Q=null,re=null;for(ne in a){var ue=a[ne];if(a.hasOwnProperty(ne)&&ue!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":L=ue;default:l.hasOwnProperty(ne)||ut(e,t,ne,null,l,ue)}}for(var X in l){var ne=l[X];if(ue=a[X],l.hasOwnProperty(X)&&(ne!=null||ue!=null))switch(X){case"type":d=ne;break;case"name":c=ne;break;case"checked":Q=ne;break;case"defaultChecked":re=ne;break;case"value":p=ne;break;case"defaultValue":T=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(o(137,t));break;default:ne!==ue&&ut(e,t,X,ne,l,ue)}}ir(e,p,T,L,Q,re,d,c);return;case"select":ne=p=T=X=null;for(d in a)if(L=a[d],a.hasOwnProperty(d)&&L!=null)switch(d){case"value":break;case"multiple":ne=L;default:l.hasOwnProperty(d)||ut(e,t,d,null,l,L)}for(c in l)if(d=l[c],L=a[c],l.hasOwnProperty(c)&&(d!=null||L!=null))switch(c){case"value":X=d;break;case"defaultValue":T=d;break;case"multiple":p=d;default:d!==L&&ut(e,t,c,d,l,L)}t=T,a=p,l=ne,X!=null?Fn(e,!!a,X,!1):!!l!=!!a&&(t!=null?Fn(e,!!a,t,!0):Fn(e,!!a,a?[]:"",!1));return;case"textarea":ne=X=null;for(T in a)if(c=a[T],a.hasOwnProperty(T)&&c!=null&&!l.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:ut(e,t,T,null,l,c)}for(p in l)if(c=l[p],d=a[p],l.hasOwnProperty(p)&&(c!=null||d!=null))switch(p){case"value":X=c;break;case"defaultValue":ne=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&ut(e,t,p,c,l,d)}ds(e,X,ne);return;case"option":for(var we in a)if(X=a[we],a.hasOwnProperty(we)&&X!=null&&!l.hasOwnProperty(we))switch(we){case"selected":e.selected=!1;break;default:ut(e,t,we,null,l,X)}for(L in l)if(X=l[L],ne=a[L],l.hasOwnProperty(L)&&X!==ne&&(X!=null||ne!=null))switch(L){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:ut(e,t,L,X,l,ne)}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 _e in a)X=a[_e],a.hasOwnProperty(_e)&&X!=null&&!l.hasOwnProperty(_e)&&ut(e,t,_e,null,l,X);for(Q in l)if(X=l[Q],ne=a[Q],l.hasOwnProperty(Q)&&X!==ne&&(X!=null||ne!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:ut(e,t,Q,X,l,ne)}return;default:if(cr(t)){for(var dt in a)X=a[dt],a.hasOwnProperty(dt)&&X!==void 0&&!l.hasOwnProperty(dt)&&df(e,t,dt,void 0,l,X);for(re in l)X=l[re],ne=a[re],!l.hasOwnProperty(re)||X===ne||X===void 0&&ne===void 0||df(e,t,re,X,l,ne);return}}for(var F in a)X=a[F],a.hasOwnProperty(F)&&X!=null&&!l.hasOwnProperty(F)&&ut(e,t,F,null,l,X);for(ue in l)X=l[ue],ne=a[ue],!l.hasOwnProperty(ue)||X===ne||X==null&&ne==null||ut(e,t,ue,X,l,ne)}function G0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ay(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var c=a[l],d=c.transferSize,p=c.initiatorType,T=c.duration;if(d&&T&&G0(p)){for(p=0,T=c.responseEnd,l+=1;l<a.length;l++){var L=a[l],Q=L.startTime;if(Q>T)break;var re=L.transferSize,ue=L.initiatorType;re&&G0(ue)&&(L=L.responseEnd,p+=re*(L<T?1:(T-Q)/(L-Q)))}if(--l,t+=8*(d+p)/(c.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 ff=null,hf=null;function qo(e){return e.nodeType===9?e:e.ownerDocument}function F0(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 I0(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 mf(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 gf=null;function ny(){var e=window.event;return e&&e.type==="popstate"?e===gf?!1:(gf=e,!0):(gf=null,!1)}var Z0=typeof setTimeout=="function"?setTimeout:void 0,ly=typeof clearTimeout=="function"?clearTimeout:void 0,W0=typeof Promise=="function"?Promise:void 0,sy=typeof queueMicrotask=="function"?queueMicrotask:typeof W0<"u"?function(e){return W0.resolve(null).then(e).catch(ry)}:Z0;function ry(e){setTimeout(function(){throw e})}function Fl(e){return e==="head"}function Q0(e,t){var a=t,l=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(c),Yr(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Wi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Wi(a);for(var d=a.firstChild;d;){var p=d.nextSibling,T=d.nodeName;d[cs]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=p}}else a==="body"&&Wi(e.ownerDocument.body);a=c}while(a);Yr(t)}function X0(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function xf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":xf(a),lr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function iy(e,t,a,l){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[cs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=an(e.nextSibling),e===null)break}return null}function cy(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=an(e.nextSibling),e===null))return null;return e}function J0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=an(e.nextSibling),e===null))return null;return e}function pf(e){return e.data==="$?"||e.data==="$~"}function vf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function oy(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function an(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 yf=null;function K0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return an(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function eg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function tg(e,t,a){switch(t=qo(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Wi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lr(e)}var nn=new Map,ag=new Set;function Vo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var dl=J.d;J.d={f:uy,r:dy,D:fy,C:hy,L:my,m:gy,X:py,S:xy,M:vy};function uy(){var e=dl.f(),t=Do();return e||t}function dy(e){var t=ke(e);t!==null&&t.tag===5&&t.type==="form"?ym(t):dl.r(e)}var Pr=typeof document>"u"?null:document;function ng(e,t,a){var l=Pr;if(l&&typeof t=="string"&&t){var c=ta(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),ag.has(c)||(ag.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),ra(t,"link",e),Lt(t),l.head.appendChild(t)))}}function fy(e){dl.D(e),ng("dns-prefetch",e,null)}function hy(e,t){dl.C(e,t),ng("preconnect",e,t)}function my(e,t,a){dl.L(e,t,a);var l=Pr;if(l&&e&&t){var c='link[rel="preload"][as="'+ta(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+ta(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+ta(a.imageSizes)+'"]')):c+='[href="'+ta(e)+'"]';var d=c;switch(t){case"style":d=Br(e);break;case"script":d=$r(e)}nn.has(d)||(e=M({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),nn.set(d,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Qi(d))||t==="script"&&l.querySelector(Xi(d))||(t=l.createElement("link"),ra(t,"link",e),Lt(t),l.head.appendChild(t)))}}function gy(e,t){dl.m(e,t);var a=Pr;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+ta(l)+'"][href="'+ta(e)+'"]',d=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=$r(e)}if(!nn.has(d)&&(e=M({rel:"modulepreload",href:e},t),nn.set(d,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Xi(d)))return}l=a.createElement("link"),ra(l,"link",e),Lt(l),a.head.appendChild(l)}}}function xy(e,t,a){dl.S(e,t,a);var l=Pr;if(l&&e){var c=cn(l).hoistableStyles,d=Br(e);t=t||"default";var p=c.get(d);if(!p){var T={loading:0,preload:null};if(p=l.querySelector(Qi(d)))T.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},a),(a=nn.get(d))&&bf(e,a);var L=p=l.createElement("link");Lt(L),ra(L,"link",e),L._p=new Promise(function(Q,re){L.onload=Q,L.onerror=re}),L.addEventListener("load",function(){T.loading|=1}),L.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Po(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:T},c.set(d,p)}}}function py(e,t){dl.X(e,t);var a=Pr;if(a&&e){var l=cn(a).hoistableScripts,c=$r(e),d=l.get(c);d||(d=a.querySelector(Xi(c)),d||(e=M({src:e,async:!0},t),(t=nn.get(c))&&jf(e,t),d=a.createElement("script"),Lt(d),ra(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function vy(e,t){dl.M(e,t);var a=Pr;if(a&&e){var l=cn(a).hoistableScripts,c=$r(e),d=l.get(c);d||(d=a.querySelector(Xi(c)),d||(e=M({src:e,async:!0,type:"module"},t),(t=nn.get(c))&&jf(e,t),d=a.createElement("script"),Lt(d),ra(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function lg(e,t,a,l){var c=(c=xe.current)?Vo(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Br(a.href),a=cn(c).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Br(a.href);var d=cn(c).hoistableStyles,p=d.get(e);if(p||(c=c.ownerDocument||c,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,p),(d=c.querySelector(Qi(e)))&&!d._p&&(p.instance=d,p.state.loading=5),nn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},nn.set(e,a),d||yy(c,e,a,p.state))),t&&l===null)throw Error(o(528,""));return p}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=$r(a),a=cn(c).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Br(e){return'href="'+ta(e)+'"'}function Qi(e){return'link[rel="stylesheet"]['+e+"]"}function sg(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function yy(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),ra(t,"link",a),Lt(t),e.head.appendChild(t))}function $r(e){return'[src="'+ta(e)+'"]'}function Xi(e){return"script[async]"+e}function rg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+ta(a.href)+'"]');if(l)return t.instance=l,Lt(l),l;var c=M({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Lt(l),ra(l,"style",c),Po(l,a.precedence,e),t.instance=l;case"stylesheet":c=Br(a.href);var d=e.querySelector(Qi(c));if(d)return t.state.loading|=4,t.instance=d,Lt(d),d;l=sg(a),(c=nn.get(c))&&bf(l,c),d=(e.ownerDocument||e).createElement("link"),Lt(d);var p=d;return p._p=new Promise(function(T,L){p.onload=T,p.onerror=L}),ra(d,"link",l),t.state.loading|=4,Po(d,a.precedence,e),t.instance=d;case"script":return d=$r(a.src),(c=e.querySelector(Xi(d)))?(t.instance=c,Lt(c),c):(l=a,(c=nn.get(d))&&(l=M({},a),jf(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Lt(c),ra(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Po(l,a.precedence,e));return t.instance}function Po(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,d=c,p=0;p<l.length;p++){var T=l[p];if(T.dataset.precedence===t)d=T;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function bf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function jf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Bo=null;function ig(e,t,a){if(Bo===null){var l=new Map,c=Bo=new Map;c.set(a,l)}else c=Bo,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[cs]||d[Mt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var p=d.getAttribute(t)||"";p=e+p;var T=l.get(p);T?T.push(d):l.set(p,[d])}}return l}function cg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function by(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function og(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function jy(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Br(l.href),d=t.querySelector(Qi(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=$o.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,Lt(d);return}d=t.ownerDocument||t,l=sg(l),(c=nn.get(c))&&bf(l,c),d=d.createElement("link"),Lt(d);var p=d;p._p=new Promise(function(T,L){p.onload=T,p.onerror=L}),ra(d,"link",l),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=$o.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Nf=0;function Ny(e,t){return e.stylesheets&&e.count===0&&Go(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Go(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Nf===0&&(Nf=62500*ay());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Go(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Nf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function $o(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Go(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yo=null;function Go(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yo=new Map,t.forEach(wy,e),Yo=null,$o.call(e))}function wy(e,t){if(!(t.state.loading&4)){var a=Yo.get(e);if(a)var l=a.get(null);else{a=new Map,Yo.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var p=c[d];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),l=p)}l&&a.set(null,l)}c=t.instance,p=c.getAttribute("data-precedence"),d=a.get(p)||l,d===l&&a.set(null,c),a.set(p,c),this.count++,l=$o.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Ji={$$typeof:K,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function Sy(e,t,a,l,c,d,p,T,L){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=tr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tr(0),this.hiddenUpdates=tr(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function ug(e,t,a,l,c,d,p,T,L,Q,re,ue){return e=new Sy(e,t,a,p,L,Q,re,ue,T),t=1,d===!0&&(t|=24),d=na(3,null,null,t),e.current=d,d.stateNode=e,t=ed(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:a,cache:t},ld(d),e}function dg(e){return e?(e=Da,e):Da}function fg(e,t,a,l,c,d){c=dg(c),l.context===null?l.context=c:l.pendingContext=c,l=zl(t),l.payload={element:a},d=d===void 0?null:d,d!==null&&(l.callback=d),a=Ll(e,l,t),a!==null&&(Ta(a,e,t),Ri(a,e,t))}function hg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function wf(e,t){hg(e,t),(e=e.alternate)&&hg(e,t)}function mg(e){if(e.tag===13||e.tag===31){var t=Wa(e,67108864);t!==null&&Ta(t,e,67108864),wf(e,67108864)}}function gg(e){if(e.tag===13||e.tag===31){var t=La();t=ar(t);var a=Wa(e,t);a!==null&&Ta(a,e,t),wf(e,t)}}var Fo=!0;function Cy(e,t,a,l){var c=$.T;$.T=null;var d=J.p;try{J.p=2,Sf(e,t,a,l)}finally{J.p=d,$.T=c}}function Ey(e,t,a,l){var c=$.T;$.T=null;var d=J.p;try{J.p=8,Sf(e,t,a,l)}finally{J.p=d,$.T=c}}function Sf(e,t,a,l){if(Fo){var c=Cf(l);if(c===null)uf(e,t,l,Io,a),pg(e,l);else if(My(c,e,t,a,l))l.stopPropagation();else if(pg(e,l),t&4&&-1<Ty.indexOf(e)){for(;c!==null;){var d=ke(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var p=Pe(d.pendingLanes);if(p!==0){var T=d;for(T.pendingLanes|=2,T.entangledLanes|=2;p;){var L=1<<31-zt(p);T.entanglements[1]|=L,p&=~L}zn(d),(tt&6)===0&&(Oo=vt()+500,Fi(0))}}break;case 31:case 13:T=Wa(d,2),T!==null&&Ta(T,d,2),Do(),wf(d,2)}if(d=Cf(l),d===null&&uf(e,t,l,Io,a),d===c)break;c=d}c!==null&&l.stopPropagation()}else uf(e,t,l,null,a)}}function Cf(e){return e=or(e),Ef(e)}var Io=null;function Ef(e){if(Io=null,e=Yn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=j(t),e!==null)return e;e=null}else if(a===31){if(e=b(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Io=e,null}function xg(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(Kt()){case Bn:return 2;case Js:return 8;case ls:case ti:return 32;case xl:return 268435456;default:return 32}default:return 32}}var Tf=!1,Il=null,Zl=null,Wl=null,Ki=new Map,ec=new Map,Ql=[],Ty="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 pg(e,t){switch(e){case"focusin":case"focusout":Il=null;break;case"dragenter":case"dragleave":Zl=null;break;case"mouseover":case"mouseout":Wl=null;break;case"pointerover":case"pointerout":Ki.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ec.delete(t.pointerId)}}function tc(e,t,a,l,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:d,targetContainers:[c]},t!==null&&(t=ke(t),t!==null&&mg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function My(e,t,a,l,c){switch(t){case"focusin":return Il=tc(Il,e,t,a,l,c),!0;case"dragenter":return Zl=tc(Zl,e,t,a,l,c),!0;case"mouseover":return Wl=tc(Wl,e,t,a,l,c),!0;case"pointerover":var d=c.pointerId;return Ki.set(d,tc(Ki.get(d)||null,e,t,a,l,c)),!0;case"gotpointercapture":return d=c.pointerId,ec.set(d,tc(ec.get(d)||null,e,t,a,l,c)),!0}return!1}function vg(e){var t=Yn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=j(a),t!==null){e.blockedOn=t,ni(e.priority,function(){gg(a)});return}}else if(t===31){if(t=b(a),t!==null){e.blockedOn=t,ni(e.priority,function(){gg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Cf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);ci=l,a.target.dispatchEvent(l),ci=null}else return t=ke(a),t!==null&&mg(t),e.blockedOn=a,!1;t.shift()}return!0}function yg(e,t,a){Zo(e)&&a.delete(t)}function Oy(){Tf=!1,Il!==null&&Zo(Il)&&(Il=null),Zl!==null&&Zo(Zl)&&(Zl=null),Wl!==null&&Zo(Wl)&&(Wl=null),Ki.forEach(yg),ec.forEach(yg)}function Wo(e,t){e.blockedOn===t&&(e.blockedOn=null,Tf||(Tf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Oy)))}var Qo=null;function bg(e){Qo!==e&&(Qo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Qo===e&&(Qo=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(Ef(l||a)===null)continue;break}var d=ke(a);d!==null&&(e.splice(t,3),t-=3,Sd(d,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Yr(e){function t(L){return Wo(L,e)}Il!==null&&Wo(Il,e),Zl!==null&&Wo(Zl,e),Wl!==null&&Wo(Wl,e),Ki.forEach(t),ec.forEach(t);for(var a=0;a<Ql.length;a++){var l=Ql[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ql.length&&(a=Ql[0],a.blockedOn===null);)vg(a),a.blockedOn===null&&Ql.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],d=a[l+1],p=c[Yt]||null;if(typeof d=="function")p||bg(a);else if(p){var T=null;if(d&&d.hasAttribute("formAction")){if(c=d,p=d[Yt]||null)T=p.formAction;else if(Ef(c)!==null)continue}else T=p.action;typeof T=="function"?a[l+1]=T:(a.splice(l,3),l-=3),bg(a)}}}function jg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(p){return c=p})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Mf(e){this._internalRoot=e}Xo.prototype.render=Mf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,l=La();fg(a,l,e,t,null,null)},Xo.prototype.unmount=Mf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fg(e.current,2,null,e,null,null),Do(),t[$n]=null}};function Xo(e){this._internalRoot=e}Xo.prototype.unstable_scheduleHydration=function(e){if(e){var t=nr();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ql.length&&t!==0&&t<Ql[a].priority;a++);Ql.splice(a,0,e),a===0&&vg(e)}};var Ng=r.version;if(Ng!=="19.2.4")throw Error(o(527,Ng,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?C(e):null,e=e===null?null:e.stateNode,e};var Ry={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jo.isDisabled&&Jo.supportsFiber)try{gt=Jo.inject(Ry),$t=Jo}catch{}}return nc.createRoot=function(e,t){if(!h(e))throw Error(o(299));var a=!1,l="",c=Om,d=Rm,p=Dm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=ug(e,1,!1,null,null,a,l,null,c,d,p,jg),e[$n]=t.current,of(e),new Mf(t)},nc.hydrateRoot=function(e,t,a){if(!h(e))throw Error(o(299));var l=!1,c="",d=Om,p=Rm,T=Dm,L=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&(L=a.formState)),t=ug(e,1,!0,t,a??null,l,c,L,d,p,T,jg),t.context=dg(null),a=t.current,l=La(),l=ar(l),c=zl(l),c.callback=null,Ll(a,c,l),a=l,t.current.lanes=a,vl(t,a),zn(t),e[$n]=t.current,of(e),new Xo(t)},nc.version="19.2.4",nc}var _g;function By(){if(_g)return kf.exports;_g=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),kf.exports=Py(),kf.exports}var $y=By();const Yy=sh($y);/**
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 zg="popstate";function Gy(n={}){function r(h,f){let{pathname:j="/",search:b="",hash:y=""}=Ws(h.location.hash.substring(1));return!j.startsWith("/")&&!j.startsWith(".")&&(j="/"+j),If("",{pathname:j,search:b,hash:y},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function u(h,f){let j=h.document.querySelector("base"),b="";if(j&&j.getAttribute("href")){let y=h.location.href,x=y.indexOf("#");b=x===-1?y:y.slice(0,x)}return b+"#"+(typeof f=="string"?f:vc(f))}function o(h,f){ln(h.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return Iy(r,u,o,n)}function bt(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function ln(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Fy(){return Math.random().toString(36).substring(2,10)}function Lg(n,r){return{usr:n.state,key:n.key,idx:r}}function If(n,r,u=null,o){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Ws(r):r,state:u,key:r&&r.key||o||Fy()}}function vc({pathname:n="/",search:r="",hash:u=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),u&&u!=="#"&&(n+=u.charAt(0)==="#"?u:"#"+u),n}function Ws(n){let r={};if(n){let u=n.indexOf("#");u>=0&&(r.hash=n.substring(u),n=n.substring(0,u));let o=n.indexOf("?");o>=0&&(r.search=n.substring(o),n=n.substring(0,o)),n&&(r.pathname=n)}return r}function Iy(n,r,u,o={}){let{window:h=document.defaultView,v5Compat:f=!1}=o,j=h.history,b="POP",y=null,x=C();x==null&&(x=0,j.replaceState({...j.state,idx:x},""));function C(){return(j.state||{idx:null}).idx}function M(){b="POP";let k=C(),Z=k==null?null:k-x;x=k,y&&y({action:b,location:O.location,delta:Z})}function D(k,Z){b="PUSH";let B=If(O.location,k,Z);u&&u(B,k),x=C()+1;let K=Lg(B,x),R=O.createHref(B);try{j.pushState(K,"",R)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;h.location.assign(R)}f&&y&&y({action:b,location:O.location,delta:1})}function A(k,Z){b="REPLACE";let B=If(O.location,k,Z);u&&u(B,k),x=C();let K=Lg(B,x),R=O.createHref(B);j.replaceState(K,"",R),f&&y&&y({action:b,location:O.location,delta:0})}function N(k){return Zy(k)}let O={get action(){return b},get location(){return n(h,j)},listen(k){if(y)throw new Error("A history only accepts one active listener");return h.addEventListener(zg,M),y=k,()=>{h.removeEventListener(zg,M),y=null}},createHref(k){return r(h,k)},createURL:N,encodeLocation(k){let Z=N(k);return{pathname:Z.pathname,search:Z.search,hash:Z.hash}},push:D,replace:A,go(k){return j.go(k)}};return O}function Zy(n,r=!1){let u="http://localhost";typeof window<"u"&&(u=window.location.origin!=="null"?window.location.origin:window.location.href),bt(u,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:vc(n);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=u+o),new URL(o,u)}function Qx(n,r,u="/"){return Wy(n,r,u,!1)}function Wy(n,r,u,o){let h=typeof r=="string"?Ws(r):r,f=gl(h.pathname||"/",u);if(f==null)return null;let j=Xx(n);Qy(j);let b=null;for(let y=0;b==null&&y<j.length;++y){let x=ib(f);b=sb(j[y],x,o)}return b}function Xx(n,r=[],u=[],o="",h=!1){let f=(j,b,y=h,x)=>{let C={relativePath:x===void 0?j.path||"":x,caseSensitive:j.caseSensitive===!0,childrenIndex:b,route:j};if(C.relativePath.startsWith("/")){if(!C.relativePath.startsWith(o)&&y)return;bt(C.relativePath.startsWith(o),`Absolute route path "${C.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),C.relativePath=C.relativePath.slice(o.length)}let M=ml([o,C.relativePath]),D=u.concat(C);j.children&&j.children.length>0&&(bt(j.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${M}".`),Xx(j.children,r,D,M,y)),!(j.path==null&&!j.index)&&r.push({path:M,score:nb(M,j.index),routesMeta:D})};return n.forEach((j,b)=>{var y;if(j.path===""||!((y=j.path)!=null&&y.includes("?")))f(j,b);else for(let x of Jx(j.path))f(j,b,!0,x)}),r}function Jx(n){let r=n.split("/");if(r.length===0)return[];let[u,...o]=r,h=u.endsWith("?"),f=u.replace(/\?$/,"");if(o.length===0)return h?[f,""]:[f];let j=Jx(o.join("/")),b=[];return b.push(...j.map(y=>y===""?f:[f,y].join("/"))),h&&b.push(...j),b.map(y=>n.startsWith("/")&&y===""?"/":y)}function Qy(n){n.sort((r,u)=>r.score!==u.score?u.score-r.score:lb(r.routesMeta.map(o=>o.childrenIndex),u.routesMeta.map(o=>o.childrenIndex)))}var Xy=/^:[\w-]+$/,Jy=3,Ky=2,eb=1,tb=10,ab=-2,Ug=n=>n==="*";function nb(n,r){let u=n.split("/"),o=u.length;return u.some(Ug)&&(o+=ab),r&&(o+=Ky),u.filter(h=>!Ug(h)).reduce((h,f)=>h+(Xy.test(f)?Jy:f===""?eb:tb),o)}function lb(n,r){return n.length===r.length&&n.slice(0,-1).every((o,h)=>o===r[h])?n[n.length-1]-r[r.length-1]:0}function sb(n,r,u=!1){let{routesMeta:o}=n,h={},f="/",j=[];for(let b=0;b<o.length;++b){let y=o[b],x=b===o.length-1,C=f==="/"?r:r.slice(f.length)||"/",M=du({path:y.relativePath,caseSensitive:y.caseSensitive,end:x},C),D=y.route;if(!M&&x&&u&&!o[o.length-1].route.index&&(M=du({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},C)),!M)return null;Object.assign(h,M.params),j.push({params:h,pathname:ml([f,M.pathname]),pathnameBase:db(ml([f,M.pathnameBase])),route:D}),M.pathnameBase!=="/"&&(f=ml([f,M.pathnameBase]))}return j}function du(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[u,o]=rb(n.path,n.caseSensitive,n.end),h=r.match(u);if(!h)return null;let f=h[0],j=f.replace(/(.)\/+$/,"$1"),b=h.slice(1);return{params:o.reduce((x,{paramName:C,isOptional:M},D)=>{if(C==="*"){let N=b[D]||"";j=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const A=b[D];return M&&!A?x[C]=void 0:x[C]=(A||"").replace(/%2F/g,"/"),x},{}),pathname:f,pathnameBase:j,pattern:n}}function rb(n,r=!1,u=!0){ln(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],h="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(j,b,y)=>(o.push({paramName:b,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),h+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?h+="\\/*$":n!==""&&n!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,r?void 0:"i"),o]}function ib(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return ln(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function gl(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let u=r.endsWith("/")?r.length-1:r.length,o=n.charAt(u);return o&&o!=="/"?null:n.slice(u)||"/"}var cb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ob(n,r="/"){let{pathname:u,search:o="",hash:h=""}=typeof n=="string"?Ws(n):n,f;return u?(u=u.replace(/\/\/+/g,"/"),u.startsWith("/")?f=Hg(u.substring(1),"/"):f=Hg(u,r)):f=r,{pathname:f,search:fb(o),hash:hb(h)}}function Hg(n,r){let u=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(h=>{h===".."?u.length>1&&u.pop():h!=="."&&u.push(h)}),u.length>1?u.join("/"):"/"}function Lf(n,r,u,o){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${u}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ub(n){return n.filter((r,u)=>u===0||r.route.path&&r.route.path.length>0)}function ih(n){let r=ub(n);return r.map((u,o)=>o===r.length-1?u.pathname:u.pathnameBase)}function ch(n,r,u,o=!1){let h;typeof n=="string"?h=Ws(n):(h={...n},bt(!h.pathname||!h.pathname.includes("?"),Lf("?","pathname","search",h)),bt(!h.pathname||!h.pathname.includes("#"),Lf("#","pathname","hash",h)),bt(!h.search||!h.search.includes("#"),Lf("#","search","hash",h)));let f=n===""||h.pathname==="",j=f?"/":h.pathname,b;if(j==null)b=u;else{let M=r.length-1;if(!o&&j.startsWith("..")){let D=j.split("/");for(;D[0]==="..";)D.shift(),M-=1;h.pathname=D.join("/")}b=M>=0?r[M]:"/"}let y=ob(h,b),x=j&&j!=="/"&&j.endsWith("/"),C=(f||j===".")&&u.endsWith("/");return!y.pathname.endsWith("/")&&(x||C)&&(y.pathname+="/"),y}var ml=n=>n.join("/").replace(/\/\/+/g,"/"),db=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),fb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,hb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,mb=class{constructor(n,r,u,o=!1){this.status=n,this.statusText=r||"",this.internal=o,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function gb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function xb(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Kx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ep(n,r){let u=n;if(typeof u!="string"||!cb.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let o=u,h=!1;if(Kx)try{let f=new URL(window.location.href),j=u.startsWith("//")?new URL(f.protocol+u):new URL(u),b=gl(j.pathname,r);j.origin===f.origin&&b!=null?u=b+j.search+j.hash:h=!0}catch{ln(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:h,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var tp=["POST","PUT","PATCH","DELETE"];new Set(tp);var pb=["GET",...tp];new Set(pb);var Xr=z.createContext(null);Xr.displayName="DataRouter";var vu=z.createContext(null);vu.displayName="DataRouterState";var vb=z.createContext(!1),ap=z.createContext({isTransitioning:!1});ap.displayName="ViewTransition";var yb=z.createContext(new Map);yb.displayName="Fetchers";var bb=z.createContext(null);bb.displayName="Await";var Pa=z.createContext(null);Pa.displayName="Navigation";var Sc=z.createContext(null);Sc.displayName="Location";var Pn=z.createContext({outlet:null,matches:[],isDataRoute:!1});Pn.displayName="Route";var oh=z.createContext(null);oh.displayName="RouteError";var np="REACT_ROUTER_ERROR",jb="REDIRECT",Nb="ROUTE_ERROR_RESPONSE";function wb(n){if(n.startsWith(`${np}:${jb}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Sb(n){if(n.startsWith(`${np}:${Nb}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new mb(r.status,r.statusText,r.data)}catch{}}function Cb(n,{relative:r}={}){bt(Jr(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:o}=z.useContext(Pa),{hash:h,pathname:f,search:j}=Cc(n,{relative:r}),b=f;return u!=="/"&&(b=f==="/"?u:ml([u,f])),o.createHref({pathname:b,search:j,hash:h})}function Jr(){return z.useContext(Sc)!=null}function Nn(){return bt(Jr(),"useLocation() may be used only in the context of a <Router> component."),z.useContext(Sc).location}var lp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function sp(n){z.useContext(Pa).static||z.useLayoutEffect(n)}function yu(){let{isDataRoute:n}=z.useContext(Pn);return n?Hb():Eb()}function Eb(){bt(Jr(),"useNavigate() may be used only in the context of a <Router> component.");let n=z.useContext(Xr),{basename:r,navigator:u}=z.useContext(Pa),{matches:o}=z.useContext(Pn),{pathname:h}=Nn(),f=JSON.stringify(ih(o)),j=z.useRef(!1);return sp(()=>{j.current=!0}),z.useCallback((y,x={})=>{if(ln(j.current,lp),!j.current)return;if(typeof y=="number"){u.go(y);return}let C=ch(y,JSON.parse(f),h,x.relative==="path");n==null&&r!=="/"&&(C.pathname=C.pathname==="/"?r:ml([r,C.pathname])),(x.replace?u.replace:u.push)(C,x.state,x)},[r,u,f,h,n])}z.createContext(null);function Cc(n,{relative:r}={}){let{matches:u}=z.useContext(Pn),{pathname:o}=Nn(),h=JSON.stringify(ih(u));return z.useMemo(()=>ch(n,JSON.parse(h),o,r==="path"),[n,h,o,r])}function Tb(n,r){return rp(n,r)}function rp(n,r,u,o,h){var B;bt(Jr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=z.useContext(Pa),{matches:j}=z.useContext(Pn),b=j[j.length-1],y=b?b.params:{},x=b?b.pathname:"/",C=b?b.pathnameBase:"/",M=b&&b.route;{let K=M&&M.path||"";cp(x,!M||K.endsWith("*")||K.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${K}">) 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="${K}"> to <Route path="${K==="/"?"*":`${K}/*`}">.`)}let D=Nn(),A;if(r){let K=typeof r=="string"?Ws(r):r;bt(C==="/"||((B=K.pathname)==null?void 0:B.startsWith(C)),`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 "${C}" but pathname "${K.pathname}" was given in the \`location\` prop.`),A=K}else A=D;let N=A.pathname||"/",O=N;if(C!=="/"){let K=C.replace(/^\//,"").split("/");O="/"+N.replace(/^\//,"").split("/").slice(K.length).join("/")}let k=Qx(n,{pathname:O});ln(M||k!=null,`No routes matched location "${A.pathname}${A.search}${A.hash}" `),ln(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 "${A.pathname}${A.search}${A.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 Z=kb(k&&k.map(K=>Object.assign({},K,{params:Object.assign({},y,K.params),pathname:ml([C,f.encodeLocation?f.encodeLocation(K.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:K.pathname]),pathnameBase:K.pathnameBase==="/"?C:ml([C,f.encodeLocation?f.encodeLocation(K.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:K.pathnameBase])})),j,u,o,h);return r&&Z?z.createElement(Sc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...A},navigationType:"POP"}},Z):Z}function Mb(){let n=Ub(),r=gb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),u=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},j=null;return console.error("Error handled by React Router default ErrorBoundary:",n),j=z.createElement(z.Fragment,null,z.createElement("p",null,"💿 Hey developer 👋"),z.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",z.createElement("code",{style:f},"ErrorBoundary")," or"," ",z.createElement("code",{style:f},"errorElement")," prop on your route.")),z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},r),u?z.createElement("pre",{style:h},u):null,j)}var Ob=z.createElement(Mb,null),ip=class extends z.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const u=Sb(n.digest);u&&(n=u)}let r=n!==void 0?z.createElement(Pn.Provider,{value:this.props.routeContext},z.createElement(oh.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?z.createElement(Rb,{error:n},r):r}};ip.contextType=vb;var Uf=new WeakMap;function Rb({children:n,error:r}){let{basename:u}=z.useContext(Pa);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=wb(r.digest);if(o){let h=Uf.get(r);if(h)throw h;let f=ep(o.location,u);if(Kx&&!Uf.get(r))if(f.isExternal||o.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const j=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:o.replace}));throw Uf.set(r,j),j}return z.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function Db({routeContext:n,match:r,children:u}){let o=z.useContext(Xr);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),z.createElement(Pn.Provider,{value:n},u)}function kb(n,r=[],u=null,o=null,h=null){if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(r.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let f=n,j=u==null?void 0:u.errors;if(j!=null){let C=f.findIndex(M=>M.route.id&&(j==null?void 0:j[M.route.id])!==void 0);bt(C>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(j).join(",")}`),f=f.slice(0,Math.min(f.length,C+1))}let b=!1,y=-1;if(u)for(let C=0;C<f.length;C++){let M=f[C];if((M.route.HydrateFallback||M.route.hydrateFallbackElement)&&(y=C),M.route.id){let{loaderData:D,errors:A}=u,N=M.route.loader&&!D.hasOwnProperty(M.route.id)&&(!A||A[M.route.id]===void 0);if(M.route.lazy||N){b=!0,y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}let x=u&&o?(C,M)=>{var D,A;o(C,{location:u.location,params:((A=(D=u.matches)==null?void 0:D[0])==null?void 0:A.params)??{},unstable_pattern:xb(u.matches),errorInfo:M})}:void 0;return f.reduceRight((C,M,D)=>{let A,N=!1,O=null,k=null;u&&(A=j&&M.route.id?j[M.route.id]:void 0,O=M.route.errorElement||Ob,b&&(y<0&&D===0?(cp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,k=null):y===D&&(N=!0,k=M.route.hydrateFallbackElement||null)));let Z=r.concat(f.slice(0,D+1)),B=()=>{let K;return A?K=O:N?K=k:M.route.Component?K=z.createElement(M.route.Component,null):M.route.element?K=M.route.element:K=C,z.createElement(Db,{match:M,routeContext:{outlet:C,matches:Z,isDataRoute:u!=null},children:K})};return u&&(M.route.ErrorBoundary||M.route.errorElement||D===0)?z.createElement(ip,{location:u.location,revalidation:u.revalidation,component:O,error:A,children:B(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:x}):B()},null)}function uh(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ab(n){let r=z.useContext(Xr);return bt(r,uh(n)),r}function _b(n){let r=z.useContext(vu);return bt(r,uh(n)),r}function zb(n){let r=z.useContext(Pn);return bt(r,uh(n)),r}function dh(n){let r=zb(n),u=r.matches[r.matches.length-1];return bt(u.route.id,`${n} can only be used on routes that contain a unique "id"`),u.route.id}function Lb(){return dh("useRouteId")}function Ub(){var o;let n=z.useContext(oh),r=_b("useRouteError"),u=dh("useRouteError");return n!==void 0?n:(o=r.errors)==null?void 0:o[u]}function Hb(){let{router:n}=Ab("useNavigate"),r=dh("useNavigate"),u=z.useRef(!1);return sp(()=>{u.current=!0}),z.useCallback(async(h,f={})=>{ln(u.current,lp),u.current&&(typeof h=="number"?await n.navigate(h):await n.navigate(h,{fromRouteId:r,...f}))},[n,r])}var qg={};function cp(n,r,u){!r&&!qg[n]&&(qg[n]=!0,ln(!1,u))}z.memo(qb);function qb({routes:n,future:r,state:u,onError:o}){return rp(n,void 0,u,o,r)}function Vb({to:n,replace:r,state:u,relative:o}){bt(Jr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=z.useContext(Pa);ln(!h,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=z.useContext(Pn),{pathname:j}=Nn(),b=yu(),y=ch(n,ih(f),j,o==="path"),x=JSON.stringify(y);return z.useEffect(()=>{b(JSON.parse(x),{replace:r,state:u,relative:o})},[b,x,o,r,u]),null}function qn(n){bt(!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 Pb({basename:n="/",children:r=null,location:u,navigationType:o="POP",navigator:h,static:f=!1,unstable_useTransitions:j}){bt(!Jr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=n.replace(/^\/*/,"/"),y=z.useMemo(()=>({basename:b,navigator:h,static:f,unstable_useTransitions:j,future:{}}),[b,h,f,j]);typeof u=="string"&&(u=Ws(u));let{pathname:x="/",search:C="",hash:M="",state:D=null,key:A="default"}=u,N=z.useMemo(()=>{let O=gl(x,b);return O==null?null:{location:{pathname:O,search:C,hash:M,state:D,key:A},navigationType:o}},[b,x,C,M,D,A,o]);return ln(N!=null,`<Router basename="${b}"> is not able to match the URL "${x}${C}${M}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:z.createElement(Pa.Provider,{value:y},z.createElement(Sc.Provider,{children:r,value:N}))}function Bb({children:n,location:r}){return Tb(Zf(n),r)}function Zf(n,r=[]){let u=[];return z.Children.forEach(n,(o,h)=>{if(!z.isValidElement(o))return;let f=[...r,h];if(o.type===z.Fragment){u.push.apply(u,Zf(o.props.children,f));return}bt(o.type===qn,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),bt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let j={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(j.children=Zf(o.props.children,f)),u.push(j)}),u}var cu="get",ou="application/x-www-form-urlencoded";function bu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function $b(n){return bu(n)&&n.tagName.toLowerCase()==="button"}function Yb(n){return bu(n)&&n.tagName.toLowerCase()==="form"}function Gb(n){return bu(n)&&n.tagName.toLowerCase()==="input"}function Fb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Ib(n,r){return n.button===0&&(!r||r==="_self")&&!Fb(n)}var Ko=null;function Zb(){if(Ko===null)try{new FormData(document.createElement("form"),0),Ko=!1}catch{Ko=!0}return Ko}var Wb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Hf(n){return n!=null&&!Wb.has(n)?(ln(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ou}"`),null):n}function Qb(n,r){let u,o,h,f,j;if(Yb(n)){let b=n.getAttribute("action");o=b?gl(b,r):null,u=n.getAttribute("method")||cu,h=Hf(n.getAttribute("enctype"))||ou,f=new FormData(n)}else if($b(n)||Gb(n)&&(n.type==="submit"||n.type==="image")){let b=n.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||b.getAttribute("action");if(o=y?gl(y,r):null,u=n.getAttribute("formmethod")||b.getAttribute("method")||cu,h=Hf(n.getAttribute("formenctype"))||Hf(b.getAttribute("enctype"))||ou,f=new FormData(b,n),!Zb()){let{name:x,type:C,value:M}=n;if(C==="image"){let D=x?`${x}.`:"";f.append(`${D}x`,"0"),f.append(`${D}y`,"0")}else x&&f.append(x,M)}}else{if(bu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=cu,o=null,h=ou,j=n}return f&&h==="text/plain"&&(j=f,f=void 0),{action:o,method:u.toLowerCase(),encType:h,formData:f,body:j}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function fh(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Xb(n,r,u,o){let h=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return u?h.pathname.endsWith("/")?h.pathname=`${h.pathname}_.${o}`:h.pathname=`${h.pathname}.${o}`:h.pathname==="/"?h.pathname=`_root.${o}`:r&&gl(h.pathname,r)==="/"?h.pathname=`${r.replace(/\/$/,"")}/_root.${o}`:h.pathname=`${h.pathname.replace(/\/$/,"")}.${o}`,h}async function Jb(n,r){if(n.id in r)return r[n.id];try{let u=await import(n.module);return r[n.id]=u,u}catch(u){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Kb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function e1(n,r,u){let o=await Promise.all(n.map(async h=>{let f=r.routes[h.route.id];if(f){let j=await Jb(f,u);return j.links?j.links():[]}return[]}));return l1(o.flat(1).filter(Kb).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function Vg(n,r,u,o,h,f){let j=(y,x)=>u[x]?y.route.id!==u[x].route.id:!0,b=(y,x)=>{var C;return u[x].pathname!==y.pathname||((C=u[x].route.path)==null?void 0:C.endsWith("*"))&&u[x].params["*"]!==y.params["*"]};return f==="assets"?r.filter((y,x)=>j(y,x)||b(y,x)):f==="data"?r.filter((y,x)=>{var M;let C=o.routes[y.route.id];if(!C||!C.hasLoader)return!1;if(j(y,x)||b(y,x))return!0;if(y.route.shouldRevalidate){let D=y.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((M=u[0])==null?void 0:M.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function t1(n,r,{includeHydrateFallback:u}={}){return a1(n.map(o=>{let h=r.routes[o.route.id];if(!h)return[];let f=[h.module];return h.clientActionModule&&(f=f.concat(h.clientActionModule)),h.clientLoaderModule&&(f=f.concat(h.clientLoaderModule)),u&&h.hydrateFallbackModule&&(f=f.concat(h.hydrateFallbackModule)),h.imports&&(f=f.concat(h.imports)),f}).flat(1))}function a1(n){return[...new Set(n)]}function n1(n){let r={},u=Object.keys(n).sort();for(let o of u)r[o]=n[o];return r}function l1(n,r){let u=new Set;return new Set(r),n.reduce((o,h)=>{let f=JSON.stringify(n1(h));return u.has(f)||(u.add(f),o.push({key:f,link:h})),o},[])}function op(){let n=z.useContext(Xr);return fh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function s1(){let n=z.useContext(vu);return fh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var hh=z.createContext(void 0);hh.displayName="FrameworkContext";function up(){let n=z.useContext(hh);return fh(n,"You must render this element inside a <HydratedRouter> element"),n}function r1(n,r){let u=z.useContext(hh),[o,h]=z.useState(!1),[f,j]=z.useState(!1),{onFocus:b,onBlur:y,onMouseEnter:x,onMouseLeave:C,onTouchStart:M}=r,D=z.useRef(null);z.useEffect(()=>{if(n==="render"&&j(!0),n==="viewport"){let O=Z=>{Z.forEach(B=>{j(B.isIntersecting)})},k=new IntersectionObserver(O,{threshold:.5});return D.current&&k.observe(D.current),()=>{k.disconnect()}}},[n]),z.useEffect(()=>{if(o){let O=setTimeout(()=>{j(!0)},100);return()=>{clearTimeout(O)}}},[o]);let A=()=>{h(!0)},N=()=>{h(!1),j(!1)};return u?n!=="intent"?[f,D,{}]:[f,D,{onFocus:lc(b,A),onBlur:lc(y,N),onMouseEnter:lc(x,A),onMouseLeave:lc(C,N),onTouchStart:lc(M,A)}]:[!1,D,{}]}function lc(n,r){return u=>{n&&n(u),u.defaultPrevented||r(u)}}function i1({page:n,...r}){let{router:u}=op(),o=z.useMemo(()=>Qx(u.routes,n,u.basename),[u.routes,n,u.basename]);return o?z.createElement(o1,{page:n,matches:o,...r}):null}function c1(n){let{manifest:r,routeModules:u}=up(),[o,h]=z.useState([]);return z.useEffect(()=>{let f=!1;return e1(n,r,u).then(j=>{f||h(j)}),()=>{f=!0}},[n,r,u]),o}function o1({page:n,matches:r,...u}){let o=Nn(),{future:h,manifest:f,routeModules:j}=up(),{basename:b}=op(),{loaderData:y,matches:x}=s1(),C=z.useMemo(()=>Vg(n,r,x,f,o,"data"),[n,r,x,f,o]),M=z.useMemo(()=>Vg(n,r,x,f,o,"assets"),[n,r,x,f,o]),D=z.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let O=new Set,k=!1;if(r.forEach(B=>{var R;let K=f.routes[B.route.id];!K||!K.hasLoader||(!C.some(w=>w.route.id===B.route.id)&&B.route.id in y&&((R=j[B.route.id])!=null&&R.shouldRevalidate)||K.hasClientLoader?k=!0:O.add(B.route.id))}),O.size===0)return[];let Z=Xb(n,b,h.unstable_trailingSlashAwareDataRequests,"data");return k&&O.size>0&&Z.searchParams.set("_routes",r.filter(B=>O.has(B.route.id)).map(B=>B.route.id).join(",")),[Z.pathname+Z.search]},[b,h.unstable_trailingSlashAwareDataRequests,y,o,f,C,r,n,j]),A=z.useMemo(()=>t1(M,f),[M,f]),N=c1(M);return z.createElement(z.Fragment,null,D.map(O=>z.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...u})),A.map(O=>z.createElement("link",{key:O,rel:"modulepreload",href:O,...u})),N.map(({key:O,link:k})=>z.createElement("link",{key:O,nonce:u.nonce,...k,crossOrigin:k.crossOrigin??u.crossOrigin})))}function u1(...n){return r=>{n.forEach(u=>{typeof u=="function"?u(r):u!=null&&(u.current=r)})}}var d1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{d1&&(window.__reactRouterVersion="7.13.0")}catch{}function f1({basename:n,children:r,unstable_useTransitions:u,window:o}){let h=z.useRef();h.current==null&&(h.current=Gy({window:o,v5Compat:!0}));let f=h.current,[j,b]=z.useState({action:f.action,location:f.location}),y=z.useCallback(x=>{u===!1?b(x):z.startTransition(()=>b(x))},[u]);return z.useLayoutEffect(()=>f.listen(y),[f,y]),z.createElement(Pb,{basename:n,children:r,location:j.location,navigationType:j.action,navigator:f,unstable_useTransitions:u})}var dp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fp=z.forwardRef(function({onClick:r,discover:u="render",prefetch:o="none",relative:h,reloadDocument:f,replace:j,state:b,target:y,to:x,preventScrollReset:C,viewTransition:M,unstable_defaultShouldRevalidate:D,...A},N){let{basename:O,unstable_useTransitions:k}=z.useContext(Pa),Z=typeof x=="string"&&dp.test(x),B=ep(x,O);x=B.to;let K=Cb(x,{relative:h}),[R,w,U]=r1(o,A),G=g1(x,{replace:j,state:b,target:y,preventScrollReset:C,relative:h,viewTransition:M,unstable_defaultShouldRevalidate:D,unstable_useTransitions:k});function I(S){r&&r(S),S.defaultPrevented||G(S)}let le=z.createElement("a",{...A,...U,href:B.absoluteURL||K,onClick:B.isExternal||f?r:I,ref:u1(N,w),target:y,"data-discover":!Z&&u==="render"?"true":void 0});return R&&!Z?z.createElement(z.Fragment,null,le,z.createElement(i1,{page:K})):le});fp.displayName="Link";var hp=z.forwardRef(function({"aria-current":r="page",caseSensitive:u=!1,className:o="",end:h=!1,style:f,to:j,viewTransition:b,children:y,...x},C){let M=Cc(j,{relative:x.relative}),D=Nn(),A=z.useContext(vu),{navigator:N,basename:O}=z.useContext(Pa),k=A!=null&&b1(M)&&b===!0,Z=N.encodeLocation?N.encodeLocation(M).pathname:M.pathname,B=D.pathname,K=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;u||(B=B.toLowerCase(),K=K?K.toLowerCase():null,Z=Z.toLowerCase()),K&&O&&(K=gl(K,O)||K);const R=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let w=B===Z||!h&&B.startsWith(Z)&&B.charAt(R)==="/",U=K!=null&&(K===Z||!h&&K.startsWith(Z)&&K.charAt(Z.length)==="/"),G={isActive:w,isPending:U,isTransitioning:k},I=w?r:void 0,le;typeof o=="function"?le=o(G):le=[o,w?"active":null,U?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let S=typeof f=="function"?f(G):f;return z.createElement(fp,{...x,"aria-current":I,className:le,ref:C,style:S,to:j,viewTransition:b},typeof y=="function"?y(G):y)});hp.displayName="NavLink";var h1=z.forwardRef(({discover:n="render",fetcherKey:r,navigate:u,reloadDocument:o,replace:h,state:f,method:j=cu,action:b,onSubmit:y,relative:x,preventScrollReset:C,viewTransition:M,unstable_defaultShouldRevalidate:D,...A},N)=>{let{unstable_useTransitions:O}=z.useContext(Pa),k=v1(),Z=y1(b,{relative:x}),B=j.toLowerCase()==="get"?"get":"post",K=typeof b=="string"&&dp.test(b),R=w=>{if(y&&y(w),w.defaultPrevented)return;w.preventDefault();let U=w.nativeEvent.submitter,G=(U==null?void 0:U.getAttribute("formmethod"))||j,I=()=>k(U||w.currentTarget,{fetcherKey:r,method:G,navigate:u,replace:h,state:f,relative:x,preventScrollReset:C,viewTransition:M,unstable_defaultShouldRevalidate:D});O&&u!==!1?z.startTransition(()=>I()):I()};return z.createElement("form",{ref:N,method:B,action:Z,onSubmit:o?y:R,...A,"data-discover":!K&&n==="render"?"true":void 0})});h1.displayName="Form";function m1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mp(n){let r=z.useContext(Xr);return bt(r,m1(n)),r}function g1(n,{target:r,replace:u,state:o,preventScrollReset:h,relative:f,viewTransition:j,unstable_defaultShouldRevalidate:b,unstable_useTransitions:y}={}){let x=yu(),C=Nn(),M=Cc(n,{relative:f});return z.useCallback(D=>{if(Ib(D,r)){D.preventDefault();let A=u!==void 0?u:vc(C)===vc(M),N=()=>x(n,{replace:A,state:o,preventScrollReset:h,relative:f,viewTransition:j,unstable_defaultShouldRevalidate:b});y?z.startTransition(()=>N()):N()}},[C,x,M,u,o,r,n,h,f,j,b,y])}var x1=0,p1=()=>`__${String(++x1)}__`;function v1(){let{router:n}=mp("useSubmit"),{basename:r}=z.useContext(Pa),u=Lb(),o=n.fetch,h=n.navigate;return z.useCallback(async(f,j={})=>{let{action:b,method:y,encType:x,formData:C,body:M}=Qb(f,r);if(j.navigate===!1){let D=j.fetcherKey||p1();await o(D,u,j.action||b,{unstable_defaultShouldRevalidate:j.unstable_defaultShouldRevalidate,preventScrollReset:j.preventScrollReset,formData:C,body:M,formMethod:j.method||y,formEncType:j.encType||x,flushSync:j.flushSync})}else await h(j.action||b,{unstable_defaultShouldRevalidate:j.unstable_defaultShouldRevalidate,preventScrollReset:j.preventScrollReset,formData:C,body:M,formMethod:j.method||y,formEncType:j.encType||x,replace:j.replace,state:j.state,fromRouteId:u,flushSync:j.flushSync,viewTransition:j.viewTransition})},[o,h,r,u])}function y1(n,{relative:r}={}){let{basename:u}=z.useContext(Pa),o=z.useContext(Pn);bt(o,"useFormAction must be used inside a RouteContext");let[h]=o.matches.slice(-1),f={...Cc(n||".",{relative:r})},j=Nn();if(n==null){f.search=j.search;let b=new URLSearchParams(f.search),y=b.getAll("index");if(y.some(C=>C==="")){b.delete("index"),y.filter(M=>M).forEach(M=>b.append("index",M));let C=b.toString();f.search=C?`?${C}`:""}}return(!n||n===".")&&h.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(f.pathname=f.pathname==="/"?u:ml([u,f.pathname])),vc(f)}function b1(n,{relative:r}={}){let u=z.useContext(ap);bt(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=mp("useViewTransitionState"),h=Cc(n,{relative:r});if(!u.isTransitioning)return!1;let f=gl(u.currentLocation.pathname,o)||u.currentLocation.pathname,j=gl(u.nextLocation.pathname,o)||u.nextLocation.pathname;return du(h.pathname,j)!=null||du(h.pathname,f)!=null}var j1=Wx();const N1=sh(j1);/**
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 gp=(...n)=>n.filter((r,u,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===u).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 w1=n=>n.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 S1=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,u,o)=>o?o.toUpperCase():u.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 Pg=n=>{const r=S1(n);return r.charAt(0).toUpperCase()+r.slice(1)};/**
81
+ * @license lucide-react v0.564.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */var C1={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 E1=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};/**
91
+ * @license lucide-react v0.564.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const T1=z.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:u=2,absoluteStrokeWidth:o,className:h="",children:f,iconNode:j,...b},y)=>z.createElement("svg",{ref:y,...C1,width:r,height:r,stroke:n,strokeWidth:o?Number(u)*24/Number(r):u,className:gp("lucide",h),...!f&&!E1(b)&&{"aria-hidden":"true"},...b},[...j.map(([x,C])=>z.createElement(x,C)),...Array.isArray(f)?f:[f]]));/**
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 Ee=(n,r)=>{const u=z.forwardRef(({className:o,...h},f)=>z.createElement(T1,{ref:f,iconNode:r,className:gp(`lucide-${w1(Pg(n))}`,`lucide-${n}`,o),...h}));return u.displayName=Pg(n),u};/**
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 M1=[["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"}]],xp=Ee("activity",M1);/**
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 O1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],R1=Ee("arrow-down",O1);/**
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 D1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Wf=Ee("arrow-right",D1);/**
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 k1=[["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"}]],A1=Ee("arrow-up-down",k1);/**
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 _1=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],z1=Ee("arrow-up",_1);/**
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 L1=[["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"}]],U1=Ee("bell",L1);/**
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 H1=[["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"}]],Bg=Ee("briefcase",H1);/**
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 q1=[["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"}]],pp=Ee("calendar",q1);/**
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 V1=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],ju=Ee("chart-column",V1);/**
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 P1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],B1=Ee("check",P1);/**
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 $1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mh=Ee("chevron-down",$1);/**
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 Y1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],G1=Ee("chevron-left",Y1);/**
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 F1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],I1=Ee("chevron-right",F1);/**
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 Z1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],W1=Ee("chevron-up",Z1);/**
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 Q1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],X1=Ee("chevrons-up-down",Q1);/**
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 J1=[["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"}]],jn=Ee("circle-alert",J1);/**
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 K1=[["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"}]],$g=Ee("circle-arrow-down",K1);/**
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 ej=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],vp=Ee("circle-check",ej);/**
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 tj=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Ec=Ee("circle-check-big",tj);/**
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 aj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],nj=Ee("circle-pause",aj);/**
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 lj=[["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"}]],sj=Ee("circle-x",lj);/**
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 rj=[["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"}]],gh=Ee("clipboard-list",rj);/**
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 ij=[["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"}]],Yg=Ee("clipboard",ij);/**
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 cj=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],oj=Ee("clock-3",cj);/**
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 uj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],yp=Ee("clock",uj);/**
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 dj=[["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"}]],bp=Ee("external-link",dj);/**
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 fj=[["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"}]],hj=Ee("eye-off",fj);/**
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 mj=[["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"}]],yc=Ee("eye",mj);/**
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 gj=[["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"}]],Qf=Ee("file-text",gj);/**
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 xj=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],xh=Ee("git-merge",xj);/**
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 pj=[["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"}]],Nu=Ee("git-pull-request",pj);/**
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 vj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],yj=Ee("globe",vj);/**
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 bj=[["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"}]],jj=Ee("house",bj);/**
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 Nj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],wj=Ee("info",Nj);/**
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 Sj=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],Cj=Ee("kanban",Sj);/**
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 Ej=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M7 12H3",key:"13ou7f"}],["path",{d:"M7 19H3",key:"wbqt3n"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14",key:"qth677"}],["path",{d:"M11 10v4h4",key:"172dkj"}]],Gg=Ee("list-restart",Ej);/**
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 Tj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ph=Ee("loader-circle",Tj);/**
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 Mj=[["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"}]],jp=Ee("map",Mj);/**
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 Oj=[["path",{d:"M5 12h14",key:"1ays0h"}]],Rj=Ee("minus",Oj);/**
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 Dj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],vh=Ee("panels-top-left",Dj);/**
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 kj=[["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"}]],fu=Ee("pause",kj);/**
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 Aj=[["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"}]],wu=Ee("pen",Aj);/**
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 _j=[["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"}]],bn=Ee("play",_j);/**
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 zj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],as=Ee("plus",zj);/**
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 Lj=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],bc=Ee("refresh-cw",Lj);/**
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 Uj=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],yh=Ee("rotate-ccw",Uj);/**
331
+ * @license lucide-react v0.564.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const Hj=[["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"}]],Np=Ee("save",Hj);/**
336
+ * @license lucide-react v0.564.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const qj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Kr=Ee("search",qj);/**
341
+ * @license lucide-react v0.564.0 - ISC
342
+ *
343
+ * This source code is licensed under the ISC license.
344
+ * See the LICENSE file in the root directory of this source tree.
345
+ */const Vj=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Fg=Ee("settings-2",Vj);/**
346
+ * @license lucide-react v0.564.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const Pj=[["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"}]],Bj=Ee("settings",Pj);/**
351
+ * @license lucide-react v0.564.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const $j=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Yj=Ee("sparkles",$j);/**
356
+ * @license lucide-react v0.564.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const Gj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ig=Ee("square",Gj);/**
361
+ * @license lucide-react v0.564.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const Fj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ij=Ee("terminal",Fj);/**
366
+ * @license lucide-react v0.564.0 - ISC
367
+ *
368
+ * This source code is licensed under the ISC license.
369
+ * See the LICENSE file in the root directory of this source tree.
370
+ */const Zj=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7",key:"10he05"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2",key:"15f7sh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M12 12v-2",key:"fwoke6"}]],Wj=Ee("timer-off",Zj);/**
371
+ * @license lucide-react v0.564.0 - ISC
372
+ *
373
+ * This source code is licensed under the ISC license.
374
+ * See the LICENSE file in the root directory of this source tree.
375
+ */const Qj=[["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"}]],Qs=Ee("trash-2",Qj);/**
376
+ * @license lucide-react v0.564.0 - ISC
377
+ *
378
+ * This source code is licensed under the ISC license.
379
+ * See the LICENSE file in the root directory of this source tree.
380
+ */const Xj=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],Jj=Ee("trending-down",Xj);/**
381
+ * @license lucide-react v0.564.0 - ISC
382
+ *
383
+ * This source code is licensed under the ISC license.
384
+ * See the LICENSE file in the root directory of this source tree.
385
+ */const Kj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],eN=Ee("trending-up",Kj);/**
386
+ * @license lucide-react v0.564.0 - ISC
387
+ *
388
+ * This source code is licensed under the ISC license.
389
+ * See the LICENSE file in the root directory of this source tree.
390
+ */const tN=[["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"}]],Zs=Ee("triangle-alert",tN);/**
391
+ * @license lucide-react v0.564.0 - ISC
392
+ *
393
+ * This source code is licensed under the ISC license.
394
+ * See the LICENSE file in the root directory of this source tree.
395
+ */const aN=[["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"}]],nN=Ee("wifi",aN);/**
396
+ * @license lucide-react v0.564.0 - ISC
397
+ *
398
+ * This source code is licensed under the ISC license.
399
+ * See the LICENSE file in the root directory of this source tree.
400
+ */const lN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ei=Ee("x",lN);/**
401
+ * @license lucide-react v0.564.0 - ISC
402
+ *
403
+ * This source code is licensed under the ISC license.
404
+ * See the LICENSE file in the root directory of this source tree.
405
+ */const sN=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Zg=Ee("zap",sN),Wg="/api/telemetry/web",rN=[[/^\/$/,"dashboard"],[/^\/analytics$/,"analytics"],[/^\/prs$/,"prs"],[/^\/board$/,"board"],[/^\/scheduling$/,"scheduling"],[/^\/logs$/,"logs"],[/^\/roadmap$/,"roadmap"],[/^\/settings$/,"settings"]];function Qg(n){var r;return((r=rN.find(([u])=>u.test(n)))==null?void 0:r[1])??"unknown"}function ia(n,r={}){const u=JSON.stringify({eventName:n,properties:r});try{if(typeof navigator<"u"&&typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(Wg,new Blob([u],{type:"application/json"})))return;fetch(Wg,{method:"POST",headers:{"Content-Type":"application/json"},body:u,keepalive:!0}).catch(()=>{})}catch{}}function Xg(n,r,u,o,h={}){ia("web_api_action",{...h,resource:n,action:r,result:o?"success":"failure",success:o,failure:!o,durationMs:Math.max(0,Math.round(performance.now()-u))})}function iN(){const n=Nn(),r=z.useRef(!1);return z.useEffect(()=>{r.current||(r.current=!0,ia("web_app_opened",{uiArea:"app",action:"open",resource:"app",routeName:Qg(n.pathname)}))},[n.pathname]),z.useEffect(()=>{ia("web_route_viewed",{uiArea:"navigation",action:"view",resource:"route",routeName:Qg(n.pathname)})},[n.pathname]),null}const wp=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"ux",label:"UX",processName:"ux",color:{bg:"bg-lime-500",border:"border-lime-500/60"}},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"}},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"}},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"}},{id:"manager",label:"Manager",processName:"manager",color:{bg:"bg-indigo-500",border:"border-indigo-500/60"}}],Sp=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:n=>n.executorEnabled??!0,getSchedule:n=>n.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:n=>({executorEnabled:n})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:n=>n.reviewerEnabled??!0,getSchedule:n=>n.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:n=>({reviewerEnabled:n})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:n=>{var r;return((r=n.qa)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(n,r)=>({qa:{...r.qa??{},enabled:n}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:n=>{var r;return((r=n.audit)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({audit:{...r.audit??{},enabled:n}})},{id:"ux",label:"UX",processName:"ux",color:{bg:"bg-lime-500",border:"border-lime-500/60"},triggerEndpoint:"/api/actions/ux",scheduleTemplateKey:"ux",getEnabled:n=>{var r;return((r=n.ux)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.ux)==null?void 0:r.schedule)??"0 7 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({ux:{...r.ux??{},enabled:n}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:n=>{var r;return((r=n.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:n}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:n=>{var r;return((r=n.analytics)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({analytics:{...r.analytics??{},enabled:n}})},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"},triggerEndpoint:"/api/actions/resolve",scheduleTemplateKey:"prResolver",getEnabled:n=>{var r;return((r=n.prResolver)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.prResolver)==null?void 0:r.schedule)??"15 6,14,22 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({prResolver:{...r.prResolver??{},enabled:n}})},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"},triggerEndpoint:"/api/actions/merge",scheduleTemplateKey:"merger",getEnabled:n=>{var r;return((r=n.merger)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.merger)==null?void 0:r.schedule)??"55 */4 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({merger:{...r.merger??{},enabled:n}})},{id:"manager",label:"Manager",processName:"manager",color:{bg:"bg-indigo-500",border:"border-indigo-500/60"},triggerEndpoint:"/api/actions/manager",scheduleTemplateKey:"manager",getEnabled:n=>{var r;return((r=n.manager)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.manager)==null?void 0:r.schedule)??"15 7 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({manager:{...r.manager??{},enabled:n}})}];function cN(n){return Sp.find(r=>r.id===n)}const bh="";let jh=!1,hu=null;function oN(n){jh=n}function Jg(n){hu=n}function uN(){return jh}function Nh(n){return encodeURIComponent(n.replace(/\//g,"~"))}function jt(n){return jh&&hu?n.replace("/api/",`/api/projects/${Nh(hu)}/`):n}function dN(){return typeof performance<"u"?performance.now():Date.now()}async function Zt(n,r,u,o={}){const h=dN();try{const f=await u();return Xg(n,r,h,!0,o),f}catch(f){throw Xg(n,r,h,!1,o),f}}function fN(){return nt("/api/mode")}function Cp(){return Zt("project","view",async()=>{const n=await nt("/api/projects");return ia("web_ui_action",{uiArea:"project_selector",action:"view",resource:"project",projectCount:n.length,itemCount:n.length}),n})}function hN(n){const r=Nh(n);return nt(`/api/projects/${r}`,{method:"DELETE"})}async function nt(n,r){const u=`${bh}${n}`,o=await fetch(u,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!o.ok){const h=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(h.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function qf(){return nt(jt("/api/status"))}function mN(){return nt(jt("/api/feedback/summary"))}function gN(){return nt(jt("/api/feedback/patterns"))}function xN(n,r){return Zt("augmentation",(r.action==="expire","toggle"),()=>nt(jt(`/api/feedback/augmentations/${n}`),{method:"PATCH",body:JSON.stringify(r)}),{uiArea:"feedback",statusCategory:r.action==="expire"?"disabled":"unknown"})}function Ep(){return nt(jt("/api/prs"))}function pN(n,r){const u=`?lines=${encodeURIComponent(r)}`;return Zt("logs","view",async()=>{const o=await nt(jt(`/api/logs/${encodeURIComponent(n)}${u}`));return ia("web_ui_action",{uiArea:"logs",action:"view",resource:"logs",jobType:n,itemCount:o.lines.length}),o},{uiArea:"logs",jobType:n})}function wh(){return nt(jt("/api/config"))}async function vN(){if(uN()){const r=(await Cp()).filter(o=>o.valid);return(await Promise.all(r.map(async o=>{try{const h=await nt(`/api/projects/${Nh(o.name)}/config`);return{projectId:o.name,config:h}}catch(h){return console.error(`Failed to fetch config for project ${o.name}`,h),null}}))).filter(o=>o!==null)}else{const n=await wh();return[{projectId:hu||"current",config:n}]}}function mu(n){return Zt("config","save",()=>nt(jt("/api/config"),{method:"PUT",body:JSON.stringify(n)}),{uiArea:"settings"})}function yN(){return nt(jt("/api/doctor"))}function Tp(){return nt(jt("/api/schedule-info"))}function bN(){return Zt("job","trigger",()=>nt(jt("/api/actions/review"),{method:"POST"}),{uiArea:"jobs",jobType:"reviewer"})}function Mp(n){const r=cN(n);return r?Zt("job","trigger",()=>nt(jt(r.triggerEndpoint),{method:"POST"}),{uiArea:"jobs",jobType:n}):Promise.reject(new Error(`Unknown job ID: ${n}`))}function pc(){return Zt("cron","resume",()=>nt(jt("/api/actions/install-cron"),{method:"POST"}),{uiArea:"schedules"})}function Op(){return Zt("cron","pause",()=>nt(jt("/api/actions/uninstall-cron"),{method:"POST"}),{uiArea:"schedules"})}function jN(n="all"){return Zt("job","cancel",()=>nt(jt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:n})}),{uiArea:"jobs",jobType:n})}const Vn=["Draft","Ready","In Progress","Review","Done"];function Rp(){return Zt("board_issue","view",async()=>{const n=await nt(jt("/api/board/status")),r=Vn.reduce((u,o)=>{var h;return u+(((h=n.columns[o])==null?void 0:h.length)??0)},0);return ia("web_ui_action",{uiArea:"board",action:"view",resource:"board_issue",itemCount:r,columnCount:Vn.length,enabled:n.enabled}),n},{uiArea:"board"})}function NN(n){return Zt("board_issue","create",()=>nt(jt("/api/board/issues"),{method:"POST",body:JSON.stringify(n)}),{uiArea:"board"})}function Dp(n,r){return Zt("board_issue","move",()=>nt(jt(`/api/board/issues/${n}/move`),{method:"PATCH",body:JSON.stringify({column:r})}),{uiArea:"board"})}async function wN(n){return Zt("board_issue","close",async()=>{const r=`${bh}${jt(`/api/board/issues/${n}`)}`,u=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!u.ok){const o=await u.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`HTTP ${u.status}: ${u.statusText}`)}},{uiArea:"board"})}function SN(){return Zt("lock","clear",()=>nt(jt("/api/actions/clear-lock"),{method:"POST"}),{uiArea:"dashboard"})}function CN(n,r=[],u){const o=(u==null?void 0:u.enabled)??!0,h=z.useRef(n);h.current=n,z.useEffect(()=>{if(!o)return;const f=`${bh}${jt("/api/status/events")}`,j=new EventSource(f);return j.addEventListener("status_changed",b=>{try{const y=JSON.parse(b.data);h.current(y)}catch{}}),()=>{j.close()}},[o,...r])}function Kg(){return Zt("queue","view",async()=>{const n=await nt("/api/queue/status");return ia("web_ui_action",{uiArea:"queue",action:"view",resource:"queue",pendingCount:n.pending.total,runningCount:n.running?1:0,itemCount:n.items.length,enabled:n.enabled}),n},{uiArea:"queue"})}function EN(n){const r=`?window=${encodeURIComponent(n)}`;return nt(`/api/queue/analytics${r}`)}function TN(n){return Zt("queue","clear",()=>nt("/api/queue/clear",{method:"POST",body:JSON.stringify({force:n??!1})}),{uiArea:"queue"})}function MN(){return nt("/api/global-notifications")}function ex(n){return Zt("settings","save",()=>nt("/api/global-notifications",{method:"PUT",body:JSON.stringify(n)}),{uiArea:"settings"})}function ON(){return nt(jt("/api/roadmap"))}function RN(){return Zt("roadmap","refresh",async()=>{const n=await nt(jt("/api/roadmap/scan"),{method:"POST"});return ia("web_ui_action",{uiArea:"roadmap",action:"refresh",resource:"roadmap",itemCount:n.created.length+n.skipped.length+n.errors.length,statusCategory:n.errors.length>0?"warning":"success"}),n},{uiArea:"roadmap"})}function kp(n){return Zt("roadmap","toggle",()=>nt(jt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:n})}),{uiArea:"roadmap",enabled:n})}function qa(n,r=[],u){const o=(u==null?void 0:u.enabled)??!0,[h,f]=z.useState(null),[j,b]=z.useState(!0),[y,x]=z.useState(null),C=z.useRef(n);C.current=n;const M=z.useRef(()=>{(async()=>{x(null);try{const A=await C.current();f(A)}catch(A){x(A instanceof Error?A:new Error("Unknown error"))}})()});return z.useEffect(()=>{if(!o)return;let D=!1;return b(!0),x(null),(async()=>{try{const N=await C.current();D||f(N)}catch(N){D||x(N instanceof Error?N:new Error("Unknown error"))}finally{D||b(!1)}})(),()=>{D=!0}},[...r,o]),{data:h,loading:j,error:y,refetch:M.current}}const tx=n=>{let r;const u=new Set,o=(x,C)=>{const M=typeof x=="function"?x(r):x;if(!Object.is(M,r)){const D=r;r=C??(typeof M!="object"||M===null)?M:Object.assign({},r,M),u.forEach(A=>A(r,D))}},h=()=>r,b={setState:o,getState:h,getInitialState:()=>y,subscribe:x=>(u.add(x),()=>u.delete(x))},y=r=n(o,h,b);return b},DN=n=>n?tx(n):tx,kN=n=>n;function AN(n,r=kN){const u=ze.useSyncExternalStore(n.subscribe,()=>r(n.getState()),()=>r(n.getInitialState()));return ze.useDebugValue(u),u}const ax=n=>{const r=DN(n),u=o=>AN(r,o);return Object.assign(u,r),u},_N=n=>n?ax(n):ax,zN=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,It=_N((n,r)=>({projectName:"Night Watch",setProjectName:u=>n({projectName:u}),toasts:[],addToast:u=>{const o=Math.random().toString(36).substring(7);n(h=>({toasts:[...h.toasts,{...u,id:o}]})),setTimeout(()=>{n(h=>({toasts:h.toasts.filter(f=>f.id!==o)}))},5e3)},removeToast:u=>n(o=>({toasts:o.toasts.filter(h=>h.id!==u)})),status:null,setStatus:u=>n(o=>u?!o.status||new Date(u.timestamp)>new Date(o.status.timestamp)?{status:u}:o:{status:null}),globalModeLoading:!0,setGlobalModeLoading:u=>n({globalModeLoading:u}),isGlobalMode:!1,setGlobalMode:u=>{oN(u),n({isGlobalMode:u})},projects:[],setProjects:u=>n({projects:u}),selectedProjectId:zN,selectProject:u=>{Jg(u),u?localStorage.setItem("nw-selected-project",u):localStorage.removeItem("nw-selected-project"),n(o=>{const h=o.projects.find(f=>f.name===u);return{selectedProjectId:u,...h?{projectName:h.name}:{}}})},removeProjectFromList:u=>{n(o=>{var b;const h=o.projects.filter(y=>y.name!==u),f=o.selectedProjectId===u,j=f?((b=h[0])==null?void 0:b.name)??null:o.selectedProjectId;return f&&(Jg(j),j?localStorage.setItem("nw-selected-project",j):localStorage.removeItem("nw-selected-project")),{projects:h,selectedProjectId:j,...f&&h[0]?{projectName:h[0].name}:{}}})},getJobStates:()=>{const{status:u}=r(),o=u==null?void 0:u.config;return Sp.map(h=>({id:h.id,label:h.label,processName:h.processName,color:h.color,enabled:o?h.getEnabled(o):!0,schedule:o?h.getSchedule(o):"",triggerEndpoint:h.triggerEndpoint}))}})),LN=()=>{const[n,r]=z.useState(!1),{projectName:u,isGlobalMode:o,projects:h,selectedProjectId:f,selectProject:j,globalModeLoading:b}=It(),{data:y}=qa(Ep,[f],{enabled:!b}),x=(y==null?void 0:y.length)??0,C=z.useMemo(()=>h.filter(D=>D.valid),[h]),M=z.useMemo(()=>[{icon:jj,label:"Dashboard",path:"/",section:"Overview"},{icon:ju,label:"Analytics",path:"/analytics"},{icon:Ij,label:"Logs",path:"/logs"},{icon:Cj,label:"Board",path:"/board",section:"Work"},{icon:Nu,label:"Pull Requests",path:"/prs",badge:x},{icon:jp,label:"Roadmap",path:"/roadmap"},{icon:pp,label:"Automation",path:"/scheduling",section:"Automation"},{icon:Bj,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
406
+ relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
407
+ ${n?"w-20":"w-72"} h-screen flex-shrink-0 z-50
408
+ bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
409
+ `,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${n?"items-center justify-center flex":""}`,children:n?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:o?"Projects":"Workspace"}),o?s.jsxs("div",{className:"relative",children:[s.jsx(Bg,{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:f||"",onChange:D=>{const A=D.target.value,N=C.findIndex(O=>O.name===A);ia("web_ui_action",{uiArea:"project_selector",action:"select",resource:"project",selectedProjectIndex:N>=0?N:void 0,projectCount:C.length,globalMode:!0}),j(A)},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:C.map(D=>s.jsx("option",{value:D.name,children:D.name},D.name))}),s.jsx(X1,{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(Bg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:u})]})]})}),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:M.map(D=>s.jsxs(ze.Fragment,{children:[D.section&&!n&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:D.section}),s.jsx("li",{children:s.jsx(hp,{to:D.path,className:({isActive:A})=>`
410
+ flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
411
+ ${A?"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"}
412
+ ${n?"justify-center":""}
413
+ `,children:({isActive:A})=>s.jsxs(s.Fragment,{children:[s.jsx(D.icon,{className:`h-5 w-5 transition-colors ${A?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${n?"":"mr-3.5"}`}),!n&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:D.label}),D.badge&&(n?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 ${A?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:D.badge})),A&&!n&&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)]"}),n&&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:D.label})]})})})]},D.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!n),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:n?s.jsx(I1,{className:"h-5 w-5"}):s.jsx(G1,{className:"h-5 w-5"})})})]})},UN=()=>{const{projectName:n}=It();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:n})]}),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(nN,{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(Kr,{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(U1,{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"})]})]})},HN=({toast:n,onDismiss:r})=>{const u={success:s.jsx(Ec,{className:"h-5 w-5 text-green-400"}),error:s.jsx(jn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(wj,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Zs,{className:"h-5 w-5 text-amber-400"})},o={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:`
414
+ pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
415
+ bg-slate-900 border border-slate-800 border-l-4 ${o[n.type]}
416
+ shadow-lg ring-1 ring-black ring-opacity-5 transition-all
417
+ animate-in slide-in-from-right-full fade-in duration-300
418
+ `,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:u[n.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:n.title}),n.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:n.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>r(n.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(ei,{className:"h-5 w-5"})]})})]})})})},qN=()=>{const{toasts:n,removeToast:r}=It();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:n.map(u=>s.jsx(HN,{toast:u,onDismiss:r},u.id))})};function VN(){const{setGlobalMode:n,setGlobalModeLoading:r,setProjects:u,selectProject:o,selectedProjectId:h}=It();z.useEffect(()=>{r(!0),fN().then(async({globalMode:f})=>{if(n(f),ia("web_ui_action",{uiArea:"app",action:"open",resource:"app",globalMode:f}),!f)return;const j=await Cp();u(j);const b=j.filter(y=>y.valid);ia("web_ui_action",{uiArea:"project_selector",action:"view",resource:"project",projectCount:b.length,itemCount:b.length,globalMode:!0}),h&&b.some(y=>y.name===h)?o(h):b.length>0&&o(b[0].name)}).catch(()=>{n(!1)}).finally(()=>{r(!1)})},[])}function nx(n){if(!(n!=null&&n.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(n.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function eu(n,r){return n?r?nx(n)>=nx(r)?n:r:n:r}function PN(){const{setStatus:n,setProjectName:r,selectedProjectId:u,globalModeLoading:o,status:h}=It(),f=z.useRef(null);f.current=It.getState().status,CN(j=>{eu(j,f.current)===j&&n(j)},[u,o],{enabled:!o}),z.useEffect(()=>{if(o)return;n(null),f.current=null,qf().then(b=>{eu(b,f.current)===b&&n(b)}).catch(()=>{});const j=setInterval(()=>{qf().then(b=>{eu(b,f.current)===b&&n(b)}).catch(()=>{})},3e4);return()=>clearInterval(j)},[u,o,n]),z.useEffect(()=>{const j=()=>{qf().then(b=>{eu(b,f.current)===b&&n(b)}).catch(()=>{})};return window.addEventListener("focus",j),()=>window.removeEventListener("focus",j)},[u,n]),z.useEffect(()=>{h!=null&&h.projectName&&r(h.projectName)},[h==null?void 0:h.projectName,r])}const Tt=({children:n,variant:r="default",className:u=""})=>{const o={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 ${o[r]} ${u}`,children:n})},Le=({children:n,variant:r="primary",size:u="md",loading:o=!1,className:h="",disabled:f,...j})=>{const b="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]",y={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"},x={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:`${b} ${y[r]} ${x[u]} ${h}`,disabled:f||o,...j,children:[o&&s.jsx(ph,{className:"mr-2 h-4 w-4 animate-spin"}),n]})},et=({children:n,className:r="",onClick:u})=>s.jsxs("div",{className:`
419
+ relative bg-[#0b101b] rounded-xl border border-white/5
420
+ shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
421
+ transition-all duration-300
422
+ ${u?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
423
+ ${r}
424
+ `,onClick:u,children:[u&&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:n})]}),BN=({rows:n})=>s.jsx("div",{className:"mt-6 w-full max-w-xl space-y-3","aria-hidden":"true",children:Array.from({length:n}).map((r,u)=>s.jsx("div",{className:"h-3 overflow-hidden rounded-full bg-slate-900/80 ring-1 ring-white/5",children:s.jsx("div",{className:"h-full w-1/2 animate-pulse rounded-full bg-gradient-to-r from-slate-800 via-indigo-500/30 to-slate-800",style:{animationDelay:`${u*120}ms`}})},u))}),lx=({message:n,detail:r,rows:u})=>s.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[s.jsx("div",{className:"relative mb-4 flex h-12 w-12 items-center justify-center rounded-xl border border-indigo-400/20 bg-indigo-500/10 text-indigo-300 shadow-[0_0_30px_-12px_rgba(99,102,241,0.9)]",children:s.jsx(ph,{className:"h-5 w-5 animate-spin"})}),s.jsx("div",{className:"text-sm font-medium text-slate-200",children:n}),r?s.jsx("div",{className:"mt-1 max-w-md text-xs text-slate-500",children:r}):null,u>0?s.jsx(BN,{rows:u}):null]}),Ha=({message:n="Loading...",detail:r,variant:u="page",rows:o=3})=>{const h=s.jsx(lx,{message:n,detail:r,rows:o});return u==="inline"?s.jsx("div",{className:"flex min-h-24 items-center justify-center py-6",children:s.jsx(lx,{message:n,detail:r,rows:0})}):u==="card"?s.jsx(et,{className:"p-8",children:h}):s.jsx("div",{className:"flex min-h-[420px] items-center justify-center",children:s.jsx(et,{className:"w-full max-w-2xl p-10",children:h})})};function $N(n){return`${Math.round(n*100)}%`}function sx(n){return new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}function rx(n){return(n==null?void 0:n.replace(/_/g," "))||"uncategorized"}const YN=({activePatterns:n,augmentations:r,topFailurePatterns:u,updatingAugmentationId:o=null,onAugmentationAction:h})=>s.jsxs("div",{className:"space-y-6","data-testid":"feedback-pattern-list",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Active Patterns"}),s.jsx(Tt,{variant:"neutral",children:n.length})]}),n.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No active feedback patterns."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:n.map(f=>s.jsxs("div",{className:"p-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"truncate text-sm font-medium text-slate-200",title:f.title,children:f.title}),s.jsx("p",{className:"mt-1 line-clamp-2 text-xs text-slate-500",children:f.description})]}),s.jsx(Tt,{variant:"info",className:"shrink-0 capitalize",children:f.jobType})]}),s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[11px] text-slate-500",children:[s.jsx("span",{className:"capitalize",children:rx(f.category)}),s.jsxs("span",{children:[f.sampleCount," samples"]}),s.jsxs("span",{children:[$N(f.confidence)," confidence"]})]})]},f.id))})]}),s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Top Failure Patterns"}),s.jsx(Tt,{variant:"neutral",children:u.length})]}),u.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No repeated failure signatures yet."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:u.map(f=>s.jsxs("div",{className:"p-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"truncate text-sm font-medium text-slate-200",title:f.signature??f.key,children:f.signature||rx(f.category)}),s.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-[11px] text-slate-500",children:[s.jsx("span",{className:"capitalize",children:f.jobType}),s.jsx("span",{className:"font-mono",children:f.providerKey})]})]}),s.jsx(Tt,{variant:"warning",className:"shrink-0",children:f.sampleCount})]}),s.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-slate-500",children:[s.jsx(oj,{className:"h-3 w-3"}),s.jsxs("span",{children:["Last seen ",sx(f.lastSeenAt)]})]})]},f.key))})]})]}),s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Active Augmentations"}),s.jsx(Tt,{variant:r.length>0?"success":"neutral",children:r.length})]}),r.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No active prompt augmentations."}):s.jsx("div",{className:"overflow-x-auto rounded-lg border border-slate-800",children:s.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[s.jsx("thead",{className:"border-b border-slate-800 bg-slate-900/30 text-[11px] uppercase tracking-wider text-slate-500",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3 font-semibold",children:"Prompt Snippet"}),s.jsx("th",{className:"px-4 py-3 font-semibold",children:"Job"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Use"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Expires"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/60",children:r.map(f=>{const j=o===f.id,b=f.appliedCount>0?`${Math.round(f.successCount/f.appliedCount*100)}%`:"new";return s.jsxs("tr",{className:"hover:bg-slate-800/20",children:[s.jsx("td",{className:"px-4 py-3",children:s.jsx("div",{className:"line-clamp-2 max-w-xl text-sm text-slate-300",title:f.promptText,children:f.promptText})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(Tt,{variant:"info",className:"capitalize",children:f.jobType})}),s.jsxs("td",{className:"px-4 py-3 text-right text-xs text-slate-400",children:[f.appliedCount," applied · ",b]}),s.jsx("td",{className:"px-4 py-3 text-right text-xs text-slate-500",children:f.expiresAt?sx(f.expiresAt):"No expiry"}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsxs(Le,{variant:"outline",size:"sm",disabled:j,onClick:()=>h(f.id,"disable"),children:[s.jsx(nj,{className:"mr-1.5 h-3.5 w-3.5"}),"Disable"]}),s.jsxs(Le,{variant:"ghost",size:"sm",disabled:j,onClick:()=>h(f.id,"expire"),className:"text-slate-500 hover:text-amber-300",children:[s.jsx(Wj,{className:"mr-1.5 h-3.5 w-3.5"}),"Expire"]})]})})]},f.id)})})]})})]})]});function Fr(n){return n===null?"—":`${Math.round(n*100)}%`}function ix(n){return n===null?"—":n<60?`${Math.round(n)}s`:`${Math.floor(n/60)}m ${Math.round(n%60)}s`}function GN(n,r){return Object.entries(n).sort(([,u],[,o])=>o-u).slice(0,r)}function tu(n){return Object.entries(n).sort(([,r],[,u])=>u.totalCount-r.totalCount).slice(0,5).map(([r,u])=>[r,`${Fr(u.successRate)} · ${u.totalCount} runs`])}function cx(n,r){if(n===null||r===null)return"Waiting for comparable data";const u=Math.round((n-r)*100);return u===0?"Flat vs 30 days":`${u>0?"+":""}${u} pts vs 30 days`}function FN(n,r){return n===null||r===null?"neutral":n>=r?"success":"warning"}const Jl=({label:n,value:r,detail:u})=>s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/40 p-4",children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-500",children:n}),s.jsx("div",{className:"mt-2 text-2xl font-bold text-slate-100",children:r}),s.jsx("div",{className:"mt-1 text-xs text-slate-500",children:u})]}),Ap=({variant:n="full",onViewDetails:r})=>{const{addToast:u,selectedProjectId:o,globalModeLoading:h}=It(),[f,j]=ze.useState(null),b=n==="compact",{data:y,loading:x,error:C,refetch:M}=qa(mN,[o],{enabled:!h}),{data:D,loading:A,error:N,refetch:O}=qa(gN,[o],{enabled:!h&&!b}),k=()=>{ia("web_ui_action",{uiArea:"feedback",action:"refresh",resource:"feedback",itemCount:(y==null?void 0:y.windows.last30Days.totalCount)??0}),M(),b||O()},Z=async(ie,ge)=>{j(ie);try{await xN(ie,{action:ge}),ia("web_ui_action",{uiArea:"feedback",action:"toggle",resource:"augmentation",result:"success",success:!0}),u({title:ge==="expire"?"Augmentation Expired":"Augmentation Disabled",message:"Prompt augmentation state was updated.",type:"success"}),k()}catch(pe){ia("web_ui_action",{uiArea:"feedback",action:"toggle",resource:"augmentation",result:"failure",success:!1,failure:!0}),u({title:"Update Failed",message:pe instanceof Error?pe.message:"Failed to update augmentation",type:"error"})}finally{j(null)}},B=x||!b&&A,K=C||(b?null:N),R=(y==null?void 0:y.windows.last7Days)??null,w=(y==null?void 0:y.windows.last30Days)??null,U=((D==null?void 0:D.patterns)??[]).filter(ie=>ie.status==="active").sort((ie,ge)=>ge.confidence-ie.confidence||ge.sampleCount-ie.sampleCount).slice(0,5),G=(D==null?void 0:D.topFailurePatterns.slice(0,5))??[],I=GN((w==null?void 0:w.byFailureCategory)??{},5),le=Math.max(...I.map(([,ie])=>ie),1),S=((w==null?void 0:w.totalCount)??0)>0||((R==null?void 0:R.totalCount)??0)>0,te=FN((R==null?void 0:R.successRate)??null,(w==null?void 0:w.successRate)??null),ae=te==="success"?s.jsx(eN,{className:"h-4 w-4"}):te==="warning"?s.jsx(Jj,{className:"h-4 w-4"}):null;return s.jsxs("section",{className:"space-y-4","aria-labelledby":"feedback-performance-heading",children:[s.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{id:"feedback-performance-heading",className:"text-lg font-semibold text-slate-200",children:b?"Basic Analytics":"Analytics"}),s.jsx("p",{className:"mt-1 text-sm text-slate-500",children:b?"High-level job health. Full breakdowns live in Analytics.":"Outcome trends, repeated failures, provider breakdowns, and prompt augmentations."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[b&&r?s.jsxs(Le,{variant:"outline",size:"sm",onClick:r,children:["View analytics",s.jsx(Wf,{className:"ml-1.5 h-4 w-4"})]}):null,s.jsxs(Le,{variant:"outline",size:"sm",onClick:k,disabled:B,children:[s.jsx(bc,{className:`mr-1.5 h-4 w-4 ${B?"animate-spin":""}`}),"Refresh"]})]})]}),s.jsx(et,{className:"p-5",children:B?s.jsx(Ha,{variant:"inline",message:"Loading analytics",detail:b?void 0:"Preparing trends, failure patterns, and provider breakdowns."}):K?s.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-300",children:[s.jsx(jn,{className:"h-5 w-5 shrink-0"}),s.jsx("span",{children:K.message})]}):!y||!S?s.jsxs("div",{className:"py-10 text-center",children:[s.jsx("div",{className:"text-sm font-medium text-slate-300",children:"No feedback outcomes recorded yet."}),s.jsx("p",{className:"mx-auto mt-2 max-w-md text-sm text-slate-500",children:"This panel will populate after executor, reviewer, QA, audit, planner, or merge jobs complete."})]}):b?s.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-4",children:[s.jsx(Jl,{label:"7 Day Success",value:Fr((R==null?void 0:R.successRate)??null),detail:`${(R==null?void 0:R.successCount)??0} of ${(R==null?void 0:R.totalCount)??0} completed`}),s.jsx(Jl,{label:"30 Day Success",value:Fr((w==null?void 0:w.successRate)??null),detail:cx((R==null?void 0:R.successRate)??null,(w==null?void 0:w.successRate)??null)}),s.jsx(Jl,{label:"Failures",value:String(((w==null?void 0:w.failureCount)??0)+((w==null?void 0:w.timeoutCount)??0)),detail:"Last 30 days"}),s.jsx(Jl,{label:"Avg Duration",value:ix((w==null?void 0:w.averageDurationSeconds)??null),detail:"Last 30 days"})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-4",children:[s.jsx(Jl,{label:"7 Day Success",value:Fr((R==null?void 0:R.successRate)??null),detail:`${(R==null?void 0:R.successCount)??0} of ${(R==null?void 0:R.totalCount)??0} completed`}),s.jsx(Jl,{label:"30 Day Success",value:Fr((w==null?void 0:w.successRate)??null),detail:`${(w==null?void 0:w.successCount)??0} of ${(w==null?void 0:w.totalCount)??0} completed`}),s.jsx(Jl,{label:"Failure Load",value:String(((w==null?void 0:w.failureCount)??0)+((w==null?void 0:w.timeoutCount)??0)),detail:`${(w==null?void 0:w.rateLimitedCount)??0} rate limited`}),s.jsx(Jl,{label:"Avg Duration",value:ix((w==null?void 0:w.averageDurationSeconds)??null),detail:"Last 30 days"})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Success-Rate Trend"}),s.jsxs(Tt,{variant:te,className:"gap-1",children:[ae,cx((R==null?void 0:R.successRate)??null,(w==null?void 0:w.successRate)??null)]})]}),s.jsx("div",{className:"space-y-3",children:[{label:"Last 7 days",value:(R==null?void 0:R.successRate)??0},{label:"Last 30 days",value:(w==null?void 0:w.successRate)??0}].map(ie=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between text-xs",children:[s.jsx("span",{className:"text-slate-400",children:ie.label}),s.jsx("span",{className:"font-mono text-slate-300",children:Fr(ie.value)})]}),s.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-900",children:s.jsx("div",{className:"h-full rounded-full bg-emerald-500",style:{width:`${Math.max(4,Math.round(ie.value*100))}%`}})})]},ie.label))})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Failure Categories"}),s.jsx(Tt,{variant:"neutral",children:I.length})]}),I.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No categorized failures in the last 30 days."}):s.jsx("div",{className:"space-y-3",children:I.map(([ie,ge])=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between gap-3 text-xs",children:[s.jsx("span",{className:"truncate capitalize text-slate-400",children:ie.replace(/_/g," ")}),s.jsx("span",{className:"font-mono text-slate-300",children:ge})]}),s.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-900",children:s.jsx("div",{className:"h-full rounded-full bg-red-500",style:{width:`${Math.max(8,Math.round(ge/le*100))}%`}})})]},ie))})]})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Job Breakdown"}),s.jsx(Tt,{variant:"neutral",children:Object.keys((w==null?void 0:w.byJobType)??{}).length})]}),tu((w==null?void 0:w.byJobType)??{}).length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No job-specific outcomes in the last 30 days."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:tu((w==null?void 0:w.byJobType)??{}).map(([ie,ge])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-sm",children:[s.jsx("span",{className:"capitalize text-slate-300",children:ie}),s.jsx("span",{className:"text-xs text-slate-500",children:ge})]},ie))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Provider Breakdown"}),s.jsx(Tt,{variant:"neutral",children:Object.keys((w==null?void 0:w.byProvider)??{}).length})]}),tu((w==null?void 0:w.byProvider)??{}).length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No provider-specific outcomes in the last 30 days."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:tu((w==null?void 0:w.byProvider)??{}).map(([ie,ge])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-sm",children:[s.jsx("span",{className:"font-mono text-slate-300",children:ie}),s.jsx("span",{className:"text-xs text-slate-500",children:ge})]},ie))})]})]})]})}),b?null:s.jsx(et,{className:"p-5",children:s.jsx(YN,{activePatterns:U,augmentations:(y==null?void 0:y.activeAugmentations)??[],topFailurePatterns:G,updatingAugmentationId:f,onAugmentationAction:Z})})]})},IN=()=>s.jsx(Ap,{variant:"full"}),_p={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"}},ZN=({defaultColumn:n,onClose:r,onCreated:u})=>{const[o,h]=z.useState(""),[f,j]=z.useState(""),[b,y]=z.useState(n),[x,C]=z.useState(!1),[M,D]=z.useState(null),{addToast:A}=It(),N=async O=>{if(O.preventDefault(),!!o.trim()){C(!0),D(null);try{await NN({title:o.trim(),body:f,column:b}),A({title:"Issue created",message:`"${o.trim()}" added to ${b}`,type:"success"}),u(),r()}catch(k){D(k instanceof Error?k.message:"Failed to create issue")}finally{C(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(ei,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:N,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:o,onChange:O=>h(O.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:b,onChange:O=>y(O.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Vn.map(O=>s.jsx("option",{value:O,children:O},O))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:f,onChange:O=>j(O.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),M&&s.jsx("p",{className:"text-sm text-red-400",children:M}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Le,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Le,{type:"submit",disabled:x||!o.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},WN=({issue:n,onClose:r,onMoved:u,onClosed:o})=>{const[h,f]=z.useState(!1),[j,b]=z.useState(!1),[y,x]=z.useState(!1),{addToast:C}=It(),M=async N=>{if(N!==n.column){f(!0);try{await Dp(n.number,N),C({title:"Issue moved",message:`#${n.number} moved to ${N}`,type:"success"}),u(),r()}catch(O){C({title:"Move failed",message:O instanceof Error?O.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},D=async()=>{x(!1),b(!0);try{await wN(n.number),C({title:"Issue closed",message:`#${n.number} closed on GitHub`,type:"success"}),o(),r()}catch(N){C({title:"Close failed",message:N instanceof Error?N.message:"Failed to close issue",type:"error"})}finally{b(!1)}},A=n.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",n.number]}),s.jsx(Tt,{variant:_p[A].badge,children:A})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:n.title}),n.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",n.assignees.join(", ")]})]}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(ei,{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:"}),Vn.filter(N=>N!==n.column).map(N=>s.jsx("button",{onClick:()=>M(N),disabled:h,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:N},N))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[n.url&&!n.url.startsWith("local://")&&s.jsxs("a",{href:n.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(bp,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>x(!0),disabled:j,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:j?"Closing...":"Close Issue"})]})]}),y&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>x(!1)}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border border-white/10 rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-100 mb-2",children:"Close issue?"}),s.jsxs("p",{className:"text-sm text-slate-400 mb-4",children:["Close issue #",n.number,': "',n.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>x(!1),children:"Cancel"}),s.jsx(Le,{onClick:D,children:"Confirm"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:n.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:n.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},QN=({issue:n,onClick:r,onDragStart:u})=>{const[o,h]=z.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(n.number)),f.dataTransfer.effectAllowed="move",h(!0),u(n)},onDragEnd:()=>h(!1),children:s.jsxs(et,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",n.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:n.title}),n.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:n.assignees.join(", ")})]})})},XN=({name:n,issues:r,draggingIssue:u,onIssueClick:o,onNewIssue:h,onMoveIssue:f,onDragStart:j})=>{const b=_p[n],[y,x]=z.useState(!1),C=u!==null&&u.column!==n;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${y&&C?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:M=>{C&&(M.preventDefault(),M.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:M=>{M.preventDefault(),x(!1),u&&u.column!==n&&f(u,n)},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 ${b.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:n}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:r.length})]}),s.jsx("button",{onClick:()=>h(n),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${n}`,children:s.jsx(as,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:r.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${y&&C?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:y&&C?"Drop here":"No issues"})}):r.map(M=>s.jsx(QN,{issue:M,onClick:()=>o(M),onDragStart:j},M.id))})]})},JN=()=>{const[n,r]=z.useState(null),[u,o]=z.useState(null),[h,f]=z.useState(null),[j,b]=z.useState(null),y=z.useRef(!1),{addToast:x,selectedProjectId:C,globalModeLoading:M}=It(),{data:D,loading:A,error:N,refetch:O}=qa(Rp,[C],{enabled:!M});z.useEffect(()=>{const B=setInterval(()=>{y.current||O()},3e4);return()=>clearInterval(B)},[O]);const k=z.useCallback(async(B,K)=>{f(null);const R=j??(D==null?void 0:D.columns);if(!R)return;const w=R,U={};for(const I of Vn)U[I]=(R[I]??[]).filter(le=>le.number!==B.number);const G={...B,column:K};U[K]=[...U[K]??[],G],b(U),r(I=>(I==null?void 0:I.number)===B.number?G:I),y.current=!0;try{await Dp(B.number,K),O(),setTimeout(()=>{b(null),y.current=!1},800)}catch(I){b(w),r(le=>(le==null?void 0:le.number)===B.number?B:le),y.current=!1,x({title:"Move failed",message:I instanceof Error?I.message:"Failed to move issue",type:"error"})}},[x,O,j,D]);if(M||A)return s.jsx(Ha,{message:"Loading board",detail:"Fetching columns and issue cards."});if(N&&N.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(N)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:N.message}),s.jsx(Le,{onClick:()=>O(),children:"Retry"})]});if(!D)return null;const Z=j??D.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:[Vn.reduce((B,K)=>{var R;return B+(((R=Z[K])==null?void 0:R.length)??0)},0)," issues across ",Vn.length," columns"]})]}),s.jsxs(Le,{onClick:()=>o("Ready"),children:[s.jsx(as,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>f(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Vn.length*236}px`},children:Vn.map(B=>s.jsx(XN,{name:B,issues:Z[B]??[],draggingIssue:h,onIssueClick:r,onNewIssue:o,onMoveIssue:k,onDragStart:f},B))})}),n&&s.jsx(WN,{issue:n,onClose:()=>r(null),onMoved:()=>O(),onClosed:()=>O()}),u&&s.jsx(ZN,{defaultColumn:u,onClose:()=>o(null),onCreated:()=>O()})]})},KN=[{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:"ux",displayName:"UX",processName:"ux",triggerId:"ux",runningLabel:"Inspecting",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",triggerId:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"},{name:"analytics",displayName:"Analytics",processName:"analytics",triggerId:"analytics",runningLabel:"Running",idleLabel:"Idle"},{name:"pr-resolver",displayName:"PR Resolver",processName:"pr-resolver",triggerId:"pr-resolver",runningLabel:"Resolving",idleLabel:"Idle"},{name:"merger",displayName:"Merger",processName:"merger",triggerId:"merger",runningLabel:"Running",idleLabel:"Idle"},{name:"manager",displayName:"Manager",processName:"manager",triggerId:"manager",runningLabel:"Monitoring",idleLabel:"Idle"}],ew=({processes:n,activePrd:r,onCancelProcess:u,onForceClear:o,onViewLog:h,cancellingProcess:f,clearingLock:j,onTriggerJob:b,triggeringJob:y})=>{const x=M=>n.find(D=>D.name===M),C=(M,D)=>M.length<=D?M:M.slice(0,D-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-9 gap-3",children:KN.map(M=>{const D=x(M.processName),A=(D==null?void 0:D.running)??!1,N=D==null?void 0:D.pid,O=f===M.cancelType,k=A&&M.cancelType,Z=!A&&M.name==="executor"&&r,B=A?N?`PID: ${N}`:M.runningLabel:M.idleLabel,K=A&&M.name==="executor"&&r?C(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${A?"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 ${A?"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 ${A?"text-slate-200":"text-slate-400"}`,children:M.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:K?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Qf,{className:"h-3 w-3 flex-shrink-0"}),K]}):B})]}),s.jsxs("div",{className:"flex-shrink-0",children:[k&&s.jsx("button",{onClick:()=>M.cancelType&&u(M.cancelType),disabled:O,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(Ig,{className:"h-3.5 w-3.5"})}),Z&&s.jsx("button",{onClick:o,disabled:j,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(Ig,{className:"h-3.5 w-3.5"})}),!k&&!Z&&A&&s.jsx("button",{onClick:h,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Qf,{className:"h-3.5 w-3.5"})}),!A&&!Z&&s.jsx("button",{onClick:()=>b(M.triggerId),disabled:y!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${M.displayName}`,children:y===M.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(bn,{className:"h-3.5 w-3.5"})})]})]},M.name)})})},tw={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"},aw=()=>{var ge,pe;const n=yu(),[r,u]=z.useState(null),[o,h]=z.useState(!1),[f,j]=z.useState(null),[b,y]=z.useState(!1),{setProjectName:x,addToast:C,selectedProjectId:M,globalModeLoading:D,status:A}=It(),{data:N,loading:O}=qa(Tp,[M],{enabled:!D}),{data:k,loading:Z}=qa(()=>Rp().catch(()=>null),[M],{enabled:!D}),B=A;if(ze.useEffect(()=>{B!=null&&B.projectName&&x(B.projectName)},[B,x]),D||!B||O||Z)return s.jsx(Ha,{message:"Loading dashboard",detail:"Collecting status, schedule, board, and analytics data."});const K=B.prs.length,R=B.prs.filter($=>$.reviewScore!==null&&$.reviewScore<70).length,w=((ge=k==null?void 0:k.columns.Ready)==null?void 0:ge.length)??0,U=((pe=k==null?void 0:k.columns["In Progress"])==null?void 0:pe.length)??0,G=async $=>{u($);try{const J=await jN($),fe=J.results.every(me=>me.success);C({title:fe?"Process Cancelled":"Cancel Failed",message:J.results.map(me=>me.message).join("; "),type:fe?"success":"error"})}catch(J){C({title:"Cancel Failed",message:J instanceof Error?J.message:"Failed to cancel process",type:"error"})}finally{u(null)}},I=async()=>{h(!0);try{await SN(),C({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch($){C({title:"Clear Failed",message:$ instanceof Error?$.message:"Failed to clear lock",type:"error"})}finally{h(!1)}},le=async $=>{j($);try{await Mp($==="planner"?"slicer":$),C({title:"Job Triggered",message:`${$[0].toUpperCase()+$.slice(1)} job has been queued.`,type:"success"})}catch(J){C({title:"Trigger Failed",message:J instanceof Error?J.message:`Failed to trigger ${$}`,type:"error"})}finally{j(null)}},S=async()=>{if(N){y(!0);try{N.paused?(await pc(),C({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await Op(),C({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"}))}catch($){C({title:"Action Failed",message:$ instanceof Error?$.message:"Toggle failed",type:"error"})}finally{y(!1)}}},te=$=>{if(!$)return"Not scheduled";try{const J=new Date($),fe=new Date,me=J.getTime()-fe.getTime(),be=Math.floor(me/6e4);return be<0?"Running now...":be<60?`in ${be} min`:be<1440?`in ${Math.floor(be/60)} hr${be>=120?"s":""}`:`in ${Math.floor(be/1440)} day${be>=2880?"s":""}`}catch{return"Unknown"}},ie=(()=>{var fe,me,be,H,se,he,ye;if(N!=null&&N.paused)return null;const $=[{agent:"Executor",nextRun:(N==null?void 0:N.executor.nextRun)??null},{agent:"Reviewer",nextRun:(N==null?void 0:N.reviewer.nextRun)??null},{agent:"QA",nextRun:((fe=N==null?void 0:N.qa)==null?void 0:fe.nextRun)??null},{agent:"Auditor",nextRun:((me=N==null?void 0:N.audit)==null?void 0:me.nextRun)??null},{agent:"Planner",nextRun:((be=N==null?void 0:N.planner)==null?void 0:be.nextRun)??null},{agent:"Analytics",nextRun:((H=N==null?void 0:N.analytics)==null?void 0:H.nextRun)??null},{agent:"PR Resolver",nextRun:((se=N==null?void 0:N.prResolver)==null?void 0:se.nextRun)??null},{agent:"Merger",nextRun:((he=N==null?void 0:N.merger)==null?void 0:he.nextRun)??null},{agent:"Manager",nextRun:((ye=N==null?void 0:N.manager)==null?void 0:ye.nextRun)??null}];let J=null;for(const Re of $)Re.nextRun&&(!J||new Date(Re.nextRun)<new Date(J.nextRun))&&(J=Re);return J?{agent:J.agent,time:te(J.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(et,{className:"p-5",onClick:()=>n("/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:w})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(Ec,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(et,{className:"p-5",onClick:()=>n("/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:U})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(xp,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(et,{className:"p-5",onClick:()=>n("/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(yp,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${R>0?"text-red-400 font-medium":"text-slate-500"}`,children:R>0?`${R} need work`:"All passing"})]}),s.jsxs(et,{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:N!=null&&N.paused?"Paused":B.crontab.installed?"Active":"Inactive"})]}),s.jsx("button",{onClick:S,disabled:b||!N||!B.crontab.installed,title:N!=null&&N.paused?"Resume scheduling":"Pause scheduling",className:`p-2 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${N!=null&&N.paused?"bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20":B.crontab.installed?"bg-indigo-500/10 text-indigo-400 hover:bg-indigo-500/20":"bg-slate-700/50 text-slate-500"}`,children:b?s.jsx(bc,{className:"h-5 w-5 animate-spin"}):N!=null&&N.paused?s.jsx(bn,{className:"h-5 w-5 fill-current"}):B.crontab.installed?s.jsx(fu,{className:"h-5 w-5"}):s.jsx(pp,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:N!=null&&N.paused?"All schedules paused":B.crontab.installed?`${B.crontab.entries.length} entr${B.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(et,{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:()=>n("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(ew,{processes:B.processes,activePrd:B.activePrd,onCancelProcess:G,onForceClear:I,onViewLog:()=>n("/logs"),cancellingProcess:r,clearingLock:o,onTriggerJob:le,triggeringJob:f})]}),ie?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:ie.agent}),s.jsx("span",{children:ie.time})]}),s.jsxs("button",{onClick:()=>n("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(Wf,{className:"ml-1 h-3 w-3"})]})]}):N!=null&&N.paused?s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-amber-900/20 rounded-lg border border-amber-800/40",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-amber-400",children:[s.jsx(fu,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Automation is paused"})]}),s.jsxs("button",{onClick:S,disabled:b,className:"text-sm text-emerald-400 hover:text-emerald-300 flex items-center transition-colors disabled:opacity-50",children:[b?s.jsx(bc,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):s.jsx(bn,{className:"h-3.5 w-3.5 mr-1.5 fill-current"}),"Resume"]})]}):null,s.jsx(Ap,{variant:"compact",onViewDetails:()=>n("/analytics")}),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:()=>n("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(Wf,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(et,{className:"p-4",children:Z?s.jsx(Ha,{variant:"inline",message:"Loading board"}):k?s.jsx("div",{className:"flex flex-wrap gap-3",children:Vn.map($=>{var fe;const J=((fe=k.columns[$])==null?void 0:fe.length)??0;return s.jsxs("button",{onClick:()=>n("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${tw[$]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:$}),s.jsx("span",{className:"text-xs font-bold",children:J})]},$)})}):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."]})})]})]})},nw=()=>{const[n,r]=z.useState(!0),[u,o]=z.useState(""),[h,f]=z.useState("executor"),j=z.useRef(null),{selectedProjectId:b,globalModeLoading:y}=It(),x=It(R=>R.status),{data:C,loading:M,error:D,refetch:A}=qa(()=>pN(h,500),[h,b],{enabled:!y}),N=(C==null?void 0:C.lines)||[];z.useEffect(()=>{n&&j.current&&(j.current.scrollTop=j.current.scrollHeight)},[N,n]),z.useEffect(()=>{if(!n)return;const R=window.setInterval(()=>{A()},3e3);return()=>window.clearInterval(R)},[n,h,A]);const O=N.filter(R=>R.toLowerCase().includes(u.toLowerCase())),k=R=>{ia("web_ui_action",{uiArea:"logs",action:"select",resource:"logs",jobType:R}),f(R),o("")},Z=()=>{ia("web_ui_action",{uiArea:"logs",action:"refresh",resource:"logs",jobType:h,itemCount:N.length}),A()},B=()=>{const R=!n;ia("web_ui_action",{uiArea:"logs",action:R?"follow":"unfollow",resource:"logs",jobType:h,enabled:R}),r(R)},K=R=>{if(!(x!=null&&x.processes))return!1;const w=x.processes.find(U=>U.name===R);return(w==null?void 0:w.running)??!1};return D?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(jn,{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:D.message}),s.jsx(Le,{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:u,onChange:R=>o(R.target.value)}),s.jsx(Kr,{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.jsx("div",{className:"flex space-x-1",children:wp.map(({processName:R,label:w})=>s.jsx("button",{onClick:()=>k(R),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h===R?"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:w}),K(R)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},R))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Le,{size:"sm",variant:"ghost",onClick:Z,children:[s.jsx($g,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Le,{size:"sm",variant:"ghost",onClick:B,children:[n?s.jsx(fu,{className:"h-4 w-4 mr-2"}):s.jsx(bn,{className:"h-4 w-4 mr-2"}),n?"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: ",h,".log"]}),s.jsxs("span",{children:[O.length," lines"]})]}),s.jsxs("div",{ref:j,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[M?s.jsx(Ha,{variant:"inline",message:"Loading logs"}):O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:u?"No logs match your filter":"No logs yet — logs will appear after the first run"}):O.map((R,w)=>{const U=R.includes("[ERROR]"),G=R.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${U?"text-red-400":G?"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:w+1}),R]},w)}),n&&s.jsx("div",{className:"h-4"})," "]}),!n&&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:B,children:[s.jsx($g,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},lw=()=>{const[n,r]=z.useState(null),[u,o]=z.useState(!1),[h,f]=z.useState("all"),[j,b]=z.useState("number"),[y,x]=z.useState("desc"),{addToast:C,selectedProjectId:M,globalModeLoading:D}=It(),{data:A,loading:N,error:O,refetch:k}=qa(Ep,[M],{enabled:!D}),Z=A??[],B=S=>{switch(S){case"pass":return s.jsx(Ec,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(sj,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(ph,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(jn,{className:"h-4 w-4 text-slate-500"})}},K=S=>{switch(S){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"}},R=S=>S===null?"No review decision yet":S===100?"PR has been approved":S===0?"Changes have been requested":`Review score: ${S}`,w=z.useMemo(()=>Z.filter(S=>{switch(h){case"needs-work":return S.ciStatus==="fail"||S.reviewScore===0;case"pending":return S.ciStatus==="pending"||S.ciStatus==="unknown"||S.reviewScore===null;case"passed":return S.ciStatus==="pass"&&S.reviewScore===100;case"all":default:return!0}}),[Z,h]),U=z.useMemo(()=>[...w].sort((te,ae)=>{let ie=0;switch(j){case"number":ie=te.number-ae.number;break;case"title":ie=te.title.localeCompare(ae.title);break;case"branch":ie=te.branch.localeCompare(ae.branch);break;case"ciStatus":{const ge={fail:0,pending:1,unknown:2,pass:3};ie=(ge[te.ciStatus]??2)-(ge[ae.ciStatus]??2);break}case"reviewScore":{const ge=te.reviewScore??-1,pe=ae.reviewScore??-1;ie=ge-pe;break}}return y==="asc"?ie:-ie}),[w,j,y]),G=S=>{j===S?x(y==="asc"?"desc":"asc"):(b(S),x("desc"))},I=S=>j!==S?s.jsx(A1,{className:"h-3 w-3 text-slate-600"}):y==="asc"?s.jsx(z1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(R1,{className:"h-3 w-3 text-indigo-400"});if(N)return s.jsx(Ha,{message:"Loading pull requests",detail:"Fetching review status and CI results."});if(O)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(jn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:O.message}),s.jsx(Le,{onClick:()=>k(),children:"Retry"})]});const le=async()=>{o(!0);try{const S=await bN();C({title:"Reviewer Started",message:S.pid?`Started with PID ${S.pid}`:"Reviewer started",type:"success"})}catch(S){C({title:"Reviewer Failed",message:S instanceof Error?S.message:"Failed to start reviewer",type:"error"})}finally{o(!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:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),s.jsxs(Le,{size:"sm",onClick:le,disabled:u,children:[s.jsx(Kr,{className:"h-4 w-4 mr-2"}),u?"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:()=>G("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),I("number")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),I("branch")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),I("ciStatus")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),I("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[U.map(S=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(n===S.number?null:S.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:["#",S.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:S.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:S.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:K(S.ciStatus),children:[B(S.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:S.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:S.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:R(S.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${S.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${S.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${S.reviewScore>=70?"text-green-500":"text-red-500"}`,children:S.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:S.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:te=>te.stopPropagation(),children:s.jsx(bp,{className:"h-4 w-4"})})})]},S.number)),U.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Z.length===0?"No open PRs found.":`No PRs match the "${h}" filter.`})})]})]})}),n&&s.jsx(et,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const S=Z.find(te=>te.number===n);return S?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:S.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:S.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:K(S.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:[B(S.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:S.ciStatus})]})]}),S.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:R(S.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${S.reviewScore>=70?"text-green-500":"text-red-500"}`,children:S.reviewScore})]})]})]}):null})()})]})},Bt=ze.forwardRef(({className:n="",label:r,checked:u,onChange:o,...h},f)=>{const j=b=>{o&&o(b.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${n}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:u,onChange:j,...h}),s.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),r&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:r})]})});Bt.displayName="Switch";const sw=()=>{const{addToast:n,selectedProjectId:r,globalModeLoading:u}=It(),[o,h]=z.useState(!1),[f,j]=z.useState(!1),{data:b,loading:y,error:x,refetch:C}=qa(ON,[r],{enabled:!u});z.useEffect(()=>{if(!(b!=null&&b.enabled))return;const B=setInterval(()=>{C()},1e4);return()=>clearInterval(B)},[b==null?void 0:b.enabled,C]);const M=async B=>{j(!0);try{await kp(B),n({title:B?"Scanner Enabled":"Scanner Disabled",message:B?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:B?"success":"info"}),C()}catch(K){n({title:"Toggle Failed",message:K instanceof Error?K.message:"Failed to toggle scanner",type:"error"})}finally{j(!1)}},D=async()=>{h(!0);try{const B=await RN();B.created.length>0?n({title:"Scan Complete",message:`Created ${B.created.length} PRD(s): ${B.created.join(", ")}`,type:"success"}):n({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),B.errors.length>0&&n({title:"Scan Errors",message:B.errors.join("; "),type:"warning"}),C()}catch(B){n({title:"Scan Failed",message:B instanceof Error?B.message:"Failed to scan roadmap",type:"error"})}finally{h(!1)}};if(y)return s.jsx(Ha,{message:"Loading roadmap scanner",detail:"Checking scanner status and roadmap items."});if(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(jn,{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:x.message}),s.jsx(Le,{onClick:()=>C(),children:"Retry"})]});if(!b)return null;if(b.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(et,{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(jp,{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 A=b.totalItems>0?Math.round(b.processedItems/b.totalItems*100):0,N=iw(b.status),O=cw(b.items),k=b.lastScan?ow(b.lastScan):"Never",Z=b.autoScanInterval?Math.round(b.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(Bt,{label:b.enabled?"Enabled":"Disabled",checked:b.enabled,onChange:M,disabled:f}),s.jsxs(Le,{onClick:D,loading:o,disabled:!b.enabled||b.status==="complete",children:[s.jsx(bn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(et,{className:`p-6 border-2 ${N.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(N.icon,{className:`h-8 w-8 ${N.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 ${N.textColor}`,children:N.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})]}),b.enabled&&b.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",Z," min"]})]}),b.enabled&&b.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(et,{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:[b.processedItems," / ",b.totalItems," items (",A,"%)"]})]}),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 ${A===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${A}%`}})})]}),Object.entries(O).map(([B,K])=>s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:B}),s.jsx("div",{className:"space-y-2",children:K.map(R=>s.jsx(rw,{item:R},R.hash))})]},B))]})};function rw({item:n}){const r=n.checked,u=n.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"bg-slate-950/30 border-slate-800/50":u?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx(Rj,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):u?s.jsx(Ec,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Qf,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${r?"line-through text-slate-600":"text-slate-200"}`,children:n.title}),n.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:n.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:r?s.jsx(Tt,{variant:"neutral",children:"Skipped"}):u?s.jsx(Tt,{variant:"success",children:n.prdFile||"Processed"}):s.jsx(Tt,{variant:"warning",children:"Pending"})})]})}function iw(n){switch(n){case"complete":return{label:"Complete",icon:Ec,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:yp,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:bn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:jn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:jn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function cw(n){const r={};for(const u of n){const o=u.section||"General";r[o]||(r[o]=[]),r[o].push(u)}return r}function ow(n){try{const r=new Date(n),o=new Date().getTime()-r.getTime(),h=Math.floor(o/6e4);if(h<1)return"Just now";if(h<60)return`${h} min ago`;const f=Math.floor(h/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const We=ze.forwardRef(({className:n="",label:r,error:u,helperText:o,options:h,value:f,onChange:j,children:b,...y},x)=>{const C=ze.useId(),M=y.id??C,D=u?`${M}-error`:void 0,A=!u&&o?`${M}-help`:void 0,N=[D,A].filter(Boolean).join(" ")||void 0,O=k=>{j&&j(k.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:M,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:x,id:M,"aria-describedby":N,"aria-invalid":u?!0:y["aria-invalid"],className:`
425
+ w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
426
+ px-3 py-2 pr-10 text-sm text-slate-200
427
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
428
+ disabled:opacity-50 disabled:cursor-not-allowed
429
+ transition-all duration-200
430
+ ${u?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
431
+ ${n}
432
+ `,value:f,onChange:O,...y,children:h?h.map(k=>s.jsx("option",{value:k.value,children:k.label},k.value)):b}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(mh,{className:"h-4 w-4"})})]}),u?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-red-400",children:u}):o?s.jsx("p",{id:A,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});We.displayName="Select";const je=ze.forwardRef(({className:n="",label:r,error:u,helperText:o,rightIcon:h,...f},j)=>{const b=ze.useId(),y=f.id??b,x=u?`${y}-error`:void 0,C=!u&&o?`${y}-help`:void 0,M=[x,C].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:y,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:j,id:y,"aria-describedby":M,"aria-invalid":u?!0:f["aria-invalid"],className:`
433
+ w-full rounded-lg bg-slate-950 border border-slate-800
434
+ px-3 py-2 text-sm text-slate-200
435
+ placeholder:text-slate-600
436
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
437
+ disabled:opacity-50 disabled:cursor-not-allowed
438
+ transition-all duration-200
439
+ ${u?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
440
+ ${h?"pr-10":""}
441
+ ${n}
442
+ `,...f}),h&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:h})]}),u?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:u}):o?s.jsx("p",{id:C,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});je.displayName="Input";const zp=({tabs:n,activeTab:r,onChange:u,className:o=""})=>{var y,x;const[h,f]=ze.useState((y=n[0])==null?void 0:y.id),j=r||h,b=C=>{u?u(C):f(C)};return s.jsxs("div",{className:`flex flex-col ${o}`,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:n.map(C=>s.jsx("button",{onClick:()=>b(C.id),className:`
443
+ whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
444
+ ${j===C.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
445
+ `,children:C.label},C.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=n.find(C=>C.id===j))==null?void 0:x.content})]})};var Bs={},Ua={},sc={},$s={},Vf={},ox;function uw(){return ox||(ox=1,Object.defineProperty(Vf,"__esModule",{value:!0})),Vf}var rc={},ic={},ux;function Xs(){var r,u,o,h,f,Lp,b;if(ux)return ic;ux=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.CronField=void 0;let n=(b=class{constructor(x,C={rawValue:""}){at(this,f);at(this,r,!1);at(this,u,!1);at(this,o,!1);at(this,h,[]);Sg(this,"options",{rawValue:""});if(!Array.isArray(x))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(x.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...C,rawValue:C.rawValue??""},Oe(this,h,x.sort(b.sorter)),Oe(this,o,this.options.wildcard!==void 0?this.options.wildcard:Te(this,f,Lp).call(this)),Oe(this,r,this.options.rawValue.includes("L")||x.includes("L")),Oe(this,u,this.options.rawValue.includes("?")||x.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return ee(this,r)}get hasQuestionMarkChar(){return ee(this,u)}get isWildcard(){return ee(this,o)}get values(){return ee(this,h)}static sorter(x,C){const M=typeof x=="number",D=typeof C=="number";return M&&D?x-C:!M&&!D?x.localeCompare(C):M?-1:1}static findNearestValueInList(x,C,M=!1){if(M){for(let D=x.length-1;D>=0;D--)if(x[D]<C)return x[D];return null}for(let D=0;D<x.length;D++)if(x[D]>C)return x[D];return null}findNearestValue(x,C=!1){return this.constructor.findNearestValueInList(this.values,x,C)}serialize(){return{wildcard:ee(this,o),values:ee(this,h)}}validate(){let x;const C=this.chars.length>0?` or chars ${this.chars.join("")}`:"",M=O=>k=>new RegExp(`^\\d{0,2}${k}$`).test(O),D=O=>(x=O,typeof O=="number"?O>=this.min&&O<=this.max:this.chars.some(M(O)));if(!ee(this,h).every(D))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${C}`);const N=ee(this,h).find((O,k)=>ee(this,h).indexOf(O)!==k);if(N)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${N}`)}},r=new WeakMap,u=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakSet,Lp=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,C)=>C+this.min).every(x=>ee(this,h).includes(x))},b);return ic.CronField=n,ic}var dx;function dw(){if(dx)return rc;dx=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.CronDayOfMonth=void 0;const n=Xs(),r=1,u=31,o=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return rc.CronDayOfMonth=h,rc}var cc={},fx;function fw(){if(fx)return cc;fx=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.CronDayOfWeek=void 0;const n=Xs(),r=0,u=7,o=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return cc.CronDayOfWeek=h,cc}var oc={},hx;function hw(){if(hx)return oc;hx=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.CronHour=void 0;const n=Xs(),r=0,u=23,o=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return oc.CronHour=h,oc}var uc={},mx;function mw(){if(mx)return uc;mx=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.CronMinute=void 0;const n=Xs(),r=0,u=59,o=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return uc.CronMinute=h,uc}var dc={},Pf={},Ma={},gx;function gw(){if(gx)return Ma;gx=1,Object.defineProperty(Ma,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class u extends n{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class o extends n{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class h extends n{}class f extends n{constructor(i){super(`Invalid unit ${i}`)}}class j extends n{}class b extends n{constructor(){super("Zone is an abstract class")}}const y="numeric",x="short",C="long",M={year:y,month:y,day:y},D={year:y,month:x,day:y},A={year:y,month:x,day:y,weekday:x},N={year:y,month:C,day:y},O={year:y,month:C,day:y,weekday:C},k={hour:y,minute:y},Z={hour:y,minute:y,second:y},B={hour:y,minute:y,second:y,timeZoneName:x},K={hour:y,minute:y,second:y,timeZoneName:C},R={hour:y,minute:y,hourCycle:"h23"},w={hour:y,minute:y,second:y,hourCycle:"h23"},U={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:x},G={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:C},I={year:y,month:y,day:y,hour:y,minute:y},le={year:y,month:y,day:y,hour:y,minute:y,second:y},S={year:y,month:x,day:y,hour:y,minute:y},te={year:y,month:x,day:y,hour:y,minute:y,second:y},ae={year:y,month:x,day:y,weekday:x,hour:y,minute:y},ie={year:y,month:C,day:y,hour:y,minute:y,timeZoneName:x},ge={year:y,month:C,day:y,hour:y,minute:y,second:y,timeZoneName:x},pe={year:y,month:C,day:y,weekday:C,hour:y,minute:y,timeZoneName:C},$={year:y,month:C,day:y,weekday:C,hour:y,minute:y,second:y,timeZoneName:C};class J{get type(){throw new b}get name(){throw new b}get ianaName(){return this.name}get isUniversal(){throw new b}offsetName(i,m){throw new b}formatOffset(i,m){throw new b}offset(i){throw new b}equals(i){throw new b}get isValid(){throw new b}}let fe=null;class me extends J{static get instance(){return fe===null&&(fe=new me),fe}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return Fn(i,m,v)}formatOffset(i,m){return fs(this.offset(i),m)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const be=new Map;function H(g){let i=be.get(g);return i===void 0&&(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),be.set(g,i)),i}const se={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function he(g,i){const m=g.format(i).replace(/\u200E/g,""),v=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(m),[,E,_,q,V,Y,de,Ne]=v;return[q,E,_,V,Y,de,Ne]}function ye(g,i){const m=g.formatToParts(i),v=[];for(let E=0;E<m.length;E++){const{type:_,value:q}=m[E],V=se[_];_==="era"?v[V]=q:ke(V)||(v[V]=parseInt(q,10))}return v}const Re=new Map;class xe extends J{static create(i){let m=Re.get(i);return m===void 0&&Re.set(i,m=new xe(i)),m}static resetCache(){Re.clear(),be.clear()}static isValidSpecifier(i){return this.isValidZone(i)}static isValidZone(i){if(!i)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:i}).format(),!0}catch{return!1}}constructor(i){super(),this.zoneName=i,this.valid=xe.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return Fn(i,m,v,this.name)}formatOffset(i,m){return fs(this.offset(i),m)}offset(i){if(!this.valid)return NaN;const m=new Date(i);if(isNaN(m))return NaN;const v=H(this.name);let[E,_,q,V,Y,de,Ne]=v.formatToParts?ye(v,m):he(v,m);V==="BC"&&(E=-Math.abs(E)+1);const Fe=ta({year:E,month:_,day:q,hour:Y===24?0:Y,minute:de,second:Ne,millisecond:0});let Ae=+m;const Nt=Ae%1e3;return Ae-=Nt>=0?Nt:1e3+Nt,(Fe-Ae)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let Se={};function lt(g,i={}){const m=JSON.stringify([g,i]);let v=Se[m];return v||(v=new Intl.ListFormat(g,i),Se[m]=v),v}const Ye=new Map;function wt(g,i={}){const m=JSON.stringify([g,i]);let v=Ye.get(m);return v===void 0&&(v=new Intl.DateTimeFormat(g,i),Ye.set(m,v)),v}const fa=new Map;function Oa(g,i={}){const m=JSON.stringify([g,i]);let v=fa.get(m);return v===void 0&&(v=new Intl.NumberFormat(g,i),fa.set(m,v)),v}const Ba=new Map;function ha(g,i={}){const{base:m,...v}=i,E=JSON.stringify([g,v]);let _=Ba.get(E);return _===void 0&&(_=new Intl.RelativeTimeFormat(g,i),Ba.set(E,_)),_}let xa=null;function wn(){return xa||(xa=new Intl.DateTimeFormat().resolvedOptions().locale,xa)}const Sn=new Map;function Cn(g){let i=Sn.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),Sn.set(g,i)),i}const $a=new Map;function Ya(g){let i=$a.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...xl,...i}),$a.set(g,i)}return i}function Wt(g){const i=g.indexOf("-x-");i!==-1&&(g=g.substring(0,i));const m=g.indexOf("-u-");if(m===-1)return[g];{let v,E;try{v=wt(g).resolvedOptions(),E=g}catch{const Y=g.substring(0,m);v=wt(Y).resolvedOptions(),E=Y}const{numberingSystem:_,calendar:q}=v;return[E,_,q]}}function Ga(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function ns(g){const i=[];for(let m=1;m<=12;m++){const v=Me.utc(2009,m,1);i.push(g(v))}return i}function vt(g){const i=[];for(let m=1;m<=7;m++){const v=Me.utc(2016,11,13+m);i.push(g(v))}return i}function Kt(g,i,m,v){const E=g.listingMode();return E==="error"?null:E==="en"?m(i):v(i)}function Bn(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||Cn(g.locale).numberingSystem==="latn"}class Js{constructor(i,m,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:E,floor:_,...q}=v;if(!m||Object.keys(q).length>0){const V={useGrouping:!1,...v};v.padTo>0&&(V.minimumIntegerDigits=v.padTo),this.inf=Oa(i,V)}}format(i){if(this.inf){const m=this.floor?Math.floor(i):i;return this.inf.format(m)}else{const m=this.floor?Math.floor(i):os(i,3);return st(m,this.padTo)}}}class ls{constructor(i,m,v){this.opts=v,this.originalZone=void 0;let E;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const q=-1*(i.offset/60),V=q>=0?`Etc/GMT+${q}`:`Etc/GMT${q}`;i.offset!==0&&xe.create(V).valid?(E=V,this.dt=i):(E="UTC",this.dt=i.offset===0?i:i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone)}else i.zone.type==="system"?this.dt=i:i.zone.type==="iana"?(this.dt=i,E=i.zone.name):(E="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const _={...this.opts};_.timeZone=_.timeZone||E,this.dtf=wt(m,_)}format(){return this.originalZone?this.formatToParts().map(({value:i})=>i).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const i=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?i.map(m=>{if(m.type==="timeZoneName"){const v=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...m,value:v}}else return m}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class ti{constructor(i,m,v){this.opts={style:"long",...v},!m&&li()&&(this.rtf=ha(i,v))}format(i,m){return this.rtf?this.rtf.format(i,m):On(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const xl={firstDay:1,minimalDays:4,weekend:[6,7]};class Qe{static fromOpts(i){return Qe.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,m,v,E,_=!1){const q=i||mt.defaultLocale,V=q||(_?"en-US":wn()),Y=m||mt.defaultNumberingSystem,de=v||mt.defaultOutputCalendar,Ne=si(E)||mt.defaultWeekSettings;return new Qe(V,Y,de,Ne,q)}static resetCache(){xa=null,Ye.clear(),fa.clear(),Ba.clear(),Sn.clear(),$a.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:v,weekSettings:E}={}){return Qe.create(i,m,v,E)}constructor(i,m,v,E,_){const[q,V,Y]=Wt(i);this.locale=q,this.numberingSystem=m||V||null,this.outputCalendar=v||Y||null,this.weekSettings=E,this.intl=Ga(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=_,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Bn(this)),this.fastNumbersCached}listingMode(){const i=this.isEnglish(),m=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&m?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:Qe.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,si(i.weekSettings)||this.weekSettings,i.defaultToEN||!1)}redefaultToEN(i={}){return this.clone({...i,defaultToEN:!0})}redefaultToSystem(i={}){return this.clone({...i,defaultToEN:!1})}months(i,m=!1){return Kt(this,i,zc,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");m&=!v;const E=m?{month:i,day:"numeric"}:{month:i},_=m?"format":"standalone";if(!this.monthsCache[_][i]){const q=v?V=>this.dtFormatter(V,E).format():V=>this.extract(V,E,"month");this.monthsCache[_][i]=ns(q)}return this.monthsCache[_][i]})}weekdays(i,m=!1){return Kt(this,i,or,()=>{const v=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},E=m?"format":"standalone";return this.weekdaysCache[E][i]||(this.weekdaysCache[E][i]=vt(_=>this.extract(_,v,"weekday"))),this.weekdaysCache[E][i]})}meridiems(){return Kt(this,void 0,()=>In,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Me.utc(2016,11,13,9),Me.utc(2016,11,13,19)].map(m=>this.extract(m,i,"dayperiod"))}return this.meridiemCache})}eras(i){return Kt(this,i,ui,()=>{const m={era:i};return this.eraCache[i]||(this.eraCache[i]=[Me.utc(-40,1,1),Me.utc(2017,1,1)].map(v=>this.extract(v,m,"era"))),this.eraCache[i]})}extract(i,m,v){const E=this.dtFormatter(i,m),_=E.formatToParts(),q=_.find(V=>V.type.toLowerCase()===v);return q?q.value:null}numberFormatter(i={}){return new Js(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new ls(i,this.intl,m)}relFormatter(i={}){return new ti(this.intl,this.isEnglish(),i)}listFormatter(i={}){return lt(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Cn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Tn()?Ya(this.locale):xl}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(i){return this.locale===i.locale&&this.numberingSystem===i.numberingSystem&&this.outputCalendar===i.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let pl=null;class gt extends J{static get utcInstance(){return pl===null&&(pl=new gt(0)),pl}static instance(i){return i===0?gt.utcInstance:new gt(i)}static parseSpecifier(i){if(i){const m=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(m)return new gt(ds(m[1],m[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${fs(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${fs(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,m){return fs(this.fixed,m)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}class $t extends J{constructor(i){super(),this.zoneName=i}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function _t(g,i){if(ke(g)||g===null)return i;if(g instanceof J)return g;if(Lt(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?me.instance:m==="utc"||m==="gmt"?gt.utcInstance:gt.parseSpecifier(m)||xe.create(g)}else return va(g)?gt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new $t(g)}const zt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ss={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ks=zt.hanidec.replace(/[\[|\]]/g,"").split("");function er(g){let i=parseInt(g,10);if(isNaN(i)){i="";for(let m=0;m<g.length;m++){const v=g.charCodeAt(m);if(g[m].search(zt.hanidec)!==-1)i+=Ks.indexOf(g[m]);else for(const E in ss){const[_,q]=ss[E];v>=_&&v<=q&&(i+=v-_)}}return parseInt(i,10)}else return i}const sn=new Map;function oe(){sn.clear()}function ve({numberingSystem:g},i=""){const m=g||"latn";let v=sn.get(m);v===void 0&&(v=new Map,sn.set(m,v));let E=v.get(i);return E===void 0&&(E=new RegExp(`${zt[m]}${i}`),v.set(i,E)),E}let Pe=()=>Date.now(),St="system",ht=null,En=null,rs=null,tr=60,vl,Tc=null;class mt{static get now(){return Pe}static set now(i){Pe=i}static set defaultZone(i){St=i}static get defaultZone(){return _t(St,me.instance)}static get defaultLocale(){return ht}static set defaultLocale(i){ht=i}static get defaultNumberingSystem(){return En}static set defaultNumberingSystem(i){En=i}static get defaultOutputCalendar(){return rs}static set defaultOutputCalendar(i){rs=i}static get defaultWeekSettings(){return Tc}static set defaultWeekSettings(i){Tc=si(i)}static get twoDigitCutoffYear(){return tr}static set twoDigitCutoffYear(i){tr=i%100}static get throwOnInvalid(){return vl}static set throwOnInvalid(i){vl=i}static resetCaches(){Qe.resetCache(),xe.resetCache(),Me.resetCache(),oe()}}class pa{constructor(i,m){this.reason=i,this.explanation=m}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ai=[0,31,59,90,120,151,181,212,243,273,304,334],ar=[0,31,60,91,121,152,182,213,244,274,305,335];function ca(g,i){return new pa("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function nr(g,i,m){const v=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const E=v.getUTCDay();return E===0?7:E}function ni(g,i,m){return m+(bl(g)?ar:ai)[i-1]}function rn(g,i){const m=bl(g)?ar:ai,v=m.findIndex(_=>_<i),E=i-m[v];return{month:v+1,day:E}}function Mt(g,i){return(g-i+7)%7+1}function Yt(g,i=4,m=1){const{year:v,month:E,day:_}=g,q=ni(v,E,_),V=Mt(nr(v,E,_),m);let Y=Math.floor((q-V+14-i)/7),de;return Y<1?(de=v-1,Y=jl(de,i,m)):Y>jl(v,i,m)?(de=v+1,Y=1):de=v,{weekYear:de,weekNumber:Y,weekday:V,...hs(g)}}function $n(g,i=4,m=1){const{weekYear:v,weekNumber:E,weekday:_}=g,q=Mt(nr(v,1,i),m),V=on(v);let Y=E*7+_-q-7+i,de;Y<1?(de=v-1,Y+=on(de)):Y>V?(de=v+1,Y-=on(v)):de=v;const{month:Ne,day:Ue}=rn(de,Y);return{year:de,month:Ne,day:Ue,...hs(g)}}function is(g){const{year:i,month:m,day:v}=g,E=ni(i,m,v);return{year:i,ordinal:E,...hs(g)}}function Mc(g){const{year:i,ordinal:m}=g,{month:v,day:E}=rn(i,m);return{year:i,month:v,day:E,...hs(g)}}function Oc(g,i){if(!ke(g.localWeekday)||!ke(g.localWeekNumber)||!ke(g.localWeekYear)){if(!ke(g.weekday)||!ke(g.weekNumber)||!ke(g.weekYear))throw new h("Cannot mix locale-based week fields with ISO-based week fields");return ke(g.localWeekday)||(g.weekday=g.localWeekday),ke(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),ke(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:i.getMinDaysInFirstWeek(),startOfWeek:i.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Rc(g,i=4,m=1){const v=cn(g.weekYear),E=ea(g.weekNumber,1,jl(g.weekYear,i,m)),_=ea(g.weekday,1,7);return v?E?_?!1:ca("weekday",g.weekday):ca("week",g.weekNumber):ca("weekYear",g.weekYear)}function cs(g){const i=cn(g.year),m=ea(g.ordinal,1,on(g.year));return i?m?!1:ca("ordinal",g.ordinal):ca("year",g.year)}function lr(g){const i=cn(g.year),m=ea(g.month,1,12),v=ea(g.day,1,rr(g.year,g.month));return i?m?v?!1:ca("day",g.day):ca("month",g.month):ca("year",g.year)}function Yn(g){const{hour:i,minute:m,second:v,millisecond:E}=g,_=ea(i,0,23)||i===24&&m===0&&v===0&&E===0,q=ea(m,0,59),V=ea(v,0,59),Y=ea(E,0,999);return _?q?V?Y?!1:ca("millisecond",E):ca("second",v):ca("minute",m):ca("hour",i)}function ke(g){return typeof g>"u"}function va(g){return typeof g=="number"}function cn(g){return typeof g=="number"&&g%1===0}function Lt(g){return typeof g=="string"}function Dc(g){return Object.prototype.toString.call(g)==="[object Date]"}function li(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Tn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function yl(g){return Array.isArray(g)?g:[g]}function kc(g,i,m){if(g.length!==0)return g.reduce((v,E)=>{const _=[i(E),E];return v&&m(v[0],_[0])===v[0]?v:_},null)[1]}function Ac(g,i){return i.reduce((m,v)=>(m[v]=g[v],m),{})}function Gn(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function si(g){if(g==null)return null;if(typeof g!="object")throw new j("Week settings must be an object");if(!ea(g.firstDay,1,7)||!ea(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!ea(i,1,7)))throw new j("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function ea(g,i,m){return cn(g)&&g>=i&&g<=m}function sr(g,i){return g-i*Math.floor(g/i)}function st(g,i=2){const m=g<0;let v;return m?v="-"+(""+-g).padStart(i,"0"):v=(""+g).padStart(i,"0"),v}function Ot(g){if(!(ke(g)||g===null||g===""))return parseInt(g,10)}function Mn(g){if(!(ke(g)||g===null||g===""))return parseFloat(g)}function ri(g){if(!(ke(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function os(g,i,m="round"){const v=10**i;switch(m){case"expand":return g>0?Math.ceil(g*v)/v:Math.floor(g*v)/v;case"trunc":return Math.trunc(g*v)/v;case"round":return Math.round(g*v)/v;case"floor":return Math.floor(g*v)/v;case"ceil":return Math.ceil(g*v)/v;default:throw new RangeError(`Value rounding ${m} is out of range`)}}function bl(g){return g%4===0&&(g%100!==0||g%400===0)}function on(g){return bl(g)?366:365}function rr(g,i){const m=sr(i-1,12)+1,v=g+(i-m)/12;return m===2?bl(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function ta(g){let i=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(i=new Date(i),i.setUTCFullYear(g.year,g.month-1,g.day)),+i}function ir(g,i,m){return-Mt(nr(g,1,i),m)+i-1}function jl(g,i=4,m=1){const v=ir(g,i,m),E=ir(g+1,i,m);return(on(g)-v+E)/7}function us(g){return g>99?g:g>mt.twoDigitCutoffYear?1900+g:2e3+g}function Fn(g,i,m,v=null){const E=new Date(g),_={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};v&&(_.timeZone=v);const q={timeZoneName:i,..._},V=new Intl.DateTimeFormat(m,q).formatToParts(E).find(Y=>Y.type.toLowerCase()==="timezonename");return V?V.value:null}function ds(g,i){let m=parseInt(g,10);Number.isNaN(m)&&(m=0);const v=parseInt(i,10)||0,E=m<0||Object.is(m,-0)?-v:v;return m*60+E}function ii(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new j(`Invalid unit value ${g}`);return i}function un(g,i){const m={};for(const v in g)if(Gn(g,v)){const E=g[v];if(E==null)continue;m[i(v)]=ii(E)}return m}function fs(g,i){const m=Math.trunc(Math.abs(g/60)),v=Math.trunc(Math.abs(g%60)),E=g>=0?"+":"-";switch(i){case"short":return`${E}${st(m,2)}:${st(v,2)}`;case"narrow":return`${E}${m}${v>0?`:${v}`:""}`;case"techie":return`${E}${st(m,2)}${st(v,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function hs(g){return Ac(g,["hour","minute","second","millisecond"])}const _c=["January","February","March","April","May","June","July","August","September","October","November","December"],cr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Eu=["J","F","M","A","M","J","J","A","S","O","N","D"];function zc(g){switch(g){case"narrow":return[...Eu];case"short":return[...cr];case"long":return[..._c];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ms=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Fa=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ci=["M","T","W","T","F","S","S"];function or(g){switch(g){case"narrow":return[...ci];case"short":return[...Fa];case"long":return[...ms];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const In=["AM","PM"],Nl=["Before Christ","Anno Domini"],Lc=["BC","AD"],oi=["B","A"];function ui(g){switch(g){case"narrow":return[...oi];case"short":return[...Lc];case"long":return[...Nl];default:return null}}function gs(g){return In[g.hour<12?0:1]}function dn(g,i){return or(i)[g.weekday-1]}function di(g,i){return zc(i)[g.month-1]}function xs(g,i){return ui(i)[g.year<0?0:1]}function On(g,i,m="always",v=!1){const E={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},_=["hours","minutes","seconds"].indexOf(g)===-1;if(m==="auto"&&_){const Ue=g==="days";switch(i){case 1:return Ue?"tomorrow":`next ${E[g][0]}`;case-1:return Ue?"yesterday":`last ${E[g][0]}`;case 0:return Ue?"today":`this ${E[g][0]}`}}const q=Object.is(i,-0)||i<0,V=Math.abs(i),Y=V===1,de=E[g],Ne=v?Y?de[1]:de[2]||de[1]:Y?E[g][0]:g;return q?`${V} ${Ne} ago`:`in ${V} ${Ne}`}function ur(g,i){let m="";for(const v of g)v.literal?m+=v.val:m+=i(v.val);return m}const dr={D:M,DD:D,DDD:N,DDDD:O,t:k,tt:Z,ttt:B,tttt:K,T:R,TT:w,TTT:U,TTTT:G,f:I,ff:S,fff:ie,ffff:pe,F:le,FF:te,FFF:ge,FFFF:$};class Gt{static create(i,m={}){return new Gt(i,m)}static parseFormat(i){let m=null,v="",E=!1;const _=[];for(let q=0;q<i.length;q++){const V=i.charAt(q);V==="'"?((v.length>0||E)&&_.push({literal:E||/^\s+$/.test(v),val:v===""?"'":v}),m=null,v="",E=!E):E||V===m?v+=V:(v.length>0&&_.push({literal:/^\s+$/.test(v),val:v}),v=V,m=V)}return v.length>0&&_.push({literal:E||/^\s+$/.test(v),val:v}),_}static macroTokenToFormatOpts(i){return dr[i]}constructor(i,m){this.opts=m,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,m){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,{...this.opts,...m}).format()}dtFormatter(i,m={}){return this.loc.dtFormatter(i,{...this.opts,...m})}formatDateTime(i,m){return this.dtFormatter(i,m).format()}formatDateTimeParts(i,m){return this.dtFormatter(i,m).formatToParts()}formatInterval(i,m){return this.dtFormatter(i.start,m).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,m){return this.dtFormatter(i,m).resolvedOptions()}num(i,m=0,v=void 0){if(this.opts.forceSimple)return st(i,m);const E={...this.opts};return m>0&&(E.padTo=m),v&&(E.signDisplay=v),this.loc.numberFormatter(E).format(i)}formatDateTimeFromString(i,m){const v=this.loc.listingMode()==="en",E=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",_=(Ae,Nt)=>this.loc.extract(i,Ae,Nt),q=Ae=>i.isOffsetFixed&&i.offset===0&&Ae.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,Ae.format):"",V=()=>v?gs(i):_({hour:"numeric",hourCycle:"h12"},"dayperiod"),Y=(Ae,Nt)=>v?di(i,Ae):_(Nt?{month:Ae}:{month:Ae,day:"numeric"},"month"),de=(Ae,Nt)=>v?dn(i,Ae):_(Nt?{weekday:Ae}:{weekday:Ae,month:"long",day:"numeric"},"weekday"),Ne=Ae=>{const Nt=Gt.macroTokenToFormatOpts(Ae);return Nt?this.formatWithSystemDefault(i,Nt):Ae},Ue=Ae=>v?xs(i,Ae):_({era:Ae},"era"),Fe=Ae=>{switch(Ae){case"S":return this.num(i.millisecond);case"u":case"SSS":return this.num(i.millisecond,3);case"s":return this.num(i.second);case"ss":return this.num(i.second,2);case"uu":return this.num(Math.floor(i.millisecond/10),2);case"uuu":return this.num(Math.floor(i.millisecond/100));case"m":return this.num(i.minute);case"mm":return this.num(i.minute,2);case"h":return this.num(i.hour%12===0?12:i.hour%12);case"hh":return this.num(i.hour%12===0?12:i.hour%12,2);case"H":return this.num(i.hour);case"HH":return this.num(i.hour,2);case"Z":return q({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return q({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return q({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return V();case"d":return E?_({day:"numeric"},"day"):this.num(i.day);case"dd":return E?_({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return de("short",!0);case"cccc":return de("long",!0);case"ccccc":return de("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return de("short",!1);case"EEEE":return de("long",!1);case"EEEEE":return de("narrow",!1);case"L":return E?_({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return E?_({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return Y("short",!0);case"LLLL":return Y("long",!0);case"LLLLL":return Y("narrow",!0);case"M":return E?_({month:"numeric"},"month"):this.num(i.month);case"MM":return E?_({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return Y("short",!1);case"MMMM":return Y("long",!1);case"MMMMM":return Y("narrow",!1);case"y":return E?_({year:"numeric"},"year"):this.num(i.year);case"yy":return E?_({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return E?_({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return E?_({year:"numeric"},"year"):this.num(i.year,6);case"G":return Ue("short");case"GG":return Ue("long");case"GGGGG":return Ue("narrow");case"kk":return this.num(i.weekYear.toString().slice(-2),2);case"kkkk":return this.num(i.weekYear,4);case"W":return this.num(i.weekNumber);case"WW":return this.num(i.weekNumber,2);case"n":return this.num(i.localWeekNumber);case"nn":return this.num(i.localWeekNumber,2);case"ii":return this.num(i.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(i.localWeekYear,4);case"o":return this.num(i.ordinal);case"ooo":return this.num(i.ordinal,3);case"q":return this.num(i.quarter);case"qq":return this.num(i.quarter,2);case"X":return this.num(Math.floor(i.ts/1e3));case"x":return this.num(i.ts);default:return Ne(Ae)}};return ur(Gt.parseFormat(m),Fe)}formatDurationFromString(i,m){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,E=Ne=>{switch(Ne[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},_=(Ne,Ue)=>Fe=>{const Ae=E(Fe);if(Ae){const Nt=Ue.isNegativeDuration&&Ae!==Ue.largestUnit?v:1;let Qt;return this.opts.signMode==="negativeLargestOnly"&&Ae!==Ue.largestUnit?Qt="never":this.opts.signMode==="all"?Qt="always":Qt="auto",this.num(Ne.get(Ae)*Nt,Fe.length,Qt)}else return Fe},q=Gt.parseFormat(m),V=q.reduce((Ne,{literal:Ue,val:Fe})=>Ue?Ne:Ne.concat(Fe),[]),Y=i.shiftTo(...V.map(E).filter(Ne=>Ne)),de={isNegativeDuration:Y<0,largestUnit:Object.keys(Y.values)[0]};return ur(q,_(Y,de))}}const ps=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function fn(...g){const i=g.reduce((m,v)=>m+v.source,"");return RegExp(`^${i}$`)}function Zn(...g){return i=>g.reduce(([m,v,E],_)=>{const[q,V,Y]=_(i,E);return[{...m,...q},V||v,Y]},[{},null,1]).slice(0,2)}function Rt(g,...i){if(g==null)return[null,null];for(const[m,v]of i){const E=m.exec(g);if(E)return v(E)}return[null,null]}function Rn(...g){return(i,m)=>{const v={};let E;for(E=0;E<g.length;E++)v[g[E]]=Ot(i[m+E]);return[v,null,m+E]}}const vs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,ys=`(?:${vs.source}?(?:\\[(${ps.source})\\])?)?`,fi=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,fr=RegExp(`${fi.source}${ys}`),bs=RegExp(`(?:[Tt]${fr.source})?`),js=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,hr=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Uc=/(\d{4})-?(\d{3})/,Tu=Rn("weekYear","weekNumber","weekDay"),Mu=Rn("year","ordinal"),Ou=/(\d{4})-(\d\d)-(\d\d)/,mr=RegExp(`${fi.source} ?(?:${vs.source}|(${ps.source}))?`),Ru=RegExp(`(?: ${mr.source})?`);function wl(g,i,m){const v=g[i];return ke(v)?m:Ot(v)}function Du(g,i){return[{year:wl(g,i),month:wl(g,i+1,1),day:wl(g,i+2,1)},null,i+3]}function Sl(g,i){return[{hours:wl(g,i,0),minutes:wl(g,i+1,0),seconds:wl(g,i+2,0),milliseconds:ri(g[i+3])},null,i+4]}function Ns(g,i){const m=!g[i]&&!g[i+1],v=ds(g[i+1],g[i+2]),E=m?null:gt.instance(v);return[{},E,i+3]}function Cl(g,i){const m=g[i]?xe.create(g[i]):null;return[{},m,i+1]}const ku=RegExp(`^T?${fi.source}$`),Au=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function _u(g){const[i,m,v,E,_,q,V,Y,de]=g,Ne=i[0]==="-",Ue=Y&&Y[0]==="-",Fe=(Ae,Nt=!1)=>Ae!==void 0&&(Nt||Ae&&Ne)?-Ae:Ae;return[{years:Fe(Mn(m)),months:Fe(Mn(v)),weeks:Fe(Mn(E)),days:Fe(Mn(_)),hours:Fe(Mn(q)),minutes:Fe(Mn(V)),seconds:Fe(Mn(Y),Y==="-0"),milliseconds:Fe(ri(de),Ue)}]}const zu={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ws(g,i,m,v,E,_,q){const V={year:i.length===2?us(Ot(i)):Ot(i),month:cr.indexOf(m)+1,day:Ot(v),hour:Ot(E),minute:Ot(_)};return q&&(V.second=Ot(q)),g&&(V.weekday=g.length>3?ms.indexOf(g)+1:Fa.indexOf(g)+1),V}const Lu=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Uu(g){const[,i,m,v,E,_,q,V,Y,de,Ne,Ue]=g,Fe=ws(i,E,v,m,_,q,V);let Ae;return Y?Ae=zu[Y]:de?Ae=0:Ae=ds(Ne,Ue),[Fe,new gt(Ae)]}function Hu(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Hc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,qu=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Vu=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qc(g){const[,i,m,v,E,_,q,V]=g;return[ws(i,E,v,m,_,q,V),gt.utcInstance]}function Pu(g){const[,i,m,v,E,_,q,V]=g;return[ws(i,V,m,v,E,_,q),gt.utcInstance]}const Bu=fn(js,bs),$u=fn(hr,bs),Yu=fn(Uc,bs),Gu=fn(fr),Vc=Zn(Du,Sl,Ns,Cl),hi=Zn(Tu,Sl,Ns,Cl),Ss=Zn(Mu,Sl,Ns,Cl),Fu=Zn(Sl,Ns,Cl);function Pc(g){return Rt(g,[Bu,Vc],[$u,hi],[Yu,Ss],[Gu,Fu])}function Bc(g){return Rt(Hu(g),[Lu,Uu])}function $c(g){return Rt(g,[Hc,qc],[qu,qc],[Vu,Pu])}function Yc(g){return Rt(g,[Au,_u])}const Gc=Zn(Sl);function El(g){return Rt(g,[ku,Gc])}const Iu=fn(Ou,Ru),Zu=fn(mr),Wu=Zn(Sl,Ns,Cl);function Fc(g){return Rt(g,[Iu,Vc],[Zu,Wu])}const mi="Invalid Duration",Tl={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Cs={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...Tl},ya=146097/400,hn=146097/4800,Ic={years:{quarters:4,months:12,weeks:ya/7,days:ya,hours:ya*24,minutes:ya*24*60,seconds:ya*24*60*60,milliseconds:ya*24*60*60*1e3},quarters:{months:3,weeks:ya/28,days:ya/4,hours:ya*24/4,minutes:ya*24*60/4,seconds:ya*24*60*60/4,milliseconds:ya*24*60*60*1e3/4},months:{weeks:hn/7,days:hn,hours:hn*24,minutes:hn*24*60,seconds:hn*24*60*60,milliseconds:hn*24*60*60*1e3},...Tl},Dn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],gi=Dn.slice(0).reverse();function Ra(g,i,m=!1){const v={values:m?i.values:{...g.values,...i.values||{}},loc:g.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||g.conversionAccuracy,matrix:i.matrix||g.matrix};return new Ge(v)}function xi(g,i){var m;let v=(m=i.milliseconds)!=null?m:0;for(const E of gi.slice(1))i[E]&&(v+=i[E]*g[E].milliseconds);return v}function pi(g,i){const m=xi(g,i)<0?-1:1;Dn.reduceRight((v,E)=>{if(ke(i[E]))return v;if(v){const _=i[v]*m,q=g[E][v],V=Math.floor(_/q);i[E]+=V*m,i[v]-=V*q*m}return E},null),Dn.reduce((v,E)=>{if(ke(i[E]))return v;if(v){const _=i[v]%1;i[v]-=_,i[E]+=_*g[v][E]}return E},null)}function vi(g){const i={};for(const[m,v]of Object.entries(g))v!==0&&(i[m]=v);return i}class Ge{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let v=m?Ic:Cs;i.matrix&&(v=i.matrix),this.values=i.values,this.loc=i.loc||Qe.create(),this.conversionAccuracy=m?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=v,this.isLuxonDuration=!0}static fromMillis(i,m){return Ge.fromObject({milliseconds:i},m)}static fromObject(i,m={}){if(i==null||typeof i!="object")throw new j(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new Ge({values:un(i,Ge.normalizeUnit),loc:Qe.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(va(i))return Ge.fromMillis(i);if(Ge.isDuration(i))return i;if(typeof i=="object")return Ge.fromObject(i);throw new j(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[v]=Yc(i);return v?Ge.fromObject(v,m):Ge.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[v]=El(i);return v?Ge.fromObject(v,m):Ge.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,m=null){if(!i)throw new j("need to specify a reason the Duration is invalid");const v=i instanceof pa?i:new pa(i,m);if(mt.throwOnInvalid)throw new o(v);return new Ge({invalid:v})}static normalizeUnit(i){const m={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!m)throw new f(i);return m}static isDuration(i){return i&&i.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(i,m={}){const v={...m,floor:m.round!==!1&&m.floor!==!1};return this.isValid?Gt.create(this.loc,v).formatDurationFromString(this,i):mi}toHuman(i={}){if(!this.isValid)return mi;const m=i.showZeros!==!1,v=Dn.map(E=>{const _=this.values[E];return ke(_)||_===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:E.slice(0,-1)}).format(_)}).filter(E=>E);return this.loc.listFormatter({type:"conjunction",style:i.listStyle||"narrow",...i}).format(v)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=os(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;const m=this.toMillis();return m<0||m>=864e5?null:(i={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...i,includeOffset:!1},Me.fromMillis(m,{zone:"UTC"}).toISOTime(i))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?xi(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i),v={};for(const E of Dn)(Gn(m.values,E)||Gn(this.values,E))&&(v[E]=m.get(E)+this.get(E));return Ra(this,{values:v},!0)}minus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i);return this.plus(m.negate())}mapUnits(i){if(!this.isValid)return this;const m={};for(const v of Object.keys(this.values))m[v]=ii(i(this.values[v],v));return Ra(this,{values:m},!0)}get(i){return this[Ge.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...un(i,Ge.normalizeUnit)};return Ra(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:v,matrix:E}={}){const q={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:E,conversionAccuracy:v};return Ra(this,q)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return pi(this.matrix,i),Ra(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=vi(this.normalize().shiftToAll().toObject());return Ra(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(q=>Ge.normalizeUnit(q));const m={},v={},E=this.toObject();let _;for(const q of Dn)if(i.indexOf(q)>=0){_=q;let V=0;for(const de in v)V+=this.matrix[de][q]*v[de],v[de]=0;va(E[q])&&(V+=E[q]);const Y=Math.trunc(V);m[q]=Y,v[q]=(V*1e3-Y*1e3)/1e3}else va(E[q])&&(v[q]=E[q]);for(const q in v)v[q]!==0&&(m[_]+=q===_?v[q]:v[q]/this.matrix[_][q]);return pi(this.matrix,m),Ra(this,{values:m},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const i={};for(const m of Object.keys(this.values))i[m]=this.values[m]===0?0:-this.values[m];return Ra(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=vi(this.values);return Ra(this,{values:i},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(i){if(!this.isValid||!i.isValid||!this.loc.equals(i.loc))return!1;function m(v,E){return v===void 0||v===0?E===void 0||E===0:v===E}for(const v of Dn)if(!m(this.values[v],i.values[v]))return!1;return!0}}const Ml="Invalid Interval";function Qu(g,i){return!g||!g.isValid?xt.invalid("missing or invalid start"):!i||!i.isValid?xt.invalid("missing or invalid end"):i<g?xt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${i.toISO()}`):null}class xt{constructor(i){this.s=i.start,this.e=i.end,this.invalid=i.invalid||null,this.isLuxonInterval=!0}static invalid(i,m=null){if(!i)throw new j("need to specify a reason the Interval is invalid");const v=i instanceof pa?i:new pa(i,m);if(mt.throwOnInvalid)throw new u(v);return new xt({invalid:v})}static fromDateTimes(i,m){const v=Na(i),E=Na(m),_=Qu(v,E);return _??new xt({start:v,end:E})}static after(i,m){const v=Ge.fromDurationLike(m),E=Na(i);return xt.fromDateTimes(E,E.plus(v))}static before(i,m){const v=Ge.fromDurationLike(m),E=Na(i);return xt.fromDateTimes(E.minus(v),E)}static fromISO(i,m){const[v,E]=(i||"").split("/",2);if(v&&E){let _,q;try{_=Me.fromISO(v,m),q=_.isValid}catch{q=!1}let V,Y;try{V=Me.fromISO(E,m),Y=V.isValid}catch{Y=!1}if(q&&Y)return xt.fromDateTimes(_,V);if(q){const de=Ge.fromISO(E,m);if(de.isValid)return xt.after(_,de)}else if(Y){const de=Ge.fromISO(v,m);if(de.isValid)return xt.before(V,de)}}return xt.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static isInterval(i){return i&&i.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(i="milliseconds"){return this.isValid?this.toDuration(i).get(i):NaN}count(i="milliseconds",m){if(!this.isValid)return NaN;const v=this.start.startOf(i,m);let E;return m!=null&&m.useLocaleWeeks?E=this.end.reconfigure({locale:v.locale}):E=this.end,E=E.startOf(i,m),Math.floor(E.diff(v,i).get(i))+(E.valueOf()!==this.end.valueOf())}hasSame(i){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,i):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(i){return this.isValid?this.s>i:!1}isBefore(i){return this.isValid?this.e<=i:!1}contains(i){return this.isValid?this.s<=i&&this.e>i:!1}set({start:i,end:m}={}){return this.isValid?xt.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(Na).filter(q=>this.contains(q)).sort((q,V)=>q.toMillis()-V.toMillis()),v=[];let{s:E}=this,_=0;for(;E<this.e;){const q=m[_]||this.e,V=+q>+this.e?this.e:q;v.push(xt.fromDateTimes(E,V)),E=V,_+=1}return v}splitBy(i){const m=Ge.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:v}=this,E=1,_;const q=[];for(;v<this.e;){const V=this.start.plus(m.mapUnits(Y=>Y*E));_=+V>+this.e?this.e:V,q.push(xt.fromDateTimes(v,_)),v=_,E+=1}return q}divideEqually(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]}overlaps(i){return this.e>i.s&&this.s<i.e}abutsStart(i){return this.isValid?+this.e==+i.s:!1}abutsEnd(i){return this.isValid?+i.e==+this.s:!1}engulfs(i){return this.isValid?this.s<=i.s&&this.e>=i.e:!1}equals(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)}intersection(i){if(!this.isValid)return this;const m=this.s>i.s?this.s:i.s,v=this.e<i.e?this.e:i.e;return m>=v?null:xt.fromDateTimes(m,v)}union(i){if(!this.isValid)return this;const m=this.s<i.s?this.s:i.s,v=this.e>i.e?this.e:i.e;return xt.fromDateTimes(m,v)}static merge(i){const[m,v]=i.sort((E,_)=>E.s-_.s).reduce(([E,_],q)=>_?_.overlaps(q)||_.abutsStart(q)?[E,_.union(q)]:[E.concat([_]),q]:[E,q],[[],null]);return v&&m.push(v),m}static xor(i){let m=null,v=0;const E=[],_=i.map(Y=>[{time:Y.s,type:"s"},{time:Y.e,type:"e"}]),q=Array.prototype.concat(..._),V=q.sort((Y,de)=>Y.time-de.time);for(const Y of V)v+=Y.type==="s"?1:-1,v===1?m=Y.time:(m&&+m!=+Y.time&&E.push(xt.fromDateTimes(m,Y.time)),m=null);return xt.merge(E)}difference(...i){return xt.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ml}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(i=M,m={}){return this.isValid?Gt.create(this.s.loc.clone(m),i).formatInterval(this):Ml}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:Ml}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ml}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:Ml}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:Ml}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):Ge.invalid(this.invalidReason)}mapEndpoints(i){return xt.fromDateTimes(i(this.s),i(this.e))}}class Es{static hasDST(i=mt.defaultZone){const m=Me.now().setZone(i).set({month:12});return!i.isUniversal&&m.offset!==m.set({month:6}).offset}static isValidIANAZone(i){return xe.isValidZone(i)}static normalizeZone(i){return _t(i,mt.defaultZone)}static getStartOfWeek({locale:i=null,locObj:m=null}={}){return(m||Qe.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:m=null}={}){return(m||Qe.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:m=null}={}){return(m||Qe.create(i)).getWeekendDays().slice()}static months(i="long",{locale:m=null,numberingSystem:v=null,locObj:E=null,outputCalendar:_="gregory"}={}){return(E||Qe.create(m,v,_)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:E=null,outputCalendar:_="gregory"}={}){return(E||Qe.create(m,v,_)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:v=null,locObj:E=null}={}){return(E||Qe.create(m,v,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:E=null}={}){return(E||Qe.create(m,v,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return Qe.create(i).meridiems()}static eras(i="short",{locale:m=null}={}){return Qe.create(m,null,"gregory").eras(i)}static features(){return{relative:li(),localeWeek:Tn()}}}function oa(g,i){const m=E=>E.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=m(i)-m(g);return Math.floor(Ge.fromMillis(v).as("days"))}function Ts(g,i,m){const v=[["years",(Y,de)=>de.year-Y.year],["quarters",(Y,de)=>de.quarter-Y.quarter+(de.year-Y.year)*4],["months",(Y,de)=>de.month-Y.month+(de.year-Y.year)*12],["weeks",(Y,de)=>{const Ne=oa(Y,de);return(Ne-Ne%7)/7}],["days",oa]],E={},_=g;let q,V;for(const[Y,de]of v)m.indexOf(Y)>=0&&(q=Y,E[Y]=de(g,i),V=_.plus(E),V>i?(E[Y]--,g=_.plus(E),g>i&&(V=g,E[Y]--,g=_.plus(E))):g=V);return[g,E,V,q]}function Zc(g,i,m,v){let[E,_,q,V]=Ts(g,i,m);const Y=i-E,de=m.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);de.length===0&&(q<i&&(q=E.plus({[V]:1})),q!==E&&(_[V]=(_[V]||0)+Y/(q-E)));const Ne=Ge.fromObject(_,v);return de.length>0?Ge.fromMillis(Y,v).shiftTo(...de).plus(Ne):Ne}const Wc="missing Intl.DateTimeFormat.formatToParts support";function Xe(g,i=m=>m){return{regex:g,deser:([m])=>i(er(m))}}const gr="[  ]",Qc=new RegExp(gr,"g");function Ol(g){return g.replace(/\./g,"\\.?").replace(Qc,gr)}function xr(g){return g.replace(/\./g,"").replace(Qc," ").toLowerCase()}function aa(g,i){return g===null?null:{regex:RegExp(g.map(Ol).join("|")),deser:([m])=>g.findIndex(v=>xr(m)===xr(v))+i}}function pr(g,i){return{regex:g,deser:([,m,v])=>ds(m,v),groups:i}}function Ms(g){return{regex:g,deser:([i])=>i}}function Wn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Rl(g,i){const m=ve(i),v=ve(i,"{2}"),E=ve(i,"{3}"),_=ve(i,"{4}"),q=ve(i,"{6}"),V=ve(i,"{1,2}"),Y=ve(i,"{1,3}"),de=ve(i,"{1,6}"),Ne=ve(i,"{1,9}"),Ue=ve(i,"{2,4}"),Fe=ve(i,"{4,6}"),Ae=Xt=>({regex:RegExp(Wn(Xt.val)),deser:([kn])=>kn,literal:!0}),Qt=(Xt=>{if(g.literal)return Ae(Xt);switch(Xt.val){case"G":return aa(i.eras("short"),0);case"GG":return aa(i.eras("long"),0);case"y":return Xe(de);case"yy":return Xe(Ue,us);case"yyyy":return Xe(_);case"yyyyy":return Xe(Fe);case"yyyyyy":return Xe(q);case"M":return Xe(V);case"MM":return Xe(v);case"MMM":return aa(i.months("short",!0),1);case"MMMM":return aa(i.months("long",!0),1);case"L":return Xe(V);case"LL":return Xe(v);case"LLL":return aa(i.months("short",!1),1);case"LLLL":return aa(i.months("long",!1),1);case"d":return Xe(V);case"dd":return Xe(v);case"o":return Xe(Y);case"ooo":return Xe(E);case"HH":return Xe(v);case"H":return Xe(V);case"hh":return Xe(v);case"h":return Xe(V);case"mm":return Xe(v);case"m":return Xe(V);case"q":return Xe(V);case"qq":return Xe(v);case"s":return Xe(V);case"ss":return Xe(v);case"S":return Xe(Y);case"SSS":return Xe(E);case"u":return Ms(Ne);case"uu":return Ms(V);case"uuu":return Xe(m);case"a":return aa(i.meridiems(),0);case"kkkk":return Xe(_);case"kk":return Xe(Ue,us);case"W":return Xe(V);case"WW":return Xe(v);case"E":case"c":return Xe(m);case"EEE":return aa(i.weekdays("short",!1),1);case"EEEE":return aa(i.weekdays("long",!1),1);case"ccc":return aa(i.weekdays("short",!0),1);case"cccc":return aa(i.weekdays("long",!0),1);case"Z":case"ZZ":return pr(new RegExp(`([+-]${V.source})(?::(${v.source}))?`),2);case"ZZZ":return pr(new RegExp(`([+-]${V.source})(${v.source})?`),2);case"z":return Ms(/[a-z_+-/]{1,256}?/i);case" ":return Ms(/[^\S\n\r]/);default:return Ae(Xt)}})(g)||{invalidReason:Wc};return Qt.token=g,Qt}const yi={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Xc(g,i,m){const{type:v,value:E}=g;if(v==="literal"){const Y=/^\s+$/.test(E);return{literal:!Y,val:Y?" ":E}}const _=i[v];let q=v;v==="hour"&&(i.hour12!=null?q=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?q="hour12":q="hour24":q=m.hour12?"hour12":"hour24");let V=yi[q];if(typeof V=="object"&&(V=V[_]),V)return{literal:!1,val:V}}function Qn(g){return[`^${g.map(m=>m.regex).reduce((m,v)=>`${m}(${v.source})`,"")}$`,g]}function Jc(g,i,m){const v=g.match(i);if(v){const E={};let _=1;for(const q in m)if(Gn(m,q)){const V=m[q],Y=V.groups?V.groups+1:1;!V.literal&&V.token&&(E[V.token.val[0]]=V.deser(v.slice(_,_+Y))),_+=Y}return[v,E]}else return[v,{}]}function Kc(g){const i=_=>{switch(_){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let m=null,v;return ke(g.z)||(m=xe.create(g.z)),ke(g.Z)||(m||(m=new gt(g.Z)),v=g.Z),ke(g.q)||(g.M=(g.q-1)*3+1),ke(g.h)||(g.h<12&&g.a===1?g.h+=12:g.h===12&&g.a===0&&(g.h=0)),g.G===0&&g.y&&(g.y=-g.y),ke(g.u)||(g.S=ri(g.u)),[Object.keys(g).reduce((_,q)=>{const V=i(q);return V&&(_[V]=g[q]),_},{}),m,v]}let vr=null;function Ju(){return vr||(vr=Me.fromMillis(1555555555555)),vr}function Ku(g,i){if(g.literal)return g;const m=Gt.macroTokenToFormatOpts(g.val),v=ba(m,i);return v==null||v.includes(void 0)?g:v}function eo(g,i){return Array.prototype.concat(...g.map(m=>Ku(m,i)))}class bi{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=eo(Gt.parseFormat(m),i),this.units=this.tokens.map(v=>Rl(v,i)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,E]=Qn(this.units);this.regex=RegExp(v,"i"),this.handlers=E}}explainFromTokens(i){if(this.isValid){const[m,v]=Jc(i,this.regex,this.handlers),[E,_,q]=v?Kc(v):[null,null,void 0];if(Gn(v,"a")&&Gn(v,"H"))throw new h("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:m,matches:v,result:E,zone:_,specificOffset:q}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ji(g,i,m){return new bi(g,m).explainFromTokens(i)}function Ni(g,i,m){const{result:v,zone:E,specificOffset:_,invalidReason:q}=ji(g,i,m);return[v,E,_,q]}function ba(g,i){if(!g)return null;const v=Gt.create(i,g).dtFormatter(Ju()),E=v.formatToParts(),_=v.resolvedOptions();return E.map(q=>Xc(q,g,_))}const Dl="Invalid DateTime",ma=864e13;function Ia(g){return new pa("unsupported zone",`the zone "${g.name}" is not supported`)}function Os(g){return g.weekData===null&&(g.weekData=Yt(g.c)),g.weekData}function kl(g){return g.localWeekData===null&&(g.localWeekData=Yt(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Za(g,i){const m={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new Me({...m,...i,old:m})}function yr(g,i,m){let v=g-i*60*1e3;const E=m.offset(v);if(i===E)return[v,i];v-=(E-i)*60*1e3;const _=m.offset(v);return E===_?[v,E]:[g-Math.min(E,_)*60*1e3,Math.max(E,_)]}function Wa(g,i){g+=i*60*1e3;const m=new Date(g);return{year:m.getUTCFullYear(),month:m.getUTCMonth()+1,day:m.getUTCDate(),hour:m.getUTCHours(),minute:m.getUTCMinutes(),second:m.getUTCSeconds(),millisecond:m.getUTCMilliseconds()}}function Rs(g,i,m){return yr(ta(g),i,m)}function Ds(g,i){const m=g.o,v=g.c.year+Math.trunc(i.years),E=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,_={...g.c,year:v,month:E,day:Math.min(g.c.day,rr(v,E))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},q=Ge.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),V=ta(_);let[Y,de]=yr(V,m,g.zone);return q!==0&&(Y+=q,de=g.zone.offset(Y)),{ts:Y,o:de}}function Da(g,i,m,v,E,_){const{setZone:q,zone:V}=m;if(g&&Object.keys(g).length!==0||i){const Y=i||V,de=Me.fromObject(g,{...m,zone:Y,specificOffset:_});return q?de:de.setZone(V)}else return Me.invalid(new pa("unparsable",`the input "${E}" can't be parsed as ${v}`))}function br(g,i,m=!0){return g.isValid?Gt.create(Qe.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function na(g,i,m){const v=g.c.year>9999||g.c.year<0;let E="";if(v&&g.c.year>=0&&(E+="+"),E+=st(g.c.year,v?6:4),m==="year")return E;if(i){if(E+="-",E+=st(g.c.month),m==="month")return E;E+="-"}else if(E+=st(g.c.month),m==="month")return E;return E+=st(g.c.day),E}function jr(g,i,m,v,E,_,q){let V=!m||g.c.millisecond!==0||g.c.second!==0,Y="";switch(q){case"day":case"month":case"year":break;default:if(Y+=st(g.c.hour),q==="hour")break;if(i){if(Y+=":",Y+=st(g.c.minute),q==="minute")break;V&&(Y+=":",Y+=st(g.c.second))}else{if(Y+=st(g.c.minute),q==="minute")break;V&&(Y+=st(g.c.second))}if(q==="second")break;V&&(!v||g.c.millisecond!==0)&&(Y+=".",Y+=st(g.c.millisecond,3))}return E&&(g.isOffsetFixed&&g.offset===0&&!_?Y+="Z":g.o<0?(Y+="-",Y+=st(Math.trunc(-g.o/60)),Y+=":",Y+=st(Math.trunc(-g.o%60))):(Y+="+",Y+=st(Math.trunc(g.o/60)),Y+=":",Y+=st(Math.trunc(g.o%60)))),_&&(Y+="["+g.zone.ianaName+"]"),Y}const Qa={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},to={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Nr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Xa=["year","month","day","hour","minute","second","millisecond"],wi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ao=["year","ordinal","hour","minute","second","millisecond"];function Al(g){const i={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!i)throw new f(g);return i}function Si(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Al(g)}}function ja(g){if(mn===void 0&&(mn=mt.now()),g.type!=="iana")return g.offset(mn);const i=g.name;let m=ua.get(i);return m===void 0&&(m=g.offset(mn),ua.set(i,m)),m}function Xn(g,i){const m=_t(i.zone,mt.defaultZone);if(!m.isValid)return Me.invalid(Ia(m));const v=Qe.fromObject(i);let E,_;if(ke(g.year))E=mt.now();else{for(const Y of Xa)ke(g[Y])&&(g[Y]=Qa[Y]);const q=lr(g)||Yn(g);if(q)return Me.invalid(q);const V=ja(m);[E,_]=Rs(g,V,m)}return new Me({ts:E,zone:m,loc:v,o:_})}function Jn(g,i,m){const v=ke(m.round)?!0:m.round,E=ke(m.rounding)?"trunc":m.rounding,_=(V,Y)=>(V=os(V,v||m.calendary?0:2,m.calendary?"round":E),i.loc.clone(m).relFormatter(m).format(V,Y)),q=V=>m.calendary?i.hasSame(g,V)?0:i.startOf(V).diff(g.startOf(V),V).get(V):i.diff(g,V).get(V);if(m.unit)return _(q(m.unit),m.unit);for(const V of m.units){const Y=q(V);if(Math.abs(Y)>=1)return _(Y,V)}return _(g>i?-0:0,m.units[m.units.length-1])}function ks(g){let i={},m;return g.length>0&&typeof g[g.length-1]=="object"?(i=g[g.length-1],m=Array.from(g).slice(0,g.length-1)):m=Array.from(g),[i,m]}let mn;const ua=new Map;class Me{constructor(i){const m=i.zone||mt.defaultZone;let v=i.invalid||(Number.isNaN(i.ts)?new pa("invalid input"):null)||(m.isValid?null:Ia(m));this.ts=ke(i.ts)?mt.now():i.ts;let E=null,_=null;if(!v)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[E,_]=[i.old.c,i.old.o];else{const V=va(i.o)&&!i.old?i.o:m.offset(this.ts);E=Wa(this.ts,V),v=Number.isNaN(E.year)?new pa("invalid input"):null,E=v?null:E,_=v?null:V}this._zone=m,this.loc=i.loc||Qe.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=E,this.o=_,this.isLuxonDateTime=!0}static now(){return new Me({})}static local(){const[i,m]=ks(arguments),[v,E,_,q,V,Y,de]=m;return Xn({year:v,month:E,day:_,hour:q,minute:V,second:Y,millisecond:de},i)}static utc(){const[i,m]=ks(arguments),[v,E,_,q,V,Y,de]=m;return i.zone=gt.utcInstance,Xn({year:v,month:E,day:_,hour:q,minute:V,second:Y,millisecond:de},i)}static fromJSDate(i,m={}){const v=Dc(i)?i.valueOf():NaN;if(Number.isNaN(v))return Me.invalid("invalid input");const E=_t(m.zone,mt.defaultZone);return E.isValid?new Me({ts:v,zone:E,loc:Qe.fromObject(m)}):Me.invalid(Ia(E))}static fromMillis(i,m={}){if(va(i))return i<-ma||i>ma?Me.invalid("Timestamp out of range"):new Me({ts:i,zone:_t(m.zone,mt.defaultZone),loc:Qe.fromObject(m)});throw new j(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,m={}){if(va(i))return new Me({ts:i*1e3,zone:_t(m.zone,mt.defaultZone),loc:Qe.fromObject(m)});throw new j("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const v=_t(m.zone,mt.defaultZone);if(!v.isValid)return Me.invalid(Ia(v));const E=Qe.fromObject(m),_=un(i,Si),{minDaysInFirstWeek:q,startOfWeek:V}=Oc(_,E),Y=mt.now(),de=ke(m.specificOffset)?v.offset(Y):m.specificOffset,Ne=!ke(_.ordinal),Ue=!ke(_.year),Fe=!ke(_.month)||!ke(_.day),Ae=Ue||Fe,Nt=_.weekYear||_.weekNumber;if((Ae||Ne)&&Nt)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Fe&&Ne)throw new h("Can't mix ordinal dates with month/day");const Qt=Nt||_.weekday&&!Ae;let Xt,kn,gn=Wa(Y,de);Qt?(Xt=wi,kn=to,gn=Yt(gn,q,V)):Ne?(Xt=ao,kn=Nr,gn=is(gn)):(Xt=Xa,kn=Qa);let wr=!1;for(const en of Xt){const Sr=_[en];ke(Sr)?wr?_[en]=kn[en]:_[en]=gn[en]:wr=!0}const Kn=Qt?Rc(_,q,V):Ne?cs(_):lr(_),Ka=Kn||Yn(_);if(Ka)return Me.invalid(Ka);const An=Qt?$n(_,q,V):Ne?Mc(_):_,[xn,Ci]=Rs(An,de,v),el=new Me({ts:xn,zone:v,o:Ci,loc:E});return _.weekday&&Ae&&i.weekday!==el.weekday?Me.invalid("mismatched weekday",`you can't specify both a weekday of ${_.weekday} and a date of ${el.toISO()}`):el.isValid?el:Me.invalid(el.invalid)}static fromISO(i,m={}){const[v,E]=Pc(i);return Da(v,E,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[v,E]=Bc(i);return Da(v,E,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[v,E]=$c(i);return Da(v,E,m,"HTTP",m)}static fromFormat(i,m,v={}){if(ke(i)||ke(m))throw new j("fromFormat requires an input string and a format");const{locale:E=null,numberingSystem:_=null}=v,q=Qe.fromOpts({locale:E,numberingSystem:_,defaultToEN:!0}),[V,Y,de,Ne]=Ni(q,i,m);return Ne?Me.invalid(Ne):Da(V,Y,v,`format ${m}`,i,de)}static fromString(i,m,v={}){return Me.fromFormat(i,m,v)}static fromSQL(i,m={}){const[v,E]=Fc(i);return Da(v,E,m,"SQL",i)}static invalid(i,m=null){if(!i)throw new j("need to specify a reason the DateTime is invalid");const v=i instanceof pa?i:new pa(i,m);if(mt.throwOnInvalid)throw new r(v);return new Me({invalid:v})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const v=ba(i,Qe.fromObject(m));return v?v.map(E=>E?E.val:null).join(""):null}static expandFormat(i,m={}){return eo(Gt.parseFormat(i),Qe.fromObject(m)).map(E=>E.val).join("")}static resetCache(){mn=void 0,ua.clear()}get(i){return this[i]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Os(this).weekYear:NaN}get weekNumber(){return this.isValid?Os(this).weekNumber:NaN}get weekday(){return this.isValid?Os(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?kl(this).weekday:NaN}get localWeekNumber(){return this.isValid?kl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?kl(this).weekYear:NaN}get ordinal(){return this.isValid?is(this.c).ordinal:NaN}get monthShort(){return this.isValid?Es.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Es.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Es.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Es.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const i=864e5,m=6e4,v=ta(this.c),E=this.zone.offset(v-i),_=this.zone.offset(v+i),q=this.zone.offset(v-E*m),V=this.zone.offset(v-_*m);if(q===V)return[this];const Y=v-q*m,de=v-V*m,Ne=Wa(Y,q),Ue=Wa(de,V);return Ne.hour===Ue.hour&&Ne.minute===Ue.minute&&Ne.second===Ue.second&&Ne.millisecond===Ue.millisecond?[Za(this,{ts:Y}),Za(this,{ts:de})]:[this]}get isInLeapYear(){return bl(this.year)}get daysInMonth(){return rr(this.year,this.month)}get daysInYear(){return this.isValid?on(this.year):NaN}get weeksInWeekYear(){return this.isValid?jl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?jl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:v,calendar:E}=Gt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:v,outputCalendar:E}}toUTC(i=0,m={}){return this.setZone(gt.instance(i),m)}toLocal(){return this.setZone(mt.defaultZone)}setZone(i,{keepLocalTime:m=!1,keepCalendarTime:v=!1}={}){if(i=_t(i,mt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let E=this.ts;if(m||v){const _=i.offset(this.ts),q=this.toObject();[E]=Rs(q,_,i)}return Za(this,{ts:E,zone:i})}else return Me.invalid(Ia(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:v}={}){const E=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:v});return Za(this,{loc:E})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=un(i,Si),{minDaysInFirstWeek:v,startOfWeek:E}=Oc(m,this.loc),_=!ke(m.weekYear)||!ke(m.weekNumber)||!ke(m.weekday),q=!ke(m.ordinal),V=!ke(m.year),Y=!ke(m.month)||!ke(m.day),de=V||Y,Ne=m.weekYear||m.weekNumber;if((de||q)&&Ne)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Y&&q)throw new h("Can't mix ordinal dates with month/day");let Ue;_?Ue=$n({...Yt(this.c,v,E),...m},v,E):ke(m.ordinal)?(Ue={...this.toObject(),...m},ke(m.day)&&(Ue.day=Math.min(rr(Ue.year,Ue.month),Ue.day))):Ue=Mc({...is(this.c),...m});const[Fe,Ae]=Rs(Ue,this.o,this.zone);return Za(this,{ts:Fe,o:Ae})}plus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i);return Za(this,Ds(this,m))}minus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i).negate();return Za(this,Ds(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const v={},E=Ge.normalizeUnit(i);switch(E){case"years":v.month=1;case"quarters":case"months":v.day=1;case"weeks":case"days":v.hour=0;case"hours":v.minute=0;case"minutes":v.second=0;case"seconds":v.millisecond=0;break}if(E==="weeks")if(m){const _=this.loc.getStartOfWeek(),{weekday:q}=this;q<_&&(v.weekNumber=this.weekNumber-1),v.weekday=_}else v.weekday=1;if(E==="quarters"){const _=Math.ceil(this.month/3);v.month=(_-1)*3+1}return this.set(v)}endOf(i,m){return this.isValid?this.plus({[i]:1}).startOf(i,m).minus(1):this}toFormat(i,m={}){return this.isValid?Gt.create(this.loc.redefaultToEN(m)).formatDateTimeFromString(this,i):Dl}toLocaleString(i=M,m={}){return this.isValid?Gt.create(this.loc.clone(m),i).formatDateTime(this):Dl}toLocaleParts(i={}){return this.isValid?Gt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:m=!1,suppressMilliseconds:v=!1,includeOffset:E=!0,extendedZone:_=!1,precision:q="milliseconds"}={}){if(!this.isValid)return null;q=Al(q);const V=i==="extended";let Y=na(this,V,q);return Xa.indexOf(q)>=3&&(Y+="T"),Y+=jr(this,V,m,v,E,_,q),Y}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?na(this,i==="extended",Al(m)):null}toISOWeekDate(){return br(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:v=!0,includePrefix:E=!1,extendedZone:_=!1,format:q="extended",precision:V="milliseconds"}={}){return this.isValid?(V=Al(V),(E&&Xa.indexOf(V)>=3?"T":"")+jr(this,q==="extended",m,i,v,_,V)):null}toRFC2822(){return br(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return br(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?na(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:v=!0}={}){let E="HH:mm:ss.SSS";return(m||i)&&(v&&(E+=" "),m?E+="z":i&&(E+="ZZ")),br(this,E,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():Dl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(i={}){if(!this.isValid)return{};const m={...this.c};return i.includeConfig&&(m.outputCalendar=this.outputCalendar,m.numberingSystem=this.loc.numberingSystem,m.locale=this.loc.locale),m}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,m="milliseconds",v={}){if(!this.isValid||!i.isValid)return Ge.invalid("created by diffing an invalid DateTime");const E={locale:this.locale,numberingSystem:this.numberingSystem,...v},_=yl(m).map(Ge.normalizeUnit),q=i.valueOf()>this.valueOf(),V=q?this:i,Y=q?i:this,de=Zc(V,Y,_,E);return q?de.negate():de}diffNow(i="milliseconds",m={}){return this.diff(Me.now(),i,m)}until(i){return this.isValid?xt.fromDateTimes(this,i):this}hasSame(i,m,v){if(!this.isValid)return!1;const E=i.valueOf(),_=this.setZone(i.zone,{keepLocalTime:!0});return _.startOf(m,v)<=E&&E<=_.endOf(m,v)}equals(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)}toRelative(i={}){if(!this.isValid)return null;const m=i.base||Me.fromObject({},{zone:this.zone}),v=i.padding?this<m?-i.padding:i.padding:0;let E=["years","months","days","hours","minutes","seconds"],_=i.unit;return Array.isArray(i.unit)&&(E=i.unit,_=void 0),Jn(m,this.plus(v),{...i,numeric:"always",units:E,unit:_})}toRelativeCalendar(i={}){return this.isValid?Jn(i.base||Me.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(Me.isDateTime))throw new j("min requires all arguments be DateTimes");return kc(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(Me.isDateTime))throw new j("max requires all arguments be DateTimes");return kc(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,v={}){const{locale:E=null,numberingSystem:_=null}=v,q=Qe.fromOpts({locale:E,numberingSystem:_,defaultToEN:!0});return ji(q,i,m)}static fromStringExplain(i,m,v={}){return Me.fromFormatExplain(i,m,v)}static buildFormatParser(i,m={}){const{locale:v=null,numberingSystem:E=null}=m,_=Qe.fromOpts({locale:v,numberingSystem:E,defaultToEN:!0});return new bi(_,i)}static fromFormatParser(i,m,v={}){if(ke(i)||ke(m))throw new j("fromFormatParser requires an input string and a format parser");const{locale:E=null,numberingSystem:_=null}=v,q=Qe.fromOpts({locale:E,numberingSystem:_,defaultToEN:!0});if(!q.equals(m.locale))throw new j(`fromFormatParser called with a locale of ${q}, but the format parser was created for ${m.locale}`);const{result:V,zone:Y,specificOffset:de,invalidReason:Ne}=m.explainFromTokens(i);return Ne?Me.invalid(Ne):Da(V,Y,v,`format ${m.format}`,i,de)}static get DATE_SHORT(){return M}static get DATE_MED(){return D}static get DATE_MED_WITH_WEEKDAY(){return A}static get DATE_FULL(){return N}static get DATE_HUGE(){return O}static get TIME_SIMPLE(){return k}static get TIME_WITH_SECONDS(){return Z}static get TIME_WITH_SHORT_OFFSET(){return B}static get TIME_WITH_LONG_OFFSET(){return K}static get TIME_24_SIMPLE(){return R}static get TIME_24_WITH_SECONDS(){return w}static get TIME_24_WITH_SHORT_OFFSET(){return U}static get TIME_24_WITH_LONG_OFFSET(){return G}static get DATETIME_SHORT(){return I}static get DATETIME_SHORT_WITH_SECONDS(){return le}static get DATETIME_MED(){return S}static get DATETIME_MED_WITH_SECONDS(){return te}static get DATETIME_MED_WITH_WEEKDAY(){return ae}static get DATETIME_FULL(){return ie}static get DATETIME_FULL_WITH_SECONDS(){return ge}static get DATETIME_HUGE(){return pe}static get DATETIME_HUGE_WITH_SECONDS(){return $}}function Na(g){if(Me.isDateTime(g))return g;if(g&&g.valueOf&&va(g.valueOf()))return Me.fromJSDate(g);if(g&&typeof g=="object")return Me.fromObject(g);throw new j(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Ja="3.7.2";return Ma.DateTime=Me,Ma.Duration=Ge,Ma.FixedOffsetZone=gt,Ma.IANAZone=xe,Ma.Info=Es,Ma.Interval=xt,Ma.InvalidZone=$t,Ma.Settings=mt,Ma.SystemZone=me,Ma.VERSION=Ja,Ma.Zone=J,Ma}var xx;function Sh(){return xx||(xx=1,(function(n){var f,j,b,y,x,Xf,M,es;Object.defineProperty(n,"__esModule",{value:!0}),n.CronDate=n.DAYS_IN_MONTH=n.DateMathOp=n.TimeUnit=void 0;const r=gw();var u;(function(N){N.Second="Second",N.Minute="Minute",N.Hour="Hour",N.Day="Day",N.Month="Month",N.Year="Year"})(u||(n.TimeUnit=u={}));var o;(function(N){N.Add="Add",N.Subtract="Subtract"})(o||(n.DateMathOp=o={})),n.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const A=class A{constructor(O,k){at(this,M);at(this,f);at(this,j,null);at(this,b,null);at(this,y,{add:{[u.Year]:this.addYear.bind(this),[u.Month]:this.addMonth.bind(this),[u.Day]:this.addDay.bind(this),[u.Hour]:this.addHour.bind(this),[u.Minute]:this.addMinute.bind(this),[u.Second]:this.addSecond.bind(this)},subtract:{[u.Year]:this.subtractYear.bind(this),[u.Month]:this.subtractMonth.bind(this),[u.Day]:this.subtractDay.bind(this),[u.Hour]:this.subtractHour.bind(this),[u.Minute]:this.subtractMinute.bind(this),[u.Second]:this.subtractSecond.bind(this)}});const Z={zone:k};if(O?O instanceof A?(Oe(this,f,ee(O,f)),Oe(this,j,ee(O,j)),Oe(this,b,ee(O,b))):O instanceof Date?Oe(this,f,r.DateTime.fromJSDate(O,Z)):typeof O=="number"?Oe(this,f,r.DateTime.fromMillis(O,Z)):(Oe(this,f,r.DateTime.fromISO(O,Z)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromRFC2822(O,Z)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromSQL(O,Z)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromFormat(O,"EEE, d MMM yyyy HH:mm:ss",Z))):Oe(this,f,r.DateTime.local()),!ee(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${O}`);k&&k!==ee(this,f).zoneName&&Oe(this,f,ee(this,f).setZone(k))}get dstStart(){return ee(this,j)}set dstStart(O){Oe(this,j,O)}get dstEnd(){return ee(this,b)}set dstEnd(O){Oe(this,b,O)}addYear(){Oe(this,f,ee(this,f).plus({years:1}))}addMonth(){Oe(this,f,ee(this,f).plus({months:1}).startOf("month"))}addDay(){Oe(this,f,ee(this,f).plus({days:1}).startOf("day"))}addHour(){Oe(this,f,ee(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Oe(this,f,ee(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Oe(this,f,ee(this,f).plus({seconds:1}))}subtractYear(){Oe(this,f,ee(this,f).minus({years:1}))}subtractMonth(){Oe(this,f,ee(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Oe(this,f,ee(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Oe(this,f,ee(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Oe(this,f,ee(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Oe(this,f,ee(this,f).minus({seconds:1}))}addUnit(O){ee(this,y).add[O]()}subtractUnit(O){ee(this,y).subtract[O]()}invokeDateOperation(O,k){if(O===o.Add){this.addUnit(k);return}if(O===o.Subtract){this.subtractUnit(k);return}throw new Error(`Invalid verb: ${O}`)}getDate(){return ee(this,f).day}getFullYear(){return ee(this,f).year}getDay(){const O=ee(this,f).weekday;return O===7?0:O}getMonth(){return ee(this,f).month-1}getHours(){return ee(this,f).hour}getMinutes(){return ee(this,f).minute}getSeconds(){return ee(this,f).second}getMilliseconds(){return ee(this,f).millisecond}getUTCOffset(){return ee(this,f).offset}setStartOfDay(){Oe(this,f,ee(this,f).startOf("day"))}setEndOfDay(){Oe(this,f,ee(this,f).endOf("day"))}getTime(){return ee(this,f).valueOf()}getUTCDate(){return Te(this,M,es).call(this).day}getUTCFullYear(){return Te(this,M,es).call(this).year}getUTCDay(){const O=Te(this,M,es).call(this).weekday;return O===7?0:O}getUTCMonth(){return Te(this,M,es).call(this).month-1}getUTCHours(){return Te(this,M,es).call(this).hour}getUTCMinutes(){return Te(this,M,es).call(this).minute}getUTCSeconds(){return Te(this,M,es).call(this).second}toISOString(){return ee(this,f).toUTC().toISO()}toJSON(){return ee(this,f).toJSON()}setDate(O){Oe(this,f,ee(this,f).set({day:O}))}setFullYear(O){Oe(this,f,ee(this,f).set({year:O}))}setDay(O){Oe(this,f,ee(this,f).set({weekday:O}))}setMonth(O){Oe(this,f,ee(this,f).set({month:O+1}))}setHours(O){Oe(this,f,ee(this,f).set({hour:O}))}setMinutes(O){Oe(this,f,ee(this,f).set({minute:O}))}setSeconds(O){Oe(this,f,ee(this,f).set({second:O}))}setMilliseconds(O){Oe(this,f,ee(this,f).set({millisecond:O}))}toString(){return this.toDate().toString()}toDate(){return ee(this,f).toJSDate()}isLastDayOfMonth(){var Z;const{day:O,month:k}=ee(this,f);if(k===2){const B=Te(Z=A,x,Xf).call(Z,ee(this,f).year);return O===n.DAYS_IN_MONTH[k-1]-(B?0:1)}return O===n.DAYS_IN_MONTH[k-1]}isLastWeekdayOfMonth(){var B;const{day:O,month:k}=ee(this,f);let Z;return k===2?Z=n.DAYS_IN_MONTH[k-1]-(Te(B=A,x,Xf).call(B,ee(this,f).year)?0:1):Z=n.DAYS_IN_MONTH[k-1],O>Z-7}applyDateOperation(O,k,Z){if(k===u.Month||k===u.Day){this.invokeDateOperation(O,k);return}const B=this.getHours();this.invokeDateOperation(O,k);const K=this.getHours(),R=K-B;R===2?Z!==24&&(this.dstStart=K):R===0&&this.getMinutes()===0&&this.getSeconds()===0&&Z!==24&&(this.dstEnd=K)}};f=new WeakMap,j=new WeakMap,b=new WeakMap,y=new WeakMap,x=new WeakSet,Xf=function(O){return O%4===0&&O%100!==0||O%400===0},M=new WeakSet,es=function(){return ee(this,f).toUTC()},at(A,x);let h=A;n.CronDate=h,n.default=h})(Pf)),Pf}var px;function xw(){if(px)return dc;px=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.CronMonth=void 0;const n=Sh(),r=Xs(),u=1,o=12,h=Object.freeze([]);let f=class extends r.CronField{static get min(){return u}static get max(){return o}static get chars(){return h}static get daysInMonth(){return n.DAYS_IN_MONTH}constructor(b,y){super(b,y),this.validate()}get values(){return super.values}};return dc.CronMonth=f,dc}var fc={},vx;function pw(){if(vx)return fc;vx=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.CronSecond=void 0;const n=Xs(),r=0,u=59,o=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return fc.CronSecond=h,fc}var yx;function Ch(){return yx||(yx=1,(function(n){var r=$s&&$s.__createBinding||(Object.create?(function(o,h,f,j){j===void 0&&(j=f);var b=Object.getOwnPropertyDescriptor(h,f);(!b||("get"in b?!h.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return h[f]}}),Object.defineProperty(o,j,b)}):(function(o,h,f,j){j===void 0&&(j=f),o[j]=h[f]})),u=$s&&$s.__exportStar||function(o,h){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(h,f)&&r(h,o,f)};Object.defineProperty(n,"__esModule",{value:!0}),u(uw(),n),u(dw(),n),u(fw(),n),u(Xs(),n),u(hw(),n),u(mw(),n),u(xw(),n),u(pw(),n)})($s)),$s}var bx;function qp(){var u,o,h,f,j,b,y,x,Up,Hp;if(bx)return sc;bx=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.CronFieldCollection=void 0;const n=Ch();let r=(x=class{constructor({second:A,minute:N,hour:O,dayOfMonth:k,month:Z,dayOfWeek:B}){at(this,u);at(this,o);at(this,h);at(this,f);at(this,j);at(this,b);if(!A)throw new Error("Validation error, Field second is missing");if(!N)throw new Error("Validation error, Field minute is missing");if(!O)throw new Error("Validation error, Field hour is missing");if(!k)throw new Error("Validation error, Field dayOfMonth is missing");if(!Z)throw new Error("Validation error, Field month is missing");if(!B)throw new Error("Validation error, Field dayOfWeek is missing");if(Z.values.length===1&&!k.hasLastChar&&!(parseInt(k.values[0],10)<=n.CronMonth.daysInMonth[Z.values[0]-1]))throw new Error("Invalid explicit day of month definition");Oe(this,u,A),Oe(this,o,N),Oe(this,h,O),Oe(this,j,Z),Oe(this,b,B),Oe(this,f,k)}static from(A,N){return new x({second:this.resolveField(n.CronSecond,A.second,N.second),minute:this.resolveField(n.CronMinute,A.minute,N.minute),hour:this.resolveField(n.CronHour,A.hour,N.hour),dayOfMonth:this.resolveField(n.CronDayOfMonth,A.dayOfMonth,N.dayOfMonth),month:this.resolveField(n.CronMonth,A.month,N.month),dayOfWeek:this.resolveField(n.CronDayOfWeek,A.dayOfWeek,N.dayOfWeek)})}static resolveField(A,N,O){return O?O instanceof n.CronField?O:new A(O):N}get second(){return ee(this,u)}get minute(){return ee(this,o)}get hour(){return ee(this,h)}get dayOfMonth(){return ee(this,f)}get month(){return ee(this,j)}get dayOfWeek(){return ee(this,b)}static compactField(A){if(A.length===0)return[];const N=[];let O;return A.forEach((k,Z,B)=>{if(O===void 0){O={start:k,count:1};return}const K=B[Z-1]||O.start,R=B[Z+1];if(k==="L"||k==="W"){N.push(O),N.push({start:k,count:1}),O=void 0;return}if(O.step===void 0&&R!==void 0){const w=k-K,U=R-k;if(w<=U){O={...O,count:2,end:k,step:w};return}O.step=1}k-(O.end??0)===O.step?(O.count++,O.end=k):(O.count===1?N.push({start:O.start,count:1}):O.count===2?(N.push({start:O.start,count:1}),N.push({start:O.end??K,count:1})):N.push(O),O={start:k,count:1})}),O&&N.push(O),N}stringifyField(A){var Z;let N=A.max,O=A.values;if(A instanceof n.CronDayOfWeek){N=6;const B=ee(this,b).values;O=B[B.length-1]===7?B.slice(0,-1):B}A instanceof n.CronDayOfMonth&&(N=ee(this,j).values.length===1?n.CronMonth.daysInMonth[ee(this,j).values[0]-1]:A.max);const k=x.compactField(O);if(k.length===1){const B=Te(Z=x,y,Up).call(Z,A,k[0],N);if(B)return B}return k.map(B=>{var R;const K=B.count===1?B.start.toString():Te(R=x,y,Hp).call(R,B,N);return A instanceof n.CronDayOfWeek&&A.nthDay>0?`${K}#${A.nthDay}`:K}).join(",")}stringify(A=!1){const N=[];return A&&N.push(this.stringifyField(ee(this,u))),N.push(this.stringifyField(ee(this,o)),this.stringifyField(ee(this,h)),this.stringifyField(ee(this,f)),this.stringifyField(ee(this,j)),this.stringifyField(ee(this,b))),N.join(" ")}serialize(){return{second:ee(this,u).serialize(),minute:ee(this,o).serialize(),hour:ee(this,h).serialize(),dayOfMonth:ee(this,f).serialize(),month:ee(this,j).serialize(),dayOfWeek:ee(this,b).serialize()}}},u=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakMap,j=new WeakMap,b=new WeakMap,y=new WeakSet,Up=function(A,N,O){const k=N.step;return k?k===1&&N.start===A.min&&N.end&&N.end>=O?A.hasQuestionMarkChar?"?":"*":k!==1&&N.start===A.min&&N.end&&N.end>=O-k+1?`*/${k}`:null:null},Hp=function(A,N){const O=A.step;if(O===1)return`${A.start}-${A.end}`;const k=A.start===0?A.count-1:A.count;if(!O)throw new Error("Unexpected range step");if(!A.end)throw new Error("Unexpected range end");if(O*k>A.end){const Z=(K,R)=>{if(typeof A.start!="number")throw new Error("Unexpected range start");return R%O===0?A.start+R:null};if(typeof A.start!="number")throw new Error("Unexpected range start");const B={length:A.end-A.start+1};return Array.from(B,Z).filter(K=>K!==null).join(",")}return A.end===N-O+1?`${A.start}/${O}`:`${A.start}-${A.end}/${O}`},at(x,y),x);return sc.CronFieldCollection=r,sc}var Bf={},jx;function Fp(){return jx||(jx=1,(function(n){var h,f,j,b,y,x,C,M,D,ts,N,Gs,Vp,Pp,Bp,$p,Jf,Yp,Gp,Ir;Object.defineProperty(n,"__esModule",{value:!0}),n.CronExpression=n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const r=Sh();n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const u=1e4,I=class I{constructor(S,te){at(this,N);at(this,h);at(this,f);at(this,j);at(this,b);at(this,y);at(this,x);at(this,C,null);at(this,M,!1);Oe(this,h,te),Oe(this,f,te.tz),Oe(this,b,te.startDate?new r.CronDate(te.startDate,ee(this,f)):null),Oe(this,y,te.endDate?new r.CronDate(te.endDate,ee(this,f)):null);let ae=te.currentDate??te.startDate;if(ae){const ie=new r.CronDate(ae,ee(this,f));ee(this,b)&&ie.getTime()<ee(this,b).getTime()?ae=ee(this,b):ee(this,y)&&ie.getTime()>ee(this,y).getTime()&&(ae=ee(this,y))}Oe(this,j,new r.CronDate(ae,ee(this,f))),Oe(this,x,S)}get fields(){return ee(this,x)}static fieldsToExpression(S,te){return new I(S,te||{})}next(){return Te(this,N,Ir).call(this)}prev(){return Te(this,N,Ir).call(this,!0)}hasNext(){const S=ee(this,j);try{return Te(this,N,Ir).call(this),!0}catch{return!1}finally{Oe(this,j,S)}}hasPrev(){const S=ee(this,j);try{return Te(this,N,Ir).call(this,!0),!0}catch{return!1}finally{Oe(this,j,S)}}take(S){const te=[];if(S>=0)for(let ae=0;ae<S;ae++)try{te.push(this.next())}catch{return te}else for(let ae=0;ae>S;ae--)try{te.push(this.prev())}catch{return te}return te}reset(S){Oe(this,j,new r.CronDate(S||ee(this,h).currentDate))}stringify(S=!1){return ee(this,x).stringify(S)}includesDate(S){const{second:te,minute:ae,hour:ie,month:ge}=ee(this,x),pe=new r.CronDate(S,ee(this,f));return!(!te.values.includes(pe.getSeconds())||!ae.values.includes(pe.getMinutes())||!ie.values.includes(pe.getHours())||!ge.values.includes(pe.getMonth()+1)||!Te(this,N,Jf).call(this,pe)||ee(this,x).dayOfWeek.nthDay>0&&Math.ceil(pe.getDate()/7)!==ee(this,x).dayOfWeek.nthDay)}toString(){return ee(this,h).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Te(this,N,Ir).call(this),done:!this.hasNext()})}}};h=new WeakMap,f=new WeakMap,j=new WeakMap,b=new WeakMap,y=new WeakMap,x=new WeakMap,C=new WeakMap,M=new WeakMap,D=new WeakSet,ts=function(S,te){return te.some(ae=>ae===S)},N=new WeakSet,Gs=function(S,te){return S[te?S.length-1:0]},Vp=function(S){const te=`${S.getFullYear()}-${S.getMonth()+1}-${S.getDate()}`;if(ee(this,C)===te)return ee(this,M);const ae=new r.CronDate(S);ae.setStartOfDay();const ie=new r.CronDate(S);return ie.setEndOfDay(),Oe(this,C,te),Oe(this,M,ae.getUTCOffset()!==ie.getUTCOffset()),ee(this,M)},Pp=function(S,te,ae){const ie=ee(this,x).second.values,ge=S.getSeconds(),pe=ee(this,x).second.findNearestValue(ge,ae);if(pe!==null){S.setSeconds(pe);return}S.applyDateOperation(te,r.TimeUnit.Minute,ee(this,x).hour.values.length),S.setSeconds(Te(this,N,Gs).call(this,ie,ae))},Bp=function(S,te,ae){const ie=ee(this,x).minute.values,ge=ee(this,x).second.values,pe=S.getMinutes(),$=ee(this,x).minute.findNearestValue(pe,ae);if($!==null){S.setMinutes($),S.setSeconds(Te(this,N,Gs).call(this,ge,ae));return}S.applyDateOperation(te,r.TimeUnit.Hour,ee(this,x).hour.values.length),S.setMinutes(Te(this,N,Gs).call(this,ie,ae)),S.setSeconds(Te(this,N,Gs).call(this,ge,ae))},$p=function(S,te){const ae=te.isLastWeekdayOfMonth();return S.some(ie=>{const ge=parseInt(ie.toString().charAt(0),10)%7;if(Number.isNaN(ge))throw new Error(`Invalid last weekday of the month expression: ${ie}`);return te.getDay()===ge&&ae})},Jf=function(S){var J,fe,me;const te=ee(this,x).dayOfMonth.isWildcard,ae=!te,ie=ee(this,x).dayOfWeek.isWildcard,ge=!ie,pe=Te(J=I,D,ts).call(J,S.getDate(),ee(this,x).dayOfMonth.values)||ee(this,x).dayOfMonth.hasLastChar&&S.isLastDayOfMonth(),$=Te(fe=I,D,ts).call(fe,S.getDay(),ee(this,x).dayOfWeek.values)||ee(this,x).dayOfWeek.hasLastChar&&Te(me=I,D,$p).call(me,ee(this,x).dayOfWeek.values,S);return!!(ae&&ge&&(pe||$)||pe&&!ge||te&&!ie&&$)},Yp=function(S,te,ae){var be,H;const ie=ee(this,x).hour.values,ge=ie,pe=S.getHours(),$=Te(be=I,D,ts).call(be,pe,ie),J=S.dstStart===pe,fe=S.dstEnd===pe;if(J)return Te(H=I,D,ts).call(H,pe-1,ie)?!0:(S.invokeDateOperation(te,r.TimeUnit.Hour),!1);if(fe&&!ae)return S.dstEnd=null,S.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,ge.length),!1;if($)return!0;S.dstStart=null;const me=ee(this,x).hour.findNearestValue(pe,ae);if(me===null)return S.applyDateOperation(te,r.TimeUnit.Day,ge.length),!1;if(Te(this,N,Vp).call(this,S)){const se=ae?pe-me:me-pe;for(let he=0;he<se;he++)S.applyDateOperation(te,r.TimeUnit.Hour,ge.length)}else S.setHours(me);return S.setMinutes(Te(this,N,Gs).call(this,ee(this,x).minute.values,ae)),S.setSeconds(Te(this,N,Gs).call(this,ee(this,x).second.values,ae)),!1},Gp=function(S){if(!ee(this,b)&&!ee(this,y))return;const te=S.getTime();if(ee(this,b)&&te<ee(this,b).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(ee(this,y)&&te>ee(this,y).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Ir=function(S=!1){var pe,$,J;const te=S?r.DateMathOp.Subtract:r.DateMathOp.Add,ae=new r.CronDate(ee(this,j)),ie=ae.getTime();let ge=0;for(;++ge<u;){if(Te(this,N,Gp).call(this,ae),!Te(this,N,Jf).call(this,ae)){ae.applyDateOperation(te,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!(ee(this,x).dayOfWeek.nthDay<=0||Math.ceil(ae.getDate()/7)===ee(this,x).dayOfWeek.nthDay)){ae.applyDateOperation(te,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!Te(pe=I,D,ts).call(pe,ae.getMonth()+1,ee(this,x).month.values)){ae.applyDateOperation(te,r.TimeUnit.Month,ee(this,x).hour.values.length);continue}if(Te(this,N,Yp).call(this,ae,te,S)){if(!Te($=I,D,ts).call($,ae.getMinutes(),ee(this,x).minute.values)){Te(this,N,Bp).call(this,ae,te,S);continue}if(!Te(J=I,D,ts).call(J,ae.getSeconds(),ee(this,x).second.values)){Te(this,N,Pp).call(this,ae,te,S);continue}if(ie===ae.getTime()){(te==="Add"||ae.getMilliseconds()===0)&&ae.applyDateOperation(te,r.TimeUnit.Second,ee(this,x).hour.values.length);continue}break}}if(ge>u)throw new Error(n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return ae.getMilliseconds()!==0&&ae.setMilliseconds(0),Oe(this,j,ae),ae},at(I,D);let o=I;n.CronExpression=o,n.default=o})(Bf)),Bf}var au={},Nx;function vw(){if(Nx)return au;Nx=1,Object.defineProperty(au,"__esModule",{value:!0}),au.seededRandom=u;function n(o){let h=2166136261;for(let f=0;f<o.length;f++)h^=o.charCodeAt(f),h=Math.imul(h,16777619);return()=>h>>>0}function r(o){return()=>{let h=o+=1831565813;return h=Math.imul(h^h>>>15,h|1),h^=h+Math.imul(h^h>>>7,h|61),((h^h>>>14)>>>0)/4294967296}}function u(o){const h=o?n(o)():Math.floor(Math.random()*1e10);return r(h)}return au}var wx;function eh(){var x,C,Ip,Fs,Zp,Wp,Qp,Xp,Jp,Kp,ev,Kf,tv,av;if(wx)return Ua;wx=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.CronExpressionParser=Ua.DayOfWeek=Ua.Months=Ua.CronUnit=Ua.PredefinedExpressions=void 0;const n=qp(),r=Fp(),u=vw(),o=Ch();var h;(function(G){G["@yearly"]="0 0 0 1 1 *",G["@annually"]="0 0 0 1 1 *",G["@monthly"]="0 0 0 1 * *",G["@weekly"]="0 0 0 * * 0",G["@daily"]="0 0 0 * * *",G["@hourly"]="0 0 * * * *",G["@minutely"]="0 * * * * *",G["@secondly"]="* * * * * *",G["@weekdays"]="0 0 0 * * 1-5",G["@weekends"]="0 0 0 * * 0,6"})(h||(Ua.PredefinedExpressions=h={}));var f;(function(G){G.Second="Second",G.Minute="Minute",G.Hour="Hour",G.DayOfMonth="DayOfMonth",G.Month="Month",G.DayOfWeek="DayOfWeek"})(f||(Ua.CronUnit=f={}));var j;(function(G){G[G.jan=1]="jan",G[G.feb=2]="feb",G[G.mar=3]="mar",G[G.apr=4]="apr",G[G.may=5]="may",G[G.jun=6]="jun",G[G.jul=7]="jul",G[G.aug=8]="aug",G[G.sep=9]="sep",G[G.oct=10]="oct",G[G.nov=11]="nov",G[G.dec=12]="dec"})(j||(Ua.Months=j={}));var b;(function(G){G[G.sun=0]="sun",G[G.mon=1]="mon",G[G.tue=2]="tue",G[G.wed=3]="wed",G[G.thu=4]="thu",G[G.fri=5]="fri",G[G.sat=6]="sat"})(b||(Ua.DayOfWeek=b={}));let y=(C=class{static parse(I,le={}){var he,ye,Re,xe,Se,lt,Ye,wt;const{strict:S=!1,hashSeed:te}=le,ae=(0,u.seededRandom)(te);I=h[I]||I;const ie=Te(he=C,x,Ip).call(he,I,S);if(!(ie.dayOfMonth==="*"||ie.dayOfWeek==="*"||!S))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ge=Te(ye=C,x,Fs).call(ye,f.Second,ie.second,o.CronSecond.constraints,ae),pe=Te(Re=C,x,Fs).call(Re,f.Minute,ie.minute,o.CronMinute.constraints,ae),$=Te(xe=C,x,Fs).call(xe,f.Hour,ie.hour,o.CronHour.constraints,ae),J=Te(Se=C,x,Fs).call(Se,f.Month,ie.month,o.CronMonth.constraints,ae),fe=Te(lt=C,x,Fs).call(lt,f.DayOfMonth,ie.dayOfMonth,o.CronDayOfMonth.constraints,ae),{dayOfWeek:me,nthDayOfWeek:be}=Te(Ye=C,x,tv).call(Ye,ie.dayOfWeek),H=Te(wt=C,x,Fs).call(wt,f.DayOfWeek,me,o.CronDayOfWeek.constraints,ae),se=new n.CronFieldCollection({second:new o.CronSecond(ge,{rawValue:ie.second}),minute:new o.CronMinute(pe,{rawValue:ie.minute}),hour:new o.CronHour($,{rawValue:ie.hour}),dayOfMonth:new o.CronDayOfMonth(fe,{rawValue:ie.dayOfMonth}),month:new o.CronMonth(J,{rawValue:ie.month}),dayOfWeek:new o.CronDayOfWeek(H,{rawValue:ie.dayOfWeek,nthDayOfWeek:be})});return new r.CronExpression(se,{...le,expression:I})}},x=new WeakSet,Ip=function(I,le){if(le&&!I.length)throw new Error("Invalid cron expression");I=I||"0 * * * * *";const S=I.trim().split(/\s+/);if(le&&S.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(S.length>6)throw new Error("Invalid cron expression, too many fields");const te=["*","*","*","*","*","0"];S.length<te.length&&S.unshift(...te.slice(S.length));const[ae,ie,ge,pe,$,J]=S;return{second:ae,minute:ie,hour:ge,dayOfMonth:pe,month:$,dayOfWeek:J}},Fs=function(I,le,S,te){if((I===f.Month||I===f.DayOfWeek)&&(le=le.replace(/[a-z]{3}/gi,ae=>{ae=ae.toLowerCase();const ie=j[ae]||b[ae];if(ie===void 0)throw new Error(`Validation error, cannot resolve alias "${ae}"`);return ie.toString()})),!S.validChars.test(le))throw new Error(`Invalid characters, got value: ${le}`);return le=Te(this,x,Zp).call(this,le,S),le=Te(this,x,Wp).call(this,le,S,te),Te(this,x,Qp).call(this,I,le,S)},Zp=function(I,le){return I.replace(/[*?]/g,le.min+"-"+le.max)},Wp=function(I,le,S){const te=S();return I.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(ae,ie,ge,pe)=>{if(ie&&ge&&pe){const $=parseInt(ie,10),J=parseInt(ge,10),fe=parseInt(pe,10);if($>J)throw new Error(`Invalid range: ${$}-${J}, min > max`);if(fe<=0)throw new Error(`Invalid step: ${fe}, must be positive`);const me=Math.max($,le.min),be=Math.floor(te*fe),H=[];for(let se=Math.floor(me/fe)*fe+be;se<=J;se+=fe)se>=me&&H.push(se);return H.join(",")}else if(ie&&ge){const $=parseInt(ie,10),J=parseInt(ge,10);if($>J)throw new Error(`Invalid range: ${$}-${J}, min > max`);return String(Math.floor(te*(J-$+1))+$)}else if(pe){const $=parseInt(pe,10);if($<=0)throw new Error(`Invalid step: ${$}, must be positive`);const J=Math.floor(te*$),fe=[];for(let me=Math.floor(le.min/$)*$+J;me<=le.max;me+=$)me>=le.min&&fe.push(me);return fe.join(",")}else return String(Math.floor(te*(le.max-le.min+1)+le.min))})},Qp=function(I,le,S){const te=[];function ae(ge,pe){var $;if(Array.isArray(ge))te.push(...ge);else if(Te($=C,x,av).call($,pe,ge))te.push(ge);else{const J=parseInt(ge.toString(),10);if(!(J>=pe.min&&J<=pe.max))throw new Error(`Constraint error, got value ${ge} expected range ${pe.min}-${pe.max}`);te.push(I===f.DayOfWeek?J%7:ge)}}return le.split(",").forEach(ge=>{var pe;if(!(ge.length>0))throw new Error("Invalid list value format");ae(Te(pe=C,x,Xp).call(pe,I,ge,S),S)}),te},Xp=function(I,le,S){var ae,ie;const te=le.split("/");if(te.length>2)throw new Error(`Invalid repeat: ${le}`);return te.length===2?(isNaN(parseInt(te[0],10))||(te[0]=`${te[0]}-${S.max}`),Te(ae=C,x,Kf).call(ae,I,te[0],parseInt(te[1],10),S)):Te(ie=C,x,Kf).call(ie,I,le,1,S)},Jp=function(I,le,S){if(!(!isNaN(I)&&!isNaN(le)&&I>=S.min&&le<=S.max))throw new Error(`Constraint error, got range ${I}-${le} expected range ${S.min}-${S.max}`);if(I>le)throw new Error(`Invalid range: ${I}-${le}, min(${I}) > max(${le})`)},Kp=function(I){if(!(!isNaN(I)&&I>0))throw new Error(`Constraint error, cannot repeat at every ${I} time.`)},ev=function(I,le,S,te){const ae=[];I===f.DayOfWeek&&S%7===0&&ae.push(0);for(let ie=le;ie<=S;ie+=te)ae.indexOf(ie)===-1&&ae.push(ie);return ae},Kf=function(I,le,S,te){const ae=le.split("-");if(ae.length<=1)return isNaN(+le)?le:+le;const[ie,ge]=ae.map(pe=>parseInt(pe,10));return Te(this,x,Jp).call(this,ie,ge,te),Te(this,x,Kp).call(this,S),Te(this,x,ev).call(this,I,ie,ge,S)},tv=function(I){const le=I.split("#");if(le.length<=1)return{dayOfWeek:le[0]};const S=+le[le.length-1],te=I.match(/([,-/])/);if(te!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${te==null?void 0:te[0]}\` special characters are incompatible`);if(!(le.length<=2&&!isNaN(S)&&S>=1&&S<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:le[0],nthDayOfWeek:S}},av=function(I,le){return I.chars.some(S=>le.toString().includes(S))},at(C,x),C);return Ua.CronExpressionParser=y,Ua}var yn={};const yw={},bw=Object.freeze(Object.defineProperty({__proto__:null,default:yw},Symbol.toStringTag,{value:"Module"})),Sx=_y(bw);var Cx;function jw(){var f,j,th,nv;if(Cx)return yn;Cx=1;var n=yn&&yn.__createBinding||(Object.create?(function(x,C,M,D){D===void 0&&(D=M);var A=Object.getOwnPropertyDescriptor(C,M);(!A||("get"in A?!C.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return C[M]}}),Object.defineProperty(x,D,A)}):(function(x,C,M,D){D===void 0&&(D=M),x[D]=C[M]})),r=yn&&yn.__setModuleDefault||(Object.create?(function(x,C){Object.defineProperty(x,"default",{enumerable:!0,value:C})}):function(x,C){x.default=C}),u=yn&&yn.__importStar||(function(){var x=function(C){return x=Object.getOwnPropertyNames||function(M){var D=[];for(var A in M)Object.prototype.hasOwnProperty.call(M,A)&&(D[D.length]=A);return D},x(C)};return function(C){if(C&&C.__esModule)return C;var M={};if(C!=null)for(var D=x(C),A=0;A<D.length;A++)D[A]!=="default"&&n(M,C,D[A]);return r(M,C),M}})();Object.defineProperty(yn,"__esModule",{value:!0}),yn.CronFileParser=void 0;const o=eh();let h=(j=class{static async parseFile(C){var A;const{readFile:M}=await Promise.resolve().then(()=>u(Sx)),D=await M(C,"utf8");return Te(A=j,f,th).call(A,D)}static parseFileSync(C){var A;const{readFileSync:M}=Sx,D=M(C,"utf8");return Te(A=j,f,th).call(A,D)}},f=new WeakSet,th=function(C){var A;const M=C.split(`
446
+ `),D={variables:{},expressions:[],errors:{}};for(const N of M){const O=N.trim();if(O.length===0||O.startsWith("#"))continue;const k=O.match(/^(.*)=(.*)$/);if(k){const[,Z,B]=k;D.variables[Z]=B.replace(/["']/g,"");continue}try{const Z=Te(A=j,f,nv).call(A,O);D.expressions.push(Z.interval)}catch(Z){D.errors[O]=Z}}return D},nv=function(C){const M=C.split(" ");return{interval:o.CronExpressionParser.parse(M.slice(0,5).join(" ")),command:M.slice(5,M.length)}},at(j,f),j);return yn.CronFileParser=h,yn}var Ex;function Nw(){return Ex||(Ex=1,(function(n){var r=Bs&&Bs.__createBinding||(Object.create?(function(x,C,M,D){D===void 0&&(D=M);var A=Object.getOwnPropertyDescriptor(C,M);(!A||("get"in A?!C.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return C[M]}}),Object.defineProperty(x,D,A)}):(function(x,C,M,D){D===void 0&&(D=M),x[D]=C[M]})),u=Bs&&Bs.__exportStar||function(x,C){for(var M in x)M!=="default"&&!Object.prototype.hasOwnProperty.call(C,M)&&r(C,x,M)};Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=n.CronExpressionParser=n.CronExpression=n.CronFieldCollection=n.CronDate=void 0;const o=eh();var h=Sh();Object.defineProperty(n,"CronDate",{enumerable:!0,get:function(){return h.CronDate}});var f=qp();Object.defineProperty(n,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var j=Fp();Object.defineProperty(n,"CronExpression",{enumerable:!0,get:function(){return j.CronExpression}});var b=eh();Object.defineProperty(n,"CronExpressionParser",{enumerable:!0,get:function(){return b.CronExpressionParser}});var y=jw();Object.defineProperty(n,"CronFileParser",{enumerable:!0,get:function(){return y.CronFileParser}}),u(Ch(),n),n.default=o.CronExpressionParser})(Bs)),Bs}var ww=Nw();const lv=6048e5,Sw=864e5,Cw=6e4,Ew=36e5,Tx=Symbol.for("constructDateFrom");function Va(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&Tx in n?n[Tx](r):n instanceof Date?new n.constructor(r):new Date(r)}function At(n,r){return Va(r||n,n)}function Tw(n,r,u){return Va(n,+At(n)+r)}function nu(n,r,u){return Tw(n,r*Ew)}let Mw={};function Su(){return Mw}function jc(n,r){var b,y,x,C;const u=Su(),o=(r==null?void 0:r.weekStartsOn)??((y=(b=r==null?void 0:r.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??u.weekStartsOn??((C=(x=u.locale)==null?void 0:x.options)==null?void 0:C.weekStartsOn)??0,h=At(n,r==null?void 0:r.in),f=h.getDay(),j=(f<o?7:0)+f-o;return h.setDate(h.getDate()-j),h.setHours(0,0,0,0),h}function gu(n,r){return jc(n,{...r,weekStartsOn:1})}function sv(n,r){const u=At(n,r==null?void 0:r.in),o=u.getFullYear(),h=Va(u,0);h.setFullYear(o+1,0,4),h.setHours(0,0,0,0);const f=gu(h),j=Va(u,0);j.setFullYear(o,0,4),j.setHours(0,0,0,0);const b=gu(j);return u.getTime()>=f.getTime()?o+1:u.getTime()>=b.getTime()?o:o-1}function Mx(n){const r=At(n),u=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return u.setUTCFullYear(r.getFullYear()),+n-+u}function Ow(n,...r){const u=Va.bind(null,r.find(o=>typeof o=="object"));return r.map(u)}function Ox(n,r){const u=At(n,r==null?void 0:r.in);return u.setHours(0,0,0,0),u}function Rw(n,r,u){const[o,h]=Ow(u==null?void 0:u.in,n,r),f=Ox(o),j=Ox(h),b=+f-Mx(f),y=+j-Mx(j);return Math.round((b-y)/Sw)}function Dw(n,r){const u=sv(n,r),o=Va(n,0);return o.setFullYear(u,0,4),o.setHours(0,0,0,0),gu(o)}function kw(n,r){let u,o=r==null?void 0:r.in;return n.forEach(h=>{!o&&typeof h=="object"&&(o=Va.bind(null,h));const f=At(h,o);(!u||u<f||isNaN(+f))&&(u=f)}),Va(o,u||NaN)}function Aw(n,r){let u,o=r==null?void 0:r.in;return n.forEach(h=>{!o&&typeof h=="object"&&(o=Va.bind(null,h));const f=At(h,o);(!u||u>f||isNaN(+f))&&(u=f)}),Va(o,u||NaN)}function _w(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function zw(n){return!(!_w(n)&&typeof n!="number"||isNaN(+At(n)))}function Lw(n){return r=>{const o=(n?Math[n]:Math.trunc)(r);return o===0?0:o}}function Uw(n,r){return+At(n)-+At(r)}function Rx(n,r,u){const o=Uw(n,r)/Cw;return Lw(u==null?void 0:u.roundingMethod)(o)}function Hw(n,r){const u=At(n,r==null?void 0:r.in);return u.setFullYear(u.getFullYear(),0,1),u.setHours(0,0,0,0),u}const qw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Vw=(n,r,u)=>{let o;const h=qw[n];return typeof h=="string"?o=h:r===1?o=h.one:o=h.other.replace("{{count}}",r.toString()),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"in "+o:o+" ago":o};function $f(n){return(r={})=>{const u=r.width?String(r.width):n.defaultWidth;return n.formats[u]||n.formats[n.defaultWidth]}}const Pw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Bw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$w={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Yw={date:$f({formats:Pw,defaultWidth:"full"}),time:$f({formats:Bw,defaultWidth:"full"}),dateTime:$f({formats:$w,defaultWidth:"full"})},Gw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Fw=(n,r,u,o)=>Gw[n];function hc(n){return(r,u)=>{const o=u!=null&&u.context?String(u.context):"standalone";let h;if(o==="formatting"&&n.formattingValues){const j=n.defaultFormattingWidth||n.defaultWidth,b=u!=null&&u.width?String(u.width):j;h=n.formattingValues[b]||n.formattingValues[j]}else{const j=n.defaultWidth,b=u!=null&&u.width?String(u.width):n.defaultWidth;h=n.values[b]||n.values[j]}const f=n.argumentCallback?n.argumentCallback(r):r;return h[f]}}const Iw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ww={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Qw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Xw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Jw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Kw=(n,r)=>{const u=Number(n),o=u%100;if(o>20||o<10)switch(o%10){case 1:return u+"st";case 2:return u+"nd";case 3:return u+"rd"}return u+"th"},e2={ordinalNumber:Kw,era:hc({values:Iw,defaultWidth:"wide"}),quarter:hc({values:Zw,defaultWidth:"wide",argumentCallback:n=>n-1}),month:hc({values:Ww,defaultWidth:"wide"}),day:hc({values:Qw,defaultWidth:"wide"}),dayPeriod:hc({values:Xw,defaultWidth:"wide",formattingValues:Jw,defaultFormattingWidth:"wide"})};function mc(n){return(r,u={})=>{const o=u.width,h=o&&n.matchPatterns[o]||n.matchPatterns[n.defaultMatchWidth],f=r.match(h);if(!f)return null;const j=f[0],b=o&&n.parsePatterns[o]||n.parsePatterns[n.defaultParseWidth],y=Array.isArray(b)?a2(b,M=>M.test(j)):t2(b,M=>M.test(j));let x;x=n.valueCallback?n.valueCallback(y):y,x=u.valueCallback?u.valueCallback(x):x;const C=r.slice(j.length);return{value:x,rest:C}}}function t2(n,r){for(const u in n)if(Object.prototype.hasOwnProperty.call(n,u)&&r(n[u]))return u}function a2(n,r){for(let u=0;u<n.length;u++)if(r(n[u]))return u}function n2(n){return(r,u={})=>{const o=r.match(n.matchPattern);if(!o)return null;const h=o[0],f=r.match(n.parsePattern);if(!f)return null;let j=n.valueCallback?n.valueCallback(f[0]):f[0];j=u.valueCallback?u.valueCallback(j):j;const b=r.slice(h.length);return{value:j,rest:b}}}const l2=/^(\d+)(th|st|nd|rd)?/i,s2=/\d+/i,r2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},i2={any:[/^b/i,/^(a|c)/i]},c2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},o2={any:[/1/i,/2/i,/3/i,/4/i]},u2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},d2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},f2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},h2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},m2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},x2={ordinalNumber:n2({matchPattern:l2,parsePattern:s2,valueCallback:n=>parseInt(n,10)}),era:mc({matchPatterns:r2,defaultMatchWidth:"wide",parsePatterns:i2,defaultParseWidth:"any"}),quarter:mc({matchPatterns:c2,defaultMatchWidth:"wide",parsePatterns:o2,defaultParseWidth:"any",valueCallback:n=>n+1}),month:mc({matchPatterns:u2,defaultMatchWidth:"wide",parsePatterns:d2,defaultParseWidth:"any"}),day:mc({matchPatterns:f2,defaultMatchWidth:"wide",parsePatterns:h2,defaultParseWidth:"any"}),dayPeriod:mc({matchPatterns:m2,defaultMatchWidth:"any",parsePatterns:g2,defaultParseWidth:"any"})},p2={code:"en-US",formatDistance:Vw,formatLong:Yw,formatRelative:Fw,localize:e2,match:x2,options:{weekStartsOn:0,firstWeekContainsDate:1}};function v2(n,r){const u=At(n,r==null?void 0:r.in);return Rw(u,Hw(u))+1}function y2(n,r){const u=At(n,r==null?void 0:r.in),o=+gu(u)-+Dw(u);return Math.round(o/lv)+1}function rv(n,r){var C,M,D,A;const u=At(n,r==null?void 0:r.in),o=u.getFullYear(),h=Su(),f=(r==null?void 0:r.firstWeekContainsDate)??((M=(C=r==null?void 0:r.locale)==null?void 0:C.options)==null?void 0:M.firstWeekContainsDate)??h.firstWeekContainsDate??((A=(D=h.locale)==null?void 0:D.options)==null?void 0:A.firstWeekContainsDate)??1,j=Va((r==null?void 0:r.in)||n,0);j.setFullYear(o+1,0,f),j.setHours(0,0,0,0);const b=jc(j,r),y=Va((r==null?void 0:r.in)||n,0);y.setFullYear(o,0,f),y.setHours(0,0,0,0);const x=jc(y,r);return+u>=+b?o+1:+u>=+x?o:o-1}function b2(n,r){var b,y,x,C;const u=Su(),o=(r==null?void 0:r.firstWeekContainsDate)??((y=(b=r==null?void 0:r.locale)==null?void 0:b.options)==null?void 0:y.firstWeekContainsDate)??u.firstWeekContainsDate??((C=(x=u.locale)==null?void 0:x.options)==null?void 0:C.firstWeekContainsDate)??1,h=rv(n,r),f=Va((r==null?void 0:r.in)||n,0);return f.setFullYear(h,0,o),f.setHours(0,0,0,0),jc(f,r)}function j2(n,r){const u=At(n,r==null?void 0:r.in),o=+jc(u,r)-+b2(u,r);return Math.round(o/lv)+1}function ct(n,r){const u=n<0?"-":"",o=Math.abs(n).toString().padStart(r,"0");return u+o}const Kl={y(n,r){const u=n.getFullYear(),o=u>0?u:1-u;return ct(r==="yy"?o%100:o,r.length)},M(n,r){const u=n.getMonth();return r==="M"?String(u+1):ct(u+1,2)},d(n,r){return ct(n.getDate(),r.length)},a(n,r){const u=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return u.toUpperCase();case"aaa":return u;case"aaaaa":return u[0];case"aaaa":default:return u==="am"?"a.m.":"p.m."}},h(n,r){return ct(n.getHours()%12||12,r.length)},H(n,r){return ct(n.getHours(),r.length)},m(n,r){return ct(n.getMinutes(),r.length)},s(n,r){return ct(n.getSeconds(),r.length)},S(n,r){const u=r.length,o=n.getMilliseconds(),h=Math.trunc(o*Math.pow(10,u-3));return ct(h,r.length)}},Gr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dx={G:function(n,r,u){const o=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return u.era(o,{width:"abbreviated"});case"GGGGG":return u.era(o,{width:"narrow"});case"GGGG":default:return u.era(o,{width:"wide"})}},y:function(n,r,u){if(r==="yo"){const o=n.getFullYear(),h=o>0?o:1-o;return u.ordinalNumber(h,{unit:"year"})}return Kl.y(n,r)},Y:function(n,r,u,o){const h=rv(n,o),f=h>0?h:1-h;if(r==="YY"){const j=f%100;return ct(j,2)}return r==="Yo"?u.ordinalNumber(f,{unit:"year"}):ct(f,r.length)},R:function(n,r){const u=sv(n);return ct(u,r.length)},u:function(n,r){const u=n.getFullYear();return ct(u,r.length)},Q:function(n,r,u){const o=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(o);case"QQ":return ct(o,2);case"Qo":return u.ordinalNumber(o,{unit:"quarter"});case"QQQ":return u.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return u.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return u.quarter(o,{width:"wide",context:"formatting"})}},q:function(n,r,u){const o=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(o);case"qq":return ct(o,2);case"qo":return u.ordinalNumber(o,{unit:"quarter"});case"qqq":return u.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return u.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return u.quarter(o,{width:"wide",context:"standalone"})}},M:function(n,r,u){const o=n.getMonth();switch(r){case"M":case"MM":return Kl.M(n,r);case"Mo":return u.ordinalNumber(o+1,{unit:"month"});case"MMM":return u.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return u.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return u.month(o,{width:"wide",context:"formatting"})}},L:function(n,r,u){const o=n.getMonth();switch(r){case"L":return String(o+1);case"LL":return ct(o+1,2);case"Lo":return u.ordinalNumber(o+1,{unit:"month"});case"LLL":return u.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return u.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return u.month(o,{width:"wide",context:"standalone"})}},w:function(n,r,u,o){const h=j2(n,o);return r==="wo"?u.ordinalNumber(h,{unit:"week"}):ct(h,r.length)},I:function(n,r,u){const o=y2(n);return r==="Io"?u.ordinalNumber(o,{unit:"week"}):ct(o,r.length)},d:function(n,r,u){return r==="do"?u.ordinalNumber(n.getDate(),{unit:"date"}):Kl.d(n,r)},D:function(n,r,u){const o=v2(n);return r==="Do"?u.ordinalNumber(o,{unit:"dayOfYear"}):ct(o,r.length)},E:function(n,r,u){const o=n.getDay();switch(r){case"E":case"EE":case"EEE":return u.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return u.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return u.day(o,{width:"short",context:"formatting"});case"EEEE":default:return u.day(o,{width:"wide",context:"formatting"})}},e:function(n,r,u,o){const h=n.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"e":return String(f);case"ee":return ct(f,2);case"eo":return u.ordinalNumber(f,{unit:"day"});case"eee":return u.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return u.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return u.day(h,{width:"short",context:"formatting"});case"eeee":default:return u.day(h,{width:"wide",context:"formatting"})}},c:function(n,r,u,o){const h=n.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"c":return String(f);case"cc":return ct(f,r.length);case"co":return u.ordinalNumber(f,{unit:"day"});case"ccc":return u.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return u.day(h,{width:"narrow",context:"standalone"});case"cccccc":return u.day(h,{width:"short",context:"standalone"});case"cccc":default:return u.day(h,{width:"wide",context:"standalone"})}},i:function(n,r,u){const o=n.getDay(),h=o===0?7:o;switch(r){case"i":return String(h);case"ii":return ct(h,r.length);case"io":return u.ordinalNumber(h,{unit:"day"});case"iii":return u.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return u.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return u.day(o,{width:"short",context:"formatting"});case"iiii":default:return u.day(o,{width:"wide",context:"formatting"})}},a:function(n,r,u){const h=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"aaa":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return u.dayPeriod(h,{width:"narrow",context:"formatting"});case"aaaa":default:return u.dayPeriod(h,{width:"wide",context:"formatting"})}},b:function(n,r,u){const o=n.getHours();let h;switch(o===12?h=Gr.noon:o===0?h=Gr.midnight:h=o/12>=1?"pm":"am",r){case"b":case"bb":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return u.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return u.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(n,r,u){const o=n.getHours();let h;switch(o>=17?h=Gr.evening:o>=12?h=Gr.afternoon:o>=4?h=Gr.morning:h=Gr.night,r){case"B":case"BB":case"BBB":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return u.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return u.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(n,r,u){if(r==="ho"){let o=n.getHours()%12;return o===0&&(o=12),u.ordinalNumber(o,{unit:"hour"})}return Kl.h(n,r)},H:function(n,r,u){return r==="Ho"?u.ordinalNumber(n.getHours(),{unit:"hour"}):Kl.H(n,r)},K:function(n,r,u){const o=n.getHours()%12;return r==="Ko"?u.ordinalNumber(o,{unit:"hour"}):ct(o,r.length)},k:function(n,r,u){let o=n.getHours();return o===0&&(o=24),r==="ko"?u.ordinalNumber(o,{unit:"hour"}):ct(o,r.length)},m:function(n,r,u){return r==="mo"?u.ordinalNumber(n.getMinutes(),{unit:"minute"}):Kl.m(n,r)},s:function(n,r,u){return r==="so"?u.ordinalNumber(n.getSeconds(),{unit:"second"}):Kl.s(n,r)},S:function(n,r){return Kl.S(n,r)},X:function(n,r,u){const o=n.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Ax(o);case"XXXX":case"XX":return Is(o);case"XXXXX":case"XXX":default:return Is(o,":")}},x:function(n,r,u){const o=n.getTimezoneOffset();switch(r){case"x":return Ax(o);case"xxxx":case"xx":return Is(o);case"xxxxx":case"xxx":default:return Is(o,":")}},O:function(n,r,u){const o=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+kx(o,":");case"OOOO":default:return"GMT"+Is(o,":")}},z:function(n,r,u){const o=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+kx(o,":");case"zzzz":default:return"GMT"+Is(o,":")}},t:function(n,r,u){const o=Math.trunc(+n/1e3);return ct(o,r.length)},T:function(n,r,u){return ct(+n,r.length)}};function kx(n,r=""){const u=n>0?"-":"+",o=Math.abs(n),h=Math.trunc(o/60),f=o%60;return f===0?u+String(h):u+String(h)+r+ct(f,2)}function Ax(n,r){return n%60===0?(n>0?"-":"+")+ct(Math.abs(n)/60,2):Is(n,r)}function Is(n,r=""){const u=n>0?"-":"+",o=Math.abs(n),h=ct(Math.trunc(o/60),2),f=ct(o%60,2);return u+h+r+f}const _x=(n,r)=>{switch(n){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},iv=(n,r)=>{switch(n){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},N2=(n,r)=>{const u=n.match(/(P+)(p+)?/)||[],o=u[1],h=u[2];if(!h)return _x(n,r);let f;switch(o){case"P":f=r.dateTime({width:"short"});break;case"PP":f=r.dateTime({width:"medium"});break;case"PPP":f=r.dateTime({width:"long"});break;case"PPPP":default:f=r.dateTime({width:"full"});break}return f.replace("{{date}}",_x(o,r)).replace("{{time}}",iv(h,r))},w2={p:iv,P:N2},S2=/^D+$/,C2=/^Y+$/,E2=["D","DD","YY","YYYY"];function T2(n){return S2.test(n)}function M2(n){return C2.test(n)}function O2(n,r,u){const o=R2(n,r,u);if(console.warn(o),E2.includes(n))throw new RangeError(o)}function R2(n,r,u){const o=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${o} to the input \`${u}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const D2=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,k2=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,A2=/^'([^]*?)'?$/,_2=/''/g,z2=/[a-zA-Z]/;function Ys(n,r,u){var C,M,D,A;const o=Su(),h=o.locale??p2,f=o.firstWeekContainsDate??((M=(C=o.locale)==null?void 0:C.options)==null?void 0:M.firstWeekContainsDate)??1,j=o.weekStartsOn??((A=(D=o.locale)==null?void 0:D.options)==null?void 0:A.weekStartsOn)??0,b=At(n,u==null?void 0:u.in);if(!zw(b))throw new RangeError("Invalid time value");let y=r.match(k2).map(N=>{const O=N[0];if(O==="p"||O==="P"){const k=w2[O];return k(N,h.formatLong)}return N}).join("").match(D2).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const O=N[0];if(O==="'")return{isToken:!1,value:L2(N)};if(Dx[O])return{isToken:!0,value:N};if(O.match(z2))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:N}});h.localize.preprocessor&&(y=h.localize.preprocessor(b,y));const x={firstWeekContainsDate:f,weekStartsOn:j,locale:h};return y.map(N=>{if(!N.isToken)return N.value;const O=N.value;(M2(O)||T2(O))&&O2(O,r,String(n));const k=Dx[O[0]];return k(b,O,h.localize,x)}).join("")}function L2(n){const r=n.match(A2);return r?r[1].replace(_2,"'"):n}function U2(n,r){return+At(n)>+At(r)}function H2(n,r){return+At(n)<+At(r)}function q2(n,r){const u=At(n,r==null?void 0:r.in);return u.setMinutes(0,0,0),u}const Yf=wp,lu=[{bg:"bg-indigo-400",border:"border-indigo-400/60"},{bg:"bg-cyan-400",border:"border-cyan-400/60"},{bg:"bg-rose-400",border:"border-rose-400/60"},{bg:"bg-violet-400",border:"border-violet-400/60"},{bg:"bg-amber-400",border:"border-amber-400/60"}],fl=160,su=14,V2=10,P2=7,zx=4,B2=({configs:n,currentProjectId:r,onEditJob:u,queueStatus:o,queueAnalytics:h})=>{const f=z.useMemo(()=>q2(new Date),[]),j=z.useMemo(()=>nu(f,24),[f]),b=z.useMemo(()=>nu(f,-24),[f]),y=j,x=z.useMemo(()=>{const R=[];for(let w=0;w<=24;w++)R.push(nu(f,w));return R},[f]),C=z.useMemo(()=>{const R=[];return n.forEach(({projectId:w,config:U})=>{var le,S,te,ae,ie,ge,pe;const G={executor:U.executorEnabled!==!1?U.cronSchedule:null,reviewer:U.reviewerEnabled?U.reviewerSchedule:null,qa:U.qa.enabled?U.qa.schedule:null,audit:U.audit.enabled?U.audit.schedule:null,ux:(le=U.ux)!=null&&le.enabled?U.ux.schedule:null,slicer:U.roadmapScanner.enabled?U.roadmapScanner.slicerSchedule:null,analytics:(S=U.analytics)!=null&&S.enabled?(te=U.analytics)==null?void 0:te.schedule:null,"pr-resolver":(ae=U.prResolver)!=null&&ae.enabled?U.prResolver.schedule:null,merger:(ie=U.merger)!=null&&ie.enabled?(ge=U.merger)==null?void 0:ge.schedule:null,manager:(pe=U.manager)!=null&&pe.enabled?U.manager.schedule:null},I=U.cronScheduleOffset||0;Object.entries(G).forEach(([$,J])=>{if(J)try{const fe=ww.CronExpressionParser.parse(J,{currentDate:f,endDate:j});for(;fe.hasNext();){const me=fe.next(),be=new Date(me.getTime());be.setMinutes(be.getMinutes()+I),U2(be,f)&&H2(be,j)&&R.push({projectId:w,jobType:$,time:be})}}catch(fe){console.error(`Failed to parse cron "${J}" for ${w}/${$}`,fe)}})}),R},[n,f,j]),M=z.useMemo(()=>{const R=new Set;return n.length===0||(n.every(w=>w.config.executorEnabled===!1)&&R.add("executor"),n.every(w=>!w.config.reviewerEnabled)&&R.add("reviewer"),n.every(w=>!w.config.qa.enabled)&&R.add("qa"),n.every(w=>!w.config.audit.enabled)&&R.add("audit"),n.every(w=>!w.config.roadmapScanner.enabled)&&R.add("slicer"),n.every(w=>{var U;return!((U=w.config.analytics)!=null&&U.enabled)})&&R.add("analytics"),n.every(w=>{var U;return!((U=w.config.prResolver)!=null&&U.enabled)})&&R.add("pr-resolver"),n.every(w=>{var U;return!((U=w.config.merger)!=null&&U.enabled)})&&R.add("merger"),n.every(w=>{var U;return!((U=w.config.manager)!=null&&U.enabled)})&&R.add("manager")),R},[n]),D=z.useMemo(()=>{const R=new Map;let w=0;return n.forEach(U=>{U.projectId===r||(R.set(U.projectId,w%lu.length),w++)}),R},[n,r]),A=R=>Rx(R,f),N=z.useMemo(()=>{const R=[];for(let w=0;w<=24;w++)R.push(nu(b,w));return R},[b]),O=R=>{const w=Aw([kw([R,b]),y]);return Rx(w,b)},k=z.useMemo(()=>{const R=(h==null?void 0:h.recentRuns)??[],w=new Map;for(const U of R){const G=U.providerKey||"default",I=new Date(U.startedAt*1e3),le=U.finishedAt?new Date(U.finishedAt*1e3):new Date;le<b||I>y||(w.has(G)||w.set(G,[]),w.get(G).push({id:U.id,jobType:U.jobType,status:U.status,projectPath:U.projectPath,startedAt:I,finishedAt:le,throttledCount:U.throttledCount}))}if(o!=null&&o.running){const U=o.running.providerKey??"default";w.has(U)||w.set(U,[]),w.get(U).push({id:o.running.id,jobType:o.running.jobType,status:"running",projectPath:o.running.projectPath,startedAt:new Date((o.running.dispatchedAt??o.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(w.entries()).sort(([U],[G])=>U.localeCompare(G)).map(([U,G])=>({providerKey:U,runs:G.sort((I,le)=>I.startedAt.getTime()-le.startedAt.getTime())}))},[y,b,h,o]),Z=R=>R.split(/[-_]/).map(w=>w.charAt(0).toUpperCase()+w.slice(1)).join(" "),B=n.length>1,K=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((R,w)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},w))});return s.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-slate-800 bg-slate-950/50 flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Execution Timeline (Next 24h)"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Upcoming scheduled runs across projects. Aligned columns = overlap."})]}),B&&s.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[s.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),s.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),n.filter(R=>R.projectId!==r).slice(0,5).map(R=>{const w=D.get(R.projectId)??0,U=lu[w],G=(R.projectId.split("/").pop()??R.projectId).slice(0,14);return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${U.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:R.projectId,children:G})]},R.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+fl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:fl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((R,w)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:w*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ys(R,"HH:mm")})},w))})]}),s.jsxs("div",{className:"relative",children:[n.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),Yf.map(R=>{const w=M.has(R.id),U=C.filter(I=>I.jobType===R.id);if(!B)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${w?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:fl},className:"shrink-0 p-3 border-r border-slate-800/50 flex items-center gap-2",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${R.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:R.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[K,U.length===0?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-600 italic",children:w?"Disabled":"No runs in this window"})}):U.map((I,le)=>s.jsx("button",{type:"button",onClick:()=>u==null?void 0:u(I.projectId,I.jobType),style:{left:A(I.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${R.color.bg} ${R.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${R.label} at ${Ys(I.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:Ys(I.time,"HH:mm")})},le))]})]},R.id);const G=n.length*su+zx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${w?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:fl,height:G},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${R.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:R.label})]}),n.map(I=>{const le=I.projectId===r,S=(I.projectId.split("/").pop()??I.projectId).slice(0,14),te=D.get(I.projectId)??0,ae=le?R.color.bg:lu[te].bg;return s.jsxs("div",{style:{height:su},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${ae}`}),s.jsx("span",{className:`text-[9px] truncate ${le?"text-slate-200 font-semibold":"text-slate-600"}`,title:I.projectId,children:le?`${S} ★`:S})]},I.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:G},children:[K,n.map((I,le)=>{const S=I.projectId===r,te=U.filter(J=>J.projectId===I.projectId),ae=zx+le*su,ie=S?V2:P2,ge=Math.floor((su-ie)/2),pe=D.get(I.projectId)??0,$=S?{bg:R.color.bg,border:R.color.border}:lu[pe];return s.jsxs(ze.Fragment,{children:[le>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:ae}}),te.map((J,fe)=>s.jsx("button",{type:"button",onClick:()=>u==null?void 0:u(I.projectId,J.jobType),style:{left:A(J.time)-3,top:ae+ge,height:ie},className:`absolute w-6 rounded border ${$.bg} ${$.border} ${S?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${I.projectId} · ${R.label} @ ${Ys(J.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-20",children:Ys(J.time,"HH:mm")})},fe))]},I.projectId)}),U.length===0&&!w&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-700 italic",children:"No runs in this window"})})]})]},R.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:fl+A(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})}),s.jsxs("div",{className:"p-3 bg-slate-900/40 flex items-center gap-4 text-[10px] text-slate-500",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1.5 h-3 rounded bg-blue-500/50 border border-blue-500"}),s.jsx("span",{children:"Each block = one scheduled run"})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-[1px] h-4 bg-rose-500"}),s.jsx("span",{children:"Current Time"})]}),B&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project  ·  blocks in same column = scheduling overlap"})})]}),k.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(h==null?void 0:h.recentRuns.length)??0," recorded runs"]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar","data-testid":"provider-execution-timeline",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+fl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:fl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:N.map((R,w)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:w*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ys(R,"HH:mm")})},w))})]}),s.jsx("div",{className:"relative",children:k.map(({providerKey:R,runs:w})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${R}`,children:[s.jsxs("div",{style:{width:fl},className:"shrink-0 p-3 border-r border-slate-800/50 flex flex-col justify-center",children:[s.jsx("span",{className:"text-xs font-semibold text-slate-300 truncate",title:R,children:Z(R)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:R})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:N.map((U,G)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},G))}),w.map(U=>{const G=Yf.find(pe=>pe.id===U.jobType)??Yf[0],I=O(U.startedAt),le=O(U.finishedAt),S=Math.max(le-I,8),te=U.status==="running",ae=U.status==="error"||U.status==="failed"||U.status==="errored",ie=te?"bg-green-500":ae?"bg-red-500":G.color.bg,ge=te?"border-green-400/60":ae?"border-red-400/60":G.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ie} ${ge} opacity-85 shadow-lg ${te?"animate-pulse":""}`,style:{left:I,width:S},title:`${R} • ${G.label} • ${Ys(U.startedAt,"MMM d HH:mm")} • ${U.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:G.label}),s.jsx("span",{className:"text-white/70",children:U.status}),U.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",U.throttledCount,"x"]})]})},`${R}-${U.id}-${U.startedAt.getTime()}`)})]})]},R))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:fl+O(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},xu=[{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"}],Eh=[{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",ux:"0 7 * * 1",slicer:"35 19,7 * * *",prResolver:"15 9,15,21 * * *",merger:"55 */4 * * *",manager:"15 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",ux:"Mon 7:00am",slicer:"7:35pm & 7:35am",prResolver:"9:15am, 3:15pm, 9:15pm",merger:"Every 4h at :55",manager:"Daily at 7:15am"}},{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",ux:"0 7 * * 1",slicer:"35 */6 * * *",prResolver:"15 6,14,22 * * *",merger:"55 */4 * * *",manager:"15 7 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",ux:"Mon 7:00am",slicer:"Every 6h at :35",prResolver:"6:15am, 2:15pm & 10:15pm",merger:"Every 4h at :55",manager:"Daily at 7:15am"}},{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",ux:"0 10 * * 1",slicer:"35 7 * * 1",prResolver:"15 8,12,16 * * 1-5",merger:"55 */4 * * 1-5",manager:"15 7 * * 1-5"},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",ux:"Mon 10:00am",slicer:"Mon 7:35am",prResolver:"8:15am, 12:15pm & 4:15pm weekdays",merger:"Every 4h at :55 weekdays",manager:"Weekdays at 7:15am"}},{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",ux:"0 7 * * 1",slicer:"35 1 * * 1",prResolver:"15 8 * * 1,4",merger:"55 */8 * * *",manager:"15 7 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",ux:"Mon 7:00am",slicer:"Mon 1:35am",prResolver:"Mon & Thu at 8:15am",merger:"Every 8h at :55",manager:"Mon 7:15am"}}];function Wr(n){return n?n.trim().replace(/\s+/g," "):""}function hl(n,r){return Wr(n)===Wr(r)}function ah(n){if(n)return Eh.find(r=>r.id===n)}function cv(n,r,u,o,h,f,j,b,y,x){return hl(n.schedules.executor,r)&&hl(n.schedules.reviewer,u)&&hl(n.schedules.qa,o)&&hl(n.schedules.audit,h)&&hl(n.schedules.ux,f)&&hl(n.schedules.slicer,j)&&hl(n.schedules.prResolver,b)&&hl(n.schedules.merger,y)&&hl(n.schedules.manager,x)}function $2(n,r,u,o,h,f,j,b,y){return Eh.find(x=>cv(x,n,r,u,o,h,f,j,b,y))}function Y2(n,r,u,o,h,f,j,b,y,x){const C=ah(n);return C&&cv(C,r,u,o,h,f,j,b,y,x)?C:$2(r,u,o,h,f,j,b,y,x)}function Pt(n){const r=Wr(n),u=r.split(/\s+/);if(u.length!==5)return r;const[o,h,f,j,b]=u,y=/^\d+$/.test(o),x=xu.find(C=>Wr(C.value)===r);if(x)return x.label;if(o==="*/30"&&h==="*")return"Every 30 minutes";if(o==="0"&&h==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(y&&h.startsWith("*/")&&f==="*"&&j==="*"&&b==="*"){const C=parseInt(h.replace("*/",""),10);return o==="0"?`Every ${C} hours`:`Every ${C} hours at :${o.padStart(2,"0")}`}if(o==="0"&&h.startsWith("*/"))return`Every ${parseInt(h.replace("*/",""),10)} hours`;if(o==="0"&&h.includes("-")){const[C,M]=h.split("-");return`Every hour from ${gc(C)} to ${gc(M)}`}if(y&&h.includes("-")&&f==="*"&&j==="*"&&b==="*"){const[C,M]=h.split("-");return`Every hour from ${xc(C,o)} to ${xc(M,o)}`}if(o==="0"&&h.includes(",")){const C=h.split(",").map(gc);return C.length<=3?`At ${C.join(" and ")}`:`At ${C.slice(0,-1).join(", ")}, and ${C[C.length-1]}`}if(y&&h.includes(",")&&f==="*"&&j==="*"&&(b==="*"||b==="1-5")){const C=h.split(",").map(D=>xc(D,o)),M=b==="1-5"?"Weekdays at ":"At ";return C.length<=3?`${M}${C.join(" and ")}`:`${M}${C.slice(0,-1).join(", ")}, and ${C[C.length-1]}`}return o==="0"&&h!=="*"&&f==="*"&&j==="*"&&b==="*"?`Daily at ${gc(h)}`:y&&h!=="*"&&f==="*"&&j==="*"&&b==="*"?`Daily at ${xc(h,o)}`:o==="0"&&h!=="*"&&f==="*"&&j==="*"&&b==="1-5"?`Weekdays at ${gc(h)}`:y&&h!=="*"&&f==="*"&&j==="*"&&b==="1-5"?`Weekdays at ${xc(h,o)}`:r}function gc(n){const r=parseInt(n,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function xc(n,r){const u=r.padStart(2,"0"),o=parseInt(n,10);return Number.isNaN(o)?`${n}:${u}`:o===0?`12:${u} AM`:o<12?`${o}:${u} AM`:o===12?`12:${u} PM`:`${o-12}:${u} PM`}function G2(n){const r=Wr(n),u=xu.find(o=>Wr(o.value)===r);return(u==null?void 0:u.value)??"__custom__"}function Lx(n){const r=new Date,u=n.getTime()-r.getTime(),o=Math.floor(u/6e4),h=Math.floor(o/60),f=Math.floor(h/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:h<24?`in ${h} hour${h>1?"s":""}`:`in ${f} day${f>1?"s":""}`}const F2=({label:n,value:r,onChange:u,helperText:o,placeholder:h="5 */3 * * *"})=>{const f=G2(r),j=f==="__custom__",b=C=>{C!=="__custom__"&&u(C)},y=C=>{u(C.target.value)},x=xu.find(C=>C.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(We,{label:n,value:f,onChange:b,options:xu.map(C=>({label:C.label,value:C.value})),helperText:j?void 0:(x==null?void 0:x.description)||o}),j&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(je,{label:"Cron Expression",value:r,onChange:y,placeholder:h}),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)"]})]})]})},Ln=({id:n,icon:r,title:u,description:o,value:h,onChange:f})=>s.jsxs("div",{id:n,className:"rounded-xl border border-slate-700 bg-slate-800/50 p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"mt-0.5 p-1.5 rounded-md bg-slate-800 text-slate-400",children:s.jsx(r,{size:14})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:u}),s.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:o})]})]}),s.jsx(F2,{label:"",value:h,onChange:f})]}),I2=({form:n,scheduleMode:r,selectedTemplateId:u,onFieldChange:o,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:j})=>s.jsxs(et,{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.jsx("p",{className:"text-xs text-slate-500 mt-2 mb-2",children:"This tab only controls cadence. Runtime and provider settings live in the Jobs tab."})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:h,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Eh.map(b=>{const y=u===b.id;return s.jsxs("button",{type:"button",onClick:()=>j(b),className:`text-left p-4 rounded-lg border transition-colors ${y?"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:b.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:b.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",b.hints.executor],["Reviewer",b.hints.reviewer],["QA",b.hints.qa],["Audit",b.hints.audit],["UX",b.hints.ux],["Planner",b.hints.slicer],["PR Resolver",b.hints.prResolver],["Merger",b.hints.merger],["Manager",b.hints.manager]].map(([x,C])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:x}),s.jsx("span",{className:"text-xs text-slate-400",children:C})]},x))})]},b.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ln,{id:"job-schedule-executor",icon:bn,title:"PRD Executor",description:"Executes PRDs to generate code and create PRs",value:n.cronSchedule,onChange:b=>o("cronSchedule",b)}),s.jsx(Ln,{id:"job-schedule-reviewer",icon:yc,title:"PR Reviewer",description:"Reviews PRs and provides feedback or automated fixes",value:n.reviewerSchedule,onChange:b=>o("reviewerSchedule",b)}),s.jsx(Ln,{id:"job-schedule-qa",icon:vp,title:"Quality Assurance",description:"Automated UI testing using Playwright",value:n.qa.schedule,onChange:b=>o("qa",{...n.qa,schedule:b})}),s.jsx(Ln,{id:"job-schedule-audit",icon:Kr,title:"Code Audit",description:"Automated code quality and security audits",value:n.audit.schedule,onChange:b=>o("audit",{...n.audit,schedule:b})}),n.ux&&s.jsx(Ln,{id:"job-schedule-ux",icon:yc,title:"UX",description:"Inspect product flows with browser automation",value:n.ux.schedule,onChange:b=>o("ux",{...n.ux,schedule:b})}),s.jsx(Ln,{id:"job-schedule-slicer",icon:vh,title:"Planner",description:"Generate PRDs from ROADMAP.md or audit findings",value:n.roadmapScanner.slicerSchedule,onChange:b=>o("roadmapScanner",{...n.roadmapScanner,slicerSchedule:b})}),n.analytics&&s.jsx(Ln,{id:"job-schedule-analytics",icon:ju,title:"Analytics",description:"Fetch Amplitude data, analyze with AI, and create issues",value:n.analytics.schedule,onChange:b=>o("analytics",{...n.analytics,schedule:b})}),n.prResolver&&s.jsx(Ln,{id:"job-schedule-pr-resolver",icon:xh,title:"PR Resolver",description:"Rebases PRs and applies review feedback",value:n.prResolver.schedule,onChange:b=>o("prResolver",{...n.prResolver,schedule:b})}),n.merger&&s.jsx(Ln,{id:"job-schedule-merger",icon:Nu,title:"Merge Orchestrator",description:"Scans, rebases, and merges approved PRs",value:n.merger.schedule,onChange:b=>o("merger",{...n.merger,schedule:b})}),n.manager&&s.jsx(Ln,{id:"job-schedule-manager",icon:gh,title:"Manager",description:"Monitors roadmap, PRDs, docs, and system health",value:n.manager.schedule,onChange:b=>o("manager",{...n.manager,schedule:b})})]})]}),Zr=({label:n,value:r=[],onChange:u,placeholder:o,helpText:h})=>{const[f,j]=ze.useState(""),b=()=>{f.trim()&&!r.includes(f.trim())&&(u([...r,f.trim()]),j(""))},y=C=>{u(r.filter(M=>M!==C))},x=C=>{C.key==="Enter"&&(C.preventDefault(),b())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:n}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(C=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[C,s.jsx("button",{type:"button",onClick:()=>y(C),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${C}`,title:`Remove ${C}`,children:s.jsx(ei,{className:"h-3 w-3"})})]},C))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:C=>j(C.target.value),onKeyDown:x,placeholder:o,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(Le,{onClick:b,disabled:!f.trim(),"aria-label":`Add ${n.toLowerCase()} value`,children:s.jsx(as,{className:"h-4 w-4"})})]}),h&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:h})]})},Un=({title:n,icon:r,description:u,enabled:o,onToggle:h,expanded:f,onExpandChange:j,scheduleSummary:b,providerLabel:y,children:x,id:C})=>s.jsxs("div",{id:C,className:`border border-slate-800 rounded-xl overflow-hidden transition-all duration-200 ${f?"bg-slate-900/50 ring-1 ring-indigo-500/20":"bg-slate-900/20 hover:bg-slate-900/40"}`,children:[s.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer select-none",onClick:()=>j(!f),children:[s.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[s.jsx("div",{className:`p-2 rounded-lg ${f?"bg-indigo-500/20 text-indigo-400":"bg-slate-800 text-slate-400"}`,children:s.jsx(r,{className:"h-5 w-5"})}),s.jsxs("div",{className:"overflow-hidden",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-200 truncate",children:n}),!f&&s.jsx("p",{className:"text-xs text-slate-500 truncate",children:u})]})]}),s.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[!f&&s.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[b&&s.jsx(Tt,{variant:"neutral",className:"bg-slate-800/50 text-[10px]",children:b}),y&&s.jsx(Tt,{variant:"info",className:"bg-blue-500/5 text-[10px]",children:y})]}),s.jsx("div",{onClick:M=>M.stopPropagation(),children:s.jsx(Bt,{checked:o,onChange:h})}),s.jsx(mh,{className:`h-5 w-5 text-slate-500 transition-transform duration-300 ${f?"rotate-180 text-indigo-400":""}`})]})]}),s.jsx("div",{className:`grid transition-all duration-300 ease-in-out ${f?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"p-6 pt-0 space-y-6 border-t border-slate-800/50 mt-2",children:s.jsx("div",{className:"pt-6",children:x})})})})]}),Hn=({summary:n,onOpen:r})=>s.jsxs("div",{className:"flex flex-col gap-4 rounded-xl border border-slate-800 bg-slate-950/50 p-4 md:flex-row md:items-center md:justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Cadence"}),s.jsx("div",{className:"mt-1 text-sm font-medium text-slate-200",children:n}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Managed centrally in Automation > Schedules."})]}),s.jsx(Le,{variant:"outline",size:"sm",onClick:r,className:"border-slate-700 text-slate-300 hover:bg-slate-800",children:"Open Schedules"})]}),Z2=({form:n,updateField:r,handleRoadmapToggle:u,presetOptions:o,expandedJob:h,onExpandedJobChange:f,onOpenSchedule:j})=>{var x,C,M,D,A,N,O,k,Z,B,K,R;const b=(w,U)=>{const G={...n.jobProviders};U===""?delete G[w]:G[w]=U,r("jobProviders",G)},y=[{label:"Use Global (default)",value:""},...o];return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Prompt Augmentation"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Tune how repeated feedback patterns become prompt snippets."})]}),s.jsx("div",{className:"hidden rounded-lg bg-amber-500/10 p-2 text-amber-400 sm:block",children:s.jsx(Yj,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsxs("div",{className:"flex items-center justify-between rounded-md border border-slate-800 bg-slate-950/40 p-3",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Enable prompt augmentation"}),s.jsx("p",{className:"mt-0.5 text-xs text-slate-500",children:"Adds capped feedback snippets to future job prompts."})]}),s.jsx(Bt,{checked:n.feedback.enabled,onChange:w=>r("feedback",{...n.feedback,enabled:w})})]}),s.jsx(je,{label:"Activation Threshold",type:"number",min:"0",max:"1",step:"0.05",value:String(n.feedback.confidenceThreshold),onChange:w=>r("feedback",{...n.feedback,confidenceThreshold:Math.max(0,Math.min(1,Number(w.target.value||0)))}),helperText:"Minimum confidence required before a snippet can activate."}),s.jsx(je,{label:"TTL",type:"number",min:"1",value:String(n.feedback.augmentationTtlDays),onChange:w=>r("feedback",{...n.feedback,augmentationTtlDays:Math.max(1,Number(w.target.value||1))}),rightIcon:s.jsx("span",{className:"text-xs",children:"days"}),helperText:"How long an augmentation remains active before expiry."}),s.jsx(je,{label:"Max Snippets Per Job",type:"number",min:"0",value:String(n.feedback.maxActiveAugmentations),onChange:w=>r("feedback",{...n.feedback,maxActiveAugmentations:Math.max(0,Number(w.target.value||0))}),helperText:"Maximum active augmentation snippets applied to each job prompt."}),s.jsx(je,{label:"Success Streak Expiry",type:"number",min:"0",value:String(n.feedback.successStreakToExpire),onChange:w=>r("feedback",{...n.feedback,successStreakToExpire:Math.max(0,Number(w.target.value||0))}),helperText:"Consecutive successes before active snippets expire."})]})})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Configurations"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Enable jobs, choose providers, and tune runtime behavior. Cadence stays in Automation > Schedules."})]}),s.jsx("span",{className:"text-xs text-slate-500",children:"9 total jobs"})]}),s.jsx(Un,{id:"job-section-executor",title:"PRD Executor",icon:bn,description:"Executes PRDs to generate code and create PRs",enabled:n.executorEnabled,onToggle:w=>r("executorEnabled",w),expanded:h==="executor",onExpandChange:w=>f(w?"executor":null),scheduleSummary:Pt(n.cronSchedule),providerLabel:n.jobProviders.executor?(x=o.find(w=>w.value===n.jobProviders.executor))==null?void 0:x.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.cronSchedule),onOpen:()=>j("executor")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.executor??"",onChange:w=>b("executor",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.maxRuntime),onChange:w=>r("maxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for executor tasks"})]})]})}),s.jsx(Un,{id:"job-section-reviewer",title:"PR Reviewer",icon:yc,description:"Reviews PRs and provides feedback or automated fixes",enabled:n.reviewerEnabled,onToggle:w=>r("reviewerEnabled",w),expanded:h==="reviewer",onExpandChange:w=>f(w?"reviewer":null),scheduleSummary:Pt(n.reviewerSchedule),providerLabel:n.jobProviders.reviewer?(C=o.find(w=>w.value===n.jobProviders.reviewer))==null?void 0:C.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.reviewerSchedule),onOpen:()=>j("reviewer")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.reviewer??"",onChange:w=>b("reviewer",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.reviewerMaxRuntime),onChange:w=>r("reviewerMaxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.minReviewScore),onChange:w=>r("minReviewScore",Number(w.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(je,{label:"Max Retries",type:"number",value:String(n.reviewerMaxRetries),onChange:w=>r("reviewerMaxRetries",Number(w.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(je,{label:"Retry Delay",type:"number",value:String(n.reviewerRetryDelay),onChange:w=>r("reviewerRetryDelay",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(je,{label:"Max PRs Per Run",type:"number",value:String(n.reviewerMaxPrsPerRun),onChange:w=>r("reviewerMaxPrsPerRun",Number(w.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})]})}),s.jsx(Un,{id:"job-section-qa",title:"Quality Assurance",icon:vp,description:"Automated UI testing using Playwright",enabled:n.qa.enabled,onToggle:w=>r("qa",{...n.qa,enabled:w}),expanded:h==="qa",onExpandChange:w=>f(w?"qa":null),scheduleSummary:Pt(n.qa.schedule),providerLabel:n.jobProviders.qa?(M=o.find(w=>w.value===n.jobProviders.qa))==null?void 0:M.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.qa.schedule),onOpen:()=>j("qa")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.qa??"",onChange:w=>b("qa",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.qa.maxRuntime),onChange:w=>r("qa",{...n.qa,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(We,{label:"Artifacts",value:n.qa.artifacts,onChange:w=>r("qa",{...n.qa,artifacts:w}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(je,{label:"Skip Label",value:n.qa.skipLabel,onChange:w=>r("qa",{...n.qa,skipLabel:w.target.value}),helperText:"GitHub label to skip QA"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 mt-1.5",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-0.5",children:"Install browsers if missing"})]}),s.jsx(Bt,{checked:n.qa.autoInstallPlaywright,onChange:w=>r("qa",{...n.qa,autoInstallPlaywright:w})})]})]}),s.jsx(Zr,{label:"QA Branch Patterns",value:n.qa.branchPatterns,onChange:w=>r("qa",{...n.qa,branchPatterns:w}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(Un,{id:"job-section-audit",title:"Code Audit",icon:Kr,description:"Automated code quality and security audits",enabled:n.audit.enabled,onToggle:w=>r("audit",{...n.audit,enabled:w}),expanded:h==="audit",onExpandChange:w=>f(w?"audit":null),scheduleSummary:Pt(n.audit.schedule),providerLabel:n.jobProviders.audit?(D=o.find(w=>w.value===n.jobProviders.audit))==null?void 0:D.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.audit.schedule),onOpen:()=>j("audit")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.audit??"",onChange:w=>b("audit",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.audit.maxRuntime),onChange:w=>r("audit",{...n.audit,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Bt,{label:"Create Board Issues",checked:n.audit.createIssues,onChange:w=>r("audit",{...n.audit,createIssues:w}),className:"self-end pb-2"}),s.jsx(We,{label:"Target Column",value:n.audit.targetColumn,disabled:!n.audit.createIssues,onChange:w=>r("audit",{...n.audit,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]})]})]})}),s.jsx(Un,{id:"job-section-ux",title:"UX",icon:yc,description:"Inspect product flows with Playwright and draft prioritized UX reports",enabled:n.ux.enabled,onToggle:w=>r("ux",{...n.ux,enabled:w}),expanded:h==="ux",onExpandChange:w=>f(w?"ux":null),scheduleSummary:Pt(n.ux.schedule),providerLabel:n.jobProviders.ux?(A=o.find(w=>w.value===n.jobProviders.ux))==null?void 0:A.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.ux.schedule),onOpen:()=>j("ux")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.ux??"",onChange:w=>b("ux",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.ux.maxRuntime),onChange:w=>r("ux",{...n.ux,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Base URL",value:n.ux.baseUrl,onChange:w=>r("ux",{...n.ux,baseUrl:w.target.value}),placeholder:"https://app.example.com"}),s.jsx(je,{label:"Start URL",value:n.ux.startUrl,onChange:w=>r("ux",{...n.ux,startUrl:w.target.value}),placeholder:"/dashboard"}),s.jsx(je,{label:"Max Issues",type:"number",value:String(n.ux.maxIssues),onChange:w=>r("ux",{...n.ux,maxIssues:Math.max(1,Number(w.target.value||10))})}),s.jsx(We,{label:"Target Column",value:n.ux.targetColumn,onChange:w=>r("ux",{...n.ux,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsx(Bt,{label:"Auto-install Playwright",checked:n.ux.autoInstallPlaywright,onChange:w=>r("ux",{...n.ux,autoInstallPlaywright:w}),className:"self-end pb-2"})]}),s.jsx(Zr,{label:"Flows",values:n.ux.flows,onChange:w=>r("ux",{...n.ux,flows:w}),placeholder:"e.g., Sign in, Create project",helpText:"Key flows for the UX agent to inspect."}),s.jsx(je,{label:"Report Prompt",value:n.ux.reportPrompt,onChange:w=>r("ux",{...n.ux,reportPrompt:w.target.value}),placeholder:"Optional custom UX instructions"})]})}),s.jsx(Un,{id:"job-section-slicer",title:"Planner",icon:vh,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:n.roadmapScanner.enabled,onToggle:u,expanded:h==="slicer",onExpandChange:w=>f(w?"slicer":null),scheduleSummary:Pt(n.roadmapScanner.slicerSchedule),providerLabel:n.jobProviders.slicer?(N=o.find(w=>w.value===n.jobProviders.slicer))==null?void 0:N.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.roadmapScanner.slicerSchedule),onOpen:()=>j("slicer")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.slicer??"",onChange:w=>b("slicer",w),options:y}),s.jsx(je,{label:"Roadmap File Path",value:n.roadmapScanner.roadmapPath,onChange:w=>r("roadmapScanner",{...n.roadmapScanner,roadmapPath:w.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.roadmapScanner.slicerMaxRuntime||""),onChange:w=>r("roadmapScanner",{...n.roadmapScanner,slicerMaxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(We,{label:"Priority Mode",value:n.roadmapScanner.priorityMode||"roadmap-first",onChange:w=>r("roadmapScanner",{...n.roadmapScanner,priorityMode:w==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}]}),s.jsx(We,{label:"Issue Column",value:n.roadmapScanner.issueColumn||"Ready",onChange:w=>r("roadmapScanner",{...n.roadmapScanner,issueColumn:w==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})]})}),s.jsx(Un,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:ju,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:n.analytics.enabled,onToggle:w=>r("analytics",{...n.analytics,enabled:w}),expanded:h==="analytics",onExpandChange:w=>f(w?"analytics":null),scheduleSummary:Pt(n.analytics.schedule),providerLabel:n.jobProviders.analytics?(O=o.find(w=>w.value===n.jobProviders.analytics))==null?void 0:O.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.analytics.schedule),onOpen:()=>j("analytics")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.analytics??"",onChange:w=>b("analytics",w),options:y}),s.jsx(je,{label:"Amplitude API Key",value:((k=n.providerEnv)==null?void 0:k.AMPLITUDE_API_KEY)??"",onChange:w=>r("providerEnv",{...n.providerEnv,AMPLITUDE_API_KEY:w.target.value}),placeholder:"Required"}),s.jsx(je,{label:"Amplitude Secret Key",type:"password",value:((Z=n.providerEnv)==null?void 0:Z.AMPLITUDE_SECRET_KEY)??"",onChange:w=>r("providerEnv",{...n.providerEnv,AMPLITUDE_SECRET_KEY:w.target.value}),placeholder:"Required"}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.analytics.maxRuntime),onChange:w=>r("analytics",{...n.analytics,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(n.analytics.lookbackDays),onChange:w=>r("analytics",{...n.analytics,lookbackDays:Math.max(1,Math.min(90,Number(w.target.value||7)))})}),s.jsx(We,{label:"Target Column",value:n.analytics.targetColumn,onChange:w=>r("analytics",{...n.analytics,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:n.analytics.analysisPrompt??"",onChange:w=>r("analytics",{...n.analytics,analysisPrompt:w.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",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-y"})]})]})]})}),s.jsx(Un,{id:"job-section-pr-resolver",title:"PR Resolver",icon:xh,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:n.prResolver.enabled,onToggle:w=>r("prResolver",{...n.prResolver,enabled:w}),expanded:h==="pr-resolver",onExpandChange:w=>f(w?"pr-resolver":null),scheduleSummary:Pt(n.prResolver.schedule),providerLabel:n.jobProviders["pr-resolver"]?(B=o.find(w=>w.value===n.jobProviders["pr-resolver"]))==null?void 0:B.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.prResolver.schedule),onOpen:()=>j("pr-resolver")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders["pr-resolver"]??"",onChange:w=>b("pr-resolver",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.prResolver.maxRuntime),onChange:w=>r("prResolver",{...n.prResolver,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Per-PR Timeout",type:"number",value:String(n.prResolver.perPrTimeout),onChange:w=>r("prResolver",{...n.prResolver,perPrTimeout:Math.max(0,Number(w.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.prResolver.maxPrsPerRun),onChange:w=>r("prResolver",{...n.prResolver,maxPrsPerRun:Math.max(0,Number(w.target.value||0))})}),s.jsx(je,{label:"Ready Label",value:n.prResolver.readyLabel,onChange:w=>r("prResolver",{...n.prResolver,readyLabel:w.target.value})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[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:"AI conflict resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"AI help for non-trivial rebases"})]}),s.jsx(Bt,{checked:n.prResolver.aiConflictResolution,onChange:w=>r("prResolver",{...n.prResolver,aiConflictResolution:w})})]}),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:"AI review resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Implement open review comments"})]}),s.jsx(Bt,{checked:n.prResolver.aiReviewResolution,onChange:w=>r("prResolver",{...n.prResolver,aiReviewResolution:w})})]})]}),s.jsx(Zr,{label:"PR Resolver Branch Patterns",value:n.prResolver.branchPatterns,onChange:w=>r("prResolver",{...n.prResolver,branchPatterns:w}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all)"})]})}),s.jsx(Un,{id:"job-section-merger",title:"Merge Orchestrator",icon:Nu,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:n.merger.enabled,onToggle:w=>r("merger",{...n.merger,enabled:w}),expanded:h==="merger",onExpandChange:w=>f(w?"merger":null),scheduleSummary:Pt(n.merger.schedule),providerLabel:n.jobProviders.merger?(K=o.find(w=>w.value===n.jobProviders.merger))==null?void 0:K.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.merger.schedule),onOpen:()=>j("merger")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.merger??"",onChange:w=>b("merger",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.merger.maxRuntime),onChange:w=>r("merger",{...n.merger,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(We,{label:"Merge Method",value:n.merger.mergeMethod,onChange:w=>r("merger",{...n.merger,mergeMethod:w}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(je,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.merger.minReviewScore),onChange:w=>r("merger",{...n.merger,minReviewScore:Math.max(0,Math.min(100,Number(w.target.value||0)))})}),s.jsx(je,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.merger.maxPrsPerRun),onChange:w=>r("merger",{...n.merger,maxPrsPerRun:Math.max(0,Number(w.target.value||0))})}),s.jsx(We,{label:"CI Policy",value:n.merger.ciPolicy,onChange:w=>r("merger",{...n.merger,ciPolicy:w}),options:[{label:"Fallback to Local Checks",value:"fallback-local"},{label:"Require GitHub CI",value:"ci-only"},{label:"Ignore CI",value:"ignore"}]}),s.jsx(je,{label:"Local Check Command",value:n.merger.localCheckCommand,onChange:w=>r("merger",{...n.merger,localCheckCommand:w.target.value}),helperText:"Used only when CI policy falls back to local checks."})]}),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:"Rebase before merge"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rebase each PR against its base branch"})]}),s.jsx(Bt,{checked:n.merger.rebaseBeforeMerge,onChange:w=>r("merger",{...n.merger,rebaseBeforeMerge:w})})]}),s.jsx(Zr,{label:"Merger Branch Patterns",value:n.merger.branchPatterns,onChange:w=>r("merger",{...n.merger,branchPatterns:w}),placeholder:"e.g., feat/, night-watch/"})]})}),s.jsx(Un,{id:"job-section-manager",title:"Manager",icon:gh,description:"Monitors roadmap, PRDs, docs, board state, and system health",enabled:n.manager.enabled,onToggle:w=>r("manager",{...n.manager,enabled:w}),expanded:h==="manager",onExpandChange:w=>f(w?"manager":null),scheduleSummary:Pt(n.manager.schedule),providerLabel:n.jobProviders.manager?(R=o.find(w=>w.value===n.jobProviders.manager))==null?void 0:R.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hn,{summary:Pt(n.manager.schedule),onOpen:()=>j("manager")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.manager??"",onChange:w=>b("manager",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",min:"0",value:String(n.manager.maxRuntime),onChange:w=>r("manager",{...n.manager,maxRuntime:Math.max(0,Number(w.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(We,{label:"Output Mode",value:n.manager.outputMode,onChange:w=>r("manager",{...n.manager,outputMode:w}),options:[{value:"board-draft",label:"Board Draft"},{value:"filesystem-prd",label:"Filesystem PRD"},{value:"report-only",label:"Report Only"}]}),s.jsx(We,{label:"Authority",value:n.manager.authority,onChange:w=>r("manager",{...n.manager,authority:w}),options:[{value:"draft",label:"Draft"},{value:"ready",label:"Ready"},{value:"workflow",label:"Workflow"}]}),s.jsx(We,{label:"Target Column",value:n.manager.targetColumn,onChange:w=>r("manager",{...n.manager,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsx(je,{label:"Memory Path",value:n.manager.memoryPath,onChange:w=>r("manager",{...n.manager,memoryPath:w.target.value})}),s.jsx(je,{label:"Generated Docs Directory",value:n.manager.docsDir,onChange:w=>r("manager",{...n.manager,docsDir:w.target.value})}),s.jsx(je,{label:"Weekly Summary Day",type:"number",min:"0",max:"6",value:String(n.manager.weeklySummaryDay),onChange:w=>r("manager",{...n.manager,weeklySummaryDay:Math.max(0,Math.min(6,Number(w.target.value||0)))}),helperText:"0 = Sunday, 1 = Monday"}),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:"Weekly summary"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Send a periodic project health summary"})]}),s.jsx(Bt,{checked:n.manager.weeklySummaryEnabled,onChange:w=>r("manager",{...n.manager,weeklySummaryEnabled:w})})]})]})]})})]})]})},ov="5 * * * *",uv="25 */3 * * *",W2={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},Ux={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},Q2={enabled:!1,schedule:"50 3 * * 1",maxRuntime:1800,createIssues:!1,targetColumn:"Draft"},Hx={enabled:!1,schedule:"0 7 * * 1",maxRuntime:0,targetColumn:"Draft",baseUrl:"",startUrl:"",flows:[],autoInstallPlaywright:!0,maxIssues:10,reportPrompt:""},X2={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},qx={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},Vx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0,ciPolicy:"fallback-local",localCheckCommand:"yarn install --frozen-lockfile && yarn verify && yarn test"},J2={enabled:!0,schedule:"15 7 * * *",maxRuntime:0,authority:"draft",outputMode:"board-draft",targetColumn:"Draft",memoryPath:".night-watch/manager/memory.md",docsDir:".night-watch/manager/docs",weeklySummaryEnabled:!0,weeklySummaryDay:1};function Qr(){return{...W2}}function dv(){return{...Ux,branchPatterns:[...Ux.branchPatterns]}}function fv(){return{...Q2}}function Th(){return{...Hx,flows:[...Hx.flows]}}function Mh(){return{...X2}}function Nc(){return{...qx,branchPatterns:[...qx.branchPatterns]}}function Cu(){return{...Vx,branchPatterns:[...Vx.branchPatterns]}}function wc(){return{...J2}}const pu=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],hv={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"}}},K2={enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,manager:25,qa:20,audit:10,ux:10},providerBuckets:{}},eS=["executor","reviewer","qa","audit","ux","slicer","analytics","pr-resolver","merger","manager"],tS=new Set(["overview","schedules","jobs"]),Gf=n=>{if(!n)return null;const r=n==="planner"?"slicer":n;return["executor","reviewer","qa","audit","ux","slicer","analytics","pr-resolver","merger","manager"].includes(r)?r:null},ru=n=>({cronSchedule:n.cronSchedule||ov,reviewerSchedule:n.reviewerSchedule||uv,scheduleBundleId:n.scheduleBundleId??null,cronScheduleOffset:n.cronScheduleOffset??0,schedulingPriority:n.schedulingPriority??3,executorEnabled:n.executorEnabled??!0,reviewerEnabled:n.reviewerEnabled??!1,maxRuntime:n.maxRuntime??3600,reviewerMaxRuntime:n.reviewerMaxRuntime??1800,maxRetries:n.maxRetries??3,reviewerMaxRetries:n.reviewerMaxRetries??2,reviewerRetryDelay:n.reviewerRetryDelay??30,reviewerMaxPrsPerRun:n.reviewerMaxPrsPerRun??0,minReviewScore:n.minReviewScore??70,branchPatterns:n.branchPatterns||[],providerEnv:n.providerEnv||{},jobProviders:n.jobProviders||{},providerPresets:n.providerPresets??{},qa:n.qa||dv(),audit:n.audit||fv(),ux:n.ux||Th(),analytics:n.analytics||Mh(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??Nc(),merger:n.merger??Cu(),manager:n.manager??wc(),roadmapScanner:n.roadmapScanner||Qr(),queue:n.queue||K2}),uu=n=>{var r,u,o;return Y2(n.scheduleBundleId,n.cronSchedule,n.reviewerSchedule,n.qa.schedule,n.audit.schedule,n.ux.schedule,n.roadmapScanner.slicerSchedule??Qr().slicerSchedule,((r=n.prResolver)==null?void 0:r.schedule)??Nc().schedule,((u=n.merger)==null?void 0:u.schedule)??Cu().schedule,((o=n.manager)==null?void 0:o.schedule)??wc().schedule)},iu=n=>{const r=uu(n);return!n.scheduleBundleId&&r?{form:{...n,scheduleBundleId:r.id},detectedTemplate:r}:{form:n,detectedTemplate:r}},aS=()=>{var xl,Qe,pl,gt,$t,_t,zt,ss,Ks,er,sn;const n=Nn(),{addToast:r,selectedProjectId:u,globalModeLoading:o}=It(),[h,f]=z.useState(!1),[j,b]=z.useState(!1),[y,x]=z.useState(!1),[C,M]=z.useState(null),[D,A]=z.useState([]),[N,O]=z.useState(null),[k,Z]=z.useState(null),[B,K]=z.useState(!0),[R,w]=z.useState("overview"),[U,G]=z.useState(null),[I,le]=z.useState(null),[S,te]=z.useState(null),[ae,ie]=z.useState("template"),[ge,pe]=z.useState(""),[$,J]=z.useState(!1),[fe,me]=z.useState(!1),be=z.useRef(null),H=z.useRef(!1),se=z.useRef(null),{data:he,loading:ye,error:Re,refetch:xe}=qa(Tp,[u],{enabled:!o}),{data:Se,loading:lt,refetch:Ye}=qa(wh,[u],{enabled:!o});z.useEffect(()=>{if(o)return;let oe=!1;K(!0),O(null),Z(null),A([]);const ve=async(St=!1)=>{St&&K(!0),xe();const[ht,En,rs]=await Promise.all([Kg().catch(()=>null),EN(24).catch(()=>null),vN().catch(()=>[])]);oe||(O(ht),Z(En),A(rs),K(!1))};ve(!0);const Pe=setInterval(()=>{ve()},3e4);return()=>{oe=!0,clearInterval(Pe)}},[u,o,xe]),z.useEffect(()=>{if(!Se)return;if(H.current){H.current=!1;return}const{form:oe,detectedTemplate:ve}=iu(ru(Se));te(oe),be.current=oe,ie(ve?"template":"custom"),pe((ve==null?void 0:ve.id)??""),J(!1)},[Se]),z.useEffect(()=>{!S||!be.current||J(JSON.stringify(S)!==JSON.stringify(be.current))},[S]),z.useEffect(()=>{if(R!=="jobs"||!U)return;const oe=window.setTimeout(()=>{const ve=document.getElementById(`job-section-${U}`);ve&&ve.scrollIntoView({behavior:"smooth",block:"center"})},100);return()=>window.clearTimeout(oe)},[R,U]),z.useEffect(()=>{if(R!=="schedules"||ae!=="custom"||!I)return;const oe=I,ve=window.setTimeout(()=>{const Pe=document.getElementById(`job-schedule-${oe}`);Pe&&Pe.scrollIntoView({behavior:"smooth",block:"center"}),le(null)},100);return()=>window.clearTimeout(ve)},[R,ae,I]);const wt=(oe,ve)=>{te(Pe=>Pe&&{...Pe,[oe]:ve})},fa=()=>{if(ie("template"),!S)return;const oe=uu(S);if(oe){pe(oe.id),wt("scheduleBundleId",oe.id);return}const ve=ah(ge)??ah("always-on");ve&&ha(ve)},Oa=()=>{ie("custom"),wt("scheduleBundleId",null),pe("")},Ba=oe=>{const ve=Gf(oe);ve&&(ae!=="custom"&&Oa(),w("schedules"),le(ve))},ha=oe=>{pe(oe.id),te(ve=>ve&&{...ve,cronSchedule:oe.schedules.executor,reviewerSchedule:oe.schedules.reviewer,scheduleBundleId:oe.id,qa:{...ve.qa,schedule:oe.schedules.qa},audit:{...ve.audit,schedule:oe.schedules.audit},ux:{...ve.ux,schedule:oe.schedules.ux},roadmapScanner:{...ve.roadmapScanner,slicerSchedule:oe.schedules.slicer},prResolver:{...ve.prResolver,schedule:oe.schedules.prResolver},merger:{...ve.merger,schedule:oe.schedules.merger},manager:{...ve.manager,schedule:oe.schedules.manager}})},xa=async()=>{if(S){me(!0);try{const oe={};for(const ht of eS){const En=S.jobProviders[ht];typeof En=="string"&&En.trim().length>0?oe[ht]=En:Se!=null&&Se.jobProviders[ht]&&(oe[ht]=null)}const ve=await mu({cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,scheduleBundleId:ae==="template"?S.scheduleBundleId:null,cronScheduleOffset:S.cronScheduleOffset,schedulingPriority:S.schedulingPriority,executorEnabled:S.executorEnabled,reviewerEnabled:S.reviewerEnabled,maxRuntime:S.maxRuntime,reviewerMaxRuntime:S.reviewerMaxRuntime,maxRetries:S.maxRetries,reviewerMaxRetries:S.reviewerMaxRetries,reviewerRetryDelay:S.reviewerRetryDelay,reviewerMaxPrsPerRun:S.reviewerMaxPrsPerRun,minReviewScore:S.minReviewScore,branchPatterns:S.branchPatterns,providerEnv:S.providerEnv,jobProviders:oe,qa:S.qa,audit:S.audit,ux:S.ux,analytics:S.analytics,feedback:S.feedback,prResolver:S.prResolver,merger:S.merger,manager:S.manager,roadmapScanner:S.roadmapScanner,queue:S.queue}),{form:Pe}=iu(ru(ve));te(Pe),be.current=Pe,J(!1);let St="";try{await pc()}catch(ht){St=ht instanceof Error?ht.message:"Failed to reinstall cron"}r(St?{title:"Saved (Cron Reinstall Failed)",message:St,type:"warning"}:{title:"Saved",message:"Configuration updated and cron schedules reinstalled.",type:"success"}),H.current=!0,Ye()}catch(oe){r({title:"Save Failed",message:oe instanceof Error?oe.message:"Failed to save configuration",type:"error"})}finally{me(!1)}}},wn=()=>{if(be.current){te(be.current);const oe=be.current,ve=uu(oe);ie(ve?"template":"custom"),pe((ve==null?void 0:ve.id)??""),J(!1)}},Sn=async oe=>{try{const ve=await kp(oe),{form:Pe}=iu(ru(ve));te(Pe),be.current=Pe,J(!1);let St="";try{await pc()}catch(ht){St=ht instanceof Error?ht.message:"Failed to reinstall cron"}r(St?{title:"Saved (Cron Reinstall Failed)",message:St,type:"warning"}:{title:oe?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${oe?"enabled":"disabled"}.`,type:"success"}),H.current=!0,Ye(),xe()}catch(ve){r({title:"Toggle Failed",message:ve instanceof Error?ve.message:"Failed to toggle roadmap scanner",type:"error"})}},Cn=async()=>{if(he){f(!0);try{he.paused?(await pc(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await Op(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),xe()}catch(oe){r({title:"Action Failed",message:oe instanceof Error?oe.message:"Toggle failed",type:"error"})}finally{f(!1)}}},$a=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){b(!0);try{const oe=await TN();r({title:"Queue Cleared",message:`Removed ${oe.cleared} pending jobs.`,type:"success"}),Kg().then(O)}catch(oe){r({title:"Clear Failed",message:oe instanceof Error?oe.message:"Failed to clear queue",type:"error"})}finally{b(!1)}}},Ya=async oe=>{if(S){me(!0);try{const ve=await mu({queue:{...S.queue,...oe}}),{form:Pe}=iu(ru(ve));te(Pe),be.current=Pe,J(!1),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),H.current=!0,Ye(),xe()}catch(ve){r({title:"Save Failed",message:ve instanceof Error?ve.message:"Save failed",type:"error"})}finally{me(!1)}}},Wt=async oe=>{const ve=oe==="planner"?"slicer":oe;M(oe);try{await Mp(ve),r({title:"Job Triggered",message:`${oe} job queued successfully.`,type:"success"})}catch(Pe){r({title:"Trigger Failed",message:Pe instanceof Error?Pe.message:"Failed to trigger job",type:"error"})}finally{M(null)}},Ga=oe=>{const ve=Gf(oe);ve&&(w("jobs"),G(ve))};z.useEffect(()=>{if(!S||se.current===n.search)return;se.current=n.search;const oe=new URLSearchParams(n.search),ve=oe.get("tab"),Pe=ve==="queue"?"overview":ve,St=oe.get("mode"),ht=Gf(oe.get("jobType"));if(Pe&&tS.has(Pe)){if(Pe==="jobs"){w("jobs"),ht&&G(ht);return}if(Pe==="schedules"){if(ht){Ba(ht);return}w("schedules"),St==="custom"&&ae!=="custom"&&Oa(),St==="template"&&ae!=="template"&&fa();return}w(Pe);return}St==="custom"&&ae!=="custom"&&(w("schedules"),Oa()),St==="template"&&ae!=="template"&&(w("schedules"),fa())},[n.search,S,ae]);const ns=z.useMemo(()=>{const oe={...hv,...(S==null?void 0:S.providerPresets)??{}};return Object.entries(oe).map(([ve,Pe])=>({label:Pe.name||ve,value:ve}))},[S==null?void 0:S.providerPresets]);if(ye||lt||!S)return s.jsx(Ha,{message:"Loading automation",detail:"Fetching schedules, queue state, and job configuration."});if(Re||!he||!Se)return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[s.jsx(jn,{className:"h-10 w-10 text-red-500"}),s.jsx("div",{className:"text-slate-300 font-medium",children:"Failed to load scheduling data"}),s.jsx(Le,{onClick:()=>{xe(),Ye()},children:"Retry"})]});const vt=he.paused,Kt=S?uu(S):void 0,Bn=s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[s.jsxs(et,{className:"overflow-hidden border-slate-800",children:[s.jsxs("div",{className:"p-5 border-b border-slate-800 flex items-center justify-between bg-slate-900/30",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Zg,{className:"h-5 w-5 text-indigo-400"}),s.jsx("h3",{className:"font-semibold text-slate-200",children:"Execution Queue"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Le,{variant:"ghost",size:"sm",onClick:$a,loading:j,disabled:!(N!=null&&N.items.length),className:"text-slate-500 hover:text-red-400 hover:bg-red-400/10",children:[s.jsx(Qs,{className:"h-4 w-4 mr-1.5"}),"Clear"]}),s.jsx("div",{className:`p-1.5 rounded-lg cursor-pointer hover:bg-slate-800 transition-colors ${y?"text-indigo-400 bg-slate-800":"text-slate-500"}`,onClick:()=>x(!y),title:"Automation Settings",children:s.jsx(Fg,{className:"h-5 w-5"})})]})]}),s.jsx("div",{className:`transition-all duration-300 overflow-hidden ${y?"max-h-[500px]":"max-h-0"}`,children:s.jsxs("div",{className:"p-6 bg-slate-950/40 border-b border-slate-800 grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Dispatch Mode",value:((xl=S==null?void 0:S.queue)==null?void 0:xl.mode)||"auto",onChange:oe=>Ya({mode:oe}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(je,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((Qe=S==null?void 0:S.queue)==null?void 0:Qe.maxConcurrency)||1),onChange:oe=>Ya({maxConcurrency:Number(oe.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx(Bt,{label:"Coordinator Enabled",checked:((pl=S==null?void 0:S.queue)==null?void 0:pl.enabled)??!0,onChange:oe=>Ya({enabled:oe})})})]})}),s.jsx("div",{className:"p-0",children:B&&!N?s.jsx(Ha,{variant:"inline",message:"Loading queue"}):N!=null&&N.items.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3",children:"Job / Project"}),s.jsx("th",{className:"px-6 py-3",children:"Status"}),s.jsx("th",{className:"px-6 py-3",children:"Wait Time"}),s.jsx("th",{className:"px-6 py-3 text-right",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:N.items.map(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/20 transition-colors group",children:[s.jsxs("td",{className:"px-6 py-4",children:[s.jsx("div",{className:"font-medium text-slate-200",children:oe.jobType}),s.jsx("div",{className:"text-[11px] text-slate-500 truncate max-w-[200px]",title:oe.projectPath,children:oe.projectName||oe.projectPath})]}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Tt,{variant:oe.status==="running"?"info":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:Lx(new Date(oe.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>Ga(oe.jobType),className:"opacity-0 group-hover:opacity-100 p-2 text-slate-500 hover:text-indigo-400 transition-all",title:"Configure Job",children:s.jsx(Fg,{className:"h-4 w-4"})})})]},oe.id))})]})}):s.jsxs("div",{className:"py-12 flex flex-col items-center justify-center text-slate-500 text-sm italic",children:[s.jsx("div",{className:"mb-3 p-3 rounded-full bg-slate-900 border border-slate-800",children:s.jsx(Gg,{className:"h-6 w-6 opacity-30"})}),"Queue is empty"]})})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Operational Timeline"}),s.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-2",children:[s.jsx(bc,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),B&&D.length===0?s.jsx(Ha,{variant:"card",message:"Loading timeline",rows:2}):s.jsx(B2,{configs:D,currentProjectId:u??void 0,onEditJob:(oe,ve)=>Ga(ve),queueStatus:N,queueAnalytics:k})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Execution History (Last 24h)"}),s.jsx(et,{className:"border-slate-800 overflow-hidden",children:B&&!k?s.jsx(Ha,{variant:"inline",message:"Loading execution history"}):k!=null&&k.recentRuns.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-4",children:"Job Type"}),s.jsx("th",{className:"px-6 py-4",children:"Status"}),s.jsx("th",{className:"px-6 py-4",children:"Duration"}),s.jsx("th",{className:"px-6 py-4",children:"Started"}),s.jsx("th",{className:"px-6 py-4 text-right",children:"Provider"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:k.recentRuns.map(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/10 transition-colors",children:[s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"font-medium text-slate-300 capitalize",children:oe.jobType})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Tt,{variant:oe.status==="finished"?"success":oe.status==="failed"?"error":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400",children:oe.durationSeconds?`${oe.durationSeconds}s`:"--"}),s.jsx("td",{className:"px-6 py-4 text-slate-500 text-xs",children:Lx(new Date(oe.startedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right text-slate-500 font-mono text-xs",children:oe.providerKey||"default"})]},oe.id))})]})}):s.jsx("div",{className:"py-20 text-center text-slate-500 italic text-sm",children:"No recorded runs in the last 24 hours."})})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Automation Controls"}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Schedule Template"}),s.jsx("div",{className:"mt-1 text-sm font-medium text-slate-200",children:(Kt==null?void 0:Kt.label)??"Custom"}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:(Kt==null?void 0:Kt.description)??"Custom cron expressions are active for this project."})]}),s.jsx(We,{label:"Scheduling Priority",value:String(S.schedulingPriority),onChange:oe=>wt("schedulingPriority",Number(oe)),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(je,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(S.cronScheduleOffset),onChange:oe=>wt("cronScheduleOffset",Math.min(59,Math.max(0,Number(oe.target.value||0)))),helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]}),s.jsxs(et,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Efficiency Stats"}),s.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Avg Wait Time"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[N!=null&&N.averageWaitSeconds?(N.averageWaitSeconds/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]}),s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Oldest Pending"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[N!=null&&N.oldestPendingAge?(N.oldestPendingAge/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]})]})]}),s.jsxs(et,{className:"divide-y divide-slate-800 border-slate-800",children:[s.jsx("div",{className:"p-4 bg-slate-900/30",children:s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Manual Trigger"})}),s.jsx("div",{className:"p-2 space-y-1",children:[{id:"executor",label:"Run Executor",icon:bn,enabled:(S==null?void 0:S.executorEnabled)!==!1},{id:"reviewer",label:"Run Reviewer",icon:Kr,enabled:(S==null?void 0:S.reviewerEnabled)??!1},{id:"qa",label:"Run QA",icon:Zg,enabled:((gt=S==null?void 0:S.qa)==null?void 0:gt.enabled)??!1},{id:"audit",label:"Run Audit",icon:Gg,enabled:(($t=S==null?void 0:S.audit)==null?void 0:$t.enabled)??!1},{id:"ux",label:"Run UX",icon:Eye,enabled:((_t=S==null?void 0:S.ux)==null?void 0:_t.enabled)??!1},{id:"planner",label:"Run Planner",icon:vh,enabled:((zt=S==null?void 0:S.roadmapScanner)==null?void 0:zt.enabled)??!1},{id:"analytics",label:"Run Analytics",icon:ju,enabled:((ss=S==null?void 0:S.analytics)==null?void 0:ss.enabled)??!1},{id:"pr-resolver",label:"Run PR Resolver",icon:xh,enabled:((Ks=S==null?void 0:S.prResolver)==null?void 0:Ks.enabled)??!1},{id:"merger",label:"Run Merger",icon:Nu,enabled:((er=S==null?void 0:S.merger)==null?void 0:er.enabled)??!1},{id:"manager",label:"Run Manager",icon:gh,enabled:((sn=S==null?void 0:S.manager)==null?void 0:sn.enabled)??!1}].map(oe=>s.jsxs("button",{onClick:()=>Wt(oe.id),disabled:C===oe.id||!oe.enabled,className:`w-full flex items-center justify-between p-3 rounded-lg text-sm transition-colors group disabled:cursor-not-allowed ${oe.enabled?"text-slate-300 hover:bg-slate-800/40":"text-slate-600 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(oe.icon,{className:`h-4 w-4 ${oe.enabled?"text-slate-500 group-hover:text-indigo-400":"text-slate-700"}`}),oe.label]}),C===oe.id?s.jsx(bc,{className:"h-3 w-3 animate-spin text-indigo-400"}):oe.enabled?s.jsx(bn,{className:"h-3 w-3 opacity-0 group-hover:opacity-100 transition-all fill-current text-indigo-400"}):s.jsx("span",{className:"text-[10px] text-slate-600 uppercase tracking-wider",children:"Off"})]},oe.id))})]})]})]}),Js=S?s.jsx(I2,{form:{cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,qa:S.qa,audit:S.audit,ux:S.ux,analytics:S.analytics,roadmapScanner:{...S.roadmapScanner,slicerSchedule:S.roadmapScanner.slicerSchedule??Qr().slicerSchedule},prResolver:S.prResolver,merger:S.merger,manager:S.manager},scheduleMode:ae,selectedTemplateId:ge,onFieldChange:(oe,ve)=>{wt(oe,ve)},onSwitchToTemplate:fa,onSwitchToCustom:Oa,onApplyTemplate:ha}):null,ti=[{id:"overview",label:"Overview",content:Bn},{id:"schedules",label:"Schedules",content:Js},{id:"jobs",label:"Jobs",content:S?s.jsx(Z2,{form:S,updateField:wt,handleRoadmapToggle:Sn,presetOptions:ns,expandedJob:U,onExpandedJobChange:G,onOpenSchedule:Ba}):null}];return s.jsxs("div",{className:"max-w-6xl mx-auto space-y-6 pb-20",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-6",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-2xl font-bold text-slate-100 flex items-center gap-3",children:["Automation",s.jsx(Tt,{variant:vt?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:vt?"Paused":"Active"})]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Manage automation overview, schedules, jobs, and live queue"})]}),s.jsx(Le,{variant:vt?"primary":"outline",size:"lg",className:vt?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:Cn,loading:h,children:vt?s.jsxs(s.Fragment,{children:[s.jsx(bn,{className:"h-5 w-5 mr-2 fill-current"})," Resume Scheduling"]}):s.jsxs(s.Fragment,{children:[s.jsx(fu,{className:"h-5 w-5 mr-2"})," Pause Scheduling"]})})]}),s.jsx(zp,{tabs:ti,activeTab:R,onChange:w}),$&&s.jsx("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 w-full max-w-2xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-300",children:s.jsxs("div",{className:"bg-slate-900/90 backdrop-blur-md border border-indigo-500/30 rounded-2xl p-4 shadow-2xl flex items-center justify-between shadow-indigo-500/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/20 text-indigo-400",children:s.jsx(Zs,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:"Unsaved changes"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"Save to apply and reinstall cron schedules"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Le,{variant:"ghost",size:"sm",onClick:wn,className:"text-slate-400",children:[s.jsx(yh,{className:"h-4 w-4 mr-1.5"}),"Reset"]}),s.jsxs(Le,{variant:"primary",size:"sm",onClick:xa,loading:fe,children:[s.jsx(Np,{className:"h-4 w-4 mr-1.5"}),"Save"]})]})]})})]})},nS=({isOpen:n,onClose:r,title:u,children:o})=>(z.useEffect(()=>{const h=f=>{f.key==="Escape"&&r()};return n&&(document.addEventListener("keydown",h),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",h),document.body.style.overflow="unset"}},[n,r]),n?N1.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:r,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:u}),s.jsx("button",{onClick:r,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(ei,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:o})]})]}),document.body):null),lS=n=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(u=>n.toUpperCase().includes(u)),sS=({value:n,isSensitive:r})=>{const[u,o]=ze.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:u?n:"***********"}),s.jsx("button",{type:"button",onClick:()=>o(!u),className:"text-slate-500 hover:text-slate-300","aria-label":u?"Hide sensitive value":"Show sensitive value",title:u?"Hide sensitive value":"Show sensitive value",children:u?s.jsx(hj,{className:"h-4 w-4"}):s.jsx(yc,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:n})},mv=({envVars:n,onChange:r,compact:u=!1})=>{const[o,h]=ze.useState(""),[f,j]=ze.useState(""),[b,y]=ze.useState(null),[x,C]=ze.useState(""),{addToast:M}=It(),D=()=>{if(o.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(o)){M({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...n,[o]:f}),h(""),j("")}},A=B=>{const K={...n};delete K[B],r(K)},N=B=>{y(B),C(n[B]??"")},O=()=>{b&&(r({...n,[b]:x}),y(null),C(""))},k=()=>{y(null),C("")},Z=Object.entries(n);return s.jsxs("div",{className:"space-y-4",children:[!u&&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:Z.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):Z.map(([B,K])=>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:B}),b===B?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:R=>C(R.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:O,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${B} value`,title:`Save ${B} value`,children:s.jsx(B1,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:k,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${B}`,title:`Cancel editing ${B}`,children:s.jsx(ei,{className:"h-4 w-4"})})]}):s.jsx(sS,{value:K,isSensitive:lS(B)})]}),b!==B&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>N(B),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${B}`,title:`Edit ${B}`,children:s.jsx(wu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>A(B),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${B}`,title:`Delete ${B}`,children:s.jsx(Qs,{className:"h-4 w-4"})})]})]},B))}),s.jsxs("div",{className:`flex items-end gap-3 ${u?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!u&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:o,onChange:B=>h(B.target.value.toUpperCase()),placeholder:u?"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:[!u&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:B=>j(B.target.value),placeholder:u?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Le,{onClick:D,disabled:!o.trim(),size:u?"sm":"md",children:[s.jsx(as,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function rS(n,r){var u;return!!(n!=null&&n.startsWith("glm-")||(u=r==null?void 0:r.model)!=null&&u.startsWith("glm-"))}function iS(n,r){var u,o;return rS(n,r)?!((o=(u=r==null?void 0:r.envVars)==null?void 0:u.ANTHROPIC_API_KEY)!=null&&o.trim()):!1}const Px={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:""}},cS=({isOpen:n,onClose:r,onSave:u,presetId:o,preset:h,isBuiltIn:f,existingIds:j})=>{const[b,y]=ze.useState(""),[x,C]=ze.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[M,D]=ze.useState(!1),[A,N]=ze.useState("custom"),[O,k]=ze.useState(null),Z=iS(o??b,x);ze.useEffect(()=>{n&&(o&&h?(y(o),C({name:h.name,command:h.command,subcommand:h.subcommand??"",promptFlag:h.promptFlag??"",autoApproveFlag:h.autoApproveFlag??"",workdirFlag:h.workdirFlag??"",modelFlag:h.modelFlag??"",model:h.model??"",envVars:h.envVars??{}}),o==="claude"||h.command==="claude"?N("claude"):o==="codex"||h.command==="codex"?N("codex"):N("custom")):(y(""),C({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),N("custom")),k(null),D(!!(h!=null&&h.envVars&&Object.keys(h.envVars).length>0)))},[n,o,h]);const B=U=>{if(N(U),U!=="custom"&&Px[U]){const G=Px[U];C(I=>({...I,...G,envVars:I.envVars})),!o&&!b&&y(U)}},K=(U,G)=>{C(I=>({...I,[U]:G})),k(null)},R=()=>{if(!x.name.trim())return k("Name is required"),!1;if(!x.command.trim())return k("Command is required"),!1;if(!o){if(!b.trim())return k("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(b))return k("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(j.includes(b))return k("A preset with this ID already exists"),!1}return!0},w=()=>{var G,I,le,S,te,ae;if(!R())return;const U={name:x.name.trim(),command:x.command.trim()};(G=x.subcommand)!=null&&G.trim()&&(U.subcommand=x.subcommand.trim()),(I=x.promptFlag)!=null&&I.trim()&&(U.promptFlag=x.promptFlag.trim()),(le=x.autoApproveFlag)!=null&&le.trim()&&(U.autoApproveFlag=x.autoApproveFlag.trim()),(S=x.workdirFlag)!=null&&S.trim()&&(U.workdirFlag=x.workdirFlag.trim()),(te=x.modelFlag)!=null&&te.trim()&&(U.modelFlag=x.modelFlag.trim()),(ae=x.model)!=null&&ae.trim()&&(U.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(U.envVars=x.envVars),u(o||b,U),r()};return s.jsx(nS,{isOpen:n,onClose:r,title:o?`Edit Preset: ${h==null?void 0:h.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[O&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:O}),Z&&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(Zs,{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."})]})]})}),!f&&s.jsx("div",{children:s.jsx(We,{label:"Template",value:A,onChange:B,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"})}),!o&&s.jsx(je,{label:"Preset ID",value:b,onChange:U=>y(U.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(je,{label:"Display Name",value:x.name,onChange:U=>K("name",U.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(je,{label:"Command",value:x.command,onChange:U=>K("command",U.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(je,{label:"Model",value:x.model??"",onChange:U=>K("model",U.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(je,{label:"Model Flag",value:x.modelFlag??"",onChange:U=>K("modelFlag",U.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>D(!M),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[M?s.jsx(W1,{className:"h-4 w-4"}):s.jsx(mh,{className:"h-4 w-4"}),"Advanced Options"]}),M&&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(je,{label:"Subcommand",value:x.subcommand??"",onChange:U=>K("subcommand",U.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(je,{label:"Prompt Flag",value:x.promptFlag??"",onChange:U=>K("promptFlag",U.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(je,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:U=>K("autoApproveFlag",U.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(je,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:U=>K("workdirFlag",U.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(mv,{envVars:x.envVars??{},onChange:U=>K("envVars",U),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Le,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Le,{onClick:w,children:o?"Save Changes":"Add Preset"})]})]})})},oS=({form:n,updateField:r,projectName:u,doctorChecks:o,doctorLoading:h})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{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(je,{label:"Project Name",value:u,disabled:!0}),s.jsx(je,{label:"Default Branch",value:n.defaultBranch,onChange:f=>r("defaultBranch",f.target.value)}),s.jsx(je,{label:"PRD Directory",value:n.prdDir,onChange:f=>r("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(je,{label:"Branch Prefix",value:n.branchPrefix,onChange:f=>r("branchPrefix",f.target.value)}),s.jsx(je,{label:"Templates Directory",value:n.templatesDir,onChange:f=>r("templatesDir",f.target.value),helperText:"Directory for custom template overrides"}),s.jsx(je,{label:"Max Log Size",type:"number",value:String(n.maxLogSize),onChange:f=>r("maxLogSize",Number(f.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"}),helperText:"Maximum size for process log files"})]}),s.jsxs("div",{className:"pt-4 mt-4 border-t border-slate-800 space-y-6",children:[s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/40 p-4",children:[s.jsx(Bt,{checked:n.gitPushNoVerify,onChange:f=>r("gitPushNoVerify",f),label:"Use --no-verify on automated pushes"}),s.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Project-scoped. Bypasses local pre-push hooks for Night Watch controller and agent pushes in repos whose hooks block automation."})]}),s.jsx(Zr,{label:"Branch Patterns",value:n.branchPatterns,onChange:f=>r("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"}),s.jsx(Zr,{label:"PRD Priority",value:n.prdPriority,onChange:f=>r("prdPriority",f),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}),s.jsxs(et,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(xp,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),h?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):o.map((f,j)=>{const b=f.status==="pass",y=f.status==="warn",x=b?"bg-green-500/10 text-green-400 border-green-500/20":y?"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:f.name}),s.jsx("p",{className:"text-xs text-slate-500",children:f.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${x}`,children:f.status.toUpperCase()})]},`${f.name}-${j}`)})]})]}),Bx=({presetId:n,preset:r,isBuiltIn:u,onEdit:o,onDelete:h,onReset:f})=>{var x,C,M;const j=r.envVars?Object.keys(r.envVars).length:0,y=(n.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((M=(C=r.envVars)==null?void 0:C.ANTHROPIC_API_KEY)!=null&&M.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:r.name}),u&&s.jsx(Tt,{variant:"info",className:"text-[10px]",children:"Built-in"}),y&&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(Zs,{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:o,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${r.name} preset`,title:"Edit preset",children:s.jsx(wu,{className:"h-4 w-4"})}),u?f&&s.jsx("button",{type:"button",onClick:f,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${r.name} to defaults`,title:"Reset to defaults",children:s.jsx(yh,{className:"h-4 w-4"})}):h&&s.jsx("button",{type:"button",onClick:h,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${r.name} preset`,title:"Delete preset",children:s.jsx(Qs,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[r.command,r.subcommand&&` ${r.subcommand}`]})]}),r.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(Tt,{variant:"neutral",className:"text-[10px] font-mono",children:r.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",n]}),j>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[j," env var",j!==1?"s":""]})]})]})},nh={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},lh={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",ux:"UX",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger",manager:"Manager"},Ff={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},$x=({override:n,onChange:r,onSave:u,onCancel:o,isNew:h,presetOptions:f})=>{const j=N=>{const O=n.days.includes(N)?n.days.filter(k=>k!==N):[...n.days,N].sort((k,Z)=>k-Z);r({...n,days:O})},b=()=>{r({...n,days:[1,2,3,4,5]})},y=()=>{r({...n,days:[0,6]})},x=()=>{r({...n,days:[0,1,2,3,4,5,6]})},C=()=>{r({...n,jobTypes:null})},M=N=>{const O=n.jobTypes??[],k=O.includes(N)?O.filter(Z=>Z!==N):[...O,N];r({...n,jobTypes:k.length===0?null:k})},D=n.jobTypes===null||n.jobTypes===void 0,A=n.label.trim().length>0&&n.presetId.trim().length>0&&n.days.length>0&&n.startTime.trim().length>0&&n.endTime.trim().length>0;return 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(je,{label:"Label",value:n.label,onChange:N=>r({...n,label:N.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(We,{label:"Provider",value:n.presetId,onChange:N=>r({...n,presetId:N}),options:f})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Days"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Object.keys(nh).map(N=>s.jsx("button",{type:"button",onClick:()=>j(N),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${n.days.includes(N)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:nh[N]},N)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:b,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekdays"}),s.jsx("button",{type:"button",onClick:y,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekend"}),s.jsx("button",{type:"button",onClick:x,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"All"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Start Time"}),s.jsx("input",{type:"time",value:n.startTime,onChange:N=>r({...n,startTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"End Time"}),s.jsx("input",{type:"time",value:n.endTime,onChange:N=>r({...n,endTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Job Types"}),s.jsx("button",{type:"button",onClick:C,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:D?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(lh).filter(N=>N!=="planner").map(N=>{var k;const O=D||(((k=n.jobTypes)==null?void 0:k.includes(N))??!1);return s.jsx("button",{type:"button",onClick:()=>M(N),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${O?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:D,children:lh[N]},N)})}),D&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This override applies to all job types."})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Bt,{checked:n.enabled,onChange:N=>r({...n,enabled:N}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Le,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(Le,{onClick:u,disabled:!A,children:h?"Add Override":"Save Changes"})]})]})},uS=({overrides:n,onChange:r,presetOptions:u})=>{const[o,h]=ze.useState(null),[f,j]=ze.useState(!1),[b,y]=ze.useState(Ff),x=()=>{r([...n,b]),y({...Ff}),j(!1)},C=(k,Z)=>{const B=[...n];B[k]=Z,r(B)},M=k=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(n.filter((Z,B)=>B!==k))},D=k=>{const Z=[...n];Z[k]={...Z[k],enabled:!Z[k].enabled},r(Z)},A=k=>k.length===7?"Every day":k.length===5&&k.every(Z=>Z>=1&&Z<=5)?"Weekdays":k.length===2&&k.includes(0)&&k.includes(6)?"Weekends":k.map(Z=>nh[Z]).join(", "),N=k=>!k||k.length===0?"All Jobs":k.map(Z=>lh[Z]).join(", "),O=k=>{const Z=u.find(B=>B.value===k);return(Z==null?void 0:Z.label)||k};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:n.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No schedule overrides configured."}):n.map((k,Z)=>s.jsx("div",{children:o===Z?s.jsx($x,{override:k,onChange:B=>C(Z,B),onSave:()=>h(null),onCancel:()=>h(null),presetOptions:u}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${k.enabled?"border-slate-800":"border-slate-800/50 opacity-60"}`,children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx(Bt,{checked:k.enabled,onChange:()=>D(Z)}),s.jsx("span",{className:"text-slate-100 font-medium",children:k.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:O(k.presetId)})," · ",A(k.days)," · ",k.startTime," - ",k.endTime," · ",N(k.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>h(Z),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${k.label}`,title:`Edit ${k.label}`,children:s.jsx(wu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>M(Z),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${k.label}`,title:`Delete ${k.label}`,children:s.jsx(Qs,{className:"h-4 w-4"})})]})]})},Z))}),f?s.jsx($x,{override:b,onChange:y,onSave:x,onCancel:()=>{j(!1),y({...Ff})},isNew:!0,presetOptions:u}):s.jsxs(Le,{variant:"ghost",onClick:()=>j(!0),children:[s.jsx(as,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},dS=({form:n,updateField:r,getAllPresets:u,getPresetOptions:o,handleEditPreset:h,handleDeletePreset:f,handleResetPreset:j,handleAddPreset:b})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{className:"p-6 bg-slate-900/60 border-indigo-500/20",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-100",children:"Global AI Provider"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Default preset for all automation tasks"})]}),s.jsx("div",{className:"w-full md:w-72",children:s.jsx(We,{value:n.provider,onChange:y=>r("provider",y),options:o(n.providerPresets)})})]})}),s.jsxs(et,{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:"Available Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Custom AI models and environment configurations"})]}),s.jsxs(Le,{onClick:b,variant:"primary",size:"sm",children:[s.jsx(as,{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:[pu.map(y=>{const C=u()[y];return C?s.jsx(Bx,{presetId:y,preset:C,isBuiltIn:!0,onEdit:()=>h(y),onReset:()=>j(y)},y):null}),Object.entries(n.providerPresets).filter(([y])=>!pu.includes(y)).map(([y,x])=>s.jsx(Bx,{presetId:y,preset:x,isBuiltIn:!1,onEdit:()=>h(y),onDelete:()=>f(y)},y))]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Reliability & Fallbacks"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automated fallback when a provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Primary Native Fallback",value:n.primaryFallbackModel,onChange:y=>r("primaryFallbackModel",y),options:[{label:"— None —",value:""},{label:"Claude Sonnet 4.6",value:"sonnet"},{label:"Claude Opus 4.6",value:"opus"}],helperText:"Used only when no primary fallback preset is configured"}),s.jsx(We,{label:"Secondary Native Fallback",value:n.secondaryFallbackModel,onChange:y=>r("secondaryFallbackModel",y),options:[{label:"— None —",value:""},{label:"Claude Sonnet 4.6",value:"sonnet"},{label:"Claude Opus 4.6",value:"opus"}],helperText:"Tried only if the primary native fallback also rate-limits"}),s.jsx(We,{label:"Primary Fallback Preset",value:n.primaryFallbackPreset,onChange:y=>r("primaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(u()).map(([y,x])=>({label:x.name,value:y}))],helperText:"Automatic switch when global provider is throttled"}),s.jsx(We,{label:"Secondary Fallback Preset",value:n.secondaryFallbackPreset,onChange:y=>r("secondaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(u()).map(([y,x])=>({label:x.name,value:y}))]})]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Scheduled Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Automatically switch providers based on the time of day (e.g. use cheaper models at night)"})]}),s.jsx(uS,{overrides:n.providerScheduleOverrides,onChange:y=>r("providerScheduleOverrides",y),presetOptions:Object.entries(u()).map(([y,x])=>({label:x.name,value:y}))})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Variables passed to all provider CLI executions"}),s.jsx(mv,{envVars:n.providerEnv,onChange:y=>r("providerEnv",y)})]})]});function Yx(n){return n.type==="telegram"?`telegram:${n.botToken}:${n.chatId}`:`${n.type}:${n.url}`}const fS=[{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:"Merge Completed",value:"merge_completed"},{label:"Merge Failed",value:"merge_failed"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],hS=(n,r)=>n.includes(r)?n.filter(u=>u!==r):[...n,r],Gx=({webhook:n,onChange:r,onSave:u,onCancel:o,isNew:h})=>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(We,{label:"Type",value:n.type,onChange:f=>{const j=f;r(j==="telegram"?{type:j,botToken:"",chatId:"",events:n.events}:{type:j,url:"",events:n.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),n.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(je,{label:"Bot Token",type:"password",value:n.botToken||"",onChange:f=>r({...n,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(je,{label:"Chat ID",value:n.chatId||"",onChange:f=>r({...n,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(je,{label:"Webhook URL",type:"password",value:n.url||"",onChange:f=>r({...n,url:f.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:fS.map(f=>s.jsx("button",{type:"button",onClick:()=>r({...n,events:hS(n.events,f.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${n.events.includes(f.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:f.label},f.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Le,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(Le,{onClick:u,disabled:n.events.length===0||(n.type==="telegram"?!n.botToken||!n.chatId:!n.url),children:h?"Add Webhook":"Save Changes"})]})]}),mS=({notifications:n,onChange:r,globalWebhook:u,onSetGlobal:o,onUnsetGlobal:h})=>{const[f,j]=ze.useState(null),[b,y]=ze.useState(!1),[x,C]=ze.useState({type:"slack",url:"",events:[]}),M=()=>{r({webhooks:[...n.webhooks,x]}),C({type:"slack",url:"",events:[]}),y(!1)},D=(N,O)=>{const k=[...n.webhooks];k[N]=O,r({webhooks:k})},A=N=>{r({webhooks:n.webhooks.filter((O,k)=>k!==N)})};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:n.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):n.webhooks.map((N,O)=>s.jsx("div",{children:f===O?s.jsx(Gx,{webhook:N,onChange:k=>D(O,k),onSave:()=>j(null),onCancel:()=>j(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:N.type}),N.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",N.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:N.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:[o!==void 0&&(()=>{const k=u!=null&&Yx(N)===Yx(u);return s.jsx("button",{type:"button",onClick:()=>k?h==null?void 0:h():o(N),className:`p-2 transition-colors ${k?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":k?"Global channel (active)":"Set as global channel",title:k?"Global channel (active)":"Set as global channel",children:s.jsx(yj,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>j(O),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${N.type} webhook`,title:`Edit ${N.type} webhook`,children:s.jsx(wu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>A(O),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${N.type} webhook`,title:`Delete ${N.type} webhook`,children:s.jsx(Qs,{className:"h-4 w-4"})})]})]})},O))}),b?s.jsx(Gx,{webhook:x,onChange:C,onSave:M,onCancel:()=>y(!1),isNew:!0}):s.jsxs(Le,{variant:"ghost",onClick:()=>y(!0),children:[s.jsx(as,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},Fx=[{label:"Executor",value:"executor"},{label:"Reviewer",value:"reviewer"},{label:"QA",value:"qa"},{label:"Audit",value:"audit"},{label:"Slicer / Planner",value:"slicer"},{label:"Analytics",value:"analytics"},{label:"PR Resolver",value:"pr-resolver"},{label:"Merger",value:"merger"}],Ix=[{label:"workflow_run",value:"workflow_run"},{label:"check_suite",value:"check_suite"},{label:"pull_request",value:"pull_request"},{label:"repository_dispatch",value:"repository_dispatch"}];function gS(n){return encodeURIComponent(n.replace(/\//g,"~"))}function xS(){return typeof window>"u"||window.location.origin==="null"?"":window.location.origin}function pS(n){return(n==null?void 0:n.join(", "))??""}function vS(n){const r=n.split(",").map(u=>u.trim()).filter(Boolean);return r.length>0?r:void 0}function yS(n){return{event:"workflow_run",action:"completed",jobId:n}}function bS(n,r,u){const o=n&&r?`/api/projects/${gS(r)}/jobs/${u}/run`:`/api/jobs/${u}/run`;return`${xS()}${o}`}function jS(n){return[`payload='{"source":"manual"}'`,`signature=$(printf '%s' "$payload" | openssl dgst -sha256 -hmac "$NIGHT_WATCH_WEBHOOK_SECRET" | awk '{print $2}')`,`curl -X POST '${n}' \\`," -H 'Content-Type: application/json' \\",' -H "X-Night-Watch-Signature: sha256=$signature" \\',' --data "$payload"'].join(`
447
+ `)}const NS=({form:n,updateField:r,globalWebhook:u,isGlobalMode:o=!1,onSetGlobal:h,onUnsetGlobal:f,selectedProjectId:j})=>{const[b,y]=ze.useState(null),x=n.webhookTriggers,C=x.allowedJobIds[0]??"reviewer",M=bS(o,j,C),D=jS(M),A=R=>{r("webhookTriggers",{...x,...R})},N=R=>{A({github:{...x.github,...R}})},O=R=>{const w=x.allowedJobIds.includes(R)?x.allowedJobIds.filter(U=>U!==R):[...x.allowedJobIds,R];A({allowedJobIds:w})},k=R=>{const w=x.github.events.includes(R)?x.github.events.filter(U=>U!==R):[...x.github.events,R];N({events:w})},Z=(R,w)=>{const U=x.github.rules.map((G,I)=>I===R?{...G,...w}:G);N({rules:U})},B=R=>{N({rules:x.github.rules.filter((w,U)=>U!==R)})},K=async(R,w)=>{var U;await((U=navigator.clipboard)==null?void 0:U.writeText(R)),y(w),window.setTimeout(()=>y(null),1500)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{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 mt-1",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(Bt,{checked:n.boardProvider.enabled,onChange:R=>r("boardProvider",{...n.boardProvider,enabled:R})})]}),n.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(We,{label:"Board Provider",value:n.boardProvider.provider,onChange:R=>r("boardProvider",{...n.boardProvider,provider:R}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),n.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(je,{label:"Project Number",type:"number",value:String(n.boardProvider.projectNumber||""),onChange:R=>r("boardProvider",{...n.boardProvider,projectNumber:R.target.value?Number(R.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(je,{label:"Repository",value:n.boardProvider.repo||"",onChange:R=>r("boardProvider",{...n.boardProvider,repo:R.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),n.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."})})]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Inbound Webhook Triggers"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Run signed Night Watch jobs from external systems"})]}),s.jsx(Bt,{checked:x.enabled,label:"Enabled",name:"webhookTriggers.enabled",onChange:R=>A({enabled:R})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(je,{label:"Secret Environment Variable",name:"webhookTriggers.secretEnv",value:x.secretEnv,onChange:R=>A({secretEnv:R.target.value}),helperText:"Server environment variable containing the shared HMAC secret"}),s.jsx(je,{label:"Signature Max Skew",min:0,name:"webhookTriggers.maxSkewSeconds",type:"number",value:String(x.maxSkewSeconds),onChange:R=>A({maxSkewSeconds:R.target.value?Math.max(0,Number(R.target.value)):0}),helperText:"Seconds, used when timestamp validation is required"}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Bt,{checked:x.requireTimestamp,label:"Require timestamp header",name:"webhookTriggers.requireTimestamp",onChange:R=>A({requireTimestamp:R})})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Allowed Jobs"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Fx.map(R=>s.jsx("button",{type:"button","aria-pressed":x.allowedJobIds.includes(R.value),onClick:()=>O(R.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.allowedJobIds.includes(R.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:R.label},R.value))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx(je,{label:"Endpoint URL",readOnly:!0,value:M}),s.jsx(Le,{"aria-label":"Copy endpoint URL",size:"icon",type:"button",variant:"outline",onClick:()=>K(M,"endpoint"),children:s.jsx(Yg,{className:"h-4 w-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Signed curl Example"}),s.jsxs(Le,{size:"sm",type:"button",variant:"ghost",onClick:()=>K(D,"curl"),children:[s.jsx(Yg,{className:"h-4 w-4 mr-2"}),b==="curl"?"Copied":"Copy"]})]}),s.jsx("pre",{className:"overflow-x-auto rounded-lg border border-slate-800 bg-slate-950 p-3 text-xs text-slate-300",children:s.jsx("code",{children:D})})]})]}),s.jsxs("div",{className:"space-y-4 pt-6 border-t border-slate-800",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"GitHub Events"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rules dispatch the configured job when GitHub payloads match"})]}),s.jsx(Bt,{checked:x.github.enabled,label:"Enabled",name:"webhookTriggers.github.enabled",onChange:R=>N({enabled:R})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Selected Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Ix.map(R=>s.jsx("button",{type:"button","aria-pressed":x.github.events.includes(R.value),onClick:()=>k(R.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.github.events.includes(R.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:R.label},R.value))})]}),s.jsxs("div",{className:"space-y-3",children:[x.github.rules.map((R,w)=>s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/40 p-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(We,{label:"Event",value:R.event,onChange:U=>Z(w,{event:U}),options:Ix}),s.jsx(je,{label:"Action",value:R.action??"",onChange:U=>Z(w,{action:U.target.value||void 0}),placeholder:"completed"}),s.jsx(We,{label:"Job",value:R.jobId,onChange:U=>Z(w,{jobId:U}),options:Fx})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_auto_auto] gap-4 md:items-end",children:[s.jsx(je,{label:"Branch Patterns",value:pS(R.branchPatterns),onChange:U=>Z(w,{branchPatterns:vS(U.target.value)}),placeholder:"main, release/*"}),s.jsx(Bt,{checked:R.onlyOnFailure??!1,label:"Only failures",onChange:U=>Z(w,{onlyOnFailure:U})}),s.jsx(Le,{"aria-label":`Delete GitHub rule ${w+1}`,size:"icon",type:"button",variant:"ghost",onClick:()=>B(w),children:s.jsx(Qs,{className:"h-4 w-4 text-red-400"})})]})]},w)),s.jsxs(Le,{type:"button",variant:"ghost",onClick:()=>N({rules:[...x.github.rules,yS(C)]}),children:[s.jsx(as,{className:"h-4 w-4 mr-2"}),"Add GitHub Rule"]})]})]})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:"Send status updates and job results to custom endpoints or team channels"}),s.jsx(mS,{notifications:n.notifications,onChange:R=>r("notifications",R),globalWebhook:u,onSetGlobal:h,onUnsetGlobal:f})]})]})};function wS(n,r,u,o){const{addToast:h}=It(),[f,j]=z.useState(!1),[b,y]=z.useState(null),[x,C]=z.useState(null),[M,D]=z.useState(null),A=z.useCallback(()=>({...hv,...n}),[n]),N=z.useCallback(U=>{const G=A();return Object.entries(G).map(([I,le])=>({label:le.name,value:I}))},[A]),O=z.useCallback(U=>{const G=[];r===U&&G.push("Global Provider");const I={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[le,S]of Object.entries(u))S===U&&G.push(I[le]??le);return G},[r,u]),k=z.useCallback(()=>{y(null),C(null),j(!0)},[]),Z=z.useCallback(U=>{const I=A()[U];I&&(y(U),C(I),j(!0))},[A]),B=z.useCallback(async(U,G)=>{const I=!b,le={...n,[U]:G};o("providerPresets",le);try{await mu({providerPresets:{[U]:G}}),h({title:I?"Preset Added":"Preset Updated",message:I?`${G.name} has been added. You can now assign it to jobs.`:`${G.name} has been saved.`,type:"success"})}catch(S){h({title:"Save Failed",message:S instanceof Error?S.message:"Failed to save preset",type:"error"}),o("providerPresets",n)}},[b,n,o,h]),K=z.useCallback(U=>{var le,S;if(pu.includes(U)){h({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const G=O(U);if(G.length>0){D({presetId:U,presetName:((le=A()[U])==null?void 0:le.name)??U,references:G});return}const I={...n};delete I[U],o("providerPresets",I),h({title:"Preset Deleted",message:`${((S=A()[U])==null?void 0:S.name)??U} has been removed.`,type:"success"})},[n,o,h,O,A]),R=z.useCallback(U=>{const G={...n};delete G[U],o("providerPresets",G),h({title:"Preset Reset",message:`${U} has been reset to built-in defaults.`,type:"success"})},[n,o,h]),w=z.useCallback(()=>{if(!M)return;const{presetId:U}=M,G={...n};delete G[U],o("providerPresets",G);const I={...u};for(const le of Object.keys(I))I[le]===U&&delete I[le];o("jobProviders",I),r===U&&o("provider","claude"),D(null),h({title:"Preset Deleted",message:`${M.presetName} has been removed and all references cleared.`,type:"success"})},[M,n,u,r,o,h]);return{presetModalOpen:f,setPresetModalOpen:j,editingPresetId:b,editingPreset:x,deleteWarning:M,setDeleteWarning:D,getAllPresets:A,getPresetOptions:N,getPresetReferences:O,handleAddPreset:k,handleEditPreset:Z,handleSavePreset:B,handleDeletePreset:K,handleResetPreset:R,handleConfirmDelete:w}}const SS=["executor","reviewer","qa","audit","ux","slicer","analytics","pr-resolver","merger","manager"],CS=["executor","reviewer","qa","audit","ux","slicer","analytics","pr-resolver","merger","manager"],ES={enabled:!1,secretEnv:"NIGHT_WATCH_WEBHOOK_SECRET",allowedJobIds:CS,requireTimestamp:!1,maxSkewSeconds:300,github:{enabled:!1,events:[],rules:[]}},Zx=n=>{const r=n.primaryFallbackModel!==void 0?n.primaryFallbackModel??"":n.claudeModel??"",u=n.secondaryFallbackModel!==void 0?n.secondaryFallbackModel??"":n.primaryFallbackModel!==void 0?n.primaryFallbackModel??"":n.claudeModel??"";return{provider:n.provider,providerLabel:n.providerLabel??"",providerPresets:n.providerPresets??{},defaultBranch:n.defaultBranch,prdDir:n.prdDir||"docs/prds",branchPrefix:n.branchPrefix,branchPatterns:n.branchPatterns||[],gitPushNoVerify:n.gitPushNoVerify??!1,executorEnabled:n.executorEnabled??!0,reviewerEnabled:n.reviewerEnabled,minReviewScore:n.minReviewScore,maxRuntime:n.maxRuntime,reviewerMaxRuntime:n.reviewerMaxRuntime,maxLogSize:n.maxLogSize,cronSchedule:n.cronSchedule||ov,reviewerSchedule:n.reviewerSchedule||uv,scheduleBundleId:n.scheduleBundleId??null,cronScheduleOffset:n.cronScheduleOffset??0,schedulingPriority:n.schedulingPriority??3,maxRetries:n.maxRetries??3,reviewerMaxRetries:n.reviewerMaxRetries??2,reviewerRetryDelay:n.reviewerRetryDelay??30,reviewerMaxPrsPerRun:n.reviewerMaxPrsPerRun??0,providerEnv:n.providerEnv||{},notifications:n.notifications||{webhooks:[]},prdPriority:n.prdPriority||[],roadmapScanner:n.roadmapScanner||Qr(),templatesDir:n.templatesDir||".night-watch/templates",boardProvider:n.boardProvider||{enabled:!0,provider:"github"},jobProviders:n.jobProviders||{},fallbackOnRateLimit:n.fallbackOnRateLimit??!0,primaryFallbackModel:r,secondaryFallbackModel:u,primaryFallbackPreset:n.primaryFallbackPreset??"",secondaryFallbackPreset:n.secondaryFallbackPreset??"",claudeModel:r,providerScheduleOverrides:n.providerScheduleOverrides??[],qa:n.qa||dv(),audit:{...fv(),...n.audit??{}},ux:{...Th(),...n.ux??{}},analytics:n.analytics||Mh(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??Nc(),merger:n.merger??Cu(),manager:n.manager??wc(),queue:n.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10,ux:10},providerBuckets:{}},webhookTriggers:n.webhookTriggers??ES}},TS=()=>{const n=Nn(),r=yu(),{addToast:u,projectName:o,selectedProjectId:h,globalModeLoading:f,isGlobalMode:j,removeProjectFromList:b}=It(),[y,x]=ze.useState(!1),[C,M]=ze.useState(!1),[D,A]=ze.useState(!1),[N,O]=ze.useState(null),[k,Z]=ze.useState(void 0),B=ze.useRef(null),[K,R]=ze.useState(!1),w=ze.useRef(!1),U=ze.useRef(!1),[G,I]=ze.useState("project"),le=ze.useMemo(()=>{const xe=new URLSearchParams(n.search).get("tab");return xe==="jobs"||xe==="schedules"?xe:null},[n.search]),{data:S,loading:te,error:ae,refetch:ie}=qa(wh,[h],{enabled:!f}),{data:ge,loading:pe,refetch:$}=qa(yN,[h],{enabled:!f}),J=ge??[],fe=(xe,Se)=>{O(lt=>lt&&{...lt,[xe]:Se})},me=wS((N==null?void 0:N.providerPresets)??{},(N==null?void 0:N.provider)??"claude",(N==null?void 0:N.jobProviders)??{},fe);ze.useEffect(()=>{MN().then(xe=>Z(xe.webhook)).catch(()=>{})},[h]),ze.useEffect(()=>{le&&r({pathname:"/scheduling",search:n.search},{replace:!0})},[le,n.search,r]),ze.useEffect(()=>{if(le)return;const Se=new URLSearchParams(n.search).get("tab");Se&&I({providers:"ai-providers",runtime:"ai-providers","ai-runtime":"ai-providers",notifications:"integrations",general:"project",advanced:"project"}[Se]??Se)},[le,n.search]),ze.useEffect(()=>{if(S){if(w.current){w.current=!1;return}const xe=Zx(S);O(xe),B.current=xe,R(!1)}},[S]),ze.useEffect(()=>{if(!N||!B.current)return;const xe=JSON.stringify(N),Se=JSON.stringify(B.current);R(xe!==Se)},[N]),ze.useEffect(()=>{N&&U.current&&(U.current=!1,be())},[N==null?void 0:N.jobProviders]);const be=async()=>{var lt,Ye,wt,fa,Oa,Ba,ha,xa,wn,Sn,Cn,$a,Ya;if(!N)return;const xe=N.cronSchedule!==(S==null?void 0:S.cronSchedule)||N.reviewerSchedule!==(S==null?void 0:S.reviewerSchedule)||N.cronScheduleOffset!==((S==null?void 0:S.cronScheduleOffset)??0)||N.schedulingPriority!==((S==null?void 0:S.schedulingPriority)??3)||N.executorEnabled!==((S==null?void 0:S.executorEnabled)??!0)||N.reviewerEnabled!==((S==null?void 0:S.reviewerEnabled)??!0)||N.queue.enabled!==(((lt=S==null?void 0:S.queue)==null?void 0:lt.enabled)??!0)||N.qa.enabled!==((S==null?void 0:S.qa.enabled)??!0)||N.qa.schedule!==(S==null?void 0:S.qa.schedule)||N.audit.enabled!==((S==null?void 0:S.audit.enabled)??!1)||N.audit.schedule!==(S==null?void 0:S.audit.schedule)||N.ux.enabled!==(((Ye=S==null?void 0:S.ux)==null?void 0:Ye.enabled)??!1)||N.ux.schedule!==(((wt=S==null?void 0:S.ux)==null?void 0:wt.schedule)??Th().schedule)||N.analytics.enabled!==(((fa=S==null?void 0:S.analytics)==null?void 0:fa.enabled)??!1)||N.analytics.schedule!==(((Oa=S==null?void 0:S.analytics)==null?void 0:Oa.schedule)??Mh().schedule)||N.prResolver.enabled!==(((Ba=S==null?void 0:S.prResolver)==null?void 0:Ba.enabled)??Nc().enabled)||N.prResolver.schedule!==(((ha=S==null?void 0:S.prResolver)==null?void 0:ha.schedule)??Nc().schedule)||N.merger.enabled!==(((xa=S==null?void 0:S.merger)==null?void 0:xa.enabled)??!1)||N.merger.schedule!==(((wn=S==null?void 0:S.merger)==null?void 0:wn.schedule)??Cu().schedule)||N.manager.enabled!==(((Sn=S==null?void 0:S.manager)==null?void 0:Sn.enabled)??wc().enabled)||N.manager.schedule!==(((Cn=S==null?void 0:S.manager)==null?void 0:Cn.schedule)??wc().schedule)||N.roadmapScanner.enabled!==((($a=S==null?void 0:S.roadmapScanner)==null?void 0:$a.enabled)??!0)||(N.roadmapScanner.slicerSchedule||Qr().slicerSchedule)!==(((Ya=S==null?void 0:S.roadmapScanner)==null?void 0:Ya.slicerSchedule)||Qr().slicerSchedule),Se={};for(const Wt of SS){const Ga=N.jobProviders[Wt];typeof Ga=="string"&&Ga.trim().length>0?Se[Wt]=Ga:S!=null&&S.jobProviders[Wt]&&(Se[Wt]=null)}x(!0);try{const Wt=N.primaryFallbackModel||null,Ga=N.secondaryFallbackModel||null,ns=await mu({provider:N.provider,providerLabel:N.providerLabel.trim(),providerPresets:Object.keys(N.providerPresets).length>0?N.providerPresets:void 0,defaultBranch:N.defaultBranch,prdDir:N.prdDir,branchPrefix:N.branchPrefix,branchPatterns:N.branchPatterns,gitPushNoVerify:N.gitPushNoVerify,executorEnabled:N.executorEnabled,reviewerEnabled:N.reviewerEnabled,minReviewScore:N.minReviewScore,maxRuntime:N.maxRuntime,reviewerMaxRuntime:N.reviewerMaxRuntime,maxLogSize:N.maxLogSize,cronSchedule:N.cronSchedule,reviewerSchedule:N.reviewerSchedule,scheduleBundleId:N.scheduleBundleId,cronScheduleOffset:N.cronScheduleOffset,schedulingPriority:N.schedulingPriority,maxRetries:N.maxRetries,reviewerMaxRetries:N.reviewerMaxRetries,reviewerRetryDelay:N.reviewerRetryDelay,reviewerMaxPrsPerRun:N.reviewerMaxPrsPerRun,providerEnv:N.providerEnv,notifications:N.notifications,prdPriority:N.prdPriority,roadmapScanner:N.roadmapScanner,templatesDir:N.templatesDir,boardProvider:N.boardProvider,jobProviders:Se,fallbackOnRateLimit:N.fallbackOnRateLimit,primaryFallbackModel:Wt,secondaryFallbackModel:Ga,primaryFallbackPreset:N.primaryFallbackPreset||void 0,secondaryFallbackPreset:N.secondaryFallbackPreset||void 0,claudeModel:Wt,providerScheduleOverrides:N.providerScheduleOverrides,qa:N.qa,audit:N.audit,ux:N.ux,analytics:N.analytics,feedback:N.feedback,prResolver:N.prResolver,merger:N.merger,manager:N.manager,queue:N.queue,webhookTriggers:N.webhookTriggers}),vt=Zx(ns);O(vt),B.current=vt,R(!1);let Kt="";if(xe)try{await pc()}catch(Bn){Kt=Bn instanceof Error?Bn.message:"failed to reinstall cron schedules"}u(Kt?{title:"Settings Saved (Cron Reinstall Failed)",message:Kt,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),w.current=!0,ie(),$()}catch(Wt){u({title:"Save Failed",message:Wt instanceof Error?Wt.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},H=()=>{B.current&&(O(B.current),R(!1),u({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},se=async xe=>{if(!(k!=null&&!window.confirm("Replace existing global channel?")))try{const Se=await ex({webhook:xe});Z(Se.webhook)}catch(Se){u({title:"Failed to set global channel",message:Se instanceof Error?Se.message:"Unknown error",type:"error"})}},he=async()=>{try{await ex({webhook:null}),Z(null)}catch(xe){u({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},ye=async()=>{if(h){A(!0);try{await hN(h),b(h),M(!1),u({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(xe){u({title:"Remove Failed",message:xe instanceof Error?xe.message:"Failed to remove project",type:"error"})}finally{A(!1)}}};if(le)return s.jsx(Ha,{message:"Opening automation",rows:1});if(te||!N)return s.jsx(Ha,{message:"Loading settings",detail:"Fetching project configuration and health checks."});if(ae)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(jn,{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:ae.message}),s.jsx(Le,{onClick:()=>ie(),children:"Retry"})]});const Re=[{id:"project",label:"Project",content:s.jsx(oS,{form:N,updateField:fe,projectName:o,doctorChecks:J,doctorLoading:pe})},{id:"ai-providers",label:"AI Providers",content:s.jsx(dS,{form:N,updateField:fe,getAllPresets:me.getAllPresets,getPresetOptions:me.getPresetOptions,handleEditPreset:me.handleEditPreset,handleDeletePreset:me.handleDeletePreset,handleResetPreset:me.handleResetPreset,handleAddPreset:me.handleAddPreset})},{id:"integrations",label:"Integrations",content:s.jsx(NS,{form:N,updateField:fe,globalWebhook:k,isGlobalMode:j,onSetGlobal:se,onUnsetGlobal:he,selectedProjectId:h})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-32",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100",children:"Settings"}),s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Configure project automation, providers, and integrations"})]}),K&&s.jsxs(Tt,{variant:"warning",className:"animate-pulse",children:[s.jsx(Zs,{className:"h-3 w-3 mr-1"}),"Unsaved Changes"]})]}),s.jsx(zp,{tabs:Re,activeTab:G,onChange:I}),K&&s.jsx("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 w-full max-w-2xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-300",children:s.jsxs("div",{className:"bg-slate-900/90 backdrop-blur-md border border-indigo-500/30 rounded-2xl p-4 shadow-2xl flex items-center justify-between shadow-indigo-500/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/20 text-indigo-400",children:s.jsx(jn,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:"You have unsaved changes"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"Save your configuration to apply changes"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs(Le,{variant:"ghost",size:"sm",className:"text-slate-400 hover:text-slate-300",onClick:H,children:[s.jsx(yh,{className:"h-4 w-4 mr-2"}),"Discard"]}),s.jsxs(Le,{size:"sm",className:"bg-indigo-600 hover:bg-indigo-500 shadow-lg shadow-indigo-500/20",onClick:be,loading:y,children:[s.jsx(Np,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})}),j&&h&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(Le,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>M(!0),children:[s.jsx(Qs,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),C&&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:()=>!D&&M(!1),"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(Zs,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",o,"?"]})]}),s.jsx("p",{className:"text-sm text-slate-300 mb-6",children:"This will uninstall cron jobs and remove all Night Watch data for this project from the database. The project files on disk will not be deleted."}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>M(!1),disabled:D,children:"Cancel"}),s.jsx(Le,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:ye,loading:D,children:"Remove"})]})]})]}),s.jsx(cS,{isOpen:me.presetModalOpen,onClose:()=>{me.setPresetModalOpen(!1)},onSave:me.handleSavePreset,presetId:me.editingPresetId,preset:me.editingPreset,isBuiltIn:me.editingPresetId?pu.includes(me.editingPresetId):!1,existingIds:Object.keys(me.getAllPresets())}),me.deleteWarning&&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:()=>me.setDeleteWarning(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(Zs,{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:me.deleteWarning.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:me.deleteWarning.references.map(xe=>s.jsx("li",{children:xe},xe))}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:'Please remove these assignments before deleting the preset, or use "Force Delete" to remove the preset and clear all references.'}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>me.setDeleteWarning(null),children:"Cancel"}),s.jsx(Le,{variant:"secondary",onClick:me.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},MS=()=>(VN(),PN(),s.jsxs(f1,{children:[s.jsx(iN,{}),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(LN,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(UN,{}),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(Bb,{children:[s.jsx(qn,{path:"/",element:s.jsx(aw,{})}),s.jsx(qn,{path:"/analytics",element:s.jsx(IN,{})}),s.jsx(qn,{path:"/prs",element:s.jsx(lw,{})}),s.jsx(qn,{path:"/board",element:s.jsx(JN,{})}),s.jsx(qn,{path:"/scheduling",element:s.jsx(aS,{})}),s.jsx(qn,{path:"/logs",element:s.jsx(nw,{})}),s.jsx(qn,{path:"/roadmap",element:s.jsx(sw,{})}),s.jsx(qn,{path:"/settings",element:s.jsx(TS,{})}),s.jsx(qn,{path:"*",element:s.jsx(Vb,{to:"/",replace:!0})})]})})})]}),s.jsx(qN,{})]})]})),gv=document.getElementById("root");if(!gv)throw new Error("Could not find root element to mount to");const OS=Yy.createRoot(gv);OS.render(s.jsx(ze.StrictMode,{children:s.jsx(MS,{})}));